Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 1 | // Copyright 2019 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | import 'shared/typedef.js'; |
| 6 | |
| 7 | export const NAME = 'users/1234'; |
| 8 | |
| 9 | export const DISPLAY_NAME = 'example@example.com'; |
| 10 | |
| 11 | export const ID = 1234; |
| 12 | |
| 13 | /** @type {UserRef} */ |
| 14 | export const USER_REF = Object.freeze({ |
| 15 | userId: ID, |
| 16 | displayName: DISPLAY_NAME, |
| 17 | }); |
| 18 | |
| 19 | /** @type {User} */ |
| 20 | export const USER = Object.freeze({ |
| 21 | name: NAME, |
| 22 | displayName: DISPLAY_NAME, |
| 23 | }); |
| 24 | |
| 25 | export const NAME_2 = 'users/5678'; |
| 26 | |
| 27 | export const DISPLAY_NAME_2 = 'other_user@example.com'; |
| 28 | |
| 29 | /** @type {User} */ |
| 30 | export const USER_2 = Object.freeze({ |
| 31 | name: NAME_2, |
| 32 | displayName: DISPLAY_NAME_2, |
| 33 | }); |
| 34 | |
| 35 | /** @type {Object<string, User>} */ |
| 36 | export const BY_NAME = Object.freeze({[NAME]: USER, [NAME_2]: USER_2}); |
| 37 | |
| 38 | /** @type {ProjectMember} */ |
| 39 | export const PROJECT_MEMBER = Object.freeze({ |
| 40 | name: 'projects/proj/members/1234', |
| 41 | role: 'CONTRIBUTOR', |
| 42 | }); |
| 43 | |