import { MerchantInfo, PerxCategory, PerxInvoice, PerxLoyaltyTransactionHistoryEntry, PerxRewardReservation } from '.'; import { PerxCustomer } from './Customer'; import { PerxLoyalty } from './LoyaltyProgram'; import { PerxLoyaltyTransaction } from './LoyaltyTransaction'; import { PerxReward } from './Reward'; import { PerxRewardSearchResult } from './SearchResult'; import { PerxTransaction } from './Transaction'; import { PerxVoucher } from './Voucher'; import { PerxMerchant } from './Merchant'; import { PerxCampaign } from './Campaign'; export declare class BasePerxResponse { protected errorCode?: string; protected errorDescription?: string; get hasError(): boolean; protected afterDeserialized(json: any): void; get error(): Error | undefined; /** * Parse JSON response and Evaluate the result. * throws if error shown * * @param json * @param cnstr * @returns */ static parseAndEval(json: any, httpStatus: number, cnstr: new () => T): T; } /** * Support following details * { "count": 63, "size": 10, "page": 1, "total_pages": 7, "order": null, "type": null } */ export declare class PerxPagingVoucherMeta { /** * Total count of complete query scope */ count: number; /** * Total count of items within this page */ size: number; /** * current page */ page: number; /** * total number of pages */ totalPages: number; /** * current order sequence */ order: 'asc' | 'desc' | null; /** * Type of query scope used. */ type: string | null; } export declare class PerxPagingMeta { count: number; size: number; totalPages: number; page: number; currentPage: number; perPage: number; prevPage: number | null; nextPage: number | null; totalCount: number | null; lat: string | null; lng: string | null; radius: string | null; } export declare abstract class ObjectPerxResponse extends BasePerxResponse { private cnstr; data: Obj; protected constructor(cnstr: new () => Obj); protected afterDeserialized(json: any): void; } export declare abstract class ItemListPerxResponse extends BasePerxResponse { private cnstr; protected readonly dataKeyPath: string; protected constructor(cnstr: new () => Item, dataKeyPath?: string); data: Item[]; meta: PerxPagingMeta; protected afterDeserialized(json: any): void; } export declare class TokenResponse extends BasePerxResponse { accessToken: string; tokenType: string; refreshToken: string | null; expiresIn: number; scope?: string; } export declare class BearerTokenResponse { /** * Error Code */ code?: number; /** * Error Message */ message?: string; bearerToken: string; tenant: string; get hasError(): boolean; protected afterDeserialized(json: any): void; get error(): Error | undefined; } export declare class PerxRewardsResponse extends ItemListPerxResponse { constructor(); } export declare class PerxVoucherResponse extends ObjectPerxResponse { constructor(); } export declare class PerxVouchersResponse extends BasePerxResponse { data: PerxVoucher[]; meta: PerxPagingVoucherMeta; } export declare class PerxRewardResponse extends ObjectPerxResponse { constructor(); } export declare class VoucherResponse extends ObjectPerxResponse { constructor(); } export declare class LoyaltyProgramResponse extends ObjectPerxResponse { constructor(); } export declare class LoyaltyProgramsResponse extends ItemListPerxResponse { constructor(); } export declare class PerxCustomerResponse extends ObjectPerxResponse { constructor(); } export declare class PerxTransactionResponse extends ObjectPerxResponse { constructor(); } export declare class PerxLoyaltyTransactionResponse extends ObjectPerxResponse { constructor(); } export declare class PerxLoyaltyTransactionsHistoryResponse extends ItemListPerxResponse { constructor(); } export declare class PerxRewardSearchResultResponse extends ItemListPerxResponse { constructor(); } export declare class PerxCategoriesResultResponse extends ItemListPerxResponse { constructor(); } export declare class PerxRewardReservationResponse extends ObjectPerxResponse { constructor(); } declare class IdHolder { id: string; } export declare class IdObjectResponse extends ObjectPerxResponse { constructor(); } export declare class PerxInvoiceCreationResponse extends ObjectPerxResponse { constructor(); } export declare class PerxMerchantInfoResponse extends ObjectPerxResponse { constructor(); } export declare class PerxMerchantResponse extends ObjectPerxResponse { constructor(); } export declare class PerxMerchantsResponse extends ItemListPerxResponse { constructor(); } export declare class PerxCampaignResponse extends ObjectPerxResponse { constructor(); } export declare class PerxCampaignsResponse extends ItemListPerxResponse { constructor(); } export {};