File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed
Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ import { reverseKeyValues } from './utils' ;
2+
3+ export const ConnectionResult = {
4+ SUCCESS : 0 ,
5+ SERVICE_MISSING : 1 ,
6+ SERVICE_VERSION_UPDATE_REQUIRED : 2 ,
7+ SERVICE_DISABLED : 3 ,
8+ SIGN_IN_REQUIRED : 4 ,
9+ INVALID_ACCOUNT : 5 ,
10+ RESOLUTION_REQUIRED : 6 ,
11+ NETWORK_ERROR : 7 ,
12+ INTERNAL_ERROR : 8 ,
13+ SERVICE_INVALID : 9 ,
14+ DEVELOPER_ERROR : 10 ,
15+ LICENSE_CHECK_FAILED : 11 ,
16+ CANCELED : 13 ,
17+ TIMEOUT : 14 ,
18+ INTERRUPTED : 15 ,
19+ API_UNAVAILABLE : 16 ,
20+ SIGN_IN_FAILED : 17 ,
21+ SERVICE_UPDATING : 18 ,
22+ SERVICE_MISSING_PERMISSION : 19 ,
23+ RESTRICTED_PROFILE : 20 ,
24+ } ;
25+
26+
27+ export const ConnectionResultReverse = reverseKeyValues ( ConnectionResult ) ;
Original file line number Diff line number Diff line change 1+ /**
2+ * Makes an objects keys it's values
3+ * @param object
4+ * @returns {{} }
5+ */
6+ export function reverseKeyValues ( object ) {
7+ const output = { } ;
8+ for ( const key in object ) {
9+ output [ object [ key ] ] = key ;
10+ }
11+ return output ;
12+ }
You can’t perform that action at this time.
0 commit comments