@companion-ai/alpha-hub 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -1
- package/src/lib/auth.d.ts +11 -0
- package/src/lib/index.d.ts +7 -0
- package/src/lib/index.js +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@companion-ai/alpha-hub",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Unofficial alphaXiv-powered CLI and library for research agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
"types": "./src/lib/index.d.ts",
|
|
19
19
|
"default": "./src/lib/index.js"
|
|
20
20
|
},
|
|
21
|
+
"./lib/auth": {
|
|
22
|
+
"types": "./src/lib/auth.d.ts",
|
|
23
|
+
"default": "./src/lib/auth.js"
|
|
24
|
+
},
|
|
21
25
|
"./lib/alphaxiv": "./src/lib/alphaxiv.js",
|
|
22
26
|
"./lib/annotations": "./src/lib/annotations.js",
|
|
23
27
|
"./lib/papers": "./src/lib/papers.js"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function getAccessToken(): string | null;
|
|
2
|
+
export declare function getUserId(): string | null;
|
|
3
|
+
export declare function getUserName(): string | null;
|
|
4
|
+
export declare function refreshAccessToken(): Promise<string | null>;
|
|
5
|
+
export declare function login(): Promise<{
|
|
6
|
+
tokens: unknown;
|
|
7
|
+
userInfo: unknown;
|
|
8
|
+
}>;
|
|
9
|
+
export declare function getValidToken(): Promise<string | null>;
|
|
10
|
+
export declare function isLoggedIn(): boolean;
|
|
11
|
+
export declare function logout(): void;
|
package/src/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
export declare function disconnect(): Promise<void>;
|
|
2
|
+
export declare function getUserName(): string | null;
|
|
3
|
+
export declare function isLoggedIn(): boolean;
|
|
4
|
+
export declare function login(): Promise<{
|
|
5
|
+
tokens: unknown;
|
|
6
|
+
userInfo: unknown;
|
|
7
|
+
}>;
|
|
8
|
+
export declare function logout(): void;
|
|
2
9
|
export declare function normalizePaperId(input: string): string;
|
|
3
10
|
|
|
4
11
|
export declare function searchAll(query: string): Promise<unknown>;
|
package/src/lib/index.js
CHANGED
|
@@ -14,10 +14,15 @@ import {
|
|
|
14
14
|
readAnnotation,
|
|
15
15
|
writeAnnotation,
|
|
16
16
|
} from './annotations.js';
|
|
17
|
+
import { getUserName, isLoggedIn, login, logout } from './auth.js';
|
|
17
18
|
import { normalizePaperId, toArxivUrl } from './papers.js';
|
|
18
19
|
|
|
19
20
|
export {
|
|
20
21
|
disconnect,
|
|
22
|
+
getUserName,
|
|
23
|
+
isLoggedIn,
|
|
24
|
+
login,
|
|
25
|
+
logout,
|
|
21
26
|
normalizePaperId,
|
|
22
27
|
searchAll,
|
|
23
28
|
searchByEmbedding,
|