# Overview

![](https://raw.githubusercontent.com/ChuckJonas/ts-force/master/logo.svg?sanitize=true)

`ts-force` is an "opinionated" client for the Salesforce REST API, which uses code generation to bring type safety to `SObjects`. It runs in both the browser and nodejs.

The **MISSION** of this project is to:

1. Create the BEST possible developer experience for working with the salesforce REST API by:
   * Providing types for `SObjects` that are resilient to schema changes
   * Mapping SF API names to standard js conventions
   * Make constructing SOQL queries as easy and fool-proof as possible. [See Demo](https://stackblitz.com/edit/ts-force-query-playground)
   * Provide "Quality of Life" features by abstracting away some of the more tedious parts of working with the REST API (EG: `queryMore`, translating `multi-select picklist` to arrays, standardize error handling, etc)
2. Maintain acceptable performance & reliability

**This repository contains two packages:**

* [![alt text](https://img.shields.io/npm/v/ts-force.svg?label=ts-force)](https://www.npmjs.com/package/ts-force): The runtime library for working with the REST API
* [![alt text](https://img.shields.io/npm/v/ts-force-gen.svg?label=ts-force-gen)](https://www.npmjs.com/package/ts-force-gen): A development CLI tool for generating SObject classes


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ts-force.gitbook.io/ts-force/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
