import { Reducer, Action, ActionCreator, Middleware, Store, StoreEnhancer } from "redux"; import { fetchQueueReducer } from "@payping/utils/fetchQueue"; import { ThunkDispatch } from "redux-thunk"; import { CategoryDetailViewModel, CouponDetailViewModel, CouponListItemViewModel, CustomerListItemViewModel, InvoiceCustomerDetailViewModel, BanksApis, KhavarmiyanehApis, SamanApis, InvoiceProductDetailViewModel, InvoiceComplexDetailViewModel, InvoiceListItemViewModel, PermanentDetailViewModel, PermanentListItemViewModel, ProductFullDeatilViewModel, ProductListWordpress, PaymentDetailsVM, UserTerminalInfo, TransactionReportViewModel, BaseIntegration, ServiceDetailViewModel, DashboardProfileChecksResponseModel, DashboardProfileResponseModel, UserBusinessInformationAdminModel, UserLocalInfoResponseModel, UserPersonalInfoResponseModel, UserProfilePlanInfoResponseModel, UserSocialInfoResponseModel, UserWizardStatusInfo, WageInfoViewModel, GetUserProfileAdminResponseModel, TransactionWithdrawDetailsViewModel, UserMessageModel, UserVerificationTypeAdminEnum, UserVerificationTypeEnum, CreateRequestResultVM, GetFavouriteIbansResponse, OverviewResult, PagedQueryResultSettlementFullDetails, PagedQueryResultTransactionDetails, PagedQueryResultRequestDetailsVM } from "@payping/api"; import { Persistor, MigrationManifest, Storage, Transform } from "redux-persist"; interface AuthState { token: string; TOTPCode: string; showTOTPModal: boolean; ssoUserInfo?: Record; userClaims?: string[]; } interface CategoryState { list: CategoryDetailViewModel[]; totalCount: number; } interface ClientDetailViewModel { clientId?: string; clientName?: string; description?: string; logoUri?: string; } interface AppDetailViewModel extends ClientDetailViewModel { allowedScopes?: string[]; clientType?: number; clientUri?: string; clientSecret?: string; enabled?: boolean; expireMonths?: number; isChecked?: boolean; isTest?: boolean; isTrusted?: boolean; redirectUris: string[]; } interface TokenDetailViewModel extends AppDetailViewModel { allowedIPs?: string; expireDate?: string; token?: string; } interface ScopeDetailViewModel { name?: string; displayName?: string; description?: string; emphasize?: boolean; required?: boolean; checked?: boolean; } interface CouponState { list: CouponListItemViewModel[]; totalCount: number; paginationEnd: boolean; details?: CouponDetailViewModel; } interface CustomerState { list: CustomerListItemViewModel[]; totalCount: number; paginationEnd: boolean; details?: InvoiceCustomerDetailViewModel; } type OrderType = "salon" | "pack" | "delivery"; type ActiveDiscountType = "customerClub" | "coupon" | "manual" | undefined; interface FastInvoiceState { invoice: { products: InvoiceProductDetailViewModel[]; latestSelectedProduct?: InvoiceProductDetailViewModel; orderType: OrderType; activeDiscountType: ActiveDiscountType; invoiceCoupon?: CouponDetailViewModel; }; fastInvoiceCounter: number; useWeight: boolean; } interface InvoiceState { list: InvoiceListItemViewModel[]; totalCount: number; paginationEnd: boolean; details?: InvoiceComplexDetailViewModel; coupon?: CouponState; } interface Versions { current?: string; supported?: string; latest?: string; } interface OrganizationState { organizationClientId: string; token: string; name: string; logoUri: string; } interface PermaLinkState { list: PermanentListItemViewModel[]; totalCount: number; details?: PermanentDetailViewModel; } interface PcPosConfig { uniqueId: string; pspId: string; ip: string; port: string; pspName: string; posName: string; logo: string; } interface PosState { pcpos: { active?: PcPosConfig; list: PcPosConfig[]; }; mpos: { terminalId?: string; }; } interface ProductState { list: ProductListWordpress[]; totalCount: number; paginationEnd: boolean; details?: ProductFullDeatilViewModel; } interface ReportState { list: TransactionReportViewModel[]; totalCount: number; paginationEnd: boolean; details?: TransactionDetailsVM; totalTransactionCount?: number; terminalList: UserTerminalInfo[]; } interface TransactionDetailsVM extends PaymentDetailsVM { code: string; } interface RequestMoneyState { list: TransactionReportViewModel[]; totalCount: number; paginationEnd: boolean; details?: TransactionDetailsVM; } type PrintPaperSizeTypes = "A4" | "A5" | "80mm"; type LocaleType = "fa" | "en"; type DirectionType = "rtl" | "ltr"; type ThemeType = "light" | "dark"; interface PrinterConfig { name: string; isDefault: boolean; } interface SettingState { autoDisplay: boolean; defaultTerms: { isEnabled: boolean; text: string; }; isAutoPrintingActive: boolean; printReceptionInvoice: boolean; defaultPrinterForReceptionInvoice?: PrinterConfig; isSecondScreenWindowVisible: boolean; isShopModeActive: boolean; customerOrderMode: boolean; showSelectOrderType: boolean; fastInvoiceCompactMode: boolean; preInvoiceMode: boolean; isOnline: boolean; readWeightFromPort: boolean; paperSize: PrintPaperSizeTypes; locale: LocaleType; direction: DirectionType; versions: Versions; theme: ThemeType; compactTheme: boolean; } interface UserState extends DashboardProfileResponseModel { personalInfo?: Omit & Omit & { haveTerminal?: boolean; birthdayNationalCodeVerified?: boolean; name?: string; verifyType?: UserVerificationTypeEnum | UserVerificationTypeAdminEnum; }; businessInfo?: UserBusinessInformationAdminModel; panelInfo?: UserProfilePlanInfoResponseModel & Pick; bankInfo?: { sheba?: string; shebaVerified?: boolean; }; localInfo?: UserLocalInfoResponseModel; message: { count: number; list: UserMessageModel[]; }; checks?: DashboardProfileChecksResponseModel; socials?: UserSocialInfoResponseModel; discountDays?: number; hasWithdraw?: boolean; autoWithdraw?: boolean; phoneNumber?: string; qrCode?: string; role?: string[]; twoFactorEnabled?: boolean; wizard?: UserWizardStatusInfo; referralCode?: string; registerDateTime?: string; isReferralActive?: boolean; isSettlement?: boolean; wage?: WageInfoViewModel; permissions: string[]; isLoadingPermission: boolean; overview: { hasWithdraw?: boolean; lastWithdraw?: TransactionWithdrawDetailsViewModel; tasksStatus?: { hasCoupon: boolean; hasCustomer: boolean; hasInvoices: boolean; hasProduct: boolean; hasToken: boolean; hasTransaction: boolean; }; }; } interface ClientState { app: { list: AppDetailViewModel[]; details?: AppDetailViewModel; totalCount: number; }; client: { list: ClientDetailViewModel[]; details?: ClientDetailViewModel; totalCount: number; }; hasWithdrawRefund?: boolean; allScopes: { scopes: ScopeDetailViewModel[]; identityScopes: ScopeDetailViewModel[]; }; token: { list: TokenDetailViewModel[]; details?: TokenDetailViewModel; totalCount: number; }; } type SdkExtraArg$0 = undefined; // Next Line: // It is important to use Action as last type argument, does not work with any. type SdkThunkDispatch$0 = ThunkDispatch; type Unpromisify = T extends Promise ? U : T; interface DigitalAccountState { availableBanks: Unpromisify>; depositStatements: Unpromisify>; statementsList: Unpromisify>; depositBalance: Unpromisify>; samanRequestList: Unpromisify>; samanOverviewDetail: Unpromisify>; khavarmianeh: { status?: Unpromisify>; }; } interface ServiceState { oneService: BaseIntegration; list: ServiceDetailViewModel[]; totalCount: number; } interface WithdrawState { balance: number; list: TransactionWithdrawDetailsViewModel[]; totalCount: number; paginationEnd: boolean; } interface CashOutState { depositList?: PagedQueryResultRequestDetailsVM; depositTransactionsList?: PagedQueryResultTransactionDetails; requestList?: PagedQueryResultRequestDetailsVM; settlementList?: PagedQueryResultSettlementFullDetails; overview?: OverviewResult; createdRequest?: CreateRequestResultVM; createRequestSettlements?: PagedQueryResultSettlementFullDetails; filteredSettlementList?: PagedQueryResultSettlementFullDetails; favouriteIbans?: GetFavouriteIbansResponse; } interface SdkStoreStates { auth: AuthState; categories: CategoryState; client: ClientState; coupons: CouponState; customers: CustomerState; digitalAccount: DigitalAccountState; fastInvoice: FastInvoiceState; fetchQueue: ReturnType; invoices: InvoiceState; organization: OrganizationState; permalinks: PermaLinkState; pos: PosState; products: ProductState; reports: ReportState; service: ServiceState; settings: SettingState; user: UserState; withdraws: WithdrawState; requestMoney: RequestMoneyState; cashOuts: CashOutState; } interface SdkPersistConfig { version?: number; storage: Storage; whitelist?: string[]; transforms?: Transform[]; migrations?: MigrationManifest; } interface SdkStore extends Store { dispatch: SdkThunkDispatch$0; } interface ConfigureStoreType { store: SdkStore; persistor?: Persistor; } interface SdkConfigureStore { appReducers: Reducer; appMiddlewares?: Middleware[]; appEnhancers?: StoreEnhancer[]; composeActionCreators?: { [key: string]: ActionCreator; }; appPersistConfig?: SdkPersistConfig; onRehydrated?: () => void; } type BaseConfigureStore = SdkConfigureStore; type BaseConfigureStoreType = ConfigureStoreType; type ConfigureStoreType$0 = BaseConfigureStoreType; interface SdkConfigureStore$0 extends Omit { appReducers?: Record; } declare function configureStore$0(config?: SdkConfigureStore$0): ConfigureStoreType$0; export { ConfigureStoreType$0 as ConfigureStoreType, SdkConfigureStore$0 as SdkConfigureStore, configureStore$0 as configureStore, SdkPersistConfig, SdkStore };