diff --git a/README.md b/README.md index d99acc3..c42f949 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,38 @@ To ensure maximum compatability, the Squidex Node SDK is transpiled to CJS JavaS } ``` +## Custom Templates + +### `api.mustache` + +* Use `vendorExtensions.x-method-name` for the actual method name. +* Use `vendorExtensions.f-field-name` for the actual header name. + +### `models.mustache` + +* Remove tslint rule. +* Remove eslint rule. + +### `modelGeneric.mustache` + +* Add methods to test for inherited type using discriminators. + +### `modelEnum.mustache` + +* Add underscore to unused variable `ignoreDiscriminator` to make compiler happy. + +### `runtime.mustache` + +* Remove exception handling and just forward exception. + +## Major changes in 2.0 + +This SDK is mainly based on code generation, based on the OpenAPI specification from the Squidex API. + +The initial version was built with fern: https://www.buildwithfern.com/. The main reason was the overall code quality and the support for discriminators. When the 1.0 version was released fern has not defined the pricing yet and unfortunately the current pricing is too expensive. + +Therefore the SDK code generation was moved to OpenAPI Generator: (https://openapi-generator.tech/). The goal was to be as close to the previous version as possible without doing too much changes to the code generation templates. It was not possible to provide the same method signatures. + ## Contributing While we value open-source contributions to this SDK, this library is generated programmatically. Additions made directly to this library would have to be moved over to our generation code, otherwise they would be overwritten upon the next generated release. Feel free to open a PR as a proof of concept, but know that we will not be able to merge it as-is. We suggest opening an issue first to discuss with us! diff --git a/openapi-config.yml b/openapi-config.yml index e179d2c..46d52fa 100644 --- a/openapi-config.yml +++ b/openapi-config.yml @@ -7,3 +7,11 @@ globalProperties: additionalProperties: withInterfaces: true useSingleRequestParameter: true + +nameMappings: + xFields: fields + X-Flatten: flatten + X-Languages: languages + X-NoSlowTotal: noSlowTotal + X-NoTotal: noTotal + X-Unpublished: unpublished diff --git a/openapi.json b/openapi.json index a824af2..e13d7ab 100644 --- a/openapi.json +++ b/openapi.json @@ -1,5 +1,5 @@ { - "x-generator": "NSwag v14.0.8.0 (NJsonSchema v11.0.1.0 (Newtonsoft.Json v13.0.0.0))", + "x-generator": "NSwag v14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))", "openapi": "3.0.0", "info": { "title": "Squidex API", @@ -79,13 +79,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.admin.users.read" - ] - } - ], "x-method-name": "getUsers" }, "post": { @@ -139,13 +132,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.admin.users.create" - ] - } - ], "x-method-name": "postUser" } }, @@ -193,13 +179,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.admin.users.read" - ] - } - ], "x-method-name": "getUser" }, "put": { @@ -268,13 +247,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.admin.users.update" - ] - } - ], "x-method-name": "putUser" }, "delete": { @@ -333,13 +305,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.admin.users.unlock" - ] - } - ], "x-method-name": "deleteUser" } }, @@ -407,13 +372,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.admin.users.lock" - ] - } - ], "x-method-name": "lockUser" } }, @@ -481,13 +439,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.admin.users.unlock" - ] - } - ], "x-method-name": "unlockUser" } }, @@ -573,11 +524,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "postUser" } }, @@ -625,11 +571,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "getUsers" } }, @@ -677,11 +618,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "getUser" } }, @@ -785,13 +721,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.translate" - ] - } - ], "x-method-name": "postTranslation" } }, @@ -876,11 +805,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "getTemplate" } }, @@ -928,13 +852,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.teams.{team}.contributors.read" - ] - } - ], "x-method-name": "getContributors" }, "post": { @@ -1003,13 +920,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.teams.{team}.contributors.assign" - ] - } - ], "x-method-name": "postContributor" } }, @@ -1067,11 +977,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "deleteMyself" } }, @@ -1139,13 +1044,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.teams.{team}.contributors.revoke" - ] - } - ], "x-method-name": "deleteContributor" } }, @@ -1241,11 +1139,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "postTeam" } }, @@ -1293,11 +1186,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "getTeam" }, "put": { @@ -1366,13 +1254,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.teams.{team}.update" - ] - } - ], "x-method-name": "putTeam" }, "delete": { @@ -1421,13 +1302,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.teams.{team}.delete" - ] - } - ], "x-method-name": "deleteTeam" } }, @@ -1475,13 +1349,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.teams.{team}.auth.read" - ] - } - ], "x-method-name": "getTeamAuth" }, "put": { @@ -1550,13 +1417,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.teams.{team}.auth.change" - ] - } - ], "x-method-name": "putTeamAuth" } }, @@ -1592,13 +1452,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.usage" - ] - } - ], "x-method-name": "getLog" } }, @@ -1658,13 +1511,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.usage" - ] - } - ], "x-method-name": "getUsages" } }, @@ -1734,13 +1580,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.teams.{team}.usage" - ] - } - ], "x-method-name": "getUsagesForTeam" } }, @@ -1776,13 +1615,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.usage" - ] - } - ], "x-method-name": "getCurrentStorageSize" } }, @@ -1830,13 +1662,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.teams.{team}.usage" - ] - } - ], "x-method-name": "getTeamCurrentStorageSizeForTeam" } }, @@ -1899,13 +1724,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.usage" - ] - } - ], "x-method-name": "getStorageSizes" } }, @@ -1978,13 +1796,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.teams.{team}.usage" - ] - } - ], "x-method-name": "getStorageSizesForTeam" } }, @@ -2035,13 +1846,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.search" - ] - } - ], "x-method-name": "getSearchResults" } }, @@ -2122,13 +1926,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.update" - ] - } - ], "x-method-name": "postField" } }, @@ -2220,13 +2017,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.update" - ] - } - ], "x-method-name": "postNestedField" } }, @@ -2297,13 +2087,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.update" - ] - } - ], "x-method-name": "putSchemaUIFields" } }, @@ -2374,13 +2157,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.update" - ] - } - ], "x-method-name": "putSchemaFieldOrdering" } }, @@ -2462,13 +2238,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.update" - ] - } - ], "x-method-name": "putNestedFieldOrdering" } }, @@ -2550,13 +2319,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.update" - ] - } - ], "x-method-name": "putField" }, "delete": { @@ -2623,13 +2385,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.update" - ] - } - ], "x-method-name": "deleteField" } }, @@ -2722,13 +2477,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.update" - ] - } - ], "x-method-name": "putNestedField" }, "delete": { @@ -2806,13 +2554,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.update" - ] - } - ], "x-method-name": "deleteNestedField" } }, @@ -2882,13 +2623,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.update" - ] - } - ], "x-method-name": "lockField" } }, @@ -2969,13 +2703,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.update" - ] - } - ], "x-method-name": "lockNestedField" } }, @@ -3045,13 +2772,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.update" - ] - } - ], "x-method-name": "hideField" } }, @@ -3132,13 +2852,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.update" - ] - } - ], "x-method-name": "hideNestedField" } }, @@ -3208,13 +2921,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.update" - ] - } - ], "x-method-name": "showField" } }, @@ -3295,13 +3001,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.update" - ] - } - ], "x-method-name": "showNestedField" } }, @@ -3371,13 +3070,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.update" - ] - } - ], "x-method-name": "enableField" } }, @@ -3458,13 +3150,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.update" - ] - } - ], "x-method-name": "enableNestedField" } }, @@ -3534,13 +3219,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.update" - ] - } - ], "x-method-name": "disableField" } }, @@ -3621,13 +3299,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.update" - ] - } - ], "x-method-name": "disableNestedField" } }, @@ -3663,13 +3334,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.read" - ] - } - ], "x-method-name": "getSchemas" }, "post": { @@ -3733,13 +3397,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.create" - ] - } - ], "x-method-name": "postSchema" } }, @@ -3787,13 +3444,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.read" - ] - } - ], "x-method-name": "getSchema" }, "put": { @@ -3862,13 +3512,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.update" - ] - } - ], "x-method-name": "putSchema" }, "delete": { @@ -3917,13 +3560,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.delete" - ] - } - ], "x-method-name": "deleteSchema" } }, @@ -3994,13 +3630,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.update" - ] - } - ], "x-method-name": "putSchemaSync" } }, @@ -4071,13 +3700,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.update" - ] - } - ], "x-method-name": "putCategory" } }, @@ -4148,13 +3770,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.update" - ] - } - ], "x-method-name": "putPreviewUrls" } }, @@ -4225,13 +3840,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.scripts" - ] - } - ], "x-method-name": "putScripts" } }, @@ -4302,13 +3910,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.update" - ] - } - ], "x-method-name": "putRules" } }, @@ -4366,13 +3967,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.publish" - ] - } - ], "x-method-name": "publishSchema" } }, @@ -4430,13 +4024,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.schemas.{schema}.publish" - ] - } - ], "x-method-name": "unpublishSchema" } }, @@ -4512,13 +4099,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.rules.read" - ] - } - ], "x-method-name": "getRules" }, "post": { @@ -4575,13 +4155,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.rules.create" - ] - } - ], "x-method-name": "postRule" } }, @@ -4617,13 +4190,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.rules.events.update" - ] - } - ], "x-method-name": "deleteRuleRun" } }, @@ -4694,13 +4260,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.rules.update" - ] - } - ], "x-method-name": "putRule" }, "delete": { @@ -4749,13 +4308,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.rules.delete" - ] - } - ], "x-method-name": "deleteRule" } }, @@ -4813,13 +4365,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.rules.disable" - ] - } - ], "x-method-name": "enableRule" } }, @@ -4877,13 +4422,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.rules.disable" - ] - } - ], "x-method-name": "disableRule" } }, @@ -4934,13 +4472,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.rules.events.run" - ] - } - ], "x-method-name": "triggerRule" } }, @@ -4998,13 +4529,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.rules.events.run" - ] - } - ], "x-method-name": "putRuleRun" } }, @@ -5052,13 +4576,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.rules.events.delete" - ] - } - ], "x-method-name": "deleteRuleEvents" } }, @@ -5117,13 +4634,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.rules.events.read" - ] - } - ], "x-method-name": "simulatePOST" } }, @@ -5171,13 +4681,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.rules.events.read" - ] - } - ], "x-method-name": "simulateGET" } }, @@ -5247,13 +4750,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.rules.events.read" - ] - } - ], "x-method-name": "getEvents" }, "delete": { @@ -5287,13 +4783,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.rules.events.delete" - ] - } - ], "x-method-name": "deleteEvents" } }, @@ -5344,13 +4833,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.rules.events.update" - ] - } - ], "x-method-name": "putEvent" }, "delete": { @@ -5399,13 +4881,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.rules.events.delete" - ] - } - ], "x-method-name": "deleteEvent" } }, @@ -5521,13 +4996,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.plans.read" - ] - } - ], "x-method-name": "getPlans" } }, @@ -5586,13 +5054,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.plans.change" - ] - } - ], "x-method-name": "putPlan" } }, @@ -5640,13 +5101,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.teams.{team}.plans.read" - ] - } - ], "x-method-name": "getTeamPlans" } }, @@ -5717,13 +5171,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.teams.{team}.plans.change" - ] - } - ], "x-method-name": "putTeamPlan" } }, @@ -5808,13 +5255,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.ping" - ] - } - ], "x-method-name": "getAppPing" } }, @@ -5860,11 +5300,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "getNews" } }, @@ -5998,13 +5433,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.jobs.read" - ] - } - ], "x-method-name": "getJobs" } }, @@ -6055,13 +5483,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.jobs.delete" - ] - } - ], "x-method-name": "deleteJob" } }, @@ -6108,16 +5529,9 @@ "$ref": "#/components/schemas/ErrorDto" } } - } - } - }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.history" - ] + } } - ], + }, "x-method-name": "getAppHistory" } }, @@ -6177,13 +5591,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.teams.{team}.history" - ] - } - ], "x-method-name": "getTeamHistory" } }, @@ -6280,13 +5687,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.admin.events.manage" - ] - } - ], "x-method-name": "startEventConsumer" } }, @@ -6344,13 +5744,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.admin.events.manage" - ] - } - ], "x-method-name": "stopEventConsumer" } }, @@ -6408,13 +5801,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.admin.events.manage" - ] - } - ], "x-method-name": "resetEventConsumer" } }, @@ -6672,11 +6058,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "getContents" }, "post": { @@ -6795,13 +6176,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.contents.{schema}.create" - ] - } - ], "x-method-name": "postContent" } }, @@ -6933,11 +6307,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "getContentsPost" } }, @@ -7047,11 +6416,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "getContent" }, "post": { @@ -7188,13 +6552,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.contents.{schema}.upsert" - ] - } - ], "x-method-name": "postUpsertContent" }, "put": { @@ -7303,13 +6660,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.contents.{schema}.update.own" - ] - } - ], "x-method-name": "putContent" }, "patch": { @@ -7409,13 +6759,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.contents.{schema}.update.own" - ] - } - ], "x-method-name": "patchContent" }, "delete": { @@ -7493,13 +6836,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.contents.{schema}.delete.own" - ] - } - ], "x-method-name": "deleteContent" } }, @@ -7561,11 +6897,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "getContentValidity" } }, @@ -7694,11 +7025,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "getReferences" } }, @@ -7827,11 +7153,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "getReferencing" } }, @@ -7923,13 +7244,6 @@ } }, "deprecated": true, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.contents.{schema}.read.own" - ] - } - ], "x-method-name": "getContentVersion" } }, @@ -8005,13 +7319,6 @@ } }, "deprecated": true, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.contents.{schema}.create" - ] - } - ], "x-method-name": "postContents" } }, @@ -8086,13 +7393,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.contents.{schema}.read.own" - ] - } - ], "x-method-name": "bulkUpdateContents" } }, @@ -8190,13 +7490,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.contents.{schema}.update.own" - ] - } - ], "x-method-name": "putContentDefaults" } }, @@ -8298,13 +7591,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.contents.{schema}.changestatus.own" - ] - } - ], "x-method-name": "putContentStatus" }, "delete": { @@ -8391,13 +7677,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.contents.{schema}.changestatus.own" - ] - } - ], "x-method-name": "deleteContentStatus" } }, @@ -8486,13 +7765,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.contents.{schema}.version.create.own" - ] - } - ], "x-method-name": "createDraft" }, "delete": { @@ -8579,13 +7851,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.contents.{schema}.version.delete.own" - ] - } - ], "x-method-name": "deleteVersion" } }, @@ -8661,11 +7926,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "getGraphQL" }, "post": { @@ -8730,11 +7990,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "postGraphQL" } }, @@ -8810,11 +8065,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "getGraphQLBatch" }, "post": { @@ -8879,11 +8129,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "postGraphQLBatch" } }, @@ -9044,11 +8289,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "getAllContents" }, "post": { @@ -9168,11 +8408,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "getAllContentsPost" } }, @@ -9246,13 +8481,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.contents.{schema}.read.own" - ] - } - ], "x-method-name": "bulkUpdateAllContents" } }, @@ -9351,13 +8579,6 @@ } }, "deprecated": true, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.jobs.delete" - ] - } - ], "x-method-name": "deleteBackup" } }, @@ -9462,13 +8683,6 @@ } }, "deprecated": true, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.jobs.read" - ] - } - ], "x-method-name": "getBackups" }, "post": { @@ -9505,13 +8719,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.jobs.create" - ] - } - ], "x-method-name": "postBackup" } }, @@ -9597,13 +8804,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.admin.restore" - ] - } - ], "x-method-name": "postRestoreJob" } }, @@ -9803,11 +9003,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "getAssetContentBySlug" } }, @@ -10008,11 +9203,6 @@ } }, "deprecated": true, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "getAssetContent" } }, @@ -10071,13 +9261,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.assets.read" - ] - } - ], "x-method-name": "getAssetFolders" }, "post": { @@ -10134,13 +9317,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.assets.folders.create" - ] - } - ], "x-method-name": "postAssetFolder" } }, @@ -10211,13 +9387,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.assets.folders.update" - ] - } - ], "x-method-name": "putAssetFolder" }, "delete": { @@ -10266,13 +9435,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.assets.folders.delete" - ] - } - ], "x-method-name": "deleteAssetFolder" } }, @@ -10343,13 +9505,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.assets.folders.update" - ] - } - ], "x-method-name": "putAssetFolderParent" } }, @@ -10390,13 +9545,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.assets.read" - ] - } - ], "x-method-name": "getTags" } }, @@ -10471,13 +9619,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.assets.update" - ] - } - ], "x-method-name": "putTag" } }, @@ -10598,17 +9739,10 @@ "schema": { "$ref": "#/components/schemas/ErrorDto" } - } - } - } - }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.assets.read" - ] + } + } } - ], + }, "x-method-name": "getAssets" }, "post": { @@ -10714,13 +9848,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.assets.create" - ] - } - ], "x-method-name": "postAsset" } }, @@ -10802,13 +9929,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.assets.read" - ] - } - ], "x-method-name": "getAssetsPost" } }, @@ -10856,13 +9976,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.assets.read" - ] - } - ], "x-method-name": "getAsset" }, "post": { @@ -10968,13 +10081,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.assets.create" - ] - } - ], "x-method-name": "postUpsertAsset" }, "put": { @@ -11043,13 +10149,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.assets.update" - ] - } - ], "x-method-name": "putAsset" }, "delete": { @@ -11116,13 +10215,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.assets.delete" - ] - } - ], "x-method-name": "deleteAsset" } }, @@ -11184,13 +10276,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.assets.read" - ] - } - ], "x-method-name": "bulkUpdateAssets" } }, @@ -11280,13 +10365,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.assets.upload" - ] - } - ], "x-method-name": "putAssetContent" } }, @@ -11357,13 +10435,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.assets.update" - ] - } - ], "x-method-name": "putAssetParent" } }, @@ -11399,13 +10470,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.asset-scripts.read" - ] - } - ], "x-method-name": "getAssetScripts" }, "put": { @@ -11462,13 +10526,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.asset-scripts.update" - ] - } - ], "x-method-name": "putAssetScripts" } }, @@ -11505,13 +10562,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.clients.read" - ] - } - ], "x-method-name": "getClients" }, "post": { @@ -11569,13 +10619,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.clients.create" - ] - } - ], "x-method-name": "postClient" } }, @@ -11647,13 +10690,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.clients.update" - ] - } - ], "x-method-name": "putClient" }, "delete": { @@ -11710,13 +10746,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.clients.delete" - ] - } - ], "x-method-name": "deleteClient" } }, @@ -11752,13 +10781,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.contributors.read" - ] - } - ], "x-method-name": "getContributors" }, "post": { @@ -11815,13 +10837,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.contributors.assign" - ] - } - ], "x-method-name": "postContributor" } }, @@ -11867,11 +10882,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "deleteMyself" } }, @@ -11929,13 +10939,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.contributors.revoke" - ] - } - ], "x-method-name": "deleteContributor" } }, @@ -12036,13 +11039,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.image" - ] - } - ], "x-method-name": "uploadImage" }, "delete": { @@ -12086,13 +11082,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.image" - ] - } - ], "x-method-name": "deleteImage" } }, @@ -12128,13 +11117,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.languages.read" - ] - } - ], "x-method-name": "getLanguages" }, "post": { @@ -12191,13 +11173,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.languages.create" - ] - } - ], "x-method-name": "postLanguage" } }, @@ -12268,13 +11243,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.languages.update" - ] - } - ], "x-method-name": "putLanguage" }, "delete": { @@ -12330,13 +11298,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.languages.delete" - ] - } - ], "x-method-name": "deleteLanguage" } }, @@ -12372,13 +11333,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.roles.read" - ] - } - ], "x-method-name": "getRoles" }, "post": { @@ -12435,13 +11389,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.roles.create" - ] - } - ], "x-method-name": "postRole" } }, @@ -12480,13 +11427,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.roles.read" - ] - } - ], "x-method-name": "getPermissions" } }, @@ -12557,13 +11497,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.roles.update" - ] - } - ], "x-method-name": "putRole" }, "delete": { @@ -12619,13 +11552,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.roles.delete" - ] - } - ], "x-method-name": "deleteRole" } }, @@ -12731,11 +11657,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "postApp" } }, @@ -12784,11 +11705,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "getTeamApps" } }, @@ -12824,11 +11740,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "getApp" }, "put": { @@ -12885,13 +11796,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.update" - ] - } - ], "x-method-name": "putApp" }, "delete": { @@ -12928,13 +11832,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.delete" - ] - } - ], "x-method-name": "deleteApp" } }, @@ -12993,13 +11890,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.transfer" - ] - } - ], "x-method-name": "putAppTeam" } }, @@ -13035,11 +11925,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], "x-method-name": "getSettings" }, "put": { @@ -13096,13 +11981,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.settings" - ] - } - ], "x-method-name": "putSettings" } }, @@ -13138,13 +12016,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.workflows.read" - ] - } - ], "x-method-name": "getWorkflows" }, "post": { @@ -13201,13 +12072,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.workflows.update" - ] - } - ], "x-method-name": "postWorkflow" } }, @@ -13278,13 +12142,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.workflows.update" - ] - } - ], "x-method-name": "putWorkflow" }, "delete": { @@ -13340,13 +12197,6 @@ } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.workflows.update" - ] - } - ], "x-method-name": "deleteWorkflow" } } @@ -20194,22 +19044,8 @@ } } } - }, - "securitySchemes": { - "squidex-oauth-auth": { - "type": "openIdConnect", - "description": "Squidex uses OpenId Connect (OIDC) with the Client Credentials Flow (defined in OAuth 2.0 RFC 6749, section 4.4).\r\n\r\nThe OpenId Connect Client Credentials flow can be used for machine to machine authentication. In this grant a specific user is not authorized but rather the credentials are verified and a generic `access_token` is returned.\r\n\r\nThe `access_token` is a signed JSON Web Token (JWT) which contains expiry information. \r\n\r\nTo retrieve an access token you must pass the Client ID and Client Secret to the token endpoint to authenticate yourself and get a token:\r\n\r\n $ curl\r\n -X POST 'https://cloud.squidex.io/identity-server/connect/token' \r\n -H 'Content-Type: application/x-www-form-urlencoded' \r\n -d 'grant_type=client_credentials&\r\n client_id=[CLIENT_ID]&\r\n client_secret=[CLIENT_SECRET]&\r\n\t\t\tscope=squidex-api'\r\n\r\nPass this token to all consecutiv requests to the API via the `Authorization` header:\r\n\r\n Authorization: Bearer ", - "openIdConnectUrl": "https://cloud.squidex.io/identity-server/.well-known/openid-configuration" - } } }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex-api" - ] - } - ], "externalDocs": { "url": "https://docs.squidex.io" } diff --git a/package-lock.json b/package-lock.json index 6a3c846..5aa0882 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,12 @@ { "name": "@squidex/squidex", - "version": "1.2.1", + "version": "2.0.0-rc1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@squidex/squidex", - "version": "1.2.1", - "dependencies": { - "undici": "^6.19.8" - }, + "version": "2.0.0-rc1", "devDependencies": { "@babel/core": "^7.25.2", "@babel/preset-env": "^7.25.4", @@ -24,7 +21,8 @@ "jest": "^29.7.0", "prettier": "3.3.3", "typescript": "^5.5.4", - "typescript-eslint": "^8.2.0" + "typescript-eslint": "^8.2.0", + "undici": "^6.19.8" } }, "node_modules/@ampproject/remapping": { @@ -6836,6 +6834,7 @@ "version": "6.19.8", "resolved": "https://registry.npmjs.org/undici/-/undici-6.19.8.tgz", "integrity": "sha512-U8uCCl2x9TK3WANvmBavymRzxbfFYG+tAu+fgx3zxQy3qdagQqBLwJVrdyO1TBfUXvfKveMKJZhpvUYoOjM+4g==", + "dev": true, "engines": { "node": ">=18.17" } diff --git a/package.json b/package.json index 8d49c46..7b711d0 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ "build": "tsc", "format:tests": "prettier --write tests/**/*.ts", "format:source": "prettier --write src/wrapper/**/*.ts && eslint --fix src/**/*.ts", - "generate:help": "cross-env-shell docker run --rm -v $INIT_CWD:/local openapitools/openapi-generator-cli config-help -g typescript-fetch", - "generate:run": "cross-env-shell docker run --rm -v $INIT_CWD:/local openapitools/openapi-generator-cli generate -i /local/openapi.json -g typescript-fetch --template-dir /local/templates -o /local/src/generated -c /local/openapi-config.yml", + "generate:help": "cross-env-shell docker run --rm -v $INIT_CWD:/local squidex/openapi-generator-cli config-help -g typescript-fetch", + "generate:run": "cross-env-shell docker run --rm -v $INIT_CWD:/local squidex/openapi-generator-cli generate -i /local/openapi.json -g typescript-fetch --template-dir /local/templates -o /local/src/generated -c /local/openapi-config.yml", "generate": "npm run generate:run && npm run format:source && npm run format:tests", "prepack": "cp -rv dist/. .", "test": "jest tests" @@ -29,9 +29,7 @@ "jest": "^29.7.0", "prettier": "3.3.3", "typescript": "^5.5.4", - "typescript-eslint": "^8.2.0" - }, - "dependencies": { + "typescript-eslint": "^8.2.0", "undici": "^6.19.8" } } diff --git a/src/generated/.openapi-generator/VERSION b/src/generated/.openapi-generator/VERSION index 09a6d30..17f2442 100644 --- a/src/generated/.openapi-generator/VERSION +++ b/src/generated/.openapi-generator/VERSION @@ -1 +1 @@ -7.8.0 +7.9.0-SNAPSHOT diff --git a/src/generated/apis/AppsApi.ts b/src/generated/apis/AppsApi.ts index 7abdea2..035f5e1 100644 --- a/src/generated/apis/AppsApi.ts +++ b/src/generated/apis/AppsApi.ts @@ -705,7 +705,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/assets/scripts`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/assets/scripts`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -742,7 +742,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/assets/scripts`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/assets/scripts`, method: 'PUT', headers: headerParameters, query: queryParameters, @@ -779,7 +779,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/clients/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/clients/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -808,7 +808,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/clients`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/clients`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -847,7 +847,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/clients`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/clients`, method: 'POST', headers: headerParameters, query: queryParameters, @@ -895,7 +895,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/clients/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/clients/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -932,7 +932,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/contributors/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/contributors/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -959,7 +959,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/contributors/me`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/contributors/me`, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -986,7 +986,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/contributors`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/contributors`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -1023,7 +1023,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/contributors`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/contributors`, method: 'POST', headers: headerParameters, query: queryParameters, @@ -1051,7 +1051,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/image`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/image`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -1086,7 +1086,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/languages/{language}`.replace(`{${"language"}}`, encodeURIComponent(String(_language))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/languages/{language}`.replace(`{${"language"}}`, encodeURIComponent(String(_language))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -1113,7 +1113,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/languages`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/languages`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -1150,7 +1150,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/languages`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/languages`, method: 'POST', headers: headerParameters, query: queryParameters, @@ -1196,7 +1196,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/languages/{language}`.replace(`{${"language"}}`, encodeURIComponent(String(_language))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/languages/{language}`.replace(`{${"language"}}`, encodeURIComponent(String(_language))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1232,7 +1232,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/roles/{roleName}`.replace(`{${"roleName"}}`, encodeURIComponent(String(_roleName))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/roles/{roleName}`.replace(`{${"roleName"}}`, encodeURIComponent(String(_roleName))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -1259,7 +1259,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/roles/permissions`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/roles/permissions`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -1286,7 +1286,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/roles`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/roles`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -1323,7 +1323,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/roles`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/roles`, method: 'POST', headers: headerParameters, query: queryParameters, @@ -1369,7 +1369,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/roles/{roleName}`.replace(`{${"roleName"}}`, encodeURIComponent(String(_roleName))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/roles/{roleName}`.replace(`{${"roleName"}}`, encodeURIComponent(String(_roleName))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1397,7 +1397,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/settings`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/settings`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -1434,7 +1434,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/settings`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/settings`, method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1470,7 +1470,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/workflows/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/workflows/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -1497,7 +1497,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/workflows`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/workflows`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -1534,7 +1534,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/workflows`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/workflows`, method: 'POST', headers: headerParameters, query: queryParameters, @@ -1580,7 +1580,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/workflows/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/workflows/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1608,7 +1608,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$`, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -1634,7 +1634,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/image`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/image`, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -1661,7 +1661,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -1689,7 +1689,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -1726,7 +1726,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/teams/{team}/apps`.replace(`{${"team"}}`, encodeURIComponent(String(_team))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/teams/{team}/apps`.replace(`{${"team"}}`, encodeURIComponent(String(_team))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -1765,7 +1765,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps`, method: 'POST', headers: headerParameters, query: queryParameters, @@ -1804,7 +1804,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$`, method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1842,7 +1842,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/team`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/team`, method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1901,7 +1901,7 @@ export class AppsApi extends runtime.BaseAPI implements AppsApiInterface { } const response = await this.request({ - path: `/api/apps/$app$/image`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/image`, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/src/generated/apis/AssetsApi.ts b/src/generated/apis/AssetsApi.ts index 61768c7..0006652 100644 --- a/src/generated/apis/AssetsApi.ts +++ b/src/generated/apis/AssetsApi.ts @@ -727,7 +727,7 @@ export class AssetsApi extends runtime.BaseAPI implements AssetsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/assets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/assets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -838,7 +838,7 @@ export class AssetsApi extends runtime.BaseAPI implements AssetsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/assets/$app$/{idOrSlug}/`.replace(`{${"idOrSlug"}}`, encodeURIComponent(String(_idOrSlug))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/assets/$app$/{idOrSlug}/`.replace(`{${"idOrSlug"}}`, encodeURIComponent(String(_idOrSlug))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -873,7 +873,7 @@ export class AssetsApi extends runtime.BaseAPI implements AssetsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/assets/folders/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/assets/folders/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -910,7 +910,7 @@ export class AssetsApi extends runtime.BaseAPI implements AssetsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/assets/folders`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/assets/folders`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -948,7 +948,7 @@ export class AssetsApi extends runtime.BaseAPI implements AssetsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/assets/folders`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/assets/folders`, method: 'POST', headers: headerParameters, query: queryParameters, @@ -994,7 +994,7 @@ export class AssetsApi extends runtime.BaseAPI implements AssetsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/assets/folders/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/assets/folders/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1040,7 +1040,7 @@ export class AssetsApi extends runtime.BaseAPI implements AssetsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/assets/folders/{id}/parent`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/assets/folders/{id}/parent`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1078,7 +1078,7 @@ export class AssetsApi extends runtime.BaseAPI implements AssetsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/assets/bulk`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/assets/bulk`, method: 'POST', headers: headerParameters, query: queryParameters, @@ -1124,7 +1124,7 @@ export class AssetsApi extends runtime.BaseAPI implements AssetsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/assets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/assets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -1158,7 +1158,7 @@ export class AssetsApi extends runtime.BaseAPI implements AssetsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/assets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/assets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -1231,7 +1231,7 @@ export class AssetsApi extends runtime.BaseAPI implements AssetsApiInterface { } const response = await this.request({ - path: `/api/apps/$app$/assets`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/assets`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -1280,7 +1280,7 @@ export class AssetsApi extends runtime.BaseAPI implements AssetsApiInterface { } const response = await this.request({ - path: `/api/apps/$app$/assets/query`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/assets/query`, method: 'POST', headers: headerParameters, query: queryParameters, @@ -1310,7 +1310,7 @@ export class AssetsApi extends runtime.BaseAPI implements AssetsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/assets/tags`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/assets/tags`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -1385,7 +1385,7 @@ export class AssetsApi extends runtime.BaseAPI implements AssetsApiInterface { } const response = await this.request({ - path: `/api/apps/$app$/assets`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/assets`, method: 'POST', headers: headerParameters, query: queryParameters, @@ -1464,7 +1464,7 @@ export class AssetsApi extends runtime.BaseAPI implements AssetsApiInterface { } const response = await this.request({ - path: `/api/apps/$app$/assets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/assets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'POST', headers: headerParameters, query: queryParameters, @@ -1511,7 +1511,7 @@ export class AssetsApi extends runtime.BaseAPI implements AssetsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/assets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/assets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1579,7 +1579,7 @@ export class AssetsApi extends runtime.BaseAPI implements AssetsApiInterface { } const response = await this.request({ - path: `/api/apps/$app$/assets/{id}/content`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/assets/{id}/content`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1626,7 +1626,7 @@ export class AssetsApi extends runtime.BaseAPI implements AssetsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/assets/{id}/parent`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/assets/{id}/parent`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1672,7 +1672,7 @@ export class AssetsApi extends runtime.BaseAPI implements AssetsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/assets/tags/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(_name))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/assets/tags/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(_name))), method: 'PUT', headers: headerParameters, query: queryParameters, diff --git a/src/generated/apis/BackupsApi.ts b/src/generated/apis/BackupsApi.ts index 0385cbb..ca34c2d 100644 --- a/src/generated/apis/BackupsApi.ts +++ b/src/generated/apis/BackupsApi.ts @@ -191,7 +191,7 @@ export class BackupsApi extends runtime.BaseAPI implements BackupsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/backups/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/backups/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -238,7 +238,7 @@ export class BackupsApi extends runtime.BaseAPI implements BackupsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/backups/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/backups/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -275,7 +275,7 @@ export class BackupsApi extends runtime.BaseAPI implements BackupsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/backups/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/backups/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -303,7 +303,7 @@ export class BackupsApi extends runtime.BaseAPI implements BackupsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/backups`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/backups`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -331,7 +331,7 @@ export class BackupsApi extends runtime.BaseAPI implements BackupsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/backups`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/backups`, method: 'POST', headers: headerParameters, query: queryParameters, @@ -357,7 +357,7 @@ export class BackupsApi extends runtime.BaseAPI implements BackupsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/restore`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/restore`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -394,7 +394,7 @@ export class BackupsApi extends runtime.BaseAPI implements BackupsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/restore`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/restore`, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/src/generated/apis/ContentsApi.ts b/src/generated/apis/ContentsApi.ts index 1894d7d..e3a9ac2 100644 --- a/src/generated/apis/ContentsApi.ts +++ b/src/generated/apis/ContentsApi.ts @@ -1005,7 +1005,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/content/$app$/{schema}/bulk`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$/{schema}/bulk`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))), method: 'POST', headers: headerParameters, query: queryParameters, @@ -1061,7 +1061,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface } const response = await this.request({ - path: `/api/content/$app$/{schema}/{id}/draft`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$/{schema}/{id}/draft`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'POST', headers: headerParameters, query: queryParameters, @@ -1116,7 +1116,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/content/$app$/{schema}/{id}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$/{schema}/{id}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -1170,7 +1170,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface } const response = await this.request({ - path: `/api/content/$app$/{schema}/{id}/status`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$/{schema}/{id}/status`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -1225,7 +1225,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface } const response = await this.request({ - path: `/api/content/$app$/{schema}/{id}/draft`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$/{schema}/{id}/draft`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -1295,7 +1295,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface } const response = await this.request({ - path: `/api/content/$app$/{schema}/{id}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$/{schema}/{id}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -1340,7 +1340,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/content/$app$/{schema}/{id}/validity`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$/{schema}/{id}/validity`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -1403,7 +1403,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface } const response = await this.request({ - path: `/api/content/$app$/{schema}/{id}/{version}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace(`{${"version"}}`, encodeURIComponent(String(_version))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$/{schema}/{id}/{version}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace(`{${"version"}}`, encodeURIComponent(String(_version))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -1506,7 +1506,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface } const response = await this.request({ - path: `/api/content/$app$/{schema}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$/{schema}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -1583,7 +1583,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface } const response = await this.request({ - path: `/api/content/$app$/{schema}/query`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$/{schema}/query`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))), method: 'POST', headers: headerParameters, query: queryParameters, @@ -1664,7 +1664,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface } const response = await this.request({ - path: `/api/content/$app$/{schema}/{id}/references`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$/{schema}/{id}/references`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -1744,7 +1744,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface } const response = await this.request({ - path: `/api/content/$app$/{schema}/{id}/referencing`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$/{schema}/{id}/referencing`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -1809,7 +1809,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface } const response = await this.request({ - path: `/api/content/$app$/{schema}/{id}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$/{schema}/{id}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PATCH', headers: headerParameters, query: queryParameters, @@ -1882,7 +1882,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface } const response = await this.request({ - path: `/api/content/$app$/{schema}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$/{schema}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))), method: 'POST', headers: headerParameters, query: queryParameters, @@ -1931,7 +1931,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/content/$app$/{schema}/import`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$/{schema}/import`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))), method: 'POST', headers: headerParameters, query: queryParameters, @@ -2018,7 +2018,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface } const response = await this.request({ - path: `/api/content/$app$/{schema}/{id}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$/{schema}/{id}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'POST', headers: headerParameters, query: queryParameters, @@ -2089,7 +2089,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface } const response = await this.request({ - path: `/api/content/$app$/{schema}/{id}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$/{schema}/{id}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -2150,7 +2150,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface } const response = await this.request({ - path: `/api/content/$app$/{schema}/{id}/defaults`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$/{schema}/{id}/defaults`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -2215,7 +2215,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface } const response = await this.request({ - path: `/api/content/$app$/{schema}/{id}/status`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$/{schema}/{id}/status`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -2260,7 +2260,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/content/$app$/bulk`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$/bulk`, method: 'POST', headers: headerParameters, query: queryParameters, @@ -2350,7 +2350,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface } const response = await this.request({ - path: `/api/content/$app$`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -2419,7 +2419,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface } const response = await this.request({ - path: `/api/content/$app$`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$`, method: 'POST', headers: headerParameters, query: queryParameters, @@ -2469,7 +2469,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface } const response = await this.request({ - path: `/api/content/$app$/graphql`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$/graphql`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -2522,7 +2522,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface } const response = await this.request({ - path: `/api/content/$app$/graphql/batch`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$/graphql/batch`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -2563,7 +2563,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface } const response = await this.request({ - path: `/api/content/$app$/graphql`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$/graphql`, method: 'POST', headers: headerParameters, query: queryParameters, @@ -2605,7 +2605,7 @@ export class ContentsApi extends runtime.BaseAPI implements ContentsApiInterface } const response = await this.request({ - path: `/api/content/$app$/graphql/batch`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/content/$app$/graphql/batch`, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/src/generated/apis/DiagnosticsApi.ts b/src/generated/apis/DiagnosticsApi.ts index 055aaf3..9a4cf99 100644 --- a/src/generated/apis/DiagnosticsApi.ts +++ b/src/generated/apis/DiagnosticsApi.ts @@ -69,7 +69,7 @@ export class DiagnosticsApi extends runtime.BaseAPI implements DiagnosticsApiInt const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/diagnostics/dump`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/diagnostics/dump`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -95,7 +95,7 @@ export class DiagnosticsApi extends runtime.BaseAPI implements DiagnosticsApiInt const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/diagnostics/gcdump`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/diagnostics/gcdump`, method: 'GET', headers: headerParameters, query: queryParameters, diff --git a/src/generated/apis/EventConsumersApi.ts b/src/generated/apis/EventConsumersApi.ts index d3ff0b3..7218aa4 100644 --- a/src/generated/apis/EventConsumersApi.ts +++ b/src/generated/apis/EventConsumersApi.ts @@ -116,7 +116,7 @@ export class EventConsumersApi extends runtime.BaseAPI implements EventConsumers const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/event-consumers`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/event-consumers`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -151,7 +151,7 @@ export class EventConsumersApi extends runtime.BaseAPI implements EventConsumers const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/event-consumers/{consumerName}/reset`.replace(`{${"consumerName"}}`, encodeURIComponent(String(_consumerName))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/event-consumers/{consumerName}/reset`.replace(`{${"consumerName"}}`, encodeURIComponent(String(_consumerName))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -186,7 +186,7 @@ export class EventConsumersApi extends runtime.BaseAPI implements EventConsumers const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/event-consumers/{consumerName}/start`.replace(`{${"consumerName"}}`, encodeURIComponent(String(_consumerName))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/event-consumers/{consumerName}/start`.replace(`{${"consumerName"}}`, encodeURIComponent(String(_consumerName))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -221,7 +221,7 @@ export class EventConsumersApi extends runtime.BaseAPI implements EventConsumers const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/event-consumers/{consumerName}/stop`.replace(`{${"consumerName"}}`, encodeURIComponent(String(_consumerName))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/event-consumers/{consumerName}/stop`.replace(`{${"consumerName"}}`, encodeURIComponent(String(_consumerName))), method: 'PUT', headers: headerParameters, query: queryParameters, diff --git a/src/generated/apis/HistoryApi.ts b/src/generated/apis/HistoryApi.ts index 21c5070..76f0dc9 100644 --- a/src/generated/apis/HistoryApi.ts +++ b/src/generated/apis/HistoryApi.ts @@ -96,7 +96,7 @@ export class HistoryApi extends runtime.BaseAPI implements HistoryApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/history`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/history`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -136,7 +136,7 @@ export class HistoryApi extends runtime.BaseAPI implements HistoryApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/teams/{team}/history`.replace(`{${"team"}}`, encodeURIComponent(String(_team))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/teams/{team}/history`.replace(`{${"team"}}`, encodeURIComponent(String(_team))), method: 'GET', headers: headerParameters, query: queryParameters, diff --git a/src/generated/apis/JobsApi.ts b/src/generated/apis/JobsApi.ts index 363e984..ea18f0e 100644 --- a/src/generated/apis/JobsApi.ts +++ b/src/generated/apis/JobsApi.ts @@ -114,7 +114,7 @@ export class JobsApi extends runtime.BaseAPI implements JobsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/jobs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/jobs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -149,7 +149,7 @@ export class JobsApi extends runtime.BaseAPI implements JobsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/jobs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/jobs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -175,7 +175,7 @@ export class JobsApi extends runtime.BaseAPI implements JobsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/jobs`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/jobs`, method: 'GET', headers: headerParameters, query: queryParameters, diff --git a/src/generated/apis/LanguagesApi.ts b/src/generated/apis/LanguagesApi.ts index 1c5c1e1..1dd08ba 100644 --- a/src/generated/apis/LanguagesApi.ts +++ b/src/generated/apis/LanguagesApi.ts @@ -59,7 +59,7 @@ export class LanguagesApi extends runtime.BaseAPI implements LanguagesApiInterfa const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/languages`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/languages`, method: 'GET', headers: headerParameters, query: queryParameters, diff --git a/src/generated/apis/NewsApi.ts b/src/generated/apis/NewsApi.ts index 32423b5..01367be 100644 --- a/src/generated/apis/NewsApi.ts +++ b/src/generated/apis/NewsApi.ts @@ -71,7 +71,7 @@ export class NewsApi extends runtime.BaseAPI implements NewsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/news/features`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/news/features`, method: 'GET', headers: headerParameters, query: queryParameters, diff --git a/src/generated/apis/PingApi.ts b/src/generated/apis/PingApi.ts index 8f64dab..a6bcd2c 100644 --- a/src/generated/apis/PingApi.ts +++ b/src/generated/apis/PingApi.ts @@ -86,7 +86,7 @@ export class PingApi extends runtime.BaseAPI implements PingApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/ping/$app$`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/ping/$app$`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -113,7 +113,7 @@ export class PingApi extends runtime.BaseAPI implements PingApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/info`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/info`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -141,7 +141,7 @@ export class PingApi extends runtime.BaseAPI implements PingApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/ping`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/ping`, method: 'GET', headers: headerParameters, query: queryParameters, diff --git a/src/generated/apis/PlansApi.ts b/src/generated/apis/PlansApi.ts index 3994df7..0409bae 100644 --- a/src/generated/apis/PlansApi.ts +++ b/src/generated/apis/PlansApi.ts @@ -120,7 +120,7 @@ export class PlansApi extends runtime.BaseAPI implements PlansApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/plans`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/plans`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -157,7 +157,7 @@ export class PlansApi extends runtime.BaseAPI implements PlansApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/plan`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/plan`, method: 'PUT', headers: headerParameters, query: queryParameters, @@ -193,7 +193,7 @@ export class PlansApi extends runtime.BaseAPI implements PlansApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/teams/{team}/plans`.replace(`{${"team"}}`, encodeURIComponent(String(_team))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/teams/{team}/plans`.replace(`{${"team"}}`, encodeURIComponent(String(_team))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -238,7 +238,7 @@ export class PlansApi extends runtime.BaseAPI implements PlansApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/teams/{team}/plan`.replace(`{${"team"}}`, encodeURIComponent(String(_team))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/teams/{team}/plan`.replace(`{${"team"}}`, encodeURIComponent(String(_team))), method: 'PUT', headers: headerParameters, query: queryParameters, diff --git a/src/generated/apis/RulesApi.ts b/src/generated/apis/RulesApi.ts index 1fe556d..78c9b47 100644 --- a/src/generated/apis/RulesApi.ts +++ b/src/generated/apis/RulesApi.ts @@ -417,7 +417,7 @@ export class RulesApi extends runtime.BaseAPI implements RulesApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/rules/events/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/rules/events/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -443,7 +443,7 @@ export class RulesApi extends runtime.BaseAPI implements RulesApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/rules/events`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/rules/events`, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -477,7 +477,7 @@ export class RulesApi extends runtime.BaseAPI implements RulesApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/rules/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/rules/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -511,7 +511,7 @@ export class RulesApi extends runtime.BaseAPI implements RulesApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/rules/{id}/events`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/rules/{id}/events`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -537,7 +537,7 @@ export class RulesApi extends runtime.BaseAPI implements RulesApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/rules/run`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/rules/run`, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -571,7 +571,7 @@ export class RulesApi extends runtime.BaseAPI implements RulesApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/rules/{id}/disable`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/rules/{id}/disable`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -606,7 +606,7 @@ export class RulesApi extends runtime.BaseAPI implements RulesApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/rules/{id}/enable`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/rules/{id}/enable`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -633,7 +633,7 @@ export class RulesApi extends runtime.BaseAPI implements RulesApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/rules/actions`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/rules/actions`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -668,7 +668,7 @@ export class RulesApi extends runtime.BaseAPI implements RulesApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/rules/eventtypes/{type}`.replace(`{${"type"}}`, encodeURIComponent(String(_type))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/rules/eventtypes/{type}`.replace(`{${"type"}}`, encodeURIComponent(String(_type))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -699,7 +699,7 @@ export class RulesApi extends runtime.BaseAPI implements RulesApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/rules/eventtypes`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/rules/eventtypes`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -741,7 +741,7 @@ export class RulesApi extends runtime.BaseAPI implements RulesApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/rules/events`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/rules/events`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -768,7 +768,7 @@ export class RulesApi extends runtime.BaseAPI implements RulesApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/rules`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/rules`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -805,7 +805,7 @@ export class RulesApi extends runtime.BaseAPI implements RulesApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/rules`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/rules`, method: 'POST', headers: headerParameters, query: queryParameters, @@ -841,7 +841,7 @@ export class RulesApi extends runtime.BaseAPI implements RulesApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/rules/events/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/rules/events/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -885,7 +885,7 @@ export class RulesApi extends runtime.BaseAPI implements RulesApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/rules/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/rules/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -926,7 +926,7 @@ export class RulesApi extends runtime.BaseAPI implements RulesApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/rules/{id}/run`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/rules/{id}/run`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -960,7 +960,7 @@ export class RulesApi extends runtime.BaseAPI implements RulesApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/rules/{id}/simulate`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/rules/{id}/simulate`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -997,7 +997,7 @@ export class RulesApi extends runtime.BaseAPI implements RulesApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/rules/simulate`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/rules/simulate`, method: 'POST', headers: headerParameters, query: queryParameters, @@ -1033,7 +1033,7 @@ export class RulesApi extends runtime.BaseAPI implements RulesApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/rules/{id}/trigger`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/rules/{id}/trigger`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, diff --git a/src/generated/apis/SchemasApi.ts b/src/generated/apis/SchemasApi.ts index 5bfec7f..ef00147 100644 --- a/src/generated/apis/SchemasApi.ts +++ b/src/generated/apis/SchemasApi.ts @@ -747,7 +747,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/fields/{id}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/fields/{id}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -798,7 +798,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/fields/{parentId}/nested/{id}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"parentId"}}`, encodeURIComponent(String(_parentId))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/fields/{parentId}/nested/{id}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"parentId"}}`, encodeURIComponent(String(_parentId))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -842,7 +842,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/fields/{id}/disable`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/fields/{id}/disable`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -895,7 +895,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/fields/{parentId}/nested/{id}/disable`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"parentId"}}`, encodeURIComponent(String(_parentId))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/fields/{parentId}/nested/{id}/disable`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"parentId"}}`, encodeURIComponent(String(_parentId))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -940,7 +940,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/fields/{id}/enable`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/fields/{id}/enable`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -993,7 +993,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/fields/{parentId}/nested/{id}/enable`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"parentId"}}`, encodeURIComponent(String(_parentId))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/fields/{parentId}/nested/{id}/enable`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"parentId"}}`, encodeURIComponent(String(_parentId))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1038,7 +1038,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/fields/{id}/hide`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/fields/{id}/hide`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1091,7 +1091,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/fields/{parentId}/nested/{id}/hide`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"parentId"}}`, encodeURIComponent(String(_parentId))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/fields/{parentId}/nested/{id}/hide`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"parentId"}}`, encodeURIComponent(String(_parentId))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1136,7 +1136,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/fields/{id}/lock`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/fields/{id}/lock`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1189,7 +1189,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/fields/{parentId}/nested/{id}/lock`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"parentId"}}`, encodeURIComponent(String(_parentId))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/fields/{parentId}/nested/{id}/lock`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"parentId"}}`, encodeURIComponent(String(_parentId))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1235,7 +1235,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/fields`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/fields`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))), method: 'POST', headers: headerParameters, query: queryParameters, @@ -1289,7 +1289,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/fields/{parentId}/nested`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"parentId"}}`, encodeURIComponent(String(_parentId))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/fields/{parentId}/nested`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"parentId"}}`, encodeURIComponent(String(_parentId))), method: 'POST', headers: headerParameters, query: queryParameters, @@ -1343,7 +1343,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/fields/{id}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/fields/{id}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1405,7 +1405,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/fields/{parentId}/nested/{id}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"parentId"}}`, encodeURIComponent(String(_parentId))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/fields/{parentId}/nested/{id}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"parentId"}}`, encodeURIComponent(String(_parentId))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1459,7 +1459,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/fields/{parentId}/nested/ordering`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"parentId"}}`, encodeURIComponent(String(_parentId))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/fields/{parentId}/nested/ordering`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"parentId"}}`, encodeURIComponent(String(_parentId))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1505,7 +1505,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/fields/ordering`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/fields/ordering`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1551,7 +1551,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/fields/ui`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/fields/ui`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1596,7 +1596,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/fields/{id}/show`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/fields/{id}/show`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1649,7 +1649,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/fields/{parentId}/nested/{id}/show`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"parentId"}}`, encodeURIComponent(String(_parentId))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/fields/{parentId}/nested/{id}/show`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace(`{${"parentId"}}`, encodeURIComponent(String(_parentId))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1685,7 +1685,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -1719,7 +1719,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -1746,7 +1746,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/schemas`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -1783,7 +1783,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/schemas`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas`, method: 'POST', headers: headerParameters, query: queryParameters, @@ -1819,7 +1819,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/publish`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/publish`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1864,7 +1864,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/category`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/category`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1910,7 +1910,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/preview-urls`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/preview-urls`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1956,7 +1956,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/rules`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/rules`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -2002,7 +2002,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -2048,7 +2048,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/sync`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/sync`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -2094,7 +2094,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/scripts`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/scripts`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -2130,7 +2130,7 @@ export class SchemasApi extends runtime.BaseAPI implements SchemasApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/schemas/{schema}/unpublish`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/schemas/{schema}/unpublish`.replace(`{${"schema"}}`, encodeURIComponent(String(_schema))), method: 'PUT', headers: headerParameters, query: queryParameters, diff --git a/src/generated/apis/SearchApi.ts b/src/generated/apis/SearchApi.ts index 0c38776..08b7426 100644 --- a/src/generated/apis/SearchApi.ts +++ b/src/generated/apis/SearchApi.ts @@ -71,7 +71,7 @@ export class SearchApi extends runtime.BaseAPI implements SearchApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/search`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/search`, method: 'GET', headers: headerParameters, query: queryParameters, diff --git a/src/generated/apis/StatisticsApi.ts b/src/generated/apis/StatisticsApi.ts index 035bfa5..2509fd8 100644 --- a/src/generated/apis/StatisticsApi.ts +++ b/src/generated/apis/StatisticsApi.ts @@ -184,7 +184,7 @@ export class StatisticsApi extends runtime.BaseAPI implements StatisticsApiInter const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/usages/storage/today`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/usages/storage/today`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -211,7 +211,7 @@ export class StatisticsApi extends runtime.BaseAPI implements StatisticsApiInter const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/usages/log`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/usages/log`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -254,7 +254,7 @@ export class StatisticsApi extends runtime.BaseAPI implements StatisticsApiInter const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/usages/storage/{fromDate}/{toDate}`.replace(`{${"fromDate"}}`, encodeURIComponent(String(_fromDate))).replace(`{${"toDate"}}`, encodeURIComponent(String(_toDate))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/usages/storage/{fromDate}/{toDate}`.replace(`{${"fromDate"}}`, encodeURIComponent(String(_fromDate))).replace(`{${"toDate"}}`, encodeURIComponent(String(_toDate))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -305,7 +305,7 @@ export class StatisticsApi extends runtime.BaseAPI implements StatisticsApiInter const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/teams/{team}/usages/storage/{fromDate}/{toDate}`.replace(`{${"team"}}`, encodeURIComponent(String(_team))).replace(`{${"fromDate"}}`, encodeURIComponent(String(_fromDate))).replace(`{${"toDate"}}`, encodeURIComponent(String(_toDate))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/teams/{team}/usages/storage/{fromDate}/{toDate}`.replace(`{${"team"}}`, encodeURIComponent(String(_team))).replace(`{${"fromDate"}}`, encodeURIComponent(String(_fromDate))).replace(`{${"toDate"}}`, encodeURIComponent(String(_toDate))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -340,7 +340,7 @@ export class StatisticsApi extends runtime.BaseAPI implements StatisticsApiInter const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/teams/{team}/usages/storage/today`.replace(`{${"team"}}`, encodeURIComponent(String(_team))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/teams/{team}/usages/storage/today`.replace(`{${"team"}}`, encodeURIComponent(String(_team))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -383,7 +383,7 @@ export class StatisticsApi extends runtime.BaseAPI implements StatisticsApiInter const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/apps/$app$/usages/calls/{fromDate}/{toDate}`.replace(`{${"fromDate"}}`, encodeURIComponent(String(_fromDate))).replace(`{${"toDate"}}`, encodeURIComponent(String(_toDate))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/usages/calls/{fromDate}/{toDate}`.replace(`{${"fromDate"}}`, encodeURIComponent(String(_fromDate))).replace(`{${"toDate"}}`, encodeURIComponent(String(_toDate))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -434,7 +434,7 @@ export class StatisticsApi extends runtime.BaseAPI implements StatisticsApiInter const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/teams/{team}/usages/calls/{fromDate}/{toDate}`.replace(`{${"team"}}`, encodeURIComponent(String(_team))).replace(`{${"fromDate"}}`, encodeURIComponent(String(_fromDate))).replace(`{${"toDate"}}`, encodeURIComponent(String(_toDate))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/teams/{team}/usages/calls/{fromDate}/{toDate}`.replace(`{${"team"}}`, encodeURIComponent(String(_team))).replace(`{${"fromDate"}}`, encodeURIComponent(String(_fromDate))).replace(`{${"toDate"}}`, encodeURIComponent(String(_toDate))), method: 'GET', headers: headerParameters, query: queryParameters, diff --git a/src/generated/apis/TeamsApi.ts b/src/generated/apis/TeamsApi.ts index 5a91881..e73b176 100644 --- a/src/generated/apis/TeamsApi.ts +++ b/src/generated/apis/TeamsApi.ts @@ -285,7 +285,7 @@ export class TeamsApi extends runtime.BaseAPI implements TeamsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/teams/{team}/contributors/{id}`.replace(`{${"team"}}`, encodeURIComponent(String(_team))).replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/teams/{team}/contributors/{id}`.replace(`{${"team"}}`, encodeURIComponent(String(_team))).replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -320,7 +320,7 @@ export class TeamsApi extends runtime.BaseAPI implements TeamsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/teams/{team}/contributors/me`.replace(`{${"team"}}`, encodeURIComponent(String(_team))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/teams/{team}/contributors/me`.replace(`{${"team"}}`, encodeURIComponent(String(_team))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -355,7 +355,7 @@ export class TeamsApi extends runtime.BaseAPI implements TeamsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/teams/{team}/contributors`.replace(`{${"team"}}`, encodeURIComponent(String(_team))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/teams/{team}/contributors`.replace(`{${"team"}}`, encodeURIComponent(String(_team))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -400,7 +400,7 @@ export class TeamsApi extends runtime.BaseAPI implements TeamsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/teams/{team}/contributors`.replace(`{${"team"}}`, encodeURIComponent(String(_team))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/teams/{team}/contributors`.replace(`{${"team"}}`, encodeURIComponent(String(_team))), method: 'POST', headers: headerParameters, query: queryParameters, @@ -436,7 +436,7 @@ export class TeamsApi extends runtime.BaseAPI implements TeamsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/teams/{team}`.replace(`{${"team"}}`, encodeURIComponent(String(_team))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/teams/{team}`.replace(`{${"team"}}`, encodeURIComponent(String(_team))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -470,7 +470,7 @@ export class TeamsApi extends runtime.BaseAPI implements TeamsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/teams/{team}`.replace(`{${"team"}}`, encodeURIComponent(String(_team))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/teams/{team}`.replace(`{${"team"}}`, encodeURIComponent(String(_team))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -505,7 +505,7 @@ export class TeamsApi extends runtime.BaseAPI implements TeamsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/teams/{team}/auth`.replace(`{${"team"}}`, encodeURIComponent(String(_team))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/teams/{team}/auth`.replace(`{${"team"}}`, encodeURIComponent(String(_team))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -533,7 +533,7 @@ export class TeamsApi extends runtime.BaseAPI implements TeamsApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/teams`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/teams`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -572,7 +572,7 @@ export class TeamsApi extends runtime.BaseAPI implements TeamsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/teams`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/teams`, method: 'POST', headers: headerParameters, query: queryParameters, @@ -619,7 +619,7 @@ export class TeamsApi extends runtime.BaseAPI implements TeamsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/teams/{team}`.replace(`{${"team"}}`, encodeURIComponent(String(_team))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/teams/{team}`.replace(`{${"team"}}`, encodeURIComponent(String(_team))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -665,7 +665,7 @@ export class TeamsApi extends runtime.BaseAPI implements TeamsApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/teams/{team}/auth`.replace(`{${"team"}}`, encodeURIComponent(String(_team))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/teams/{team}/auth`.replace(`{${"team"}}`, encodeURIComponent(String(_team))), method: 'PUT', headers: headerParameters, query: queryParameters, diff --git a/src/generated/apis/TemplatesApi.ts b/src/generated/apis/TemplatesApi.ts index af0a5df..cb99357 100644 --- a/src/generated/apis/TemplatesApi.ts +++ b/src/generated/apis/TemplatesApi.ts @@ -86,7 +86,7 @@ export class TemplatesApi extends runtime.BaseAPI implements TemplatesApiInterfa const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/templates/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(_name))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/templates/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(_name))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -113,7 +113,7 @@ export class TemplatesApi extends runtime.BaseAPI implements TemplatesApiInterfa const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/templates`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/templates`, method: 'GET', headers: headerParameters, query: queryParameters, diff --git a/src/generated/apis/TranslationsApi.ts b/src/generated/apis/TranslationsApi.ts index 1121374..0c444f1 100644 --- a/src/generated/apis/TranslationsApi.ts +++ b/src/generated/apis/TranslationsApi.ts @@ -74,7 +74,7 @@ export class TranslationsApi extends runtime.BaseAPI implements TranslationsApiI headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/apps/$app$/translations`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/apps/$app$/translations`, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/src/generated/apis/UserManagementApi.ts b/src/generated/apis/UserManagementApi.ts index e861979..d2ae35f 100644 --- a/src/generated/apis/UserManagementApi.ts +++ b/src/generated/apis/UserManagementApi.ts @@ -202,7 +202,7 @@ export class UserManagementApi extends runtime.BaseAPI implements UserManagement const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/user-management/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/user-management/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -236,7 +236,7 @@ export class UserManagementApi extends runtime.BaseAPI implements UserManagement const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/user-management/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/user-management/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -278,7 +278,7 @@ export class UserManagementApi extends runtime.BaseAPI implements UserManagement const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/user-management`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/user-management`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -313,7 +313,7 @@ export class UserManagementApi extends runtime.BaseAPI implements UserManagement const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/user-management/{id}/lock`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/user-management/{id}/lock`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -350,7 +350,7 @@ export class UserManagementApi extends runtime.BaseAPI implements UserManagement headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/user-management`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/user-management`, method: 'POST', headers: headerParameters, query: queryParameters, @@ -396,7 +396,7 @@ export class UserManagementApi extends runtime.BaseAPI implements UserManagement headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/user-management/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/user-management/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -432,7 +432,7 @@ export class UserManagementApi extends runtime.BaseAPI implements UserManagement const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/user-management/{id}/unlock`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/user-management/{id}/unlock`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'PUT', headers: headerParameters, query: queryParameters, diff --git a/src/generated/apis/UsersApi.ts b/src/generated/apis/UsersApi.ts index a6cd3cd..a07b179 100644 --- a/src/generated/apis/UsersApi.ts +++ b/src/generated/apis/UsersApi.ts @@ -150,7 +150,7 @@ export class UsersApi extends runtime.BaseAPI implements UsersApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/users/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/users/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -185,7 +185,7 @@ export class UsersApi extends runtime.BaseAPI implements UsersApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/users/{id}/picture`.replace(`{${"id"}}`, encodeURIComponent(String(_id))).replace("$app$", encodeURIComponent(this.appName)), + path: `/api/users/{id}/picture`.replace(`{${"id"}}`, encodeURIComponent(String(_id))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -212,7 +212,7 @@ export class UsersApi extends runtime.BaseAPI implements UsersApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -245,7 +245,7 @@ export class UsersApi extends runtime.BaseAPI implements UsersApiInterface { const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ - path: `/api/users`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/users`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -283,7 +283,7 @@ export class UsersApi extends runtime.BaseAPI implements UsersApiInterface { headerParameters['Content-Type'] = 'application/json'; const response = await this.request({ - path: `/api/user`.replace("$app$", encodeURIComponent(this.appName)), + path: `/api/user`, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/src/generated/runtime.ts b/src/generated/runtime.ts index 13625ea..c3b27e7 100644 --- a/src/generated/runtime.ts +++ b/src/generated/runtime.ts @@ -94,7 +94,7 @@ export class BaseAPI { private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); private middleware: Middleware[]; - constructor(protected readonly appName: string, protected configuration = DefaultConfig) { + constructor(protected configuration = DefaultConfig) { this.middleware = configuration.middleware; } diff --git a/src/wrapper/SquidexClient.ts b/src/wrapper/SquidexClient.ts index 6690289..7929bc6 100644 --- a/src/wrapper/SquidexClient.ts +++ b/src/wrapper/SquidexClient.ts @@ -46,8 +46,9 @@ import { UsersApi, UsersApiInterface, } from "../generated"; -import { buildError, SquidexUnauthorizedError } from "./errors"; +import { buildError } from "./errors"; import { addHeader, getHeader } from "./headers"; +import { TokenAPI } from "./TokenAPI"; export interface SquidexOptions { /** @@ -113,7 +114,7 @@ export interface Token { export class SquidexClients { private readonly configuration: Configuration; private readonly tokenStore: TokenStore; - private tokenPromise?: Promise; + private readonly tokenApi: TokenAPI; private appsApi?: AppsApi; private assetsApi?: AssetsApi; private backupsApi?: BackupsApi; @@ -136,83 +137,83 @@ export class SquidexClients { private userManagementApi?: UserManagementApi; public get apps(): AppsApiInterface { - return (this.appsApi ??= new AppsApi(this.appName, this.configuration)); + return (this.appsApi ??= new AppsApi(this.configuration)); } public get assets(): AssetsApiInterface { - return (this.assetsApi ??= new AssetsApi(this.appName, this.configuration)); + return (this.assetsApi ??= new AssetsApi(this.configuration)); } public get backups(): BackupsApiInterface { - return (this.backupsApi ??= new BackupsApi(this.appName, this.configuration)); + return (this.backupsApi ??= new BackupsApi(this.configuration)); } public get contents(): ContentsApiInterface { - return (this.contentsApi ??= new ContentsApi(this.appName, this.configuration)); + return (this.contentsApi ??= new ContentsApi(this.configuration)); } public get diagnostics(): DiagnosticsApiInterface { - return (this.diagnosticsApi ??= new DiagnosticsApi(this.appName, this.configuration)); + return (this.diagnosticsApi ??= new DiagnosticsApi(this.configuration)); } public get eventConsumers(): EventConsumersApiInterface { - return (this.eventConsumersApi ??= new EventConsumersApi(this.appName, this.configuration)); + return (this.eventConsumersApi ??= new EventConsumersApi(this.configuration)); } public get history(): HistoryApiInterface { - return (this.historyApi ??= new HistoryApi(this.appName, this.configuration)); + return (this.historyApi ??= new HistoryApi(this.configuration)); } public get languages(): LanguagesApiInterface { - return (this.languagesApi ??= new LanguagesApi(this.appName, this.configuration)); + return (this.languagesApi ??= new LanguagesApi(this.configuration)); } public get news(): NewsApiInterface { - return (this.newsApi ??= new NewsApi(this.appName, this.configuration)); + return (this.newsApi ??= new NewsApi(this.configuration)); } public get ping(): PingApiInterface { - return (this.pingApi ??= new PingApi(this.appName, this.configuration)); + return (this.pingApi ??= new PingApi(this.configuration)); } public get plans(): PlansApiInterface { - return (this.plansApi ??= new PlansApi(this.appName, this.configuration)); + return (this.plansApi ??= new PlansApi(this.configuration)); } public get rules(): RulesApiInterface { - return (this.rulesApi ??= new RulesApi(this.appName, this.configuration)); + return (this.rulesApi ??= new RulesApi(this.configuration)); } public get schemas(): SchemasApiInterface { - return (this.schemasApi ??= new SchemasApi(this.appName, this.configuration)); + return (this.schemasApi ??= new SchemasApi(this.configuration)); } public get search(): SearchApiInterface { - return (this.searchApi ??= new SearchApi(this.appName, this.configuration)); + return (this.searchApi ??= new SearchApi(this.configuration)); } public get statistics(): StatisticsApiInterface { - return (this.statisticsApi ??= new StatisticsApi(this.appName, this.configuration)); + return (this.statisticsApi ??= new StatisticsApi(this.configuration)); } public get teams(): TeamsApiInterface { - return (this.teamsApi ??= new TeamsApi(this.appName, this.configuration)); + return (this.teamsApi ??= new TeamsApi(this.configuration)); } public get templates(): TemplatesApiInterface { - return (this.templatesApi ??= new TemplatesApi(this.appName, this.configuration)); + return (this.templatesApi ??= new TemplatesApi(this.configuration)); } public get translations(): TranslationsApiInterface { - return (this.translationsApi ??= new TranslationsApi(this.appName, this.configuration)); + return (this.translationsApi ??= new TranslationsApi(this.configuration)); } public get users(): UsersApiInterface { - return (this.usersApi ??= new UsersApi(this.appName, this.configuration)); + return (this.usersApi ??= new UsersApi(this.configuration)); } public get userManagement(): UserManagementApiInterface { - return (this.userManagementApi ??= new UserManagementApi(this.appName, this.configuration)); + return (this.userManagementApi ??= new UserManagementApi(this.configuration)); } /** @@ -258,19 +259,31 @@ export class SquidexClients { this.tokenStore = this.clientOptions.tokenStore || new InMemoryTokenStore(); - const originalFetch = this.clientOptions.fetcher || fetch; + const fetchCore = this.clientOptions.fetcher || fetch; const fetchApi: FetchAPI = async (input, init) => { init ||= {}; addOptions(init, clientOptions); if (!getHeader(init, "X-AuthRequest")) { - addHeader(init, "Authorization", `Bearer ${await this.getToken()}`); + addHeader(init, "Authorization", `Bearer ${await this.tokenApi.getToken()}`); } let response: Response; try { - response = await originalFetch(input, init); + const updateURL = (source: string) => { + return source.replace("$app$", this.appName); + }; + + if (typeof input === "string") { + input = updateURL(input); + } else if (input instanceof URL) { + input = updateURL(input.toString()); + } else { + input = { ...input, url: updateURL(input.url) }; + } + + response = await fetchCore(input, init); if (response && response.status === 401 && !getHeader(init, "X-Retry")) { addHeader(init, "X-Retry", "1"); @@ -299,6 +312,9 @@ export class SquidexClients { } this.configuration = new Configuration(parameters); + + // Create an empty API object for the token. + this.tokenApi = new TokenAPI(this.tokenStore, clientOptions, this.configuration); } /** @@ -307,62 +323,6 @@ export class SquidexClients { clearToken() { this.tokenStore.clear(); } - - private async getToken() { - const promise = (this.tokenPromise ||= (async () => { - const now = new Date().getTime(); - try { - let token = this.tokenStore.get(); - - if (token != null && token.expiresAt > now) { - return token.accessToken; - } - - const response = await this.configuration.fetchApi!( - `${this.configuration.basePath}/identity-server/connect/token`, - { - headers: { - "Content-Type": "application/x-www-form-urlencoded", - "X-AuthRequest": "1", - }, - body: new URLSearchParams({ - grant_type: "client_credentials", - client_id: this.clientOptions.clientId, - client_secret: this.clientOptions.clientSecret, - scope: "squidex-api", - }), - method: "POST", - }, - ); - - const body = (await response.json()) as { access_token: string; expires_in: number }; - - if (typeof body.access_token !== "string") { - throw new SquidexUnauthorizedError(undefined, undefined, "Token is not a string"); - } - - if (typeof body.expires_in !== "number") { - throw new SquidexUnauthorizedError(undefined, undefined, "Token has no valid expiration"); - } - - const expiresIn = body.expires_in; - - token = { - accessToken: body.access_token, - expiresIn, - expiresAt: now + expiresIn, - }; - - this.tokenStore.set(token); - - return token.accessToken; - } finally { - this.tokenPromise = undefined; - } - })()); - - return promise; - } } function addOptions(init: RequestInit, clientOptions: SquidexOptions) { diff --git a/src/wrapper/TokenAPI.ts b/src/wrapper/TokenAPI.ts new file mode 100644 index 0000000..4acf289 --- /dev/null +++ b/src/wrapper/TokenAPI.ts @@ -0,0 +1,70 @@ +import { BaseAPI, Configuration } from "../generated"; +import { SquidexOptions, TokenStore } from "./SquidexClient"; +import { SquidexUnauthorizedError } from "./errors"; + +export class TokenAPI extends BaseAPI { + private tokenPromise?: Promise; + + constructor( + private readonly tokenStore: TokenStore, + private readonly clientOptions: SquidexOptions, + configuration: Configuration, + ) { + super(configuration); + } + + public async getToken() { + const promise = (this.tokenPromise ||= (async () => { + const now = new Date().getTime(); + try { + let token = this.tokenStore.get(); + + if (token != null && token.expiresAt > now) { + return token.accessToken; + } + + const response = await this.request({ + path: "/identity-server/connect/token", + headers: { + "Content-Type": "application/x-www-form-urlencoded", + "X-AuthRequest": "1", + "X-AuthSource": "Client", + }, + body: new URLSearchParams({ + grant_type: "client_credentials", + client_id: this.clientOptions.clientId, + client_secret: this.clientOptions.clientSecret, + scope: "squidex-api", + }), + method: "POST", + }); + + const body = (await response.json()) as { access_token: string; expires_in: number }; + + if (typeof body.access_token !== "string") { + throw new SquidexUnauthorizedError(undefined, undefined, "Token is not a string"); + } + + if (typeof body.expires_in !== "number") { + throw new SquidexUnauthorizedError(undefined, undefined, "Token has no valid expiration"); + } + + const expiresIn = body.expires_in; + + token = { + accessToken: body.access_token, + expiresIn, + expiresAt: now + expiresIn, + }; + + this.tokenStore.set(token); + + return token.accessToken; + } finally { + this.tokenPromise = undefined; + } + })()); + + return promise; + } +} diff --git a/templates/apis.mustache b/templates/apis.mustache index f8d6190..cfd9741 100644 --- a/templates/apis.mustache +++ b/templates/apis.mustache @@ -291,7 +291,7 @@ export class {{classname}} extends runtime.BaseAPI { {{/formParams}} {{/hasFormParams}} const response = await this.request({ - path: `{{{path}}}`{{#pathParams}}.replace(`{${"{{baseName}}"}}`, encodeURIComponent(String(_{{paramName}}))){{/pathParams}}.replace("$app$", encodeURIComponent(this.appName)), + path: `{{{path}}}`{{#pathParams}}.replace(`{${"{{baseName}}"}}`, encodeURIComponent(String(_{{paramName}}))){{/pathParams}}, method: '{{httpMethod}}', headers: headerParameters, query: queryParameters, diff --git a/templates/runtime.mustache b/templates/runtime.mustache index bc5efa0..67df393 100644 --- a/templates/runtime.mustache +++ b/templates/runtime.mustache @@ -83,7 +83,7 @@ export class BaseAPI { private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); private middleware: Middleware[]; - constructor(protected readonly appName: string, protected configuration = DefaultConfig) { + constructor(protected configuration = DefaultConfig) { this.middleware = configuration.middleware; } diff --git a/tests/_utils.ts b/tests/_utils.ts index 24c5d5d..f7d49b0 100644 --- a/tests/_utils.ts +++ b/tests/_utils.ts @@ -1,5 +1,6 @@ import { SquidexClient } from "../src"; -import { Agent, setGlobalDispatcher } from "undici"; +import { Agent } from "undici"; +import { SquidexOptions } from "../src/wrapper/SquidexClient"; let singleClient: { client: SquidexClient; create: (app: string) => SquidexClient }; @@ -8,24 +9,31 @@ export function getClient() { return singleClient; } + // process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; + const appName = getEnvironment("CONFIG__APP__NAME", "integrations-tests"); const clientId = getEnvironment("CONFIG__CLIENT__ID", "root"); const clientSecret = getEnvironment("CONFIG__CLIENT__SECRET", "xeLd6jFxqbXJrfmNLlO2j1apagGGGSyZJhFnIuHp4I0="); - const environment = getEnvironment("CONFIG__SERVER__URL", "http://localhost:8080"); + const environment = getEnvironment("CONFIG__SERVER__URL", "https://localhost:5001"); - const httpsAgent = new Agent({ - connect: { - rejectUnauthorized: false, - }, - }); + const middleware: SquidexOptions["middleware"] = { + pre: async (params) => { + (params.init as any).dispatcher = new Agent({ + connect: { + rejectUnauthorized: false, + }, + }); - setGlobalDispatcher(httpsAgent); + return params; + }, + }; const client = new SquidexClient({ appName, clientId, clientSecret, environment, + middleware, }); const create = (app: string) => { @@ -34,6 +42,7 @@ export function getClient() { clientId, clientSecret, environment, + middleware, }); };