Kysoql
API reference

REST API reference

Generated API reference for the native Salesforce REST client, executor, pagination, OAuth compatibility, and errors in @kysoql/rest.

Functions

FunctionDescription
createRestClientCreates an authenticated Salesforce REST client with optional token refresh retry.
createRestExecutorCreates a Kysoql query executor around a RestClient.
authenticateClientCredentialsOne token exchange. Configure the OAuth application in Salesforce first.
refreshAccessTokenOne refresh exchange. Interactive authorisation and secure token storage stay in the application.

Classes

ClassDescription
SalesforceOAuthErrorThrown when a Salesforce OAuth token request fails.
SalesforceQueryLimitErrorThrown when configured pagination limits are exceeded before a query completes.
SalesforceResponseErrorThrown when Salesforce returns a response that cannot be validated.
SalesforceRestErrorStructured API errors. Details may contain org data; do not log them blindly.

Interfaces

InterfaceDescription
RestClientMinimal authenticated Salesforce REST client used by the query executor.
RestClientOptionsConnection, authentication, and transport options for the Salesforce REST client.
RestGetOptionsOptions for one authenticated Salesforce REST GET request.
SalesforceRestErrorDetailStructured error detail returned by Salesforce REST endpoints.
RestExecutorQuery executor backed by the Salesforce REST API.
RestPaginationOptionsSafety limits applied while following Salesforce query pagination.
RestQueryOptionsExecution options for a Salesforce REST query.
RestQueryPageValidated page returned by a Salesforce REST query request.
HttpOptionsREST request options plus an injectable fetch implementation.
RestRequestOptionsAbort and timeout options shared by Salesforce REST operations.
ClientCredentialsOptionsOptions for the Salesforce client-credentials grant in the REST package.
RefreshTokenOptionsOptions for the Salesforce refresh-token grant in the REST package.
SalesforceOAuthSessionAccess-token and instance metadata returned by the REST package OAuth helpers.

Type Aliases

Type AliasDescription
AccessTokenProviderProvides a Salesforce access token and can be asked to force a refresh after 401.

Variables

VariableDescription
DEFAULT_API_VERSIONDeliberately pinned, not auto-upgraded when Salesforce publishes a release.

On this page