fw-form-builder
v0.0.0-27
Published
FormBuilder_API
Downloads
5
Keywords
Readme
fw-form-builder
FwFormBuilder - JavaScript client for fw-form-builder FormBuilder API This SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Package version: 0.0.0-10
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
Installation
For Node.js
npm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install fw-form-builder --save
Finally, you need to build the module:
npm run build
Local development
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json
(and this README). Let's call this JAVASCRIPT_CLIENT_DIR
. Then run:
npm install
Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR
:
npm link
To use the link you just defined in your project, switch to the directory you want to use your fw-form-builder from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
Finally, you need to build the module:
npm run build
Client Initialization:
To start using the sync SDK the client must be initialised. The client initialisation requires the following:
The Server domain. The domain varies depending on whether the app is for staging or prod.
- Staging: http://localhost
- Prod: TBD
The product in which the app is created. This can take the following values:
- FRESHDESK
- FRESHSALES
- FRESHTEAM
- FRESHSERVICE
The account_id of the account in which the app is installed.
const FwFormBuilder = require('fw-form-builder');
FwFormBuilder.ApiClient.instance.setBasePath('http://localhost')
FwFormBuilder.ApiClient.instance.setProduct('FRESHDESK');
FwFormBuilder.ApiClient.instance.setAccountId(payload.account_id);
Getting Started
Please follow the installation and [initialization](#client initialization) instruction and execute the following JS code:
const FwFormBuilder = require('fw-form-builder');
var api = new FwFormBuilder.ConfigsApi()
api.getConfig().then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Documentation for API Endpoints
All URIs are relative to https://localhost
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- FwFormBuilder.ConfigsApi | getConfig | GET /configs | Fetch configs for the account FwFormBuilder.ConfigsApi | saveConfig | POST /configs | Store configs for an app FwFormBuilder.FormApi | createForm | POST /forms | Create Form FwFormBuilder.FormApi | deleteForm | DELETE /forms/{uuid} | Delete a form FwFormBuilder.FormApi | getForm | GET /forms/{uuid} | Fetch details of a Form FwFormBuilder.FormApi | getForms | GET /forms | Fetch list of forms for the account FwFormBuilder.FormApi | updateForm | PUT /forms/{uuid} | Upadte details of a Form FwFormBuilder.RatingCountsResponseApi | getRatingCountsForForm | GET /forms/{uuid}/ratings | Fetch ratings count for a form FwFormBuilder.ResponseApi | getAllResponses | GET /forms/{uuid}/responses | Fetch all responses for a form FwFormBuilder.ResponseApi | getResponseCount | POST /forms/{uuid}/responses/count | Get response count for form FwFormBuilder.ResponseApi | saveResponse | POST /forms/{uuid}/responses | Add a response for a form FwFormBuilder.ResponseApi | searchResponse | POST /forms/{uuid}/responses/search | searchResponse FwFormBuilder.ResponseApi | sendMessage | POST /messages | sendMessage FwFormBuilder.ScheduleApi | scheduleSurvey | POST /forms/{uuid}/schedules | Create a survey schedule for a form
Documentation for Models
- FwFormBuilder.ChannelRequest
- FwFormBuilder.Error
- FwFormBuilder.Form
- FwFormBuilder.FormQueryResponse
- FwFormBuilder.InlineResponse200
- FwFormBuilder.RecordCount
- FwFormBuilder.SurveyScheduleRequest
- FwFormBuilder.SurveyScheduleResponse
- FwFormBuilder.User
Documentation for Authorization
All endpoints do not require authorization.