@friggframework/api-module-pipedrive 2.1.0-next.6 → 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 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: {
@@ -21,6 +21,8 @@ export declare class Api extends OAuth2Requester {
21
21
  search: string;
22
22
  callLogs: string;
23
23
  callLogById: (callLogId: string) => string;
24
+ leads: string;
25
+ leadById: (leadId: string) => string;
24
26
  };
25
27
  constructor(params: OAuth2RequesterOptions);
26
28
  /**
@@ -207,4 +209,24 @@ export declare class Api extends OAuth2Requester {
207
209
  * @returns Response confirming deletion
208
210
  */
209
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>;
210
232
  }
package/dist/api.js CHANGED
@@ -26,6 +26,8 @@ class Api extends core_1.OAuth2Requester {
26
26
  search: "/v1/search",
27
27
  callLogs: "/v1/callLogs",
28
28
  callLogById: (callLogId) => `/v1/callLogs/${callLogId}`,
29
+ leads: "/v1/leads",
30
+ leadById: (leadId) => `/v1/leads/${leadId}`,
29
31
  };
30
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}`);
31
33
  this.tokenUri = "https://oauth.pipedrive.com/oauth/token";
@@ -413,5 +415,39 @@ class Api extends core_1.OAuth2Requester {
413
415
  };
414
416
  return this._delete(options);
415
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
+ }
416
452
  }
417
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.6",
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": "d07de0fa9919fe5101ed8706276262fa7e724bea"
33
+ "gitHead": "55a084910c04db265cbd375b173081ca3c8bade1"
34
34
  }