2.4.4 • Published 6 months ago

@types/solid-auth-client v2.4.4

Weekly downloads
99
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/solid-auth-client

Summary

This package contains type definitions for solid-auth-client (https://github.com/solid/solid-auth-client#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/solid-auth-client.

index.d.ts

// Type definitions for solid-auth-client 2.4
// Project: https://github.com/solid/solid-auth-client#readme
// Definitions by: Vincent <https://github.com/Vinnl>
//                 James <https://github.com/durandj>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
import { EventEmitter } from 'events';

export interface Session {
    webId: string;
}

export interface AsyncStorage {
    getItem(key: string): Promise<undefined | string>;
    setItem(key: string, value: string): Promise<void>;
    removeItem(key: string): Promise<void>;
}

interface LoginOptions {
    callbackUri?: string | undefined;
    popupUri?: string | undefined;
    storage?: Storage | AsyncStorage | undefined;
}

export interface SolidAuthClient extends EventEmitter {
  fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
  currentSession(storage?: AsyncStorage): Promise<Session | undefined>;
  trackSession(callback: (session?: Session) => void): Promise<void>;
  stopTrackSession(callback: (session?: Session) => void): void;
  login(identityProvider: string, options?: LoginOptions): Promise<void>;
  logout(storage?: AsyncStorage): Promise<void>;
  popupLogin(params?: LoginOptions): Promise<Session>;
}

declare const instantiated: SolidAuthClient;
export default instantiated;

Additional Details

  • Last updated: Tue, 06 Jul 2021 16:35:05 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Vincent, and James.

2.4.3

7 months ago

2.4.2

8 months ago

2.4.4

6 months ago

2.4.1

3 years ago

2.4.0

4 years ago

2.3.1

5 years ago

2.3.0

5 years ago