diff --git a/.gitignore b/.gitignore
index 40754681..149b5765 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,37 +1,4 @@
-# Logs
-logs
-*.log
-npm-debug.log*
-
-# Runtime data
-pids
-*.pid
-*.seed
-
-# Directory for instrumented libs generated by jscoverage/JSCover
-lib-cov
-
-# Coverage directory used by tools like istanbul
-coverage
-
-# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
-.grunt
-
-# node-waf configuration
-.lock-wscript
-
-# Compiled binary addons (http://nodejs.org/api/addons.html)
-build/Release
-
-# Dependency directory
+wwwroot/*.js
node_modules
-
-# Optional npm cache directory
-.npm
-
-# Optional REPL history
-.node_repl_history
-
-.openapi-generator
-.idea
+typings
dist
diff --git a/.npmignore b/.npmignore
index 3e4be464..999d88df 100644
--- a/.npmignore
+++ b/.npmignore
@@ -1,3 +1 @@
-node_modules
-.gitignore
-.DS_Store
+# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm
\ No newline at end of file
diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES
new file mode 100644
index 00000000..37b15d0a
--- /dev/null
+++ b/.openapi-generator/FILES
@@ -0,0 +1,844 @@
+.gitignore
+.npmignore
+README.md
+api.ts
+api/activities-api.ts
+api/activity-fields-api.ts
+api/activity-types-api.ts
+api/billing-api.ts
+api/call-logs-api.ts
+api/channels-api.ts
+api/currencies-api.ts
+api/deal-fields-api.ts
+api/deals-api.ts
+api/files-api.ts
+api/filters-api.ts
+api/goals-api.ts
+api/item-search-api.ts
+api/lead-labels-api.ts
+api/lead-sources-api.ts
+api/leads-api.ts
+api/legacy-teams-api.ts
+api/mailbox-api.ts
+api/note-fields-api.ts
+api/notes-api.ts
+api/organization-fields-api.ts
+api/organization-relationships-api.ts
+api/organizations-api.ts
+api/permission-sets-api.ts
+api/person-fields-api.ts
+api/persons-api.ts
+api/pipelines-api.ts
+api/product-fields-api.ts
+api/products-api.ts
+api/project-templates-api.ts
+api/projects-api.ts
+api/recents-api.ts
+api/roles-api.ts
+api/stages-api.ts
+api/subscriptions-api.ts
+api/tasks-api.ts
+api/user-connections-api.ts
+api/user-settings-api.ts
+api/users-api.ts
+api/webhooks-api.ts
+base.ts
+common.ts
+configuration.ts
+git_push.sh
+index.ts
+models/activity-collection-response-object-all-of.ts
+models/activity-collection-response-object.ts
+models/activity-distribution-data-with-additional-data-all-of-activity-distribution-assignedtouserid.ts
+models/activity-distribution-data-with-additional-data-all-of-activity-distribution-assignedtouseridactivities.ts
+models/activity-distribution-data-with-additional-data-all-of-activity-distribution.ts
+models/activity-distribution-data-with-additional-data-all-of.ts
+models/activity-distribution-data-with-additional-data.ts
+models/activity-response-object-all-of.ts
+models/activity-response-object-all-of1.ts
+models/activity-response-object.ts
+models/add-activity-request-all-of.ts
+models/add-activity-request.ts
+models/add-activity-response200-additional-data.ts
+models/add-activity-response200-related-objects-organization-organizationid.ts
+models/add-activity-response200-related-objects-organization-organizationidall-of.ts
+models/add-activity-response200-related-objects-organization.ts
+models/add-activity-response200-related-objects-person-personid.ts
+models/add-activity-response200-related-objects-person-personidall-of.ts
+models/add-activity-response200-related-objects-person.ts
+models/add-activity-response200-related-objects.ts
+models/add-activity-response200.ts
+models/add-activity-type-request.ts
+models/add-call-log-request.ts
+models/add-channel-request.ts
+models/add-channel200-response-data.ts
+models/add-channel200-response.ts
+models/add-channel400-response-additional-data.ts
+models/add-channel400-response.ts
+models/add-channel403-response-additional-data.ts
+models/add-channel403-response.ts
+models/add-deal-follower-request.ts
+models/add-deal-follower-response200-data.ts
+models/add-deal-follower-response200.ts
+models/add-deal-participant-request.ts
+models/add-deal-participant-response200-data.ts
+models/add-deal-participant-response200-related-objects.ts
+models/add-deal-participant-response200.ts
+models/add-deal-product-request.ts
+models/add-deal-request.ts
+models/add-file-and-link-it-response200.ts
+models/add-file-response200.ts
+models/add-filter-request.ts
+models/add-goal-request.ts
+models/add-lead-label-request.ts
+models/add-lead-request-value.ts
+models/add-lead-request.ts
+models/add-note-request-all-of.ts
+models/add-note-request-all-of1.ts
+models/add-note-request.ts
+models/add-or-update-goal-response200-data-goal-assignee.ts
+models/add-or-update-goal-response200-data-goal-duration.ts
+models/add-or-update-goal-response200-data-goal-expected-outcome.ts
+models/add-or-update-goal-response200-data-goal-type-params.ts
+models/add-or-update-goal-response200-data-goal-type.ts
+models/add-or-update-goal-response200-data-goal.ts
+models/add-or-update-goal-response200-data.ts
+models/add-or-update-goal-response200.ts
+models/add-or-update-lead-label-response200.ts
+models/add-or-update-role-setting-request.ts
+models/add-or-update-role-setting-response200-all-of-data.ts
+models/add-or-update-role-setting-response200-all-of.ts
+models/add-or-update-role-setting-response200.ts
+models/add-organization-follower-request.ts
+models/add-organization-follower-response200.ts
+models/add-organization-relationship-request.ts
+models/add-organization-relationship-response200-all-of.ts
+models/add-organization-relationship-response200.ts
+models/add-organization-request-all-of.ts
+models/add-organization-request.ts
+models/add-organization-response200-all-of.ts
+models/add-organization-response200.ts
+models/add-person-follower-request.ts
+models/add-person-follower-response200-all-of-data.ts
+models/add-person-follower-response200-all-of.ts
+models/add-person-follower-response200.ts
+models/add-person-picture-response200-all-of.ts
+models/add-person-picture-response200.ts
+models/add-person-request-all-of.ts
+models/add-person-request.ts
+models/add-person-response200-all-of.ts
+models/add-person-response200.ts
+models/add-pipeline-response200-all-of-data.ts
+models/add-pipeline-response200-all-of.ts
+models/add-pipeline-response200.ts
+models/add-product-follower-request.ts
+models/add-product-request-all-of.ts
+models/add-product-request.ts
+models/add-product-request1-all-of.ts
+models/add-product-request1.ts
+models/add-project-request-all-of.ts
+models/add-project-request.ts
+models/add-project-response201.ts
+models/add-recurring-subscription-request.ts
+models/add-role-assignment-request.ts
+models/add-role-assignment-response200-all-of-data.ts
+models/add-role-assignment-response200-all-of.ts
+models/add-role-assignment-response200.ts
+models/add-role-request.ts
+models/add-role-response200-all-of-data.ts
+models/add-role-response200-all-of.ts
+models/add-role-response200.ts
+models/add-stage-request.ts
+models/add-subscription-installment-request.ts
+models/add-task-request.ts
+models/add-task-response201.ts
+models/add-team-request.ts
+models/add-team-request1.ts
+models/add-team-user-request.ts
+models/add-user-request-access-inner.ts
+models/add-user-request.ts
+models/add-webhook-request.ts
+models/additional-base-organization-item-info.ts
+models/additional-merge-person-info.ts
+models/additional-person-info.ts
+models/base-deal.ts
+models/base-mail-thread-all-of.ts
+models/base-mail-thread-all-of1-parties-to-inner.ts
+models/base-mail-thread-all-of1-parties.ts
+models/base-mail-thread-all-of1.ts
+models/base-mail-thread.ts
+models/base-mail-thread1.ts
+models/base-organization-item-all-of-picture-id-all-of.ts
+models/base-organization-item-all-of-picture-id.ts
+models/base-organization-item-all-of.ts
+models/base-organization-item-with-edit-name-flag-all-of.ts
+models/base-organization-item-with-edit-name-flag.ts
+models/base-organization-item.ts
+models/base-pipeline-with-selected-flag-all-of.ts
+models/base-pipeline-with-selected-flag.ts
+models/base-response.ts
+models/base-response200-all-of.ts
+models/base-response200.ts
+models/base-role-request.ts
+models/base-team-additional-properties.ts
+models/base-team.ts
+models/basic-deal-product-request.ts
+models/basic-deal.ts
+models/basic-goal-request.ts
+models/basic-organization.ts
+models/basic-person-request-email-inner.ts
+models/basic-person-request.ts
+models/call-log-response200.ts
+models/call-log-response400.ts
+models/call-log-response403.ts
+models/call-log-response404.ts
+models/call-log-response409.ts
+models/call-log-response410.ts
+models/call-log-response500.ts
+models/call-logs-response-additional-data.ts
+models/call-logs-response.ts
+models/cancel-recurring-subscription-request.ts
+models/comment-post-put-object.ts
+models/create-field-request-all-of.ts
+models/create-field-request-all-of1.ts
+models/create-field-request.ts
+models/create-update-delete-activity-type-response200-all-of.ts
+models/create-update-delete-activity-type-response200.ts
+models/deal-collection-response-object.ts
+models/deal-count-and-activity-info-all-of.ts
+models/deal-count-and-activity-info-all-of1.ts
+models/deal-count-and-activity-info.ts
+models/deal-non-strict-all-of-creator-user-id.ts
+models/deal-non-strict-all-of.ts
+models/deal-non-strict-with-details-all-of-age.ts
+models/deal-non-strict-with-details-all-of-average-time-to-won.ts
+models/deal-non-strict-with-details-all-of-stay-in-pipeline-stages.ts
+models/deal-non-strict-with-details-all-of.ts
+models/deal-non-strict-with-details.ts
+models/deal-non-strict.ts
+models/deal-organization-data-with-id-all-of.ts
+models/deal-organization-data-with-id-all-of1.ts
+models/deal-organization-data-with-id.ts
+models/deal-person-data-with-id-all-of-email-inner.ts
+models/deal-person-data-with-id-all-of-phone-inner.ts
+models/deal-person-data-with-id-all-of.ts
+models/deal-person-data-with-id-all-of1.ts
+models/deal-person-data-with-id.ts
+models/deal-response200.ts
+models/deal-strict-all-of.ts
+models/deal-strict.ts
+models/deal-title-param.ts
+models/deal-user-data-with-id-all-of.ts
+models/deal-user-data-with-id-all-of1.ts
+models/deal-user-data-with-id.ts
+models/deals-count-and-activity-info.ts
+models/delete-activities-response200-data.ts
+models/delete-activities-response200.ts
+models/delete-activity-response200-data.ts
+models/delete-activity-response200.ts
+models/delete-activity-types-response200-all-of-data.ts
+models/delete-activity-types-response200-all-of.ts
+models/delete-activity-types-response200.ts
+models/delete-channel200-response.ts
+models/delete-comment-response200.ts
+models/delete-conversation403-response-additional-data.ts
+models/delete-conversation403-response.ts
+models/delete-conversation404-response-additional-data.ts
+models/delete-conversation404-response.ts
+models/delete-deal-follower-response200-data.ts
+models/delete-deal-follower-response200.ts
+models/delete-deal-participant-response200-data.ts
+models/delete-deal-participant-response200.ts
+models/delete-deal-product-response200-data.ts
+models/delete-deal-product-response200.ts
+models/delete-deal-response200-data.ts
+models/delete-deal-response200.ts
+models/delete-deals-response200-data.ts
+models/delete-deals-response200.ts
+models/delete-field-response200-all-of-data.ts
+models/delete-field-response200-all-of.ts
+models/delete-field-response200.ts
+models/delete-fields-response200-all-of-data.ts
+models/delete-fields-response200-all-of.ts
+models/delete-fields-response200.ts
+models/delete-file-response200-data.ts
+models/delete-file-response200.ts
+models/delete-filter-response200-all-of-data.ts
+models/delete-filter-response200-all-of.ts
+models/delete-filter-response200.ts
+models/delete-filters-response200-all-of-data.ts
+models/delete-filters-response200-all-of.ts
+models/delete-filters-response200.ts
+models/delete-goal-response200.ts
+models/delete-mail-thread-response200-all-of-data.ts
+models/delete-mail-thread-response200-all-of.ts
+models/delete-mail-thread-response200.ts
+models/delete-note-response200.ts
+models/delete-organization-follower-response200-data.ts
+models/delete-organization-follower-response200.ts
+models/delete-organization-relationship-response200-all-of-data.ts
+models/delete-organization-relationship-response200-all-of.ts
+models/delete-organization-relationship-response200.ts
+models/delete-organization-response200-data.ts
+models/delete-organization-response200.ts
+models/delete-organizations-response200-data.ts
+models/delete-organizations-response200.ts
+models/delete-person-response200-all-of-data.ts
+models/delete-person-response200-all-of.ts
+models/delete-person-response200.ts
+models/delete-persons-response200-all-of-data.ts
+models/delete-persons-response200-all-of.ts
+models/delete-persons-response200.ts
+models/delete-pipeline-response200-data.ts
+models/delete-pipeline-response200.ts
+models/delete-product-field-response200.ts
+models/delete-product-fields-response200-data.ts
+models/delete-product-fields-response200.ts
+models/delete-product-follower-response200.ts
+models/delete-product-response200-data.ts
+models/delete-product-response200.ts
+models/delete-project-data.ts
+models/delete-project-response200.ts
+models/delete-project.ts
+models/delete-role-assignment-request.ts
+models/delete-role-assignment-response200.ts
+models/delete-role-response200.ts
+models/delete-stage-response200-data.ts
+models/delete-stage-response200.ts
+models/delete-stages-response200-data.ts
+models/delete-stages-response200.ts
+models/delete-task-data.ts
+models/delete-task-response200.ts
+models/delete-task.ts
+models/delete-team-user-request.ts
+models/delete-webhook403-response-all-of.ts
+models/delete-webhook403-response.ts
+models/duplicate-deal-response200.ts
+models/fail-response.ts
+models/field-response200-all-of.ts
+models/field-response200.ts
+models/fields-response200-all-of-additional-data.ts
+models/fields-response200-all-of-data-inner.ts
+models/fields-response200-all-of.ts
+models/fields-response200.ts
+models/full-project-object-all-of.ts
+models/full-project-object-all-of1.ts
+models/full-project-object-all-of2.ts
+models/full-project-object.ts
+models/full-role-all-of.ts
+models/full-role.ts
+models/get-activities-collection-response200-additional-data.ts
+models/get-activities-collection-response200.ts
+models/get-activities-response200-additional-data-pagination.ts
+models/get-activities-response200-additional-data.ts
+models/get-activities-response200-related-objects-deal-dealid.ts
+models/get-activities-response200-related-objects-deal.ts
+models/get-activities-response200-related-objects-organization-organizationid.ts
+models/get-activities-response200-related-objects-organization-organizationidall-of.ts
+models/get-activities-response200-related-objects-organization-organizationidall-of1.ts
+models/get-activities-response200-related-objects-organization.ts
+models/get-activities-response200-related-objects-person-personid.ts
+models/get-activities-response200-related-objects-person-personidall-of-email-inner.ts
+models/get-activities-response200-related-objects-person-personidall-of-phone-inner.ts
+models/get-activities-response200-related-objects-person-personidall-of.ts
+models/get-activities-response200-related-objects-person.ts
+models/get-activities-response200-related-objects-user.ts
+models/get-activities-response200-related-objects.ts
+models/get-activities-response200.ts
+models/get-activity-response200.ts
+models/get-activity-types-response200-all-of-data-inner.ts
+models/get-activity-types-response200-all-of.ts
+models/get-activity-types-response200.ts
+models/get-add-product-attachement-response200-data-all-of-all-of-all-of.ts
+models/get-add-product-attachement-response200-data-all-of-all-of.ts
+models/get-add-product-attachement-response200-data-all-of-all-of1.ts
+models/get-add-product-attachement-response200-data-all-of.ts
+models/get-add-product-attachement-response200-data.ts
+models/get-add-product-attachement-response200.ts
+models/get-all-mail-messages-of-mail-thread-response200-all-of-data-inner-all-of.ts
+models/get-all-mail-messages-of-mail-thread-response200-all-of-data-inner.ts
+models/get-all-mail-messages-of-mail-thread-response200-all-of.ts
+models/get-all-mail-messages-of-mail-thread-response200.ts
+models/get-associated-activities-response200-all-of.ts
+models/get-associated-activities-response200.ts
+models/get-associated-deals-response200-all-of-related-objects-pipeline.ts
+models/get-associated-deals-response200-all-of-related-objects-stage.ts
+models/get-associated-deals-response200-all-of-related-objects.ts
+models/get-associated-deals-response200-all-of.ts
+models/get-associated-deals-response200.ts
+models/get-associated-files-response200-all-of-data-inner.ts
+models/get-associated-files-response200-all-of.ts
+models/get-associated-files-response200.ts
+models/get-associated-files-response2001-all-of-data-inner.ts
+models/get-associated-files-response2001-all-of.ts
+models/get-associated-files-response2001.ts
+models/get-associated-followers-response200-all-of-data-inner.ts
+models/get-associated-followers-response200-all-of.ts
+models/get-associated-followers-response200.ts
+models/get-associated-followers-response2001-data-inner-all-of.ts
+models/get-associated-followers-response2001-data-inner-all-of1.ts
+models/get-associated-followers-response2001-data-inner.ts
+models/get-associated-followers-response2001.ts
+models/get-associated-mail-messages-response200-all-of-data-inner.ts
+models/get-associated-mail-messages-response200-all-of.ts
+models/get-associated-mail-messages-response200.ts
+models/get-associated-person-updates-response200-all-of-data-inner.ts
+models/get-associated-person-updates-response200-all-of.ts
+models/get-associated-person-updates-response200.ts
+models/get-associated-updates-response200-all-of-data-inner.ts
+models/get-associated-updates-response200-all-of-related-objects.ts
+models/get-associated-updates-response200-all-of.ts
+models/get-associated-updates-response200.ts
+models/get-comments-response200-data-inner.ts
+models/get-comments-response200.ts
+models/get-currencies-response200-data-inner.ts
+models/get-currencies-response200.ts
+models/get-current-user-response200-all-of-data-all-of-language.ts
+models/get-current-user-response200-all-of-data-all-of.ts
+models/get-current-user-response200-all-of-data.ts
+models/get-current-user-response200-all-of.ts
+models/get-current-user-response200.ts
+models/get-deal-activities-response200-all-of-related-objects.ts
+models/get-deal-activities-response200-all-of.ts
+models/get-deal-activities-response200.ts
+models/get-deal-participants-response200.ts
+models/get-deal-response200-additional-data.ts
+models/get-deal-response200-related-objects.ts
+models/get-deal-response200.ts
+models/get-deal-updates-response200-all-of-data-inner.ts
+models/get-deal-updates-response200-all-of-related-objects.ts
+models/get-deal-updates-response200-all-of.ts
+models/get-deal-updates-response200.ts
+models/get-deals-collection-response200.ts
+models/get-deals-response200-related-objects.ts
+models/get-deals-response200.ts
+models/get-deals-summary-response200-data-values-total.ts
+models/get-deals-summary-response200-data-weighted-values-total.ts
+models/get-deals-summary-response200-data.ts
+models/get-deals-summary-response200.ts
+models/get-deals-timeline-response200-data-totals.ts
+models/get-deals-timeline-response200-data.ts
+models/get-deals-timeline-response200.ts
+models/get-file-response200.ts
+models/get-files-response200-additional-data.ts
+models/get-files-response200-data-inner.ts
+models/get-files-response200.ts
+models/get-filter-response200-all-of.ts
+models/get-filter-response200.ts
+models/get-filters-response200-all-of-data-inner.ts
+models/get-filters-response200-all-of.ts
+models/get-filters-response200.ts
+models/get-goal-result-response200-data.ts
+models/get-goal-result-response200.ts
+models/get-goals-response200-data.ts
+models/get-goals-response200.ts
+models/get-lead-labels-response200-data-inner.ts
+models/get-lead-labels-response200.ts
+models/get-lead-sources-response200-data-inner.ts
+models/get-lead-sources-response200.ts
+models/get-leads-response200-data-inner-value.ts
+models/get-leads-response200-data-inner.ts
+models/get-leads-response200.ts
+models/get-mail-threads-response200-all-of.ts
+models/get-mail-threads-response200.ts
+models/get-note-fields-response200-all-of-data-inner-options-inner.ts
+models/get-note-fields-response200-all-of-data-inner.ts
+models/get-note-fields-response200-all-of.ts
+models/get-note-fields-response200.ts
+models/get-notes-response200-additional-data-pagination.ts
+models/get-notes-response200-additional-data.ts
+models/get-notes-response200-data-inner-deal.ts
+models/get-notes-response200-data-inner-organization.ts
+models/get-notes-response200-data-inner-person.ts
+models/get-notes-response200-data-inner-user.ts
+models/get-notes-response200-data-inner.ts
+models/get-notes-response200.ts
+models/get-one-mail-thread-response200-all-of-data.ts
+models/get-one-mail-thread-response200-all-of.ts
+models/get-one-mail-thread-response200.ts
+models/get-organization-relationship-response200-all-of.ts
+models/get-organization-relationship-response200.ts
+models/get-organization-relationships-response200-all-of-related-objects.ts
+models/get-organization-relationships-response200-all-of.ts
+models/get-organization-relationships-response200.ts
+models/get-organization-response200-all-of-additional-data-followers-followeruserid.ts
+models/get-organization-response200-all-of-additional-data-followers-followeruseridall-of-all-of.ts
+models/get-organization-response200-all-of-additional-data-followers-followeruseridall-of-all-of1.ts
+models/get-organization-response200-all-of-additional-data-followers-followeruseridall-of.ts
+models/get-organization-response200-all-of-additional-data-followers.ts
+models/get-organization-response200-all-of-additional-data.ts
+models/get-organization-response200-all-of.ts
+models/get-organization-response200.ts
+models/get-organizations-collection200-response.ts
+models/get-organizations-response200-all-of-related-objects-picture-pictureid.ts
+models/get-organizations-response200-all-of-related-objects-picture.ts
+models/get-organizations-response200-all-of-related-objects.ts
+models/get-organizations-response200-all-of.ts
+models/get-organizations-response200.ts
+models/get-permission-sets-response200-all-of-data-inner.ts
+models/get-permission-sets-response200-all-of.ts
+models/get-permission-sets-response200.ts
+models/get-person-products-response200-all-of-data-inner-dealid.ts
+models/get-person-products-response200-all-of-data-inner-dealiddeal.ts
+models/get-person-products-response200-all-of-data-inner-dealidproduct.ts
+models/get-person-products-response200-all-of-data-inner.ts
+models/get-person-products-response200-all-of.ts
+models/get-person-products-response200.ts
+models/get-person-response200-all-of-additional-data.ts
+models/get-person-response200-all-of.ts
+models/get-person-response200.ts
+models/get-persons-collection200-response.ts
+models/get-persons-response200-all-of.ts
+models/get-persons-response200.ts
+models/get-pipeline-conversion-statistics-response200-all-of-data-stage-conversions-inner.ts
+models/get-pipeline-conversion-statistics-response200-all-of-data.ts
+models/get-pipeline-conversion-statistics-response200-all-of.ts
+models/get-pipeline-conversion-statistics-response200.ts
+models/get-pipeline-movement-statistics-response200-all-of-data-average-age-in-days-by-stages-inner.ts
+models/get-pipeline-movement-statistics-response200-all-of-data-average-age-in-days.ts
+models/get-pipeline-movement-statistics-response200-all-of-data-movements-between-stages.ts
+models/get-pipeline-movement-statistics-response200-all-of-data-new-deals-formatted-values.ts
+models/get-pipeline-movement-statistics-response200-all-of-data-new-deals-values.ts
+models/get-pipeline-movement-statistics-response200-all-of-data-new-deals.ts
+models/get-pipeline-movement-statistics-response200-all-of-data.ts
+models/get-pipeline-movement-statistics-response200-all-of.ts
+models/get-pipeline-movement-statistics-response200.ts
+models/get-pipeline-response200-all-of.ts
+models/get-pipeline-response200.ts
+models/get-pipelines-response200-all-of.ts
+models/get-pipelines-response200.ts
+models/get-product-attachement-response200-data.ts
+models/get-product-attachement-response200.ts
+models/get-product-field-response200-data.ts
+models/get-product-field-response200.ts
+models/get-product-fields-response200.ts
+models/get-product-followers-response-success-all-of-data-inner.ts
+models/get-product-followers-response-success-all-of.ts
+models/get-product-followers-response-success.ts
+models/get-products-response200-additional-data.ts
+models/get-products-response200.ts
+models/get-project-board-response200.ts
+models/get-project-boards-response200-data-inner.ts
+models/get-project-boards-response200.ts
+models/get-project-groups-response200-data-inner.ts
+models/get-project-groups-response200.ts
+models/get-project-phase-response200.ts
+models/get-project-phases-response200-data-inner.ts
+models/get-project-phases-response200.ts
+models/get-project-plan-response200-data-inner.ts
+models/get-project-plan-response200.ts
+models/get-project-response200.ts
+models/get-project-template-response200.ts
+models/get-project-templates-response200.ts
+models/get-projects-response200.ts
+models/get-recents-response200-additional-data.ts
+models/get-recents-response200-data-inner-any-of.ts
+models/get-recents-response200-data-inner-any-of1.ts
+models/get-recents-response200-data-inner-any-of10.ts
+models/get-recents-response200-data-inner-any-of11-data-access-inner.ts
+models/get-recents-response200-data-inner-any-of11-data.ts
+models/get-recents-response200-data-inner-any-of11.ts
+models/get-recents-response200-data-inner-any-of2.ts
+models/get-recents-response200-data-inner-any-of3.ts
+models/get-recents-response200-data-inner-any-of4.ts
+models/get-recents-response200-data-inner-any-of5.ts
+models/get-recents-response200-data-inner-any-of6.ts
+models/get-recents-response200-data-inner-any-of7.ts
+models/get-recents-response200-data-inner-any-of8.ts
+models/get-recents-response200-data-inner-any-of9-data.ts
+models/get-recents-response200-data-inner-any-of9.ts
+models/get-recents-response200-data-inner.ts
+models/get-recents-response200.ts
+models/get-role-pipelines200-all-of-data.ts
+models/get-role-pipelines200-all-of.ts
+models/get-role-pipelines200.ts
+models/get-role-response200-all-of-additional-data-settings.ts
+models/get-role-response200-all-of-additional-data.ts
+models/get-role-response200-all-of.ts
+models/get-role-response200.ts
+models/get-role-settings-response200-all-of.ts
+models/get-role-settings-response200.ts
+models/get-roles-response200-all-of-additional-data-pagination.ts
+models/get-roles-response200-all-of-additional-data.ts
+models/get-roles-response200-all-of.ts
+models/get-roles-response200.ts
+models/get-stage-deals-response200.ts
+models/get-stage-response200-data.ts
+models/get-stage-response200.ts
+models/get-stages-response200-data-inner-all-of.ts
+models/get-stages-response200-data-inner.ts
+models/get-stages-response200.ts
+models/get-task-response200.ts
+models/get-tasks-response200.ts
+models/get-user-permissions-response200-all-of-data.ts
+models/get-user-permissions-response200-all-of.ts
+models/get-user-permissions-response200.ts
+models/get-user-role-assignments-response200-all-of.ts
+models/get-user-role-assignments-response200.ts
+models/get-user-settings-response200-all-of-data.ts
+models/get-user-settings-response200-all-of.ts
+models/get-user-settings-response200.ts
+models/get-webhooks-response200-all-of-data-inner.ts
+models/get-webhooks-response200-all-of.ts
+models/get-webhooks-response200.ts
+models/getproduct-response200-data-all-of.ts
+models/getproduct-response200-data.ts
+models/getproduct-response200.ts
+models/index.ts
+models/lead-id-response200-data.ts
+models/lead-id-response200.ts
+models/lead-response404.ts
+models/link-file-to-item-response200.ts
+models/list-permitted-users-response200-all-of-data.ts
+models/list-permitted-users-response200-all-of.ts
+models/list-permitted-users-response200.ts
+models/list-permitted-users-response2001-all-of.ts
+models/list-permitted-users-response2001.ts
+models/list-persons-response200-all-of-related-objects.ts
+models/list-persons-response200-all-of.ts
+models/list-persons-response200.ts
+models/list-products-response200-all-of-additional-data-all-of.ts
+models/list-products-response200-all-of-additional-data.ts
+models/list-products-response200-all-of-data-inner-product-all-of.ts
+models/list-products-response200-all-of-data-inner-product-all-of1.ts
+models/list-products-response200-all-of-data-inner-product.ts
+models/list-products-response200-all-of-data-inner.ts
+models/list-products-response200-all-of-related-objects.ts
+models/list-products-response200-all-of.ts
+models/list-products-response200.ts
+models/mail-message-item-for-list-all-of-from-inner.ts
+models/mail-message-item-for-list-all-of.ts
+models/mail-message-item-for-list-all-of1.ts
+models/mail-message-item-for-list.ts
+models/mail-message-response200-all-of.ts
+models/mail-message-response200-all-of1.ts
+models/mail-message-response200.ts
+models/merge-deals-request.ts
+models/merge-deals-response200-data-all-of.ts
+models/merge-deals-response200-data.ts
+models/merge-deals-response200.ts
+models/merge-organizations-request.ts
+models/merge-organizations-response200-data.ts
+models/merge-organizations-response200.ts
+models/merge-person-deal-related-info-all-of.ts
+models/merge-person-deal-related-info.ts
+models/merge-person-item.ts
+models/merge-persons-request.ts
+models/merge-persons-response200-all-of.ts
+models/merge-persons-response200.ts
+models/new-deal-parameters.ts
+models/new-follower-response200-data.ts
+models/new-follower-response200.ts
+models/note-request-all-of.ts
+models/note-request-all-of1.ts
+models/note-request.ts
+models/one-comment-response200.ts
+models/one-lead-response200.ts
+models/one-note-response200.ts
+models/organization-count-and-address-info-all-of.ts
+models/organization-count-and-address-info-all-of1.ts
+models/organization-count-and-address-info.ts
+models/organization-item-all-of.ts
+models/organization-item.ts
+models/organization-relationship-details-all-of.ts
+models/organization-relationship-details.ts
+models/organization-relationship-with-calculated-fields-all-of.ts
+models/organization-relationship-with-calculated-fields-all-of1.ts
+models/organization-relationship-with-calculated-fields.ts
+models/organization-relationship.ts
+models/organizations-collection-response-object-all-of.ts
+models/organizations-collection-response-object.ts
+models/owner-all-of.ts
+models/owner.ts
+models/pagination-details-all-of.ts
+models/pagination-details.ts
+models/payment-response200-all-of-data-inner.ts
+models/payment-response200-all-of.ts
+models/payment-response200.ts
+models/person-count-and-email-info-all-of.ts
+models/person-count-and-email-info-all-of1.ts
+models/person-count-and-email-info.ts
+models/person-count-email-deal-and-activity-info.ts
+models/person-item-all-of-email-inner.ts
+models/person-item-all-of-phone-inner.ts
+models/person-item-all-of-picture-id-all-of.ts
+models/person-item-all-of-picture-id-all-of1-pictures.ts
+models/person-item-all-of-picture-id-all-of1.ts
+models/person-item-all-of-picture-id.ts
+models/person-item-all-of.ts
+models/person-item.ts
+models/person-name-count-and-email-info-with-ids-all-of.ts
+models/person-name-count-and-email-info-with-ids.ts
+models/person-name-count-and-email-info.ts
+models/person-name-info-with-org-and-owner-id-all-of.ts
+models/person-name-info-with-org-and-owner-id-all-of1.ts
+models/person-name-info-with-org-and-owner-id.ts
+models/persons-collection-response-object.ts
+models/pipeline-details-all-of-deals-summary-per-currency-full-currencyid.ts
+models/pipeline-details-all-of-deals-summary-per-currency-full.ts
+models/pipeline-details-all-of-deals-summary-per-currency.ts
+models/pipeline-details-all-of-deals-summary-per-stages-stageid.ts
+models/pipeline-details-all-of-deals-summary-per-stages-stageidcurrencyid.ts
+models/pipeline-details-all-of-deals-summary-per-stages.ts
+models/pipeline-details-all-of-deals-summary.ts
+models/pipeline-details-all-of.ts
+models/pipeline-details.ts
+models/pipeline-request.ts
+models/pipeline-request1.ts
+models/post-filter-response200-all-of-data.ts
+models/post-filter-response200-all-of.ts
+models/post-filter-response200.ts
+models/product-field-all-of.ts
+models/product-field-all-of1.ts
+models/product-field.ts
+models/product-request.ts
+models/project-put-plan-item-body-object.ts
+models/project-response-object-all-of.ts
+models/project-response-object.ts
+models/put-role-pipelines-body.ts
+models/receive-message-request-attachments-inner.ts
+models/receive-message-request.ts
+models/receive-message200-response.ts
+models/receive-message400-response-additional-data.ts
+models/receive-message400-response.ts
+models/relationship-organization-info-item-all-of.ts
+models/relationship-organization-info-item-with-active-flag.ts
+models/relationship-organization-info-item.ts
+models/requied-post-project-parameters.ts
+models/required-post-project-parameters.ts
+models/requred-title-parameter.ts
+models/response-call-log-object-all-of.ts
+models/response-call-log-object.ts
+models/role-assignment-all-of.ts
+models/role-assignment.ts
+models/search-deals-response200-all-of-data-items-inner-item-organization.ts
+models/search-deals-response200-all-of-data-items-inner-item-owner.ts
+models/search-deals-response200-all-of-data-items-inner-item-person.ts
+models/search-deals-response200-all-of-data-items-inner-item-stage.ts
+models/search-deals-response200-all-of-data-items-inner-item.ts
+models/search-deals-response200-all-of-data-items-inner.ts
+models/search-deals-response200-all-of-data.ts
+models/search-deals-response200-all-of.ts
+models/search-deals-response200.ts
+models/search-item-by-field-response200-all-of-data-inner.ts
+models/search-item-by-field-response200-all-of.ts
+models/search-item-by-field-response200.ts
+models/search-item-response200-all-of-data-items-inner.ts
+models/search-item-response200-all-of-data.ts
+models/search-item-response200-all-of.ts
+models/search-item-response200.ts
+models/search-leads-response200-all-of-data-items-inner-item-organization.ts
+models/search-leads-response200-all-of-data-items-inner-item-owner.ts
+models/search-leads-response200-all-of-data-items-inner-item-person.ts
+models/search-leads-response200-all-of-data-items-inner-item.ts
+models/search-leads-response200-all-of-data-items-inner.ts
+models/search-leads-response200-all-of-data.ts
+models/search-leads-response200-all-of.ts
+models/search-leads-response200.ts
+models/search-organization-response200-all-of-data-items-inner-item.ts
+models/search-organization-response200-all-of-data-items-inner.ts
+models/search-organization-response200-all-of-data.ts
+models/search-organization-response200-all-of.ts
+models/search-organization-response200.ts
+models/search-persons-response200-all-of-data-items-inner-item-organization.ts
+models/search-persons-response200-all-of-data-items-inner-item-owner.ts
+models/search-persons-response200-all-of-data-items-inner-item.ts
+models/search-persons-response200-all-of-data-items-inner.ts
+models/search-persons-response200-all-of-data.ts
+models/search-persons-response200-all-of.ts
+models/search-persons-response200.ts
+models/search-products-response200-all-of-data-items-inner-item-owner.ts
+models/search-products-response200-all-of-data-items-inner-item.ts
+models/search-products-response200-all-of-data-items-inner.ts
+models/search-products-response200-all-of-data.ts
+models/search-products-response200-all-of.ts
+models/search-products-response200.ts
+models/single-permission-set-response200-all-of.ts
+models/single-permission-set-response200.ts
+models/stage-response200-data.ts
+models/stage-response200.ts
+models/sub-role-all-of.ts
+models/sub-role.ts
+models/subscription-addons-response200-all-of.ts
+models/subscription-addons-response200.ts
+models/subscriptions-id-response200-all-of-data.ts
+models/subscriptions-id-response200-all-of.ts
+models/subscriptions-id-response200.ts
+models/task-response-object-all-of.ts
+models/task-response-object.ts
+models/team-id.ts
+models/team-response200-all-of.ts
+models/team-response200.ts
+models/teams-response200-all-of.ts
+models/teams-response200.ts
+models/template-response-object-all-of.ts
+models/template-response-object.ts
+models/unathorized-response.ts
+models/update-activity-request-all-of.ts
+models/update-activity-request.ts
+models/update-activity-response200.ts
+models/update-activity-type-request.ts
+models/update-deal-parameters.ts
+models/update-deal-product-request.ts
+models/update-deal-request.ts
+models/update-field-request.ts
+models/update-file-response200.ts
+models/update-filter-request.ts
+models/update-lead-label-request.ts
+models/update-lead-request-value.ts
+models/update-lead-request.ts
+models/update-mail-thread-details-response200-all-of.ts
+models/update-mail-thread-details-response200.ts
+models/update-organization-relationship-response200.ts
+models/update-organization-request-all-of.ts
+models/update-organization-request.ts
+models/update-organization-response200-all-of.ts
+models/update-organization-response200.ts
+models/update-person-request-all-of.ts
+models/update-person-request.ts
+models/update-person-response200.ts
+models/update-pipeline-response200-all-of-data.ts
+models/update-pipeline-response200-all-of.ts
+models/update-pipeline-response200.ts
+models/update-product-field-response200.ts
+models/update-product-response200.ts
+models/update-project-request.ts
+models/update-project-request1-all-of.ts
+models/update-project-request1-all-of1.ts
+models/update-project-request1-all-of2.ts
+models/update-project-request1.ts
+models/update-project-request2.ts
+models/update-project-response200.ts
+models/update-recurring-subscription-request.ts
+models/update-role-response200.ts
+models/update-stage-request-all-of.ts
+models/update-stage-request-all-of1.ts
+models/update-stage-request.ts
+models/update-subscription-installment-request.ts
+models/update-task-response200.ts
+models/update-team-request-all-of.ts
+models/update-team-request.ts
+models/update-team-with-additional-properties.ts
+models/update-user-request.ts
+models/updated-activity-plan-item200.ts
+models/updated-task-plan-item200.ts
+models/user-assignments-to-permission-set-response200-all-of-data-inner.ts
+models/user-assignments-to-permission-set-response200-all-of.ts
+models/user-assignments-to-permission-set-response200.ts
+models/user-connections-response200-all-of-data.ts
+models/user-connections-response200-all-of.ts
+models/user-connections-response200.ts
+models/user-data-with-id-all-of.ts
+models/user-data-with-id.ts
+models/user-ids-all-of.ts
+models/user-ids.ts
+models/user-response200-all-of.ts
+models/user-response200.ts
+models/users-response200-all-of.ts
+models/users-response200.ts
+models/webhook-response200-all-of.ts
+models/webhook-response200.ts
+models/webhooks-bad-request-response-all-of.ts
+models/webhooks-bad-request-response.ts
+tsconfig.esm.json
+tsconfig.json
diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION
new file mode 100644
index 00000000..0df17dd0
--- /dev/null
+++ b/.openapi-generator/VERSION
@@ -0,0 +1 @@
+6.2.1
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a5b0f66a..2dc77cdd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,7 @@ The file format of it is based on [Keep a Changelog](http://keepachangelog.com/e
For public Changelog covering all changes done to Pipedrive’s API, webhooks and app extensions platforms, see [public Changelog](https://pipedrive.readme.io/docs/changelog) with discussion area in [Developers Community](https://devcommunity.pipedrive.com/c/documentation/changelog/19).
## [Unreleased]
+- Add `lead_id` as an acceptable body parameter for the `POST /v1/callLogs` endpoint
## [22.3.0] - 2023-10-17
- Add `Projects`, `ProjectTemplates` and `Tasks` public routes.
diff --git a/README.md b/README.md
index 1d6a3a06..1e444f24 100644
--- a/README.md
+++ b/README.md
@@ -1,103 +1,81 @@
# Pipedrive client for NodeJS based apps
-Pipedrive is a sales pipeline software that gets you organized.
-It's a powerful sales CRM with effortless sales pipeline management.
-See www.pipedrive.com for details.
-This is the official Pipedrive API wrapper-client for NodeJS based apps, distributed by Pipedrive Inc freely under the MIT licence.
-It provides convenient access to the Pipedrive API, allowing you to operate with objects such as Deals, Persons, Organizations, Products and much more.
+Pipedrive is a sales pipeline software that gets you organized. It's a powerful sales CRM with effortless sales pipeline management. See www.pipedrive.com for details.
-## Table of Contents
-- [Installation](#installation)
-
-- [API Reference](#api-reference)
-
-- [How to use it](#how-to-use-it)
-
- - [With a pre-set API token](#with-a-pre-set-api-token)
-
- - [With OAuth2](#with-oauth2)
-
- - [Authorizing your client](#authorizing-your-client)
-
- - [Storing an access token for reuse](#storing-an-access-token-for-reuse)
-
- - [Complete example](#complete-example)
-
-- [Documentation for Authorization](#documentation-for-authorization)
-
-- [Documentation for API Endpoints](#documentation-for-api-endpoints)
-
-- [Documentation for Models](#documentation-for-models)
+This is the official Pipedrive API wrapper-client for NodeJS based apps, distributed by Pipedrive Inc freely under the MIT license. It provides convenient access to the Pipedrive API, allowing you to operate with objects such as Deals, Persons, Organizations, Products and much more.
## Installation
+
```
-npm install pipedrive
+npm install pipedrive@1.0.0 --save
```
## API Reference
+
The Pipedrive RESTful API Reference can be found at https://developers.pipedrive.com/docs/api/v1.
Pipedrive API’s core concepts for its usage can be found in our [Developer documentation](https://pipedrive.readme.io/docs/core-api-concepts-about-pipedrive-api).
-## How to use it
-
-> **Warning**
->
-> The `pipedrive.ApiClient.instance` has been deprecated.
->
-> Please, initialise a `new pipedrive.ApiClient()` instance separately for each request instead.
+## How to use it?
### With a pre-set API token
+
You can retrieve the api_token from your existing Pipedrive account’s settings page. A step-by-step guide is available [here](https://pipedrive.readme.io/docs/how-to-find-the-api-token).
-```JavaScript
-const express = require('express');
+```typescript
+import express from "express";
+import { Configuration, DealsApi } from "pipedrive";
+
const app = express();
-const pipedrive = require('pipedrive');
const PORT = 1800;
-const defaultClient = new pipedrive.ApiClient();
-
-// Configure API key authorization: apiToken
-let apiToken = defaultClient.authentications.api_key;
-apiToken.apiKey = 'YOUR_API_TOKEN_HERE';
+// Configure Client with API key authorization
+const apiConfig = new Configuration({
+ apiKey: "YOUR_API_TOKEN_HERE",
+});
app.listen(PORT, () => {
- console.log(`Listening on port ${PORT}`);
+ console.log(`Listening on port ${PORT}`);
});
-app.get('/', async (req, res) => {
- const api = new pipedrive.DealsApi(defaultClient);
- const deals = await api.getDeals();
+app.get("/", async (req, res) => {
+ const dealsApi = new DealsApi(apiConfig);
+ const response = await dealsApi.getDeals();
+ const { data: deals } = response.data;
- res.send(deals);
+ res.send(deals);
});
-
```
-### With OAuth2
+### With OAuth 2
+
If you would like to use an OAuth access token for making API calls, then make sure the API key described in the previous section is not set or is set to an empty string. If both API token and OAuth access token are set, then the API token takes precedence.
To set up authentication in the API client, you need the following information. You can receive the necessary client tokens through a Sandbox account (get it [here](https://developers.pipedrive.com/start-here)) and generate the tokens (detailed steps [here](https://pipedrive.readme.io/docs/marketplace-manager#section-how-to-get-your-client-id-and-client-secret)).
-| Parameter | Description |
-|-----------|-------------|
-| clientId | OAuth 2 Client ID |
-| clientSecret | OAuth 2 Client Secret |
-| redirectUri | OAuth 2 Redirection endpoint or Callback Uri |
+| Parameter | Description |
+| ------------ | -------------------------------------------- |
+| clientId | OAuth 2 Client ID |
+| clientSecret | OAuth 2 Client Secret |
+| redirectUri | OAuth 2 Redirection endpoint or Callback Uri |
Next, initialize the API client as follows:
-```JavaScript
-const pipedrive = require('pipedrive');
-
-const apiClient = new pipedrive.ApiClient();
+```typescript
+import { OAuth2Configuration, Configuration } from 'pipedrive';
// Configuration parameters and credentials
-let oauth2 = apiClient.authentications.oauth2;
-oauth2.clientId = 'clientId'; // OAuth 2 Client ID
-oauth2.clientSecret = 'clientSecret'; // OAuth 2 Client Secret
-oauth2.redirectUri = 'redirectUri'; // OAuth 2 Redirection endpoint or Callback Uri
+const oauth2 = new OAuth2Configuration({
+ clientId: "clientId", // OAuth 2 Client ID
+ clientSecret: "clientSecret", // OAuth 2 Client Secret
+ redirectUri: 'redirectUri'; // OAuth 2 Redirection endpoint or Callback Uri
+});
+
+const apiConfig = new Configuration({
+ accessToken: oauth2.getAccessToken,
+ basePath: oauth2.basePath,
+});
+
```
You must now authorize the client.
@@ -108,11 +86,11 @@ Your application must obtain user authorization before it can execute an endpoin
#### 1. Obtaining user consent
-To obtain user's consent, you must redirect the user to the authorization page. The `buildAuthorizationUrl()` method creates the URL to the authorization page.
+To obtain user's consent, you must redirect the user to the authorization page. The `authorizationUrl` returns the URL to the authorization page.
-```JavaScript
-const authUrl = apiClient.buildAuthorizationUrl();
+```typescript
// open up the authUrl in the browser
+const authUrl = oauth2.authorizationUrl;
```
#### 2. Handle the OAuth server response
@@ -133,28 +111,20 @@ https://example.com/oauth/callback?error=access_denied
#### 3. Authorize the client using the code
-After the server receives the code, it can exchange this for an *access token*.
-The access token is an object containing information for authorizing the client and refreshing the token itself.
-In the API client all the access token fields are held separately in the `authentications.oauth2` object.
-Additionally access token expiration time as an `authentications.oauth2.expiresAt` field is calculated.
-It is measured in the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC.
+After the server receives the code, it can exchange this for an _access token_. The access token is an object containing information for authorizing the client and refreshing the token itself. In the API client all the access token fields are held separately in the `OAuth2Configuration` class. Additionally access token expiration time as an `OAuth2Configuration.expiresAt` field is calculated. It is measured in the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC.
-```JavaScript
-const tokenPromise = apiClient.authorize(code);
+```typescript
+const token = await oauth2.authorize(code);
```
+
The Node.js SDK supports only promises. So, the authorize call returns a promise.
### Refreshing token
-Access tokens may expire after sometime. To extend its lifetime, you must refresh the token.
+Access tokens may expire after sometime, if it necessary you can do it manually.
-```JavaScript
-const refreshPromise = apiClient.refreshToken();
-refreshPromise.then(() => {
- // token has been refreshed
-} , (exception) => {
- // error occurred, exception will be of type src/exceptions/OAuthProviderException
-});
+```typescript
+const newToken = await oauth2.tokenRefresh();
```
If the access token expires, the SDK will attempt to automatically refresh it before the next endpoint call which requires authentication.
@@ -163,63 +133,42 @@ If the access token expires, the SDK will attempt to automatically refresh it be
It is recommended that you store the access token for reuse.
-This code snippet stores the access token in a session for an express application.
-It uses the [cookie-parser](https://www.npmjs.com/package/cookie-parser) and [cookie-session](https://www.npmjs.com/package/cookie-session) npm packages for storing the access token.
+This code snippet stores the access token in a session for an express application. It uses the [cookie-parser](https://www.npmjs.com/package/cookie-parser) and [cookie-session](https://www.npmjs.com/package/cookie-session) npm packages for storing the access token.
-```JavaScript
-const express = require('express');
-const cookieParser = require('cookie-parser');
-const cookieSession = require('cookie-session');
+```typescript
+import express from "express";
+import cookieParse from "cookie-parser";
+import cookeSession from "cookie-session";
+import { Configuration, DealsApi, OAuth2Configuration } from "pipedrive";
const app = express();
+
app.use(cookieParser());
app.use(cookieSession({
- name: 'session',
- keys: ['key1']
+ name: "session",
+ keys: ["key1"]
}));
-const lib = require('pipedrive');
...
+
// store access token in the session
// note that this is only the access token field value not the whole token object
-req.session.accessToken = apiClient.authentications.oauth2.accessToken;
+req.session.accessToken = await oauth.getAccessToken();
```
However, since the SDK will attempt to automatically refresh the access token when it expires,
it is recommended that you register a **token update callback** to detect any change to the access token.
-```JavaScript
-apiClient.authentications.oauth2.tokenUpdateCallback = function(token) {
- // getting the updated token
- // here the token is an object, you can store the whole object or extract fields into separate values
- req.session.token = token;
-}
+```typescript
+oauth2.onTokenUpdate = function (token) {
+ // getting the updated token
+ // here the token is an object, you can store the whole object or extract fields into separate values
+ req.session.token = token;
+};
```
The token update callback will be fired upon authorization as well as token refresh.
-To authorize a client from a stored access token, just set the access token in api client oauth2 authentication object along with the other configuration parameters before making endpoint calls:
-> NB! This code only supports one client and should not be used as production code. Please store a separate access token for each client.
-
-```JavaScript
-const express = require('express');
-const cookieParser = require('cookie-parser');
-const cookieSession = require('cookie-session');
-
-const app = express();
-app.use(cookieParser());
-app.use(cookieSession({
- name: 'session',
- keys: ['key1']
-}));
-
-const lib = require('pipedrive');
-
-app.get('/', (req, res) => {
- apiClient.authentications.oauth2.accessToken = req.session.accessToken; // the access token stored in the session
-});
-```
-
### Complete example
This example demonstrates an express application (which uses [cookie-parser](https://www.npmjs.com/package/cookie-parser) and [cookie-session](https://www.npmjs.com/package/cookie-session)) for handling session persistence.
@@ -231,62 +180,352 @@ However, if the token is not set in the session, then authorization URL is built
The response comes back at the `'/callback'` endpoint, which uses the code to authorize the client and store the token in the session.
It then redirects back to the base endpoint for calling endpoints from the SDK.
-```JavaScript
-const express = require('express');
+```typescript
+
+import express from "express";
+import cookieParse from "cookie-parser";
+import cookeSession from "cookie-session";
+import { Configuration, DealsApi, OAuth2Configuration } from "pipedrive";
+
const app = express();
-const cookieParser = require('cookie-parser');
-const cookieSession = require('cookie-session');
app.use(cookieParser());
app.use(cookieSession({
- name: 'session',
- keys: ['key1']
+ name: "session",
+ keys: ["key1"]
}));
+
const PORT = 1800;
-const pipedrive = require('pipedrive');
-const apiClient = new pipedrive.ApiClient();
+const oauth2 = new OAuth2Configuration({
+ clientId: "clientId", // OAuth 2 Client ID
+ clientSecret: "clientSecret", // OAuth 2 Client Secret
+ redirectUri: 'redirectUri'; // OAuth 2 Redirection endpoint or Callback Uri
+});
+
+const apiConfig = new Configuration({
+ accessToken: oauth2.getAccessToken,
+ basePath: oauth2.basePath,
+});
-let oauth2 = apiClient.authentications.oauth2;
-oauth2.clientId = 'clientId'; // OAuth 2 Client ID
-oauth2.clientSecret = 'clientSecret'; // OAuth 2 Client Secret
-oauth2.redirectUri = 'http://localhost:1800/callback'; // OAuth 2 Redirection endpoint or Callback Uri
app.listen(PORT, () => {
console.log(`Listening on port ${PORT}`);
});
app.get('/', async (req, res) => {
- if (req.session.accessToken !== null && req.session.accessToken !== undefined) {
- // token is already set in the session
- // now make API calls as required
- // client will automatically refresh the token when it expires and call the token update callback
- const api = new pipedrive.DealsApi(apiClient);
- const deals = await api.getDeals();
-
- res.send(deals);
- } else {
- const authUrl = apiClient.buildAuthorizationUrl();;
-
- res.redirect(authUrl);
+ // method will handle return null if token is not available in the session
+ const token = oauth2.updateToken(req.session?.accessToken);
+
+ if (!token) {
+ const authUrl = oauth2.authorizationUrl;
+ return res.redirect(authUrl);
}
+
+
+ const apiConfig = new Configuration({
+ accessToken: oauth2.getAccessToken,
+ basePath: oauth2.basePath,
+ });
+
+ // token is already set in the session
+ // now make API calls as required
+ // client will automatically refresh the token when it expires and call the token update callback
+ const api = new DealsApi(apiClient);
+ const response = await dealsApi.getDeals();
+ const { data: deals } = response.data;
+
+ res.send(deals);
});
-app.get('/callback', (req, res) => {
+app.get('/callback', async (req, res) => {
const authCode = req.query.code;
- const promise = apiClient.authorize(authCode);
+ const newAccessToken = await oauth2.authorize(authCode);
- promise.then(() => {
- req.session.accessToken = apiClient.authentications.oauth2.accessToken;
- res.redirect('/');
- }, (exception) => {
- // error occurred, exception will be of type src/exceptions/OAuthProviderException
- });
+ req.session.accessToken = newAccessToken;
+ res.redirect("/");
});
```
+## List of API Endpoints
+
+All URIs are relative to _https://api.pipedrive.com/v1_
+
+Class | Method | HTTP request | Description |
+------------ | ------------- | ------------- | ------------- |
+ActivitiesApi | addActivity | **POST** /activities | Add an activity
+ActivitiesApi | deleteActivities | **DELETE** /activities | Delete multiple activities in bulk
+ActivitiesApi | deleteActivity | **DELETE** /activities/{id} | Delete an activity
+ActivitiesApi | getActivities | **GET** /activities | Get all activities assigned to a particular user
+ActivitiesApi | getActivitiesCollection | **GET** /activities/collection | Get all activities (BETA)
+ActivitiesApi | getActivity | **GET** /activities/{id} | Get details of an activity
+ActivitiesApi | updateActivity | **PUT** /activities/{id} | Update an activity
+ActivityFieldsApi | getActivityFields | **GET** /activityFields | Get all activity fields
+ActivityTypesApi | addActivityType | **POST** /activityTypes | Add new activity type
+ActivityTypesApi | deleteActivityType | **DELETE** /activityTypes/{id} | Delete an activity type
+ActivityTypesApi | deleteActivityTypes | **DELETE** /activityTypes | Delete multiple activity types in bulk
+ActivityTypesApi | getActivityTypes | **GET** /activityTypes | Get all activity types
+ActivityTypesApi | updateActivityType | **PUT** /activityTypes/{id} | Update an activity type
+BillingApi | getCompanyAddons | **GET** /billing/subscriptions/addons | Get all add-ons for a single company
+CallLogsApi | addCallLog | **POST** /callLogs | Add a call log
+CallLogsApi | addCallLogAudioFile | **POST** /callLogs/{id}/recordings | Attach an audio file to the call log
+CallLogsApi | deleteCallLog | **DELETE** /callLogs/{id} | Delete a call log
+CallLogsApi | getCallLog | **GET** /callLogs/{id} | Get details of a call log
+CallLogsApi | getUserCallLogs | **GET** /callLogs | Get all call logs assigned to a particular user
+ChannelsApi | addChannel | **POST** /channels | Add a channel
+ChannelsApi | deleteChannel | **DELETE** /channels/{id} | Delete a channel
+ChannelsApi | deleteConversation | **DELETE** /channels/{channel-id}/conversations/{conversation-id} | Delete a conversation
+ChannelsApi | receiveMessage | **POST** /channels/messages/receive | Receives an incoming message
+CurrenciesApi | getCurrencies | **GET** /currencies | Get all supported currencies
+DealFieldsApi | addDealField | **POST** /dealFields | Add a new deal field
+DealFieldsApi | deleteDealField | **DELETE** /dealFields/{id} | Delete a deal field
+DealFieldsApi | deleteDealFields | **DELETE** /dealFields | Delete multiple deal fields in bulk
+DealFieldsApi | getDealField | **GET** /dealFields/{id} | Get one deal field
+DealFieldsApi | getDealFields | **GET** /dealFields | Get all deal fields
+DealFieldsApi | updateDealField | **PUT** /dealFields/{id} | Update a deal field
+DealsApi | addDeal | **POST** /deals | Add a deal
+DealsApi | addDealFollower | **POST** /deals/{id}/followers | Add a follower to a deal
+DealsApi | addDealParticipant | **POST** /deals/{id}/participants | Add a participant to a deal
+DealsApi | addDealProduct | **POST** /deals/{id}/products | Add a product to a deal
+DealsApi | deleteDeal | **DELETE** /deals/{id} | Delete a deal
+DealsApi | deleteDealFollower | **DELETE** /deals/{id}/followers/{follower_id} | Delete a follower from a deal
+DealsApi | deleteDealParticipant | **DELETE** /deals/{id}/participants/{deal_participant_id} | Delete a participant from a deal
+DealsApi | deleteDealProduct | **DELETE** /deals/{id}/products/{product_attachment_id} | Delete an attached product from a deal
+DealsApi | deleteDeals | **DELETE** /deals | Delete multiple deals in bulk
+DealsApi | duplicateDeal | **POST** /deals/{id}/duplicate | Duplicate deal
+DealsApi | getDeal | **GET** /deals/{id} | Get details of a deal
+DealsApi | getDealActivities | **GET** /deals/{id}/activities | List activities associated with a deal
+DealsApi | getDealFiles | **GET** /deals/{id}/files | List files attached to a deal
+DealsApi | getDealFollowers | **GET** /deals/{id}/followers | List followers of a deal
+DealsApi | getDealMailMessages | **GET** /deals/{id}/mailMessages | List mail messages associated with a deal
+DealsApi | getDealParticipants | **GET** /deals/{id}/participants | List participants of a deal
+DealsApi | getDealPersons | **GET** /deals/{id}/persons | List all persons associated with a deal
+DealsApi | getDealProducts | **GET** /deals/{id}/products | List products attached to a deal
+DealsApi | getDealUpdates | **GET** /deals/{id}/flow | List updates about a deal
+DealsApi | getDealUsers | **GET** /deals/{id}/permittedUsers | List permitted users
+DealsApi | getDeals | **GET** /deals | Get all deals
+DealsApi | getDealsCollection | **GET** /deals/collection | Get all deals (BETA)
+DealsApi | getDealsSummary | **GET** /deals/summary | Get deals summary
+DealsApi | getDealsTimeline | **GET** /deals/timeline | Get deals timeline
+DealsApi | mergeDeals | **PUT** /deals/{id}/merge | Merge two deals
+DealsApi | searchDeals | **GET** /deals/search | Search deals
+DealsApi | updateDeal | **PUT** /deals/{id} | Update a deal
+DealsApi | updateDealProduct | **PUT** /deals/{id}/products/{product_attachment_id} | Update the product attached to a deal
+FilesApi | addFile | **POST** /files | Add file
+FilesApi | addFileAndLinkIt | **POST** /files/remote | Create a remote file and link it to an item
+FilesApi | deleteFile | **DELETE** /files/{id} | Delete a file
+FilesApi | downloadFile | **GET** /files/{id}/download | Download one file
+FilesApi | getFile | **GET** /files/{id} | Get one file
+FilesApi | getFiles | **GET** /files | Get all files
+FilesApi | linkFileToItem | **POST** /files/remoteLink | Link a remote file to an item
+FilesApi | updateFile | **PUT** /files/{id} | Update file details
+FiltersApi | addFilter | **POST** /filters | Add a new filter
+FiltersApi | deleteFilter | **DELETE** /filters/{id} | Delete a filter
+FiltersApi | deleteFilters | **DELETE** /filters | Delete multiple filters in bulk
+FiltersApi | getFilter | **GET** /filters/{id} | Get one filter
+FiltersApi | getFilterHelpers | **GET** /filters/helpers | Get all filter helpers
+FiltersApi | getFilters | **GET** /filters | Get all filters
+FiltersApi | updateFilter | **PUT** /filters/{id} | Update filter
+GoalsApi | addGoal | **POST** /goals | Add a new goal
+GoalsApi | deleteGoal | **DELETE** /goals/{id} | Delete existing goal
+GoalsApi | getGoalResult | **GET** /goals/{id}/results | Get result of a goal
+GoalsApi | getGoals | **GET** /goals/find | Find goals
+GoalsApi | updateGoal | **PUT** /goals/{id} | Update existing goal
+ItemSearchApi | searchItem | **GET** /itemSearch | Perform a search from multiple item types
+ItemSearchApi | searchItemByField | **GET** /itemSearch/field | Perform a search using a specific field from an item type
+LeadLabelsApi | addLeadLabel | **POST** /leadLabels | Add a lead label
+LeadLabelsApi | deleteLeadLabel | **DELETE** /leadLabels/{id} | Delete a lead label
+LeadLabelsApi | getLeadLabels | **GET** /leadLabels | Get all lead labels
+LeadLabelsApi | updateLeadLabel | **PATCH** /leadLabels/{id} | Update a lead label
+LeadSourcesApi | getLeadSources | **GET** /leadSources | Get all lead sources
+LeadsApi | addLead | **POST** /leads | Add a lead
+LeadsApi | deleteLead | **DELETE** /leads/{id} | Delete a lead
+LeadsApi | getLead | **GET** /leads/{id} | Get one lead
+LeadsApi | getLeadUsers | **GET** /leads/{id}/permittedUsers | List permitted users
+LeadsApi | getLeads | **GET** /leads | Get all leads
+LeadsApi | searchLeads | **GET** /leads/search | Search leads
+LeadsApi | updateLead | **PATCH** /leads/{id} | Update a lead
+LegacyTeamsApi | addTeam | **POST** /legacyTeams | Add a new team
+LegacyTeamsApi | addTeamUser | **POST** /legacyTeams/{id}/users | Add users to a team
+LegacyTeamsApi | deleteTeamUser | **DELETE** /legacyTeams/{id}/users | Delete users from a team
+LegacyTeamsApi | getTeam | **GET** /legacyTeams/{id} | Get a single team
+LegacyTeamsApi | getTeamUsers | **GET** /legacyTeams/{id}/users | Get all users in a team
+LegacyTeamsApi | getTeams | **GET** /legacyTeams | Get all teams
+LegacyTeamsApi | getUserTeams | **GET** /legacyTeams/user/{id} | Get all teams of a user
+LegacyTeamsApi | updateTeam | **PUT** /legacyTeams/{id} | Update a team
+MailboxApi | deleteMailThread | **DELETE** /mailbox/mailThreads/{id} | Delete mail thread
+MailboxApi | getMailMessage | **GET** /mailbox/mailMessages/{id} | Get one mail message
+MailboxApi | getMailThread | **GET** /mailbox/mailThreads/{id} | Get one mail thread
+MailboxApi | getMailThreadMessages | **GET** /mailbox/mailThreads/{id}/mailMessages | Get all mail messages of mail thread
+MailboxApi | getMailThreads | **GET** /mailbox/mailThreads | Get mail threads
+MailboxApi | updateMailThreadDetails | **PUT** /mailbox/mailThreads/{id} | Update mail thread details
+NoteFieldsApi | getNoteFields | **GET** /noteFields | Get all note fields
+NotesApi | addNote | **POST** /notes | Add a note
+NotesApi | addNoteComment | **POST** /notes/{id}/comments | Add a comment to a note
+NotesApi | deleteComment | **DELETE** /notes/{id}/comments/{commentId} | Delete a comment related to a note
+NotesApi | deleteNote | **DELETE** /notes/{id} | Delete a note
+NotesApi | getComment | **GET** /notes/{id}/comments/{commentId} | Get one comment
+NotesApi | getNote | **GET** /notes/{id} | Get one note
+NotesApi | getNoteComments | **GET** /notes/{id}/comments | Get all comments for a note
+NotesApi | getNotes | **GET** /notes | Get all notes
+NotesApi | updateCommentForNote | **PUT** /notes/{id}/comments/{commentId} | Update a comment related to a note
+NotesApi | updateNote | **PUT** /notes/{id} | Update a note
+OrganizationFieldsApi | addOrganizationField | **POST** /organizationFields | Add a new organization field
+OrganizationFieldsApi | deleteOrganizationField | **DELETE** /organizationFields/{id} | Delete an organization field
+OrganizationFieldsApi | deleteOrganizationFields | **DELETE** /organizationFields | Delete multiple organization fields in bulk
+OrganizationFieldsApi | getOrganizationField | **GET** /organizationFields/{id} | Get one organization field
+OrganizationFieldsApi | getOrganizationFields | **GET** /organizationFields | Get all organization fields
+OrganizationFieldsApi | updateOrganizationField | **PUT** /organizationFields/{id} | Update an organization field
+OrganizationRelationshipsApi | addOrganizationRelationship | **POST** /organizationRelationships | Create an organization relationship
+OrganizationRelationshipsApi | deleteOrganizationRelationship | **DELETE** /organizationRelationships/{id} | Delete an organization relationship
+OrganizationRelationshipsApi | getOrganizationRelationship | **GET** /organizationRelationships/{id} | Get one organization relationship
+OrganizationRelationshipsApi | getOrganizationRelationships | **GET** /organizationRelationships | Get all relationships for organization
+OrganizationRelationshipsApi | updateOrganizationRelationship | **PUT** /organizationRelationships/{id} | Update an organization relationship
+OrganizationsApi | addOrganization | **POST** /organizations | Add an organization
+OrganizationsApi | addOrganizationFollower | **POST** /organizations/{id}/followers | Add a follower to an organization
+OrganizationsApi | deleteOrganization | **DELETE** /organizations/{id} | Delete an organization
+OrganizationsApi | deleteOrganizationFollower | **DELETE** /organizations/{id}/followers/{follower_id} | Delete a follower from an organization
+OrganizationsApi | deleteOrganizations | **DELETE** /organizations | Delete multiple organizations in bulk
+OrganizationsApi | getOrganization | **GET** /organizations/{id} | Get details of an organization
+OrganizationsApi | getOrganizationActivities | **GET** /organizations/{id}/activities | List activities associated with an organization
+OrganizationsApi | getOrganizationDeals | **GET** /organizations/{id}/deals | List deals associated with an organization
+OrganizationsApi | getOrganizationFiles | **GET** /organizations/{id}/files | List files attached to an organization
+OrganizationsApi | getOrganizationFollowers | **GET** /organizations/{id}/followers | List followers of an organization
+OrganizationsApi | getOrganizationMailMessages | **GET** /organizations/{id}/mailMessages | List mail messages associated with an organization
+OrganizationsApi | getOrganizationPersons | **GET** /organizations/{id}/persons | List persons of an organization
+OrganizationsApi | getOrganizationUpdates | **GET** /organizations/{id}/flow | List updates about an organization
+OrganizationsApi | getOrganizationUsers | **GET** /organizations/{id}/permittedUsers | List permitted users
+OrganizationsApi | getOrganizations | **GET** /organizations | Get all organizations
+OrganizationsApi | getOrganizationsCollection | **GET** /organizations/collection | Get all organizations (BETA)
+OrganizationsApi | mergeOrganizations | **PUT** /organizations/{id}/merge | Merge two organizations
+OrganizationsApi | searchOrganization | **GET** /organizations/search | Search organizations
+OrganizationsApi | updateOrganization | **PUT** /organizations/{id} | Update an organization
+PermissionSetsApi | getPermissionSet | **GET** /permissionSets/{id} | Get one permission set
+PermissionSetsApi | getPermissionSetAssignments | **GET** /permissionSets/{id}/assignments | List permission set assignments
+PermissionSetsApi | getPermissionSets | **GET** /permissionSets | Get all permission sets
+PersonFieldsApi | addPersonField | **POST** /personFields | Add a new person field
+PersonFieldsApi | deletePersonField | **DELETE** /personFields/{id} | Delete a person field
+PersonFieldsApi | deletePersonFields | **DELETE** /personFields | Delete multiple person fields in bulk
+PersonFieldsApi | getPersonField | **GET** /personFields/{id} | Get one person field
+PersonFieldsApi | getPersonFields | **GET** /personFields | Get all person fields
+PersonFieldsApi | updatePersonField | **PUT** /personFields/{id} | Update a person field
+PersonsApi | addPerson | **POST** /persons | Add a person
+PersonsApi | addPersonFollower | **POST** /persons/{id}/followers | Add a follower to a person
+PersonsApi | addPersonPicture | **POST** /persons/{id}/picture | Add person picture
+PersonsApi | deletePerson | **DELETE** /persons/{id} | Delete a person
+PersonsApi | deletePersonFollower | **DELETE** /persons/{id}/followers/{follower_id} | Delete a follower from a person
+PersonsApi | deletePersonPicture | **DELETE** /persons/{id}/picture | Delete person picture
+PersonsApi | deletePersons | **DELETE** /persons | Delete multiple persons in bulk
+PersonsApi | getPerson | **GET** /persons/{id} | Get details of a person
+PersonsApi | getPersonActivities | **GET** /persons/{id}/activities | List activities associated with a person
+PersonsApi | getPersonDeals | **GET** /persons/{id}/deals | List deals associated with a person
+PersonsApi | getPersonFiles | **GET** /persons/{id}/files | List files attached to a person
+PersonsApi | getPersonFollowers | **GET** /persons/{id}/followers | List followers of a person
+PersonsApi | getPersonMailMessages | **GET** /persons/{id}/mailMessages | List mail messages associated with a person
+PersonsApi | getPersonProducts | **GET** /persons/{id}/products | List products associated with a person
+PersonsApi | getPersonUpdates | **GET** /persons/{id}/flow | List updates about a person
+PersonsApi | getPersonUsers | **GET** /persons/{id}/permittedUsers | List permitted users
+PersonsApi | getPersons | **GET** /persons | Get all persons
+PersonsApi | getPersonsCollection | **GET** /persons/collection | Get all persons (BETA)
+PersonsApi | mergePersons | **PUT** /persons/{id}/merge | Merge two persons
+PersonsApi | searchPersons | **GET** /persons/search | Search persons
+PersonsApi | updatePerson | **PUT** /persons/{id} | Update a person
+PipelinesApi | addPipeline | **POST** /pipelines | Add a new pipeline
+PipelinesApi | deletePipeline | **DELETE** /pipelines/{id} | Delete a pipeline
+PipelinesApi | getPipeline | **GET** /pipelines/{id} | Get one pipeline
+PipelinesApi | getPipelineConversionStatistics | **GET** /pipelines/{id}/conversion_statistics | Get deals conversion rates in pipeline
+PipelinesApi | getPipelineDeals | **GET** /pipelines/{id}/deals | Get deals in a pipeline
+PipelinesApi | getPipelineMovementStatistics | **GET** /pipelines/{id}/movement_statistics | Get deals movements in pipeline
+PipelinesApi | getPipelines | **GET** /pipelines | Get all pipelines
+PipelinesApi | updatePipeline | **PUT** /pipelines/{id} | Update a pipeline
+ProductFieldsApi | addProductField | **POST** /productFields | Add a new product field
+ProductFieldsApi | deleteProductField | **DELETE** /productFields/{id} | Delete a product field
+ProductFieldsApi | deleteProductFields | **DELETE** /productFields | Delete multiple product fields in bulk
+ProductFieldsApi | getProductField | **GET** /productFields/{id} | Get one product field
+ProductFieldsApi | getProductFields | **GET** /productFields | Get all product fields
+ProductFieldsApi | updateProductField | **PUT** /productFields/{id} | Update a product field
+ProductsApi | addProduct | **POST** /products | Add a product
+ProductsApi | addProductFollower | **POST** /products/{id}/followers | Add a follower to a product
+ProductsApi | deleteProduct | **DELETE** /products/{id} | Delete a product
+ProductsApi | deleteProductFollower | **DELETE** /products/{id}/followers/{follower_id} | Delete a follower from a product
+ProductsApi | getProduct | **GET** /products/{id} | Get one product
+ProductsApi | getProductDeals | **GET** /products/{id}/deals | Get deals where a product is attached to
+ProductsApi | getProductFiles | **GET** /products/{id}/files | List files attached to a product
+ProductsApi | getProductFollowers | **GET** /products/{id}/followers | List followers of a product
+ProductsApi | getProductUsers | **GET** /products/{id}/permittedUsers | List permitted users
+ProductsApi | getProducts | **GET** /products | Get all products
+ProductsApi | searchProducts | **GET** /products/search | Search products
+ProductsApi | updateProduct | **PUT** /products/{id} | Update a product
+ProjectTemplatesApi | getProjectTemplate | **GET** /projectTemplates/{id} | Get details of a template
+ProjectTemplatesApi | getProjectTemplates | **GET** /projectTemplates | Get all project templates
+ProjectTemplatesApi | getProjectsBoard | **GET** /projects/boards/{id} | Get details of a board
+ProjectTemplatesApi | getProjectsPhase | **GET** /projects/phases/{id} | Get details of a phase
+ProjectsApi | addProject | **POST** /projects | Add a project
+ProjectsApi | archiveProject | **POST** /projects/{id}/archive | Archive a project
+ProjectsApi | deleteProject | **DELETE** /projects/{id} | Delete a project
+ProjectsApi | getProject | **GET** /projects/{id} | Get details of a project
+ProjectsApi | getProjectActivities | **GET** /projects/{id}/activities | Returns project activities
+ProjectsApi | getProjectGroups | **GET** /projects/{id}/groups | Returns project groups
+ProjectsApi | getProjectPlan | **GET** /projects/{id}/plan | Returns project plan
+ProjectsApi | getProjectTasks | **GET** /projects/{id}/tasks | Returns project tasks
+ProjectsApi | getProjects | **GET** /projects | Get all projects
+ProjectsApi | getProjectsBoards | **GET** /projects/boards | Get all project boards
+ProjectsApi | getProjectsPhases | **GET** /projects/phases | Get project phases
+ProjectsApi | putProjectPlanActivity | **PUT** /projects/{id}/plan/activities/{activityId} | Update activity in project plan
+ProjectsApi | putProjectPlanTask | **PUT** /projects/{id}/plan/tasks/{taskId} | Update task in project plan
+ProjectsApi | updateProject | **PUT** /projects/{id} | Update a project
+RecentsApi | getRecents | **GET** /recents | Get recents
+RolesApi | addOrUpdateRoleSetting | **POST** /roles/{id}/settings | Add or update role setting
+RolesApi | addRole | **POST** /roles | Add a role
+RolesApi | addRoleAssignment | **POST** /roles/{id}/assignments | Add role assignment
+RolesApi | deleteRole | **DELETE** /roles/{id} | Delete a role
+RolesApi | deleteRoleAssignment | **DELETE** /roles/{id}/assignments | Delete a role assignment
+RolesApi | getRole | **GET** /roles/{id} | Get one role
+RolesApi | getRoleAssignments | **GET** /roles/{id}/assignments | List role assignments
+RolesApi | getRolePipelines | **GET** /roles/{id}/pipelines | List pipeline visibility for a role
+RolesApi | getRoleSettings | **GET** /roles/{id}/settings | List role settings
+RolesApi | getRoles | **GET** /roles | Get all roles
+RolesApi | updateRole | **PUT** /roles/{id} | Update role details
+RolesApi | updateRolePipelines | **PUT** /roles/{id}/pipelines | Update pipeline visibility for a role
+StagesApi | addStage | **POST** /stages | Add a new stage
+StagesApi | deleteStage | **DELETE** /stages/{id} | Delete a stage
+StagesApi | deleteStages | **DELETE** /stages | Delete multiple stages in bulk
+StagesApi | getStage | **GET** /stages/{id} | Get one stage
+StagesApi | getStageDeals | **GET** /stages/{id}/deals | Get deals in a stage
+StagesApi | getStages | **GET** /stages | Get all stages
+StagesApi | updateStage | **PUT** /stages/{id} | Update stage details
+SubscriptionsApi | addRecurringSubscription | **POST** /subscriptions/recurring | Add a recurring subscription
+SubscriptionsApi | addSubscriptionInstallment | **POST** /subscriptions/installment | Add an installment subscription
+SubscriptionsApi | cancelRecurringSubscription | **PUT** /subscriptions/recurring/{id}/cancel | Cancel a recurring subscription
+SubscriptionsApi | deleteSubscription | **DELETE** /subscriptions/{id} | Delete a subscription
+SubscriptionsApi | findSubscriptionByDeal | **GET** /subscriptions/find/{dealId} | Find subscription by deal
+SubscriptionsApi | getSubscription | **GET** /subscriptions/{id} | Get details of a subscription
+SubscriptionsApi | getSubscriptionPayments | **GET** /subscriptions/{id}/payments | Get all payments of a subscription
+SubscriptionsApi | updateRecurringSubscription | **PUT** /subscriptions/recurring/{id} | Update a recurring subscription
+SubscriptionsApi | updateSubscriptionInstallment | **PUT** /subscriptions/installment/{id} | Update an installment subscription
+TasksApi | addTask | **POST** /tasks | Add a task
+TasksApi | deleteTask | **DELETE** /tasks/{id} | Delete a task
+TasksApi | getTask | **GET** /tasks/{id} | Get details of a task
+TasksApi | getTasks | **GET** /tasks | Get all tasks
+TasksApi | updateTask | **PUT** /tasks/{id} | Update a task
+UserConnectionsApi | getUserConnections | **GET** /userConnections | Get all user connections
+UserSettingsApi | getUserSettings | **GET** /userSettings | List settings of an authorized user
+UsersApi | addUser | **POST** /users | Add a new user
+UsersApi | findUsersByName | **GET** /users/find | Find users by name
+UsersApi | getCurrentUser | **GET** /users/me | Get current user data
+UsersApi | getUser | **GET** /users/{id} | Get one user
+UsersApi | getUserFollowers | **GET** /users/{id}/followers | List followers of a user
+UsersApi | getUserPermissions | **GET** /users/{id}/permissions | List user permissions
+UsersApi | getUserRoleAssignments | **GET** /users/{id}/roleAssignments | List role assignments
+UsersApi | getUserRoleSettings | **GET** /users/{id}/roleSettings | List user role settings
+UsersApi | getUsers | **GET** /users | Get all users
+UsersApi | updateUser | **PUT** /users/{id} | Update user details
+WebhooksApi | addWebhook | **POST** /webhooks | Create a new Webhook
+WebhooksApi | deleteWebhook | **DELETE** /webhooks/{id} | Delete existing Webhook
+WebhooksApi | getWebhooks | **GET** /webhooks | Get all Webhooks
+
## Documentation for Authorization
@@ -307,1103 +546,28 @@ app.get('/callback', (req, res) => {
- **Flow**: accessCode
- **Authorization URL**: https://oauth.pipedrive.com/oauth/authorize
- **Scopes**:
- - base: Read settings of the authorized user and currencies in an account
- - deals:read: Read most of the data about deals and related entities - deal fields, products, followers, participants; all notes, files, filters, pipelines, stages, and statistics. Does not include access to activities (except the last and next activity related to a deal)
- - deals:full: Create, read, update and delete deals, its participants and followers; all files, notes, and filters. It also includes read access to deal fields, pipelines, stages, and statistics. Does not include access to activities (except the last and next activity related to a deal)
- - mail:read: Read mail threads and messages
- - mail:full: Read, update and delete mail threads. Also grants read access to mail messages
- - activities:read: Read activities, its fields and types; all files and filters
- - activities:full: Create, read, update and delete activities and all files and filters. Also includes read access to activity fields and types
- - contacts:read: Read the data about persons and organizations, their related fields and followers; also all notes, files, filters
- - contacts:full: Create, read, update and delete persons and organizations and their followers; all notes, files, filters. Also grants read access to contacts-related fields
- - products:read: Read products, its fields, files, followers and products connected to a deal
- - products:full: Create, read, update and delete products and its fields; add products to deals
- - projects:read: Read projects and its fields, tasks and project templates
- - projects:full: Create, read, update and delete projects and its fields; add projects templates and project related tasks
- - users:read: Read data about users (people with access to a Pipedrive account), their permissions, roles and followers
- - recents:read: Read all recent changes occurred in an account. Includes data about activities, activity types, deals, files, filters, notes, persons, organizations, pipelines, stages, products and users
- - search:read: Search across the account for deals, persons, organizations, files and products, and see details about the returned results
- - admin: Allows to do many things that an administrator can do in a Pipedrive company account - create, read, update and delete pipelines and its stages; deal, person and organization fields; activity types; users and permissions, etc. It also allows the app to create webhooks and fetch and delete webhooks that are created by the app
- - leads:read: Read data about leads and lead labels
- - leads:full: Create, read, update and delete leads and lead labels
- - phone-integration: Enables advanced call integration features like logging call duration and other metadata, and play call recordings inside Pipedrive
- - goals:read: Read data on all goals
- - goals:full: Create, read, update and delete goals
- - video-calls: Allows application to register as a video call integration provider and create conference links
- - messengers-integration: Allows application to register as a messengers integration provider and allows them to deliver incoming messages and their statuses
-
-
-
-## Documentation for API Endpoints
-
-All URIs are relative to *https://api.pipedrive.com/v1*
-
-Code examples are available through the links in the list below or on the
-[Pipedrive Developers Tutorials](https://pipedrive.readme.io/docs/tutorials) page
-
-Class | Method | HTTP request | Description
------------- | ------------- | ------------- | -------------
-*Pipedrive.ActivitiesApi* | [**addActivity**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivitiesApi.md#addActivity) | **POST** /activities | Add an activity
-*Pipedrive.ActivitiesApi* | [**deleteActivities**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivitiesApi.md#deleteActivities) | **DELETE** /activities | Delete multiple activities in bulk
-*Pipedrive.ActivitiesApi* | [**deleteActivity**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivitiesApi.md#deleteActivity) | **DELETE** /activities/{id} | Delete an activity
-*Pipedrive.ActivitiesApi* | [**getActivities**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivitiesApi.md#getActivities) | **GET** /activities | Get all activities assigned to a particular user
-*Pipedrive.ActivitiesApi* | [**getActivitiesCollection**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivitiesApi.md#getActivitiesCollection) | **GET** /activities/collection | Get all activities (BETA)
-*Pipedrive.ActivitiesApi* | [**getActivity**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivitiesApi.md#getActivity) | **GET** /activities/{id} | Get details of an activity
-*Pipedrive.ActivitiesApi* | [**updateActivity**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivitiesApi.md#updateActivity) | **PUT** /activities/{id} | Update an activity
-*Pipedrive.ActivityFieldsApi* | [**getActivityFields**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityFieldsApi.md#getActivityFields) | **GET** /activityFields | Get all activity fields
-*Pipedrive.ActivityTypesApi* | [**addActivityType**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityTypesApi.md#addActivityType) | **POST** /activityTypes | Add new activity type
-*Pipedrive.ActivityTypesApi* | [**deleteActivityType**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityTypesApi.md#deleteActivityType) | **DELETE** /activityTypes/{id} | Delete an activity type
-*Pipedrive.ActivityTypesApi* | [**deleteActivityTypes**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityTypesApi.md#deleteActivityTypes) | **DELETE** /activityTypes | Delete multiple activity types in bulk
-*Pipedrive.ActivityTypesApi* | [**getActivityTypes**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityTypesApi.md#getActivityTypes) | **GET** /activityTypes | Get all activity types
-*Pipedrive.ActivityTypesApi* | [**updateActivityType**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityTypesApi.md#updateActivityType) | **PUT** /activityTypes/{id} | Update an activity type
-*Pipedrive.BillingApi* | [**getCompanyAddons**](https://github.com/pipedrive/client-nodejs/blob/master/docs/BillingApi.md#getCompanyAddons) | **GET** /billing/subscriptions/addons | Get all add-ons for a single company
-*Pipedrive.CallLogsApi* | [**addCallLog**](https://github.com/pipedrive/client-nodejs/blob/master/docs/CallLogsApi.md#addCallLog) | **POST** /callLogs | Add a call log
-*Pipedrive.CallLogsApi* | [**addCallLogAudioFile**](https://github.com/pipedrive/client-nodejs/blob/master/docs/CallLogsApi.md#addCallLogAudioFile) | **POST** /callLogs/{id}/recordings | Attach an audio file to the call log
-*Pipedrive.CallLogsApi* | [**deleteCallLog**](https://github.com/pipedrive/client-nodejs/blob/master/docs/CallLogsApi.md#deleteCallLog) | **DELETE** /callLogs/{id} | Delete a call log
-*Pipedrive.CallLogsApi* | [**getCallLog**](https://github.com/pipedrive/client-nodejs/blob/master/docs/CallLogsApi.md#getCallLog) | **GET** /callLogs/{id} | Get details of a call log
-*Pipedrive.CallLogsApi* | [**getUserCallLogs**](https://github.com/pipedrive/client-nodejs/blob/master/docs/CallLogsApi.md#getUserCallLogs) | **GET** /callLogs | Get all call logs assigned to a particular user
-*Pipedrive.ChannelsApi* | [**addChannel**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ChannelsApi.md#addChannel) | **POST** /channels | Add a channel
-*Pipedrive.ChannelsApi* | [**deleteChannel**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ChannelsApi.md#deleteChannel) | **DELETE** /channels/{id} | Delete a channel
-*Pipedrive.ChannelsApi* | [**deleteConversation**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ChannelsApi.md#deleteConversation) | **DELETE** /channels/{channel-id}/conversations/{conversation-id} | Delete a conversation
-*Pipedrive.ChannelsApi* | [**receiveMessage**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ChannelsApi.md#receiveMessage) | **POST** /channels/messages/receive | Receives an incoming message
-*Pipedrive.CurrenciesApi* | [**getCurrencies**](https://github.com/pipedrive/client-nodejs/blob/master/docs/CurrenciesApi.md#getCurrencies) | **GET** /currencies | Get all supported currencies
-*Pipedrive.DealFieldsApi* | [**addDealField**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealFieldsApi.md#addDealField) | **POST** /dealFields | Add a new deal field
-*Pipedrive.DealFieldsApi* | [**deleteDealField**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealFieldsApi.md#deleteDealField) | **DELETE** /dealFields/{id} | Delete a deal field
-*Pipedrive.DealFieldsApi* | [**deleteDealFields**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealFieldsApi.md#deleteDealFields) | **DELETE** /dealFields | Delete multiple deal fields in bulk
-*Pipedrive.DealFieldsApi* | [**getDealField**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealFieldsApi.md#getDealField) | **GET** /dealFields/{id} | Get one deal field
-*Pipedrive.DealFieldsApi* | [**getDealFields**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealFieldsApi.md#getDealFields) | **GET** /dealFields | Get all deal fields
-*Pipedrive.DealFieldsApi* | [**updateDealField**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealFieldsApi.md#updateDealField) | **PUT** /dealFields/{id} | Update a deal field
-*Pipedrive.DealsApi* | [**addDeal**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#addDeal) | **POST** /deals | Add a deal
-*Pipedrive.DealsApi* | [**addDealFollower**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#addDealFollower) | **POST** /deals/{id}/followers | Add a follower to a deal
-*Pipedrive.DealsApi* | [**addDealParticipant**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#addDealParticipant) | **POST** /deals/{id}/participants | Add a participant to a deal
-*Pipedrive.DealsApi* | [**addDealProduct**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#addDealProduct) | **POST** /deals/{id}/products | Add a product to a deal
-*Pipedrive.DealsApi* | [**deleteDeal**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#deleteDeal) | **DELETE** /deals/{id} | Delete a deal
-*Pipedrive.DealsApi* | [**deleteDealFollower**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#deleteDealFollower) | **DELETE** /deals/{id}/followers/{follower_id} | Delete a follower from a deal
-*Pipedrive.DealsApi* | [**deleteDealParticipant**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#deleteDealParticipant) | **DELETE** /deals/{id}/participants/{deal_participant_id} | Delete a participant from a deal
-*Pipedrive.DealsApi* | [**deleteDealProduct**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#deleteDealProduct) | **DELETE** /deals/{id}/products/{product_attachment_id} | Delete an attached product from a deal
-*Pipedrive.DealsApi* | [**deleteDeals**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#deleteDeals) | **DELETE** /deals | Delete multiple deals in bulk
-*Pipedrive.DealsApi* | [**duplicateDeal**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#duplicateDeal) | **POST** /deals/{id}/duplicate | Duplicate deal
-*Pipedrive.DealsApi* | [**getDeal**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDeal) | **GET** /deals/{id} | Get details of a deal
-*Pipedrive.DealsApi* | [**getDealActivities**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealActivities) | **GET** /deals/{id}/activities | List activities associated with a deal
-*Pipedrive.DealsApi* | [**getDealFiles**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealFiles) | **GET** /deals/{id}/files | List files attached to a deal
-*Pipedrive.DealsApi* | [**getDealFollowers**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealFollowers) | **GET** /deals/{id}/followers | List followers of a deal
-*Pipedrive.DealsApi* | [**getDealMailMessages**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealMailMessages) | **GET** /deals/{id}/mailMessages | List mail messages associated with a deal
-*Pipedrive.DealsApi* | [**getDealParticipants**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealParticipants) | **GET** /deals/{id}/participants | List participants of a deal
-*Pipedrive.DealsApi* | [**getDealPersons**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealPersons) | **GET** /deals/{id}/persons | List all persons associated with a deal
-*Pipedrive.DealsApi* | [**getDealProducts**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealProducts) | **GET** /deals/{id}/products | List products attached to a deal
-*Pipedrive.DealsApi* | [**getDealUpdates**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealUpdates) | **GET** /deals/{id}/flow | List updates about a deal
-*Pipedrive.DealsApi* | [**getDealUsers**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealUsers) | **GET** /deals/{id}/permittedUsers | List permitted users
-*Pipedrive.DealsApi* | [**getDeals**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDeals) | **GET** /deals | Get all deals
-*Pipedrive.DealsApi* | [**getDealsCollection**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealsCollection) | **GET** /deals/collection | Get all deals (BETA)
-*Pipedrive.DealsApi* | [**getDealsSummary**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealsSummary) | **GET** /deals/summary | Get deals summary
-*Pipedrive.DealsApi* | [**getDealsTimeline**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealsTimeline) | **GET** /deals/timeline | Get deals timeline
-*Pipedrive.DealsApi* | [**mergeDeals**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#mergeDeals) | **PUT** /deals/{id}/merge | Merge two deals
-*Pipedrive.DealsApi* | [**searchDeals**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#searchDeals) | **GET** /deals/search | Search deals
-*Pipedrive.DealsApi* | [**updateDeal**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#updateDeal) | **PUT** /deals/{id} | Update a deal
-*Pipedrive.DealsApi* | [**updateDealProduct**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#updateDealProduct) | **PUT** /deals/{id}/products/{product_attachment_id} | Update the product attached to a deal
-*Pipedrive.FilesApi* | [**addFile**](https://github.com/pipedrive/client-nodejs/blob/master/docs/FilesApi.md#addFile) | **POST** /files | Add file
-*Pipedrive.FilesApi* | [**addFileAndLinkIt**](https://github.com/pipedrive/client-nodejs/blob/master/docs/FilesApi.md#addFileAndLinkIt) | **POST** /files/remote | Create a remote file and link it to an item
-*Pipedrive.FilesApi* | [**deleteFile**](https://github.com/pipedrive/client-nodejs/blob/master/docs/FilesApi.md#deleteFile) | **DELETE** /files/{id} | Delete a file
-*Pipedrive.FilesApi* | [**downloadFile**](https://github.com/pipedrive/client-nodejs/blob/master/docs/FilesApi.md#downloadFile) | **GET** /files/{id}/download | Download one file
-*Pipedrive.FilesApi* | [**getFile**](https://github.com/pipedrive/client-nodejs/blob/master/docs/FilesApi.md#getFile) | **GET** /files/{id} | Get one file
-*Pipedrive.FilesApi* | [**getFiles**](https://github.com/pipedrive/client-nodejs/blob/master/docs/FilesApi.md#getFiles) | **GET** /files | Get all files
-*Pipedrive.FilesApi* | [**linkFileToItem**](https://github.com/pipedrive/client-nodejs/blob/master/docs/FilesApi.md#linkFileToItem) | **POST** /files/remoteLink | Link a remote file to an item
-*Pipedrive.FilesApi* | [**updateFile**](https://github.com/pipedrive/client-nodejs/blob/master/docs/FilesApi.md#updateFile) | **PUT** /files/{id} | Update file details
-*Pipedrive.FiltersApi* | [**addFilter**](https://github.com/pipedrive/client-nodejs/blob/master/docs/FiltersApi.md#addFilter) | **POST** /filters | Add a new filter
-*Pipedrive.FiltersApi* | [**deleteFilter**](https://github.com/pipedrive/client-nodejs/blob/master/docs/FiltersApi.md#deleteFilter) | **DELETE** /filters/{id} | Delete a filter
-*Pipedrive.FiltersApi* | [**deleteFilters**](https://github.com/pipedrive/client-nodejs/blob/master/docs/FiltersApi.md#deleteFilters) | **DELETE** /filters | Delete multiple filters in bulk
-*Pipedrive.FiltersApi* | [**getFilter**](https://github.com/pipedrive/client-nodejs/blob/master/docs/FiltersApi.md#getFilter) | **GET** /filters/{id} | Get one filter
-*Pipedrive.FiltersApi* | [**getFilterHelpers**](https://github.com/pipedrive/client-nodejs/blob/master/docs/FiltersApi.md#getFilterHelpers) | **GET** /filters/helpers | Get all filter helpers
-*Pipedrive.FiltersApi* | [**getFilters**](https://github.com/pipedrive/client-nodejs/blob/master/docs/FiltersApi.md#getFilters) | **GET** /filters | Get all filters
-*Pipedrive.FiltersApi* | [**updateFilter**](https://github.com/pipedrive/client-nodejs/blob/master/docs/FiltersApi.md#updateFilter) | **PUT** /filters/{id} | Update filter
-*Pipedrive.GoalsApi* | [**addGoal**](https://github.com/pipedrive/client-nodejs/blob/master/docs/GoalsApi.md#addGoal) | **POST** /goals | Add a new goal
-*Pipedrive.GoalsApi* | [**deleteGoal**](https://github.com/pipedrive/client-nodejs/blob/master/docs/GoalsApi.md#deleteGoal) | **DELETE** /goals/{id} | Delete existing goal
-*Pipedrive.GoalsApi* | [**getGoalResult**](https://github.com/pipedrive/client-nodejs/blob/master/docs/GoalsApi.md#getGoalResult) | **GET** /goals/{id}/results | Get result of a goal
-*Pipedrive.GoalsApi* | [**getGoals**](https://github.com/pipedrive/client-nodejs/blob/master/docs/GoalsApi.md#getGoals) | **GET** /goals/find | Find goals
-*Pipedrive.GoalsApi* | [**updateGoal**](https://github.com/pipedrive/client-nodejs/blob/master/docs/GoalsApi.md#updateGoal) | **PUT** /goals/{id} | Update existing goal
-*Pipedrive.ItemSearchApi* | [**searchItem**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ItemSearchApi.md#searchItem) | **GET** /itemSearch | Perform a search from multiple item types
-*Pipedrive.ItemSearchApi* | [**searchItemByField**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ItemSearchApi.md#searchItemByField) | **GET** /itemSearch/field | Perform a search using a specific field from an item type
-*Pipedrive.LeadLabelsApi* | [**addLeadLabel**](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadLabelsApi.md#addLeadLabel) | **POST** /leadLabels | Add a lead label
-*Pipedrive.LeadLabelsApi* | [**deleteLeadLabel**](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadLabelsApi.md#deleteLeadLabel) | **DELETE** /leadLabels/{id} | Delete a lead label
-*Pipedrive.LeadLabelsApi* | [**getLeadLabels**](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadLabelsApi.md#getLeadLabels) | **GET** /leadLabels | Get all lead labels
-*Pipedrive.LeadLabelsApi* | [**updateLeadLabel**](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadLabelsApi.md#updateLeadLabel) | **PATCH** /leadLabels/{id} | Update a lead label
-*Pipedrive.LeadSourcesApi* | [**getLeadSources**](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadSourcesApi.md#getLeadSources) | **GET** /leadSources | Get all lead sources
-*Pipedrive.LeadsApi* | [**addLead**](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadsApi.md#addLead) | **POST** /leads | Add a lead
-*Pipedrive.LeadsApi* | [**deleteLead**](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadsApi.md#deleteLead) | **DELETE** /leads/{id} | Delete a lead
-*Pipedrive.LeadsApi* | [**getLead**](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadsApi.md#getLead) | **GET** /leads/{id} | Get one lead
-*Pipedrive.LeadsApi* | [**getLeadUsers**](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadsApi.md#getLeadUsers) | **GET** /leads/{id}/permittedUsers | List permitted users
-*Pipedrive.LeadsApi* | [**getLeads**](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadsApi.md#getLeads) | **GET** /leads | Get all leads
-*Pipedrive.LeadsApi* | [**searchLeads**](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadsApi.md#searchLeads) | **GET** /leads/search | Search leads
-*Pipedrive.LeadsApi* | [**updateLead**](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadsApi.md#updateLead) | **PATCH** /leads/{id} | Update a lead
-*Pipedrive.LegacyTeamsApi* | [**addTeam**](https://github.com/pipedrive/client-nodejs/blob/master/docs/LegacyTeamsApi.md#addTeam) | **POST** /legacyTeams | Add a new team
-*Pipedrive.LegacyTeamsApi* | [**addTeamUser**](https://github.com/pipedrive/client-nodejs/blob/master/docs/LegacyTeamsApi.md#addTeamUser) | **POST** /legacyTeams/{id}/users | Add users to a team
-*Pipedrive.LegacyTeamsApi* | [**deleteTeamUser**](https://github.com/pipedrive/client-nodejs/blob/master/docs/LegacyTeamsApi.md#deleteTeamUser) | **DELETE** /legacyTeams/{id}/users | Delete users from a team
-*Pipedrive.LegacyTeamsApi* | [**getTeam**](https://github.com/pipedrive/client-nodejs/blob/master/docs/LegacyTeamsApi.md#getTeam) | **GET** /legacyTeams/{id} | Get a single team
-*Pipedrive.LegacyTeamsApi* | [**getTeamUsers**](https://github.com/pipedrive/client-nodejs/blob/master/docs/LegacyTeamsApi.md#getTeamUsers) | **GET** /legacyTeams/{id}/users | Get all users in a team
-*Pipedrive.LegacyTeamsApi* | [**getTeams**](https://github.com/pipedrive/client-nodejs/blob/master/docs/LegacyTeamsApi.md#getTeams) | **GET** /legacyTeams | Get all teams
-*Pipedrive.LegacyTeamsApi* | [**getUserTeams**](https://github.com/pipedrive/client-nodejs/blob/master/docs/LegacyTeamsApi.md#getUserTeams) | **GET** /legacyTeams/user/{id} | Get all teams of a user
-*Pipedrive.LegacyTeamsApi* | [**updateTeam**](https://github.com/pipedrive/client-nodejs/blob/master/docs/LegacyTeamsApi.md#updateTeam) | **PUT** /legacyTeams/{id} | Update a team
-*Pipedrive.MailboxApi* | [**deleteMailThread**](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailboxApi.md#deleteMailThread) | **DELETE** /mailbox/mailThreads/{id} | Delete mail thread
-*Pipedrive.MailboxApi* | [**getMailMessage**](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailboxApi.md#getMailMessage) | **GET** /mailbox/mailMessages/{id} | Get one mail message
-*Pipedrive.MailboxApi* | [**getMailThread**](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailboxApi.md#getMailThread) | **GET** /mailbox/mailThreads/{id} | Get one mail thread
-*Pipedrive.MailboxApi* | [**getMailThreadMessages**](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailboxApi.md#getMailThreadMessages) | **GET** /mailbox/mailThreads/{id}/mailMessages | Get all mail messages of mail thread
-*Pipedrive.MailboxApi* | [**getMailThreads**](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailboxApi.md#getMailThreads) | **GET** /mailbox/mailThreads | Get mail threads
-*Pipedrive.MailboxApi* | [**updateMailThreadDetails**](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailboxApi.md#updateMailThreadDetails) | **PUT** /mailbox/mailThreads/{id} | Update mail thread details
-*Pipedrive.NoteFieldsApi* | [**getNoteFields**](https://github.com/pipedrive/client-nodejs/blob/master/docs/NoteFieldsApi.md#getNoteFields) | **GET** /noteFields | Get all note fields
-*Pipedrive.NotesApi* | [**addNote**](https://github.com/pipedrive/client-nodejs/blob/master/docs/NotesApi.md#addNote) | **POST** /notes | Add a note
-*Pipedrive.NotesApi* | [**addNoteComment**](https://github.com/pipedrive/client-nodejs/blob/master/docs/NotesApi.md#addNoteComment) | **POST** /notes/{id}/comments | Add a comment to a note
-*Pipedrive.NotesApi* | [**deleteComment**](https://github.com/pipedrive/client-nodejs/blob/master/docs/NotesApi.md#deleteComment) | **DELETE** /notes/{id}/comments/{commentId} | Delete a comment related to a note
-*Pipedrive.NotesApi* | [**deleteNote**](https://github.com/pipedrive/client-nodejs/blob/master/docs/NotesApi.md#deleteNote) | **DELETE** /notes/{id} | Delete a note
-*Pipedrive.NotesApi* | [**getComment**](https://github.com/pipedrive/client-nodejs/blob/master/docs/NotesApi.md#getComment) | **GET** /notes/{id}/comments/{commentId} | Get one comment
-*Pipedrive.NotesApi* | [**getNote**](https://github.com/pipedrive/client-nodejs/blob/master/docs/NotesApi.md#getNote) | **GET** /notes/{id} | Get one note
-*Pipedrive.NotesApi* | [**getNoteComments**](https://github.com/pipedrive/client-nodejs/blob/master/docs/NotesApi.md#getNoteComments) | **GET** /notes/{id}/comments | Get all comments for a note
-*Pipedrive.NotesApi* | [**getNotes**](https://github.com/pipedrive/client-nodejs/blob/master/docs/NotesApi.md#getNotes) | **GET** /notes | Get all notes
-*Pipedrive.NotesApi* | [**updateCommentForNote**](https://github.com/pipedrive/client-nodejs/blob/master/docs/NotesApi.md#updateCommentForNote) | **PUT** /notes/{id}/comments/{commentId} | Update a comment related to a note
-*Pipedrive.NotesApi* | [**updateNote**](https://github.com/pipedrive/client-nodejs/blob/master/docs/NotesApi.md#updateNote) | **PUT** /notes/{id} | Update a note
-*Pipedrive.OrganizationFieldsApi* | [**addOrganizationField**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationFieldsApi.md#addOrganizationField) | **POST** /organizationFields | Add a new organization field
-*Pipedrive.OrganizationFieldsApi* | [**deleteOrganizationField**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationFieldsApi.md#deleteOrganizationField) | **DELETE** /organizationFields/{id} | Delete an organization field
-*Pipedrive.OrganizationFieldsApi* | [**deleteOrganizationFields**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationFieldsApi.md#deleteOrganizationFields) | **DELETE** /organizationFields | Delete multiple organization fields in bulk
-*Pipedrive.OrganizationFieldsApi* | [**getOrganizationField**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationFieldsApi.md#getOrganizationField) | **GET** /organizationFields/{id} | Get one organization field
-*Pipedrive.OrganizationFieldsApi* | [**getOrganizationFields**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationFieldsApi.md#getOrganizationFields) | **GET** /organizationFields | Get all organization fields
-*Pipedrive.OrganizationFieldsApi* | [**updateOrganizationField**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationFieldsApi.md#updateOrganizationField) | **PUT** /organizationFields/{id} | Update an organization field
-*Pipedrive.OrganizationRelationshipsApi* | [**addOrganizationRelationship**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationRelationshipsApi.md#addOrganizationRelationship) | **POST** /organizationRelationships | Create an organization relationship
-*Pipedrive.OrganizationRelationshipsApi* | [**deleteOrganizationRelationship**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationRelationshipsApi.md#deleteOrganizationRelationship) | **DELETE** /organizationRelationships/{id} | Delete an organization relationship
-*Pipedrive.OrganizationRelationshipsApi* | [**getOrganizationRelationship**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationRelationshipsApi.md#getOrganizationRelationship) | **GET** /organizationRelationships/{id} | Get one organization relationship
-*Pipedrive.OrganizationRelationshipsApi* | [**getOrganizationRelationships**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationRelationshipsApi.md#getOrganizationRelationships) | **GET** /organizationRelationships | Get all relationships for organization
-*Pipedrive.OrganizationRelationshipsApi* | [**updateOrganizationRelationship**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationRelationshipsApi.md#updateOrganizationRelationship) | **PUT** /organizationRelationships/{id} | Update an organization relationship
-*Pipedrive.OrganizationsApi* | [**addOrganization**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsApi.md#addOrganization) | **POST** /organizations | Add an organization
-*Pipedrive.OrganizationsApi* | [**addOrganizationFollower**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsApi.md#addOrganizationFollower) | **POST** /organizations/{id}/followers | Add a follower to an organization
-*Pipedrive.OrganizationsApi* | [**deleteOrganization**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsApi.md#deleteOrganization) | **DELETE** /organizations/{id} | Delete an organization
-*Pipedrive.OrganizationsApi* | [**deleteOrganizationFollower**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsApi.md#deleteOrganizationFollower) | **DELETE** /organizations/{id}/followers/{follower_id} | Delete a follower from an organization
-*Pipedrive.OrganizationsApi* | [**deleteOrganizations**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsApi.md#deleteOrganizations) | **DELETE** /organizations | Delete multiple organizations in bulk
-*Pipedrive.OrganizationsApi* | [**getOrganization**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsApi.md#getOrganization) | **GET** /organizations/{id} | Get details of an organization
-*Pipedrive.OrganizationsApi* | [**getOrganizationActivities**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsApi.md#getOrganizationActivities) | **GET** /organizations/{id}/activities | List activities associated with an organization
-*Pipedrive.OrganizationsApi* | [**getOrganizationDeals**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsApi.md#getOrganizationDeals) | **GET** /organizations/{id}/deals | List deals associated with an organization
-*Pipedrive.OrganizationsApi* | [**getOrganizationFiles**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsApi.md#getOrganizationFiles) | **GET** /organizations/{id}/files | List files attached to an organization
-*Pipedrive.OrganizationsApi* | [**getOrganizationFollowers**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsApi.md#getOrganizationFollowers) | **GET** /organizations/{id}/followers | List followers of an organization
-*Pipedrive.OrganizationsApi* | [**getOrganizationMailMessages**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsApi.md#getOrganizationMailMessages) | **GET** /organizations/{id}/mailMessages | List mail messages associated with an organization
-*Pipedrive.OrganizationsApi* | [**getOrganizationPersons**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsApi.md#getOrganizationPersons) | **GET** /organizations/{id}/persons | List persons of an organization
-*Pipedrive.OrganizationsApi* | [**getOrganizationUpdates**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsApi.md#getOrganizationUpdates) | **GET** /organizations/{id}/flow | List updates about an organization
-*Pipedrive.OrganizationsApi* | [**getOrganizationUsers**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsApi.md#getOrganizationUsers) | **GET** /organizations/{id}/permittedUsers | List permitted users
-*Pipedrive.OrganizationsApi* | [**getOrganizations**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsApi.md#getOrganizations) | **GET** /organizations | Get all organizations
-*Pipedrive.OrganizationsApi* | [**getOrganizationsCollection**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsApi.md#getOrganizationsCollection) | **GET** /organizations/collection | Get all organizations (BETA)
-*Pipedrive.OrganizationsApi* | [**mergeOrganizations**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsApi.md#mergeOrganizations) | **PUT** /organizations/{id}/merge | Merge two organizations
-*Pipedrive.OrganizationsApi* | [**searchOrganization**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsApi.md#searchOrganization) | **GET** /organizations/search | Search organizations
-*Pipedrive.OrganizationsApi* | [**updateOrganization**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsApi.md#updateOrganization) | **PUT** /organizations/{id} | Update an organization
-*Pipedrive.PermissionSetsApi* | [**getPermissionSet**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PermissionSetsApi.md#getPermissionSet) | **GET** /permissionSets/{id} | Get one permission set
-*Pipedrive.PermissionSetsApi* | [**getPermissionSetAssignments**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PermissionSetsApi.md#getPermissionSetAssignments) | **GET** /permissionSets/{id}/assignments | List permission set assignments
-*Pipedrive.PermissionSetsApi* | [**getPermissionSets**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PermissionSetsApi.md#getPermissionSets) | **GET** /permissionSets | Get all permission sets
-*Pipedrive.PersonFieldsApi* | [**addPersonField**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonFieldsApi.md#addPersonField) | **POST** /personFields | Add a new person field
-*Pipedrive.PersonFieldsApi* | [**deletePersonField**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonFieldsApi.md#deletePersonField) | **DELETE** /personFields/{id} | Delete a person field
-*Pipedrive.PersonFieldsApi* | [**deletePersonFields**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonFieldsApi.md#deletePersonFields) | **DELETE** /personFields | Delete multiple person fields in bulk
-*Pipedrive.PersonFieldsApi* | [**getPersonField**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonFieldsApi.md#getPersonField) | **GET** /personFields/{id} | Get one person field
-*Pipedrive.PersonFieldsApi* | [**getPersonFields**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonFieldsApi.md#getPersonFields) | **GET** /personFields | Get all person fields
-*Pipedrive.PersonFieldsApi* | [**updatePersonField**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonFieldsApi.md#updatePersonField) | **PUT** /personFields/{id} | Update a person field
-*Pipedrive.PersonsApi* | [**addPerson**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonsApi.md#addPerson) | **POST** /persons | Add a person
-*Pipedrive.PersonsApi* | [**addPersonFollower**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonsApi.md#addPersonFollower) | **POST** /persons/{id}/followers | Add a follower to a person
-*Pipedrive.PersonsApi* | [**addPersonPicture**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonsApi.md#addPersonPicture) | **POST** /persons/{id}/picture | Add person picture
-*Pipedrive.PersonsApi* | [**deletePerson**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonsApi.md#deletePerson) | **DELETE** /persons/{id} | Delete a person
-*Pipedrive.PersonsApi* | [**deletePersonFollower**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonsApi.md#deletePersonFollower) | **DELETE** /persons/{id}/followers/{follower_id} | Delete a follower from a person
-*Pipedrive.PersonsApi* | [**deletePersonPicture**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonsApi.md#deletePersonPicture) | **DELETE** /persons/{id}/picture | Delete person picture
-*Pipedrive.PersonsApi* | [**deletePersons**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonsApi.md#deletePersons) | **DELETE** /persons | Delete multiple persons in bulk
-*Pipedrive.PersonsApi* | [**getPerson**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonsApi.md#getPerson) | **GET** /persons/{id} | Get details of a person
-*Pipedrive.PersonsApi* | [**getPersonActivities**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonsApi.md#getPersonActivities) | **GET** /persons/{id}/activities | List activities associated with a person
-*Pipedrive.PersonsApi* | [**getPersonDeals**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonsApi.md#getPersonDeals) | **GET** /persons/{id}/deals | List deals associated with a person
-*Pipedrive.PersonsApi* | [**getPersonFiles**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonsApi.md#getPersonFiles) | **GET** /persons/{id}/files | List files attached to a person
-*Pipedrive.PersonsApi* | [**getPersonFollowers**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonsApi.md#getPersonFollowers) | **GET** /persons/{id}/followers | List followers of a person
-*Pipedrive.PersonsApi* | [**getPersonMailMessages**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonsApi.md#getPersonMailMessages) | **GET** /persons/{id}/mailMessages | List mail messages associated with a person
-*Pipedrive.PersonsApi* | [**getPersonProducts**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonsApi.md#getPersonProducts) | **GET** /persons/{id}/products | List products associated with a person
-*Pipedrive.PersonsApi* | [**getPersonUpdates**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonsApi.md#getPersonUpdates) | **GET** /persons/{id}/flow | List updates about a person
-*Pipedrive.PersonsApi* | [**getPersonUsers**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonsApi.md#getPersonUsers) | **GET** /persons/{id}/permittedUsers | List permitted users
-*Pipedrive.PersonsApi* | [**getPersons**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonsApi.md#getPersons) | **GET** /persons | Get all persons
-*Pipedrive.PersonsApi* | [**getPersonsCollection**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonsApi.md#getPersonsCollection) | **GET** /persons/collection | Get all persons (BETA)
-*Pipedrive.PersonsApi* | [**mergePersons**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonsApi.md#mergePersons) | **PUT** /persons/{id}/merge | Merge two persons
-*Pipedrive.PersonsApi* | [**searchPersons**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonsApi.md#searchPersons) | **GET** /persons/search | Search persons
-*Pipedrive.PersonsApi* | [**updatePerson**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonsApi.md#updatePerson) | **PUT** /persons/{id} | Update a person
-*Pipedrive.PipelinesApi* | [**addPipeline**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PipelinesApi.md#addPipeline) | **POST** /pipelines | Add a new pipeline
-*Pipedrive.PipelinesApi* | [**deletePipeline**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PipelinesApi.md#deletePipeline) | **DELETE** /pipelines/{id} | Delete a pipeline
-*Pipedrive.PipelinesApi* | [**getPipeline**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PipelinesApi.md#getPipeline) | **GET** /pipelines/{id} | Get one pipeline
-*Pipedrive.PipelinesApi* | [**getPipelineConversionStatistics**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PipelinesApi.md#getPipelineConversionStatistics) | **GET** /pipelines/{id}/conversion_statistics | Get deals conversion rates in pipeline
-*Pipedrive.PipelinesApi* | [**getPipelineDeals**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PipelinesApi.md#getPipelineDeals) | **GET** /pipelines/{id}/deals | Get deals in a pipeline
-*Pipedrive.PipelinesApi* | [**getPipelineMovementStatistics**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PipelinesApi.md#getPipelineMovementStatistics) | **GET** /pipelines/{id}/movement_statistics | Get deals movements in pipeline
-*Pipedrive.PipelinesApi* | [**getPipelines**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PipelinesApi.md#getPipelines) | **GET** /pipelines | Get all pipelines
-*Pipedrive.PipelinesApi* | [**updatePipeline**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PipelinesApi.md#updatePipeline) | **PUT** /pipelines/{id} | Update a pipeline
-*Pipedrive.ProductFieldsApi* | [**addProductField**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductFieldsApi.md#addProductField) | **POST** /productFields | Add a new product field
-*Pipedrive.ProductFieldsApi* | [**deleteProductField**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductFieldsApi.md#deleteProductField) | **DELETE** /productFields/{id} | Delete a product field
-*Pipedrive.ProductFieldsApi* | [**deleteProductFields**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductFieldsApi.md#deleteProductFields) | **DELETE** /productFields | Delete multiple product fields in bulk
-*Pipedrive.ProductFieldsApi* | [**getProductField**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductFieldsApi.md#getProductField) | **GET** /productFields/{id} | Get one product field
-*Pipedrive.ProductFieldsApi* | [**getProductFields**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductFieldsApi.md#getProductFields) | **GET** /productFields | Get all product fields
-*Pipedrive.ProductFieldsApi* | [**updateProductField**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductFieldsApi.md#updateProductField) | **PUT** /productFields/{id} | Update a product field
-*Pipedrive.ProductsApi* | [**addProduct**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductsApi.md#addProduct) | **POST** /products | Add a product
-*Pipedrive.ProductsApi* | [**addProductFollower**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductsApi.md#addProductFollower) | **POST** /products/{id}/followers | Add a follower to a product
-*Pipedrive.ProductsApi* | [**deleteProduct**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductsApi.md#deleteProduct) | **DELETE** /products/{id} | Delete a product
-*Pipedrive.ProductsApi* | [**deleteProductFollower**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductsApi.md#deleteProductFollower) | **DELETE** /products/{id}/followers/{follower_id} | Delete a follower from a product
-*Pipedrive.ProductsApi* | [**getProduct**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductsApi.md#getProduct) | **GET** /products/{id} | Get one product
-*Pipedrive.ProductsApi* | [**getProductDeals**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductsApi.md#getProductDeals) | **GET** /products/{id}/deals | Get deals where a product is attached to
-*Pipedrive.ProductsApi* | [**getProductFiles**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductsApi.md#getProductFiles) | **GET** /products/{id}/files | List files attached to a product
-*Pipedrive.ProductsApi* | [**getProductFollowers**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductsApi.md#getProductFollowers) | **GET** /products/{id}/followers | List followers of a product
-*Pipedrive.ProductsApi* | [**getProductUsers**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductsApi.md#getProductUsers) | **GET** /products/{id}/permittedUsers | List permitted users
-*Pipedrive.ProductsApi* | [**getProducts**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductsApi.md#getProducts) | **GET** /products | Get all products
-*Pipedrive.ProductsApi* | [**searchProducts**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductsApi.md#searchProducts) | **GET** /products/search | Search products
-*Pipedrive.ProductsApi* | [**updateProduct**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductsApi.md#updateProduct) | **PUT** /products/{id} | Update a product
-*Pipedrive.ProjectTemplatesApi* | [**getProjectTemplate**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectTemplatesApi.md#getProjectTemplate) | **GET** /projectTemplates/{id} | Get details of a template
-*Pipedrive.ProjectTemplatesApi* | [**getProjectTemplates**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectTemplatesApi.md#getProjectTemplates) | **GET** /projectTemplates | Get all project templates
-*Pipedrive.ProjectTemplatesApi* | [**getProjectsBoard**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectTemplatesApi.md#getProjectsBoard) | **GET** /projects/boards/{id} | Get details of a board
-*Pipedrive.ProjectTemplatesApi* | [**getProjectsPhase**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectTemplatesApi.md#getProjectsPhase) | **GET** /projects/phases/{id} | Get details of a phase
-*Pipedrive.ProjectsApi* | [**addProject**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectsApi.md#addProject) | **POST** /projects | Add a project
-*Pipedrive.ProjectsApi* | [**archiveProject**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectsApi.md#archiveProject) | **POST** /projects/{id}/archive | Archive a project
-*Pipedrive.ProjectsApi* | [**deleteProject**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectsApi.md#deleteProject) | **DELETE** /projects/{id} | Delete a project
-*Pipedrive.ProjectsApi* | [**getProject**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectsApi.md#getProject) | **GET** /projects/{id} | Get details of a project
-*Pipedrive.ProjectsApi* | [**getProjectActivities**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectsApi.md#getProjectActivities) | **GET** /projects/{id}/activities | Returns project activities
-*Pipedrive.ProjectsApi* | [**getProjectGroups**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectsApi.md#getProjectGroups) | **GET** /projects/{id}/groups | Returns project groups
-*Pipedrive.ProjectsApi* | [**getProjectPlan**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectsApi.md#getProjectPlan) | **GET** /projects/{id}/plan | Returns project plan
-*Pipedrive.ProjectsApi* | [**getProjectTasks**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectsApi.md#getProjectTasks) | **GET** /projects/{id}/tasks | Returns project tasks
-*Pipedrive.ProjectsApi* | [**getProjects**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectsApi.md#getProjects) | **GET** /projects | Get all projects
-*Pipedrive.ProjectsApi* | [**getProjectsBoards**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectsApi.md#getProjectsBoards) | **GET** /projects/boards | Get all project boards
-*Pipedrive.ProjectsApi* | [**getProjectsPhases**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectsApi.md#getProjectsPhases) | **GET** /projects/phases | Get project phases
-*Pipedrive.ProjectsApi* | [**putProjectPlanActivity**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectsApi.md#putProjectPlanActivity) | **PUT** /projects/{id}/plan/activities/{activityId} | Update activity in project plan
-*Pipedrive.ProjectsApi* | [**putProjectPlanTask**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectsApi.md#putProjectPlanTask) | **PUT** /projects/{id}/plan/tasks/{taskId} | Update task in project plan
-*Pipedrive.ProjectsApi* | [**updateProject**](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectsApi.md#updateProject) | **PUT** /projects/{id} | Update a project
-*Pipedrive.RecentsApi* | [**getRecents**](https://github.com/pipedrive/client-nodejs/blob/master/docs/RecentsApi.md#getRecents) | **GET** /recents | Get recents
-*Pipedrive.RolesApi* | [**addOrUpdateRoleSetting**](https://github.com/pipedrive/client-nodejs/blob/master/docs/RolesApi.md#addOrUpdateRoleSetting) | **POST** /roles/{id}/settings | Add or update role setting
-*Pipedrive.RolesApi* | [**addRole**](https://github.com/pipedrive/client-nodejs/blob/master/docs/RolesApi.md#addRole) | **POST** /roles | Add a role
-*Pipedrive.RolesApi* | [**addRoleAssignment**](https://github.com/pipedrive/client-nodejs/blob/master/docs/RolesApi.md#addRoleAssignment) | **POST** /roles/{id}/assignments | Add role assignment
-*Pipedrive.RolesApi* | [**deleteRole**](https://github.com/pipedrive/client-nodejs/blob/master/docs/RolesApi.md#deleteRole) | **DELETE** /roles/{id} | Delete a role
-*Pipedrive.RolesApi* | [**deleteRoleAssignment**](https://github.com/pipedrive/client-nodejs/blob/master/docs/RolesApi.md#deleteRoleAssignment) | **DELETE** /roles/{id}/assignments | Delete a role assignment
-*Pipedrive.RolesApi* | [**getRole**](https://github.com/pipedrive/client-nodejs/blob/master/docs/RolesApi.md#getRole) | **GET** /roles/{id} | Get one role
-*Pipedrive.RolesApi* | [**getRoleAssignments**](https://github.com/pipedrive/client-nodejs/blob/master/docs/RolesApi.md#getRoleAssignments) | **GET** /roles/{id}/assignments | List role assignments
-*Pipedrive.RolesApi* | [**getRolePipelines**](https://github.com/pipedrive/client-nodejs/blob/master/docs/RolesApi.md#getRolePipelines) | **GET** /roles/{id}/pipelines | List pipeline visibility for a role
-*Pipedrive.RolesApi* | [**getRoleSettings**](https://github.com/pipedrive/client-nodejs/blob/master/docs/RolesApi.md#getRoleSettings) | **GET** /roles/{id}/settings | List role settings
-*Pipedrive.RolesApi* | [**getRoles**](https://github.com/pipedrive/client-nodejs/blob/master/docs/RolesApi.md#getRoles) | **GET** /roles | Get all roles
-*Pipedrive.RolesApi* | [**updateRole**](https://github.com/pipedrive/client-nodejs/blob/master/docs/RolesApi.md#updateRole) | **PUT** /roles/{id} | Update role details
-*Pipedrive.RolesApi* | [**updateRolePipelines**](https://github.com/pipedrive/client-nodejs/blob/master/docs/RolesApi.md#updateRolePipelines) | **PUT** /roles/{id}/pipelines | Update pipeline visibility for a role
-*Pipedrive.StagesApi* | [**addStage**](https://github.com/pipedrive/client-nodejs/blob/master/docs/StagesApi.md#addStage) | **POST** /stages | Add a new stage
-*Pipedrive.StagesApi* | [**deleteStage**](https://github.com/pipedrive/client-nodejs/blob/master/docs/StagesApi.md#deleteStage) | **DELETE** /stages/{id} | Delete a stage
-*Pipedrive.StagesApi* | [**deleteStages**](https://github.com/pipedrive/client-nodejs/blob/master/docs/StagesApi.md#deleteStages) | **DELETE** /stages | Delete multiple stages in bulk
-*Pipedrive.StagesApi* | [**getStage**](https://github.com/pipedrive/client-nodejs/blob/master/docs/StagesApi.md#getStage) | **GET** /stages/{id} | Get one stage
-*Pipedrive.StagesApi* | [**getStageDeals**](https://github.com/pipedrive/client-nodejs/blob/master/docs/StagesApi.md#getStageDeals) | **GET** /stages/{id}/deals | Get deals in a stage
-*Pipedrive.StagesApi* | [**getStages**](https://github.com/pipedrive/client-nodejs/blob/master/docs/StagesApi.md#getStages) | **GET** /stages | Get all stages
-*Pipedrive.StagesApi* | [**updateStage**](https://github.com/pipedrive/client-nodejs/blob/master/docs/StagesApi.md#updateStage) | **PUT** /stages/{id} | Update stage details
-*Pipedrive.SubscriptionsApi* | [**addRecurringSubscription**](https://github.com/pipedrive/client-nodejs/blob/master/docs/SubscriptionsApi.md#addRecurringSubscription) | **POST** /subscriptions/recurring | Add a recurring subscription
-*Pipedrive.SubscriptionsApi* | [**addSubscriptionInstallment**](https://github.com/pipedrive/client-nodejs/blob/master/docs/SubscriptionsApi.md#addSubscriptionInstallment) | **POST** /subscriptions/installment | Add an installment subscription
-*Pipedrive.SubscriptionsApi* | [**cancelRecurringSubscription**](https://github.com/pipedrive/client-nodejs/blob/master/docs/SubscriptionsApi.md#cancelRecurringSubscription) | **PUT** /subscriptions/recurring/{id}/cancel | Cancel a recurring subscription
-*Pipedrive.SubscriptionsApi* | [**deleteSubscription**](https://github.com/pipedrive/client-nodejs/blob/master/docs/SubscriptionsApi.md#deleteSubscription) | **DELETE** /subscriptions/{id} | Delete a subscription
-*Pipedrive.SubscriptionsApi* | [**findSubscriptionByDeal**](https://github.com/pipedrive/client-nodejs/blob/master/docs/SubscriptionsApi.md#findSubscriptionByDeal) | **GET** /subscriptions/find/{dealId} | Find subscription by deal
-*Pipedrive.SubscriptionsApi* | [**getSubscription**](https://github.com/pipedrive/client-nodejs/blob/master/docs/SubscriptionsApi.md#getSubscription) | **GET** /subscriptions/{id} | Get details of a subscription
-*Pipedrive.SubscriptionsApi* | [**getSubscriptionPayments**](https://github.com/pipedrive/client-nodejs/blob/master/docs/SubscriptionsApi.md#getSubscriptionPayments) | **GET** /subscriptions/{id}/payments | Get all payments of a subscription
-*Pipedrive.SubscriptionsApi* | [**updateRecurringSubscription**](https://github.com/pipedrive/client-nodejs/blob/master/docs/SubscriptionsApi.md#updateRecurringSubscription) | **PUT** /subscriptions/recurring/{id} | Update a recurring subscription
-*Pipedrive.SubscriptionsApi* | [**updateSubscriptionInstallment**](https://github.com/pipedrive/client-nodejs/blob/master/docs/SubscriptionsApi.md#updateSubscriptionInstallment) | **PUT** /subscriptions/installment/{id} | Update an installment subscription
-*Pipedrive.TasksApi* | [**addTask**](https://github.com/pipedrive/client-nodejs/blob/master/docs/TasksApi.md#addTask) | **POST** /tasks | Add a task
-*Pipedrive.TasksApi* | [**deleteTask**](https://github.com/pipedrive/client-nodejs/blob/master/docs/TasksApi.md#deleteTask) | **DELETE** /tasks/{id} | Delete a task
-*Pipedrive.TasksApi* | [**getTask**](https://github.com/pipedrive/client-nodejs/blob/master/docs/TasksApi.md#getTask) | **GET** /tasks/{id} | Get details of a task
-*Pipedrive.TasksApi* | [**getTasks**](https://github.com/pipedrive/client-nodejs/blob/master/docs/TasksApi.md#getTasks) | **GET** /tasks | Get all tasks
-*Pipedrive.TasksApi* | [**updateTask**](https://github.com/pipedrive/client-nodejs/blob/master/docs/TasksApi.md#updateTask) | **PUT** /tasks/{id} | Update a task
-*Pipedrive.UserConnectionsApi* | [**getUserConnections**](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserConnectionsApi.md#getUserConnections) | **GET** /userConnections | Get all user connections
-*Pipedrive.UserSettingsApi* | [**getUserSettings**](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserSettingsApi.md#getUserSettings) | **GET** /userSettings | List settings of an authorized user
-*Pipedrive.UsersApi* | [**addUser**](https://github.com/pipedrive/client-nodejs/blob/master/docs/UsersApi.md#addUser) | **POST** /users | Add a new user
-*Pipedrive.UsersApi* | [**findUsersByName**](https://github.com/pipedrive/client-nodejs/blob/master/docs/UsersApi.md#findUsersByName) | **GET** /users/find | Find users by name
-*Pipedrive.UsersApi* | [**getCurrentUser**](https://github.com/pipedrive/client-nodejs/blob/master/docs/UsersApi.md#getCurrentUser) | **GET** /users/me | Get current user data
-*Pipedrive.UsersApi* | [**getUser**](https://github.com/pipedrive/client-nodejs/blob/master/docs/UsersApi.md#getUser) | **GET** /users/{id} | Get one user
-*Pipedrive.UsersApi* | [**getUserFollowers**](https://github.com/pipedrive/client-nodejs/blob/master/docs/UsersApi.md#getUserFollowers) | **GET** /users/{id}/followers | List followers of a user
-*Pipedrive.UsersApi* | [**getUserPermissions**](https://github.com/pipedrive/client-nodejs/blob/master/docs/UsersApi.md#getUserPermissions) | **GET** /users/{id}/permissions | List user permissions
-*Pipedrive.UsersApi* | [**getUserRoleAssignments**](https://github.com/pipedrive/client-nodejs/blob/master/docs/UsersApi.md#getUserRoleAssignments) | **GET** /users/{id}/roleAssignments | List role assignments
-*Pipedrive.UsersApi* | [**getUserRoleSettings**](https://github.com/pipedrive/client-nodejs/blob/master/docs/UsersApi.md#getUserRoleSettings) | **GET** /users/{id}/roleSettings | List user role settings
-*Pipedrive.UsersApi* | [**getUsers**](https://github.com/pipedrive/client-nodejs/blob/master/docs/UsersApi.md#getUsers) | **GET** /users | Get all users
-*Pipedrive.UsersApi* | [**updateUser**](https://github.com/pipedrive/client-nodejs/blob/master/docs/UsersApi.md#updateUser) | **PUT** /users/{id} | Update user details
-*Pipedrive.WebhooksApi* | [**addWebhook**](https://github.com/pipedrive/client-nodejs/blob/master/docs/WebhooksApi.md#addWebhook) | **POST** /webhooks | Create a new Webhook
-*Pipedrive.WebhooksApi* | [**deleteWebhook**](https://github.com/pipedrive/client-nodejs/blob/master/docs/WebhooksApi.md#deleteWebhook) | **DELETE** /webhooks/{id} | Delete existing Webhook
-*Pipedrive.WebhooksApi* | [**getWebhooks**](https://github.com/pipedrive/client-nodejs/blob/master/docs/WebhooksApi.md#getWebhooks) | **GET** /webhooks | Get all Webhooks
-
-
-## Documentation for Models
-
- - [Pipedrive.ActivityCollectionResponseObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityCollectionResponseObject.md)
- - [Pipedrive.ActivityCollectionResponseObjectAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityCollectionResponseObjectAllOf.md)
- - [Pipedrive.ActivityDistributionData](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityDistributionData.md)
- - [Pipedrive.ActivityDistributionDataActivityDistribution](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityDistributionDataActivityDistribution.md)
- - [Pipedrive.ActivityDistributionDataActivityDistributionASSIGNEDTOUSERID](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityDistributionDataActivityDistributionASSIGNEDTOUSERID.md)
- - [Pipedrive.ActivityDistributionDataActivityDistributionASSIGNEDTOUSERIDActivities](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityDistributionDataActivityDistributionASSIGNEDTOUSERIDActivities.md)
- - [Pipedrive.ActivityDistributionDataWithAdditionalData](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityDistributionDataWithAdditionalData.md)
- - [Pipedrive.ActivityInfo](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityInfo.md)
- - [Pipedrive.ActivityObjectFragment](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityObjectFragment.md)
- - [Pipedrive.ActivityPostObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityPostObject.md)
- - [Pipedrive.ActivityPostObjectAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityPostObjectAllOf.md)
- - [Pipedrive.ActivityPutObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityPutObject.md)
- - [Pipedrive.ActivityPutObjectAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityPutObjectAllOf.md)
- - [Pipedrive.ActivityRecordAdditionalData](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityRecordAdditionalData.md)
- - [Pipedrive.ActivityResponseObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityResponseObject.md)
- - [Pipedrive.ActivityResponseObjectAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityResponseObjectAllOf.md)
- - [Pipedrive.ActivityTypeBulkDeleteResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityTypeBulkDeleteResponse.md)
- - [Pipedrive.ActivityTypeBulkDeleteResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityTypeBulkDeleteResponseAllOf.md)
- - [Pipedrive.ActivityTypeBulkDeleteResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityTypeBulkDeleteResponseAllOfData.md)
- - [Pipedrive.ActivityTypeCreateRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityTypeCreateRequest.md)
- - [Pipedrive.ActivityTypeCreateUpdateDeleteResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityTypeCreateUpdateDeleteResponse.md)
- - [Pipedrive.ActivityTypeCreateUpdateDeleteResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityTypeCreateUpdateDeleteResponseAllOf.md)
- - [Pipedrive.ActivityTypeListResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityTypeListResponse.md)
- - [Pipedrive.ActivityTypeListResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityTypeListResponseAllOf.md)
- - [Pipedrive.ActivityTypeObjectResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityTypeObjectResponse.md)
- - [Pipedrive.ActivityTypeUpdateRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/ActivityTypeUpdateRequest.md)
- - [Pipedrive.AddActivityResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddActivityResponse200.md)
- - [Pipedrive.AddActivityResponse200RelatedObjects](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddActivityResponse200RelatedObjects.md)
- - [Pipedrive.AddDealFollowerRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddDealFollowerRequest.md)
- - [Pipedrive.AddDealParticipantRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddDealParticipantRequest.md)
- - [Pipedrive.AddFile](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddFile.md)
- - [Pipedrive.AddFilterRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddFilterRequest.md)
- - [Pipedrive.AddFollowerToPersonResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddFollowerToPersonResponse.md)
- - [Pipedrive.AddFollowerToPersonResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddFollowerToPersonResponseAllOf.md)
- - [Pipedrive.AddFollowerToPersonResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddFollowerToPersonResponseAllOfData.md)
- - [Pipedrive.AddLeadLabelRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddLeadLabelRequest.md)
- - [Pipedrive.AddLeadRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddLeadRequest.md)
- - [Pipedrive.AddNewPipeline](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddNewPipeline.md)
- - [Pipedrive.AddNewPipelineAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddNewPipelineAllOf.md)
- - [Pipedrive.AddNoteRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddNoteRequest.md)
- - [Pipedrive.AddNoteRequestAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddNoteRequestAllOf.md)
- - [Pipedrive.AddOrUpdateGoalResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddOrUpdateGoalResponse200.md)
- - [Pipedrive.AddOrUpdateLeadLabelResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddOrUpdateLeadLabelResponse200.md)
- - [Pipedrive.AddOrUpdateRoleSettingRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddOrUpdateRoleSettingRequest.md)
- - [Pipedrive.AddOrganizationFollowerRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddOrganizationFollowerRequest.md)
- - [Pipedrive.AddOrganizationRelationshipRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddOrganizationRelationshipRequest.md)
- - [Pipedrive.AddPersonFollowerRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddPersonFollowerRequest.md)
- - [Pipedrive.AddPersonPictureResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddPersonPictureResponse.md)
- - [Pipedrive.AddPersonPictureResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddPersonPictureResponseAllOf.md)
- - [Pipedrive.AddPersonResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddPersonResponse.md)
- - [Pipedrive.AddPersonResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddPersonResponseAllOf.md)
- - [Pipedrive.AddProductAttachmentDetails](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddProductAttachmentDetails.md)
- - [Pipedrive.AddProductAttachmentDetailsAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddProductAttachmentDetailsAllOf.md)
- - [Pipedrive.AddProductFollowerRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddProductFollowerRequest.md)
- - [Pipedrive.AddProductRequestBody](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddProductRequestBody.md)
- - [Pipedrive.AddProjectResponse201](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddProjectResponse201.md)
- - [Pipedrive.AddRole](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddRole.md)
- - [Pipedrive.AddRoleAssignmentRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddRoleAssignmentRequest.md)
- - [Pipedrive.AddTaskResponse201](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddTaskResponse201.md)
- - [Pipedrive.AddTeamUserRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddTeamUserRequest.md)
- - [Pipedrive.AddUserRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddUserRequest.md)
- - [Pipedrive.AddWebhookRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddWebhookRequest.md)
- - [Pipedrive.AddedDealFollower](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddedDealFollower.md)
- - [Pipedrive.AddedDealFollowerData](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddedDealFollowerData.md)
- - [Pipedrive.AdditionalBaseOrganizationItemInfo](https://github.com/pipedrive/client-nodejs/blob/master/docs/AdditionalBaseOrganizationItemInfo.md)
- - [Pipedrive.AdditionalData](https://github.com/pipedrive/client-nodejs/blob/master/docs/AdditionalData.md)
- - [Pipedrive.AdditionalDataWithCursorPagination](https://github.com/pipedrive/client-nodejs/blob/master/docs/AdditionalDataWithCursorPagination.md)
- - [Pipedrive.AdditionalDataWithOffsetPagination](https://github.com/pipedrive/client-nodejs/blob/master/docs/AdditionalDataWithOffsetPagination.md)
- - [Pipedrive.AdditionalDataWithPaginationDetails](https://github.com/pipedrive/client-nodejs/blob/master/docs/AdditionalDataWithPaginationDetails.md)
- - [Pipedrive.AdditionalMergePersonInfo](https://github.com/pipedrive/client-nodejs/blob/master/docs/AdditionalMergePersonInfo.md)
- - [Pipedrive.AdditionalPersonInfo](https://github.com/pipedrive/client-nodejs/blob/master/docs/AdditionalPersonInfo.md)
- - [Pipedrive.AllOrganizationRelationshipsGetResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/AllOrganizationRelationshipsGetResponse.md)
- - [Pipedrive.AllOrganizationRelationshipsGetResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/AllOrganizationRelationshipsGetResponseAllOf.md)
- - [Pipedrive.AllOrganizationRelationshipsGetResponseAllOfRelatedObjects](https://github.com/pipedrive/client-nodejs/blob/master/docs/AllOrganizationRelationshipsGetResponseAllOfRelatedObjects.md)
- - [Pipedrive.AllOrganizationsGetResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/AllOrganizationsGetResponse.md)
- - [Pipedrive.AllOrganizationsGetResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/AllOrganizationsGetResponseAllOf.md)
- - [Pipedrive.AllOrganizationsGetResponseAllOfRelatedObjects](https://github.com/pipedrive/client-nodejs/blob/master/docs/AllOrganizationsGetResponseAllOfRelatedObjects.md)
- - [Pipedrive.ArrayPrices](https://github.com/pipedrive/client-nodejs/blob/master/docs/ArrayPrices.md)
- - [Pipedrive.Assignee](https://github.com/pipedrive/client-nodejs/blob/master/docs/Assignee.md)
- - [Pipedrive.BaseComment](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseComment.md)
- - [Pipedrive.BaseCurrency](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseCurrency.md)
- - [Pipedrive.BaseDeal](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseDeal.md)
- - [Pipedrive.BaseFollowerItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseFollowerItem.md)
- - [Pipedrive.BaseMailThread](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseMailThread.md)
- - [Pipedrive.BaseMailThreadAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseMailThreadAllOf.md)
- - [Pipedrive.BaseMailThreadAllOfParties](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseMailThreadAllOfParties.md)
- - [Pipedrive.BaseMailThreadMessages](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseMailThreadMessages.md)
- - [Pipedrive.BaseMailThreadMessagesAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseMailThreadMessagesAllOf.md)
- - [Pipedrive.BaseNote](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseNote.md)
- - [Pipedrive.BaseNoteDealTitle](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseNoteDealTitle.md)
- - [Pipedrive.BaseNoteOrganization](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseNoteOrganization.md)
- - [Pipedrive.BaseNotePerson](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseNotePerson.md)
- - [Pipedrive.BaseOrganizationItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseOrganizationItem.md)
- - [Pipedrive.BaseOrganizationItemFields](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseOrganizationItemFields.md)
- - [Pipedrive.BaseOrganizationItemWithEditNameFlag](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseOrganizationItemWithEditNameFlag.md)
- - [Pipedrive.BaseOrganizationItemWithEditNameFlagAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseOrganizationItemWithEditNameFlagAllOf.md)
- - [Pipedrive.BaseOrganizationRelationshipItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseOrganizationRelationshipItem.md)
- - [Pipedrive.BasePersonItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/BasePersonItem.md)
- - [Pipedrive.BasePersonItemEmail](https://github.com/pipedrive/client-nodejs/blob/master/docs/BasePersonItemEmail.md)
- - [Pipedrive.BasePersonItemPhone](https://github.com/pipedrive/client-nodejs/blob/master/docs/BasePersonItemPhone.md)
- - [Pipedrive.BasePipeline](https://github.com/pipedrive/client-nodejs/blob/master/docs/BasePipeline.md)
- - [Pipedrive.BasePipelineWithSelectedFlag](https://github.com/pipedrive/client-nodejs/blob/master/docs/BasePipelineWithSelectedFlag.md)
- - [Pipedrive.BasePipelineWithSelectedFlagAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/BasePipelineWithSelectedFlagAllOf.md)
- - [Pipedrive.BaseProduct](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseProduct.md)
- - [Pipedrive.BaseResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseResponse.md)
- - [Pipedrive.BaseResponseWithStatus](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseResponseWithStatus.md)
- - [Pipedrive.BaseResponseWithStatusAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseResponseWithStatusAllOf.md)
- - [Pipedrive.BaseRole](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseRole.md)
- - [Pipedrive.BaseStage](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseStage.md)
- - [Pipedrive.BaseTeam](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseTeam.md)
- - [Pipedrive.BaseTeamAdditionalProperties](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseTeamAdditionalProperties.md)
- - [Pipedrive.BaseUser](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseUser.md)
- - [Pipedrive.BaseUserMe](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseUserMe.md)
- - [Pipedrive.BaseUserMeAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseUserMeAllOf.md)
- - [Pipedrive.BaseUserMeAllOfLanguage](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseUserMeAllOfLanguage.md)
- - [Pipedrive.BaseWebhook](https://github.com/pipedrive/client-nodejs/blob/master/docs/BaseWebhook.md)
- - [Pipedrive.BasicDeal](https://github.com/pipedrive/client-nodejs/blob/master/docs/BasicDeal.md)
- - [Pipedrive.BasicDealProduct](https://github.com/pipedrive/client-nodejs/blob/master/docs/BasicDealProduct.md)
- - [Pipedrive.BasicGoal](https://github.com/pipedrive/client-nodejs/blob/master/docs/BasicGoal.md)
- - [Pipedrive.BasicOrganization](https://github.com/pipedrive/client-nodejs/blob/master/docs/BasicOrganization.md)
- - [Pipedrive.BasicPerson](https://github.com/pipedrive/client-nodejs/blob/master/docs/BasicPerson.md)
- - [Pipedrive.BasicPersonEmail](https://github.com/pipedrive/client-nodejs/blob/master/docs/BasicPersonEmail.md)
- - [Pipedrive.BulkDeleteResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/BulkDeleteResponse.md)
- - [Pipedrive.BulkDeleteResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/BulkDeleteResponseAllOf.md)
- - [Pipedrive.BulkDeleteResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/BulkDeleteResponseAllOfData.md)
- - [Pipedrive.CalculatedFields](https://github.com/pipedrive/client-nodejs/blob/master/docs/CalculatedFields.md)
- - [Pipedrive.CallLogObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/CallLogObject.md)
- - [Pipedrive.CallLogResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/CallLogResponse200.md)
- - [Pipedrive.CallLogResponse400](https://github.com/pipedrive/client-nodejs/blob/master/docs/CallLogResponse400.md)
- - [Pipedrive.CallLogResponse403](https://github.com/pipedrive/client-nodejs/blob/master/docs/CallLogResponse403.md)
- - [Pipedrive.CallLogResponse404](https://github.com/pipedrive/client-nodejs/blob/master/docs/CallLogResponse404.md)
- - [Pipedrive.CallLogResponse409](https://github.com/pipedrive/client-nodejs/blob/master/docs/CallLogResponse409.md)
- - [Pipedrive.CallLogResponse410](https://github.com/pipedrive/client-nodejs/blob/master/docs/CallLogResponse410.md)
- - [Pipedrive.CallLogResponse500](https://github.com/pipedrive/client-nodejs/blob/master/docs/CallLogResponse500.md)
- - [Pipedrive.CallLogsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/CallLogsResponse.md)
- - [Pipedrive.CallLogsResponseAdditionalData](https://github.com/pipedrive/client-nodejs/blob/master/docs/CallLogsResponseAdditionalData.md)
- - [Pipedrive.ChannelObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/ChannelObject.md)
- - [Pipedrive.ChannelObjectResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/ChannelObjectResponse.md)
- - [Pipedrive.ChannelObjectResponseData](https://github.com/pipedrive/client-nodejs/blob/master/docs/ChannelObjectResponseData.md)
- - [Pipedrive.CommentPostPutObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/CommentPostPutObject.md)
- - [Pipedrive.CommonMailThread](https://github.com/pipedrive/client-nodejs/blob/master/docs/CommonMailThread.md)
- - [Pipedrive.CreateRemoteFileAndLinkItToItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/CreateRemoteFileAndLinkItToItem.md)
- - [Pipedrive.CreateTeam](https://github.com/pipedrive/client-nodejs/blob/master/docs/CreateTeam.md)
- - [Pipedrive.Currencies](https://github.com/pipedrive/client-nodejs/blob/master/docs/Currencies.md)
- - [Pipedrive.DealCollectionResponseObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealCollectionResponseObject.md)
- - [Pipedrive.DealCountAndActivityInfo](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealCountAndActivityInfo.md)
- - [Pipedrive.DealFlowResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealFlowResponse.md)
- - [Pipedrive.DealFlowResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealFlowResponseAllOf.md)
- - [Pipedrive.DealFlowResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealFlowResponseAllOfData.md)
- - [Pipedrive.DealFlowResponseAllOfRelatedObjects](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealFlowResponseAllOfRelatedObjects.md)
- - [Pipedrive.DealListActivitiesResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealListActivitiesResponse.md)
- - [Pipedrive.DealListActivitiesResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealListActivitiesResponseAllOf.md)
- - [Pipedrive.DealListActivitiesResponseAllOfRelatedObjects](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealListActivitiesResponseAllOfRelatedObjects.md)
- - [Pipedrive.DealNonStrict](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealNonStrict.md)
- - [Pipedrive.DealNonStrictModeFields](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealNonStrictModeFields.md)
- - [Pipedrive.DealNonStrictModeFieldsCreatorUserId](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealNonStrictModeFieldsCreatorUserId.md)
- - [Pipedrive.DealNonStrictWithDetails](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealNonStrictWithDetails.md)
- - [Pipedrive.DealNonStrictWithDetailsAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealNonStrictWithDetailsAllOf.md)
- - [Pipedrive.DealNonStrictWithDetailsAllOfAge](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealNonStrictWithDetailsAllOfAge.md)
- - [Pipedrive.DealNonStrictWithDetailsAllOfAverageTimeToWon](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealNonStrictWithDetailsAllOfAverageTimeToWon.md)
- - [Pipedrive.DealNonStrictWithDetailsAllOfStayInPipelineStages](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealNonStrictWithDetailsAllOfStayInPipelineStages.md)
- - [Pipedrive.DealOrganizationData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealOrganizationData.md)
- - [Pipedrive.DealOrganizationDataWithId](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealOrganizationDataWithId.md)
- - [Pipedrive.DealOrganizationDataWithIdAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealOrganizationDataWithIdAllOf.md)
- - [Pipedrive.DealParticipantCountInfo](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealParticipantCountInfo.md)
- - [Pipedrive.DealParticipants](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealParticipants.md)
- - [Pipedrive.DealPersonData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealPersonData.md)
- - [Pipedrive.DealPersonDataEmail](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealPersonDataEmail.md)
- - [Pipedrive.DealPersonDataPhone](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealPersonDataPhone.md)
- - [Pipedrive.DealPersonDataWithId](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealPersonDataWithId.md)
- - [Pipedrive.DealPersonDataWithIdAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealPersonDataWithIdAllOf.md)
- - [Pipedrive.DealProductUnitDuration](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealProductUnitDuration.md)
- - [Pipedrive.DealSearchItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealSearchItem.md)
- - [Pipedrive.DealSearchItemItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealSearchItemItem.md)
- - [Pipedrive.DealSearchItemItemOrganization](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealSearchItemItemOrganization.md)
- - [Pipedrive.DealSearchItemItemOwner](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealSearchItemItemOwner.md)
- - [Pipedrive.DealSearchItemItemPerson](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealSearchItemItemPerson.md)
- - [Pipedrive.DealSearchItemItemStage](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealSearchItemItemStage.md)
- - [Pipedrive.DealSearchResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealSearchResponse.md)
- - [Pipedrive.DealSearchResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealSearchResponseAllOf.md)
- - [Pipedrive.DealSearchResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealSearchResponseAllOfData.md)
- - [Pipedrive.DealStrict](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealStrict.md)
- - [Pipedrive.DealStrictModeFields](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealStrictModeFields.md)
- - [Pipedrive.DealStrictWithMergeId](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealStrictWithMergeId.md)
- - [Pipedrive.DealStrictWithMergeIdAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealStrictWithMergeIdAllOf.md)
- - [Pipedrive.DealSummary](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealSummary.md)
- - [Pipedrive.DealSummaryPerCurrency](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealSummaryPerCurrency.md)
- - [Pipedrive.DealSummaryPerCurrencyFull](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealSummaryPerCurrencyFull.md)
- - [Pipedrive.DealSummaryPerCurrencyFullCURRENCYID](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealSummaryPerCurrencyFullCURRENCYID.md)
- - [Pipedrive.DealSummaryPerStages](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealSummaryPerStages.md)
- - [Pipedrive.DealSummaryPerStagesSTAGEID](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealSummaryPerStagesSTAGEID.md)
- - [Pipedrive.DealSummaryPerStagesSTAGEIDCURRENCYID](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealSummaryPerStagesSTAGEIDCURRENCYID.md)
- - [Pipedrive.DealTitleParameter](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealTitleParameter.md)
- - [Pipedrive.DealUserData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealUserData.md)
- - [Pipedrive.DealUserDataWithId](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealUserDataWithId.md)
- - [Pipedrive.DealUserDataWithIdAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealUserDataWithIdAllOf.md)
- - [Pipedrive.DealsCountAndActivityInfo](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsCountAndActivityInfo.md)
- - [Pipedrive.DealsCountInfo](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsCountInfo.md)
- - [Pipedrive.DealsMovementsInfo](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsMovementsInfo.md)
- - [Pipedrive.DealsMovementsInfoFormattedValues](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsMovementsInfoFormattedValues.md)
- - [Pipedrive.DealsMovementsInfoValues](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsMovementsInfoValues.md)
- - [Pipedrive.DeleteActivitiesResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteActivitiesResponse200.md)
- - [Pipedrive.DeleteActivitiesResponse200Data](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteActivitiesResponse200Data.md)
- - [Pipedrive.DeleteActivityResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteActivityResponse200.md)
- - [Pipedrive.DeleteActivityResponse200Data](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteActivityResponse200Data.md)
- - [Pipedrive.DeleteChannelSuccess](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteChannelSuccess.md)
- - [Pipedrive.DeleteComment](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteComment.md)
- - [Pipedrive.DeleteConversationSuccess](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteConversationSuccess.md)
- - [Pipedrive.DeleteDeal](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteDeal.md)
- - [Pipedrive.DeleteDealData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteDealData.md)
- - [Pipedrive.DeleteDealFollower](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteDealFollower.md)
- - [Pipedrive.DeleteDealFollowerData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteDealFollowerData.md)
- - [Pipedrive.DeleteDealParticipant](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteDealParticipant.md)
- - [Pipedrive.DeleteDealParticipantData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteDealParticipantData.md)
- - [Pipedrive.DeleteDealProduct](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteDealProduct.md)
- - [Pipedrive.DeleteDealProductData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteDealProductData.md)
- - [Pipedrive.DeleteFile](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteFile.md)
- - [Pipedrive.DeleteFileData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteFileData.md)
- - [Pipedrive.DeleteGoalResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteGoalResponse200.md)
- - [Pipedrive.DeleteMultipleDeals](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteMultipleDeals.md)
- - [Pipedrive.DeleteMultipleDealsData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteMultipleDealsData.md)
- - [Pipedrive.DeleteMultipleProductFieldsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteMultipleProductFieldsResponse.md)
- - [Pipedrive.DeleteMultipleProductFieldsResponseData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteMultipleProductFieldsResponseData.md)
- - [Pipedrive.DeleteNote](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteNote.md)
- - [Pipedrive.DeletePersonResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeletePersonResponse.md)
- - [Pipedrive.DeletePersonResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeletePersonResponseAllOf.md)
- - [Pipedrive.DeletePersonResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeletePersonResponseAllOfData.md)
- - [Pipedrive.DeletePersonsInBulkResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeletePersonsInBulkResponse.md)
- - [Pipedrive.DeletePersonsInBulkResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeletePersonsInBulkResponseAllOf.md)
- - [Pipedrive.DeletePersonsInBulkResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeletePersonsInBulkResponseAllOfData.md)
- - [Pipedrive.DeletePipelineResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeletePipelineResponse200.md)
- - [Pipedrive.DeletePipelineResponse200Data](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeletePipelineResponse200Data.md)
- - [Pipedrive.DeleteProductFieldResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteProductFieldResponse.md)
- - [Pipedrive.DeleteProductFieldResponseData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteProductFieldResponseData.md)
- - [Pipedrive.DeleteProductFollowerResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteProductFollowerResponse.md)
- - [Pipedrive.DeleteProductFollowerResponseData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteProductFollowerResponseData.md)
- - [Pipedrive.DeleteProductResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteProductResponse.md)
- - [Pipedrive.DeleteProductResponseData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteProductResponseData.md)
- - [Pipedrive.DeleteProject](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteProject.md)
- - [Pipedrive.DeleteProjectData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteProjectData.md)
- - [Pipedrive.DeleteProjectResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteProjectResponse200.md)
- - [Pipedrive.DeleteResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteResponse.md)
- - [Pipedrive.DeleteResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteResponseAllOf.md)
- - [Pipedrive.DeleteResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteResponseAllOfData.md)
- - [Pipedrive.DeleteRole](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteRole.md)
- - [Pipedrive.DeleteRoleAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteRoleAllOf.md)
- - [Pipedrive.DeleteRoleAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteRoleAllOfData.md)
- - [Pipedrive.DeleteRoleAssignment](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteRoleAssignment.md)
- - [Pipedrive.DeleteRoleAssignmentAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteRoleAssignmentAllOf.md)
- - [Pipedrive.DeleteRoleAssignmentAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteRoleAssignmentAllOfData.md)
- - [Pipedrive.DeleteRoleAssignmentRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteRoleAssignmentRequest.md)
- - [Pipedrive.DeleteStageResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteStageResponse200.md)
- - [Pipedrive.DeleteStageResponse200Data](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteStageResponse200Data.md)
- - [Pipedrive.DeleteStagesResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteStagesResponse200.md)
- - [Pipedrive.DeleteStagesResponse200Data](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteStagesResponse200Data.md)
- - [Pipedrive.DeleteTask](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteTask.md)
- - [Pipedrive.DeleteTaskData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteTaskData.md)
- - [Pipedrive.DeleteTaskResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteTaskResponse200.md)
- - [Pipedrive.DeleteTeamUserRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteTeamUserRequest.md)
- - [Pipedrive.Duration](https://github.com/pipedrive/client-nodejs/blob/master/docs/Duration.md)
- - [Pipedrive.EditPipeline](https://github.com/pipedrive/client-nodejs/blob/master/docs/EditPipeline.md)
- - [Pipedrive.EditPipelineAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/EditPipelineAllOf.md)
- - [Pipedrive.EmailInfo](https://github.com/pipedrive/client-nodejs/blob/master/docs/EmailInfo.md)
- - [Pipedrive.ExpectedOutcome](https://github.com/pipedrive/client-nodejs/blob/master/docs/ExpectedOutcome.md)
- - [Pipedrive.FailResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/FailResponse.md)
- - [Pipedrive.Field](https://github.com/pipedrive/client-nodejs/blob/master/docs/Field.md)
- - [Pipedrive.FieldCreateRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/FieldCreateRequest.md)
- - [Pipedrive.FieldCreateRequestAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/FieldCreateRequestAllOf.md)
- - [Pipedrive.FieldResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/FieldResponse.md)
- - [Pipedrive.FieldResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/FieldResponseAllOf.md)
- - [Pipedrive.FieldType](https://github.com/pipedrive/client-nodejs/blob/master/docs/FieldType.md)
- - [Pipedrive.FieldTypeAsString](https://github.com/pipedrive/client-nodejs/blob/master/docs/FieldTypeAsString.md)
- - [Pipedrive.FieldUpdateRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/FieldUpdateRequest.md)
- - [Pipedrive.FieldsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/FieldsResponse.md)
- - [Pipedrive.FieldsResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/FieldsResponseAllOf.md)
- - [Pipedrive.FileData](https://github.com/pipedrive/client-nodejs/blob/master/docs/FileData.md)
- - [Pipedrive.FileItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/FileItem.md)
- - [Pipedrive.FilterGetItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/FilterGetItem.md)
- - [Pipedrive.FilterType](https://github.com/pipedrive/client-nodejs/blob/master/docs/FilterType.md)
- - [Pipedrive.FiltersBulkDeleteResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/FiltersBulkDeleteResponse.md)
- - [Pipedrive.FiltersBulkDeleteResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/FiltersBulkDeleteResponseAllOf.md)
- - [Pipedrive.FiltersBulkDeleteResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/FiltersBulkDeleteResponseAllOfData.md)
- - [Pipedrive.FiltersBulkGetResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/FiltersBulkGetResponse.md)
- - [Pipedrive.FiltersBulkGetResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/FiltersBulkGetResponseAllOf.md)
- - [Pipedrive.FiltersDeleteResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/FiltersDeleteResponse.md)
- - [Pipedrive.FiltersDeleteResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/FiltersDeleteResponseAllOf.md)
- - [Pipedrive.FiltersDeleteResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/FiltersDeleteResponseAllOfData.md)
- - [Pipedrive.FiltersGetResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/FiltersGetResponse.md)
- - [Pipedrive.FiltersGetResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/FiltersGetResponseAllOf.md)
- - [Pipedrive.FiltersPostResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/FiltersPostResponse.md)
- - [Pipedrive.FiltersPostResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/FiltersPostResponseAllOf.md)
- - [Pipedrive.FiltersPostResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/FiltersPostResponseAllOfData.md)
- - [Pipedrive.FindGoalResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/FindGoalResponse.md)
- - [Pipedrive.FollowerData](https://github.com/pipedrive/client-nodejs/blob/master/docs/FollowerData.md)
- - [Pipedrive.FollowerDataWithID](https://github.com/pipedrive/client-nodejs/blob/master/docs/FollowerDataWithID.md)
- - [Pipedrive.FollowerDataWithIDAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/FollowerDataWithIDAllOf.md)
- - [Pipedrive.FullProjectObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/FullProjectObject.md)
- - [Pipedrive.FullRole](https://github.com/pipedrive/client-nodejs/blob/master/docs/FullRole.md)
- - [Pipedrive.FullRoleAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/FullRoleAllOf.md)
- - [Pipedrive.FullTaskObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/FullTaskObject.md)
- - [Pipedrive.GetActivitiesCollectionResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetActivitiesCollectionResponse200.md)
- - [Pipedrive.GetActivitiesResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetActivitiesResponse200.md)
- - [Pipedrive.GetActivitiesResponse200RelatedObjects](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetActivitiesResponse200RelatedObjects.md)
- - [Pipedrive.GetActivityResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetActivityResponse200.md)
- - [Pipedrive.GetAddProductAttachementDetails](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetAddProductAttachementDetails.md)
- - [Pipedrive.GetAddUpdateStage](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetAddUpdateStage.md)
- - [Pipedrive.GetAddedDeal](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetAddedDeal.md)
- - [Pipedrive.GetAllFiles](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetAllFiles.md)
- - [Pipedrive.GetAllPersonsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetAllPersonsResponse.md)
- - [Pipedrive.GetAllPersonsResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetAllPersonsResponseAllOf.md)
- - [Pipedrive.GetAllPipelines](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetAllPipelines.md)
- - [Pipedrive.GetAllPipelinesAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetAllPipelinesAllOf.md)
- - [Pipedrive.GetAllProductFieldsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetAllProductFieldsResponse.md)
- - [Pipedrive.GetComments](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetComments.md)
- - [Pipedrive.GetDeal](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDeal.md)
- - [Pipedrive.GetDealAdditionalData](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDealAdditionalData.md)
- - [Pipedrive.GetDeals](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDeals.md)
- - [Pipedrive.GetDealsCollection](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDealsCollection.md)
- - [Pipedrive.GetDealsConversionRatesInPipeline](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDealsConversionRatesInPipeline.md)
- - [Pipedrive.GetDealsConversionRatesInPipelineAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDealsConversionRatesInPipelineAllOf.md)
- - [Pipedrive.GetDealsConversionRatesInPipelineAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDealsConversionRatesInPipelineAllOfData.md)
- - [Pipedrive.GetDealsMovementsInPipeline](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDealsMovementsInPipeline.md)
- - [Pipedrive.GetDealsMovementsInPipelineAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDealsMovementsInPipelineAllOf.md)
- - [Pipedrive.GetDealsMovementsInPipelineAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDealsMovementsInPipelineAllOfData.md)
- - [Pipedrive.GetDealsMovementsInPipelineAllOfDataAverageAgeInDays](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDealsMovementsInPipelineAllOfDataAverageAgeInDays.md)
- - [Pipedrive.GetDealsMovementsInPipelineAllOfDataAverageAgeInDaysByStages](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDealsMovementsInPipelineAllOfDataAverageAgeInDaysByStages.md)
- - [Pipedrive.GetDealsMovementsInPipelineAllOfDataMovementsBetweenStages](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDealsMovementsInPipelineAllOfDataMovementsBetweenStages.md)
- - [Pipedrive.GetDealsRelatedObjects](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDealsRelatedObjects.md)
- - [Pipedrive.GetDealsSummary](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDealsSummary.md)
- - [Pipedrive.GetDealsSummaryData](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDealsSummaryData.md)
- - [Pipedrive.GetDealsSummaryDataValuesTotal](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDealsSummaryDataValuesTotal.md)
- - [Pipedrive.GetDealsSummaryDataWeightedValuesTotal](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDealsSummaryDataWeightedValuesTotal.md)
- - [Pipedrive.GetDealsTimeline](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDealsTimeline.md)
- - [Pipedrive.GetDealsTimelineData](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDealsTimelineData.md)
- - [Pipedrive.GetDealsTimelineDataTotals](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDealsTimelineDataTotals.md)
- - [Pipedrive.GetDuplicatedDeal](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDuplicatedDeal.md)
- - [Pipedrive.GetGoalResultResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetGoalResultResponse200.md)
- - [Pipedrive.GetGoalsResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetGoalsResponse200.md)
- - [Pipedrive.GetLeadLabelsResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetLeadLabelsResponse200.md)
- - [Pipedrive.GetLeadSourcesResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetLeadSourcesResponse200.md)
- - [Pipedrive.GetLeadSourcesResponse200Data](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetLeadSourcesResponse200Data.md)
- - [Pipedrive.GetLeadsResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetLeadsResponse200.md)
- - [Pipedrive.GetMergedDeal](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetMergedDeal.md)
- - [Pipedrive.GetNotes](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetNotes.md)
- - [Pipedrive.GetOneFile](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetOneFile.md)
- - [Pipedrive.GetOnePipeline](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetOnePipeline.md)
- - [Pipedrive.GetOnePipelineAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetOnePipelineAllOf.md)
- - [Pipedrive.GetOneStage](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetOneStage.md)
- - [Pipedrive.GetPersonDetailsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetPersonDetailsResponse.md)
- - [Pipedrive.GetPersonDetailsResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetPersonDetailsResponseAllOf.md)
- - [Pipedrive.GetPersonDetailsResponseAllOfAdditionalData](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetPersonDetailsResponseAllOfAdditionalData.md)
- - [Pipedrive.GetProductAttachementDetails](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProductAttachementDetails.md)
- - [Pipedrive.GetProductFieldResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProductFieldResponse.md)
- - [Pipedrive.GetProjectBoardResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProjectBoardResponse200.md)
- - [Pipedrive.GetProjectBoardsResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProjectBoardsResponse200.md)
- - [Pipedrive.GetProjectGroupsResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProjectGroupsResponse200.md)
- - [Pipedrive.GetProjectPhaseResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProjectPhaseResponse200.md)
- - [Pipedrive.GetProjectPhasesResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProjectPhasesResponse200.md)
- - [Pipedrive.GetProjectPlanResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProjectPlanResponse200.md)
- - [Pipedrive.GetProjectResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProjectResponse200.md)
- - [Pipedrive.GetProjectTemplateResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProjectTemplateResponse200.md)
- - [Pipedrive.GetProjectTemplatesResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProjectTemplatesResponse200.md)
- - [Pipedrive.GetProjectsResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProjectsResponse200.md)
- - [Pipedrive.GetRecents](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetRecents.md)
- - [Pipedrive.GetRecentsAdditionalData](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetRecentsAdditionalData.md)
- - [Pipedrive.GetRole](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetRole.md)
- - [Pipedrive.GetRoleAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetRoleAllOf.md)
- - [Pipedrive.GetRoleAllOfAdditionalData](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetRoleAllOfAdditionalData.md)
- - [Pipedrive.GetRoleAssignments](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetRoleAssignments.md)
- - [Pipedrive.GetRoleAssignmentsAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetRoleAssignmentsAllOf.md)
- - [Pipedrive.GetRolePipelines](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetRolePipelines.md)
- - [Pipedrive.GetRolePipelinesAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetRolePipelinesAllOf.md)
- - [Pipedrive.GetRolePipelinesAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetRolePipelinesAllOfData.md)
- - [Pipedrive.GetRoleSettings](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetRoleSettings.md)
- - [Pipedrive.GetRoleSettingsAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetRoleSettingsAllOf.md)
- - [Pipedrive.GetRoles](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetRoles.md)
- - [Pipedrive.GetRolesAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetRolesAllOf.md)
- - [Pipedrive.GetStageDeals](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetStageDeals.md)
- - [Pipedrive.GetStages](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetStages.md)
- - [Pipedrive.GetTaskResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetTaskResponse200.md)
- - [Pipedrive.GetTasksResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetTasksResponse200.md)
- - [Pipedrive.GoalResults](https://github.com/pipedrive/client-nodejs/blob/master/docs/GoalResults.md)
- - [Pipedrive.GoalType](https://github.com/pipedrive/client-nodejs/blob/master/docs/GoalType.md)
- - [Pipedrive.GoalsResponseComponent](https://github.com/pipedrive/client-nodejs/blob/master/docs/GoalsResponseComponent.md)
- - [Pipedrive.IconKey](https://github.com/pipedrive/client-nodejs/blob/master/docs/IconKey.md)
- - [Pipedrive.InlineResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/InlineResponse200.md)
- - [Pipedrive.InlineResponse2001](https://github.com/pipedrive/client-nodejs/blob/master/docs/InlineResponse2001.md)
- - [Pipedrive.InlineResponse2002](https://github.com/pipedrive/client-nodejs/blob/master/docs/InlineResponse2002.md)
- - [Pipedrive.InlineResponse400](https://github.com/pipedrive/client-nodejs/blob/master/docs/InlineResponse400.md)
- - [Pipedrive.InlineResponse4001](https://github.com/pipedrive/client-nodejs/blob/master/docs/InlineResponse4001.md)
- - [Pipedrive.InlineResponse4001AdditionalData](https://github.com/pipedrive/client-nodejs/blob/master/docs/InlineResponse4001AdditionalData.md)
- - [Pipedrive.InlineResponse400AdditionalData](https://github.com/pipedrive/client-nodejs/blob/master/docs/InlineResponse400AdditionalData.md)
- - [Pipedrive.InlineResponse403](https://github.com/pipedrive/client-nodejs/blob/master/docs/InlineResponse403.md)
- - [Pipedrive.InlineResponse4031](https://github.com/pipedrive/client-nodejs/blob/master/docs/InlineResponse4031.md)
- - [Pipedrive.InlineResponse4031AdditionalData](https://github.com/pipedrive/client-nodejs/blob/master/docs/InlineResponse4031AdditionalData.md)
- - [Pipedrive.InlineResponse403AdditionalData](https://github.com/pipedrive/client-nodejs/blob/master/docs/InlineResponse403AdditionalData.md)
- - [Pipedrive.InlineResponse404](https://github.com/pipedrive/client-nodejs/blob/master/docs/InlineResponse404.md)
- - [Pipedrive.InlineResponse404AdditionalData](https://github.com/pipedrive/client-nodejs/blob/master/docs/InlineResponse404AdditionalData.md)
- - [Pipedrive.ItemSearchAdditionalData](https://github.com/pipedrive/client-nodejs/blob/master/docs/ItemSearchAdditionalData.md)
- - [Pipedrive.ItemSearchAdditionalDataPagination](https://github.com/pipedrive/client-nodejs/blob/master/docs/ItemSearchAdditionalDataPagination.md)
- - [Pipedrive.ItemSearchFieldResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/ItemSearchFieldResponse.md)
- - [Pipedrive.ItemSearchFieldResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ItemSearchFieldResponseAllOf.md)
- - [Pipedrive.ItemSearchFieldResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/ItemSearchFieldResponseAllOfData.md)
- - [Pipedrive.ItemSearchItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/ItemSearchItem.md)
- - [Pipedrive.ItemSearchResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/ItemSearchResponse.md)
- - [Pipedrive.ItemSearchResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ItemSearchResponseAllOf.md)
- - [Pipedrive.ItemSearchResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/ItemSearchResponseAllOfData.md)
- - [Pipedrive.LeadIdResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadIdResponse200.md)
- - [Pipedrive.LeadIdResponse200Data](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadIdResponse200Data.md)
- - [Pipedrive.LeadLabelColor](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadLabelColor.md)
- - [Pipedrive.LeadLabelResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadLabelResponse.md)
- - [Pipedrive.LeadResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadResponse.md)
- - [Pipedrive.LeadResponse404](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadResponse404.md)
- - [Pipedrive.LeadSearchItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadSearchItem.md)
- - [Pipedrive.LeadSearchItemItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadSearchItemItem.md)
- - [Pipedrive.LeadSearchItemItemOrganization](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadSearchItemItemOrganization.md)
- - [Pipedrive.LeadSearchItemItemOwner](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadSearchItemItemOwner.md)
- - [Pipedrive.LeadSearchItemItemPerson](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadSearchItemItemPerson.md)
- - [Pipedrive.LeadSearchResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadSearchResponse.md)
- - [Pipedrive.LeadSearchResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadSearchResponseAllOf.md)
- - [Pipedrive.LeadSearchResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadSearchResponseAllOfData.md)
- - [Pipedrive.LeadValue](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadValue.md)
- - [Pipedrive.LinkRemoteFileToItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/LinkRemoteFileToItem.md)
- - [Pipedrive.ListActivitiesResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListActivitiesResponse.md)
- - [Pipedrive.ListActivitiesResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListActivitiesResponseAllOf.md)
- - [Pipedrive.ListDealsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListDealsResponse.md)
- - [Pipedrive.ListDealsResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListDealsResponseAllOf.md)
- - [Pipedrive.ListDealsResponseAllOfRelatedObjects](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListDealsResponseAllOfRelatedObjects.md)
- - [Pipedrive.ListFilesResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListFilesResponse.md)
- - [Pipedrive.ListFilesResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListFilesResponseAllOf.md)
- - [Pipedrive.ListFollowersResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListFollowersResponse.md)
- - [Pipedrive.ListFollowersResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListFollowersResponseAllOf.md)
- - [Pipedrive.ListFollowersResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListFollowersResponseAllOfData.md)
- - [Pipedrive.ListMailMessagesResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListMailMessagesResponse.md)
- - [Pipedrive.ListMailMessagesResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListMailMessagesResponseAllOf.md)
- - [Pipedrive.ListMailMessagesResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListMailMessagesResponseAllOfData.md)
- - [Pipedrive.ListPermittedUsersResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListPermittedUsersResponse.md)
- - [Pipedrive.ListPermittedUsersResponse1](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListPermittedUsersResponse1.md)
- - [Pipedrive.ListPermittedUsersResponse1AllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListPermittedUsersResponse1AllOf.md)
- - [Pipedrive.ListPermittedUsersResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListPermittedUsersResponseAllOf.md)
- - [Pipedrive.ListPermittedUsersResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListPermittedUsersResponseAllOfData.md)
- - [Pipedrive.ListPersonProductsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListPersonProductsResponse.md)
- - [Pipedrive.ListPersonProductsResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListPersonProductsResponseAllOf.md)
- - [Pipedrive.ListPersonProductsResponseAllOfDEALID](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListPersonProductsResponseAllOfDEALID.md)
- - [Pipedrive.ListPersonProductsResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListPersonProductsResponseAllOfData.md)
- - [Pipedrive.ListPersonsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListPersonsResponse.md)
- - [Pipedrive.ListPersonsResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListPersonsResponseAllOf.md)
- - [Pipedrive.ListPersonsResponseAllOfRelatedObjects](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListPersonsResponseAllOfRelatedObjects.md)
- - [Pipedrive.ListProductAdditionalData](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListProductAdditionalData.md)
- - [Pipedrive.ListProductAdditionalDataAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListProductAdditionalDataAllOf.md)
- - [Pipedrive.ListProductFilesResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListProductFilesResponse.md)
- - [Pipedrive.ListProductFilesResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListProductFilesResponseAllOf.md)
- - [Pipedrive.ListProductFollowersResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListProductFollowersResponse.md)
- - [Pipedrive.ListProductFollowersResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListProductFollowersResponseAllOf.md)
- - [Pipedrive.ListProductFollowersResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListProductFollowersResponseAllOfData.md)
- - [Pipedrive.ListProductsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListProductsResponse.md)
- - [Pipedrive.ListProductsResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListProductsResponseAllOf.md)
- - [Pipedrive.ListProductsResponseAllOfRelatedObjects](https://github.com/pipedrive/client-nodejs/blob/master/docs/ListProductsResponseAllOfRelatedObjects.md)
- - [Pipedrive.MailMessage](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailMessage.md)
- - [Pipedrive.MailMessageAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailMessageAllOf.md)
- - [Pipedrive.MailMessageData](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailMessageData.md)
- - [Pipedrive.MailMessageItemForList](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailMessageItemForList.md)
- - [Pipedrive.MailMessageItemForListAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailMessageItemForListAllOf.md)
- - [Pipedrive.MailParticipant](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailParticipant.md)
- - [Pipedrive.MailServiceBaseResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailServiceBaseResponse.md)
- - [Pipedrive.MailThread](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailThread.md)
- - [Pipedrive.MailThreadAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailThreadAllOf.md)
- - [Pipedrive.MailThreadDelete](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailThreadDelete.md)
- - [Pipedrive.MailThreadDeleteAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailThreadDeleteAllOf.md)
- - [Pipedrive.MailThreadDeleteAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailThreadDeleteAllOfData.md)
- - [Pipedrive.MailThreadMessages](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailThreadMessages.md)
- - [Pipedrive.MailThreadMessagesAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailThreadMessagesAllOf.md)
- - [Pipedrive.MailThreadOne](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailThreadOne.md)
- - [Pipedrive.MailThreadOneAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailThreadOneAllOf.md)
- - [Pipedrive.MailThreadParticipant](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailThreadParticipant.md)
- - [Pipedrive.MailThreadPut](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailThreadPut.md)
- - [Pipedrive.MailThreadPutAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/MailThreadPutAllOf.md)
- - [Pipedrive.MarketingStatus](https://github.com/pipedrive/client-nodejs/blob/master/docs/MarketingStatus.md)
- - [Pipedrive.MergeDealsRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/MergeDealsRequest.md)
- - [Pipedrive.MergeOrganizationsRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/MergeOrganizationsRequest.md)
- - [Pipedrive.MergePersonDealRelatedInfo](https://github.com/pipedrive/client-nodejs/blob/master/docs/MergePersonDealRelatedInfo.md)
- - [Pipedrive.MergePersonItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/MergePersonItem.md)
- - [Pipedrive.MergePersonsRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/MergePersonsRequest.md)
- - [Pipedrive.MergePersonsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/MergePersonsResponse.md)
- - [Pipedrive.MergePersonsResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/MergePersonsResponseAllOf.md)
- - [Pipedrive.MessageObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/MessageObject.md)
- - [Pipedrive.MessageObjectAttachments](https://github.com/pipedrive/client-nodejs/blob/master/docs/MessageObjectAttachments.md)
- - [Pipedrive.NewDeal](https://github.com/pipedrive/client-nodejs/blob/master/docs/NewDeal.md)
- - [Pipedrive.NewDealParameters](https://github.com/pipedrive/client-nodejs/blob/master/docs/NewDealParameters.md)
- - [Pipedrive.NewDealProduct](https://github.com/pipedrive/client-nodejs/blob/master/docs/NewDealProduct.md)
- - [Pipedrive.NewFollowerResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/NewFollowerResponse.md)
- - [Pipedrive.NewFollowerResponseData](https://github.com/pipedrive/client-nodejs/blob/master/docs/NewFollowerResponseData.md)
- - [Pipedrive.NewGoal](https://github.com/pipedrive/client-nodejs/blob/master/docs/NewGoal.md)
- - [Pipedrive.NewOrganization](https://github.com/pipedrive/client-nodejs/blob/master/docs/NewOrganization.md)
- - [Pipedrive.NewOrganizationAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/NewOrganizationAllOf.md)
- - [Pipedrive.NewPerson](https://github.com/pipedrive/client-nodejs/blob/master/docs/NewPerson.md)
- - [Pipedrive.NewPersonAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/NewPersonAllOf.md)
- - [Pipedrive.NewProductField](https://github.com/pipedrive/client-nodejs/blob/master/docs/NewProductField.md)
- - [Pipedrive.Note](https://github.com/pipedrive/client-nodejs/blob/master/docs/Note.md)
- - [Pipedrive.NoteAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/NoteAllOf.md)
- - [Pipedrive.NoteConnectToParams](https://github.com/pipedrive/client-nodejs/blob/master/docs/NoteConnectToParams.md)
- - [Pipedrive.NoteCreatorUser](https://github.com/pipedrive/client-nodejs/blob/master/docs/NoteCreatorUser.md)
- - [Pipedrive.NoteField](https://github.com/pipedrive/client-nodejs/blob/master/docs/NoteField.md)
- - [Pipedrive.NoteFieldOptions](https://github.com/pipedrive/client-nodejs/blob/master/docs/NoteFieldOptions.md)
- - [Pipedrive.NoteFieldsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/NoteFieldsResponse.md)
- - [Pipedrive.NoteFieldsResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/NoteFieldsResponseAllOf.md)
- - [Pipedrive.NoteParams](https://github.com/pipedrive/client-nodejs/blob/master/docs/NoteParams.md)
- - [Pipedrive.NumberBoolean](https://github.com/pipedrive/client-nodejs/blob/master/docs/NumberBoolean.md)
- - [Pipedrive.NumberBooleanDefault0](https://github.com/pipedrive/client-nodejs/blob/master/docs/NumberBooleanDefault0.md)
- - [Pipedrive.NumberBooleanDefault1](https://github.com/pipedrive/client-nodejs/blob/master/docs/NumberBooleanDefault1.md)
- - [Pipedrive.ObjectPrices](https://github.com/pipedrive/client-nodejs/blob/master/docs/ObjectPrices.md)
- - [Pipedrive.OneLeadResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/OneLeadResponse200.md)
- - [Pipedrive.OptionalNameObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/OptionalNameObject.md)
- - [Pipedrive.OrgAndOwnerId](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrgAndOwnerId.md)
- - [Pipedrive.OrganizationAddressInfo](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationAddressInfo.md)
- - [Pipedrive.OrganizationCountAndAddressInfo](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationCountAndAddressInfo.md)
- - [Pipedrive.OrganizationCountInfo](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationCountInfo.md)
- - [Pipedrive.OrganizationData](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationData.md)
- - [Pipedrive.OrganizationDataWithId](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationDataWithId.md)
- - [Pipedrive.OrganizationDataWithIdAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationDataWithIdAllOf.md)
- - [Pipedrive.OrganizationDataWithIdAndActiveFlag](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationDataWithIdAndActiveFlag.md)
- - [Pipedrive.OrganizationDataWithIdAndActiveFlagAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationDataWithIdAndActiveFlagAllOf.md)
- - [Pipedrive.OrganizationDeleteResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationDeleteResponse.md)
- - [Pipedrive.OrganizationDeleteResponseData](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationDeleteResponseData.md)
- - [Pipedrive.OrganizationDetailsGetResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationDetailsGetResponse.md)
- - [Pipedrive.OrganizationDetailsGetResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationDetailsGetResponseAllOf.md)
- - [Pipedrive.OrganizationDetailsGetResponseAllOfAdditionalData](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationDetailsGetResponseAllOfAdditionalData.md)
- - [Pipedrive.OrganizationFlowResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationFlowResponse.md)
- - [Pipedrive.OrganizationFlowResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationFlowResponseAllOf.md)
- - [Pipedrive.OrganizationFlowResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationFlowResponseAllOfData.md)
- - [Pipedrive.OrganizationFlowResponseAllOfRelatedObjects](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationFlowResponseAllOfRelatedObjects.md)
- - [Pipedrive.OrganizationFollowerDeleteResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationFollowerDeleteResponse.md)
- - [Pipedrive.OrganizationFollowerDeleteResponseData](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationFollowerDeleteResponseData.md)
- - [Pipedrive.OrganizationFollowerItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationFollowerItem.md)
- - [Pipedrive.OrganizationFollowerItemAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationFollowerItemAllOf.md)
- - [Pipedrive.OrganizationFollowerPostResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationFollowerPostResponse.md)
- - [Pipedrive.OrganizationFollowersListResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationFollowersListResponse.md)
- - [Pipedrive.OrganizationItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationItem.md)
- - [Pipedrive.OrganizationItemAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationItemAllOf.md)
- - [Pipedrive.OrganizationPostResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationPostResponse.md)
- - [Pipedrive.OrganizationPostResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationPostResponseAllOf.md)
- - [Pipedrive.OrganizationRelationship](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationRelationship.md)
- - [Pipedrive.OrganizationRelationshipDeleteResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationRelationshipDeleteResponse.md)
- - [Pipedrive.OrganizationRelationshipDeleteResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationRelationshipDeleteResponseAllOf.md)
- - [Pipedrive.OrganizationRelationshipDeleteResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationRelationshipDeleteResponseAllOfData.md)
- - [Pipedrive.OrganizationRelationshipDetails](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationRelationshipDetails.md)
- - [Pipedrive.OrganizationRelationshipGetResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationRelationshipGetResponse.md)
- - [Pipedrive.OrganizationRelationshipGetResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationRelationshipGetResponseAllOf.md)
- - [Pipedrive.OrganizationRelationshipPostResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationRelationshipPostResponse.md)
- - [Pipedrive.OrganizationRelationshipPostResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationRelationshipPostResponseAllOf.md)
- - [Pipedrive.OrganizationRelationshipUpdateResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationRelationshipUpdateResponse.md)
- - [Pipedrive.OrganizationRelationshipWithCalculatedFields](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationRelationshipWithCalculatedFields.md)
- - [Pipedrive.OrganizationSearchItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationSearchItem.md)
- - [Pipedrive.OrganizationSearchItemItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationSearchItemItem.md)
- - [Pipedrive.OrganizationSearchResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationSearchResponse.md)
- - [Pipedrive.OrganizationSearchResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationSearchResponseAllOf.md)
- - [Pipedrive.OrganizationSearchResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationSearchResponseAllOfData.md)
- - [Pipedrive.OrganizationUpdateResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationUpdateResponse.md)
- - [Pipedrive.OrganizationUpdateResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationUpdateResponseAllOf.md)
- - [Pipedrive.OrganizationsCollectionResponseObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsCollectionResponseObject.md)
- - [Pipedrive.OrganizationsCollectionResponseObjectAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsCollectionResponseObjectAllOf.md)
- - [Pipedrive.OrganizationsDeleteResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsDeleteResponse.md)
- - [Pipedrive.OrganizationsDeleteResponseData](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsDeleteResponseData.md)
- - [Pipedrive.OrganizationsMergeResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsMergeResponse.md)
- - [Pipedrive.OrganizationsMergeResponseData](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsMergeResponseData.md)
- - [Pipedrive.Owner](https://github.com/pipedrive/client-nodejs/blob/master/docs/Owner.md)
- - [Pipedrive.OwnerAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/OwnerAllOf.md)
- - [Pipedrive.PaginationDetails](https://github.com/pipedrive/client-nodejs/blob/master/docs/PaginationDetails.md)
- - [Pipedrive.PaginationDetailsAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/PaginationDetailsAllOf.md)
- - [Pipedrive.Params](https://github.com/pipedrive/client-nodejs/blob/master/docs/Params.md)
- - [Pipedrive.PaymentItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/PaymentItem.md)
- - [Pipedrive.PaymentsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/PaymentsResponse.md)
- - [Pipedrive.PaymentsResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/PaymentsResponseAllOf.md)
- - [Pipedrive.PermissionSets](https://github.com/pipedrive/client-nodejs/blob/master/docs/PermissionSets.md)
- - [Pipedrive.PermissionSetsAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/PermissionSetsAllOf.md)
- - [Pipedrive.PermissionSetsItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/PermissionSetsItem.md)
- - [Pipedrive.PersonCountAndEmailInfo](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonCountAndEmailInfo.md)
- - [Pipedrive.PersonCountEmailDealAndActivityInfo](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonCountEmailDealAndActivityInfo.md)
- - [Pipedrive.PersonCountInfo](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonCountInfo.md)
- - [Pipedrive.PersonData](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonData.md)
- - [Pipedrive.PersonDataEmail](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonDataEmail.md)
- - [Pipedrive.PersonDataPhone](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonDataPhone.md)
- - [Pipedrive.PersonDataWithActiveFlag](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonDataWithActiveFlag.md)
- - [Pipedrive.PersonDataWithActiveFlagAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonDataWithActiveFlagAllOf.md)
- - [Pipedrive.PersonFlowResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonFlowResponse.md)
- - [Pipedrive.PersonFlowResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonFlowResponseAllOf.md)
- - [Pipedrive.PersonFlowResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonFlowResponseAllOfData.md)
- - [Pipedrive.PersonItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonItem.md)
- - [Pipedrive.PersonListProduct](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonListProduct.md)
- - [Pipedrive.PersonNameCountAndEmailInfo](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonNameCountAndEmailInfo.md)
- - [Pipedrive.PersonNameCountAndEmailInfoWithIds](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonNameCountAndEmailInfoWithIds.md)
- - [Pipedrive.PersonNameCountAndEmailInfoWithIdsAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonNameCountAndEmailInfoWithIdsAllOf.md)
- - [Pipedrive.PersonNameInfo](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonNameInfo.md)
- - [Pipedrive.PersonNameInfoWithOrgAndOwnerId](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonNameInfoWithOrgAndOwnerId.md)
- - [Pipedrive.PersonSearchItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonSearchItem.md)
- - [Pipedrive.PersonSearchItemItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonSearchItemItem.md)
- - [Pipedrive.PersonSearchItemItemOrganization](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonSearchItemItemOrganization.md)
- - [Pipedrive.PersonSearchItemItemOwner](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonSearchItemItemOwner.md)
- - [Pipedrive.PersonSearchResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonSearchResponse.md)
- - [Pipedrive.PersonSearchResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonSearchResponseAllOf.md)
- - [Pipedrive.PersonSearchResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonSearchResponseAllOfData.md)
- - [Pipedrive.PersonsCollectionResponseObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonsCollectionResponseObject.md)
- - [Pipedrive.PictureData](https://github.com/pipedrive/client-nodejs/blob/master/docs/PictureData.md)
- - [Pipedrive.PictureDataPictures](https://github.com/pipedrive/client-nodejs/blob/master/docs/PictureDataPictures.md)
- - [Pipedrive.PictureDataWithID](https://github.com/pipedrive/client-nodejs/blob/master/docs/PictureDataWithID.md)
- - [Pipedrive.PictureDataWithIDAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/PictureDataWithIDAllOf.md)
- - [Pipedrive.PictureDataWithValue](https://github.com/pipedrive/client-nodejs/blob/master/docs/PictureDataWithValue.md)
- - [Pipedrive.PictureDataWithValueAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/PictureDataWithValueAllOf.md)
- - [Pipedrive.Pipeline](https://github.com/pipedrive/client-nodejs/blob/master/docs/Pipeline.md)
- - [Pipedrive.PipelineDetails](https://github.com/pipedrive/client-nodejs/blob/master/docs/PipelineDetails.md)
- - [Pipedrive.PipelineDetailsAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/PipelineDetailsAllOf.md)
- - [Pipedrive.PostComment](https://github.com/pipedrive/client-nodejs/blob/master/docs/PostComment.md)
- - [Pipedrive.PostDealParticipants](https://github.com/pipedrive/client-nodejs/blob/master/docs/PostDealParticipants.md)
- - [Pipedrive.PostGoalResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/PostGoalResponse.md)
- - [Pipedrive.PostNote](https://github.com/pipedrive/client-nodejs/blob/master/docs/PostNote.md)
- - [Pipedrive.PostRoleAssignment](https://github.com/pipedrive/client-nodejs/blob/master/docs/PostRoleAssignment.md)
- - [Pipedrive.PostRoleAssignmentAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/PostRoleAssignmentAllOf.md)
- - [Pipedrive.PostRoleAssignmentAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/PostRoleAssignmentAllOfData.md)
- - [Pipedrive.PostRoleSettings](https://github.com/pipedrive/client-nodejs/blob/master/docs/PostRoleSettings.md)
- - [Pipedrive.PostRoleSettingsAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/PostRoleSettingsAllOf.md)
- - [Pipedrive.PostRoleSettingsAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/PostRoleSettingsAllOfData.md)
- - [Pipedrive.PostRoles](https://github.com/pipedrive/client-nodejs/blob/master/docs/PostRoles.md)
- - [Pipedrive.PostRolesAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/PostRolesAllOf.md)
- - [Pipedrive.PostRolesAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/PostRolesAllOfData.md)
- - [Pipedrive.ProductAttachementFields](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductAttachementFields.md)
- - [Pipedrive.ProductAttachmentDetails](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductAttachmentDetails.md)
- - [Pipedrive.ProductBaseDeal](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductBaseDeal.md)
- - [Pipedrive.ProductField](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductField.md)
- - [Pipedrive.ProductFieldAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductFieldAllOf.md)
- - [Pipedrive.ProductFileItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductFileItem.md)
- - [Pipedrive.ProductListItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductListItem.md)
- - [Pipedrive.ProductRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductRequest.md)
- - [Pipedrive.ProductResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductResponse.md)
- - [Pipedrive.ProductSearchItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductSearchItem.md)
- - [Pipedrive.ProductSearchItemItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductSearchItemItem.md)
- - [Pipedrive.ProductSearchItemItemOwner](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductSearchItemItemOwner.md)
- - [Pipedrive.ProductSearchResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductSearchResponse.md)
- - [Pipedrive.ProductSearchResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductSearchResponseAllOf.md)
- - [Pipedrive.ProductSearchResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductSearchResponseAllOfData.md)
- - [Pipedrive.ProductWithArrayPrices](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductWithArrayPrices.md)
- - [Pipedrive.ProductWithObjectPrices](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductWithObjectPrices.md)
- - [Pipedrive.ProductsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProductsResponse.md)
- - [Pipedrive.ProjectBoardObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectBoardObject.md)
- - [Pipedrive.ProjectGroupsObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectGroupsObject.md)
- - [Pipedrive.ProjectId](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectId.md)
- - [Pipedrive.ProjectMandatoryObjectFragment](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectMandatoryObjectFragment.md)
- - [Pipedrive.ProjectNotChangeableObjectFragment](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectNotChangeableObjectFragment.md)
- - [Pipedrive.ProjectObjectFragment](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectObjectFragment.md)
- - [Pipedrive.ProjectPhaseObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectPhaseObject.md)
- - [Pipedrive.ProjectPlanItemObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectPlanItemObject.md)
- - [Pipedrive.ProjectPostObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectPostObject.md)
- - [Pipedrive.ProjectPostObjectAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectPostObjectAllOf.md)
- - [Pipedrive.ProjectPutObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectPutObject.md)
- - [Pipedrive.ProjectPutPlanItemBodyObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectPutPlanItemBodyObject.md)
- - [Pipedrive.ProjectResponseObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/ProjectResponseObject.md)
- - [Pipedrive.PutRole](https://github.com/pipedrive/client-nodejs/blob/master/docs/PutRole.md)
- - [Pipedrive.PutRoleAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/PutRoleAllOf.md)
- - [Pipedrive.PutRoleAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/PutRoleAllOfData.md)
- - [Pipedrive.PutRolePipelinesBody](https://github.com/pipedrive/client-nodejs/blob/master/docs/PutRolePipelinesBody.md)
- - [Pipedrive.RecentDataProduct](https://github.com/pipedrive/client-nodejs/blob/master/docs/RecentDataProduct.md)
- - [Pipedrive.RecentsActivity](https://github.com/pipedrive/client-nodejs/blob/master/docs/RecentsActivity.md)
- - [Pipedrive.RecentsActivityType](https://github.com/pipedrive/client-nodejs/blob/master/docs/RecentsActivityType.md)
- - [Pipedrive.RecentsDeal](https://github.com/pipedrive/client-nodejs/blob/master/docs/RecentsDeal.md)
- - [Pipedrive.RecentsFile](https://github.com/pipedrive/client-nodejs/blob/master/docs/RecentsFile.md)
- - [Pipedrive.RecentsFilter](https://github.com/pipedrive/client-nodejs/blob/master/docs/RecentsFilter.md)
- - [Pipedrive.RecentsNote](https://github.com/pipedrive/client-nodejs/blob/master/docs/RecentsNote.md)
- - [Pipedrive.RecentsOrganization](https://github.com/pipedrive/client-nodejs/blob/master/docs/RecentsOrganization.md)
- - [Pipedrive.RecentsPerson](https://github.com/pipedrive/client-nodejs/blob/master/docs/RecentsPerson.md)
- - [Pipedrive.RecentsPipeline](https://github.com/pipedrive/client-nodejs/blob/master/docs/RecentsPipeline.md)
- - [Pipedrive.RecentsProduct](https://github.com/pipedrive/client-nodejs/blob/master/docs/RecentsProduct.md)
- - [Pipedrive.RecentsStage](https://github.com/pipedrive/client-nodejs/blob/master/docs/RecentsStage.md)
- - [Pipedrive.RecentsUser](https://github.com/pipedrive/client-nodejs/blob/master/docs/RecentsUser.md)
- - [Pipedrive.RelatedDealData](https://github.com/pipedrive/client-nodejs/blob/master/docs/RelatedDealData.md)
- - [Pipedrive.RelatedDealDataDEALID](https://github.com/pipedrive/client-nodejs/blob/master/docs/RelatedDealDataDEALID.md)
- - [Pipedrive.RelatedFollowerData](https://github.com/pipedrive/client-nodejs/blob/master/docs/RelatedFollowerData.md)
- - [Pipedrive.RelatedOrganizationData](https://github.com/pipedrive/client-nodejs/blob/master/docs/RelatedOrganizationData.md)
- - [Pipedrive.RelatedOrganizationDataWithActiveFlag](https://github.com/pipedrive/client-nodejs/blob/master/docs/RelatedOrganizationDataWithActiveFlag.md)
- - [Pipedrive.RelatedOrganizationName](https://github.com/pipedrive/client-nodejs/blob/master/docs/RelatedOrganizationName.md)
- - [Pipedrive.RelatedPersonData](https://github.com/pipedrive/client-nodejs/blob/master/docs/RelatedPersonData.md)
- - [Pipedrive.RelatedPersonDataWithActiveFlag](https://github.com/pipedrive/client-nodejs/blob/master/docs/RelatedPersonDataWithActiveFlag.md)
- - [Pipedrive.RelatedPictureData](https://github.com/pipedrive/client-nodejs/blob/master/docs/RelatedPictureData.md)
- - [Pipedrive.RelatedUserData](https://github.com/pipedrive/client-nodejs/blob/master/docs/RelatedUserData.md)
- - [Pipedrive.RelationshipOrganizationInfoItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/RelationshipOrganizationInfoItem.md)
- - [Pipedrive.RelationshipOrganizationInfoItemAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/RelationshipOrganizationInfoItemAllOf.md)
- - [Pipedrive.RelationshipOrganizationInfoItemWithActiveFlag](https://github.com/pipedrive/client-nodejs/blob/master/docs/RelationshipOrganizationInfoItemWithActiveFlag.md)
- - [Pipedrive.RequiredNameObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/RequiredNameObject.md)
- - [Pipedrive.RequiredPostProjectParameters](https://github.com/pipedrive/client-nodejs/blob/master/docs/RequiredPostProjectParameters.md)
- - [Pipedrive.RequiredPostTaskParameters](https://github.com/pipedrive/client-nodejs/blob/master/docs/RequiredPostTaskParameters.md)
- - [Pipedrive.RequredTitleParameter](https://github.com/pipedrive/client-nodejs/blob/master/docs/RequredTitleParameter.md)
- - [Pipedrive.ResponseCallLogObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/ResponseCallLogObject.md)
- - [Pipedrive.ResponseCallLogObjectAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ResponseCallLogObjectAllOf.md)
- - [Pipedrive.RoleAssignment](https://github.com/pipedrive/client-nodejs/blob/master/docs/RoleAssignment.md)
- - [Pipedrive.RoleAssignmentAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/RoleAssignmentAllOf.md)
- - [Pipedrive.RoleSettings](https://github.com/pipedrive/client-nodejs/blob/master/docs/RoleSettings.md)
- - [Pipedrive.RolesAdditionalData](https://github.com/pipedrive/client-nodejs/blob/master/docs/RolesAdditionalData.md)
- - [Pipedrive.RolesAdditionalDataPagination](https://github.com/pipedrive/client-nodejs/blob/master/docs/RolesAdditionalDataPagination.md)
- - [Pipedrive.SinglePermissionSetsItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/SinglePermissionSetsItem.md)
- - [Pipedrive.SinglePermissionSetsItemAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/SinglePermissionSetsItemAllOf.md)
- - [Pipedrive.Stage](https://github.com/pipedrive/client-nodejs/blob/master/docs/Stage.md)
- - [Pipedrive.StageConversions](https://github.com/pipedrive/client-nodejs/blob/master/docs/StageConversions.md)
- - [Pipedrive.StageDetails](https://github.com/pipedrive/client-nodejs/blob/master/docs/StageDetails.md)
- - [Pipedrive.StageWithPipelineInfo](https://github.com/pipedrive/client-nodejs/blob/master/docs/StageWithPipelineInfo.md)
- - [Pipedrive.StageWithPipelineInfoAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/StageWithPipelineInfoAllOf.md)
- - [Pipedrive.SubRole](https://github.com/pipedrive/client-nodejs/blob/master/docs/SubRole.md)
- - [Pipedrive.SubRoleAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/SubRoleAllOf.md)
- - [Pipedrive.SubscriptionAddonsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/SubscriptionAddonsResponse.md)
- - [Pipedrive.SubscriptionAddonsResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/SubscriptionAddonsResponseAllOf.md)
- - [Pipedrive.SubscriptionInstallmentCreateRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/SubscriptionInstallmentCreateRequest.md)
- - [Pipedrive.SubscriptionInstallmentUpdateRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/SubscriptionInstallmentUpdateRequest.md)
- - [Pipedrive.SubscriptionItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/SubscriptionItem.md)
- - [Pipedrive.SubscriptionRecurringCancelRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/SubscriptionRecurringCancelRequest.md)
- - [Pipedrive.SubscriptionRecurringCreateRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/SubscriptionRecurringCreateRequest.md)
- - [Pipedrive.SubscriptionRecurringUpdateRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/SubscriptionRecurringUpdateRequest.md)
- - [Pipedrive.SubscriptionsIdResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/SubscriptionsIdResponse.md)
- - [Pipedrive.SubscriptionsIdResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/SubscriptionsIdResponseAllOf.md)
- - [Pipedrive.TaskId](https://github.com/pipedrive/client-nodejs/blob/master/docs/TaskId.md)
- - [Pipedrive.TaskMandatoryObjectFragment](https://github.com/pipedrive/client-nodejs/blob/master/docs/TaskMandatoryObjectFragment.md)
- - [Pipedrive.TaskNotChangeableObjectFragment](https://github.com/pipedrive/client-nodejs/blob/master/docs/TaskNotChangeableObjectFragment.md)
- - [Pipedrive.TaskObjectFragment](https://github.com/pipedrive/client-nodejs/blob/master/docs/TaskObjectFragment.md)
- - [Pipedrive.TaskPostObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/TaskPostObject.md)
- - [Pipedrive.TaskPutObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/TaskPutObject.md)
- - [Pipedrive.TaskResponseObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/TaskResponseObject.md)
- - [Pipedrive.Team](https://github.com/pipedrive/client-nodejs/blob/master/docs/Team.md)
- - [Pipedrive.TeamAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/TeamAllOf.md)
- - [Pipedrive.TeamId](https://github.com/pipedrive/client-nodejs/blob/master/docs/TeamId.md)
- - [Pipedrive.Teams](https://github.com/pipedrive/client-nodejs/blob/master/docs/Teams.md)
- - [Pipedrive.TeamsAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/TeamsAllOf.md)
- - [Pipedrive.TemplateObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/TemplateObject.md)
- - [Pipedrive.TemplateResponseObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/TemplateResponseObject.md)
- - [Pipedrive.Unauthorized](https://github.com/pipedrive/client-nodejs/blob/master/docs/Unauthorized.md)
- - [Pipedrive.UpdateActivityResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateActivityResponse200.md)
- - [Pipedrive.UpdateDealParameters](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateDealParameters.md)
- - [Pipedrive.UpdateDealProduct](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateDealProduct.md)
- - [Pipedrive.UpdateDealRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateDealRequest.md)
- - [Pipedrive.UpdateFile](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateFile.md)
- - [Pipedrive.UpdateFilterRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateFilterRequest.md)
- - [Pipedrive.UpdateLeadLabelRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateLeadLabelRequest.md)
- - [Pipedrive.UpdateLeadRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateLeadRequest.md)
- - [Pipedrive.UpdateOrganization](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateOrganization.md)
- - [Pipedrive.UpdateOrganizationAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateOrganizationAllOf.md)
- - [Pipedrive.UpdatePerson](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdatePerson.md)
- - [Pipedrive.UpdatePersonAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdatePersonAllOf.md)
- - [Pipedrive.UpdatePersonResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdatePersonResponse.md)
- - [Pipedrive.UpdateProductField](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateProductField.md)
- - [Pipedrive.UpdateProductRequestBody](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateProductRequestBody.md)
- - [Pipedrive.UpdateProductResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateProductResponse.md)
- - [Pipedrive.UpdateProjectResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateProjectResponse200.md)
- - [Pipedrive.UpdateStageRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateStageRequest.md)
- - [Pipedrive.UpdateStageRequestAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateStageRequestAllOf.md)
- - [Pipedrive.UpdateTaskResponse200](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateTaskResponse200.md)
- - [Pipedrive.UpdateTeam](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateTeam.md)
- - [Pipedrive.UpdateTeamAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateTeamAllOf.md)
- - [Pipedrive.UpdateTeamWithAdditionalProperties](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateTeamWithAdditionalProperties.md)
- - [Pipedrive.UpdateUserRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateUserRequest.md)
- - [Pipedrive.UpdatedActivityPlanItem200](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdatedActivityPlanItem200.md)
- - [Pipedrive.UpdatedTaskPlanItem200](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdatedTaskPlanItem200.md)
- - [Pipedrive.User](https://github.com/pipedrive/client-nodejs/blob/master/docs/User.md)
- - [Pipedrive.UserAccess](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserAccess.md)
- - [Pipedrive.UserAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserAllOf.md)
- - [Pipedrive.UserAssignmentToPermissionSet](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserAssignmentToPermissionSet.md)
- - [Pipedrive.UserAssignmentsToPermissionSet](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserAssignmentsToPermissionSet.md)
- - [Pipedrive.UserAssignmentsToPermissionSetAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserAssignmentsToPermissionSetAllOf.md)
- - [Pipedrive.UserConnections](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserConnections.md)
- - [Pipedrive.UserConnectionsAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserConnectionsAllOf.md)
- - [Pipedrive.UserConnectionsAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserConnectionsAllOfData.md)
- - [Pipedrive.UserData](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserData.md)
- - [Pipedrive.UserDataWithId](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserDataWithId.md)
- - [Pipedrive.UserIDs](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserIDs.md)
- - [Pipedrive.UserIDsAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserIDsAllOf.md)
- - [Pipedrive.UserMe](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserMe.md)
- - [Pipedrive.UserMeAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserMeAllOf.md)
- - [Pipedrive.UserPermissions](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserPermissions.md)
- - [Pipedrive.UserPermissionsAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserPermissionsAllOf.md)
- - [Pipedrive.UserPermissionsItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserPermissionsItem.md)
- - [Pipedrive.UserSettings](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserSettings.md)
- - [Pipedrive.UserSettingsAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserSettingsAllOf.md)
- - [Pipedrive.UserSettingsItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserSettingsItem.md)
- - [Pipedrive.Users](https://github.com/pipedrive/client-nodejs/blob/master/docs/Users.md)
- - [Pipedrive.UsersAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/UsersAllOf.md)
- - [Pipedrive.VisibleTo](https://github.com/pipedrive/client-nodejs/blob/master/docs/VisibleTo.md)
- - [Pipedrive.Webhook](https://github.com/pipedrive/client-nodejs/blob/master/docs/Webhook.md)
- - [Pipedrive.WebhookAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/WebhookAllOf.md)
- - [Pipedrive.WebhookBadRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/WebhookBadRequest.md)
- - [Pipedrive.WebhookBadRequestAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/WebhookBadRequestAllOf.md)
- - [Pipedrive.Webhooks](https://github.com/pipedrive/client-nodejs/blob/master/docs/Webhooks.md)
- - [Pipedrive.WebhooksAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/WebhooksAllOf.md)
- - [Pipedrive.WebhooksDeleteForbiddenSchema](https://github.com/pipedrive/client-nodejs/blob/master/docs/WebhooksDeleteForbiddenSchema.md)
- - [Pipedrive.WebhooksDeleteForbiddenSchemaAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/WebhooksDeleteForbiddenSchemaAllOf.md)
-
+ - base: Read settings of the authorized user and currencies in an account
+ - deals:read: Read most of the data about deals and related entities - deal fields, products, followers, participants; all notes, files, filters, pipelines, stages, and statistics. Does not include access to activities (except the last and next activity related to a deal)
+ - deals:full: Create, read, update and delete deals, its participants and followers; all files, notes, and filters. It also includes read access to deal fields, pipelines, stages, and statistics. Does not include access to activities (except the last and next activity related to a deal)
+ - mail:read: Read mail threads and messages
+ - mail:full: Read, update and delete mail threads. Also grants read access to mail messages
+ - activities:read: Read activities, its fields and types; all files and filters
+ - activities:full: Create, read, update and delete activities and all files and filters. Also includes read access to activity fields and types
+ - contacts:read: Read the data about persons and organizations, their related fields and followers; also all notes, files, filters
+ - contacts:full: Create, read, update and delete persons and organizations and their followers; all notes, files, filters. Also grants read access to contacts-related fields
+ - products:read: Read products, its fields, files, followers and products connected to a deal
+ - products:full: Create, read, update and delete products and its fields; add products to deals
+ - projects:read: Read projects and its fields, tasks and project templates
+ - projects:full: Create, read, update and delete projects and its fields; add projects templates and project related tasks
+ - users:read: Read data about users (people with access to a Pipedrive account), their permissions, roles and followers
+ - recents:read: Read all recent changes occurred in an account. Includes data about activities, activity types, deals, files, filters, notes, persons, organizations, pipelines, stages, products and users
+ - search:read: Search across the account for deals, persons, organizations, files and products, and see details about the returned results
+ - admin: Allows to do many things that an administrator can do in a Pipedrive company account - create, read, update and delete pipelines and its stages; deal, person and organization fields; activity types; users and permissions, etc. It also allows the app to create webhooks and fetch and delete webhooks that are created by the app
+ - leads:read: Read data about leads and lead labels
+ - leads:full: Create, read, update and delete leads and lead labels
+ - phone-integration: Enables advanced call integration features like logging call duration and other metadata, and play call recordings inside Pipedrive
+ - goals:read: Read data on all goals
+ - goals:full: Create, read, update and delete goals
+ - video-calls: Allows application to register as a video call integration provider and create conference links
+ - messengers-integration: Allows application to register as a messengers integration provider and allows them to deliver incoming messages and their statuses
diff --git a/api.ts b/api.ts
new file mode 100644
index 00000000..a0c6993c
--- /dev/null
+++ b/api.ts
@@ -0,0 +1,57 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Pipedrive API v1
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+
+export * from './api/activities-api';
+export * from './api/activity-fields-api';
+export * from './api/activity-types-api';
+export * from './api/billing-api';
+export * from './api/call-logs-api';
+export * from './api/channels-api';
+export * from './api/currencies-api';
+export * from './api/deal-fields-api';
+export * from './api/deals-api';
+export * from './api/files-api';
+export * from './api/filters-api';
+export * from './api/goals-api';
+export * from './api/item-search-api';
+export * from './api/lead-labels-api';
+export * from './api/lead-sources-api';
+export * from './api/leads-api';
+export * from './api/legacy-teams-api';
+export * from './api/mailbox-api';
+export * from './api/note-fields-api';
+export * from './api/notes-api';
+export * from './api/organization-fields-api';
+export * from './api/organization-relationships-api';
+export * from './api/organizations-api';
+export * from './api/permission-sets-api';
+export * from './api/person-fields-api';
+export * from './api/persons-api';
+export * from './api/pipelines-api';
+export * from './api/product-fields-api';
+export * from './api/products-api';
+export * from './api/project-templates-api';
+export * from './api/projects-api';
+export * from './api/recents-api';
+export * from './api/roles-api';
+export * from './api/stages-api';
+export * from './api/subscriptions-api';
+export * from './api/tasks-api';
+export * from './api/user-connections-api';
+export * from './api/user-settings-api';
+export * from './api/users-api';
+export * from './api/webhooks-api';
+
diff --git a/api/activities-api.ts b/api/activities-api.ts
new file mode 100644
index 00000000..42e70d2f
--- /dev/null
+++ b/api/activities-api.ts
@@ -0,0 +1,909 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Pipedrive API v1
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import type { Configuration } from '../configuration';
+import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
+import globalAxios from 'axios';
+// URLSearchParams not necessarily used
+// @ts-ignore
+import { URL, URLSearchParams } from 'url';
+// Some imports not used depending on template conditions
+// @ts-ignore
+import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
+// @ts-ignore
+import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
+// @ts-ignore
+import { AddActivityRequest } from '../models';
+// @ts-ignore
+import { AddActivityResponse200 } from '../models';
+// @ts-ignore
+import { DeleteActivitiesResponse200 } from '../models';
+// @ts-ignore
+import { DeleteActivityResponse200 } from '../models';
+// @ts-ignore
+import { FailResponse } from '../models';
+// @ts-ignore
+import { GetActivitiesCollectionResponse200 } from '../models';
+// @ts-ignore
+import { GetActivitiesResponse200 } from '../models';
+// @ts-ignore
+import { GetActivityResponse200 } from '../models';
+// @ts-ignore
+import { UpdateActivityRequest } from '../models';
+// @ts-ignore
+import { UpdateActivityResponse200 } from '../models';
+/**
+ * ActivitiesApi - axios parameter creator
+ * @export
+ */
+export const ActivitiesApiAxiosParamCreator = function (configuration?: Configuration) {
+ return {
+ /**
+ * Adds a new activity. Includes `more_activities_scheduled_in_context` property in response\'s `additional_data` which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data). For more information, see the tutorial for adding an activity.
+ * @summary Add an activity
+ * @param {AddActivityRequest} [AddActivityRequest]
+
+ * @throws {RequiredError}
+ */
+ addActivity: async (AddActivityRequest?: AddActivityRequest, ): Promise => {
+ const localVarPath = `/activities`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["activities:full"], configuration)
+
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = serializeDataIfNeeded(AddActivityRequest, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Marks multiple activities as deleted. After 30 days, the activities will be permanently deleted.
+ * @summary Delete multiple activities in bulk
+ * @param {string} ids The comma-separated IDs of activities that will be deleted
+
+ * @throws {RequiredError}
+ */
+ deleteActivities: async (ids: string, ): Promise => {
+ // verify required parameter 'ids' is not null or undefined
+ assertParamExists('deleteActivities', 'ids', ids)
+ const localVarPath = `/activities`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["activities:full"], configuration)
+
+ if (ids !== undefined) {
+ localVarQueryParameter['ids'] = ids;
+ }
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Marks an activity as deleted. After 30 days, the activity will be permanently deleted.
+ * @summary Delete an activity
+ * @param {number} id The ID of the activity
+
+ * @throws {RequiredError}
+ */
+ deleteActivity: async (id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('deleteActivity', 'id', id)
+ const localVarPath = `/activities/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["activities:full"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Returns all activities assigned to a particular user.
+ * @summary Get all activities assigned to a particular user
+ * @param {number} [user_id] The ID of the user whose activities will be fetched. If omitted, the user associated with the API token will be used. If 0, activities for all company users will be fetched based on the permission sets.
+ * @param {number} [filter_id] The ID of the filter to use (will narrow down results if used together with `user_id` parameter)
+ * @param {string} [type] The type of the activity, can be one type or multiple types separated by a comma. This is in correlation with the `key_string` parameter of ActivityTypes.
+ * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned.
+ * @param {number} [start] For pagination, the position that represents the first result for the page
+ * @param {string} [start_date] Use the activity due date where you wish to begin fetching activities from. Insert due date in YYYY-MM-DD format.
+ * @param {string} [end_date] Use the activity due date where you wish to stop fetching activities from. Insert due date in YYYY-MM-DD format.
+ * @param {0 | 1} [done] Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted returns both done and not done activities.
+
+ * @throws {RequiredError}
+ */
+ getActivities: async (user_id?: number, filter_id?: number, type?: string, limit?: number, start?: number, start_date?: string, end_date?: string, done?: 0 | 1, ): Promise => {
+ const localVarPath = `/activities`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["activities:read", "activities:full"], configuration)
+
+ if (user_id !== undefined) {
+ localVarQueryParameter['user_id'] = user_id;
+ }
+
+ if (filter_id !== undefined) {
+ localVarQueryParameter['filter_id'] = filter_id;
+ }
+
+ if (type !== undefined) {
+ localVarQueryParameter['type'] = type;
+ }
+
+ if (limit !== undefined) {
+ localVarQueryParameter['limit'] = limit;
+ }
+
+ if (start !== undefined) {
+ localVarQueryParameter['start'] = start;
+ }
+
+ if (start_date !== undefined) {
+ localVarQueryParameter['start_date'] = (start_date as any instanceof Date) ?
+ (start_date as any).toISOString().substr(0,10) :
+ start_date;
+ }
+
+ if (end_date !== undefined) {
+ localVarQueryParameter['end_date'] = (end_date as any instanceof Date) ?
+ (end_date as any).toISOString().substr(0,10) :
+ end_date;
+ }
+
+ if (done !== undefined) {
+ localVarQueryParameter['done'] = done;
+ }
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Returns all activities. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here.
+ * @summary Get all activities (BETA)
+ * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
+ * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
+ * @param {string} [since] The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
+ * @param {string} [until] The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
+ * @param {number} [user_id] The ID of the user whose activities will be fetched. If omitted, all activities are returned.
+ * @param {boolean} [done] Whether the activity is done or not. `false` = Not done, `true` = Done. If omitted, returns both done and not done activities.
+ * @param {string} [type] The type of the activity, can be one type or multiple types separated by a comma. This is in correlation with the `key_string` parameter of ActivityTypes.
+
+ * @throws {RequiredError}
+ */
+ getActivitiesCollection: async (cursor?: string, limit?: number, since?: string, until?: string, user_id?: number, done?: boolean, type?: string, ): Promise => {
+ const localVarPath = `/activities/collection`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["activities:read", "activities:full"], configuration)
+
+ if (cursor !== undefined) {
+ localVarQueryParameter['cursor'] = cursor;
+ }
+
+ if (limit !== undefined) {
+ localVarQueryParameter['limit'] = limit;
+ }
+
+ if (since !== undefined) {
+ localVarQueryParameter['since'] = since;
+ }
+
+ if (until !== undefined) {
+ localVarQueryParameter['until'] = until;
+ }
+
+ if (user_id !== undefined) {
+ localVarQueryParameter['user_id'] = user_id;
+ }
+
+ if (done !== undefined) {
+ localVarQueryParameter['done'] = done;
+ }
+
+ if (type !== undefined) {
+ localVarQueryParameter['type'] = type;
+ }
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Returns the details of a specific activity.
+ * @summary Get details of an activity
+ * @param {number} id The ID of the activity
+
+ * @throws {RequiredError}
+ */
+ getActivity: async (id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getActivity', 'id', id)
+ const localVarPath = `/activities/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["activities:read", "activities:full"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Updates an activity. Includes `more_activities_scheduled_in_context` property in response\'s `additional_data` which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data).
+ * @summary Update an activity
+ * @param {number} id The ID of the activity
+ * @param {UpdateActivityRequest} [UpdateActivityRequest]
+
+ * @throws {RequiredError}
+ */
+ updateActivity: async (id: number, UpdateActivityRequest?: UpdateActivityRequest, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('updateActivity', 'id', id)
+ const localVarPath = `/activities/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["activities:full"], configuration)
+
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = serializeDataIfNeeded(UpdateActivityRequest, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ }
+};
+
+/**
+ * ActivitiesApi - functional programming interface
+ * @export
+ */
+export const ActivitiesApiFp = function(configuration?: Configuration) {
+
+ /**
+ * Axios interceptor to add the SDK version as a User-Agent header
+ * */
+ globalAxios.interceptors.request.use(function (config) {
+ const version = require("../../package.json").version;
+ config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
+ return config;
+ });
+
+ /**
+ * Axios response interceptor to modify response structure
+ */
+ globalAxios.interceptors.response.use(function (response) {
+ return response.hasOwnProperty('success') ? response : response.data;
+ }, function (error) {
+ if(error?.response?.data) {
+ return Promise.reject(error.response.data);
+ }
+ return Promise.reject(error);
+ });
+ const localVarAxiosParamCreator = ActivitiesApiAxiosParamCreator(configuration)
+ return {
+ /**
+ * Adds a new activity. Includes `more_activities_scheduled_in_context` property in response\'s `additional_data` which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data). For more information, see the tutorial for adding an activity.
+ * @summary Add an activity
+ * @param {AddActivityRequest} [AddActivityRequest]
+
+ * @throws {RequiredError}
+ */
+ async addActivity(AddActivityRequest?: AddActivityRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addActivity(AddActivityRequest, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Marks multiple activities as deleted. After 30 days, the activities will be permanently deleted.
+ * @summary Delete multiple activities in bulk
+ * @param {string} ids The comma-separated IDs of activities that will be deleted
+
+ * @throws {RequiredError}
+ */
+ async deleteActivities(ids: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteActivities(ids, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Marks an activity as deleted. After 30 days, the activity will be permanently deleted.
+ * @summary Delete an activity
+ * @param {number} id The ID of the activity
+
+ * @throws {RequiredError}
+ */
+ async deleteActivity(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteActivity(id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Returns all activities assigned to a particular user.
+ * @summary Get all activities assigned to a particular user
+ * @param {number} [user_id] The ID of the user whose activities will be fetched. If omitted, the user associated with the API token will be used. If 0, activities for all company users will be fetched based on the permission sets.
+ * @param {number} [filter_id] The ID of the filter to use (will narrow down results if used together with `user_id` parameter)
+ * @param {string} [type] The type of the activity, can be one type or multiple types separated by a comma. This is in correlation with the `key_string` parameter of ActivityTypes.
+ * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned.
+ * @param {number} [start] For pagination, the position that represents the first result for the page
+ * @param {string} [start_date] Use the activity due date where you wish to begin fetching activities from. Insert due date in YYYY-MM-DD format.
+ * @param {string} [end_date] Use the activity due date where you wish to stop fetching activities from. Insert due date in YYYY-MM-DD format.
+ * @param {0 | 1} [done] Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted returns both done and not done activities.
+
+ * @throws {RequiredError}
+ */
+ async getActivities(user_id?: number, filter_id?: number, type?: string, limit?: number, start?: number, start_date?: string, end_date?: string, done?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getActivities(user_id, filter_id, type, limit, start, start_date, end_date, done, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Returns all activities. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here.
+ * @summary Get all activities (BETA)
+ * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
+ * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
+ * @param {string} [since] The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
+ * @param {string} [until] The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
+ * @param {number} [user_id] The ID of the user whose activities will be fetched. If omitted, all activities are returned.
+ * @param {boolean} [done] Whether the activity is done or not. `false` = Not done, `true` = Done. If omitted, returns both done and not done activities.
+ * @param {string} [type] The type of the activity, can be one type or multiple types separated by a comma. This is in correlation with the `key_string` parameter of ActivityTypes.
+
+ * @throws {RequiredError}
+ */
+ async getActivitiesCollection(cursor?: string, limit?: number, since?: string, until?: string, user_id?: number, done?: boolean, type?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getActivitiesCollection(cursor, limit, since, until, user_id, done, type, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Returns the details of a specific activity.
+ * @summary Get details of an activity
+ * @param {number} id The ID of the activity
+
+ * @throws {RequiredError}
+ */
+ async getActivity(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getActivity(id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Updates an activity. Includes `more_activities_scheduled_in_context` property in response\'s `additional_data` which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data).
+ * @summary Update an activity
+ * @param {number} id The ID of the activity
+ * @param {UpdateActivityRequest} [UpdateActivityRequest]
+
+ * @throws {RequiredError}
+ */
+ async updateActivity(id: number, UpdateActivityRequest?: UpdateActivityRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateActivity(id, UpdateActivityRequest, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ }
+};
+
+/**
+ * ActivitiesApi - factory interface
+ * @export
+ */
+export const ActivitiesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
+ const localVarFp = ActivitiesApiFp(configuration)
+ return {
+ /**
+ * Adds a new activity. Includes `more_activities_scheduled_in_context` property in response\'s `additional_data` which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data). For more information, see the tutorial for adding an activity.
+ * @summary Add an activity
+ * @param {ActivitiesApiAddActivityRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ addActivity(requestParameters: ActivitiesApiAddActivityRequest = {}, ): Promise {
+ return localVarFp.addActivity(requestParameters.AddActivityRequest, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Marks multiple activities as deleted. After 30 days, the activities will be permanently deleted.
+ * @summary Delete multiple activities in bulk
+ * @param {ActivitiesApiDeleteActivitiesRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ deleteActivities(requestParameters: ActivitiesApiDeleteActivitiesRequest, ): Promise {
+ return localVarFp.deleteActivities(requestParameters.ids, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Marks an activity as deleted. After 30 days, the activity will be permanently deleted.
+ * @summary Delete an activity
+ * @param {ActivitiesApiDeleteActivityRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ deleteActivity(requestParameters: ActivitiesApiDeleteActivityRequest, ): Promise {
+ return localVarFp.deleteActivity(requestParameters.id, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Returns all activities assigned to a particular user.
+ * @summary Get all activities assigned to a particular user
+ * @param {ActivitiesApiGetActivitiesRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getActivities(requestParameters: ActivitiesApiGetActivitiesRequest = {}, ): Promise {
+ return localVarFp.getActivities(requestParameters.user_id, requestParameters.filter_id, requestParameters.type, requestParameters.limit, requestParameters.start, requestParameters.start_date, requestParameters.end_date, requestParameters.done, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Returns all activities. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here.
+ * @summary Get all activities (BETA)
+ * @param {ActivitiesApiGetActivitiesCollectionRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getActivitiesCollection(requestParameters: ActivitiesApiGetActivitiesCollectionRequest = {}, ): Promise {
+ return localVarFp.getActivitiesCollection(requestParameters.cursor, requestParameters.limit, requestParameters.since, requestParameters.until, requestParameters.user_id, requestParameters.done, requestParameters.type, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Returns the details of a specific activity.
+ * @summary Get details of an activity
+ * @param {ActivitiesApiGetActivityRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getActivity(requestParameters: ActivitiesApiGetActivityRequest, ): Promise {
+ return localVarFp.getActivity(requestParameters.id, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Updates an activity. Includes `more_activities_scheduled_in_context` property in response\'s `additional_data` which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data).
+ * @summary Update an activity
+ * @param {ActivitiesApiUpdateActivityRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ updateActivity(requestParameters: ActivitiesApiUpdateActivityRequest, ): Promise {
+ return localVarFp.updateActivity(requestParameters.id, requestParameters.UpdateActivityRequest, ).then((request) => request(axios, basePath));
+ },
+ };
+};
+
+/**
+ * Request parameters for addActivity operation in ActivitiesApi.
+ * @export
+ * @interface ActivitiesApiAddActivityRequest
+ */
+export interface ActivitiesApiAddActivityRequest {
+ /**
+ *
+ * @type {AddActivityRequest}
+ * @memberof ActivitiesApiAddActivity
+ */
+ readonly AddActivityRequest?: AddActivityRequest
+}
+
+/**
+ * Request parameters for deleteActivities operation in ActivitiesApi.
+ * @export
+ * @interface ActivitiesApiDeleteActivitiesRequest
+ */
+export interface ActivitiesApiDeleteActivitiesRequest {
+ /**
+ * The comma-separated IDs of activities that will be deleted
+ * @type {string}
+ * @memberof ActivitiesApiDeleteActivities
+ */
+ readonly ids: string
+}
+
+/**
+ * Request parameters for deleteActivity operation in ActivitiesApi.
+ * @export
+ * @interface ActivitiesApiDeleteActivityRequest
+ */
+export interface ActivitiesApiDeleteActivityRequest {
+ /**
+ * The ID of the activity
+ * @type {number}
+ * @memberof ActivitiesApiDeleteActivity
+ */
+ readonly id: number
+}
+
+/**
+ * Request parameters for getActivities operation in ActivitiesApi.
+ * @export
+ * @interface ActivitiesApiGetActivitiesRequest
+ */
+export interface ActivitiesApiGetActivitiesRequest {
+ /**
+ * The ID of the user whose activities will be fetched. If omitted, the user associated with the API token will be used. If 0, activities for all company users will be fetched based on the permission sets.
+ * @type {number}
+ * @memberof ActivitiesApiGetActivities
+ */
+ readonly user_id?: number
+
+ /**
+ * The ID of the filter to use (will narrow down results if used together with `user_id` parameter)
+ * @type {number}
+ * @memberof ActivitiesApiGetActivities
+ */
+ readonly filter_id?: number
+
+ /**
+ * The type of the activity, can be one type or multiple types separated by a comma. This is in correlation with the `key_string` parameter of ActivityTypes.
+ * @type {string}
+ * @memberof ActivitiesApiGetActivities
+ */
+ readonly type?: string
+
+ /**
+ * For pagination, the limit of entries to be returned. If not provided, 100 items will be returned.
+ * @type {number}
+ * @memberof ActivitiesApiGetActivities
+ */
+ readonly limit?: number
+
+ /**
+ * For pagination, the position that represents the first result for the page
+ * @type {number}
+ * @memberof ActivitiesApiGetActivities
+ */
+ readonly start?: number
+
+ /**
+ * Use the activity due date where you wish to begin fetching activities from. Insert due date in YYYY-MM-DD format.
+ * @type {string}
+ * @memberof ActivitiesApiGetActivities
+ */
+ readonly start_date?: string
+
+ /**
+ * Use the activity due date where you wish to stop fetching activities from. Insert due date in YYYY-MM-DD format.
+ * @type {string}
+ * @memberof ActivitiesApiGetActivities
+ */
+ readonly end_date?: string
+
+ /**
+ * Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted returns both done and not done activities.
+ * @type {0 | 1}
+ * @memberof ActivitiesApiGetActivities
+ */
+ readonly done?: 0 | 1
+}
+
+/**
+ * Request parameters for getActivitiesCollection operation in ActivitiesApi.
+ * @export
+ * @interface ActivitiesApiGetActivitiesCollectionRequest
+ */
+export interface ActivitiesApiGetActivitiesCollectionRequest {
+ /**
+ * For pagination, the marker (an opaque string value) representing the first item on the next page
+ * @type {string}
+ * @memberof ActivitiesApiGetActivitiesCollection
+ */
+ readonly cursor?: string
+
+ /**
+ * For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
+ * @type {number}
+ * @memberof ActivitiesApiGetActivitiesCollection
+ */
+ readonly limit?: number
+
+ /**
+ * The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
+ * @type {string}
+ * @memberof ActivitiesApiGetActivitiesCollection
+ */
+ readonly since?: string
+
+ /**
+ * The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
+ * @type {string}
+ * @memberof ActivitiesApiGetActivitiesCollection
+ */
+ readonly until?: string
+
+ /**
+ * The ID of the user whose activities will be fetched. If omitted, all activities are returned.
+ * @type {number}
+ * @memberof ActivitiesApiGetActivitiesCollection
+ */
+ readonly user_id?: number
+
+ /**
+ * Whether the activity is done or not. `false` = Not done, `true` = Done. If omitted, returns both done and not done activities.
+ * @type {boolean}
+ * @memberof ActivitiesApiGetActivitiesCollection
+ */
+ readonly done?: boolean
+
+ /**
+ * The type of the activity, can be one type or multiple types separated by a comma. This is in correlation with the `key_string` parameter of ActivityTypes.
+ * @type {string}
+ * @memberof ActivitiesApiGetActivitiesCollection
+ */
+ readonly type?: string
+}
+
+/**
+ * Request parameters for getActivity operation in ActivitiesApi.
+ * @export
+ * @interface ActivitiesApiGetActivityRequest
+ */
+export interface ActivitiesApiGetActivityRequest {
+ /**
+ * The ID of the activity
+ * @type {number}
+ * @memberof ActivitiesApiGetActivity
+ */
+ readonly id: number
+}
+
+/**
+ * Request parameters for updateActivity operation in ActivitiesApi.
+ * @export
+ * @interface ActivitiesApiUpdateActivityRequest
+ */
+export interface ActivitiesApiUpdateActivityRequest {
+ /**
+ * The ID of the activity
+ * @type {number}
+ * @memberof ActivitiesApiUpdateActivity
+ */
+ readonly id: number
+
+ /**
+ *
+ * @type {UpdateActivityRequest}
+ * @memberof ActivitiesApiUpdateActivity
+ */
+ readonly UpdateActivityRequest?: UpdateActivityRequest
+}
+
+/**
+ * ActivitiesApi - object-oriented interface
+ * @export
+ * @class ActivitiesApi
+ * @extends {BaseAPI}
+ */
+export class ActivitiesApi extends BaseAPI {
+ /**
+ * Adds a new activity. Includes `more_activities_scheduled_in_context` property in response\'s `additional_data` which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data). For more information, see the tutorial for adding an activity.
+ * @summary Add an activity
+ * @param {ActivitiesApiAddActivityRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof ActivitiesApi
+ */
+ public addActivity(requestParameters: ActivitiesApiAddActivityRequest = {}, ) {
+ return ActivitiesApiFp(this.configuration).addActivity(requestParameters.AddActivityRequest, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Marks multiple activities as deleted. After 30 days, the activities will be permanently deleted.
+ * @summary Delete multiple activities in bulk
+ * @param {ActivitiesApiDeleteActivitiesRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof ActivitiesApi
+ */
+ public deleteActivities(requestParameters: ActivitiesApiDeleteActivitiesRequest, ) {
+ return ActivitiesApiFp(this.configuration).deleteActivities(requestParameters.ids, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Marks an activity as deleted. After 30 days, the activity will be permanently deleted.
+ * @summary Delete an activity
+ * @param {ActivitiesApiDeleteActivityRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof ActivitiesApi
+ */
+ public deleteActivity(requestParameters: ActivitiesApiDeleteActivityRequest, ) {
+ return ActivitiesApiFp(this.configuration).deleteActivity(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Returns all activities assigned to a particular user.
+ * @summary Get all activities assigned to a particular user
+ * @param {ActivitiesApiGetActivitiesRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof ActivitiesApi
+ */
+ public getActivities(requestParameters: ActivitiesApiGetActivitiesRequest = {}, ) {
+ return ActivitiesApiFp(this.configuration).getActivities(requestParameters.user_id, requestParameters.filter_id, requestParameters.type, requestParameters.limit, requestParameters.start, requestParameters.start_date, requestParameters.end_date, requestParameters.done, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Returns all activities. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here.
+ * @summary Get all activities (BETA)
+ * @param {ActivitiesApiGetActivitiesCollectionRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof ActivitiesApi
+ */
+ public getActivitiesCollection(requestParameters: ActivitiesApiGetActivitiesCollectionRequest = {}, ) {
+ return ActivitiesApiFp(this.configuration).getActivitiesCollection(requestParameters.cursor, requestParameters.limit, requestParameters.since, requestParameters.until, requestParameters.user_id, requestParameters.done, requestParameters.type, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Returns the details of a specific activity.
+ * @summary Get details of an activity
+ * @param {ActivitiesApiGetActivityRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof ActivitiesApi
+ */
+ public getActivity(requestParameters: ActivitiesApiGetActivityRequest, ) {
+ return ActivitiesApiFp(this.configuration).getActivity(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Updates an activity. Includes `more_activities_scheduled_in_context` property in response\'s `additional_data` which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data).
+ * @summary Update an activity
+ * @param {ActivitiesApiUpdateActivityRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof ActivitiesApi
+ */
+ public updateActivity(requestParameters: ActivitiesApiUpdateActivityRequest, ) {
+ return ActivitiesApiFp(this.configuration).updateActivity(requestParameters.id, requestParameters.UpdateActivityRequest, ).then((request) => request(this.axios, this.basePath));
+ }
+}
diff --git a/api/activity-fields-api.ts b/api/activity-fields-api.ts
new file mode 100644
index 00000000..d5ba40da
--- /dev/null
+++ b/api/activity-fields-api.ts
@@ -0,0 +1,152 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Pipedrive API v1
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import type { Configuration } from '../configuration';
+import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
+import globalAxios from 'axios';
+// URLSearchParams not necessarily used
+// @ts-ignore
+import { URL, URLSearchParams } from 'url';
+// Some imports not used depending on template conditions
+// @ts-ignore
+import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
+// @ts-ignore
+import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
+// @ts-ignore
+import { FieldsResponse200 } from '../models';
+/**
+ * ActivityFieldsApi - axios parameter creator
+ * @export
+ */
+export const ActivityFieldsApiAxiosParamCreator = function (configuration?: Configuration) {
+ return {
+ /**
+ * Returns all activity fields.
+ * @summary Get all activity fields
+
+ * @throws {RequiredError}
+ */
+ getActivityFields: async (): Promise => {
+ const localVarPath = `/activityFields`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["activities:read", "activities:full"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ }
+};
+
+/**
+ * ActivityFieldsApi - functional programming interface
+ * @export
+ */
+export const ActivityFieldsApiFp = function(configuration?: Configuration) {
+
+ /**
+ * Axios interceptor to add the SDK version as a User-Agent header
+ * */
+ globalAxios.interceptors.request.use(function (config) {
+ const version = require("../../package.json").version;
+ config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
+ return config;
+ });
+
+ /**
+ * Axios response interceptor to modify response structure
+ */
+ globalAxios.interceptors.response.use(function (response) {
+ return response.hasOwnProperty('success') ? response : response.data;
+ }, function (error) {
+ if(error?.response?.data) {
+ return Promise.reject(error.response.data);
+ }
+ return Promise.reject(error);
+ });
+ const localVarAxiosParamCreator = ActivityFieldsApiAxiosParamCreator(configuration)
+ return {
+ /**
+ * Returns all activity fields.
+ * @summary Get all activity fields
+
+ * @throws {RequiredError}
+ */
+ async getActivityFields(): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getActivityFields();
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ }
+};
+
+/**
+ * ActivityFieldsApi - factory interface
+ * @export
+ */
+export const ActivityFieldsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
+ const localVarFp = ActivityFieldsApiFp(configuration)
+ return {
+ /**
+ * Returns all activity fields.
+ * @summary Get all activity fields
+
+ * @throws {RequiredError}
+ */
+ getActivityFields(): Promise {
+ return localVarFp.getActivityFields().then((request) => request(axios, basePath));
+ },
+ };
+};
+
+/**
+ * ActivityFieldsApi - object-oriented interface
+ * @export
+ * @class ActivityFieldsApi
+ * @extends {BaseAPI}
+ */
+export class ActivityFieldsApi extends BaseAPI {
+ /**
+ * Returns all activity fields.
+ * @summary Get all activity fields
+
+ * @throws {RequiredError}
+ * @memberof ActivityFieldsApi
+ */
+ public getActivityFields() {
+ return ActivityFieldsApiFp(this.configuration).getActivityFields().then((request) => request(this.axios, this.basePath));
+ }
+}
diff --git a/api/activity-types-api.ts b/api/activity-types-api.ts
new file mode 100644
index 00000000..4c4d9831
--- /dev/null
+++ b/api/activity-types-api.ts
@@ -0,0 +1,527 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Pipedrive API v1
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import type { Configuration } from '../configuration';
+import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
+import globalAxios from 'axios';
+// URLSearchParams not necessarily used
+// @ts-ignore
+import { URL, URLSearchParams } from 'url';
+// Some imports not used depending on template conditions
+// @ts-ignore
+import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
+// @ts-ignore
+import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
+// @ts-ignore
+import { AddActivityTypeRequest } from '../models';
+// @ts-ignore
+import { CreateUpdateDeleteActivityTypeResponse200 } from '../models';
+// @ts-ignore
+import { DeleteActivityTypesResponse200 } from '../models';
+// @ts-ignore
+import { GetActivityTypesResponse200 } from '../models';
+// @ts-ignore
+import { UpdateActivityTypeRequest } from '../models';
+/**
+ * ActivityTypesApi - axios parameter creator
+ * @export
+ */
+export const ActivityTypesApiAxiosParamCreator = function (configuration?: Configuration) {
+ return {
+ /**
+ * Adds a new activity type.
+ * @summary Add new activity type
+ * @param {AddActivityTypeRequest} [AddActivityTypeRequest]
+
+ * @throws {RequiredError}
+ */
+ addActivityType: async (AddActivityTypeRequest?: AddActivityTypeRequest, ): Promise => {
+ const localVarPath = `/activityTypes`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["admin"], configuration)
+
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = serializeDataIfNeeded(AddActivityTypeRequest, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Marks an activity type as deleted.
+ * @summary Delete an activity type
+ * @param {number} id The ID of the activity type
+
+ * @throws {RequiredError}
+ */
+ deleteActivityType: async (id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('deleteActivityType', 'id', id)
+ const localVarPath = `/activityTypes/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["admin"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Marks multiple activity types as deleted.
+ * @summary Delete multiple activity types in bulk
+ * @param {string} ids The comma-separated activity type IDs
+
+ * @throws {RequiredError}
+ */
+ deleteActivityTypes: async (ids: string, ): Promise => {
+ // verify required parameter 'ids' is not null or undefined
+ assertParamExists('deleteActivityTypes', 'ids', ids)
+ const localVarPath = `/activityTypes`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["admin"], configuration)
+
+ if (ids !== undefined) {
+ localVarQueryParameter['ids'] = ids;
+ }
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Returns all activity types.
+ * @summary Get all activity types
+
+ * @throws {RequiredError}
+ */
+ getActivityTypes: async (): Promise => {
+ const localVarPath = `/activityTypes`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["activities:read", "activities:full", "admin"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Updates an activity type.
+ * @summary Update an activity type
+ * @param {number} id The ID of the activity type
+ * @param {UpdateActivityTypeRequest} [UpdateActivityTypeRequest]
+
+ * @throws {RequiredError}
+ */
+ updateActivityType: async (id: number, UpdateActivityTypeRequest?: UpdateActivityTypeRequest, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('updateActivityType', 'id', id)
+ const localVarPath = `/activityTypes/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["admin"], configuration)
+
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = serializeDataIfNeeded(UpdateActivityTypeRequest, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ }
+};
+
+/**
+ * ActivityTypesApi - functional programming interface
+ * @export
+ */
+export const ActivityTypesApiFp = function(configuration?: Configuration) {
+
+ /**
+ * Axios interceptor to add the SDK version as a User-Agent header
+ * */
+ globalAxios.interceptors.request.use(function (config) {
+ const version = require("../../package.json").version;
+ config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
+ return config;
+ });
+
+ /**
+ * Axios response interceptor to modify response structure
+ */
+ globalAxios.interceptors.response.use(function (response) {
+ return response.hasOwnProperty('success') ? response : response.data;
+ }, function (error) {
+ if(error?.response?.data) {
+ return Promise.reject(error.response.data);
+ }
+ return Promise.reject(error);
+ });
+ const localVarAxiosParamCreator = ActivityTypesApiAxiosParamCreator(configuration)
+ return {
+ /**
+ * Adds a new activity type.
+ * @summary Add new activity type
+ * @param {AddActivityTypeRequest} [AddActivityTypeRequest]
+
+ * @throws {RequiredError}
+ */
+ async addActivityType(AddActivityTypeRequest?: AddActivityTypeRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addActivityType(AddActivityTypeRequest, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Marks an activity type as deleted.
+ * @summary Delete an activity type
+ * @param {number} id The ID of the activity type
+
+ * @throws {RequiredError}
+ */
+ async deleteActivityType(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteActivityType(id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Marks multiple activity types as deleted.
+ * @summary Delete multiple activity types in bulk
+ * @param {string} ids The comma-separated activity type IDs
+
+ * @throws {RequiredError}
+ */
+ async deleteActivityTypes(ids: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteActivityTypes(ids, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Returns all activity types.
+ * @summary Get all activity types
+
+ * @throws {RequiredError}
+ */
+ async getActivityTypes(): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getActivityTypes();
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Updates an activity type.
+ * @summary Update an activity type
+ * @param {number} id The ID of the activity type
+ * @param {UpdateActivityTypeRequest} [UpdateActivityTypeRequest]
+
+ * @throws {RequiredError}
+ */
+ async updateActivityType(id: number, UpdateActivityTypeRequest?: UpdateActivityTypeRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateActivityType(id, UpdateActivityTypeRequest, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ }
+};
+
+/**
+ * ActivityTypesApi - factory interface
+ * @export
+ */
+export const ActivityTypesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
+ const localVarFp = ActivityTypesApiFp(configuration)
+ return {
+ /**
+ * Adds a new activity type.
+ * @summary Add new activity type
+ * @param {ActivityTypesApiAddActivityTypeRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ addActivityType(requestParameters: ActivityTypesApiAddActivityTypeRequest = {}, ): Promise {
+ return localVarFp.addActivityType(requestParameters.AddActivityTypeRequest, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Marks an activity type as deleted.
+ * @summary Delete an activity type
+ * @param {ActivityTypesApiDeleteActivityTypeRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ deleteActivityType(requestParameters: ActivityTypesApiDeleteActivityTypeRequest, ): Promise {
+ return localVarFp.deleteActivityType(requestParameters.id, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Marks multiple activity types as deleted.
+ * @summary Delete multiple activity types in bulk
+ * @param {ActivityTypesApiDeleteActivityTypesRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ deleteActivityTypes(requestParameters: ActivityTypesApiDeleteActivityTypesRequest, ): Promise {
+ return localVarFp.deleteActivityTypes(requestParameters.ids, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Returns all activity types.
+ * @summary Get all activity types
+
+ * @throws {RequiredError}
+ */
+ getActivityTypes(): Promise {
+ return localVarFp.getActivityTypes().then((request) => request(axios, basePath));
+ },
+ /**
+ * Updates an activity type.
+ * @summary Update an activity type
+ * @param {ActivityTypesApiUpdateActivityTypeRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ updateActivityType(requestParameters: ActivityTypesApiUpdateActivityTypeRequest, ): Promise {
+ return localVarFp.updateActivityType(requestParameters.id, requestParameters.UpdateActivityTypeRequest, ).then((request) => request(axios, basePath));
+ },
+ };
+};
+
+/**
+ * Request parameters for addActivityType operation in ActivityTypesApi.
+ * @export
+ * @interface ActivityTypesApiAddActivityTypeRequest
+ */
+export interface ActivityTypesApiAddActivityTypeRequest {
+ /**
+ *
+ * @type {AddActivityTypeRequest}
+ * @memberof ActivityTypesApiAddActivityType
+ */
+ readonly AddActivityTypeRequest?: AddActivityTypeRequest
+}
+
+/**
+ * Request parameters for deleteActivityType operation in ActivityTypesApi.
+ * @export
+ * @interface ActivityTypesApiDeleteActivityTypeRequest
+ */
+export interface ActivityTypesApiDeleteActivityTypeRequest {
+ /**
+ * The ID of the activity type
+ * @type {number}
+ * @memberof ActivityTypesApiDeleteActivityType
+ */
+ readonly id: number
+}
+
+/**
+ * Request parameters for deleteActivityTypes operation in ActivityTypesApi.
+ * @export
+ * @interface ActivityTypesApiDeleteActivityTypesRequest
+ */
+export interface ActivityTypesApiDeleteActivityTypesRequest {
+ /**
+ * The comma-separated activity type IDs
+ * @type {string}
+ * @memberof ActivityTypesApiDeleteActivityTypes
+ */
+ readonly ids: string
+}
+
+/**
+ * Request parameters for updateActivityType operation in ActivityTypesApi.
+ * @export
+ * @interface ActivityTypesApiUpdateActivityTypeRequest
+ */
+export interface ActivityTypesApiUpdateActivityTypeRequest {
+ /**
+ * The ID of the activity type
+ * @type {number}
+ * @memberof ActivityTypesApiUpdateActivityType
+ */
+ readonly id: number
+
+ /**
+ *
+ * @type {UpdateActivityTypeRequest}
+ * @memberof ActivityTypesApiUpdateActivityType
+ */
+ readonly UpdateActivityTypeRequest?: UpdateActivityTypeRequest
+}
+
+/**
+ * ActivityTypesApi - object-oriented interface
+ * @export
+ * @class ActivityTypesApi
+ * @extends {BaseAPI}
+ */
+export class ActivityTypesApi extends BaseAPI {
+ /**
+ * Adds a new activity type.
+ * @summary Add new activity type
+ * @param {ActivityTypesApiAddActivityTypeRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof ActivityTypesApi
+ */
+ public addActivityType(requestParameters: ActivityTypesApiAddActivityTypeRequest = {}, ) {
+ return ActivityTypesApiFp(this.configuration).addActivityType(requestParameters.AddActivityTypeRequest, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Marks an activity type as deleted.
+ * @summary Delete an activity type
+ * @param {ActivityTypesApiDeleteActivityTypeRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof ActivityTypesApi
+ */
+ public deleteActivityType(requestParameters: ActivityTypesApiDeleteActivityTypeRequest, ) {
+ return ActivityTypesApiFp(this.configuration).deleteActivityType(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Marks multiple activity types as deleted.
+ * @summary Delete multiple activity types in bulk
+ * @param {ActivityTypesApiDeleteActivityTypesRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof ActivityTypesApi
+ */
+ public deleteActivityTypes(requestParameters: ActivityTypesApiDeleteActivityTypesRequest, ) {
+ return ActivityTypesApiFp(this.configuration).deleteActivityTypes(requestParameters.ids, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Returns all activity types.
+ * @summary Get all activity types
+
+ * @throws {RequiredError}
+ * @memberof ActivityTypesApi
+ */
+ public getActivityTypes() {
+ return ActivityTypesApiFp(this.configuration).getActivityTypes().then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Updates an activity type.
+ * @summary Update an activity type
+ * @param {ActivityTypesApiUpdateActivityTypeRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof ActivityTypesApi
+ */
+ public updateActivityType(requestParameters: ActivityTypesApiUpdateActivityTypeRequest, ) {
+ return ActivityTypesApiFp(this.configuration).updateActivityType(requestParameters.id, requestParameters.UpdateActivityTypeRequest, ).then((request) => request(this.axios, this.basePath));
+ }
+}
diff --git a/api/billing-api.ts b/api/billing-api.ts
new file mode 100644
index 00000000..1b1873f6
--- /dev/null
+++ b/api/billing-api.ts
@@ -0,0 +1,152 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Pipedrive API v1
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import type { Configuration } from '../configuration';
+import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
+import globalAxios from 'axios';
+// URLSearchParams not necessarily used
+// @ts-ignore
+import { URL, URLSearchParams } from 'url';
+// Some imports not used depending on template conditions
+// @ts-ignore
+import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
+// @ts-ignore
+import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
+// @ts-ignore
+import { SubscriptionAddonsResponse200 } from '../models';
+/**
+ * BillingApi - axios parameter creator
+ * @export
+ */
+export const BillingApiAxiosParamCreator = function (configuration?: Configuration) {
+ return {
+ /**
+ * Returns the add-ons for a single company.
+ * @summary Get all add-ons for a single company
+
+ * @throws {RequiredError}
+ */
+ getCompanyAddons: async (): Promise => {
+ const localVarPath = `/billing/subscriptions/addons`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["users:read"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ }
+};
+
+/**
+ * BillingApi - functional programming interface
+ * @export
+ */
+export const BillingApiFp = function(configuration?: Configuration) {
+
+ /**
+ * Axios interceptor to add the SDK version as a User-Agent header
+ * */
+ globalAxios.interceptors.request.use(function (config) {
+ const version = require("../../package.json").version;
+ config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
+ return config;
+ });
+
+ /**
+ * Axios response interceptor to modify response structure
+ */
+ globalAxios.interceptors.response.use(function (response) {
+ return response.hasOwnProperty('success') ? response : response.data;
+ }, function (error) {
+ if(error?.response?.data) {
+ return Promise.reject(error.response.data);
+ }
+ return Promise.reject(error);
+ });
+ const localVarAxiosParamCreator = BillingApiAxiosParamCreator(configuration)
+ return {
+ /**
+ * Returns the add-ons for a single company.
+ * @summary Get all add-ons for a single company
+
+ * @throws {RequiredError}
+ */
+ async getCompanyAddons(): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getCompanyAddons();
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ }
+};
+
+/**
+ * BillingApi - factory interface
+ * @export
+ */
+export const BillingApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
+ const localVarFp = BillingApiFp(configuration)
+ return {
+ /**
+ * Returns the add-ons for a single company.
+ * @summary Get all add-ons for a single company
+
+ * @throws {RequiredError}
+ */
+ getCompanyAddons(): Promise {
+ return localVarFp.getCompanyAddons().then((request) => request(axios, basePath));
+ },
+ };
+};
+
+/**
+ * BillingApi - object-oriented interface
+ * @export
+ * @class BillingApi
+ * @extends {BaseAPI}
+ */
+export class BillingApi extends BaseAPI {
+ /**
+ * Returns the add-ons for a single company.
+ * @summary Get all add-ons for a single company
+
+ * @throws {RequiredError}
+ * @memberof BillingApi
+ */
+ public getCompanyAddons() {
+ return BillingApiFp(this.configuration).getCompanyAddons().then((request) => request(this.axios, this.basePath));
+ }
+}
diff --git a/api/call-logs-api.ts b/api/call-logs-api.ts
new file mode 100644
index 00000000..9513b319
--- /dev/null
+++ b/api/call-logs-api.ts
@@ -0,0 +1,576 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Pipedrive API v1
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import type { Configuration } from '../configuration';
+import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
+import globalAxios from 'axios';
+// URLSearchParams not necessarily used
+// @ts-ignore
+import { URL, URLSearchParams } from 'url';
+// Some imports not used depending on template conditions
+// @ts-ignore
+import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
+// @ts-ignore
+import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
+// @ts-ignore
+import { AddCallLogRequest } from '../models';
+// @ts-ignore
+import { BaseResponse } from '../models';
+// @ts-ignore
+import { CallLogResponse200 } from '../models';
+// @ts-ignore
+import { CallLogResponse400 } from '../models';
+// @ts-ignore
+import { CallLogResponse403 } from '../models';
+// @ts-ignore
+import { CallLogResponse404 } from '../models';
+// @ts-ignore
+import { CallLogResponse409 } from '../models';
+// @ts-ignore
+import { CallLogResponse410 } from '../models';
+// @ts-ignore
+import { CallLogResponse500 } from '../models';
+// @ts-ignore
+import { CallLogsResponse } from '../models';
+/**
+ * CallLogsApi - axios parameter creator
+ * @export
+ */
+export const CallLogsApiAxiosParamCreator = function (configuration?: Configuration) {
+ return {
+ /**
+ * Adds a new call log.
+ * @summary Add a call log
+ * @param {AddCallLogRequest} [AddCallLogRequest]
+
+ * @throws {RequiredError}
+ */
+ addCallLog: async (AddCallLogRequest?: AddCallLogRequest, ): Promise => {
+ const localVarPath = `/callLogs`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["phone-integration"], configuration)
+
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = serializeDataIfNeeded(AddCallLogRequest, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Adds an audio recording to the call log. That audio can be played by those who have access to the call log object.
+ * @summary Attach an audio file to the call log
+ * @param {string} id The ID received when you create the call log
+ * @param {File} file Audio file supported by the HTML5 specification
+
+ * @throws {RequiredError}
+ */
+ addCallLogAudioFile: async (id: string, file: File, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('addCallLogAudioFile', 'id', id)
+ // verify required parameter 'file' is not null or undefined
+ assertParamExists('addCallLogAudioFile', 'file', file)
+ const localVarPath = `/callLogs/{id}/recordings`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["phone-integration"], configuration)
+
+
+ if (file !== undefined) {
+ localVarFormParams.append('file', file as any);
+ }
+
+
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = localVarFormParams;
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Deletes a call log. If there is an audio recording attached to it, it will also be deleted. The related activity will not be removed by this request. If you want to remove the related activities, please use the endpoint which is specific for activities.
+ * @summary Delete a call log
+ * @param {string} id The ID received when you create the call log
+
+ * @throws {RequiredError}
+ */
+ deleteCallLog: async (id: string, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('deleteCallLog', 'id', id)
+ const localVarPath = `/callLogs/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["phone-integration"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Returns details of a specific call log.
+ * @summary Get details of a call log
+ * @param {string} id The ID received when you create the call log
+
+ * @throws {RequiredError}
+ */
+ getCallLog: async (id: string, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getCallLog', 'id', id)
+ const localVarPath = `/callLogs/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["phone-integration"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Returns all call logs assigned to a particular user.
+ * @summary Get all call logs assigned to a particular user
+ * @param {number} [start] Pagination start
+ * @param {number} [limit] For pagination, the limit of entries to be returned. The upper limit is 50.
+
+ * @throws {RequiredError}
+ */
+ getUserCallLogs: async (start?: number, limit?: number, ): Promise => {
+ const localVarPath = `/callLogs`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["phone-integration"], configuration)
+
+ if (start !== undefined) {
+ localVarQueryParameter['start'] = start;
+ }
+
+ if (limit !== undefined) {
+ localVarQueryParameter['limit'] = limit;
+ }
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ }
+};
+
+/**
+ * CallLogsApi - functional programming interface
+ * @export
+ */
+export const CallLogsApiFp = function(configuration?: Configuration) {
+
+ /**
+ * Axios interceptor to add the SDK version as a User-Agent header
+ * */
+ globalAxios.interceptors.request.use(function (config) {
+ const version = require("../../package.json").version;
+ config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
+ return config;
+ });
+
+ /**
+ * Axios response interceptor to modify response structure
+ */
+ globalAxios.interceptors.response.use(function (response) {
+ return response.hasOwnProperty('success') ? response : response.data;
+ }, function (error) {
+ if(error?.response?.data) {
+ return Promise.reject(error.response.data);
+ }
+ return Promise.reject(error);
+ });
+ const localVarAxiosParamCreator = CallLogsApiAxiosParamCreator(configuration)
+ return {
+ /**
+ * Adds a new call log.
+ * @summary Add a call log
+ * @param {AddCallLogRequest} [AddCallLogRequest]
+
+ * @throws {RequiredError}
+ */
+ async addCallLog(AddCallLogRequest?: AddCallLogRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addCallLog(AddCallLogRequest, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Adds an audio recording to the call log. That audio can be played by those who have access to the call log object.
+ * @summary Attach an audio file to the call log
+ * @param {string} id The ID received when you create the call log
+ * @param {File} file Audio file supported by the HTML5 specification
+
+ * @throws {RequiredError}
+ */
+ async addCallLogAudioFile(id: string, file: File, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addCallLogAudioFile(id, file, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Deletes a call log. If there is an audio recording attached to it, it will also be deleted. The related activity will not be removed by this request. If you want to remove the related activities, please use the endpoint which is specific for activities.
+ * @summary Delete a call log
+ * @param {string} id The ID received when you create the call log
+
+ * @throws {RequiredError}
+ */
+ async deleteCallLog(id: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCallLog(id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Returns details of a specific call log.
+ * @summary Get details of a call log
+ * @param {string} id The ID received when you create the call log
+
+ * @throws {RequiredError}
+ */
+ async getCallLog(id: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getCallLog(id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Returns all call logs assigned to a particular user.
+ * @summary Get all call logs assigned to a particular user
+ * @param {number} [start] Pagination start
+ * @param {number} [limit] For pagination, the limit of entries to be returned. The upper limit is 50.
+
+ * @throws {RequiredError}
+ */
+ async getUserCallLogs(start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getUserCallLogs(start, limit, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ }
+};
+
+/**
+ * CallLogsApi - factory interface
+ * @export
+ */
+export const CallLogsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
+ const localVarFp = CallLogsApiFp(configuration)
+ return {
+ /**
+ * Adds a new call log.
+ * @summary Add a call log
+ * @param {CallLogsApiAddCallLogRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ addCallLog(requestParameters: CallLogsApiAddCallLogRequest = {}, ): Promise {
+ return localVarFp.addCallLog(requestParameters.AddCallLogRequest, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Adds an audio recording to the call log. That audio can be played by those who have access to the call log object.
+ * @summary Attach an audio file to the call log
+ * @param {CallLogsApiAddCallLogAudioFileRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ addCallLogAudioFile(requestParameters: CallLogsApiAddCallLogAudioFileRequest, ): Promise {
+ return localVarFp.addCallLogAudioFile(requestParameters.id, requestParameters.file, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Deletes a call log. If there is an audio recording attached to it, it will also be deleted. The related activity will not be removed by this request. If you want to remove the related activities, please use the endpoint which is specific for activities.
+ * @summary Delete a call log
+ * @param {CallLogsApiDeleteCallLogRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ deleteCallLog(requestParameters: CallLogsApiDeleteCallLogRequest, ): Promise {
+ return localVarFp.deleteCallLog(requestParameters.id, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Returns details of a specific call log.
+ * @summary Get details of a call log
+ * @param {CallLogsApiGetCallLogRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getCallLog(requestParameters: CallLogsApiGetCallLogRequest, ): Promise {
+ return localVarFp.getCallLog(requestParameters.id, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Returns all call logs assigned to a particular user.
+ * @summary Get all call logs assigned to a particular user
+ * @param {CallLogsApiGetUserCallLogsRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getUserCallLogs(requestParameters: CallLogsApiGetUserCallLogsRequest = {}, ): Promise {
+ return localVarFp.getUserCallLogs(requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath));
+ },
+ };
+};
+
+/**
+ * Request parameters for addCallLog operation in CallLogsApi.
+ * @export
+ * @interface CallLogsApiAddCallLogRequest
+ */
+export interface CallLogsApiAddCallLogRequest {
+ /**
+ *
+ * @type {AddCallLogRequest}
+ * @memberof CallLogsApiAddCallLog
+ */
+ readonly AddCallLogRequest?: AddCallLogRequest
+}
+
+/**
+ * Request parameters for addCallLogAudioFile operation in CallLogsApi.
+ * @export
+ * @interface CallLogsApiAddCallLogAudioFileRequest
+ */
+export interface CallLogsApiAddCallLogAudioFileRequest {
+ /**
+ * The ID received when you create the call log
+ * @type {string}
+ * @memberof CallLogsApiAddCallLogAudioFile
+ */
+ readonly id: string
+
+ /**
+ * Audio file supported by the HTML5 specification
+ * @type {File}
+ * @memberof CallLogsApiAddCallLogAudioFile
+ */
+ readonly file: File
+}
+
+/**
+ * Request parameters for deleteCallLog operation in CallLogsApi.
+ * @export
+ * @interface CallLogsApiDeleteCallLogRequest
+ */
+export interface CallLogsApiDeleteCallLogRequest {
+ /**
+ * The ID received when you create the call log
+ * @type {string}
+ * @memberof CallLogsApiDeleteCallLog
+ */
+ readonly id: string
+}
+
+/**
+ * Request parameters for getCallLog operation in CallLogsApi.
+ * @export
+ * @interface CallLogsApiGetCallLogRequest
+ */
+export interface CallLogsApiGetCallLogRequest {
+ /**
+ * The ID received when you create the call log
+ * @type {string}
+ * @memberof CallLogsApiGetCallLog
+ */
+ readonly id: string
+}
+
+/**
+ * Request parameters for getUserCallLogs operation in CallLogsApi.
+ * @export
+ * @interface CallLogsApiGetUserCallLogsRequest
+ */
+export interface CallLogsApiGetUserCallLogsRequest {
+ /**
+ * Pagination start
+ * @type {number}
+ * @memberof CallLogsApiGetUserCallLogs
+ */
+ readonly start?: number
+
+ /**
+ * For pagination, the limit of entries to be returned. The upper limit is 50.
+ * @type {number}
+ * @memberof CallLogsApiGetUserCallLogs
+ */
+ readonly limit?: number
+}
+
+/**
+ * CallLogsApi - object-oriented interface
+ * @export
+ * @class CallLogsApi
+ * @extends {BaseAPI}
+ */
+export class CallLogsApi extends BaseAPI {
+ /**
+ * Adds a new call log.
+ * @summary Add a call log
+ * @param {CallLogsApiAddCallLogRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof CallLogsApi
+ */
+ public addCallLog(requestParameters: CallLogsApiAddCallLogRequest = {}, ) {
+ return CallLogsApiFp(this.configuration).addCallLog(requestParameters.AddCallLogRequest, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Adds an audio recording to the call log. That audio can be played by those who have access to the call log object.
+ * @summary Attach an audio file to the call log
+ * @param {CallLogsApiAddCallLogAudioFileRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof CallLogsApi
+ */
+ public addCallLogAudioFile(requestParameters: CallLogsApiAddCallLogAudioFileRequest, ) {
+ return CallLogsApiFp(this.configuration).addCallLogAudioFile(requestParameters.id, requestParameters.file, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Deletes a call log. If there is an audio recording attached to it, it will also be deleted. The related activity will not be removed by this request. If you want to remove the related activities, please use the endpoint which is specific for activities.
+ * @summary Delete a call log
+ * @param {CallLogsApiDeleteCallLogRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof CallLogsApi
+ */
+ public deleteCallLog(requestParameters: CallLogsApiDeleteCallLogRequest, ) {
+ return CallLogsApiFp(this.configuration).deleteCallLog(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Returns details of a specific call log.
+ * @summary Get details of a call log
+ * @param {CallLogsApiGetCallLogRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof CallLogsApi
+ */
+ public getCallLog(requestParameters: CallLogsApiGetCallLogRequest, ) {
+ return CallLogsApiFp(this.configuration).getCallLog(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Returns all call logs assigned to a particular user.
+ * @summary Get all call logs assigned to a particular user
+ * @param {CallLogsApiGetUserCallLogsRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof CallLogsApi
+ */
+ public getUserCallLogs(requestParameters: CallLogsApiGetUserCallLogsRequest = {}, ) {
+ return CallLogsApiFp(this.configuration).getUserCallLogs(requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath));
+ }
+}
diff --git a/api/channels-api.ts b/api/channels-api.ts
new file mode 100644
index 00000000..75b43059
--- /dev/null
+++ b/api/channels-api.ts
@@ -0,0 +1,467 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Pipedrive API v1
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import type { Configuration } from '../configuration';
+import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
+import globalAxios from 'axios';
+// URLSearchParams not necessarily used
+// @ts-ignore
+import { URL, URLSearchParams } from 'url';
+// Some imports not used depending on template conditions
+// @ts-ignore
+import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
+// @ts-ignore
+import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
+// @ts-ignore
+import { AddChannel200Response } from '../models';
+// @ts-ignore
+import { AddChannel400Response } from '../models';
+// @ts-ignore
+import { AddChannel403Response } from '../models';
+// @ts-ignore
+import { AddChannelRequest } from '../models';
+// @ts-ignore
+import { DeleteChannel200Response } from '../models';
+// @ts-ignore
+import { DeleteConversation403Response } from '../models';
+// @ts-ignore
+import { DeleteConversation404Response } from '../models';
+// @ts-ignore
+import { ReceiveMessage200Response } from '../models';
+// @ts-ignore
+import { ReceiveMessage400Response } from '../models';
+// @ts-ignore
+import { ReceiveMessageRequest } from '../models';
+/**
+ * ChannelsApi - axios parameter creator
+ * @export
+ */
+export const ChannelsApiAxiosParamCreator = function (configuration?: Configuration) {
+ return {
+ /**
+ * Adds a new messaging channel, only admins are able to register new channels. It will use the getConversations endpoint to fetch conversations, participants and messages afterward. To use the endpoint, you need to have **Messengers integration** OAuth scope enabled and the Messaging manifest ready for the [Messaging app extension](https://pipedrive.readme.io/docs/messaging-app-extension).
+ * @summary Add a channel
+ * @param {AddChannelRequest} [AddChannelRequest]
+
+ * @throws {RequiredError}
+ */
+ addChannel: async (AddChannelRequest?: AddChannelRequest, ): Promise => {
+ const localVarPath = `/channels`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["messengers-integration"], configuration)
+
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = serializeDataIfNeeded(AddChannelRequest, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Deletes an existing messenger’s channel and all related entities (conversations and messages). To use the endpoint, you need to have **Messengers integration** OAuth scope enabled and the Messaging manifest ready for the [Messaging app extension](https://pipedrive.readme.io/docs/messaging-app-extension).
+ * @summary Delete a channel
+ * @param {string} id The ID of the channel provided by the integration
+
+ * @throws {RequiredError}
+ */
+ deleteChannel: async (id: string, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('deleteChannel', 'id', id)
+ const localVarPath = `/channels/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["messengers-integration"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Deletes an existing conversation. To use the endpoint, you need to have **Messengers integration** OAuth scope enabled and the Messaging manifest ready for the [Messaging app extension](https://pipedrive.readme.io/docs/messaging-app-extension).
+ * @summary Delete a conversation
+ * @param {string} channel_id The ID of the channel provided by the integration
+ * @param {string} conversation_id The ID of the conversation provided by the integration
+
+ * @throws {RequiredError}
+ */
+ deleteConversation: async (channel_id: string, conversation_id: string, ): Promise => {
+ // verify required parameter 'channel_id' is not null or undefined
+ assertParamExists('deleteConversation', 'channel_id', channel_id)
+ // verify required parameter 'conversation_id' is not null or undefined
+ assertParamExists('deleteConversation', 'conversation_id', conversation_id)
+ const localVarPath = `/channels/{channel-id}/conversations/{conversation-id}`
+ .replace(`{${"channel-id"}}`, encodeURIComponent(String(channel_id)))
+ .replace(`{${"conversation-id"}}`, encodeURIComponent(String(conversation_id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["messengers-integration"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Adds a message to a conversation. To use the endpoint, you need to have **Messengers integration** OAuth scope enabled and the Messaging manifest ready for the [Messaging app extension](https://pipedrive.readme.io/docs/messaging-app-extension).
+ * @summary Receives an incoming message
+ * @param {ReceiveMessageRequest} [ReceiveMessageRequest]
+
+ * @throws {RequiredError}
+ */
+ receiveMessage: async (ReceiveMessageRequest?: ReceiveMessageRequest, ): Promise => {
+ const localVarPath = `/channels/messages/receive`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["messengers-integration"], configuration)
+
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = serializeDataIfNeeded(ReceiveMessageRequest, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ }
+};
+
+/**
+ * ChannelsApi - functional programming interface
+ * @export
+ */
+export const ChannelsApiFp = function(configuration?: Configuration) {
+
+ /**
+ * Axios interceptor to add the SDK version as a User-Agent header
+ * */
+ globalAxios.interceptors.request.use(function (config) {
+ const version = require("../../package.json").version;
+ config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
+ return config;
+ });
+
+ /**
+ * Axios response interceptor to modify response structure
+ */
+ globalAxios.interceptors.response.use(function (response) {
+ return response.hasOwnProperty('success') ? response : response.data;
+ }, function (error) {
+ if(error?.response?.data) {
+ return Promise.reject(error.response.data);
+ }
+ return Promise.reject(error);
+ });
+ const localVarAxiosParamCreator = ChannelsApiAxiosParamCreator(configuration)
+ return {
+ /**
+ * Adds a new messaging channel, only admins are able to register new channels. It will use the getConversations endpoint to fetch conversations, participants and messages afterward. To use the endpoint, you need to have **Messengers integration** OAuth scope enabled and the Messaging manifest ready for the [Messaging app extension](https://pipedrive.readme.io/docs/messaging-app-extension).
+ * @summary Add a channel
+ * @param {AddChannelRequest} [AddChannelRequest]
+
+ * @throws {RequiredError}
+ */
+ async addChannel(AddChannelRequest?: AddChannelRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addChannel(AddChannelRequest, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Deletes an existing messenger’s channel and all related entities (conversations and messages). To use the endpoint, you need to have **Messengers integration** OAuth scope enabled and the Messaging manifest ready for the [Messaging app extension](https://pipedrive.readme.io/docs/messaging-app-extension).
+ * @summary Delete a channel
+ * @param {string} id The ID of the channel provided by the integration
+
+ * @throws {RequiredError}
+ */
+ async deleteChannel(id: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteChannel(id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Deletes an existing conversation. To use the endpoint, you need to have **Messengers integration** OAuth scope enabled and the Messaging manifest ready for the [Messaging app extension](https://pipedrive.readme.io/docs/messaging-app-extension).
+ * @summary Delete a conversation
+ * @param {string} channel_id The ID of the channel provided by the integration
+ * @param {string} conversation_id The ID of the conversation provided by the integration
+
+ * @throws {RequiredError}
+ */
+ async deleteConversation(channel_id: string, conversation_id: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteConversation(channel_id, conversation_id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Adds a message to a conversation. To use the endpoint, you need to have **Messengers integration** OAuth scope enabled and the Messaging manifest ready for the [Messaging app extension](https://pipedrive.readme.io/docs/messaging-app-extension).
+ * @summary Receives an incoming message
+ * @param {ReceiveMessageRequest} [ReceiveMessageRequest]
+
+ * @throws {RequiredError}
+ */
+ async receiveMessage(ReceiveMessageRequest?: ReceiveMessageRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.receiveMessage(ReceiveMessageRequest, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ }
+};
+
+/**
+ * ChannelsApi - factory interface
+ * @export
+ */
+export const ChannelsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
+ const localVarFp = ChannelsApiFp(configuration)
+ return {
+ /**
+ * Adds a new messaging channel, only admins are able to register new channels. It will use the getConversations endpoint to fetch conversations, participants and messages afterward. To use the endpoint, you need to have **Messengers integration** OAuth scope enabled and the Messaging manifest ready for the [Messaging app extension](https://pipedrive.readme.io/docs/messaging-app-extension).
+ * @summary Add a channel
+ * @param {ChannelsApiAddChannelRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ addChannel(requestParameters: ChannelsApiAddChannelRequest = {}, ): Promise {
+ return localVarFp.addChannel(requestParameters.AddChannelRequest, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Deletes an existing messenger’s channel and all related entities (conversations and messages). To use the endpoint, you need to have **Messengers integration** OAuth scope enabled and the Messaging manifest ready for the [Messaging app extension](https://pipedrive.readme.io/docs/messaging-app-extension).
+ * @summary Delete a channel
+ * @param {ChannelsApiDeleteChannelRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ deleteChannel(requestParameters: ChannelsApiDeleteChannelRequest, ): Promise {
+ return localVarFp.deleteChannel(requestParameters.id, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Deletes an existing conversation. To use the endpoint, you need to have **Messengers integration** OAuth scope enabled and the Messaging manifest ready for the [Messaging app extension](https://pipedrive.readme.io/docs/messaging-app-extension).
+ * @summary Delete a conversation
+ * @param {ChannelsApiDeleteConversationRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ deleteConversation(requestParameters: ChannelsApiDeleteConversationRequest, ): Promise {
+ return localVarFp.deleteConversation(requestParameters.channel_id, requestParameters.conversation_id, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Adds a message to a conversation. To use the endpoint, you need to have **Messengers integration** OAuth scope enabled and the Messaging manifest ready for the [Messaging app extension](https://pipedrive.readme.io/docs/messaging-app-extension).
+ * @summary Receives an incoming message
+ * @param {ChannelsApiReceiveMessageRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ receiveMessage(requestParameters: ChannelsApiReceiveMessageRequest = {}, ): Promise {
+ return localVarFp.receiveMessage(requestParameters.ReceiveMessageRequest, ).then((request) => request(axios, basePath));
+ },
+ };
+};
+
+/**
+ * Request parameters for addChannel operation in ChannelsApi.
+ * @export
+ * @interface ChannelsApiAddChannelRequest
+ */
+export interface ChannelsApiAddChannelRequest {
+ /**
+ *
+ * @type {AddChannelRequest}
+ * @memberof ChannelsApiAddChannel
+ */
+ readonly AddChannelRequest?: AddChannelRequest
+}
+
+/**
+ * Request parameters for deleteChannel operation in ChannelsApi.
+ * @export
+ * @interface ChannelsApiDeleteChannelRequest
+ */
+export interface ChannelsApiDeleteChannelRequest {
+ /**
+ * The ID of the channel provided by the integration
+ * @type {string}
+ * @memberof ChannelsApiDeleteChannel
+ */
+ readonly id: string
+}
+
+/**
+ * Request parameters for deleteConversation operation in ChannelsApi.
+ * @export
+ * @interface ChannelsApiDeleteConversationRequest
+ */
+export interface ChannelsApiDeleteConversationRequest {
+ /**
+ * The ID of the channel provided by the integration
+ * @type {string}
+ * @memberof ChannelsApiDeleteConversation
+ */
+ readonly channel_id: string
+
+ /**
+ * The ID of the conversation provided by the integration
+ * @type {string}
+ * @memberof ChannelsApiDeleteConversation
+ */
+ readonly conversation_id: string
+}
+
+/**
+ * Request parameters for receiveMessage operation in ChannelsApi.
+ * @export
+ * @interface ChannelsApiReceiveMessageRequest
+ */
+export interface ChannelsApiReceiveMessageRequest {
+ /**
+ *
+ * @type {ReceiveMessageRequest}
+ * @memberof ChannelsApiReceiveMessage
+ */
+ readonly ReceiveMessageRequest?: ReceiveMessageRequest
+}
+
+/**
+ * ChannelsApi - object-oriented interface
+ * @export
+ * @class ChannelsApi
+ * @extends {BaseAPI}
+ */
+export class ChannelsApi extends BaseAPI {
+ /**
+ * Adds a new messaging channel, only admins are able to register new channels. It will use the getConversations endpoint to fetch conversations, participants and messages afterward. To use the endpoint, you need to have **Messengers integration** OAuth scope enabled and the Messaging manifest ready for the [Messaging app extension](https://pipedrive.readme.io/docs/messaging-app-extension).
+ * @summary Add a channel
+ * @param {ChannelsApiAddChannelRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof ChannelsApi
+ */
+ public addChannel(requestParameters: ChannelsApiAddChannelRequest = {}, ) {
+ return ChannelsApiFp(this.configuration).addChannel(requestParameters.AddChannelRequest, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Deletes an existing messenger’s channel and all related entities (conversations and messages). To use the endpoint, you need to have **Messengers integration** OAuth scope enabled and the Messaging manifest ready for the [Messaging app extension](https://pipedrive.readme.io/docs/messaging-app-extension).
+ * @summary Delete a channel
+ * @param {ChannelsApiDeleteChannelRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof ChannelsApi
+ */
+ public deleteChannel(requestParameters: ChannelsApiDeleteChannelRequest, ) {
+ return ChannelsApiFp(this.configuration).deleteChannel(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Deletes an existing conversation. To use the endpoint, you need to have **Messengers integration** OAuth scope enabled and the Messaging manifest ready for the [Messaging app extension](https://pipedrive.readme.io/docs/messaging-app-extension).
+ * @summary Delete a conversation
+ * @param {ChannelsApiDeleteConversationRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof ChannelsApi
+ */
+ public deleteConversation(requestParameters: ChannelsApiDeleteConversationRequest, ) {
+ return ChannelsApiFp(this.configuration).deleteConversation(requestParameters.channel_id, requestParameters.conversation_id, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Adds a message to a conversation. To use the endpoint, you need to have **Messengers integration** OAuth scope enabled and the Messaging manifest ready for the [Messaging app extension](https://pipedrive.readme.io/docs/messaging-app-extension).
+ * @summary Receives an incoming message
+ * @param {ChannelsApiReceiveMessageRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof ChannelsApi
+ */
+ public receiveMessage(requestParameters: ChannelsApiReceiveMessageRequest = {}, ) {
+ return ChannelsApiFp(this.configuration).receiveMessage(requestParameters.ReceiveMessageRequest, ).then((request) => request(this.axios, this.basePath));
+ }
+}
diff --git a/api/currencies-api.ts b/api/currencies-api.ts
new file mode 100644
index 00000000..8ee5b1ab
--- /dev/null
+++ b/api/currencies-api.ts
@@ -0,0 +1,174 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Pipedrive API v1
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import type { Configuration } from '../configuration';
+import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
+import globalAxios from 'axios';
+// URLSearchParams not necessarily used
+// @ts-ignore
+import { URL, URLSearchParams } from 'url';
+// Some imports not used depending on template conditions
+// @ts-ignore
+import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
+// @ts-ignore
+import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
+// @ts-ignore
+import { GetCurrenciesResponse200 } from '../models';
+/**
+ * CurrenciesApi - axios parameter creator
+ * @export
+ */
+export const CurrenciesApiAxiosParamCreator = function (configuration?: Configuration) {
+ return {
+ /**
+ * Returns all supported currencies in given account which should be used when saving monetary values with other objects. The `code` parameter of the returning objects is the currency code according to ISO 4217 for all non-custom currencies.
+ * @summary Get all supported currencies
+ * @param {string} [term] Optional search term that is searched for from currency\'s name and/or code
+
+ * @throws {RequiredError}
+ */
+ getCurrencies: async (term?: string, ): Promise => {
+ const localVarPath = `/currencies`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["base"], configuration)
+
+ if (term !== undefined) {
+ localVarQueryParameter['term'] = term;
+ }
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ }
+};
+
+/**
+ * CurrenciesApi - functional programming interface
+ * @export
+ */
+export const CurrenciesApiFp = function(configuration?: Configuration) {
+
+ /**
+ * Axios interceptor to add the SDK version as a User-Agent header
+ * */
+ globalAxios.interceptors.request.use(function (config) {
+ const version = require("../../package.json").version;
+ config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
+ return config;
+ });
+
+ /**
+ * Axios response interceptor to modify response structure
+ */
+ globalAxios.interceptors.response.use(function (response) {
+ return response.hasOwnProperty('success') ? response : response.data;
+ }, function (error) {
+ if(error?.response?.data) {
+ return Promise.reject(error.response.data);
+ }
+ return Promise.reject(error);
+ });
+ const localVarAxiosParamCreator = CurrenciesApiAxiosParamCreator(configuration)
+ return {
+ /**
+ * Returns all supported currencies in given account which should be used when saving monetary values with other objects. The `code` parameter of the returning objects is the currency code according to ISO 4217 for all non-custom currencies.
+ * @summary Get all supported currencies
+ * @param {string} [term] Optional search term that is searched for from currency\'s name and/or code
+
+ * @throws {RequiredError}
+ */
+ async getCurrencies(term?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getCurrencies(term, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ }
+};
+
+/**
+ * CurrenciesApi - factory interface
+ * @export
+ */
+export const CurrenciesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
+ const localVarFp = CurrenciesApiFp(configuration)
+ return {
+ /**
+ * Returns all supported currencies in given account which should be used when saving monetary values with other objects. The `code` parameter of the returning objects is the currency code according to ISO 4217 for all non-custom currencies.
+ * @summary Get all supported currencies
+ * @param {CurrenciesApiGetCurrenciesRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getCurrencies(requestParameters: CurrenciesApiGetCurrenciesRequest = {}, ): Promise {
+ return localVarFp.getCurrencies(requestParameters.term, ).then((request) => request(axios, basePath));
+ },
+ };
+};
+
+/**
+ * Request parameters for getCurrencies operation in CurrenciesApi.
+ * @export
+ * @interface CurrenciesApiGetCurrenciesRequest
+ */
+export interface CurrenciesApiGetCurrenciesRequest {
+ /**
+ * Optional search term that is searched for from currency\'s name and/or code
+ * @type {string}
+ * @memberof CurrenciesApiGetCurrencies
+ */
+ readonly term?: string
+}
+
+/**
+ * CurrenciesApi - object-oriented interface
+ * @export
+ * @class CurrenciesApi
+ * @extends {BaseAPI}
+ */
+export class CurrenciesApi extends BaseAPI {
+ /**
+ * Returns all supported currencies in given account which should be used when saving monetary values with other objects. The `code` parameter of the returning objects is the currency code according to ISO 4217 for all non-custom currencies.
+ * @summary Get all supported currencies
+ * @param {CurrenciesApiGetCurrenciesRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof CurrenciesApi
+ */
+ public getCurrencies(requestParameters: CurrenciesApiGetCurrenciesRequest = {}, ) {
+ return CurrenciesApiFp(this.configuration).getCurrencies(requestParameters.term, ).then((request) => request(this.axios, this.basePath));
+ }
+}
diff --git a/api/deal-fields-api.ts b/api/deal-fields-api.ts
new file mode 100644
index 00000000..c7ad8152
--- /dev/null
+++ b/api/deal-fields-api.ts
@@ -0,0 +1,652 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Pipedrive API v1
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import type { Configuration } from '../configuration';
+import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
+import globalAxios from 'axios';
+// URLSearchParams not necessarily used
+// @ts-ignore
+import { URL, URLSearchParams } from 'url';
+// Some imports not used depending on template conditions
+// @ts-ignore
+import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
+// @ts-ignore
+import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
+// @ts-ignore
+import { CreateFieldRequest } from '../models';
+// @ts-ignore
+import { DeleteFieldResponse200 } from '../models';
+// @ts-ignore
+import { DeleteFieldsResponse200 } from '../models';
+// @ts-ignore
+import { FieldResponse200 } from '../models';
+// @ts-ignore
+import { FieldsResponse200 } from '../models';
+// @ts-ignore
+import { UpdateFieldRequest } from '../models';
+/**
+ * DealFieldsApi - axios parameter creator
+ * @export
+ */
+export const DealFieldsApiAxiosParamCreator = function (configuration?: Configuration) {
+ return {
+ /**
+ * Adds a new deal field. For more information, see the tutorial for adding a new custom field.
+ * @summary Add a new deal field
+ * @param {CreateFieldRequest} [CreateFieldRequest]
+
+ * @throws {RequiredError}
+ */
+ addDealField: async (CreateFieldRequest?: CreateFieldRequest, ): Promise => {
+ const localVarPath = `/dealFields`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["admin"], configuration)
+
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = serializeDataIfNeeded(CreateFieldRequest, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Marks a field as deleted. For more information, see the tutorial for deleting a custom field.
+ * @summary Delete a deal field
+ * @param {number} id The ID of the field
+
+ * @throws {RequiredError}
+ */
+ deleteDealField: async (id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('deleteDealField', 'id', id)
+ const localVarPath = `/dealFields/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["admin"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Marks multiple deal fields as deleted.
+ * @summary Delete multiple deal fields in bulk
+ * @param {string} ids The comma-separated field IDs to delete
+
+ * @throws {RequiredError}
+ */
+ deleteDealFields: async (ids: string, ): Promise => {
+ // verify required parameter 'ids' is not null or undefined
+ assertParamExists('deleteDealFields', 'ids', ids)
+ const localVarPath = `/dealFields`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["admin"], configuration)
+
+ if (ids !== undefined) {
+ localVarQueryParameter['ids'] = ids;
+ }
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Returns data about a specific deal field.
+ * @summary Get one deal field
+ * @param {number} id The ID of the field
+
+ * @throws {RequiredError}
+ */
+ getDealField: async (id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getDealField', 'id', id)
+ const localVarPath = `/dealFields/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full", "admin"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Returns data about all deal fields.
+ * @summary Get all deal fields
+ * @param {number} [start] Pagination start
+ * @param {number} [limit] Items shown per page
+
+ * @throws {RequiredError}
+ */
+ getDealFields: async (start?: number, limit?: number, ): Promise => {
+ const localVarPath = `/dealFields`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full", "admin"], configuration)
+
+ if (start !== undefined) {
+ localVarQueryParameter['start'] = start;
+ }
+
+ if (limit !== undefined) {
+ localVarQueryParameter['limit'] = limit;
+ }
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Updates a deal field. For more information, see the tutorial for updating custom fields\' values.
+ * @summary Update a deal field
+ * @param {number} id The ID of the field
+ * @param {UpdateFieldRequest} [UpdateFieldRequest]
+
+ * @throws {RequiredError}
+ */
+ updateDealField: async (id: number, UpdateFieldRequest?: UpdateFieldRequest, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('updateDealField', 'id', id)
+ const localVarPath = `/dealFields/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["admin"], configuration)
+
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = serializeDataIfNeeded(UpdateFieldRequest, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ }
+};
+
+/**
+ * DealFieldsApi - functional programming interface
+ * @export
+ */
+export const DealFieldsApiFp = function(configuration?: Configuration) {
+
+ /**
+ * Axios interceptor to add the SDK version as a User-Agent header
+ * */
+ globalAxios.interceptors.request.use(function (config) {
+ const version = require("../../package.json").version;
+ config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
+ return config;
+ });
+
+ /**
+ * Axios response interceptor to modify response structure
+ */
+ globalAxios.interceptors.response.use(function (response) {
+ return response.hasOwnProperty('success') ? response : response.data;
+ }, function (error) {
+ if(error?.response?.data) {
+ return Promise.reject(error.response.data);
+ }
+ return Promise.reject(error);
+ });
+ const localVarAxiosParamCreator = DealFieldsApiAxiosParamCreator(configuration)
+ return {
+ /**
+ * Adds a new deal field. For more information, see the tutorial for adding a new custom field.
+ * @summary Add a new deal field
+ * @param {CreateFieldRequest} [CreateFieldRequest]
+
+ * @throws {RequiredError}
+ */
+ async addDealField(CreateFieldRequest?: CreateFieldRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addDealField(CreateFieldRequest, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Marks a field as deleted. For more information, see the tutorial for deleting a custom field.
+ * @summary Delete a deal field
+ * @param {number} id The ID of the field
+
+ * @throws {RequiredError}
+ */
+ async deleteDealField(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDealField(id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Marks multiple deal fields as deleted.
+ * @summary Delete multiple deal fields in bulk
+ * @param {string} ids The comma-separated field IDs to delete
+
+ * @throws {RequiredError}
+ */
+ async deleteDealFields(ids: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDealFields(ids, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Returns data about a specific deal field.
+ * @summary Get one deal field
+ * @param {number} id The ID of the field
+
+ * @throws {RequiredError}
+ */
+ async getDealField(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDealField(id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Returns data about all deal fields.
+ * @summary Get all deal fields
+ * @param {number} [start] Pagination start
+ * @param {number} [limit] Items shown per page
+
+ * @throws {RequiredError}
+ */
+ async getDealFields(start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDealFields(start, limit, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Updates a deal field. For more information, see the tutorial for updating custom fields\' values.
+ * @summary Update a deal field
+ * @param {number} id The ID of the field
+ * @param {UpdateFieldRequest} [UpdateFieldRequest]
+
+ * @throws {RequiredError}
+ */
+ async updateDealField(id: number, UpdateFieldRequest?: UpdateFieldRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateDealField(id, UpdateFieldRequest, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ }
+};
+
+/**
+ * DealFieldsApi - factory interface
+ * @export
+ */
+export const DealFieldsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
+ const localVarFp = DealFieldsApiFp(configuration)
+ return {
+ /**
+ * Adds a new deal field. For more information, see the tutorial for adding a new custom field.
+ * @summary Add a new deal field
+ * @param {DealFieldsApiAddDealFieldRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ addDealField(requestParameters: DealFieldsApiAddDealFieldRequest = {}, ): Promise {
+ return localVarFp.addDealField(requestParameters.CreateFieldRequest, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Marks a field as deleted. For more information, see the tutorial for deleting a custom field.
+ * @summary Delete a deal field
+ * @param {DealFieldsApiDeleteDealFieldRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ deleteDealField(requestParameters: DealFieldsApiDeleteDealFieldRequest, ): Promise {
+ return localVarFp.deleteDealField(requestParameters.id, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Marks multiple deal fields as deleted.
+ * @summary Delete multiple deal fields in bulk
+ * @param {DealFieldsApiDeleteDealFieldsRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ deleteDealFields(requestParameters: DealFieldsApiDeleteDealFieldsRequest, ): Promise {
+ return localVarFp.deleteDealFields(requestParameters.ids, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Returns data about a specific deal field.
+ * @summary Get one deal field
+ * @param {DealFieldsApiGetDealFieldRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getDealField(requestParameters: DealFieldsApiGetDealFieldRequest, ): Promise {
+ return localVarFp.getDealField(requestParameters.id, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Returns data about all deal fields.
+ * @summary Get all deal fields
+ * @param {DealFieldsApiGetDealFieldsRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getDealFields(requestParameters: DealFieldsApiGetDealFieldsRequest = {}, ): Promise {
+ return localVarFp.getDealFields(requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Updates a deal field. For more information, see the tutorial for updating custom fields\' values.
+ * @summary Update a deal field
+ * @param {DealFieldsApiUpdateDealFieldRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ updateDealField(requestParameters: DealFieldsApiUpdateDealFieldRequest, ): Promise {
+ return localVarFp.updateDealField(requestParameters.id, requestParameters.UpdateFieldRequest, ).then((request) => request(axios, basePath));
+ },
+ };
+};
+
+/**
+ * Request parameters for addDealField operation in DealFieldsApi.
+ * @export
+ * @interface DealFieldsApiAddDealFieldRequest
+ */
+export interface DealFieldsApiAddDealFieldRequest {
+ /**
+ *
+ * @type {CreateFieldRequest}
+ * @memberof DealFieldsApiAddDealField
+ */
+ readonly CreateFieldRequest?: CreateFieldRequest
+}
+
+/**
+ * Request parameters for deleteDealField operation in DealFieldsApi.
+ * @export
+ * @interface DealFieldsApiDeleteDealFieldRequest
+ */
+export interface DealFieldsApiDeleteDealFieldRequest {
+ /**
+ * The ID of the field
+ * @type {number}
+ * @memberof DealFieldsApiDeleteDealField
+ */
+ readonly id: number
+}
+
+/**
+ * Request parameters for deleteDealFields operation in DealFieldsApi.
+ * @export
+ * @interface DealFieldsApiDeleteDealFieldsRequest
+ */
+export interface DealFieldsApiDeleteDealFieldsRequest {
+ /**
+ * The comma-separated field IDs to delete
+ * @type {string}
+ * @memberof DealFieldsApiDeleteDealFields
+ */
+ readonly ids: string
+}
+
+/**
+ * Request parameters for getDealField operation in DealFieldsApi.
+ * @export
+ * @interface DealFieldsApiGetDealFieldRequest
+ */
+export interface DealFieldsApiGetDealFieldRequest {
+ /**
+ * The ID of the field
+ * @type {number}
+ * @memberof DealFieldsApiGetDealField
+ */
+ readonly id: number
+}
+
+/**
+ * Request parameters for getDealFields operation in DealFieldsApi.
+ * @export
+ * @interface DealFieldsApiGetDealFieldsRequest
+ */
+export interface DealFieldsApiGetDealFieldsRequest {
+ /**
+ * Pagination start
+ * @type {number}
+ * @memberof DealFieldsApiGetDealFields
+ */
+ readonly start?: number
+
+ /**
+ * Items shown per page
+ * @type {number}
+ * @memberof DealFieldsApiGetDealFields
+ */
+ readonly limit?: number
+}
+
+/**
+ * Request parameters for updateDealField operation in DealFieldsApi.
+ * @export
+ * @interface DealFieldsApiUpdateDealFieldRequest
+ */
+export interface DealFieldsApiUpdateDealFieldRequest {
+ /**
+ * The ID of the field
+ * @type {number}
+ * @memberof DealFieldsApiUpdateDealField
+ */
+ readonly id: number
+
+ /**
+ *
+ * @type {UpdateFieldRequest}
+ * @memberof DealFieldsApiUpdateDealField
+ */
+ readonly UpdateFieldRequest?: UpdateFieldRequest
+}
+
+/**
+ * DealFieldsApi - object-oriented interface
+ * @export
+ * @class DealFieldsApi
+ * @extends {BaseAPI}
+ */
+export class DealFieldsApi extends BaseAPI {
+ /**
+ * Adds a new deal field. For more information, see the tutorial for adding a new custom field.
+ * @summary Add a new deal field
+ * @param {DealFieldsApiAddDealFieldRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealFieldsApi
+ */
+ public addDealField(requestParameters: DealFieldsApiAddDealFieldRequest = {}, ) {
+ return DealFieldsApiFp(this.configuration).addDealField(requestParameters.CreateFieldRequest, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Marks a field as deleted. For more information, see the tutorial for deleting a custom field.
+ * @summary Delete a deal field
+ * @param {DealFieldsApiDeleteDealFieldRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealFieldsApi
+ */
+ public deleteDealField(requestParameters: DealFieldsApiDeleteDealFieldRequest, ) {
+ return DealFieldsApiFp(this.configuration).deleteDealField(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Marks multiple deal fields as deleted.
+ * @summary Delete multiple deal fields in bulk
+ * @param {DealFieldsApiDeleteDealFieldsRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealFieldsApi
+ */
+ public deleteDealFields(requestParameters: DealFieldsApiDeleteDealFieldsRequest, ) {
+ return DealFieldsApiFp(this.configuration).deleteDealFields(requestParameters.ids, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Returns data about a specific deal field.
+ * @summary Get one deal field
+ * @param {DealFieldsApiGetDealFieldRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealFieldsApi
+ */
+ public getDealField(requestParameters: DealFieldsApiGetDealFieldRequest, ) {
+ return DealFieldsApiFp(this.configuration).getDealField(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Returns data about all deal fields.
+ * @summary Get all deal fields
+ * @param {DealFieldsApiGetDealFieldsRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealFieldsApi
+ */
+ public getDealFields(requestParameters: DealFieldsApiGetDealFieldsRequest = {}, ) {
+ return DealFieldsApiFp(this.configuration).getDealFields(requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Updates a deal field. For more information, see the tutorial for updating custom fields\' values.
+ * @summary Update a deal field
+ * @param {DealFieldsApiUpdateDealFieldRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealFieldsApi
+ */
+ public updateDealField(requestParameters: DealFieldsApiUpdateDealFieldRequest, ) {
+ return DealFieldsApiFp(this.configuration).updateDealField(requestParameters.id, requestParameters.UpdateFieldRequest, ).then((request) => request(this.axios, this.basePath));
+ }
+}
diff --git a/api/deals-api.ts b/api/deals-api.ts
new file mode 100644
index 00000000..828d0c8a
--- /dev/null
+++ b/api/deals-api.ts
@@ -0,0 +1,3433 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Pipedrive API v1
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import type { Configuration } from '../configuration';
+import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
+import globalAxios from 'axios';
+// URLSearchParams not necessarily used
+// @ts-ignore
+import { URL, URLSearchParams } from 'url';
+// Some imports not used depending on template conditions
+// @ts-ignore
+import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
+// @ts-ignore
+import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
+// @ts-ignore
+import { AddDealFollowerRequest } from '../models';
+// @ts-ignore
+import { AddDealFollowerResponse200 } from '../models';
+// @ts-ignore
+import { AddDealParticipantRequest } from '../models';
+// @ts-ignore
+import { AddDealParticipantResponse200 } from '../models';
+// @ts-ignore
+import { AddDealProductRequest } from '../models';
+// @ts-ignore
+import { AddDealRequest } from '../models';
+// @ts-ignore
+import { DealResponse200 } from '../models';
+// @ts-ignore
+import { DeleteDealFollowerResponse200 } from '../models';
+// @ts-ignore
+import { DeleteDealParticipantResponse200 } from '../models';
+// @ts-ignore
+import { DeleteDealProductResponse200 } from '../models';
+// @ts-ignore
+import { DeleteDealResponse200 } from '../models';
+// @ts-ignore
+import { DeleteDealsResponse200 } from '../models';
+// @ts-ignore
+import { DuplicateDealResponse200 } from '../models';
+// @ts-ignore
+import { FailResponse } from '../models';
+// @ts-ignore
+import { GetAddProductAttachementResponse200 } from '../models';
+// @ts-ignore
+import { GetAssociatedFilesResponse200 } from '../models';
+// @ts-ignore
+import { GetAssociatedFollowersResponse200 } from '../models';
+// @ts-ignore
+import { GetAssociatedMailMessagesResponse200 } from '../models';
+// @ts-ignore
+import { GetDealActivitiesResponse200 } from '../models';
+// @ts-ignore
+import { GetDealParticipantsResponse200 } from '../models';
+// @ts-ignore
+import { GetDealResponse200 } from '../models';
+// @ts-ignore
+import { GetDealUpdatesResponse200 } from '../models';
+// @ts-ignore
+import { GetDealsCollectionResponse200 } from '../models';
+// @ts-ignore
+import { GetDealsResponse200 } from '../models';
+// @ts-ignore
+import { GetDealsSummaryResponse200 } from '../models';
+// @ts-ignore
+import { GetDealsTimelineResponse200 } from '../models';
+// @ts-ignore
+import { GetProductAttachementResponse200 } from '../models';
+// @ts-ignore
+import { ListPermittedUsersResponse200 } from '../models';
+// @ts-ignore
+import { ListPersonsResponse200 } from '../models';
+// @ts-ignore
+import { ListProductsResponse200 } from '../models';
+// @ts-ignore
+import { MergeDealsRequest } from '../models';
+// @ts-ignore
+import { MergeDealsResponse200 } from '../models';
+// @ts-ignore
+import { SearchDealsResponse200 } from '../models';
+// @ts-ignore
+import { UpdateDealProductRequest } from '../models';
+// @ts-ignore
+import { UpdateDealRequest } from '../models';
+/**
+ * DealsApi - axios parameter creator
+ * @export
+ */
+export const DealsApiAxiosParamCreator = function (configuration?: Configuration) {
+ return {
+ /**
+ * Adds a new deal. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for `key` values. For more information, see the tutorial for adding a deal.
+ * @summary Add a deal
+ * @param {AddDealRequest} [AddDealRequest]
+
+ * @throws {RequiredError}
+ */
+ addDeal: async (AddDealRequest?: AddDealRequest, ): Promise => {
+ const localVarPath = `/deals`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration)
+
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = serializeDataIfNeeded(AddDealRequest, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Adds a follower to a deal.
+ * @summary Add a follower to a deal
+ * @param {number} id The ID of the deal
+ * @param {AddDealFollowerRequest} [AddDealFollowerRequest]
+
+ * @throws {RequiredError}
+ */
+ addDealFollower: async (id: number, AddDealFollowerRequest?: AddDealFollowerRequest, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('addDealFollower', 'id', id)
+ const localVarPath = `/deals/{id}/followers`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration)
+
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = serializeDataIfNeeded(AddDealFollowerRequest, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Adds a participant to a deal.
+ * @summary Add a participant to a deal
+ * @param {number} id The ID of the deal
+ * @param {AddDealParticipantRequest} [AddDealParticipantRequest]
+
+ * @throws {RequiredError}
+ */
+ addDealParticipant: async (id: number, AddDealParticipantRequest?: AddDealParticipantRequest, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('addDealParticipant', 'id', id)
+ const localVarPath = `/deals/{id}/participants`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration)
+
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = serializeDataIfNeeded(AddDealParticipantRequest, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Adds a product to a deal, creating a new item called a deal-product.
+ * @summary Add a product to a deal
+ * @param {number} id The ID of the deal
+ * @param {AddDealProductRequest} [AddDealProductRequest]
+
+ * @throws {RequiredError}
+ */
+ addDealProduct: async (id: number, AddDealProductRequest?: AddDealProductRequest, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('addDealProduct', 'id', id)
+ const localVarPath = `/deals/{id}/products`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "products:full"], configuration)
+
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = serializeDataIfNeeded(AddDealProductRequest, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Marks a deal as deleted. After 30 days, the deal will be permanently deleted.
+ * @summary Delete a deal
+ * @param {number} id The ID of the deal
+
+ * @throws {RequiredError}
+ */
+ deleteDeal: async (id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('deleteDeal', 'id', id)
+ const localVarPath = `/deals/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Deletes a follower from a deal.
+ * @summary Delete a follower from a deal
+ * @param {number} id The ID of the deal
+ * @param {number} follower_id The ID of the follower
+
+ * @throws {RequiredError}
+ */
+ deleteDealFollower: async (id: number, follower_id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('deleteDealFollower', 'id', id)
+ // verify required parameter 'follower_id' is not null or undefined
+ assertParamExists('deleteDealFollower', 'follower_id', follower_id)
+ const localVarPath = `/deals/{id}/followers/{follower_id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
+ .replace(`{${"follower_id"}}`, encodeURIComponent(String(follower_id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Deletes a participant from a deal.
+ * @summary Delete a participant from a deal
+ * @param {number} id The ID of the deal
+ * @param {number} deal_participant_id The ID of the participant of the deal
+
+ * @throws {RequiredError}
+ */
+ deleteDealParticipant: async (id: number, deal_participant_id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('deleteDealParticipant', 'id', id)
+ // verify required parameter 'deal_participant_id' is not null or undefined
+ assertParamExists('deleteDealParticipant', 'deal_participant_id', deal_participant_id)
+ const localVarPath = `/deals/{id}/participants/{deal_participant_id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
+ .replace(`{${"deal_participant_id"}}`, encodeURIComponent(String(deal_participant_id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Deletes a product attachment from a deal, using the `product_attachment_id`.
+ * @summary Delete an attached product from a deal
+ * @param {number} id The ID of the deal
+ * @param {number} product_attachment_id The product attachment ID
+
+ * @throws {RequiredError}
+ */
+ deleteDealProduct: async (id: number, product_attachment_id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('deleteDealProduct', 'id', id)
+ // verify required parameter 'product_attachment_id' is not null or undefined
+ assertParamExists('deleteDealProduct', 'product_attachment_id', product_attachment_id)
+ const localVarPath = `/deals/{id}/products/{product_attachment_id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
+ .replace(`{${"product_attachment_id"}}`, encodeURIComponent(String(product_attachment_id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "products:full"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Marks multiple deals as deleted. After 30 days, the deals will be permanently deleted.
+ * @summary Delete multiple deals in bulk
+ * @param {string} ids The comma-separated IDs that will be deleted
+
+ * @throws {RequiredError}
+ */
+ deleteDeals: async (ids: string, ): Promise => {
+ // verify required parameter 'ids' is not null or undefined
+ assertParamExists('deleteDeals', 'ids', ids)
+ const localVarPath = `/deals`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration)
+
+ if (ids !== undefined) {
+ localVarQueryParameter['ids'] = ids;
+ }
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Duplicates a deal.
+ * @summary Duplicate deal
+ * @param {number} id The ID of the deal
+
+ * @throws {RequiredError}
+ */
+ duplicateDeal: async (id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('duplicateDeal', 'id', id)
+ const localVarPath = `/deals/{id}/duplicate`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Returns the details of a specific deal. Note that this also returns some additional fields which are not present when asking for all deals – such as deal age and stay in pipeline stages. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of dealFields. For more information, see the tutorial for getting details of a deal.
+ * @summary Get details of a deal
+ * @param {number} id The ID of the deal
+
+ * @throws {RequiredError}
+ */
+ getDeal: async (id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getDeal', 'id', id)
+ const localVarPath = `/deals/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Lists activities associated with a deal.
+ * @summary List activities associated with a deal
+ * @param {number} id The ID of the deal
+ * @param {number} [start] Pagination start
+ * @param {number} [limit] Items shown per page
+ * @param {0 | 1} [done] Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted, returns both Done and Not done activities.
+ * @param {string} [exclude] A comma-separated string of activity IDs to exclude from result
+
+ * @throws {RequiredError}
+ */
+ getDealActivities: async (id: number, start?: number, limit?: number, done?: 0 | 1, exclude?: string, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getDealActivities', 'id', id)
+ const localVarPath = `/deals/{id}/activities`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["activities:read", "activities:full"], configuration)
+
+ if (start !== undefined) {
+ localVarQueryParameter['start'] = start;
+ }
+
+ if (limit !== undefined) {
+ localVarQueryParameter['limit'] = limit;
+ }
+
+ if (done !== undefined) {
+ localVarQueryParameter['done'] = done;
+ }
+
+ if (exclude !== undefined) {
+ localVarQueryParameter['exclude'] = exclude;
+ }
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Lists files associated with a deal.
+ * @summary List files attached to a deal
+ * @param {number} id The ID of the deal
+ * @param {number} [start] Pagination start
+ * @param {number} [limit] Items shown per page
+ * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `product_id`, `add_time`, `update_time`, `file_name`, `file_type`, `file_size`, `comment`.
+
+ * @throws {RequiredError}
+ */
+ getDealFiles: async (id: number, start?: number, limit?: number, sort?: string, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getDealFiles', 'id', id)
+ const localVarPath = `/deals/{id}/files`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration)
+
+ if (start !== undefined) {
+ localVarQueryParameter['start'] = start;
+ }
+
+ if (limit !== undefined) {
+ localVarQueryParameter['limit'] = limit;
+ }
+
+ if (sort !== undefined) {
+ localVarQueryParameter['sort'] = sort;
+ }
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Lists the followers of a deal.
+ * @summary List followers of a deal
+ * @param {number} id The ID of the deal
+
+ * @throws {RequiredError}
+ */
+ getDealFollowers: async (id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getDealFollowers', 'id', id)
+ const localVarPath = `/deals/{id}/followers`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Lists mail messages associated with a deal.
+ * @summary List mail messages associated with a deal
+ * @param {number} id The ID of the deal
+ * @param {number} [start] Pagination start
+ * @param {number} [limit] Items shown per page
+
+ * @throws {RequiredError}
+ */
+ getDealMailMessages: async (id: number, start?: number, limit?: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getDealMailMessages', 'id', id)
+ const localVarPath = `/deals/{id}/mailMessages`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["mail:read", "mail:full"], configuration)
+
+ if (start !== undefined) {
+ localVarQueryParameter['start'] = start;
+ }
+
+ if (limit !== undefined) {
+ localVarQueryParameter['limit'] = limit;
+ }
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Lists the participants associated with a deal.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
+ * @summary List participants of a deal
+ * @param {number} id The ID of the deal
+ * @param {number} [start] Pagination start
+ * @param {number} [limit] Items shown per page
+
+ * @throws {RequiredError}
+ */
+ getDealParticipants: async (id: number, start?: number, limit?: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getDealParticipants', 'id', id)
+ const localVarPath = `/deals/{id}/participants`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration)
+
+ if (start !== undefined) {
+ localVarQueryParameter['start'] = start;
+ }
+
+ if (limit !== undefined) {
+ localVarQueryParameter['limit'] = limit;
+ }
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Lists all persons associated with a deal, regardless of whether the person is the primary contact of the deal, or added as a participant.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
+ * @summary List all persons associated with a deal
+ * @param {number} id The ID of the deal
+ * @param {number} [start] Pagination start
+ * @param {number} [limit] Items shown per page
+
+ * @throws {RequiredError}
+ */
+ getDealPersons: async (id: number, start?: number, limit?: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getDealPersons', 'id', id)
+ const localVarPath = `/deals/{id}/persons`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full"], configuration)
+
+ if (start !== undefined) {
+ localVarQueryParameter['start'] = start;
+ }
+
+ if (limit !== undefined) {
+ localVarQueryParameter['limit'] = limit;
+ }
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Lists products attached to a deal.
+ * @summary List products attached to a deal
+ * @param {number} id The ID of the deal
+ * @param {number} [start] Pagination start
+ * @param {number} [limit] Items shown per page
+ * @param {0 | 1} [include_product_data] Whether to fetch product data along with each attached product (1) or not (0, default)
+
+ * @throws {RequiredError}
+ */
+ getDealProducts: async (id: number, start?: number, limit?: number, include_product_data?: 0 | 1, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getDealProducts', 'id', id)
+ const localVarPath = `/deals/{id}/products`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:read", "products:full"], configuration)
+
+ if (start !== undefined) {
+ localVarQueryParameter['start'] = start;
+ }
+
+ if (limit !== undefined) {
+ localVarQueryParameter['limit'] = limit;
+ }
+
+ if (include_product_data !== undefined) {
+ localVarQueryParameter['include_product_data'] = include_product_data;
+ }
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Lists updates about a deal.
+ * @summary List updates about a deal
+ * @param {number} id The ID of the deal
+ * @param {number} [start] Pagination start
+ * @param {number} [limit] Items shown per page
+ * @param {string} [all_changes] Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates.
+ * @param {string} [items] A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change).
+
+ * @throws {RequiredError}
+ */
+ getDealUpdates: async (id: number, start?: number, limit?: number, all_changes?: string, items?: string, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getDealUpdates', 'id', id)
+ const localVarPath = `/deals/{id}/flow`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["recents:read"], configuration)
+
+ if (start !== undefined) {
+ localVarQueryParameter['start'] = start;
+ }
+
+ if (limit !== undefined) {
+ localVarQueryParameter['limit'] = limit;
+ }
+
+ if (all_changes !== undefined) {
+ localVarQueryParameter['all_changes'] = all_changes;
+ }
+
+ if (items !== undefined) {
+ localVarQueryParameter['items'] = items;
+ }
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Lists the users permitted to access a deal.
+ * @summary List permitted users
+ * @param {number} id The ID of the deal
+
+ * @throws {RequiredError}
+ */
+ getDealUsers: async (id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getDealUsers', 'id', id)
+ const localVarPath = `/deals/{id}/permittedUsers`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Returns all deals. For more information, see the tutorial for getting all deals.
+ * @summary Get all deals
+ * @param {number} [user_id] If supplied, only deals matching the given user will be returned. However, `filter_id` and `owned_by_you` takes precedence over `user_id` when supplied.
+ * @param {number} [filter_id] The ID of the filter to use
+ * @param {number} [stage_id] If supplied, only deals within the given stage will be returned
+ * @param {'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
+ * @param {number} [start] Pagination start
+ * @param {number} [limit] Items shown per page
+ * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys).
+ * @param {0 | 1} [owned_by_you] When supplied, only deals owned by you are returned. However, `filter_id` takes precedence over `owned_by_you` when both are supplied.
+
+ * @throws {RequiredError}
+ */
+ getDeals: async (user_id?: number, filter_id?: number, stage_id?: number, status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted', start?: number, limit?: number, sort?: string, owned_by_you?: 0 | 1, ): Promise => {
+ const localVarPath = `/deals`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration)
+
+ if (user_id !== undefined) {
+ localVarQueryParameter['user_id'] = user_id;
+ }
+
+ if (filter_id !== undefined) {
+ localVarQueryParameter['filter_id'] = filter_id;
+ }
+
+ if (stage_id !== undefined) {
+ localVarQueryParameter['stage_id'] = stage_id;
+ }
+
+ if (status !== undefined) {
+ localVarQueryParameter['status'] = status;
+ }
+
+ if (start !== undefined) {
+ localVarQueryParameter['start'] = start;
+ }
+
+ if (limit !== undefined) {
+ localVarQueryParameter['limit'] = limit;
+ }
+
+ if (sort !== undefined) {
+ localVarQueryParameter['sort'] = sort;
+ }
+
+ if (owned_by_you !== undefined) {
+ localVarQueryParameter['owned_by_you'] = owned_by_you;
+ }
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Returns all deals. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here.
+ * @summary Get all deals (BETA)
+ * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
+ * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
+ * @param {string} [since] The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
+ * @param {string} [until] The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
+ * @param {number} [user_id] If supplied, only deals matching the given user will be returned
+ * @param {number} [stage_id] If supplied, only deals within the given stage will be returned
+ * @param {'open' | 'won' | 'lost' | 'deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
+
+ * @throws {RequiredError}
+ */
+ getDealsCollection: async (cursor?: string, limit?: number, since?: string, until?: string, user_id?: number, stage_id?: number, status?: 'open' | 'won' | 'lost' | 'deleted', ): Promise => {
+ const localVarPath = `/deals/collection`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration)
+
+ if (cursor !== undefined) {
+ localVarQueryParameter['cursor'] = cursor;
+ }
+
+ if (limit !== undefined) {
+ localVarQueryParameter['limit'] = limit;
+ }
+
+ if (since !== undefined) {
+ localVarQueryParameter['since'] = since;
+ }
+
+ if (until !== undefined) {
+ localVarQueryParameter['until'] = until;
+ }
+
+ if (user_id !== undefined) {
+ localVarQueryParameter['user_id'] = user_id;
+ }
+
+ if (stage_id !== undefined) {
+ localVarQueryParameter['stage_id'] = stage_id;
+ }
+
+ if (status !== undefined) {
+ localVarQueryParameter['status'] = status;
+ }
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Returns a summary of all the deals.
+ * @summary Get deals summary
+ * @param {'open' | 'won' | 'lost'} [status] Only fetch deals with a specific status. open = Open, won = Won, lost = Lost.
+ * @param {number} [filter_id] <code>user_id</code> will not be considered. Only deals matching the given filter will be returned.
+ * @param {number} [user_id] Only deals matching the given user will be returned. `user_id` will not be considered if you use `filter_id`.
+ * @param {number} [stage_id] Only deals within the given stage will be returned
+
+ * @throws {RequiredError}
+ */
+ getDealsSummary: async (status?: 'open' | 'won' | 'lost', filter_id?: number, user_id?: number, stage_id?: number, ): Promise => {
+ const localVarPath = `/deals/summary`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration)
+
+ if (status !== undefined) {
+ localVarQueryParameter['status'] = status;
+ }
+
+ if (filter_id !== undefined) {
+ localVarQueryParameter['filter_id'] = filter_id;
+ }
+
+ if (user_id !== undefined) {
+ localVarQueryParameter['user_id'] = user_id;
+ }
+
+ if (stage_id !== undefined) {
+ localVarQueryParameter['stage_id'] = stage_id;
+ }
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Returns open and won deals, grouped by a defined interval of time set in a date-type dealField (`field_key`) — e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2012, deals are returned grouped into 3 groups — January, February and March — based on the value of the given `field_key`.
+ * @summary Get deals timeline
+ * @param {string} start_date The date when the first interval starts. Format: YYYY-MM-DD.
+ * @param {'day' | 'week' | 'month' | 'quarter'} interval The type of the interval<table><tr><th>Value</th><th>Description</th></tr><tr><td>`day`</td><td>Day</td></tr><tr><td>`week`</td><td>A full week (7 days) starting from `start_date`</td></tr><tr><td>`month`</td><td>A full month (depending on the number of days in given month) starting from `start_date`</td></tr><tr><td>`quarter`</td><td>A full quarter (3 months) starting from `start_date`</td></tr></table>
+ * @param {number} amount The number of given intervals, starting from `start_date`, to fetch. E.g. 3 (months).
+ * @param {string} field_key The date field key which deals will be retrieved from
+ * @param {number} [user_id] If supplied, only deals matching the given user will be returned
+ * @param {number} [pipeline_id] If supplied, only deals matching the given pipeline will be returned
+ * @param {number} [filter_id] If supplied, only deals matching the given filter will be returned
+ * @param {0 | 1} [exclude_deals] Whether to exclude deals list (1) or not (0). Note that when deals are excluded, the timeline summary (counts and values) is still returned.
+ * @param {string} [totals_convert_currency] The 3-letter currency code of any of the supported currencies. When supplied, `totals_converted` is returned per each interval which contains the currency-converted total amounts in the given currency. You may also set this parameter to `default_currency` in which case the user\'s default currency is used.
+
+ * @throws {RequiredError}
+ */
+ getDealsTimeline: async (start_date: string, interval: 'day' | 'week' | 'month' | 'quarter', amount: number, field_key: string, user_id?: number, pipeline_id?: number, filter_id?: number, exclude_deals?: 0 | 1, totals_convert_currency?: string, ): Promise => {
+ // verify required parameter 'start_date' is not null or undefined
+ assertParamExists('getDealsTimeline', 'start_date', start_date)
+ // verify required parameter 'interval' is not null or undefined
+ assertParamExists('getDealsTimeline', 'interval', interval)
+ // verify required parameter 'amount' is not null or undefined
+ assertParamExists('getDealsTimeline', 'amount', amount)
+ // verify required parameter 'field_key' is not null or undefined
+ assertParamExists('getDealsTimeline', 'field_key', field_key)
+ const localVarPath = `/deals/timeline`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full"], configuration)
+
+ if (start_date !== undefined) {
+ localVarQueryParameter['start_date'] = (start_date as any instanceof Date) ?
+ (start_date as any).toISOString().substr(0,10) :
+ start_date;
+ }
+
+ if (interval !== undefined) {
+ localVarQueryParameter['interval'] = interval;
+ }
+
+ if (amount !== undefined) {
+ localVarQueryParameter['amount'] = amount;
+ }
+
+ if (field_key !== undefined) {
+ localVarQueryParameter['field_key'] = field_key;
+ }
+
+ if (user_id !== undefined) {
+ localVarQueryParameter['user_id'] = user_id;
+ }
+
+ if (pipeline_id !== undefined) {
+ localVarQueryParameter['pipeline_id'] = pipeline_id;
+ }
+
+ if (filter_id !== undefined) {
+ localVarQueryParameter['filter_id'] = filter_id;
+ }
+
+ if (exclude_deals !== undefined) {
+ localVarQueryParameter['exclude_deals'] = exclude_deals;
+ }
+
+ if (totals_convert_currency !== undefined) {
+ localVarQueryParameter['totals_convert_currency'] = totals_convert_currency;
+ }
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Merges a deal with another deal. For more information, see the tutorial for merging two deals.
+ * @summary Merge two deals
+ * @param {number} id The ID of the deal
+ * @param {MergeDealsRequest} [MergeDealsRequest]
+
+ * @throws {RequiredError}
+ */
+ mergeDeals: async (id: number, MergeDealsRequest?: MergeDealsRequest, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('mergeDeals', 'id', id)
+ const localVarPath = `/deals/{id}/merge`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration)
+
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = serializeDataIfNeeded(MergeDealsRequest, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Searches all deals by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found deals can be filtered by the person ID and the organization ID.
+ * @summary Search deals
+ * @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
+ * @param {'custom_fields' | 'notes' | 'title'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
+ * @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
+ * @param {number} [person_id] Will filter deals by the provided person ID. The upper limit of found deals associated with the person is 2000.
+ * @param {number} [organization_id] Will filter deals by the provided organization ID. The upper limit of found deals associated with the organization is 2000.
+ * @param {'open' | 'won' | 'lost'} [status] Will filter deals by the provided specific status. open = Open, won = Won, lost = Lost. The upper limit of found deals associated with the status is 2000.
+ * @param {'deal.cc_email'} [include_fields] Supports including optional fields in the results which are not provided by default
+ * @param {number} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter.
+ * @param {number} [limit] Items shown per page
+
+ * @throws {RequiredError}
+ */
+ searchDeals: async (term: string, fields?: 'custom_fields' | 'notes' | 'title', exact_match?: boolean, person_id?: number, organization_id?: number, status?: 'open' | 'won' | 'lost', include_fields?: 'deal.cc_email', start?: number, limit?: number, ): Promise => {
+ // verify required parameter 'term' is not null or undefined
+ assertParamExists('searchDeals', 'term', term)
+ const localVarPath = `/deals/search`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full", "search:read"], configuration)
+
+ if (term !== undefined) {
+ localVarQueryParameter['term'] = term;
+ }
+
+ if (fields !== undefined) {
+ localVarQueryParameter['fields'] = fields;
+ }
+
+ if (exact_match !== undefined) {
+ localVarQueryParameter['exact_match'] = exact_match;
+ }
+
+ if (person_id !== undefined) {
+ localVarQueryParameter['person_id'] = person_id;
+ }
+
+ if (organization_id !== undefined) {
+ localVarQueryParameter['organization_id'] = organization_id;
+ }
+
+ if (status !== undefined) {
+ localVarQueryParameter['status'] = status;
+ }
+
+ if (include_fields !== undefined) {
+ localVarQueryParameter['include_fields'] = include_fields;
+ }
+
+ if (start !== undefined) {
+ localVarQueryParameter['start'] = start;
+ }
+
+ if (limit !== undefined) {
+ localVarQueryParameter['limit'] = limit;
+ }
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Updates the properties of a deal. For more information, see the tutorial for updating a deal.
+ * @summary Update a deal
+ * @param {number} id The ID of the deal
+ * @param {UpdateDealRequest} [UpdateDealRequest]
+
+ * @throws {RequiredError}
+ */
+ updateDeal: async (id: number, UpdateDealRequest?: UpdateDealRequest, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('updateDeal', 'id', id)
+ const localVarPath = `/deals/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration)
+
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = serializeDataIfNeeded(UpdateDealRequest, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Updates the details of the product that has been attached to a deal.
+ * @summary Update the product attached to a deal
+ * @param {number} id The ID of the deal
+ * @param {number} product_attachment_id The ID of the deal-product (the ID of the product attached to the deal)
+ * @param {UpdateDealProductRequest} [UpdateDealProductRequest]
+
+ * @throws {RequiredError}
+ */
+ updateDealProduct: async (id: number, product_attachment_id: number, UpdateDealProductRequest?: UpdateDealProductRequest, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('updateDealProduct', 'id', id)
+ // verify required parameter 'product_attachment_id' is not null or undefined
+ assertParamExists('updateDealProduct', 'product_attachment_id', product_attachment_id)
+ const localVarPath = `/deals/{id}/products/{product_attachment_id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
+ .replace(`{${"product_attachment_id"}}`, encodeURIComponent(String(product_attachment_id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full"], configuration)
+
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = serializeDataIfNeeded(UpdateDealProductRequest, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ }
+};
+
+/**
+ * DealsApi - functional programming interface
+ * @export
+ */
+export const DealsApiFp = function(configuration?: Configuration) {
+
+ /**
+ * Axios interceptor to add the SDK version as a User-Agent header
+ * */
+ globalAxios.interceptors.request.use(function (config) {
+ const version = require("../../package.json").version;
+ config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
+ return config;
+ });
+
+ /**
+ * Axios response interceptor to modify response structure
+ */
+ globalAxios.interceptors.response.use(function (response) {
+ return response.hasOwnProperty('success') ? response : response.data;
+ }, function (error) {
+ if(error?.response?.data) {
+ return Promise.reject(error.response.data);
+ }
+ return Promise.reject(error);
+ });
+ const localVarAxiosParamCreator = DealsApiAxiosParamCreator(configuration)
+ return {
+ /**
+ * Adds a new deal. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for `key` values. For more information, see the tutorial for adding a deal.
+ * @summary Add a deal
+ * @param {AddDealRequest} [AddDealRequest]
+
+ * @throws {RequiredError}
+ */
+ async addDeal(AddDealRequest?: AddDealRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addDeal(AddDealRequest, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Adds a follower to a deal.
+ * @summary Add a follower to a deal
+ * @param {number} id The ID of the deal
+ * @param {AddDealFollowerRequest} [AddDealFollowerRequest]
+
+ * @throws {RequiredError}
+ */
+ async addDealFollower(id: number, AddDealFollowerRequest?: AddDealFollowerRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addDealFollower(id, AddDealFollowerRequest, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Adds a participant to a deal.
+ * @summary Add a participant to a deal
+ * @param {number} id The ID of the deal
+ * @param {AddDealParticipantRequest} [AddDealParticipantRequest]
+
+ * @throws {RequiredError}
+ */
+ async addDealParticipant(id: number, AddDealParticipantRequest?: AddDealParticipantRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addDealParticipant(id, AddDealParticipantRequest, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Adds a product to a deal, creating a new item called a deal-product.
+ * @summary Add a product to a deal
+ * @param {number} id The ID of the deal
+ * @param {AddDealProductRequest} [AddDealProductRequest]
+
+ * @throws {RequiredError}
+ */
+ async addDealProduct(id: number, AddDealProductRequest?: AddDealProductRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addDealProduct(id, AddDealProductRequest, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Marks a deal as deleted. After 30 days, the deal will be permanently deleted.
+ * @summary Delete a deal
+ * @param {number} id The ID of the deal
+
+ * @throws {RequiredError}
+ */
+ async deleteDeal(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDeal(id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Deletes a follower from a deal.
+ * @summary Delete a follower from a deal
+ * @param {number} id The ID of the deal
+ * @param {number} follower_id The ID of the follower
+
+ * @throws {RequiredError}
+ */
+ async deleteDealFollower(id: number, follower_id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDealFollower(id, follower_id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Deletes a participant from a deal.
+ * @summary Delete a participant from a deal
+ * @param {number} id The ID of the deal
+ * @param {number} deal_participant_id The ID of the participant of the deal
+
+ * @throws {RequiredError}
+ */
+ async deleteDealParticipant(id: number, deal_participant_id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDealParticipant(id, deal_participant_id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Deletes a product attachment from a deal, using the `product_attachment_id`.
+ * @summary Delete an attached product from a deal
+ * @param {number} id The ID of the deal
+ * @param {number} product_attachment_id The product attachment ID
+
+ * @throws {RequiredError}
+ */
+ async deleteDealProduct(id: number, product_attachment_id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDealProduct(id, product_attachment_id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Marks multiple deals as deleted. After 30 days, the deals will be permanently deleted.
+ * @summary Delete multiple deals in bulk
+ * @param {string} ids The comma-separated IDs that will be deleted
+
+ * @throws {RequiredError}
+ */
+ async deleteDeals(ids: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDeals(ids, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Duplicates a deal.
+ * @summary Duplicate deal
+ * @param {number} id The ID of the deal
+
+ * @throws {RequiredError}
+ */
+ async duplicateDeal(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.duplicateDeal(id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Returns the details of a specific deal. Note that this also returns some additional fields which are not present when asking for all deals – such as deal age and stay in pipeline stages. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of dealFields. For more information, see the tutorial for getting details of a deal.
+ * @summary Get details of a deal
+ * @param {number} id The ID of the deal
+
+ * @throws {RequiredError}
+ */
+ async getDeal(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDeal(id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Lists activities associated with a deal.
+ * @summary List activities associated with a deal
+ * @param {number} id The ID of the deal
+ * @param {number} [start] Pagination start
+ * @param {number} [limit] Items shown per page
+ * @param {0 | 1} [done] Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted, returns both Done and Not done activities.
+ * @param {string} [exclude] A comma-separated string of activity IDs to exclude from result
+
+ * @throws {RequiredError}
+ */
+ async getDealActivities(id: number, start?: number, limit?: number, done?: 0 | 1, exclude?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDealActivities(id, start, limit, done, exclude, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Lists files associated with a deal.
+ * @summary List files attached to a deal
+ * @param {number} id The ID of the deal
+ * @param {number} [start] Pagination start
+ * @param {number} [limit] Items shown per page
+ * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `product_id`, `add_time`, `update_time`, `file_name`, `file_type`, `file_size`, `comment`.
+
+ * @throws {RequiredError}
+ */
+ async getDealFiles(id: number, start?: number, limit?: number, sort?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDealFiles(id, start, limit, sort, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Lists the followers of a deal.
+ * @summary List followers of a deal
+ * @param {number} id The ID of the deal
+
+ * @throws {RequiredError}
+ */
+ async getDealFollowers(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDealFollowers(id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Lists mail messages associated with a deal.
+ * @summary List mail messages associated with a deal
+ * @param {number} id The ID of the deal
+ * @param {number} [start] Pagination start
+ * @param {number} [limit] Items shown per page
+
+ * @throws {RequiredError}
+ */
+ async getDealMailMessages(id: number, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDealMailMessages(id, start, limit, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Lists the participants associated with a deal.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
+ * @summary List participants of a deal
+ * @param {number} id The ID of the deal
+ * @param {number} [start] Pagination start
+ * @param {number} [limit] Items shown per page
+
+ * @throws {RequiredError}
+ */
+ async getDealParticipants(id: number, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDealParticipants(id, start, limit, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Lists all persons associated with a deal, regardless of whether the person is the primary contact of the deal, or added as a participant.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
+ * @summary List all persons associated with a deal
+ * @param {number} id The ID of the deal
+ * @param {number} [start] Pagination start
+ * @param {number} [limit] Items shown per page
+
+ * @throws {RequiredError}
+ */
+ async getDealPersons(id: number, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDealPersons(id, start, limit, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Lists products attached to a deal.
+ * @summary List products attached to a deal
+ * @param {number} id The ID of the deal
+ * @param {number} [start] Pagination start
+ * @param {number} [limit] Items shown per page
+ * @param {0 | 1} [include_product_data] Whether to fetch product data along with each attached product (1) or not (0, default)
+
+ * @throws {RequiredError}
+ */
+ async getDealProducts(id: number, start?: number, limit?: number, include_product_data?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDealProducts(id, start, limit, include_product_data, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Lists updates about a deal.
+ * @summary List updates about a deal
+ * @param {number} id The ID of the deal
+ * @param {number} [start] Pagination start
+ * @param {number} [limit] Items shown per page
+ * @param {string} [all_changes] Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates.
+ * @param {string} [items] A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change).
+
+ * @throws {RequiredError}
+ */
+ async getDealUpdates(id: number, start?: number, limit?: number, all_changes?: string, items?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDealUpdates(id, start, limit, all_changes, items, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Lists the users permitted to access a deal.
+ * @summary List permitted users
+ * @param {number} id The ID of the deal
+
+ * @throws {RequiredError}
+ */
+ async getDealUsers(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDealUsers(id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Returns all deals. For more information, see the tutorial for getting all deals.
+ * @summary Get all deals
+ * @param {number} [user_id] If supplied, only deals matching the given user will be returned. However, `filter_id` and `owned_by_you` takes precedence over `user_id` when supplied.
+ * @param {number} [filter_id] The ID of the filter to use
+ * @param {number} [stage_id] If supplied, only deals within the given stage will be returned
+ * @param {'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
+ * @param {number} [start] Pagination start
+ * @param {number} [limit] Items shown per page
+ * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys).
+ * @param {0 | 1} [owned_by_you] When supplied, only deals owned by you are returned. However, `filter_id` takes precedence over `owned_by_you` when both are supplied.
+
+ * @throws {RequiredError}
+ */
+ async getDeals(user_id?: number, filter_id?: number, stage_id?: number, status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted', start?: number, limit?: number, sort?: string, owned_by_you?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDeals(user_id, filter_id, stage_id, status, start, limit, sort, owned_by_you, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Returns all deals. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here.
+ * @summary Get all deals (BETA)
+ * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
+ * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
+ * @param {string} [since] The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
+ * @param {string} [until] The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
+ * @param {number} [user_id] If supplied, only deals matching the given user will be returned
+ * @param {number} [stage_id] If supplied, only deals within the given stage will be returned
+ * @param {'open' | 'won' | 'lost' | 'deleted'} [status] Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
+
+ * @throws {RequiredError}
+ */
+ async getDealsCollection(cursor?: string, limit?: number, since?: string, until?: string, user_id?: number, stage_id?: number, status?: 'open' | 'won' | 'lost' | 'deleted', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDealsCollection(cursor, limit, since, until, user_id, stage_id, status, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Returns a summary of all the deals.
+ * @summary Get deals summary
+ * @param {'open' | 'won' | 'lost'} [status] Only fetch deals with a specific status. open = Open, won = Won, lost = Lost.
+ * @param {number} [filter_id] <code>user_id</code> will not be considered. Only deals matching the given filter will be returned.
+ * @param {number} [user_id] Only deals matching the given user will be returned. `user_id` will not be considered if you use `filter_id`.
+ * @param {number} [stage_id] Only deals within the given stage will be returned
+
+ * @throws {RequiredError}
+ */
+ async getDealsSummary(status?: 'open' | 'won' | 'lost', filter_id?: number, user_id?: number, stage_id?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDealsSummary(status, filter_id, user_id, stage_id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Returns open and won deals, grouped by a defined interval of time set in a date-type dealField (`field_key`) — e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2012, deals are returned grouped into 3 groups — January, February and March — based on the value of the given `field_key`.
+ * @summary Get deals timeline
+ * @param {string} start_date The date when the first interval starts. Format: YYYY-MM-DD.
+ * @param {'day' | 'week' | 'month' | 'quarter'} interval The type of the interval<table><tr><th>Value</th><th>Description</th></tr><tr><td>`day`</td><td>Day</td></tr><tr><td>`week`</td><td>A full week (7 days) starting from `start_date`</td></tr><tr><td>`month`</td><td>A full month (depending on the number of days in given month) starting from `start_date`</td></tr><tr><td>`quarter`</td><td>A full quarter (3 months) starting from `start_date`</td></tr></table>
+ * @param {number} amount The number of given intervals, starting from `start_date`, to fetch. E.g. 3 (months).
+ * @param {string} field_key The date field key which deals will be retrieved from
+ * @param {number} [user_id] If supplied, only deals matching the given user will be returned
+ * @param {number} [pipeline_id] If supplied, only deals matching the given pipeline will be returned
+ * @param {number} [filter_id] If supplied, only deals matching the given filter will be returned
+ * @param {0 | 1} [exclude_deals] Whether to exclude deals list (1) or not (0). Note that when deals are excluded, the timeline summary (counts and values) is still returned.
+ * @param {string} [totals_convert_currency] The 3-letter currency code of any of the supported currencies. When supplied, `totals_converted` is returned per each interval which contains the currency-converted total amounts in the given currency. You may also set this parameter to `default_currency` in which case the user\'s default currency is used.
+
+ * @throws {RequiredError}
+ */
+ async getDealsTimeline(start_date: string, interval: 'day' | 'week' | 'month' | 'quarter', amount: number, field_key: string, user_id?: number, pipeline_id?: number, filter_id?: number, exclude_deals?: 0 | 1, totals_convert_currency?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDealsTimeline(start_date, interval, amount, field_key, user_id, pipeline_id, filter_id, exclude_deals, totals_convert_currency, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Merges a deal with another deal. For more information, see the tutorial for merging two deals.
+ * @summary Merge two deals
+ * @param {number} id The ID of the deal
+ * @param {MergeDealsRequest} [MergeDealsRequest]
+
+ * @throws {RequiredError}
+ */
+ async mergeDeals(id: number, MergeDealsRequest?: MergeDealsRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.mergeDeals(id, MergeDealsRequest, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Searches all deals by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found deals can be filtered by the person ID and the organization ID.
+ * @summary Search deals
+ * @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
+ * @param {'custom_fields' | 'notes' | 'title'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
+ * @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
+ * @param {number} [person_id] Will filter deals by the provided person ID. The upper limit of found deals associated with the person is 2000.
+ * @param {number} [organization_id] Will filter deals by the provided organization ID. The upper limit of found deals associated with the organization is 2000.
+ * @param {'open' | 'won' | 'lost'} [status] Will filter deals by the provided specific status. open = Open, won = Won, lost = Lost. The upper limit of found deals associated with the status is 2000.
+ * @param {'deal.cc_email'} [include_fields] Supports including optional fields in the results which are not provided by default
+ * @param {number} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter.
+ * @param {number} [limit] Items shown per page
+
+ * @throws {RequiredError}
+ */
+ async searchDeals(term: string, fields?: 'custom_fields' | 'notes' | 'title', exact_match?: boolean, person_id?: number, organization_id?: number, status?: 'open' | 'won' | 'lost', include_fields?: 'deal.cc_email', start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.searchDeals(term, fields, exact_match, person_id, organization_id, status, include_fields, start, limit, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Updates the properties of a deal. For more information, see the tutorial for updating a deal.
+ * @summary Update a deal
+ * @param {number} id The ID of the deal
+ * @param {UpdateDealRequest} [UpdateDealRequest]
+
+ * @throws {RequiredError}
+ */
+ async updateDeal(id: number, UpdateDealRequest?: UpdateDealRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateDeal(id, UpdateDealRequest, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Updates the details of the product that has been attached to a deal.
+ * @summary Update the product attached to a deal
+ * @param {number} id The ID of the deal
+ * @param {number} product_attachment_id The ID of the deal-product (the ID of the product attached to the deal)
+ * @param {UpdateDealProductRequest} [UpdateDealProductRequest]
+
+ * @throws {RequiredError}
+ */
+ async updateDealProduct(id: number, product_attachment_id: number, UpdateDealProductRequest?: UpdateDealProductRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateDealProduct(id, product_attachment_id, UpdateDealProductRequest, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ }
+};
+
+/**
+ * DealsApi - factory interface
+ * @export
+ */
+export const DealsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
+ const localVarFp = DealsApiFp(configuration)
+ return {
+ /**
+ * Adds a new deal. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for `key` values. For more information, see the tutorial for adding a deal.
+ * @summary Add a deal
+ * @param {DealsApiAddDealRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ addDeal(requestParameters: DealsApiAddDealRequest = {}, ): Promise {
+ return localVarFp.addDeal(requestParameters.AddDealRequest, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Adds a follower to a deal.
+ * @summary Add a follower to a deal
+ * @param {DealsApiAddDealFollowerRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ addDealFollower(requestParameters: DealsApiAddDealFollowerRequest, ): Promise {
+ return localVarFp.addDealFollower(requestParameters.id, requestParameters.AddDealFollowerRequest, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Adds a participant to a deal.
+ * @summary Add a participant to a deal
+ * @param {DealsApiAddDealParticipantRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ addDealParticipant(requestParameters: DealsApiAddDealParticipantRequest, ): Promise {
+ return localVarFp.addDealParticipant(requestParameters.id, requestParameters.AddDealParticipantRequest, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Adds a product to a deal, creating a new item called a deal-product.
+ * @summary Add a product to a deal
+ * @param {DealsApiAddDealProductRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ addDealProduct(requestParameters: DealsApiAddDealProductRequest, ): Promise {
+ return localVarFp.addDealProduct(requestParameters.id, requestParameters.AddDealProductRequest, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Marks a deal as deleted. After 30 days, the deal will be permanently deleted.
+ * @summary Delete a deal
+ * @param {DealsApiDeleteDealRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ deleteDeal(requestParameters: DealsApiDeleteDealRequest, ): Promise {
+ return localVarFp.deleteDeal(requestParameters.id, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Deletes a follower from a deal.
+ * @summary Delete a follower from a deal
+ * @param {DealsApiDeleteDealFollowerRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ deleteDealFollower(requestParameters: DealsApiDeleteDealFollowerRequest, ): Promise {
+ return localVarFp.deleteDealFollower(requestParameters.id, requestParameters.follower_id, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Deletes a participant from a deal.
+ * @summary Delete a participant from a deal
+ * @param {DealsApiDeleteDealParticipantRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ deleteDealParticipant(requestParameters: DealsApiDeleteDealParticipantRequest, ): Promise {
+ return localVarFp.deleteDealParticipant(requestParameters.id, requestParameters.deal_participant_id, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Deletes a product attachment from a deal, using the `product_attachment_id`.
+ * @summary Delete an attached product from a deal
+ * @param {DealsApiDeleteDealProductRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ deleteDealProduct(requestParameters: DealsApiDeleteDealProductRequest, ): Promise {
+ return localVarFp.deleteDealProduct(requestParameters.id, requestParameters.product_attachment_id, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Marks multiple deals as deleted. After 30 days, the deals will be permanently deleted.
+ * @summary Delete multiple deals in bulk
+ * @param {DealsApiDeleteDealsRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ deleteDeals(requestParameters: DealsApiDeleteDealsRequest, ): Promise {
+ return localVarFp.deleteDeals(requestParameters.ids, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Duplicates a deal.
+ * @summary Duplicate deal
+ * @param {DealsApiDuplicateDealRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ duplicateDeal(requestParameters: DealsApiDuplicateDealRequest, ): Promise {
+ return localVarFp.duplicateDeal(requestParameters.id, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Returns the details of a specific deal. Note that this also returns some additional fields which are not present when asking for all deals – such as deal age and stay in pipeline stages. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of dealFields. For more information, see the tutorial for getting details of a deal.
+ * @summary Get details of a deal
+ * @param {DealsApiGetDealRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getDeal(requestParameters: DealsApiGetDealRequest, ): Promise {
+ return localVarFp.getDeal(requestParameters.id, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Lists activities associated with a deal.
+ * @summary List activities associated with a deal
+ * @param {DealsApiGetDealActivitiesRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getDealActivities(requestParameters: DealsApiGetDealActivitiesRequest, ): Promise {
+ return localVarFp.getDealActivities(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.done, requestParameters.exclude, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Lists files associated with a deal.
+ * @summary List files attached to a deal
+ * @param {DealsApiGetDealFilesRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getDealFiles(requestParameters: DealsApiGetDealFilesRequest, ): Promise {
+ return localVarFp.getDealFiles(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.sort, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Lists the followers of a deal.
+ * @summary List followers of a deal
+ * @param {DealsApiGetDealFollowersRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getDealFollowers(requestParameters: DealsApiGetDealFollowersRequest, ): Promise {
+ return localVarFp.getDealFollowers(requestParameters.id, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Lists mail messages associated with a deal.
+ * @summary List mail messages associated with a deal
+ * @param {DealsApiGetDealMailMessagesRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getDealMailMessages(requestParameters: DealsApiGetDealMailMessagesRequest, ): Promise {
+ return localVarFp.getDealMailMessages(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Lists the participants associated with a deal.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
+ * @summary List participants of a deal
+ * @param {DealsApiGetDealParticipantsRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getDealParticipants(requestParameters: DealsApiGetDealParticipantsRequest, ): Promise {
+ return localVarFp.getDealParticipants(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Lists all persons associated with a deal, regardless of whether the person is the primary contact of the deal, or added as a participant.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
+ * @summary List all persons associated with a deal
+ * @param {DealsApiGetDealPersonsRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getDealPersons(requestParameters: DealsApiGetDealPersonsRequest, ): Promise {
+ return localVarFp.getDealPersons(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Lists products attached to a deal.
+ * @summary List products attached to a deal
+ * @param {DealsApiGetDealProductsRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getDealProducts(requestParameters: DealsApiGetDealProductsRequest, ): Promise {
+ return localVarFp.getDealProducts(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.include_product_data, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Lists updates about a deal.
+ * @summary List updates about a deal
+ * @param {DealsApiGetDealUpdatesRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getDealUpdates(requestParameters: DealsApiGetDealUpdatesRequest, ): Promise {
+ return localVarFp.getDealUpdates(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.all_changes, requestParameters.items, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Lists the users permitted to access a deal.
+ * @summary List permitted users
+ * @param {DealsApiGetDealUsersRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getDealUsers(requestParameters: DealsApiGetDealUsersRequest, ): Promise {
+ return localVarFp.getDealUsers(requestParameters.id, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Returns all deals. For more information, see the tutorial for getting all deals.
+ * @summary Get all deals
+ * @param {DealsApiGetDealsRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getDeals(requestParameters: DealsApiGetDealsRequest = {}, ): Promise {
+ return localVarFp.getDeals(requestParameters.user_id, requestParameters.filter_id, requestParameters.stage_id, requestParameters.status, requestParameters.start, requestParameters.limit, requestParameters.sort, requestParameters.owned_by_you, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Returns all deals. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here.
+ * @summary Get all deals (BETA)
+ * @param {DealsApiGetDealsCollectionRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getDealsCollection(requestParameters: DealsApiGetDealsCollectionRequest = {}, ): Promise {
+ return localVarFp.getDealsCollection(requestParameters.cursor, requestParameters.limit, requestParameters.since, requestParameters.until, requestParameters.user_id, requestParameters.stage_id, requestParameters.status, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Returns a summary of all the deals.
+ * @summary Get deals summary
+ * @param {DealsApiGetDealsSummaryRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getDealsSummary(requestParameters: DealsApiGetDealsSummaryRequest = {}, ): Promise {
+ return localVarFp.getDealsSummary(requestParameters.status, requestParameters.filter_id, requestParameters.user_id, requestParameters.stage_id, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Returns open and won deals, grouped by a defined interval of time set in a date-type dealField (`field_key`) — e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2012, deals are returned grouped into 3 groups — January, February and March — based on the value of the given `field_key`.
+ * @summary Get deals timeline
+ * @param {DealsApiGetDealsTimelineRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getDealsTimeline(requestParameters: DealsApiGetDealsTimelineRequest, ): Promise {
+ return localVarFp.getDealsTimeline(requestParameters.start_date, requestParameters.interval, requestParameters.amount, requestParameters.field_key, requestParameters.user_id, requestParameters.pipeline_id, requestParameters.filter_id, requestParameters.exclude_deals, requestParameters.totals_convert_currency, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Merges a deal with another deal. For more information, see the tutorial for merging two deals.
+ * @summary Merge two deals
+ * @param {DealsApiMergeDealsRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ mergeDeals(requestParameters: DealsApiMergeDealsRequest, ): Promise {
+ return localVarFp.mergeDeals(requestParameters.id, requestParameters.MergeDealsRequest, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Searches all deals by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found deals can be filtered by the person ID and the organization ID.
+ * @summary Search deals
+ * @param {DealsApiSearchDealsRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ searchDeals(requestParameters: DealsApiSearchDealsRequest, ): Promise {
+ return localVarFp.searchDeals(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.person_id, requestParameters.organization_id, requestParameters.status, requestParameters.include_fields, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Updates the properties of a deal. For more information, see the tutorial for updating a deal.
+ * @summary Update a deal
+ * @param {DealsApiUpdateDealRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ updateDeal(requestParameters: DealsApiUpdateDealRequest, ): Promise {
+ return localVarFp.updateDeal(requestParameters.id, requestParameters.UpdateDealRequest, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Updates the details of the product that has been attached to a deal.
+ * @summary Update the product attached to a deal
+ * @param {DealsApiUpdateDealProductRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ updateDealProduct(requestParameters: DealsApiUpdateDealProductRequest, ): Promise {
+ return localVarFp.updateDealProduct(requestParameters.id, requestParameters.product_attachment_id, requestParameters.UpdateDealProductRequest, ).then((request) => request(axios, basePath));
+ },
+ };
+};
+
+/**
+ * Request parameters for addDeal operation in DealsApi.
+ * @export
+ * @interface DealsApiAddDealRequest
+ */
+export interface DealsApiAddDealRequest {
+ /**
+ *
+ * @type {AddDealRequest}
+ * @memberof DealsApiAddDeal
+ */
+ readonly AddDealRequest?: AddDealRequest
+}
+
+/**
+ * Request parameters for addDealFollower operation in DealsApi.
+ * @export
+ * @interface DealsApiAddDealFollowerRequest
+ */
+export interface DealsApiAddDealFollowerRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiAddDealFollower
+ */
+ readonly id: number
+
+ /**
+ *
+ * @type {AddDealFollowerRequest}
+ * @memberof DealsApiAddDealFollower
+ */
+ readonly AddDealFollowerRequest?: AddDealFollowerRequest
+}
+
+/**
+ * Request parameters for addDealParticipant operation in DealsApi.
+ * @export
+ * @interface DealsApiAddDealParticipantRequest
+ */
+export interface DealsApiAddDealParticipantRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiAddDealParticipant
+ */
+ readonly id: number
+
+ /**
+ *
+ * @type {AddDealParticipantRequest}
+ * @memberof DealsApiAddDealParticipant
+ */
+ readonly AddDealParticipantRequest?: AddDealParticipantRequest
+}
+
+/**
+ * Request parameters for addDealProduct operation in DealsApi.
+ * @export
+ * @interface DealsApiAddDealProductRequest
+ */
+export interface DealsApiAddDealProductRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiAddDealProduct
+ */
+ readonly id: number
+
+ /**
+ *
+ * @type {AddDealProductRequest}
+ * @memberof DealsApiAddDealProduct
+ */
+ readonly AddDealProductRequest?: AddDealProductRequest
+}
+
+/**
+ * Request parameters for deleteDeal operation in DealsApi.
+ * @export
+ * @interface DealsApiDeleteDealRequest
+ */
+export interface DealsApiDeleteDealRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiDeleteDeal
+ */
+ readonly id: number
+}
+
+/**
+ * Request parameters for deleteDealFollower operation in DealsApi.
+ * @export
+ * @interface DealsApiDeleteDealFollowerRequest
+ */
+export interface DealsApiDeleteDealFollowerRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiDeleteDealFollower
+ */
+ readonly id: number
+
+ /**
+ * The ID of the follower
+ * @type {number}
+ * @memberof DealsApiDeleteDealFollower
+ */
+ readonly follower_id: number
+}
+
+/**
+ * Request parameters for deleteDealParticipant operation in DealsApi.
+ * @export
+ * @interface DealsApiDeleteDealParticipantRequest
+ */
+export interface DealsApiDeleteDealParticipantRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiDeleteDealParticipant
+ */
+ readonly id: number
+
+ /**
+ * The ID of the participant of the deal
+ * @type {number}
+ * @memberof DealsApiDeleteDealParticipant
+ */
+ readonly deal_participant_id: number
+}
+
+/**
+ * Request parameters for deleteDealProduct operation in DealsApi.
+ * @export
+ * @interface DealsApiDeleteDealProductRequest
+ */
+export interface DealsApiDeleteDealProductRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiDeleteDealProduct
+ */
+ readonly id: number
+
+ /**
+ * The product attachment ID
+ * @type {number}
+ * @memberof DealsApiDeleteDealProduct
+ */
+ readonly product_attachment_id: number
+}
+
+/**
+ * Request parameters for deleteDeals operation in DealsApi.
+ * @export
+ * @interface DealsApiDeleteDealsRequest
+ */
+export interface DealsApiDeleteDealsRequest {
+ /**
+ * The comma-separated IDs that will be deleted
+ * @type {string}
+ * @memberof DealsApiDeleteDeals
+ */
+ readonly ids: string
+}
+
+/**
+ * Request parameters for duplicateDeal operation in DealsApi.
+ * @export
+ * @interface DealsApiDuplicateDealRequest
+ */
+export interface DealsApiDuplicateDealRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiDuplicateDeal
+ */
+ readonly id: number
+}
+
+/**
+ * Request parameters for getDeal operation in DealsApi.
+ * @export
+ * @interface DealsApiGetDealRequest
+ */
+export interface DealsApiGetDealRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiGetDeal
+ */
+ readonly id: number
+}
+
+/**
+ * Request parameters for getDealActivities operation in DealsApi.
+ * @export
+ * @interface DealsApiGetDealActivitiesRequest
+ */
+export interface DealsApiGetDealActivitiesRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiGetDealActivities
+ */
+ readonly id: number
+
+ /**
+ * Pagination start
+ * @type {number}
+ * @memberof DealsApiGetDealActivities
+ */
+ readonly start?: number
+
+ /**
+ * Items shown per page
+ * @type {number}
+ * @memberof DealsApiGetDealActivities
+ */
+ readonly limit?: number
+
+ /**
+ * Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted, returns both Done and Not done activities.
+ * @type {0 | 1}
+ * @memberof DealsApiGetDealActivities
+ */
+ readonly done?: 0 | 1
+
+ /**
+ * A comma-separated string of activity IDs to exclude from result
+ * @type {string}
+ * @memberof DealsApiGetDealActivities
+ */
+ readonly exclude?: string
+}
+
+/**
+ * Request parameters for getDealFiles operation in DealsApi.
+ * @export
+ * @interface DealsApiGetDealFilesRequest
+ */
+export interface DealsApiGetDealFilesRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiGetDealFiles
+ */
+ readonly id: number
+
+ /**
+ * Pagination start
+ * @type {number}
+ * @memberof DealsApiGetDealFiles
+ */
+ readonly start?: number
+
+ /**
+ * Items shown per page
+ * @type {number}
+ * @memberof DealsApiGetDealFiles
+ */
+ readonly limit?: number
+
+ /**
+ * The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `product_id`, `add_time`, `update_time`, `file_name`, `file_type`, `file_size`, `comment`.
+ * @type {string}
+ * @memberof DealsApiGetDealFiles
+ */
+ readonly sort?: string
+}
+
+/**
+ * Request parameters for getDealFollowers operation in DealsApi.
+ * @export
+ * @interface DealsApiGetDealFollowersRequest
+ */
+export interface DealsApiGetDealFollowersRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiGetDealFollowers
+ */
+ readonly id: number
+}
+
+/**
+ * Request parameters for getDealMailMessages operation in DealsApi.
+ * @export
+ * @interface DealsApiGetDealMailMessagesRequest
+ */
+export interface DealsApiGetDealMailMessagesRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiGetDealMailMessages
+ */
+ readonly id: number
+
+ /**
+ * Pagination start
+ * @type {number}
+ * @memberof DealsApiGetDealMailMessages
+ */
+ readonly start?: number
+
+ /**
+ * Items shown per page
+ * @type {number}
+ * @memberof DealsApiGetDealMailMessages
+ */
+ readonly limit?: number
+}
+
+/**
+ * Request parameters for getDealParticipants operation in DealsApi.
+ * @export
+ * @interface DealsApiGetDealParticipantsRequest
+ */
+export interface DealsApiGetDealParticipantsRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiGetDealParticipants
+ */
+ readonly id: number
+
+ /**
+ * Pagination start
+ * @type {number}
+ * @memberof DealsApiGetDealParticipants
+ */
+ readonly start?: number
+
+ /**
+ * Items shown per page
+ * @type {number}
+ * @memberof DealsApiGetDealParticipants
+ */
+ readonly limit?: number
+}
+
+/**
+ * Request parameters for getDealPersons operation in DealsApi.
+ * @export
+ * @interface DealsApiGetDealPersonsRequest
+ */
+export interface DealsApiGetDealPersonsRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiGetDealPersons
+ */
+ readonly id: number
+
+ /**
+ * Pagination start
+ * @type {number}
+ * @memberof DealsApiGetDealPersons
+ */
+ readonly start?: number
+
+ /**
+ * Items shown per page
+ * @type {number}
+ * @memberof DealsApiGetDealPersons
+ */
+ readonly limit?: number
+}
+
+/**
+ * Request parameters for getDealProducts operation in DealsApi.
+ * @export
+ * @interface DealsApiGetDealProductsRequest
+ */
+export interface DealsApiGetDealProductsRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiGetDealProducts
+ */
+ readonly id: number
+
+ /**
+ * Pagination start
+ * @type {number}
+ * @memberof DealsApiGetDealProducts
+ */
+ readonly start?: number
+
+ /**
+ * Items shown per page
+ * @type {number}
+ * @memberof DealsApiGetDealProducts
+ */
+ readonly limit?: number
+
+ /**
+ * Whether to fetch product data along with each attached product (1) or not (0, default)
+ * @type {0 | 1}
+ * @memberof DealsApiGetDealProducts
+ */
+ readonly include_product_data?: 0 | 1
+}
+
+/**
+ * Request parameters for getDealUpdates operation in DealsApi.
+ * @export
+ * @interface DealsApiGetDealUpdatesRequest
+ */
+export interface DealsApiGetDealUpdatesRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiGetDealUpdates
+ */
+ readonly id: number
+
+ /**
+ * Pagination start
+ * @type {number}
+ * @memberof DealsApiGetDealUpdates
+ */
+ readonly start?: number
+
+ /**
+ * Items shown per page
+ * @type {number}
+ * @memberof DealsApiGetDealUpdates
+ */
+ readonly limit?: number
+
+ /**
+ * Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates.
+ * @type {string}
+ * @memberof DealsApiGetDealUpdates
+ */
+ readonly all_changes?: string
+
+ /**
+ * A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change).
+ * @type {string}
+ * @memberof DealsApiGetDealUpdates
+ */
+ readonly items?: string
+}
+
+/**
+ * Request parameters for getDealUsers operation in DealsApi.
+ * @export
+ * @interface DealsApiGetDealUsersRequest
+ */
+export interface DealsApiGetDealUsersRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiGetDealUsers
+ */
+ readonly id: number
+}
+
+/**
+ * Request parameters for getDeals operation in DealsApi.
+ * @export
+ * @interface DealsApiGetDealsRequest
+ */
+export interface DealsApiGetDealsRequest {
+ /**
+ * If supplied, only deals matching the given user will be returned. However, `filter_id` and `owned_by_you` takes precedence over `user_id` when supplied.
+ * @type {number}
+ * @memberof DealsApiGetDeals
+ */
+ readonly user_id?: number
+
+ /**
+ * The ID of the filter to use
+ * @type {number}
+ * @memberof DealsApiGetDeals
+ */
+ readonly filter_id?: number
+
+ /**
+ * If supplied, only deals within the given stage will be returned
+ * @type {number}
+ * @memberof DealsApiGetDeals
+ */
+ readonly stage_id?: number
+
+ /**
+ * Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
+ * @type {'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted'}
+ * @memberof DealsApiGetDeals
+ */
+ readonly status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted'
+
+ /**
+ * Pagination start
+ * @type {number}
+ * @memberof DealsApiGetDeals
+ */
+ readonly start?: number
+
+ /**
+ * Items shown per page
+ * @type {number}
+ * @memberof DealsApiGetDeals
+ */
+ readonly limit?: number
+
+ /**
+ * The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys).
+ * @type {string}
+ * @memberof DealsApiGetDeals
+ */
+ readonly sort?: string
+
+ /**
+ * When supplied, only deals owned by you are returned. However, `filter_id` takes precedence over `owned_by_you` when both are supplied.
+ * @type {0 | 1}
+ * @memberof DealsApiGetDeals
+ */
+ readonly owned_by_you?: 0 | 1
+}
+
+/**
+ * Request parameters for getDealsCollection operation in DealsApi.
+ * @export
+ * @interface DealsApiGetDealsCollectionRequest
+ */
+export interface DealsApiGetDealsCollectionRequest {
+ /**
+ * For pagination, the marker (an opaque string value) representing the first item on the next page
+ * @type {string}
+ * @memberof DealsApiGetDealsCollection
+ */
+ readonly cursor?: string
+
+ /**
+ * For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
+ * @type {number}
+ * @memberof DealsApiGetDealsCollection
+ */
+ readonly limit?: number
+
+ /**
+ * The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
+ * @type {string}
+ * @memberof DealsApiGetDealsCollection
+ */
+ readonly since?: string
+
+ /**
+ * The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
+ * @type {string}
+ * @memberof DealsApiGetDealsCollection
+ */
+ readonly until?: string
+
+ /**
+ * If supplied, only deals matching the given user will be returned
+ * @type {number}
+ * @memberof DealsApiGetDealsCollection
+ */
+ readonly user_id?: number
+
+ /**
+ * If supplied, only deals within the given stage will be returned
+ * @type {number}
+ * @memberof DealsApiGetDealsCollection
+ */
+ readonly stage_id?: number
+
+ /**
+ * Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
+ * @type {'open' | 'won' | 'lost' | 'deleted'}
+ * @memberof DealsApiGetDealsCollection
+ */
+ readonly status?: 'open' | 'won' | 'lost' | 'deleted'
+}
+
+/**
+ * Request parameters for getDealsSummary operation in DealsApi.
+ * @export
+ * @interface DealsApiGetDealsSummaryRequest
+ */
+export interface DealsApiGetDealsSummaryRequest {
+ /**
+ * Only fetch deals with a specific status. open = Open, won = Won, lost = Lost.
+ * @type {'open' | 'won' | 'lost'}
+ * @memberof DealsApiGetDealsSummary
+ */
+ readonly status?: 'open' | 'won' | 'lost'
+
+ /**
+ * <code>user_id</code> will not be considered. Only deals matching the given filter will be returned.
+ * @type {number}
+ * @memberof DealsApiGetDealsSummary
+ */
+ readonly filter_id?: number
+
+ /**
+ * Only deals matching the given user will be returned. `user_id` will not be considered if you use `filter_id`.
+ * @type {number}
+ * @memberof DealsApiGetDealsSummary
+ */
+ readonly user_id?: number
+
+ /**
+ * Only deals within the given stage will be returned
+ * @type {number}
+ * @memberof DealsApiGetDealsSummary
+ */
+ readonly stage_id?: number
+}
+
+/**
+ * Request parameters for getDealsTimeline operation in DealsApi.
+ * @export
+ * @interface DealsApiGetDealsTimelineRequest
+ */
+export interface DealsApiGetDealsTimelineRequest {
+ /**
+ * The date when the first interval starts. Format: YYYY-MM-DD.
+ * @type {string}
+ * @memberof DealsApiGetDealsTimeline
+ */
+ readonly start_date: string
+
+ /**
+ * The type of the interval<table><tr><th>Value</th><th>Description</th></tr><tr><td>`day`</td><td>Day</td></tr><tr><td>`week`</td><td>A full week (7 days) starting from `start_date`</td></tr><tr><td>`month`</td><td>A full month (depending on the number of days in given month) starting from `start_date`</td></tr><tr><td>`quarter`</td><td>A full quarter (3 months) starting from `start_date`</td></tr></table>
+ * @type {'day' | 'week' | 'month' | 'quarter'}
+ * @memberof DealsApiGetDealsTimeline
+ */
+ readonly interval: 'day' | 'week' | 'month' | 'quarter'
+
+ /**
+ * The number of given intervals, starting from `start_date`, to fetch. E.g. 3 (months).
+ * @type {number}
+ * @memberof DealsApiGetDealsTimeline
+ */
+ readonly amount: number
+
+ /**
+ * The date field key which deals will be retrieved from
+ * @type {string}
+ * @memberof DealsApiGetDealsTimeline
+ */
+ readonly field_key: string
+
+ /**
+ * If supplied, only deals matching the given user will be returned
+ * @type {number}
+ * @memberof DealsApiGetDealsTimeline
+ */
+ readonly user_id?: number
+
+ /**
+ * If supplied, only deals matching the given pipeline will be returned
+ * @type {number}
+ * @memberof DealsApiGetDealsTimeline
+ */
+ readonly pipeline_id?: number
+
+ /**
+ * If supplied, only deals matching the given filter will be returned
+ * @type {number}
+ * @memberof DealsApiGetDealsTimeline
+ */
+ readonly filter_id?: number
+
+ /**
+ * Whether to exclude deals list (1) or not (0). Note that when deals are excluded, the timeline summary (counts and values) is still returned.
+ * @type {0 | 1}
+ * @memberof DealsApiGetDealsTimeline
+ */
+ readonly exclude_deals?: 0 | 1
+
+ /**
+ * The 3-letter currency code of any of the supported currencies. When supplied, `totals_converted` is returned per each interval which contains the currency-converted total amounts in the given currency. You may also set this parameter to `default_currency` in which case the user\'s default currency is used.
+ * @type {string}
+ * @memberof DealsApiGetDealsTimeline
+ */
+ readonly totals_convert_currency?: string
+}
+
+/**
+ * Request parameters for mergeDeals operation in DealsApi.
+ * @export
+ * @interface DealsApiMergeDealsRequest
+ */
+export interface DealsApiMergeDealsRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiMergeDeals
+ */
+ readonly id: number
+
+ /**
+ *
+ * @type {MergeDealsRequest}
+ * @memberof DealsApiMergeDeals
+ */
+ readonly MergeDealsRequest?: MergeDealsRequest
+}
+
+/**
+ * Request parameters for searchDeals operation in DealsApi.
+ * @export
+ * @interface DealsApiSearchDealsRequest
+ */
+export interface DealsApiSearchDealsRequest {
+ /**
+ * The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
+ * @type {string}
+ * @memberof DealsApiSearchDeals
+ */
+ readonly term: string
+
+ /**
+ * A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
+ * @type {'custom_fields' | 'notes' | 'title'}
+ * @memberof DealsApiSearchDeals
+ */
+ readonly fields?: 'custom_fields' | 'notes' | 'title'
+
+ /**
+ * When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
+ * @type {boolean}
+ * @memberof DealsApiSearchDeals
+ */
+ readonly exact_match?: boolean
+
+ /**
+ * Will filter deals by the provided person ID. The upper limit of found deals associated with the person is 2000.
+ * @type {number}
+ * @memberof DealsApiSearchDeals
+ */
+ readonly person_id?: number
+
+ /**
+ * Will filter deals by the provided organization ID. The upper limit of found deals associated with the organization is 2000.
+ * @type {number}
+ * @memberof DealsApiSearchDeals
+ */
+ readonly organization_id?: number
+
+ /**
+ * Will filter deals by the provided specific status. open = Open, won = Won, lost = Lost. The upper limit of found deals associated with the status is 2000.
+ * @type {'open' | 'won' | 'lost'}
+ * @memberof DealsApiSearchDeals
+ */
+ readonly status?: 'open' | 'won' | 'lost'
+
+ /**
+ * Supports including optional fields in the results which are not provided by default
+ * @type {'deal.cc_email'}
+ * @memberof DealsApiSearchDeals
+ */
+ readonly include_fields?: 'deal.cc_email'
+
+ /**
+ * Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter.
+ * @type {number}
+ * @memberof DealsApiSearchDeals
+ */
+ readonly start?: number
+
+ /**
+ * Items shown per page
+ * @type {number}
+ * @memberof DealsApiSearchDeals
+ */
+ readonly limit?: number
+}
+
+/**
+ * Request parameters for updateDeal operation in DealsApi.
+ * @export
+ * @interface DealsApiUpdateDealRequest
+ */
+export interface DealsApiUpdateDealRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiUpdateDeal
+ */
+ readonly id: number
+
+ /**
+ *
+ * @type {UpdateDealRequest}
+ * @memberof DealsApiUpdateDeal
+ */
+ readonly UpdateDealRequest?: UpdateDealRequest
+}
+
+/**
+ * Request parameters for updateDealProduct operation in DealsApi.
+ * @export
+ * @interface DealsApiUpdateDealProductRequest
+ */
+export interface DealsApiUpdateDealProductRequest {
+ /**
+ * The ID of the deal
+ * @type {number}
+ * @memberof DealsApiUpdateDealProduct
+ */
+ readonly id: number
+
+ /**
+ * The ID of the deal-product (the ID of the product attached to the deal)
+ * @type {number}
+ * @memberof DealsApiUpdateDealProduct
+ */
+ readonly product_attachment_id: number
+
+ /**
+ *
+ * @type {UpdateDealProductRequest}
+ * @memberof DealsApiUpdateDealProduct
+ */
+ readonly UpdateDealProductRequest?: UpdateDealProductRequest
+}
+
+/**
+ * DealsApi - object-oriented interface
+ * @export
+ * @class DealsApi
+ * @extends {BaseAPI}
+ */
+export class DealsApi extends BaseAPI {
+ /**
+ * Adds a new deal. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for `key` values. For more information, see the tutorial for adding a deal.
+ * @summary Add a deal
+ * @param {DealsApiAddDealRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public addDeal(requestParameters: DealsApiAddDealRequest = {}, ) {
+ return DealsApiFp(this.configuration).addDeal(requestParameters.AddDealRequest, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Adds a follower to a deal.
+ * @summary Add a follower to a deal
+ * @param {DealsApiAddDealFollowerRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public addDealFollower(requestParameters: DealsApiAddDealFollowerRequest, ) {
+ return DealsApiFp(this.configuration).addDealFollower(requestParameters.id, requestParameters.AddDealFollowerRequest, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Adds a participant to a deal.
+ * @summary Add a participant to a deal
+ * @param {DealsApiAddDealParticipantRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public addDealParticipant(requestParameters: DealsApiAddDealParticipantRequest, ) {
+ return DealsApiFp(this.configuration).addDealParticipant(requestParameters.id, requestParameters.AddDealParticipantRequest, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Adds a product to a deal, creating a new item called a deal-product.
+ * @summary Add a product to a deal
+ * @param {DealsApiAddDealProductRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public addDealProduct(requestParameters: DealsApiAddDealProductRequest, ) {
+ return DealsApiFp(this.configuration).addDealProduct(requestParameters.id, requestParameters.AddDealProductRequest, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Marks a deal as deleted. After 30 days, the deal will be permanently deleted.
+ * @summary Delete a deal
+ * @param {DealsApiDeleteDealRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public deleteDeal(requestParameters: DealsApiDeleteDealRequest, ) {
+ return DealsApiFp(this.configuration).deleteDeal(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Deletes a follower from a deal.
+ * @summary Delete a follower from a deal
+ * @param {DealsApiDeleteDealFollowerRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public deleteDealFollower(requestParameters: DealsApiDeleteDealFollowerRequest, ) {
+ return DealsApiFp(this.configuration).deleteDealFollower(requestParameters.id, requestParameters.follower_id, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Deletes a participant from a deal.
+ * @summary Delete a participant from a deal
+ * @param {DealsApiDeleteDealParticipantRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public deleteDealParticipant(requestParameters: DealsApiDeleteDealParticipantRequest, ) {
+ return DealsApiFp(this.configuration).deleteDealParticipant(requestParameters.id, requestParameters.deal_participant_id, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Deletes a product attachment from a deal, using the `product_attachment_id`.
+ * @summary Delete an attached product from a deal
+ * @param {DealsApiDeleteDealProductRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public deleteDealProduct(requestParameters: DealsApiDeleteDealProductRequest, ) {
+ return DealsApiFp(this.configuration).deleteDealProduct(requestParameters.id, requestParameters.product_attachment_id, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Marks multiple deals as deleted. After 30 days, the deals will be permanently deleted.
+ * @summary Delete multiple deals in bulk
+ * @param {DealsApiDeleteDealsRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public deleteDeals(requestParameters: DealsApiDeleteDealsRequest, ) {
+ return DealsApiFp(this.configuration).deleteDeals(requestParameters.ids, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Duplicates a deal.
+ * @summary Duplicate deal
+ * @param {DealsApiDuplicateDealRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public duplicateDeal(requestParameters: DealsApiDuplicateDealRequest, ) {
+ return DealsApiFp(this.configuration).duplicateDeal(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Returns the details of a specific deal. Note that this also returns some additional fields which are not present when asking for all deals – such as deal age and stay in pipeline stages. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of dealFields. For more information, see the tutorial for getting details of a deal.
+ * @summary Get details of a deal
+ * @param {DealsApiGetDealRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public getDeal(requestParameters: DealsApiGetDealRequest, ) {
+ return DealsApiFp(this.configuration).getDeal(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Lists activities associated with a deal.
+ * @summary List activities associated with a deal
+ * @param {DealsApiGetDealActivitiesRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public getDealActivities(requestParameters: DealsApiGetDealActivitiesRequest, ) {
+ return DealsApiFp(this.configuration).getDealActivities(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.done, requestParameters.exclude, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Lists files associated with a deal.
+ * @summary List files attached to a deal
+ * @param {DealsApiGetDealFilesRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public getDealFiles(requestParameters: DealsApiGetDealFilesRequest, ) {
+ return DealsApiFp(this.configuration).getDealFiles(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.sort, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Lists the followers of a deal.
+ * @summary List followers of a deal
+ * @param {DealsApiGetDealFollowersRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public getDealFollowers(requestParameters: DealsApiGetDealFollowersRequest, ) {
+ return DealsApiFp(this.configuration).getDealFollowers(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Lists mail messages associated with a deal.
+ * @summary List mail messages associated with a deal
+ * @param {DealsApiGetDealMailMessagesRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public getDealMailMessages(requestParameters: DealsApiGetDealMailMessagesRequest, ) {
+ return DealsApiFp(this.configuration).getDealMailMessages(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Lists the participants associated with a deal.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
+ * @summary List participants of a deal
+ * @param {DealsApiGetDealParticipantsRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public getDealParticipants(requestParameters: DealsApiGetDealParticipantsRequest, ) {
+ return DealsApiFp(this.configuration).getDealParticipants(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Lists all persons associated with a deal, regardless of whether the person is the primary contact of the deal, or added as a participant.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
+ * @summary List all persons associated with a deal
+ * @param {DealsApiGetDealPersonsRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public getDealPersons(requestParameters: DealsApiGetDealPersonsRequest, ) {
+ return DealsApiFp(this.configuration).getDealPersons(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Lists products attached to a deal.
+ * @summary List products attached to a deal
+ * @param {DealsApiGetDealProductsRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public getDealProducts(requestParameters: DealsApiGetDealProductsRequest, ) {
+ return DealsApiFp(this.configuration).getDealProducts(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.include_product_data, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Lists updates about a deal.
+ * @summary List updates about a deal
+ * @param {DealsApiGetDealUpdatesRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public getDealUpdates(requestParameters: DealsApiGetDealUpdatesRequest, ) {
+ return DealsApiFp(this.configuration).getDealUpdates(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.all_changes, requestParameters.items, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Lists the users permitted to access a deal.
+ * @summary List permitted users
+ * @param {DealsApiGetDealUsersRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public getDealUsers(requestParameters: DealsApiGetDealUsersRequest, ) {
+ return DealsApiFp(this.configuration).getDealUsers(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Returns all deals. For more information, see the tutorial for getting all deals.
+ * @summary Get all deals
+ * @param {DealsApiGetDealsRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public getDeals(requestParameters: DealsApiGetDealsRequest = {}, ) {
+ return DealsApiFp(this.configuration).getDeals(requestParameters.user_id, requestParameters.filter_id, requestParameters.stage_id, requestParameters.status, requestParameters.start, requestParameters.limit, requestParameters.sort, requestParameters.owned_by_you, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Returns all deals. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here.
+ * @summary Get all deals (BETA)
+ * @param {DealsApiGetDealsCollectionRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public getDealsCollection(requestParameters: DealsApiGetDealsCollectionRequest = {}, ) {
+ return DealsApiFp(this.configuration).getDealsCollection(requestParameters.cursor, requestParameters.limit, requestParameters.since, requestParameters.until, requestParameters.user_id, requestParameters.stage_id, requestParameters.status, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Returns a summary of all the deals.
+ * @summary Get deals summary
+ * @param {DealsApiGetDealsSummaryRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public getDealsSummary(requestParameters: DealsApiGetDealsSummaryRequest = {}, ) {
+ return DealsApiFp(this.configuration).getDealsSummary(requestParameters.status, requestParameters.filter_id, requestParameters.user_id, requestParameters.stage_id, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Returns open and won deals, grouped by a defined interval of time set in a date-type dealField (`field_key`) — e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2012, deals are returned grouped into 3 groups — January, February and March — based on the value of the given `field_key`.
+ * @summary Get deals timeline
+ * @param {DealsApiGetDealsTimelineRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public getDealsTimeline(requestParameters: DealsApiGetDealsTimelineRequest, ) {
+ return DealsApiFp(this.configuration).getDealsTimeline(requestParameters.start_date, requestParameters.interval, requestParameters.amount, requestParameters.field_key, requestParameters.user_id, requestParameters.pipeline_id, requestParameters.filter_id, requestParameters.exclude_deals, requestParameters.totals_convert_currency, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Merges a deal with another deal. For more information, see the tutorial for merging two deals.
+ * @summary Merge two deals
+ * @param {DealsApiMergeDealsRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public mergeDeals(requestParameters: DealsApiMergeDealsRequest, ) {
+ return DealsApiFp(this.configuration).mergeDeals(requestParameters.id, requestParameters.MergeDealsRequest, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Searches all deals by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found deals can be filtered by the person ID and the organization ID.
+ * @summary Search deals
+ * @param {DealsApiSearchDealsRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public searchDeals(requestParameters: DealsApiSearchDealsRequest, ) {
+ return DealsApiFp(this.configuration).searchDeals(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.person_id, requestParameters.organization_id, requestParameters.status, requestParameters.include_fields, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Updates the properties of a deal. For more information, see the tutorial for updating a deal.
+ * @summary Update a deal
+ * @param {DealsApiUpdateDealRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public updateDeal(requestParameters: DealsApiUpdateDealRequest, ) {
+ return DealsApiFp(this.configuration).updateDeal(requestParameters.id, requestParameters.UpdateDealRequest, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Updates the details of the product that has been attached to a deal.
+ * @summary Update the product attached to a deal
+ * @param {DealsApiUpdateDealProductRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof DealsApi
+ */
+ public updateDealProduct(requestParameters: DealsApiUpdateDealProductRequest, ) {
+ return DealsApiFp(this.configuration).updateDealProduct(requestParameters.id, requestParameters.product_attachment_id, requestParameters.UpdateDealProductRequest, ).then((request) => request(this.axios, this.basePath));
+ }
+}
diff --git a/api/files-api.ts b/api/files-api.ts
new file mode 100644
index 00000000..4a357b63
--- /dev/null
+++ b/api/files-api.ts
@@ -0,0 +1,1062 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Pipedrive API v1
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import type { Configuration } from '../configuration';
+import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
+import globalAxios from 'axios';
+// URLSearchParams not necessarily used
+// @ts-ignore
+import { URL, URLSearchParams } from 'url';
+// Some imports not used depending on template conditions
+// @ts-ignore
+import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
+// @ts-ignore
+import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
+// @ts-ignore
+import { AddFileAndLinkItResponse200 } from '../models';
+// @ts-ignore
+import { AddFileResponse200 } from '../models';
+// @ts-ignore
+import { DeleteFileResponse200 } from '../models';
+// @ts-ignore
+import { GetFileResponse200 } from '../models';
+// @ts-ignore
+import { GetFilesResponse200 } from '../models';
+// @ts-ignore
+import { LinkFileToItemResponse200 } from '../models';
+// @ts-ignore
+import { UpdateFileResponse200 } from '../models';
+/**
+ * FilesApi - axios parameter creator
+ * @export
+ */
+export const FilesApiAxiosParamCreator = function (configuration?: Configuration) {
+ return {
+ /**
+ * Lets you upload a file and associate it with a deal, person, organization, activity, product or lead. For more information, see the tutorial for adding a file.
+ * @summary Add file
+ * @param {File} file A single file, supplied in the multipart/form-data encoding and contained within the given boundaries
+ * @param {number} [deal_id] The ID of the deal to associate file(s) with
+ * @param {number} [person_id] The ID of the person to associate file(s) with
+ * @param {number} [org_id] The ID of the organization to associate file(s) with
+ * @param {number} [product_id] The ID of the product to associate file(s) with
+ * @param {number} [activity_id] The ID of the activity to associate file(s) with
+ * @param {string} [lead_id] The ID of the lead to associate file(s) with
+
+ * @throws {RequiredError}
+ */
+ addFile: async (file: File, deal_id?: number, person_id?: number, org_id?: number, product_id?: number, activity_id?: number, lead_id?: string, ): Promise => {
+ // verify required parameter 'file' is not null or undefined
+ assertParamExists('addFile', 'file', file)
+ const localVarPath = `/files`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "activities:full", "contacts:full"], configuration)
+
+
+ if (file !== undefined) {
+ localVarFormParams.append('file', file as any);
+ }
+
+ if (deal_id !== undefined) {
+ localVarFormParams.append('deal_id', deal_id as any);
+ }
+
+ if (person_id !== undefined) {
+ localVarFormParams.append('person_id', person_id as any);
+ }
+
+ if (org_id !== undefined) {
+ localVarFormParams.append('org_id', org_id as any);
+ }
+
+ if (product_id !== undefined) {
+ localVarFormParams.append('product_id', product_id as any);
+ }
+
+ if (activity_id !== undefined) {
+ localVarFormParams.append('activity_id', activity_id as any);
+ }
+
+ if (lead_id !== undefined) {
+ localVarFormParams.append('lead_id', lead_id as any);
+ }
+
+
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = localVarFormParams;
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Creates a new empty file in the remote location (`googledrive`) that will be linked to the item you supply. For more information, see the tutorial for adding a remote file.
+ * @summary Create a remote file and link it to an item
+ * @param {string} file_type The file type
+ * @param {string} title The title of the file
+ * @param {string} item_type The item type
+ * @param {number} item_id The ID of the item to associate the file with
+ * @param {string} remote_location The location type to send the file to. Only `googledrive` is supported at the moment.
+
+ * @throws {RequiredError}
+ */
+ addFileAndLinkIt: async (file_type: string, title: string, item_type: string, item_id: number, remote_location: string, ): Promise => {
+ // verify required parameter 'file_type' is not null or undefined
+ assertParamExists('addFileAndLinkIt', 'file_type', file_type)
+ // verify required parameter 'title' is not null or undefined
+ assertParamExists('addFileAndLinkIt', 'title', title)
+ // verify required parameter 'item_type' is not null or undefined
+ assertParamExists('addFileAndLinkIt', 'item_type', item_type)
+ // verify required parameter 'item_id' is not null or undefined
+ assertParamExists('addFileAndLinkIt', 'item_id', item_id)
+ // verify required parameter 'remote_location' is not null or undefined
+ assertParamExists('addFileAndLinkIt', 'remote_location', remote_location)
+ const localVarPath = `/files/remote`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+ const localVarFormParams = new URLSearchParams();
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "activities:full", "contacts:full"], configuration)
+
+
+ if (file_type !== undefined) {
+ localVarFormParams.set('file_type', file_type as any);
+ }
+
+ if (title !== undefined) {
+ localVarFormParams.set('title', title as any);
+ }
+
+ if (item_type !== undefined) {
+ localVarFormParams.set('item_type', item_type as any);
+ }
+
+ if (item_id !== undefined) {
+ localVarFormParams.set('item_id', item_id as any);
+ }
+
+ if (remote_location !== undefined) {
+ localVarFormParams.set('remote_location', remote_location as any);
+ }
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = localVarFormParams.toString();
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Marks a file as deleted. After 30 days, the file will be permanently deleted.
+ * @summary Delete a file
+ * @param {number} id The ID of the file
+
+ * @throws {RequiredError}
+ */
+ deleteFile: async (id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('deleteFile', 'id', id)
+ const localVarPath = `/files/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "activities:full", "contacts:full"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Initializes a file download.
+ * @summary Download one file
+ * @param {number} id The ID of the file
+
+ * @throws {RequiredError}
+ */
+ downloadFile: async (id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('downloadFile', 'id', id)
+ const localVarPath = `/files/{id}/download`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full", "activities:read", "activities:full", "contacts:read", "contacts:full"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Returns data about a specific file.
+ * @summary Get one file
+ * @param {number} id The ID of the file
+
+ * @throws {RequiredError}
+ */
+ getFile: async (id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getFile', 'id', id)
+ const localVarPath = `/files/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full", "activities:read", "activities:full", "contacts:read", "contacts:full"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Returns data about all files.
+ * @summary Get all files
+ * @param {number} [start] Pagination start
+ * @param {number} [limit] Items shown per page
+ * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `product_id`, `add_time`, `update_time`, `file_name`, `file_type`, `file_size`, `comment`.
+
+ * @throws {RequiredError}
+ */
+ getFiles: async (start?: number, limit?: number, sort?: string, ): Promise => {
+ const localVarPath = `/files`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full", "activities:read", "activities:full", "contacts:read", "contacts:full"], configuration)
+
+ if (start !== undefined) {
+ localVarQueryParameter['start'] = start;
+ }
+
+ if (limit !== undefined) {
+ localVarQueryParameter['limit'] = limit;
+ }
+
+ if (sort !== undefined) {
+ localVarQueryParameter['sort'] = sort;
+ }
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Links an existing remote file (`googledrive`) to the item you supply. For more information, see the tutorial for adding a remote file.
+ * @summary Link a remote file to an item
+ * @param {string} item_type The item type
+ * @param {number} item_id The ID of the item to associate the file with
+ * @param {string} remote_id The remote item ID
+ * @param {string} remote_location The location type to send the file to. Only `googledrive` is supported at the moment.
+
+ * @throws {RequiredError}
+ */
+ linkFileToItem: async (item_type: string, item_id: number, remote_id: string, remote_location: string, ): Promise => {
+ // verify required parameter 'item_type' is not null or undefined
+ assertParamExists('linkFileToItem', 'item_type', item_type)
+ // verify required parameter 'item_id' is not null or undefined
+ assertParamExists('linkFileToItem', 'item_id', item_id)
+ // verify required parameter 'remote_id' is not null or undefined
+ assertParamExists('linkFileToItem', 'remote_id', remote_id)
+ // verify required parameter 'remote_location' is not null or undefined
+ assertParamExists('linkFileToItem', 'remote_location', remote_location)
+ const localVarPath = `/files/remoteLink`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+ const localVarFormParams = new URLSearchParams();
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "activities:full", "contacts:full"], configuration)
+
+
+ if (item_type !== undefined) {
+ localVarFormParams.set('item_type', item_type as any);
+ }
+
+ if (item_id !== undefined) {
+ localVarFormParams.set('item_id', item_id as any);
+ }
+
+ if (remote_id !== undefined) {
+ localVarFormParams.set('remote_id', remote_id as any);
+ }
+
+ if (remote_location !== undefined) {
+ localVarFormParams.set('remote_location', remote_location as any);
+ }
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = localVarFormParams.toString();
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Updates the properties of a file.
+ * @summary Update file details
+ * @param {number} id The ID of the file
+ * @param {string} [name] The visible name of the file
+ * @param {string} [description] The description of the file
+
+ * @throws {RequiredError}
+ */
+ updateFile: async (id: number, name?: string, description?: string, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('updateFile', 'id', id)
+ const localVarPath = `/files/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+ const localVarFormParams = new URLSearchParams();
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "activities:full", "contacts:full"], configuration)
+
+
+ if (name !== undefined) {
+ localVarFormParams.set('name', name as any);
+ }
+
+ if (description !== undefined) {
+ localVarFormParams.set('description', description as any);
+ }
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = localVarFormParams.toString();
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ }
+};
+
+/**
+ * FilesApi - functional programming interface
+ * @export
+ */
+export const FilesApiFp = function(configuration?: Configuration) {
+
+ /**
+ * Axios interceptor to add the SDK version as a User-Agent header
+ * */
+ globalAxios.interceptors.request.use(function (config) {
+ const version = require("../../package.json").version;
+ config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
+ return config;
+ });
+
+ /**
+ * Axios response interceptor to modify response structure
+ */
+ globalAxios.interceptors.response.use(function (response) {
+ return response.hasOwnProperty('success') ? response : response.data;
+ }, function (error) {
+ if(error?.response?.data) {
+ return Promise.reject(error.response.data);
+ }
+ return Promise.reject(error);
+ });
+ const localVarAxiosParamCreator = FilesApiAxiosParamCreator(configuration)
+ return {
+ /**
+ * Lets you upload a file and associate it with a deal, person, organization, activity, product or lead. For more information, see the tutorial for adding a file.
+ * @summary Add file
+ * @param {File} file A single file, supplied in the multipart/form-data encoding and contained within the given boundaries
+ * @param {number} [deal_id] The ID of the deal to associate file(s) with
+ * @param {number} [person_id] The ID of the person to associate file(s) with
+ * @param {number} [org_id] The ID of the organization to associate file(s) with
+ * @param {number} [product_id] The ID of the product to associate file(s) with
+ * @param {number} [activity_id] The ID of the activity to associate file(s) with
+ * @param {string} [lead_id] The ID of the lead to associate file(s) with
+
+ * @throws {RequiredError}
+ */
+ async addFile(file: File, deal_id?: number, person_id?: number, org_id?: number, product_id?: number, activity_id?: number, lead_id?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addFile(file, deal_id, person_id, org_id, product_id, activity_id, lead_id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Creates a new empty file in the remote location (`googledrive`) that will be linked to the item you supply. For more information, see the tutorial for adding a remote file.
+ * @summary Create a remote file and link it to an item
+ * @param {string} file_type The file type
+ * @param {string} title The title of the file
+ * @param {string} item_type The item type
+ * @param {number} item_id The ID of the item to associate the file with
+ * @param {string} remote_location The location type to send the file to. Only `googledrive` is supported at the moment.
+
+ * @throws {RequiredError}
+ */
+ async addFileAndLinkIt(file_type: string, title: string, item_type: string, item_id: number, remote_location: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addFileAndLinkIt(file_type, title, item_type, item_id, remote_location, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Marks a file as deleted. After 30 days, the file will be permanently deleted.
+ * @summary Delete a file
+ * @param {number} id The ID of the file
+
+ * @throws {RequiredError}
+ */
+ async deleteFile(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteFile(id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Initializes a file download.
+ * @summary Download one file
+ * @param {number} id The ID of the file
+
+ * @throws {RequiredError}
+ */
+ async downloadFile(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.downloadFile(id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Returns data about a specific file.
+ * @summary Get one file
+ * @param {number} id The ID of the file
+
+ * @throws {RequiredError}
+ */
+ async getFile(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getFile(id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Returns data about all files.
+ * @summary Get all files
+ * @param {number} [start] Pagination start
+ * @param {number} [limit] Items shown per page
+ * @param {string} [sort] The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `product_id`, `add_time`, `update_time`, `file_name`, `file_type`, `file_size`, `comment`.
+
+ * @throws {RequiredError}
+ */
+ async getFiles(start?: number, limit?: number, sort?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getFiles(start, limit, sort, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Links an existing remote file (`googledrive`) to the item you supply. For more information, see the tutorial for adding a remote file.
+ * @summary Link a remote file to an item
+ * @param {string} item_type The item type
+ * @param {number} item_id The ID of the item to associate the file with
+ * @param {string} remote_id The remote item ID
+ * @param {string} remote_location The location type to send the file to. Only `googledrive` is supported at the moment.
+
+ * @throws {RequiredError}
+ */
+ async linkFileToItem(item_type: string, item_id: number, remote_id: string, remote_location: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.linkFileToItem(item_type, item_id, remote_id, remote_location, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Updates the properties of a file.
+ * @summary Update file details
+ * @param {number} id The ID of the file
+ * @param {string} [name] The visible name of the file
+ * @param {string} [description] The description of the file
+
+ * @throws {RequiredError}
+ */
+ async updateFile(id: number, name?: string, description?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateFile(id, name, description, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ }
+};
+
+/**
+ * FilesApi - factory interface
+ * @export
+ */
+export const FilesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
+ const localVarFp = FilesApiFp(configuration)
+ return {
+ /**
+ * Lets you upload a file and associate it with a deal, person, organization, activity, product or lead. For more information, see the tutorial for adding a file.
+ * @summary Add file
+ * @param {FilesApiAddFileRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ addFile(requestParameters: FilesApiAddFileRequest, ): Promise {
+ return localVarFp.addFile(requestParameters.file, requestParameters.deal_id, requestParameters.person_id, requestParameters.org_id, requestParameters.product_id, requestParameters.activity_id, requestParameters.lead_id, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Creates a new empty file in the remote location (`googledrive`) that will be linked to the item you supply. For more information, see the tutorial for adding a remote file.
+ * @summary Create a remote file and link it to an item
+ * @param {FilesApiAddFileAndLinkItRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ addFileAndLinkIt(requestParameters: FilesApiAddFileAndLinkItRequest, ): Promise {
+ return localVarFp.addFileAndLinkIt(requestParameters.file_type, requestParameters.title, requestParameters.item_type, requestParameters.item_id, requestParameters.remote_location, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Marks a file as deleted. After 30 days, the file will be permanently deleted.
+ * @summary Delete a file
+ * @param {FilesApiDeleteFileRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ deleteFile(requestParameters: FilesApiDeleteFileRequest, ): Promise {
+ return localVarFp.deleteFile(requestParameters.id, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Initializes a file download.
+ * @summary Download one file
+ * @param {FilesApiDownloadFileRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ downloadFile(requestParameters: FilesApiDownloadFileRequest, ): Promise {
+ return localVarFp.downloadFile(requestParameters.id, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Returns data about a specific file.
+ * @summary Get one file
+ * @param {FilesApiGetFileRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getFile(requestParameters: FilesApiGetFileRequest, ): Promise {
+ return localVarFp.getFile(requestParameters.id, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Returns data about all files.
+ * @summary Get all files
+ * @param {FilesApiGetFilesRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ getFiles(requestParameters: FilesApiGetFilesRequest = {}, ): Promise {
+ return localVarFp.getFiles(requestParameters.start, requestParameters.limit, requestParameters.sort, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Links an existing remote file (`googledrive`) to the item you supply. For more information, see the tutorial for adding a remote file.
+ * @summary Link a remote file to an item
+ * @param {FilesApiLinkFileToItemRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ linkFileToItem(requestParameters: FilesApiLinkFileToItemRequest, ): Promise {
+ return localVarFp.linkFileToItem(requestParameters.item_type, requestParameters.item_id, requestParameters.remote_id, requestParameters.remote_location, ).then((request) => request(axios, basePath));
+ },
+ /**
+ * Updates the properties of a file.
+ * @summary Update file details
+ * @param {FilesApiUpdateFileRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ */
+ updateFile(requestParameters: FilesApiUpdateFileRequest, ): Promise {
+ return localVarFp.updateFile(requestParameters.id, requestParameters.name, requestParameters.description, ).then((request) => request(axios, basePath));
+ },
+ };
+};
+
+/**
+ * Request parameters for addFile operation in FilesApi.
+ * @export
+ * @interface FilesApiAddFileRequest
+ */
+export interface FilesApiAddFileRequest {
+ /**
+ * A single file, supplied in the multipart/form-data encoding and contained within the given boundaries
+ * @type {File}
+ * @memberof FilesApiAddFile
+ */
+ readonly file: File
+
+ /**
+ * The ID of the deal to associate file(s) with
+ * @type {number}
+ * @memberof FilesApiAddFile
+ */
+ readonly deal_id?: number
+
+ /**
+ * The ID of the person to associate file(s) with
+ * @type {number}
+ * @memberof FilesApiAddFile
+ */
+ readonly person_id?: number
+
+ /**
+ * The ID of the organization to associate file(s) with
+ * @type {number}
+ * @memberof FilesApiAddFile
+ */
+ readonly org_id?: number
+
+ /**
+ * The ID of the product to associate file(s) with
+ * @type {number}
+ * @memberof FilesApiAddFile
+ */
+ readonly product_id?: number
+
+ /**
+ * The ID of the activity to associate file(s) with
+ * @type {number}
+ * @memberof FilesApiAddFile
+ */
+ readonly activity_id?: number
+
+ /**
+ * The ID of the lead to associate file(s) with
+ * @type {string}
+ * @memberof FilesApiAddFile
+ */
+ readonly lead_id?: string
+}
+
+/**
+ * Request parameters for addFileAndLinkIt operation in FilesApi.
+ * @export
+ * @interface FilesApiAddFileAndLinkItRequest
+ */
+export interface FilesApiAddFileAndLinkItRequest {
+ /**
+ * The file type
+ * @type {string}
+ * @memberof FilesApiAddFileAndLinkIt
+ */
+ readonly file_type: string
+
+ /**
+ * The title of the file
+ * @type {string}
+ * @memberof FilesApiAddFileAndLinkIt
+ */
+ readonly title: string
+
+ /**
+ * The item type
+ * @type {string}
+ * @memberof FilesApiAddFileAndLinkIt
+ */
+ readonly item_type: string
+
+ /**
+ * The ID of the item to associate the file with
+ * @type {number}
+ * @memberof FilesApiAddFileAndLinkIt
+ */
+ readonly item_id: number
+
+ /**
+ * The location type to send the file to. Only `googledrive` is supported at the moment.
+ * @type {string}
+ * @memberof FilesApiAddFileAndLinkIt
+ */
+ readonly remote_location: string
+}
+
+/**
+ * Request parameters for deleteFile operation in FilesApi.
+ * @export
+ * @interface FilesApiDeleteFileRequest
+ */
+export interface FilesApiDeleteFileRequest {
+ /**
+ * The ID of the file
+ * @type {number}
+ * @memberof FilesApiDeleteFile
+ */
+ readonly id: number
+}
+
+/**
+ * Request parameters for downloadFile operation in FilesApi.
+ * @export
+ * @interface FilesApiDownloadFileRequest
+ */
+export interface FilesApiDownloadFileRequest {
+ /**
+ * The ID of the file
+ * @type {number}
+ * @memberof FilesApiDownloadFile
+ */
+ readonly id: number
+}
+
+/**
+ * Request parameters for getFile operation in FilesApi.
+ * @export
+ * @interface FilesApiGetFileRequest
+ */
+export interface FilesApiGetFileRequest {
+ /**
+ * The ID of the file
+ * @type {number}
+ * @memberof FilesApiGetFile
+ */
+ readonly id: number
+}
+
+/**
+ * Request parameters for getFiles operation in FilesApi.
+ * @export
+ * @interface FilesApiGetFilesRequest
+ */
+export interface FilesApiGetFilesRequest {
+ /**
+ * Pagination start
+ * @type {number}
+ * @memberof FilesApiGetFiles
+ */
+ readonly start?: number
+
+ /**
+ * Items shown per page
+ * @type {number}
+ * @memberof FilesApiGetFiles
+ */
+ readonly limit?: number
+
+ /**
+ * The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `product_id`, `add_time`, `update_time`, `file_name`, `file_type`, `file_size`, `comment`.
+ * @type {string}
+ * @memberof FilesApiGetFiles
+ */
+ readonly sort?: string
+}
+
+/**
+ * Request parameters for linkFileToItem operation in FilesApi.
+ * @export
+ * @interface FilesApiLinkFileToItemRequest
+ */
+export interface FilesApiLinkFileToItemRequest {
+ /**
+ * The item type
+ * @type {string}
+ * @memberof FilesApiLinkFileToItem
+ */
+ readonly item_type: string
+
+ /**
+ * The ID of the item to associate the file with
+ * @type {number}
+ * @memberof FilesApiLinkFileToItem
+ */
+ readonly item_id: number
+
+ /**
+ * The remote item ID
+ * @type {string}
+ * @memberof FilesApiLinkFileToItem
+ */
+ readonly remote_id: string
+
+ /**
+ * The location type to send the file to. Only `googledrive` is supported at the moment.
+ * @type {string}
+ * @memberof FilesApiLinkFileToItem
+ */
+ readonly remote_location: string
+}
+
+/**
+ * Request parameters for updateFile operation in FilesApi.
+ * @export
+ * @interface FilesApiUpdateFileRequest
+ */
+export interface FilesApiUpdateFileRequest {
+ /**
+ * The ID of the file
+ * @type {number}
+ * @memberof FilesApiUpdateFile
+ */
+ readonly id: number
+
+ /**
+ * The visible name of the file
+ * @type {string}
+ * @memberof FilesApiUpdateFile
+ */
+ readonly name?: string
+
+ /**
+ * The description of the file
+ * @type {string}
+ * @memberof FilesApiUpdateFile
+ */
+ readonly description?: string
+}
+
+/**
+ * FilesApi - object-oriented interface
+ * @export
+ * @class FilesApi
+ * @extends {BaseAPI}
+ */
+export class FilesApi extends BaseAPI {
+ /**
+ * Lets you upload a file and associate it with a deal, person, organization, activity, product or lead. For more information, see the tutorial for adding a file.
+ * @summary Add file
+ * @param {FilesApiAddFileRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof FilesApi
+ */
+ public addFile(requestParameters: FilesApiAddFileRequest, ) {
+ return FilesApiFp(this.configuration).addFile(requestParameters.file, requestParameters.deal_id, requestParameters.person_id, requestParameters.org_id, requestParameters.product_id, requestParameters.activity_id, requestParameters.lead_id, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Creates a new empty file in the remote location (`googledrive`) that will be linked to the item you supply. For more information, see the tutorial for adding a remote file.
+ * @summary Create a remote file and link it to an item
+ * @param {FilesApiAddFileAndLinkItRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof FilesApi
+ */
+ public addFileAndLinkIt(requestParameters: FilesApiAddFileAndLinkItRequest, ) {
+ return FilesApiFp(this.configuration).addFileAndLinkIt(requestParameters.file_type, requestParameters.title, requestParameters.item_type, requestParameters.item_id, requestParameters.remote_location, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Marks a file as deleted. After 30 days, the file will be permanently deleted.
+ * @summary Delete a file
+ * @param {FilesApiDeleteFileRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof FilesApi
+ */
+ public deleteFile(requestParameters: FilesApiDeleteFileRequest, ) {
+ return FilesApiFp(this.configuration).deleteFile(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Initializes a file download.
+ * @summary Download one file
+ * @param {FilesApiDownloadFileRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof FilesApi
+ */
+ public downloadFile(requestParameters: FilesApiDownloadFileRequest, ) {
+ return FilesApiFp(this.configuration).downloadFile(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Returns data about a specific file.
+ * @summary Get one file
+ * @param {FilesApiGetFileRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof FilesApi
+ */
+ public getFile(requestParameters: FilesApiGetFileRequest, ) {
+ return FilesApiFp(this.configuration).getFile(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Returns data about all files.
+ * @summary Get all files
+ * @param {FilesApiGetFilesRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof FilesApi
+ */
+ public getFiles(requestParameters: FilesApiGetFilesRequest = {}, ) {
+ return FilesApiFp(this.configuration).getFiles(requestParameters.start, requestParameters.limit, requestParameters.sort, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Links an existing remote file (`googledrive`) to the item you supply. For more information, see the tutorial for adding a remote file.
+ * @summary Link a remote file to an item
+ * @param {FilesApiLinkFileToItemRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof FilesApi
+ */
+ public linkFileToItem(requestParameters: FilesApiLinkFileToItemRequest, ) {
+ return FilesApiFp(this.configuration).linkFileToItem(requestParameters.item_type, requestParameters.item_id, requestParameters.remote_id, requestParameters.remote_location, ).then((request) => request(this.axios, this.basePath));
+ }
+
+ /**
+ * Updates the properties of a file.
+ * @summary Update file details
+ * @param {FilesApiUpdateFileRequest} requestParameters Request parameters.
+
+ * @throws {RequiredError}
+ * @memberof FilesApi
+ */
+ public updateFile(requestParameters: FilesApiUpdateFileRequest, ) {
+ return FilesApiFp(this.configuration).updateFile(requestParameters.id, requestParameters.name, requestParameters.description, ).then((request) => request(this.axios, this.basePath));
+ }
+}
diff --git a/api/filters-api.ts b/api/filters-api.ts
new file mode 100644
index 00000000..569570a9
--- /dev/null
+++ b/api/filters-api.ts
@@ -0,0 +1,708 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Pipedrive API v1
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import type { Configuration } from '../configuration';
+import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
+import globalAxios from 'axios';
+// URLSearchParams not necessarily used
+// @ts-ignore
+import { URL, URLSearchParams } from 'url';
+// Some imports not used depending on template conditions
+// @ts-ignore
+import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
+// @ts-ignore
+import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
+// @ts-ignore
+import { AddFilterRequest } from '../models';
+// @ts-ignore
+import { DeleteFilterResponse200 } from '../models';
+// @ts-ignore
+import { DeleteFiltersResponse200 } from '../models';
+// @ts-ignore
+import { GetFilterResponse200 } from '../models';
+// @ts-ignore
+import { GetFiltersResponse200 } from '../models';
+// @ts-ignore
+import { PostFilterResponse200 } from '../models';
+// @ts-ignore
+import { UpdateFilterRequest } from '../models';
+/**
+ * FiltersApi - axios parameter creator
+ * @export
+ */
+export const FiltersApiAxiosParamCreator = function (configuration?: Configuration) {
+ return {
+ /**
+ * Adds a new filter, returns the ID upon success. Note that in the conditions JSON object only one first-level condition group is supported, and it must be glued with \'AND\', and only two second level condition groups are supported of which one must be glued with \'AND\' and the second with \'OR\'. Other combinations do not work (yet) but the syntax supports introducing them in future. For more information, see the tutorial for adding a filter.
+ * @summary Add a new filter
+ * @param {AddFilterRequest} [AddFilterRequest]
+
+ * @throws {RequiredError}
+ */
+ addFilter: async (AddFilterRequest?: AddFilterRequest, ): Promise => {
+ const localVarPath = `/filters`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'POST', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "activities:full", "contacts:full"], configuration)
+
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = serializeDataIfNeeded(AddFilterRequest, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Marks a filter as deleted.
+ * @summary Delete a filter
+ * @param {number} id The ID of the filter
+
+ * @throws {RequiredError}
+ */
+ deleteFilter: async (id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('deleteFilter', 'id', id)
+ const localVarPath = `/filters/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "activities:full", "contacts:full"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Marks multiple filters as deleted.
+ * @summary Delete multiple filters in bulk
+ * @param {string} ids The comma-separated filter IDs to delete
+
+ * @throws {RequiredError}
+ */
+ deleteFilters: async (ids: string, ): Promise => {
+ // verify required parameter 'ids' is not null or undefined
+ assertParamExists('deleteFilters', 'ids', ids)
+ const localVarPath = `/filters`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "activities:full", "contacts:full"], configuration)
+
+ if (ids !== undefined) {
+ localVarQueryParameter['ids'] = ids;
+ }
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Returns data about a specific filter. Note that this also returns the condition lines of the filter.
+ * @summary Get one filter
+ * @param {number} id The ID of the filter
+
+ * @throws {RequiredError}
+ */
+ getFilter: async (id: number, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('getFilter', 'id', id)
+ const localVarPath = `/filters/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full", "activities:read", "activities:full", "contacts:read", "contacts:full"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Returns all supported filter helpers. It helps to know what conditions and helpers are available when you want to add or update filters. For more information, see the tutorial for adding a filter.
+ * @summary Get all filter helpers
+
+ * @throws {RequiredError}
+ */
+ getFilterHelpers: async (): Promise => {
+ const localVarPath = `/filters/helpers`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full", "activities:read", "activities:full", "contacts:read", "contacts:full"], configuration)
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Returns data about all filters.
+ * @summary Get all filters
+ * @param {'deals' | 'leads' | 'org' | 'people' | 'products' | 'activity' | 'projects'} [type] The types of filters to fetch
+
+ * @throws {RequiredError}
+ */
+ getFilters: async (type?: 'deals' | 'leads' | 'org' | 'people' | 'products' | 'activity' | 'projects', ): Promise => {
+ const localVarPath = `/filters`;
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'GET', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:read", "deals:full", "activities:read", "activities:full", "contacts:read", "contacts:full"], configuration)
+
+ if (type !== undefined) {
+ localVarQueryParameter['type'] = type;
+ }
+
+
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ /**
+ * Updates an existing filter.
+ * @summary Update filter
+ * @param {number} id The ID of the filter
+ * @param {UpdateFilterRequest} [UpdateFilterRequest]
+
+ * @throws {RequiredError}
+ */
+ updateFilter: async (id: number, UpdateFilterRequest?: UpdateFilterRequest, ): Promise => {
+ // verify required parameter 'id' is not null or undefined
+ assertParamExists('updateFilter', 'id', id)
+ const localVarPath = `/filters/{id}`
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
+ let baseOptions;
+ if (configuration) {
+ baseOptions = configuration.baseOptions;
+ }
+
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions };
+ const localVarHeaderParameter = {} as any;
+ const localVarQueryParameter = {} as any;
+
+ // authentication api_key required
+ await setApiKeyToObject(localVarQueryParameter, "api_token", configuration)
+
+ // authentication oauth2 required
+ // oauth required
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "activities:full", "contacts:full"], configuration)
+
+
+
+ localVarHeaderParameter['Content-Type'] = 'application/json';
+
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
+ localVarRequestOptions.data = serializeDataIfNeeded(UpdateFilterRequest, localVarRequestOptions, configuration)
+
+ return {
+ url: toPathString(localVarUrlObj),
+ options: localVarRequestOptions,
+ };
+ },
+ }
+};
+
+/**
+ * FiltersApi - functional programming interface
+ * @export
+ */
+export const FiltersApiFp = function(configuration?: Configuration) {
+
+ /**
+ * Axios interceptor to add the SDK version as a User-Agent header
+ * */
+ globalAxios.interceptors.request.use(function (config) {
+ const version = require("../../package.json").version;
+ config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
+ return config;
+ });
+
+ /**
+ * Axios response interceptor to modify response structure
+ */
+ globalAxios.interceptors.response.use(function (response) {
+ return response.hasOwnProperty('success') ? response : response.data;
+ }, function (error) {
+ if(error?.response?.data) {
+ return Promise.reject(error.response.data);
+ }
+ return Promise.reject(error);
+ });
+ const localVarAxiosParamCreator = FiltersApiAxiosParamCreator(configuration)
+ return {
+ /**
+ * Adds a new filter, returns the ID upon success. Note that in the conditions JSON object only one first-level condition group is supported, and it must be glued with \'AND\', and only two second level condition groups are supported of which one must be glued with \'AND\' and the second with \'OR\'. Other combinations do not work (yet) but the syntax supports introducing them in future. For more information, see the tutorial for adding a filter.
+ * @summary Add a new filter
+ * @param {AddFilterRequest} [AddFilterRequest]
+
+ * @throws {RequiredError}
+ */
+ async addFilter(AddFilterRequest?: AddFilterRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addFilter(AddFilterRequest, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Marks a filter as deleted.
+ * @summary Delete a filter
+ * @param {number} id The ID of the filter
+
+ * @throws {RequiredError}
+ */
+ async deleteFilter(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteFilter(id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Marks multiple filters as deleted.
+ * @summary Delete multiple filters in bulk
+ * @param {string} ids The comma-separated filter IDs to delete
+
+ * @throws {RequiredError}
+ */
+ async deleteFilters(ids: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteFilters(ids, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Returns data about a specific filter. Note that this also returns the condition lines of the filter.
+ * @summary Get one filter
+ * @param {number} id The ID of the filter
+
+ * @throws {RequiredError}
+ */
+ async getFilter(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> {
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getFilter(id, );
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
+ },
+ /**
+ * Returns all supported filter helpers. It helps to know what conditions and helpers are available when you want to add or update filters. For more information, see the tutorial for adding a filter.
+ * @summary Get all filter helpers
+
+ * @throws {RequiredError}
+ */
+ async getFilterHelpers(): Promise<(axios?: AxiosInstance, basePath?: string) => Promise