apiToken.tsx 550 B

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