Skip to content

Commit

Permalink
docs: tidy up docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Hinchley committed Jun 12, 2018
1 parent 7bd0aef commit b4a3b64
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
3 changes: 3 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export const withEndpoint = (endpoint: string) => (client: Client) => {
client.endpoint = endpoint;
};

/**
* @hidden
*/
const defaultEndpoint = "https://jsonapi.sajari.net";

/**
Expand Down
3 changes: 3 additions & 0 deletions src/constructors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ export const newAggregates = (aggregateProto: any = {}): AggregateResponse =>
return agg;
}, {});

/**
* @hidden
*/
export const tokenURL = "https://www.sajari.com/token/";

/**
Expand Down
5 changes: 4 additions & 1 deletion src/lib/request.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/** HTTP_STATUS_OK defines a constant for the http OK status. */
/**
* HTTP_STATUS_OK defines a constant for the http OK status.
* @hidden
*/
const HTTP_STATUS_OK: number = 200;

export enum TransportError {
Expand Down
5 changes: 4 additions & 1 deletion src/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import { Response } from "./results";
import { Session } from "./session";
import { Values } from "./types";

/**
* @hidden
*/
const UserAgent = "sdk-js-1.0.0";

/**
Expand All @@ -23,7 +26,7 @@ export interface Pipeline {
* Search runs a search query defined by a pipeline with the given values and
* session configuration. The callback is executed with the query results and
* any values that have been modified/created by the pipeline. If an error
* occurs this will be passed to the callback as a [[ResultError]].
* occurs this will be passed to the callback as a [[RequestError]].
*
* ```javascript
* pipeline.search({ q: "<search query>" }, session, (error, results, values) => {
Expand Down
11 changes: 7 additions & 4 deletions src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { Values } from "./types";

/**
/**
* Tracking defines behaviour for handling search sessions and result interactions.
*/
export interface Tracking {
Expand Down Expand Up @@ -42,7 +42,7 @@ export interface Session {
reset(): void;
}

/** TrackingType defines the possible result-interaction tracking types used by [[BaseSession]] */
/** TrackingType defines the possible result-interaction tracking types used by [[DefaultSession]] */
export enum TrackingType {
/** None disables tracking. */
None = "NONE",
Expand All @@ -55,7 +55,7 @@ export enum TrackingType {
/**
* InteractiveSession creates a session based on text searches and is recommended
* for use in search-as-you-type style interfaces.
*
*
* It resets the session if the search query value:
*
* - Is `undefined`.
Expand Down Expand Up @@ -147,7 +147,10 @@ export class DefaultSession implements Session {
}
}

/** newQueryID constructs a new ID for a query. */
/**
* newQueryID constructs a new ID for a query.
* @hidden
*/
const newQueryID = (): string => {
let queryID = "";
for (let i = 0; i < 16; i++) {
Expand Down

0 comments on commit b4a3b64

Please sign in to comment.