@friggframework/api-module-pipedrive 2.1.0-canary.58.42ea316.0 → 2.1.0-canary.63.699128f.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 +2 -3
- package/dist/api.d.ts +50 -1
- package/dist/api.js +86 -0
- package/package.json +2 -2
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
|
@@ -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 } from "./types";
|
|
2
|
+
import { OAuth2RequesterOptions, ActivityParams, ListActivitiesParams, ListDealsParams, CreateDealParams, ListPersonsParams, GetPersonParams, SearchPersonsParams, SearchParams, CreateNoteParams, ListOrganizationsParams, GetOrganizationParams, PipedriveResponse, PipedriveUser, PipedriveTokenResponse, CreateWebhookParams, CreateCallLogParams, UpdateCallLogParams, ListCallLogsParams } from "./types";
|
|
3
3
|
export declare class Api extends OAuth2Requester {
|
|
4
4
|
companyDomain: string | null;
|
|
5
5
|
URLs: {
|
|
@@ -18,6 +18,8 @@ export declare class Api extends OAuth2Requester {
|
|
|
18
18
|
webhooks: string;
|
|
19
19
|
webhookById: (webhookId: string | number) => string;
|
|
20
20
|
search: string;
|
|
21
|
+
callLogs: string;
|
|
22
|
+
callLogById: (callLogId: string) => string;
|
|
21
23
|
};
|
|
22
24
|
constructor(params: OAuth2RequesterOptions);
|
|
23
25
|
/**
|
|
@@ -153,4 +155,51 @@ export declare class Api extends OAuth2Requester {
|
|
|
153
155
|
* @returns Response confirming deletion
|
|
154
156
|
*/
|
|
155
157
|
deleteWebhook(webhookId: string | number): Promise<PipedriveResponse>;
|
|
158
|
+
/**
|
|
159
|
+
* List all call logs
|
|
160
|
+
* @param params - Pagination parameters
|
|
161
|
+
* @param params.start - Pagination start position (default: 0)
|
|
162
|
+
* @param params.limit - Max entries per page (max: 50)
|
|
163
|
+
* @returns Response with call log data array
|
|
164
|
+
*/
|
|
165
|
+
listCallLogs(params?: ListCallLogsParams): Promise<PipedriveResponse>;
|
|
166
|
+
/**
|
|
167
|
+
* Get a single call log by ID
|
|
168
|
+
* @param callLogId - The ID of the call log to retrieve
|
|
169
|
+
* @returns Response with call log data
|
|
170
|
+
*/
|
|
171
|
+
getCallLog(callLogId: string): Promise<PipedriveResponse>;
|
|
172
|
+
/**
|
|
173
|
+
* Create a new call log
|
|
174
|
+
* @param params - Call log data
|
|
175
|
+
* @param params.to_phone_number - The number called (required)
|
|
176
|
+
* @param params.outcome - Call result: connected, no_answer, left_message, left_voicemail, wrong_number, busy (required)
|
|
177
|
+
* @param params.start_time - Call start in UTC YYYY-MM-DD HH:MM:SS (required)
|
|
178
|
+
* @param params.end_time - Call end in UTC YYYY-MM-DD HH:MM:SS (required)
|
|
179
|
+
* @param params.person_id - Associated person ID
|
|
180
|
+
* @param params.org_id - Associated organization ID
|
|
181
|
+
* @param params.deal_id - Associated deal ID
|
|
182
|
+
* @param params.subject - Activity name/subject
|
|
183
|
+
* @param params.duration - Duration in seconds
|
|
184
|
+
* @param params.from_phone_number - Caller's number
|
|
185
|
+
* @param params.note - Notes in HTML format
|
|
186
|
+
* @returns Response with created call log data
|
|
187
|
+
*/
|
|
188
|
+
createCallLog(params: CreateCallLogParams): Promise<PipedriveResponse>;
|
|
189
|
+
/**
|
|
190
|
+
* Update an existing call log
|
|
191
|
+
* @param callLogId - The ID of the call log to update
|
|
192
|
+
* @param params - Fields to update
|
|
193
|
+
* @param params.outcome - Call result
|
|
194
|
+
* @param params.subject - Activity name/subject
|
|
195
|
+
* @param params.note - Notes in HTML format
|
|
196
|
+
* @returns Response with updated call log data
|
|
197
|
+
*/
|
|
198
|
+
updateCallLog(callLogId: string, params: UpdateCallLogParams): Promise<PipedriveResponse>;
|
|
199
|
+
/**
|
|
200
|
+
* Delete a call log by ID
|
|
201
|
+
* @param callLogId - The ID of the call log to delete
|
|
202
|
+
* @returns Response confirming deletion
|
|
203
|
+
*/
|
|
204
|
+
deleteCallLog(callLogId: string): Promise<PipedriveResponse>;
|
|
156
205
|
}
|
package/dist/api.js
CHANGED
|
@@ -23,6 +23,8 @@ class Api extends core_1.OAuth2Requester {
|
|
|
23
23
|
webhooks: "/v1/webhooks",
|
|
24
24
|
webhookById: (webhookId) => `/v1/webhooks/${webhookId}`,
|
|
25
25
|
search: "/v1/search",
|
|
26
|
+
callLogs: "/v1/callLogs",
|
|
27
|
+
callLogById: (callLogId) => `/v1/callLogs/${callLogId}`,
|
|
26
28
|
};
|
|
27
29
|
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}`);
|
|
28
30
|
this.tokenUri = "https://oauth.pipedrive.com/oauth/token";
|
|
@@ -319,5 +321,89 @@ class Api extends core_1.OAuth2Requester {
|
|
|
319
321
|
};
|
|
320
322
|
return this._delete(options);
|
|
321
323
|
}
|
|
324
|
+
// ************************** Call Logs **********************************
|
|
325
|
+
/**
|
|
326
|
+
* List all call logs
|
|
327
|
+
* @param params - Pagination parameters
|
|
328
|
+
* @param params.start - Pagination start position (default: 0)
|
|
329
|
+
* @param params.limit - Max entries per page (max: 50)
|
|
330
|
+
* @returns Response with call log data array
|
|
331
|
+
*/
|
|
332
|
+
async listCallLogs(params) {
|
|
333
|
+
const options = {
|
|
334
|
+
url: this.baseUrl + this.URLs.callLogs,
|
|
335
|
+
};
|
|
336
|
+
if (params && Object.keys(params).length > 0) {
|
|
337
|
+
options.query = params;
|
|
338
|
+
}
|
|
339
|
+
return this._get(options);
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Get a single call log by ID
|
|
343
|
+
* @param callLogId - The ID of the call log to retrieve
|
|
344
|
+
* @returns Response with call log data
|
|
345
|
+
*/
|
|
346
|
+
async getCallLog(callLogId) {
|
|
347
|
+
const options = {
|
|
348
|
+
url: this.baseUrl + this.URLs.callLogById(callLogId),
|
|
349
|
+
};
|
|
350
|
+
return this._get(options);
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Create a new call log
|
|
354
|
+
* @param params - Call log data
|
|
355
|
+
* @param params.to_phone_number - The number called (required)
|
|
356
|
+
* @param params.outcome - Call result: connected, no_answer, left_message, left_voicemail, wrong_number, busy (required)
|
|
357
|
+
* @param params.start_time - Call start in UTC YYYY-MM-DD HH:MM:SS (required)
|
|
358
|
+
* @param params.end_time - Call end in UTC YYYY-MM-DD HH:MM:SS (required)
|
|
359
|
+
* @param params.person_id - Associated person ID
|
|
360
|
+
* @param params.org_id - Associated organization ID
|
|
361
|
+
* @param params.deal_id - Associated deal ID
|
|
362
|
+
* @param params.subject - Activity name/subject
|
|
363
|
+
* @param params.duration - Duration in seconds
|
|
364
|
+
* @param params.from_phone_number - Caller's number
|
|
365
|
+
* @param params.note - Notes in HTML format
|
|
366
|
+
* @returns Response with created call log data
|
|
367
|
+
*/
|
|
368
|
+
async createCallLog(params) {
|
|
369
|
+
const options = {
|
|
370
|
+
url: this.baseUrl + this.URLs.callLogs,
|
|
371
|
+
body: params,
|
|
372
|
+
headers: {
|
|
373
|
+
"Content-Type": "application/json",
|
|
374
|
+
},
|
|
375
|
+
};
|
|
376
|
+
return this._post(options);
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Update an existing call log
|
|
380
|
+
* @param callLogId - The ID of the call log to update
|
|
381
|
+
* @param params - Fields to update
|
|
382
|
+
* @param params.outcome - Call result
|
|
383
|
+
* @param params.subject - Activity name/subject
|
|
384
|
+
* @param params.note - Notes in HTML format
|
|
385
|
+
* @returns Response with updated call log data
|
|
386
|
+
*/
|
|
387
|
+
async updateCallLog(callLogId, params) {
|
|
388
|
+
const options = {
|
|
389
|
+
url: this.baseUrl + this.URLs.callLogById(callLogId),
|
|
390
|
+
body: params,
|
|
391
|
+
headers: {
|
|
392
|
+
"Content-Type": "application/json",
|
|
393
|
+
},
|
|
394
|
+
};
|
|
395
|
+
return this._patch(options);
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Delete a call log by ID
|
|
399
|
+
* @param callLogId - The ID of the call log to delete
|
|
400
|
+
* @returns Response confirming deletion
|
|
401
|
+
*/
|
|
402
|
+
async deleteCallLog(callLogId) {
|
|
403
|
+
const options = {
|
|
404
|
+
url: this.baseUrl + this.URLs.callLogById(callLogId),
|
|
405
|
+
};
|
|
406
|
+
return this._delete(options);
|
|
407
|
+
}
|
|
322
408
|
}
|
|
323
409
|
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-canary.
|
|
3
|
+
"version": "2.1.0-canary.63.699128f.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": "
|
|
33
|
+
"gitHead": "699128f77c48ef44bebfb61fac203bcfe96a2a34"
|
|
34
34
|
}
|