import * as gracely from "gracely"; import * as isoly from "isoly"; import * as authly from "authly"; import * as model from "@payfunc/model-card"; import * as base from "@payfunc/model-base"; import { Capture } from "../Capture"; import { Fraudio } from "../Fraudio"; import { Refund } from "../Refund"; import { Change as AChange } from "./Change"; import { Creatable as ACreatable } from "./Creatable"; import { History as AHistory } from "./History"; import { Operation as AuthorizationOperation } from "./Operation"; import { Processor as AProcessor } from "./Processor"; import { Recurring as AuthorizationRecurring } from "./Recurring"; import { Status as AuthorizationStatus } from "./Status"; export interface Authorization { id: authly.Identifier; merchant: authly.Identifier; number: string; reference: string | { network: string; processor: string; }; created: isoly.DateTime; amount: number; currency: isoly.Currency; card: model.Card; contact?: base.Contact; descriptor?: string; recurring?: AuthorizationRecurring; history: AHistory[]; change?: AChange[]; capture: Capture[]; refund: Refund[]; void?: isoly.DateTime; status: Partial>; category?: "purchase" | "withdrawal" | "payout"; fraudio?: Fraudio; processor?: string | AProcessor; } export declare namespace Authorization { function is(value: Authorization | any, strict?: boolean): value is Authorization; function flaw(value: Authorization | any): gracely.Flaw; function authorized(authorization: Omit): number; function captured(authorization: Omit): number; function refunded(authorization: Omit): number; function calculateStatus(authorization: Omit & { status?: Partial>; }): Authorization; function toCsv(authorizations: Authorization[]): string; function verify(token: authly.Token): Promise; type Creatable = ACreatable; namespace Creatable { const is: typeof ACreatable.is; const flaw: typeof ACreatable.flaw; const toVerificationCreatable: typeof ACreatable.toVerificationCreatable; const getAmount: typeof ACreatable.getAmount; type Safe = ACreatable.Safe; namespace Safe { const is: typeof import("./Creatable/Safe").Safe.is; const flaw: typeof import("./Creatable/Safe").Safe.flaw; } } type History = AHistory; const History: typeof AHistory; type Processor = AProcessor; namespace Processor { const template: import("selectively/dist/Type/Object").TObject; const is: typeof AProcessor.is; type Name = AProcessor.Name; namespace Name { const is: typeof import("./Processor/Name").Name.is; } } type Change = AChange; namespace Change { const is: typeof AChange.is; const flaw: typeof AChange.flaw; type Creatable = AChange.Creatable; const Creatable: typeof AChange.Creatable; } type Operation = AuthorizationOperation; namespace Operation { const is: typeof AuthorizationOperation.is; type Creatable = AuthorizationOperation.Creatable; const Creatable: typeof AuthorizationOperation.Creatable; } type Status = AuthorizationStatus; const Status: typeof AuthorizationStatus; type Recurring = AuthorizationRecurring; namespace Recurring { const is: typeof AuthorizationRecurring.is; const template: import("selectively/dist/Type/Union").Union; } }