Success', props<{ products: Product[] }>() ); export const productsLoadedFailure = createAction( '[Products API] Products Loaded Failure', props<{ errorMsg: string }>() ); export const productCreatedSuccess = createAction( '[Products API] Product Created Success', props<{ product: Product }>() ); export const productCreatedFailure = createAction( '[Products API] Product Created Failure', props<{ errorMsg: string }>() ); export const productUpdatedSuccess = createAction( '[Products API] Product Updated Success', props<{ product: Product }>() ); export const productUpdatedFailure = createAction( '[Products API] Product Updated Failure', props<{ errorMsg: string }>() ); export const ProductsApiActions = createActionGroup({ source: 'Products API', events: { 'Products Loaded Success': props<{ products: Product[] }>(), 'Products Loaded Failure': props<{ errorMsg: string }>(), 'Product Created Success': props<{ product: Product }>(), 'Product Created Failure': props<{ errorMsg: string }>(), 'Product Updated Success': props<{ product: Product }>(), 'Product Updated Failure': props<{ errorMsg: string }>(), }, });