Skip to content

[configurationwebhooks] Code generation: update services and models#1643

Open
AdyenAutomationBot wants to merge 1 commit intomainfrom
sdk-automation/configurationwebhooks
Open

[configurationwebhooks] Code generation: update services and models#1643
AdyenAutomationBot wants to merge 1 commit intomainfrom
sdk-automation/configurationwebhooks

Conversation

@AdyenAutomationBot
Copy link
Collaborator

This PR contains the automated changes for the configurationwebhooks service.

The commit history of this PR reflects the adyen-openapi commits that have been applied.

@AdyenAutomationBot AdyenAutomationBot requested review from a team as code owners March 18, 2026 16:00
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request integrates new functionality for handling mandate-related webhooks within the configurationwebhooks service. It expands the existing webhook processing capabilities by introducing a new notification request type and a suite of associated data models. This ensures that the system can accurately receive, parse, and manage mandate lifecycle events, enhancing the overall robustness of webhook handling.

Highlights

  • New Webhook Type: Introduced MandateNotificationRequest as a new type within the GenericWebhook union, enabling the system to process mandate-related notifications.
  • Webhook Handler Update: Updated the ConfigurationWebhooksHandler to include logic for deserializing and handling MandateNotificationRequest objects.
  • New Mandate Models: Added several new data models, including Mandate, MandateBankAccount, MandateNotificationData, MandatePartyIdentification, and UKLocalMandateAccountIdentification, to support the structure of mandate-related information.
  • Documentation Enhancement: Improved the JSDoc for settlementDelayDays in PlatformPaymentConfiguration to clarify its requirements.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request, which appears to be auto-generated, introduces new services and models for configurationwebhooks. The changes are mostly about adding support for mandate notifications. My review has identified a couple of areas for improvement. Firstly, in mandate.ts, createdAt and updatedAt properties are typed as any, which compromises type safety. They should be typed as Date. Secondly, there's a recurring pattern in several new model files (mandateBankAccount.ts, mandateNotificationRequest.ts, uKLocalMandateAccountIdentification.ts) where required properties are not initialized in the constructor. This could lead to runtime errors and violates TypeScript's strict property initialization rules. I've left specific comments with more details.

Comment on lines +15 to +16
"accountHolder": MandatePartyIdentification;
"accountIdentification": UKLocalMandateAccountIdentification;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The properties accountHolder and accountIdentification are declared as required (non-optional) but are not initialized in the constructor. This can lead to runtime errors if an instance is created and these properties are not immediately populated. This appears to be a systemic issue in the generated code. If these properties are truly required by the API, the ObjectSerializer should validate their presence. If they can be absent, they should be marked as optional (?) to reflect that and to comply with TypeScript's strict property initialization.

Comment on lines +14 to +26
"data": MandateNotificationData;
/**
* The environment from which the webhook originated. Possible values: **test**, **live**.
*/
"environment": string;
/**
* When the event was queued.
*/
"timestamp"?: Date;
/**
* Type of webhook.
*/
"type": MandateNotificationRequest.TypeEnum;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The properties data, environment, and type are declared as required (non-optional) but are not initialized in the constructor. This can lead to runtime errors if an instance is created and these properties are not immediately populated. This appears to be a systemic issue in the generated code. If these properties are truly required by the API, the ObjectSerializer should validate their presence. If they can be absent, they should be marked as optional (?) to reflect that and to comply with TypeScript's strict property initialization.

Comment on lines +15 to +23
"accountNumber": string;
/**
* The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace.
*/
"sortCode": string;
/**
* **ukLocal**
*/
"type": UKLocalMandateAccountIdentification.TypeEnum;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The properties accountNumber, sortCode, and type are declared as required (non-optional) but are not initialized in the constructor. This can lead to runtime errors if an instance is created and these properties are not immediately populated. This appears to be a systemic issue in the generated code. If these properties are truly required by the API, the ObjectSerializer should validate their presence. If they can be absent, they should be marked as optional (?) to reflect that and to comply with TypeScript's strict property initialization.

*/
"balanceAccountId"?: string;
"counterparty"?: MandateBankAccount | null;
"createdAt"?: any;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The type of createdAt is any, which is not type-safe. For better type safety and consistency with other timestamp fields (like timestamp in MandateNotificationRequest), this should be typed as Date. The same applies to updatedAt on line 36. You will also need to update the attributeTypeMap for both properties to use "type": "Date" and "format": "date-time" (see lines 58-59 and 88-89).

Suggested change
"createdAt"?: any;
"createdAt"?: Date;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant