V16: Updates openapi-ts client and deprecates tryExecuteAndNotify (#18939)

* build(deps-dev): bump @hey-api/openapi-ts from 0.61.3 to 0.66.1

* docs: adds information on how to configure new fetch-client

* feat: adds preliminary umb-prefixed error types

* fix: uses correct import path

* docs: jsdocs

* feat: optimises error reporting

* feat: maps functions into separate controllers

* feat: adds color to peek notification

* feat: moves the internal api interceptors controller and adds more interceptors

* feat: adds host to params

* feat: marks certain functions as deprecated

* feat: maps api errors to UmbErrors

* chore: removes deprecation console logs

* chore: allows any

* feat: maps xhr errors to umb errors

* feat: adds host to tryExecute

* feat: adjusts deprecation notifices and checks

* chore: adjusts deprecation notices

* chore: add .warn() to deprecation

* feat: updates login app repository

* feat: changes all `tryExecuteAndNotify` calls to `tryExecute`

* feat: copies helper functions to resources package and deprecates in notification package

* chore: removes unused imports

* feat: adds exports

* chore: removes controller that is no longer useful

* feat: marks _peekError as protected

* feat: adds support for error notifications (and to ignore them) and to cancel an ongoing request

* feat: eliminates duplicated logic in xhr controller

* feat: touches only the cloned response to allow interceptors downstream to unwrap the body

* feat: stores the host for async context

* feat: disables automatic notifications for validation data source

* feat: disables notifications where they are otherwise handled or ignored

* feat: removes deprecated code

* feat: eliminates a controller that only had a static method

* docs: adds jsdocs

* docs: adds jsdocs

* docs: adds jsdocs

* feat: returns umb-notifications response without modifying it

* feat: eliminates dependency on generated `ProblemDetails` type

* feat: eliminates dependence on generated `ApiError` type

* feat: eliminates dependence on generated `CancelError` type

* fix: removes dependency on CancelablePromise
This commit is contained in:
Jacob Overgaard
2025-04-07 23:54:51 +02:00
committed by GitHub
parent 6a36a797ad
commit e1f9219b93
183 changed files with 1457 additions and 1294 deletions

View File

@@ -12,7 +12,7 @@ module.exports = {
},
create: function (context) {
return {
// If methods called on *Service classes are not already wrapped with `await tryExecuteAndNotify()`, then we should suggest to wrap them.
// If methods called on *Service classes are not already wrapped with `await tryExecute()`, then we should suggest to wrap them.
CallExpression: function (node) {
if (
node.callee.type === 'MemberExpression' &&
@@ -28,9 +28,9 @@ module.exports = {
if (!hasTryExecuteAndNotify) {
context.report({
node,
message: 'Wrap this call with `tryExecuteAndNotify()`. Make sure to `await` the result.',
message: 'Wrap this call with `tryExecute()`. Make sure to `await` the result.',
fix: (fixer) => [
fixer.insertTextBefore(node, 'tryExecuteAndNotify(this, '),
fixer.insertTextBefore(node, 'tryExecute(this, '),
fixer.insertTextAfter(node, ')'),
],
});

View File

@@ -1,7 +1,6 @@
import { defineConfig } from '@hey-api/openapi-ts';
export default defineConfig({
client: 'legacy/fetch',
debug: true,
input: '../Umbraco.Cms.Api.Management/OpenApi.json',
output: {
@@ -10,6 +9,7 @@ export default defineConfig({
lint: 'eslint',
},
plugins: [
'legacy/fetch',
{
name: '@hey-api/typescript',
enums: 'typescript'