@or-sdk/contacts
Advanced tools
Comparing version 4.5.18-beta.3078.0 to 4.5.18-beta.3079.0
@@ -29,4 +29,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var utils_1 = require("../utils"); | ||
var baseApi_1 = require("./baseApi"); | ||
var utils_1 = require("../utils"); | ||
var ContactBookApi = (function (_super) { | ||
@@ -55,6 +55,8 @@ __extends(ContactBookApi, _super); | ||
}; | ||
ContactBookApi.prototype.getContactBook = function (id) { | ||
ContactBookApi.prototype.getContactBook = function (id, params) { | ||
if (params === void 0) { params = {}; } | ||
return this.apiCall({ | ||
method: 'GET', | ||
route: "".concat(this.apiBasePath, "/").concat(id), | ||
params: __assign({}, params), | ||
}); | ||
@@ -61,0 +63,0 @@ }; |
@@ -0,3 +1,3 @@ | ||
import { adaptListParams } from '../utils'; | ||
import { BaseApi } from './baseApi'; | ||
import { adaptListParams } from '../utils'; | ||
export default class ContactBookApi extends BaseApi { | ||
@@ -22,6 +22,7 @@ constructor() { | ||
} | ||
getContactBook(id) { | ||
getContactBook(id, params = {}) { | ||
return this.apiCall({ | ||
method: 'GET', | ||
route: `${this.apiBasePath}/${id}`, | ||
params: Object.assign({}, params), | ||
}); | ||
@@ -28,0 +29,0 @@ } |
@@ -1,5 +0,5 @@ | ||
import { ContactBookResponseDto, CreateContactBookDto, UpdateContactBookDto, SharedBookResponseDto, ShareContactBookParamsDto, ContactBookDeleteParamsDto } from '@onereach/types-contacts-api'; | ||
import { ContactBookResponseDto, CreateContactBookDto, UpdateContactBookDto, SharedBookResponseDto, ShareContactBookParamsDto, ContactBookDeleteParamsDto, GetContactBookQueryDto } from '@onereach/types-contacts-api'; | ||
import { List } from '@or-sdk/base'; | ||
import { ContactBookParams } from '../types'; | ||
import { BaseApi } from './baseApi'; | ||
import { ContactBookParams } from '../types'; | ||
import { List } from '@or-sdk/base'; | ||
export default class ContactBookApi extends BaseApi { | ||
@@ -9,3 +9,3 @@ private readonly apiBasePath; | ||
listContactBooks(params?: ContactBookParams): Promise<List<ContactBookResponseDto>>; | ||
getContactBook(id: string): Promise<ContactBookResponseDto>; | ||
getContactBook(id: string, params?: GetContactBookQueryDto): Promise<ContactBookResponseDto>; | ||
updateContactBook(id: string, data: UpdateContactBookDto): Promise<ContactBookResponseDto>; | ||
@@ -12,0 +12,0 @@ deleteContactBook(id: string, data?: ContactBookDeleteParamsDto): Promise<void>; |
{ | ||
"name": "@or-sdk/contacts", | ||
"version": "4.5.18-beta.3078.0", | ||
"version": "4.5.18-beta.3079.0", | ||
"license": "Apache-2.0", | ||
@@ -23,3 +23,3 @@ "main": "dist/cjs/index.js", | ||
"dependencies": { | ||
"@onereach/types-contacts-api": "5.39.6-beta.3748.0", | ||
"@onereach/types-contacts-api": "5.39.6-beta.3749.0", | ||
"@or-sdk/base": "^0.39.2", | ||
@@ -26,0 +26,0 @@ "agentkeepalive": "^4.5.0", |
@@ -8,8 +8,12 @@ import { | ||
ContactBookDeleteParamsDto, | ||
GetContactBookQueryDto, | ||
} from '@onereach/types-contacts-api'; | ||
import { BaseApi } from './baseApi'; | ||
import { List } from '@or-sdk/base'; | ||
import { ContactBookParams } from '../types'; | ||
import { adaptListParams } from '../utils'; | ||
import { List } from '@or-sdk/base'; | ||
import { BaseApi } from './baseApi'; | ||
export default class ContactBookApi extends BaseApi { | ||
@@ -48,7 +52,11 @@ private readonly apiBasePath = 'contact-book'; | ||
* @param id | ||
* @param params | ||
*/ | ||
getContactBook(id: string): Promise<ContactBookResponseDto> { | ||
getContactBook(id: string, params: GetContactBookQueryDto = {}): Promise<ContactBookResponseDto> { | ||
return this.apiCall({ | ||
method: 'GET', | ||
route: `${this.apiBasePath}/${id}`, | ||
params: { | ||
...params, | ||
}, | ||
}); | ||
@@ -55,0 +63,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
422512
6469
+ Added@onereach/types-contacts-api@5.39.6-beta.3749.0(transitive)
- Removed@onereach/types-contacts-api@5.39.6-beta.3748.0(transitive)