waha-shared 1.0.154 → 1.0.155

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.
@@ -4,6 +4,17 @@ declare const listNumbers: {
4
4
  'dm-course': number;
5
5
  'in-app-donation-sequence': number;
6
6
  };
7
- export declare function addToACList(token: string, baseUrl: string, email: string, list: keyof typeof listNumbers, name?: string): Promise<void>;
8
- export declare function getContactsInList(token: string, baseUrl: string, list: keyof typeof listNumbers, limit?: number): Promise<string[]>;
7
+ export declare function addToACList({ baseUrl, email, list, token, name, }: {
8
+ token: string;
9
+ baseUrl: string;
10
+ email: string;
11
+ list: keyof typeof listNumbers;
12
+ name?: string;
13
+ }): Promise<void>;
14
+ export declare function getContactsInList({ baseUrl, limit, list, token, }: {
15
+ token: string;
16
+ baseUrl: string;
17
+ list: keyof typeof listNumbers;
18
+ limit: number;
19
+ }): Promise<string[]>;
9
20
  export {};
@@ -12,7 +12,7 @@ const listNumbers = {
12
12
  'dm-course': 9,
13
13
  'in-app-donation-sequence': 17,
14
14
  };
15
- async function addToACList(token, baseUrl, email, list, name) {
15
+ async function addToACList({ baseUrl, email, list, token, name, }) {
16
16
  const headers = { 'Api-Token': token, 'Content-Type': 'application/json' };
17
17
  const url = `${baseUrl}/api/3`;
18
18
  const findContact = await fetch(`${url}/contacts?email=${email}`, {
@@ -59,7 +59,7 @@ async function addToACList(token, baseUrl, email, list, name) {
59
59
  }
60
60
  signale_1.default.success(`${email} added to AC list ${list}.`);
61
61
  }
62
- async function getContactsInList(token, baseUrl, list, limit = 100) {
62
+ async function getContactsInList({ baseUrl, limit = 100, list, token, }) {
63
63
  const headers = { 'Api-Token': token, 'Content-Type': 'application/json' };
64
64
  const url = `${baseUrl}/api/3`;
65
65
  const allEmails = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waha-shared",
3
- "version": "1.0.154",
3
+ "version": "1.0.155",
4
4
  "author": "Waha",
5
5
  "dependencies": {
6
6
  "@types/signale": "^1.4.7",