import * as i1$1 from "@ngrx/store"; import { Action, ActionReducer, MemoizedSelector, Store } from "@ngrx/store"; import { DaffAuthorizeNetTokenRequest, DaffAuthorizenetPaymentRequest } from "@daffodil/authorizenet"; import { DaffCartAddress } from "@daffodil/cart"; import { DaffIdentifiable } from "@daffodil/core"; import { DaffStateError, DaffStoreFacade, daffTransformErrorToStateError } from "@daffodil/core/state"; import { DaffPersonalAddress } from "@daffodil/geography"; import * as i1 from "@daffodil/payment/state"; import { DaffPaymentActions, DaffPaymentGenerateToken } from "@daffodil/payment/state"; import { Observable } from "rxjs"; import * as i0 from "@angular/core"; import { EnvironmentProviders, ModuleWithProviders } from "@angular/core"; import * as i2 from "@ngrx/effects"; export declare enum DaffAuthorizeNetActionTypes { UpdatePaymentAction = "[@daffodil/authorizenet] Update Payment", UpdatePaymentSuccessAction = "[@daffodil/authorizenet] Update Payment Success", UpdatePaymentFailureAction = "[@daffodil/authorizenet] Update Payment Failure", ApplyPaymentAction = "[@daffodil/authorizenet] Apply Payment", LoadAcceptJsAction = "[@daffodil/authorizenet] Load Accept Js", LoadAcceptJsSuccessAction = "[@daffodil/authorizenet] Load Accept Js Success", LoadAcceptJsFailureAction = "[@daffodil/authorizenet] Load Accept Js Failure" } /** * An action triggered to initialize a generate token request. * * @param payload - An DaffAuthorizeNetRequestData object. */ export declare class DaffAuthorizeNetUpdatePayment implements Action { tokenRequest: T; address: Partial; readonly type = DaffAuthorizeNetActionTypes.UpdatePaymentAction; constructor(tokenRequest: T, address: Partial); } /** * An action triggered upon successfully updating the payment method. * * @param payload - A string that is the payment nonce for a credit card. */ export declare class DaffAuthorizeNetUpdatePaymentSuccess implements Action { readonly type = DaffAuthorizeNetActionTypes.UpdatePaymentSuccessAction; } /** * An action triggered upon failing to update the payment method. * * @param payload - A string that is an error message. */ export declare class DaffAuthorizeNetUpdatePaymentFailure implements Action { payload: DaffStateError; readonly type = DaffAuthorizeNetActionTypes.UpdatePaymentFailureAction; constructor(payload: DaffStateError); } export declare class DaffLoadAcceptJs implements Action { readonly type = DaffAuthorizeNetActionTypes.LoadAcceptJsAction; } /** * Indicates that the AcceptJs library has loaded successfully. */ export declare class DaffLoadAcceptJsSuccess implements Action { readonly type = DaffAuthorizeNetActionTypes.LoadAcceptJsSuccessAction; } /** * Indicates that the AcceptJs library has failed to load */ export declare class DaffLoadAcceptJsFailure implements Action { payload: DaffStateError; readonly type = DaffAuthorizeNetActionTypes.LoadAcceptJsFailureAction; constructor(payload: DaffStateError); } /** * Triggers the application of an authorize.net payment. * * @role action */ export declare class DaffAuthorizenetApplyPayment implements DaffPaymentGenerateToken { request: DaffAuthorizenetPaymentRequest; address?: DaffPersonalAddress | DaffIdentifiable; readonly type = DaffAuthorizeNetActionTypes.ApplyPaymentAction; constructor(request: DaffAuthorizenetPaymentRequest, address?: DaffPersonalAddress | DaffIdentifiable); } export type DaffAuthorizeNetActions = DaffAuthorizeNetUpdatePayment | DaffAuthorizeNetUpdatePaymentSuccess | DaffAuthorizeNetUpdatePaymentFailure | DaffAuthorizenetApplyPayment | DaffLoadAcceptJsSuccess | DaffLoadAcceptJsFailure | DaffLoadAcceptJs; export interface DaffAuthorizeNetReducerState { isAcceptLoaded: boolean; paymentError: DaffStateError; acceptJsLoadError: DaffStateError; loading: boolean; } export declare const DAFF_AUTHORIZENET_STORE_FEATURE_KEY = "daffAuthorizenet"; export interface DaffAuthorizeNetReducersState { authorizeNet: DaffAuthorizeNetReducerState; } export interface DaffAuthorizeNetStateRootSlice { [DAFF_AUTHORIZENET_STORE_FEATURE_KEY]: DaffAuthorizeNetReducersState; } export declare function daffAuthorizeNetReducer(state: DaffAuthorizeNetReducerState, action: DaffAuthorizeNetActions | DaffPaymentActions): DaffAuthorizeNetReducerState; export declare const daffAuthorizeNetReducers: { authorizeNet: typeof daffAuthorizeNetReducer; }; export declare const DAFF_AUTHORIZE_NET_EXTRA_REDUCERS: import("@angular/core").InjectionToken>[]>, daffAuthorizeNetProvideExtraReducers: > = ActionReducer>>(...values: R[]) => Array; export declare const daffAuthorizeNetReducerInitialState: DaffAuthorizeNetReducerState; export interface DaffAuthorizeNetMemoizedSelectors { selectAuthorizeNetFeatureState: MemoizedSelector; selectAuthorizeNetState: MemoizedSelector; selectLoading: MemoizedSelector; selectPaymentError: MemoizedSelector; selectAcceptJsLoadError: MemoizedSelector; selectIsAcceptJsLoaded: MemoizedSelector; } export declare const daffAuthorizeNetSelectors: () => DaffAuthorizeNetMemoizedSelectors; export interface DaffAuthorizeNetStateConfig { /** * How many times Daffodil will retry the Accept.js load. * Defaults to 5. */ acceptMaxRetries: number; /** * The Accept.js loading retry backoff timing in milliseconds. * Defaults to 30. */ acceptBackoffTiming: number; } export declare const daffAuthorizeNetStateDefaultConfig: DaffAuthorizeNetStateConfig; export declare const DAFF_AUTHORIZE_NET_STATE_CONFIG: import("@angular/core").InjectionToken, provideDaffAuthorizeNetStateConfig: (config: Partial | import("@angular/core").InjectionToken>) => import("@angular/core").FactoryProvider; /** * Transforms `DaffError`s into `DaffStateError`s before they are serialized into state. * Can be used to further refine Daffodil errors into more specific app errors. */ export declare const DAFF_AUTHORIZENET_ERROR_MATCHER: import("@angular/core").InjectionToken, provideDaffAuthorizenetErrorMatcher: (value: R) => import("@angular/core").ValueProvider; export interface DaffAuthorizeNetFacadeInterface extends DaffStoreFacade { isAcceptJsLoaded$: Observable; loading$: Observable; paymentError$: Observable; acceptJsLoadError$: Observable; } export declare class DaffAuthorizeNetFacade implements DaffAuthorizeNetFacadeInterface { private store; isAcceptJsLoaded$: Observable; loading$: Observable; paymentError$: Observable; acceptJsLoadError$: Observable; constructor(store: Store); dispatch(action: Action): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * @deprecated in favor of {@link provideDaffAuthorizeNetState} Deprecated in version 0.95.0. Will be removed in version 0.98.0. */ export declare class DaffAuthorizeNetStateModule { static withConfig(config?: Partial): ModuleWithProviders; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** * @deprecated in favor of {@link provideDaffAuthorizeNetPaymentState} Deprecated in version 0.95.0. Will be removed in version 0.98.0. */ export declare class DaffAuthorizeNetPaymentStateModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** * Provides the `@daffodil/authorizenet/state` feature state and effects. * The passed config is merged over {@link daffAuthorizeNetStateDefaultConfig}. */ export declare const provideDaffAuthorizeNetState: (config?: Partial) => EnvironmentProviders; /** * Registers Authorize.Net as an available payment processor with `@daffodil/payment/state`. * Includes {@link provideDaffPaymentState}. */ export declare const provideDaffAuthorizeNetPaymentState: () => EnvironmentProviders;