Hi, we noticed that the receipt product type in @sumup/sdk does not include description, but this field is present in the actual receipt payload.
In transaction_data.products[], we receive description at runtime and use it in our integration, but TypeScript complains because it is not part of the generated SDK type.
Right now we have to work around it locally like this:
type SdkReceiptTransaction = NonNullable<SumUpSdkReceipt["transaction_data"]>;
type SdkReceiptProduct = NonNullable<SdkReceiptTransaction["products"]>[number];
type ReceiptProduct = SdkReceiptProduct & {
description?: string;
};
Would it be possible to add description to the generated ReceiptTransaction.products[] type?
Hi, we noticed that the receipt product type in
@sumup/sdkdoes not includedescription, but this field is present in the actual receipt payload.In
transaction_data.products[], we receivedescriptionat runtime and use it in our integration, but TypeScript complains because it is not part of the generated SDK type.Right now we have to work around it locally like this:
Would it be possible to add description to the generated ReceiptTransaction.products[] type?