apiToken.tsx 522 B

1234567891011121314151617
  1. import type {InternalAppApiToken} from 'sentry/types';
  2. export function ApiTokenFixture(
  3. params: Partial<InternalAppApiToken> = {}
  4. ): InternalAppApiToken {
  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. ...params,
  15. };
  16. }