Getting Started

Basics

Query Modifiers

.where() .sort()

Query Predicates

.equals() .notEquals() .exists() .notExists() .startsWith() .endsWith() .contains() .greaterThan() .lessThan() .between() .outside()

Query Executors

.read() .first() .last() .count() .sum() .average() .min() .max() .update() .delete()

Login Methods

.exists() .login() .logout()

Instance Methods

.read() .delete()

Instance Login Methods

.login() .logout() .changePassword()

Misc

Back.then() Back.saved() Back.user() Back.eachProperty() Back.eachDescendant() IFile Property LoginResult

LoginResult Options

A series of constants that are sent back in the callback functions of the .login() methods that indicate the outcome of the login operation.

Employees.login("employee@company.com", "password", (result, employee) =>
{
	if (result === Back.LoginResult.invalidPassword)
		alert("Invalid password");
	
	// Check for other outcomes here.
	
	alert("Login successful");
});

Enumeration signature (TypeScript)

enum LoginResult
{
	success,
	
	/**
	Sent back to the .login() method when the user name does not exist,
	or when attempting to refresh the authenticated user, but the there
	is no authenticated user information in memory.
	*///
	unknownUser,
	
	/** Sent back to the .login() method when an invalid password is entered. *///
	invalidPassword,
	
	/**
	Sent back to the.login() method when the type on which the .login() method
	was called doesn't match the type authorized via an email inbox link.
	*///
	invalidUseOfLink,
	
	/** Sent back when trying to login from an email inbox with an expired link. *///
	expiredLink,
	
	/**
	Sent back when trying to login from an email inbox,
	and the the host name used in the URL is not defined
	as one of the trusted hosts.
	*///
	untrustedHostUsed
}