Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@liftitapp/lms-http-client

Package Overview
Dependencies
Maintainers
5
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@liftitapp/lms-http-client - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

lib/models/country.d.ts

3

lib/class/apiSecurityDocument.d.ts
import { ApiResponse } from 'apisauce';
import { ReasonType } from '../models/reasonType';
import { ApiOPtions } from '../service';
import { IGetDocumentsRejectionReasonsParams } from '../types';
export declare class ApiSecurityDocument {

@@ -8,3 +10,4 @@ private options;

getSecurityDocuments(authorization: string, userProspectId: number): Promise<ApiResponse<any, any>>;
getDocumentsRejectionReasons(authorization: string, paramsObject: IGetDocumentsRejectionReasonsParams): Promise<ApiResponse<ReasonType[], any>>;
}
//# sourceMappingURL=apiSecurityDocument.d.ts.map

@@ -10,4 +10,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

};
import { isNonEmptyArray } from 'ramda-adjunct';
import { deserialize } from 'typescript-json-serializer';
import { SecurityCategory, ApiError } from '../models';
import { ReasonType } from '../models/reasonType';
import { Api } from '../service';

@@ -40,2 +42,20 @@ export class ApiSecurityDocument {

}
getDocumentsRejectionReasons(authorization, paramsObject) {
return __awaiter(this, void 0, void 0, function* () {
try {
const response = yield this.api.getDocumentsRejectionReasons(authorization, paramsObject);
if (response.ok) {
const itemsList = isNonEmptyArray(response.data) ? response.data : [];
response.data = itemsList.map(item => deserialize(item, ReasonType));
}
else {
response.data = deserialize(response.data.error, ApiError);
}
return response;
}
catch (error) {
throw error;
}
});
}
}

@@ -15,2 +15,3 @@ export { AdditionalData } from './additionalData';

export { SecurityCategory } from './securityCategory';
export { ReasonType } from './reasonType';
//# sourceMappingURL=index.d.ts.map

@@ -15,1 +15,2 @@ export { AdditionalData } from './additionalData';

export { SecurityCategory } from './securityCategory';
export { ReasonType } from './reasonType';

@@ -0,1 +1,2 @@

import { IGetDocumentsRejectionReasonsParams } from '../types';
import { ApiOPtions } from './';

@@ -7,4 +8,5 @@ export declare class Api {

getSecurityDocuments: (authorization: string, userProspectId: number) => any;
getDocumentsRejectionReasons: (authorization: string, paramsObject: IGetDocumentsRejectionReasonsParams) => any;
private _setHeaders;
}
//# sourceMappingURL=api.d.ts.map
import apisauce from 'apisauce';
import getQueryParamsString from '../utils/getQueryParamsString';
export class Api {

@@ -14,2 +15,7 @@ constructor(options) {

this.getSecurityDocuments = (authorization, userProspectId) => this.api.get(`/onboarding/document_list/security?user_prospect_id=${userProspectId}`, {}, this._setHeaders(authorization));
this.getDocumentsRejectionReasons = (authorization, paramsObject) => {
const paramsString = getQueryParamsString(paramsObject);
const url = `/onboarding/reason_types/rejection${paramsString}`;
return this.api.get(url, {}, this._setHeaders(authorization));
};
this._setHeaders = (authorization) => {

@@ -16,0 +22,0 @@ return {

19

package.json
{
"name": "@liftitapp/lms-http-client",
"version": "1.1.0",
"version": "1.1.1",
"description": "Client http library for mf modules",

@@ -12,6 +12,6 @@ "main": "lib/index.js",

"prepare": "npm run build",
"prepublishOnly" : "npm run lint",
"preversion" : "npm run lint",
"version" : "npm run format && git add -A src",
"postversion" : "git push && git push --tags"
"prepublishOnly": "npm run lint",
"preversion": "npm run lint",
"version": "npm run format && git add -A src",
"postversion": "git push && git push --tags"
},

@@ -22,6 +22,10 @@ "repository": {

},
"keywords": ["lms-http-client"],
"keywords": [
"lms-http-client"
],
"author": "Liftit",
"license": "ISC",
"devDependencies": {
"@types/query-string": "^5.1.0",
"@types/ramda": "^0.27.32",
"prettier": "^2.1.2",

@@ -35,2 +39,5 @@ "tslint": "^6.1.3",

"apisauce": "^2.0.0",
"query-string": "^5.1.1",
"ramda": "^0.27.1",
"ramda-adjunct": "^2.28.0",
"typescript-json-serializer": "^2.5.0"

@@ -37,0 +44,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc