apiToken.tsx 564 B

123456789101112131415161718
  1. import type {NewInternalAppApiToken} from 'sentry/types';
  2. export function ApiTokenFixture(
  3. params: Partial<NewInternalAppApiToken> = {}
  4. ): NewInternalAppApiToken {
  5. return {
  6. id: '1',
  7. token: 'apitoken123',
  8. dateCreated: new Date('Thu Jan 11 2018 18:01:41 GMT-0800 (PST)').toISOString(),
  9. scopes: ['project:read', 'project:write'],
  10. application: null,
  11. refreshToken: 'refresh_token',
  12. expiresAt: new Date('Thu Jan 11 2018 18:01:41 GMT-0800 (PST)').toISOString(),
  13. state: 'active',
  14. tokenLastCharacters: 'n123',
  15. ...params,
  16. };
  17. }