|
| 1 | +import { AjaxResponse } from 'rxjs/ajax'; |
| 2 | +import { AnyAction, Nullable, UnknownRecord } from '../../../types/core'; |
| 3 | +import { ContextDataProduct } from './State'; |
| 4 | +export declare enum ActionTypes { |
| 5 | + REINITIALIZE = "REINITIALIZE", |
| 6 | + ERROR = "ERROR", |
| 7 | + SET_PRODUCT_CODE = "SET_PRODUCT_CODE", |
| 8 | + SET_RELEASE = "SET_RELEASE", |
| 9 | + SET_PARAMS = "SET_PARAMS", |
| 10 | + STORE_FINALIZED_NEON_CONTEXT_STATE = "STORE_FINALIZED_NEON_CONTEXT_STATE", |
| 11 | + FETCH_PRODUCT_STARTED = "FETCH_PRODUCT_STARTED", |
| 12 | + FETCH_PRODUCT_FAILED = "FETCH_PRODUCT_FAILED", |
| 13 | + FETCH_PRODUCT_SUCCEEDED = "FETCH_PRODUCT_SUCCEEDED", |
| 14 | + FETCH_PRODUCT_RELEASE_STARTED = "FETCH_PRODUCT_RELEASE_STARTED", |
| 15 | + FETCH_PRODUCT_RELEASE_FAILED = "FETCH_PRODUCT_RELEASE_FAILED", |
| 16 | + FETCH_PRODUCT_RELEASE_SUCCEEDED = "FETCH_PRODUCT_RELEASE_SUCCEEDED", |
| 17 | + FETCH_BUNDLE_PARENT_STARTED = "FETCH_BUNDLE_PARENT_STARTED", |
| 18 | + FETCH_BUNDLE_PARENT_FAILED = "FETCH_BUNDLE_PARENT_FAILED", |
| 19 | + FETCH_BUNDLE_PARENT_SUCCEEDED = "FETCH_BUNDLE_PARENT_SUCCEEDED", |
| 20 | + FETCH_BUNDLE_PARENT_RELEASE_STARTED = "FETCH_BUNDLE_PARENT_RELEASE_STARTED", |
| 21 | + FETCH_BUNDLE_PARENT_RELEASE_FAILED = "FETCH_BUNDLE_PARENT_RELEASE_FAILED", |
| 22 | + FETCH_BUNDLE_PARENT_RELEASE_SUCCEEDED = "FETCH_BUNDLE_PARENT_RELEASE_SUCCEEDED", |
| 23 | + FETCH_CITATION_DOWNLOAD_STARTED = "FETCH_CITATION_DOWNLOAD_STARTED", |
| 24 | + FETCH_CITATION_DOWNLOAD_FAILED = "FETCH_CITATION_DOWNLOAD_FAILED", |
| 25 | + FETCH_CITATION_DOWNLOAD_SUCCEEDED = "FETCH_CITATION_DOWNLOAD_SUCCEEDED", |
| 26 | + FETCH_CITATION_DOWNLOAD_RESET = "FETCH_CITATION_DOWNLOAD_RESET" |
| 27 | +} |
| 28 | +export interface ReinitializeAction extends AnyAction { |
| 29 | + type: typeof ActionTypes.REINITIALIZE; |
| 30 | + productCode: string; |
| 31 | + release?: Nullable<string>; |
| 32 | +} |
| 33 | +export interface ErrorAction extends AnyAction { |
| 34 | + type: typeof ActionTypes.ERROR; |
| 35 | + error: Nullable<UnknownRecord | string>; |
| 36 | +} |
| 37 | +export interface SetProductCodeAction extends AnyAction { |
| 38 | + type: typeof ActionTypes.SET_PRODUCT_CODE; |
| 39 | + productCode: Nullable<string>; |
| 40 | +} |
| 41 | +export interface SetReleaseAction extends AnyAction { |
| 42 | + type: typeof ActionTypes.SET_RELEASE; |
| 43 | + release: Nullable<string>; |
| 44 | +} |
| 45 | +export interface SetParamsAction extends AnyAction { |
| 46 | + type: typeof ActionTypes.SET_PARAMS; |
| 47 | + productCode: Nullable<string>; |
| 48 | + release: Nullable<string>; |
| 49 | +} |
| 50 | +export interface StoreFinalizedNeonContextStateAction extends AnyAction { |
| 51 | + type: typeof ActionTypes.STORE_FINALIZED_NEON_CONTEXT_STATE; |
| 52 | + neonContextState: UnknownRecord; |
| 53 | +} |
| 54 | +export interface FetchProductStartedAction extends AnyAction { |
| 55 | + type: typeof ActionTypes.FETCH_PRODUCT_STARTED; |
| 56 | +} |
| 57 | +export interface FetchProductFailedAction extends AnyAction { |
| 58 | + type: typeof ActionTypes.FETCH_PRODUCT_FAILED; |
| 59 | + error: Nullable<AjaxResponse | string>; |
| 60 | +} |
| 61 | +export interface FetchProductSucceededAction extends AnyAction { |
| 62 | + type: typeof ActionTypes.FETCH_PRODUCT_SUCCEEDED; |
| 63 | + data: ContextDataProduct; |
| 64 | +} |
| 65 | +export interface FetchProductReleaseStartedAction extends AnyAction { |
| 66 | + type: typeof ActionTypes.FETCH_PRODUCT_RELEASE_STARTED; |
| 67 | + release: string; |
| 68 | +} |
| 69 | +export interface FetchProductReleaseFailedAction extends AnyAction { |
| 70 | + type: typeof ActionTypes.FETCH_PRODUCT_RELEASE_FAILED; |
| 71 | + release: string; |
| 72 | + error: Nullable<AjaxResponse | string>; |
| 73 | +} |
| 74 | +export interface FetchProductReleaseSucceededAction extends AnyAction { |
| 75 | + type: typeof ActionTypes.FETCH_PRODUCT_RELEASE_SUCCEEDED; |
| 76 | + release: string; |
| 77 | + data: ContextDataProduct; |
| 78 | +} |
| 79 | +export interface FetchBundleParentStartedAction extends AnyAction { |
| 80 | + type: typeof ActionTypes.FETCH_BUNDLE_PARENT_STARTED; |
| 81 | + bundleParent: string; |
| 82 | +} |
| 83 | +export interface FetchBundleParentFailedAction extends AnyAction { |
| 84 | + type: typeof ActionTypes.FETCH_BUNDLE_PARENT_FAILED; |
| 85 | + bundleParent: string; |
| 86 | + error: Nullable<AjaxResponse | string>; |
| 87 | +} |
| 88 | +export interface FetchBundleParentSucceededAction extends AnyAction { |
| 89 | + type: typeof ActionTypes.FETCH_BUNDLE_PARENT_SUCCEEDED; |
| 90 | + bundleParent: string; |
| 91 | + data: ContextDataProduct; |
| 92 | +} |
| 93 | +export interface FetchBundleParentReleaseStartedAction extends AnyAction { |
| 94 | + type: typeof ActionTypes.FETCH_BUNDLE_PARENT_RELEASE_STARTED; |
| 95 | + bundleParent: string; |
| 96 | + release: string; |
| 97 | +} |
| 98 | +export interface FetchBundleParentReleaseFailedAction extends AnyAction { |
| 99 | + type: typeof ActionTypes.FETCH_BUNDLE_PARENT_RELEASE_FAILED; |
| 100 | + bundleParent: string; |
| 101 | + release: string; |
| 102 | + error: Nullable<AjaxResponse | string>; |
| 103 | +} |
| 104 | +export interface FetchBundleParentReleaseSucceededAction extends AnyAction { |
| 105 | + type: typeof ActionTypes.FETCH_BUNDLE_PARENT_RELEASE_SUCCEEDED; |
| 106 | + bundleParent: string; |
| 107 | + release: string; |
| 108 | + data: ContextDataProduct; |
| 109 | +} |
| 110 | +export interface FetchCitationDownloadStartedAction extends AnyAction { |
| 111 | + type: typeof ActionTypes.FETCH_CITATION_DOWNLOAD_STARTED; |
| 112 | + key: string; |
| 113 | +} |
| 114 | +export interface FetchCitationDownloadFailedAction extends AnyAction { |
| 115 | + type: typeof ActionTypes.FETCH_CITATION_DOWNLOAD_FAILED; |
| 116 | + key: string; |
| 117 | + error: Nullable<string>; |
| 118 | +} |
| 119 | +export interface FetchCitationDownloadSucceededAction extends AnyAction { |
| 120 | + type: typeof ActionTypes.FETCH_CITATION_DOWNLOAD_SUCCEEDED; |
| 121 | + key: string; |
| 122 | +} |
| 123 | +export interface FetchCitationDownloadResetAction extends AnyAction { |
| 124 | + type: typeof ActionTypes.FETCH_CITATION_DOWNLOAD_RESET; |
| 125 | + key: string; |
| 126 | +} |
| 127 | +export declare type DataProducCitationActionTypes = (ReinitializeAction | ErrorAction | SetProductCodeAction | SetReleaseAction | SetParamsAction | StoreFinalizedNeonContextStateAction | FetchProductStartedAction | FetchProductFailedAction | FetchProductSucceededAction | FetchProductReleaseStartedAction | FetchProductReleaseFailedAction | FetchProductReleaseSucceededAction | FetchBundleParentStartedAction | FetchBundleParentFailedAction | FetchBundleParentSucceededAction | FetchBundleParentReleaseStartedAction | FetchBundleParentReleaseFailedAction | FetchBundleParentReleaseSucceededAction | FetchCitationDownloadStartedAction | FetchCitationDownloadFailedAction | FetchCitationDownloadSucceededAction | FetchCitationDownloadResetAction | AnyAction); |
| 128 | +export declare type ErrorActionTypes = (ErrorAction | FetchProductFailedAction | FetchProductReleaseFailedAction | FetchBundleParentFailedAction | FetchBundleParentReleaseFailedAction | FetchCitationDownloadFailedAction); |
| 129 | +declare const ActionCreator: { |
| 130 | + reinitialize: (productCode: string, release?: Nullable<string>) => ReinitializeAction; |
| 131 | + error: (error: Nullable<UnknownRecord | string>) => ErrorAction; |
| 132 | + setProductCode: (productCode: Nullable<string>) => SetProductCodeAction; |
| 133 | + setRelease: (release: Nullable<string>) => SetReleaseAction; |
| 134 | + setParams: (productCode: Nullable<string>, release: Nullable<string>) => SetParamsAction; |
| 135 | + storeFinalizedNeonContextState: (neonContextState: UnknownRecord) => StoreFinalizedNeonContextStateAction; |
| 136 | + fetchProductStarted: () => FetchProductStartedAction; |
| 137 | + fetchProductFailed: (error: Nullable<AjaxResponse | string>) => FetchProductFailedAction; |
| 138 | + fetchProductSucceeded: (data: ContextDataProduct) => FetchProductSucceededAction; |
| 139 | + fetchProductReleaseStarted: (release: string) => FetchProductReleaseStartedAction; |
| 140 | + fetchProductReleaseFailed: (release: string, error: Nullable<AjaxResponse | string>) => FetchProductReleaseFailedAction; |
| 141 | + fetchProductReleaseSucceeded: (release: string, data: ContextDataProduct) => FetchProductReleaseSucceededAction; |
| 142 | + fetchBundleParentStarted: (bundleParent: string) => FetchBundleParentStartedAction; |
| 143 | + fetchBundleParentFailed: (bundleParent: string, error: Nullable<AjaxResponse | string>) => FetchBundleParentFailedAction; |
| 144 | + fetchBundleParentSucceeded: (bundleParent: string, data: ContextDataProduct) => FetchBundleParentSucceededAction; |
| 145 | + fetchBundleParentReleaseStarted: (bundleParent: string, release: string) => FetchBundleParentReleaseStartedAction; |
| 146 | + fetchBundleParentReleaseFailed: (bundleParent: string, release: string, error: Nullable<AjaxResponse | string>) => FetchBundleParentReleaseFailedAction; |
| 147 | + fetchBundleParentReleaseSucceeded: (bundleParent: string, release: string, data: ContextDataProduct) => FetchBundleParentReleaseSucceededAction; |
| 148 | + fetchCitationDownloadStarted: (key: string) => FetchCitationDownloadStartedAction; |
| 149 | + fetchCitationDownloadFailed: (key: string, error: Nullable<string>) => FetchCitationDownloadFailedAction; |
| 150 | + fetchCitationDownloadSucceeded: (key: string) => FetchCitationDownloadSucceededAction; |
| 151 | + fetchCitationDownloadReset: (key: string) => FetchCitationDownloadResetAction; |
| 152 | +}; |
| 153 | +export default ActionCreator; |
0 commit comments