cogfy-messenger 0.1.15 → 0.1.16
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/dist/clients/contacts/contacts-client.d.ts +7 -1
- package/dist/clients/contacts/contacts-client.js +10 -0
- package/dist/clients/contacts/types/index.d.ts +3 -2
- package/dist/clients/contacts/types/index.js +3 -2
- package/dist/clients/contacts/types/update-contact-tags.d.ts +10 -0
- package/dist/clients/contacts/types/update-contact-tags.js +2 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseClient } from '../base-client';
|
|
2
|
-
import { CreateContactCommand, CreateContactResult, DeleteContactResult, GetContactResult, ListContactsResult, UpdateContactCommand, UpdateContactResult,
|
|
2
|
+
import { CreateContactCommand, CreateContactResult, DeleteContactResult, GetContactResult, ListContactsParams, ListContactsResult, UpdateContactCommand, UpdateContactResult, UpdateContactTagsCommand } from './types';
|
|
3
3
|
export declare class ContactsClient extends BaseClient {
|
|
4
4
|
/**
|
|
5
5
|
* Calls the POST /contacts endpoint
|
|
@@ -26,6 +26,12 @@ export declare class ContactsClient extends BaseClient {
|
|
|
26
26
|
* @returns An object with the ID of the updated contact
|
|
27
27
|
*/
|
|
28
28
|
update(id: string, contact: UpdateContactCommand): Promise<UpdateContactResult>;
|
|
29
|
+
/**
|
|
30
|
+
* Calls the POST /contacts/:id/tags endpoint
|
|
31
|
+
* @param id The ID of the contact to update tags for
|
|
32
|
+
* @param data The tags to add, remove, or set
|
|
33
|
+
*/
|
|
34
|
+
updateTags(id: string, data: UpdateContactTagsCommand): Promise<void>;
|
|
29
35
|
/**
|
|
30
36
|
* Calls the DELETE /contacts/:id endpoint
|
|
31
37
|
* @param id The ID of the contact to delete
|
|
@@ -53,6 +53,16 @@ class ContactsClient extends base_client_1.BaseClient {
|
|
|
53
53
|
return (yield this.axios.patch(`/contacts/${id}`, contact)).data;
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Calls the POST /contacts/:id/tags endpoint
|
|
58
|
+
* @param id The ID of the contact to update tags for
|
|
59
|
+
* @param data The tags to add, remove, or set
|
|
60
|
+
*/
|
|
61
|
+
updateTags(id, data) {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
yield this.axios.post(`/contacts/${id}/tags`, data);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
56
66
|
/**
|
|
57
67
|
* Calls the DELETE /contacts/:id endpoint
|
|
58
68
|
* @param id The ID of the contact to delete
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './create-contact';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './delete-contact';
|
|
3
3
|
export * from './get-contact';
|
|
4
4
|
export * from './list-contacts';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './update-contact';
|
|
6
|
+
export * from './update-contact-tags';
|
|
@@ -15,7 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./create-contact"), exports);
|
|
18
|
-
__exportStar(require("./
|
|
18
|
+
__exportStar(require("./delete-contact"), exports);
|
|
19
19
|
__exportStar(require("./get-contact"), exports);
|
|
20
20
|
__exportStar(require("./list-contacts"), exports);
|
|
21
|
-
__exportStar(require("./
|
|
21
|
+
__exportStar(require("./update-contact"), exports);
|
|
22
|
+
__exportStar(require("./update-contact-tags"), exports);
|