customerUsage.ts 596 B

12345678910111213141516171819202122232425
  1. import type {CustomerUsage as CustomerUsageType} from 'getsentry/types';
  2. import {UsageTotalFixture} from './usageTotal';
  3. export function CustomerUsageFixture(
  4. params: Partial<CustomerUsageType> = {}
  5. ): CustomerUsageType {
  6. return {
  7. periodStart: '2022-06-01',
  8. periodEnd: '2022-06-30',
  9. onDemandMaxSpend: 0,
  10. onDemandEventsAllowed: 0,
  11. totals: {
  12. errors: UsageTotalFixture(),
  13. transactions: UsageTotalFixture(),
  14. attachments: UsageTotalFixture(),
  15. },
  16. stats: {
  17. errors: [],
  18. transactions: [],
  19. attachments: [],
  20. },
  21. ...params,
  22. };
  23. }