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.
@@ -1,5 +1,5 @@
1
1
  import { BaseClient } from '../base-client';
2
- import { CreateContactCommand, CreateContactResult, DeleteContactResult, GetContactResult, ListContactsResult, UpdateContactCommand, UpdateContactResult, ListContactsParams } from './types';
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 './update-contact';
2
+ export * from './delete-contact';
3
3
  export * from './get-contact';
4
4
  export * from './list-contacts';
5
- export * from './delete-contact';
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("./update-contact"), exports);
18
+ __exportStar(require("./delete-contact"), exports);
19
19
  __exportStar(require("./get-contact"), exports);
20
20
  __exportStar(require("./list-contacts"), exports);
21
- __exportStar(require("./delete-contact"), exports);
21
+ __exportStar(require("./update-contact"), exports);
22
+ __exportStar(require("./update-contact-tags"), exports);
@@ -0,0 +1,10 @@
1
+ type Tag = {
2
+ id?: string;
3
+ name?: string;
4
+ };
5
+ export type UpdateContactTagsCommand = {
6
+ add: Tag[];
7
+ remove: Tag[];
8
+ set: Tag[];
9
+ };
10
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cogfy-messenger",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "main": "dist/index.js",
5
5
  "repository": {
6
6
  "type": "git",