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

rest-client-sdk

Package Overview
Dependencies
Maintainers
4
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rest-client-sdk - npm Package Compare versions

Comparing version 6.1.0 to 6.2.0

6

CHANGELOG.md
# Changelog
## 6.2.0
### Changed
- [TypeScript] better handle deserializeResponse method definition
## 6.1.0

@@ -4,0 +10,0 @@

3

dist/types/client/AbstractClient.d.ts

@@ -64,3 +64,4 @@ import URI from 'urijs';

delete(entity: D['entity'], requestParams?: {}): Promise<Response>;
deserializeResponse<LOR extends 'list' | 'item'>(requestPromise: Promise<Response>, listOrItem: LOR): Promise<D['entity'] | D['list']>;
deserializeResponse(requestPromise: Promise<Response>, listOrItem: 'list'): Promise<D['list']>;
deserializeResponse(requestPromise: Promise<Response>, listOrItem: 'item'): Promise<D['entity']>;
makeUri(input: string | URI): URI;

@@ -67,0 +68,0 @@ authorizedFetch(input: string | URI, requestParams?: {}): Promise<Response>;

{
"name": "rest-client-sdk",
"version": "6.1.0",
"version": "6.2.0",
"description": "Rest Client SDK for API",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -221,7 +221,7 @@ # Mapado Rest Client JS SDK [![Build Status](https://travis-ci.org/mapado/rest-client-js-sdk.svg?branch=master)](https://travis-ci.org/mapado/rest-client-js-sdk)

class SomeEntityClient extends AbstractClient<TSMetadata['some_entities']> {
getPathBase(pathParameters: object) {
getPathBase(pathParameters: object): string {
return '/v2/some_entities'; // you need to return the full query string for the collection GET query
}
getEntityURI(entity: SomeEntity) {
getEntityURI(entity: SomeEntity): string {
return `${this.getPathBase()}/${entity.id}`; // this will be the URI used by update / delete script

@@ -228,0 +228,0 @@ }

@@ -81,3 +81,3 @@ import URI from 'urijs';

'item'
) as Promise<D['entity']>;
);
}

@@ -102,3 +102,3 @@

'list'
) as Promise<D['list']>;
);
}

@@ -157,3 +157,3 @@

'item'
) as Promise<D['entity']>;
);
}

@@ -202,3 +202,3 @@

'item'
) as Promise<D['entity']>;
);
}

@@ -228,2 +228,12 @@

deserializeResponse(
requestPromise: Promise<Response>,
listOrItem: 'list'
): Promise<D['list']>;
deserializeResponse(
requestPromise: Promise<Response>,
listOrItem: 'item'
): Promise<D['entity']>;
deserializeResponse<LOR extends 'list' | 'item'>(

@@ -230,0 +240,0 @@ requestPromise: Promise<Response>,

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