Skip to content

Instantly share code, notes, and snippets.

@bigslycat
Forked from oonsamyi/MISResponse.js
Last active April 25, 2017 10:57
Show Gist options
  • Select an option

  • Save bigslycat/8491218d8222ee92393a5213900916cb to your computer and use it in GitHub Desktop.

Select an option

Save bigslycat/8491218d8222ee92393a5213900916cb to your computer and use it in GitHub Desktop.
/* @flow */
export type ResponseError = {
success: false,
message: string,
};
export type GetClientByBarcode = {
success: true,
result: {
id: string,
barcode: string,
isDms: boolean,
isChild: boolean,
hasDebt: boolean,
phone: number,
firstName: string,
middleName?: string,
lastName: string,
},
};
export type OpenVisitByClientId = {
success: true,
result: {
cardId: string,
date: string,
discount: string,
payType: string,
payTypeRemain: string,
records: Array<{
cabinet: string,
time: string,
specialty: string,
doctor: string,
}>,
},
};
export type Services = Array<{
id: string,
type: string,
name: string,
date: string,
doctor: string,
sum: number,
documentId?: string,
}>;
export type GetServicesByClientId = {
success: true,
result: {
debt: Services,
rendered: Services,
unpaid: Services,
},
};
export type MakePayment = {
success: true,
result: {
payDocumentId: string,
sum: number,
debt: Array<{
id: string,
type: string,
name: string,
date: string,
doctor: string,
sum: number,
}>,
rendered: Array<{
id: string,
type: string,
name: string,
date: string,
doctor: string,
sum: number,
}>,
unpaid: Array<{
id: string,
type: string,
name: string,
date: string,
doctor: string,
sum: number,
}>,
},
};
export type ConfirmPayment = {
success: true,
result: {},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment