Skip to content

Commit 03d1658

Browse files
authored
Revert "👽️ Fix whoami test (#392)" (#396)
1 parent 028c95a commit 03d1658

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

packages/hub/src/lib/who-am-i.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ describe("whoAmI", () => {
1313
fullname: "@huggingface/hub CI bot",
1414
email: "eliott@huggingface.co",
1515
emailVerified: true,
16+
plan: "NO_PLAN",
1617
canPay: false,
1718
isPro: false,
1819
periodEnd: null,
@@ -24,6 +25,7 @@ describe("whoAmI", () => {
2425
displayName: "ci-hub.js",
2526
role: "write",
2627
},
28+
permissions: ["inference-api"],
2729
},
2830
});
2931
});

packages/hub/src/lib/who-am-i.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ export interface WhoAmIUser {
1515
name: string;
1616
fullname: string;
1717
canPay: boolean;
18+
/**
19+
* @deprecated
20+
*/
21+
plan?: unknown;
1822
avatarUrl: string;
1923
/**
2024
* Unix timestamp in seconds
@@ -30,6 +34,10 @@ export interface WhoAmIOrg {
3034
fullname: string;
3135
email: string | null;
3236
canPay: boolean;
37+
/**
38+
* @deprecated
39+
*/
40+
plan?: unknown;
3341
avatarUrl: string;
3442
/**
3543
* Unix timestamp in seconds
@@ -55,6 +63,7 @@ export interface AuthInfo {
5563
expiration?: Date;
5664
role: AccessTokenRole;
5765
};
66+
permissions: string[];
5867
expiresAt?: Date;
5968
}
6069

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy