-
Notifications
You must be signed in to change notification settings - Fork 2
chore: bump @mittwald/api-client from 4.430.0 to 4.433.0 in the mittwald-api group across 1 directory #2055
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dependabot
wants to merge
2
commits into
master
Choose a base branch
from
dependabot/npm_and_yarn/mittwald-api-06af863685
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file renamed
BIN
+33.5 KB
...ons-npm-4.430.0-70bb458241-3e3a563c3a.zip → ...ons-npm-4.436.0-9b050290d3-4996448145.zip
Binary file not shown.
Binary file removed
BIN
-394 KB
.yarn/cache/@mittwald-api-client-npm-4.430.0-41134e9036-3645b95caa.zip
Binary file not shown.
Binary file added
BIN
+391 KB
.yarn/cache/@mittwald-api-client-npm-4.436.0-d8ff25010b-5cffe9f29c.zip
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| import { MittwaldAPIV2Client } from "@mittwald/api-client"; | ||
| import { Response } from "@mittwald/api-client-commons"; | ||
|
|
||
| /** | ||
| * The `app-link-database` and `app-replace-database` operations are marked as | ||
| * deprecated in the mStudio OpenAPI specification, and are therefore no longer | ||
| * part of the generated API client (as of `@mittwald/api-client` 4.431.0). Both | ||
| * endpoints are still served by the API, and no successor operations exist yet, | ||
| * so they are invoked directly via the client's Axios instance here. | ||
| * | ||
| * Once the API offers replacements, these helpers should be dropped in favour | ||
| * of the generated client methods. | ||
| */ | ||
|
|
||
| type DatabaseUserIds = Record<string, string | undefined>; | ||
|
|
||
| /** | ||
| * Mirrors the behaviour of the generated request functions: HTTP error statuses | ||
| * are returned as a regular response instead of being thrown, so that callers | ||
| * can keep using `assertSuccess`/`assertStatus`. | ||
| */ | ||
| async function requestWithoutStatusValidation( | ||
| apiClient: MittwaldAPIV2Client, | ||
| url: string, | ||
| data: unknown, | ||
| ): Promise<Response> { | ||
| const response = await apiClient.axios.request({ | ||
| url, | ||
| method: "PATCH", | ||
| data, | ||
| validateStatus: () => true, | ||
| }); | ||
|
|
||
| return response as Response; | ||
| } | ||
|
|
||
| /** Links an existing database to an app installation for the given purpose. */ | ||
| export async function linkDatabase( | ||
| apiClient: MittwaldAPIV2Client, | ||
| appInstallationId: string, | ||
| data: { | ||
| databaseId: string; | ||
| purpose: "primary" | "cache" | "custom"; | ||
| databaseUserIds?: DatabaseUserIds; | ||
| }, | ||
| ): Promise<Response> { | ||
| return requestWithoutStatusValidation( | ||
| apiClient, | ||
| `/v2/app-installations/${encodeURIComponent(appInstallationId)}/database`, | ||
| data, | ||
| ); | ||
| } | ||
|
|
||
| /** Replaces the database currently linked to an app installation. */ | ||
| export async function replaceDatabase( | ||
| apiClient: MittwaldAPIV2Client, | ||
| appInstallationId: string, | ||
| data: { | ||
| oldDatabaseId: string; | ||
| newDatabaseId: string; | ||
| databaseUserIds?: DatabaseUserIds; | ||
| }, | ||
| ): Promise<Response> { | ||
| return requestWithoutStatusValidation( | ||
| apiClient, | ||
| `/v2/app-installations/${encodeURIComponent(appInstallationId)}/database/replace`, | ||
| data, | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Code agent forgot to update api-client and did not find actual operation that replaces the old one.
If it did, it would have seen that a perfectly fine alternative exists and provides the fields needed, at least specs say so. Signature in older api clients did not contain database fields yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Full ack, this is NOT a good solution. 🙅♂️