Skip to content
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

update metadata type from any to unknown #367

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/binders/orders/parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { type IdempotencyParameter, type PaginationParameters, type ThrottlingPa
import { type CreateParameters as PaymentCreateParameters } from '../payments/parameters';
import type PickOptional from '../../types/PickOptional';

export type CreateParameters = Pick<OrderData, 'amount' | 'orderNumber' | 'consumerDateOfBirth' | 'webhookUrl' | 'locale' | 'metadata' | 'expiresAt'> &
PickOptional<OrderData, 'billingAddress' | 'shippingAddress' | 'redirectUrl' | 'cancelUrl'> & {
export type CreateParameters = Pick<OrderData, 'amount' | 'orderNumber' | 'consumerDateOfBirth' | 'webhookUrl' | 'locale' | 'expiresAt'> &
PickOptional<OrderData, 'billingAddress' | 'shippingAddress' | 'redirectUrl' | 'cancelUrl' | 'metadata'> & {
/**
* All order lines must have the same currency as the order. You cannot mix currencies within a single order.
*
Expand Down
2 changes: 1 addition & 1 deletion src/binders/payments/refunds/parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface ContextParameters {
testmode?: boolean;
}

export type CreateParameters = ContextParameters & Pick<RefundData, 'amount' | 'metadata'> & PickOptional<RefundData, 'description'> & IdempotencyParameter;
export type CreateParameters = ContextParameters & Pick<RefundData, 'amount'> & PickOptional<RefundData, 'description' | 'metadata'> & IdempotencyParameter;

export type GetParameters = ContextParameters & {
embed?: RefundEmbed[];
Expand Down
2 changes: 1 addition & 1 deletion src/data/customers/Customer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export interface CustomerData extends Model<'customer'> {
*
* @see https://docs.mollie.com/reference/v2/customers-api/get-customer?path=metadata#response
*/
metadata: Record<string, string>;
metadata: unknown;
/**
* The customer's date and time of creation, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
*
Expand Down
2 changes: 1 addition & 1 deletion src/data/orders/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export interface OrderData extends Model<'order'> {
*
* @see https://docs.mollie.com/reference/v2/orders-api/get-order?path=metadata#response
*/
metadata?: any;
metadata: unknown;
/**
* The URL your customer will be redirected to after completing or canceling the payment process.
*
Expand Down
2 changes: 1 addition & 1 deletion src/data/orders/orderlines/OrderLine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export interface OrderLineData extends Model<'orderline'> {
* @see https://docs.mollie.com/reference/v2/orders-api/get-order?path=lines/_links#response
*/
_links: OrderLineLinks;
metadata: any;
metadata: unknown;
}

type OrderLine = Seal<OrderLineData, {}>;
Expand Down
2 changes: 1 addition & 1 deletion src/data/payments/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export interface PaymentData extends Model<'payment'> {
*
* @see https://docs.mollie.com/reference/v2/payments-api/get-payment?path=metadata#response
*/
metadata: any;
metadata: unknown;
/**
* The customer's locale, either forced on creation by specifying the `locale` parameter, or detected by us during checkout. Will be a full locale, for example `nl_NL`.
*
Expand Down
2 changes: 1 addition & 1 deletion src/data/refunds/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export interface RefundData extends Model<'refund'> {
*
* @see https://docs.mollie.com/reference/v2/refunds-api/get-payment-refund?path=metadata#response
*/
metadata?: any;
metadata: unknown;
/**
* Since refunds may not be instant for certain payment methods, the refund carries a status field.
*
Expand Down
2 changes: 1 addition & 1 deletion src/data/subscriptions/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export interface SubscriptionData extends Model<'subscription'> {
*
* @see https://docs.mollie.com/reference/v2/subscriptions-api/get-subscription?path=metadata#response
*/
metadata: any;
metadata: unknown;
/**
* The application fee, if the subscription was created with one. This will be applied on each payment created for the subscription.
*
Expand Down
Loading