@fluido/dreno-core
Advanced tools
Comparing version 0.3.2-alpha to 0.4.0-alpha
@@ -1,21 +0,10 @@ | ||
import type { UserData, UserSignInMetadata } from './schemas'; | ||
export interface JwtPayload { | ||
iss?: string | undefined; | ||
sub?: string | undefined; | ||
aud?: string | string[] | undefined; | ||
exp?: number | undefined; | ||
nbf?: number | undefined; | ||
iat?: number | undefined; | ||
jti?: string | undefined; | ||
} | ||
interface UserDataResult { | ||
payload: (UserData & JwtPayload) | null; | ||
expired: boolean; | ||
entries: [string, string][]; | ||
} | ||
export type { JwtPayload, UserDataResult } from './client-methods/user'; | ||
export type { GeneratedVolatileHash } from './client-methods/hash'; | ||
export type { GeneratedVolatilePin } from './client-methods/pin'; | ||
export declare function createDrenoClient(authKey: string, fetchExtraRequestInit?: RequestInit): Promise<{ | ||
setAuthorizationKeys(keys: Record<string, string | undefined>): void; | ||
loadBrowserAuthorizationKeys(): void; | ||
getProjectId(): string; | ||
getUserData({ forceRefresh, ignoreExpiration, accessToken, refreshToken, }?: { | ||
setAuthorizationKeys: (keys: Record<string, string | undefined>) => void; | ||
loadBrowserAuthorizationKeys: () => void; | ||
getProjectId: () => string; | ||
getPublicAccessKey: () => Promise<any>; | ||
getUserData: (args_0?: { | ||
forceRefresh?: boolean | undefined; | ||
@@ -25,38 +14,26 @@ ignoreExpiration?: boolean | undefined; | ||
refreshToken?: string | undefined; | ||
}): Promise<UserDataResult>; | ||
getPublicAccessKey(): Promise<any>; | ||
signInWithPassword(args: { | ||
} | undefined) => Promise<import("./client-methods/user").UserDataResult>; | ||
getUserSignInMetadata: (identity: string) => Promise<import("./schemas").UserSignInMetadata | null>; | ||
signInWithPassword: (args: { | ||
identity: string; | ||
password: string; | ||
}): Promise<[string, string][] | null>; | ||
signInWithCode(code: string): Promise<[string, string][] | null>; | ||
getUserSignInMetadata(identity: string): Promise<UserSignInMetadata | null>; | ||
genVolatileHash(identity: string): Promise<GeneratedVolatileHash | null>; | ||
signInWithVolatileHash(args: { | ||
}) => Promise<[string, string][] | null>; | ||
signInWithCode: (code: string) => Promise<[string, string][] | null>; | ||
genVolatileHash: (identity: string) => Promise<import("./client-methods/hash").GeneratedVolatileHash | null>; | ||
signInWithVolatileHash: (args: { | ||
hash: string; | ||
number: number; | ||
}): Promise<[string, string][] | null>; | ||
genVolatilePin(identity: string): Promise<GeneratedVolatilePin | null>; | ||
signInWithVolatilePin(args: { | ||
}) => Promise<[string, string][] | null>; | ||
genVolatilePin: (identity: string) => Promise<import("./client-methods/pin").GeneratedVolatilePin | null>; | ||
signInWithVolatilePin: (args: { | ||
identity: string; | ||
pin: number; | ||
}): Promise<[string, string][] | null>; | ||
}) => Promise<[string, string][] | null>; | ||
email: { | ||
sendEmailPin: (args: { | ||
email: string | string[]; | ||
pin: number; | ||
}) => Promise<true | null>; | ||
}; | ||
}>; | ||
export type DrenoClient = Awaited<ReturnType<typeof createDrenoClient>>; | ||
export type GeneratedVolatileHash = { | ||
hash: string; | ||
targetOption: number; | ||
options: number[]; | ||
identities: { | ||
type: string; | ||
value: string; | ||
}[]; | ||
}; | ||
export type GeneratedVolatilePin = { | ||
pin: number; | ||
identities: { | ||
type: string; | ||
value: string; | ||
}[]; | ||
}; | ||
export {}; |
@@ -15,6 +15,6 @@ import { type Output } from 'valibot'; | ||
}, { | ||
name: string; | ||
id: string; | ||
type: "personal" | "business"; | ||
createdAt: Date; | ||
name: string; | ||
updatedAt: Date; | ||
@@ -21,0 +21,0 @@ ownerId: string; |
@@ -15,6 +15,6 @@ import { type Output } from 'valibot'; | ||
}, { | ||
name: string; | ||
id: string; | ||
type: "personal" | "business"; | ||
createdAt: Date; | ||
name: string; | ||
status: "active" | "suspended" | "deleted"; | ||
@@ -43,5 +43,5 @@ updatedAt: Date; | ||
}, { | ||
name: string; | ||
id: string; | ||
createdAt: Date; | ||
name: string; | ||
status: "active" | "suspended" | "deleted"; | ||
@@ -48,0 +48,0 @@ updatedAt: Date; |
@@ -14,5 +14,5 @@ import { type Output } from 'valibot'; | ||
}, { | ||
name: string; | ||
id: string; | ||
createdAt: Date; | ||
name: string; | ||
status: "active" | "suspended" | "deleted" | "banished"; | ||
@@ -19,0 +19,0 @@ updatedAt: Date; |
{ | ||
"name": "@fluido/dreno-core", | ||
"version": "0.3.2-alpha", | ||
"version": "0.4.0-alpha", | ||
"description": "Dreno library", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
57618
22
1624
22