@friggframework/api-module-pipedrive 2.1.0-next.5 → 2.1.0-next.7
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/api.d.ts +28 -1
- package/dist/api.js +44 -0
- package/package.json +2 -2
package/dist/api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OAuth2Requester } from "@friggframework/core";
|
|
2
|
-
import { OAuth2RequesterOptions, ActivityParams, ListActivitiesParams, ListDealsParams, CreateDealParams, ListPersonsParams, GetPersonParams, SearchPersonsParams, SearchParams, CreateNoteParams, ListOrganizationsParams, GetOrganizationParams, PipedriveResponse, PipedriveUser, PipedriveTokenResponse, CreateWebhookParams, CreateCallLogParams, UpdateCallLogParams, ListCallLogsParams } from "./types";
|
|
2
|
+
import { OAuth2RequesterOptions, ActivityParams, ListActivitiesParams, ListDealsParams, CreateDealParams, ListPersonsParams, GetPersonParams, SearchPersonsParams, SearchParams, CreateNoteParams, ListOrganizationsParams, GetOrganizationParams, PipedriveResponse, PipedriveUser, PipedriveTokenResponse, CreateWebhookParams, CreateCallLogParams, UpdateCallLogParams, ListCallLogsParams, ListLeadsParams } from "./types";
|
|
3
3
|
export declare class Api extends OAuth2Requester {
|
|
4
4
|
companyDomain: string | null;
|
|
5
5
|
URLs: {
|
|
@@ -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;
|
|
@@ -20,6 +21,8 @@ export declare class Api extends OAuth2Requester {
|
|
|
20
21
|
search: string;
|
|
21
22
|
callLogs: string;
|
|
22
23
|
callLogById: (callLogId: string) => string;
|
|
24
|
+
leads: string;
|
|
25
|
+
leadById: (leadId: string) => string;
|
|
23
26
|
};
|
|
24
27
|
constructor(params: OAuth2RequesterOptions);
|
|
25
28
|
/**
|
|
@@ -65,6 +68,10 @@ export declare class Api extends OAuth2Requester {
|
|
|
65
68
|
createActivity(params: ActivityParams): Promise<PipedriveResponse>;
|
|
66
69
|
getUser(): Promise<PipedriveUser>;
|
|
67
70
|
listUsers(): Promise<PipedriveResponse>;
|
|
71
|
+
findUsers(params: {
|
|
72
|
+
term: string;
|
|
73
|
+
search_by_email?: 0 | 1;
|
|
74
|
+
}): Promise<PipedriveResponse>;
|
|
68
75
|
/**
|
|
69
76
|
* List persons with v2 API support
|
|
70
77
|
* @param params - Query parameters for filtering and pagination
|
|
@@ -202,4 +209,24 @@ export declare class Api extends OAuth2Requester {
|
|
|
202
209
|
* @returns Response confirming deletion
|
|
203
210
|
*/
|
|
204
211
|
deleteCallLog(callLogId: string): Promise<PipedriveResponse>;
|
|
212
|
+
/**
|
|
213
|
+
* List leads with optional filtering
|
|
214
|
+
* @param params - Query parameters for filtering and pagination
|
|
215
|
+
* @param params.limit - Number of leads to return (default 100)
|
|
216
|
+
* @param params.start - Pagination start position
|
|
217
|
+
* @param params.owner_id - Filter by owner user ID
|
|
218
|
+
* @param params.person_id - Filter by associated person ID
|
|
219
|
+
* @param params.organization_id - Filter by associated organization ID
|
|
220
|
+
* @param params.filter_id - Filter by saved filter ID
|
|
221
|
+
* @param params.updated_since - Return leads updated at or after this time (ISO 8601)
|
|
222
|
+
* @param params.sort - Field and direction e.g. "update_time DESC"
|
|
223
|
+
* @returns Response with lead data array
|
|
224
|
+
*/
|
|
225
|
+
listLeads(params?: ListLeadsParams): Promise<PipedriveResponse>;
|
|
226
|
+
/**
|
|
227
|
+
* Get a single lead by ID
|
|
228
|
+
* @param leadId - The UUID of the lead to retrieve
|
|
229
|
+
* @returns Response with lead data
|
|
230
|
+
*/
|
|
231
|
+
getLead(leadId: string): Promise<PipedriveResponse>;
|
|
205
232
|
}
|
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}`,
|
|
@@ -25,6 +26,8 @@ class Api extends core_1.OAuth2Requester {
|
|
|
25
26
|
search: "/v1/search",
|
|
26
27
|
callLogs: "/v1/callLogs",
|
|
27
28
|
callLogById: (callLogId) => `/v1/callLogs/${callLogId}`,
|
|
29
|
+
leads: "/v1/leads",
|
|
30
|
+
leadById: (leadId) => `/v1/leads/${leadId}`,
|
|
28
31
|
};
|
|
29
32
|
this.authorizationUri = encodeURI(`https://oauth.pipedrive.com/oauth/authorize?client_id=${this.client_id}&redirect_uri=${this.redirect_uri}&response_type=code&scope=${this.scope}`);
|
|
30
33
|
this.tokenUri = "https://oauth.pipedrive.com/oauth/token";
|
|
@@ -155,6 +158,13 @@ class Api extends core_1.OAuth2Requester {
|
|
|
155
158
|
};
|
|
156
159
|
return this._get(options);
|
|
157
160
|
}
|
|
161
|
+
async findUsers(params) {
|
|
162
|
+
const options = {
|
|
163
|
+
url: this.baseUrl + this.URLs.usersFind,
|
|
164
|
+
query: params,
|
|
165
|
+
};
|
|
166
|
+
return this._get(options);
|
|
167
|
+
}
|
|
158
168
|
// ************************** Persons **********************************
|
|
159
169
|
/**
|
|
160
170
|
* List persons with v2 API support
|
|
@@ -405,5 +415,39 @@ class Api extends core_1.OAuth2Requester {
|
|
|
405
415
|
};
|
|
406
416
|
return this._delete(options);
|
|
407
417
|
}
|
|
418
|
+
// ************************** Leads **********************************
|
|
419
|
+
/**
|
|
420
|
+
* List leads with optional filtering
|
|
421
|
+
* @param params - Query parameters for filtering and pagination
|
|
422
|
+
* @param params.limit - Number of leads to return (default 100)
|
|
423
|
+
* @param params.start - Pagination start position
|
|
424
|
+
* @param params.owner_id - Filter by owner user ID
|
|
425
|
+
* @param params.person_id - Filter by associated person ID
|
|
426
|
+
* @param params.organization_id - Filter by associated organization ID
|
|
427
|
+
* @param params.filter_id - Filter by saved filter ID
|
|
428
|
+
* @param params.updated_since - Return leads updated at or after this time (ISO 8601)
|
|
429
|
+
* @param params.sort - Field and direction e.g. "update_time DESC"
|
|
430
|
+
* @returns Response with lead data array
|
|
431
|
+
*/
|
|
432
|
+
async listLeads(params) {
|
|
433
|
+
const options = {
|
|
434
|
+
url: this.baseUrl + this.URLs.leads,
|
|
435
|
+
};
|
|
436
|
+
if (params && Object.keys(params).length > 0) {
|
|
437
|
+
options.query = params;
|
|
438
|
+
}
|
|
439
|
+
return this._get(options);
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* Get a single lead by ID
|
|
443
|
+
* @param leadId - The UUID of the lead to retrieve
|
|
444
|
+
* @returns Response with lead data
|
|
445
|
+
*/
|
|
446
|
+
async getLead(leadId) {
|
|
447
|
+
const options = {
|
|
448
|
+
url: this.baseUrl + this.URLs.leadById(leadId),
|
|
449
|
+
};
|
|
450
|
+
return this._get(options);
|
|
451
|
+
}
|
|
408
452
|
}
|
|
409
453
|
exports.Api = Api;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friggframework/api-module-pipedrive",
|
|
3
|
-
"version": "2.1.0-next.
|
|
3
|
+
"version": "2.1.0-next.7",
|
|
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": "
|
|
33
|
+
"gitHead": "55a084910c04db265cbd375b173081ca3c8bade1"
|
|
34
34
|
}
|