Skip to content

Commit

Permalink
Commit latest build
Browse files Browse the repository at this point in the history
  • Loading branch information
ptpaterson authored and cleve-fauna committed Feb 23, 2023
1 parent d99900d commit 5915824
Show file tree
Hide file tree
Showing 7 changed files with 167 additions and 14,294 deletions.
3 changes: 1 addition & 2 deletions lib/browser/index.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions lib/browser/index.js.map

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions lib/client.d.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import { AxiosInstance } from "axios";
import { ClientConfiguration } from "./client-configuration";
import type { QueryBuilder } from "./query-builder";
import { type QueryRequest, type QueryRequestHeaders, type QuerySuccess } from "./wire-protocol";
import { type HTTPClient } from "./http-client";
/**
* Client for calling Fauna.
*/
export declare class Client {
#private;
/** The underlying {@link AxiosInstance} client. */
readonly client: AxiosInstance;
/** The underlying {@link HTTPClient} client. */
readonly client: HTTPClient;
/**
* Constructs a new {@link Client}.
* @param clientConfiguration - the {@link ClientConfiguration} to apply.
* @param client - The underlying {@link HTTPClient} that will execute the actual HTTP calls.
* @example
* ```typescript
* const myClient = new Client(
Expand All @@ -24,7 +25,7 @@ export declare class Client {
* );
* ```
*/
constructor(clientConfiguration?: Partial<ClientConfiguration>);
constructor(clientConfiguration?: Partial<ClientConfiguration>, client?: HTTPClient);
/**
* @returns the last transaction time seen by this client, or undefined if this client has not seen a transaction time.
*/
Expand Down
4 changes: 3 additions & 1 deletion lib/http-client/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { QueryRequest } from "../wire-protocol";
import { FetchClient } from "./fetch-client";
export { FetchClient } from "./fetch-client";
/**
* An object representing an http request.
* The {@link Client} provides this to the {@link HTTPClient} implementation.
*/
export declare type HTTPRequest = {
data: QueryRequest;
headers: Record<string, string | string[]>;
headers: Record<string, string>;
method: string;
url: string;
};
Expand All @@ -32,4 +33,5 @@ export interface HTTPClient {
*/
request(req: HTTPRequest): Promise<HTTPResponse>;
}
export declare const getDefaultHTTPClient: () => FetchClient;
export declare const isHTTPResponse: (res: any) => res is HTTPResponse;
Loading

0 comments on commit 5915824

Please sign in to comment.