Renovation
Search…
Getting started

Installation

Renovation is available as an npm package and can be installed using:
1
npm i --save @leam-tech/renovation-core
Copied!
If you feel edgy or live dangerously, use the cutting-edge features of Renovation, it can be installed using @leam-tech/[email protected].

Initialization

After the installation of the package, you can initialize by calling the .init().

Input

property
type
required
description
hostUrl
string
yes
The URL to the bench site.
backend
RenovationBackend
no
The type of backend to be used. Defaults to "firebase".
clientId
string
no
The client ID used for Nginx
disableLog
boolean
no
Whether to show the logs in the console. Defaults to false.

Usage

1
import { Renovation } from "./renovation";
2
​
3
const renovation = new Renovation();
4
const backend = "frappe";
5
const hostURL = "https://test-site.abc.com";
6
​
7
(async () => await renovation.init(backend, hostURL, "test-site"))();
8
​
9
// Start using Renovation Core....
10
​
11
renovation.auth
12
.login({
13
14
password: "mostcomplexpassword"
15
})
16
.then(response => console.log(response));
17
​
18
// .....
Copied!

Things to Know

​RequestResponse​

Across the SDK, functions will almost always return a RequestResponse object as a Promise. The structure of the class is explained below.

Properties

property
type
required
httpCode
number
yes
success
boolean
yes
data
T (Generics)
yes
exc
RenovationError
no
error
ErrorDetail
no
Unless mentioned, all returns from the methods are enclosed within <Promise<RequestResponse<T>> where T is a the return type. If the Output is not as <Promise<RequestResponse<T>>>, the Output will be marked with an asterisk (*) which means the stated Output is the actual return type.
For example, RenovationDocument
RenovationDocument
This mean that the return is actually <Promise<RequestResponse<RenovationDocument>>>

Featured Methods

There are some methods that are either completely or partially dependent on a custom frappe app (renovation_core). When using a method/feature that requires a custom app, an error will be thrown in case the app is not installed in your site. For example:
1
Error: The app "renovation_core" is not installed in the backend.
2
Please install it to be able to use the feature(s):
3
​
4
withLinkFields
5
tableFields
Copied!
Throughout the guide, there will be indications when a method is completely or partially dependent on a custom frappe app.
Completely dependent: β˜…
Partially dependent: β˜†
By default, if there are no indications, it means the method is independent of a custom frappe app.In other words, it supports Vanilla FrappΓ©.

​API Documentation​

Last modified 1yr ago