File size: 399 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import type { RewindPolicies } from 'calypso/state/rewind/policies/types';

type ApiResponse = {
	policies: {
		activity_log_limit_days: number;
		storage_limit_bytes: number;
	} | null;
};

const fromApi = ( { policies }: ApiResponse ): RewindPolicies => ( {
	activityLogLimitDays: policies?.activity_log_limit_days,
	storageLimitBytes: policies?.storage_limit_bytes,
} );

export default fromApi;