cogfy-messenger 0.1.15 → 0.1.17
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 +8 -2
- package/dist/clients/contacts/contacts-client.js +11 -1
- 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/dist/clients/contacts/types/update-contact.d.ts +12 -14
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseClient } from '../base-client';
|
|
2
|
-
import { CreateContactCommand, CreateContactResult, DeleteContactResult, GetContactResult, ListContactsResult, UpdateContactCommand,
|
|
2
|
+
import { CreateContactCommand, CreateContactResult, DeleteContactResult, GetContactResult, ListContactsParams, ListContactsResult, UpdateContactCommand, UpdateContactTagsCommand } from './types';
|
|
3
3
|
export declare class ContactsClient extends BaseClient {
|
|
4
4
|
/**
|
|
5
5
|
* Calls the POST /contacts endpoint
|
|
@@ -25,7 +25,13 @@ export declare class ContactsClient extends BaseClient {
|
|
|
25
25
|
* @param contact The updated contact data
|
|
26
26
|
* @returns An object with the ID of the updated contact
|
|
27
27
|
*/
|
|
28
|
-
update(id: string, contact: UpdateContactCommand): Promise<
|
|
28
|
+
update(id: string, contact: UpdateContactCommand): Promise<void>;
|
|
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
|
|
@@ -50,7 +50,17 @@ class ContactsClient extends base_client_1.BaseClient {
|
|
|
50
50
|
*/
|
|
51
51
|
update(id, contact) {
|
|
52
52
|
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
-
|
|
53
|
+
yield this.axios.patch(`/contacts/${id}`, contact);
|
|
54
|
+
});
|
|
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);
|
|
54
64
|
});
|
|
55
65
|
}
|
|
56
66
|
/**
|
|
@@ -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);
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
export type UpdateContactCommand = {
|
|
2
|
-
firstName
|
|
3
|
-
lastName
|
|
4
|
-
email
|
|
5
|
-
phone
|
|
6
|
-
occupation
|
|
7
|
-
gender
|
|
8
|
-
birthdate
|
|
9
|
-
age
|
|
10
|
-
notes
|
|
11
|
-
tags
|
|
2
|
+
firstName?: string | null;
|
|
3
|
+
lastName?: string | null;
|
|
4
|
+
email?: string | null;
|
|
5
|
+
phone?: string | null;
|
|
6
|
+
occupation?: string | null;
|
|
7
|
+
gender?: string | null;
|
|
8
|
+
birthdate?: string | null;
|
|
9
|
+
age?: number | null;
|
|
10
|
+
notes?: string | null;
|
|
11
|
+
tags?: {
|
|
12
12
|
id: string;
|
|
13
13
|
name: string;
|
|
14
|
-
}[]
|
|
15
|
-
|
|
16
|
-
export type UpdateContactResult = {
|
|
17
|
-
id: string;
|
|
14
|
+
}[];
|
|
15
|
+
customProperties?: Record<string, string | number>;
|
|
18
16
|
};
|