orizu 0.1.6 → 0.2.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/src/types.ts CHANGED
@@ -1,9 +1,17 @@
1
- export interface ServerCredentials {
1
+ export interface SessionServerCredentials {
2
+ credentialType?: 'session'
2
3
  accessToken: string
3
4
  refreshToken: string
4
5
  expiresAt: number
5
6
  }
6
7
 
8
+ export interface PatServerCredentials {
9
+ credentialType: 'pat'
10
+ apiKey: string
11
+ }
12
+
13
+ export type ServerCredentials = SessionServerCredentials | PatServerCredentials
14
+
7
15
  export interface StoredCredentialsV1 {
8
16
  baseUrl: string
9
17
  accessToken: string
@@ -14,6 +22,12 @@ export interface StoredCredentialsV1 {
14
22
  export interface StoredCredentialsV2 {
15
23
  version: 2
16
24
  activeBaseUrl: string | null
25
+ servers: Record<string, SessionServerCredentials>
26
+ }
27
+
28
+ export interface StoredCredentialsV3 {
29
+ version: 3
30
+ activeBaseUrl: string | null
17
31
  servers: Record<string, ServerCredentials>
18
32
  }
19
33
 
@@ -21,9 +35,10 @@ export interface StoredCredentialsV2 {
21
35
  export type StoredCredentials = StoredCredentialsV1
22
36
 
23
37
  export interface LoginResponse {
24
- accessToken: string
25
- refreshToken: string
26
- expiresAt: number
38
+ apiKey?: string
39
+ accessToken?: string
40
+ refreshToken?: string
41
+ expiresAt?: number
27
42
  user: {
28
43
  id: string
29
44
  email: string | null