apiToken.ts 594 B

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