index
frappe-js-client — a zero-dependency, fetch-native TypeScript client for Frappe Framework REST APIs (v14, v15, v16).
This entry point is the core tier: client creation, auth, db, file, call, search. For
permission, workflow, report, desk, and site, import from
frappe-js-client/extended.
Example
import { createFrappeClient, tokenAuth } from 'frappe-js-client'
const frappe = createFrappeClient({
url: 'https://frappe.example.com',
auth: tokenAuth({ apiKey: '...', apiSecret: '...' }),
})
const users = await frappe.db.getDocList('User', { fields: ['name', 'email'], limit: 20 })
Classes
- AuthenticationError
- CancelledError
- ConfigurationError
- CsrfError
- DuplicateEntryError
- FeatureNotSupportedError
- FrappeError
- NotFoundError
- PermissionError
- RateLimitError
- ResponseError
- ServerError
- TimeoutError
- TransportError
- ValidationError
Interfaces
- AuthResponse
- AuthStrategy
- BearerAuthOptions
- BulkUpdateResponse
- Capabilities
- CookieRecord
- FileDoc
- FrappeClient
- FrappeClientConfig
- FrappeClientOptions
- FrappeErrorInit
- FrappeLogEvent
- FrappeLogger
- FrappeRequestContext
- FrappeRequestInfo
- FrappeV2ErrorEntry
- GetCountArgs
- GetDocArgs
- GetDocListArgs
- GetDocListPage
- GetLastDocArgs
- GetValueArgs
- HttpErrorSource
- LinkSearchResult
- OAuthAuthOptions
- OTPCredentials
- RequestOptions
- RunMethodArgs
- SearchLinkArgs
- SearchWidgetArgs
- ServerMessage
- TokenAuthOptions
- Transport
- TransportRequest
- TransportResponse
- UploadOptions
- UploadProgressEvent
- UserPassCredentials
Type Aliases
- ApiArgs
- ApiVersion
- AuthCredentials
- DocFromMap
- FieldName
- FieldsArg
- FileArgs
- Filter
- FilterVar
- FrappeAuth
- FrappeCall
- FrappeDB
- FrappeDoc
- FrappeDocMetaKeys
- FrappeFile
- FrappeInsert
- FrappeSearch
- FrappeUploadInput
- FrappeVersion
- Link
- MultiValueFilter
- MultiValueFilterOperator
- ResponseType
- RowFor
- SingleValueFilter
- SingleValueFilterOperator
- Value
Functions
- anonymousAuth
- bearerAuth
- consoleLogger
- cookieAuth
- createFrappeClient
- formatFrappeDate
- formatFrappeDatetime
- isHttpOk
- mapNetworkError
- mapServerError
- oauthAuth
- parseServerMessages
- serverErrorFor
- tokenAuth
References
FrappeRequest
Re-exports FrappeRequest
FrappeResponse
Re-exports FrappeResponse
Middleware
Re-exports Middleware
NextFn
Re-exports NextFn