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

remote.it

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remote.it - npm Package Compare versions

Comparing version 0.41.0 to 0.42.0

21

lib/remote.it.d.ts

@@ -71,18 +71,6 @@ import { AxiosError } from 'axios'

list(): Promise<IContact[]>
create(contact: INewContact): Promise<IContact>
update(contact: IContact): Promise<IContact>
create(contact: IContact): Promise<IContact>
invite(contact: IContact): Promise<IContact>
destroy(contactID: string): Promise<any>
_format(c: IRawContact): IContact
_formatUpdate(c: {
accountcreated: string
companyname: string
created?: string | undefined
email: string
firstname: string
lastname: string
id: string
language: string
updated: string
}): IContact
}

@@ -411,9 +399,2 @@ products: {

}
export interface INewContact {
companyName?: string
email: string
firstName?: string
lastName?: string
language?: string
}
export interface IContact {

@@ -420,0 +401,0 @@ accountCreated: boolean

42

lib/remote.it.js

@@ -688,6 +688,12 @@ "use strict";

return [2 /*return*/, r3
.post('/developer/customer/', contact)
.post('/developer/customer/', {
email: contact.email,
firstname: contact.firstName,
lastname: contact.lastName,
language: contact.language,
companyname: contact.companyName,
})
.then(function (_a) {
var contact = _a.contact;
return r3.contacts._formatUpdate(contact);
var id = _a.id;
return id;
})];

@@ -697,14 +703,3 @@ });

},
update: function (contact) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, r3
.post('/developer/customer/', contact)
.then(function (_a) {
var contact = _a.contact;
return r3.contacts._formatUpdate(contact);
})];
});
});
},
// .then(({ contact }) => r3.contacts._format(customer))
invite: function (contact) {

@@ -744,19 +739,2 @@ return __awaiter(this, void 0, void 0, function () {

},
_formatUpdate: function (c) {
return {
accountCreated: c.accountcreated != undefined && c.accountcreated === 'yes',
companyName: c.companyname || '',
createdAt: c.created !== '' && c.created !== undefined
? new Date(c.created)
: new Date(),
email: c.email,
firstName: c.firstname,
id: c.id,
language: c.language || 'en',
lastName: c.lastname,
updatedAt: c.updated !== '' && c.updated !== undefined
? new Date(c.updated)
: new Date(),
};
},
}, products: {

@@ -763,0 +741,0 @@ list: function () {

{
"name": "remote.it",
"version": "0.41.0",
"version": "0.42.0",
"description": "remote.it JavaScript/node client library",

@@ -8,16 +8,16 @@ "main": "lib/remote.it.js",

"scripts": {
"build": "tsc",
"compile": "tsc",
"clean": "rimraf lib/*",
"lint": "tslint --fix --project .",
"postbuild": "npm-run-all -p prettier lint size",
"postpublish": "git push origin --all; git push origin --tags",
"postversion": "npm publish",
"prebuild": "npm run clean",
"prepack": "npm run build",
"postcompile": "npm-run-all -p prettier lint size",
"postpublish": "#git push origin --all; git push origin --tags",
"postversion": "#npm publish",
"precompile": "npm run clean",
"prepack": "npm run compile",
"prettier": "prettier --write **/*.ts",
"preversion": "npm run build",
"preversion": "npm run compile",
"size": "size-limit",
"start": "npm-run-all -p watch-*",
"test": "jest",
"watch-build": "tsc -w",
"watch-compile": "tsc -w",
"watch-tests": "jest --watch"

@@ -24,0 +24,0 @@ },

import axios, { AxiosError, AxiosResponse } from 'axios'
import { groupBy, parseLegacyDate, pickBy, toNumber } from './utils'
import { updateExpression } from '@babel/types'

@@ -532,12 +531,14 @@ const defaults = {

},
async create(contact: INewContact): Promise<IContact> {
async create(contact: IContact): Promise<IContact> {
return r3
.post('/developer/customer/', contact)
.then(({ contact }) => r3.contacts._formatUpdate(contact))
.post('/developer/customer/', {
email: contact.email,
firstname: contact.firstName,
lastname: contact.lastName,
language: contact.language,
companyname: contact.companyName,
})
.then(({ id }) => id)
},
async update(contact: IContact): Promise<IContact> {
return r3
.post('/developer/customer/', contact)
.then(({ contact }) => r3.contacts._formatUpdate(contact))
},
// .then(({ contact }) => r3.contacts._format(customer))
async invite(contact: IContact): Promise<IContact> {

@@ -569,32 +570,2 @@ return r3

},
_formatUpdate(c: {
accountcreated: string
companyname: string
created?: string
email: string
firstname: string
lastname: string
id: string
language: string
updated: string
}): IContact {
return {
accountCreated:
c.accountcreated != undefined && c.accountcreated === 'yes',
companyName: c.companyname || '',
createdAt:
c.created !== '' && c.created !== undefined
? new Date(c.created)
: new Date(),
email: c.email,
firstName: c.firstname,
id: c.id,
language: c.language || 'en',
lastName: c.lastname,
updatedAt:
c.updated !== '' && c.updated !== undefined
? new Date(c.updated)
: new Date(),
}
},
},

@@ -1108,9 +1079,3 @@ products: {

}
export interface INewContact {
companyName?: string
email: string
firstName?: string
lastName?: string
language?: string
}
export interface IContact {

@@ -1117,0 +1082,0 @@ accountCreated: boolean

@@ -5,9 +5,6 @@ {

"outDir": "./lib",
"downlevelIteration": true,
"lib": ["es2018", "dom", "dom.iterable", "esnext"],
"sourceMap": true,
"target": "es5"
"downlevelIteration": true
},
"include": ["src"],
"exclude": ["node_modules", "lib"]
"exclude": ["node_modules", "lib", "test", "examples"]
}

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