@or-sdk/contacts 1.0.1-beta.511.0 → 1.0.1-beta.522.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -0
- package/dist/cjs/Contacts.js +8 -7
- package/dist/cjs/Contacts.js.map +1 -1
- package/dist/cjs/constants.js +2 -2
- package/dist/cjs/constants.js.map +1 -1
- package/dist/esm/Contacts.js +9 -8
- package/dist/esm/Contacts.js.map +1 -1
- package/dist/esm/constants.js +1 -1
- package/dist/esm/constants.js.map +1 -1
- package/dist/types/Contacts.d.ts +2 -2
- package/dist/types/Contacts.d.ts.map +1 -1
- package/dist/types/constants.d.ts +1 -1
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/types.d.ts +1 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/Contacts.ts +16 -10
- package/src/constants.ts +1 -1
- package/src/types.ts +4 -0
package/README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Installation:
|
|
2
|
+
```
|
|
3
|
+
$ npm i @or-sdk/contacts
|
|
4
|
+
```
|
|
5
|
+
|
|
6
|
+
## Usage:
|
|
7
|
+
```typescript
|
|
8
|
+
import { Contacts } from '@or-sdk/contacts'
|
|
9
|
+
|
|
10
|
+
// with direct api url
|
|
11
|
+
const contacts = new Contacts({
|
|
12
|
+
token: 'my-account-token-string',
|
|
13
|
+
sdkUrl: 'http://example.account-settings/endpoint'
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
// with service discovery(slower)
|
|
17
|
+
const accountSettings = new Contacts({
|
|
18
|
+
token: 'my-account-token-string',
|
|
19
|
+
discoveryUrl: 'http://example.account-settings/endpoint'
|
|
20
|
+
});
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
[[include:contacts/CHANGELOG.md]]
|
package/dist/cjs/Contacts.js
CHANGED
|
@@ -32,21 +32,22 @@ var constants_1 = require("./constants");
|
|
|
32
32
|
var Contacts = (function (_super) {
|
|
33
33
|
__extends(Contacts, _super);
|
|
34
34
|
function Contacts(params) {
|
|
35
|
-
var token = params.token, discoveryUrl = params.discoveryUrl;
|
|
35
|
+
var token = params.token, discoveryUrl = params.discoveryUrl, contactsApiUrl = params.contactsApiUrl;
|
|
36
36
|
return _super.call(this, {
|
|
37
37
|
token: token,
|
|
38
38
|
discoveryUrl: discoveryUrl,
|
|
39
|
-
serviceKey: constants_1.
|
|
39
|
+
serviceKey: constants_1.CONTACTS_SERVICE_KEY,
|
|
40
|
+
serviceUrl: contactsApiUrl,
|
|
40
41
|
}) || this;
|
|
41
42
|
}
|
|
42
43
|
Contacts.prototype.getContactsBookList = function () {
|
|
43
|
-
return this.
|
|
44
|
+
return this.callApiV2({
|
|
44
45
|
method: 'GET',
|
|
45
46
|
route: 'contact-book',
|
|
46
47
|
});
|
|
47
48
|
};
|
|
48
49
|
Contacts.prototype.getContactsBook = function (id) {
|
|
49
|
-
return this.
|
|
50
|
+
return this.callApiV2({
|
|
50
51
|
method: 'GET',
|
|
51
52
|
route: 'contact-book',
|
|
52
53
|
params: { id: id },
|
|
@@ -54,7 +55,7 @@ var Contacts = (function (_super) {
|
|
|
54
55
|
};
|
|
55
56
|
Contacts.prototype.updateContactsBook = function (data) {
|
|
56
57
|
var id = data.id, restData = __rest(data, ["id"]);
|
|
57
|
-
return this.
|
|
58
|
+
return this.callApiV2({
|
|
58
59
|
method: 'PATCH',
|
|
59
60
|
route: 'contact-book',
|
|
60
61
|
params: { id: id },
|
|
@@ -62,14 +63,14 @@ var Contacts = (function (_super) {
|
|
|
62
63
|
});
|
|
63
64
|
};
|
|
64
65
|
Contacts.prototype.deleteContactBook = function (id) {
|
|
65
|
-
return this.
|
|
66
|
+
return this.callApiV2({
|
|
66
67
|
method: 'DELETE',
|
|
67
68
|
route: 'contact-book',
|
|
68
69
|
params: { id: id },
|
|
69
70
|
});
|
|
70
71
|
};
|
|
71
72
|
Contacts.prototype.createContactBook = function (data) {
|
|
72
|
-
return this.
|
|
73
|
+
return this.callApiV2({
|
|
73
74
|
method: 'POST',
|
|
74
75
|
route: 'contact-book',
|
|
75
76
|
data: data,
|
package/dist/cjs/Contacts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Contacts.js","sourceRoot":"","sources":["../../src/Contacts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAoC;AAEpC,
|
|
1
|
+
{"version":3,"file":"Contacts.js","sourceRoot":"","sources":["../../src/Contacts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAoC;AAEpC,yCAAmD;AAenD;IAA8B,4BAAI;IAOhC,kBAAY,MAAsB;QACxB,IAAA,KAAK,GAAmC,MAAM,MAAzC,EAAE,YAAY,GAAqB,MAAM,aAA3B,EAAE,cAAc,GAAK,MAAM,eAAX,CAAY;eACvD,kBAAM;YACJ,KAAK,OAAA;YACL,YAAY,cAAA;YACZ,UAAU,EAAE,gCAAoB;YAChC,UAAU,EAAE,cAAc;SAC3B,CAAC;IACJ,CAAC;IAKD,sCAAmB,GAAnB;QACE,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,cAAc;SACtB,CAAC,CAAC;IACL,CAAC;IAMD,kCAAe,GAAf,UAAgB,EAAU;QACxB,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,cAAc;YACrB,MAAM,EAAE,EAAE,EAAE,IAAA,EAAE;SACf,CAAC,CAAC;IACL,CAAC;IAMD,qCAAkB,GAAlB,UAAmB,IAA0C;QACnD,IAAA,EAAE,GAAkB,IAAI,GAAtB,EAAK,QAAQ,UAAK,IAAI,EAA1B,MAAmB,CAAF,CAAU;QACjC,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,MAAM,EAAE,OAAO;YACf,KAAK,EAAE,cAAc;YACrB,MAAM,EAAE,EAAE,EAAE,IAAA,EAAE;YACd,IAAI,EAAE,QAAQ;SACf,CAAC,CAAC;IACL,CAAC;IAMD,oCAAiB,GAAjB,UAAkB,EAAU;QAC1B,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,MAAM,EAAE,QAAQ;YAChB,KAAK,EAAE,cAAc;YACrB,MAAM,EAAE,EAAE,EAAE,IAAA,EAAE;SACf,CAAC,CAAC;IACL,CAAC;IAMD,oCAAiB,GAAjB,UAAkB,IAA0B;QAC1C,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,cAAc;YACrB,IAAI,MAAA;SACL,CAAC,CAAC;IACL,CAAC;IACH,eAAC;AAAD,CAAC,AA5ED,CAA8B,WAAI,GA4EjC;AA5EY,4BAAQ"}
|
package/dist/cjs/constants.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
3
|
+
exports.CONTACTS_SERVICE_KEY = void 0;
|
|
4
|
+
exports.CONTACTS_SERVICE_KEY = 'contacts-api';
|
|
5
5
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG,cAAc,CAAC"}
|
package/dist/esm/Contacts.js
CHANGED
|
@@ -10,24 +10,25 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import { Base } from '@or-sdk/base';
|
|
13
|
-
import {
|
|
13
|
+
import { CONTACTS_SERVICE_KEY } from './constants';
|
|
14
14
|
export class Contacts extends Base {
|
|
15
15
|
constructor(params) {
|
|
16
|
-
const { token, discoveryUrl } = params;
|
|
16
|
+
const { token, discoveryUrl, contactsApiUrl } = params;
|
|
17
17
|
super({
|
|
18
18
|
token,
|
|
19
19
|
discoveryUrl,
|
|
20
|
-
serviceKey:
|
|
20
|
+
serviceKey: CONTACTS_SERVICE_KEY,
|
|
21
|
+
serviceUrl: contactsApiUrl,
|
|
21
22
|
});
|
|
22
23
|
}
|
|
23
24
|
getContactsBookList() {
|
|
24
|
-
return this.
|
|
25
|
+
return this.callApiV2({
|
|
25
26
|
method: 'GET',
|
|
26
27
|
route: 'contact-book',
|
|
27
28
|
});
|
|
28
29
|
}
|
|
29
30
|
getContactsBook(id) {
|
|
30
|
-
return this.
|
|
31
|
+
return this.callApiV2({
|
|
31
32
|
method: 'GET',
|
|
32
33
|
route: 'contact-book',
|
|
33
34
|
params: { id },
|
|
@@ -35,7 +36,7 @@ export class Contacts extends Base {
|
|
|
35
36
|
}
|
|
36
37
|
updateContactsBook(data) {
|
|
37
38
|
const { id } = data, restData = __rest(data, ["id"]);
|
|
38
|
-
return this.
|
|
39
|
+
return this.callApiV2({
|
|
39
40
|
method: 'PATCH',
|
|
40
41
|
route: 'contact-book',
|
|
41
42
|
params: { id },
|
|
@@ -43,14 +44,14 @@ export class Contacts extends Base {
|
|
|
43
44
|
});
|
|
44
45
|
}
|
|
45
46
|
deleteContactBook(id) {
|
|
46
|
-
return this.
|
|
47
|
+
return this.callApiV2({
|
|
47
48
|
method: 'DELETE',
|
|
48
49
|
route: 'contact-book',
|
|
49
50
|
params: { id },
|
|
50
51
|
});
|
|
51
52
|
}
|
|
52
53
|
createContactBook(data) {
|
|
53
|
-
return this.
|
|
54
|
+
return this.callApiV2({
|
|
54
55
|
method: 'POST',
|
|
55
56
|
route: 'contact-book',
|
|
56
57
|
data,
|
package/dist/esm/Contacts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Contacts.js","sourceRoot":"","sources":["../../src/Contacts.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Contacts.js","sourceRoot":"","sources":["../../src/Contacts.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAenD,MAAM,OAAO,QAAS,SAAQ,IAAI;IAOhC,YAAY,MAAsB;QAChC,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC;QACvD,KAAK,CAAC;YACJ,KAAK;YACL,YAAY;YACZ,UAAU,EAAE,oBAAoB;YAChC,UAAU,EAAE,cAAc;SAC3B,CAAC,CAAC;IACL,CAAC;IAKD,mBAAmB;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,cAAc;SACtB,CAAC,CAAC;IACL,CAAC;IAMD,eAAe,CAAC,EAAU;QACxB,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,cAAc;YACrB,MAAM,EAAE,EAAE,EAAE,EAAE;SACf,CAAC,CAAC;IACL,CAAC;IAMD,kBAAkB,CAAC,IAA0C;QAC3D,MAAM,EAAE,EAAE,KAAkB,IAAI,EAAjB,QAAQ,UAAK,IAAI,EAA1B,MAAmB,CAAO,CAAC;QACjC,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,MAAM,EAAE,OAAO;YACf,KAAK,EAAE,cAAc;YACrB,MAAM,EAAE,EAAE,EAAE,EAAE;YACd,IAAI,EAAE,QAAQ;SACf,CAAC,CAAC;IACL,CAAC;IAMD,iBAAiB,CAAC,EAAU;QAC1B,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,MAAM,EAAE,QAAQ;YAChB,KAAK,EAAE,cAAc;YACrB,MAAM,EAAE,EAAE,EAAE,EAAE;SACf,CAAC,CAAC;IACL,CAAC;IAMD,iBAAiB,CAAC,IAA0B;QAC1C,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,cAAc;YACrB,IAAI;SACL,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/dist/esm/constants.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const CONTACTS_SERVICE_KEY = 'contacts-api';
|
|
2
2
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG,cAAc,CAAC"}
|
package/dist/types/Contacts.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Base } from '@or-sdk/base';
|
|
2
2
|
import { ContactsConfig } from './types';
|
|
3
|
-
import { ContactBookResponseDto, UpdateContactBookDto, CreateContactBookDto } from '@onereach/types-contacts-api';
|
|
3
|
+
import { ContactBookResponseDto, UpdateContactBookDto, CreateContactBookDto, ContactBookListDto } from '@onereach/types-contacts-api';
|
|
4
4
|
export declare class Contacts extends Base {
|
|
5
5
|
constructor(params: ContactsConfig);
|
|
6
|
-
getContactsBookList(): Promise<
|
|
6
|
+
getContactsBookList(): Promise<ContactBookListDto>;
|
|
7
7
|
getContactsBook(id: string): Promise<ContactBookResponseDto[]>;
|
|
8
8
|
updateContactsBook(data: UpdateContactBookDto & {
|
|
9
9
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Contacts.d.ts","sourceRoot":"","sources":["../../src/Contacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,
|
|
1
|
+
{"version":3,"file":"Contacts.d.ts","sourceRoot":"","sources":["../../src/Contacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,8BAA8B,CAAC;AAStC,qBAAa,QAAS,SAAQ,IAAI;gBAOpB,MAAM,EAAE,cAAc;IAalC,mBAAmB,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAWlD,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,EAAE,CAAC;IAY9D,kBAAkB,CAAC,IAAI,EAAE,oBAAoB,GAAG;QAAC,EAAE,EAAE,MAAM,CAAC;KAAC,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAc/F,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAY5C,iBAAiB,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;CAO7D"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const CONTACTS_SERVICE_KEY = "contacts-api";
|
|
2
2
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,iBAAiB,CAAC"}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,oBAAY,cAAc,GAAG;IAI3B,KAAK,EAAE,KAAK,CAAC;IAIb,YAAY,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,oBAAY,cAAc,GAAG;IAI3B,KAAK,EAAE,KAAK,CAAC;IAIb,YAAY,EAAE,MAAM,CAAC;IAIrB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.1-beta.
|
|
2
|
+
"version": "1.0.1-beta.522.0",
|
|
3
3
|
"name": "@or-sdk/contacts",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"dev": "pnpm build:watch:esm"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@onereach/types-contacts-api": "^0.0.
|
|
20
|
+
"@onereach/types-contacts-api": "^0.0.4",
|
|
21
21
|
"concurrently": "^6.4.0",
|
|
22
22
|
"typescript": "^4.4.4"
|
|
23
23
|
},
|
package/src/Contacts.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { Base } from '@or-sdk/base';
|
|
2
2
|
import { ContactsConfig } from './types';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { CONTACTS_SERVICE_KEY } from './constants';
|
|
4
|
+
import {
|
|
5
|
+
ContactBookResponseDto,
|
|
6
|
+
UpdateContactBookDto,
|
|
7
|
+
CreateContactBookDto,
|
|
8
|
+
ContactBookListDto,
|
|
9
|
+
} from '@onereach/types-contacts-api';
|
|
5
10
|
|
|
6
11
|
/**
|
|
7
12
|
* OneReach Contacts service client
|
|
@@ -18,19 +23,20 @@ export class Contacts extends Base {
|
|
|
18
23
|
* ```
|
|
19
24
|
*/
|
|
20
25
|
constructor(params: ContactsConfig) {
|
|
21
|
-
const { token, discoveryUrl } = params;
|
|
26
|
+
const { token, discoveryUrl, contactsApiUrl } = params;
|
|
22
27
|
super({
|
|
23
28
|
token,
|
|
24
29
|
discoveryUrl,
|
|
25
|
-
serviceKey:
|
|
30
|
+
serviceKey: CONTACTS_SERVICE_KEY,
|
|
31
|
+
serviceUrl: contactsApiUrl,
|
|
26
32
|
});
|
|
27
33
|
}
|
|
28
34
|
|
|
29
35
|
/**
|
|
30
36
|
* Get list for ContactsBooks
|
|
31
37
|
*/
|
|
32
|
-
getContactsBookList(): Promise<
|
|
33
|
-
return this.
|
|
38
|
+
getContactsBookList(): Promise<ContactBookListDto> {
|
|
39
|
+
return this.callApiV2({
|
|
34
40
|
method: 'GET',
|
|
35
41
|
route: 'contact-book',
|
|
36
42
|
});
|
|
@@ -41,7 +47,7 @@ export class Contacts extends Base {
|
|
|
41
47
|
* @param id
|
|
42
48
|
*/
|
|
43
49
|
getContactsBook(id: string): Promise<ContactBookResponseDto[]> {
|
|
44
|
-
return this.
|
|
50
|
+
return this.callApiV2({
|
|
45
51
|
method: 'GET',
|
|
46
52
|
route: 'contact-book',
|
|
47
53
|
params: { id },
|
|
@@ -54,7 +60,7 @@ export class Contacts extends Base {
|
|
|
54
60
|
*/
|
|
55
61
|
updateContactsBook(data: UpdateContactBookDto & {id: string;}): Promise<ContactBookResponseDto> {
|
|
56
62
|
const { id, ...restData } = data;
|
|
57
|
-
return this.
|
|
63
|
+
return this.callApiV2({
|
|
58
64
|
method: 'PATCH',
|
|
59
65
|
route: 'contact-book',
|
|
60
66
|
params: { id },
|
|
@@ -67,7 +73,7 @@ export class Contacts extends Base {
|
|
|
67
73
|
* @param id
|
|
68
74
|
*/
|
|
69
75
|
deleteContactBook(id: string): Promise<void> {
|
|
70
|
-
return this.
|
|
76
|
+
return this.callApiV2({
|
|
71
77
|
method: 'DELETE',
|
|
72
78
|
route: 'contact-book',
|
|
73
79
|
params: { id },
|
|
@@ -79,7 +85,7 @@ export class Contacts extends Base {
|
|
|
79
85
|
* @param data
|
|
80
86
|
*/
|
|
81
87
|
createContactBook(data: CreateContactBookDto): Promise<void> {
|
|
82
|
-
return this.
|
|
88
|
+
return this.callApiV2({
|
|
83
89
|
method: 'POST',
|
|
84
90
|
route: 'contact-book',
|
|
85
91
|
data,
|
package/src/constants.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const CONTACTS_SERVICE_KEY = 'contacts-api';
|