Skip to content

Instantly share code, notes, and snippets.

@avishkarabhishek786
Last active June 23, 2025 06:15
Show Gist options
  • Save avishkarabhishek786/73a921d0d496b1ffa2257641ac7c6614 to your computer and use it in GitHub Desktop.
Save avishkarabhishek786/73a921d0d496b1ffa2257641ac7c6614 to your computer and use it in GitHub Desktop.
// Recursive Partial type
export type DeepPartial<T> = {
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
};
export type OptionalPaymentResponseDTO = DeepPartial<PaymentResponseDTO>;
export interface PaymentResponseDTO {
_embedded: {
paymentResourceList: PaymentResource[];
};
page: Page;
_links: Links;
}
export interface Page {
size: number;
totalElements: number;
totalPages: number;
number: number;
}
export interface PaymentResource {
paymentId: string;
engine: string;
engineReference: string;
status: string;
reason: string;
createdBy: string;
createdDateTime: string;
instruction: Instruction;
_links: Links;
}
export interface Links {
self: Link;
documents?: Link;
}
export interface Link {
href: string;
}
export interface Instruction {
sourceReference: string;
country: string;
valueDate: string;
remittance: string | null;
specialInstruction: string | null;
customer: Customer;
from: PartyInstruction;
to: PartyInstruction;
charge: Charge;
forex: Forex;
documents: Documents;
regulatory: Regulatory;
audit: any;
tracking: any;
fromAccountType: string;
}
export interface Customer {
id: string;
ipAddress: string;
contacts: Contact[];
}
export interface Contact {
name: string;
type: string | null;
detail: string;
}
export interface PartyInstruction {
reference: string;
account: string;
accountType: string | null;
currency: string;
amount: number | null;
party: Party;
bic: string;
branch: string | null;
bank: string | null;
contacts: Contact[] | null;
}
export interface Party {
name: string;
address: Address;
}
export interface Address {
line1: string | null;
line2: string | null;
suburb: string | null;
city: string | null;
province: string | null;
postalCode: string | null;
country: string;
}
export interface Charge {
paidBy: string;
account: string;
currency: string;
}
export interface Forex {
cover: string;
rate: number | null;
}
export interface Documents {
required: boolean;
count: number;
}
export interface Regulatory {
excon: Excon;
cbr: CBR;
senderToReceiver: string | null;
}
export interface Excon {
compliance: string;
number: string | null;
dealer: string | null;
date: string | null;
}
export interface CBR {
type: string;
data: string;
reference: string | null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment