0.1.37 • Published 7 months ago

@types/firebase-client v0.1.37

Weekly downloads
47
License
MIT
Repository
github
Last release
7 months ago

Installation

npm install --save @types/firebase-client

Summary

This package contains type definitions for Firebase Client (https://www.github.com/jpstevens/firebase-client).

Details

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

index.d.ts

// Type definitions for Firebase Client 0.1.0
// Project: https://www.github.com/jpstevens/firebase-client
// Definitions by: DefinitelyTyped <https://github.com/DefinitelyTyped>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

import * as Q from "q";

interface PushResponse {
    /**
     * Name ref (key) of the child resource
     */
    name : string;
}

interface FirebaseConfig {
    /**
     * path for the Firebase instance
     */
    url : string;

    /**
     * Token for authorisation
     */
    auth: string;
}

interface FirebaseClient {
    /**
     * Creates a new FirebaseClient given the provided configuration
     */
    new (config : FirebaseConfig) : FirebaseClient;

    /**
     * Retrieves all objects at the base path
     */
    get<T>() : Q.Promise<T>;

    /**
     * Retrieves an object
     * @param path Relative path from the base for the resource
     */
    get<T>(path : string) : Q.Promise<T>;

    /**
     * Returns a promise of the HTTP response from setting the value at the given path
     * @param path Relative path from the base for the resource
     * @param data Data to be set as the value for the given path
     */
    set<T>(path : string, data : T) : Q.Promise<T>;

    /**
     * Update a node at a given path
     * @param path Relative path from the base for the resource
     * @param value Value of the response
     */
    update<T>(path : string, value : T) : Q.Promise<T>;

    /**
     * Deletes the resource at a given path
     * @param path Relative path from the base for the resource
     */
    delete(path : string) :  Q.Promise<void>;

    /**
     * @param path Relative path from the base for the resource
     * @param value Object to push to the path
     */
    push<T>(path : string, value : T) : Q.Promise<PushResponse>;
}

declare var FirebaseClient: FirebaseClient;

export = FirebaseClient;
export as namespace FirebaseClient;

Additional Details

  • Last updated: Thu, 23 Dec 2021 23:34:38 GMT
  • Dependencies: @types/q
  • Global values: FirebaseClient

Credits

These definitions were written by DefinitelyTyped.

0.1.35

8 months ago

0.1.36

7 months ago

0.1.37

7 months ago

0.1.34

2 years ago

0.1.33

4 years ago

0.1.32

7 years ago

0.1.31

7 years ago

0.1.30

7 years ago

0.1.29

8 years ago

0.1.28

8 years ago

0.1.27-alpha

8 years ago

0.1.25-alpha

8 years ago

0.1.24-alpha

8 years ago

0.1.23-alpha

8 years ago

0.1.22-alpha

8 years ago

0.1.21-alpha

8 years ago

0.1.20-alpha

8 years ago

0.1.15-alpha

8 years ago

0.1.14-alpha

8 years ago