@friggframework/api-module-pipedrive 2.1.0-canary.68.7de2366.0 → 2.1.0-canary.83.fedcd2f.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 CHANGED
@@ -1,6 +1,5 @@
1
1
  # pipedrive
2
2
 
3
- This is the API Module for pipedrive that allows the [Frigg](https://friggframework.org) code to talk to the pipedrive
4
- API.
3
+ This is the API Module for pipedrive that allows the [Frigg](https://friggframework.org) code to talk to the pipedrive API.
5
4
 
6
- Read more on the [Frigg documentation site](https://docs.friggframework.org/api-modules/list/pipedrive
5
+ Read more on the [Frigg documentation site](https://docs.friggframework.org/api-modules/list/pipedrive
package/dist/api.d.ts CHANGED
@@ -8,6 +8,7 @@ export declare class Api extends OAuth2Requester {
8
8
  activityById: (activityId: string | number) => string;
9
9
  getUser: string;
10
10
  users: string;
11
+ usersFind: string;
11
12
  deals: string;
12
13
  persons: string;
13
14
  personById: (personId: string | number) => string;
@@ -65,6 +66,10 @@ export declare class Api extends OAuth2Requester {
65
66
  createActivity(params: ActivityParams): Promise<PipedriveResponse>;
66
67
  getUser(): Promise<PipedriveUser>;
67
68
  listUsers(): Promise<PipedriveResponse>;
69
+ findUsers(params: {
70
+ term: string;
71
+ search_by_email?: 0 | 1;
72
+ }): Promise<PipedriveResponse>;
68
73
  /**
69
74
  * List persons with v2 API support
70
75
  * @param params - Query parameters for filtering and pagination
package/dist/api.js CHANGED
@@ -13,6 +13,7 @@ class Api extends core_1.OAuth2Requester {
13
13
  activityById: (activityId) => `/v2/activities/${activityId}`,
14
14
  getUser: "/v1/users/me",
15
15
  users: "/v1/users",
16
+ usersFind: "/v1/users/find",
16
17
  deals: "/v2/deals",
17
18
  persons: "/v2/persons",
18
19
  personById: (personId) => `/v2/persons/${personId}`,
@@ -126,13 +127,13 @@ class Api extends core_1.OAuth2Requester {
126
127
  const options = {
127
128
  url: this.baseUrl + this.URLs.activityById(activityId),
128
129
  body: task,
130
+ headers: {
131
+ "Content-Type": "application/json",
132
+ },
129
133
  };
130
134
  return this._patch(options);
131
135
  }
132
136
  async createActivity(params) {
133
- const dealId = (0, core_1.get)(params, "dealId", null);
134
- const subject = (0, core_1.get)(params, "subject");
135
- const type = (0, core_1.get)(params, "type");
136
137
  const options = {
137
138
  url: this.baseUrl + this.URLs.activities,
138
139
  body: { ...params },
@@ -155,6 +156,13 @@ class Api extends core_1.OAuth2Requester {
155
156
  };
156
157
  return this._get(options);
157
158
  }
159
+ async findUsers(params) {
160
+ const options = {
161
+ url: this.baseUrl + this.URLs.usersFind,
162
+ query: params,
163
+ };
164
+ return this._get(options);
165
+ }
158
166
  // ************************** Persons **********************************
159
167
  /**
160
168
  * List persons with v2 API support
@@ -30,7 +30,7 @@ const Definition = {
30
30
  return {
31
31
  identifiers: {
32
32
  externalId: String(userProfile.data.company_id),
33
- user: userId,
33
+ userId,
34
34
  },
35
35
  details: {
36
36
  name: userProfile.data.company_name || "Unknown Company",
@@ -55,7 +55,7 @@ const Definition = {
55
55
  return {
56
56
  identifiers: {
57
57
  externalId: String(userProfile.data.id),
58
- user: userId,
58
+ userId,
59
59
  },
60
60
  details: {},
61
61
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@friggframework/api-module-pipedrive",
3
- "version": "2.1.0-canary.68.7de2366.0",
3
+ "version": "2.1.0-canary.83.fedcd2f.0",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -30,5 +30,5 @@
30
30
  "publishConfig": {
31
31
  "access": "public"
32
32
  },
33
- "gitHead": "7de2366de0cab7e186788d8f226029781af8312c"
33
+ "gitHead": "fedcd2fd25aa276ff30f4cf41b333c2b9b95c2a4"
34
34
  }