pih_tenant v1.0.3
tenant_api
TenantApi - JavaScript client for tenant_api SDK for Tenant Services This SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Package version: 1.0.0
- Generator version: 7.7.0
- 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 tenant_api --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 tenant_api from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
Finally, you need to build the module:
npm run build
git
If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:
npm install GIT_USER_ID/GIT_REPO_ID --save
For browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Getting Started
Please follow the installation instruction and execute the following JS code:
var TenantApi = require('tenant_api');
var defaultClient = TenantApi.ApiClient.instance;
// Configure API key authorization: scopeHeader
var scopeHeader = defaultClient.authentications['scopeHeader'];
scopeHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//scopeHeader.apiKeyPrefix['scope'] = "Token"
// Configure API key authorization: appIdHeader
var appIdHeader = defaultClient.authentications['appIdHeader'];
appIdHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//appIdHeader.apiKeyPrefix['app-id'] = "Token"
// Configure Bearer access token for authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
var api = new TenantApi.DefaultApi()
var createSSFDOcRequest = new TenantApi.CreateSSFDOcRequest(); // {CreateSSFDOcRequest}
api.createSSFDOc(createSSFDOcRequest).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://powersignapiqa.powermindinc.com
Class | Method | HTTP request | Description |
---|---|---|---|
TenantApi.DefaultApi | createSSFDOc | POST /cruddoc/document/v1/ssfdocumentinfo/details/create | Create a document |
TenantApi.DefaultApi | loginUser | POST /customer/user/v1/login/authorise | Authorize user |
TenantApi.DefaultApi | uploadFile | POST /uploadfile/file/v1/uploadfile/create | Upload a file |
Documentation for Models
- TenantApi.CreateSSFDOc200Response
- TenantApi.CreateSSFDOc200ResponseData
- TenantApi.CreateSSFDOc400Response
- TenantApi.CreateSSFDOc401Response
- TenantApi.CreateSSFDOcRequest
- TenantApi.CreateSSFDOcRequestApproversInner
- TenantApi.CreateSSFDOcRequestInitiator
- TenantApi.LoginUser200Response
- TenantApi.LoginUser200ResponseData
- TenantApi.LoginUserRequest
- TenantApi.UploadFile200Response
- TenantApi.UploadFile200ResponseFilesInner
Documentation for Authorization
Authentication schemes defined for the API:
appIdHeader
- Type: API key
- API key parameter name: app-id
- Location: HTTP header
xValueHeader
- Type: API key
- API key parameter name: x-value
- Location: HTTP header
scopeHeader
- Type: API key
- API key parameter name: scope
- Location: HTTP header
bearerAuth
- Type: Bearer authentication