All files / libs/payout-definition/state/src/lib/periods periods.keys.ts

90% Statements 9/10
100% Branches 3/3
60% Functions 3/5
90% Lines 9/10

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 111x 1x 1x 1x 1x 1x 1x 1x   1x  
import { type Period } from '@amalia/payout-definition/periods/types';
 
export const periodsQueryKeys = {
  all: () => ['periods'] as const,
  list: () => [...periodsQueryKeys.all(), 'list'] as const,
  currentPeriod: (frequency: Period['frequency']) => [...periodsQueryKeys.all(), 'current', frequency] as const,
  periodById: (periodId: Period['id']) => [...periodsQueryKeys.all(), 'by-id', periodId] as const,
  byDate: (date: string, frequency: Period['frequency']) =>
    [...periodsQueryKeys.all(), 'by-date', date, frequency] as const,
} as const;