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> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getFilterHelpers(); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * 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} + */ + async getFilters(type?: 'deals' | 'leads' | 'org' | 'people' | 'products' | 'activity' | 'projects', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getFilters(type, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates an existing filter. + * @summary Update filter + * @param {number} id The ID of the filter + * @param {UpdateFilterRequest} [UpdateFilterRequest] + + * @throws {RequiredError} + */ + async updateFilter(id: number, UpdateFilterRequest?: UpdateFilterRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateFilter(id, UpdateFilterRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * FiltersApi - factory interface + * @export + */ +export const FiltersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = FiltersApiFp(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 {FiltersApiAddFilterRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addFilter(requestParameters: FiltersApiAddFilterRequest = {}, ): Promise { + return localVarFp.addFilter(requestParameters.AddFilterRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Marks a filter as deleted. + * @summary Delete a filter + * @param {FiltersApiDeleteFilterRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteFilter(requestParameters: FiltersApiDeleteFilterRequest, ): Promise { + return localVarFp.deleteFilter(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Marks multiple filters as deleted. + * @summary Delete multiple filters in bulk + * @param {FiltersApiDeleteFiltersRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteFilters(requestParameters: FiltersApiDeleteFiltersRequest, ): Promise { + return localVarFp.deleteFilters(requestParameters.ids, ).then((request) => request(axios, basePath)); + }, + /** + * Returns data about a specific filter. Note that this also returns the condition lines of the filter. + * @summary Get one filter + * @param {FiltersApiGetFilterRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getFilter(requestParameters: FiltersApiGetFilterRequest, ): Promise { + return localVarFp.getFilter(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * 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(): Promise { + return localVarFp.getFilterHelpers().then((request) => request(axios, basePath)); + }, + /** + * Returns data about all filters. + * @summary Get all filters + * @param {FiltersApiGetFiltersRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getFilters(requestParameters: FiltersApiGetFiltersRequest = {}, ): Promise { + return localVarFp.getFilters(requestParameters.type, ).then((request) => request(axios, basePath)); + }, + /** + * Updates an existing filter. + * @summary Update filter + * @param {FiltersApiUpdateFilterRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + updateFilter(requestParameters: FiltersApiUpdateFilterRequest, ): Promise { + return localVarFp.updateFilter(requestParameters.id, requestParameters.UpdateFilterRequest, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for addFilter operation in FiltersApi. + * @export + * @interface FiltersApiAddFilterRequest + */ +export interface FiltersApiAddFilterRequest { + /** + * + * @type {AddFilterRequest} + * @memberof FiltersApiAddFilter + */ + readonly AddFilterRequest?: AddFilterRequest +} + +/** + * Request parameters for deleteFilter operation in FiltersApi. + * @export + * @interface FiltersApiDeleteFilterRequest + */ +export interface FiltersApiDeleteFilterRequest { + /** + * The ID of the filter + * @type {number} + * @memberof FiltersApiDeleteFilter + */ + readonly id: number +} + +/** + * Request parameters for deleteFilters operation in FiltersApi. + * @export + * @interface FiltersApiDeleteFiltersRequest + */ +export interface FiltersApiDeleteFiltersRequest { + /** + * The comma-separated filter IDs to delete + * @type {string} + * @memberof FiltersApiDeleteFilters + */ + readonly ids: string +} + +/** + * Request parameters for getFilter operation in FiltersApi. + * @export + * @interface FiltersApiGetFilterRequest + */ +export interface FiltersApiGetFilterRequest { + /** + * The ID of the filter + * @type {number} + * @memberof FiltersApiGetFilter + */ + readonly id: number +} + +/** + * Request parameters for getFilters operation in FiltersApi. + * @export + * @interface FiltersApiGetFiltersRequest + */ +export interface FiltersApiGetFiltersRequest { + /** + * The types of filters to fetch + * @type {'deals' | 'leads' | 'org' | 'people' | 'products' | 'activity' | 'projects'} + * @memberof FiltersApiGetFilters + */ + readonly type?: 'deals' | 'leads' | 'org' | 'people' | 'products' | 'activity' | 'projects' +} + +/** + * Request parameters for updateFilter operation in FiltersApi. + * @export + * @interface FiltersApiUpdateFilterRequest + */ +export interface FiltersApiUpdateFilterRequest { + /** + * The ID of the filter + * @type {number} + * @memberof FiltersApiUpdateFilter + */ + readonly id: number + + /** + * + * @type {UpdateFilterRequest} + * @memberof FiltersApiUpdateFilter + */ + readonly UpdateFilterRequest?: UpdateFilterRequest +} + +/** + * FiltersApi - object-oriented interface + * @export + * @class FiltersApi + * @extends {BaseAPI} + */ +export class FiltersApi extends BaseAPI { + /** + * 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 {FiltersApiAddFilterRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof FiltersApi + */ + public addFilter(requestParameters: FiltersApiAddFilterRequest = {}, ) { + return FiltersApiFp(this.configuration).addFilter(requestParameters.AddFilterRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Marks a filter as deleted. + * @summary Delete a filter + * @param {FiltersApiDeleteFilterRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof FiltersApi + */ + public deleteFilter(requestParameters: FiltersApiDeleteFilterRequest, ) { + return FiltersApiFp(this.configuration).deleteFilter(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Marks multiple filters as deleted. + * @summary Delete multiple filters in bulk + * @param {FiltersApiDeleteFiltersRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof FiltersApi + */ + public deleteFilters(requestParameters: FiltersApiDeleteFiltersRequest, ) { + return FiltersApiFp(this.configuration).deleteFilters(requestParameters.ids, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about a specific filter. Note that this also returns the condition lines of the filter. + * @summary Get one filter + * @param {FiltersApiGetFilterRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof FiltersApi + */ + public getFilter(requestParameters: FiltersApiGetFilterRequest, ) { + return FiltersApiFp(this.configuration).getFilter(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * 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} + * @memberof FiltersApi + */ + public getFilterHelpers() { + return FiltersApiFp(this.configuration).getFilterHelpers().then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about all filters. + * @summary Get all filters + * @param {FiltersApiGetFiltersRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof FiltersApi + */ + public getFilters(requestParameters: FiltersApiGetFiltersRequest = {}, ) { + return FiltersApiFp(this.configuration).getFilters(requestParameters.type, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates an existing filter. + * @summary Update filter + * @param {FiltersApiUpdateFilterRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof FiltersApi + */ + public updateFilter(requestParameters: FiltersApiUpdateFilterRequest, ) { + return FiltersApiFp(this.configuration).updateFilter(requestParameters.id, requestParameters.UpdateFilterRequest, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/goals-api.ts b/api/goals-api.ts new file mode 100644 index 00000000..e9421ccc --- /dev/null +++ b/api/goals-api.ts @@ -0,0 +1,742 @@ +/* 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 { AddGoalRequest } from '../models'; +// @ts-ignore +import { AddOrUpdateGoalResponse200 } from '../models'; +// @ts-ignore +import { BasicGoalRequest } from '../models'; +// @ts-ignore +import { DeleteGoalResponse200 } from '../models'; +// @ts-ignore +import { GetGoalResultResponse200 } from '../models'; +// @ts-ignore +import { GetGoalsResponse200 } from '../models'; +/** + * GoalsApi - axios parameter creator + * @export + */ +export const GoalsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Adds a new goal. Along with adding a new goal, a report is created to track the progress of your goal. + * @summary Add a new goal + * @param {AddGoalRequest} [AddGoalRequest] + + * @throws {RequiredError} + */ + addGoal: async (AddGoalRequest?: AddGoalRequest, ): Promise => { + const localVarPath = `/goals`; + // 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", ["goals:full"], configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + localVarRequestOptions.data = serializeDataIfNeeded(AddGoalRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Marks a goal as deleted. + * @summary Delete existing goal + * @param {string} id The ID of the goal + + * @throws {RequiredError} + */ + deleteGoal: async (id: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteGoal', 'id', id) + const localVarPath = `/goals/{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", ["goals:full"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Gets the progress of a goal for the specified period. + * @summary Get result of a goal + * @param {string} id The ID of the goal that the results are looked for + * @param {string} period_start The start date of the period for which to find the goal\'s progress. Format: YYYY-MM-DD. This date must be the same or after the goal duration start date. + * @param {string} period_end The end date of the period for which to find the goal\'s progress. Format: YYYY-MM-DD. This date must be the same or before the goal duration end date. + + * @throws {RequiredError} + */ + getGoalResult: async (id: string, period_start: string, period_end: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getGoalResult', 'id', id) + // verify required parameter 'period_start' is not null or undefined + assertParamExists('getGoalResult', 'period_start', period_start) + // verify required parameter 'period_end' is not null or undefined + assertParamExists('getGoalResult', 'period_end', period_end) + const localVarPath = `/goals/{id}/results` + .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", ["goals:read", "goals:full"], configuration) + + if (period_start !== undefined) { + localVarQueryParameter['period.start'] = (period_start as any instanceof Date) ? + (period_start as any).toISOString().substr(0,10) : + period_start; + } + + if (period_end !== undefined) { + localVarQueryParameter['period.end'] = (period_end as any instanceof Date) ? + (period_end as any).toISOString().substr(0,10) : + period_end; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns data about goals based on criteria. For searching, append `{searchField}={searchValue}` to the URL, where `searchField` can be any one of the lowest-level fields in dot-notation (e.g. `type.params.pipeline_id`; `title`). `searchValue` should be the value you are looking for on that field. Additionally, `is_active=` can be provided to search for only active/inactive goals. When providing `period.start`, `period.end` must also be provided and vice versa. + * @summary Find goals + * @param {'deals_won' | 'deals_progressed' | 'activities_completed' | 'activities_added' | 'deals_started'} [type_name] The type of the goal. If provided, everyone\'s goals will be returned. + * @param {string} [title] The title of the goal + * @param {boolean} [is_active] Whether the goal is active or not + * @param {number} [assignee_id] The ID of the user who\'s goal to fetch. When omitted, only your goals will be returned. + * @param {'person' | 'company' | 'team'} [assignee_type] The type of the goal\'s assignee. If provided, everyone\'s goals will be returned. + * @param {number} [expected_outcome_target] The numeric value of the outcome. If provided, everyone\'s goals will be returned. + * @param {'quantity' | 'sum'} [expected_outcome_tracking_metric] The tracking metric of the expected outcome of the goal. If provided, everyone\'s goals will be returned. + * @param {number} [expected_outcome_currency_id] The numeric ID of the goal\'s currency. Only applicable to goals with `expected_outcome.tracking_metric` with value `sum`. If provided, everyone\'s goals will be returned. + * @param {Array} [type_params_pipeline_id] An array of pipeline IDs or `null` for all pipelines. If provided, everyone\'s goals will be returned. + * @param {number} [type_params_stage_id] The ID of the stage. Applicable to only `deals_progressed` type of goals. If provided, everyone\'s goals will be returned. + * @param {Array} [type_params_activity_type_id] An array of IDs or `null` for all activity types. Only applicable for `activities_completed` and/or `activities_added` types of goals. If provided, everyone\'s goals will be returned. + * @param {string} [period_start] The start date of the period for which to find goals. Date in format of YYYY-MM-DD. When `period.start` is provided, `period.end` must be provided too. + * @param {string} [period_end] The end date of the period for which to find goals. Date in format of YYYY-MM-DD. + + * @throws {RequiredError} + */ + getGoals: async (type_name?: 'deals_won' | 'deals_progressed' | 'activities_completed' | 'activities_added' | 'deals_started', title?: string, is_active?: boolean, assignee_id?: number, assignee_type?: 'person' | 'company' | 'team', expected_outcome_target?: number, expected_outcome_tracking_metric?: 'quantity' | 'sum', expected_outcome_currency_id?: number, type_params_pipeline_id?: Array, type_params_stage_id?: number, type_params_activity_type_id?: Array, period_start?: string, period_end?: string, ): Promise => { + const localVarPath = `/goals/find`; + // 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", ["goals:read", "goals:full"], configuration) + + if (type_name !== undefined) { + localVarQueryParameter['type.name'] = type_name; + } + + if (title !== undefined) { + localVarQueryParameter['title'] = title; + } + + if (is_active !== undefined) { + localVarQueryParameter['is_active'] = is_active; + } + + if (assignee_id !== undefined) { + localVarQueryParameter['assignee.id'] = assignee_id; + } + + if (assignee_type !== undefined) { + localVarQueryParameter['assignee.type'] = assignee_type; + } + + if (expected_outcome_target !== undefined) { + localVarQueryParameter['expected_outcome.target'] = expected_outcome_target; + } + + if (expected_outcome_tracking_metric !== undefined) { + localVarQueryParameter['expected_outcome.tracking_metric'] = expected_outcome_tracking_metric; + } + + if (expected_outcome_currency_id !== undefined) { + localVarQueryParameter['expected_outcome.currency_id'] = expected_outcome_currency_id; + } + + if (type_params_pipeline_id) { + localVarQueryParameter['type.params.pipeline_id'] = type_params_pipeline_id; + } + + if (type_params_stage_id !== undefined) { + localVarQueryParameter['type.params.stage_id'] = type_params_stage_id; + } + + if (type_params_activity_type_id) { + localVarQueryParameter['type.params.activity_type_id'] = type_params_activity_type_id; + } + + if (period_start !== undefined) { + localVarQueryParameter['period.start'] = (period_start as any instanceof Date) ? + (period_start as any).toISOString().substr(0,10) : + period_start; + } + + if (period_end !== undefined) { + localVarQueryParameter['period.end'] = (period_end as any instanceof Date) ? + (period_end as any).toISOString().substr(0,10) : + period_end; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Updates an existing goal. + * @summary Update existing goal + * @param {string} id The ID of the goal + * @param {BasicGoalRequest} [BasicGoalRequest] + + * @throws {RequiredError} + */ + updateGoal: async (id: string, BasicGoalRequest?: BasicGoalRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updateGoal', 'id', id) + const localVarPath = `/goals/{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", ["goals:full"], configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + localVarRequestOptions.data = serializeDataIfNeeded(BasicGoalRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * GoalsApi - functional programming interface + * @export + */ +export const GoalsApiFp = 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 = GoalsApiAxiosParamCreator(configuration) + return { + /** + * Adds a new goal. Along with adding a new goal, a report is created to track the progress of your goal. + * @summary Add a new goal + * @param {AddGoalRequest} [AddGoalRequest] + + * @throws {RequiredError} + */ + async addGoal(AddGoalRequest?: AddGoalRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addGoal(AddGoalRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Marks a goal as deleted. + * @summary Delete existing goal + * @param {string} id The ID of the goal + + * @throws {RequiredError} + */ + async deleteGoal(id: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteGoal(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Gets the progress of a goal for the specified period. + * @summary Get result of a goal + * @param {string} id The ID of the goal that the results are looked for + * @param {string} period_start The start date of the period for which to find the goal\'s progress. Format: YYYY-MM-DD. This date must be the same or after the goal duration start date. + * @param {string} period_end The end date of the period for which to find the goal\'s progress. Format: YYYY-MM-DD. This date must be the same or before the goal duration end date. + + * @throws {RequiredError} + */ + async getGoalResult(id: string, period_start: string, period_end: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getGoalResult(id, period_start, period_end, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns data about goals based on criteria. For searching, append `{searchField}={searchValue}` to the URL, where `searchField` can be any one of the lowest-level fields in dot-notation (e.g. `type.params.pipeline_id`; `title`). `searchValue` should be the value you are looking for on that field. Additionally, `is_active=` can be provided to search for only active/inactive goals. When providing `period.start`, `period.end` must also be provided and vice versa. + * @summary Find goals + * @param {'deals_won' | 'deals_progressed' | 'activities_completed' | 'activities_added' | 'deals_started'} [type_name] The type of the goal. If provided, everyone\'s goals will be returned. + * @param {string} [title] The title of the goal + * @param {boolean} [is_active] Whether the goal is active or not + * @param {number} [assignee_id] The ID of the user who\'s goal to fetch. When omitted, only your goals will be returned. + * @param {'person' | 'company' | 'team'} [assignee_type] The type of the goal\'s assignee. If provided, everyone\'s goals will be returned. + * @param {number} [expected_outcome_target] The numeric value of the outcome. If provided, everyone\'s goals will be returned. + * @param {'quantity' | 'sum'} [expected_outcome_tracking_metric] The tracking metric of the expected outcome of the goal. If provided, everyone\'s goals will be returned. + * @param {number} [expected_outcome_currency_id] The numeric ID of the goal\'s currency. Only applicable to goals with `expected_outcome.tracking_metric` with value `sum`. If provided, everyone\'s goals will be returned. + * @param {Array} [type_params_pipeline_id] An array of pipeline IDs or `null` for all pipelines. If provided, everyone\'s goals will be returned. + * @param {number} [type_params_stage_id] The ID of the stage. Applicable to only `deals_progressed` type of goals. If provided, everyone\'s goals will be returned. + * @param {Array} [type_params_activity_type_id] An array of IDs or `null` for all activity types. Only applicable for `activities_completed` and/or `activities_added` types of goals. If provided, everyone\'s goals will be returned. + * @param {string} [period_start] The start date of the period for which to find goals. Date in format of YYYY-MM-DD. When `period.start` is provided, `period.end` must be provided too. + * @param {string} [period_end] The end date of the period for which to find goals. Date in format of YYYY-MM-DD. + + * @throws {RequiredError} + */ + async getGoals(type_name?: 'deals_won' | 'deals_progressed' | 'activities_completed' | 'activities_added' | 'deals_started', title?: string, is_active?: boolean, assignee_id?: number, assignee_type?: 'person' | 'company' | 'team', expected_outcome_target?: number, expected_outcome_tracking_metric?: 'quantity' | 'sum', expected_outcome_currency_id?: number, type_params_pipeline_id?: Array, type_params_stage_id?: number, type_params_activity_type_id?: Array, period_start?: string, period_end?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getGoals(type_name, title, is_active, assignee_id, assignee_type, expected_outcome_target, expected_outcome_tracking_metric, expected_outcome_currency_id, type_params_pipeline_id, type_params_stage_id, type_params_activity_type_id, period_start, period_end, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates an existing goal. + * @summary Update existing goal + * @param {string} id The ID of the goal + * @param {BasicGoalRequest} [BasicGoalRequest] + + * @throws {RequiredError} + */ + async updateGoal(id: string, BasicGoalRequest?: BasicGoalRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateGoal(id, BasicGoalRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * GoalsApi - factory interface + * @export + */ +export const GoalsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = GoalsApiFp(configuration) + return { + /** + * Adds a new goal. Along with adding a new goal, a report is created to track the progress of your goal. + * @summary Add a new goal + * @param {GoalsApiAddGoalRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addGoal(requestParameters: GoalsApiAddGoalRequest = {}, ): Promise { + return localVarFp.addGoal(requestParameters.AddGoalRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Marks a goal as deleted. + * @summary Delete existing goal + * @param {GoalsApiDeleteGoalRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteGoal(requestParameters: GoalsApiDeleteGoalRequest, ): Promise { + return localVarFp.deleteGoal(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Gets the progress of a goal for the specified period. + * @summary Get result of a goal + * @param {GoalsApiGetGoalResultRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getGoalResult(requestParameters: GoalsApiGetGoalResultRequest, ): Promise { + return localVarFp.getGoalResult(requestParameters.id, requestParameters.period_start, requestParameters.period_end, ).then((request) => request(axios, basePath)); + }, + /** + * Returns data about goals based on criteria. For searching, append `{searchField}={searchValue}` to the URL, where `searchField` can be any one of the lowest-level fields in dot-notation (e.g. `type.params.pipeline_id`; `title`). `searchValue` should be the value you are looking for on that field. Additionally, `is_active=` can be provided to search for only active/inactive goals. When providing `period.start`, `period.end` must also be provided and vice versa. + * @summary Find goals + * @param {GoalsApiGetGoalsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getGoals(requestParameters: GoalsApiGetGoalsRequest = {}, ): Promise { + return localVarFp.getGoals(requestParameters.type_name, requestParameters.title, requestParameters.is_active, requestParameters.assignee_id, requestParameters.assignee_type, requestParameters.expected_outcome_target, requestParameters.expected_outcome_tracking_metric, requestParameters.expected_outcome_currency_id, requestParameters.type_params_pipeline_id, requestParameters.type_params_stage_id, requestParameters.type_params_activity_type_id, requestParameters.period_start, requestParameters.period_end, ).then((request) => request(axios, basePath)); + }, + /** + * Updates an existing goal. + * @summary Update existing goal + * @param {GoalsApiUpdateGoalRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + updateGoal(requestParameters: GoalsApiUpdateGoalRequest, ): Promise { + return localVarFp.updateGoal(requestParameters.id, requestParameters.BasicGoalRequest, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for addGoal operation in GoalsApi. + * @export + * @interface GoalsApiAddGoalRequest + */ +export interface GoalsApiAddGoalRequest { + /** + * + * @type {AddGoalRequest} + * @memberof GoalsApiAddGoal + */ + readonly AddGoalRequest?: AddGoalRequest +} + +/** + * Request parameters for deleteGoal operation in GoalsApi. + * @export + * @interface GoalsApiDeleteGoalRequest + */ +export interface GoalsApiDeleteGoalRequest { + /** + * The ID of the goal + * @type {string} + * @memberof GoalsApiDeleteGoal + */ + readonly id: string +} + +/** + * Request parameters for getGoalResult operation in GoalsApi. + * @export + * @interface GoalsApiGetGoalResultRequest + */ +export interface GoalsApiGetGoalResultRequest { + /** + * The ID of the goal that the results are looked for + * @type {string} + * @memberof GoalsApiGetGoalResult + */ + readonly id: string + + /** + * The start date of the period for which to find the goal\'s progress. Format: YYYY-MM-DD. This date must be the same or after the goal duration start date. + * @type {string} + * @memberof GoalsApiGetGoalResult + */ + readonly period_start: string + + /** + * The end date of the period for which to find the goal\'s progress. Format: YYYY-MM-DD. This date must be the same or before the goal duration end date. + * @type {string} + * @memberof GoalsApiGetGoalResult + */ + readonly period_end: string +} + +/** + * Request parameters for getGoals operation in GoalsApi. + * @export + * @interface GoalsApiGetGoalsRequest + */ +export interface GoalsApiGetGoalsRequest { + /** + * The type of the goal. If provided, everyone\'s goals will be returned. + * @type {'deals_won' | 'deals_progressed' | 'activities_completed' | 'activities_added' | 'deals_started'} + * @memberof GoalsApiGetGoals + */ + readonly type_name?: 'deals_won' | 'deals_progressed' | 'activities_completed' | 'activities_added' | 'deals_started' + + /** + * The title of the goal + * @type {string} + * @memberof GoalsApiGetGoals + */ + readonly title?: string + + /** + * Whether the goal is active or not + * @type {boolean} + * @memberof GoalsApiGetGoals + */ + readonly is_active?: boolean + + /** + * The ID of the user who\'s goal to fetch. When omitted, only your goals will be returned. + * @type {number} + * @memberof GoalsApiGetGoals + */ + readonly assignee_id?: number + + /** + * The type of the goal\'s assignee. If provided, everyone\'s goals will be returned. + * @type {'person' | 'company' | 'team'} + * @memberof GoalsApiGetGoals + */ + readonly assignee_type?: 'person' | 'company' | 'team' + + /** + * The numeric value of the outcome. If provided, everyone\'s goals will be returned. + * @type {number} + * @memberof GoalsApiGetGoals + */ + readonly expected_outcome_target?: number + + /** + * The tracking metric of the expected outcome of the goal. If provided, everyone\'s goals will be returned. + * @type {'quantity' | 'sum'} + * @memberof GoalsApiGetGoals + */ + readonly expected_outcome_tracking_metric?: 'quantity' | 'sum' + + /** + * The numeric ID of the goal\'s currency. Only applicable to goals with `expected_outcome.tracking_metric` with value `sum`. If provided, everyone\'s goals will be returned. + * @type {number} + * @memberof GoalsApiGetGoals + */ + readonly expected_outcome_currency_id?: number + + /** + * An array of pipeline IDs or `null` for all pipelines. If provided, everyone\'s goals will be returned. + * @type {Array} + * @memberof GoalsApiGetGoals + */ + readonly type_params_pipeline_id?: Array + + /** + * The ID of the stage. Applicable to only `deals_progressed` type of goals. If provided, everyone\'s goals will be returned. + * @type {number} + * @memberof GoalsApiGetGoals + */ + readonly type_params_stage_id?: number + + /** + * An array of IDs or `null` for all activity types. Only applicable for `activities_completed` and/or `activities_added` types of goals. If provided, everyone\'s goals will be returned. + * @type {Array} + * @memberof GoalsApiGetGoals + */ + readonly type_params_activity_type_id?: Array + + /** + * The start date of the period for which to find goals. Date in format of YYYY-MM-DD. When `period.start` is provided, `period.end` must be provided too. + * @type {string} + * @memberof GoalsApiGetGoals + */ + readonly period_start?: string + + /** + * The end date of the period for which to find goals. Date in format of YYYY-MM-DD. + * @type {string} + * @memberof GoalsApiGetGoals + */ + readonly period_end?: string +} + +/** + * Request parameters for updateGoal operation in GoalsApi. + * @export + * @interface GoalsApiUpdateGoalRequest + */ +export interface GoalsApiUpdateGoalRequest { + /** + * The ID of the goal + * @type {string} + * @memberof GoalsApiUpdateGoal + */ + readonly id: string + + /** + * + * @type {BasicGoalRequest} + * @memberof GoalsApiUpdateGoal + */ + readonly BasicGoalRequest?: BasicGoalRequest +} + +/** + * GoalsApi - object-oriented interface + * @export + * @class GoalsApi + * @extends {BaseAPI} + */ +export class GoalsApi extends BaseAPI { + /** + * Adds a new goal. Along with adding a new goal, a report is created to track the progress of your goal. + * @summary Add a new goal + * @param {GoalsApiAddGoalRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof GoalsApi + */ + public addGoal(requestParameters: GoalsApiAddGoalRequest = {}, ) { + return GoalsApiFp(this.configuration).addGoal(requestParameters.AddGoalRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Marks a goal as deleted. + * @summary Delete existing goal + * @param {GoalsApiDeleteGoalRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof GoalsApi + */ + public deleteGoal(requestParameters: GoalsApiDeleteGoalRequest, ) { + return GoalsApiFp(this.configuration).deleteGoal(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Gets the progress of a goal for the specified period. + * @summary Get result of a goal + * @param {GoalsApiGetGoalResultRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof GoalsApi + */ + public getGoalResult(requestParameters: GoalsApiGetGoalResultRequest, ) { + return GoalsApiFp(this.configuration).getGoalResult(requestParameters.id, requestParameters.period_start, requestParameters.period_end, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about goals based on criteria. For searching, append `{searchField}={searchValue}` to the URL, where `searchField` can be any one of the lowest-level fields in dot-notation (e.g. `type.params.pipeline_id`; `title`). `searchValue` should be the value you are looking for on that field. Additionally, `is_active=` can be provided to search for only active/inactive goals. When providing `period.start`, `period.end` must also be provided and vice versa. + * @summary Find goals + * @param {GoalsApiGetGoalsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof GoalsApi + */ + public getGoals(requestParameters: GoalsApiGetGoalsRequest = {}, ) { + return GoalsApiFp(this.configuration).getGoals(requestParameters.type_name, requestParameters.title, requestParameters.is_active, requestParameters.assignee_id, requestParameters.assignee_type, requestParameters.expected_outcome_target, requestParameters.expected_outcome_tracking_metric, requestParameters.expected_outcome_currency_id, requestParameters.type_params_pipeline_id, requestParameters.type_params_stage_id, requestParameters.type_params_activity_type_id, requestParameters.period_start, requestParameters.period_end, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates an existing goal. + * @summary Update existing goal + * @param {GoalsApiUpdateGoalRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof GoalsApi + */ + public updateGoal(requestParameters: GoalsApiUpdateGoalRequest, ) { + return GoalsApiFp(this.configuration).updateGoal(requestParameters.id, requestParameters.BasicGoalRequest, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/item-search-api.ts b/api/item-search-api.ts new file mode 100644 index 00000000..538d2723 --- /dev/null +++ b/api/item-search-api.ts @@ -0,0 +1,442 @@ +/* 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 { SearchItemByFieldResponse200 } from '../models'; +// @ts-ignore +import { SearchItemResponse200 } from '../models'; +/** + * ItemSearchApi - axios parameter creator + * @export + */ +export const ItemSearchApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Performs a search from your choice of item types and fields. + * @summary Perform a search from multiple item types + * @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 {'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project'} [item_types] A comma-separated string array. The type of items to perform the search from. Defaults to all. + * @param {'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'organization_name' | 'person_name' | 'phone' | 'title' | 'description'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all. Relevant for each item type are:<br> <table> <tr><th><b>Item type</b></th><th><b>Field</b></th></tr> <tr><td>Deal</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>Person</td><td>`custom_fields`, `email`, `name`, `notes`, `phone`</td></tr> <tr><td>Organization</td><td>`address`, `custom_fields`, `name`, `notes`</td></tr> <tr><td>Product</td><td>`code`, `custom_fields`, `name`</td></tr> <tr><td>Lead</td><td>`custom_fields`, `notes`, `email`, `organization_name`, `person_name`, `phone`, `title`</td></tr> <tr><td>File</td><td>`name`</td></tr> <tr><td>Mail attachment</td><td>`name`</td></tr> <tr><td>Project</td><td> `custom_fields`, `notes`, `title`, `description` </td></tr> </table> <br> 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>.<br/> When searching for leads, the email, organization_name, person_name, and phone fields will return results only for leads not linked to contacts. For searching leads by person or organization values, please use `search_for_related_items`. + * @param {boolean} [search_for_related_items] When enabled, the response will include up to 100 newest related leads and 100 newest related deals for each found person and organization and up to 100 newest related persons for each found organization + * @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. + * @param {'deal.cc_email' | 'person.picture' | 'product.price'} [include_fields] A comma-separated string array. 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} + */ + searchItem: async (term: string, item_types?: 'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project', fields?: 'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'organization_name' | 'person_name' | 'phone' | 'title' | 'description', search_for_related_items?: boolean, exact_match?: boolean, include_fields?: 'deal.cc_email' | 'person.picture' | 'product.price', start?: number, limit?: number, ): Promise => { + // verify required parameter 'term' is not null or undefined + assertParamExists('searchItem', 'term', term) + const localVarPath = `/itemSearch`; + // 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", ["search:read"], configuration) + + if (term !== undefined) { + localVarQueryParameter['term'] = term; + } + + if (item_types !== undefined) { + localVarQueryParameter['item_types'] = item_types; + } + + if (fields !== undefined) { + localVarQueryParameter['fields'] = fields; + } + + if (search_for_related_items !== undefined) { + localVarQueryParameter['search_for_related_items'] = search_for_related_items; + } + + if (exact_match !== undefined) { + localVarQueryParameter['exact_match'] = exact_match; + } + + 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, + }; + }, + /** + * Performs a search from the values of a specific field. Results can either be the distinct values of the field (useful for searching autocomplete field values), or the IDs of actual items (deals, leads, persons, organizations or products). + * @summary Perform a search using a specific field from an item type + * @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 {'dealField' | 'leadField' | 'personField' | 'organizationField' | 'productField' | 'projectField'} field_type The type of the field to perform the search from + * @param {string} field_key The key of the field to search from. The field key can be obtained by fetching the list of the fields using any of the fields\' API GET methods (dealFields, personFields, etc.). 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. The search <b>is</b> case sensitive. + * @param {boolean} [return_item_ids] Whether to return the IDs of the matching items or not. When not set or set to `0` or `false`, only distinct values of the searched field are returned. When set to `1` or `true`, the ID of each found item is returned. + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + searchItemByField: async (term: string, field_type: 'dealField' | 'leadField' | 'personField' | 'organizationField' | 'productField' | 'projectField', field_key: string, exact_match?: boolean, return_item_ids?: boolean, start?: number, limit?: number, ): Promise => { + // verify required parameter 'term' is not null or undefined + assertParamExists('searchItemByField', 'term', term) + // verify required parameter 'field_type' is not null or undefined + assertParamExists('searchItemByField', 'field_type', field_type) + // verify required parameter 'field_key' is not null or undefined + assertParamExists('searchItemByField', 'field_key', field_key) + const localVarPath = `/itemSearch/field`; + // 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", ["search:read"], configuration) + + if (term !== undefined) { + localVarQueryParameter['term'] = term; + } + + if (field_type !== undefined) { + localVarQueryParameter['field_type'] = field_type; + } + + if (exact_match !== undefined) { + localVarQueryParameter['exact_match'] = exact_match; + } + + if (field_key !== undefined) { + localVarQueryParameter['field_key'] = field_key; + } + + if (return_item_ids !== undefined) { + localVarQueryParameter['return_item_ids'] = return_item_ids; + } + + 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, + }; + }, + } +}; + +/** + * ItemSearchApi - functional programming interface + * @export + */ +export const ItemSearchApiFp = 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 = ItemSearchApiAxiosParamCreator(configuration) + return { + /** + * Performs a search from your choice of item types and fields. + * @summary Perform a search from multiple item types + * @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 {'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project'} [item_types] A comma-separated string array. The type of items to perform the search from. Defaults to all. + * @param {'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'organization_name' | 'person_name' | 'phone' | 'title' | 'description'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all. Relevant for each item type are:<br> <table> <tr><th><b>Item type</b></th><th><b>Field</b></th></tr> <tr><td>Deal</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>Person</td><td>`custom_fields`, `email`, `name`, `notes`, `phone`</td></tr> <tr><td>Organization</td><td>`address`, `custom_fields`, `name`, `notes`</td></tr> <tr><td>Product</td><td>`code`, `custom_fields`, `name`</td></tr> <tr><td>Lead</td><td>`custom_fields`, `notes`, `email`, `organization_name`, `person_name`, `phone`, `title`</td></tr> <tr><td>File</td><td>`name`</td></tr> <tr><td>Mail attachment</td><td>`name`</td></tr> <tr><td>Project</td><td> `custom_fields`, `notes`, `title`, `description` </td></tr> </table> <br> 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>.<br/> When searching for leads, the email, organization_name, person_name, and phone fields will return results only for leads not linked to contacts. For searching leads by person or organization values, please use `search_for_related_items`. + * @param {boolean} [search_for_related_items] When enabled, the response will include up to 100 newest related leads and 100 newest related deals for each found person and organization and up to 100 newest related persons for each found organization + * @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. + * @param {'deal.cc_email' | 'person.picture' | 'product.price'} [include_fields] A comma-separated string array. 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 searchItem(term: string, item_types?: 'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project', fields?: 'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'organization_name' | 'person_name' | 'phone' | 'title' | 'description', search_for_related_items?: boolean, exact_match?: boolean, include_fields?: 'deal.cc_email' | 'person.picture' | 'product.price', start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.searchItem(term, item_types, fields, search_for_related_items, exact_match, include_fields, start, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Performs a search from the values of a specific field. Results can either be the distinct values of the field (useful for searching autocomplete field values), or the IDs of actual items (deals, leads, persons, organizations or products). + * @summary Perform a search using a specific field from an item type + * @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 {'dealField' | 'leadField' | 'personField' | 'organizationField' | 'productField' | 'projectField'} field_type The type of the field to perform the search from + * @param {string} field_key The key of the field to search from. The field key can be obtained by fetching the list of the fields using any of the fields\' API GET methods (dealFields, personFields, etc.). 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. The search <b>is</b> case sensitive. + * @param {boolean} [return_item_ids] Whether to return the IDs of the matching items or not. When not set or set to `0` or `false`, only distinct values of the searched field are returned. When set to `1` or `true`, the ID of each found item is returned. + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + async searchItemByField(term: string, field_type: 'dealField' | 'leadField' | 'personField' | 'organizationField' | 'productField' | 'projectField', field_key: string, exact_match?: boolean, return_item_ids?: boolean, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.searchItemByField(term, field_type, field_key, exact_match, return_item_ids, start, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * ItemSearchApi - factory interface + * @export + */ +export const ItemSearchApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ItemSearchApiFp(configuration) + return { + /** + * Performs a search from your choice of item types and fields. + * @summary Perform a search from multiple item types + * @param {ItemSearchApiSearchItemRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + searchItem(requestParameters: ItemSearchApiSearchItemRequest, ): Promise { + return localVarFp.searchItem(requestParameters.term, requestParameters.item_types, requestParameters.fields, requestParameters.search_for_related_items, requestParameters.exact_match, requestParameters.include_fields, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + /** + * Performs a search from the values of a specific field. Results can either be the distinct values of the field (useful for searching autocomplete field values), or the IDs of actual items (deals, leads, persons, organizations or products). + * @summary Perform a search using a specific field from an item type + * @param {ItemSearchApiSearchItemByFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + searchItemByField(requestParameters: ItemSearchApiSearchItemByFieldRequest, ): Promise { + return localVarFp.searchItemByField(requestParameters.term, requestParameters.field_type, requestParameters.field_key, requestParameters.exact_match, requestParameters.return_item_ids, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for searchItem operation in ItemSearchApi. + * @export + * @interface ItemSearchApiSearchItemRequest + */ +export interface ItemSearchApiSearchItemRequest { + /** + * 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 ItemSearchApiSearchItem + */ + readonly term: string + + /** + * A comma-separated string array. The type of items to perform the search from. Defaults to all. + * @type {'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project'} + * @memberof ItemSearchApiSearchItem + */ + readonly item_types?: 'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project' + + /** + * A comma-separated string array. The fields to perform the search from. Defaults to all. Relevant for each item type are:<br> <table> <tr><th><b>Item type</b></th><th><b>Field</b></th></tr> <tr><td>Deal</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>Person</td><td>`custom_fields`, `email`, `name`, `notes`, `phone`</td></tr> <tr><td>Organization</td><td>`address`, `custom_fields`, `name`, `notes`</td></tr> <tr><td>Product</td><td>`code`, `custom_fields`, `name`</td></tr> <tr><td>Lead</td><td>`custom_fields`, `notes`, `email`, `organization_name`, `person_name`, `phone`, `title`</td></tr> <tr><td>File</td><td>`name`</td></tr> <tr><td>Mail attachment</td><td>`name`</td></tr> <tr><td>Project</td><td> `custom_fields`, `notes`, `title`, `description` </td></tr> </table> <br> 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>.<br/> When searching for leads, the email, organization_name, person_name, and phone fields will return results only for leads not linked to contacts. For searching leads by person or organization values, please use `search_for_related_items`. + * @type {'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'organization_name' | 'person_name' | 'phone' | 'title' | 'description'} + * @memberof ItemSearchApiSearchItem + */ + readonly fields?: 'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'organization_name' | 'person_name' | 'phone' | 'title' | 'description' + + /** + * When enabled, the response will include up to 100 newest related leads and 100 newest related deals for each found person and organization and up to 100 newest related persons for each found organization + * @type {boolean} + * @memberof ItemSearchApiSearchItem + */ + readonly search_for_related_items?: boolean + + /** + * When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. + * @type {boolean} + * @memberof ItemSearchApiSearchItem + */ + readonly exact_match?: boolean + + /** + * A comma-separated string array. Supports including optional fields in the results which are not provided by default. + * @type {'deal.cc_email' | 'person.picture' | 'product.price'} + * @memberof ItemSearchApiSearchItem + */ + readonly include_fields?: 'deal.cc_email' | 'person.picture' | 'product.price' + + /** + * 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 ItemSearchApiSearchItem + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof ItemSearchApiSearchItem + */ + readonly limit?: number +} + +/** + * Request parameters for searchItemByField operation in ItemSearchApi. + * @export + * @interface ItemSearchApiSearchItemByFieldRequest + */ +export interface ItemSearchApiSearchItemByFieldRequest { + /** + * 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 ItemSearchApiSearchItemByField + */ + readonly term: string + + /** + * The type of the field to perform the search from + * @type {'dealField' | 'leadField' | 'personField' | 'organizationField' | 'productField' | 'projectField'} + * @memberof ItemSearchApiSearchItemByField + */ + readonly field_type: 'dealField' | 'leadField' | 'personField' | 'organizationField' | 'productField' | 'projectField' + + /** + * The key of the field to search from. The field key can be obtained by fetching the list of the fields using any of the fields\' API GET methods (dealFields, personFields, etc.). 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 {string} + * @memberof ItemSearchApiSearchItemByField + */ + readonly field_key: string + + /** + * When enabled, only full exact matches against the given term are returned. The search <b>is</b> case sensitive. + * @type {boolean} + * @memberof ItemSearchApiSearchItemByField + */ + readonly exact_match?: boolean + + /** + * Whether to return the IDs of the matching items or not. When not set or set to `0` or `false`, only distinct values of the searched field are returned. When set to `1` or `true`, the ID of each found item is returned. + * @type {boolean} + * @memberof ItemSearchApiSearchItemByField + */ + readonly return_item_ids?: boolean + + /** + * Pagination start + * @type {number} + * @memberof ItemSearchApiSearchItemByField + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof ItemSearchApiSearchItemByField + */ + readonly limit?: number +} + +/** + * ItemSearchApi - object-oriented interface + * @export + * @class ItemSearchApi + * @extends {BaseAPI} + */ +export class ItemSearchApi extends BaseAPI { + /** + * Performs a search from your choice of item types and fields. + * @summary Perform a search from multiple item types + * @param {ItemSearchApiSearchItemRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ItemSearchApi + */ + public searchItem(requestParameters: ItemSearchApiSearchItemRequest, ) { + return ItemSearchApiFp(this.configuration).searchItem(requestParameters.term, requestParameters.item_types, requestParameters.fields, requestParameters.search_for_related_items, requestParameters.exact_match, requestParameters.include_fields, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Performs a search from the values of a specific field. Results can either be the distinct values of the field (useful for searching autocomplete field values), or the IDs of actual items (deals, leads, persons, organizations or products). + * @summary Perform a search using a specific field from an item type + * @param {ItemSearchApiSearchItemByFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ItemSearchApi + */ + public searchItemByField(requestParameters: ItemSearchApiSearchItemByFieldRequest, ) { + return ItemSearchApiFp(this.configuration).searchItemByField(requestParameters.term, requestParameters.field_type, requestParameters.field_key, requestParameters.exact_match, requestParameters.return_item_ids, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/lead-labels-api.ts b/api/lead-labels-api.ts new file mode 100644 index 00000000..5003f833 --- /dev/null +++ b/api/lead-labels-api.ts @@ -0,0 +1,438 @@ +/* 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 { AddLeadLabelRequest } from '../models'; +// @ts-ignore +import { AddOrUpdateLeadLabelResponse200 } from '../models'; +// @ts-ignore +import { GetLeadLabelsResponse200 } from '../models'; +// @ts-ignore +import { LeadIdResponse200 } from '../models'; +// @ts-ignore +import { LeadResponse404 } from '../models'; +// @ts-ignore +import { UpdateLeadLabelRequest } from '../models'; +/** + * LeadLabelsApi - axios parameter creator + * @export + */ +export const LeadLabelsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Creates a lead label. + * @summary Add a lead label + * @param {AddLeadLabelRequest} [AddLeadLabelRequest] + + * @throws {RequiredError} + */ + addLeadLabel: async (AddLeadLabelRequest?: AddLeadLabelRequest, ): Promise => { + const localVarPath = `/leadLabels`; + // 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", ["leads:full"], configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + localVarRequestOptions.data = serializeDataIfNeeded(AddLeadLabelRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Deletes a specific lead label. + * @summary Delete a lead label + * @param {string} id The ID of the lead label + + * @throws {RequiredError} + */ + deleteLeadLabel: async (id: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteLeadLabel', 'id', id) + const localVarPath = `/leadLabels/{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", ["leads:full"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns details of all lead labels. This endpoint does not support pagination and all labels are always returned. + * @summary Get all lead labels + + * @throws {RequiredError} + */ + getLeadLabels: async (): Promise => { + const localVarPath = `/leadLabels`; + // 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", ["leads:read", "leads:full"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Updates one or more properties of a lead label. Only properties included in the request will be updated. + * @summary Update a lead label + * @param {string} id The ID of the lead label + * @param {UpdateLeadLabelRequest} [UpdateLeadLabelRequest] + + * @throws {RequiredError} + */ + updateLeadLabel: async (id: string, UpdateLeadLabelRequest?: UpdateLeadLabelRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updateLeadLabel', 'id', id) + const localVarPath = `/leadLabels/{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: 'PATCH', ...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", ["leads:full"], configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + localVarRequestOptions.data = serializeDataIfNeeded(UpdateLeadLabelRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * LeadLabelsApi - functional programming interface + * @export + */ +export const LeadLabelsApiFp = 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 = LeadLabelsApiAxiosParamCreator(configuration) + return { + /** + * Creates a lead label. + * @summary Add a lead label + * @param {AddLeadLabelRequest} [AddLeadLabelRequest] + + * @throws {RequiredError} + */ + async addLeadLabel(AddLeadLabelRequest?: AddLeadLabelRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addLeadLabel(AddLeadLabelRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Deletes a specific lead label. + * @summary Delete a lead label + * @param {string} id The ID of the lead label + + * @throws {RequiredError} + */ + async deleteLeadLabel(id: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteLeadLabel(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns details of all lead labels. This endpoint does not support pagination and all labels are always returned. + * @summary Get all lead labels + + * @throws {RequiredError} + */ + async getLeadLabels(): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeadLabels(); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates one or more properties of a lead label. Only properties included in the request will be updated. + * @summary Update a lead label + * @param {string} id The ID of the lead label + * @param {UpdateLeadLabelRequest} [UpdateLeadLabelRequest] + + * @throws {RequiredError} + */ + async updateLeadLabel(id: string, UpdateLeadLabelRequest?: UpdateLeadLabelRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateLeadLabel(id, UpdateLeadLabelRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * LeadLabelsApi - factory interface + * @export + */ +export const LeadLabelsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = LeadLabelsApiFp(configuration) + return { + /** + * Creates a lead label. + * @summary Add a lead label + * @param {LeadLabelsApiAddLeadLabelRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addLeadLabel(requestParameters: LeadLabelsApiAddLeadLabelRequest = {}, ): Promise { + return localVarFp.addLeadLabel(requestParameters.AddLeadLabelRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Deletes a specific lead label. + * @summary Delete a lead label + * @param {LeadLabelsApiDeleteLeadLabelRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteLeadLabel(requestParameters: LeadLabelsApiDeleteLeadLabelRequest, ): Promise { + return localVarFp.deleteLeadLabel(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns details of all lead labels. This endpoint does not support pagination and all labels are always returned. + * @summary Get all lead labels + + * @throws {RequiredError} + */ + getLeadLabels(): Promise { + return localVarFp.getLeadLabels().then((request) => request(axios, basePath)); + }, + /** + * Updates one or more properties of a lead label. Only properties included in the request will be updated. + * @summary Update a lead label + * @param {LeadLabelsApiUpdateLeadLabelRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + updateLeadLabel(requestParameters: LeadLabelsApiUpdateLeadLabelRequest, ): Promise { + return localVarFp.updateLeadLabel(requestParameters.id, requestParameters.UpdateLeadLabelRequest, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for addLeadLabel operation in LeadLabelsApi. + * @export + * @interface LeadLabelsApiAddLeadLabelRequest + */ +export interface LeadLabelsApiAddLeadLabelRequest { + /** + * + * @type {AddLeadLabelRequest} + * @memberof LeadLabelsApiAddLeadLabel + */ + readonly AddLeadLabelRequest?: AddLeadLabelRequest +} + +/** + * Request parameters for deleteLeadLabel operation in LeadLabelsApi. + * @export + * @interface LeadLabelsApiDeleteLeadLabelRequest + */ +export interface LeadLabelsApiDeleteLeadLabelRequest { + /** + * The ID of the lead label + * @type {string} + * @memberof LeadLabelsApiDeleteLeadLabel + */ + readonly id: string +} + +/** + * Request parameters for updateLeadLabel operation in LeadLabelsApi. + * @export + * @interface LeadLabelsApiUpdateLeadLabelRequest + */ +export interface LeadLabelsApiUpdateLeadLabelRequest { + /** + * The ID of the lead label + * @type {string} + * @memberof LeadLabelsApiUpdateLeadLabel + */ + readonly id: string + + /** + * + * @type {UpdateLeadLabelRequest} + * @memberof LeadLabelsApiUpdateLeadLabel + */ + readonly UpdateLeadLabelRequest?: UpdateLeadLabelRequest +} + +/** + * LeadLabelsApi - object-oriented interface + * @export + * @class LeadLabelsApi + * @extends {BaseAPI} + */ +export class LeadLabelsApi extends BaseAPI { + /** + * Creates a lead label. + * @summary Add a lead label + * @param {LeadLabelsApiAddLeadLabelRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof LeadLabelsApi + */ + public addLeadLabel(requestParameters: LeadLabelsApiAddLeadLabelRequest = {}, ) { + return LeadLabelsApiFp(this.configuration).addLeadLabel(requestParameters.AddLeadLabelRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Deletes a specific lead label. + * @summary Delete a lead label + * @param {LeadLabelsApiDeleteLeadLabelRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof LeadLabelsApi + */ + public deleteLeadLabel(requestParameters: LeadLabelsApiDeleteLeadLabelRequest, ) { + return LeadLabelsApiFp(this.configuration).deleteLeadLabel(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns details of all lead labels. This endpoint does not support pagination and all labels are always returned. + * @summary Get all lead labels + + * @throws {RequiredError} + * @memberof LeadLabelsApi + */ + public getLeadLabels() { + return LeadLabelsApiFp(this.configuration).getLeadLabels().then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates one or more properties of a lead label. Only properties included in the request will be updated. + * @summary Update a lead label + * @param {LeadLabelsApiUpdateLeadLabelRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof LeadLabelsApi + */ + public updateLeadLabel(requestParameters: LeadLabelsApiUpdateLeadLabelRequest, ) { + return LeadLabelsApiFp(this.configuration).updateLeadLabel(requestParameters.id, requestParameters.UpdateLeadLabelRequest, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/lead-sources-api.ts b/api/lead-sources-api.ts new file mode 100644 index 00000000..4294c9fd --- /dev/null +++ b/api/lead-sources-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 { GetLeadSourcesResponse200 } from '../models'; +/** + * LeadSourcesApi - axios parameter creator + * @export + */ +export const LeadSourcesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Returns all lead sources. Please note that the list of lead sources is fixed, it cannot be modified. All leads created through the Pipedrive API will have a lead source `API` assigned. + * @summary Get all lead sources + + * @throws {RequiredError} + */ + getLeadSources: async (): Promise => { + const localVarPath = `/leadSources`; + // 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", ["leads:read", "leads:full"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * LeadSourcesApi - functional programming interface + * @export + */ +export const LeadSourcesApiFp = 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 = LeadSourcesApiAxiosParamCreator(configuration) + return { + /** + * Returns all lead sources. Please note that the list of lead sources is fixed, it cannot be modified. All leads created through the Pipedrive API will have a lead source `API` assigned. + * @summary Get all lead sources + + * @throws {RequiredError} + */ + async getLeadSources(): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeadSources(); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * LeadSourcesApi - factory interface + * @export + */ +export const LeadSourcesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = LeadSourcesApiFp(configuration) + return { + /** + * Returns all lead sources. Please note that the list of lead sources is fixed, it cannot be modified. All leads created through the Pipedrive API will have a lead source `API` assigned. + * @summary Get all lead sources + + * @throws {RequiredError} + */ + getLeadSources(): Promise { + return localVarFp.getLeadSources().then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * LeadSourcesApi - object-oriented interface + * @export + * @class LeadSourcesApi + * @extends {BaseAPI} + */ +export class LeadSourcesApi extends BaseAPI { + /** + * Returns all lead sources. Please note that the list of lead sources is fixed, it cannot be modified. All leads created through the Pipedrive API will have a lead source `API` assigned. + * @summary Get all lead sources + + * @throws {RequiredError} + * @memberof LeadSourcesApi + */ + public getLeadSources() { + return LeadSourcesApiFp(this.configuration).getLeadSources().then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/leads-api.ts b/api/leads-api.ts new file mode 100644 index 00000000..26a77278 --- /dev/null +++ b/api/leads-api.ts @@ -0,0 +1,913 @@ +/* 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 { AddLeadRequest } from '../models'; +// @ts-ignore +import { GetLeadsResponse200 } from '../models'; +// @ts-ignore +import { LeadIdResponse200 } from '../models'; +// @ts-ignore +import { LeadResponse404 } from '../models'; +// @ts-ignore +import { OneLeadResponse200 } from '../models'; +// @ts-ignore +import { SearchLeadsResponse200 } from '../models'; +// @ts-ignore +import { UpdateLeadRequest } from '../models'; +// @ts-ignore +import { UserIds } from '../models'; +/** + * LeadsApi - axios parameter creator + * @export + */ +export const LeadsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Creates a lead. A lead always has to be linked to a person or an organization or both. All leads created through the Pipedrive API will have a lead source `API` assigned. Here\'s the tutorial for adding a lead. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals. See an example given in the updating custom fields\' values tutorial. + * @summary Add a lead + * @param {AddLeadRequest} [AddLeadRequest] + + * @throws {RequiredError} + */ + addLead: async (AddLeadRequest?: AddLeadRequest, ): Promise => { + const localVarPath = `/leads`; + // 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", ["leads:full"], configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + localVarRequestOptions.data = serializeDataIfNeeded(AddLeadRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Deletes a specific lead. + * @summary Delete a lead + * @param {string} id The ID of the lead + + * @throws {RequiredError} + */ + deleteLead: async (id: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteLead', 'id', id) + const localVarPath = `/leads/{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", ["leads:full"], 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 lead. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields’ structure from deals. + * @summary Get one lead + * @param {string} id The ID of the lead + + * @throws {RequiredError} + */ + getLead: async (id: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getLead', 'id', id) + const localVarPath = `/leads/{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", ["leads:read", "leads:full"], configuration) + + + + 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 lead. + * @summary List permitted users + * @param {string} id The ID of the lead + + * @throws {RequiredError} + */ + getLeadUsers: async (id: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getLeadUsers', 'id', id) + const localVarPath = `/leads/{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", ["leads:read", "leads:full"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns multiple leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals. + * @summary Get all leads + * @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 {'archived' | 'not_archived' | 'all'} [archived_status] Filtering based on the archived status of a lead. If not provided, `All` is used. + * @param {number} [owner_id] If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied. + * @param {number} [person_id] If supplied, only leads matching the given person will be returned. However, `filter_id` takes precedence over `person_id` when supplied. + * @param {number} [organization_id] If supplied, only leads matching the given organization will be returned. However, `filter_id` takes precedence over `organization_id` when supplied. + * @param {number} [filter_id] The ID of the filter to use + * @param {'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time'} [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). + + * @throws {RequiredError} + */ + getLeads: async (limit?: number, start?: number, archived_status?: 'archived' | 'not_archived' | 'all', owner_id?: number, person_id?: number, organization_id?: number, filter_id?: number, sort?: 'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time', ): Promise => { + const localVarPath = `/leads`; + // 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", ["leads:read", "leads:full"], configuration) + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (start !== undefined) { + localVarQueryParameter['start'] = start; + } + + if (archived_status !== undefined) { + localVarQueryParameter['archived_status'] = archived_status; + } + + if (owner_id !== undefined) { + localVarQueryParameter['owner_id'] = owner_id; + } + + if (person_id !== undefined) { + localVarQueryParameter['person_id'] = person_id; + } + + if (organization_id !== undefined) { + localVarQueryParameter['organization_id'] = organization_id; + } + + if (filter_id !== undefined) { + localVarQueryParameter['filter_id'] = filter_id; + } + + 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, + }; + }, + /** + * Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID. + * @summary Search leads + * @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. + * @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 leads by the provided person ID. The upper limit of found leads associated with the person is 2000. + * @param {number} [organization_id] Will filter leads by the provided organization ID. The upper limit of found leads associated with the organization is 2000. + * @param {'lead.was_seen'} [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} + */ + searchLeads: async (term: string, fields?: 'custom_fields' | 'notes' | 'title', exact_match?: boolean, person_id?: number, organization_id?: number, include_fields?: 'lead.was_seen', start?: number, limit?: number, ): Promise => { + // verify required parameter 'term' is not null or undefined + assertParamExists('searchLeads', 'term', term) + const localVarPath = `/leads/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", ["leads:read", "leads: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 (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 one or more properties of a lead. Only properties included in the request will be updated. Send `null` to unset a property (applicable for example for `value`, `person_id` or `organization_id`). If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields’ structure from deals. See an example given in the updating custom fields’ values tutorial. + * @summary Update a lead + * @param {string} id The ID of the lead + * @param {UpdateLeadRequest} [UpdateLeadRequest] + + * @throws {RequiredError} + */ + updateLead: async (id: string, UpdateLeadRequest?: UpdateLeadRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updateLead', 'id', id) + const localVarPath = `/leads/{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: 'PATCH', ...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", ["leads:full"], configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + localVarRequestOptions.data = serializeDataIfNeeded(UpdateLeadRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * LeadsApi - functional programming interface + * @export + */ +export const LeadsApiFp = 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 = LeadsApiAxiosParamCreator(configuration) + return { + /** + * Creates a lead. A lead always has to be linked to a person or an organization or both. All leads created through the Pipedrive API will have a lead source `API` assigned. Here\'s the tutorial for adding a lead. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals. See an example given in the updating custom fields\' values tutorial. + * @summary Add a lead + * @param {AddLeadRequest} [AddLeadRequest] + + * @throws {RequiredError} + */ + async addLead(AddLeadRequest?: AddLeadRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addLead(AddLeadRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Deletes a specific lead. + * @summary Delete a lead + * @param {string} id The ID of the lead + + * @throws {RequiredError} + */ + async deleteLead(id: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteLead(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns details of a specific lead. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields’ structure from deals. + * @summary Get one lead + * @param {string} id The ID of the lead + + * @throws {RequiredError} + */ + async getLead(id: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLead(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists the users permitted to access a lead. + * @summary List permitted users + * @param {string} id The ID of the lead + + * @throws {RequiredError} + */ + async getLeadUsers(id: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeadUsers(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns multiple leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals. + * @summary Get all leads + * @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 {'archived' | 'not_archived' | 'all'} [archived_status] Filtering based on the archived status of a lead. If not provided, `All` is used. + * @param {number} [owner_id] If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied. + * @param {number} [person_id] If supplied, only leads matching the given person will be returned. However, `filter_id` takes precedence over `person_id` when supplied. + * @param {number} [organization_id] If supplied, only leads matching the given organization will be returned. However, `filter_id` takes precedence over `organization_id` when supplied. + * @param {number} [filter_id] The ID of the filter to use + * @param {'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time'} [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). + + * @throws {RequiredError} + */ + async getLeads(limit?: number, start?: number, archived_status?: 'archived' | 'not_archived' | 'all', owner_id?: number, person_id?: number, organization_id?: number, filter_id?: number, sort?: 'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeads(limit, start, archived_status, owner_id, person_id, organization_id, filter_id, sort, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID. + * @summary Search leads + * @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. + * @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 leads by the provided person ID. The upper limit of found leads associated with the person is 2000. + * @param {number} [organization_id] Will filter leads by the provided organization ID. The upper limit of found leads associated with the organization is 2000. + * @param {'lead.was_seen'} [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 searchLeads(term: string, fields?: 'custom_fields' | 'notes' | 'title', exact_match?: boolean, person_id?: number, organization_id?: number, include_fields?: 'lead.was_seen', start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.searchLeads(term, fields, exact_match, person_id, organization_id, include_fields, start, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates one or more properties of a lead. Only properties included in the request will be updated. Send `null` to unset a property (applicable for example for `value`, `person_id` or `organization_id`). If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields’ structure from deals. See an example given in the updating custom fields’ values tutorial. + * @summary Update a lead + * @param {string} id The ID of the lead + * @param {UpdateLeadRequest} [UpdateLeadRequest] + + * @throws {RequiredError} + */ + async updateLead(id: string, UpdateLeadRequest?: UpdateLeadRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateLead(id, UpdateLeadRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * LeadsApi - factory interface + * @export + */ +export const LeadsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = LeadsApiFp(configuration) + return { + /** + * Creates a lead. A lead always has to be linked to a person or an organization or both. All leads created through the Pipedrive API will have a lead source `API` assigned. Here\'s the tutorial for adding a lead. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals. See an example given in the updating custom fields\' values tutorial. + * @summary Add a lead + * @param {LeadsApiAddLeadRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addLead(requestParameters: LeadsApiAddLeadRequest = {}, ): Promise { + return localVarFp.addLead(requestParameters.AddLeadRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Deletes a specific lead. + * @summary Delete a lead + * @param {LeadsApiDeleteLeadRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteLead(requestParameters: LeadsApiDeleteLeadRequest, ): Promise { + return localVarFp.deleteLead(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns details of a specific lead. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields’ structure from deals. + * @summary Get one lead + * @param {LeadsApiGetLeadRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getLead(requestParameters: LeadsApiGetLeadRequest, ): Promise { + return localVarFp.getLead(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Lists the users permitted to access a lead. + * @summary List permitted users + * @param {LeadsApiGetLeadUsersRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getLeadUsers(requestParameters: LeadsApiGetLeadUsersRequest, ): Promise { + return localVarFp.getLeadUsers(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns multiple leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals. + * @summary Get all leads + * @param {LeadsApiGetLeadsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getLeads(requestParameters: LeadsApiGetLeadsRequest = {}, ): Promise { + return localVarFp.getLeads(requestParameters.limit, requestParameters.start, requestParameters.archived_status, requestParameters.owner_id, requestParameters.person_id, requestParameters.organization_id, requestParameters.filter_id, requestParameters.sort, ).then((request) => request(axios, basePath)); + }, + /** + * Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID. + * @summary Search leads + * @param {LeadsApiSearchLeadsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + searchLeads(requestParameters: LeadsApiSearchLeadsRequest, ): Promise { + return localVarFp.searchLeads(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.person_id, requestParameters.organization_id, requestParameters.include_fields, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + /** + * Updates one or more properties of a lead. Only properties included in the request will be updated. Send `null` to unset a property (applicable for example for `value`, `person_id` or `organization_id`). If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields’ structure from deals. See an example given in the updating custom fields’ values tutorial. + * @summary Update a lead + * @param {LeadsApiUpdateLeadRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + updateLead(requestParameters: LeadsApiUpdateLeadRequest, ): Promise { + return localVarFp.updateLead(requestParameters.id, requestParameters.UpdateLeadRequest, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for addLead operation in LeadsApi. + * @export + * @interface LeadsApiAddLeadRequest + */ +export interface LeadsApiAddLeadRequest { + /** + * + * @type {AddLeadRequest} + * @memberof LeadsApiAddLead + */ + readonly AddLeadRequest?: AddLeadRequest +} + +/** + * Request parameters for deleteLead operation in LeadsApi. + * @export + * @interface LeadsApiDeleteLeadRequest + */ +export interface LeadsApiDeleteLeadRequest { + /** + * The ID of the lead + * @type {string} + * @memberof LeadsApiDeleteLead + */ + readonly id: string +} + +/** + * Request parameters for getLead operation in LeadsApi. + * @export + * @interface LeadsApiGetLeadRequest + */ +export interface LeadsApiGetLeadRequest { + /** + * The ID of the lead + * @type {string} + * @memberof LeadsApiGetLead + */ + readonly id: string +} + +/** + * Request parameters for getLeadUsers operation in LeadsApi. + * @export + * @interface LeadsApiGetLeadUsersRequest + */ +export interface LeadsApiGetLeadUsersRequest { + /** + * The ID of the lead + * @type {string} + * @memberof LeadsApiGetLeadUsers + */ + readonly id: string +} + +/** + * Request parameters for getLeads operation in LeadsApi. + * @export + * @interface LeadsApiGetLeadsRequest + */ +export interface LeadsApiGetLeadsRequest { + /** + * For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. + * @type {number} + * @memberof LeadsApiGetLeads + */ + readonly limit?: number + + /** + * For pagination, the position that represents the first result for the page + * @type {number} + * @memberof LeadsApiGetLeads + */ + readonly start?: number + + /** + * Filtering based on the archived status of a lead. If not provided, `All` is used. + * @type {'archived' | 'not_archived' | 'all'} + * @memberof LeadsApiGetLeads + */ + readonly archived_status?: 'archived' | 'not_archived' | 'all' + + /** + * If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied. + * @type {number} + * @memberof LeadsApiGetLeads + */ + readonly owner_id?: number + + /** + * If supplied, only leads matching the given person will be returned. However, `filter_id` takes precedence over `person_id` when supplied. + * @type {number} + * @memberof LeadsApiGetLeads + */ + readonly person_id?: number + + /** + * If supplied, only leads matching the given organization will be returned. However, `filter_id` takes precedence over `organization_id` when supplied. + * @type {number} + * @memberof LeadsApiGetLeads + */ + readonly organization_id?: number + + /** + * The ID of the filter to use + * @type {number} + * @memberof LeadsApiGetLeads + */ + readonly filter_id?: 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 {'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time'} + * @memberof LeadsApiGetLeads + */ + readonly sort?: 'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time' +} + +/** + * Request parameters for searchLeads operation in LeadsApi. + * @export + * @interface LeadsApiSearchLeadsRequest + */ +export interface LeadsApiSearchLeadsRequest { + /** + * 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 LeadsApiSearchLeads + */ + readonly term: string + + /** + * A comma-separated string array. The fields to perform the search from. Defaults to all of them. + * @type {'custom_fields' | 'notes' | 'title'} + * @memberof LeadsApiSearchLeads + */ + 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 LeadsApiSearchLeads + */ + readonly exact_match?: boolean + + /** + * Will filter leads by the provided person ID. The upper limit of found leads associated with the person is 2000. + * @type {number} + * @memberof LeadsApiSearchLeads + */ + readonly person_id?: number + + /** + * Will filter leads by the provided organization ID. The upper limit of found leads associated with the organization is 2000. + * @type {number} + * @memberof LeadsApiSearchLeads + */ + readonly organization_id?: number + + /** + * Supports including optional fields in the results which are not provided by default + * @type {'lead.was_seen'} + * @memberof LeadsApiSearchLeads + */ + readonly include_fields?: 'lead.was_seen' + + /** + * 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 LeadsApiSearchLeads + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof LeadsApiSearchLeads + */ + readonly limit?: number +} + +/** + * Request parameters for updateLead operation in LeadsApi. + * @export + * @interface LeadsApiUpdateLeadRequest + */ +export interface LeadsApiUpdateLeadRequest { + /** + * The ID of the lead + * @type {string} + * @memberof LeadsApiUpdateLead + */ + readonly id: string + + /** + * + * @type {UpdateLeadRequest} + * @memberof LeadsApiUpdateLead + */ + readonly UpdateLeadRequest?: UpdateLeadRequest +} + +/** + * LeadsApi - object-oriented interface + * @export + * @class LeadsApi + * @extends {BaseAPI} + */ +export class LeadsApi extends BaseAPI { + /** + * Creates a lead. A lead always has to be linked to a person or an organization or both. All leads created through the Pipedrive API will have a lead source `API` assigned. Here\'s the tutorial for adding a lead. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals. See an example given in the updating custom fields\' values tutorial. + * @summary Add a lead + * @param {LeadsApiAddLeadRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof LeadsApi + */ + public addLead(requestParameters: LeadsApiAddLeadRequest = {}, ) { + return LeadsApiFp(this.configuration).addLead(requestParameters.AddLeadRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Deletes a specific lead. + * @summary Delete a lead + * @param {LeadsApiDeleteLeadRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof LeadsApi + */ + public deleteLead(requestParameters: LeadsApiDeleteLeadRequest, ) { + return LeadsApiFp(this.configuration).deleteLead(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns details of a specific lead. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields’ structure from deals. + * @summary Get one lead + * @param {LeadsApiGetLeadRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof LeadsApi + */ + public getLead(requestParameters: LeadsApiGetLeadRequest, ) { + return LeadsApiFp(this.configuration).getLead(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists the users permitted to access a lead. + * @summary List permitted users + * @param {LeadsApiGetLeadUsersRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof LeadsApi + */ + public getLeadUsers(requestParameters: LeadsApiGetLeadUsersRequest, ) { + return LeadsApiFp(this.configuration).getLeadUsers(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns multiple leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals. + * @summary Get all leads + * @param {LeadsApiGetLeadsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof LeadsApi + */ + public getLeads(requestParameters: LeadsApiGetLeadsRequest = {}, ) { + return LeadsApiFp(this.configuration).getLeads(requestParameters.limit, requestParameters.start, requestParameters.archived_status, requestParameters.owner_id, requestParameters.person_id, requestParameters.organization_id, requestParameters.filter_id, requestParameters.sort, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID. + * @summary Search leads + * @param {LeadsApiSearchLeadsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof LeadsApi + */ + public searchLeads(requestParameters: LeadsApiSearchLeadsRequest, ) { + return LeadsApiFp(this.configuration).searchLeads(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.person_id, requestParameters.organization_id, requestParameters.include_fields, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates one or more properties of a lead. Only properties included in the request will be updated. Send `null` to unset a property (applicable for example for `value`, `person_id` or `organization_id`). If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields’ structure from deals. See an example given in the updating custom fields’ values tutorial. + * @summary Update a lead + * @param {LeadsApiUpdateLeadRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof LeadsApi + */ + public updateLead(requestParameters: LeadsApiUpdateLeadRequest, ) { + return LeadsApiFp(this.configuration).updateLead(requestParameters.id, requestParameters.UpdateLeadRequest, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/legacy-teams-api.ts b/api/legacy-teams-api.ts new file mode 100644 index 00000000..e73366cb --- /dev/null +++ b/api/legacy-teams-api.ts @@ -0,0 +1,892 @@ +/* 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 { AddTeamRequest1 } from '../models'; +// @ts-ignore +import { AddTeamUserRequest } from '../models'; +// @ts-ignore +import { DeleteTeamUserRequest } from '../models'; +// @ts-ignore +import { FailResponse } from '../models'; +// @ts-ignore +import { TeamResponse200 } from '../models'; +// @ts-ignore +import { TeamsResponse200 } from '../models'; +// @ts-ignore +import { UpdateTeamRequest } from '../models'; +// @ts-ignore +import { UserIds } from '../models'; +/** + * LegacyTeamsApi - axios parameter creator + * @export + */ +export const LegacyTeamsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Adds a new team to the company and returns the created object. + * @summary Add a new team + * @param {AddTeamRequest1} [AddTeamRequest1] + * @deprecated + * @throws {RequiredError} + */ + addTeam: async (AddTeamRequest1?: AddTeamRequest1, ): Promise => { + const localVarPath = `/legacyTeams`; + // 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(AddTeamRequest1, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Adds users to an existing team. + * @summary Add users to a team + * @param {number} id The ID of the team + * @param {AddTeamUserRequest} [AddTeamUserRequest] + * @deprecated + * @throws {RequiredError} + */ + addTeamUser: async (id: number, AddTeamUserRequest?: AddTeamUserRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('addTeamUser', 'id', id) + const localVarPath = `/legacyTeams/{id}/users` + .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", ["admin"], configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + localVarRequestOptions.data = serializeDataIfNeeded(AddTeamUserRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Deletes users from an existing team. + * @summary Delete users from a team + * @param {number} id The ID of the team + * @param {DeleteTeamUserRequest} [DeleteTeamUserRequest] + * @deprecated + * @throws {RequiredError} + */ + deleteTeamUser: async (id: number, DeleteTeamUserRequest?: DeleteTeamUserRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteTeamUser', 'id', id) + const localVarPath = `/legacyTeams/{id}/users` + .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) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + localVarRequestOptions.data = serializeDataIfNeeded(DeleteTeamUserRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns data about a specific team. + * @summary Get a single team + * @param {number} id The ID of the team + * @param {0 | 1} [skip_users] When enabled, the teams will not include IDs of member users + * @deprecated + * @throws {RequiredError} + */ + getTeam: async (id: number, skip_users?: 0 | 1, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getTeam', 'id', id) + const localVarPath = `/legacyTeams/{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", ["users:read"], configuration) + + if (skip_users !== undefined) { + localVarQueryParameter['skip_users'] = skip_users; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of all user IDs within a team. + * @summary Get all users in a team + * @param {number} id The ID of the team + * @deprecated + * @throws {RequiredError} + */ + getTeamUsers: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getTeamUsers', 'id', id) + const localVarPath = `/legacyTeams/{id}/users` + .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", ["users:read"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns data about teams within the company. + * @summary Get all teams + * @param {'id' | 'name' | 'manager_id' | 'active_flag'} [order_by] The field name to sort returned teams by + * @param {0 | 1} [skip_users] When enabled, the teams will not include IDs of member users + * @deprecated + * @throws {RequiredError} + */ + getTeams: async (order_by?: 'id' | 'name' | 'manager_id' | 'active_flag', skip_users?: 0 | 1, ): Promise => { + const localVarPath = `/legacyTeams`; + // 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) + + if (order_by !== undefined) { + localVarQueryParameter['order_by'] = order_by; + } + + if (skip_users !== undefined) { + localVarQueryParameter['skip_users'] = skip_users; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns data about all teams which have the specified user as a member. + * @summary Get all teams of a user + * @param {number} id The ID of the user + * @param {'id' | 'name' | 'manager_id' | 'active_flag'} [order_by] The field name to sort returned teams by + * @param {0 | 1} [skip_users] When enabled, the teams will not include IDs of member users + * @deprecated + * @throws {RequiredError} + */ + getUserTeams: async (id: number, order_by?: 'id' | 'name' | 'manager_id' | 'active_flag', skip_users?: 0 | 1, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getUserTeams', 'id', id) + const localVarPath = `/legacyTeams/user/{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", ["users:read"], configuration) + + if (order_by !== undefined) { + localVarQueryParameter['order_by'] = order_by; + } + + if (skip_users !== undefined) { + localVarQueryParameter['skip_users'] = skip_users; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Updates an existing team and returns the updated object. + * @summary Update a team + * @param {number} id The ID of the team + * @param {UpdateTeamRequest} [UpdateTeamRequest] + * @deprecated + * @throws {RequiredError} + */ + updateTeam: async (id: number, UpdateTeamRequest?: UpdateTeamRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updateTeam', 'id', id) + const localVarPath = `/legacyTeams/{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(UpdateTeamRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * LegacyTeamsApi - functional programming interface + * @export + */ +export const LegacyTeamsApiFp = 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 = LegacyTeamsApiAxiosParamCreator(configuration) + return { + /** + * Adds a new team to the company and returns the created object. + * @summary Add a new team + * @param {AddTeamRequest1} [AddTeamRequest1] + * @deprecated + * @throws {RequiredError} + */ + async addTeam(AddTeamRequest1?: AddTeamRequest1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addTeam(AddTeamRequest1, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Adds users to an existing team. + * @summary Add users to a team + * @param {number} id The ID of the team + * @param {AddTeamUserRequest} [AddTeamUserRequest] + * @deprecated + * @throws {RequiredError} + */ + async addTeamUser(id: number, AddTeamUserRequest?: AddTeamUserRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addTeamUser(id, AddTeamUserRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Deletes users from an existing team. + * @summary Delete users from a team + * @param {number} id The ID of the team + * @param {DeleteTeamUserRequest} [DeleteTeamUserRequest] + * @deprecated + * @throws {RequiredError} + */ + async deleteTeamUser(id: number, DeleteTeamUserRequest?: DeleteTeamUserRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTeamUser(id, DeleteTeamUserRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns data about a specific team. + * @summary Get a single team + * @param {number} id The ID of the team + * @param {0 | 1} [skip_users] When enabled, the teams will not include IDs of member users + * @deprecated + * @throws {RequiredError} + */ + async getTeam(id: number, skip_users?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTeam(id, skip_users, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a list of all user IDs within a team. + * @summary Get all users in a team + * @param {number} id The ID of the team + * @deprecated + * @throws {RequiredError} + */ + async getTeamUsers(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTeamUsers(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns data about teams within the company. + * @summary Get all teams + * @param {'id' | 'name' | 'manager_id' | 'active_flag'} [order_by] The field name to sort returned teams by + * @param {0 | 1} [skip_users] When enabled, the teams will not include IDs of member users + * @deprecated + * @throws {RequiredError} + */ + async getTeams(order_by?: 'id' | 'name' | 'manager_id' | 'active_flag', skip_users?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTeams(order_by, skip_users, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns data about all teams which have the specified user as a member. + * @summary Get all teams of a user + * @param {number} id The ID of the user + * @param {'id' | 'name' | 'manager_id' | 'active_flag'} [order_by] The field name to sort returned teams by + * @param {0 | 1} [skip_users] When enabled, the teams will not include IDs of member users + * @deprecated + * @throws {RequiredError} + */ + async getUserTeams(id: number, order_by?: 'id' | 'name' | 'manager_id' | 'active_flag', skip_users?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getUserTeams(id, order_by, skip_users, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates an existing team and returns the updated object. + * @summary Update a team + * @param {number} id The ID of the team + * @param {UpdateTeamRequest} [UpdateTeamRequest] + * @deprecated + * @throws {RequiredError} + */ + async updateTeam(id: number, UpdateTeamRequest?: UpdateTeamRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateTeam(id, UpdateTeamRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * LegacyTeamsApi - factory interface + * @export + */ +export const LegacyTeamsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = LegacyTeamsApiFp(configuration) + return { + /** + * Adds a new team to the company and returns the created object. + * @summary Add a new team + * @param {LegacyTeamsApiAddTeamRequest} requestParameters Request parameters. + * @deprecated + * @throws {RequiredError} + */ + addTeam(requestParameters: LegacyTeamsApiAddTeamRequest = {}, ): Promise { + return localVarFp.addTeam(requestParameters.AddTeamRequest1, ).then((request) => request(axios, basePath)); + }, + /** + * Adds users to an existing team. + * @summary Add users to a team + * @param {LegacyTeamsApiAddTeamUserRequest} requestParameters Request parameters. + * @deprecated + * @throws {RequiredError} + */ + addTeamUser(requestParameters: LegacyTeamsApiAddTeamUserRequest, ): Promise { + return localVarFp.addTeamUser(requestParameters.id, requestParameters.AddTeamUserRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Deletes users from an existing team. + * @summary Delete users from a team + * @param {LegacyTeamsApiDeleteTeamUserRequest} requestParameters Request parameters. + * @deprecated + * @throws {RequiredError} + */ + deleteTeamUser(requestParameters: LegacyTeamsApiDeleteTeamUserRequest, ): Promise { + return localVarFp.deleteTeamUser(requestParameters.id, requestParameters.DeleteTeamUserRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Returns data about a specific team. + * @summary Get a single team + * @param {LegacyTeamsApiGetTeamRequest} requestParameters Request parameters. + * @deprecated + * @throws {RequiredError} + */ + getTeam(requestParameters: LegacyTeamsApiGetTeamRequest, ): Promise { + return localVarFp.getTeam(requestParameters.id, requestParameters.skip_users, ).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of all user IDs within a team. + * @summary Get all users in a team + * @param {LegacyTeamsApiGetTeamUsersRequest} requestParameters Request parameters. + * @deprecated + * @throws {RequiredError} + */ + getTeamUsers(requestParameters: LegacyTeamsApiGetTeamUsersRequest, ): Promise { + return localVarFp.getTeamUsers(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns data about teams within the company. + * @summary Get all teams + * @param {LegacyTeamsApiGetTeamsRequest} requestParameters Request parameters. + * @deprecated + * @throws {RequiredError} + */ + getTeams(requestParameters: LegacyTeamsApiGetTeamsRequest = {}, ): Promise { + return localVarFp.getTeams(requestParameters.order_by, requestParameters.skip_users, ).then((request) => request(axios, basePath)); + }, + /** + * Returns data about all teams which have the specified user as a member. + * @summary Get all teams of a user + * @param {LegacyTeamsApiGetUserTeamsRequest} requestParameters Request parameters. + * @deprecated + * @throws {RequiredError} + */ + getUserTeams(requestParameters: LegacyTeamsApiGetUserTeamsRequest, ): Promise { + return localVarFp.getUserTeams(requestParameters.id, requestParameters.order_by, requestParameters.skip_users, ).then((request) => request(axios, basePath)); + }, + /** + * Updates an existing team and returns the updated object. + * @summary Update a team + * @param {LegacyTeamsApiUpdateTeamRequest} requestParameters Request parameters. + * @deprecated + * @throws {RequiredError} + */ + updateTeam(requestParameters: LegacyTeamsApiUpdateTeamRequest, ): Promise { + return localVarFp.updateTeam(requestParameters.id, requestParameters.UpdateTeamRequest, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for addTeam operation in LegacyTeamsApi. + * @export + * @interface LegacyTeamsApiAddTeamRequest + */ +export interface LegacyTeamsApiAddTeamRequest { + /** + * + * @type {AddTeamRequest1} + * @memberof LegacyTeamsApiAddTeam + */ + readonly AddTeamRequest1?: AddTeamRequest1 +} + +/** + * Request parameters for addTeamUser operation in LegacyTeamsApi. + * @export + * @interface LegacyTeamsApiAddTeamUserRequest + */ +export interface LegacyTeamsApiAddTeamUserRequest { + /** + * The ID of the team + * @type {number} + * @memberof LegacyTeamsApiAddTeamUser + */ + readonly id: number + + /** + * + * @type {AddTeamUserRequest} + * @memberof LegacyTeamsApiAddTeamUser + */ + readonly AddTeamUserRequest?: AddTeamUserRequest +} + +/** + * Request parameters for deleteTeamUser operation in LegacyTeamsApi. + * @export + * @interface LegacyTeamsApiDeleteTeamUserRequest + */ +export interface LegacyTeamsApiDeleteTeamUserRequest { + /** + * The ID of the team + * @type {number} + * @memberof LegacyTeamsApiDeleteTeamUser + */ + readonly id: number + + /** + * + * @type {DeleteTeamUserRequest} + * @memberof LegacyTeamsApiDeleteTeamUser + */ + readonly DeleteTeamUserRequest?: DeleteTeamUserRequest +} + +/** + * Request parameters for getTeam operation in LegacyTeamsApi. + * @export + * @interface LegacyTeamsApiGetTeamRequest + */ +export interface LegacyTeamsApiGetTeamRequest { + /** + * The ID of the team + * @type {number} + * @memberof LegacyTeamsApiGetTeam + */ + readonly id: number + + /** + * When enabled, the teams will not include IDs of member users + * @type {0 | 1} + * @memberof LegacyTeamsApiGetTeam + */ + readonly skip_users?: 0 | 1 +} + +/** + * Request parameters for getTeamUsers operation in LegacyTeamsApi. + * @export + * @interface LegacyTeamsApiGetTeamUsersRequest + */ +export interface LegacyTeamsApiGetTeamUsersRequest { + /** + * The ID of the team + * @type {number} + * @memberof LegacyTeamsApiGetTeamUsers + */ + readonly id: number +} + +/** + * Request parameters for getTeams operation in LegacyTeamsApi. + * @export + * @interface LegacyTeamsApiGetTeamsRequest + */ +export interface LegacyTeamsApiGetTeamsRequest { + /** + * The field name to sort returned teams by + * @type {'id' | 'name' | 'manager_id' | 'active_flag'} + * @memberof LegacyTeamsApiGetTeams + */ + readonly order_by?: 'id' | 'name' | 'manager_id' | 'active_flag' + + /** + * When enabled, the teams will not include IDs of member users + * @type {0 | 1} + * @memberof LegacyTeamsApiGetTeams + */ + readonly skip_users?: 0 | 1 +} + +/** + * Request parameters for getUserTeams operation in LegacyTeamsApi. + * @export + * @interface LegacyTeamsApiGetUserTeamsRequest + */ +export interface LegacyTeamsApiGetUserTeamsRequest { + /** + * The ID of the user + * @type {number} + * @memberof LegacyTeamsApiGetUserTeams + */ + readonly id: number + + /** + * The field name to sort returned teams by + * @type {'id' | 'name' | 'manager_id' | 'active_flag'} + * @memberof LegacyTeamsApiGetUserTeams + */ + readonly order_by?: 'id' | 'name' | 'manager_id' | 'active_flag' + + /** + * When enabled, the teams will not include IDs of member users + * @type {0 | 1} + * @memberof LegacyTeamsApiGetUserTeams + */ + readonly skip_users?: 0 | 1 +} + +/** + * Request parameters for updateTeam operation in LegacyTeamsApi. + * @export + * @interface LegacyTeamsApiUpdateTeamRequest + */ +export interface LegacyTeamsApiUpdateTeamRequest { + /** + * The ID of the team + * @type {number} + * @memberof LegacyTeamsApiUpdateTeam + */ + readonly id: number + + /** + * + * @type {UpdateTeamRequest} + * @memberof LegacyTeamsApiUpdateTeam + */ + readonly UpdateTeamRequest?: UpdateTeamRequest +} + +/** + * LegacyTeamsApi - object-oriented interface + * @export + * @class LegacyTeamsApi + * @extends {BaseAPI} + */ +export class LegacyTeamsApi extends BaseAPI { + /** + * Adds a new team to the company and returns the created object. + * @summary Add a new team + * @param {LegacyTeamsApiAddTeamRequest} requestParameters Request parameters. + * @deprecated + * @throws {RequiredError} + * @memberof LegacyTeamsApi + */ + public addTeam(requestParameters: LegacyTeamsApiAddTeamRequest = {}, ) { + return LegacyTeamsApiFp(this.configuration).addTeam(requestParameters.AddTeamRequest1, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Adds users to an existing team. + * @summary Add users to a team + * @param {LegacyTeamsApiAddTeamUserRequest} requestParameters Request parameters. + * @deprecated + * @throws {RequiredError} + * @memberof LegacyTeamsApi + */ + public addTeamUser(requestParameters: LegacyTeamsApiAddTeamUserRequest, ) { + return LegacyTeamsApiFp(this.configuration).addTeamUser(requestParameters.id, requestParameters.AddTeamUserRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Deletes users from an existing team. + * @summary Delete users from a team + * @param {LegacyTeamsApiDeleteTeamUserRequest} requestParameters Request parameters. + * @deprecated + * @throws {RequiredError} + * @memberof LegacyTeamsApi + */ + public deleteTeamUser(requestParameters: LegacyTeamsApiDeleteTeamUserRequest, ) { + return LegacyTeamsApiFp(this.configuration).deleteTeamUser(requestParameters.id, requestParameters.DeleteTeamUserRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about a specific team. + * @summary Get a single team + * @param {LegacyTeamsApiGetTeamRequest} requestParameters Request parameters. + * @deprecated + * @throws {RequiredError} + * @memberof LegacyTeamsApi + */ + public getTeam(requestParameters: LegacyTeamsApiGetTeamRequest, ) { + return LegacyTeamsApiFp(this.configuration).getTeam(requestParameters.id, requestParameters.skip_users, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of all user IDs within a team. + * @summary Get all users in a team + * @param {LegacyTeamsApiGetTeamUsersRequest} requestParameters Request parameters. + * @deprecated + * @throws {RequiredError} + * @memberof LegacyTeamsApi + */ + public getTeamUsers(requestParameters: LegacyTeamsApiGetTeamUsersRequest, ) { + return LegacyTeamsApiFp(this.configuration).getTeamUsers(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about teams within the company. + * @summary Get all teams + * @param {LegacyTeamsApiGetTeamsRequest} requestParameters Request parameters. + * @deprecated + * @throws {RequiredError} + * @memberof LegacyTeamsApi + */ + public getTeams(requestParameters: LegacyTeamsApiGetTeamsRequest = {}, ) { + return LegacyTeamsApiFp(this.configuration).getTeams(requestParameters.order_by, requestParameters.skip_users, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about all teams which have the specified user as a member. + * @summary Get all teams of a user + * @param {LegacyTeamsApiGetUserTeamsRequest} requestParameters Request parameters. + * @deprecated + * @throws {RequiredError} + * @memberof LegacyTeamsApi + */ + public getUserTeams(requestParameters: LegacyTeamsApiGetUserTeamsRequest, ) { + return LegacyTeamsApiFp(this.configuration).getUserTeams(requestParameters.id, requestParameters.order_by, requestParameters.skip_users, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates an existing team and returns the updated object. + * @summary Update a team + * @param {LegacyTeamsApiUpdateTeamRequest} requestParameters Request parameters. + * @deprecated + * @throws {RequiredError} + * @memberof LegacyTeamsApi + */ + public updateTeam(requestParameters: LegacyTeamsApiUpdateTeamRequest, ) { + return LegacyTeamsApiFp(this.configuration).updateTeam(requestParameters.id, requestParameters.UpdateTeamRequest, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/mailbox-api.ts b/api/mailbox-api.ts new file mode 100644 index 00000000..8603e530 --- /dev/null +++ b/api/mailbox-api.ts @@ -0,0 +1,734 @@ +/* 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 { DeleteMailThreadResponse200 } from '../models'; +// @ts-ignore +import { GetAllMailMessagesOfMailThreadResponse200 } from '../models'; +// @ts-ignore +import { GetMailThreadsResponse200 } from '../models'; +// @ts-ignore +import { GetOneMailThreadResponse200 } from '../models'; +// @ts-ignore +import { MailMessageResponse200 } from '../models'; +// @ts-ignore +import { UpdateMailThreadDetailsResponse200 } from '../models'; +/** + * MailboxApi - axios parameter creator + * @export + */ +export const MailboxApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Marks a mail thread as deleted. + * @summary Delete mail thread + * @param {number} id The ID of the mail thread + + * @throws {RequiredError} + */ + deleteMailThread: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteMailThread', 'id', id) + const localVarPath = `/mailbox/mailThreads/{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", ["mail: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 mail message. + * @summary Get one mail message + * @param {number} id The ID of the mail message to fetch + * @param {0 | 1} [include_body] Whether to include the full message body or not. `0` = Don\'t include, `1` = Include. + + * @throws {RequiredError} + */ + getMailMessage: async (id: number, include_body?: 0 | 1, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getMailMessage', 'id', id) + const localVarPath = `/mailbox/mailMessages/{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", ["mail:read", "mail:full"], configuration) + + if (include_body !== undefined) { + localVarQueryParameter['include_body'] = include_body; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a specific mail thread. + * @summary Get one mail thread + * @param {number} id The ID of the mail thread + + * @throws {RequiredError} + */ + getMailThread: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getMailThread', 'id', id) + const localVarPath = `/mailbox/mailThreads/{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", ["mail:read", "mail:full"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns all the mail messages inside a specified mail thread. + * @summary Get all mail messages of mail thread + * @param {number} id The ID of the mail thread + + * @throws {RequiredError} + */ + getMailThreadMessages: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getMailThreadMessages', 'id', id) + const localVarPath = `/mailbox/mailThreads/{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) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns mail threads in a specified folder ordered by the most recent message within. + * @summary Get mail threads + * @param {'inbox' | 'drafts' | 'sent' | 'archive'} folder The type of folder to fetch + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + getMailThreads: async (folder: 'inbox' | 'drafts' | 'sent' | 'archive', start?: number, limit?: number, ): Promise => { + // verify required parameter 'folder' is not null or undefined + assertParamExists('getMailThreads', 'folder', folder) + const localVarPath = `/mailbox/mailThreads`; + // 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 (folder !== undefined) { + localVarQueryParameter['folder'] = folder; + } + + 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 mail thread. + * @summary Update mail thread details + * @param {number} id The ID of the mail thread + * @param {number} [deal_id] The ID of the deal this thread is associated with + * @param {string} [lead_id] The ID of the lead this thread is associated with + * @param {number} [shared_flag] + * @param {number} [read_flag] + * @param {number} [archived_flag] + + * @throws {RequiredError} + */ + updateMailThreadDetails: async (id: number, deal_id?: number, lead_id?: string, shared_flag?: number, read_flag?: number, archived_flag?: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updateMailThreadDetails', 'id', id) + const localVarPath = `/mailbox/mailThreads/{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", ["mail:full"], configuration) + + + if (deal_id !== undefined) { + localVarFormParams.set('deal_id', deal_id as any); + } + + if (lead_id !== undefined) { + localVarFormParams.set('lead_id', lead_id as any); + } + + if (shared_flag !== undefined) { + localVarFormParams.set('shared_flag', shared_flag as any); + } + + if (read_flag !== undefined) { + localVarFormParams.set('read_flag', read_flag as any); + } + + if (archived_flag !== undefined) { + localVarFormParams.set('archived_flag', archived_flag 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, + }; + }, + } +}; + +/** + * MailboxApi - functional programming interface + * @export + */ +export const MailboxApiFp = 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 = MailboxApiAxiosParamCreator(configuration) + return { + /** + * Marks a mail thread as deleted. + * @summary Delete mail thread + * @param {number} id The ID of the mail thread + + * @throws {RequiredError} + */ + async deleteMailThread(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteMailThread(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns data about a specific mail message. + * @summary Get one mail message + * @param {number} id The ID of the mail message to fetch + * @param {0 | 1} [include_body] Whether to include the full message body or not. `0` = Don\'t include, `1` = Include. + + * @throws {RequiredError} + */ + async getMailMessage(id: number, include_body?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMailMessage(id, include_body, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a specific mail thread. + * @summary Get one mail thread + * @param {number} id The ID of the mail thread + + * @throws {RequiredError} + */ + async getMailThread(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMailThread(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns all the mail messages inside a specified mail thread. + * @summary Get all mail messages of mail thread + * @param {number} id The ID of the mail thread + + * @throws {RequiredError} + */ + async getMailThreadMessages(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMailThreadMessages(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns mail threads in a specified folder ordered by the most recent message within. + * @summary Get mail threads + * @param {'inbox' | 'drafts' | 'sent' | 'archive'} folder The type of folder to fetch + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + async getMailThreads(folder: 'inbox' | 'drafts' | 'sent' | 'archive', start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMailThreads(folder, start, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates the properties of a mail thread. + * @summary Update mail thread details + * @param {number} id The ID of the mail thread + * @param {number} [deal_id] The ID of the deal this thread is associated with + * @param {string} [lead_id] The ID of the lead this thread is associated with + * @param {number} [shared_flag] + * @param {number} [read_flag] + * @param {number} [archived_flag] + + * @throws {RequiredError} + */ + async updateMailThreadDetails(id: number, deal_id?: number, lead_id?: string, shared_flag?: number, read_flag?: number, archived_flag?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateMailThreadDetails(id, deal_id, lead_id, shared_flag, read_flag, archived_flag, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * MailboxApi - factory interface + * @export + */ +export const MailboxApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = MailboxApiFp(configuration) + return { + /** + * Marks a mail thread as deleted. + * @summary Delete mail thread + * @param {MailboxApiDeleteMailThreadRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteMailThread(requestParameters: MailboxApiDeleteMailThreadRequest, ): Promise { + return localVarFp.deleteMailThread(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns data about a specific mail message. + * @summary Get one mail message + * @param {MailboxApiGetMailMessageRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getMailMessage(requestParameters: MailboxApiGetMailMessageRequest, ): Promise { + return localVarFp.getMailMessage(requestParameters.id, requestParameters.include_body, ).then((request) => request(axios, basePath)); + }, + /** + * Returns a specific mail thread. + * @summary Get one mail thread + * @param {MailboxApiGetMailThreadRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getMailThread(requestParameters: MailboxApiGetMailThreadRequest, ): Promise { + return localVarFp.getMailThread(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns all the mail messages inside a specified mail thread. + * @summary Get all mail messages of mail thread + * @param {MailboxApiGetMailThreadMessagesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getMailThreadMessages(requestParameters: MailboxApiGetMailThreadMessagesRequest, ): Promise { + return localVarFp.getMailThreadMessages(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns mail threads in a specified folder ordered by the most recent message within. + * @summary Get mail threads + * @param {MailboxApiGetMailThreadsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getMailThreads(requestParameters: MailboxApiGetMailThreadsRequest, ): Promise { + return localVarFp.getMailThreads(requestParameters.folder, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + /** + * Updates the properties of a mail thread. + * @summary Update mail thread details + * @param {MailboxApiUpdateMailThreadDetailsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + updateMailThreadDetails(requestParameters: MailboxApiUpdateMailThreadDetailsRequest, ): Promise { + return localVarFp.updateMailThreadDetails(requestParameters.id, requestParameters.deal_id, requestParameters.lead_id, requestParameters.shared_flag, requestParameters.read_flag, requestParameters.archived_flag, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for deleteMailThread operation in MailboxApi. + * @export + * @interface MailboxApiDeleteMailThreadRequest + */ +export interface MailboxApiDeleteMailThreadRequest { + /** + * The ID of the mail thread + * @type {number} + * @memberof MailboxApiDeleteMailThread + */ + readonly id: number +} + +/** + * Request parameters for getMailMessage operation in MailboxApi. + * @export + * @interface MailboxApiGetMailMessageRequest + */ +export interface MailboxApiGetMailMessageRequest { + /** + * The ID of the mail message to fetch + * @type {number} + * @memberof MailboxApiGetMailMessage + */ + readonly id: number + + /** + * Whether to include the full message body or not. `0` = Don\'t include, `1` = Include. + * @type {0 | 1} + * @memberof MailboxApiGetMailMessage + */ + readonly include_body?: 0 | 1 +} + +/** + * Request parameters for getMailThread operation in MailboxApi. + * @export + * @interface MailboxApiGetMailThreadRequest + */ +export interface MailboxApiGetMailThreadRequest { + /** + * The ID of the mail thread + * @type {number} + * @memberof MailboxApiGetMailThread + */ + readonly id: number +} + +/** + * Request parameters for getMailThreadMessages operation in MailboxApi. + * @export + * @interface MailboxApiGetMailThreadMessagesRequest + */ +export interface MailboxApiGetMailThreadMessagesRequest { + /** + * The ID of the mail thread + * @type {number} + * @memberof MailboxApiGetMailThreadMessages + */ + readonly id: number +} + +/** + * Request parameters for getMailThreads operation in MailboxApi. + * @export + * @interface MailboxApiGetMailThreadsRequest + */ +export interface MailboxApiGetMailThreadsRequest { + /** + * The type of folder to fetch + * @type {'inbox' | 'drafts' | 'sent' | 'archive'} + * @memberof MailboxApiGetMailThreads + */ + readonly folder: 'inbox' | 'drafts' | 'sent' | 'archive' + + /** + * Pagination start + * @type {number} + * @memberof MailboxApiGetMailThreads + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof MailboxApiGetMailThreads + */ + readonly limit?: number +} + +/** + * Request parameters for updateMailThreadDetails operation in MailboxApi. + * @export + * @interface MailboxApiUpdateMailThreadDetailsRequest + */ +export interface MailboxApiUpdateMailThreadDetailsRequest { + /** + * The ID of the mail thread + * @type {number} + * @memberof MailboxApiUpdateMailThreadDetails + */ + readonly id: number + + /** + * The ID of the deal this thread is associated with + * @type {number} + * @memberof MailboxApiUpdateMailThreadDetails + */ + readonly deal_id?: number + + /** + * The ID of the lead this thread is associated with + * @type {string} + * @memberof MailboxApiUpdateMailThreadDetails + */ + readonly lead_id?: string + + /** + * + * @type {number} + * @memberof MailboxApiUpdateMailThreadDetails + */ + readonly shared_flag?: number + + /** + * + * @type {number} + * @memberof MailboxApiUpdateMailThreadDetails + */ + readonly read_flag?: number + + /** + * + * @type {number} + * @memberof MailboxApiUpdateMailThreadDetails + */ + readonly archived_flag?: number +} + +/** + * MailboxApi - object-oriented interface + * @export + * @class MailboxApi + * @extends {BaseAPI} + */ +export class MailboxApi extends BaseAPI { + /** + * Marks a mail thread as deleted. + * @summary Delete mail thread + * @param {MailboxApiDeleteMailThreadRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof MailboxApi + */ + public deleteMailThread(requestParameters: MailboxApiDeleteMailThreadRequest, ) { + return MailboxApiFp(this.configuration).deleteMailThread(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about a specific mail message. + * @summary Get one mail message + * @param {MailboxApiGetMailMessageRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof MailboxApi + */ + public getMailMessage(requestParameters: MailboxApiGetMailMessageRequest, ) { + return MailboxApiFp(this.configuration).getMailMessage(requestParameters.id, requestParameters.include_body, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a specific mail thread. + * @summary Get one mail thread + * @param {MailboxApiGetMailThreadRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof MailboxApi + */ + public getMailThread(requestParameters: MailboxApiGetMailThreadRequest, ) { + return MailboxApiFp(this.configuration).getMailThread(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns all the mail messages inside a specified mail thread. + * @summary Get all mail messages of mail thread + * @param {MailboxApiGetMailThreadMessagesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof MailboxApi + */ + public getMailThreadMessages(requestParameters: MailboxApiGetMailThreadMessagesRequest, ) { + return MailboxApiFp(this.configuration).getMailThreadMessages(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns mail threads in a specified folder ordered by the most recent message within. + * @summary Get mail threads + * @param {MailboxApiGetMailThreadsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof MailboxApi + */ + public getMailThreads(requestParameters: MailboxApiGetMailThreadsRequest, ) { + return MailboxApiFp(this.configuration).getMailThreads(requestParameters.folder, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates the properties of a mail thread. + * @summary Update mail thread details + * @param {MailboxApiUpdateMailThreadDetailsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof MailboxApi + */ + public updateMailThreadDetails(requestParameters: MailboxApiUpdateMailThreadDetailsRequest, ) { + return MailboxApiFp(this.configuration).updateMailThreadDetails(requestParameters.id, requestParameters.deal_id, requestParameters.lead_id, requestParameters.shared_flag, requestParameters.read_flag, requestParameters.archived_flag, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/note-fields-api.ts b/api/note-fields-api.ts new file mode 100644 index 00000000..2923c55c --- /dev/null +++ b/api/note-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 { GetNoteFieldsResponse200 } from '../models'; +/** + * NoteFieldsApi - axios parameter creator + * @export + */ +export const NoteFieldsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Returns data about all note fields. + * @summary Get all note fields + + * @throws {RequiredError} + */ + getNoteFields: async (): Promise => { + const localVarPath = `/noteFields`; + // 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", "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, + }; + }, + } +}; + +/** + * NoteFieldsApi - functional programming interface + * @export + */ +export const NoteFieldsApiFp = 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 = NoteFieldsApiAxiosParamCreator(configuration) + return { + /** + * Returns data about all note fields. + * @summary Get all note fields + + * @throws {RequiredError} + */ + async getNoteFields(): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getNoteFields(); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * NoteFieldsApi - factory interface + * @export + */ +export const NoteFieldsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = NoteFieldsApiFp(configuration) + return { + /** + * Returns data about all note fields. + * @summary Get all note fields + + * @throws {RequiredError} + */ + getNoteFields(): Promise { + return localVarFp.getNoteFields().then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * NoteFieldsApi - object-oriented interface + * @export + * @class NoteFieldsApi + * @extends {BaseAPI} + */ +export class NoteFieldsApi extends BaseAPI { + /** + * Returns data about all note fields. + * @summary Get all note fields + + * @throws {RequiredError} + * @memberof NoteFieldsApi + */ + public getNoteFields() { + return NoteFieldsApiFp(this.configuration).getNoteFields().then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/notes-api.ts b/api/notes-api.ts new file mode 100644 index 00000000..b4c4805c --- /dev/null +++ b/api/notes-api.ts @@ -0,0 +1,1253 @@ +/* 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 { AddNoteRequest } from '../models'; +// @ts-ignore +import { CommentPostPutObject } from '../models'; +// @ts-ignore +import { DeleteCommentResponse200 } from '../models'; +// @ts-ignore +import { DeleteNoteResponse200 } from '../models'; +// @ts-ignore +import { GetCommentsResponse200 } from '../models'; +// @ts-ignore +import { GetNotesResponse200 } from '../models'; +// @ts-ignore +import { NoteRequest } from '../models'; +// @ts-ignore +import { OneCommentResponse200 } from '../models'; +// @ts-ignore +import { OneNoteResponse200 } from '../models'; +/** + * NotesApi - axios parameter creator + * @export + */ +export const NotesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Adds a new note. + * @summary Add a note + * @param {AddNoteRequest} [AddNoteRequest] + + * @throws {RequiredError} + */ + addNote: async (AddNoteRequest?: AddNoteRequest, ): Promise => { + const localVarPath = `/notes`; + // 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", "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(AddNoteRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Adds a new comment to a note. + * @summary Add a comment to a note + * @param {number} id The ID of the note + * @param {CommentPostPutObject} [CommentPostPutObject] + + * @throws {RequiredError} + */ + addNoteComment: async (id: number, CommentPostPutObject?: CommentPostPutObject, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('addNoteComment', 'id', id) + const localVarPath = `/notes/{id}/comments` + .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", "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(CommentPostPutObject, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Deletes a comment. + * @summary Delete a comment related to a note + * @param {number} id The ID of the note + * @param {string} commentId The ID of the comment + + * @throws {RequiredError} + */ + deleteComment: async (id: number, commentId: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteComment', 'id', id) + // verify required parameter 'commentId' is not null or undefined + assertParamExists('deleteComment', 'commentId', commentId) + const localVarPath = `/notes/{id}/comments/{commentId}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace(`{${"commentId"}}`, encodeURIComponent(String(commentId))); + // 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", "contacts:full"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Deletes a specific note. + * @summary Delete a note + * @param {number} id The ID of the note + + * @throws {RequiredError} + */ + deleteNote: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteNote', 'id', id) + const localVarPath = `/notes/{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", "contacts: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 comment. + * @summary Get one comment + * @param {number} id The ID of the note + * @param {string} commentId The ID of the comment + + * @throws {RequiredError} + */ + getComment: async (id: number, commentId: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getComment', 'id', id) + // verify required parameter 'commentId' is not null or undefined + assertParamExists('getComment', 'commentId', commentId) + const localVarPath = `/notes/{id}/comments/{commentId}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace(`{${"commentId"}}`, encodeURIComponent(String(commentId))); + // 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", "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 details about a specific note. + * @summary Get one note + * @param {number} id The ID of the note + + * @throws {RequiredError} + */ + getNote: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getNote', 'id', id) + const localVarPath = `/notes/{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", "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 comments associated with a note. + * @summary Get all comments for a note + * @param {number} id The ID of the note + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + getNoteComments: async (id: number, start?: number, limit?: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getNoteComments', 'id', id) + const localVarPath = `/notes/{id}/comments` + .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", "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, + }; + }, + /** + * Returns all notes. + * @summary Get all notes + * @param {number} [user_id] The ID of the user whose notes to fetch. If omitted, notes by all users will be returned. + * @param {string} [lead_id] The ID of the lead which notes to fetch. If omitted, notes about all leads will be returned. + * @param {number} [deal_id] The ID of the deal which notes to fetch. If omitted, notes about all deals will be returned. + * @param {number} [person_id] The ID of the person whose notes to fetch. If omitted, notes about all persons will be returned. + * @param {number} [org_id] The ID of the organization which notes to fetch. If omitted, notes about all organizations will be returned. + * @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`, `content`, `add_time`, `update_time`. + * @param {string} [start_date] The date in format of YYYY-MM-DD from which notes to fetch + * @param {string} [end_date] The date in format of YYYY-MM-DD until which notes to fetch to + * @param {0 | 1} [pinned_to_lead_flag] If set, the results are filtered by note to lead pinning state + * @param {0 | 1} [pinned_to_deal_flag] If set, the results are filtered by note to deal pinning state + * @param {0 | 1} [pinned_to_organization_flag] If set, the results are filtered by note to organization pinning state + * @param {0 | 1} [pinned_to_person_flag] If set, the results are filtered by note to person pinning state + + * @throws {RequiredError} + */ + getNotes: async (user_id?: number, lead_id?: string, deal_id?: number, person_id?: number, org_id?: number, start?: number, limit?: number, sort?: string, start_date?: string, end_date?: string, pinned_to_lead_flag?: 0 | 1, pinned_to_deal_flag?: 0 | 1, pinned_to_organization_flag?: 0 | 1, pinned_to_person_flag?: 0 | 1, ): Promise => { + const localVarPath = `/notes`; + // 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", "contacts:read", "contacts:full"], configuration) + + if (user_id !== undefined) { + localVarQueryParameter['user_id'] = user_id; + } + + if (lead_id !== undefined) { + localVarQueryParameter['lead_id'] = lead_id; + } + + if (deal_id !== undefined) { + localVarQueryParameter['deal_id'] = deal_id; + } + + if (person_id !== undefined) { + localVarQueryParameter['person_id'] = person_id; + } + + if (org_id !== undefined) { + localVarQueryParameter['org_id'] = org_id; + } + + if (start !== undefined) { + localVarQueryParameter['start'] = start; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (sort !== undefined) { + localVarQueryParameter['sort'] = sort; + } + + 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 (pinned_to_lead_flag !== undefined) { + localVarQueryParameter['pinned_to_lead_flag'] = pinned_to_lead_flag; + } + + if (pinned_to_deal_flag !== undefined) { + localVarQueryParameter['pinned_to_deal_flag'] = pinned_to_deal_flag; + } + + if (pinned_to_organization_flag !== undefined) { + localVarQueryParameter['pinned_to_organization_flag'] = pinned_to_organization_flag; + } + + if (pinned_to_person_flag !== undefined) { + localVarQueryParameter['pinned_to_person_flag'] = pinned_to_person_flag; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Updates a comment related to a note. + * @summary Update a comment related to a note + * @param {number} id The ID of the note + * @param {string} commentId The ID of the comment + * @param {CommentPostPutObject} [CommentPostPutObject] + + * @throws {RequiredError} + */ + updateCommentForNote: async (id: number, commentId: string, CommentPostPutObject?: CommentPostPutObject, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updateCommentForNote', 'id', id) + // verify required parameter 'commentId' is not null or undefined + assertParamExists('updateCommentForNote', 'commentId', commentId) + const localVarPath = `/notes/{id}/comments/{commentId}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace(`{${"commentId"}}`, encodeURIComponent(String(commentId))); + // 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", "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(CommentPostPutObject, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Updates a note. + * @summary Update a note + * @param {number} id The ID of the note + * @param {NoteRequest} [NoteRequest] + + * @throws {RequiredError} + */ + updateNote: async (id: number, NoteRequest?: NoteRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updateNote', 'id', id) + const localVarPath = `/notes/{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", "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(NoteRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * NotesApi - functional programming interface + * @export + */ +export const NotesApiFp = 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 = NotesApiAxiosParamCreator(configuration) + return { + /** + * Adds a new note. + * @summary Add a note + * @param {AddNoteRequest} [AddNoteRequest] + + * @throws {RequiredError} + */ + async addNote(AddNoteRequest?: AddNoteRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addNote(AddNoteRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Adds a new comment to a note. + * @summary Add a comment to a note + * @param {number} id The ID of the note + * @param {CommentPostPutObject} [CommentPostPutObject] + + * @throws {RequiredError} + */ + async addNoteComment(id: number, CommentPostPutObject?: CommentPostPutObject, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addNoteComment(id, CommentPostPutObject, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Deletes a comment. + * @summary Delete a comment related to a note + * @param {number} id The ID of the note + * @param {string} commentId The ID of the comment + + * @throws {RequiredError} + */ + async deleteComment(id: number, commentId: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteComment(id, commentId, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Deletes a specific note. + * @summary Delete a note + * @param {number} id The ID of the note + + * @throws {RequiredError} + */ + async deleteNote(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteNote(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns the details of a comment. + * @summary Get one comment + * @param {number} id The ID of the note + * @param {string} commentId The ID of the comment + + * @throws {RequiredError} + */ + async getComment(id: number, commentId: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getComment(id, commentId, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns details about a specific note. + * @summary Get one note + * @param {number} id The ID of the note + + * @throws {RequiredError} + */ + async getNote(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getNote(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns all comments associated with a note. + * @summary Get all comments for a note + * @param {number} id The ID of the note + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + async getNoteComments(id: number, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getNoteComments(id, start, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns all notes. + * @summary Get all notes + * @param {number} [user_id] The ID of the user whose notes to fetch. If omitted, notes by all users will be returned. + * @param {string} [lead_id] The ID of the lead which notes to fetch. If omitted, notes about all leads will be returned. + * @param {number} [deal_id] The ID of the deal which notes to fetch. If omitted, notes about all deals will be returned. + * @param {number} [person_id] The ID of the person whose notes to fetch. If omitted, notes about all persons will be returned. + * @param {number} [org_id] The ID of the organization which notes to fetch. If omitted, notes about all organizations will be returned. + * @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`, `content`, `add_time`, `update_time`. + * @param {string} [start_date] The date in format of YYYY-MM-DD from which notes to fetch + * @param {string} [end_date] The date in format of YYYY-MM-DD until which notes to fetch to + * @param {0 | 1} [pinned_to_lead_flag] If set, the results are filtered by note to lead pinning state + * @param {0 | 1} [pinned_to_deal_flag] If set, the results are filtered by note to deal pinning state + * @param {0 | 1} [pinned_to_organization_flag] If set, the results are filtered by note to organization pinning state + * @param {0 | 1} [pinned_to_person_flag] If set, the results are filtered by note to person pinning state + + * @throws {RequiredError} + */ + async getNotes(user_id?: number, lead_id?: string, deal_id?: number, person_id?: number, org_id?: number, start?: number, limit?: number, sort?: string, start_date?: string, end_date?: string, pinned_to_lead_flag?: 0 | 1, pinned_to_deal_flag?: 0 | 1, pinned_to_organization_flag?: 0 | 1, pinned_to_person_flag?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getNotes(user_id, lead_id, deal_id, person_id, org_id, start, limit, sort, start_date, end_date, pinned_to_lead_flag, pinned_to_deal_flag, pinned_to_organization_flag, pinned_to_person_flag, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates a comment related to a note. + * @summary Update a comment related to a note + * @param {number} id The ID of the note + * @param {string} commentId The ID of the comment + * @param {CommentPostPutObject} [CommentPostPutObject] + + * @throws {RequiredError} + */ + async updateCommentForNote(id: number, commentId: string, CommentPostPutObject?: CommentPostPutObject, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateCommentForNote(id, commentId, CommentPostPutObject, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates a note. + * @summary Update a note + * @param {number} id The ID of the note + * @param {NoteRequest} [NoteRequest] + + * @throws {RequiredError} + */ + async updateNote(id: number, NoteRequest?: NoteRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateNote(id, NoteRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * NotesApi - factory interface + * @export + */ +export const NotesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = NotesApiFp(configuration) + return { + /** + * Adds a new note. + * @summary Add a note + * @param {NotesApiAddNoteRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addNote(requestParameters: NotesApiAddNoteRequest = {}, ): Promise { + return localVarFp.addNote(requestParameters.AddNoteRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Adds a new comment to a note. + * @summary Add a comment to a note + * @param {NotesApiAddNoteCommentRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addNoteComment(requestParameters: NotesApiAddNoteCommentRequest, ): Promise { + return localVarFp.addNoteComment(requestParameters.id, requestParameters.CommentPostPutObject, ).then((request) => request(axios, basePath)); + }, + /** + * Deletes a comment. + * @summary Delete a comment related to a note + * @param {NotesApiDeleteCommentRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteComment(requestParameters: NotesApiDeleteCommentRequest, ): Promise { + return localVarFp.deleteComment(requestParameters.id, requestParameters.commentId, ).then((request) => request(axios, basePath)); + }, + /** + * Deletes a specific note. + * @summary Delete a note + * @param {NotesApiDeleteNoteRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteNote(requestParameters: NotesApiDeleteNoteRequest, ): Promise { + return localVarFp.deleteNote(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns the details of a comment. + * @summary Get one comment + * @param {NotesApiGetCommentRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getComment(requestParameters: NotesApiGetCommentRequest, ): Promise { + return localVarFp.getComment(requestParameters.id, requestParameters.commentId, ).then((request) => request(axios, basePath)); + }, + /** + * Returns details about a specific note. + * @summary Get one note + * @param {NotesApiGetNoteRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getNote(requestParameters: NotesApiGetNoteRequest, ): Promise { + return localVarFp.getNote(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns all comments associated with a note. + * @summary Get all comments for a note + * @param {NotesApiGetNoteCommentsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getNoteComments(requestParameters: NotesApiGetNoteCommentsRequest, ): Promise { + return localVarFp.getNoteComments(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + /** + * Returns all notes. + * @summary Get all notes + * @param {NotesApiGetNotesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getNotes(requestParameters: NotesApiGetNotesRequest = {}, ): Promise { + return localVarFp.getNotes(requestParameters.user_id, requestParameters.lead_id, requestParameters.deal_id, requestParameters.person_id, requestParameters.org_id, requestParameters.start, requestParameters.limit, requestParameters.sort, requestParameters.start_date, requestParameters.end_date, requestParameters.pinned_to_lead_flag, requestParameters.pinned_to_deal_flag, requestParameters.pinned_to_organization_flag, requestParameters.pinned_to_person_flag, ).then((request) => request(axios, basePath)); + }, + /** + * Updates a comment related to a note. + * @summary Update a comment related to a note + * @param {NotesApiUpdateCommentForNoteRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + updateCommentForNote(requestParameters: NotesApiUpdateCommentForNoteRequest, ): Promise { + return localVarFp.updateCommentForNote(requestParameters.id, requestParameters.commentId, requestParameters.CommentPostPutObject, ).then((request) => request(axios, basePath)); + }, + /** + * Updates a note. + * @summary Update a note + * @param {NotesApiUpdateNoteRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + updateNote(requestParameters: NotesApiUpdateNoteRequest, ): Promise { + return localVarFp.updateNote(requestParameters.id, requestParameters.NoteRequest, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for addNote operation in NotesApi. + * @export + * @interface NotesApiAddNoteRequest + */ +export interface NotesApiAddNoteRequest { + /** + * + * @type {AddNoteRequest} + * @memberof NotesApiAddNote + */ + readonly AddNoteRequest?: AddNoteRequest +} + +/** + * Request parameters for addNoteComment operation in NotesApi. + * @export + * @interface NotesApiAddNoteCommentRequest + */ +export interface NotesApiAddNoteCommentRequest { + /** + * The ID of the note + * @type {number} + * @memberof NotesApiAddNoteComment + */ + readonly id: number + + /** + * + * @type {CommentPostPutObject} + * @memberof NotesApiAddNoteComment + */ + readonly CommentPostPutObject?: CommentPostPutObject +} + +/** + * Request parameters for deleteComment operation in NotesApi. + * @export + * @interface NotesApiDeleteCommentRequest + */ +export interface NotesApiDeleteCommentRequest { + /** + * The ID of the note + * @type {number} + * @memberof NotesApiDeleteComment + */ + readonly id: number + + /** + * The ID of the comment + * @type {string} + * @memberof NotesApiDeleteComment + */ + readonly commentId: string +} + +/** + * Request parameters for deleteNote operation in NotesApi. + * @export + * @interface NotesApiDeleteNoteRequest + */ +export interface NotesApiDeleteNoteRequest { + /** + * The ID of the note + * @type {number} + * @memberof NotesApiDeleteNote + */ + readonly id: number +} + +/** + * Request parameters for getComment operation in NotesApi. + * @export + * @interface NotesApiGetCommentRequest + */ +export interface NotesApiGetCommentRequest { + /** + * The ID of the note + * @type {number} + * @memberof NotesApiGetComment + */ + readonly id: number + + /** + * The ID of the comment + * @type {string} + * @memberof NotesApiGetComment + */ + readonly commentId: string +} + +/** + * Request parameters for getNote operation in NotesApi. + * @export + * @interface NotesApiGetNoteRequest + */ +export interface NotesApiGetNoteRequest { + /** + * The ID of the note + * @type {number} + * @memberof NotesApiGetNote + */ + readonly id: number +} + +/** + * Request parameters for getNoteComments operation in NotesApi. + * @export + * @interface NotesApiGetNoteCommentsRequest + */ +export interface NotesApiGetNoteCommentsRequest { + /** + * The ID of the note + * @type {number} + * @memberof NotesApiGetNoteComments + */ + readonly id: number + + /** + * Pagination start + * @type {number} + * @memberof NotesApiGetNoteComments + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof NotesApiGetNoteComments + */ + readonly limit?: number +} + +/** + * Request parameters for getNotes operation in NotesApi. + * @export + * @interface NotesApiGetNotesRequest + */ +export interface NotesApiGetNotesRequest { + /** + * The ID of the user whose notes to fetch. If omitted, notes by all users will be returned. + * @type {number} + * @memberof NotesApiGetNotes + */ + readonly user_id?: number + + /** + * The ID of the lead which notes to fetch. If omitted, notes about all leads will be returned. + * @type {string} + * @memberof NotesApiGetNotes + */ + readonly lead_id?: string + + /** + * The ID of the deal which notes to fetch. If omitted, notes about all deals will be returned. + * @type {number} + * @memberof NotesApiGetNotes + */ + readonly deal_id?: number + + /** + * The ID of the person whose notes to fetch. If omitted, notes about all persons will be returned. + * @type {number} + * @memberof NotesApiGetNotes + */ + readonly person_id?: number + + /** + * The ID of the organization which notes to fetch. If omitted, notes about all organizations will be returned. + * @type {number} + * @memberof NotesApiGetNotes + */ + readonly org_id?: number + + /** + * Pagination start + * @type {number} + * @memberof NotesApiGetNotes + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof NotesApiGetNotes + */ + 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`, `content`, `add_time`, `update_time`. + * @type {string} + * @memberof NotesApiGetNotes + */ + readonly sort?: string + + /** + * The date in format of YYYY-MM-DD from which notes to fetch + * @type {string} + * @memberof NotesApiGetNotes + */ + readonly start_date?: string + + /** + * The date in format of YYYY-MM-DD until which notes to fetch to + * @type {string} + * @memberof NotesApiGetNotes + */ + readonly end_date?: string + + /** + * If set, the results are filtered by note to lead pinning state + * @type {0 | 1} + * @memberof NotesApiGetNotes + */ + readonly pinned_to_lead_flag?: 0 | 1 + + /** + * If set, the results are filtered by note to deal pinning state + * @type {0 | 1} + * @memberof NotesApiGetNotes + */ + readonly pinned_to_deal_flag?: 0 | 1 + + /** + * If set, the results are filtered by note to organization pinning state + * @type {0 | 1} + * @memberof NotesApiGetNotes + */ + readonly pinned_to_organization_flag?: 0 | 1 + + /** + * If set, the results are filtered by note to person pinning state + * @type {0 | 1} + * @memberof NotesApiGetNotes + */ + readonly pinned_to_person_flag?: 0 | 1 +} + +/** + * Request parameters for updateCommentForNote operation in NotesApi. + * @export + * @interface NotesApiUpdateCommentForNoteRequest + */ +export interface NotesApiUpdateCommentForNoteRequest { + /** + * The ID of the note + * @type {number} + * @memberof NotesApiUpdateCommentForNote + */ + readonly id: number + + /** + * The ID of the comment + * @type {string} + * @memberof NotesApiUpdateCommentForNote + */ + readonly commentId: string + + /** + * + * @type {CommentPostPutObject} + * @memberof NotesApiUpdateCommentForNote + */ + readonly CommentPostPutObject?: CommentPostPutObject +} + +/** + * Request parameters for updateNote operation in NotesApi. + * @export + * @interface NotesApiUpdateNoteRequest + */ +export interface NotesApiUpdateNoteRequest { + /** + * The ID of the note + * @type {number} + * @memberof NotesApiUpdateNote + */ + readonly id: number + + /** + * + * @type {NoteRequest} + * @memberof NotesApiUpdateNote + */ + readonly NoteRequest?: NoteRequest +} + +/** + * NotesApi - object-oriented interface + * @export + * @class NotesApi + * @extends {BaseAPI} + */ +export class NotesApi extends BaseAPI { + /** + * Adds a new note. + * @summary Add a note + * @param {NotesApiAddNoteRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof NotesApi + */ + public addNote(requestParameters: NotesApiAddNoteRequest = {}, ) { + return NotesApiFp(this.configuration).addNote(requestParameters.AddNoteRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Adds a new comment to a note. + * @summary Add a comment to a note + * @param {NotesApiAddNoteCommentRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof NotesApi + */ + public addNoteComment(requestParameters: NotesApiAddNoteCommentRequest, ) { + return NotesApiFp(this.configuration).addNoteComment(requestParameters.id, requestParameters.CommentPostPutObject, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Deletes a comment. + * @summary Delete a comment related to a note + * @param {NotesApiDeleteCommentRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof NotesApi + */ + public deleteComment(requestParameters: NotesApiDeleteCommentRequest, ) { + return NotesApiFp(this.configuration).deleteComment(requestParameters.id, requestParameters.commentId, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Deletes a specific note. + * @summary Delete a note + * @param {NotesApiDeleteNoteRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof NotesApi + */ + public deleteNote(requestParameters: NotesApiDeleteNoteRequest, ) { + return NotesApiFp(this.configuration).deleteNote(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the details of a comment. + * @summary Get one comment + * @param {NotesApiGetCommentRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof NotesApi + */ + public getComment(requestParameters: NotesApiGetCommentRequest, ) { + return NotesApiFp(this.configuration).getComment(requestParameters.id, requestParameters.commentId, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns details about a specific note. + * @summary Get one note + * @param {NotesApiGetNoteRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof NotesApi + */ + public getNote(requestParameters: NotesApiGetNoteRequest, ) { + return NotesApiFp(this.configuration).getNote(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns all comments associated with a note. + * @summary Get all comments for a note + * @param {NotesApiGetNoteCommentsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof NotesApi + */ + public getNoteComments(requestParameters: NotesApiGetNoteCommentsRequest, ) { + return NotesApiFp(this.configuration).getNoteComments(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns all notes. + * @summary Get all notes + * @param {NotesApiGetNotesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof NotesApi + */ + public getNotes(requestParameters: NotesApiGetNotesRequest = {}, ) { + return NotesApiFp(this.configuration).getNotes(requestParameters.user_id, requestParameters.lead_id, requestParameters.deal_id, requestParameters.person_id, requestParameters.org_id, requestParameters.start, requestParameters.limit, requestParameters.sort, requestParameters.start_date, requestParameters.end_date, requestParameters.pinned_to_lead_flag, requestParameters.pinned_to_deal_flag, requestParameters.pinned_to_organization_flag, requestParameters.pinned_to_person_flag, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates a comment related to a note. + * @summary Update a comment related to a note + * @param {NotesApiUpdateCommentForNoteRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof NotesApi + */ + public updateCommentForNote(requestParameters: NotesApiUpdateCommentForNoteRequest, ) { + return NotesApiFp(this.configuration).updateCommentForNote(requestParameters.id, requestParameters.commentId, requestParameters.CommentPostPutObject, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates a note. + * @summary Update a note + * @param {NotesApiUpdateNoteRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof NotesApi + */ + public updateNote(requestParameters: NotesApiUpdateNoteRequest, ) { + return NotesApiFp(this.configuration).updateNote(requestParameters.id, requestParameters.NoteRequest, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/organization-fields-api.ts b/api/organization-fields-api.ts new file mode 100644 index 00000000..f1cd272f --- /dev/null +++ b/api/organization-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'; +/** + * OrganizationFieldsApi - axios parameter creator + * @export + */ +export const OrganizationFieldsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Adds a new organization field. For more information, see the tutorial for adding a new custom field. + * @summary Add a new organization field + * @param {CreateFieldRequest} [CreateFieldRequest] + + * @throws {RequiredError} + */ + addOrganizationField: async (CreateFieldRequest?: CreateFieldRequest, ): Promise => { + const localVarPath = `/organizationFields`; + // 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 an organization field + * @param {number} id The ID of the field + + * @throws {RequiredError} + */ + deleteOrganizationField: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteOrganizationField', 'id', id) + const localVarPath = `/organizationFields/{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 fields as deleted. + * @summary Delete multiple organization fields in bulk + * @param {string} ids The comma-separated field IDs to delete + + * @throws {RequiredError} + */ + deleteOrganizationFields: async (ids: string, ): Promise => { + // verify required parameter 'ids' is not null or undefined + assertParamExists('deleteOrganizationFields', 'ids', ids) + const localVarPath = `/organizationFields`; + // 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 organization field. + * @summary Get one organization field + * @param {number} id The ID of the field + + * @throws {RequiredError} + */ + getOrganizationField: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getOrganizationField', 'id', id) + const localVarPath = `/organizationFields/{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", ["contacts:read", "contacts: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 organization fields. + * @summary Get all organization fields + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + getOrganizationFields: async (start?: number, limit?: number, ): Promise => { + const localVarPath = `/organizationFields`; + // 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", "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 an organization field. For more information, see the tutorial for updating custom fields\' values. + * @summary Update an organization field + * @param {number} id The ID of the field + * @param {UpdateFieldRequest} [UpdateFieldRequest] + + * @throws {RequiredError} + */ + updateOrganizationField: async (id: number, UpdateFieldRequest?: UpdateFieldRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updateOrganizationField', 'id', id) + const localVarPath = `/organizationFields/{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, + }; + }, + } +}; + +/** + * OrganizationFieldsApi - functional programming interface + * @export + */ +export const OrganizationFieldsApiFp = 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 = OrganizationFieldsApiAxiosParamCreator(configuration) + return { + /** + * Adds a new organization field. For more information, see the tutorial for adding a new custom field. + * @summary Add a new organization field + * @param {CreateFieldRequest} [CreateFieldRequest] + + * @throws {RequiredError} + */ + async addOrganizationField(CreateFieldRequest?: CreateFieldRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addOrganizationField(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 an organization field + * @param {number} id The ID of the field + + * @throws {RequiredError} + */ + async deleteOrganizationField(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrganizationField(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Marks multiple fields as deleted. + * @summary Delete multiple organization fields in bulk + * @param {string} ids The comma-separated field IDs to delete + + * @throws {RequiredError} + */ + async deleteOrganizationFields(ids: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrganizationFields(ids, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns data about a specific organization field. + * @summary Get one organization field + * @param {number} id The ID of the field + + * @throws {RequiredError} + */ + async getOrganizationField(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationField(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns data about all organization fields. + * @summary Get all organization fields + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + async getOrganizationFields(start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationFields(start, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates an organization field. For more information, see the tutorial for updating custom fields\' values. + * @summary Update an organization field + * @param {number} id The ID of the field + * @param {UpdateFieldRequest} [UpdateFieldRequest] + + * @throws {RequiredError} + */ + async updateOrganizationField(id: number, UpdateFieldRequest?: UpdateFieldRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateOrganizationField(id, UpdateFieldRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * OrganizationFieldsApi - factory interface + * @export + */ +export const OrganizationFieldsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = OrganizationFieldsApiFp(configuration) + return { + /** + * Adds a new organization field. For more information, see the tutorial for adding a new custom field. + * @summary Add a new organization field + * @param {OrganizationFieldsApiAddOrganizationFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addOrganizationField(requestParameters: OrganizationFieldsApiAddOrganizationFieldRequest = {}, ): Promise { + return localVarFp.addOrganizationField(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 an organization field + * @param {OrganizationFieldsApiDeleteOrganizationFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteOrganizationField(requestParameters: OrganizationFieldsApiDeleteOrganizationFieldRequest, ): Promise { + return localVarFp.deleteOrganizationField(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Marks multiple fields as deleted. + * @summary Delete multiple organization fields in bulk + * @param {OrganizationFieldsApiDeleteOrganizationFieldsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteOrganizationFields(requestParameters: OrganizationFieldsApiDeleteOrganizationFieldsRequest, ): Promise { + return localVarFp.deleteOrganizationFields(requestParameters.ids, ).then((request) => request(axios, basePath)); + }, + /** + * Returns data about a specific organization field. + * @summary Get one organization field + * @param {OrganizationFieldsApiGetOrganizationFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getOrganizationField(requestParameters: OrganizationFieldsApiGetOrganizationFieldRequest, ): Promise { + return localVarFp.getOrganizationField(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns data about all organization fields. + * @summary Get all organization fields + * @param {OrganizationFieldsApiGetOrganizationFieldsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getOrganizationFields(requestParameters: OrganizationFieldsApiGetOrganizationFieldsRequest = {}, ): Promise { + return localVarFp.getOrganizationFields(requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + /** + * Updates an organization field. For more information, see the tutorial for updating custom fields\' values. + * @summary Update an organization field + * @param {OrganizationFieldsApiUpdateOrganizationFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + updateOrganizationField(requestParameters: OrganizationFieldsApiUpdateOrganizationFieldRequest, ): Promise { + return localVarFp.updateOrganizationField(requestParameters.id, requestParameters.UpdateFieldRequest, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for addOrganizationField operation in OrganizationFieldsApi. + * @export + * @interface OrganizationFieldsApiAddOrganizationFieldRequest + */ +export interface OrganizationFieldsApiAddOrganizationFieldRequest { + /** + * + * @type {CreateFieldRequest} + * @memberof OrganizationFieldsApiAddOrganizationField + */ + readonly CreateFieldRequest?: CreateFieldRequest +} + +/** + * Request parameters for deleteOrganizationField operation in OrganizationFieldsApi. + * @export + * @interface OrganizationFieldsApiDeleteOrganizationFieldRequest + */ +export interface OrganizationFieldsApiDeleteOrganizationFieldRequest { + /** + * The ID of the field + * @type {number} + * @memberof OrganizationFieldsApiDeleteOrganizationField + */ + readonly id: number +} + +/** + * Request parameters for deleteOrganizationFields operation in OrganizationFieldsApi. + * @export + * @interface OrganizationFieldsApiDeleteOrganizationFieldsRequest + */ +export interface OrganizationFieldsApiDeleteOrganizationFieldsRequest { + /** + * The comma-separated field IDs to delete + * @type {string} + * @memberof OrganizationFieldsApiDeleteOrganizationFields + */ + readonly ids: string +} + +/** + * Request parameters for getOrganizationField operation in OrganizationFieldsApi. + * @export + * @interface OrganizationFieldsApiGetOrganizationFieldRequest + */ +export interface OrganizationFieldsApiGetOrganizationFieldRequest { + /** + * The ID of the field + * @type {number} + * @memberof OrganizationFieldsApiGetOrganizationField + */ + readonly id: number +} + +/** + * Request parameters for getOrganizationFields operation in OrganizationFieldsApi. + * @export + * @interface OrganizationFieldsApiGetOrganizationFieldsRequest + */ +export interface OrganizationFieldsApiGetOrganizationFieldsRequest { + /** + * Pagination start + * @type {number} + * @memberof OrganizationFieldsApiGetOrganizationFields + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof OrganizationFieldsApiGetOrganizationFields + */ + readonly limit?: number +} + +/** + * Request parameters for updateOrganizationField operation in OrganizationFieldsApi. + * @export + * @interface OrganizationFieldsApiUpdateOrganizationFieldRequest + */ +export interface OrganizationFieldsApiUpdateOrganizationFieldRequest { + /** + * The ID of the field + * @type {number} + * @memberof OrganizationFieldsApiUpdateOrganizationField + */ + readonly id: number + + /** + * + * @type {UpdateFieldRequest} + * @memberof OrganizationFieldsApiUpdateOrganizationField + */ + readonly UpdateFieldRequest?: UpdateFieldRequest +} + +/** + * OrganizationFieldsApi - object-oriented interface + * @export + * @class OrganizationFieldsApi + * @extends {BaseAPI} + */ +export class OrganizationFieldsApi extends BaseAPI { + /** + * Adds a new organization field. For more information, see the tutorial for adding a new custom field. + * @summary Add a new organization field + * @param {OrganizationFieldsApiAddOrganizationFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationFieldsApi + */ + public addOrganizationField(requestParameters: OrganizationFieldsApiAddOrganizationFieldRequest = {}, ) { + return OrganizationFieldsApiFp(this.configuration).addOrganizationField(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 an organization field + * @param {OrganizationFieldsApiDeleteOrganizationFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationFieldsApi + */ + public deleteOrganizationField(requestParameters: OrganizationFieldsApiDeleteOrganizationFieldRequest, ) { + return OrganizationFieldsApiFp(this.configuration).deleteOrganizationField(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Marks multiple fields as deleted. + * @summary Delete multiple organization fields in bulk + * @param {OrganizationFieldsApiDeleteOrganizationFieldsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationFieldsApi + */ + public deleteOrganizationFields(requestParameters: OrganizationFieldsApiDeleteOrganizationFieldsRequest, ) { + return OrganizationFieldsApiFp(this.configuration).deleteOrganizationFields(requestParameters.ids, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about a specific organization field. + * @summary Get one organization field + * @param {OrganizationFieldsApiGetOrganizationFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationFieldsApi + */ + public getOrganizationField(requestParameters: OrganizationFieldsApiGetOrganizationFieldRequest, ) { + return OrganizationFieldsApiFp(this.configuration).getOrganizationField(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about all organization fields. + * @summary Get all organization fields + * @param {OrganizationFieldsApiGetOrganizationFieldsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationFieldsApi + */ + public getOrganizationFields(requestParameters: OrganizationFieldsApiGetOrganizationFieldsRequest = {}, ) { + return OrganizationFieldsApiFp(this.configuration).getOrganizationFields(requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates an organization field. For more information, see the tutorial for updating custom fields\' values. + * @summary Update an organization field + * @param {OrganizationFieldsApiUpdateOrganizationFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationFieldsApi + */ + public updateOrganizationField(requestParameters: OrganizationFieldsApiUpdateOrganizationFieldRequest, ) { + return OrganizationFieldsApiFp(this.configuration).updateOrganizationField(requestParameters.id, requestParameters.UpdateFieldRequest, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/organization-relationships-api.ts b/api/organization-relationships-api.ts new file mode 100644 index 00000000..c24d26a0 --- /dev/null +++ b/api/organization-relationships-api.ts @@ -0,0 +1,565 @@ +/* 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 { AddOrganizationRelationshipRequest } from '../models'; +// @ts-ignore +import { AddOrganizationRelationshipResponse200 } from '../models'; +// @ts-ignore +import { DeleteOrganizationRelationshipResponse200 } from '../models'; +// @ts-ignore +import { GetOrganizationRelationshipResponse200 } from '../models'; +// @ts-ignore +import { GetOrganizationRelationshipsResponse200 } from '../models'; +// @ts-ignore +import { OrganizationRelationship } from '../models'; +// @ts-ignore +import { UpdateOrganizationRelationshipResponse200 } from '../models'; +/** + * OrganizationRelationshipsApi - axios parameter creator + * @export + */ +export const OrganizationRelationshipsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Creates and returns an organization relationship. + * @summary Create an organization relationship + * @param {AddOrganizationRelationshipRequest} [AddOrganizationRelationshipRequest] + + * @throws {RequiredError} + */ + addOrganizationRelationship: async (AddOrganizationRelationshipRequest?: AddOrganizationRelationshipRequest, ): Promise => { + const localVarPath = `/organizationRelationships`; + // 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", ["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(AddOrganizationRelationshipRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Deletes an organization relationship and returns the deleted ID. + * @summary Delete an organization relationship + * @param {number} id The ID of the organization relationship + + * @throws {RequiredError} + */ + deleteOrganizationRelationship: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteOrganizationRelationship', 'id', id) + const localVarPath = `/organizationRelationships/{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", ["contacts:full"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Finds and returns an organization relationship from its ID. + * @summary Get one organization relationship + * @param {number} id The ID of the organization relationship + * @param {number} [org_id] The ID of the base organization for the returned calculated values + + * @throws {RequiredError} + */ + getOrganizationRelationship: async (id: number, org_id?: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getOrganizationRelationship', 'id', id) + const localVarPath = `/organizationRelationships/{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", ["contacts:read", "contacts:full"], configuration) + + if (org_id !== undefined) { + localVarQueryParameter['org_id'] = org_id; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Gets all of the relationships for a supplied organization ID. + * @summary Get all relationships for organization + * @param {number} org_id The ID of the organization to get relationships for + + * @throws {RequiredError} + */ + getOrganizationRelationships: async (org_id: number, ): Promise => { + // verify required parameter 'org_id' is not null or undefined + assertParamExists('getOrganizationRelationships', 'org_id', org_id) + const localVarPath = `/organizationRelationships`; + // 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 (org_id !== undefined) { + localVarQueryParameter['org_id'] = org_id; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Updates and returns an organization relationship. + * @summary Update an organization relationship + * @param {number} id The ID of the organization relationship + * @param {OrganizationRelationship} [OrganizationRelationship] + + * @throws {RequiredError} + */ + updateOrganizationRelationship: async (id: number, OrganizationRelationship?: OrganizationRelationship, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updateOrganizationRelationship', 'id', id) + const localVarPath = `/organizationRelationships/{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", ["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(OrganizationRelationship, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * OrganizationRelationshipsApi - functional programming interface + * @export + */ +export const OrganizationRelationshipsApiFp = 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 = OrganizationRelationshipsApiAxiosParamCreator(configuration) + return { + /** + * Creates and returns an organization relationship. + * @summary Create an organization relationship + * @param {AddOrganizationRelationshipRequest} [AddOrganizationRelationshipRequest] + + * @throws {RequiredError} + */ + async addOrganizationRelationship(AddOrganizationRelationshipRequest?: AddOrganizationRelationshipRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addOrganizationRelationship(AddOrganizationRelationshipRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Deletes an organization relationship and returns the deleted ID. + * @summary Delete an organization relationship + * @param {number} id The ID of the organization relationship + + * @throws {RequiredError} + */ + async deleteOrganizationRelationship(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrganizationRelationship(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Finds and returns an organization relationship from its ID. + * @summary Get one organization relationship + * @param {number} id The ID of the organization relationship + * @param {number} [org_id] The ID of the base organization for the returned calculated values + + * @throws {RequiredError} + */ + async getOrganizationRelationship(id: number, org_id?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationRelationship(id, org_id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Gets all of the relationships for a supplied organization ID. + * @summary Get all relationships for organization + * @param {number} org_id The ID of the organization to get relationships for + + * @throws {RequiredError} + */ + async getOrganizationRelationships(org_id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationRelationships(org_id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates and returns an organization relationship. + * @summary Update an organization relationship + * @param {number} id The ID of the organization relationship + * @param {OrganizationRelationship} [OrganizationRelationship] + + * @throws {RequiredError} + */ + async updateOrganizationRelationship(id: number, OrganizationRelationship?: OrganizationRelationship, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateOrganizationRelationship(id, OrganizationRelationship, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * OrganizationRelationshipsApi - factory interface + * @export + */ +export const OrganizationRelationshipsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = OrganizationRelationshipsApiFp(configuration) + return { + /** + * Creates and returns an organization relationship. + * @summary Create an organization relationship + * @param {OrganizationRelationshipsApiAddOrganizationRelationshipRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addOrganizationRelationship(requestParameters: OrganizationRelationshipsApiAddOrganizationRelationshipRequest = {}, ): Promise { + return localVarFp.addOrganizationRelationship(requestParameters.AddOrganizationRelationshipRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Deletes an organization relationship and returns the deleted ID. + * @summary Delete an organization relationship + * @param {OrganizationRelationshipsApiDeleteOrganizationRelationshipRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteOrganizationRelationship(requestParameters: OrganizationRelationshipsApiDeleteOrganizationRelationshipRequest, ): Promise { + return localVarFp.deleteOrganizationRelationship(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Finds and returns an organization relationship from its ID. + * @summary Get one organization relationship + * @param {OrganizationRelationshipsApiGetOrganizationRelationshipRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getOrganizationRelationship(requestParameters: OrganizationRelationshipsApiGetOrganizationRelationshipRequest, ): Promise { + return localVarFp.getOrganizationRelationship(requestParameters.id, requestParameters.org_id, ).then((request) => request(axios, basePath)); + }, + /** + * Gets all of the relationships for a supplied organization ID. + * @summary Get all relationships for organization + * @param {OrganizationRelationshipsApiGetOrganizationRelationshipsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getOrganizationRelationships(requestParameters: OrganizationRelationshipsApiGetOrganizationRelationshipsRequest, ): Promise { + return localVarFp.getOrganizationRelationships(requestParameters.org_id, ).then((request) => request(axios, basePath)); + }, + /** + * Updates and returns an organization relationship. + * @summary Update an organization relationship + * @param {OrganizationRelationshipsApiUpdateOrganizationRelationshipRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + updateOrganizationRelationship(requestParameters: OrganizationRelationshipsApiUpdateOrganizationRelationshipRequest, ): Promise { + return localVarFp.updateOrganizationRelationship(requestParameters.id, requestParameters.OrganizationRelationship, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for addOrganizationRelationship operation in OrganizationRelationshipsApi. + * @export + * @interface OrganizationRelationshipsApiAddOrganizationRelationshipRequest + */ +export interface OrganizationRelationshipsApiAddOrganizationRelationshipRequest { + /** + * + * @type {AddOrganizationRelationshipRequest} + * @memberof OrganizationRelationshipsApiAddOrganizationRelationship + */ + readonly AddOrganizationRelationshipRequest?: AddOrganizationRelationshipRequest +} + +/** + * Request parameters for deleteOrganizationRelationship operation in OrganizationRelationshipsApi. + * @export + * @interface OrganizationRelationshipsApiDeleteOrganizationRelationshipRequest + */ +export interface OrganizationRelationshipsApiDeleteOrganizationRelationshipRequest { + /** + * The ID of the organization relationship + * @type {number} + * @memberof OrganizationRelationshipsApiDeleteOrganizationRelationship + */ + readonly id: number +} + +/** + * Request parameters for getOrganizationRelationship operation in OrganizationRelationshipsApi. + * @export + * @interface OrganizationRelationshipsApiGetOrganizationRelationshipRequest + */ +export interface OrganizationRelationshipsApiGetOrganizationRelationshipRequest { + /** + * The ID of the organization relationship + * @type {number} + * @memberof OrganizationRelationshipsApiGetOrganizationRelationship + */ + readonly id: number + + /** + * The ID of the base organization for the returned calculated values + * @type {number} + * @memberof OrganizationRelationshipsApiGetOrganizationRelationship + */ + readonly org_id?: number +} + +/** + * Request parameters for getOrganizationRelationships operation in OrganizationRelationshipsApi. + * @export + * @interface OrganizationRelationshipsApiGetOrganizationRelationshipsRequest + */ +export interface OrganizationRelationshipsApiGetOrganizationRelationshipsRequest { + /** + * The ID of the organization to get relationships for + * @type {number} + * @memberof OrganizationRelationshipsApiGetOrganizationRelationships + */ + readonly org_id: number +} + +/** + * Request parameters for updateOrganizationRelationship operation in OrganizationRelationshipsApi. + * @export + * @interface OrganizationRelationshipsApiUpdateOrganizationRelationshipRequest + */ +export interface OrganizationRelationshipsApiUpdateOrganizationRelationshipRequest { + /** + * The ID of the organization relationship + * @type {number} + * @memberof OrganizationRelationshipsApiUpdateOrganizationRelationship + */ + readonly id: number + + /** + * + * @type {OrganizationRelationship} + * @memberof OrganizationRelationshipsApiUpdateOrganizationRelationship + */ + readonly OrganizationRelationship?: OrganizationRelationship +} + +/** + * OrganizationRelationshipsApi - object-oriented interface + * @export + * @class OrganizationRelationshipsApi + * @extends {BaseAPI} + */ +export class OrganizationRelationshipsApi extends BaseAPI { + /** + * Creates and returns an organization relationship. + * @summary Create an organization relationship + * @param {OrganizationRelationshipsApiAddOrganizationRelationshipRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationRelationshipsApi + */ + public addOrganizationRelationship(requestParameters: OrganizationRelationshipsApiAddOrganizationRelationshipRequest = {}, ) { + return OrganizationRelationshipsApiFp(this.configuration).addOrganizationRelationship(requestParameters.AddOrganizationRelationshipRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Deletes an organization relationship and returns the deleted ID. + * @summary Delete an organization relationship + * @param {OrganizationRelationshipsApiDeleteOrganizationRelationshipRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationRelationshipsApi + */ + public deleteOrganizationRelationship(requestParameters: OrganizationRelationshipsApiDeleteOrganizationRelationshipRequest, ) { + return OrganizationRelationshipsApiFp(this.configuration).deleteOrganizationRelationship(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Finds and returns an organization relationship from its ID. + * @summary Get one organization relationship + * @param {OrganizationRelationshipsApiGetOrganizationRelationshipRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationRelationshipsApi + */ + public getOrganizationRelationship(requestParameters: OrganizationRelationshipsApiGetOrganizationRelationshipRequest, ) { + return OrganizationRelationshipsApiFp(this.configuration).getOrganizationRelationship(requestParameters.id, requestParameters.org_id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Gets all of the relationships for a supplied organization ID. + * @summary Get all relationships for organization + * @param {OrganizationRelationshipsApiGetOrganizationRelationshipsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationRelationshipsApi + */ + public getOrganizationRelationships(requestParameters: OrganizationRelationshipsApiGetOrganizationRelationshipsRequest, ) { + return OrganizationRelationshipsApiFp(this.configuration).getOrganizationRelationships(requestParameters.org_id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates and returns an organization relationship. + * @summary Update an organization relationship + * @param {OrganizationRelationshipsApiUpdateOrganizationRelationshipRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationRelationshipsApi + */ + public updateOrganizationRelationship(requestParameters: OrganizationRelationshipsApiUpdateOrganizationRelationshipRequest, ) { + return OrganizationRelationshipsApiFp(this.configuration).updateOrganizationRelationship(requestParameters.id, requestParameters.OrganizationRelationship, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/organizations-api.ts b/api/organizations-api.ts new file mode 100644 index 00000000..49f2f708 --- /dev/null +++ b/api/organizations-api.ts @@ -0,0 +1,2301 @@ +/* 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 { AddOrganizationFollowerRequest } from '../models'; +// @ts-ignore +import { AddOrganizationFollowerResponse200 } from '../models'; +// @ts-ignore +import { AddOrganizationRequest } from '../models'; +// @ts-ignore +import { AddOrganizationResponse200 } from '../models'; +// @ts-ignore +import { DeleteOrganizationFollowerResponse200 } from '../models'; +// @ts-ignore +import { DeleteOrganizationResponse200 } from '../models'; +// @ts-ignore +import { DeleteOrganizationsResponse200 } from '../models'; +// @ts-ignore +import { FailResponse } from '../models'; +// @ts-ignore +import { GetAssociatedActivitiesResponse200 } from '../models'; +// @ts-ignore +import { GetAssociatedDealsResponse200 } from '../models'; +// @ts-ignore +import { GetAssociatedFilesResponse200 } from '../models'; +// @ts-ignore +import { GetAssociatedFollowersResponse2001 } from '../models'; +// @ts-ignore +import { GetAssociatedMailMessagesResponse200 } from '../models'; +// @ts-ignore +import { GetAssociatedUpdatesResponse200 } from '../models'; +// @ts-ignore +import { GetOrganizationResponse200 } from '../models'; +// @ts-ignore +import { GetOrganizationsCollection200Response } from '../models'; +// @ts-ignore +import { GetOrganizationsResponse200 } from '../models'; +// @ts-ignore +import { ListPermittedUsersResponse2001 } from '../models'; +// @ts-ignore +import { ListPersonsResponse200 } from '../models'; +// @ts-ignore +import { MergeOrganizationsRequest } from '../models'; +// @ts-ignore +import { MergeOrganizationsResponse200 } from '../models'; +// @ts-ignore +import { SearchOrganizationResponse200 } from '../models'; +// @ts-ignore +import { UpdateOrganizationRequest } from '../models'; +// @ts-ignore +import { UpdateOrganizationResponse200 } from '../models'; +/** + * OrganizationsApi - axios parameter creator + * @export + */ +export const OrganizationsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Adds a new organization. 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 organizationFields and look for `key` values. For more information, see the tutorial for adding an organization. + * @summary Add an organization + * @param {AddOrganizationRequest} [AddOrganizationRequest] + + * @throws {RequiredError} + */ + addOrganization: async (AddOrganizationRequest?: AddOrganizationRequest, ): Promise => { + const localVarPath = `/organizations`; + // 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", ["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(AddOrganizationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Adds a follower to an organization. + * @summary Add a follower to an organization + * @param {number} id The ID of the organization + * @param {AddOrganizationFollowerRequest} [AddOrganizationFollowerRequest] + + * @throws {RequiredError} + */ + addOrganizationFollower: async (id: number, AddOrganizationFollowerRequest?: AddOrganizationFollowerRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('addOrganizationFollower', 'id', id) + const localVarPath = `/organizations/{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", ["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(AddOrganizationFollowerRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Marks an organization as deleted. After 30 days, the organization will be permanently deleted. + * @summary Delete an organization + * @param {number} id The ID of the organization + + * @throws {RequiredError} + */ + deleteOrganization: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteOrganization', 'id', id) + const localVarPath = `/organizations/{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", ["contacts: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 an organization. You can retrieve the `follower_id` from the List followers of an organization endpoint. + * @summary Delete a follower from an organization + * @param {number} id The ID of the organization + * @param {number} follower_id The ID of the follower + + * @throws {RequiredError} + */ + deleteOrganizationFollower: async (id: number, follower_id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteOrganizationFollower', 'id', id) + // verify required parameter 'follower_id' is not null or undefined + assertParamExists('deleteOrganizationFollower', 'follower_id', follower_id) + const localVarPath = `/organizations/{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", ["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 organizations as deleted. After 30 days, the organizations will be permanently deleted. + * @summary Delete multiple organizations in bulk + * @param {string} ids The comma-separated IDs that will be deleted + + * @throws {RequiredError} + */ + deleteOrganizations: async (ids: string, ): Promise => { + // verify required parameter 'ids' is not null or undefined + assertParamExists('deleteOrganizations', 'ids', ids) + const localVarPath = `/organizations`; + // 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", ["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 the details of an organization. Note that this also returns some additional fields which are not present when asking for all organizations. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of organizationFields. + * @summary Get details of an organization + * @param {number} id The ID of the organization + + * @throws {RequiredError} + */ + getOrganization: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getOrganization', 'id', id) + const localVarPath = `/organizations/{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", ["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, + }; + }, + /** + * Lists activities associated with an organization. + * @summary List activities associated with an organization + * @param {number} id The ID of the organization + * @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} + */ + getOrganizationActivities: async (id: number, start?: number, limit?: number, done?: 0 | 1, exclude?: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getOrganizationActivities', 'id', id) + const localVarPath = `/organizations/{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 deals associated with an organization. + * @summary List deals associated with an organization + * @param {number} id The ID of the organization + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + * @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 {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} [only_primary_association] If set, only deals that are directly associated to the organization are fetched. If not set (default), all deals are fetched that are either directly or indirectly related to the organization. Indirect relations include relations through custom, organization-type fields and through persons of the given organization. + + * @throws {RequiredError} + */ + getOrganizationDeals: async (id: number, start?: number, limit?: number, status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted', sort?: string, only_primary_association?: 0 | 1, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getOrganizationDeals', 'id', id) + const localVarPath = `/organizations/{id}/deals` + .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 (status !== undefined) { + localVarQueryParameter['status'] = status; + } + + if (sort !== undefined) { + localVarQueryParameter['sort'] = sort; + } + + if (only_primary_association !== undefined) { + localVarQueryParameter['only_primary_association'] = only_primary_association; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Lists files associated with an organization. + * @summary List files attached to an organization + * @param {number} id The ID of the organization + * @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} + */ + getOrganizationFiles: async (id: number, start?: number, limit?: number, sort?: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getOrganizationFiles', 'id', id) + const localVarPath = `/organizations/{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", ["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, + }; + }, + /** + * Lists the followers of an organization. + * @summary List followers of an organization + * @param {number} id The ID of the organization + + * @throws {RequiredError} + */ + getOrganizationFollowers: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getOrganizationFollowers', 'id', id) + const localVarPath = `/organizations/{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", ["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, + }; + }, + /** + * Lists mail messages associated with an organization. + * @summary List mail messages associated with an organization + * @param {number} id The ID of the organization + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + getOrganizationMailMessages: async (id: number, start?: number, limit?: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getOrganizationMailMessages', 'id', id) + const localVarPath = `/organizations/{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 persons associated with an organization.
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 persons of an organization + * @param {number} id The ID of the organization + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + getOrganizationPersons: async (id: number, start?: number, limit?: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getOrganizationPersons', 'id', id) + const localVarPath = `/organizations/{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 updates about an organization. + * @summary List updates about an organization + * @param {number} id The ID of the organization + * @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 - activity, plannedActivity, note, file, change, deal, follower, participant, mailMessage, mailMessageWithAttachment, invoice, activityFile, document). + + * @throws {RequiredError} + */ + getOrganizationUpdates: async (id: number, start?: number, limit?: number, all_changes?: string, items?: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getOrganizationUpdates', 'id', id) + const localVarPath = `/organizations/{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, + }; + }, + /** + * List users permitted to access an organization. + * @summary List permitted users + * @param {number} id The ID of the organization + + * @throws {RequiredError} + */ + getOrganizationUsers: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getOrganizationUsers', 'id', id) + const localVarPath = `/organizations/{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", ["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 organizations. + * @summary Get all organizations + * @param {number} [user_id] If supplied, only organizations owned by the given user will be returned. However, `filter_id` takes precedence over `user_id` when both are supplied. + * @param {number} [filter_id] The ID of the filter to use + * @param {string} [first_char] If supplied, only organizations whose name starts with the specified letter will be returned (case-insensitive) + * @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). + + * @throws {RequiredError} + */ + getOrganizations: async (user_id?: number, filter_id?: number, first_char?: string, start?: number, limit?: number, sort?: string, ): Promise => { + const localVarPath = `/organizations`; + // 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 (user_id !== undefined) { + localVarQueryParameter['user_id'] = user_id; + } + + if (filter_id !== undefined) { + localVarQueryParameter['filter_id'] = filter_id; + } + + if (first_char !== undefined) { + localVarQueryParameter['first_char'] = first_char; + } + + 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, + }; + }, + /** + * Returns all organizations. 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 organizations (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} [owner_id] If supplied, only organizations owned by the given user will be returned + * @param {string} [first_char] If supplied, only organizations whose name starts with the specified letter will be returned (case-insensitive) + + * @throws {RequiredError} + */ + getOrganizationsCollection: async (cursor?: string, limit?: number, since?: string, until?: string, owner_id?: number, first_char?: string, ): Promise => { + const localVarPath = `/organizations/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", ["contacts:read", "contacts: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 (owner_id !== undefined) { + localVarQueryParameter['owner_id'] = owner_id; + } + + if (first_char !== undefined) { + localVarQueryParameter['first_char'] = first_char; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Merges an organization with another organization. For more information, see the tutorial for merging two organizations. + * @summary Merge two organizations + * @param {number} id The ID of the organization + * @param {MergeOrganizationsRequest} [MergeOrganizationsRequest] + + * @throws {RequiredError} + */ + mergeOrganizations: async (id: number, MergeOrganizationsRequest?: MergeOrganizationsRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('mergeOrganizations', 'id', id) + const localVarPath = `/organizations/{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", ["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(MergeOrganizationsRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Searches all organizations by name, address, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. + * @summary Search organizations + * @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 {'address' | 'custom_fields' | 'notes' | 'name'} [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} [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} + */ + searchOrganization: async (term: string, fields?: 'address' | 'custom_fields' | 'notes' | 'name', exact_match?: boolean, start?: number, limit?: number, ): Promise => { + // verify required parameter 'term' is not null or undefined + assertParamExists('searchOrganization', 'term', term) + const localVarPath = `/organizations/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", ["contacts:read", "contacts: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 (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 an organization. + * @summary Update an organization + * @param {number} id The ID of the organization + * @param {UpdateOrganizationRequest} [UpdateOrganizationRequest] + + * @throws {RequiredError} + */ + updateOrganization: async (id: number, UpdateOrganizationRequest?: UpdateOrganizationRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updateOrganization', 'id', id) + const localVarPath = `/organizations/{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", ["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(UpdateOrganizationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * OrganizationsApi - functional programming interface + * @export + */ +export const OrganizationsApiFp = 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 = OrganizationsApiAxiosParamCreator(configuration) + return { + /** + * Adds a new organization. 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 organizationFields and look for `key` values. For more information, see the tutorial for adding an organization. + * @summary Add an organization + * @param {AddOrganizationRequest} [AddOrganizationRequest] + + * @throws {RequiredError} + */ + async addOrganization(AddOrganizationRequest?: AddOrganizationRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addOrganization(AddOrganizationRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Adds a follower to an organization. + * @summary Add a follower to an organization + * @param {number} id The ID of the organization + * @param {AddOrganizationFollowerRequest} [AddOrganizationFollowerRequest] + + * @throws {RequiredError} + */ + async addOrganizationFollower(id: number, AddOrganizationFollowerRequest?: AddOrganizationFollowerRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addOrganizationFollower(id, AddOrganizationFollowerRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Marks an organization as deleted. After 30 days, the organization will be permanently deleted. + * @summary Delete an organization + * @param {number} id The ID of the organization + + * @throws {RequiredError} + */ + async deleteOrganization(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrganization(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Deletes a follower from an organization. You can retrieve the `follower_id` from the List followers of an organization endpoint. + * @summary Delete a follower from an organization + * @param {number} id The ID of the organization + * @param {number} follower_id The ID of the follower + + * @throws {RequiredError} + */ + async deleteOrganizationFollower(id: number, follower_id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrganizationFollower(id, follower_id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Marks multiple organizations as deleted. After 30 days, the organizations will be permanently deleted. + * @summary Delete multiple organizations in bulk + * @param {string} ids The comma-separated IDs that will be deleted + + * @throws {RequiredError} + */ + async deleteOrganizations(ids: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrganizations(ids, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns the details of an organization. Note that this also returns some additional fields which are not present when asking for all organizations. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of organizationFields. + * @summary Get details of an organization + * @param {number} id The ID of the organization + + * @throws {RequiredError} + */ + async getOrganization(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganization(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists activities associated with an organization. + * @summary List activities associated with an organization + * @param {number} id The ID of the organization + * @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 getOrganizationActivities(id: number, start?: number, limit?: number, done?: 0 | 1, exclude?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationActivities(id, start, limit, done, exclude, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists deals associated with an organization. + * @summary List deals associated with an organization + * @param {number} id The ID of the organization + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + * @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 {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} [only_primary_association] If set, only deals that are directly associated to the organization are fetched. If not set (default), all deals are fetched that are either directly or indirectly related to the organization. Indirect relations include relations through custom, organization-type fields and through persons of the given organization. + + * @throws {RequiredError} + */ + async getOrganizationDeals(id: number, start?: number, limit?: number, status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted', sort?: string, only_primary_association?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationDeals(id, start, limit, status, sort, only_primary_association, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists files associated with an organization. + * @summary List files attached to an organization + * @param {number} id The ID of the organization + * @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 getOrganizationFiles(id: number, start?: number, limit?: number, sort?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationFiles(id, start, limit, sort, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists the followers of an organization. + * @summary List followers of an organization + * @param {number} id The ID of the organization + + * @throws {RequiredError} + */ + async getOrganizationFollowers(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationFollowers(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists mail messages associated with an organization. + * @summary List mail messages associated with an organization + * @param {number} id The ID of the organization + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + async getOrganizationMailMessages(id: number, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationMailMessages(id, start, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists persons associated with an organization.
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 persons of an organization + * @param {number} id The ID of the organization + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + async getOrganizationPersons(id: number, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationPersons(id, start, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists updates about an organization. + * @summary List updates about an organization + * @param {number} id The ID of the organization + * @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 - activity, plannedActivity, note, file, change, deal, follower, participant, mailMessage, mailMessageWithAttachment, invoice, activityFile, document). + + * @throws {RequiredError} + */ + async getOrganizationUpdates(id: number, start?: number, limit?: number, all_changes?: string, items?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationUpdates(id, start, limit, all_changes, items, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * List users permitted to access an organization. + * @summary List permitted users + * @param {number} id The ID of the organization + + * @throws {RequiredError} + */ + async getOrganizationUsers(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationUsers(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns all organizations. + * @summary Get all organizations + * @param {number} [user_id] If supplied, only organizations owned by the given user will be returned. However, `filter_id` takes precedence over `user_id` when both are supplied. + * @param {number} [filter_id] The ID of the filter to use + * @param {string} [first_char] If supplied, only organizations whose name starts with the specified letter will be returned (case-insensitive) + * @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). + + * @throws {RequiredError} + */ + async getOrganizations(user_id?: number, filter_id?: number, first_char?: string, start?: number, limit?: number, sort?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizations(user_id, filter_id, first_char, start, limit, sort, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns all organizations. 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 organizations (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} [owner_id] If supplied, only organizations owned by the given user will be returned + * @param {string} [first_char] If supplied, only organizations whose name starts with the specified letter will be returned (case-insensitive) + + * @throws {RequiredError} + */ + async getOrganizationsCollection(cursor?: string, limit?: number, since?: string, until?: string, owner_id?: number, first_char?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationsCollection(cursor, limit, since, until, owner_id, first_char, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Merges an organization with another organization. For more information, see the tutorial for merging two organizations. + * @summary Merge two organizations + * @param {number} id The ID of the organization + * @param {MergeOrganizationsRequest} [MergeOrganizationsRequest] + + * @throws {RequiredError} + */ + async mergeOrganizations(id: number, MergeOrganizationsRequest?: MergeOrganizationsRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.mergeOrganizations(id, MergeOrganizationsRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Searches all organizations by name, address, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. + * @summary Search organizations + * @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 {'address' | 'custom_fields' | 'notes' | 'name'} [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} [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 searchOrganization(term: string, fields?: 'address' | 'custom_fields' | 'notes' | 'name', exact_match?: boolean, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.searchOrganization(term, fields, exact_match, start, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates the properties of an organization. + * @summary Update an organization + * @param {number} id The ID of the organization + * @param {UpdateOrganizationRequest} [UpdateOrganizationRequest] + + * @throws {RequiredError} + */ + async updateOrganization(id: number, UpdateOrganizationRequest?: UpdateOrganizationRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateOrganization(id, UpdateOrganizationRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * OrganizationsApi - factory interface + * @export + */ +export const OrganizationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = OrganizationsApiFp(configuration) + return { + /** + * Adds a new organization. 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 organizationFields and look for `key` values. For more information, see the tutorial for adding an organization. + * @summary Add an organization + * @param {OrganizationsApiAddOrganizationRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addOrganization(requestParameters: OrganizationsApiAddOrganizationRequest = {}, ): Promise { + return localVarFp.addOrganization(requestParameters.AddOrganizationRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Adds a follower to an organization. + * @summary Add a follower to an organization + * @param {OrganizationsApiAddOrganizationFollowerRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addOrganizationFollower(requestParameters: OrganizationsApiAddOrganizationFollowerRequest, ): Promise { + return localVarFp.addOrganizationFollower(requestParameters.id, requestParameters.AddOrganizationFollowerRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Marks an organization as deleted. After 30 days, the organization will be permanently deleted. + * @summary Delete an organization + * @param {OrganizationsApiDeleteOrganizationRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteOrganization(requestParameters: OrganizationsApiDeleteOrganizationRequest, ): Promise { + return localVarFp.deleteOrganization(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Deletes a follower from an organization. You can retrieve the `follower_id` from the List followers of an organization endpoint. + * @summary Delete a follower from an organization + * @param {OrganizationsApiDeleteOrganizationFollowerRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteOrganizationFollower(requestParameters: OrganizationsApiDeleteOrganizationFollowerRequest, ): Promise { + return localVarFp.deleteOrganizationFollower(requestParameters.id, requestParameters.follower_id, ).then((request) => request(axios, basePath)); + }, + /** + * Marks multiple organizations as deleted. After 30 days, the organizations will be permanently deleted. + * @summary Delete multiple organizations in bulk + * @param {OrganizationsApiDeleteOrganizationsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteOrganizations(requestParameters: OrganizationsApiDeleteOrganizationsRequest, ): Promise { + return localVarFp.deleteOrganizations(requestParameters.ids, ).then((request) => request(axios, basePath)); + }, + /** + * Returns the details of an organization. Note that this also returns some additional fields which are not present when asking for all organizations. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of organizationFields. + * @summary Get details of an organization + * @param {OrganizationsApiGetOrganizationRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getOrganization(requestParameters: OrganizationsApiGetOrganizationRequest, ): Promise { + return localVarFp.getOrganization(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Lists activities associated with an organization. + * @summary List activities associated with an organization + * @param {OrganizationsApiGetOrganizationActivitiesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getOrganizationActivities(requestParameters: OrganizationsApiGetOrganizationActivitiesRequest, ): Promise { + return localVarFp.getOrganizationActivities(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.done, requestParameters.exclude, ).then((request) => request(axios, basePath)); + }, + /** + * Lists deals associated with an organization. + * @summary List deals associated with an organization + * @param {OrganizationsApiGetOrganizationDealsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getOrganizationDeals(requestParameters: OrganizationsApiGetOrganizationDealsRequest, ): Promise { + return localVarFp.getOrganizationDeals(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.status, requestParameters.sort, requestParameters.only_primary_association, ).then((request) => request(axios, basePath)); + }, + /** + * Lists files associated with an organization. + * @summary List files attached to an organization + * @param {OrganizationsApiGetOrganizationFilesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getOrganizationFiles(requestParameters: OrganizationsApiGetOrganizationFilesRequest, ): Promise { + return localVarFp.getOrganizationFiles(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.sort, ).then((request) => request(axios, basePath)); + }, + /** + * Lists the followers of an organization. + * @summary List followers of an organization + * @param {OrganizationsApiGetOrganizationFollowersRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getOrganizationFollowers(requestParameters: OrganizationsApiGetOrganizationFollowersRequest, ): Promise { + return localVarFp.getOrganizationFollowers(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Lists mail messages associated with an organization. + * @summary List mail messages associated with an organization + * @param {OrganizationsApiGetOrganizationMailMessagesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getOrganizationMailMessages(requestParameters: OrganizationsApiGetOrganizationMailMessagesRequest, ): Promise { + return localVarFp.getOrganizationMailMessages(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + /** + * Lists persons associated with an organization.
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 persons of an organization + * @param {OrganizationsApiGetOrganizationPersonsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getOrganizationPersons(requestParameters: OrganizationsApiGetOrganizationPersonsRequest, ): Promise { + return localVarFp.getOrganizationPersons(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + /** + * Lists updates about an organization. + * @summary List updates about an organization + * @param {OrganizationsApiGetOrganizationUpdatesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getOrganizationUpdates(requestParameters: OrganizationsApiGetOrganizationUpdatesRequest, ): Promise { + return localVarFp.getOrganizationUpdates(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.all_changes, requestParameters.items, ).then((request) => request(axios, basePath)); + }, + /** + * List users permitted to access an organization. + * @summary List permitted users + * @param {OrganizationsApiGetOrganizationUsersRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getOrganizationUsers(requestParameters: OrganizationsApiGetOrganizationUsersRequest, ): Promise { + return localVarFp.getOrganizationUsers(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns all organizations. + * @summary Get all organizations + * @param {OrganizationsApiGetOrganizationsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getOrganizations(requestParameters: OrganizationsApiGetOrganizationsRequest = {}, ): Promise { + return localVarFp.getOrganizations(requestParameters.user_id, requestParameters.filter_id, requestParameters.first_char, requestParameters.start, requestParameters.limit, requestParameters.sort, ).then((request) => request(axios, basePath)); + }, + /** + * Returns all organizations. 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 organizations (BETA) + * @param {OrganizationsApiGetOrganizationsCollectionRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getOrganizationsCollection(requestParameters: OrganizationsApiGetOrganizationsCollectionRequest = {}, ): Promise { + return localVarFp.getOrganizationsCollection(requestParameters.cursor, requestParameters.limit, requestParameters.since, requestParameters.until, requestParameters.owner_id, requestParameters.first_char, ).then((request) => request(axios, basePath)); + }, + /** + * Merges an organization with another organization. For more information, see the tutorial for merging two organizations. + * @summary Merge two organizations + * @param {OrganizationsApiMergeOrganizationsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + mergeOrganizations(requestParameters: OrganizationsApiMergeOrganizationsRequest, ): Promise { + return localVarFp.mergeOrganizations(requestParameters.id, requestParameters.MergeOrganizationsRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Searches all organizations by name, address, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. + * @summary Search organizations + * @param {OrganizationsApiSearchOrganizationRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + searchOrganization(requestParameters: OrganizationsApiSearchOrganizationRequest, ): Promise { + return localVarFp.searchOrganization(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + /** + * Updates the properties of an organization. + * @summary Update an organization + * @param {OrganizationsApiUpdateOrganizationRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + updateOrganization(requestParameters: OrganizationsApiUpdateOrganizationRequest, ): Promise { + return localVarFp.updateOrganization(requestParameters.id, requestParameters.UpdateOrganizationRequest, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for addOrganization operation in OrganizationsApi. + * @export + * @interface OrganizationsApiAddOrganizationRequest + */ +export interface OrganizationsApiAddOrganizationRequest { + /** + * + * @type {AddOrganizationRequest} + * @memberof OrganizationsApiAddOrganization + */ + readonly AddOrganizationRequest?: AddOrganizationRequest +} + +/** + * Request parameters for addOrganizationFollower operation in OrganizationsApi. + * @export + * @interface OrganizationsApiAddOrganizationFollowerRequest + */ +export interface OrganizationsApiAddOrganizationFollowerRequest { + /** + * The ID of the organization + * @type {number} + * @memberof OrganizationsApiAddOrganizationFollower + */ + readonly id: number + + /** + * + * @type {AddOrganizationFollowerRequest} + * @memberof OrganizationsApiAddOrganizationFollower + */ + readonly AddOrganizationFollowerRequest?: AddOrganizationFollowerRequest +} + +/** + * Request parameters for deleteOrganization operation in OrganizationsApi. + * @export + * @interface OrganizationsApiDeleteOrganizationRequest + */ +export interface OrganizationsApiDeleteOrganizationRequest { + /** + * The ID of the organization + * @type {number} + * @memberof OrganizationsApiDeleteOrganization + */ + readonly id: number +} + +/** + * Request parameters for deleteOrganizationFollower operation in OrganizationsApi. + * @export + * @interface OrganizationsApiDeleteOrganizationFollowerRequest + */ +export interface OrganizationsApiDeleteOrganizationFollowerRequest { + /** + * The ID of the organization + * @type {number} + * @memberof OrganizationsApiDeleteOrganizationFollower + */ + readonly id: number + + /** + * The ID of the follower + * @type {number} + * @memberof OrganizationsApiDeleteOrganizationFollower + */ + readonly follower_id: number +} + +/** + * Request parameters for deleteOrganizations operation in OrganizationsApi. + * @export + * @interface OrganizationsApiDeleteOrganizationsRequest + */ +export interface OrganizationsApiDeleteOrganizationsRequest { + /** + * The comma-separated IDs that will be deleted + * @type {string} + * @memberof OrganizationsApiDeleteOrganizations + */ + readonly ids: string +} + +/** + * Request parameters for getOrganization operation in OrganizationsApi. + * @export + * @interface OrganizationsApiGetOrganizationRequest + */ +export interface OrganizationsApiGetOrganizationRequest { + /** + * The ID of the organization + * @type {number} + * @memberof OrganizationsApiGetOrganization + */ + readonly id: number +} + +/** + * Request parameters for getOrganizationActivities operation in OrganizationsApi. + * @export + * @interface OrganizationsApiGetOrganizationActivitiesRequest + */ +export interface OrganizationsApiGetOrganizationActivitiesRequest { + /** + * The ID of the organization + * @type {number} + * @memberof OrganizationsApiGetOrganizationActivities + */ + readonly id: number + + /** + * Pagination start + * @type {number} + * @memberof OrganizationsApiGetOrganizationActivities + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof OrganizationsApiGetOrganizationActivities + */ + 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 OrganizationsApiGetOrganizationActivities + */ + readonly done?: 0 | 1 + + /** + * A comma-separated string of activity IDs to exclude from result + * @type {string} + * @memberof OrganizationsApiGetOrganizationActivities + */ + readonly exclude?: string +} + +/** + * Request parameters for getOrganizationDeals operation in OrganizationsApi. + * @export + * @interface OrganizationsApiGetOrganizationDealsRequest + */ +export interface OrganizationsApiGetOrganizationDealsRequest { + /** + * The ID of the organization + * @type {number} + * @memberof OrganizationsApiGetOrganizationDeals + */ + readonly id: number + + /** + * Pagination start + * @type {number} + * @memberof OrganizationsApiGetOrganizationDeals + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof OrganizationsApiGetOrganizationDeals + */ + readonly limit?: 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 OrganizationsApiGetOrganizationDeals + */ + readonly status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted' + + /** + * 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 OrganizationsApiGetOrganizationDeals + */ + readonly sort?: string + + /** + * If set, only deals that are directly associated to the organization are fetched. If not set (default), all deals are fetched that are either directly or indirectly related to the organization. Indirect relations include relations through custom, organization-type fields and through persons of the given organization. + * @type {0 | 1} + * @memberof OrganizationsApiGetOrganizationDeals + */ + readonly only_primary_association?: 0 | 1 +} + +/** + * Request parameters for getOrganizationFiles operation in OrganizationsApi. + * @export + * @interface OrganizationsApiGetOrganizationFilesRequest + */ +export interface OrganizationsApiGetOrganizationFilesRequest { + /** + * The ID of the organization + * @type {number} + * @memberof OrganizationsApiGetOrganizationFiles + */ + readonly id: number + + /** + * Pagination start + * @type {number} + * @memberof OrganizationsApiGetOrganizationFiles + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof OrganizationsApiGetOrganizationFiles + */ + 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 OrganizationsApiGetOrganizationFiles + */ + readonly sort?: string +} + +/** + * Request parameters for getOrganizationFollowers operation in OrganizationsApi. + * @export + * @interface OrganizationsApiGetOrganizationFollowersRequest + */ +export interface OrganizationsApiGetOrganizationFollowersRequest { + /** + * The ID of the organization + * @type {number} + * @memberof OrganizationsApiGetOrganizationFollowers + */ + readonly id: number +} + +/** + * Request parameters for getOrganizationMailMessages operation in OrganizationsApi. + * @export + * @interface OrganizationsApiGetOrganizationMailMessagesRequest + */ +export interface OrganizationsApiGetOrganizationMailMessagesRequest { + /** + * The ID of the organization + * @type {number} + * @memberof OrganizationsApiGetOrganizationMailMessages + */ + readonly id: number + + /** + * Pagination start + * @type {number} + * @memberof OrganizationsApiGetOrganizationMailMessages + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof OrganizationsApiGetOrganizationMailMessages + */ + readonly limit?: number +} + +/** + * Request parameters for getOrganizationPersons operation in OrganizationsApi. + * @export + * @interface OrganizationsApiGetOrganizationPersonsRequest + */ +export interface OrganizationsApiGetOrganizationPersonsRequest { + /** + * The ID of the organization + * @type {number} + * @memberof OrganizationsApiGetOrganizationPersons + */ + readonly id: number + + /** + * Pagination start + * @type {number} + * @memberof OrganizationsApiGetOrganizationPersons + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof OrganizationsApiGetOrganizationPersons + */ + readonly limit?: number +} + +/** + * Request parameters for getOrganizationUpdates operation in OrganizationsApi. + * @export + * @interface OrganizationsApiGetOrganizationUpdatesRequest + */ +export interface OrganizationsApiGetOrganizationUpdatesRequest { + /** + * The ID of the organization + * @type {number} + * @memberof OrganizationsApiGetOrganizationUpdates + */ + readonly id: number + + /** + * Pagination start + * @type {number} + * @memberof OrganizationsApiGetOrganizationUpdates + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof OrganizationsApiGetOrganizationUpdates + */ + 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 OrganizationsApiGetOrganizationUpdates + */ + readonly all_changes?: string + + /** + * A comma-separated string for filtering out item specific updates. (Possible values - activity, plannedActivity, note, file, change, deal, follower, participant, mailMessage, mailMessageWithAttachment, invoice, activityFile, document). + * @type {string} + * @memberof OrganizationsApiGetOrganizationUpdates + */ + readonly items?: string +} + +/** + * Request parameters for getOrganizationUsers operation in OrganizationsApi. + * @export + * @interface OrganizationsApiGetOrganizationUsersRequest + */ +export interface OrganizationsApiGetOrganizationUsersRequest { + /** + * The ID of the organization + * @type {number} + * @memberof OrganizationsApiGetOrganizationUsers + */ + readonly id: number +} + +/** + * Request parameters for getOrganizations operation in OrganizationsApi. + * @export + * @interface OrganizationsApiGetOrganizationsRequest + */ +export interface OrganizationsApiGetOrganizationsRequest { + /** + * If supplied, only organizations owned by the given user will be returned. However, `filter_id` takes precedence over `user_id` when both are supplied. + * @type {number} + * @memberof OrganizationsApiGetOrganizations + */ + readonly user_id?: number + + /** + * The ID of the filter to use + * @type {number} + * @memberof OrganizationsApiGetOrganizations + */ + readonly filter_id?: number + + /** + * If supplied, only organizations whose name starts with the specified letter will be returned (case-insensitive) + * @type {string} + * @memberof OrganizationsApiGetOrganizations + */ + readonly first_char?: string + + /** + * Pagination start + * @type {number} + * @memberof OrganizationsApiGetOrganizations + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof OrganizationsApiGetOrganizations + */ + 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 OrganizationsApiGetOrganizations + */ + readonly sort?: string +} + +/** + * Request parameters for getOrganizationsCollection operation in OrganizationsApi. + * @export + * @interface OrganizationsApiGetOrganizationsCollectionRequest + */ +export interface OrganizationsApiGetOrganizationsCollectionRequest { + /** + * For pagination, the marker (an opaque string value) representing the first item on the next page + * @type {string} + * @memberof OrganizationsApiGetOrganizationsCollection + */ + 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 OrganizationsApiGetOrganizationsCollection + */ + 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 OrganizationsApiGetOrganizationsCollection + */ + 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 OrganizationsApiGetOrganizationsCollection + */ + readonly until?: string + + /** + * If supplied, only organizations owned by the given user will be returned + * @type {number} + * @memberof OrganizationsApiGetOrganizationsCollection + */ + readonly owner_id?: number + + /** + * If supplied, only organizations whose name starts with the specified letter will be returned (case-insensitive) + * @type {string} + * @memberof OrganizationsApiGetOrganizationsCollection + */ + readonly first_char?: string +} + +/** + * Request parameters for mergeOrganizations operation in OrganizationsApi. + * @export + * @interface OrganizationsApiMergeOrganizationsRequest + */ +export interface OrganizationsApiMergeOrganizationsRequest { + /** + * The ID of the organization + * @type {number} + * @memberof OrganizationsApiMergeOrganizations + */ + readonly id: number + + /** + * + * @type {MergeOrganizationsRequest} + * @memberof OrganizationsApiMergeOrganizations + */ + readonly MergeOrganizationsRequest?: MergeOrganizationsRequest +} + +/** + * Request parameters for searchOrganization operation in OrganizationsApi. + * @export + * @interface OrganizationsApiSearchOrganizationRequest + */ +export interface OrganizationsApiSearchOrganizationRequest { + /** + * 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 OrganizationsApiSearchOrganization + */ + 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 {'address' | 'custom_fields' | 'notes' | 'name'} + * @memberof OrganizationsApiSearchOrganization + */ + readonly fields?: 'address' | 'custom_fields' | 'notes' | 'name' + + /** + * When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. + * @type {boolean} + * @memberof OrganizationsApiSearchOrganization + */ + readonly exact_match?: boolean + + /** + * 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 OrganizationsApiSearchOrganization + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof OrganizationsApiSearchOrganization + */ + readonly limit?: number +} + +/** + * Request parameters for updateOrganization operation in OrganizationsApi. + * @export + * @interface OrganizationsApiUpdateOrganizationRequest + */ +export interface OrganizationsApiUpdateOrganizationRequest { + /** + * The ID of the organization + * @type {number} + * @memberof OrganizationsApiUpdateOrganization + */ + readonly id: number + + /** + * + * @type {UpdateOrganizationRequest} + * @memberof OrganizationsApiUpdateOrganization + */ + readonly UpdateOrganizationRequest?: UpdateOrganizationRequest +} + +/** + * OrganizationsApi - object-oriented interface + * @export + * @class OrganizationsApi + * @extends {BaseAPI} + */ +export class OrganizationsApi extends BaseAPI { + /** + * Adds a new organization. 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 organizationFields and look for `key` values. For more information, see the tutorial for adding an organization. + * @summary Add an organization + * @param {OrganizationsApiAddOrganizationRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationsApi + */ + public addOrganization(requestParameters: OrganizationsApiAddOrganizationRequest = {}, ) { + return OrganizationsApiFp(this.configuration).addOrganization(requestParameters.AddOrganizationRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Adds a follower to an organization. + * @summary Add a follower to an organization + * @param {OrganizationsApiAddOrganizationFollowerRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationsApi + */ + public addOrganizationFollower(requestParameters: OrganizationsApiAddOrganizationFollowerRequest, ) { + return OrganizationsApiFp(this.configuration).addOrganizationFollower(requestParameters.id, requestParameters.AddOrganizationFollowerRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Marks an organization as deleted. After 30 days, the organization will be permanently deleted. + * @summary Delete an organization + * @param {OrganizationsApiDeleteOrganizationRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationsApi + */ + public deleteOrganization(requestParameters: OrganizationsApiDeleteOrganizationRequest, ) { + return OrganizationsApiFp(this.configuration).deleteOrganization(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Deletes a follower from an organization. You can retrieve the `follower_id` from the List followers of an organization endpoint. + * @summary Delete a follower from an organization + * @param {OrganizationsApiDeleteOrganizationFollowerRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationsApi + */ + public deleteOrganizationFollower(requestParameters: OrganizationsApiDeleteOrganizationFollowerRequest, ) { + return OrganizationsApiFp(this.configuration).deleteOrganizationFollower(requestParameters.id, requestParameters.follower_id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Marks multiple organizations as deleted. After 30 days, the organizations will be permanently deleted. + * @summary Delete multiple organizations in bulk + * @param {OrganizationsApiDeleteOrganizationsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationsApi + */ + public deleteOrganizations(requestParameters: OrganizationsApiDeleteOrganizationsRequest, ) { + return OrganizationsApiFp(this.configuration).deleteOrganizations(requestParameters.ids, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the details of an organization. Note that this also returns some additional fields which are not present when asking for all organizations. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of organizationFields. + * @summary Get details of an organization + * @param {OrganizationsApiGetOrganizationRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationsApi + */ + public getOrganization(requestParameters: OrganizationsApiGetOrganizationRequest, ) { + return OrganizationsApiFp(this.configuration).getOrganization(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists activities associated with an organization. + * @summary List activities associated with an organization + * @param {OrganizationsApiGetOrganizationActivitiesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationsApi + */ + public getOrganizationActivities(requestParameters: OrganizationsApiGetOrganizationActivitiesRequest, ) { + return OrganizationsApiFp(this.configuration).getOrganizationActivities(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.done, requestParameters.exclude, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists deals associated with an organization. + * @summary List deals associated with an organization + * @param {OrganizationsApiGetOrganizationDealsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationsApi + */ + public getOrganizationDeals(requestParameters: OrganizationsApiGetOrganizationDealsRequest, ) { + return OrganizationsApiFp(this.configuration).getOrganizationDeals(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.status, requestParameters.sort, requestParameters.only_primary_association, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists files associated with an organization. + * @summary List files attached to an organization + * @param {OrganizationsApiGetOrganizationFilesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationsApi + */ + public getOrganizationFiles(requestParameters: OrganizationsApiGetOrganizationFilesRequest, ) { + return OrganizationsApiFp(this.configuration).getOrganizationFiles(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.sort, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists the followers of an organization. + * @summary List followers of an organization + * @param {OrganizationsApiGetOrganizationFollowersRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationsApi + */ + public getOrganizationFollowers(requestParameters: OrganizationsApiGetOrganizationFollowersRequest, ) { + return OrganizationsApiFp(this.configuration).getOrganizationFollowers(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists mail messages associated with an organization. + * @summary List mail messages associated with an organization + * @param {OrganizationsApiGetOrganizationMailMessagesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationsApi + */ + public getOrganizationMailMessages(requestParameters: OrganizationsApiGetOrganizationMailMessagesRequest, ) { + return OrganizationsApiFp(this.configuration).getOrganizationMailMessages(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists persons associated with an organization.
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 persons of an organization + * @param {OrganizationsApiGetOrganizationPersonsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationsApi + */ + public getOrganizationPersons(requestParameters: OrganizationsApiGetOrganizationPersonsRequest, ) { + return OrganizationsApiFp(this.configuration).getOrganizationPersons(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists updates about an organization. + * @summary List updates about an organization + * @param {OrganizationsApiGetOrganizationUpdatesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationsApi + */ + public getOrganizationUpdates(requestParameters: OrganizationsApiGetOrganizationUpdatesRequest, ) { + return OrganizationsApiFp(this.configuration).getOrganizationUpdates(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.all_changes, requestParameters.items, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * List users permitted to access an organization. + * @summary List permitted users + * @param {OrganizationsApiGetOrganizationUsersRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationsApi + */ + public getOrganizationUsers(requestParameters: OrganizationsApiGetOrganizationUsersRequest, ) { + return OrganizationsApiFp(this.configuration).getOrganizationUsers(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns all organizations. + * @summary Get all organizations + * @param {OrganizationsApiGetOrganizationsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationsApi + */ + public getOrganizations(requestParameters: OrganizationsApiGetOrganizationsRequest = {}, ) { + return OrganizationsApiFp(this.configuration).getOrganizations(requestParameters.user_id, requestParameters.filter_id, requestParameters.first_char, requestParameters.start, requestParameters.limit, requestParameters.sort, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns all organizations. 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 organizations (BETA) + * @param {OrganizationsApiGetOrganizationsCollectionRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationsApi + */ + public getOrganizationsCollection(requestParameters: OrganizationsApiGetOrganizationsCollectionRequest = {}, ) { + return OrganizationsApiFp(this.configuration).getOrganizationsCollection(requestParameters.cursor, requestParameters.limit, requestParameters.since, requestParameters.until, requestParameters.owner_id, requestParameters.first_char, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Merges an organization with another organization. For more information, see the tutorial for merging two organizations. + * @summary Merge two organizations + * @param {OrganizationsApiMergeOrganizationsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationsApi + */ + public mergeOrganizations(requestParameters: OrganizationsApiMergeOrganizationsRequest, ) { + return OrganizationsApiFp(this.configuration).mergeOrganizations(requestParameters.id, requestParameters.MergeOrganizationsRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Searches all organizations by name, address, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. + * @summary Search organizations + * @param {OrganizationsApiSearchOrganizationRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationsApi + */ + public searchOrganization(requestParameters: OrganizationsApiSearchOrganizationRequest, ) { + return OrganizationsApiFp(this.configuration).searchOrganization(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates the properties of an organization. + * @summary Update an organization + * @param {OrganizationsApiUpdateOrganizationRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationsApi + */ + public updateOrganization(requestParameters: OrganizationsApiUpdateOrganizationRequest, ) { + return OrganizationsApiFp(this.configuration).updateOrganization(requestParameters.id, requestParameters.UpdateOrganizationRequest, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/permission-sets-api.ts b/api/permission-sets-api.ts new file mode 100644 index 00000000..624f9e6c --- /dev/null +++ b/api/permission-sets-api.ts @@ -0,0 +1,380 @@ +/* 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 { GetPermissionSetsResponse200 } from '../models'; +// @ts-ignore +import { SinglePermissionSetResponse200 } from '../models'; +// @ts-ignore +import { UserAssignmentsToPermissionSetResponse200 } from '../models'; +/** + * PermissionSetsApi - axios parameter creator + * @export + */ +export const PermissionSetsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Returns data about a specific permission set. + * @summary Get one permission set + * @param {string} id The ID of the permission set + + * @throws {RequiredError} + */ + getPermissionSet: async (id: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getPermissionSet', 'id', id) + const localVarPath = `/permissionSets/{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", ["admin"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns the list of assignments for a permission set. + * @summary List permission set assignments + * @param {string} id The ID of the permission set + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + getPermissionSetAssignments: async (id: string, start?: number, limit?: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getPermissionSetAssignments', 'id', id) + const localVarPath = `/permissionSets/{id}/assignments` + .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", ["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, + }; + }, + /** + * Returns data about all permission sets. + * @summary Get all permission sets + * @param {'sales' | 'projects' | 'campaigns' | 'global' | 'account_settings'} [app] The app to filter the permission sets by + + * @throws {RequiredError} + */ + getPermissionSets: async (app?: 'sales' | 'projects' | 'campaigns' | 'global' | 'account_settings', ): Promise => { + const localVarPath = `/permissionSets`; + // 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", ["admin"], configuration) + + if (app !== undefined) { + localVarQueryParameter['app'] = app; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * PermissionSetsApi - functional programming interface + * @export + */ +export const PermissionSetsApiFp = 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 = PermissionSetsApiAxiosParamCreator(configuration) + return { + /** + * Returns data about a specific permission set. + * @summary Get one permission set + * @param {string} id The ID of the permission set + + * @throws {RequiredError} + */ + async getPermissionSet(id: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPermissionSet(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns the list of assignments for a permission set. + * @summary List permission set assignments + * @param {string} id The ID of the permission set + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + async getPermissionSetAssignments(id: string, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPermissionSetAssignments(id, start, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns data about all permission sets. + * @summary Get all permission sets + * @param {'sales' | 'projects' | 'campaigns' | 'global' | 'account_settings'} [app] The app to filter the permission sets by + + * @throws {RequiredError} + */ + async getPermissionSets(app?: 'sales' | 'projects' | 'campaigns' | 'global' | 'account_settings', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPermissionSets(app, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * PermissionSetsApi - factory interface + * @export + */ +export const PermissionSetsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = PermissionSetsApiFp(configuration) + return { + /** + * Returns data about a specific permission set. + * @summary Get one permission set + * @param {PermissionSetsApiGetPermissionSetRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getPermissionSet(requestParameters: PermissionSetsApiGetPermissionSetRequest, ): Promise { + return localVarFp.getPermissionSet(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns the list of assignments for a permission set. + * @summary List permission set assignments + * @param {PermissionSetsApiGetPermissionSetAssignmentsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getPermissionSetAssignments(requestParameters: PermissionSetsApiGetPermissionSetAssignmentsRequest, ): Promise { + return localVarFp.getPermissionSetAssignments(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + /** + * Returns data about all permission sets. + * @summary Get all permission sets + * @param {PermissionSetsApiGetPermissionSetsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getPermissionSets(requestParameters: PermissionSetsApiGetPermissionSetsRequest = {}, ): Promise { + return localVarFp.getPermissionSets(requestParameters.app, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getPermissionSet operation in PermissionSetsApi. + * @export + * @interface PermissionSetsApiGetPermissionSetRequest + */ +export interface PermissionSetsApiGetPermissionSetRequest { + /** + * The ID of the permission set + * @type {string} + * @memberof PermissionSetsApiGetPermissionSet + */ + readonly id: string +} + +/** + * Request parameters for getPermissionSetAssignments operation in PermissionSetsApi. + * @export + * @interface PermissionSetsApiGetPermissionSetAssignmentsRequest + */ +export interface PermissionSetsApiGetPermissionSetAssignmentsRequest { + /** + * The ID of the permission set + * @type {string} + * @memberof PermissionSetsApiGetPermissionSetAssignments + */ + readonly id: string + + /** + * Pagination start + * @type {number} + * @memberof PermissionSetsApiGetPermissionSetAssignments + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof PermissionSetsApiGetPermissionSetAssignments + */ + readonly limit?: number +} + +/** + * Request parameters for getPermissionSets operation in PermissionSetsApi. + * @export + * @interface PermissionSetsApiGetPermissionSetsRequest + */ +export interface PermissionSetsApiGetPermissionSetsRequest { + /** + * The app to filter the permission sets by + * @type {'sales' | 'projects' | 'campaigns' | 'global' | 'account_settings'} + * @memberof PermissionSetsApiGetPermissionSets + */ + readonly app?: 'sales' | 'projects' | 'campaigns' | 'global' | 'account_settings' +} + +/** + * PermissionSetsApi - object-oriented interface + * @export + * @class PermissionSetsApi + * @extends {BaseAPI} + */ +export class PermissionSetsApi extends BaseAPI { + /** + * Returns data about a specific permission set. + * @summary Get one permission set + * @param {PermissionSetsApiGetPermissionSetRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PermissionSetsApi + */ + public getPermissionSet(requestParameters: PermissionSetsApiGetPermissionSetRequest, ) { + return PermissionSetsApiFp(this.configuration).getPermissionSet(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the list of assignments for a permission set. + * @summary List permission set assignments + * @param {PermissionSetsApiGetPermissionSetAssignmentsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PermissionSetsApi + */ + public getPermissionSetAssignments(requestParameters: PermissionSetsApiGetPermissionSetAssignmentsRequest, ) { + return PermissionSetsApiFp(this.configuration).getPermissionSetAssignments(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about all permission sets. + * @summary Get all permission sets + * @param {PermissionSetsApiGetPermissionSetsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PermissionSetsApi + */ + public getPermissionSets(requestParameters: PermissionSetsApiGetPermissionSetsRequest = {}, ) { + return PermissionSetsApiFp(this.configuration).getPermissionSets(requestParameters.app, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/person-fields-api.ts b/api/person-fields-api.ts new file mode 100644 index 00000000..04f1ba27 --- /dev/null +++ b/api/person-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'; +/** + * PersonFieldsApi - axios parameter creator + * @export + */ +export const PersonFieldsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Adds a new person field. For more information, see the tutorial for adding a new custom field. + * @summary Add a new person field + * @param {CreateFieldRequest} [CreateFieldRequest] + + * @throws {RequiredError} + */ + addPersonField: async (CreateFieldRequest?: CreateFieldRequest, ): Promise => { + const localVarPath = `/personFields`; + // 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 person field + * @param {number} id The ID of the field + + * @throws {RequiredError} + */ + deletePersonField: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deletePersonField', 'id', id) + const localVarPath = `/personFields/{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 fields as deleted. + * @summary Delete multiple person fields in bulk + * @param {string} ids The comma-separated field IDs to delete + + * @throws {RequiredError} + */ + deletePersonFields: async (ids: string, ): Promise => { + // verify required parameter 'ids' is not null or undefined + assertParamExists('deletePersonFields', 'ids', ids) + const localVarPath = `/personFields`; + // 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 person field. + * @summary Get one person field + * @param {number} id The ID of the field + + * @throws {RequiredError} + */ + getPersonField: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getPersonField', 'id', id) + const localVarPath = `/personFields/{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", ["contacts:read", "contacts: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 person fields.
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 Get all person fields + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + getPersonFields: async (start?: number, limit?: number, ): Promise => { + const localVarPath = `/personFields`; + // 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", "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 person field. For more information, see the tutorial for updating custom fields\' values. + * @summary Update a person field + * @param {number} id The ID of the field + * @param {UpdateFieldRequest} [UpdateFieldRequest] + + * @throws {RequiredError} + */ + updatePersonField: async (id: number, UpdateFieldRequest?: UpdateFieldRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updatePersonField', 'id', id) + const localVarPath = `/personFields/{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, + }; + }, + } +}; + +/** + * PersonFieldsApi - functional programming interface + * @export + */ +export const PersonFieldsApiFp = 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 = PersonFieldsApiAxiosParamCreator(configuration) + return { + /** + * Adds a new person field. For more information, see the tutorial for adding a new custom field. + * @summary Add a new person field + * @param {CreateFieldRequest} [CreateFieldRequest] + + * @throws {RequiredError} + */ + async addPersonField(CreateFieldRequest?: CreateFieldRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addPersonField(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 person field + * @param {number} id The ID of the field + + * @throws {RequiredError} + */ + async deletePersonField(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletePersonField(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Marks multiple fields as deleted. + * @summary Delete multiple person fields in bulk + * @param {string} ids The comma-separated field IDs to delete + + * @throws {RequiredError} + */ + async deletePersonFields(ids: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletePersonFields(ids, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns data about a specific person field. + * @summary Get one person field + * @param {number} id The ID of the field + + * @throws {RequiredError} + */ + async getPersonField(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonField(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns data about all person fields.
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 Get all person fields + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + async getPersonFields(start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonFields(start, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates a person field. For more information, see the tutorial for updating custom fields\' values. + * @summary Update a person field + * @param {number} id The ID of the field + * @param {UpdateFieldRequest} [UpdateFieldRequest] + + * @throws {RequiredError} + */ + async updatePersonField(id: number, UpdateFieldRequest?: UpdateFieldRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatePersonField(id, UpdateFieldRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * PersonFieldsApi - factory interface + * @export + */ +export const PersonFieldsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = PersonFieldsApiFp(configuration) + return { + /** + * Adds a new person field. For more information, see the tutorial for adding a new custom field. + * @summary Add a new person field + * @param {PersonFieldsApiAddPersonFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addPersonField(requestParameters: PersonFieldsApiAddPersonFieldRequest = {}, ): Promise { + return localVarFp.addPersonField(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 person field + * @param {PersonFieldsApiDeletePersonFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deletePersonField(requestParameters: PersonFieldsApiDeletePersonFieldRequest, ): Promise { + return localVarFp.deletePersonField(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Marks multiple fields as deleted. + * @summary Delete multiple person fields in bulk + * @param {PersonFieldsApiDeletePersonFieldsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deletePersonFields(requestParameters: PersonFieldsApiDeletePersonFieldsRequest, ): Promise { + return localVarFp.deletePersonFields(requestParameters.ids, ).then((request) => request(axios, basePath)); + }, + /** + * Returns data about a specific person field. + * @summary Get one person field + * @param {PersonFieldsApiGetPersonFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getPersonField(requestParameters: PersonFieldsApiGetPersonFieldRequest, ): Promise { + return localVarFp.getPersonField(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns data about all person fields.
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 Get all person fields + * @param {PersonFieldsApiGetPersonFieldsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getPersonFields(requestParameters: PersonFieldsApiGetPersonFieldsRequest = {}, ): Promise { + return localVarFp.getPersonFields(requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + /** + * Updates a person field. For more information, see the tutorial for updating custom fields\' values. + * @summary Update a person field + * @param {PersonFieldsApiUpdatePersonFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + updatePersonField(requestParameters: PersonFieldsApiUpdatePersonFieldRequest, ): Promise { + return localVarFp.updatePersonField(requestParameters.id, requestParameters.UpdateFieldRequest, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for addPersonField operation in PersonFieldsApi. + * @export + * @interface PersonFieldsApiAddPersonFieldRequest + */ +export interface PersonFieldsApiAddPersonFieldRequest { + /** + * + * @type {CreateFieldRequest} + * @memberof PersonFieldsApiAddPersonField + */ + readonly CreateFieldRequest?: CreateFieldRequest +} + +/** + * Request parameters for deletePersonField operation in PersonFieldsApi. + * @export + * @interface PersonFieldsApiDeletePersonFieldRequest + */ +export interface PersonFieldsApiDeletePersonFieldRequest { + /** + * The ID of the field + * @type {number} + * @memberof PersonFieldsApiDeletePersonField + */ + readonly id: number +} + +/** + * Request parameters for deletePersonFields operation in PersonFieldsApi. + * @export + * @interface PersonFieldsApiDeletePersonFieldsRequest + */ +export interface PersonFieldsApiDeletePersonFieldsRequest { + /** + * The comma-separated field IDs to delete + * @type {string} + * @memberof PersonFieldsApiDeletePersonFields + */ + readonly ids: string +} + +/** + * Request parameters for getPersonField operation in PersonFieldsApi. + * @export + * @interface PersonFieldsApiGetPersonFieldRequest + */ +export interface PersonFieldsApiGetPersonFieldRequest { + /** + * The ID of the field + * @type {number} + * @memberof PersonFieldsApiGetPersonField + */ + readonly id: number +} + +/** + * Request parameters for getPersonFields operation in PersonFieldsApi. + * @export + * @interface PersonFieldsApiGetPersonFieldsRequest + */ +export interface PersonFieldsApiGetPersonFieldsRequest { + /** + * Pagination start + * @type {number} + * @memberof PersonFieldsApiGetPersonFields + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof PersonFieldsApiGetPersonFields + */ + readonly limit?: number +} + +/** + * Request parameters for updatePersonField operation in PersonFieldsApi. + * @export + * @interface PersonFieldsApiUpdatePersonFieldRequest + */ +export interface PersonFieldsApiUpdatePersonFieldRequest { + /** + * The ID of the field + * @type {number} + * @memberof PersonFieldsApiUpdatePersonField + */ + readonly id: number + + /** + * + * @type {UpdateFieldRequest} + * @memberof PersonFieldsApiUpdatePersonField + */ + readonly UpdateFieldRequest?: UpdateFieldRequest +} + +/** + * PersonFieldsApi - object-oriented interface + * @export + * @class PersonFieldsApi + * @extends {BaseAPI} + */ +export class PersonFieldsApi extends BaseAPI { + /** + * Adds a new person field. For more information, see the tutorial for adding a new custom field. + * @summary Add a new person field + * @param {PersonFieldsApiAddPersonFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonFieldsApi + */ + public addPersonField(requestParameters: PersonFieldsApiAddPersonFieldRequest = {}, ) { + return PersonFieldsApiFp(this.configuration).addPersonField(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 person field + * @param {PersonFieldsApiDeletePersonFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonFieldsApi + */ + public deletePersonField(requestParameters: PersonFieldsApiDeletePersonFieldRequest, ) { + return PersonFieldsApiFp(this.configuration).deletePersonField(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Marks multiple fields as deleted. + * @summary Delete multiple person fields in bulk + * @param {PersonFieldsApiDeletePersonFieldsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonFieldsApi + */ + public deletePersonFields(requestParameters: PersonFieldsApiDeletePersonFieldsRequest, ) { + return PersonFieldsApiFp(this.configuration).deletePersonFields(requestParameters.ids, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about a specific person field. + * @summary Get one person field + * @param {PersonFieldsApiGetPersonFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonFieldsApi + */ + public getPersonField(requestParameters: PersonFieldsApiGetPersonFieldRequest, ) { + return PersonFieldsApiFp(this.configuration).getPersonField(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about all person fields.
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 Get all person fields + * @param {PersonFieldsApiGetPersonFieldsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonFieldsApi + */ + public getPersonFields(requestParameters: PersonFieldsApiGetPersonFieldsRequest = {}, ) { + return PersonFieldsApiFp(this.configuration).getPersonFields(requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates a person field. For more information, see the tutorial for updating custom fields\' values. + * @summary Update a person field + * @param {PersonFieldsApiUpdatePersonFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonFieldsApi + */ + public updatePersonField(requestParameters: PersonFieldsApiUpdatePersonFieldRequest, ) { + return PersonFieldsApiFp(this.configuration).updatePersonField(requestParameters.id, requestParameters.UpdateFieldRequest, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/persons-api.ts b/api/persons-api.ts new file mode 100644 index 00000000..d0236e09 --- /dev/null +++ b/api/persons-api.ts @@ -0,0 +1,2561 @@ +/* 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 { AddPersonFollowerRequest } from '../models'; +// @ts-ignore +import { AddPersonFollowerResponse200 } from '../models'; +// @ts-ignore +import { AddPersonPictureResponse200 } from '../models'; +// @ts-ignore +import { AddPersonRequest } from '../models'; +// @ts-ignore +import { AddPersonResponse200 } from '../models'; +// @ts-ignore +import { DeletePersonResponse200 } from '../models'; +// @ts-ignore +import { DeletePersonsResponse200 } from '../models'; +// @ts-ignore +import { FailResponse } from '../models'; +// @ts-ignore +import { GetAssociatedActivitiesResponse200 } from '../models'; +// @ts-ignore +import { GetAssociatedDealsResponse200 } from '../models'; +// @ts-ignore +import { GetAssociatedFilesResponse200 } from '../models'; +// @ts-ignore +import { GetAssociatedFollowersResponse200 } from '../models'; +// @ts-ignore +import { GetAssociatedMailMessagesResponse200 } from '../models'; +// @ts-ignore +import { GetAssociatedPersonUpdatesResponse200 } from '../models'; +// @ts-ignore +import { GetPersonProductsResponse200 } from '../models'; +// @ts-ignore +import { GetPersonResponse200 } from '../models'; +// @ts-ignore +import { GetPersonsCollection200Response } from '../models'; +// @ts-ignore +import { GetPersonsResponse200 } from '../models'; +// @ts-ignore +import { ListPermittedUsersResponse2001 } from '../models'; +// @ts-ignore +import { MergePersonsRequest } from '../models'; +// @ts-ignore +import { MergePersonsResponse200 } from '../models'; +// @ts-ignore +import { SearchPersonsResponse200 } from '../models'; +// @ts-ignore +import { UpdatePersonRequest } from '../models'; +// @ts-ignore +import { UpdatePersonResponse200 } from '../models'; +/** + * PersonsApi - axios parameter creator + * @export + */ +export const PersonsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Adds a new person. 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 personFields and look for `key` values.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field. + * @summary Add a person + * @param {AddPersonRequest} [AddPersonRequest] + + * @throws {RequiredError} + */ + addPerson: async (AddPersonRequest?: AddPersonRequest, ): Promise => { + const localVarPath = `/persons`; + // 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", ["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(AddPersonRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Adds a follower to a person. + * @summary Add a follower to a person + * @param {number} id The ID of the person + * @param {AddPersonFollowerRequest} [AddPersonFollowerRequest] + + * @throws {RequiredError} + */ + addPersonFollower: async (id: number, AddPersonFollowerRequest?: AddPersonFollowerRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('addPersonFollower', 'id', id) + const localVarPath = `/persons/{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", ["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(AddPersonFollowerRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Adds a picture to a person. If a picture is already set, the old picture will be replaced. Added image (or the cropping parameters supplied with the request) should have an equal width and height and should be at least 128 pixels. GIF, JPG and PNG are accepted. All added images will be resized to 128 and 512 pixel wide squares. + * @summary Add person picture + * @param {number} id The ID of the person + * @param {File} file One image supplied in the multipart/form-data encoding + * @param {number} [crop_x] X coordinate to where start cropping form (in pixels) + * @param {number} [crop_y] Y coordinate to where start cropping form (in pixels) + * @param {number} [crop_width] The width of the cropping area (in pixels) + * @param {number} [crop_height] The height of the cropping area (in pixels) + + * @throws {RequiredError} + */ + addPersonPicture: async (id: number, file: File, crop_x?: number, crop_y?: number, crop_width?: number, crop_height?: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('addPersonPicture', 'id', id) + // verify required parameter 'file' is not null or undefined + assertParamExists('addPersonPicture', 'file', file) + const localVarPath = `/persons/{id}/picture` + .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", ["contacts:full"], configuration) + + + if (file !== undefined) { + localVarFormParams.append('file', file as any); + } + + if (crop_x !== undefined) { + localVarFormParams.append('crop_x', crop_x as any); + } + + if (crop_y !== undefined) { + localVarFormParams.append('crop_y', crop_y as any); + } + + if (crop_width !== undefined) { + localVarFormParams.append('crop_width', crop_width as any); + } + + if (crop_height !== undefined) { + localVarFormParams.append('crop_height', crop_height 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, + }; + }, + /** + * Marks a person as deleted. After 30 days, the person will be permanently deleted. + * @summary Delete a person + * @param {number} id The ID of the person + + * @throws {RequiredError} + */ + deletePerson: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deletePerson', 'id', id) + const localVarPath = `/persons/{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", ["contacts: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 person. + * @summary Delete a follower from a person + * @param {number} id The ID of the person + * @param {number} follower_id The ID of the follower + + * @throws {RequiredError} + */ + deletePersonFollower: async (id: number, follower_id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deletePersonFollower', 'id', id) + // verify required parameter 'follower_id' is not null or undefined + assertParamExists('deletePersonFollower', 'follower_id', follower_id) + const localVarPath = `/persons/{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", ["contacts:full"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Deletes a person’s picture. + * @summary Delete person picture + * @param {number} id The ID of the person + + * @throws {RequiredError} + */ + deletePersonPicture: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deletePersonPicture', 'id', id) + const localVarPath = `/persons/{id}/picture` + .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", ["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 persons as deleted. After 30 days, the persons will be permanently deleted. + * @summary Delete multiple persons in bulk + * @param {string} ids The comma-separated IDs that will be deleted + + * @throws {RequiredError} + */ + deletePersons: async (ids: string, ): Promise => { + // verify required parameter 'ids' is not null or undefined + assertParamExists('deletePersons', 'ids', ids) + const localVarPath = `/persons`; + // 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", ["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 the details of a person. Note that this also returns some additional fields which are not present when asking for all persons. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of personFields.
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 Get details of a person + * @param {number} id The ID of the person + + * @throws {RequiredError} + */ + getPerson: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getPerson', 'id', id) + const localVarPath = `/persons/{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", ["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, + }; + }, + /** + * Lists activities associated with a person. + * @summary List activities associated with a person + * @param {number} id The ID of the person + * @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} + */ + getPersonActivities: async (id: number, start?: number, limit?: number, done?: 0 | 1, exclude?: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getPersonActivities', 'id', id) + const localVarPath = `/persons/{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 deals associated with a person. + * @summary List deals associated with a person + * @param {number} id The ID of the person + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + * @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 {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). + + * @throws {RequiredError} + */ + getPersonDeals: async (id: number, start?: number, limit?: number, status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted', sort?: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getPersonDeals', 'id', id) + const localVarPath = `/persons/{id}/deals` + .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 (status !== undefined) { + localVarQueryParameter['status'] = status; + } + + 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 files associated with a person. + * @summary List files attached to a person + * @param {number} id The ID of the person + * @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} + */ + getPersonFiles: async (id: number, start?: number, limit?: number, sort?: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getPersonFiles', 'id', id) + const localVarPath = `/persons/{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", ["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, + }; + }, + /** + * Lists the followers of a person. + * @summary List followers of a person + * @param {number} id The ID of the person + + * @throws {RequiredError} + */ + getPersonFollowers: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getPersonFollowers', 'id', id) + const localVarPath = `/persons/{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", ["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, + }; + }, + /** + * Lists mail messages associated with a person. + * @summary List mail messages associated with a person + * @param {number} id The ID of the person + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + getPersonMailMessages: async (id: number, start?: number, limit?: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getPersonMailMessages', 'id', id) + const localVarPath = `/persons/{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 products associated with a person. + * @summary List products associated with a person + * @param {number} id The ID of the person + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + getPersonProducts: async (id: number, start?: number, limit?: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getPersonProducts', 'id', id) + const localVarPath = `/persons/{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", ["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 updates about a person.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint\'s response will also include updates for the `marketing_status` field. + * @summary List updates about a person + * @param {number} id The ID of the person + * @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} + */ + getPersonUpdates: async (id: number, start?: number, limit?: number, all_changes?: string, items?: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getPersonUpdates', 'id', id) + const localVarPath = `/persons/{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, + }; + }, + /** + * List users permitted to access a person. + * @summary List permitted users + * @param {number} id The ID of the person + + * @throws {RequiredError} + */ + getPersonUsers: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getPersonUsers', 'id', id) + const localVarPath = `/persons/{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", ["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 persons. + * @summary Get all persons + * @param {number} [user_id] If supplied, only persons owned by the given user will be returned. However, `filter_id` takes precedence over `user_id` when both are supplied. + * @param {number} [filter_id] The ID of the filter to use + * @param {string} [first_char] If supplied, only persons whose name starts with the specified letter will be returned (case-insensitive) + * @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). + + * @throws {RequiredError} + */ + getPersons: async (user_id?: number, filter_id?: number, first_char?: string, start?: number, limit?: number, sort?: string, ): Promise => { + const localVarPath = `/persons`; + // 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 (user_id !== undefined) { + localVarQueryParameter['user_id'] = user_id; + } + + if (filter_id !== undefined) { + localVarQueryParameter['filter_id'] = filter_id; + } + + if (first_char !== undefined) { + localVarQueryParameter['first_char'] = first_char; + } + + 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, + }; + }, + /** + * Returns all persons. 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 persons (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} [owner_id] If supplied, only persons owned by the given user will be returned + * @param {string} [first_char] If supplied, only persons whose name starts with the specified letter will be returned (case-insensitive) + + * @throws {RequiredError} + */ + getPersonsCollection: async (cursor?: string, limit?: number, since?: string, until?: string, owner_id?: number, first_char?: string, ): Promise => { + const localVarPath = `/persons/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", ["contacts:read", "contacts: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 (owner_id !== undefined) { + localVarQueryParameter['owner_id'] = owner_id; + } + + if (first_char !== undefined) { + localVarQueryParameter['first_char'] = first_char; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Merges a person with another person. For more information, see the tutorial for merging two persons. + * @summary Merge two persons + * @param {number} id The ID of the person + * @param {MergePersonsRequest} [MergePersonsRequest] + + * @throws {RequiredError} + */ + mergePersons: async (id: number, MergePersonsRequest?: MergePersonsRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('mergePersons', 'id', id) + const localVarPath = `/persons/{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", ["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(MergePersonsRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Searches all persons by name, email, phone, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found persons can be filtered by organization ID. + * @summary Search persons + * @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' | 'email' | 'notes' | 'phone' | 'name'} [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} [organization_id] Will filter persons by the provided organization ID. The upper limit of found persons associated with the organization is 2000. + * @param {'person.picture'} [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} + */ + searchPersons: async (term: string, fields?: 'custom_fields' | 'email' | 'notes' | 'phone' | 'name', exact_match?: boolean, organization_id?: number, include_fields?: 'person.picture', start?: number, limit?: number, ): Promise => { + // verify required parameter 'term' is not null or undefined + assertParamExists('searchPersons', 'term', term) + const localVarPath = `/persons/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", ["contacts:read", "contacts: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 (organization_id !== undefined) { + localVarQueryParameter['organization_id'] = organization_id; + } + + 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 person. For more information, see the tutorial for updating a person.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field. + * @summary Update a person + * @param {number} id The ID of the person + * @param {UpdatePersonRequest} [UpdatePersonRequest] + + * @throws {RequiredError} + */ + updatePerson: async (id: number, UpdatePersonRequest?: UpdatePersonRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updatePerson', 'id', id) + const localVarPath = `/persons/{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", ["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(UpdatePersonRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * PersonsApi - functional programming interface + * @export + */ +export const PersonsApiFp = 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 = PersonsApiAxiosParamCreator(configuration) + return { + /** + * Adds a new person. 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 personFields and look for `key` values.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field. + * @summary Add a person + * @param {AddPersonRequest} [AddPersonRequest] + + * @throws {RequiredError} + */ + async addPerson(AddPersonRequest?: AddPersonRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addPerson(AddPersonRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Adds a follower to a person. + * @summary Add a follower to a person + * @param {number} id The ID of the person + * @param {AddPersonFollowerRequest} [AddPersonFollowerRequest] + + * @throws {RequiredError} + */ + async addPersonFollower(id: number, AddPersonFollowerRequest?: AddPersonFollowerRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addPersonFollower(id, AddPersonFollowerRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Adds a picture to a person. If a picture is already set, the old picture will be replaced. Added image (or the cropping parameters supplied with the request) should have an equal width and height and should be at least 128 pixels. GIF, JPG and PNG are accepted. All added images will be resized to 128 and 512 pixel wide squares. + * @summary Add person picture + * @param {number} id The ID of the person + * @param {File} file One image supplied in the multipart/form-data encoding + * @param {number} [crop_x] X coordinate to where start cropping form (in pixels) + * @param {number} [crop_y] Y coordinate to where start cropping form (in pixels) + * @param {number} [crop_width] The width of the cropping area (in pixels) + * @param {number} [crop_height] The height of the cropping area (in pixels) + + * @throws {RequiredError} + */ + async addPersonPicture(id: number, file: File, crop_x?: number, crop_y?: number, crop_width?: number, crop_height?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addPersonPicture(id, file, crop_x, crop_y, crop_width, crop_height, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Marks a person as deleted. After 30 days, the person will be permanently deleted. + * @summary Delete a person + * @param {number} id The ID of the person + + * @throws {RequiredError} + */ + async deletePerson(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletePerson(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Deletes a follower from a person. + * @summary Delete a follower from a person + * @param {number} id The ID of the person + * @param {number} follower_id The ID of the follower + + * @throws {RequiredError} + */ + async deletePersonFollower(id: number, follower_id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletePersonFollower(id, follower_id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Deletes a person’s picture. + * @summary Delete person picture + * @param {number} id The ID of the person + + * @throws {RequiredError} + */ + async deletePersonPicture(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletePersonPicture(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Marks multiple persons as deleted. After 30 days, the persons will be permanently deleted. + * @summary Delete multiple persons in bulk + * @param {string} ids The comma-separated IDs that will be deleted + + * @throws {RequiredError} + */ + async deletePersons(ids: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletePersons(ids, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns the details of a person. Note that this also returns some additional fields which are not present when asking for all persons. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of personFields.
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 Get details of a person + * @param {number} id The ID of the person + + * @throws {RequiredError} + */ + async getPerson(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPerson(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists activities associated with a person. + * @summary List activities associated with a person + * @param {number} id The ID of the person + * @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 getPersonActivities(id: number, start?: number, limit?: number, done?: 0 | 1, exclude?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonActivities(id, start, limit, done, exclude, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists deals associated with a person. + * @summary List deals associated with a person + * @param {number} id The ID of the person + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + * @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 {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). + + * @throws {RequiredError} + */ + async getPersonDeals(id: number, start?: number, limit?: number, status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted', sort?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonDeals(id, start, limit, status, sort, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists files associated with a person. + * @summary List files attached to a person + * @param {number} id The ID of the person + * @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 getPersonFiles(id: number, start?: number, limit?: number, sort?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonFiles(id, start, limit, sort, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists the followers of a person. + * @summary List followers of a person + * @param {number} id The ID of the person + + * @throws {RequiredError} + */ + async getPersonFollowers(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonFollowers(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists mail messages associated with a person. + * @summary List mail messages associated with a person + * @param {number} id The ID of the person + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + async getPersonMailMessages(id: number, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonMailMessages(id, start, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists products associated with a person. + * @summary List products associated with a person + * @param {number} id The ID of the person + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + async getPersonProducts(id: number, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonProducts(id, start, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists updates about a person.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint\'s response will also include updates for the `marketing_status` field. + * @summary List updates about a person + * @param {number} id The ID of the person + * @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 getPersonUpdates(id: number, start?: number, limit?: number, all_changes?: string, items?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonUpdates(id, start, limit, all_changes, items, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * List users permitted to access a person. + * @summary List permitted users + * @param {number} id The ID of the person + + * @throws {RequiredError} + */ + async getPersonUsers(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonUsers(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns all persons. + * @summary Get all persons + * @param {number} [user_id] If supplied, only persons owned by the given user will be returned. However, `filter_id` takes precedence over `user_id` when both are supplied. + * @param {number} [filter_id] The ID of the filter to use + * @param {string} [first_char] If supplied, only persons whose name starts with the specified letter will be returned (case-insensitive) + * @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). + + * @throws {RequiredError} + */ + async getPersons(user_id?: number, filter_id?: number, first_char?: string, start?: number, limit?: number, sort?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPersons(user_id, filter_id, first_char, start, limit, sort, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns all persons. 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 persons (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} [owner_id] If supplied, only persons owned by the given user will be returned + * @param {string} [first_char] If supplied, only persons whose name starts with the specified letter will be returned (case-insensitive) + + * @throws {RequiredError} + */ + async getPersonsCollection(cursor?: string, limit?: number, since?: string, until?: string, owner_id?: number, first_char?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonsCollection(cursor, limit, since, until, owner_id, first_char, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Merges a person with another person. For more information, see the tutorial for merging two persons. + * @summary Merge two persons + * @param {number} id The ID of the person + * @param {MergePersonsRequest} [MergePersonsRequest] + + * @throws {RequiredError} + */ + async mergePersons(id: number, MergePersonsRequest?: MergePersonsRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.mergePersons(id, MergePersonsRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Searches all persons by name, email, phone, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found persons can be filtered by organization ID. + * @summary Search persons + * @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' | 'email' | 'notes' | 'phone' | 'name'} [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} [organization_id] Will filter persons by the provided organization ID. The upper limit of found persons associated with the organization is 2000. + * @param {'person.picture'} [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 searchPersons(term: string, fields?: 'custom_fields' | 'email' | 'notes' | 'phone' | 'name', exact_match?: boolean, organization_id?: number, include_fields?: 'person.picture', start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.searchPersons(term, fields, exact_match, organization_id, include_fields, start, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates the properties of a person. For more information, see the tutorial for updating a person.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field. + * @summary Update a person + * @param {number} id The ID of the person + * @param {UpdatePersonRequest} [UpdatePersonRequest] + + * @throws {RequiredError} + */ + async updatePerson(id: number, UpdatePersonRequest?: UpdatePersonRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatePerson(id, UpdatePersonRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * PersonsApi - factory interface + * @export + */ +export const PersonsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = PersonsApiFp(configuration) + return { + /** + * Adds a new person. 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 personFields and look for `key` values.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field. + * @summary Add a person + * @param {PersonsApiAddPersonRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addPerson(requestParameters: PersonsApiAddPersonRequest = {}, ): Promise { + return localVarFp.addPerson(requestParameters.AddPersonRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Adds a follower to a person. + * @summary Add a follower to a person + * @param {PersonsApiAddPersonFollowerRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addPersonFollower(requestParameters: PersonsApiAddPersonFollowerRequest, ): Promise { + return localVarFp.addPersonFollower(requestParameters.id, requestParameters.AddPersonFollowerRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Adds a picture to a person. If a picture is already set, the old picture will be replaced. Added image (or the cropping parameters supplied with the request) should have an equal width and height and should be at least 128 pixels. GIF, JPG and PNG are accepted. All added images will be resized to 128 and 512 pixel wide squares. + * @summary Add person picture + * @param {PersonsApiAddPersonPictureRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addPersonPicture(requestParameters: PersonsApiAddPersonPictureRequest, ): Promise { + return localVarFp.addPersonPicture(requestParameters.id, requestParameters.file, requestParameters.crop_x, requestParameters.crop_y, requestParameters.crop_width, requestParameters.crop_height, ).then((request) => request(axios, basePath)); + }, + /** + * Marks a person as deleted. After 30 days, the person will be permanently deleted. + * @summary Delete a person + * @param {PersonsApiDeletePersonRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deletePerson(requestParameters: PersonsApiDeletePersonRequest, ): Promise { + return localVarFp.deletePerson(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Deletes a follower from a person. + * @summary Delete a follower from a person + * @param {PersonsApiDeletePersonFollowerRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deletePersonFollower(requestParameters: PersonsApiDeletePersonFollowerRequest, ): Promise { + return localVarFp.deletePersonFollower(requestParameters.id, requestParameters.follower_id, ).then((request) => request(axios, basePath)); + }, + /** + * Deletes a person’s picture. + * @summary Delete person picture + * @param {PersonsApiDeletePersonPictureRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deletePersonPicture(requestParameters: PersonsApiDeletePersonPictureRequest, ): Promise { + return localVarFp.deletePersonPicture(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Marks multiple persons as deleted. After 30 days, the persons will be permanently deleted. + * @summary Delete multiple persons in bulk + * @param {PersonsApiDeletePersonsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deletePersons(requestParameters: PersonsApiDeletePersonsRequest, ): Promise { + return localVarFp.deletePersons(requestParameters.ids, ).then((request) => request(axios, basePath)); + }, + /** + * Returns the details of a person. Note that this also returns some additional fields which are not present when asking for all persons. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of personFields.
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 Get details of a person + * @param {PersonsApiGetPersonRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getPerson(requestParameters: PersonsApiGetPersonRequest, ): Promise { + return localVarFp.getPerson(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Lists activities associated with a person. + * @summary List activities associated with a person + * @param {PersonsApiGetPersonActivitiesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getPersonActivities(requestParameters: PersonsApiGetPersonActivitiesRequest, ): Promise { + return localVarFp.getPersonActivities(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.done, requestParameters.exclude, ).then((request) => request(axios, basePath)); + }, + /** + * Lists deals associated with a person. + * @summary List deals associated with a person + * @param {PersonsApiGetPersonDealsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getPersonDeals(requestParameters: PersonsApiGetPersonDealsRequest, ): Promise { + return localVarFp.getPersonDeals(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.status, requestParameters.sort, ).then((request) => request(axios, basePath)); + }, + /** + * Lists files associated with a person. + * @summary List files attached to a person + * @param {PersonsApiGetPersonFilesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getPersonFiles(requestParameters: PersonsApiGetPersonFilesRequest, ): Promise { + return localVarFp.getPersonFiles(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.sort, ).then((request) => request(axios, basePath)); + }, + /** + * Lists the followers of a person. + * @summary List followers of a person + * @param {PersonsApiGetPersonFollowersRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getPersonFollowers(requestParameters: PersonsApiGetPersonFollowersRequest, ): Promise { + return localVarFp.getPersonFollowers(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Lists mail messages associated with a person. + * @summary List mail messages associated with a person + * @param {PersonsApiGetPersonMailMessagesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getPersonMailMessages(requestParameters: PersonsApiGetPersonMailMessagesRequest, ): Promise { + return localVarFp.getPersonMailMessages(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + /** + * Lists products associated with a person. + * @summary List products associated with a person + * @param {PersonsApiGetPersonProductsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getPersonProducts(requestParameters: PersonsApiGetPersonProductsRequest, ): Promise { + return localVarFp.getPersonProducts(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + /** + * Lists updates about a person.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint\'s response will also include updates for the `marketing_status` field. + * @summary List updates about a person + * @param {PersonsApiGetPersonUpdatesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getPersonUpdates(requestParameters: PersonsApiGetPersonUpdatesRequest, ): Promise { + return localVarFp.getPersonUpdates(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.all_changes, requestParameters.items, ).then((request) => request(axios, basePath)); + }, + /** + * List users permitted to access a person. + * @summary List permitted users + * @param {PersonsApiGetPersonUsersRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getPersonUsers(requestParameters: PersonsApiGetPersonUsersRequest, ): Promise { + return localVarFp.getPersonUsers(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns all persons. + * @summary Get all persons + * @param {PersonsApiGetPersonsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getPersons(requestParameters: PersonsApiGetPersonsRequest = {}, ): Promise { + return localVarFp.getPersons(requestParameters.user_id, requestParameters.filter_id, requestParameters.first_char, requestParameters.start, requestParameters.limit, requestParameters.sort, ).then((request) => request(axios, basePath)); + }, + /** + * Returns all persons. 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 persons (BETA) + * @param {PersonsApiGetPersonsCollectionRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getPersonsCollection(requestParameters: PersonsApiGetPersonsCollectionRequest = {}, ): Promise { + return localVarFp.getPersonsCollection(requestParameters.cursor, requestParameters.limit, requestParameters.since, requestParameters.until, requestParameters.owner_id, requestParameters.first_char, ).then((request) => request(axios, basePath)); + }, + /** + * Merges a person with another person. For more information, see the tutorial for merging two persons. + * @summary Merge two persons + * @param {PersonsApiMergePersonsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + mergePersons(requestParameters: PersonsApiMergePersonsRequest, ): Promise { + return localVarFp.mergePersons(requestParameters.id, requestParameters.MergePersonsRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Searches all persons by name, email, phone, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found persons can be filtered by organization ID. + * @summary Search persons + * @param {PersonsApiSearchPersonsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + searchPersons(requestParameters: PersonsApiSearchPersonsRequest, ): Promise { + return localVarFp.searchPersons(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.organization_id, requestParameters.include_fields, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + /** + * Updates the properties of a person. For more information, see the tutorial for updating a person.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field. + * @summary Update a person + * @param {PersonsApiUpdatePersonRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + updatePerson(requestParameters: PersonsApiUpdatePersonRequest, ): Promise { + return localVarFp.updatePerson(requestParameters.id, requestParameters.UpdatePersonRequest, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for addPerson operation in PersonsApi. + * @export + * @interface PersonsApiAddPersonRequest + */ +export interface PersonsApiAddPersonRequest { + /** + * + * @type {AddPersonRequest} + * @memberof PersonsApiAddPerson + */ + readonly AddPersonRequest?: AddPersonRequest +} + +/** + * Request parameters for addPersonFollower operation in PersonsApi. + * @export + * @interface PersonsApiAddPersonFollowerRequest + */ +export interface PersonsApiAddPersonFollowerRequest { + /** + * The ID of the person + * @type {number} + * @memberof PersonsApiAddPersonFollower + */ + readonly id: number + + /** + * + * @type {AddPersonFollowerRequest} + * @memberof PersonsApiAddPersonFollower + */ + readonly AddPersonFollowerRequest?: AddPersonFollowerRequest +} + +/** + * Request parameters for addPersonPicture operation in PersonsApi. + * @export + * @interface PersonsApiAddPersonPictureRequest + */ +export interface PersonsApiAddPersonPictureRequest { + /** + * The ID of the person + * @type {number} + * @memberof PersonsApiAddPersonPicture + */ + readonly id: number + + /** + * One image supplied in the multipart/form-data encoding + * @type {File} + * @memberof PersonsApiAddPersonPicture + */ + readonly file: File + + /** + * X coordinate to where start cropping form (in pixels) + * @type {number} + * @memberof PersonsApiAddPersonPicture + */ + readonly crop_x?: number + + /** + * Y coordinate to where start cropping form (in pixels) + * @type {number} + * @memberof PersonsApiAddPersonPicture + */ + readonly crop_y?: number + + /** + * The width of the cropping area (in pixels) + * @type {number} + * @memberof PersonsApiAddPersonPicture + */ + readonly crop_width?: number + + /** + * The height of the cropping area (in pixels) + * @type {number} + * @memberof PersonsApiAddPersonPicture + */ + readonly crop_height?: number +} + +/** + * Request parameters for deletePerson operation in PersonsApi. + * @export + * @interface PersonsApiDeletePersonRequest + */ +export interface PersonsApiDeletePersonRequest { + /** + * The ID of the person + * @type {number} + * @memberof PersonsApiDeletePerson + */ + readonly id: number +} + +/** + * Request parameters for deletePersonFollower operation in PersonsApi. + * @export + * @interface PersonsApiDeletePersonFollowerRequest + */ +export interface PersonsApiDeletePersonFollowerRequest { + /** + * The ID of the person + * @type {number} + * @memberof PersonsApiDeletePersonFollower + */ + readonly id: number + + /** + * The ID of the follower + * @type {number} + * @memberof PersonsApiDeletePersonFollower + */ + readonly follower_id: number +} + +/** + * Request parameters for deletePersonPicture operation in PersonsApi. + * @export + * @interface PersonsApiDeletePersonPictureRequest + */ +export interface PersonsApiDeletePersonPictureRequest { + /** + * The ID of the person + * @type {number} + * @memberof PersonsApiDeletePersonPicture + */ + readonly id: number +} + +/** + * Request parameters for deletePersons operation in PersonsApi. + * @export + * @interface PersonsApiDeletePersonsRequest + */ +export interface PersonsApiDeletePersonsRequest { + /** + * The comma-separated IDs that will be deleted + * @type {string} + * @memberof PersonsApiDeletePersons + */ + readonly ids: string +} + +/** + * Request parameters for getPerson operation in PersonsApi. + * @export + * @interface PersonsApiGetPersonRequest + */ +export interface PersonsApiGetPersonRequest { + /** + * The ID of the person + * @type {number} + * @memberof PersonsApiGetPerson + */ + readonly id: number +} + +/** + * Request parameters for getPersonActivities operation in PersonsApi. + * @export + * @interface PersonsApiGetPersonActivitiesRequest + */ +export interface PersonsApiGetPersonActivitiesRequest { + /** + * The ID of the person + * @type {number} + * @memberof PersonsApiGetPersonActivities + */ + readonly id: number + + /** + * Pagination start + * @type {number} + * @memberof PersonsApiGetPersonActivities + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof PersonsApiGetPersonActivities + */ + 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 PersonsApiGetPersonActivities + */ + readonly done?: 0 | 1 + + /** + * A comma-separated string of activity IDs to exclude from result + * @type {string} + * @memberof PersonsApiGetPersonActivities + */ + readonly exclude?: string +} + +/** + * Request parameters for getPersonDeals operation in PersonsApi. + * @export + * @interface PersonsApiGetPersonDealsRequest + */ +export interface PersonsApiGetPersonDealsRequest { + /** + * The ID of the person + * @type {number} + * @memberof PersonsApiGetPersonDeals + */ + readonly id: number + + /** + * Pagination start + * @type {number} + * @memberof PersonsApiGetPersonDeals + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof PersonsApiGetPersonDeals + */ + readonly limit?: 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 PersonsApiGetPersonDeals + */ + readonly status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted' + + /** + * 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 PersonsApiGetPersonDeals + */ + readonly sort?: string +} + +/** + * Request parameters for getPersonFiles operation in PersonsApi. + * @export + * @interface PersonsApiGetPersonFilesRequest + */ +export interface PersonsApiGetPersonFilesRequest { + /** + * The ID of the person + * @type {number} + * @memberof PersonsApiGetPersonFiles + */ + readonly id: number + + /** + * Pagination start + * @type {number} + * @memberof PersonsApiGetPersonFiles + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof PersonsApiGetPersonFiles + */ + 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 PersonsApiGetPersonFiles + */ + readonly sort?: string +} + +/** + * Request parameters for getPersonFollowers operation in PersonsApi. + * @export + * @interface PersonsApiGetPersonFollowersRequest + */ +export interface PersonsApiGetPersonFollowersRequest { + /** + * The ID of the person + * @type {number} + * @memberof PersonsApiGetPersonFollowers + */ + readonly id: number +} + +/** + * Request parameters for getPersonMailMessages operation in PersonsApi. + * @export + * @interface PersonsApiGetPersonMailMessagesRequest + */ +export interface PersonsApiGetPersonMailMessagesRequest { + /** + * The ID of the person + * @type {number} + * @memberof PersonsApiGetPersonMailMessages + */ + readonly id: number + + /** + * Pagination start + * @type {number} + * @memberof PersonsApiGetPersonMailMessages + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof PersonsApiGetPersonMailMessages + */ + readonly limit?: number +} + +/** + * Request parameters for getPersonProducts operation in PersonsApi. + * @export + * @interface PersonsApiGetPersonProductsRequest + */ +export interface PersonsApiGetPersonProductsRequest { + /** + * The ID of the person + * @type {number} + * @memberof PersonsApiGetPersonProducts + */ + readonly id: number + + /** + * Pagination start + * @type {number} + * @memberof PersonsApiGetPersonProducts + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof PersonsApiGetPersonProducts + */ + readonly limit?: number +} + +/** + * Request parameters for getPersonUpdates operation in PersonsApi. + * @export + * @interface PersonsApiGetPersonUpdatesRequest + */ +export interface PersonsApiGetPersonUpdatesRequest { + /** + * The ID of the person + * @type {number} + * @memberof PersonsApiGetPersonUpdates + */ + readonly id: number + + /** + * Pagination start + * @type {number} + * @memberof PersonsApiGetPersonUpdates + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof PersonsApiGetPersonUpdates + */ + 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 PersonsApiGetPersonUpdates + */ + 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 PersonsApiGetPersonUpdates + */ + readonly items?: string +} + +/** + * Request parameters for getPersonUsers operation in PersonsApi. + * @export + * @interface PersonsApiGetPersonUsersRequest + */ +export interface PersonsApiGetPersonUsersRequest { + /** + * The ID of the person + * @type {number} + * @memberof PersonsApiGetPersonUsers + */ + readonly id: number +} + +/** + * Request parameters for getPersons operation in PersonsApi. + * @export + * @interface PersonsApiGetPersonsRequest + */ +export interface PersonsApiGetPersonsRequest { + /** + * If supplied, only persons owned by the given user will be returned. However, `filter_id` takes precedence over `user_id` when both are supplied. + * @type {number} + * @memberof PersonsApiGetPersons + */ + readonly user_id?: number + + /** + * The ID of the filter to use + * @type {number} + * @memberof PersonsApiGetPersons + */ + readonly filter_id?: number + + /** + * If supplied, only persons whose name starts with the specified letter will be returned (case-insensitive) + * @type {string} + * @memberof PersonsApiGetPersons + */ + readonly first_char?: string + + /** + * Pagination start + * @type {number} + * @memberof PersonsApiGetPersons + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof PersonsApiGetPersons + */ + 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 PersonsApiGetPersons + */ + readonly sort?: string +} + +/** + * Request parameters for getPersonsCollection operation in PersonsApi. + * @export + * @interface PersonsApiGetPersonsCollectionRequest + */ +export interface PersonsApiGetPersonsCollectionRequest { + /** + * For pagination, the marker (an opaque string value) representing the first item on the next page + * @type {string} + * @memberof PersonsApiGetPersonsCollection + */ + 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 PersonsApiGetPersonsCollection + */ + 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 PersonsApiGetPersonsCollection + */ + 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 PersonsApiGetPersonsCollection + */ + readonly until?: string + + /** + * If supplied, only persons owned by the given user will be returned + * @type {number} + * @memberof PersonsApiGetPersonsCollection + */ + readonly owner_id?: number + + /** + * If supplied, only persons whose name starts with the specified letter will be returned (case-insensitive) + * @type {string} + * @memberof PersonsApiGetPersonsCollection + */ + readonly first_char?: string +} + +/** + * Request parameters for mergePersons operation in PersonsApi. + * @export + * @interface PersonsApiMergePersonsRequest + */ +export interface PersonsApiMergePersonsRequest { + /** + * The ID of the person + * @type {number} + * @memberof PersonsApiMergePersons + */ + readonly id: number + + /** + * + * @type {MergePersonsRequest} + * @memberof PersonsApiMergePersons + */ + readonly MergePersonsRequest?: MergePersonsRequest +} + +/** + * Request parameters for searchPersons operation in PersonsApi. + * @export + * @interface PersonsApiSearchPersonsRequest + */ +export interface PersonsApiSearchPersonsRequest { + /** + * 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 PersonsApiSearchPersons + */ + 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' | 'email' | 'notes' | 'phone' | 'name'} + * @memberof PersonsApiSearchPersons + */ + readonly fields?: 'custom_fields' | 'email' | 'notes' | 'phone' | 'name' + + /** + * When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. + * @type {boolean} + * @memberof PersonsApiSearchPersons + */ + readonly exact_match?: boolean + + /** + * Will filter persons by the provided organization ID. The upper limit of found persons associated with the organization is 2000. + * @type {number} + * @memberof PersonsApiSearchPersons + */ + readonly organization_id?: number + + /** + * Supports including optional fields in the results which are not provided by default + * @type {'person.picture'} + * @memberof PersonsApiSearchPersons + */ + readonly include_fields?: 'person.picture' + + /** + * 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 PersonsApiSearchPersons + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof PersonsApiSearchPersons + */ + readonly limit?: number +} + +/** + * Request parameters for updatePerson operation in PersonsApi. + * @export + * @interface PersonsApiUpdatePersonRequest + */ +export interface PersonsApiUpdatePersonRequest { + /** + * The ID of the person + * @type {number} + * @memberof PersonsApiUpdatePerson + */ + readonly id: number + + /** + * + * @type {UpdatePersonRequest} + * @memberof PersonsApiUpdatePerson + */ + readonly UpdatePersonRequest?: UpdatePersonRequest +} + +/** + * PersonsApi - object-oriented interface + * @export + * @class PersonsApi + * @extends {BaseAPI} + */ +export class PersonsApi extends BaseAPI { + /** + * Adds a new person. 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 personFields and look for `key` values.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field. + * @summary Add a person + * @param {PersonsApiAddPersonRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonsApi + */ + public addPerson(requestParameters: PersonsApiAddPersonRequest = {}, ) { + return PersonsApiFp(this.configuration).addPerson(requestParameters.AddPersonRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Adds a follower to a person. + * @summary Add a follower to a person + * @param {PersonsApiAddPersonFollowerRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonsApi + */ + public addPersonFollower(requestParameters: PersonsApiAddPersonFollowerRequest, ) { + return PersonsApiFp(this.configuration).addPersonFollower(requestParameters.id, requestParameters.AddPersonFollowerRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Adds a picture to a person. If a picture is already set, the old picture will be replaced. Added image (or the cropping parameters supplied with the request) should have an equal width and height and should be at least 128 pixels. GIF, JPG and PNG are accepted. All added images will be resized to 128 and 512 pixel wide squares. + * @summary Add person picture + * @param {PersonsApiAddPersonPictureRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonsApi + */ + public addPersonPicture(requestParameters: PersonsApiAddPersonPictureRequest, ) { + return PersonsApiFp(this.configuration).addPersonPicture(requestParameters.id, requestParameters.file, requestParameters.crop_x, requestParameters.crop_y, requestParameters.crop_width, requestParameters.crop_height, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Marks a person as deleted. After 30 days, the person will be permanently deleted. + * @summary Delete a person + * @param {PersonsApiDeletePersonRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonsApi + */ + public deletePerson(requestParameters: PersonsApiDeletePersonRequest, ) { + return PersonsApiFp(this.configuration).deletePerson(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Deletes a follower from a person. + * @summary Delete a follower from a person + * @param {PersonsApiDeletePersonFollowerRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonsApi + */ + public deletePersonFollower(requestParameters: PersonsApiDeletePersonFollowerRequest, ) { + return PersonsApiFp(this.configuration).deletePersonFollower(requestParameters.id, requestParameters.follower_id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Deletes a person’s picture. + * @summary Delete person picture + * @param {PersonsApiDeletePersonPictureRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonsApi + */ + public deletePersonPicture(requestParameters: PersonsApiDeletePersonPictureRequest, ) { + return PersonsApiFp(this.configuration).deletePersonPicture(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Marks multiple persons as deleted. After 30 days, the persons will be permanently deleted. + * @summary Delete multiple persons in bulk + * @param {PersonsApiDeletePersonsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonsApi + */ + public deletePersons(requestParameters: PersonsApiDeletePersonsRequest, ) { + return PersonsApiFp(this.configuration).deletePersons(requestParameters.ids, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the details of a person. Note that this also returns some additional fields which are not present when asking for all persons. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of personFields.
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 Get details of a person + * @param {PersonsApiGetPersonRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonsApi + */ + public getPerson(requestParameters: PersonsApiGetPersonRequest, ) { + return PersonsApiFp(this.configuration).getPerson(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists activities associated with a person. + * @summary List activities associated with a person + * @param {PersonsApiGetPersonActivitiesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonsApi + */ + public getPersonActivities(requestParameters: PersonsApiGetPersonActivitiesRequest, ) { + return PersonsApiFp(this.configuration).getPersonActivities(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.done, requestParameters.exclude, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists deals associated with a person. + * @summary List deals associated with a person + * @param {PersonsApiGetPersonDealsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonsApi + */ + public getPersonDeals(requestParameters: PersonsApiGetPersonDealsRequest, ) { + return PersonsApiFp(this.configuration).getPersonDeals(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.status, requestParameters.sort, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists files associated with a person. + * @summary List files attached to a person + * @param {PersonsApiGetPersonFilesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonsApi + */ + public getPersonFiles(requestParameters: PersonsApiGetPersonFilesRequest, ) { + return PersonsApiFp(this.configuration).getPersonFiles(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.sort, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists the followers of a person. + * @summary List followers of a person + * @param {PersonsApiGetPersonFollowersRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonsApi + */ + public getPersonFollowers(requestParameters: PersonsApiGetPersonFollowersRequest, ) { + return PersonsApiFp(this.configuration).getPersonFollowers(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists mail messages associated with a person. + * @summary List mail messages associated with a person + * @param {PersonsApiGetPersonMailMessagesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonsApi + */ + public getPersonMailMessages(requestParameters: PersonsApiGetPersonMailMessagesRequest, ) { + return PersonsApiFp(this.configuration).getPersonMailMessages(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists products associated with a person. + * @summary List products associated with a person + * @param {PersonsApiGetPersonProductsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonsApi + */ + public getPersonProducts(requestParameters: PersonsApiGetPersonProductsRequest, ) { + return PersonsApiFp(this.configuration).getPersonProducts(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists updates about a person.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint\'s response will also include updates for the `marketing_status` field. + * @summary List updates about a person + * @param {PersonsApiGetPersonUpdatesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonsApi + */ + public getPersonUpdates(requestParameters: PersonsApiGetPersonUpdatesRequest, ) { + return PersonsApiFp(this.configuration).getPersonUpdates(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.all_changes, requestParameters.items, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * List users permitted to access a person. + * @summary List permitted users + * @param {PersonsApiGetPersonUsersRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonsApi + */ + public getPersonUsers(requestParameters: PersonsApiGetPersonUsersRequest, ) { + return PersonsApiFp(this.configuration).getPersonUsers(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns all persons. + * @summary Get all persons + * @param {PersonsApiGetPersonsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonsApi + */ + public getPersons(requestParameters: PersonsApiGetPersonsRequest = {}, ) { + return PersonsApiFp(this.configuration).getPersons(requestParameters.user_id, requestParameters.filter_id, requestParameters.first_char, requestParameters.start, requestParameters.limit, requestParameters.sort, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns all persons. 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 persons (BETA) + * @param {PersonsApiGetPersonsCollectionRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonsApi + */ + public getPersonsCollection(requestParameters: PersonsApiGetPersonsCollectionRequest = {}, ) { + return PersonsApiFp(this.configuration).getPersonsCollection(requestParameters.cursor, requestParameters.limit, requestParameters.since, requestParameters.until, requestParameters.owner_id, requestParameters.first_char, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Merges a person with another person. For more information, see the tutorial for merging two persons. + * @summary Merge two persons + * @param {PersonsApiMergePersonsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonsApi + */ + public mergePersons(requestParameters: PersonsApiMergePersonsRequest, ) { + return PersonsApiFp(this.configuration).mergePersons(requestParameters.id, requestParameters.MergePersonsRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Searches all persons by name, email, phone, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found persons can be filtered by organization ID. + * @summary Search persons + * @param {PersonsApiSearchPersonsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonsApi + */ + public searchPersons(requestParameters: PersonsApiSearchPersonsRequest, ) { + return PersonsApiFp(this.configuration).searchPersons(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.organization_id, requestParameters.include_fields, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates the properties of a person. For more information, see the tutorial for updating a person.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field. + * @summary Update a person + * @param {PersonsApiUpdatePersonRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonsApi + */ + public updatePerson(requestParameters: PersonsApiUpdatePersonRequest, ) { + return PersonsApiFp(this.configuration).updatePerson(requestParameters.id, requestParameters.UpdatePersonRequest, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/pipelines-api.ts b/api/pipelines-api.ts new file mode 100644 index 00000000..b1cdd840 --- /dev/null +++ b/api/pipelines-api.ts @@ -0,0 +1,1009 @@ +/* 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 { AddPipelineResponse200 } from '../models'; +// @ts-ignore +import { DeletePipelineResponse200 } from '../models'; +// @ts-ignore +import { GetPipelineConversionStatisticsResponse200 } from '../models'; +// @ts-ignore +import { GetPipelineMovementStatisticsResponse200 } from '../models'; +// @ts-ignore +import { GetPipelineResponse200 } from '../models'; +// @ts-ignore +import { GetPipelinesResponse200 } from '../models'; +// @ts-ignore +import { GetStageDealsResponse200 } from '../models'; +// @ts-ignore +import { PipelineRequest } from '../models'; +// @ts-ignore +import { PipelineRequest1 } from '../models'; +// @ts-ignore +import { UpdatePipelineResponse200 } from '../models'; +/** + * PipelinesApi - axios parameter creator + * @export + */ +export const PipelinesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Adds a new pipeline. + * @summary Add a new pipeline + * @param {PipelineRequest} [PipelineRequest] + + * @throws {RequiredError} + */ + addPipeline: async (PipelineRequest?: PipelineRequest, ): Promise => { + const localVarPath = `/pipelines`; + // 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(PipelineRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Marks a pipeline as deleted. + * @summary Delete a pipeline + * @param {number} id The ID of the pipeline + + * @throws {RequiredError} + */ + deletePipeline: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deletePipeline', 'id', id) + const localVarPath = `/pipelines/{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, + }; + }, + /** + * Returns data about a specific pipeline. Also returns the summary of the deals in this pipeline across its stages. + * @summary Get one pipeline + * @param {number} id The ID of the pipeline + * @param {string} [totals_convert_currency] The 3-letter currency code of any of the supported currencies. When supplied, `per_stages_converted` is returned in `deals_summary` which contains the currency-converted total amounts in the given currency per each stage. You may also set this parameter to `default_currency` in which case users default currency is used. + + * @throws {RequiredError} + */ + getPipeline: async (id: number, totals_convert_currency?: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getPipeline', 'id', id) + const localVarPath = `/pipelines/{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) + + 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, + }; + }, + /** + * Returns all stage-to-stage conversion and pipeline-to-close rates for the given time period. + * @summary Get deals conversion rates in pipeline + * @param {number} id The ID of the pipeline + * @param {string} start_date The start of the period. Date in format of YYYY-MM-DD. + * @param {string} end_date The end of the period. Date in format of YYYY-MM-DD. + * @param {number} [user_id] The ID of the user who\'s pipeline metrics statistics to fetch. If omitted, the authorized user will be used. + + * @throws {RequiredError} + */ + getPipelineConversionStatistics: async (id: number, start_date: string, end_date: string, user_id?: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getPipelineConversionStatistics', 'id', id) + // verify required parameter 'start_date' is not null or undefined + assertParamExists('getPipelineConversionStatistics', 'start_date', start_date) + // verify required parameter 'end_date' is not null or undefined + assertParamExists('getPipelineConversionStatistics', 'end_date', end_date) + const localVarPath = `/pipelines/{id}/conversion_statistics` + .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_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 (user_id !== undefined) { + localVarQueryParameter['user_id'] = user_id; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Lists deals in a specific pipeline across all its stages. + * @summary Get deals in a pipeline + * @param {number} id The ID of the pipeline + * @param {number} [filter_id] If supplied, only deals matching the given filter will be returned + * @param {number} [user_id] If supplied, `filter_id` will not be considered and only deals owned by the given user will be returned. If omitted, deals owned by the authorized user will be returned. + * @param {0 | 1} [everyone] If supplied, `filter_id` and `user_id` will not be considered – instead, deals owned by everyone will be returned + * @param {number} [stage_id] If supplied, only deals within the given stage will be returned + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + * @param {0 | 1} [get_summary] Whether to include a summary of the pipeline in the `additional_data` or not + * @param {string} [totals_convert_currency] The 3-letter currency code of any of the supported currencies. When supplied, `per_stages_converted` is returned inside `deals_summary` inside `additional_data` which contains the currency-converted total amounts in the given currency per each stage. You may also set this parameter to `default_currency` in which case users default currency is used. Only works when `get_summary` parameter flag is enabled. + + * @throws {RequiredError} + */ + getPipelineDeals: async (id: number, filter_id?: number, user_id?: number, everyone?: 0 | 1, stage_id?: number, start?: number, limit?: number, get_summary?: 0 | 1, totals_convert_currency?: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getPipelineDeals', 'id', id) + const localVarPath = `/pipelines/{id}/deals` + .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 (filter_id !== undefined) { + localVarQueryParameter['filter_id'] = filter_id; + } + + if (user_id !== undefined) { + localVarQueryParameter['user_id'] = user_id; + } + + if (everyone !== undefined) { + localVarQueryParameter['everyone'] = everyone; + } + + if (stage_id !== undefined) { + localVarQueryParameter['stage_id'] = stage_id; + } + + if (start !== undefined) { + localVarQueryParameter['start'] = start; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (get_summary !== undefined) { + localVarQueryParameter['get_summary'] = get_summary; + } + + 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, + }; + }, + /** + * Returns statistics for deals movements for the given time period. + * @summary Get deals movements in pipeline + * @param {number} id The ID of the pipeline + * @param {string} start_date The start of the period. Date in format of YYYY-MM-DD. + * @param {string} end_date The end of the period. Date in format of YYYY-MM-DD. + * @param {number} [user_id] The ID of the user who\'s pipeline statistics to fetch. If omitted, the authorized user will be used. + + * @throws {RequiredError} + */ + getPipelineMovementStatistics: async (id: number, start_date: string, end_date: string, user_id?: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getPipelineMovementStatistics', 'id', id) + // verify required parameter 'start_date' is not null or undefined + assertParamExists('getPipelineMovementStatistics', 'start_date', start_date) + // verify required parameter 'end_date' is not null or undefined + assertParamExists('getPipelineMovementStatistics', 'end_date', end_date) + const localVarPath = `/pipelines/{id}/movement_statistics` + .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_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 (user_id !== undefined) { + localVarQueryParameter['user_id'] = user_id; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns data about all pipelines. + * @summary Get all pipelines + + * @throws {RequiredError} + */ + getPipelines: async (): Promise => { + const localVarPath = `/pipelines`; + // 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, + }; + }, + /** + * Updates the properties of a pipeline. + * @summary Update a pipeline + * @param {number} id The ID of the pipeline + * @param {PipelineRequest1} [PipelineRequest1] + + * @throws {RequiredError} + */ + updatePipeline: async (id: number, PipelineRequest1?: PipelineRequest1, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updatePipeline', 'id', id) + const localVarPath = `/pipelines/{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(PipelineRequest1, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * PipelinesApi - functional programming interface + * @export + */ +export const PipelinesApiFp = 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 = PipelinesApiAxiosParamCreator(configuration) + return { + /** + * Adds a new pipeline. + * @summary Add a new pipeline + * @param {PipelineRequest} [PipelineRequest] + + * @throws {RequiredError} + */ + async addPipeline(PipelineRequest?: PipelineRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addPipeline(PipelineRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Marks a pipeline as deleted. + * @summary Delete a pipeline + * @param {number} id The ID of the pipeline + + * @throws {RequiredError} + */ + async deletePipeline(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletePipeline(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns data about a specific pipeline. Also returns the summary of the deals in this pipeline across its stages. + * @summary Get one pipeline + * @param {number} id The ID of the pipeline + * @param {string} [totals_convert_currency] The 3-letter currency code of any of the supported currencies. When supplied, `per_stages_converted` is returned in `deals_summary` which contains the currency-converted total amounts in the given currency per each stage. You may also set this parameter to `default_currency` in which case users default currency is used. + + * @throws {RequiredError} + */ + async getPipeline(id: number, totals_convert_currency?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPipeline(id, totals_convert_currency, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns all stage-to-stage conversion and pipeline-to-close rates for the given time period. + * @summary Get deals conversion rates in pipeline + * @param {number} id The ID of the pipeline + * @param {string} start_date The start of the period. Date in format of YYYY-MM-DD. + * @param {string} end_date The end of the period. Date in format of YYYY-MM-DD. + * @param {number} [user_id] The ID of the user who\'s pipeline metrics statistics to fetch. If omitted, the authorized user will be used. + + * @throws {RequiredError} + */ + async getPipelineConversionStatistics(id: number, start_date: string, end_date: string, user_id?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPipelineConversionStatistics(id, start_date, end_date, user_id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists deals in a specific pipeline across all its stages. + * @summary Get deals in a pipeline + * @param {number} id The ID of the pipeline + * @param {number} [filter_id] If supplied, only deals matching the given filter will be returned + * @param {number} [user_id] If supplied, `filter_id` will not be considered and only deals owned by the given user will be returned. If omitted, deals owned by the authorized user will be returned. + * @param {0 | 1} [everyone] If supplied, `filter_id` and `user_id` will not be considered – instead, deals owned by everyone will be returned + * @param {number} [stage_id] If supplied, only deals within the given stage will be returned + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + * @param {0 | 1} [get_summary] Whether to include a summary of the pipeline in the `additional_data` or not + * @param {string} [totals_convert_currency] The 3-letter currency code of any of the supported currencies. When supplied, `per_stages_converted` is returned inside `deals_summary` inside `additional_data` which contains the currency-converted total amounts in the given currency per each stage. You may also set this parameter to `default_currency` in which case users default currency is used. Only works when `get_summary` parameter flag is enabled. + + * @throws {RequiredError} + */ + async getPipelineDeals(id: number, filter_id?: number, user_id?: number, everyone?: 0 | 1, stage_id?: number, start?: number, limit?: number, get_summary?: 0 | 1, totals_convert_currency?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPipelineDeals(id, filter_id, user_id, everyone, stage_id, start, limit, get_summary, totals_convert_currency, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns statistics for deals movements for the given time period. + * @summary Get deals movements in pipeline + * @param {number} id The ID of the pipeline + * @param {string} start_date The start of the period. Date in format of YYYY-MM-DD. + * @param {string} end_date The end of the period. Date in format of YYYY-MM-DD. + * @param {number} [user_id] The ID of the user who\'s pipeline statistics to fetch. If omitted, the authorized user will be used. + + * @throws {RequiredError} + */ + async getPipelineMovementStatistics(id: number, start_date: string, end_date: string, user_id?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPipelineMovementStatistics(id, start_date, end_date, user_id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns data about all pipelines. + * @summary Get all pipelines + + * @throws {RequiredError} + */ + async getPipelines(): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPipelines(); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates the properties of a pipeline. + * @summary Update a pipeline + * @param {number} id The ID of the pipeline + * @param {PipelineRequest1} [PipelineRequest1] + + * @throws {RequiredError} + */ + async updatePipeline(id: number, PipelineRequest1?: PipelineRequest1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatePipeline(id, PipelineRequest1, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * PipelinesApi - factory interface + * @export + */ +export const PipelinesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = PipelinesApiFp(configuration) + return { + /** + * Adds a new pipeline. + * @summary Add a new pipeline + * @param {PipelinesApiAddPipelineRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addPipeline(requestParameters: PipelinesApiAddPipelineRequest = {}, ): Promise { + return localVarFp.addPipeline(requestParameters.PipelineRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Marks a pipeline as deleted. + * @summary Delete a pipeline + * @param {PipelinesApiDeletePipelineRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deletePipeline(requestParameters: PipelinesApiDeletePipelineRequest, ): Promise { + return localVarFp.deletePipeline(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns data about a specific pipeline. Also returns the summary of the deals in this pipeline across its stages. + * @summary Get one pipeline + * @param {PipelinesApiGetPipelineRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getPipeline(requestParameters: PipelinesApiGetPipelineRequest, ): Promise { + return localVarFp.getPipeline(requestParameters.id, requestParameters.totals_convert_currency, ).then((request) => request(axios, basePath)); + }, + /** + * Returns all stage-to-stage conversion and pipeline-to-close rates for the given time period. + * @summary Get deals conversion rates in pipeline + * @param {PipelinesApiGetPipelineConversionStatisticsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getPipelineConversionStatistics(requestParameters: PipelinesApiGetPipelineConversionStatisticsRequest, ): Promise { + return localVarFp.getPipelineConversionStatistics(requestParameters.id, requestParameters.start_date, requestParameters.end_date, requestParameters.user_id, ).then((request) => request(axios, basePath)); + }, + /** + * Lists deals in a specific pipeline across all its stages. + * @summary Get deals in a pipeline + * @param {PipelinesApiGetPipelineDealsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getPipelineDeals(requestParameters: PipelinesApiGetPipelineDealsRequest, ): Promise { + return localVarFp.getPipelineDeals(requestParameters.id, requestParameters.filter_id, requestParameters.user_id, requestParameters.everyone, requestParameters.stage_id, requestParameters.start, requestParameters.limit, requestParameters.get_summary, requestParameters.totals_convert_currency, ).then((request) => request(axios, basePath)); + }, + /** + * Returns statistics for deals movements for the given time period. + * @summary Get deals movements in pipeline + * @param {PipelinesApiGetPipelineMovementStatisticsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getPipelineMovementStatistics(requestParameters: PipelinesApiGetPipelineMovementStatisticsRequest, ): Promise { + return localVarFp.getPipelineMovementStatistics(requestParameters.id, requestParameters.start_date, requestParameters.end_date, requestParameters.user_id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns data about all pipelines. + * @summary Get all pipelines + + * @throws {RequiredError} + */ + getPipelines(): Promise { + return localVarFp.getPipelines().then((request) => request(axios, basePath)); + }, + /** + * Updates the properties of a pipeline. + * @summary Update a pipeline + * @param {PipelinesApiUpdatePipelineRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + updatePipeline(requestParameters: PipelinesApiUpdatePipelineRequest, ): Promise { + return localVarFp.updatePipeline(requestParameters.id, requestParameters.PipelineRequest1, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for addPipeline operation in PipelinesApi. + * @export + * @interface PipelinesApiAddPipelineRequest + */ +export interface PipelinesApiAddPipelineRequest { + /** + * + * @type {PipelineRequest} + * @memberof PipelinesApiAddPipeline + */ + readonly PipelineRequest?: PipelineRequest +} + +/** + * Request parameters for deletePipeline operation in PipelinesApi. + * @export + * @interface PipelinesApiDeletePipelineRequest + */ +export interface PipelinesApiDeletePipelineRequest { + /** + * The ID of the pipeline + * @type {number} + * @memberof PipelinesApiDeletePipeline + */ + readonly id: number +} + +/** + * Request parameters for getPipeline operation in PipelinesApi. + * @export + * @interface PipelinesApiGetPipelineRequest + */ +export interface PipelinesApiGetPipelineRequest { + /** + * The ID of the pipeline + * @type {number} + * @memberof PipelinesApiGetPipeline + */ + readonly id: number + + /** + * The 3-letter currency code of any of the supported currencies. When supplied, `per_stages_converted` is returned in `deals_summary` which contains the currency-converted total amounts in the given currency per each stage. You may also set this parameter to `default_currency` in which case users default currency is used. + * @type {string} + * @memberof PipelinesApiGetPipeline + */ + readonly totals_convert_currency?: string +} + +/** + * Request parameters for getPipelineConversionStatistics operation in PipelinesApi. + * @export + * @interface PipelinesApiGetPipelineConversionStatisticsRequest + */ +export interface PipelinesApiGetPipelineConversionStatisticsRequest { + /** + * The ID of the pipeline + * @type {number} + * @memberof PipelinesApiGetPipelineConversionStatistics + */ + readonly id: number + + /** + * The start of the period. Date in format of YYYY-MM-DD. + * @type {string} + * @memberof PipelinesApiGetPipelineConversionStatistics + */ + readonly start_date: string + + /** + * The end of the period. Date in format of YYYY-MM-DD. + * @type {string} + * @memberof PipelinesApiGetPipelineConversionStatistics + */ + readonly end_date: string + + /** + * The ID of the user who\'s pipeline metrics statistics to fetch. If omitted, the authorized user will be used. + * @type {number} + * @memberof PipelinesApiGetPipelineConversionStatistics + */ + readonly user_id?: number +} + +/** + * Request parameters for getPipelineDeals operation in PipelinesApi. + * @export + * @interface PipelinesApiGetPipelineDealsRequest + */ +export interface PipelinesApiGetPipelineDealsRequest { + /** + * The ID of the pipeline + * @type {number} + * @memberof PipelinesApiGetPipelineDeals + */ + readonly id: number + + /** + * If supplied, only deals matching the given filter will be returned + * @type {number} + * @memberof PipelinesApiGetPipelineDeals + */ + readonly filter_id?: number + + /** + * If supplied, `filter_id` will not be considered and only deals owned by the given user will be returned. If omitted, deals owned by the authorized user will be returned. + * @type {number} + * @memberof PipelinesApiGetPipelineDeals + */ + readonly user_id?: number + + /** + * If supplied, `filter_id` and `user_id` will not be considered – instead, deals owned by everyone will be returned + * @type {0 | 1} + * @memberof PipelinesApiGetPipelineDeals + */ + readonly everyone?: 0 | 1 + + /** + * If supplied, only deals within the given stage will be returned + * @type {number} + * @memberof PipelinesApiGetPipelineDeals + */ + readonly stage_id?: number + + /** + * Pagination start + * @type {number} + * @memberof PipelinesApiGetPipelineDeals + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof PipelinesApiGetPipelineDeals + */ + readonly limit?: number + + /** + * Whether to include a summary of the pipeline in the `additional_data` or not + * @type {0 | 1} + * @memberof PipelinesApiGetPipelineDeals + */ + readonly get_summary?: 0 | 1 + + /** + * The 3-letter currency code of any of the supported currencies. When supplied, `per_stages_converted` is returned inside `deals_summary` inside `additional_data` which contains the currency-converted total amounts in the given currency per each stage. You may also set this parameter to `default_currency` in which case users default currency is used. Only works when `get_summary` parameter flag is enabled. + * @type {string} + * @memberof PipelinesApiGetPipelineDeals + */ + readonly totals_convert_currency?: string +} + +/** + * Request parameters for getPipelineMovementStatistics operation in PipelinesApi. + * @export + * @interface PipelinesApiGetPipelineMovementStatisticsRequest + */ +export interface PipelinesApiGetPipelineMovementStatisticsRequest { + /** + * The ID of the pipeline + * @type {number} + * @memberof PipelinesApiGetPipelineMovementStatistics + */ + readonly id: number + + /** + * The start of the period. Date in format of YYYY-MM-DD. + * @type {string} + * @memberof PipelinesApiGetPipelineMovementStatistics + */ + readonly start_date: string + + /** + * The end of the period. Date in format of YYYY-MM-DD. + * @type {string} + * @memberof PipelinesApiGetPipelineMovementStatistics + */ + readonly end_date: string + + /** + * The ID of the user who\'s pipeline statistics to fetch. If omitted, the authorized user will be used. + * @type {number} + * @memberof PipelinesApiGetPipelineMovementStatistics + */ + readonly user_id?: number +} + +/** + * Request parameters for updatePipeline operation in PipelinesApi. + * @export + * @interface PipelinesApiUpdatePipelineRequest + */ +export interface PipelinesApiUpdatePipelineRequest { + /** + * The ID of the pipeline + * @type {number} + * @memberof PipelinesApiUpdatePipeline + */ + readonly id: number + + /** + * + * @type {PipelineRequest1} + * @memberof PipelinesApiUpdatePipeline + */ + readonly PipelineRequest1?: PipelineRequest1 +} + +/** + * PipelinesApi - object-oriented interface + * @export + * @class PipelinesApi + * @extends {BaseAPI} + */ +export class PipelinesApi extends BaseAPI { + /** + * Adds a new pipeline. + * @summary Add a new pipeline + * @param {PipelinesApiAddPipelineRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PipelinesApi + */ + public addPipeline(requestParameters: PipelinesApiAddPipelineRequest = {}, ) { + return PipelinesApiFp(this.configuration).addPipeline(requestParameters.PipelineRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Marks a pipeline as deleted. + * @summary Delete a pipeline + * @param {PipelinesApiDeletePipelineRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PipelinesApi + */ + public deletePipeline(requestParameters: PipelinesApiDeletePipelineRequest, ) { + return PipelinesApiFp(this.configuration).deletePipeline(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about a specific pipeline. Also returns the summary of the deals in this pipeline across its stages. + * @summary Get one pipeline + * @param {PipelinesApiGetPipelineRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PipelinesApi + */ + public getPipeline(requestParameters: PipelinesApiGetPipelineRequest, ) { + return PipelinesApiFp(this.configuration).getPipeline(requestParameters.id, requestParameters.totals_convert_currency, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns all stage-to-stage conversion and pipeline-to-close rates for the given time period. + * @summary Get deals conversion rates in pipeline + * @param {PipelinesApiGetPipelineConversionStatisticsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PipelinesApi + */ + public getPipelineConversionStatistics(requestParameters: PipelinesApiGetPipelineConversionStatisticsRequest, ) { + return PipelinesApiFp(this.configuration).getPipelineConversionStatistics(requestParameters.id, requestParameters.start_date, requestParameters.end_date, requestParameters.user_id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists deals in a specific pipeline across all its stages. + * @summary Get deals in a pipeline + * @param {PipelinesApiGetPipelineDealsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PipelinesApi + */ + public getPipelineDeals(requestParameters: PipelinesApiGetPipelineDealsRequest, ) { + return PipelinesApiFp(this.configuration).getPipelineDeals(requestParameters.id, requestParameters.filter_id, requestParameters.user_id, requestParameters.everyone, requestParameters.stage_id, requestParameters.start, requestParameters.limit, requestParameters.get_summary, requestParameters.totals_convert_currency, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns statistics for deals movements for the given time period. + * @summary Get deals movements in pipeline + * @param {PipelinesApiGetPipelineMovementStatisticsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PipelinesApi + */ + public getPipelineMovementStatistics(requestParameters: PipelinesApiGetPipelineMovementStatisticsRequest, ) { + return PipelinesApiFp(this.configuration).getPipelineMovementStatistics(requestParameters.id, requestParameters.start_date, requestParameters.end_date, requestParameters.user_id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about all pipelines. + * @summary Get all pipelines + + * @throws {RequiredError} + * @memberof PipelinesApi + */ + public getPipelines() { + return PipelinesApiFp(this.configuration).getPipelines().then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates the properties of a pipeline. + * @summary Update a pipeline + * @param {PipelinesApiUpdatePipelineRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PipelinesApi + */ + public updatePipeline(requestParameters: PipelinesApiUpdatePipelineRequest, ) { + return PipelinesApiFp(this.configuration).updatePipeline(requestParameters.id, requestParameters.PipelineRequest1, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/product-fields-api.ts b/api/product-fields-api.ts new file mode 100644 index 00000000..4a4b89e2 --- /dev/null +++ b/api/product-fields-api.ts @@ -0,0 +1,654 @@ +/* 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 { DeleteProductFieldResponse200 } from '../models'; +// @ts-ignore +import { DeleteProductFieldsResponse200 } from '../models'; +// @ts-ignore +import { FailResponse } from '../models'; +// @ts-ignore +import { GetProductFieldResponse200 } from '../models'; +// @ts-ignore +import { GetProductFieldsResponse200 } from '../models'; +// @ts-ignore +import { ProductFieldAllOf } from '../models'; +// @ts-ignore +import { UpdateProductFieldResponse200 } from '../models'; +/** + * ProductFieldsApi - axios parameter creator + * @export + */ +export const ProductFieldsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Adds a new product field. For more information, see the tutorial for adding a new custom field. + * @summary Add a new product field + * @param {ProductFieldAllOf} [ProductFieldAllOf] + + * @throws {RequiredError} + */ + addProductField: async (ProductFieldAllOf?: ProductFieldAllOf, ): Promise => { + const localVarPath = `/productFields`; + // 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", ["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(ProductFieldAllOf, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Marks a product field as deleted. For more information, see the tutorial for deleting a custom field. + * @summary Delete a product field + * @param {number} id The ID of the product field + + * @throws {RequiredError} + */ + deleteProductField: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteProductField', 'id', id) + const localVarPath = `/productFields/{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", ["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 fields as deleted. + * @summary Delete multiple product fields in bulk + * @param {string} ids The comma-separated field IDs to delete + + * @throws {RequiredError} + */ + deleteProductFields: async (ids: string, ): Promise => { + // verify required parameter 'ids' is not null or undefined + assertParamExists('deleteProductFields', 'ids', ids) + const localVarPath = `/productFields`; + // 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", ["products: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 product field. + * @summary Get one product field + * @param {number} id The ID of the product field + + * @throws {RequiredError} + */ + getProductField: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getProductField', 'id', id) + const localVarPath = `/productFields/{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", ["products:read", "products: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 product fields. + * @summary Get all product fields + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + getProductFields: async (start?: number, limit?: number, ): Promise => { + const localVarPath = `/productFields`; + // 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; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Updates a product field. For more information, see the tutorial for updating custom fields\' values. + * @summary Update a product field + * @param {number} id The ID of the product field + * @param {UpdateProductFieldResponse200} [UpdateProductFieldResponse200] + + * @throws {RequiredError} + */ + updateProductField: async (id: number, UpdateProductFieldResponse200?: UpdateProductFieldResponse200, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updateProductField', 'id', id) + const localVarPath = `/productFields/{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", ["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(UpdateProductFieldResponse200, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ProductFieldsApi - functional programming interface + * @export + */ +export const ProductFieldsApiFp = 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 = ProductFieldsApiAxiosParamCreator(configuration) + return { + /** + * Adds a new product field. For more information, see the tutorial for adding a new custom field. + * @summary Add a new product field + * @param {ProductFieldAllOf} [ProductFieldAllOf] + + * @throws {RequiredError} + */ + async addProductField(ProductFieldAllOf?: ProductFieldAllOf, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addProductField(ProductFieldAllOf, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Marks a product field as deleted. For more information, see the tutorial for deleting a custom field. + * @summary Delete a product field + * @param {number} id The ID of the product field + + * @throws {RequiredError} + */ + async deleteProductField(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteProductField(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Marks multiple fields as deleted. + * @summary Delete multiple product fields in bulk + * @param {string} ids The comma-separated field IDs to delete + + * @throws {RequiredError} + */ + async deleteProductFields(ids: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteProductFields(ids, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns data about a specific product field. + * @summary Get one product field + * @param {number} id The ID of the product field + + * @throws {RequiredError} + */ + async getProductField(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProductField(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns data about all product fields. + * @summary Get all product fields + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + async getProductFields(start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProductFields(start, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates a product field. For more information, see the tutorial for updating custom fields\' values. + * @summary Update a product field + * @param {number} id The ID of the product field + * @param {UpdateProductFieldResponse200} [UpdateProductFieldResponse200] + + * @throws {RequiredError} + */ + async updateProductField(id: number, UpdateProductFieldResponse200?: UpdateProductFieldResponse200, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateProductField(id, UpdateProductFieldResponse200, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * ProductFieldsApi - factory interface + * @export + */ +export const ProductFieldsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ProductFieldsApiFp(configuration) + return { + /** + * Adds a new product field. For more information, see the tutorial for adding a new custom field. + * @summary Add a new product field + * @param {ProductFieldsApiAddProductFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addProductField(requestParameters: ProductFieldsApiAddProductFieldRequest = {}, ): Promise { + return localVarFp.addProductField(requestParameters.ProductFieldAllOf, ).then((request) => request(axios, basePath)); + }, + /** + * Marks a product field as deleted. For more information, see the tutorial for deleting a custom field. + * @summary Delete a product field + * @param {ProductFieldsApiDeleteProductFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteProductField(requestParameters: ProductFieldsApiDeleteProductFieldRequest, ): Promise { + return localVarFp.deleteProductField(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Marks multiple fields as deleted. + * @summary Delete multiple product fields in bulk + * @param {ProductFieldsApiDeleteProductFieldsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteProductFields(requestParameters: ProductFieldsApiDeleteProductFieldsRequest, ): Promise { + return localVarFp.deleteProductFields(requestParameters.ids, ).then((request) => request(axios, basePath)); + }, + /** + * Returns data about a specific product field. + * @summary Get one product field + * @param {ProductFieldsApiGetProductFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getProductField(requestParameters: ProductFieldsApiGetProductFieldRequest, ): Promise { + return localVarFp.getProductField(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns data about all product fields. + * @summary Get all product fields + * @param {ProductFieldsApiGetProductFieldsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getProductFields(requestParameters: ProductFieldsApiGetProductFieldsRequest = {}, ): Promise { + return localVarFp.getProductFields(requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + /** + * Updates a product field. For more information, see the tutorial for updating custom fields\' values. + * @summary Update a product field + * @param {ProductFieldsApiUpdateProductFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + updateProductField(requestParameters: ProductFieldsApiUpdateProductFieldRequest, ): Promise { + return localVarFp.updateProductField(requestParameters.id, requestParameters.UpdateProductFieldResponse200, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for addProductField operation in ProductFieldsApi. + * @export + * @interface ProductFieldsApiAddProductFieldRequest + */ +export interface ProductFieldsApiAddProductFieldRequest { + /** + * + * @type {ProductFieldAllOf} + * @memberof ProductFieldsApiAddProductField + */ + readonly ProductFieldAllOf?: ProductFieldAllOf +} + +/** + * Request parameters for deleteProductField operation in ProductFieldsApi. + * @export + * @interface ProductFieldsApiDeleteProductFieldRequest + */ +export interface ProductFieldsApiDeleteProductFieldRequest { + /** + * The ID of the product field + * @type {number} + * @memberof ProductFieldsApiDeleteProductField + */ + readonly id: number +} + +/** + * Request parameters for deleteProductFields operation in ProductFieldsApi. + * @export + * @interface ProductFieldsApiDeleteProductFieldsRequest + */ +export interface ProductFieldsApiDeleteProductFieldsRequest { + /** + * The comma-separated field IDs to delete + * @type {string} + * @memberof ProductFieldsApiDeleteProductFields + */ + readonly ids: string +} + +/** + * Request parameters for getProductField operation in ProductFieldsApi. + * @export + * @interface ProductFieldsApiGetProductFieldRequest + */ +export interface ProductFieldsApiGetProductFieldRequest { + /** + * The ID of the product field + * @type {number} + * @memberof ProductFieldsApiGetProductField + */ + readonly id: number +} + +/** + * Request parameters for getProductFields operation in ProductFieldsApi. + * @export + * @interface ProductFieldsApiGetProductFieldsRequest + */ +export interface ProductFieldsApiGetProductFieldsRequest { + /** + * Pagination start + * @type {number} + * @memberof ProductFieldsApiGetProductFields + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof ProductFieldsApiGetProductFields + */ + readonly limit?: number +} + +/** + * Request parameters for updateProductField operation in ProductFieldsApi. + * @export + * @interface ProductFieldsApiUpdateProductFieldRequest + */ +export interface ProductFieldsApiUpdateProductFieldRequest { + /** + * The ID of the product field + * @type {number} + * @memberof ProductFieldsApiUpdateProductField + */ + readonly id: number + + /** + * + * @type {UpdateProductFieldResponse200} + * @memberof ProductFieldsApiUpdateProductField + */ + readonly UpdateProductFieldResponse200?: UpdateProductFieldResponse200 +} + +/** + * ProductFieldsApi - object-oriented interface + * @export + * @class ProductFieldsApi + * @extends {BaseAPI} + */ +export class ProductFieldsApi extends BaseAPI { + /** + * Adds a new product field. For more information, see the tutorial for adding a new custom field. + * @summary Add a new product field + * @param {ProductFieldsApiAddProductFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProductFieldsApi + */ + public addProductField(requestParameters: ProductFieldsApiAddProductFieldRequest = {}, ) { + return ProductFieldsApiFp(this.configuration).addProductField(requestParameters.ProductFieldAllOf, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Marks a product field as deleted. For more information, see the tutorial for deleting a custom field. + * @summary Delete a product field + * @param {ProductFieldsApiDeleteProductFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProductFieldsApi + */ + public deleteProductField(requestParameters: ProductFieldsApiDeleteProductFieldRequest, ) { + return ProductFieldsApiFp(this.configuration).deleteProductField(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Marks multiple fields as deleted. + * @summary Delete multiple product fields in bulk + * @param {ProductFieldsApiDeleteProductFieldsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProductFieldsApi + */ + public deleteProductFields(requestParameters: ProductFieldsApiDeleteProductFieldsRequest, ) { + return ProductFieldsApiFp(this.configuration).deleteProductFields(requestParameters.ids, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about a specific product field. + * @summary Get one product field + * @param {ProductFieldsApiGetProductFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProductFieldsApi + */ + public getProductField(requestParameters: ProductFieldsApiGetProductFieldRequest, ) { + return ProductFieldsApiFp(this.configuration).getProductField(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about all product fields. + * @summary Get all product fields + * @param {ProductFieldsApiGetProductFieldsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProductFieldsApi + */ + public getProductFields(requestParameters: ProductFieldsApiGetProductFieldsRequest = {}, ) { + return ProductFieldsApiFp(this.configuration).getProductFields(requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates a product field. For more information, see the tutorial for updating custom fields\' values. + * @summary Update a product field + * @param {ProductFieldsApiUpdateProductFieldRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProductFieldsApi + */ + public updateProductField(requestParameters: ProductFieldsApiUpdateProductFieldRequest, ) { + return ProductFieldsApiFp(this.configuration).updateProductField(requestParameters.id, requestParameters.UpdateProductFieldResponse200, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/products-api.ts b/api/products-api.ts new file mode 100644 index 00000000..0deb08c3 --- /dev/null +++ b/api/products-api.ts @@ -0,0 +1,1454 @@ +/* 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 { AddProductFollowerRequest } from '../models'; +// @ts-ignore +import { AddProductRequest } from '../models'; +// @ts-ignore +import { AddProductRequest1 } from '../models'; +// @ts-ignore +import { DeleteProductFollowerResponse200 } from '../models'; +// @ts-ignore +import { DeleteProductResponse200 } from '../models'; +// @ts-ignore +import { GetAssociatedDealsResponse200 } from '../models'; +// @ts-ignore +import { GetAssociatedFilesResponse2001 } from '../models'; +// @ts-ignore +import { GetProductFollowersResponseSuccess } from '../models'; +// @ts-ignore +import { GetProductsResponse200 } from '../models'; +// @ts-ignore +import { GetproductResponse200 } from '../models'; +// @ts-ignore +import { NewFollowerResponse200 } from '../models'; +// @ts-ignore +import { SearchProductsResponse200 } from '../models'; +// @ts-ignore +import { UpdateProductResponse200 } from '../models'; +// @ts-ignore +import { UserIds } from '../models'; +/** + * ProductsApi - axios parameter creator + * @export + */ +export const ProductsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Adds a new product to the Products inventory. For more information, see the tutorial for adding a product. + * @summary Add a product + * @param {AddProductRequest} [AddProductRequest] + + * @throws {RequiredError} + */ + addProduct: async (AddProductRequest?: AddProductRequest, ): Promise => { + const localVarPath = `/products`; + // 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", ["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(AddProductRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Adds a follower to a product. + * @summary Add a follower to a product + * @param {number} id The ID of the product + * @param {AddProductFollowerRequest} [AddProductFollowerRequest] + + * @throws {RequiredError} + */ + addProductFollower: async (id: number, AddProductFollowerRequest?: AddProductFollowerRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('addProductFollower', 'id', id) + const localVarPath = `/products/{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", ["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(AddProductFollowerRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Marks a product as deleted. After 30 days, the product will be permanently deleted. + * @summary Delete a product + * @param {number} id The ID of the product + + * @throws {RequiredError} + */ + deleteProduct: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteProduct', 'id', id) + const localVarPath = `/products/{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", ["products: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 product. + * @summary Delete a follower from a product + * @param {number} id The ID of the product + * @param {number} follower_id The ID of the relationship between the follower and the product + + * @throws {RequiredError} + */ + deleteProductFollower: async (id: number, follower_id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteProductFollower', 'id', id) + // verify required parameter 'follower_id' is not null or undefined + assertParamExists('deleteProductFollower', 'follower_id', follower_id) + const localVarPath = `/products/{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", ["products: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 product. + * @summary Get one product + * @param {number} id The ID of the product + + * @throws {RequiredError} + */ + getProduct: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getProduct', 'id', id) + const localVarPath = `/products/{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", ["products:read", "products: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 deals that have a product attached to it. + * @summary Get deals where a product is attached to + * @param {number} id The ID of the product + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + * @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. + + * @throws {RequiredError} + */ + getProductDeals: async (id: number, start?: number, limit?: number, status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted', ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getProductDeals', 'id', id) + const localVarPath = `/products/{id}/deals` + .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 (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, + }; + }, + /** + * Lists files associated with a product. + * @summary List files attached to a product + * @param {number} id The ID of the product + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + * @param {string} [sort] The field name and sorting mode (`field_name_1 ASC` or `field_name_1 DESC`). Supported fields: `update_time`, `id`. + + * @throws {RequiredError} + */ + getProductFiles: async (id: number, start?: number, limit?: number, sort?: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getProductFiles', 'id', id) + const localVarPath = `/products/{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", ["products:read", "products: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 product. + * @summary List followers of a product + * @param {number} id The ID of the product + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + getProductFollowers: async (id: number, start?: number, limit?: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getProductFollowers', 'id', id) + const localVarPath = `/products/{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", ["products:read", "products: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 users permitted to access a product. + * @summary List permitted users + * @param {number} id The ID of the product + + * @throws {RequiredError} + */ + getProductUsers: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getProductUsers', 'id', id) + const localVarPath = `/products/{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", ["products:read", "products: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 products. + * @summary Get all products + * @param {number} [user_id] If supplied, only products owned by the given user will be returned + * @param {number} [filter_id] The ID of the filter to use + * @param {Array} [ids] An array of integers with the IDs of the products that should be returned in the response + * @param {string} [first_char] If supplied, only products whose name starts with the specified letter will be returned (case-insensitive) + * @param {boolean} [get_summary] If supplied, the response will return the total numbers of products in the `additional_data.summary.total_count` property + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + getProducts: async (user_id?: number, filter_id?: number, ids?: Array, first_char?: string, get_summary?: boolean, start?: number, limit?: number, ): Promise => { + const localVarPath = `/products`; + // 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 (user_id !== undefined) { + localVarQueryParameter['user_id'] = user_id; + } + + if (filter_id !== undefined) { + localVarQueryParameter['filter_id'] = filter_id; + } + + if (ids) { + localVarQueryParameter['ids'] = ids; + } + + if (first_char !== undefined) { + localVarQueryParameter['first_char'] = first_char; + } + + if (get_summary !== undefined) { + localVarQueryParameter['get_summary'] = get_summary; + } + + 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, + }; + }, + /** + * Searches all products by name, code and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. + * @summary Search products + * @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 {'code' | 'custom_fields' | 'name'} [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 {'product.price'} [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} + */ + searchProducts: async (term: string, fields?: 'code' | 'custom_fields' | 'name', exact_match?: boolean, include_fields?: 'product.price', start?: number, limit?: number, ): Promise => { + // verify required parameter 'term' is not null or undefined + assertParamExists('searchProducts', 'term', term) + const localVarPath = `/products/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", ["products:read", "products: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 (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 product data. + * @summary Update a product + * @param {number} id The ID of the product + * @param {AddProductRequest1} [AddProductRequest1] + + * @throws {RequiredError} + */ + updateProduct: async (id: number, AddProductRequest1?: AddProductRequest1, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updateProduct', 'id', id) + const localVarPath = `/products/{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", ["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(AddProductRequest1, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ProductsApi - functional programming interface + * @export + */ +export const ProductsApiFp = 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 = ProductsApiAxiosParamCreator(configuration) + return { + /** + * Adds a new product to the Products inventory. For more information, see the tutorial for adding a product. + * @summary Add a product + * @param {AddProductRequest} [AddProductRequest] + + * @throws {RequiredError} + */ + async addProduct(AddProductRequest?: AddProductRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addProduct(AddProductRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Adds a follower to a product. + * @summary Add a follower to a product + * @param {number} id The ID of the product + * @param {AddProductFollowerRequest} [AddProductFollowerRequest] + + * @throws {RequiredError} + */ + async addProductFollower(id: number, AddProductFollowerRequest?: AddProductFollowerRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addProductFollower(id, AddProductFollowerRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Marks a product as deleted. After 30 days, the product will be permanently deleted. + * @summary Delete a product + * @param {number} id The ID of the product + + * @throws {RequiredError} + */ + async deleteProduct(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteProduct(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Deletes a follower from a product. + * @summary Delete a follower from a product + * @param {number} id The ID of the product + * @param {number} follower_id The ID of the relationship between the follower and the product + + * @throws {RequiredError} + */ + async deleteProductFollower(id: number, follower_id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteProductFollower(id, follower_id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns data about a specific product. + * @summary Get one product + * @param {number} id The ID of the product + + * @throws {RequiredError} + */ + async getProduct(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProduct(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns data about deals that have a product attached to it. + * @summary Get deals where a product is attached to + * @param {number} id The ID of the product + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + * @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. + + * @throws {RequiredError} + */ + async getProductDeals(id: number, start?: number, limit?: number, status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted', ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProductDeals(id, start, limit, status, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists files associated with a product. + * @summary List files attached to a product + * @param {number} id The ID of the product + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + * @param {string} [sort] The field name and sorting mode (`field_name_1 ASC` or `field_name_1 DESC`). Supported fields: `update_time`, `id`. + + * @throws {RequiredError} + */ + async getProductFiles(id: number, start?: number, limit?: number, sort?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProductFiles(id, start, limit, sort, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists the followers of a product. + * @summary List followers of a product + * @param {number} id The ID of the product + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + async getProductFollowers(id: number, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProductFollowers(id, start, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists users permitted to access a product. + * @summary List permitted users + * @param {number} id The ID of the product + + * @throws {RequiredError} + */ + async getProductUsers(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProductUsers(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns data about all products. + * @summary Get all products + * @param {number} [user_id] If supplied, only products owned by the given user will be returned + * @param {number} [filter_id] The ID of the filter to use + * @param {Array} [ids] An array of integers with the IDs of the products that should be returned in the response + * @param {string} [first_char] If supplied, only products whose name starts with the specified letter will be returned (case-insensitive) + * @param {boolean} [get_summary] If supplied, the response will return the total numbers of products in the `additional_data.summary.total_count` property + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + async getProducts(user_id?: number, filter_id?: number, ids?: Array, first_char?: string, get_summary?: boolean, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProducts(user_id, filter_id, ids, first_char, get_summary, start, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Searches all products by name, code and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. + * @summary Search products + * @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 {'code' | 'custom_fields' | 'name'} [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 {'product.price'} [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 searchProducts(term: string, fields?: 'code' | 'custom_fields' | 'name', exact_match?: boolean, include_fields?: 'product.price', start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.searchProducts(term, fields, exact_match, include_fields, start, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates product data. + * @summary Update a product + * @param {number} id The ID of the product + * @param {AddProductRequest1} [AddProductRequest1] + + * @throws {RequiredError} + */ + async updateProduct(id: number, AddProductRequest1?: AddProductRequest1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateProduct(id, AddProductRequest1, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * ProductsApi - factory interface + * @export + */ +export const ProductsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ProductsApiFp(configuration) + return { + /** + * Adds a new product to the Products inventory. For more information, see the tutorial for adding a product. + * @summary Add a product + * @param {ProductsApiAddProductRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addProduct(requestParameters: ProductsApiAddProductRequest = {}, ): Promise { + return localVarFp.addProduct(requestParameters.AddProductRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Adds a follower to a product. + * @summary Add a follower to a product + * @param {ProductsApiAddProductFollowerRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addProductFollower(requestParameters: ProductsApiAddProductFollowerRequest, ): Promise { + return localVarFp.addProductFollower(requestParameters.id, requestParameters.AddProductFollowerRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Marks a product as deleted. After 30 days, the product will be permanently deleted. + * @summary Delete a product + * @param {ProductsApiDeleteProductRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteProduct(requestParameters: ProductsApiDeleteProductRequest, ): Promise { + return localVarFp.deleteProduct(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Deletes a follower from a product. + * @summary Delete a follower from a product + * @param {ProductsApiDeleteProductFollowerRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteProductFollower(requestParameters: ProductsApiDeleteProductFollowerRequest, ): Promise { + return localVarFp.deleteProductFollower(requestParameters.id, requestParameters.follower_id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns data about a specific product. + * @summary Get one product + * @param {ProductsApiGetProductRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getProduct(requestParameters: ProductsApiGetProductRequest, ): Promise { + return localVarFp.getProduct(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns data about deals that have a product attached to it. + * @summary Get deals where a product is attached to + * @param {ProductsApiGetProductDealsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getProductDeals(requestParameters: ProductsApiGetProductDealsRequest, ): Promise { + return localVarFp.getProductDeals(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.status, ).then((request) => request(axios, basePath)); + }, + /** + * Lists files associated with a product. + * @summary List files attached to a product + * @param {ProductsApiGetProductFilesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getProductFiles(requestParameters: ProductsApiGetProductFilesRequest, ): Promise { + return localVarFp.getProductFiles(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.sort, ).then((request) => request(axios, basePath)); + }, + /** + * Lists the followers of a product. + * @summary List followers of a product + * @param {ProductsApiGetProductFollowersRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getProductFollowers(requestParameters: ProductsApiGetProductFollowersRequest, ): Promise { + return localVarFp.getProductFollowers(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + /** + * Lists users permitted to access a product. + * @summary List permitted users + * @param {ProductsApiGetProductUsersRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getProductUsers(requestParameters: ProductsApiGetProductUsersRequest, ): Promise { + return localVarFp.getProductUsers(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns data about all products. + * @summary Get all products + * @param {ProductsApiGetProductsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getProducts(requestParameters: ProductsApiGetProductsRequest = {}, ): Promise { + return localVarFp.getProducts(requestParameters.user_id, requestParameters.filter_id, requestParameters.ids, requestParameters.first_char, requestParameters.get_summary, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + /** + * Searches all products by name, code and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. + * @summary Search products + * @param {ProductsApiSearchProductsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + searchProducts(requestParameters: ProductsApiSearchProductsRequest, ): Promise { + return localVarFp.searchProducts(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.include_fields, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + /** + * Updates product data. + * @summary Update a product + * @param {ProductsApiUpdateProductRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + updateProduct(requestParameters: ProductsApiUpdateProductRequest, ): Promise { + return localVarFp.updateProduct(requestParameters.id, requestParameters.AddProductRequest1, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for addProduct operation in ProductsApi. + * @export + * @interface ProductsApiAddProductRequest + */ +export interface ProductsApiAddProductRequest { + /** + * + * @type {AddProductRequest} + * @memberof ProductsApiAddProduct + */ + readonly AddProductRequest?: AddProductRequest +} + +/** + * Request parameters for addProductFollower operation in ProductsApi. + * @export + * @interface ProductsApiAddProductFollowerRequest + */ +export interface ProductsApiAddProductFollowerRequest { + /** + * The ID of the product + * @type {number} + * @memberof ProductsApiAddProductFollower + */ + readonly id: number + + /** + * + * @type {AddProductFollowerRequest} + * @memberof ProductsApiAddProductFollower + */ + readonly AddProductFollowerRequest?: AddProductFollowerRequest +} + +/** + * Request parameters for deleteProduct operation in ProductsApi. + * @export + * @interface ProductsApiDeleteProductRequest + */ +export interface ProductsApiDeleteProductRequest { + /** + * The ID of the product + * @type {number} + * @memberof ProductsApiDeleteProduct + */ + readonly id: number +} + +/** + * Request parameters for deleteProductFollower operation in ProductsApi. + * @export + * @interface ProductsApiDeleteProductFollowerRequest + */ +export interface ProductsApiDeleteProductFollowerRequest { + /** + * The ID of the product + * @type {number} + * @memberof ProductsApiDeleteProductFollower + */ + readonly id: number + + /** + * The ID of the relationship between the follower and the product + * @type {number} + * @memberof ProductsApiDeleteProductFollower + */ + readonly follower_id: number +} + +/** + * Request parameters for getProduct operation in ProductsApi. + * @export + * @interface ProductsApiGetProductRequest + */ +export interface ProductsApiGetProductRequest { + /** + * The ID of the product + * @type {number} + * @memberof ProductsApiGetProduct + */ + readonly id: number +} + +/** + * Request parameters for getProductDeals operation in ProductsApi. + * @export + * @interface ProductsApiGetProductDealsRequest + */ +export interface ProductsApiGetProductDealsRequest { + /** + * The ID of the product + * @type {number} + * @memberof ProductsApiGetProductDeals + */ + readonly id: number + + /** + * Pagination start + * @type {number} + * @memberof ProductsApiGetProductDeals + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof ProductsApiGetProductDeals + */ + readonly limit?: 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 ProductsApiGetProductDeals + */ + readonly status?: 'open' | 'won' | 'lost' | 'deleted' | 'all_not_deleted' +} + +/** + * Request parameters for getProductFiles operation in ProductsApi. + * @export + * @interface ProductsApiGetProductFilesRequest + */ +export interface ProductsApiGetProductFilesRequest { + /** + * The ID of the product + * @type {number} + * @memberof ProductsApiGetProductFiles + */ + readonly id: number + + /** + * Pagination start + * @type {number} + * @memberof ProductsApiGetProductFiles + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof ProductsApiGetProductFiles + */ + readonly limit?: number + + /** + * The field name and sorting mode (`field_name_1 ASC` or `field_name_1 DESC`). Supported fields: `update_time`, `id`. + * @type {string} + * @memberof ProductsApiGetProductFiles + */ + readonly sort?: string +} + +/** + * Request parameters for getProductFollowers operation in ProductsApi. + * @export + * @interface ProductsApiGetProductFollowersRequest + */ +export interface ProductsApiGetProductFollowersRequest { + /** + * The ID of the product + * @type {number} + * @memberof ProductsApiGetProductFollowers + */ + readonly id: number + + /** + * Pagination start + * @type {number} + * @memberof ProductsApiGetProductFollowers + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof ProductsApiGetProductFollowers + */ + readonly limit?: number +} + +/** + * Request parameters for getProductUsers operation in ProductsApi. + * @export + * @interface ProductsApiGetProductUsersRequest + */ +export interface ProductsApiGetProductUsersRequest { + /** + * The ID of the product + * @type {number} + * @memberof ProductsApiGetProductUsers + */ + readonly id: number +} + +/** + * Request parameters for getProducts operation in ProductsApi. + * @export + * @interface ProductsApiGetProductsRequest + */ +export interface ProductsApiGetProductsRequest { + /** + * If supplied, only products owned by the given user will be returned + * @type {number} + * @memberof ProductsApiGetProducts + */ + readonly user_id?: number + + /** + * The ID of the filter to use + * @type {number} + * @memberof ProductsApiGetProducts + */ + readonly filter_id?: number + + /** + * An array of integers with the IDs of the products that should be returned in the response + * @type {Array} + * @memberof ProductsApiGetProducts + */ + readonly ids?: Array + + /** + * If supplied, only products whose name starts with the specified letter will be returned (case-insensitive) + * @type {string} + * @memberof ProductsApiGetProducts + */ + readonly first_char?: string + + /** + * If supplied, the response will return the total numbers of products in the `additional_data.summary.total_count` property + * @type {boolean} + * @memberof ProductsApiGetProducts + */ + readonly get_summary?: boolean + + /** + * Pagination start + * @type {number} + * @memberof ProductsApiGetProducts + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof ProductsApiGetProducts + */ + readonly limit?: number +} + +/** + * Request parameters for searchProducts operation in ProductsApi. + * @export + * @interface ProductsApiSearchProductsRequest + */ +export interface ProductsApiSearchProductsRequest { + /** + * 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 ProductsApiSearchProducts + */ + 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 {'code' | 'custom_fields' | 'name'} + * @memberof ProductsApiSearchProducts + */ + readonly fields?: 'code' | 'custom_fields' | 'name' + + /** + * When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. + * @type {boolean} + * @memberof ProductsApiSearchProducts + */ + readonly exact_match?: boolean + + /** + * Supports including optional fields in the results which are not provided by default + * @type {'product.price'} + * @memberof ProductsApiSearchProducts + */ + readonly include_fields?: 'product.price' + + /** + * 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 ProductsApiSearchProducts + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof ProductsApiSearchProducts + */ + readonly limit?: number +} + +/** + * Request parameters for updateProduct operation in ProductsApi. + * @export + * @interface ProductsApiUpdateProductRequest + */ +export interface ProductsApiUpdateProductRequest { + /** + * The ID of the product + * @type {number} + * @memberof ProductsApiUpdateProduct + */ + readonly id: number + + /** + * + * @type {AddProductRequest1} + * @memberof ProductsApiUpdateProduct + */ + readonly AddProductRequest1?: AddProductRequest1 +} + +/** + * ProductsApi - object-oriented interface + * @export + * @class ProductsApi + * @extends {BaseAPI} + */ +export class ProductsApi extends BaseAPI { + /** + * Adds a new product to the Products inventory. For more information, see the tutorial for adding a product. + * @summary Add a product + * @param {ProductsApiAddProductRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProductsApi + */ + public addProduct(requestParameters: ProductsApiAddProductRequest = {}, ) { + return ProductsApiFp(this.configuration).addProduct(requestParameters.AddProductRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Adds a follower to a product. + * @summary Add a follower to a product + * @param {ProductsApiAddProductFollowerRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProductsApi + */ + public addProductFollower(requestParameters: ProductsApiAddProductFollowerRequest, ) { + return ProductsApiFp(this.configuration).addProductFollower(requestParameters.id, requestParameters.AddProductFollowerRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Marks a product as deleted. After 30 days, the product will be permanently deleted. + * @summary Delete a product + * @param {ProductsApiDeleteProductRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProductsApi + */ + public deleteProduct(requestParameters: ProductsApiDeleteProductRequest, ) { + return ProductsApiFp(this.configuration).deleteProduct(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Deletes a follower from a product. + * @summary Delete a follower from a product + * @param {ProductsApiDeleteProductFollowerRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProductsApi + */ + public deleteProductFollower(requestParameters: ProductsApiDeleteProductFollowerRequest, ) { + return ProductsApiFp(this.configuration).deleteProductFollower(requestParameters.id, requestParameters.follower_id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about a specific product. + * @summary Get one product + * @param {ProductsApiGetProductRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProductsApi + */ + public getProduct(requestParameters: ProductsApiGetProductRequest, ) { + return ProductsApiFp(this.configuration).getProduct(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about deals that have a product attached to it. + * @summary Get deals where a product is attached to + * @param {ProductsApiGetProductDealsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProductsApi + */ + public getProductDeals(requestParameters: ProductsApiGetProductDealsRequest, ) { + return ProductsApiFp(this.configuration).getProductDeals(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.status, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists files associated with a product. + * @summary List files attached to a product + * @param {ProductsApiGetProductFilesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProductsApi + */ + public getProductFiles(requestParameters: ProductsApiGetProductFilesRequest, ) { + return ProductsApiFp(this.configuration).getProductFiles(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.sort, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists the followers of a product. + * @summary List followers of a product + * @param {ProductsApiGetProductFollowersRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProductsApi + */ + public getProductFollowers(requestParameters: ProductsApiGetProductFollowersRequest, ) { + return ProductsApiFp(this.configuration).getProductFollowers(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists users permitted to access a product. + * @summary List permitted users + * @param {ProductsApiGetProductUsersRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProductsApi + */ + public getProductUsers(requestParameters: ProductsApiGetProductUsersRequest, ) { + return ProductsApiFp(this.configuration).getProductUsers(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about all products. + * @summary Get all products + * @param {ProductsApiGetProductsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProductsApi + */ + public getProducts(requestParameters: ProductsApiGetProductsRequest = {}, ) { + return ProductsApiFp(this.configuration).getProducts(requestParameters.user_id, requestParameters.filter_id, requestParameters.ids, requestParameters.first_char, requestParameters.get_summary, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Searches all products by name, code and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. + * @summary Search products + * @param {ProductsApiSearchProductsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProductsApi + */ + public searchProducts(requestParameters: ProductsApiSearchProductsRequest, ) { + return ProductsApiFp(this.configuration).searchProducts(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.include_fields, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates product data. + * @summary Update a product + * @param {ProductsApiUpdateProductRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProductsApi + */ + public updateProduct(requestParameters: ProductsApiUpdateProductRequest, ) { + return ProductsApiFp(this.configuration).updateProduct(requestParameters.id, requestParameters.AddProductRequest1, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/project-templates-api.ts b/api/project-templates-api.ts new file mode 100644 index 00000000..40f6d8cf --- /dev/null +++ b/api/project-templates-api.ts @@ -0,0 +1,457 @@ +/* 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 { GetProjectBoardResponse200 } from '../models'; +// @ts-ignore +import { GetProjectPhaseResponse200 } from '../models'; +// @ts-ignore +import { GetProjectTemplateResponse200 } from '../models'; +// @ts-ignore +import { GetProjectTemplatesResponse200 } from '../models'; +/** + * ProjectTemplatesApi - axios parameter creator + * @export + */ +export const ProjectTemplatesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Returns the details of a specific project template. + * @summary Get details of a template + * @param {number} id The ID of the project template + + * @throws {RequiredError} + */ + getProjectTemplate: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getProjectTemplate', 'id', id) + const localVarPath = `/projectTemplates/{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", ["projects:read", "projects:full"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns all not deleted project templates. This is a cursor-paginated endpoint. For more information, please refer to our documentation on pagination. + * @summary Get all project templates + * @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, up to 500 items will be returned. + + * @throws {RequiredError} + */ + getProjectTemplates: async (cursor?: string, limit?: number, ): Promise => { + const localVarPath = `/projectTemplates`; + // 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", ["projects:read", "projects:full"], configuration) + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + 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, + }; + }, + /** + * Returns the details of a specific project board. + * @summary Get details of a board + * @param {number} id The ID of the project board + + * @throws {RequiredError} + */ + getProjectsBoard: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getProjectsBoard', 'id', id) + const localVarPath = `/projects/boards/{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", ["projects:read", "projects: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 project phase. + * @summary Get details of a phase + * @param {number} id The ID of the project phase + + * @throws {RequiredError} + */ + getProjectsPhase: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getProjectsPhase', 'id', id) + const localVarPath = `/projects/phases/{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", ["projects:read"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ProjectTemplatesApi - functional programming interface + * @export + */ +export const ProjectTemplatesApiFp = 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 = ProjectTemplatesApiAxiosParamCreator(configuration) + return { + /** + * Returns the details of a specific project template. + * @summary Get details of a template + * @param {number} id The ID of the project template + + * @throws {RequiredError} + */ + async getProjectTemplate(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProjectTemplate(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns all not deleted project templates. This is a cursor-paginated endpoint. For more information, please refer to our documentation on pagination. + * @summary Get all project templates + * @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, up to 500 items will be returned. + + * @throws {RequiredError} + */ + async getProjectTemplates(cursor?: string, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProjectTemplates(cursor, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns the details of a specific project board. + * @summary Get details of a board + * @param {number} id The ID of the project board + + * @throws {RequiredError} + */ + async getProjectsBoard(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProjectsBoard(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns the details of a specific project phase. + * @summary Get details of a phase + * @param {number} id The ID of the project phase + + * @throws {RequiredError} + */ + async getProjectsPhase(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProjectsPhase(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * ProjectTemplatesApi - factory interface + * @export + */ +export const ProjectTemplatesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ProjectTemplatesApiFp(configuration) + return { + /** + * Returns the details of a specific project template. + * @summary Get details of a template + * @param {ProjectTemplatesApiGetProjectTemplateRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getProjectTemplate(requestParameters: ProjectTemplatesApiGetProjectTemplateRequest, ): Promise { + return localVarFp.getProjectTemplate(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns all not deleted project templates. This is a cursor-paginated endpoint. For more information, please refer to our documentation on pagination. + * @summary Get all project templates + * @param {ProjectTemplatesApiGetProjectTemplatesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getProjectTemplates(requestParameters: ProjectTemplatesApiGetProjectTemplatesRequest = {}, ): Promise { + return localVarFp.getProjectTemplates(requestParameters.cursor, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + /** + * Returns the details of a specific project board. + * @summary Get details of a board + * @param {ProjectTemplatesApiGetProjectsBoardRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getProjectsBoard(requestParameters: ProjectTemplatesApiGetProjectsBoardRequest, ): Promise { + return localVarFp.getProjectsBoard(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns the details of a specific project phase. + * @summary Get details of a phase + * @param {ProjectTemplatesApiGetProjectsPhaseRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getProjectsPhase(requestParameters: ProjectTemplatesApiGetProjectsPhaseRequest, ): Promise { + return localVarFp.getProjectsPhase(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getProjectTemplate operation in ProjectTemplatesApi. + * @export + * @interface ProjectTemplatesApiGetProjectTemplateRequest + */ +export interface ProjectTemplatesApiGetProjectTemplateRequest { + /** + * The ID of the project template + * @type {number} + * @memberof ProjectTemplatesApiGetProjectTemplate + */ + readonly id: number +} + +/** + * Request parameters for getProjectTemplates operation in ProjectTemplatesApi. + * @export + * @interface ProjectTemplatesApiGetProjectTemplatesRequest + */ +export interface ProjectTemplatesApiGetProjectTemplatesRequest { + /** + * For pagination, the marker (an opaque string value) representing the first item on the next page + * @type {string} + * @memberof ProjectTemplatesApiGetProjectTemplates + */ + readonly cursor?: string + + /** + * For pagination, the limit of entries to be returned. If not provided, up to 500 items will be returned. + * @type {number} + * @memberof ProjectTemplatesApiGetProjectTemplates + */ + readonly limit?: number +} + +/** + * Request parameters for getProjectsBoard operation in ProjectTemplatesApi. + * @export + * @interface ProjectTemplatesApiGetProjectsBoardRequest + */ +export interface ProjectTemplatesApiGetProjectsBoardRequest { + /** + * The ID of the project board + * @type {number} + * @memberof ProjectTemplatesApiGetProjectsBoard + */ + readonly id: number +} + +/** + * Request parameters for getProjectsPhase operation in ProjectTemplatesApi. + * @export + * @interface ProjectTemplatesApiGetProjectsPhaseRequest + */ +export interface ProjectTemplatesApiGetProjectsPhaseRequest { + /** + * The ID of the project phase + * @type {number} + * @memberof ProjectTemplatesApiGetProjectsPhase + */ + readonly id: number +} + +/** + * ProjectTemplatesApi - object-oriented interface + * @export + * @class ProjectTemplatesApi + * @extends {BaseAPI} + */ +export class ProjectTemplatesApi extends BaseAPI { + /** + * Returns the details of a specific project template. + * @summary Get details of a template + * @param {ProjectTemplatesApiGetProjectTemplateRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProjectTemplatesApi + */ + public getProjectTemplate(requestParameters: ProjectTemplatesApiGetProjectTemplateRequest, ) { + return ProjectTemplatesApiFp(this.configuration).getProjectTemplate(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns all not deleted project templates. This is a cursor-paginated endpoint. For more information, please refer to our documentation on pagination. + * @summary Get all project templates + * @param {ProjectTemplatesApiGetProjectTemplatesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProjectTemplatesApi + */ + public getProjectTemplates(requestParameters: ProjectTemplatesApiGetProjectTemplatesRequest = {}, ) { + return ProjectTemplatesApiFp(this.configuration).getProjectTemplates(requestParameters.cursor, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the details of a specific project board. + * @summary Get details of a board + * @param {ProjectTemplatesApiGetProjectsBoardRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProjectTemplatesApi + */ + public getProjectsBoard(requestParameters: ProjectTemplatesApiGetProjectsBoardRequest, ) { + return ProjectTemplatesApiFp(this.configuration).getProjectsBoard(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the details of a specific project phase. + * @summary Get details of a phase + * @param {ProjectTemplatesApiGetProjectsPhaseRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProjectTemplatesApi + */ + public getProjectsPhase(requestParameters: ProjectTemplatesApiGetProjectsPhaseRequest, ) { + return ProjectTemplatesApiFp(this.configuration).getProjectsPhase(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/projects-api.ts b/api/projects-api.ts new file mode 100644 index 00000000..98752aff --- /dev/null +++ b/api/projects-api.ts @@ -0,0 +1,1455 @@ +/* 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 { AddProjectRequest } from '../models'; +// @ts-ignore +import { AddProjectResponse201 } from '../models'; +// @ts-ignore +import { DeleteProjectResponse200 } from '../models'; +// @ts-ignore +import { GetActivitiesCollectionResponse200 } from '../models'; +// @ts-ignore +import { GetProjectBoardsResponse200 } from '../models'; +// @ts-ignore +import { GetProjectGroupsResponse200 } from '../models'; +// @ts-ignore +import { GetProjectPhasesResponse200 } from '../models'; +// @ts-ignore +import { GetProjectPlanResponse200 } from '../models'; +// @ts-ignore +import { GetProjectResponse200 } from '../models'; +// @ts-ignore +import { GetProjectsResponse200 } from '../models'; +// @ts-ignore +import { GetTasksResponse200 } from '../models'; +// @ts-ignore +import { ProjectPutPlanItemBodyObject } from '../models'; +// @ts-ignore +import { UpdateProjectRequest } from '../models'; +// @ts-ignore +import { UpdateProjectResponse200 } from '../models'; +// @ts-ignore +import { UpdatedActivityPlanItem200 } from '../models'; +// @ts-ignore +import { UpdatedTaskPlanItem200 } from '../models'; +/** + * ProjectsApi - axios parameter creator + * @export + */ +export const ProjectsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Adds a new project. 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. + * @summary Add a project + * @param {AddProjectRequest} [AddProjectRequest] + + * @throws {RequiredError} + */ + addProject: async (AddProjectRequest?: AddProjectRequest, ): Promise => { + const localVarPath = `/projects`; + // 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", ["projects:full"], configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + localVarRequestOptions.data = serializeDataIfNeeded(AddProjectRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Archives a project. + * @summary Archive a project + * @param {number} id The ID of the project + + * @throws {RequiredError} + */ + archiveProject: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('archiveProject', 'id', id) + const localVarPath = `/projects/{id}/archive` + .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", ["projects:full"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Marks a project as deleted. + * @summary Delete a project + * @param {number} id The ID of the project + + * @throws {RequiredError} + */ + deleteProject: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteProject', 'id', id) + const localVarPath = `/projects/{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", ["projects: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 project. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of project fields. + * @summary Get details of a project + * @param {number} id The ID of the project + + * @throws {RequiredError} + */ + getProject: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getProject', 'id', id) + const localVarPath = `/projects/{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", ["projects:read", "projects:full"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns activities linked to a specific project. + * @summary Returns project activities + * @param {number} id The ID of the project + + * @throws {RequiredError} + */ + getProjectActivities: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getProjectActivities', 'id', id) + const localVarPath = `/projects/{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", ["projects:read", "projects:full"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns all active groups under a specific project. + * @summary Returns project groups + * @param {number} id The ID of the project + + * @throws {RequiredError} + */ + getProjectGroups: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getProjectGroups', 'id', id) + const localVarPath = `/projects/{id}/groups` + .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", ["projects:read", "projects:full"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns information about items in a project plan. Items consists of tasks and activities and are linked to specific project phase and group. + * @summary Returns project plan + * @param {number} id The ID of the project + + * @throws {RequiredError} + */ + getProjectPlan: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getProjectPlan', 'id', id) + const localVarPath = `/projects/{id}/plan` + .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", ["projects:read", "projects:full"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns tasks linked to a specific project. + * @summary Returns project tasks + * @param {number} id The ID of the project + + * @throws {RequiredError} + */ + getProjectTasks: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getProjectTasks', 'id', id) + const localVarPath = `/projects/{id}/tasks` + .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", ["projects:read", "projects:full"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns all projects. This is a cursor-paginated endpoint. For more information, please refer to our documentation on pagination. + * @summary Get all projects + * @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. + * @param {number} [filter_id] The ID of the filter to use + * @param {string} [status] If supplied, includes only projects with the specified statuses. Possible values are `open`, `completed`, `canceled` and `deleted`. By default `deleted` projects are not returned. + * @param {number} [phase_id] If supplied, only projects in specified phase are returned + * @param {boolean} [include_archived] If supplied with `true` then archived projects are also included in the response. By default only not archived projects are returned. + + * @throws {RequiredError} + */ + getProjects: async (cursor?: string, limit?: number, filter_id?: number, status?: string, phase_id?: number, include_archived?: boolean, ): Promise => { + const localVarPath = `/projects`; + // 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", ["projects:read", "projects:full"], configuration) + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (filter_id !== undefined) { + localVarQueryParameter['filter_id'] = filter_id; + } + + if (status !== undefined) { + localVarQueryParameter['status'] = status; + } + + if (phase_id !== undefined) { + localVarQueryParameter['phase_id'] = phase_id; + } + + if (include_archived !== undefined) { + localVarQueryParameter['include_archived'] = include_archived; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns all projects boards that are not deleted. + * @summary Get all project boards + + * @throws {RequiredError} + */ + getProjectsBoards: async (): Promise => { + const localVarPath = `/projects/boards`; + // 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", ["projects:read", "projects:full"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns all active project phases under a specific board. + * @summary Get project phases + * @param {number} board_id ID of the board for which phases are requested + + * @throws {RequiredError} + */ + getProjectsPhases: async (board_id: number, ): Promise => { + // verify required parameter 'board_id' is not null or undefined + assertParamExists('getProjectsPhases', 'board_id', board_id) + const localVarPath = `/projects/phases`; + // 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", ["projects:read", "projects:full"], configuration) + + if (board_id !== undefined) { + localVarQueryParameter['board_id'] = board_id; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Updates an activity phase or group in a project. + * @summary Update activity in project plan + * @param {number} id The ID of the project + * @param {number} activityId The ID of the activity + * @param {ProjectPutPlanItemBodyObject} [ProjectPutPlanItemBodyObject] + + * @throws {RequiredError} + */ + putProjectPlanActivity: async (id: number, activityId: number, ProjectPutPlanItemBodyObject?: ProjectPutPlanItemBodyObject, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('putProjectPlanActivity', 'id', id) + // verify required parameter 'activityId' is not null or undefined + assertParamExists('putProjectPlanActivity', 'activityId', activityId) + const localVarPath = `/projects/{id}/plan/activities/{activityId}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace(`{${"activityId"}}`, encodeURIComponent(String(activityId))); + // 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", ["projects:full"], configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + localVarRequestOptions.data = serializeDataIfNeeded(ProjectPutPlanItemBodyObject, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Updates a task phase or group in a project. + * @summary Update task in project plan + * @param {number} id The ID of the project + * @param {number} taskId The ID of the task + * @param {ProjectPutPlanItemBodyObject} [ProjectPutPlanItemBodyObject] + + * @throws {RequiredError} + */ + putProjectPlanTask: async (id: number, taskId: number, ProjectPutPlanItemBodyObject?: ProjectPutPlanItemBodyObject, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('putProjectPlanTask', 'id', id) + // verify required parameter 'taskId' is not null or undefined + assertParamExists('putProjectPlanTask', 'taskId', taskId) + const localVarPath = `/projects/{id}/plan/tasks/{taskId}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace(`{${"taskId"}}`, encodeURIComponent(String(taskId))); + // 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", ["projects:full"], configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + localVarRequestOptions.data = serializeDataIfNeeded(ProjectPutPlanItemBodyObject, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Updates a project. + * @summary Update a project + * @param {number} id The ID of the project + * @param {UpdateProjectRequest} [UpdateProjectRequest] + + * @throws {RequiredError} + */ + updateProject: async (id: number, UpdateProjectRequest?: UpdateProjectRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updateProject', 'id', id) + const localVarPath = `/projects/{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", ["projects:full"], configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + localVarRequestOptions.data = serializeDataIfNeeded(UpdateProjectRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ProjectsApi - functional programming interface + * @export + */ +export const ProjectsApiFp = 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 = ProjectsApiAxiosParamCreator(configuration) + return { + /** + * Adds a new project. 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. + * @summary Add a project + * @param {AddProjectRequest} [AddProjectRequest] + + * @throws {RequiredError} + */ + async addProject(AddProjectRequest?: AddProjectRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addProject(AddProjectRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Archives a project. + * @summary Archive a project + * @param {number} id The ID of the project + + * @throws {RequiredError} + */ + async archiveProject(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.archiveProject(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Marks a project as deleted. + * @summary Delete a project + * @param {number} id The ID of the project + + * @throws {RequiredError} + */ + async deleteProject(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteProject(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns the details of a specific project. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of project fields. + * @summary Get details of a project + * @param {number} id The ID of the project + + * @throws {RequiredError} + */ + async getProject(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProject(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns activities linked to a specific project. + * @summary Returns project activities + * @param {number} id The ID of the project + + * @throws {RequiredError} + */ + async getProjectActivities(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProjectActivities(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns all active groups under a specific project. + * @summary Returns project groups + * @param {number} id The ID of the project + + * @throws {RequiredError} + */ + async getProjectGroups(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProjectGroups(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns information about items in a project plan. Items consists of tasks and activities and are linked to specific project phase and group. + * @summary Returns project plan + * @param {number} id The ID of the project + + * @throws {RequiredError} + */ + async getProjectPlan(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProjectPlan(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns tasks linked to a specific project. + * @summary Returns project tasks + * @param {number} id The ID of the project + + * @throws {RequiredError} + */ + async getProjectTasks(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProjectTasks(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns all projects. This is a cursor-paginated endpoint. For more information, please refer to our documentation on pagination. + * @summary Get all projects + * @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. + * @param {number} [filter_id] The ID of the filter to use + * @param {string} [status] If supplied, includes only projects with the specified statuses. Possible values are `open`, `completed`, `canceled` and `deleted`. By default `deleted` projects are not returned. + * @param {number} [phase_id] If supplied, only projects in specified phase are returned + * @param {boolean} [include_archived] If supplied with `true` then archived projects are also included in the response. By default only not archived projects are returned. + + * @throws {RequiredError} + */ + async getProjects(cursor?: string, limit?: number, filter_id?: number, status?: string, phase_id?: number, include_archived?: boolean, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProjects(cursor, limit, filter_id, status, phase_id, include_archived, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns all projects boards that are not deleted. + * @summary Get all project boards + + * @throws {RequiredError} + */ + async getProjectsBoards(): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProjectsBoards(); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns all active project phases under a specific board. + * @summary Get project phases + * @param {number} board_id ID of the board for which phases are requested + + * @throws {RequiredError} + */ + async getProjectsPhases(board_id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProjectsPhases(board_id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates an activity phase or group in a project. + * @summary Update activity in project plan + * @param {number} id The ID of the project + * @param {number} activityId The ID of the activity + * @param {ProjectPutPlanItemBodyObject} [ProjectPutPlanItemBodyObject] + + * @throws {RequiredError} + */ + async putProjectPlanActivity(id: number, activityId: number, ProjectPutPlanItemBodyObject?: ProjectPutPlanItemBodyObject, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.putProjectPlanActivity(id, activityId, ProjectPutPlanItemBodyObject, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates a task phase or group in a project. + * @summary Update task in project plan + * @param {number} id The ID of the project + * @param {number} taskId The ID of the task + * @param {ProjectPutPlanItemBodyObject} [ProjectPutPlanItemBodyObject] + + * @throws {RequiredError} + */ + async putProjectPlanTask(id: number, taskId: number, ProjectPutPlanItemBodyObject?: ProjectPutPlanItemBodyObject, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.putProjectPlanTask(id, taskId, ProjectPutPlanItemBodyObject, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates a project. + * @summary Update a project + * @param {number} id The ID of the project + * @param {UpdateProjectRequest} [UpdateProjectRequest] + + * @throws {RequiredError} + */ + async updateProject(id: number, UpdateProjectRequest?: UpdateProjectRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateProject(id, UpdateProjectRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * ProjectsApi - factory interface + * @export + */ +export const ProjectsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ProjectsApiFp(configuration) + return { + /** + * Adds a new project. 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. + * @summary Add a project + * @param {ProjectsApiAddProjectRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addProject(requestParameters: ProjectsApiAddProjectRequest = {}, ): Promise { + return localVarFp.addProject(requestParameters.AddProjectRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Archives a project. + * @summary Archive a project + * @param {ProjectsApiArchiveProjectRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + archiveProject(requestParameters: ProjectsApiArchiveProjectRequest, ): Promise { + return localVarFp.archiveProject(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Marks a project as deleted. + * @summary Delete a project + * @param {ProjectsApiDeleteProjectRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteProject(requestParameters: ProjectsApiDeleteProjectRequest, ): Promise { + return localVarFp.deleteProject(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns the details of a specific project. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of project fields. + * @summary Get details of a project + * @param {ProjectsApiGetProjectRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getProject(requestParameters: ProjectsApiGetProjectRequest, ): Promise { + return localVarFp.getProject(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns activities linked to a specific project. + * @summary Returns project activities + * @param {ProjectsApiGetProjectActivitiesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getProjectActivities(requestParameters: ProjectsApiGetProjectActivitiesRequest, ): Promise { + return localVarFp.getProjectActivities(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns all active groups under a specific project. + * @summary Returns project groups + * @param {ProjectsApiGetProjectGroupsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getProjectGroups(requestParameters: ProjectsApiGetProjectGroupsRequest, ): Promise { + return localVarFp.getProjectGroups(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns information about items in a project plan. Items consists of tasks and activities and are linked to specific project phase and group. + * @summary Returns project plan + * @param {ProjectsApiGetProjectPlanRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getProjectPlan(requestParameters: ProjectsApiGetProjectPlanRequest, ): Promise { + return localVarFp.getProjectPlan(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns tasks linked to a specific project. + * @summary Returns project tasks + * @param {ProjectsApiGetProjectTasksRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getProjectTasks(requestParameters: ProjectsApiGetProjectTasksRequest, ): Promise { + return localVarFp.getProjectTasks(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns all projects. This is a cursor-paginated endpoint. For more information, please refer to our documentation on pagination. + * @summary Get all projects + * @param {ProjectsApiGetProjectsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getProjects(requestParameters: ProjectsApiGetProjectsRequest = {}, ): Promise { + return localVarFp.getProjects(requestParameters.cursor, requestParameters.limit, requestParameters.filter_id, requestParameters.status, requestParameters.phase_id, requestParameters.include_archived, ).then((request) => request(axios, basePath)); + }, + /** + * Returns all projects boards that are not deleted. + * @summary Get all project boards + + * @throws {RequiredError} + */ + getProjectsBoards(): Promise { + return localVarFp.getProjectsBoards().then((request) => request(axios, basePath)); + }, + /** + * Returns all active project phases under a specific board. + * @summary Get project phases + * @param {ProjectsApiGetProjectsPhasesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getProjectsPhases(requestParameters: ProjectsApiGetProjectsPhasesRequest, ): Promise { + return localVarFp.getProjectsPhases(requestParameters.board_id, ).then((request) => request(axios, basePath)); + }, + /** + * Updates an activity phase or group in a project. + * @summary Update activity in project plan + * @param {ProjectsApiPutProjectPlanActivityRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + putProjectPlanActivity(requestParameters: ProjectsApiPutProjectPlanActivityRequest, ): Promise { + return localVarFp.putProjectPlanActivity(requestParameters.id, requestParameters.activityId, requestParameters.ProjectPutPlanItemBodyObject, ).then((request) => request(axios, basePath)); + }, + /** + * Updates a task phase or group in a project. + * @summary Update task in project plan + * @param {ProjectsApiPutProjectPlanTaskRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + putProjectPlanTask(requestParameters: ProjectsApiPutProjectPlanTaskRequest, ): Promise { + return localVarFp.putProjectPlanTask(requestParameters.id, requestParameters.taskId, requestParameters.ProjectPutPlanItemBodyObject, ).then((request) => request(axios, basePath)); + }, + /** + * Updates a project. + * @summary Update a project + * @param {ProjectsApiUpdateProjectRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + updateProject(requestParameters: ProjectsApiUpdateProjectRequest, ): Promise { + return localVarFp.updateProject(requestParameters.id, requestParameters.UpdateProjectRequest, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for addProject operation in ProjectsApi. + * @export + * @interface ProjectsApiAddProjectRequest + */ +export interface ProjectsApiAddProjectRequest { + /** + * + * @type {AddProjectRequest} + * @memberof ProjectsApiAddProject + */ + readonly AddProjectRequest?: AddProjectRequest +} + +/** + * Request parameters for archiveProject operation in ProjectsApi. + * @export + * @interface ProjectsApiArchiveProjectRequest + */ +export interface ProjectsApiArchiveProjectRequest { + /** + * The ID of the project + * @type {number} + * @memberof ProjectsApiArchiveProject + */ + readonly id: number +} + +/** + * Request parameters for deleteProject operation in ProjectsApi. + * @export + * @interface ProjectsApiDeleteProjectRequest + */ +export interface ProjectsApiDeleteProjectRequest { + /** + * The ID of the project + * @type {number} + * @memberof ProjectsApiDeleteProject + */ + readonly id: number +} + +/** + * Request parameters for getProject operation in ProjectsApi. + * @export + * @interface ProjectsApiGetProjectRequest + */ +export interface ProjectsApiGetProjectRequest { + /** + * The ID of the project + * @type {number} + * @memberof ProjectsApiGetProject + */ + readonly id: number +} + +/** + * Request parameters for getProjectActivities operation in ProjectsApi. + * @export + * @interface ProjectsApiGetProjectActivitiesRequest + */ +export interface ProjectsApiGetProjectActivitiesRequest { + /** + * The ID of the project + * @type {number} + * @memberof ProjectsApiGetProjectActivities + */ + readonly id: number +} + +/** + * Request parameters for getProjectGroups operation in ProjectsApi. + * @export + * @interface ProjectsApiGetProjectGroupsRequest + */ +export interface ProjectsApiGetProjectGroupsRequest { + /** + * The ID of the project + * @type {number} + * @memberof ProjectsApiGetProjectGroups + */ + readonly id: number +} + +/** + * Request parameters for getProjectPlan operation in ProjectsApi. + * @export + * @interface ProjectsApiGetProjectPlanRequest + */ +export interface ProjectsApiGetProjectPlanRequest { + /** + * The ID of the project + * @type {number} + * @memberof ProjectsApiGetProjectPlan + */ + readonly id: number +} + +/** + * Request parameters for getProjectTasks operation in ProjectsApi. + * @export + * @interface ProjectsApiGetProjectTasksRequest + */ +export interface ProjectsApiGetProjectTasksRequest { + /** + * The ID of the project + * @type {number} + * @memberof ProjectsApiGetProjectTasks + */ + readonly id: number +} + +/** + * Request parameters for getProjects operation in ProjectsApi. + * @export + * @interface ProjectsApiGetProjectsRequest + */ +export interface ProjectsApiGetProjectsRequest { + /** + * For pagination, the marker (an opaque string value) representing the first item on the next page + * @type {string} + * @memberof ProjectsApiGetProjects + */ + readonly cursor?: string + + /** + * For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. + * @type {number} + * @memberof ProjectsApiGetProjects + */ + readonly limit?: number + + /** + * The ID of the filter to use + * @type {number} + * @memberof ProjectsApiGetProjects + */ + readonly filter_id?: number + + /** + * If supplied, includes only projects with the specified statuses. Possible values are `open`, `completed`, `canceled` and `deleted`. By default `deleted` projects are not returned. + * @type {string} + * @memberof ProjectsApiGetProjects + */ + readonly status?: string + + /** + * If supplied, only projects in specified phase are returned + * @type {number} + * @memberof ProjectsApiGetProjects + */ + readonly phase_id?: number + + /** + * If supplied with `true` then archived projects are also included in the response. By default only not archived projects are returned. + * @type {boolean} + * @memberof ProjectsApiGetProjects + */ + readonly include_archived?: boolean +} + +/** + * Request parameters for getProjectsPhases operation in ProjectsApi. + * @export + * @interface ProjectsApiGetProjectsPhasesRequest + */ +export interface ProjectsApiGetProjectsPhasesRequest { + /** + * ID of the board for which phases are requested + * @type {number} + * @memberof ProjectsApiGetProjectsPhases + */ + readonly board_id: number +} + +/** + * Request parameters for putProjectPlanActivity operation in ProjectsApi. + * @export + * @interface ProjectsApiPutProjectPlanActivityRequest + */ +export interface ProjectsApiPutProjectPlanActivityRequest { + /** + * The ID of the project + * @type {number} + * @memberof ProjectsApiPutProjectPlanActivity + */ + readonly id: number + + /** + * The ID of the activity + * @type {number} + * @memberof ProjectsApiPutProjectPlanActivity + */ + readonly activityId: number + + /** + * + * @type {ProjectPutPlanItemBodyObject} + * @memberof ProjectsApiPutProjectPlanActivity + */ + readonly ProjectPutPlanItemBodyObject?: ProjectPutPlanItemBodyObject +} + +/** + * Request parameters for putProjectPlanTask operation in ProjectsApi. + * @export + * @interface ProjectsApiPutProjectPlanTaskRequest + */ +export interface ProjectsApiPutProjectPlanTaskRequest { + /** + * The ID of the project + * @type {number} + * @memberof ProjectsApiPutProjectPlanTask + */ + readonly id: number + + /** + * The ID of the task + * @type {number} + * @memberof ProjectsApiPutProjectPlanTask + */ + readonly taskId: number + + /** + * + * @type {ProjectPutPlanItemBodyObject} + * @memberof ProjectsApiPutProjectPlanTask + */ + readonly ProjectPutPlanItemBodyObject?: ProjectPutPlanItemBodyObject +} + +/** + * Request parameters for updateProject operation in ProjectsApi. + * @export + * @interface ProjectsApiUpdateProjectRequest + */ +export interface ProjectsApiUpdateProjectRequest { + /** + * The ID of the project + * @type {number} + * @memberof ProjectsApiUpdateProject + */ + readonly id: number + + /** + * + * @type {UpdateProjectRequest} + * @memberof ProjectsApiUpdateProject + */ + readonly UpdateProjectRequest?: UpdateProjectRequest +} + +/** + * ProjectsApi - object-oriented interface + * @export + * @class ProjectsApi + * @extends {BaseAPI} + */ +export class ProjectsApi extends BaseAPI { + /** + * Adds a new project. 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. + * @summary Add a project + * @param {ProjectsApiAddProjectRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProjectsApi + */ + public addProject(requestParameters: ProjectsApiAddProjectRequest = {}, ) { + return ProjectsApiFp(this.configuration).addProject(requestParameters.AddProjectRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Archives a project. + * @summary Archive a project + * @param {ProjectsApiArchiveProjectRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProjectsApi + */ + public archiveProject(requestParameters: ProjectsApiArchiveProjectRequest, ) { + return ProjectsApiFp(this.configuration).archiveProject(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Marks a project as deleted. + * @summary Delete a project + * @param {ProjectsApiDeleteProjectRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProjectsApi + */ + public deleteProject(requestParameters: ProjectsApiDeleteProjectRequest, ) { + return ProjectsApiFp(this.configuration).deleteProject(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the details of a specific project. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of project fields. + * @summary Get details of a project + * @param {ProjectsApiGetProjectRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProjectsApi + */ + public getProject(requestParameters: ProjectsApiGetProjectRequest, ) { + return ProjectsApiFp(this.configuration).getProject(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns activities linked to a specific project. + * @summary Returns project activities + * @param {ProjectsApiGetProjectActivitiesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProjectsApi + */ + public getProjectActivities(requestParameters: ProjectsApiGetProjectActivitiesRequest, ) { + return ProjectsApiFp(this.configuration).getProjectActivities(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns all active groups under a specific project. + * @summary Returns project groups + * @param {ProjectsApiGetProjectGroupsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProjectsApi + */ + public getProjectGroups(requestParameters: ProjectsApiGetProjectGroupsRequest, ) { + return ProjectsApiFp(this.configuration).getProjectGroups(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns information about items in a project plan. Items consists of tasks and activities and are linked to specific project phase and group. + * @summary Returns project plan + * @param {ProjectsApiGetProjectPlanRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProjectsApi + */ + public getProjectPlan(requestParameters: ProjectsApiGetProjectPlanRequest, ) { + return ProjectsApiFp(this.configuration).getProjectPlan(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns tasks linked to a specific project. + * @summary Returns project tasks + * @param {ProjectsApiGetProjectTasksRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProjectsApi + */ + public getProjectTasks(requestParameters: ProjectsApiGetProjectTasksRequest, ) { + return ProjectsApiFp(this.configuration).getProjectTasks(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns all projects. This is a cursor-paginated endpoint. For more information, please refer to our documentation on pagination. + * @summary Get all projects + * @param {ProjectsApiGetProjectsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProjectsApi + */ + public getProjects(requestParameters: ProjectsApiGetProjectsRequest = {}, ) { + return ProjectsApiFp(this.configuration).getProjects(requestParameters.cursor, requestParameters.limit, requestParameters.filter_id, requestParameters.status, requestParameters.phase_id, requestParameters.include_archived, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns all projects boards that are not deleted. + * @summary Get all project boards + + * @throws {RequiredError} + * @memberof ProjectsApi + */ + public getProjectsBoards() { + return ProjectsApiFp(this.configuration).getProjectsBoards().then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns all active project phases under a specific board. + * @summary Get project phases + * @param {ProjectsApiGetProjectsPhasesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProjectsApi + */ + public getProjectsPhases(requestParameters: ProjectsApiGetProjectsPhasesRequest, ) { + return ProjectsApiFp(this.configuration).getProjectsPhases(requestParameters.board_id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates an activity phase or group in a project. + * @summary Update activity in project plan + * @param {ProjectsApiPutProjectPlanActivityRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProjectsApi + */ + public putProjectPlanActivity(requestParameters: ProjectsApiPutProjectPlanActivityRequest, ) { + return ProjectsApiFp(this.configuration).putProjectPlanActivity(requestParameters.id, requestParameters.activityId, requestParameters.ProjectPutPlanItemBodyObject, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates a task phase or group in a project. + * @summary Update task in project plan + * @param {ProjectsApiPutProjectPlanTaskRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProjectsApi + */ + public putProjectPlanTask(requestParameters: ProjectsApiPutProjectPlanTaskRequest, ) { + return ProjectsApiFp(this.configuration).putProjectPlanTask(requestParameters.id, requestParameters.taskId, requestParameters.ProjectPutPlanItemBodyObject, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates a project. + * @summary Update a project + * @param {ProjectsApiUpdateProjectRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof ProjectsApi + */ + public updateProject(requestParameters: ProjectsApiUpdateProjectRequest, ) { + return ProjectsApiFp(this.configuration).updateProject(requestParameters.id, requestParameters.UpdateProjectRequest, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/recents-api.ts b/api/recents-api.ts new file mode 100644 index 00000000..a03899e6 --- /dev/null +++ b/api/recents-api.ts @@ -0,0 +1,215 @@ +/* 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 { GetRecentsResponse200 } from '../models'; +/** + * RecentsApi - axios parameter creator + * @export + */ +export const RecentsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Returns data about all recent changes occurred after the given timestamp. + * @summary Get recents + * @param {string} since_timestamp The timestamp in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @param {'activity' | 'activityType' | 'deal' | 'file' | 'filter' | 'note' | 'person' | 'organization' | 'pipeline' | 'product' | 'stage' | 'user'} [items] Multiple selection of item types to include in the query (optional) + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + getRecents: async (since_timestamp: string, items?: 'activity' | 'activityType' | 'deal' | 'file' | 'filter' | 'note' | 'person' | 'organization' | 'pipeline' | 'product' | 'stage' | 'user', start?: number, limit?: number, ): Promise => { + // verify required parameter 'since_timestamp' is not null or undefined + assertParamExists('getRecents', 'since_timestamp', since_timestamp) + const localVarPath = `/recents`; + // 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", "search:read"], configuration) + + if (since_timestamp !== undefined) { + localVarQueryParameter['since_timestamp'] = since_timestamp; + } + + if (items !== undefined) { + localVarQueryParameter['items'] = items; + } + + 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, + }; + }, + } +}; + +/** + * RecentsApi - functional programming interface + * @export + */ +export const RecentsApiFp = 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 = RecentsApiAxiosParamCreator(configuration) + return { + /** + * Returns data about all recent changes occurred after the given timestamp. + * @summary Get recents + * @param {string} since_timestamp The timestamp in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @param {'activity' | 'activityType' | 'deal' | 'file' | 'filter' | 'note' | 'person' | 'organization' | 'pipeline' | 'product' | 'stage' | 'user'} [items] Multiple selection of item types to include in the query (optional) + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + async getRecents(since_timestamp: string, items?: 'activity' | 'activityType' | 'deal' | 'file' | 'filter' | 'note' | 'person' | 'organization' | 'pipeline' | 'product' | 'stage' | 'user', start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getRecents(since_timestamp, items, start, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * RecentsApi - factory interface + * @export + */ +export const RecentsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = RecentsApiFp(configuration) + return { + /** + * Returns data about all recent changes occurred after the given timestamp. + * @summary Get recents + * @param {RecentsApiGetRecentsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getRecents(requestParameters: RecentsApiGetRecentsRequest, ): Promise { + return localVarFp.getRecents(requestParameters.since_timestamp, requestParameters.items, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getRecents operation in RecentsApi. + * @export + * @interface RecentsApiGetRecentsRequest + */ +export interface RecentsApiGetRecentsRequest { + /** + * The timestamp in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof RecentsApiGetRecents + */ + readonly since_timestamp: string + + /** + * Multiple selection of item types to include in the query (optional) + * @type {'activity' | 'activityType' | 'deal' | 'file' | 'filter' | 'note' | 'person' | 'organization' | 'pipeline' | 'product' | 'stage' | 'user'} + * @memberof RecentsApiGetRecents + */ + readonly items?: 'activity' | 'activityType' | 'deal' | 'file' | 'filter' | 'note' | 'person' | 'organization' | 'pipeline' | 'product' | 'stage' | 'user' + + /** + * Pagination start + * @type {number} + * @memberof RecentsApiGetRecents + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof RecentsApiGetRecents + */ + readonly limit?: number +} + +/** + * RecentsApi - object-oriented interface + * @export + * @class RecentsApi + * @extends {BaseAPI} + */ +export class RecentsApi extends BaseAPI { + /** + * Returns data about all recent changes occurred after the given timestamp. + * @summary Get recents + * @param {RecentsApiGetRecentsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof RecentsApi + */ + public getRecents(requestParameters: RecentsApiGetRecentsRequest, ) { + return RecentsApiFp(this.configuration).getRecents(requestParameters.since_timestamp, requestParameters.items, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/roles-api.ts b/api/roles-api.ts new file mode 100644 index 00000000..ca328d05 --- /dev/null +++ b/api/roles-api.ts @@ -0,0 +1,1286 @@ +/* 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 { AddOrUpdateRoleSettingRequest } from '../models'; +// @ts-ignore +import { AddOrUpdateRoleSettingResponse200 } from '../models'; +// @ts-ignore +import { AddRoleAssignmentRequest } from '../models'; +// @ts-ignore +import { AddRoleAssignmentResponse200 } from '../models'; +// @ts-ignore +import { AddRoleRequest } from '../models'; +// @ts-ignore +import { AddRoleResponse200 } from '../models'; +// @ts-ignore +import { BaseRoleRequest } from '../models'; +// @ts-ignore +import { DeleteRoleAssignmentRequest } from '../models'; +// @ts-ignore +import { DeleteRoleAssignmentResponse200 } from '../models'; +// @ts-ignore +import { DeleteRoleResponse200 } from '../models'; +// @ts-ignore +import { GetRolePipelines200 } from '../models'; +// @ts-ignore +import { GetRoleResponse200 } from '../models'; +// @ts-ignore +import { GetRoleSettingsResponse200 } from '../models'; +// @ts-ignore +import { GetRolesResponse200 } from '../models'; +// @ts-ignore +import { GetUserRoleAssignmentsResponse200 } from '../models'; +// @ts-ignore +import { PutRolePipelinesBody } from '../models'; +// @ts-ignore +import { UpdateRoleResponse200 } from '../models'; +/** + * RolesApi - axios parameter creator + * @export + */ +export const RolesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Adds or updates the visibility setting for a role. + * @summary Add or update role setting + * @param {number} id The ID of the role + * @param {AddOrUpdateRoleSettingRequest} [AddOrUpdateRoleSettingRequest] + + * @throws {RequiredError} + */ + addOrUpdateRoleSetting: async (id: number, AddOrUpdateRoleSettingRequest?: AddOrUpdateRoleSettingRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('addOrUpdateRoleSetting', 'id', id) + const localVarPath = `/roles/{id}/settings` + .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", ["admin"], configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + localVarRequestOptions.data = serializeDataIfNeeded(AddOrUpdateRoleSettingRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Adds a new role. + * @summary Add a role + * @param {AddRoleRequest} [AddRoleRequest] + + * @throws {RequiredError} + */ + addRole: async (AddRoleRequest?: AddRoleRequest, ): Promise => { + const localVarPath = `/roles`; + // 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(AddRoleRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Assigns a user to a role. + * @summary Add role assignment + * @param {number} id The ID of the role + * @param {AddRoleAssignmentRequest} [AddRoleAssignmentRequest] + + * @throws {RequiredError} + */ + addRoleAssignment: async (id: number, AddRoleAssignmentRequest?: AddRoleAssignmentRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('addRoleAssignment', 'id', id) + const localVarPath = `/roles/{id}/assignments` + .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", ["admin"], configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + localVarRequestOptions.data = serializeDataIfNeeded(AddRoleAssignmentRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Marks a role as deleted. + * @summary Delete a role + * @param {number} id The ID of the role + + * @throws {RequiredError} + */ + deleteRole: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteRole', 'id', id) + const localVarPath = `/roles/{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, + }; + }, + /** + * Removes the assigned user from a role and adds to the default role. + * @summary Delete a role assignment + * @param {number} id The ID of the role + * @param {DeleteRoleAssignmentRequest} [DeleteRoleAssignmentRequest] + + * @throws {RequiredError} + */ + deleteRoleAssignment: async (id: number, DeleteRoleAssignmentRequest?: DeleteRoleAssignmentRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteRoleAssignment', 'id', id) + const localVarPath = `/roles/{id}/assignments` + .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) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + localVarRequestOptions.data = serializeDataIfNeeded(DeleteRoleAssignmentRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns the details of a specific role. + * @summary Get one role + * @param {number} id The ID of the role + + * @throws {RequiredError} + */ + getRole: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getRole', 'id', id) + const localVarPath = `/roles/{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", ["admin"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns all users assigned to a role. + * @summary List role assignments + * @param {number} id The ID of the role + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + getRoleAssignments: async (id: number, start?: number, limit?: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getRoleAssignments', 'id', id) + const localVarPath = `/roles/{id}/assignments` + .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", ["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, + }; + }, + /** + * Returns the list of either visible or hidden pipeline IDs for a specific role. For more information on pipeline visibility, please refer to the Visibility groups article. + * @summary List pipeline visibility for a role + * @param {number} id The ID of the role + * @param {boolean} [visible] Whether to return the visible or hidden pipelines for the role + + * @throws {RequiredError} + */ + getRolePipelines: async (id: number, visible?: boolean, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getRolePipelines', 'id', id) + const localVarPath = `/roles/{id}/pipelines` + .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", ["admin"], configuration) + + if (visible !== undefined) { + localVarQueryParameter['visible'] = visible; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns the visibility settings of a specific role. + * @summary List role settings + * @param {number} id The ID of the role + + * @throws {RequiredError} + */ + getRoleSettings: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getRoleSettings', 'id', id) + const localVarPath = `/roles/{id}/settings` + .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", ["admin"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns all the roles within the company. + * @summary Get all roles + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + getRoles: async (start?: number, limit?: number, ): Promise => { + const localVarPath = `/roles`; + // 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", ["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 the parent role and/or the name of a specific role. + * @summary Update role details + * @param {number} id The ID of the role + * @param {BaseRoleRequest} [BaseRoleRequest] + + * @throws {RequiredError} + */ + updateRole: async (id: number, BaseRoleRequest?: BaseRoleRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updateRole', 'id', id) + const localVarPath = `/roles/{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(BaseRoleRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Updates the specified pipelines to be visible and/or hidden for a specific role. For more information on pipeline visibility, please refer to the Visibility groups article. + * @summary Update pipeline visibility for a role + * @param {number} id The ID of the role + * @param {PutRolePipelinesBody} [PutRolePipelinesBody] + + * @throws {RequiredError} + */ + updateRolePipelines: async (id: number, PutRolePipelinesBody?: PutRolePipelinesBody, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updateRolePipelines', 'id', id) + const localVarPath = `/roles/{id}/pipelines` + .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(PutRolePipelinesBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * RolesApi - functional programming interface + * @export + */ +export const RolesApiFp = 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 = RolesApiAxiosParamCreator(configuration) + return { + /** + * Adds or updates the visibility setting for a role. + * @summary Add or update role setting + * @param {number} id The ID of the role + * @param {AddOrUpdateRoleSettingRequest} [AddOrUpdateRoleSettingRequest] + + * @throws {RequiredError} + */ + async addOrUpdateRoleSetting(id: number, AddOrUpdateRoleSettingRequest?: AddOrUpdateRoleSettingRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addOrUpdateRoleSetting(id, AddOrUpdateRoleSettingRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Adds a new role. + * @summary Add a role + * @param {AddRoleRequest} [AddRoleRequest] + + * @throws {RequiredError} + */ + async addRole(AddRoleRequest?: AddRoleRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addRole(AddRoleRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Assigns a user to a role. + * @summary Add role assignment + * @param {number} id The ID of the role + * @param {AddRoleAssignmentRequest} [AddRoleAssignmentRequest] + + * @throws {RequiredError} + */ + async addRoleAssignment(id: number, AddRoleAssignmentRequest?: AddRoleAssignmentRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addRoleAssignment(id, AddRoleAssignmentRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Marks a role as deleted. + * @summary Delete a role + * @param {number} id The ID of the role + + * @throws {RequiredError} + */ + async deleteRole(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRole(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Removes the assigned user from a role and adds to the default role. + * @summary Delete a role assignment + * @param {number} id The ID of the role + * @param {DeleteRoleAssignmentRequest} [DeleteRoleAssignmentRequest] + + * @throws {RequiredError} + */ + async deleteRoleAssignment(id: number, DeleteRoleAssignmentRequest?: DeleteRoleAssignmentRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRoleAssignment(id, DeleteRoleAssignmentRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns the details of a specific role. + * @summary Get one role + * @param {number} id The ID of the role + + * @throws {RequiredError} + */ + async getRole(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getRole(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns all users assigned to a role. + * @summary List role assignments + * @param {number} id The ID of the role + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + async getRoleAssignments(id: number, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getRoleAssignments(id, start, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns the list of either visible or hidden pipeline IDs for a specific role. For more information on pipeline visibility, please refer to the Visibility groups article. + * @summary List pipeline visibility for a role + * @param {number} id The ID of the role + * @param {boolean} [visible] Whether to return the visible or hidden pipelines for the role + + * @throws {RequiredError} + */ + async getRolePipelines(id: number, visible?: boolean, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getRolePipelines(id, visible, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns the visibility settings of a specific role. + * @summary List role settings + * @param {number} id The ID of the role + + * @throws {RequiredError} + */ + async getRoleSettings(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getRoleSettings(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns all the roles within the company. + * @summary Get all roles + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + async getRoles(start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getRoles(start, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates the parent role and/or the name of a specific role. + * @summary Update role details + * @param {number} id The ID of the role + * @param {BaseRoleRequest} [BaseRoleRequest] + + * @throws {RequiredError} + */ + async updateRole(id: number, BaseRoleRequest?: BaseRoleRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateRole(id, BaseRoleRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates the specified pipelines to be visible and/or hidden for a specific role. For more information on pipeline visibility, please refer to the Visibility groups article. + * @summary Update pipeline visibility for a role + * @param {number} id The ID of the role + * @param {PutRolePipelinesBody} [PutRolePipelinesBody] + + * @throws {RequiredError} + */ + async updateRolePipelines(id: number, PutRolePipelinesBody?: PutRolePipelinesBody, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateRolePipelines(id, PutRolePipelinesBody, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * RolesApi - factory interface + * @export + */ +export const RolesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = RolesApiFp(configuration) + return { + /** + * Adds or updates the visibility setting for a role. + * @summary Add or update role setting + * @param {RolesApiAddOrUpdateRoleSettingRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addOrUpdateRoleSetting(requestParameters: RolesApiAddOrUpdateRoleSettingRequest, ): Promise { + return localVarFp.addOrUpdateRoleSetting(requestParameters.id, requestParameters.AddOrUpdateRoleSettingRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Adds a new role. + * @summary Add a role + * @param {RolesApiAddRoleRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addRole(requestParameters: RolesApiAddRoleRequest = {}, ): Promise { + return localVarFp.addRole(requestParameters.AddRoleRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Assigns a user to a role. + * @summary Add role assignment + * @param {RolesApiAddRoleAssignmentRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addRoleAssignment(requestParameters: RolesApiAddRoleAssignmentRequest, ): Promise { + return localVarFp.addRoleAssignment(requestParameters.id, requestParameters.AddRoleAssignmentRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Marks a role as deleted. + * @summary Delete a role + * @param {RolesApiDeleteRoleRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteRole(requestParameters: RolesApiDeleteRoleRequest, ): Promise { + return localVarFp.deleteRole(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Removes the assigned user from a role and adds to the default role. + * @summary Delete a role assignment + * @param {RolesApiDeleteRoleAssignmentRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteRoleAssignment(requestParameters: RolesApiDeleteRoleAssignmentRequest, ): Promise { + return localVarFp.deleteRoleAssignment(requestParameters.id, requestParameters.DeleteRoleAssignmentRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Returns the details of a specific role. + * @summary Get one role + * @param {RolesApiGetRoleRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getRole(requestParameters: RolesApiGetRoleRequest, ): Promise { + return localVarFp.getRole(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns all users assigned to a role. + * @summary List role assignments + * @param {RolesApiGetRoleAssignmentsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getRoleAssignments(requestParameters: RolesApiGetRoleAssignmentsRequest, ): Promise { + return localVarFp.getRoleAssignments(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + /** + * Returns the list of either visible or hidden pipeline IDs for a specific role. For more information on pipeline visibility, please refer to the Visibility groups article. + * @summary List pipeline visibility for a role + * @param {RolesApiGetRolePipelinesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getRolePipelines(requestParameters: RolesApiGetRolePipelinesRequest, ): Promise { + return localVarFp.getRolePipelines(requestParameters.id, requestParameters.visible, ).then((request) => request(axios, basePath)); + }, + /** + * Returns the visibility settings of a specific role. + * @summary List role settings + * @param {RolesApiGetRoleSettingsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getRoleSettings(requestParameters: RolesApiGetRoleSettingsRequest, ): Promise { + return localVarFp.getRoleSettings(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns all the roles within the company. + * @summary Get all roles + * @param {RolesApiGetRolesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getRoles(requestParameters: RolesApiGetRolesRequest = {}, ): Promise { + return localVarFp.getRoles(requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + /** + * Updates the parent role and/or the name of a specific role. + * @summary Update role details + * @param {RolesApiUpdateRoleRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + updateRole(requestParameters: RolesApiUpdateRoleRequest, ): Promise { + return localVarFp.updateRole(requestParameters.id, requestParameters.BaseRoleRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Updates the specified pipelines to be visible and/or hidden for a specific role. For more information on pipeline visibility, please refer to the Visibility groups article. + * @summary Update pipeline visibility for a role + * @param {RolesApiUpdateRolePipelinesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + updateRolePipelines(requestParameters: RolesApiUpdateRolePipelinesRequest, ): Promise { + return localVarFp.updateRolePipelines(requestParameters.id, requestParameters.PutRolePipelinesBody, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for addOrUpdateRoleSetting operation in RolesApi. + * @export + * @interface RolesApiAddOrUpdateRoleSettingRequest + */ +export interface RolesApiAddOrUpdateRoleSettingRequest { + /** + * The ID of the role + * @type {number} + * @memberof RolesApiAddOrUpdateRoleSetting + */ + readonly id: number + + /** + * + * @type {AddOrUpdateRoleSettingRequest} + * @memberof RolesApiAddOrUpdateRoleSetting + */ + readonly AddOrUpdateRoleSettingRequest?: AddOrUpdateRoleSettingRequest +} + +/** + * Request parameters for addRole operation in RolesApi. + * @export + * @interface RolesApiAddRoleRequest + */ +export interface RolesApiAddRoleRequest { + /** + * + * @type {AddRoleRequest} + * @memberof RolesApiAddRole + */ + readonly AddRoleRequest?: AddRoleRequest +} + +/** + * Request parameters for addRoleAssignment operation in RolesApi. + * @export + * @interface RolesApiAddRoleAssignmentRequest + */ +export interface RolesApiAddRoleAssignmentRequest { + /** + * The ID of the role + * @type {number} + * @memberof RolesApiAddRoleAssignment + */ + readonly id: number + + /** + * + * @type {AddRoleAssignmentRequest} + * @memberof RolesApiAddRoleAssignment + */ + readonly AddRoleAssignmentRequest?: AddRoleAssignmentRequest +} + +/** + * Request parameters for deleteRole operation in RolesApi. + * @export + * @interface RolesApiDeleteRoleRequest + */ +export interface RolesApiDeleteRoleRequest { + /** + * The ID of the role + * @type {number} + * @memberof RolesApiDeleteRole + */ + readonly id: number +} + +/** + * Request parameters for deleteRoleAssignment operation in RolesApi. + * @export + * @interface RolesApiDeleteRoleAssignmentRequest + */ +export interface RolesApiDeleteRoleAssignmentRequest { + /** + * The ID of the role + * @type {number} + * @memberof RolesApiDeleteRoleAssignment + */ + readonly id: number + + /** + * + * @type {DeleteRoleAssignmentRequest} + * @memberof RolesApiDeleteRoleAssignment + */ + readonly DeleteRoleAssignmentRequest?: DeleteRoleAssignmentRequest +} + +/** + * Request parameters for getRole operation in RolesApi. + * @export + * @interface RolesApiGetRoleRequest + */ +export interface RolesApiGetRoleRequest { + /** + * The ID of the role + * @type {number} + * @memberof RolesApiGetRole + */ + readonly id: number +} + +/** + * Request parameters for getRoleAssignments operation in RolesApi. + * @export + * @interface RolesApiGetRoleAssignmentsRequest + */ +export interface RolesApiGetRoleAssignmentsRequest { + /** + * The ID of the role + * @type {number} + * @memberof RolesApiGetRoleAssignments + */ + readonly id: number + + /** + * Pagination start + * @type {number} + * @memberof RolesApiGetRoleAssignments + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof RolesApiGetRoleAssignments + */ + readonly limit?: number +} + +/** + * Request parameters for getRolePipelines operation in RolesApi. + * @export + * @interface RolesApiGetRolePipelinesRequest + */ +export interface RolesApiGetRolePipelinesRequest { + /** + * The ID of the role + * @type {number} + * @memberof RolesApiGetRolePipelines + */ + readonly id: number + + /** + * Whether to return the visible or hidden pipelines for the role + * @type {boolean} + * @memberof RolesApiGetRolePipelines + */ + readonly visible?: boolean +} + +/** + * Request parameters for getRoleSettings operation in RolesApi. + * @export + * @interface RolesApiGetRoleSettingsRequest + */ +export interface RolesApiGetRoleSettingsRequest { + /** + * The ID of the role + * @type {number} + * @memberof RolesApiGetRoleSettings + */ + readonly id: number +} + +/** + * Request parameters for getRoles operation in RolesApi. + * @export + * @interface RolesApiGetRolesRequest + */ +export interface RolesApiGetRolesRequest { + /** + * Pagination start + * @type {number} + * @memberof RolesApiGetRoles + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof RolesApiGetRoles + */ + readonly limit?: number +} + +/** + * Request parameters for updateRole operation in RolesApi. + * @export + * @interface RolesApiUpdateRoleRequest + */ +export interface RolesApiUpdateRoleRequest { + /** + * The ID of the role + * @type {number} + * @memberof RolesApiUpdateRole + */ + readonly id: number + + /** + * + * @type {BaseRoleRequest} + * @memberof RolesApiUpdateRole + */ + readonly BaseRoleRequest?: BaseRoleRequest +} + +/** + * Request parameters for updateRolePipelines operation in RolesApi. + * @export + * @interface RolesApiUpdateRolePipelinesRequest + */ +export interface RolesApiUpdateRolePipelinesRequest { + /** + * The ID of the role + * @type {number} + * @memberof RolesApiUpdateRolePipelines + */ + readonly id: number + + /** + * + * @type {PutRolePipelinesBody} + * @memberof RolesApiUpdateRolePipelines + */ + readonly PutRolePipelinesBody?: PutRolePipelinesBody +} + +/** + * RolesApi - object-oriented interface + * @export + * @class RolesApi + * @extends {BaseAPI} + */ +export class RolesApi extends BaseAPI { + /** + * Adds or updates the visibility setting for a role. + * @summary Add or update role setting + * @param {RolesApiAddOrUpdateRoleSettingRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof RolesApi + */ + public addOrUpdateRoleSetting(requestParameters: RolesApiAddOrUpdateRoleSettingRequest, ) { + return RolesApiFp(this.configuration).addOrUpdateRoleSetting(requestParameters.id, requestParameters.AddOrUpdateRoleSettingRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Adds a new role. + * @summary Add a role + * @param {RolesApiAddRoleRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof RolesApi + */ + public addRole(requestParameters: RolesApiAddRoleRequest = {}, ) { + return RolesApiFp(this.configuration).addRole(requestParameters.AddRoleRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Assigns a user to a role. + * @summary Add role assignment + * @param {RolesApiAddRoleAssignmentRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof RolesApi + */ + public addRoleAssignment(requestParameters: RolesApiAddRoleAssignmentRequest, ) { + return RolesApiFp(this.configuration).addRoleAssignment(requestParameters.id, requestParameters.AddRoleAssignmentRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Marks a role as deleted. + * @summary Delete a role + * @param {RolesApiDeleteRoleRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof RolesApi + */ + public deleteRole(requestParameters: RolesApiDeleteRoleRequest, ) { + return RolesApiFp(this.configuration).deleteRole(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Removes the assigned user from a role and adds to the default role. + * @summary Delete a role assignment + * @param {RolesApiDeleteRoleAssignmentRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof RolesApi + */ + public deleteRoleAssignment(requestParameters: RolesApiDeleteRoleAssignmentRequest, ) { + return RolesApiFp(this.configuration).deleteRoleAssignment(requestParameters.id, requestParameters.DeleteRoleAssignmentRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the details of a specific role. + * @summary Get one role + * @param {RolesApiGetRoleRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof RolesApi + */ + public getRole(requestParameters: RolesApiGetRoleRequest, ) { + return RolesApiFp(this.configuration).getRole(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns all users assigned to a role. + * @summary List role assignments + * @param {RolesApiGetRoleAssignmentsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof RolesApi + */ + public getRoleAssignments(requestParameters: RolesApiGetRoleAssignmentsRequest, ) { + return RolesApiFp(this.configuration).getRoleAssignments(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the list of either visible or hidden pipeline IDs for a specific role. For more information on pipeline visibility, please refer to the Visibility groups article. + * @summary List pipeline visibility for a role + * @param {RolesApiGetRolePipelinesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof RolesApi + */ + public getRolePipelines(requestParameters: RolesApiGetRolePipelinesRequest, ) { + return RolesApiFp(this.configuration).getRolePipelines(requestParameters.id, requestParameters.visible, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the visibility settings of a specific role. + * @summary List role settings + * @param {RolesApiGetRoleSettingsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof RolesApi + */ + public getRoleSettings(requestParameters: RolesApiGetRoleSettingsRequest, ) { + return RolesApiFp(this.configuration).getRoleSettings(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns all the roles within the company. + * @summary Get all roles + * @param {RolesApiGetRolesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof RolesApi + */ + public getRoles(requestParameters: RolesApiGetRolesRequest = {}, ) { + return RolesApiFp(this.configuration).getRoles(requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates the parent role and/or the name of a specific role. + * @summary Update role details + * @param {RolesApiUpdateRoleRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof RolesApi + */ + public updateRole(requestParameters: RolesApiUpdateRoleRequest, ) { + return RolesApiFp(this.configuration).updateRole(requestParameters.id, requestParameters.BaseRoleRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates the specified pipelines to be visible and/or hidden for a specific role. For more information on pipeline visibility, please refer to the Visibility groups article. + * @summary Update pipeline visibility for a role + * @param {RolesApiUpdateRolePipelinesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof RolesApi + */ + public updateRolePipelines(requestParameters: RolesApiUpdateRolePipelinesRequest, ) { + return RolesApiFp(this.configuration).updateRolePipelines(requestParameters.id, requestParameters.PutRolePipelinesBody, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/stages-api.ts b/api/stages-api.ts new file mode 100644 index 00000000..d9d0fc72 --- /dev/null +++ b/api/stages-api.ts @@ -0,0 +1,835 @@ +/* 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 { AddStageRequest } from '../models'; +// @ts-ignore +import { DeleteStageResponse200 } from '../models'; +// @ts-ignore +import { DeleteStagesResponse200 } from '../models'; +// @ts-ignore +import { GetStageDealsResponse200 } from '../models'; +// @ts-ignore +import { GetStageResponse200 } from '../models'; +// @ts-ignore +import { GetStagesResponse200 } from '../models'; +// @ts-ignore +import { StageResponse200 } from '../models'; +// @ts-ignore +import { UpdateStageRequest } from '../models'; +/** + * StagesApi - axios parameter creator + * @export + */ +export const StagesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Adds a new stage, returns the ID upon success. + * @summary Add a new stage + * @param {AddStageRequest} [AddStageRequest] + + * @throws {RequiredError} + */ + addStage: async (AddStageRequest?: AddStageRequest, ): Promise => { + const localVarPath = `/stages`; + // 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(AddStageRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Marks a stage as deleted. + * @summary Delete a stage + * @param {number} id The ID of the stage + + * @throws {RequiredError} + */ + deleteStage: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteStage', 'id', id) + const localVarPath = `/stages/{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 stages as deleted. + * @summary Delete multiple stages in bulk + * @param {string} ids The comma-separated stage IDs to delete + + * @throws {RequiredError} + */ + deleteStages: async (ids: string, ): Promise => { + // verify required parameter 'ids' is not null or undefined + assertParamExists('deleteStages', 'ids', ids) + const localVarPath = `/stages`; + // 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 stage. + * @summary Get one stage + * @param {number} id The ID of the stage + * @param {0 | 1} [everyone] If `everyone=1` is provided, deals summary will return deals owned by every user + + * @throws {RequiredError} + */ + getStage: async (id: number, everyone?: 0 | 1, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getStage', 'id', id) + const localVarPath = `/stages/{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) + + if (everyone !== undefined) { + localVarQueryParameter['everyone'] = everyone; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Lists deals in a specific stage. + * @summary Get deals in a stage + * @param {number} id The ID of the stage + * @param {number} [filter_id] If supplied, only deals matching the given filter will be returned + * @param {number} [user_id] If supplied, `filter_id` will not be considered and only deals owned by the given user will be returned. If omitted, deals owned by the authorized user will be returned. + * @param {0 | 1} [everyone] If supplied, `filter_id` and `user_id` will not be considered – instead, deals owned by everyone will be returned + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + getStageDeals: async (id: number, filter_id?: number, user_id?: number, everyone?: 0 | 1, start?: number, limit?: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getStageDeals', 'id', id) + const localVarPath = `/stages/{id}/deals` + .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 (filter_id !== undefined) { + localVarQueryParameter['filter_id'] = filter_id; + } + + if (user_id !== undefined) { + localVarQueryParameter['user_id'] = user_id; + } + + if (everyone !== undefined) { + localVarQueryParameter['everyone'] = everyone; + } + + 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, + }; + }, + /** + * Returns data about all stages. + * @summary Get all stages + * @param {number} [pipeline_id] The ID of the pipeline to fetch stages for. If omitted, stages for all pipelines will be fetched. + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + getStages: async (pipeline_id?: number, start?: number, limit?: number, ): Promise => { + const localVarPath = `/stages`; + // 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 (pipeline_id !== undefined) { + localVarQueryParameter['pipeline_id'] = pipeline_id; + } + + 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 stage. + * @summary Update stage details + * @param {number} id The ID of the stage + * @param {UpdateStageRequest} [UpdateStageRequest] + + * @throws {RequiredError} + */ + updateStage: async (id: number, UpdateStageRequest?: UpdateStageRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updateStage', 'id', id) + const localVarPath = `/stages/{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(UpdateStageRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * StagesApi - functional programming interface + * @export + */ +export const StagesApiFp = 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 = StagesApiAxiosParamCreator(configuration) + return { + /** + * Adds a new stage, returns the ID upon success. + * @summary Add a new stage + * @param {AddStageRequest} [AddStageRequest] + + * @throws {RequiredError} + */ + async addStage(AddStageRequest?: AddStageRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addStage(AddStageRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Marks a stage as deleted. + * @summary Delete a stage + * @param {number} id The ID of the stage + + * @throws {RequiredError} + */ + async deleteStage(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteStage(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Marks multiple stages as deleted. + * @summary Delete multiple stages in bulk + * @param {string} ids The comma-separated stage IDs to delete + + * @throws {RequiredError} + */ + async deleteStages(ids: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteStages(ids, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns data about a specific stage. + * @summary Get one stage + * @param {number} id The ID of the stage + * @param {0 | 1} [everyone] If `everyone=1` is provided, deals summary will return deals owned by every user + + * @throws {RequiredError} + */ + async getStage(id: number, everyone?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStage(id, everyone, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists deals in a specific stage. + * @summary Get deals in a stage + * @param {number} id The ID of the stage + * @param {number} [filter_id] If supplied, only deals matching the given filter will be returned + * @param {number} [user_id] If supplied, `filter_id` will not be considered and only deals owned by the given user will be returned. If omitted, deals owned by the authorized user will be returned. + * @param {0 | 1} [everyone] If supplied, `filter_id` and `user_id` will not be considered – instead, deals owned by everyone will be returned + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + async getStageDeals(id: number, filter_id?: number, user_id?: number, everyone?: 0 | 1, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStageDeals(id, filter_id, user_id, everyone, start, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns data about all stages. + * @summary Get all stages + * @param {number} [pipeline_id] The ID of the pipeline to fetch stages for. If omitted, stages for all pipelines will be fetched. + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + async getStages(pipeline_id?: number, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStages(pipeline_id, start, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates the properties of a stage. + * @summary Update stage details + * @param {number} id The ID of the stage + * @param {UpdateStageRequest} [UpdateStageRequest] + + * @throws {RequiredError} + */ + async updateStage(id: number, UpdateStageRequest?: UpdateStageRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateStage(id, UpdateStageRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * StagesApi - factory interface + * @export + */ +export const StagesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = StagesApiFp(configuration) + return { + /** + * Adds a new stage, returns the ID upon success. + * @summary Add a new stage + * @param {StagesApiAddStageRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addStage(requestParameters: StagesApiAddStageRequest = {}, ): Promise { + return localVarFp.addStage(requestParameters.AddStageRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Marks a stage as deleted. + * @summary Delete a stage + * @param {StagesApiDeleteStageRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteStage(requestParameters: StagesApiDeleteStageRequest, ): Promise { + return localVarFp.deleteStage(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Marks multiple stages as deleted. + * @summary Delete multiple stages in bulk + * @param {StagesApiDeleteStagesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteStages(requestParameters: StagesApiDeleteStagesRequest, ): Promise { + return localVarFp.deleteStages(requestParameters.ids, ).then((request) => request(axios, basePath)); + }, + /** + * Returns data about a specific stage. + * @summary Get one stage + * @param {StagesApiGetStageRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getStage(requestParameters: StagesApiGetStageRequest, ): Promise { + return localVarFp.getStage(requestParameters.id, requestParameters.everyone, ).then((request) => request(axios, basePath)); + }, + /** + * Lists deals in a specific stage. + * @summary Get deals in a stage + * @param {StagesApiGetStageDealsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getStageDeals(requestParameters: StagesApiGetStageDealsRequest, ): Promise { + return localVarFp.getStageDeals(requestParameters.id, requestParameters.filter_id, requestParameters.user_id, requestParameters.everyone, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + /** + * Returns data about all stages. + * @summary Get all stages + * @param {StagesApiGetStagesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getStages(requestParameters: StagesApiGetStagesRequest = {}, ): Promise { + return localVarFp.getStages(requestParameters.pipeline_id, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + /** + * Updates the properties of a stage. + * @summary Update stage details + * @param {StagesApiUpdateStageRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + updateStage(requestParameters: StagesApiUpdateStageRequest, ): Promise { + return localVarFp.updateStage(requestParameters.id, requestParameters.UpdateStageRequest, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for addStage operation in StagesApi. + * @export + * @interface StagesApiAddStageRequest + */ +export interface StagesApiAddStageRequest { + /** + * + * @type {AddStageRequest} + * @memberof StagesApiAddStage + */ + readonly AddStageRequest?: AddStageRequest +} + +/** + * Request parameters for deleteStage operation in StagesApi. + * @export + * @interface StagesApiDeleteStageRequest + */ +export interface StagesApiDeleteStageRequest { + /** + * The ID of the stage + * @type {number} + * @memberof StagesApiDeleteStage + */ + readonly id: number +} + +/** + * Request parameters for deleteStages operation in StagesApi. + * @export + * @interface StagesApiDeleteStagesRequest + */ +export interface StagesApiDeleteStagesRequest { + /** + * The comma-separated stage IDs to delete + * @type {string} + * @memberof StagesApiDeleteStages + */ + readonly ids: string +} + +/** + * Request parameters for getStage operation in StagesApi. + * @export + * @interface StagesApiGetStageRequest + */ +export interface StagesApiGetStageRequest { + /** + * The ID of the stage + * @type {number} + * @memberof StagesApiGetStage + */ + readonly id: number + + /** + * If `everyone=1` is provided, deals summary will return deals owned by every user + * @type {0 | 1} + * @memberof StagesApiGetStage + */ + readonly everyone?: 0 | 1 +} + +/** + * Request parameters for getStageDeals operation in StagesApi. + * @export + * @interface StagesApiGetStageDealsRequest + */ +export interface StagesApiGetStageDealsRequest { + /** + * The ID of the stage + * @type {number} + * @memberof StagesApiGetStageDeals + */ + readonly id: number + + /** + * If supplied, only deals matching the given filter will be returned + * @type {number} + * @memberof StagesApiGetStageDeals + */ + readonly filter_id?: number + + /** + * If supplied, `filter_id` will not be considered and only deals owned by the given user will be returned. If omitted, deals owned by the authorized user will be returned. + * @type {number} + * @memberof StagesApiGetStageDeals + */ + readonly user_id?: number + + /** + * If supplied, `filter_id` and `user_id` will not be considered – instead, deals owned by everyone will be returned + * @type {0 | 1} + * @memberof StagesApiGetStageDeals + */ + readonly everyone?: 0 | 1 + + /** + * Pagination start + * @type {number} + * @memberof StagesApiGetStageDeals + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof StagesApiGetStageDeals + */ + readonly limit?: number +} + +/** + * Request parameters for getStages operation in StagesApi. + * @export + * @interface StagesApiGetStagesRequest + */ +export interface StagesApiGetStagesRequest { + /** + * The ID of the pipeline to fetch stages for. If omitted, stages for all pipelines will be fetched. + * @type {number} + * @memberof StagesApiGetStages + */ + readonly pipeline_id?: number + + /** + * Pagination start + * @type {number} + * @memberof StagesApiGetStages + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof StagesApiGetStages + */ + readonly limit?: number +} + +/** + * Request parameters for updateStage operation in StagesApi. + * @export + * @interface StagesApiUpdateStageRequest + */ +export interface StagesApiUpdateStageRequest { + /** + * The ID of the stage + * @type {number} + * @memberof StagesApiUpdateStage + */ + readonly id: number + + /** + * + * @type {UpdateStageRequest} + * @memberof StagesApiUpdateStage + */ + readonly UpdateStageRequest?: UpdateStageRequest +} + +/** + * StagesApi - object-oriented interface + * @export + * @class StagesApi + * @extends {BaseAPI} + */ +export class StagesApi extends BaseAPI { + /** + * Adds a new stage, returns the ID upon success. + * @summary Add a new stage + * @param {StagesApiAddStageRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof StagesApi + */ + public addStage(requestParameters: StagesApiAddStageRequest = {}, ) { + return StagesApiFp(this.configuration).addStage(requestParameters.AddStageRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Marks a stage as deleted. + * @summary Delete a stage + * @param {StagesApiDeleteStageRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof StagesApi + */ + public deleteStage(requestParameters: StagesApiDeleteStageRequest, ) { + return StagesApiFp(this.configuration).deleteStage(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Marks multiple stages as deleted. + * @summary Delete multiple stages in bulk + * @param {StagesApiDeleteStagesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof StagesApi + */ + public deleteStages(requestParameters: StagesApiDeleteStagesRequest, ) { + return StagesApiFp(this.configuration).deleteStages(requestParameters.ids, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about a specific stage. + * @summary Get one stage + * @param {StagesApiGetStageRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof StagesApi + */ + public getStage(requestParameters: StagesApiGetStageRequest, ) { + return StagesApiFp(this.configuration).getStage(requestParameters.id, requestParameters.everyone, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists deals in a specific stage. + * @summary Get deals in a stage + * @param {StagesApiGetStageDealsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof StagesApi + */ + public getStageDeals(requestParameters: StagesApiGetStageDealsRequest, ) { + return StagesApiFp(this.configuration).getStageDeals(requestParameters.id, requestParameters.filter_id, requestParameters.user_id, requestParameters.everyone, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about all stages. + * @summary Get all stages + * @param {StagesApiGetStagesRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof StagesApi + */ + public getStages(requestParameters: StagesApiGetStagesRequest = {}, ) { + return StagesApiFp(this.configuration).getStages(requestParameters.pipeline_id, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates the properties of a stage. + * @summary Update stage details + * @param {StagesApiUpdateStageRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof StagesApi + */ + public updateStage(requestParameters: StagesApiUpdateStageRequest, ) { + return StagesApiFp(this.configuration).updateStage(requestParameters.id, requestParameters.UpdateStageRequest, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/subscriptions-api.ts b/api/subscriptions-api.ts new file mode 100644 index 00000000..e3eb81fa --- /dev/null +++ b/api/subscriptions-api.ts @@ -0,0 +1,925 @@ +/* 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 { AddRecurringSubscriptionRequest } from '../models'; +// @ts-ignore +import { AddSubscriptionInstallmentRequest } from '../models'; +// @ts-ignore +import { CancelRecurringSubscriptionRequest } from '../models'; +// @ts-ignore +import { PaymentResponse200 } from '../models'; +// @ts-ignore +import { SubscriptionsIdResponse200 } from '../models'; +// @ts-ignore +import { UpdateRecurringSubscriptionRequest } from '../models'; +// @ts-ignore +import { UpdateSubscriptionInstallmentRequest } from '../models'; +/** + * SubscriptionsApi - axios parameter creator + * @export + */ +export const SubscriptionsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Adds a new recurring subscription. + * @summary Add a recurring subscription + * @param {AddRecurringSubscriptionRequest} [AddRecurringSubscriptionRequest] + + * @throws {RequiredError} + */ + addRecurringSubscription: async (AddRecurringSubscriptionRequest?: AddRecurringSubscriptionRequest, ): Promise => { + const localVarPath = `/subscriptions/recurring`; + // 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(AddRecurringSubscriptionRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Adds a new installment subscription. + * @summary Add an installment subscription + * @param {AddSubscriptionInstallmentRequest} [AddSubscriptionInstallmentRequest] + + * @throws {RequiredError} + */ + addSubscriptionInstallment: async (AddSubscriptionInstallmentRequest?: AddSubscriptionInstallmentRequest, ): Promise => { + const localVarPath = `/subscriptions/installment`; + // 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(AddSubscriptionInstallmentRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Cancels a recurring subscription. + * @summary Cancel a recurring subscription + * @param {number} id The ID of the subscription + * @param {CancelRecurringSubscriptionRequest} [CancelRecurringSubscriptionRequest] + + * @throws {RequiredError} + */ + cancelRecurringSubscription: async (id: number, CancelRecurringSubscriptionRequest?: CancelRecurringSubscriptionRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('cancelRecurringSubscription', 'id', id) + const localVarPath = `/subscriptions/recurring/{id}/cancel` + .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(CancelRecurringSubscriptionRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Marks an installment or a recurring subscription as deleted. + * @summary Delete a subscription + * @param {number} id The ID of the subscription + + * @throws {RequiredError} + */ + deleteSubscription: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteSubscription', 'id', id) + const localVarPath = `/subscriptions/{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, + }; + }, + /** + * Returns details of an installment or a recurring subscription by the deal ID. + * @summary Find subscription by deal + * @param {number} dealId The ID of the deal + + * @throws {RequiredError} + */ + findSubscriptionByDeal: async (dealId: number, ): Promise => { + // verify required parameter 'dealId' is not null or undefined + assertParamExists('findSubscriptionByDeal', 'dealId', dealId) + const localVarPath = `/subscriptions/find/{dealId}` + .replace(`{${"dealId"}}`, encodeURIComponent(String(dealId))); + // 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 details of an installment or a recurring subscription. + * @summary Get details of a subscription + * @param {number} id The ID of the subscription + + * @throws {RequiredError} + */ + getSubscription: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getSubscription', 'id', id) + const localVarPath = `/subscriptions/{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, + }; + }, + /** + * Returns all payments of an installment or recurring subscription. + * @summary Get all payments of a subscription + * @param {number} id The ID of the subscription + + * @throws {RequiredError} + */ + getSubscriptionPayments: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getSubscriptionPayments', 'id', id) + const localVarPath = `/subscriptions/{id}/payments` + .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, + }; + }, + /** + * Updates a recurring subscription. + * @summary Update a recurring subscription + * @param {number} id The ID of the subscription + * @param {UpdateRecurringSubscriptionRequest} [UpdateRecurringSubscriptionRequest] + + * @throws {RequiredError} + */ + updateRecurringSubscription: async (id: number, UpdateRecurringSubscriptionRequest?: UpdateRecurringSubscriptionRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updateRecurringSubscription', 'id', id) + const localVarPath = `/subscriptions/recurring/{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(UpdateRecurringSubscriptionRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Updates an installment subscription. + * @summary Update an installment subscription + * @param {number} id The ID of the subscription + * @param {UpdateSubscriptionInstallmentRequest} [UpdateSubscriptionInstallmentRequest] + + * @throws {RequiredError} + */ + updateSubscriptionInstallment: async (id: number, UpdateSubscriptionInstallmentRequest?: UpdateSubscriptionInstallmentRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updateSubscriptionInstallment', 'id', id) + const localVarPath = `/subscriptions/installment/{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(UpdateSubscriptionInstallmentRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * SubscriptionsApi - functional programming interface + * @export + */ +export const SubscriptionsApiFp = 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 = SubscriptionsApiAxiosParamCreator(configuration) + return { + /** + * Adds a new recurring subscription. + * @summary Add a recurring subscription + * @param {AddRecurringSubscriptionRequest} [AddRecurringSubscriptionRequest] + + * @throws {RequiredError} + */ + async addRecurringSubscription(AddRecurringSubscriptionRequest?: AddRecurringSubscriptionRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addRecurringSubscription(AddRecurringSubscriptionRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Adds a new installment subscription. + * @summary Add an installment subscription + * @param {AddSubscriptionInstallmentRequest} [AddSubscriptionInstallmentRequest] + + * @throws {RequiredError} + */ + async addSubscriptionInstallment(AddSubscriptionInstallmentRequest?: AddSubscriptionInstallmentRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addSubscriptionInstallment(AddSubscriptionInstallmentRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Cancels a recurring subscription. + * @summary Cancel a recurring subscription + * @param {number} id The ID of the subscription + * @param {CancelRecurringSubscriptionRequest} [CancelRecurringSubscriptionRequest] + + * @throws {RequiredError} + */ + async cancelRecurringSubscription(id: number, CancelRecurringSubscriptionRequest?: CancelRecurringSubscriptionRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cancelRecurringSubscription(id, CancelRecurringSubscriptionRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Marks an installment or a recurring subscription as deleted. + * @summary Delete a subscription + * @param {number} id The ID of the subscription + + * @throws {RequiredError} + */ + async deleteSubscription(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSubscription(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns details of an installment or a recurring subscription by the deal ID. + * @summary Find subscription by deal + * @param {number} dealId The ID of the deal + + * @throws {RequiredError} + */ + async findSubscriptionByDeal(dealId: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.findSubscriptionByDeal(dealId, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns details of an installment or a recurring subscription. + * @summary Get details of a subscription + * @param {number} id The ID of the subscription + + * @throws {RequiredError} + */ + async getSubscription(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSubscription(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns all payments of an installment or recurring subscription. + * @summary Get all payments of a subscription + * @param {number} id The ID of the subscription + + * @throws {RequiredError} + */ + async getSubscriptionPayments(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSubscriptionPayments(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates a recurring subscription. + * @summary Update a recurring subscription + * @param {number} id The ID of the subscription + * @param {UpdateRecurringSubscriptionRequest} [UpdateRecurringSubscriptionRequest] + + * @throws {RequiredError} + */ + async updateRecurringSubscription(id: number, UpdateRecurringSubscriptionRequest?: UpdateRecurringSubscriptionRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateRecurringSubscription(id, UpdateRecurringSubscriptionRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates an installment subscription. + * @summary Update an installment subscription + * @param {number} id The ID of the subscription + * @param {UpdateSubscriptionInstallmentRequest} [UpdateSubscriptionInstallmentRequest] + + * @throws {RequiredError} + */ + async updateSubscriptionInstallment(id: number, UpdateSubscriptionInstallmentRequest?: UpdateSubscriptionInstallmentRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateSubscriptionInstallment(id, UpdateSubscriptionInstallmentRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * SubscriptionsApi - factory interface + * @export + */ +export const SubscriptionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = SubscriptionsApiFp(configuration) + return { + /** + * Adds a new recurring subscription. + * @summary Add a recurring subscription + * @param {SubscriptionsApiAddRecurringSubscriptionRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addRecurringSubscription(requestParameters: SubscriptionsApiAddRecurringSubscriptionRequest = {}, ): Promise { + return localVarFp.addRecurringSubscription(requestParameters.AddRecurringSubscriptionRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Adds a new installment subscription. + * @summary Add an installment subscription + * @param {SubscriptionsApiAddSubscriptionInstallmentRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addSubscriptionInstallment(requestParameters: SubscriptionsApiAddSubscriptionInstallmentRequest = {}, ): Promise { + return localVarFp.addSubscriptionInstallment(requestParameters.AddSubscriptionInstallmentRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Cancels a recurring subscription. + * @summary Cancel a recurring subscription + * @param {SubscriptionsApiCancelRecurringSubscriptionRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + cancelRecurringSubscription(requestParameters: SubscriptionsApiCancelRecurringSubscriptionRequest, ): Promise { + return localVarFp.cancelRecurringSubscription(requestParameters.id, requestParameters.CancelRecurringSubscriptionRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Marks an installment or a recurring subscription as deleted. + * @summary Delete a subscription + * @param {SubscriptionsApiDeleteSubscriptionRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteSubscription(requestParameters: SubscriptionsApiDeleteSubscriptionRequest, ): Promise { + return localVarFp.deleteSubscription(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns details of an installment or a recurring subscription by the deal ID. + * @summary Find subscription by deal + * @param {SubscriptionsApiFindSubscriptionByDealRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + findSubscriptionByDeal(requestParameters: SubscriptionsApiFindSubscriptionByDealRequest, ): Promise { + return localVarFp.findSubscriptionByDeal(requestParameters.dealId, ).then((request) => request(axios, basePath)); + }, + /** + * Returns details of an installment or a recurring subscription. + * @summary Get details of a subscription + * @param {SubscriptionsApiGetSubscriptionRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getSubscription(requestParameters: SubscriptionsApiGetSubscriptionRequest, ): Promise { + return localVarFp.getSubscription(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns all payments of an installment or recurring subscription. + * @summary Get all payments of a subscription + * @param {SubscriptionsApiGetSubscriptionPaymentsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getSubscriptionPayments(requestParameters: SubscriptionsApiGetSubscriptionPaymentsRequest, ): Promise { + return localVarFp.getSubscriptionPayments(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Updates a recurring subscription. + * @summary Update a recurring subscription + * @param {SubscriptionsApiUpdateRecurringSubscriptionRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + updateRecurringSubscription(requestParameters: SubscriptionsApiUpdateRecurringSubscriptionRequest, ): Promise { + return localVarFp.updateRecurringSubscription(requestParameters.id, requestParameters.UpdateRecurringSubscriptionRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Updates an installment subscription. + * @summary Update an installment subscription + * @param {SubscriptionsApiUpdateSubscriptionInstallmentRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + updateSubscriptionInstallment(requestParameters: SubscriptionsApiUpdateSubscriptionInstallmentRequest, ): Promise { + return localVarFp.updateSubscriptionInstallment(requestParameters.id, requestParameters.UpdateSubscriptionInstallmentRequest, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for addRecurringSubscription operation in SubscriptionsApi. + * @export + * @interface SubscriptionsApiAddRecurringSubscriptionRequest + */ +export interface SubscriptionsApiAddRecurringSubscriptionRequest { + /** + * + * @type {AddRecurringSubscriptionRequest} + * @memberof SubscriptionsApiAddRecurringSubscription + */ + readonly AddRecurringSubscriptionRequest?: AddRecurringSubscriptionRequest +} + +/** + * Request parameters for addSubscriptionInstallment operation in SubscriptionsApi. + * @export + * @interface SubscriptionsApiAddSubscriptionInstallmentRequest + */ +export interface SubscriptionsApiAddSubscriptionInstallmentRequest { + /** + * + * @type {AddSubscriptionInstallmentRequest} + * @memberof SubscriptionsApiAddSubscriptionInstallment + */ + readonly AddSubscriptionInstallmentRequest?: AddSubscriptionInstallmentRequest +} + +/** + * Request parameters for cancelRecurringSubscription operation in SubscriptionsApi. + * @export + * @interface SubscriptionsApiCancelRecurringSubscriptionRequest + */ +export interface SubscriptionsApiCancelRecurringSubscriptionRequest { + /** + * The ID of the subscription + * @type {number} + * @memberof SubscriptionsApiCancelRecurringSubscription + */ + readonly id: number + + /** + * + * @type {CancelRecurringSubscriptionRequest} + * @memberof SubscriptionsApiCancelRecurringSubscription + */ + readonly CancelRecurringSubscriptionRequest?: CancelRecurringSubscriptionRequest +} + +/** + * Request parameters for deleteSubscription operation in SubscriptionsApi. + * @export + * @interface SubscriptionsApiDeleteSubscriptionRequest + */ +export interface SubscriptionsApiDeleteSubscriptionRequest { + /** + * The ID of the subscription + * @type {number} + * @memberof SubscriptionsApiDeleteSubscription + */ + readonly id: number +} + +/** + * Request parameters for findSubscriptionByDeal operation in SubscriptionsApi. + * @export + * @interface SubscriptionsApiFindSubscriptionByDealRequest + */ +export interface SubscriptionsApiFindSubscriptionByDealRequest { + /** + * The ID of the deal + * @type {number} + * @memberof SubscriptionsApiFindSubscriptionByDeal + */ + readonly dealId: number +} + +/** + * Request parameters for getSubscription operation in SubscriptionsApi. + * @export + * @interface SubscriptionsApiGetSubscriptionRequest + */ +export interface SubscriptionsApiGetSubscriptionRequest { + /** + * The ID of the subscription + * @type {number} + * @memberof SubscriptionsApiGetSubscription + */ + readonly id: number +} + +/** + * Request parameters for getSubscriptionPayments operation in SubscriptionsApi. + * @export + * @interface SubscriptionsApiGetSubscriptionPaymentsRequest + */ +export interface SubscriptionsApiGetSubscriptionPaymentsRequest { + /** + * The ID of the subscription + * @type {number} + * @memberof SubscriptionsApiGetSubscriptionPayments + */ + readonly id: number +} + +/** + * Request parameters for updateRecurringSubscription operation in SubscriptionsApi. + * @export + * @interface SubscriptionsApiUpdateRecurringSubscriptionRequest + */ +export interface SubscriptionsApiUpdateRecurringSubscriptionRequest { + /** + * The ID of the subscription + * @type {number} + * @memberof SubscriptionsApiUpdateRecurringSubscription + */ + readonly id: number + + /** + * + * @type {UpdateRecurringSubscriptionRequest} + * @memberof SubscriptionsApiUpdateRecurringSubscription + */ + readonly UpdateRecurringSubscriptionRequest?: UpdateRecurringSubscriptionRequest +} + +/** + * Request parameters for updateSubscriptionInstallment operation in SubscriptionsApi. + * @export + * @interface SubscriptionsApiUpdateSubscriptionInstallmentRequest + */ +export interface SubscriptionsApiUpdateSubscriptionInstallmentRequest { + /** + * The ID of the subscription + * @type {number} + * @memberof SubscriptionsApiUpdateSubscriptionInstallment + */ + readonly id: number + + /** + * + * @type {UpdateSubscriptionInstallmentRequest} + * @memberof SubscriptionsApiUpdateSubscriptionInstallment + */ + readonly UpdateSubscriptionInstallmentRequest?: UpdateSubscriptionInstallmentRequest +} + +/** + * SubscriptionsApi - object-oriented interface + * @export + * @class SubscriptionsApi + * @extends {BaseAPI} + */ +export class SubscriptionsApi extends BaseAPI { + /** + * Adds a new recurring subscription. + * @summary Add a recurring subscription + * @param {SubscriptionsApiAddRecurringSubscriptionRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof SubscriptionsApi + */ + public addRecurringSubscription(requestParameters: SubscriptionsApiAddRecurringSubscriptionRequest = {}, ) { + return SubscriptionsApiFp(this.configuration).addRecurringSubscription(requestParameters.AddRecurringSubscriptionRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Adds a new installment subscription. + * @summary Add an installment subscription + * @param {SubscriptionsApiAddSubscriptionInstallmentRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof SubscriptionsApi + */ + public addSubscriptionInstallment(requestParameters: SubscriptionsApiAddSubscriptionInstallmentRequest = {}, ) { + return SubscriptionsApiFp(this.configuration).addSubscriptionInstallment(requestParameters.AddSubscriptionInstallmentRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Cancels a recurring subscription. + * @summary Cancel a recurring subscription + * @param {SubscriptionsApiCancelRecurringSubscriptionRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof SubscriptionsApi + */ + public cancelRecurringSubscription(requestParameters: SubscriptionsApiCancelRecurringSubscriptionRequest, ) { + return SubscriptionsApiFp(this.configuration).cancelRecurringSubscription(requestParameters.id, requestParameters.CancelRecurringSubscriptionRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Marks an installment or a recurring subscription as deleted. + * @summary Delete a subscription + * @param {SubscriptionsApiDeleteSubscriptionRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof SubscriptionsApi + */ + public deleteSubscription(requestParameters: SubscriptionsApiDeleteSubscriptionRequest, ) { + return SubscriptionsApiFp(this.configuration).deleteSubscription(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns details of an installment or a recurring subscription by the deal ID. + * @summary Find subscription by deal + * @param {SubscriptionsApiFindSubscriptionByDealRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof SubscriptionsApi + */ + public findSubscriptionByDeal(requestParameters: SubscriptionsApiFindSubscriptionByDealRequest, ) { + return SubscriptionsApiFp(this.configuration).findSubscriptionByDeal(requestParameters.dealId, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns details of an installment or a recurring subscription. + * @summary Get details of a subscription + * @param {SubscriptionsApiGetSubscriptionRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof SubscriptionsApi + */ + public getSubscription(requestParameters: SubscriptionsApiGetSubscriptionRequest, ) { + return SubscriptionsApiFp(this.configuration).getSubscription(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns all payments of an installment or recurring subscription. + * @summary Get all payments of a subscription + * @param {SubscriptionsApiGetSubscriptionPaymentsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof SubscriptionsApi + */ + public getSubscriptionPayments(requestParameters: SubscriptionsApiGetSubscriptionPaymentsRequest, ) { + return SubscriptionsApiFp(this.configuration).getSubscriptionPayments(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates a recurring subscription. + * @summary Update a recurring subscription + * @param {SubscriptionsApiUpdateRecurringSubscriptionRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof SubscriptionsApi + */ + public updateRecurringSubscription(requestParameters: SubscriptionsApiUpdateRecurringSubscriptionRequest, ) { + return SubscriptionsApiFp(this.configuration).updateRecurringSubscription(requestParameters.id, requestParameters.UpdateRecurringSubscriptionRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates an installment subscription. + * @summary Update an installment subscription + * @param {SubscriptionsApiUpdateSubscriptionInstallmentRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof SubscriptionsApi + */ + public updateSubscriptionInstallment(requestParameters: SubscriptionsApiUpdateSubscriptionInstallmentRequest, ) { + return SubscriptionsApiFp(this.configuration).updateSubscriptionInstallment(requestParameters.id, requestParameters.UpdateSubscriptionInstallmentRequest, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/tasks-api.ts b/api/tasks-api.ts new file mode 100644 index 00000000..1aeb674c --- /dev/null +++ b/api/tasks-api.ts @@ -0,0 +1,615 @@ +/* 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 { AddTaskRequest } from '../models'; +// @ts-ignore +import { AddTaskResponse201 } from '../models'; +// @ts-ignore +import { DeleteTaskResponse200 } from '../models'; +// @ts-ignore +import { GetTaskResponse200 } from '../models'; +// @ts-ignore +import { GetTasksResponse200 } from '../models'; +// @ts-ignore +import { UpdateProjectRequest2 } from '../models'; +// @ts-ignore +import { UpdateTaskResponse200 } from '../models'; +/** + * TasksApi - axios parameter creator + * @export + */ +export const TasksApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Adds a new task. + * @summary Add a task + * @param {AddTaskRequest} [AddTaskRequest] + + * @throws {RequiredError} + */ + addTask: async (AddTaskRequest?: AddTaskRequest, ): Promise => { + const localVarPath = `/tasks`; + // 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", ["projects:full"], configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + localVarRequestOptions.data = serializeDataIfNeeded(AddTaskRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Marks a task as deleted. If the task has subtasks then those will also be deleted. + * @summary Delete a task + * @param {number} id The ID of the task + + * @throws {RequiredError} + */ + deleteTask: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteTask', 'id', id) + const localVarPath = `/tasks/{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", ["projects: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 task. + * @summary Get details of a task + * @param {number} id The ID of the task + + * @throws {RequiredError} + */ + getTask: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getTask', 'id', id) + const localVarPath = `/tasks/{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", ["projects:read", "projects:full"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns all tasks. This is a cursor-paginated endpoint. For more information, please refer to our documentation on pagination. + * @summary Get all tasks + * @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, up to 500 items will be returned. + * @param {number} [assignee_id] If supplied, only tasks that are assigned to this user are returned + * @param {number} [project_id] If supplied, only tasks that are assigned to this project are returned + * @param {number} [parent_task_id] If `null` is supplied then only parent tasks are returned. If integer is supplied then only subtasks of a specific task are returned. By default all tasks are returned. + * @param {0 | 1} [done] Whether the task is done or not. `0` = Not done, `1` = Done. If not omitted then returns both done and not done tasks. + + * @throws {RequiredError} + */ + getTasks: async (cursor?: string, limit?: number, assignee_id?: number, project_id?: number, parent_task_id?: number, done?: 0 | 1, ): Promise => { + const localVarPath = `/tasks`; + // 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", ["projects:read", "projects:full"], configuration) + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (assignee_id !== undefined) { + localVarQueryParameter['assignee_id'] = assignee_id; + } + + if (project_id !== undefined) { + localVarQueryParameter['project_id'] = project_id; + } + + if (parent_task_id !== undefined) { + localVarQueryParameter['parent_task_id'] = parent_task_id; + } + + 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, + }; + }, + /** + * Updates a task. + * @summary Update a task + * @param {number} id The ID of the task + * @param {UpdateProjectRequest2} [UpdateProjectRequest2] + + * @throws {RequiredError} + */ + updateTask: async (id: number, UpdateProjectRequest2?: UpdateProjectRequest2, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updateTask', 'id', id) + const localVarPath = `/tasks/{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", ["projects:full"], configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + localVarRequestOptions.data = serializeDataIfNeeded(UpdateProjectRequest2, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * TasksApi - functional programming interface + * @export + */ +export const TasksApiFp = 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 = TasksApiAxiosParamCreator(configuration) + return { + /** + * Adds a new task. + * @summary Add a task + * @param {AddTaskRequest} [AddTaskRequest] + + * @throws {RequiredError} + */ + async addTask(AddTaskRequest?: AddTaskRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addTask(AddTaskRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Marks a task as deleted. If the task has subtasks then those will also be deleted. + * @summary Delete a task + * @param {number} id The ID of the task + + * @throws {RequiredError} + */ + async deleteTask(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTask(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns the details of a specific task. + * @summary Get details of a task + * @param {number} id The ID of the task + + * @throws {RequiredError} + */ + async getTask(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTask(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns all tasks. This is a cursor-paginated endpoint. For more information, please refer to our documentation on pagination. + * @summary Get all tasks + * @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, up to 500 items will be returned. + * @param {number} [assignee_id] If supplied, only tasks that are assigned to this user are returned + * @param {number} [project_id] If supplied, only tasks that are assigned to this project are returned + * @param {number} [parent_task_id] If `null` is supplied then only parent tasks are returned. If integer is supplied then only subtasks of a specific task are returned. By default all tasks are returned. + * @param {0 | 1} [done] Whether the task is done or not. `0` = Not done, `1` = Done. If not omitted then returns both done and not done tasks. + + * @throws {RequiredError} + */ + async getTasks(cursor?: string, limit?: number, assignee_id?: number, project_id?: number, parent_task_id?: number, done?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTasks(cursor, limit, assignee_id, project_id, parent_task_id, done, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates a task. + * @summary Update a task + * @param {number} id The ID of the task + * @param {UpdateProjectRequest2} [UpdateProjectRequest2] + + * @throws {RequiredError} + */ + async updateTask(id: number, UpdateProjectRequest2?: UpdateProjectRequest2, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateTask(id, UpdateProjectRequest2, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * TasksApi - factory interface + * @export + */ +export const TasksApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = TasksApiFp(configuration) + return { + /** + * Adds a new task. + * @summary Add a task + * @param {TasksApiAddTaskRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addTask(requestParameters: TasksApiAddTaskRequest = {}, ): Promise { + return localVarFp.addTask(requestParameters.AddTaskRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Marks a task as deleted. If the task has subtasks then those will also be deleted. + * @summary Delete a task + * @param {TasksApiDeleteTaskRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteTask(requestParameters: TasksApiDeleteTaskRequest, ): Promise { + return localVarFp.deleteTask(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns the details of a specific task. + * @summary Get details of a task + * @param {TasksApiGetTaskRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getTask(requestParameters: TasksApiGetTaskRequest, ): Promise { + return localVarFp.getTask(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns all tasks. This is a cursor-paginated endpoint. For more information, please refer to our documentation on pagination. + * @summary Get all tasks + * @param {TasksApiGetTasksRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getTasks(requestParameters: TasksApiGetTasksRequest = {}, ): Promise { + return localVarFp.getTasks(requestParameters.cursor, requestParameters.limit, requestParameters.assignee_id, requestParameters.project_id, requestParameters.parent_task_id, requestParameters.done, ).then((request) => request(axios, basePath)); + }, + /** + * Updates a task. + * @summary Update a task + * @param {TasksApiUpdateTaskRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + updateTask(requestParameters: TasksApiUpdateTaskRequest, ): Promise { + return localVarFp.updateTask(requestParameters.id, requestParameters.UpdateProjectRequest2, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for addTask operation in TasksApi. + * @export + * @interface TasksApiAddTaskRequest + */ +export interface TasksApiAddTaskRequest { + /** + * + * @type {AddTaskRequest} + * @memberof TasksApiAddTask + */ + readonly AddTaskRequest?: AddTaskRequest +} + +/** + * Request parameters for deleteTask operation in TasksApi. + * @export + * @interface TasksApiDeleteTaskRequest + */ +export interface TasksApiDeleteTaskRequest { + /** + * The ID of the task + * @type {number} + * @memberof TasksApiDeleteTask + */ + readonly id: number +} + +/** + * Request parameters for getTask operation in TasksApi. + * @export + * @interface TasksApiGetTaskRequest + */ +export interface TasksApiGetTaskRequest { + /** + * The ID of the task + * @type {number} + * @memberof TasksApiGetTask + */ + readonly id: number +} + +/** + * Request parameters for getTasks operation in TasksApi. + * @export + * @interface TasksApiGetTasksRequest + */ +export interface TasksApiGetTasksRequest { + /** + * For pagination, the marker (an opaque string value) representing the first item on the next page + * @type {string} + * @memberof TasksApiGetTasks + */ + readonly cursor?: string + + /** + * For pagination, the limit of entries to be returned. If not provided, up to 500 items will be returned. + * @type {number} + * @memberof TasksApiGetTasks + */ + readonly limit?: number + + /** + * If supplied, only tasks that are assigned to this user are returned + * @type {number} + * @memberof TasksApiGetTasks + */ + readonly assignee_id?: number + + /** + * If supplied, only tasks that are assigned to this project are returned + * @type {number} + * @memberof TasksApiGetTasks + */ + readonly project_id?: number + + /** + * If `null` is supplied then only parent tasks are returned. If integer is supplied then only subtasks of a specific task are returned. By default all tasks are returned. + * @type {number} + * @memberof TasksApiGetTasks + */ + readonly parent_task_id?: number + + /** + * Whether the task is done or not. `0` = Not done, `1` = Done. If not omitted then returns both done and not done tasks. + * @type {0 | 1} + * @memberof TasksApiGetTasks + */ + readonly done?: 0 | 1 +} + +/** + * Request parameters for updateTask operation in TasksApi. + * @export + * @interface TasksApiUpdateTaskRequest + */ +export interface TasksApiUpdateTaskRequest { + /** + * The ID of the task + * @type {number} + * @memberof TasksApiUpdateTask + */ + readonly id: number + + /** + * + * @type {UpdateProjectRequest2} + * @memberof TasksApiUpdateTask + */ + readonly UpdateProjectRequest2?: UpdateProjectRequest2 +} + +/** + * TasksApi - object-oriented interface + * @export + * @class TasksApi + * @extends {BaseAPI} + */ +export class TasksApi extends BaseAPI { + /** + * Adds a new task. + * @summary Add a task + * @param {TasksApiAddTaskRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof TasksApi + */ + public addTask(requestParameters: TasksApiAddTaskRequest = {}, ) { + return TasksApiFp(this.configuration).addTask(requestParameters.AddTaskRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Marks a task as deleted. If the task has subtasks then those will also be deleted. + * @summary Delete a task + * @param {TasksApiDeleteTaskRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof TasksApi + */ + public deleteTask(requestParameters: TasksApiDeleteTaskRequest, ) { + return TasksApiFp(this.configuration).deleteTask(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the details of a specific task. + * @summary Get details of a task + * @param {TasksApiGetTaskRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof TasksApi + */ + public getTask(requestParameters: TasksApiGetTaskRequest, ) { + return TasksApiFp(this.configuration).getTask(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns all tasks. This is a cursor-paginated endpoint. For more information, please refer to our documentation on pagination. + * @summary Get all tasks + * @param {TasksApiGetTasksRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof TasksApi + */ + public getTasks(requestParameters: TasksApiGetTasksRequest = {}, ) { + return TasksApiFp(this.configuration).getTasks(requestParameters.cursor, requestParameters.limit, requestParameters.assignee_id, requestParameters.project_id, requestParameters.parent_task_id, requestParameters.done, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates a task. + * @summary Update a task + * @param {TasksApiUpdateTaskRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof TasksApi + */ + public updateTask(requestParameters: TasksApiUpdateTaskRequest, ) { + return TasksApiFp(this.configuration).updateTask(requestParameters.id, requestParameters.UpdateProjectRequest2, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/user-connections-api.ts b/api/user-connections-api.ts new file mode 100644 index 00000000..873d9dec --- /dev/null +++ b/api/user-connections-api.ts @@ -0,0 +1,154 @@ +/* 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 { UnathorizedResponse } from '../models'; +// @ts-ignore +import { UserConnectionsResponse200 } from '../models'; +/** + * UserConnectionsApi - axios parameter creator + * @export + */ +export const UserConnectionsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Returns data about all connections for the authorized user. + * @summary Get all user connections + + * @throws {RequiredError} + */ + getUserConnections: async (): Promise => { + const localVarPath = `/userConnections`; + // 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) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * UserConnectionsApi - functional programming interface + * @export + */ +export const UserConnectionsApiFp = 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 = UserConnectionsApiAxiosParamCreator(configuration) + return { + /** + * Returns data about all connections for the authorized user. + * @summary Get all user connections + + * @throws {RequiredError} + */ + async getUserConnections(): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getUserConnections(); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * UserConnectionsApi - factory interface + * @export + */ +export const UserConnectionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = UserConnectionsApiFp(configuration) + return { + /** + * Returns data about all connections for the authorized user. + * @summary Get all user connections + + * @throws {RequiredError} + */ + getUserConnections(): Promise { + return localVarFp.getUserConnections().then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * UserConnectionsApi - object-oriented interface + * @export + * @class UserConnectionsApi + * @extends {BaseAPI} + */ +export class UserConnectionsApi extends BaseAPI { + /** + * Returns data about all connections for the authorized user. + * @summary Get all user connections + + * @throws {RequiredError} + * @memberof UserConnectionsApi + */ + public getUserConnections() { + return UserConnectionsApiFp(this.configuration).getUserConnections().then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/user-settings-api.ts b/api/user-settings-api.ts new file mode 100644 index 00000000..afe176de --- /dev/null +++ b/api/user-settings-api.ts @@ -0,0 +1,154 @@ +/* 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 { GetUserSettingsResponse200 } from '../models'; +// @ts-ignore +import { UnathorizedResponse } from '../models'; +/** + * UserSettingsApi - axios parameter creator + * @export + */ +export const UserSettingsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Lists the settings of an authorized user. Example response contains a shortened list of settings. + * @summary List settings of an authorized user + + * @throws {RequiredError} + */ + getUserSettings: async (): Promise => { + const localVarPath = `/userSettings`; + // 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) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * UserSettingsApi - functional programming interface + * @export + */ +export const UserSettingsApiFp = 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 = UserSettingsApiAxiosParamCreator(configuration) + return { + /** + * Lists the settings of an authorized user. Example response contains a shortened list of settings. + * @summary List settings of an authorized user + + * @throws {RequiredError} + */ + async getUserSettings(): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getUserSettings(); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * UserSettingsApi - factory interface + * @export + */ +export const UserSettingsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = UserSettingsApiFp(configuration) + return { + /** + * Lists the settings of an authorized user. Example response contains a shortened list of settings. + * @summary List settings of an authorized user + + * @throws {RequiredError} + */ + getUserSettings(): Promise { + return localVarFp.getUserSettings().then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * UserSettingsApi - object-oriented interface + * @export + * @class UserSettingsApi + * @extends {BaseAPI} + */ +export class UserSettingsApi extends BaseAPI { + /** + * Lists the settings of an authorized user. Example response contains a shortened list of settings. + * @summary List settings of an authorized user + + * @throws {RequiredError} + * @memberof UserSettingsApi + */ + public getUserSettings() { + return UserSettingsApiFp(this.configuration).getUserSettings().then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/users-api.ts b/api/users-api.ts new file mode 100644 index 00000000..4273efe4 --- /dev/null +++ b/api/users-api.ts @@ -0,0 +1,997 @@ +/* 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 { AddUserRequest } from '../models'; +// @ts-ignore +import { FailResponse } from '../models'; +// @ts-ignore +import { GetCurrentUserResponse200 } from '../models'; +// @ts-ignore +import { GetRoleSettingsResponse200 } from '../models'; +// @ts-ignore +import { GetUserPermissionsResponse200 } from '../models'; +// @ts-ignore +import { GetUserRoleAssignmentsResponse200 } from '../models'; +// @ts-ignore +import { UnathorizedResponse } from '../models'; +// @ts-ignore +import { UpdateUserRequest } from '../models'; +// @ts-ignore +import { UserIds } from '../models'; +// @ts-ignore +import { UserResponse200 } from '../models'; +// @ts-ignore +import { UsersResponse200 } from '../models'; +/** + * UsersApi - axios parameter creator + * @export + */ +export const UsersApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Adds a new user to the company, returns the ID upon success. + * @summary Add a new user + * @param {AddUserRequest} [AddUserRequest] + + * @throws {RequiredError} + */ + addUser: async (AddUserRequest?: AddUserRequest, ): Promise => { + const localVarPath = `/users`; + // 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(AddUserRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Finds users by their name. + * @summary Find users by name + * @param {string} term The search term to look for + * @param {0 | 1} [search_by_email] When enabled, the term will only be matched against email addresses of users. Default: `false`. + + * @throws {RequiredError} + */ + findUsersByName: async (term: string, search_by_email?: 0 | 1, ): Promise => { + // verify required parameter 'term' is not null or undefined + assertParamExists('findUsersByName', 'term', term) + const localVarPath = `/users/find`; + // 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) + + if (term !== undefined) { + localVarQueryParameter['term'] = term; + } + + if (search_by_email !== undefined) { + localVarQueryParameter['search_by_email'] = search_by_email; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns data about an authorized user within the company with bound company data: company ID, company name, and domain. Note that the `locale` property means \'Date/number format\' in the Pipedrive account settings, not the chosen language. + * @summary Get current user data + + * @throws {RequiredError} + */ + getCurrentUser: async (): Promise => { + const localVarPath = `/users/me`; + // 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) + + + + 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 user within the company. + * @summary Get one user + * @param {number} id The ID of the user + + * @throws {RequiredError} + */ + getUser: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getUser', 'id', id) + const localVarPath = `/users/{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", ["users:read"], configuration) + + + + 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 specific user. + * @summary List followers of a user + * @param {number} id The ID of the user + + * @throws {RequiredError} + */ + getUserFollowers: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getUserFollowers', 'id', id) + const localVarPath = `/users/{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", ["users:read"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Lists aggregated permissions over all assigned permission sets for a user. + * @summary List user permissions + * @param {number} id The ID of the user + + * @throws {RequiredError} + */ + getUserPermissions: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getUserPermissions', 'id', id) + const localVarPath = `/users/{id}/permissions` + .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", ["users:read"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Lists role assignments for a user. + * @summary List role assignments + * @param {number} id The ID of the user + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + getUserRoleAssignments: async (id: number, start?: number, limit?: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getUserRoleAssignments', 'id', id) + const localVarPath = `/users/{id}/roleAssignments` + .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", ["users:read"], 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 settings of user\'s assigned role. + * @summary List user role settings + * @param {number} id The ID of the user + + * @throws {RequiredError} + */ + getUserRoleSettings: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getUserRoleSettings', 'id', id) + const localVarPath = `/users/{id}/roleSettings` + .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", ["users:read"], 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 users within the company. + * @summary Get all users + + * @throws {RequiredError} + */ + getUsers: async (): Promise => { + const localVarPath = `/users`; + // 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, + }; + }, + /** + * Updates the properties of a user. Currently, only `active_flag` can be updated. + * @summary Update user details + * @param {number} id The ID of the user + * @param {UpdateUserRequest} [UpdateUserRequest] + + * @throws {RequiredError} + */ + updateUser: async (id: number, UpdateUserRequest?: UpdateUserRequest, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updateUser', 'id', id) + const localVarPath = `/users/{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(UpdateUserRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * UsersApi - functional programming interface + * @export + */ +export const UsersApiFp = 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 = UsersApiAxiosParamCreator(configuration) + return { + /** + * Adds a new user to the company, returns the ID upon success. + * @summary Add a new user + * @param {AddUserRequest} [AddUserRequest] + + * @throws {RequiredError} + */ + async addUser(AddUserRequest?: AddUserRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addUser(AddUserRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Finds users by their name. + * @summary Find users by name + * @param {string} term The search term to look for + * @param {0 | 1} [search_by_email] When enabled, the term will only be matched against email addresses of users. Default: `false`. + + * @throws {RequiredError} + */ + async findUsersByName(term: string, search_by_email?: 0 | 1, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.findUsersByName(term, search_by_email, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns data about an authorized user within the company with bound company data: company ID, company name, and domain. Note that the `locale` property means \'Date/number format\' in the Pipedrive account settings, not the chosen language. + * @summary Get current user data + + * @throws {RequiredError} + */ + async getCurrentUser(): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCurrentUser(); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns data about a specific user within the company. + * @summary Get one user + * @param {number} id The ID of the user + + * @throws {RequiredError} + */ + async getUser(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getUser(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists the followers of a specific user. + * @summary List followers of a user + * @param {number} id The ID of the user + + * @throws {RequiredError} + */ + async getUserFollowers(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getUserFollowers(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists aggregated permissions over all assigned permission sets for a user. + * @summary List user permissions + * @param {number} id The ID of the user + + * @throws {RequiredError} + */ + async getUserPermissions(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getUserPermissions(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists role assignments for a user. + * @summary List role assignments + * @param {number} id The ID of the user + * @param {number} [start] Pagination start + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + async getUserRoleAssignments(id: number, start?: number, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getUserRoleAssignments(id, start, limit, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Lists the settings of user\'s assigned role. + * @summary List user role settings + * @param {number} id The ID of the user + + * @throws {RequiredError} + */ + async getUserRoleSettings(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getUserRoleSettings(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns data about all users within the company. + * @summary Get all users + + * @throws {RequiredError} + */ + async getUsers(): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getUsers(); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Updates the properties of a user. Currently, only `active_flag` can be updated. + * @summary Update user details + * @param {number} id The ID of the user + * @param {UpdateUserRequest} [UpdateUserRequest] + + * @throws {RequiredError} + */ + async updateUser(id: number, UpdateUserRequest?: UpdateUserRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(id, UpdateUserRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * UsersApi - factory interface + * @export + */ +export const UsersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = UsersApiFp(configuration) + return { + /** + * Adds a new user to the company, returns the ID upon success. + * @summary Add a new user + * @param {UsersApiAddUserRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addUser(requestParameters: UsersApiAddUserRequest = {}, ): Promise { + return localVarFp.addUser(requestParameters.AddUserRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Finds users by their name. + * @summary Find users by name + * @param {UsersApiFindUsersByNameRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + findUsersByName(requestParameters: UsersApiFindUsersByNameRequest, ): Promise { + return localVarFp.findUsersByName(requestParameters.term, requestParameters.search_by_email, ).then((request) => request(axios, basePath)); + }, + /** + * Returns data about an authorized user within the company with bound company data: company ID, company name, and domain. Note that the `locale` property means \'Date/number format\' in the Pipedrive account settings, not the chosen language. + * @summary Get current user data + + * @throws {RequiredError} + */ + getCurrentUser(): Promise { + return localVarFp.getCurrentUser().then((request) => request(axios, basePath)); + }, + /** + * Returns data about a specific user within the company. + * @summary Get one user + * @param {UsersApiGetUserRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getUser(requestParameters: UsersApiGetUserRequest, ): Promise { + return localVarFp.getUser(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Lists the followers of a specific user. + * @summary List followers of a user + * @param {UsersApiGetUserFollowersRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getUserFollowers(requestParameters: UsersApiGetUserFollowersRequest, ): Promise { + return localVarFp.getUserFollowers(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Lists aggregated permissions over all assigned permission sets for a user. + * @summary List user permissions + * @param {UsersApiGetUserPermissionsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getUserPermissions(requestParameters: UsersApiGetUserPermissionsRequest, ): Promise { + return localVarFp.getUserPermissions(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Lists role assignments for a user. + * @summary List role assignments + * @param {UsersApiGetUserRoleAssignmentsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getUserRoleAssignments(requestParameters: UsersApiGetUserRoleAssignmentsRequest, ): Promise { + return localVarFp.getUserRoleAssignments(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(axios, basePath)); + }, + /** + * Lists the settings of user\'s assigned role. + * @summary List user role settings + * @param {UsersApiGetUserRoleSettingsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getUserRoleSettings(requestParameters: UsersApiGetUserRoleSettingsRequest, ): Promise { + return localVarFp.getUserRoleSettings(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns data about all users within the company. + * @summary Get all users + + * @throws {RequiredError} + */ + getUsers(): Promise { + return localVarFp.getUsers().then((request) => request(axios, basePath)); + }, + /** + * Updates the properties of a user. Currently, only `active_flag` can be updated. + * @summary Update user details + * @param {UsersApiUpdateUserRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + updateUser(requestParameters: UsersApiUpdateUserRequest, ): Promise { + return localVarFp.updateUser(requestParameters.id, requestParameters.UpdateUserRequest, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for addUser operation in UsersApi. + * @export + * @interface UsersApiAddUserRequest + */ +export interface UsersApiAddUserRequest { + /** + * + * @type {AddUserRequest} + * @memberof UsersApiAddUser + */ + readonly AddUserRequest?: AddUserRequest +} + +/** + * Request parameters for findUsersByName operation in UsersApi. + * @export + * @interface UsersApiFindUsersByNameRequest + */ +export interface UsersApiFindUsersByNameRequest { + /** + * The search term to look for + * @type {string} + * @memberof UsersApiFindUsersByName + */ + readonly term: string + + /** + * When enabled, the term will only be matched against email addresses of users. Default: `false`. + * @type {0 | 1} + * @memberof UsersApiFindUsersByName + */ + readonly search_by_email?: 0 | 1 +} + +/** + * Request parameters for getUser operation in UsersApi. + * @export + * @interface UsersApiGetUserRequest + */ +export interface UsersApiGetUserRequest { + /** + * The ID of the user + * @type {number} + * @memberof UsersApiGetUser + */ + readonly id: number +} + +/** + * Request parameters for getUserFollowers operation in UsersApi. + * @export + * @interface UsersApiGetUserFollowersRequest + */ +export interface UsersApiGetUserFollowersRequest { + /** + * The ID of the user + * @type {number} + * @memberof UsersApiGetUserFollowers + */ + readonly id: number +} + +/** + * Request parameters for getUserPermissions operation in UsersApi. + * @export + * @interface UsersApiGetUserPermissionsRequest + */ +export interface UsersApiGetUserPermissionsRequest { + /** + * The ID of the user + * @type {number} + * @memberof UsersApiGetUserPermissions + */ + readonly id: number +} + +/** + * Request parameters for getUserRoleAssignments operation in UsersApi. + * @export + * @interface UsersApiGetUserRoleAssignmentsRequest + */ +export interface UsersApiGetUserRoleAssignmentsRequest { + /** + * The ID of the user + * @type {number} + * @memberof UsersApiGetUserRoleAssignments + */ + readonly id: number + + /** + * Pagination start + * @type {number} + * @memberof UsersApiGetUserRoleAssignments + */ + readonly start?: number + + /** + * Items shown per page + * @type {number} + * @memberof UsersApiGetUserRoleAssignments + */ + readonly limit?: number +} + +/** + * Request parameters for getUserRoleSettings operation in UsersApi. + * @export + * @interface UsersApiGetUserRoleSettingsRequest + */ +export interface UsersApiGetUserRoleSettingsRequest { + /** + * The ID of the user + * @type {number} + * @memberof UsersApiGetUserRoleSettings + */ + readonly id: number +} + +/** + * Request parameters for updateUser operation in UsersApi. + * @export + * @interface UsersApiUpdateUserRequest + */ +export interface UsersApiUpdateUserRequest { + /** + * The ID of the user + * @type {number} + * @memberof UsersApiUpdateUser + */ + readonly id: number + + /** + * + * @type {UpdateUserRequest} + * @memberof UsersApiUpdateUser + */ + readonly UpdateUserRequest?: UpdateUserRequest +} + +/** + * UsersApi - object-oriented interface + * @export + * @class UsersApi + * @extends {BaseAPI} + */ +export class UsersApi extends BaseAPI { + /** + * Adds a new user to the company, returns the ID upon success. + * @summary Add a new user + * @param {UsersApiAddUserRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof UsersApi + */ + public addUser(requestParameters: UsersApiAddUserRequest = {}, ) { + return UsersApiFp(this.configuration).addUser(requestParameters.AddUserRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Finds users by their name. + * @summary Find users by name + * @param {UsersApiFindUsersByNameRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof UsersApi + */ + public findUsersByName(requestParameters: UsersApiFindUsersByNameRequest, ) { + return UsersApiFp(this.configuration).findUsersByName(requestParameters.term, requestParameters.search_by_email, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about an authorized user within the company with bound company data: company ID, company name, and domain. Note that the `locale` property means \'Date/number format\' in the Pipedrive account settings, not the chosen language. + * @summary Get current user data + + * @throws {RequiredError} + * @memberof UsersApi + */ + public getCurrentUser() { + return UsersApiFp(this.configuration).getCurrentUser().then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about a specific user within the company. + * @summary Get one user + * @param {UsersApiGetUserRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof UsersApi + */ + public getUser(requestParameters: UsersApiGetUserRequest, ) { + return UsersApiFp(this.configuration).getUser(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists the followers of a specific user. + * @summary List followers of a user + * @param {UsersApiGetUserFollowersRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof UsersApi + */ + public getUserFollowers(requestParameters: UsersApiGetUserFollowersRequest, ) { + return UsersApiFp(this.configuration).getUserFollowers(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists aggregated permissions over all assigned permission sets for a user. + * @summary List user permissions + * @param {UsersApiGetUserPermissionsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof UsersApi + */ + public getUserPermissions(requestParameters: UsersApiGetUserPermissionsRequest, ) { + return UsersApiFp(this.configuration).getUserPermissions(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists role assignments for a user. + * @summary List role assignments + * @param {UsersApiGetUserRoleAssignmentsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof UsersApi + */ + public getUserRoleAssignments(requestParameters: UsersApiGetUserRoleAssignmentsRequest, ) { + return UsersApiFp(this.configuration).getUserRoleAssignments(requestParameters.id, requestParameters.start, requestParameters.limit, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Lists the settings of user\'s assigned role. + * @summary List user role settings + * @param {UsersApiGetUserRoleSettingsRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof UsersApi + */ + public getUserRoleSettings(requestParameters: UsersApiGetUserRoleSettingsRequest, ) { + return UsersApiFp(this.configuration).getUserRoleSettings(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about all users within the company. + * @summary Get all users + + * @throws {RequiredError} + * @memberof UsersApi + */ + public getUsers() { + return UsersApiFp(this.configuration).getUsers().then((request) => request(this.axios, this.basePath)); + } + + /** + * Updates the properties of a user. Currently, only `active_flag` can be updated. + * @summary Update user details + * @param {UsersApiUpdateUserRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof UsersApi + */ + public updateUser(requestParameters: UsersApiUpdateUserRequest, ) { + return UsersApiFp(this.configuration).updateUser(requestParameters.id, requestParameters.UpdateUserRequest, ).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/api/webhooks-api.ts b/api/webhooks-api.ts new file mode 100644 index 00000000..454ec7af --- /dev/null +++ b/api/webhooks-api.ts @@ -0,0 +1,340 @@ +/* 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 { AddWebhookRequest } from '../models'; +// @ts-ignore +import { BaseResponse200 } from '../models'; +// @ts-ignore +import { DeleteWebhook403Response } from '../models'; +// @ts-ignore +import { GetWebhooksResponse200 } from '../models'; +// @ts-ignore +import { UnathorizedResponse } from '../models'; +// @ts-ignore +import { WebhookResponse200 } from '../models'; +// @ts-ignore +import { WebhooksBadRequestResponse } from '../models'; +/** + * WebhooksApi - axios parameter creator + * @export + */ +export const WebhooksApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Creates a new Webhook and returns its details. Note that specifying an event which triggers the Webhook combines 2 parameters - `event_action` and `event_object`. E.g., use `*.*` for getting notifications about all events, `added.deal` for any newly added deals, `deleted.persons` for any deleted persons, etc. See the guide for Webhooks for more details. + * @summary Create a new Webhook + * @param {AddWebhookRequest} [AddWebhookRequest] + + * @throws {RequiredError} + */ + addWebhook: async (AddWebhookRequest?: AddWebhookRequest, ): Promise => { + const localVarPath = `/webhooks`; + // 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(AddWebhookRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Deletes the specified Webhook. + * @summary Delete existing Webhook + * @param {number} id The ID of the Webhook to delete + + * @throws {RequiredError} + */ + deleteWebhook: async (id: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteWebhook', 'id', id) + const localVarPath = `/webhooks/{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, + }; + }, + /** + * Returns data about all the Webhooks of a company. + * @summary Get all Webhooks + + * @throws {RequiredError} + */ + getWebhooks: async (): Promise => { + const localVarPath = `/webhooks`; + // 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", ["admin"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * WebhooksApi - functional programming interface + * @export + */ +export const WebhooksApiFp = 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 = WebhooksApiAxiosParamCreator(configuration) + return { + /** + * Creates a new Webhook and returns its details. Note that specifying an event which triggers the Webhook combines 2 parameters - `event_action` and `event_object`. E.g., use `*.*` for getting notifications about all events, `added.deal` for any newly added deals, `deleted.persons` for any deleted persons, etc. See the guide for Webhooks for more details. + * @summary Create a new Webhook + * @param {AddWebhookRequest} [AddWebhookRequest] + + * @throws {RequiredError} + */ + async addWebhook(AddWebhookRequest?: AddWebhookRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addWebhook(AddWebhookRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Deletes the specified Webhook. + * @summary Delete existing Webhook + * @param {number} id The ID of the Webhook to delete + + * @throws {RequiredError} + */ + async deleteWebhook(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteWebhook(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns data about all the Webhooks of a company. + * @summary Get all Webhooks + + * @throws {RequiredError} + */ + async getWebhooks(): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getWebhooks(); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * WebhooksApi - factory interface + * @export + */ +export const WebhooksApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = WebhooksApiFp(configuration) + return { + /** + * Creates a new Webhook and returns its details. Note that specifying an event which triggers the Webhook combines 2 parameters - `event_action` and `event_object`. E.g., use `*.*` for getting notifications about all events, `added.deal` for any newly added deals, `deleted.persons` for any deleted persons, etc. See the guide for Webhooks for more details. + * @summary Create a new Webhook + * @param {WebhooksApiAddWebhookRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + addWebhook(requestParameters: WebhooksApiAddWebhookRequest = {}, ): Promise { + return localVarFp.addWebhook(requestParameters.AddWebhookRequest, ).then((request) => request(axios, basePath)); + }, + /** + * Deletes the specified Webhook. + * @summary Delete existing Webhook + * @param {WebhooksApiDeleteWebhookRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteWebhook(requestParameters: WebhooksApiDeleteWebhookRequest, ): Promise { + return localVarFp.deleteWebhook(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * Returns data about all the Webhooks of a company. + * @summary Get all Webhooks + + * @throws {RequiredError} + */ + getWebhooks(): Promise { + return localVarFp.getWebhooks().then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for addWebhook operation in WebhooksApi. + * @export + * @interface WebhooksApiAddWebhookRequest + */ +export interface WebhooksApiAddWebhookRequest { + /** + * + * @type {AddWebhookRequest} + * @memberof WebhooksApiAddWebhook + */ + readonly AddWebhookRequest?: AddWebhookRequest +} + +/** + * Request parameters for deleteWebhook operation in WebhooksApi. + * @export + * @interface WebhooksApiDeleteWebhookRequest + */ +export interface WebhooksApiDeleteWebhookRequest { + /** + * The ID of the Webhook to delete + * @type {number} + * @memberof WebhooksApiDeleteWebhook + */ + readonly id: number +} + +/** + * WebhooksApi - object-oriented interface + * @export + * @class WebhooksApi + * @extends {BaseAPI} + */ +export class WebhooksApi extends BaseAPI { + /** + * Creates a new Webhook and returns its details. Note that specifying an event which triggers the Webhook combines 2 parameters - `event_action` and `event_object`. E.g., use `*.*` for getting notifications about all events, `added.deal` for any newly added deals, `deleted.persons` for any deleted persons, etc. See the guide for Webhooks for more details. + * @summary Create a new Webhook + * @param {WebhooksApiAddWebhookRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof WebhooksApi + */ + public addWebhook(requestParameters: WebhooksApiAddWebhookRequest = {}, ) { + return WebhooksApiFp(this.configuration).addWebhook(requestParameters.AddWebhookRequest, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Deletes the specified Webhook. + * @summary Delete existing Webhook + * @param {WebhooksApiDeleteWebhookRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof WebhooksApi + */ + public deleteWebhook(requestParameters: WebhooksApiDeleteWebhookRequest, ) { + return WebhooksApiFp(this.configuration).deleteWebhook(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns data about all the Webhooks of a company. + * @summary Get all Webhooks + + * @throws {RequiredError} + * @memberof WebhooksApi + */ + public getWebhooks() { + return WebhooksApiFp(this.configuration).getWebhooks().then((request) => request(this.axios, this.basePath)); + } +} diff --git a/base.ts b/base.ts new file mode 100644 index 00000000..3a9ddd81 --- /dev/null +++ b/base.ts @@ -0,0 +1,74 @@ +/* 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'; +// Some imports not used depending on template conditions +// @ts-ignore +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; + +export const BASE_PATH = "https://api.pipedrive.com/v1".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: AxiosRequestConfig; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + protected basePath: string = BASE_PATH; + protected axios = globalAxios; + + constructor(configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + constructor(public field: string, msg?: string) { + super(msg); + this.name = "RequiredError" + } +} diff --git a/common.ts b/common.ts new file mode 100644 index 00000000..4ec37d93 --- /dev/null +++ b/common.ts @@ -0,0 +1,149 @@ +/* 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 { Configuration } from "./configuration"; +import { RequiredError, RequestArgs } from "./base"; +import { AxiosInstance, AxiosResponse } from 'axios'; +import { URL, URLSearchParams } from 'url'; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (typeof parameter === "object") { + if (Array.isArray(parameter)) { + (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); + } + else { + Object.keys(parameter).forEach(currentKey => + setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) + ); + } + } + else { + if (urlSearchParams.has(key)) { + urlSearchParams.append(key, parameter); + } + else { + urlSearchParams.set(key, parameter); + } + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + setFlattenedQueryParams(searchParams, objects); + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/configuration.ts b/configuration.ts new file mode 100644 index 00000000..9f5675d4 --- /dev/null +++ b/configuration.ts @@ -0,0 +1,307 @@ +/* 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 globalAxios from "axios"; +import { stringify } from "qs"; + +export type TokenResponse = { + access_token: string; + refresh_token: string; + token_type: string; + expires_in: number; + scope: string; + api_domain: string; +}; + +export interface Parameters { + clientId: string; + clientSecret: string; + redirectUri: string; +}; + +export type ParamKey = keyof Parameters; + +export class OAuth2Configuration { + private host = "https://oauth.pipedrive.com"; + private accessToken: string | null = null; + private refreshToken: string | null = null; + private scope: string | null = null; + private expiresIn = 0; // expiration value in seconds sent by the OAuth server. + private expiresAt = 0; // expiration time as number of milliseconds elapsed since January 1, 1970 00:00:00 UTC. + + public onTokenUpdate?: (token: TokenResponse) => void; + private clientId: string; + private clientSecret: string; + private redirectUri: string; + public basePath = ""; + + constructor(params: Parameters) { + this.clientId = this.validateParam(params, 'clientId'); + this.clientSecret = this.validateParam(params, 'clientSecret'); + this.redirectUri = this.validateParam(params, 'redirectUri'); + } + + public get authorizationUrl() { + return `${this.host}/oauth/authorize?client_id=${ + this.clientId + }&redirect_uri=${encodeURIComponent(this.redirectUri)}`; + } + + public getAccessToken = async (): Promise => { + if (Date.now() > this.expiresAt) { + const newToken = await this.tokenRefresh(); + this.updateToken(newToken); + + return newToken.access_token; + } + + return this.accessToken!; + }; + + /** + * Authorizes the authorization code sent by the server and returns OAuth 2 token. + * @param {String} code The authorization code sent by the OAuth server. + * @returns {Object} The OAuth 2 token. + */ + public authorize = async (code: string): Promise => { + if (!code) { + throw new Error("Authorization failed. Authorization code is not set."); + } + + const authorizationUrl = `${this.host}/oauth/token`; + + const clientIdAndSecretInBase64 = Buffer.from( + `${this.clientId}:${this.clientSecret}` + ).toString("base64"); + + const response = await globalAxios.post( + authorizationUrl, + stringify({ + code, + redirect_uri: this.redirectUri, + grant_type: "authorization_code", + }), + { + headers: { + "User-Agent": this.getUserAgent(), + "Content-Type": "application/x-www-form-urlencoded", + Authorization: `Basic ${clientIdAndSecretInBase64}`, + }, + } + ) as TokenResponse; + + this.updateToken(response); + + return response; + }; + + public tokenRefresh = async (): Promise => { + const refreshUrl = `${this.host}/oauth/token`; + const clientIdAndSecretInBase64 = Buffer.from( + `${this.clientId}:${this.clientSecret}` + ).toString("base64"); + + const response = await globalAxios.post( + refreshUrl, + stringify({ + refresh_token: this.refreshToken, + grant_type: "refresh_token", + }), + { + headers: { + "User-Agent": this.getUserAgent(), + "Content-Type": "application/x-www-form-urlencoded", + Authorization: `Basic ${clientIdAndSecretInBase64}`, + }, + } + ) as TokenResponse; + + this.updateToken(response); + + return response; + }; + + + /* + * Updates the ApiClient OAuth 2 authentication properties and invokes the token update callback if it is set. + * Besides extracting all the values from the provided OAuth 2 token, + * the expiration time of access token is calculated and set as expiresAt property. + * @param {Object} token The OAuth 2 token got from the OAuth server. + */ + public updateToken = (token: TokenResponse | null) => { + if (!token) { + return null; + } + + if (token.access_token) { + this.accessToken = token.access_token; + } + + if (token.refresh_token) { + this.refreshToken = token.refresh_token; + } + + if (token.expires_in) { + this.expiresIn = token.expires_in; + this.expiresAt = Date.now() + token.expires_in * 1000; + } + + if (token.scope) { + this.scope = token.scope; + } + + if (token.api_domain) { + this.basePath = `${token.api_domain}/api/v1`; + } + + this.onTokenUpdate?.(token); + + return token; + }; + +/** + * Revoke Refresh Token aka marking an app uninstalled or revoke the Access Token. + * @param {String} tokenTypeHint values can be: 'access_token' or 'refresh_token'. +*/ + public async revokeToken(tokenTypeHint?: 'access_token' | 'refresh_token') { + + const token = tokenTypeHint === 'refresh_token' + ? this.refreshToken : encodeURIComponent(this.accessToken); + + const clientId = this.clientId; + const clientSecret = this.clientSecret; + const revokeUrl = `${this.host}/oauth/revoke?`; + const clientIdAndSecretInBase64 = Buffer.from(`${clientId}:${clientSecret}`).toString('base64'); + + const response = await globalAxios.post( + revokeUrl, + stringify({ + token, + token_type_hint: tokenTypeHint + }),{ + headers: { + 'User-Agent': this.getUserAgent(), + "Content-Type": "application/x-www-form-urlencoded", + 'Authorization': `Basic ${clientIdAndSecretInBase64}`, + + } + } + ); + + return response; + } + + private getUserAgent = () => { + const version = require("../package.json").version; + return `Pipedrive-SDK-Javascript-${version}`; + }; + + private validateParam = (params: Parameters, key: ParamKey): string => { + if (!params[key]) { + throw new Error(`OAuth 2 property ${key} is not set.`); + } + return params[key]; + } +} + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + formDataCtor?: new () => any; + basePath?: string; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters) { + this.apiKey = param.apiKey; + this.accessToken = param.accessToken; + this.formDataCtor = param.formDataCtor; + this.basePath = param.basePath; + + /** Values either not supported or set by the packaged already **/ + this.username = undefined; + this.password = undefined; + this.baseOptions = undefined; + + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} + + diff --git a/git_push.sh b/git_push.sh index ced3be2b..f53a75d4 100644 --- a/git_push.sh +++ b/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git remote` +git_remote=$(git remote) if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -55,4 +55,3 @@ git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' - diff --git a/index.ts b/index.ts new file mode 100644 index 00000000..5758cdab --- /dev/null +++ b/index.ts @@ -0,0 +1,18 @@ +/* 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"; +export * from "./configuration"; +export * from "./models"; diff --git a/models/activity-collection-response-object-all-of.ts b/models/activity-collection-response-object-all-of.ts new file mode 100644 index 00000000..b2a409ad --- /dev/null +++ b/models/activity-collection-response-object-all-of.ts @@ -0,0 +1,180 @@ +/* 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 + * @interface ActivityCollectionResponseObjectAllOf + */ +export interface ActivityCollectionResponseObjectAllOf { + /** + * The ID of the activity, generated when the activity was created + * @type {number} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'id'?: number; + /** + * Whether the activity is done or not + * @type {boolean} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'done'?: boolean; + /** + * The subject of the activity + * @type {string} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'subject'?: string; + /** + * The type of the activity. This is in correlation with the `key_string` parameter of ActivityTypes. + * @type {string} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'type'?: string; + /** + * The ID of the user whom the activity is assigned to + * @type {number} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'user_id'?: number; + /** + * Marks if the activity is set as \'Busy\' or \'Free\'. If the flag is set to `true`, your customers will not be able to book that time slot through any Scheduler links. The flag can also be unset. When the value of the flag is unset (`null`), the flag defaults to \'Busy\' if it has a time set, and \'Free\' if it is an all-day event without specified time. + * @type {boolean} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'busy_flag'?: boolean; + /** + * The user\'s company ID + * @type {number} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'company_id'?: number; + /** + * The ID of the Marketplace app, which is connected to this activity + * @type {string} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'conference_meeting_client'?: string; + /** + * The link to join the meeting which is associated with this activity + * @type {string} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'conference_meeting_url'?: string; + /** + * The meeting ID of the meeting provider (Zoom, MS Teams etc.) that is associated with this activity + * @type {string} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'conference_meeting_id'?: string; + /** + * The creation date and time of the activity in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'add_time'?: string; + /** + * The date and time this activity was marked as done. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'marked_as_done_time'?: string; + /** + * Whether the activity is active or not + * @type {boolean} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'active_flag'?: boolean; + /** + * The last update date and time of the activity. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'update_time'?: string; + /** + * The ID of the user who was the last to update this activity + * @type {number} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'update_user_id'?: number; + /** + * The timezone the activity was created in an external calendar + * @type {string} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'source_timezone'?: string; + /** + * A subfield of the location field. Indicates apartment/suite number. + * @type {string} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'location_subpremise'?: string; + /** + * A subfield of the location field. Indicates house number. + * @type {string} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'location_street_number'?: string; + /** + * A subfield of the location field. Indicates street name. + * @type {string} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'location_route'?: string; + /** + * A subfield of the location field. Indicates district/sublocality. + * @type {string} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'location_sublocality'?: string; + /** + * A subfield of the location field. Indicates city/town/village/locality. + * @type {string} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'location_locality'?: string; + /** + * A subfield of the location field. Indicates state/county. + * @type {string} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'location_admin_area_level_1'?: string; + /** + * A subfield of the location field. Indicates region. + * @type {string} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'location_admin_area_level_2'?: string; + /** + * A subfield of the location field. Indicates country. + * @type {string} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'location_country'?: string; + /** + * A subfield of the location field. Indicates ZIP/postal code. + * @type {string} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'location_postal_code'?: string; + /** + * A subfield of the location field. Indicates full/combined address. + * @type {string} + * @memberof ActivityCollectionResponseObjectAllOf + */ + 'location_formatted_address'?: string; +} + diff --git a/models/activity-collection-response-object.ts b/models/activity-collection-response-object.ts new file mode 100644 index 00000000..f1bbec79 --- /dev/null +++ b/models/activity-collection-response-object.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ActivityCollectionResponseObjectAllOf } from './activity-collection-response-object-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { ActivityResponseObjectAllOf } from './activity-response-object-all-of'; + +/** + * @type ActivityCollectionResponseObject + * @export + */ +export type ActivityCollectionResponseObject = ActivityCollectionResponseObjectAllOf & ActivityResponseObjectAllOf; + + diff --git a/models/activity-distribution-data-with-additional-data-all-of-activity-distribution-assignedtouserid.ts b/models/activity-distribution-data-with-additional-data-all-of-activity-distribution-assignedtouserid.ts new file mode 100644 index 00000000..87af5d6b --- /dev/null +++ b/models/activity-distribution-data-with-additional-data-all-of-activity-distribution-assignedtouserid.ts @@ -0,0 +1,51 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ActivityDistributionDataWithAdditionalDataAllOfActivityDistributionASSIGNEDTOUSERIDActivities } from './activity-distribution-data-with-additional-data-all-of-activity-distribution-assignedtouseridactivities'; + +/** + * The ID of the user + * @export + * @interface ActivityDistributionDataWithAdditionalDataAllOfActivityDistributionASSIGNEDTOUSERID + */ +export interface ActivityDistributionDataWithAdditionalDataAllOfActivityDistributionASSIGNEDTOUSERID { + /** + * + * @type {ActivityDistributionDataWithAdditionalDataAllOfActivityDistributionASSIGNEDTOUSERIDActivities} + * @memberof ActivityDistributionDataWithAdditionalDataAllOfActivityDistributionASSIGNEDTOUSERID + */ + 'activities'?: ActivityDistributionDataWithAdditionalDataAllOfActivityDistributionASSIGNEDTOUSERIDActivities; + /** + * The name of the user + * @type {string} + * @memberof ActivityDistributionDataWithAdditionalDataAllOfActivityDistributionASSIGNEDTOUSERID + */ + 'name'?: string; + /** + * The overall count of activities for the user + * @type {number} + * @memberof ActivityDistributionDataWithAdditionalDataAllOfActivityDistributionASSIGNEDTOUSERID + */ + 'activity_count'?: number; + /** + * The percentage of activities belongs to the user + * @type {number} + * @memberof ActivityDistributionDataWithAdditionalDataAllOfActivityDistributionASSIGNEDTOUSERID + */ + 'share'?: number; +} + diff --git a/models/activity-distribution-data-with-additional-data-all-of-activity-distribution-assignedtouseridactivities.ts b/models/activity-distribution-data-with-additional-data-all-of-activity-distribution-assignedtouseridactivities.ts new file mode 100644 index 00000000..00dd35b9 --- /dev/null +++ b/models/activity-distribution-data-with-additional-data-all-of-activity-distribution-assignedtouseridactivities.ts @@ -0,0 +1,30 @@ +/* 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. + */ + + + +/** + * The count of activities related to the user grouped by activity type + * @export + * @interface ActivityDistributionDataWithAdditionalDataAllOfActivityDistributionASSIGNEDTOUSERIDActivities + */ +export interface ActivityDistributionDataWithAdditionalDataAllOfActivityDistributionASSIGNEDTOUSERIDActivities { + /** + * The count of activities related to a specific type + * @type {number} + * @memberof ActivityDistributionDataWithAdditionalDataAllOfActivityDistributionASSIGNEDTOUSERIDActivities + */ + 'ACTIVITY_TYPE_NAME'?: number; +} + diff --git a/models/activity-distribution-data-with-additional-data-all-of-activity-distribution.ts b/models/activity-distribution-data-with-additional-data-all-of-activity-distribution.ts new file mode 100644 index 00000000..7a957a18 --- /dev/null +++ b/models/activity-distribution-data-with-additional-data-all-of-activity-distribution.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ActivityDistributionDataWithAdditionalDataAllOfActivityDistributionASSIGNEDTOUSERID } from './activity-distribution-data-with-additional-data-all-of-activity-distribution-assignedtouserid'; + +/** + * The distribution of activities related to the organization grouped by the user ID + * @export + * @interface ActivityDistributionDataWithAdditionalDataAllOfActivityDistribution + */ +export interface ActivityDistributionDataWithAdditionalDataAllOfActivityDistribution { + /** + * + * @type {ActivityDistributionDataWithAdditionalDataAllOfActivityDistributionASSIGNEDTOUSERID} + * @memberof ActivityDistributionDataWithAdditionalDataAllOfActivityDistribution + */ + 'ASSIGNED_TO_USER_ID'?: ActivityDistributionDataWithAdditionalDataAllOfActivityDistributionASSIGNEDTOUSERID; +} + diff --git a/models/activity-distribution-data-with-additional-data-all-of.ts b/models/activity-distribution-data-with-additional-data-all-of.ts new file mode 100644 index 00000000..712b78b6 --- /dev/null +++ b/models/activity-distribution-data-with-additional-data-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ActivityDistributionDataWithAdditionalDataAllOfActivityDistribution } from './activity-distribution-data-with-additional-data-all-of-activity-distribution'; + +/** + * + * @export + * @interface ActivityDistributionDataWithAdditionalDataAllOf + */ +export interface ActivityDistributionDataWithAdditionalDataAllOf { + /** + * + * @type {ActivityDistributionDataWithAdditionalDataAllOfActivityDistribution} + * @memberof ActivityDistributionDataWithAdditionalDataAllOf + */ + 'activity_distribution'?: ActivityDistributionDataWithAdditionalDataAllOfActivityDistribution; +} + diff --git a/models/activity-distribution-data-with-additional-data.ts b/models/activity-distribution-data-with-additional-data.ts new file mode 100644 index 00000000..8a6e67bc --- /dev/null +++ b/models/activity-distribution-data-with-additional-data.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ActivityDistributionDataWithAdditionalDataAllOf } from './activity-distribution-data-with-additional-data-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { ActivityDistributionDataWithAdditionalDataAllOfActivityDistribution } from './activity-distribution-data-with-additional-data-all-of-activity-distribution'; +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; + +/** + * @type ActivityDistributionDataWithAdditionalData + * @export + */ +export type ActivityDistributionDataWithAdditionalData = ActivityDistributionDataWithAdditionalDataAllOf & FieldsResponse200AllOfAdditionalData; + + diff --git a/models/activity-response-object-all-of.ts b/models/activity-response-object-all-of.ts new file mode 100644 index 00000000..4b5281e1 --- /dev/null +++ b/models/activity-response-object-all-of.ts @@ -0,0 +1,84 @@ +/* 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 + * @interface ActivityResponseObjectAllOf + */ +export interface ActivityResponseObjectAllOf { + /** + * The due date of the activity. Format: YYYY-MM-DD + * @type {string} + * @memberof ActivityResponseObjectAllOf + */ + 'due_date'?: string; + /** + * The due time of the activity in UTC. Format: HH:MM + * @type {string} + * @memberof ActivityResponseObjectAllOf + */ + 'due_time'?: string; + /** + * The duration of the activity. Format: HH:MM + * @type {string} + * @memberof ActivityResponseObjectAllOf + */ + 'duration'?: string; + /** + * The ID of the deal this activity is associated with + * @type {number} + * @memberof ActivityResponseObjectAllOf + */ + 'deal_id'?: number; + /** + * The ID of the lead in the UUID format this activity is associated with + * @type {string} + * @memberof ActivityResponseObjectAllOf + */ + 'lead_id'?: string | null; + /** + * The ID of the person this activity is associated with + * @type {number} + * @memberof ActivityResponseObjectAllOf + */ + 'person_id'?: number; + /** + * The ID of the project this activity is associated with + * @type {number} + * @memberof ActivityResponseObjectAllOf + */ + 'project_id'?: number | null; + /** + * The ID of the organization this activity is associated with + * @type {number} + * @memberof ActivityResponseObjectAllOf + */ + 'org_id'?: number; + /** + * The address of the activity. Pipedrive will automatically check if the location matches a geo-location on Google maps. + * @type {string} + * @memberof ActivityResponseObjectAllOf + */ + 'location'?: string; + /** + * Additional details about the activity that is synced to your external calendar. Unlike the note added to the activity, the description is publicly visible to any guests added to the activity. + * @type {string} + * @memberof ActivityResponseObjectAllOf + */ + 'public_description'?: string; +} + diff --git a/models/activity-response-object-all-of1.ts b/models/activity-response-object-all-of1.ts new file mode 100644 index 00000000..294310b6 --- /dev/null +++ b/models/activity-response-object-all-of1.ts @@ -0,0 +1,330 @@ +/* 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 + * @interface ActivityResponseObjectAllOf1 + */ +export interface ActivityResponseObjectAllOf1 { + /** + * The ID of the activity, generated when the activity was created + * @type {number} + * @memberof ActivityResponseObjectAllOf1 + */ + 'id'?: number; + /** + * The note of the activity (HTML format) + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'note'?: string; + /** + * Whether the activity is done or not + * @type {boolean} + * @memberof ActivityResponseObjectAllOf1 + */ + 'done'?: boolean; + /** + * The subject of the activity + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'subject'?: string; + /** + * The type of the activity. This is in correlation with the `key_string` parameter of ActivityTypes. + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'type'?: string; + /** + * The ID of the user whom the activity is assigned to + * @type {number} + * @memberof ActivityResponseObjectAllOf1 + */ + 'user_id'?: number; + /** + * List of multiple persons (participants) this activity is associated with + * @type {Array} + * @memberof ActivityResponseObjectAllOf1 + */ + 'participants'?: Array | null; + /** + * Marks if the activity is set as \'Busy\' or \'Free\'. If the flag is set to `true`, your customers will not be able to book that time slot through any Scheduler links. The flag can also be unset. When the value of the flag is unset (`null`), the flag defaults to \'Busy\' if it has a time set, and \'Free\' if it is an all-day event without specified time. + * @type {boolean} + * @memberof ActivityResponseObjectAllOf1 + */ + 'busy_flag'?: boolean; + /** + * The attendees of the activity. This can be either your existing Pipedrive contacts or an external email address. + * @type {Array} + * @memberof ActivityResponseObjectAllOf1 + */ + 'attendees'?: Array | null; + /** + * The user\'s company ID + * @type {number} + * @memberof ActivityResponseObjectAllOf1 + */ + 'company_id'?: number; + /** + * If the activity references some other object, it is indicated here. For example, value `Salesphone` refers to activities created with Caller. + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'reference_type'?: string; + /** + * Together with the `reference_type`, gives the ID of the other object + * @type {number} + * @memberof ActivityResponseObjectAllOf1 + */ + 'reference_id'?: number; + /** + * The ID of the Marketplace app, which is connected to this activity + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'conference_meeting_client'?: string; + /** + * The link to join the meeting which is associated with this activity + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'conference_meeting_url'?: string; + /** + * The meeting ID of the meeting provider (Zoom, MS Teams etc.) that is associated with this activity + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'conference_meeting_id'?: string; + /** + * The creation date and time of the activity in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'add_time'?: string; + /** + * The date and time this activity was marked as done. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'marked_as_done_time'?: string; + /** + * The date and time of latest notifications sent about this activity to the participants or the attendees of this activity + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'last_notification_time'?: string; + /** + * The ID of the user who triggered the sending of the latest notifications about this activity to the participants or the attendees of this activity + * @type {number} + * @memberof ActivityResponseObjectAllOf1 + */ + 'last_notification_user_id'?: number; + /** + * The ID of the language the notifications are sent in + * @type {number} + * @memberof ActivityResponseObjectAllOf1 + */ + 'notification_language_id'?: number; + /** + * Whether the activity is active or not + * @type {boolean} + * @memberof ActivityResponseObjectAllOf1 + */ + 'active_flag'?: boolean; + /** + * The last update date and time of the activity. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'update_time'?: string; + /** + * The ID of the user who was the last to update this activity + * @type {number} + * @memberof ActivityResponseObjectAllOf1 + */ + 'update_user_id'?: number; + /** + * For the activity which syncs to Google calendar, this is the Google event ID. NB! This field is related to old Google calendar sync and will be deprecated soon. + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'gcal_event_id'?: string; + /** + * The Google calendar ID that this activity syncs to. NB! This field is related to old Google calendar sync and will be deprecated soon. + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'google_calendar_id'?: string; + /** + * The Google calendar API etag (version) that is used for syncing this activity. NB! This field is related to old Google calendar sync and will be deprecated soon. + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'google_calendar_etag'?: string; + /** + * For activities that sync to an external calendar, this setting indicates if the activity syncs with context (what are the deals, persons, organizations this activity is related to) + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'calendar_sync_include_context'?: string; + /** + * The timezone the activity was created in an external calendar + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'source_timezone'?: string; + /** + * The rule for the recurrence of the activity. Is important for activities synced into Pipedrive from an external calendar. Example: \"RRULE:FREQ=WEEKLY;BYDAY=WE\" + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'rec_rule'?: string; + /** + * Additional rules for the recurrence of the activity, extend the `rec_rule`. Is important for activities synced into Pipedrive from an external calendar. + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'rec_rule_extension'?: string; + /** + * The ID of parent activity for a recurrent activity if the current activity is an exception to recurrence rules + * @type {number} + * @memberof ActivityResponseObjectAllOf1 + */ + 'rec_master_activity_id'?: number; + /** + * The list of recurring activity instances. It is in a structure as follows: `[{due_date: \"2020-06-24\", due_time: \"10:00:00\"}]` + * @type {Array} + * @memberof ActivityResponseObjectAllOf1 + */ + 'series'?: Array; + /** + * The ID of the user who created the activity + * @type {number} + * @memberof ActivityResponseObjectAllOf1 + */ + 'created_by_user_id'?: number; + /** + * A subfield of the location field. Indicates apartment/suite number. + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'location_subpremise'?: string; + /** + * A subfield of the location field. Indicates house number. + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'location_street_number'?: string; + /** + * A subfield of the location field. Indicates street name. + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'location_route'?: string; + /** + * A subfield of the location field. Indicates district/sublocality. + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'location_sublocality'?: string; + /** + * A subfield of the location field. Indicates city/town/village/locality. + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'location_locality'?: string; + /** + * A subfield of the location field. Indicates state/county. + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'location_admin_area_level_1'?: string; + /** + * A subfield of the location field. Indicates region. + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'location_admin_area_level_2'?: string; + /** + * A subfield of the location field. Indicates country. + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'location_country'?: string; + /** + * A subfield of the location field. Indicates ZIP/postal code. + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'location_postal_code'?: string; + /** + * A subfield of the location field. Indicates full/combined address. + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'location_formatted_address'?: string; + /** + * The name of the organization this activity is associated with + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'org_name'?: string; + /** + * The name of the person this activity is associated with + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'person_name'?: string; + /** + * The name of the deal this activity is associated with + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'deal_title'?: string; + /** + * The name of the user this activity is owned by + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'owner_name'?: string; + /** + * The BCC email address of the person + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'person_dropbox_bcc'?: string; + /** + * The BCC email address of the deal + * @type {string} + * @memberof ActivityResponseObjectAllOf1 + */ + 'deal_dropbox_bcc'?: string; + /** + * The ID of the user to whom the activity is assigned to. Equal to `user_id`. + * @type {number} + * @memberof ActivityResponseObjectAllOf1 + */ + 'assigned_to_user_id'?: number; + /** + * The file that is attached to this activity. For example, this can be a reference to an audio note file generated with Pipedrive mobile app. + * @type {object} + * @memberof ActivityResponseObjectAllOf1 + */ + 'file'?: object; +} + diff --git a/models/activity-response-object.ts b/models/activity-response-object.ts new file mode 100644 index 00000000..10e32c84 --- /dev/null +++ b/models/activity-response-object.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ActivityResponseObjectAllOf } from './activity-response-object-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { ActivityResponseObjectAllOf1 } from './activity-response-object-all-of1'; + +/** + * @type ActivityResponseObject + * @export + */ +export type ActivityResponseObject = ActivityResponseObjectAllOf & ActivityResponseObjectAllOf1; + + diff --git a/models/add-activity-request-all-of.ts b/models/add-activity-request-all-of.ts new file mode 100644 index 00000000..8bde45c3 --- /dev/null +++ b/models/add-activity-request-all-of.ts @@ -0,0 +1,80 @@ +/* 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 + * @interface AddActivityRequestAllOf + */ +export interface AddActivityRequestAllOf { + /** + * The note of the activity (HTML format) + * @type {string} + * @memberof AddActivityRequestAllOf + */ + 'note'?: string; + /** + * The subject of the activity. When value for subject is not set, it will be given a default value `Call`. + * @type {string} + * @memberof AddActivityRequestAllOf + */ + 'subject'?: string; + /** + * The type of the activity. This is in correlation with the `key_string` parameter of ActivityTypes. When value for type is not set, it will be given a default value `Call`. + * @type {string} + * @memberof AddActivityRequestAllOf + */ + 'type'?: string; + /** + * The ID of the user whom the activity is assigned to. If omitted, the activity is assigned to the authorized user. + * @type {number} + * @memberof AddActivityRequestAllOf + */ + 'user_id'?: number; + /** + * List of multiple persons (participants) this activity is associated with. If omitted, single participant from `person_id` field is used. It requires a structure as follows: `[{\"person_id\":1,\"primary_flag\":true}]` + * @type {Array} + * @memberof AddActivityRequestAllOf + */ + 'participants'?: Array; + /** + * Set the activity as \'Busy\' or \'Free\'. If the flag is set to `true`, your customers will not be able to book that time slot through any Scheduler links. The flag can also be unset by never setting it or overriding it with `null`. When the value of the flag is unset (`null`), the flag defaults to \'Busy\' if it has a time set, and \'Free\' if it is an all-day event without specified time. + * @type {boolean} + * @memberof AddActivityRequestAllOf + */ + 'busy_flag'?: boolean; + /** + * The attendees of the activity. This can be either your existing Pipedrive contacts or an external email address. It requires a structure as follows: `[{\"email_address\":\"mail@example.org\"}]` or `[{\"person_id\":1, \"email_address\":\"mail@example.org\"}]` + * @type {Array} + * @memberof AddActivityRequestAllOf + */ + 'attendees'?: Array; + /** + * + * @type {number} + * @memberof AddActivityRequestAllOf + */ + 'done'?: AddActivityRequestAllOfDoneConst; +} + +export const AddActivityRequestAllOfDoneConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type AddActivityRequestAllOfDoneConst = typeof AddActivityRequestAllOfDoneConst[keyof typeof AddActivityRequestAllOfDoneConst]; + + diff --git a/models/add-activity-request.ts b/models/add-activity-request.ts new file mode 100644 index 00000000..69e72fe1 --- /dev/null +++ b/models/add-activity-request.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ActivityResponseObjectAllOf } from './activity-response-object-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityRequestAllOf } from './add-activity-request-all-of'; + +/** + * @type AddActivityRequest + * @export + */ +export type AddActivityRequest = ActivityResponseObjectAllOf & AddActivityRequestAllOf; + + diff --git a/models/add-activity-response200-additional-data.ts b/models/add-activity-response200-additional-data.ts new file mode 100644 index 00000000..1c9a502b --- /dev/null +++ b/models/add-activity-response200-additional-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface AddActivityResponse200AdditionalData + */ +export interface AddActivityResponse200AdditionalData { + /** + * This field will be deprecated + * @type {number} + * @memberof AddActivityResponse200AdditionalData + */ + 'updates_story_id'?: number; +} + diff --git a/models/add-activity-response200-related-objects-organization-organizationid.ts b/models/add-activity-response200-related-objects-organization-organizationid.ts new file mode 100644 index 00000000..e9339970 --- /dev/null +++ b/models/add-activity-response200-related-objects-organization-organizationid.ts @@ -0,0 +1,30 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityResponse200RelatedObjectsOrganizationORGANIZATIONIDAllOf } from './add-activity-response200-related-objects-organization-organizationidall-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsOrganizationORGANIZATIONID } from './get-activities-response200-related-objects-organization-organizationid'; + +/** + * @type AddActivityResponse200RelatedObjectsOrganizationORGANIZATIONID + * The ID of the organization associated with the item + * @export + */ +export type AddActivityResponse200RelatedObjectsOrganizationORGANIZATIONID = AddActivityResponse200RelatedObjectsOrganizationORGANIZATIONIDAllOf & GetActivitiesResponse200RelatedObjectsOrganizationORGANIZATIONID; + + diff --git a/models/add-activity-response200-related-objects-organization-organizationidall-of.ts b/models/add-activity-response200-related-objects-organization-organizationidall-of.ts new file mode 100644 index 00000000..666401a3 --- /dev/null +++ b/models/add-activity-response200-related-objects-organization-organizationidall-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface AddActivityResponse200RelatedObjectsOrganizationORGANIZATIONIDAllOf + */ +export interface AddActivityResponse200RelatedObjectsOrganizationORGANIZATIONIDAllOf { + /** + * Whether the associated organization is active or not + * @type {boolean} + * @memberof AddActivityResponse200RelatedObjectsOrganizationORGANIZATIONIDAllOf + */ + 'active_flag'?: boolean; +} + diff --git a/models/add-activity-response200-related-objects-organization.ts b/models/add-activity-response200-related-objects-organization.ts new file mode 100644 index 00000000..e0664ebb --- /dev/null +++ b/models/add-activity-response200-related-objects-organization.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityResponse200RelatedObjectsOrganizationORGANIZATIONID } from './add-activity-response200-related-objects-organization-organizationid'; + +/** + * + * @export + * @interface AddActivityResponse200RelatedObjectsOrganization + */ +export interface AddActivityResponse200RelatedObjectsOrganization { + /** + * + * @type {AddActivityResponse200RelatedObjectsOrganizationORGANIZATIONID} + * @memberof AddActivityResponse200RelatedObjectsOrganization + */ + 'ORGANIZATION_ID'?: AddActivityResponse200RelatedObjectsOrganizationORGANIZATIONID; +} + diff --git a/models/add-activity-response200-related-objects-person-personid.ts b/models/add-activity-response200-related-objects-person-personid.ts new file mode 100644 index 00000000..9cad4eba --- /dev/null +++ b/models/add-activity-response200-related-objects-person-personid.ts @@ -0,0 +1,36 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityResponse200RelatedObjectsPersonPERSONIDAllOf } from './add-activity-response200-related-objects-person-personidall-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOf } from './get-activities-response200-related-objects-person-personidall-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOfEmailInner } from './get-activities-response200-related-objects-person-personidall-of-email-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOfPhoneInner } from './get-activities-response200-related-objects-person-personidall-of-phone-inner'; + +/** + * @type AddActivityResponse200RelatedObjectsPersonPERSONID + * The ID of the person associated with the item + * @export + */ +export type AddActivityResponse200RelatedObjectsPersonPERSONID = AddActivityResponse200RelatedObjectsPersonPERSONIDAllOf & GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOf; + + diff --git a/models/add-activity-response200-related-objects-person-personidall-of.ts b/models/add-activity-response200-related-objects-person-personidall-of.ts new file mode 100644 index 00000000..cee5a149 --- /dev/null +++ b/models/add-activity-response200-related-objects-person-personidall-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface AddActivityResponse200RelatedObjectsPersonPERSONIDAllOf + */ +export interface AddActivityResponse200RelatedObjectsPersonPERSONIDAllOf { + /** + * Whether the associated person is active or not + * @type {boolean} + * @memberof AddActivityResponse200RelatedObjectsPersonPERSONIDAllOf + */ + 'active_flag'?: boolean; +} + diff --git a/models/add-activity-response200-related-objects-person.ts b/models/add-activity-response200-related-objects-person.ts new file mode 100644 index 00000000..712ce8bf --- /dev/null +++ b/models/add-activity-response200-related-objects-person.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityResponse200RelatedObjectsPersonPERSONID } from './add-activity-response200-related-objects-person-personid'; + +/** + * + * @export + * @interface AddActivityResponse200RelatedObjectsPerson + */ +export interface AddActivityResponse200RelatedObjectsPerson { + /** + * + * @type {AddActivityResponse200RelatedObjectsPersonPERSONID} + * @memberof AddActivityResponse200RelatedObjectsPerson + */ + 'PERSON_ID'?: AddActivityResponse200RelatedObjectsPersonPERSONID; +} + diff --git a/models/add-activity-response200-related-objects.ts b/models/add-activity-response200-related-objects.ts new file mode 100644 index 00000000..8ef59f75 --- /dev/null +++ b/models/add-activity-response200-related-objects.ts @@ -0,0 +1,60 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityResponse200RelatedObjectsOrganization } from './add-activity-response200-related-objects-organization'; +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityResponse200RelatedObjectsPerson } from './add-activity-response200-related-objects-person'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsDeal } from './get-activities-response200-related-objects-deal'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsUser } from './get-activities-response200-related-objects-user'; + +/** + * + * @export + * @interface AddActivityResponse200RelatedObjects + */ +export interface AddActivityResponse200RelatedObjects { + /** + * + * @type {GetActivitiesResponse200RelatedObjectsUser} + * @memberof AddActivityResponse200RelatedObjects + */ + 'user'?: GetActivitiesResponse200RelatedObjectsUser; + /** + * + * @type {GetActivitiesResponse200RelatedObjectsDeal} + * @memberof AddActivityResponse200RelatedObjects + */ + 'deal'?: GetActivitiesResponse200RelatedObjectsDeal; + /** + * + * @type {AddActivityResponse200RelatedObjectsPerson} + * @memberof AddActivityResponse200RelatedObjects + */ + 'person'?: AddActivityResponse200RelatedObjectsPerson; + /** + * + * @type {AddActivityResponse200RelatedObjectsOrganization} + * @memberof AddActivityResponse200RelatedObjects + */ + 'organization'?: AddActivityResponse200RelatedObjectsOrganization; +} + diff --git a/models/add-activity-response200.ts b/models/add-activity-response200.ts new file mode 100644 index 00000000..f5d2297e --- /dev/null +++ b/models/add-activity-response200.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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ActivityResponseObject } from './activity-response-object'; +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityResponse200AdditionalData } from './add-activity-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityResponse200RelatedObjects } from './add-activity-response200-related-objects'; + +/** + * + * @export + * @interface AddActivityResponse200 + */ +export interface AddActivityResponse200 { + /** + * + * @type {boolean} + * @memberof AddActivityResponse200 + */ + 'success'?: boolean; + /** + * + * @type {ActivityResponseObject} + * @memberof AddActivityResponse200 + */ + 'data'?: ActivityResponseObject; + /** + * + * @type {AddActivityResponse200AdditionalData} + * @memberof AddActivityResponse200 + */ + 'additional_data'?: AddActivityResponse200AdditionalData; + /** + * + * @type {AddActivityResponse200RelatedObjects} + * @memberof AddActivityResponse200 + */ + 'related_objects'?: AddActivityResponse200RelatedObjects; +} + diff --git a/models/add-activity-type-request.ts b/models/add-activity-type-request.ts new file mode 100644 index 00000000..5f034d00 --- /dev/null +++ b/models/add-activity-type-request.ts @@ -0,0 +1,88 @@ +/* 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 + * @interface AddActivityTypeRequest + */ +export interface AddActivityTypeRequest { + /** + * The name of the activity type + * @type {string} + * @memberof AddActivityTypeRequest + */ + 'name': string; + /** + * Icon graphic to use for representing this activity type + * @type {string} + * @memberof AddActivityTypeRequest + */ + 'icon_key': AddActivityTypeRequestIconKeyConst; + /** + * A designated color for the activity type in 6-character HEX format (e.g. `FFFFFF` for white, `000000` for black) + * @type {string} + * @memberof AddActivityTypeRequest + */ + 'color'?: string; +} + +export const AddActivityTypeRequestIconKeyConst = { + task: 'task', + email: 'email', + meeting: 'meeting', + deadline: 'deadline', + call: 'call', + lunch: 'lunch', + calendar: 'calendar', + downarrow: 'downarrow', + document: 'document', + smartphone: 'smartphone', + camera: 'camera', + scissors: 'scissors', + cogs: 'cogs', + bubble: 'bubble', + uparrow: 'uparrow', + checkbox: 'checkbox', + signpost: 'signpost', + shuffle: 'shuffle', + addressbook: 'addressbook', + linegraph: 'linegraph', + picture: 'picture', + car: 'car', + world: 'world', + search: 'search', + clip: 'clip', + sound: 'sound', + brush: 'brush', + key: 'key', + padlock: 'padlock', + pricetag: 'pricetag', + suitcase: 'suitcase', + finish: 'finish', + plane: 'plane', + loop: 'loop', + wifi: 'wifi', + truck: 'truck', + cart: 'cart', + bulb: 'bulb', + bell: 'bell', + presentation: 'presentation' +} as const; + +export type AddActivityTypeRequestIconKeyConst = typeof AddActivityTypeRequestIconKeyConst[keyof typeof AddActivityTypeRequestIconKeyConst]; + + diff --git a/models/add-call-log-request.ts b/models/add-call-log-request.ts new file mode 100644 index 00000000..3ad87730 --- /dev/null +++ b/models/add-call-log-request.ts @@ -0,0 +1,120 @@ +/* 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 + * @interface AddCallLogRequest + */ +export interface AddCallLogRequest { + /** + * Describes the outcome of the call + * @type {string} + * @memberof AddCallLogRequest + */ + 'outcome': AddCallLogRequestOutcomeConst; + /** + * The number called + * @type {string} + * @memberof AddCallLogRequest + */ + 'to_phone_number': string; + /** + * The date and time of the start of the call in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof AddCallLogRequest + */ + 'start_time': string; + /** + * The date and time of the end of the call in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof AddCallLogRequest + */ + 'end_time': string; + /** + * The ID of the owner of the call log. Please note that a user without account settings access cannot create call logs for other users. + * @type {number} + * @memberof AddCallLogRequest + */ + 'user_id'?: number; + /** + * If specified, this activity will be converted into a call log, with the information provided. When this field is used, you don\'t need to specify `deal_id`, `person_id` or `org_id`, as they will be ignored in favor of the values already available in the activity. The `activity_id` must refer to a `call` type activity. + * @type {number} + * @memberof AddCallLogRequest + */ + 'activity_id'?: number; + /** + * The name of the activity this call is attached to + * @type {string} + * @memberof AddCallLogRequest + */ + 'subject'?: string; + /** + * The duration of the call in seconds + * @type {string} + * @memberof AddCallLogRequest + */ + 'duration'?: string; + /** + * The number that made the call + * @type {string} + * @memberof AddCallLogRequest + */ + 'from_phone_number'?: string; + /** + * The ID of the person this call is associated with + * @type {number} + * @memberof AddCallLogRequest + */ + 'person_id'?: number; + /** + * The ID of the organization this call is associated with + * @type {number} + * @memberof AddCallLogRequest + */ + 'org_id'?: number; + /** + * The ID of the deal this call is associated with. A call log can be associated with either a deal or a lead, but not both at once. + * @type {number} + * @memberof AddCallLogRequest + */ + 'deal_id'?: number; + /** + * The ID of the lead in the UUID format this call is associated with. A call log can be associated with either a deal or a lead, but not both at once. + * @type {string} + * @memberof AddCallLogRequest + */ + 'lead_id'?: string; + /** + * The note for the call log in HTML format + * @type {string} + * @memberof AddCallLogRequest + */ + 'note'?: string; +} + +export const AddCallLogRequestOutcomeConst = { + connected: 'connected', + no_answer: 'no_answer', + left_message: 'left_message', + left_voicemail: 'left_voicemail', + wrong_number: 'wrong_number', + busy: 'busy' +} as const; + +export type AddCallLogRequestOutcomeConst = typeof AddCallLogRequestOutcomeConst[keyof typeof AddCallLogRequestOutcomeConst]; + + diff --git a/models/add-channel-request.ts b/models/add-channel-request.ts new file mode 100644 index 00000000..0ccad049 --- /dev/null +++ b/models/add-channel-request.ts @@ -0,0 +1,63 @@ +/* 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 + * @interface AddChannelRequest + */ +export interface AddChannelRequest { + /** + * The name of the channel + * @type {string} + * @memberof AddChannelRequest + */ + 'name': string; + /** + * The channel ID + * @type {string} + * @memberof AddChannelRequest + */ + 'provider_channel_id': string; + /** + * The URL for an icon that represents your channel + * @type {string} + * @memberof AddChannelRequest + */ + 'avatar_url'?: string; + /** + * If true, enables templates logic on UI. Requires getTemplates endpoint implemented. Find out more [here](https://pipedrive.readme.io/docs/implementing-messaging-app-extension). + * @type {boolean} + * @memberof AddChannelRequest + */ + 'template_support'?: boolean; + /** + * It controls the icons (like the icon next to the conversation) + * @type {string} + * @memberof AddChannelRequest + */ + 'provider_type'?: AddChannelRequestProviderTypeConst; +} + +export const AddChannelRequestProviderTypeConst = { + facebook: 'facebook', + whatsapp: 'whatsapp', + other: 'other' +} as const; + +export type AddChannelRequestProviderTypeConst = typeof AddChannelRequestProviderTypeConst[keyof typeof AddChannelRequestProviderTypeConst]; + + diff --git a/models/add-channel200-response-data.ts b/models/add-channel200-response-data.ts new file mode 100644 index 00000000..b767e492 --- /dev/null +++ b/models/add-channel200-response-data.ts @@ -0,0 +1,93 @@ +/* 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 + * @interface AddChannel200ResponseData + */ +export interface AddChannel200ResponseData { + /** + * The unique channel ID used internally in omnichannel-api and the frontend of the extension + * @type {string} + * @memberof AddChannel200ResponseData + */ + 'id'?: string; + /** + * The name of the channel + * @type {string} + * @memberof AddChannel200ResponseData + */ + 'name'?: string; + /** + * The URL for an icon that represents your channel + * @type {string} + * @memberof AddChannel200ResponseData + */ + 'avatar_url'?: string; + /** + * The channel ID you specified while creating the channel + * @type {string} + * @memberof AddChannel200ResponseData + */ + 'provider_channel_id'?: string; + /** + * The client_id of your app in Pipedrive marketplace + * @type {string} + * @memberof AddChannel200ResponseData + */ + 'marketplace_client_id'?: string; + /** + * The ID of the user\'s company in Pipedrive + * @type {number} + * @memberof AddChannel200ResponseData + */ + 'pd_company_id'?: number; + /** + * The ID of the user in Pipedrive + * @type {number} + * @memberof AddChannel200ResponseData + */ + 'pd_user_id'?: number; + /** + * The date and time when your channel was created in the API + * @type {string} + * @memberof AddChannel200ResponseData + */ + 'created_at'?: string; + /** + * Value of the provider_type sent to this endpoint + * @type {string} + * @memberof AddChannel200ResponseData + */ + 'provider_type'?: AddChannel200ResponseDataProviderTypeConst; + /** + * Value of the template_support sent to this endpoint + * @type {boolean} + * @memberof AddChannel200ResponseData + */ + 'template_support'?: boolean; +} + +export const AddChannel200ResponseDataProviderTypeConst = { + facebook: 'facebook', + whatsapp: 'whatsapp', + other: 'other' +} as const; + +export type AddChannel200ResponseDataProviderTypeConst = typeof AddChannel200ResponseDataProviderTypeConst[keyof typeof AddChannel200ResponseDataProviderTypeConst]; + + diff --git a/models/add-channel200-response.ts b/models/add-channel200-response.ts new file mode 100644 index 00000000..962dd5e7 --- /dev/null +++ b/models/add-channel200-response.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddChannel200ResponseData } from './add-channel200-response-data'; + +/** + * + * @export + * @interface AddChannel200Response + */ +export interface AddChannel200Response { + /** + * + * @type {boolean} + * @memberof AddChannel200Response + */ + 'success'?: boolean; + /** + * + * @type {AddChannel200ResponseData} + * @memberof AddChannel200Response + */ + 'data'?: AddChannel200ResponseData; +} + diff --git a/models/add-channel400-response-additional-data.ts b/models/add-channel400-response-additional-data.ts new file mode 100644 index 00000000..f6f5b4ce --- /dev/null +++ b/models/add-channel400-response-additional-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface AddChannel400ResponseAdditionalData + */ +export interface AddChannel400ResponseAdditionalData { + /** + * An error code sent by the API + * @type {string} + * @memberof AddChannel400ResponseAdditionalData + */ + 'code'?: string; +} + diff --git a/models/add-channel400-response.ts b/models/add-channel400-response.ts new file mode 100644 index 00000000..31525b69 --- /dev/null +++ b/models/add-channel400-response.ts @@ -0,0 +1,51 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddChannel400ResponseAdditionalData } from './add-channel400-response-additional-data'; + +/** + * + * @export + * @interface AddChannel400Response + */ +export interface AddChannel400Response { + /** + * + * @type {boolean} + * @memberof AddChannel400Response + */ + 'success'?: boolean; + /** + * The error description + * @type {string} + * @memberof AddChannel400Response + */ + 'error'?: string; + /** + * + * @type {string} + * @memberof AddChannel400Response + */ + 'error_info'?: string; + /** + * + * @type {AddChannel400ResponseAdditionalData} + * @memberof AddChannel400Response + */ + 'additional_data'?: AddChannel400ResponseAdditionalData; +} + diff --git a/models/add-channel403-response-additional-data.ts b/models/add-channel403-response-additional-data.ts new file mode 100644 index 00000000..afa76a95 --- /dev/null +++ b/models/add-channel403-response-additional-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface AddChannel403ResponseAdditionalData + */ +export interface AddChannel403ResponseAdditionalData { + /** + * An error code sent by the API + * @type {string} + * @memberof AddChannel403ResponseAdditionalData + */ + 'code'?: string; +} + diff --git a/models/add-channel403-response.ts b/models/add-channel403-response.ts new file mode 100644 index 00000000..c1129fba --- /dev/null +++ b/models/add-channel403-response.ts @@ -0,0 +1,51 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddChannel403ResponseAdditionalData } from './add-channel403-response-additional-data'; + +/** + * + * @export + * @interface AddChannel403Response + */ +export interface AddChannel403Response { + /** + * + * @type {boolean} + * @memberof AddChannel403Response + */ + 'success'?: boolean; + /** + * The error description + * @type {string} + * @memberof AddChannel403Response + */ + 'error'?: string; + /** + * + * @type {string} + * @memberof AddChannel403Response + */ + 'error_info'?: string; + /** + * + * @type {AddChannel403ResponseAdditionalData} + * @memberof AddChannel403Response + */ + 'additional_data'?: AddChannel403ResponseAdditionalData; +} + diff --git a/models/add-deal-follower-request.ts b/models/add-deal-follower-request.ts new file mode 100644 index 00000000..433d75ad --- /dev/null +++ b/models/add-deal-follower-request.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface AddDealFollowerRequest + */ +export interface AddDealFollowerRequest { + /** + * The ID of the user + * @type {number} + * @memberof AddDealFollowerRequest + */ + 'user_id': number; +} + diff --git a/models/add-deal-follower-response200-data.ts b/models/add-deal-follower-response200-data.ts new file mode 100644 index 00000000..fa2b5004 --- /dev/null +++ b/models/add-deal-follower-response200-data.ts @@ -0,0 +1,48 @@ +/* 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 + * @interface AddDealFollowerResponse200Data + */ +export interface AddDealFollowerResponse200Data { + /** + * The user ID who added the follower + * @type {number} + * @memberof AddDealFollowerResponse200Data + */ + 'user_id'?: number; + /** + * The follower ID + * @type {number} + * @memberof AddDealFollowerResponse200Data + */ + 'id'?: number; + /** + * The ID of the deal which the follower was added to + * @type {number} + * @memberof AddDealFollowerResponse200Data + */ + 'deal_id'?: number; + /** + * The date and time when the deal follower was added + * @type {string} + * @memberof AddDealFollowerResponse200Data + */ + 'add_time'?: string; +} + diff --git a/models/add-deal-follower-response200.ts b/models/add-deal-follower-response200.ts new file mode 100644 index 00000000..e5f165ae --- /dev/null +++ b/models/add-deal-follower-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddDealFollowerResponse200Data } from './add-deal-follower-response200-data'; + +/** + * + * @export + * @interface AddDealFollowerResponse200 + */ +export interface AddDealFollowerResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof AddDealFollowerResponse200 + */ + 'success'?: boolean; + /** + * + * @type {AddDealFollowerResponse200Data} + * @memberof AddDealFollowerResponse200 + */ + 'data'?: AddDealFollowerResponse200Data; +} + diff --git a/models/add-deal-participant-request.ts b/models/add-deal-participant-request.ts new file mode 100644 index 00000000..279d2a67 --- /dev/null +++ b/models/add-deal-participant-request.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface AddDealParticipantRequest + */ +export interface AddDealParticipantRequest { + /** + * The ID of the person + * @type {number} + * @memberof AddDealParticipantRequest + */ + 'person_id': number; +} + diff --git a/models/add-deal-participant-response200-data.ts b/models/add-deal-participant-response200-data.ts new file mode 100644 index 00000000..8096be7c --- /dev/null +++ b/models/add-deal-participant-response200-data.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { Owner } from './owner'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItem } from './person-item'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOfEmailInner } from './person-item-all-of-email-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOfPhoneInner } from './person-item-all-of-phone-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOfPictureId } from './person-item-all-of-picture-id'; +// May contain unused imports in some cases +// @ts-ignore +import { RelationshipOrganizationInfoItemWithActiveFlag } from './relationship-organization-info-item-with-active-flag'; + +/** + * @type AddDealParticipantResponse200Data + * The object of participant + * @export + */ +export type AddDealParticipantResponse200Data = PersonItem; + + diff --git a/models/add-deal-participant-response200-related-objects.ts b/models/add-deal-participant-response200-related-objects.ts new file mode 100644 index 00000000..1072d48d --- /dev/null +++ b/models/add-deal-participant-response200-related-objects.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityResponse200RelatedObjectsPerson } from './add-activity-response200-related-objects-person'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsUser } from './get-activities-response200-related-objects-user'; + +/** + * + * @export + * @interface AddDealParticipantResponse200RelatedObjects + */ +export interface AddDealParticipantResponse200RelatedObjects { + /** + * + * @type {GetActivitiesResponse200RelatedObjectsUser} + * @memberof AddDealParticipantResponse200RelatedObjects + */ + 'user'?: GetActivitiesResponse200RelatedObjectsUser; + /** + * + * @type {AddActivityResponse200RelatedObjectsPerson} + * @memberof AddDealParticipantResponse200RelatedObjects + */ + 'person'?: AddActivityResponse200RelatedObjectsPerson; +} + diff --git a/models/add-deal-participant-response200.ts b/models/add-deal-participant-response200.ts new file mode 100644 index 00000000..df9cba89 --- /dev/null +++ b/models/add-deal-participant-response200.ts @@ -0,0 +1,48 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddDealParticipantResponse200Data } from './add-deal-participant-response200-data'; +// May contain unused imports in some cases +// @ts-ignore +import { AddDealParticipantResponse200RelatedObjects } from './add-deal-participant-response200-related-objects'; + +/** + * + * @export + * @interface AddDealParticipantResponse200 + */ +export interface AddDealParticipantResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof AddDealParticipantResponse200 + */ + 'success'?: boolean; + /** + * + * @type {AddDealParticipantResponse200Data} + * @memberof AddDealParticipantResponse200 + */ + 'data'?: AddDealParticipantResponse200Data; + /** + * + * @type {AddDealParticipantResponse200RelatedObjects} + * @memberof AddDealParticipantResponse200 + */ + 'related_objects'?: AddDealParticipantResponse200RelatedObjects; +} + diff --git a/models/add-deal-product-request.ts b/models/add-deal-product-request.ts new file mode 100644 index 00000000..5a0f55f9 --- /dev/null +++ b/models/add-deal-product-request.ts @@ -0,0 +1,26 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BasicDealProductRequest } from './basic-deal-product-request'; + +/** + * @type AddDealProductRequest + * @export + */ +export type AddDealProductRequest = BasicDealProductRequest; + + diff --git a/models/add-deal-request.ts b/models/add-deal-request.ts new file mode 100644 index 00000000..c5b27293 --- /dev/null +++ b/models/add-deal-request.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BasicDeal } from './basic-deal'; +// May contain unused imports in some cases +// @ts-ignore +import { NewDealParameters } from './new-deal-parameters'; +// May contain unused imports in some cases +// @ts-ignore +import { RequredTitleParameter } from './requred-title-parameter'; + +/** + * @type AddDealRequest + * @export + */ +export type AddDealRequest = BasicDeal & NewDealParameters & RequredTitleParameter; + + diff --git a/models/add-file-and-link-it-response200.ts b/models/add-file-and-link-it-response200.ts new file mode 100644 index 00000000..8986d7ee --- /dev/null +++ b/models/add-file-and-link-it-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetFilesResponse200DataInner } from './get-files-response200-data-inner'; + +/** + * + * @export + * @interface AddFileAndLinkItResponse200 + */ +export interface AddFileAndLinkItResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof AddFileAndLinkItResponse200 + */ + 'success'?: boolean; + /** + * + * @type {GetFilesResponse200DataInner} + * @memberof AddFileAndLinkItResponse200 + */ + 'data'?: GetFilesResponse200DataInner; +} + diff --git a/models/add-file-response200.ts b/models/add-file-response200.ts new file mode 100644 index 00000000..a00c08c5 --- /dev/null +++ b/models/add-file-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetFilesResponse200DataInner } from './get-files-response200-data-inner'; + +/** + * + * @export + * @interface AddFileResponse200 + */ +export interface AddFileResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof AddFileResponse200 + */ + 'success'?: boolean; + /** + * + * @type {GetFilesResponse200DataInner} + * @memberof AddFileResponse200 + */ + 'data'?: GetFilesResponse200DataInner; +} + diff --git a/models/add-filter-request.ts b/models/add-filter-request.ts new file mode 100644 index 00000000..5e4eb857 --- /dev/null +++ b/models/add-filter-request.ts @@ -0,0 +1,55 @@ +/* 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 + * @interface AddFilterRequest + */ +export interface AddFilterRequest { + /** + * The name of the filter + * @type {string} + * @memberof AddFilterRequest + */ + 'name': string; + /** + * The conditions of the filter as a JSON object. Please note that a maximum of 16 conditions is allowed per filter and `date` values must be supplied in the `YYYY-MM-DD` format. It requires a minimum structure as follows: `{\"glue\":\"and\",\"conditions\":[{\"glue\":\"and\",\"conditions\": [CONDITION_OBJECTS]},{\"glue\":\"or\",\"conditions\":[CONDITION_OBJECTS]}]}`. Replace `CONDITION_OBJECTS` with JSON objects of the following structure: `{\"object\":\"\",\"field_id\":\"\", \"operator\":\"\",\"value\":\"\", \"extra_value\":\"\"}` or leave the array empty. Depending on the object type you should use another API endpoint to get `field_id`. There are five types of objects you can choose from: `\"person\"`, `\"deal\"`, `\"organization\"`, `\"product\"`, `\"activity\"` and you can use these types of operators depending on what type of a field you have: `\"IS NOT NULL\"`, `\"IS NULL\"`, `\"<=\"`, `\">=\"`, `\"<\"`, `\">\"`, `\"!=\"`, `\"=\"`, `\"LIKE \'$%\'\"`, `\"LIKE \'%$%\'\"`, `\"NOT LIKE \'$%\'\"`. To get a better understanding of how filters work try creating them directly from the Pipedrive application. + * @type {object} + * @memberof AddFilterRequest + */ + 'conditions': object; + /** + * + * @type {string} + * @memberof AddFilterRequest + */ + 'type': AddFilterRequestTypeConst; +} + +export const AddFilterRequestTypeConst = { + deals: 'deals', + leads: 'leads', + org: 'org', + people: 'people', + products: 'products', + activity: 'activity', + projects: 'projects' +} as const; + +export type AddFilterRequestTypeConst = typeof AddFilterRequestTypeConst[keyof typeof AddFilterRequestTypeConst]; + + diff --git a/models/add-goal-request.ts b/models/add-goal-request.ts new file mode 100644 index 00000000..67e2a392 --- /dev/null +++ b/models/add-goal-request.ts @@ -0,0 +1,70 @@ +/* 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 + * @interface AddGoalRequest + */ +export interface AddGoalRequest { + /** + * Who this goal is assigned to. It requires the following JSON structure: `{ \"id\": \"1\", \"type\": \"person\" }`. `type` can be either `person`, `company` or `team`. ID of the assignee person, company or team. + * @type {object} + * @memberof AddGoalRequest + */ + 'assignee': object; + /** + * The type of the goal. It requires the following JSON structure: `{ \"name\": \"deals_started\", \"params\": { \"pipeline_id\": [1, 2], \"activity_type_id\": [9] } }`. Type can be one of: `deals_won`, `deals_progressed`, `activities_completed`, `activities_added`, `deals_started` or `revenue_forecast`. `params` can include `pipeline_id`, `stage_id` or `activity_type_id`. `stage_id` is related to only `deals_progressed` type of goals and `activity_type_id` to `activities_completed` or `activities_added` types of goals. The `pipeline_id` and `activity_type_id` need to be given as an array of integers. To track the goal in all pipelines, set `pipeline_id` as `null` and similarly, to track the goal for all activities, set `activity_type_id` as `null`.” + * @type {object} + * @memberof AddGoalRequest + */ + 'type': object; + /** + * The expected outcome of the goal. Expected outcome can be tracked either by `quantity` or by `sum`. It requires the following JSON structure: `{ \"target\": \"50\", \"tracking_metric\": \"quantity\" }` or `{ \"target\": \"50\", \"tracking_metric\": \"sum\", \"currency_id\": 1 }`. `currency_id` should only be added to `sum` type of goals. + * @type {object} + * @memberof AddGoalRequest + */ + 'expected_outcome': object; + /** + * The date when the goal starts and ends. It requires the following JSON structure: `{ \"start\": \"2019-01-01\", \"end\": \"2022-12-31\" }`. Date in format of YYYY-MM-DD. \"end\" can be set to `null` for an infinite, open-ended goal. + * @type {object} + * @memberof AddGoalRequest + */ + 'duration': object; + /** + * The interval of the goal + * @type {string} + * @memberof AddGoalRequest + */ + 'interval': AddGoalRequestIntervalConst; + /** + * The title of the goal + * @type {string} + * @memberof AddGoalRequest + */ + 'title'?: string; +} + +export const AddGoalRequestIntervalConst = { + weekly: 'weekly', + monthly: 'monthly', + quarterly: 'quarterly', + yearly: 'yearly' +} as const; + +export type AddGoalRequestIntervalConst = typeof AddGoalRequestIntervalConst[keyof typeof AddGoalRequestIntervalConst]; + + diff --git a/models/add-lead-label-request.ts b/models/add-lead-label-request.ts new file mode 100644 index 00000000..7fc72097 --- /dev/null +++ b/models/add-lead-label-request.ts @@ -0,0 +1,48 @@ +/* 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 + * @interface AddLeadLabelRequest + */ +export interface AddLeadLabelRequest { + /** + * The name of the lead label + * @type {string} + * @memberof AddLeadLabelRequest + */ + 'name': string; + /** + * The color of the label. Only a subset of colors can be used. + * @type {string} + * @memberof AddLeadLabelRequest + */ + 'color': AddLeadLabelRequestColorConst; +} + +export const AddLeadLabelRequestColorConst = { + green: 'green', + blue: 'blue', + red: 'red', + yellow: 'yellow', + purple: 'purple', + gray: 'gray' +} as const; + +export type AddLeadLabelRequestColorConst = typeof AddLeadLabelRequestColorConst[keyof typeof AddLeadLabelRequestColorConst]; + + diff --git a/models/add-lead-request-value.ts b/models/add-lead-request-value.ts new file mode 100644 index 00000000..87a57f0b --- /dev/null +++ b/models/add-lead-request-value.ts @@ -0,0 +1,36 @@ +/* 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. + */ + + + +/** + * The potential value of the lead as a JSON object. It requires the following JSON structure: `{ \"amount\": 200, \"currency\": \"EUR\" }`. Both amount and currency are required. + * @export + * @interface AddLeadRequestValue + */ +export interface AddLeadRequestValue { + /** + * + * @type {number} + * @memberof AddLeadRequestValue + */ + 'amount': number; + /** + * + * @type {string} + * @memberof AddLeadRequestValue + */ + 'currency': string; +} + diff --git a/models/add-lead-request.ts b/models/add-lead-request.ts new file mode 100644 index 00000000..e8528e74 --- /dev/null +++ b/models/add-lead-request.ts @@ -0,0 +1,91 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddLeadRequestValue } from './add-lead-request-value'; + +/** + * + * @export + * @interface AddLeadRequest + */ +export interface AddLeadRequest { + /** + * The name of the lead + * @type {string} + * @memberof AddLeadRequest + */ + 'title': string; + /** + * The ID of the user which will be the owner of the created lead. If not provided, the user making the request will be used. + * @type {number} + * @memberof AddLeadRequest + */ + 'owner_id'?: number; + /** + * The IDs of the lead labels which will be associated with the lead + * @type {Array} + * @memberof AddLeadRequest + */ + 'label_ids'?: Array; + /** + * The ID of a person which this lead will be linked to. If the person does not exist yet, it needs to be created first. This property is required unless `organization_id` is specified. + * @type {number} + * @memberof AddLeadRequest + */ + 'person_id'?: number; + /** + * The ID of an organization which this lead will be linked to. If the organization does not exist yet, it needs to be created first. This property is required unless `person_id` is specified. + * @type {number} + * @memberof AddLeadRequest + */ + 'organization_id'?: number; + /** + * + * @type {AddLeadRequestValue} + * @memberof AddLeadRequest + */ + 'value'?: AddLeadRequestValue; + /** + * The date of when the deal which will be created from the lead is expected to be closed. In ISO 8601 format: YYYY-MM-DD. + * @type {string} + * @memberof AddLeadRequest + */ + 'expected_close_date'?: string; + /** + * + * @type {string} + * @memberof AddLeadRequest + */ + 'visible_to'?: AddLeadRequestVisibleToConst; + /** + * A flag indicating whether the lead was seen by someone in the Pipedrive UI + * @type {boolean} + * @memberof AddLeadRequest + */ + 'was_seen'?: boolean; +} + +export const AddLeadRequestVisibleToConst = { + _1: '1', + _3: '3', + _5: '5', + _7: '7' +} as const; + +export type AddLeadRequestVisibleToConst = typeof AddLeadRequestVisibleToConst[keyof typeof AddLeadRequestVisibleToConst]; + + diff --git a/models/add-note-request-all-of.ts b/models/add-note-request-all-of.ts new file mode 100644 index 00000000..d0e54f31 --- /dev/null +++ b/models/add-note-request-all-of.ts @@ -0,0 +1,54 @@ +/* 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 + * @interface AddNoteRequestAllOf + */ +export interface AddNoteRequestAllOf { + /** + * The content of the note in HTML format. Subject to sanitization on the back-end. + * @type {string} + * @memberof AddNoteRequestAllOf + */ + 'content': string; + /** + * The ID of the lead the note will be attached to. This property is required unless one of (`deal_id/person_id/org_id`) is specified. + * @type {string} + * @memberof AddNoteRequestAllOf + */ + 'lead_id'?: string; + /** + * The ID of the deal the note will be attached to. This property is required unless one of (`lead_id/person_id/org_id`) is specified. + * @type {number} + * @memberof AddNoteRequestAllOf + */ + 'deal_id'?: number; + /** + * The ID of the person this note will be attached to. This property is required unless one of (`deal_id/lead_id/org_id`) is specified. + * @type {number} + * @memberof AddNoteRequestAllOf + */ + 'person_id'?: number; + /** + * The ID of the organization this note will be attached to. This property is required unless one of (`deal_id/lead_id/person_id`) is specified. + * @type {number} + * @memberof AddNoteRequestAllOf + */ + 'org_id'?: number; +} + diff --git a/models/add-note-request-all-of1.ts b/models/add-note-request-all-of1.ts new file mode 100644 index 00000000..7be1590f --- /dev/null +++ b/models/add-note-request-all-of1.ts @@ -0,0 +1,86 @@ +/* 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 + * @interface AddNoteRequestAllOf1 + */ +export interface AddNoteRequestAllOf1 { + /** + * The ID of the user who will be marked as the author of the note. Only an admin can change the author. + * @type {number} + * @memberof AddNoteRequestAllOf1 + */ + 'user_id'?: number; + /** + * The optional creation date & time of the note in UTC. Can be set in the past or in the future. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof AddNoteRequestAllOf1 + */ + 'add_time'?: string; + /** + * + * @type {number} + * @memberof AddNoteRequestAllOf1 + */ + 'pinned_to_lead_flag'?: AddNoteRequestAllOf1PinnedToLeadFlagConst; + /** + * + * @type {number} + * @memberof AddNoteRequestAllOf1 + */ + 'pinned_to_deal_flag'?: AddNoteRequestAllOf1PinnedToDealFlagConst; + /** + * + * @type {number} + * @memberof AddNoteRequestAllOf1 + */ + 'pinned_to_organization_flag'?: AddNoteRequestAllOf1PinnedToOrganizationFlagConst; + /** + * + * @type {number} + * @memberof AddNoteRequestAllOf1 + */ + 'pinned_to_person_flag'?: AddNoteRequestAllOf1PinnedToPersonFlagConst; +} + +export const AddNoteRequestAllOf1PinnedToLeadFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type AddNoteRequestAllOf1PinnedToLeadFlagConst = typeof AddNoteRequestAllOf1PinnedToLeadFlagConst[keyof typeof AddNoteRequestAllOf1PinnedToLeadFlagConst]; +export const AddNoteRequestAllOf1PinnedToDealFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type AddNoteRequestAllOf1PinnedToDealFlagConst = typeof AddNoteRequestAllOf1PinnedToDealFlagConst[keyof typeof AddNoteRequestAllOf1PinnedToDealFlagConst]; +export const AddNoteRequestAllOf1PinnedToOrganizationFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type AddNoteRequestAllOf1PinnedToOrganizationFlagConst = typeof AddNoteRequestAllOf1PinnedToOrganizationFlagConst[keyof typeof AddNoteRequestAllOf1PinnedToOrganizationFlagConst]; +export const AddNoteRequestAllOf1PinnedToPersonFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type AddNoteRequestAllOf1PinnedToPersonFlagConst = typeof AddNoteRequestAllOf1PinnedToPersonFlagConst[keyof typeof AddNoteRequestAllOf1PinnedToPersonFlagConst]; + + diff --git a/models/add-note-request.ts b/models/add-note-request.ts new file mode 100644 index 00000000..6fb5948d --- /dev/null +++ b/models/add-note-request.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddNoteRequestAllOf } from './add-note-request-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { AddNoteRequestAllOf1 } from './add-note-request-all-of1'; + +/** + * @type AddNoteRequest + * @export + */ +export type AddNoteRequest = AddNoteRequestAllOf & AddNoteRequestAllOf1; + + diff --git a/models/add-or-update-goal-response200-data-goal-assignee.ts b/models/add-or-update-goal-response200-data-goal-assignee.ts new file mode 100644 index 00000000..b271dec1 --- /dev/null +++ b/models/add-or-update-goal-response200-data-goal-assignee.ts @@ -0,0 +1,36 @@ +/* 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. + */ + + + +/** + * Who the goal is assigned to + * @export + * @interface AddOrUpdateGoalResponse200DataGoalAssignee + */ +export interface AddOrUpdateGoalResponse200DataGoalAssignee { + /** + * The ID of the goal assignee + * @type {number} + * @memberof AddOrUpdateGoalResponse200DataGoalAssignee + */ + 'id'?: number; + /** + * The type of the assignee + * @type {string} + * @memberof AddOrUpdateGoalResponse200DataGoalAssignee + */ + 'type'?: string; +} + diff --git a/models/add-or-update-goal-response200-data-goal-duration.ts b/models/add-or-update-goal-response200-data-goal-duration.ts new file mode 100644 index 00000000..4c5855dc --- /dev/null +++ b/models/add-or-update-goal-response200-data-goal-duration.ts @@ -0,0 +1,36 @@ +/* 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. + */ + + + +/** + * The duration of the goal + * @export + * @interface AddOrUpdateGoalResponse200DataGoalDuration + */ +export interface AddOrUpdateGoalResponse200DataGoalDuration { + /** + * The start date of the goal + * @type {string} + * @memberof AddOrUpdateGoalResponse200DataGoalDuration + */ + 'start'?: string; + /** + * The end date of the goal + * @type {string} + * @memberof AddOrUpdateGoalResponse200DataGoalDuration + */ + 'end'?: string; +} + diff --git a/models/add-or-update-goal-response200-data-goal-expected-outcome.ts b/models/add-or-update-goal-response200-data-goal-expected-outcome.ts new file mode 100644 index 00000000..5d83f209 --- /dev/null +++ b/models/add-or-update-goal-response200-data-goal-expected-outcome.ts @@ -0,0 +1,36 @@ +/* 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. + */ + + + +/** + * The expected outcome of the goal + * @export + * @interface AddOrUpdateGoalResponse200DataGoalExpectedOutcome + */ +export interface AddOrUpdateGoalResponse200DataGoalExpectedOutcome { + /** + * The numeric target of the goal + * @type {number} + * @memberof AddOrUpdateGoalResponse200DataGoalExpectedOutcome + */ + 'target'?: number; + /** + * The tracking metric of the goal + * @type {string} + * @memberof AddOrUpdateGoalResponse200DataGoalExpectedOutcome + */ + 'tracking_metric'?: string; +} + diff --git a/models/add-or-update-goal-response200-data-goal-type-params.ts b/models/add-or-update-goal-response200-data-goal-type-params.ts new file mode 100644 index 00000000..98f942ea --- /dev/null +++ b/models/add-or-update-goal-response200-data-goal-type-params.ts @@ -0,0 +1,36 @@ +/* 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. + */ + + + +/** + * The parameters that accompany the goal type + * @export + * @interface AddOrUpdateGoalResponse200DataGoalTypeParams + */ +export interface AddOrUpdateGoalResponse200DataGoalTypeParams { + /** + * The IDs of pipelines of the goal + * @type {Array} + * @memberof AddOrUpdateGoalResponse200DataGoalTypeParams + */ + 'pipeline_id'?: Array; + /** + * The IDs of activity types of the goal + * @type {Array} + * @memberof AddOrUpdateGoalResponse200DataGoalTypeParams + */ + 'activity_type_id'?: Array; +} + diff --git a/models/add-or-update-goal-response200-data-goal-type.ts b/models/add-or-update-goal-response200-data-goal-type.ts new file mode 100644 index 00000000..d665f906 --- /dev/null +++ b/models/add-or-update-goal-response200-data-goal-type.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddOrUpdateGoalResponse200DataGoalTypeParams } from './add-or-update-goal-response200-data-goal-type-params'; + +/** + * The type of the goal + * @export + * @interface AddOrUpdateGoalResponse200DataGoalType + */ +export interface AddOrUpdateGoalResponse200DataGoalType { + /** + * The name of the goal type + * @type {string} + * @memberof AddOrUpdateGoalResponse200DataGoalType + */ + 'name'?: string; + /** + * + * @type {AddOrUpdateGoalResponse200DataGoalTypeParams} + * @memberof AddOrUpdateGoalResponse200DataGoalType + */ + 'params'?: AddOrUpdateGoalResponse200DataGoalTypeParams; +} + diff --git a/models/add-or-update-goal-response200-data-goal.ts b/models/add-or-update-goal-response200-data-goal.ts new file mode 100644 index 00000000..5aa686e6 --- /dev/null +++ b/models/add-or-update-goal-response200-data-goal.ts @@ -0,0 +1,96 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddOrUpdateGoalResponse200DataGoalAssignee } from './add-or-update-goal-response200-data-goal-assignee'; +// May contain unused imports in some cases +// @ts-ignore +import { AddOrUpdateGoalResponse200DataGoalDuration } from './add-or-update-goal-response200-data-goal-duration'; +// May contain unused imports in some cases +// @ts-ignore +import { AddOrUpdateGoalResponse200DataGoalExpectedOutcome } from './add-or-update-goal-response200-data-goal-expected-outcome'; +// May contain unused imports in some cases +// @ts-ignore +import { AddOrUpdateGoalResponse200DataGoalType } from './add-or-update-goal-response200-data-goal-type'; + +/** + * + * @export + * @interface AddOrUpdateGoalResponse200DataGoal + */ +export interface AddOrUpdateGoalResponse200DataGoal { + /** + * The ID of the goal + * @type {string} + * @memberof AddOrUpdateGoalResponse200DataGoal + */ + 'id'?: string; + /** + * The ID of the creator of the goal + * @type {number} + * @memberof AddOrUpdateGoalResponse200DataGoal + */ + 'owner_id'?: number; + /** + * The title of the goal + * @type {string} + * @memberof AddOrUpdateGoalResponse200DataGoal + */ + 'title'?: string; + /** + * + * @type {AddOrUpdateGoalResponse200DataGoalType} + * @memberof AddOrUpdateGoalResponse200DataGoal + */ + 'type'?: AddOrUpdateGoalResponse200DataGoalType; + /** + * + * @type {AddOrUpdateGoalResponse200DataGoalAssignee} + * @memberof AddOrUpdateGoalResponse200DataGoal + */ + 'assignee'?: AddOrUpdateGoalResponse200DataGoalAssignee; + /** + * The interval of the goal + * @type {string} + * @memberof AddOrUpdateGoalResponse200DataGoal + */ + 'interval'?: string; + /** + * + * @type {AddOrUpdateGoalResponse200DataGoalDuration} + * @memberof AddOrUpdateGoalResponse200DataGoal + */ + 'duration'?: AddOrUpdateGoalResponse200DataGoalDuration; + /** + * + * @type {AddOrUpdateGoalResponse200DataGoalExpectedOutcome} + * @memberof AddOrUpdateGoalResponse200DataGoal + */ + 'expected_outcome'?: AddOrUpdateGoalResponse200DataGoalExpectedOutcome; + /** + * Whether the goal is currently active or not + * @type {boolean} + * @memberof AddOrUpdateGoalResponse200DataGoal + */ + 'is_active'?: boolean; + /** + * The IDs of the reports that belong to the goal + * @type {Array} + * @memberof AddOrUpdateGoalResponse200DataGoal + */ + 'report_ids'?: Array; +} + diff --git a/models/add-or-update-goal-response200-data.ts b/models/add-or-update-goal-response200-data.ts new file mode 100644 index 00000000..7c8e2b52 --- /dev/null +++ b/models/add-or-update-goal-response200-data.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddOrUpdateGoalResponse200DataGoal } from './add-or-update-goal-response200-data-goal'; + +/** + * + * @export + * @interface AddOrUpdateGoalResponse200Data + */ +export interface AddOrUpdateGoalResponse200Data { + /** + * + * @type {AddOrUpdateGoalResponse200DataGoal} + * @memberof AddOrUpdateGoalResponse200Data + */ + 'goal'?: AddOrUpdateGoalResponse200DataGoal; +} + diff --git a/models/add-or-update-goal-response200.ts b/models/add-or-update-goal-response200.ts new file mode 100644 index 00000000..6ff2f266 --- /dev/null +++ b/models/add-or-update-goal-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddOrUpdateGoalResponse200Data } from './add-or-update-goal-response200-data'; + +/** + * + * @export + * @interface AddOrUpdateGoalResponse200 + */ +export interface AddOrUpdateGoalResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof AddOrUpdateGoalResponse200 + */ + 'success'?: boolean; + /** + * + * @type {AddOrUpdateGoalResponse200Data} + * @memberof AddOrUpdateGoalResponse200 + */ + 'data'?: AddOrUpdateGoalResponse200Data; +} + diff --git a/models/add-or-update-lead-label-response200.ts b/models/add-or-update-lead-label-response200.ts new file mode 100644 index 00000000..38299c80 --- /dev/null +++ b/models/add-or-update-lead-label-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetLeadLabelsResponse200DataInner } from './get-lead-labels-response200-data-inner'; + +/** + * + * @export + * @interface AddOrUpdateLeadLabelResponse200 + */ +export interface AddOrUpdateLeadLabelResponse200 { + /** + * + * @type {boolean} + * @memberof AddOrUpdateLeadLabelResponse200 + */ + 'success'?: boolean; + /** + * + * @type {GetLeadLabelsResponse200DataInner} + * @memberof AddOrUpdateLeadLabelResponse200 + */ + 'data'?: GetLeadLabelsResponse200DataInner; +} + diff --git a/models/add-or-update-role-setting-request.ts b/models/add-or-update-role-setting-request.ts new file mode 100644 index 00000000..7ce4fe31 --- /dev/null +++ b/models/add-or-update-role-setting-request.ts @@ -0,0 +1,55 @@ +/* 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 + * @interface AddOrUpdateRoleSettingRequest + */ +export interface AddOrUpdateRoleSettingRequest { + /** + * + * @type {string} + * @memberof AddOrUpdateRoleSettingRequest + */ + 'setting_key': AddOrUpdateRoleSettingRequestSettingKeyConst; + /** + * Possible values for the `default_visibility` setting depending on the subscription plan:
Essential / Advanced plan
ValueDescription
`1`Owner & Followers
`3`Entire company

Professional / Enterprise plan
ValueDescription
`1`Owner only
`3`Owner's visibility group
`5`Owner's visibility group and sub-groups
`7`Entire company

Read more about visibility groups here. + * @type {number} + * @memberof AddOrUpdateRoleSettingRequest + */ + 'value': AddOrUpdateRoleSettingRequestValueConst; +} + +export const AddOrUpdateRoleSettingRequestSettingKeyConst = { + deal_default_visibility: 'deal_default_visibility', + lead_default_visibility: 'lead_default_visibility', + org_default_visibility: 'org_default_visibility', + person_default_visibility: 'person_default_visibility', + product_default_visibility: 'product_default_visibility' +} as const; + +export type AddOrUpdateRoleSettingRequestSettingKeyConst = typeof AddOrUpdateRoleSettingRequestSettingKeyConst[keyof typeof AddOrUpdateRoleSettingRequestSettingKeyConst]; +export const AddOrUpdateRoleSettingRequestValueConst = { + NUMBER_1: 1, + NUMBER_3: 3, + NUMBER_5: 5, + NUMBER_7: 7 +} as const; + +export type AddOrUpdateRoleSettingRequestValueConst = typeof AddOrUpdateRoleSettingRequestValueConst[keyof typeof AddOrUpdateRoleSettingRequestValueConst]; + + diff --git a/models/add-or-update-role-setting-response200-all-of-data.ts b/models/add-or-update-role-setting-response200-all-of-data.ts new file mode 100644 index 00000000..4da826dd --- /dev/null +++ b/models/add-or-update-role-setting-response200-all-of-data.ts @@ -0,0 +1,46 @@ +/* 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. + */ + + + +/** + * The response data + * @export + * @interface AddOrUpdateRoleSettingResponse200AllOfData + */ +export interface AddOrUpdateRoleSettingResponse200AllOfData { + /** + * The ID of the role + * @type {number} + * @memberof AddOrUpdateRoleSettingResponse200AllOfData + */ + 'id'?: number; + /** + * The setting + * @type {number} + * @memberof AddOrUpdateRoleSettingResponse200AllOfData + */ + 'deal_default_visibility'?: AddOrUpdateRoleSettingResponse200AllOfDataDealDefaultVisibilityConst; +} + +export const AddOrUpdateRoleSettingResponse200AllOfDataDealDefaultVisibilityConst = { + NUMBER_1: 1, + NUMBER_3: 3, + NUMBER_5: 5, + NUMBER_7: 7 +} as const; + +export type AddOrUpdateRoleSettingResponse200AllOfDataDealDefaultVisibilityConst = typeof AddOrUpdateRoleSettingResponse200AllOfDataDealDefaultVisibilityConst[keyof typeof AddOrUpdateRoleSettingResponse200AllOfDataDealDefaultVisibilityConst]; + + diff --git a/models/add-or-update-role-setting-response200-all-of.ts b/models/add-or-update-role-setting-response200-all-of.ts new file mode 100644 index 00000000..10e753da --- /dev/null +++ b/models/add-or-update-role-setting-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddOrUpdateRoleSettingResponse200AllOfData } from './add-or-update-role-setting-response200-all-of-data'; + +/** + * + * @export + * @interface AddOrUpdateRoleSettingResponse200AllOf + */ +export interface AddOrUpdateRoleSettingResponse200AllOf { + /** + * + * @type {AddOrUpdateRoleSettingResponse200AllOfData} + * @memberof AddOrUpdateRoleSettingResponse200AllOf + */ + 'data'?: AddOrUpdateRoleSettingResponse200AllOfData; +} + diff --git a/models/add-or-update-role-setting-response200.ts b/models/add-or-update-role-setting-response200.ts new file mode 100644 index 00000000..6cfc5129 --- /dev/null +++ b/models/add-or-update-role-setting-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddOrUpdateRoleSettingResponse200AllOf } from './add-or-update-role-setting-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { AddOrUpdateRoleSettingResponse200AllOfData } from './add-or-update-role-setting-response200-all-of-data'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; + +/** + * @type AddOrUpdateRoleSettingResponse200 + * @export + */ +export type AddOrUpdateRoleSettingResponse200 = AddOrUpdateRoleSettingResponse200AllOf & BaseResponse; + + diff --git a/models/add-organization-follower-request.ts b/models/add-organization-follower-request.ts new file mode 100644 index 00000000..637802db --- /dev/null +++ b/models/add-organization-follower-request.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface AddOrganizationFollowerRequest + */ +export interface AddOrganizationFollowerRequest { + /** + * The ID of the user + * @type {number} + * @memberof AddOrganizationFollowerRequest + */ + 'user_id': number; +} + diff --git a/models/add-organization-follower-response200.ts b/models/add-organization-follower-response200.ts new file mode 100644 index 00000000..5b35e86d --- /dev/null +++ b/models/add-organization-follower-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedFollowersResponse2001DataInner } from './get-associated-followers-response2001-data-inner'; + +/** + * + * @export + * @interface AddOrganizationFollowerResponse200 + */ +export interface AddOrganizationFollowerResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof AddOrganizationFollowerResponse200 + */ + 'success'?: boolean; + /** + * + * @type {GetAssociatedFollowersResponse2001DataInner} + * @memberof AddOrganizationFollowerResponse200 + */ + 'data'?: GetAssociatedFollowersResponse2001DataInner; +} + diff --git a/models/add-organization-relationship-request.ts b/models/add-organization-relationship-request.ts new file mode 100644 index 00000000..4b53560c --- /dev/null +++ b/models/add-organization-relationship-request.ts @@ -0,0 +1,56 @@ +/* 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 + * @interface AddOrganizationRelationshipRequest + */ +export interface AddOrganizationRelationshipRequest { + /** + * The type of organization relationship + * @type {string} + * @memberof AddOrganizationRelationshipRequest + */ + 'type': AddOrganizationRelationshipRequestTypeConst; + /** + * The owner of the relationship. If type is `parent`, then the owner is the parent and the linked organization is the daughter. + * @type {number} + * @memberof AddOrganizationRelationshipRequest + */ + 'rel_owner_org_id': number; + /** + * The linked organization in the relationship. If type is `parent`, then the linked organization is the daughter. + * @type {number} + * @memberof AddOrganizationRelationshipRequest + */ + 'rel_linked_org_id': number; + /** + * The ID of the base organization for the returned calculated values + * @type {number} + * @memberof AddOrganizationRelationshipRequest + */ + 'org_id'?: number; +} + +export const AddOrganizationRelationshipRequestTypeConst = { + parent: 'parent', + related: 'related' +} as const; + +export type AddOrganizationRelationshipRequestTypeConst = typeof AddOrganizationRelationshipRequestTypeConst[keyof typeof AddOrganizationRelationshipRequestTypeConst]; + + diff --git a/models/add-organization-relationship-response200-all-of.ts b/models/add-organization-relationship-response200-all-of.ts new file mode 100644 index 00000000..49aa0fe9 --- /dev/null +++ b/models/add-organization-relationship-response200-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationRelationshipsResponse200AllOfRelatedObjects } from './get-organization-relationships-response200-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationRelationshipWithCalculatedFieldsAllOf } from './organization-relationship-with-calculated-fields-all-of'; + +/** + * + * @export + * @interface AddOrganizationRelationshipResponse200AllOf + */ +export interface AddOrganizationRelationshipResponse200AllOf { + /** + * + * @type {OrganizationRelationshipWithCalculatedFieldsAllOf} + * @memberof AddOrganizationRelationshipResponse200AllOf + */ + 'data'?: OrganizationRelationshipWithCalculatedFieldsAllOf; + /** + * + * @type {GetOrganizationRelationshipsResponse200AllOfRelatedObjects} + * @memberof AddOrganizationRelationshipResponse200AllOf + */ + 'related_objects'?: GetOrganizationRelationshipsResponse200AllOfRelatedObjects; +} + diff --git a/models/add-organization-relationship-response200.ts b/models/add-organization-relationship-response200.ts new file mode 100644 index 00000000..0c971c7b --- /dev/null +++ b/models/add-organization-relationship-response200.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddOrganizationRelationshipResponse200AllOf } from './add-organization-relationship-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationRelationshipsResponse200AllOfRelatedObjects } from './get-organization-relationships-response200-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationRelationshipWithCalculatedFieldsAllOf } from './organization-relationship-with-calculated-fields-all-of'; + +/** + * @type AddOrganizationRelationshipResponse200 + * @export + */ +export type AddOrganizationRelationshipResponse200 = AddOrganizationRelationshipResponse200AllOf & BaseResponse; + + diff --git a/models/add-organization-request-all-of.ts b/models/add-organization-request-all-of.ts new file mode 100644 index 00000000..314f4773 --- /dev/null +++ b/models/add-organization-request-all-of.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface AddOrganizationRequestAllOf + */ +export interface AddOrganizationRequestAllOf { + /** + * The name of the organization + * @type {string} + * @memberof AddOrganizationRequestAllOf + */ + 'name': string; + /** + * The optional creation date & time of the organization in UTC. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof AddOrganizationRequestAllOf + */ + 'add_time'?: string; +} + diff --git a/models/add-organization-request.ts b/models/add-organization-request.ts new file mode 100644 index 00000000..df15c684 --- /dev/null +++ b/models/add-organization-request.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddOrganizationRequestAllOf } from './add-organization-request-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { BasicOrganization } from './basic-organization'; + +/** + * @type AddOrganizationRequest + * @export + */ +export type AddOrganizationRequest = AddOrganizationRequestAllOf & BasicOrganization; + + diff --git a/models/add-organization-response200-all-of.ts b/models/add-organization-response200-all-of.ts new file mode 100644 index 00000000..aa868bf8 --- /dev/null +++ b/models/add-organization-response200-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseOrganizationItemWithEditNameFlag } from './base-organization-item-with-edit-name-flag'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsResponse200AllOfRelatedObjects } from './get-organizations-response200-all-of-related-objects'; + +/** + * + * @export + * @interface AddOrganizationResponse200AllOf + */ +export interface AddOrganizationResponse200AllOf { + /** + * + * @type {BaseOrganizationItemWithEditNameFlag} + * @memberof AddOrganizationResponse200AllOf + */ + 'data'?: BaseOrganizationItemWithEditNameFlag; + /** + * + * @type {GetOrganizationsResponse200AllOfRelatedObjects} + * @memberof AddOrganizationResponse200AllOf + */ + 'related_objects'?: GetOrganizationsResponse200AllOfRelatedObjects; +} + diff --git a/models/add-organization-response200.ts b/models/add-organization-response200.ts new file mode 100644 index 00000000..1fc90dcf --- /dev/null +++ b/models/add-organization-response200.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddOrganizationResponse200AllOf } from './add-organization-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseOrganizationItemWithEditNameFlag } from './base-organization-item-with-edit-name-flag'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsResponse200AllOfRelatedObjects } from './get-organizations-response200-all-of-related-objects'; + +/** + * @type AddOrganizationResponse200 + * @export + */ +export type AddOrganizationResponse200 = AddOrganizationResponse200AllOf & BaseResponse; + + diff --git a/models/add-person-follower-request.ts b/models/add-person-follower-request.ts new file mode 100644 index 00000000..62d90293 --- /dev/null +++ b/models/add-person-follower-request.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface AddPersonFollowerRequest + */ +export interface AddPersonFollowerRequest { + /** + * The ID of the user + * @type {number} + * @memberof AddPersonFollowerRequest + */ + 'user_id': number; +} + diff --git a/models/add-person-follower-response200-all-of-data.ts b/models/add-person-follower-response200-all-of-data.ts new file mode 100644 index 00000000..099c5e4c --- /dev/null +++ b/models/add-person-follower-response200-all-of-data.ts @@ -0,0 +1,48 @@ +/* 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 + * @interface AddPersonFollowerResponse200AllOfData + */ +export interface AddPersonFollowerResponse200AllOfData { + /** + * The ID of the user who was added as a follower to a person + * @type {number} + * @memberof AddPersonFollowerResponse200AllOfData + */ + 'user_id'?: number; + /** + * The ID of the follower + * @type {number} + * @memberof AddPersonFollowerResponse200AllOfData + */ + 'id'?: number; + /** + * The ID of the person to whom the follower was added + * @type {number} + * @memberof AddPersonFollowerResponse200AllOfData + */ + 'person_id'?: number; + /** + * The date and time when the follower was added to a person. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof AddPersonFollowerResponse200AllOfData + */ + 'add_time'?: string; +} + diff --git a/models/add-person-follower-response200-all-of.ts b/models/add-person-follower-response200-all-of.ts new file mode 100644 index 00000000..9f2d93c7 --- /dev/null +++ b/models/add-person-follower-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddPersonFollowerResponse200AllOfData } from './add-person-follower-response200-all-of-data'; + +/** + * + * @export + * @interface AddPersonFollowerResponse200AllOf + */ +export interface AddPersonFollowerResponse200AllOf { + /** + * + * @type {AddPersonFollowerResponse200AllOfData} + * @memberof AddPersonFollowerResponse200AllOf + */ + 'data'?: AddPersonFollowerResponse200AllOfData; +} + diff --git a/models/add-person-follower-response200.ts b/models/add-person-follower-response200.ts new file mode 100644 index 00000000..262dd446 --- /dev/null +++ b/models/add-person-follower-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddPersonFollowerResponse200AllOf } from './add-person-follower-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { AddPersonFollowerResponse200AllOfData } from './add-person-follower-response200-all-of-data'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; + +/** + * @type AddPersonFollowerResponse200 + * @export + */ +export type AddPersonFollowerResponse200 = AddPersonFollowerResponse200AllOf & BaseResponse; + + diff --git a/models/add-person-picture-response200-all-of.ts b/models/add-person-picture-response200-all-of.ts new file mode 100644 index 00000000..144eb1dd --- /dev/null +++ b/models/add-person-picture-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsResponse200AllOfRelatedObjectsPicture } from './get-organizations-response200-all-of-related-objects-picture'; + +/** + * + * @export + * @interface AddPersonPictureResponse200AllOf + */ +export interface AddPersonPictureResponse200AllOf { + /** + * + * @type {GetOrganizationsResponse200AllOfRelatedObjectsPicture} + * @memberof AddPersonPictureResponse200AllOf + */ + 'data'?: GetOrganizationsResponse200AllOfRelatedObjectsPicture; +} + diff --git a/models/add-person-picture-response200.ts b/models/add-person-picture-response200.ts new file mode 100644 index 00000000..73f79a24 --- /dev/null +++ b/models/add-person-picture-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddPersonPictureResponse200AllOf } from './add-person-picture-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsResponse200AllOfRelatedObjectsPicture } from './get-organizations-response200-all-of-related-objects-picture'; + +/** + * @type AddPersonPictureResponse200 + * @export + */ +export type AddPersonPictureResponse200 = AddPersonPictureResponse200AllOf & BaseResponse; + + diff --git a/models/add-person-request-all-of.ts b/models/add-person-request-all-of.ts new file mode 100644 index 00000000..62868e53 --- /dev/null +++ b/models/add-person-request-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface AddPersonRequestAllOf + */ +export interface AddPersonRequestAllOf { + /** + * The name of the person + * @type {string} + * @memberof AddPersonRequestAllOf + */ + 'name': string; +} + diff --git a/models/add-person-request.ts b/models/add-person-request.ts new file mode 100644 index 00000000..578f2442 --- /dev/null +++ b/models/add-person-request.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddPersonRequestAllOf } from './add-person-request-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { BasicPersonRequest } from './basic-person-request'; +// May contain unused imports in some cases +// @ts-ignore +import { BasicPersonRequestEmailInner } from './basic-person-request-email-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOfPhoneInner } from './person-item-all-of-phone-inner'; + +/** + * @type AddPersonRequest + * @export + */ +export type AddPersonRequest = AddPersonRequestAllOf & BasicPersonRequest; + + diff --git a/models/add-person-response200-all-of.ts b/models/add-person-response200-all-of.ts new file mode 100644 index 00000000..9e1f0f65 --- /dev/null +++ b/models/add-person-response200-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ListProductsResponse200AllOfRelatedObjects } from './list-products-response200-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItem } from './person-item'; + +/** + * + * @export + * @interface AddPersonResponse200AllOf + */ +export interface AddPersonResponse200AllOf { + /** + * + * @type {PersonItem} + * @memberof AddPersonResponse200AllOf + */ + 'data'?: PersonItem; + /** + * + * @type {ListProductsResponse200AllOfRelatedObjects} + * @memberof AddPersonResponse200AllOf + */ + 'related_objects'?: ListProductsResponse200AllOfRelatedObjects; +} + diff --git a/models/add-person-response200.ts b/models/add-person-response200.ts new file mode 100644 index 00000000..72089ba9 --- /dev/null +++ b/models/add-person-response200.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddPersonResponse200AllOf } from './add-person-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { ListProductsResponse200AllOfRelatedObjects } from './list-products-response200-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItem } from './person-item'; + +/** + * @type AddPersonResponse200 + * @export + */ +export type AddPersonResponse200 = AddPersonResponse200AllOf & BaseResponse; + + diff --git a/models/add-pipeline-response200-all-of-data.ts b/models/add-pipeline-response200-all-of-data.ts new file mode 100644 index 00000000..e1e96e15 --- /dev/null +++ b/models/add-pipeline-response200-all-of-data.ts @@ -0,0 +1,72 @@ +/* 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. + */ + + + +/** + * The pipeline object + * @export + * @interface AddPipelineResponse200AllOfData + */ +export interface AddPipelineResponse200AllOfData { + /** + * The ID of the pipeline + * @type {number} + * @memberof AddPipelineResponse200AllOfData + */ + 'id'?: number; + /** + * The name of the pipeline + * @type {string} + * @memberof AddPipelineResponse200AllOfData + */ + 'name'?: string; + /** + * The pipeline title displayed in the URL + * @type {string} + * @memberof AddPipelineResponse200AllOfData + */ + 'url_title'?: string; + /** + * Defines the order of pipelines. First order (`order_nr=0`) is the default pipeline. + * @type {number} + * @memberof AddPipelineResponse200AllOfData + */ + 'order_nr'?: number; + /** + * Whether this pipeline will be made inactive (hidden) or active + * @type {boolean} + * @memberof AddPipelineResponse200AllOfData + */ + 'active'?: boolean; + /** + * Whether deal probability is disabled or enabled for this pipeline + * @type {boolean} + * @memberof AddPipelineResponse200AllOfData + */ + 'deal_probability'?: boolean; + /** + * The pipeline creation time. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof AddPipelineResponse200AllOfData + */ + 'add_time'?: string; + /** + * The pipeline update time. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof AddPipelineResponse200AllOfData + */ + 'update_time'?: string; +} + diff --git a/models/add-pipeline-response200-all-of.ts b/models/add-pipeline-response200-all-of.ts new file mode 100644 index 00000000..42d2b212 --- /dev/null +++ b/models/add-pipeline-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddPipelineResponse200AllOfData } from './add-pipeline-response200-all-of-data'; + +/** + * + * @export + * @interface AddPipelineResponse200AllOf + */ +export interface AddPipelineResponse200AllOf { + /** + * + * @type {AddPipelineResponse200AllOfData} + * @memberof AddPipelineResponse200AllOf + */ + 'data'?: AddPipelineResponse200AllOfData; +} + diff --git a/models/add-pipeline-response200.ts b/models/add-pipeline-response200.ts new file mode 100644 index 00000000..b919ae96 --- /dev/null +++ b/models/add-pipeline-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddPipelineResponse200AllOf } from './add-pipeline-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { AddPipelineResponse200AllOfData } from './add-pipeline-response200-all-of-data'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; + +/** + * @type AddPipelineResponse200 + * @export + */ +export type AddPipelineResponse200 = AddPipelineResponse200AllOf & BaseResponse; + + diff --git a/models/add-product-follower-request.ts b/models/add-product-follower-request.ts new file mode 100644 index 00000000..f23de589 --- /dev/null +++ b/models/add-product-follower-request.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface AddProductFollowerRequest + */ +export interface AddProductFollowerRequest { + /** + * The ID of the user + * @type {number} + * @memberof AddProductFollowerRequest + */ + 'user_id': number; +} + diff --git a/models/add-product-request-all-of.ts b/models/add-product-request-all-of.ts new file mode 100644 index 00000000..4a44e38e --- /dev/null +++ b/models/add-product-request-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface AddProductRequestAllOf + */ +export interface AddProductRequestAllOf { + /** + * The name of the product + * @type {string} + * @memberof AddProductRequestAllOf + */ + 'name': string; +} + diff --git a/models/add-product-request.ts b/models/add-product-request.ts new file mode 100644 index 00000000..0d349820 --- /dev/null +++ b/models/add-product-request.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddProductRequestAllOf } from './add-product-request-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { ProductRequest } from './product-request'; + +/** + * @type AddProductRequest + * @export + */ +export type AddProductRequest = AddProductRequestAllOf & ProductRequest; + + diff --git a/models/add-product-request1-all-of.ts b/models/add-product-request1-all-of.ts new file mode 100644 index 00000000..ec6597cf --- /dev/null +++ b/models/add-product-request1-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface AddProductRequest1AllOf + */ +export interface AddProductRequest1AllOf { + /** + * The name of the product + * @type {string} + * @memberof AddProductRequest1AllOf + */ + 'name'?: string; +} + diff --git a/models/add-product-request1.ts b/models/add-product-request1.ts new file mode 100644 index 00000000..d999020e --- /dev/null +++ b/models/add-product-request1.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddProductRequest1AllOf } from './add-product-request1-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { ProductRequest } from './product-request'; + +/** + * @type AddProductRequest1 + * @export + */ +export type AddProductRequest1 = AddProductRequest1AllOf & ProductRequest; + + diff --git a/models/add-project-request-all-of.ts b/models/add-project-request-all-of.ts new file mode 100644 index 00000000..63a789b4 --- /dev/null +++ b/models/add-project-request-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface AddProjectRequestAllOf + */ +export interface AddProjectRequestAllOf { + /** + * The ID of the template the project will be based on + * @type {number} + * @memberof AddProjectRequestAllOf + */ + 'template_id'?: number; +} + diff --git a/models/add-project-request.ts b/models/add-project-request.ts new file mode 100644 index 00000000..ec4df111 --- /dev/null +++ b/models/add-project-request.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddProjectRequestAllOf } from './add-project-request-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { FullProjectObjectAllOf1 } from './full-project-object-all-of1'; +// May contain unused imports in some cases +// @ts-ignore +import { RequiredPostProjectParameters } from './required-post-project-parameters'; + +/** + * @type AddProjectRequest + * @export + */ +export type AddProjectRequest = AddProjectRequestAllOf & FullProjectObjectAllOf1 & RequiredPostProjectParameters; + + diff --git a/models/add-project-response201.ts b/models/add-project-response201.ts new file mode 100644 index 00000000..0674d257 --- /dev/null +++ b/models/add-project-response201.ts @@ -0,0 +1,45 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ProjectResponseObject } from './project-response-object'; + +/** + * + * @export + * @interface AddProjectResponse201 + */ +export interface AddProjectResponse201 { + /** + * + * @type {boolean} + * @memberof AddProjectResponse201 + */ + 'success'?: boolean; + /** + * + * @type {ProjectResponseObject} + * @memberof AddProjectResponse201 + */ + 'data'?: ProjectResponseObject; + /** + * + * @type {object} + * @memberof AddProjectResponse201 + */ + 'additional_data'?: object | null; +} + diff --git a/models/add-recurring-subscription-request.ts b/models/add-recurring-subscription-request.ts new file mode 100644 index 00000000..d8eb420d --- /dev/null +++ b/models/add-recurring-subscription-request.ts @@ -0,0 +1,94 @@ +/* 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 + * @interface AddRecurringSubscriptionRequest + */ +export interface AddRecurringSubscriptionRequest { + /** + * The ID of the deal this recurring subscription is associated with + * @type {number} + * @memberof AddRecurringSubscriptionRequest + */ + 'deal_id': number; + /** + * The currency of the recurring subscription. Accepts a 3-character currency code. + * @type {string} + * @memberof AddRecurringSubscriptionRequest + */ + 'currency': string; + /** + * The interval between payments + * @type {string} + * @memberof AddRecurringSubscriptionRequest + */ + 'cadence_type': AddRecurringSubscriptionRequestCadenceTypeConst; + /** + * The amount of each payment + * @type {number} + * @memberof AddRecurringSubscriptionRequest + */ + 'cycle_amount': number; + /** + * The start date of the recurring subscription. Format: YYYY-MM-DD + * @type {string} + * @memberof AddRecurringSubscriptionRequest + */ + 'start_date': string; + /** + * The description of the recurring subscription + * @type {string} + * @memberof AddRecurringSubscriptionRequest + */ + 'description'?: string; + /** + * Shows how many payments the subscription has. Note that one field must be set: `cycles_count` or `infinite`. If `cycles_count` is set, then `cycle_amount` and `start_date` are also required. + * @type {number} + * @memberof AddRecurringSubscriptionRequest + */ + 'cycles_count'?: number; + /** + * This indicates that the recurring subscription will last until it\'s manually canceled or deleted. Note that only one field must be set: `cycles_count` or `infinite`. + * @type {boolean} + * @memberof AddRecurringSubscriptionRequest + */ + 'infinite'?: boolean; + /** + * Array of additional payments. It requires a minimum structure as follows: [{ amount:SUM, description:DESCRIPTION, due_at:PAYMENT_DATE }]. Replace SUM with a payment amount, DESCRIPTION with an explanation string, PAYMENT_DATE with a date (format YYYY-MM-DD). + * @type {Array} + * @memberof AddRecurringSubscriptionRequest + */ + 'payments'?: Array; + /** + * Indicates that the deal value must be set to recurring subscription\'s MRR value + * @type {boolean} + * @memberof AddRecurringSubscriptionRequest + */ + 'update_deal_value'?: boolean; +} + +export const AddRecurringSubscriptionRequestCadenceTypeConst = { + weekly: 'weekly', + monthly: 'monthly', + quarterly: 'quarterly', + yearly: 'yearly' +} as const; + +export type AddRecurringSubscriptionRequestCadenceTypeConst = typeof AddRecurringSubscriptionRequestCadenceTypeConst[keyof typeof AddRecurringSubscriptionRequestCadenceTypeConst]; + + diff --git a/models/add-role-assignment-request.ts b/models/add-role-assignment-request.ts new file mode 100644 index 00000000..57c22008 --- /dev/null +++ b/models/add-role-assignment-request.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface AddRoleAssignmentRequest + */ +export interface AddRoleAssignmentRequest { + /** + * The ID of the user + * @type {number} + * @memberof AddRoleAssignmentRequest + */ + 'user_id': number; +} + diff --git a/models/add-role-assignment-response200-all-of-data.ts b/models/add-role-assignment-response200-all-of-data.ts new file mode 100644 index 00000000..2506bed1 --- /dev/null +++ b/models/add-role-assignment-response200-all-of-data.ts @@ -0,0 +1,36 @@ +/* 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. + */ + + + +/** + * The response data + * @export + * @interface AddRoleAssignmentResponse200AllOfData + */ +export interface AddRoleAssignmentResponse200AllOfData { + /** + * The ID of the user that was added to the role + * @type {number} + * @memberof AddRoleAssignmentResponse200AllOfData + */ + 'user_id'?: number; + /** + * The ID of the role the user was added to + * @type {number} + * @memberof AddRoleAssignmentResponse200AllOfData + */ + 'role_id'?: number; +} + diff --git a/models/add-role-assignment-response200-all-of.ts b/models/add-role-assignment-response200-all-of.ts new file mode 100644 index 00000000..91cd3806 --- /dev/null +++ b/models/add-role-assignment-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddRoleAssignmentResponse200AllOfData } from './add-role-assignment-response200-all-of-data'; + +/** + * + * @export + * @interface AddRoleAssignmentResponse200AllOf + */ +export interface AddRoleAssignmentResponse200AllOf { + /** + * + * @type {AddRoleAssignmentResponse200AllOfData} + * @memberof AddRoleAssignmentResponse200AllOf + */ + 'data'?: AddRoleAssignmentResponse200AllOfData; +} + diff --git a/models/add-role-assignment-response200.ts b/models/add-role-assignment-response200.ts new file mode 100644 index 00000000..3b8ea151 --- /dev/null +++ b/models/add-role-assignment-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddRoleAssignmentResponse200AllOf } from './add-role-assignment-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { AddRoleAssignmentResponse200AllOfData } from './add-role-assignment-response200-all-of-data'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; + +/** + * @type AddRoleAssignmentResponse200 + * @export + */ +export type AddRoleAssignmentResponse200 = AddRoleAssignmentResponse200AllOf & BaseResponse; + + diff --git a/models/add-role-request.ts b/models/add-role-request.ts new file mode 100644 index 00000000..0044e3c8 --- /dev/null +++ b/models/add-role-request.ts @@ -0,0 +1,36 @@ +/* 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. + */ + + + +/** + * The details of the role + * @export + * @interface AddRoleRequest + */ +export interface AddRoleRequest { + /** + * The name of the role + * @type {string} + * @memberof AddRoleRequest + */ + 'name': string; + /** + * The ID of the parent role + * @type {number} + * @memberof AddRoleRequest + */ + 'parent_role_id'?: number; +} + diff --git a/models/add-role-response200-all-of-data.ts b/models/add-role-response200-all-of-data.ts new file mode 100644 index 00000000..b822953e --- /dev/null +++ b/models/add-role-response200-all-of-data.ts @@ -0,0 +1,30 @@ +/* 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. + */ + + + +/** + * The response data + * @export + * @interface AddRoleResponse200AllOfData + */ +export interface AddRoleResponse200AllOfData { + /** + * + * @type {number} + * @memberof AddRoleResponse200AllOfData + */ + 'id'?: number; +} + diff --git a/models/add-role-response200-all-of.ts b/models/add-role-response200-all-of.ts new file mode 100644 index 00000000..c9bc738d --- /dev/null +++ b/models/add-role-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddRoleResponse200AllOfData } from './add-role-response200-all-of-data'; + +/** + * + * @export + * @interface AddRoleResponse200AllOf + */ +export interface AddRoleResponse200AllOf { + /** + * + * @type {AddRoleResponse200AllOfData} + * @memberof AddRoleResponse200AllOf + */ + 'data'?: AddRoleResponse200AllOfData; +} + diff --git a/models/add-role-response200.ts b/models/add-role-response200.ts new file mode 100644 index 00000000..ed84e481 --- /dev/null +++ b/models/add-role-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddRoleResponse200AllOf } from './add-role-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { AddRoleResponse200AllOfData } from './add-role-response200-all-of-data'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; + +/** + * @type AddRoleResponse200 + * @export + */ +export type AddRoleResponse200 = AddRoleResponse200AllOf & BaseResponse; + + diff --git a/models/add-stage-request.ts b/models/add-stage-request.ts new file mode 100644 index 00000000..7c6d0c71 --- /dev/null +++ b/models/add-stage-request.ts @@ -0,0 +1,54 @@ +/* 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 + * @interface AddStageRequest + */ +export interface AddStageRequest { + /** + * The name of the stage + * @type {string} + * @memberof AddStageRequest + */ + 'name': string; + /** + * The ID of the pipeline to add stage to + * @type {number} + * @memberof AddStageRequest + */ + 'pipeline_id': number; + /** + * The success probability percentage of the deal. Used/shown when deal weighted values are used. + * @type {number} + * @memberof AddStageRequest + */ + 'deal_probability'?: number; + /** + * Whether deals in this stage can become rotten + * @type {boolean} + * @memberof AddStageRequest + */ + 'rotten_flag'?: boolean; + /** + * The number of days the deals not updated in this stage would become rotten. Applies only if the `rotten_flag` is set. + * @type {number} + * @memberof AddStageRequest + */ + 'rotten_days'?: number; +} + diff --git a/models/add-subscription-installment-request.ts b/models/add-subscription-installment-request.ts new file mode 100644 index 00000000..3cf03859 --- /dev/null +++ b/models/add-subscription-installment-request.ts @@ -0,0 +1,48 @@ +/* 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 + * @interface AddSubscriptionInstallmentRequest + */ +export interface AddSubscriptionInstallmentRequest { + /** + * The ID of the deal this installment subscription is associated with + * @type {number} + * @memberof AddSubscriptionInstallmentRequest + */ + 'deal_id': number; + /** + * The currency of the installment subscription. Accepts a 3-character currency code. + * @type {string} + * @memberof AddSubscriptionInstallmentRequest + */ + 'currency': string; + /** + * Array of payments. It requires a minimum structure as follows: [{ amount:SUM, description:DESCRIPTION, due_at:PAYMENT_DATE }]. Replace SUM with a payment amount, DESCRIPTION with an explanation string, PAYMENT_DATE with a date (format YYYY-MM-DD). + * @type {Array} + * @memberof AddSubscriptionInstallmentRequest + */ + 'payments': Array; + /** + * Indicates that the deal value must be set to the installment subscription\'s total value + * @type {boolean} + * @memberof AddSubscriptionInstallmentRequest + */ + 'update_deal_value'?: boolean; +} + diff --git a/models/add-task-request.ts b/models/add-task-request.ts new file mode 100644 index 00000000..a696f6b2 --- /dev/null +++ b/models/add-task-request.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { RequiedPostProjectParameters } from './requied-post-project-parameters'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdateProjectRequest1AllOf1 } from './update-project-request1-all-of1'; + +/** + * @type AddTaskRequest + * @export + */ +export type AddTaskRequest = RequiedPostProjectParameters & UpdateProjectRequest1AllOf1; + + diff --git a/models/add-task-response201.ts b/models/add-task-response201.ts new file mode 100644 index 00000000..417eb779 --- /dev/null +++ b/models/add-task-response201.ts @@ -0,0 +1,45 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { TaskResponseObject } from './task-response-object'; + +/** + * + * @export + * @interface AddTaskResponse201 + */ +export interface AddTaskResponse201 { + /** + * + * @type {boolean} + * @memberof AddTaskResponse201 + */ + 'success'?: boolean; + /** + * + * @type {TaskResponseObject} + * @memberof AddTaskResponse201 + */ + 'data'?: TaskResponseObject; + /** + * + * @type {object} + * @memberof AddTaskResponse201 + */ + 'additional_data'?: object | null; +} + diff --git a/models/add-team-request.ts b/models/add-team-request.ts new file mode 100644 index 00000000..f9cf5956 --- /dev/null +++ b/models/add-team-request.ts @@ -0,0 +1,48 @@ +/* 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 + * @interface AddTeamRequest + */ +export interface AddTeamRequest { + /** + * The team name + * @type {string} + * @memberof AddTeamRequest + */ + 'name'?: string; + /** + * The team description + * @type {string} + * @memberof AddTeamRequest + */ + 'description'?: string; + /** + * The team manager ID + * @type {number} + * @memberof AddTeamRequest + */ + 'manager_id'?: number; + /** + * The IDs of the users that belong to the team + * @type {Array} + * @memberof AddTeamRequest + */ + 'users'?: Array; +} + diff --git a/models/add-team-request1.ts b/models/add-team-request1.ts new file mode 100644 index 00000000..e748e1ea --- /dev/null +++ b/models/add-team-request1.ts @@ -0,0 +1,48 @@ +/* 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 + * @interface AddTeamRequest1 + */ +export interface AddTeamRequest1 { + /** + * The team name + * @type {string} + * @memberof AddTeamRequest1 + */ + 'name': string; + /** + * The team manager ID + * @type {number} + * @memberof AddTeamRequest1 + */ + 'manager_id': number; + /** + * The team description + * @type {string} + * @memberof AddTeamRequest1 + */ + 'description'?: string; + /** + * The IDs of the users that belong to the team + * @type {Array} + * @memberof AddTeamRequest1 + */ + 'users'?: Array; +} + diff --git a/models/add-team-user-request.ts b/models/add-team-user-request.ts new file mode 100644 index 00000000..95846bbc --- /dev/null +++ b/models/add-team-user-request.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface AddTeamUserRequest + */ +export interface AddTeamUserRequest { + /** + * The list of user IDs + * @type {Array} + * @memberof AddTeamUserRequest + */ + 'users': Array; +} + diff --git a/models/add-user-request-access-inner.ts b/models/add-user-request-access-inner.ts new file mode 100644 index 00000000..38afe900 --- /dev/null +++ b/models/add-user-request-access-inner.ts @@ -0,0 +1,53 @@ +/* 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 + * @interface AddUserRequestAccessInner + */ +export interface AddUserRequestAccessInner { + /** + * + * @type {string} + * @memberof AddUserRequestAccessInner + */ + 'app': AddUserRequestAccessInnerAppConst; + /** + * + * @type {boolean} + * @memberof AddUserRequestAccessInner + */ + 'admin'?: boolean; + /** + * + * @type {string} + * @memberof AddUserRequestAccessInner + */ + 'permission_set_id'?: string; +} + +export const AddUserRequestAccessInnerAppConst = { + sales: 'sales', + projects: 'projects', + campaigns: 'campaigns', + global: 'global', + account_settings: 'account_settings' +} as const; + +export type AddUserRequestAccessInnerAppConst = typeof AddUserRequestAccessInnerAppConst[keyof typeof AddUserRequestAccessInnerAppConst]; + + diff --git a/models/add-user-request.ts b/models/add-user-request.ts new file mode 100644 index 00000000..9dc030ac --- /dev/null +++ b/models/add-user-request.ts @@ -0,0 +1,45 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddUserRequestAccessInner } from './add-user-request-access-inner'; + +/** + * + * @export + * @interface AddUserRequest + */ +export interface AddUserRequest { + /** + * The email of the user + * @type {string} + * @memberof AddUserRequest + */ + 'email': string; + /** + * The access given to the user. Each item in the array represents access to a specific app. Optionally may include either admin flag or permission set ID to specify which access to give within the app. If both are omitted, the default access for the corresponding app will be used. It requires structure as follows: `[{ app: \'sales\', permission_set_id: \'62cc4d7f-4038-4352-abf3-a8c1c822b631\' }, { app: \'global\', admin: true }, { app: \'account_settings\' }]` + * @type {Array} + * @memberof AddUserRequest + */ + 'access'?: Array; + /** + * Whether the user is active or not. `false` = Not activated, `true` = Activated + * @type {boolean} + * @memberof AddUserRequest + */ + 'active_flag'?: boolean; +} + diff --git a/models/add-webhook-request.ts b/models/add-webhook-request.ts new file mode 100644 index 00000000..c0cf390d --- /dev/null +++ b/models/add-webhook-request.ts @@ -0,0 +1,98 @@ +/* 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 + * @interface AddWebhookRequest + */ +export interface AddWebhookRequest { + /** + * A full, valid, publicly accessible URL which determines where to send the notifications. Please note that you cannot use Pipedrive API endpoints as the `subscription_url` and the chosen URL must not redirect to another link. + * @type {string} + * @memberof AddWebhookRequest + */ + 'subscription_url': string; + /** + * The type of action to receive notifications about. Wildcard will match all supported actions. + * @type {string} + * @memberof AddWebhookRequest + */ + 'event_action': AddWebhookRequestEventActionConst; + /** + * The type of object to receive notifications about. Wildcard will match all supported objects. + * @type {string} + * @memberof AddWebhookRequest + */ + 'event_object': AddWebhookRequestEventObjectConst; + /** + * The ID of the user that this webhook will be authorized with. You have the option to use a different user\'s `user_id`. If it is not set, the current user\'s `user_id` will be used. As each webhook event is checked against a user’s permissions, the webhook will only be sent if the user has access to the specified object(s). If you want to receive notifications for all events, please use a top-level admin user’s `user_id`. + * @type {number} + * @memberof AddWebhookRequest + */ + 'user_id'?: number; + /** + * The HTTP basic auth username of the subscription URL endpoint (if required) + * @type {string} + * @memberof AddWebhookRequest + */ + 'http_auth_user'?: string; + /** + * The HTTP basic auth password of the subscription URL endpoint (if required) + * @type {string} + * @memberof AddWebhookRequest + */ + 'http_auth_password'?: string; + /** + * The webhook\'s version + * @type {string} + * @memberof AddWebhookRequest + */ + 'version'?: AddWebhookRequestVersionConst; +} + +export const AddWebhookRequestEventActionConst = { + added: 'added', + updated: 'updated', + merged: 'merged', + deleted: 'deleted', + Star: '*' +} as const; + +export type AddWebhookRequestEventActionConst = typeof AddWebhookRequestEventActionConst[keyof typeof AddWebhookRequestEventActionConst]; +export const AddWebhookRequestEventObjectConst = { + activity: 'activity', + activityType: 'activityType', + deal: 'deal', + note: 'note', + organization: 'organization', + person: 'person', + pipeline: 'pipeline', + product: 'product', + stage: 'stage', + user: 'user', + Star: '*' +} as const; + +export type AddWebhookRequestEventObjectConst = typeof AddWebhookRequestEventObjectConst[keyof typeof AddWebhookRequestEventObjectConst]; +export const AddWebhookRequestVersionConst = { + _1_0: '1.0', + _2_0: '2.0' +} as const; + +export type AddWebhookRequestVersionConst = typeof AddWebhookRequestVersionConst[keyof typeof AddWebhookRequestVersionConst]; + + diff --git a/models/additional-base-organization-item-info.ts b/models/additional-base-organization-item-info.ts new file mode 100644 index 00000000..3f9b739f --- /dev/null +++ b/models/additional-base-organization-item-info.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DealsCountAndActivityInfo } from './deals-count-and-activity-info'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationCountAndAddressInfo } from './organization-count-and-address-info'; + +/** + * @type AdditionalBaseOrganizationItemInfo + * @export + */ +export type AdditionalBaseOrganizationItemInfo = DealsCountAndActivityInfo & OrganizationCountAndAddressInfo; + + diff --git a/models/additional-merge-person-info.ts b/models/additional-merge-person-info.ts new file mode 100644 index 00000000..bab5bd87 --- /dev/null +++ b/models/additional-merge-person-info.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { MergePersonDealRelatedInfo } from './merge-person-deal-related-info'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonNameCountAndEmailInfoWithIds } from './person-name-count-and-email-info-with-ids'; + +/** + * @type AdditionalMergePersonInfo + * @export + */ +export type AdditionalMergePersonInfo = MergePersonDealRelatedInfo & PersonNameCountAndEmailInfoWithIds; + + diff --git a/models/additional-person-info.ts b/models/additional-person-info.ts new file mode 100644 index 00000000..e915bb1a --- /dev/null +++ b/models/additional-person-info.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { Owner } from './owner'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonCountEmailDealAndActivityInfo } from './person-count-email-deal-and-activity-info'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonNameInfoWithOrgAndOwnerId } from './person-name-info-with-org-and-owner-id'; +// May contain unused imports in some cases +// @ts-ignore +import { RelationshipOrganizationInfoItemWithActiveFlag } from './relationship-organization-info-item-with-active-flag'; + +/** + * @type AdditionalPersonInfo + * @export + */ +export type AdditionalPersonInfo = PersonCountEmailDealAndActivityInfo & PersonNameInfoWithOrgAndOwnerId; + + diff --git a/models/base-deal.ts b/models/base-deal.ts new file mode 100644 index 00000000..b3138a79 --- /dev/null +++ b/models/base-deal.ts @@ -0,0 +1,336 @@ +/* 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 + * @interface BaseDeal + */ +export interface BaseDeal { + /** + * The ID of the deal stage + * @type {number} + * @memberof BaseDeal + */ + 'stage_id'?: number; + /** + * The title of the deal + * @type {string} + * @memberof BaseDeal + */ + 'title'?: string; + /** + * The value of the deal + * @type {number} + * @memberof BaseDeal + */ + 'value'?: number; + /** + * The currency associated with the deal + * @type {string} + * @memberof BaseDeal + */ + 'currency'?: string; + /** + * The creation date and time of the deal + * @type {string} + * @memberof BaseDeal + */ + 'add_time'?: string; + /** + * The last updated date and time of the deal + * @type {string} + * @memberof BaseDeal + */ + 'update_time'?: string; + /** + * The last updated date and time of the deal stage + * @type {string} + * @memberof BaseDeal + */ + 'stage_change_time'?: string; + /** + * Whether the deal is active or not + * @type {boolean} + * @memberof BaseDeal + */ + 'active'?: boolean; + /** + * Whether the deal is deleted or not + * @type {boolean} + * @memberof BaseDeal + */ + 'deleted'?: boolean; + /** + * The status of the deal + * @type {string} + * @memberof BaseDeal + */ + 'status'?: string; + /** + * The success probability percentage of the deal + * @type {number} + * @memberof BaseDeal + */ + 'probability'?: number | null; + /** + * The date of the next activity associated with the deal + * @type {string} + * @memberof BaseDeal + */ + 'next_activity_date'?: string; + /** + * The time of the next activity associated with the deal + * @type {string} + * @memberof BaseDeal + */ + 'next_activity_time'?: string; + /** + * The ID of the next activity associated with the deal + * @type {number} + * @memberof BaseDeal + */ + 'next_activity_id'?: number | null; + /** + * The ID of the last activity associated with the deal + * @type {number} + * @memberof BaseDeal + */ + 'last_activity_id'?: number | null; + /** + * The date of the last activity associated with the deal + * @type {string} + * @memberof BaseDeal + */ + 'last_activity_date'?: string | null; + /** + * The reason for losing the deal + * @type {string} + * @memberof BaseDeal + */ + 'lost_reason'?: string | null; + /** + * The visibility of the deal + * @type {string} + * @memberof BaseDeal + */ + 'visible_to'?: string; + /** + * The date and time of closing the deal + * @type {string} + * @memberof BaseDeal + */ + 'close_time'?: string | null; + /** + * The ID of the pipeline associated with the deal + * @type {number} + * @memberof BaseDeal + */ + 'pipeline_id'?: number; + /** + * The date and time of changing the deal status as won + * @type {string} + * @memberof BaseDeal + */ + 'won_time'?: string; + /** + * The date and time of the first time changing the deal status as won + * @type {string} + * @memberof BaseDeal + */ + 'first_won_time'?: string; + /** + * The date and time of changing the deal status as lost + * @type {string} + * @memberof BaseDeal + */ + 'lost_time'?: string; + /** + * The number of products associated with the deal + * @type {number} + * @memberof BaseDeal + */ + 'products_count'?: number; + /** + * The number of files associated with the deal + * @type {number} + * @memberof BaseDeal + */ + 'files_count'?: number; + /** + * The number of notes associated with the deal + * @type {number} + * @memberof BaseDeal + */ + 'notes_count'?: number; + /** + * The number of followers associated with the deal + * @type {number} + * @memberof BaseDeal + */ + 'followers_count'?: number; + /** + * The number of emails associated with the deal + * @type {number} + * @memberof BaseDeal + */ + 'email_messages_count'?: number; + /** + * The number of activities associated with the deal + * @type {number} + * @memberof BaseDeal + */ + 'activities_count'?: number; + /** + * The number of completed activities associated with the deal + * @type {number} + * @memberof BaseDeal + */ + 'done_activities_count'?: number; + /** + * The number of incomplete activities associated with the deal + * @type {number} + * @memberof BaseDeal + */ + 'undone_activities_count'?: number; + /** + * The number of participants associated with the deal + * @type {number} + * @memberof BaseDeal + */ + 'participants_count'?: number; + /** + * The expected close date of the deal + * @type {string} + * @memberof BaseDeal + */ + 'expected_close_date'?: string; + /** + * The date and time of the last incoming email associated with the deal + * @type {string} + * @memberof BaseDeal + */ + 'last_incoming_mail_time'?: string; + /** + * The date and time of the last outgoing email associated with the deal + * @type {string} + * @memberof BaseDeal + */ + 'last_outgoing_mail_time'?: string; + /** + * The label or multiple labels assigned to the deal + * @type {string} + * @memberof BaseDeal + */ + 'label'?: string; + /** + * The order number of the deal stage associated with the deal + * @type {number} + * @memberof BaseDeal + */ + 'stage_order_nr'?: number; + /** + * The name of the person associated with the deal + * @type {string} + * @memberof BaseDeal + */ + 'person_name'?: string; + /** + * The name of the organization associated with the deal + * @type {string} + * @memberof BaseDeal + */ + 'org_name'?: string; + /** + * The subject of the next activity associated with the deal + * @type {string} + * @memberof BaseDeal + */ + 'next_activity_subject'?: string; + /** + * The type of the next activity associated with the deal + * @type {string} + * @memberof BaseDeal + */ + 'next_activity_type'?: string; + /** + * The duration of the next activity associated with the deal + * @type {string} + * @memberof BaseDeal + */ + 'next_activity_duration'?: string; + /** + * The note of the next activity associated with the deal + * @type {string} + * @memberof BaseDeal + */ + 'next_activity_note'?: string; + /** + * The deal value formatted with selected currency. E.g. US$500 + * @type {string} + * @memberof BaseDeal + */ + 'formatted_value'?: string; + /** + * Probability times deal value. Probability can either be deal probability or if not set, then stage probability. + * @type {number} + * @memberof BaseDeal + */ + 'weighted_value'?: number; + /** + * The weighted_value formatted with selected currency. E.g. US$500 + * @type {string} + * @memberof BaseDeal + */ + 'formatted_weighted_value'?: string; + /** + * The currency associated with the deal + * @type {string} + * @memberof BaseDeal + */ + 'weighted_value_currency'?: string; + /** + * The date and time of changing the deal status as rotten + * @type {string} + * @memberof BaseDeal + */ + 'rotten_time'?: string | null; + /** + * The name of the deal owner + * @type {string} + * @memberof BaseDeal + */ + 'owner_name'?: string; + /** + * The BCC email of the deal + * @type {string} + * @memberof BaseDeal + */ + 'cc_email'?: string; + /** + * If the organization that is associated with the deal is hidden or not + * @type {boolean} + * @memberof BaseDeal + */ + 'org_hidden'?: boolean; + /** + * If the person that is associated with the deal is hidden or not + * @type {boolean} + * @memberof BaseDeal + */ + 'person_hidden'?: boolean; +} + diff --git a/models/base-mail-thread-all-of.ts b/models/base-mail-thread-all-of.ts new file mode 100644 index 00000000..6b39585b --- /dev/null +++ b/models/base-mail-thread-all-of.ts @@ -0,0 +1,158 @@ +/* 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 + * @interface BaseMailThreadAllOf + */ +export interface BaseMailThreadAllOf { + /** + * ID of the mail thread + * @type {number} + * @memberof BaseMailThreadAllOf + */ + 'id'?: number; + /** + * The connection account ID + * @type {string} + * @memberof BaseMailThreadAllOf + */ + 'account_id'?: string; + /** + * ID of the user whom mail message will be assigned to + * @type {number} + * @memberof BaseMailThreadAllOf + */ + 'user_id'?: number; + /** + * The subject + * @type {string} + * @memberof BaseMailThreadAllOf + */ + 'subject'?: string; + /** + * A snippet + * @type {string} + * @memberof BaseMailThreadAllOf + */ + 'snippet'?: string; + /** + * + * @type {number} + * @memberof BaseMailThreadAllOf + */ + 'read_flag'?: BaseMailThreadAllOfReadFlagConst; + /** + * Mail tracking status + * @type {string} + * @memberof BaseMailThreadAllOf + */ + 'mail_tracking_status'?: string | null; + /** + * + * @type {number} + * @memberof BaseMailThreadAllOf + */ + 'has_attachments_flag'?: BaseMailThreadAllOfHasAttachmentsFlagConst; + /** + * + * @type {number} + * @memberof BaseMailThreadAllOf + */ + 'has_inline_attachments_flag'?: BaseMailThreadAllOfHasInlineAttachmentsFlagConst; + /** + * + * @type {number} + * @memberof BaseMailThreadAllOf + */ + 'has_real_attachments_flag'?: BaseMailThreadAllOfHasRealAttachmentsFlagConst; + /** + * + * @type {number} + * @memberof BaseMailThreadAllOf + */ + 'deleted_flag'?: BaseMailThreadAllOfDeletedFlagConst; + /** + * + * @type {number} + * @memberof BaseMailThreadAllOf + */ + 'synced_flag'?: BaseMailThreadAllOfSyncedFlagConst; + /** + * + * @type {number} + * @memberof BaseMailThreadAllOf + */ + 'smart_bcc_flag'?: BaseMailThreadAllOfSmartBccFlagConst; + /** + * + * @type {number} + * @memberof BaseMailThreadAllOf + */ + 'mail_link_tracking_enabled_flag'?: BaseMailThreadAllOfMailLinkTrackingEnabledFlagConst; +} + +export const BaseMailThreadAllOfReadFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type BaseMailThreadAllOfReadFlagConst = typeof BaseMailThreadAllOfReadFlagConst[keyof typeof BaseMailThreadAllOfReadFlagConst]; +export const BaseMailThreadAllOfHasAttachmentsFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type BaseMailThreadAllOfHasAttachmentsFlagConst = typeof BaseMailThreadAllOfHasAttachmentsFlagConst[keyof typeof BaseMailThreadAllOfHasAttachmentsFlagConst]; +export const BaseMailThreadAllOfHasInlineAttachmentsFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type BaseMailThreadAllOfHasInlineAttachmentsFlagConst = typeof BaseMailThreadAllOfHasInlineAttachmentsFlagConst[keyof typeof BaseMailThreadAllOfHasInlineAttachmentsFlagConst]; +export const BaseMailThreadAllOfHasRealAttachmentsFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type BaseMailThreadAllOfHasRealAttachmentsFlagConst = typeof BaseMailThreadAllOfHasRealAttachmentsFlagConst[keyof typeof BaseMailThreadAllOfHasRealAttachmentsFlagConst]; +export const BaseMailThreadAllOfDeletedFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type BaseMailThreadAllOfDeletedFlagConst = typeof BaseMailThreadAllOfDeletedFlagConst[keyof typeof BaseMailThreadAllOfDeletedFlagConst]; +export const BaseMailThreadAllOfSyncedFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type BaseMailThreadAllOfSyncedFlagConst = typeof BaseMailThreadAllOfSyncedFlagConst[keyof typeof BaseMailThreadAllOfSyncedFlagConst]; +export const BaseMailThreadAllOfSmartBccFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type BaseMailThreadAllOfSmartBccFlagConst = typeof BaseMailThreadAllOfSmartBccFlagConst[keyof typeof BaseMailThreadAllOfSmartBccFlagConst]; +export const BaseMailThreadAllOfMailLinkTrackingEnabledFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type BaseMailThreadAllOfMailLinkTrackingEnabledFlagConst = typeof BaseMailThreadAllOfMailLinkTrackingEnabledFlagConst[keyof typeof BaseMailThreadAllOfMailLinkTrackingEnabledFlagConst]; + + diff --git a/models/base-mail-thread-all-of1-parties-to-inner.ts b/models/base-mail-thread-all-of1-parties-to-inner.ts new file mode 100644 index 00000000..b9771303 --- /dev/null +++ b/models/base-mail-thread-all-of1-parties-to-inner.ts @@ -0,0 +1,78 @@ +/* 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. + */ + + + +/** + * Member of a thread + * @export + * @interface BaseMailThreadAllOf1PartiesToInner + */ +export interface BaseMailThreadAllOf1PartiesToInner { + /** + * ID of the mail thread participant + * @type {number} + * @memberof BaseMailThreadAllOf1PartiesToInner + */ + 'id'?: number; + /** + * Name of the mail thread participant + * @type {string} + * @memberof BaseMailThreadAllOf1PartiesToInner + */ + 'name'?: string; + /** + * Whether the mail thread participant was last to send an email + * @type {boolean} + * @memberof BaseMailThreadAllOf1PartiesToInner + */ + 'latest_sent'?: boolean; + /** + * Email address of the mail thread participant + * @type {string} + * @memberof BaseMailThreadAllOf1PartiesToInner + */ + 'email_address'?: string; + /** + * Message time + * @type {number} + * @memberof BaseMailThreadAllOf1PartiesToInner + */ + 'message_time'?: number; + /** + * ID of the linked person + * @type {number} + * @memberof BaseMailThreadAllOf1PartiesToInner + */ + 'linked_person_id'?: number; + /** + * Email of the linked person + * @type {string} + * @memberof BaseMailThreadAllOf1PartiesToInner + */ + 'linked_person_name'?: string; + /** + * ID of the mail message party + * @type {number} + * @memberof BaseMailThreadAllOf1PartiesToInner + */ + 'mail_message_party_id'?: number; + /** + * Linked Organization ID + * @type {number} + * @memberof BaseMailThreadAllOf1PartiesToInner + */ + 'linked_organization_id'?: number | null; +} + diff --git a/models/base-mail-thread-all-of1-parties.ts b/models/base-mail-thread-all-of1-parties.ts new file mode 100644 index 00000000..f185f700 --- /dev/null +++ b/models/base-mail-thread-all-of1-parties.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseMailThreadAllOf1PartiesToInner } from './base-mail-thread-all-of1-parties-to-inner'; + +/** + * Parties of the mail thread + * @export + * @interface BaseMailThreadAllOf1Parties + */ +export interface BaseMailThreadAllOf1Parties { + /** + * Recipients of the mail thread + * @type {Array} + * @memberof BaseMailThreadAllOf1Parties + */ + 'to'?: Array; + /** + * Senders of the mail thread + * @type {Array} + * @memberof BaseMailThreadAllOf1Parties + */ + 'from'?: Array; +} + diff --git a/models/base-mail-thread-all-of1.ts b/models/base-mail-thread-all-of1.ts new file mode 100644 index 00000000..a6a7c662 --- /dev/null +++ b/models/base-mail-thread-all-of1.ts @@ -0,0 +1,209 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseMailThreadAllOf1Parties } from './base-mail-thread-all-of1-parties'; + +/** + * + * @export + * @interface BaseMailThreadAllOf1 + */ +export interface BaseMailThreadAllOf1 { + /** + * + * @type {BaseMailThreadAllOf1Parties} + * @memberof BaseMailThreadAllOf1 + */ + 'parties'?: BaseMailThreadAllOf1Parties; + /** + * Parties of the drafted mail thread + * @type {Array} + * @memberof BaseMailThreadAllOf1 + */ + 'drafts_parties'?: Array; + /** + * Folders in which messages from thread are being stored + * @type {Array} + * @memberof BaseMailThreadAllOf1 + */ + 'folders'?: Array; + /** + * Version + * @type {number} + * @memberof BaseMailThreadAllOf1 + */ + 'version'?: number; + /** + * A snippet from a draft + * @type {string} + * @memberof BaseMailThreadAllOf1 + */ + 'snippet_draft'?: string | null; + /** + * A snippet from a message sent + * @type {string} + * @memberof BaseMailThreadAllOf1 + */ + 'snippet_sent'?: string; + /** + * An amount of messages + * @type {number} + * @memberof BaseMailThreadAllOf1 + */ + 'message_count'?: number; + /** + * + * @type {number} + * @memberof BaseMailThreadAllOf1 + */ + 'has_draft_flag'?: BaseMailThreadAllOf1HasDraftFlagConst; + /** + * + * @type {number} + * @memberof BaseMailThreadAllOf1 + */ + 'has_sent_flag'?: BaseMailThreadAllOf1HasSentFlagConst; + /** + * + * @type {number} + * @memberof BaseMailThreadAllOf1 + */ + 'archived_flag'?: BaseMailThreadAllOf1ArchivedFlagConst; + /** + * + * @type {number} + * @memberof BaseMailThreadAllOf1 + */ + 'shared_flag'?: BaseMailThreadAllOf1SharedFlagConst; + /** + * + * @type {number} + * @memberof BaseMailThreadAllOf1 + */ + 'external_deleted_flag'?: BaseMailThreadAllOf1ExternalDeletedFlagConst; + /** + * + * @type {number} + * @memberof BaseMailThreadAllOf1 + */ + 'first_message_to_me_flag'?: BaseMailThreadAllOf1FirstMessageToMeFlagConst; + /** + * Last message timestamp + * @type {string} + * @memberof BaseMailThreadAllOf1 + */ + 'last_message_timestamp'?: string; + /** + * The time when the mail thread has had the first message received or created + * @type {string} + * @memberof BaseMailThreadAllOf1 + */ + 'first_message_timestamp'?: string; + /** + * The last time when the mail thread has had a message sent + * @type {string} + * @memberof BaseMailThreadAllOf1 + */ + 'last_message_sent_timestamp'?: string | null; + /** + * The last time when the mail thread has had a message received + * @type {string} + * @memberof BaseMailThreadAllOf1 + */ + 'last_message_received_timestamp'?: string; + /** + * The time when the mail thread was inserted to database + * @type {string} + * @memberof BaseMailThreadAllOf1 + */ + 'add_time'?: string; + /** + * The time when the mail thread was updated in database received + * @type {string} + * @memberof BaseMailThreadAllOf1 + */ + 'update_time'?: string; + /** + * The ID of the deal + * @type {number} + * @memberof BaseMailThreadAllOf1 + */ + 'deal_id'?: number | null; + /** + * Status of the deal + * @type {string} + * @memberof BaseMailThreadAllOf1 + */ + 'deal_status'?: string | null; + /** + * The ID of the lead + * @type {string} + * @memberof BaseMailThreadAllOf1 + */ + 'lead_id'?: string | null; + /** + * + * @type {number} + * @memberof BaseMailThreadAllOf1 + */ + 'all_messages_sent_flag'?: BaseMailThreadAllOf1AllMessagesSentFlagConst; +} + +export const BaseMailThreadAllOf1HasDraftFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type BaseMailThreadAllOf1HasDraftFlagConst = typeof BaseMailThreadAllOf1HasDraftFlagConst[keyof typeof BaseMailThreadAllOf1HasDraftFlagConst]; +export const BaseMailThreadAllOf1HasSentFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type BaseMailThreadAllOf1HasSentFlagConst = typeof BaseMailThreadAllOf1HasSentFlagConst[keyof typeof BaseMailThreadAllOf1HasSentFlagConst]; +export const BaseMailThreadAllOf1ArchivedFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type BaseMailThreadAllOf1ArchivedFlagConst = typeof BaseMailThreadAllOf1ArchivedFlagConst[keyof typeof BaseMailThreadAllOf1ArchivedFlagConst]; +export const BaseMailThreadAllOf1SharedFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type BaseMailThreadAllOf1SharedFlagConst = typeof BaseMailThreadAllOf1SharedFlagConst[keyof typeof BaseMailThreadAllOf1SharedFlagConst]; +export const BaseMailThreadAllOf1ExternalDeletedFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type BaseMailThreadAllOf1ExternalDeletedFlagConst = typeof BaseMailThreadAllOf1ExternalDeletedFlagConst[keyof typeof BaseMailThreadAllOf1ExternalDeletedFlagConst]; +export const BaseMailThreadAllOf1FirstMessageToMeFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type BaseMailThreadAllOf1FirstMessageToMeFlagConst = typeof BaseMailThreadAllOf1FirstMessageToMeFlagConst[keyof typeof BaseMailThreadAllOf1FirstMessageToMeFlagConst]; +export const BaseMailThreadAllOf1AllMessagesSentFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type BaseMailThreadAllOf1AllMessagesSentFlagConst = typeof BaseMailThreadAllOf1AllMessagesSentFlagConst[keyof typeof BaseMailThreadAllOf1AllMessagesSentFlagConst]; + + diff --git a/models/base-mail-thread.ts b/models/base-mail-thread.ts new file mode 100644 index 00000000..9c1e9ce0 --- /dev/null +++ b/models/base-mail-thread.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseMailThreadAllOf } from './base-mail-thread-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseMailThreadAllOf1 } from './base-mail-thread-all-of1'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseMailThreadAllOf1Parties } from './base-mail-thread-all-of1-parties'; + +/** + * @type BaseMailThread + * @export + */ +export type BaseMailThread = BaseMailThreadAllOf & BaseMailThreadAllOf1; + + diff --git a/models/base-mail-thread1.ts b/models/base-mail-thread1.ts new file mode 100644 index 00000000..93645b2b --- /dev/null +++ b/models/base-mail-thread1.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseMailThreadAllOf } from './base-mail-thread-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseMailThreadAllOf1 } from './base-mail-thread-all-of1'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseMailThreadAllOf1Parties } from './base-mail-thread-all-of1-parties'; + +/** + * @type BaseMailThread1 + * The mail thread object + * @export + */ +export type BaseMailThread1 = BaseMailThreadAllOf & BaseMailThreadAllOf1; + + diff --git a/models/base-organization-item-all-of-picture-id-all-of.ts b/models/base-organization-item-all-of-picture-id-all-of.ts new file mode 100644 index 00000000..2fc0959a --- /dev/null +++ b/models/base-organization-item-all-of-picture-id-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface BaseOrganizationItemAllOfPictureIdAllOf + */ +export interface BaseOrganizationItemAllOfPictureIdAllOf { + /** + * The ID of the picture associated with the item + * @type {number} + * @memberof BaseOrganizationItemAllOfPictureIdAllOf + */ + 'value'?: number; +} + diff --git a/models/base-organization-item-all-of-picture-id.ts b/models/base-organization-item-all-of-picture-id.ts new file mode 100644 index 00000000..2cdc7f76 --- /dev/null +++ b/models/base-organization-item-all-of-picture-id.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseOrganizationItemAllOfPictureIdAllOf } from './base-organization-item-all-of-picture-id-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOfPictureIdAllOf1 } from './person-item-all-of-picture-id-all-of1'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOfPictureIdAllOf1Pictures } from './person-item-all-of-picture-id-all-of1-pictures'; + +/** + * @type BaseOrganizationItemAllOfPictureId + * @export + */ +export type BaseOrganizationItemAllOfPictureId = BaseOrganizationItemAllOfPictureIdAllOf & PersonItemAllOfPictureIdAllOf1; + + diff --git a/models/base-organization-item-all-of.ts b/models/base-organization-item-all-of.ts new file mode 100644 index 00000000..5ab39f69 --- /dev/null +++ b/models/base-organization-item-all-of.ts @@ -0,0 +1,114 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseOrganizationItemAllOfPictureId } from './base-organization-item-all-of-picture-id'; +// May contain unused imports in some cases +// @ts-ignore +import { Owner } from './owner'; + +/** + * + * @export + * @interface BaseOrganizationItemAllOf + */ +export interface BaseOrganizationItemAllOf { + /** + * The ID of the organization + * @type {number} + * @memberof BaseOrganizationItemAllOf + */ + 'id'?: number; + /** + * The ID of the company related to the organization + * @type {number} + * @memberof BaseOrganizationItemAllOf + */ + 'company_id'?: number; + /** + * + * @type {Owner} + * @memberof BaseOrganizationItemAllOf + */ + 'owner_id'?: Owner; + /** + * The name of the organization + * @type {string} + * @memberof BaseOrganizationItemAllOf + */ + 'name'?: string; + /** + * Whether the organization is active or not + * @type {boolean} + * @memberof BaseOrganizationItemAllOf + */ + 'active_flag'?: boolean; + /** + * + * @type {BaseOrganizationItemAllOfPictureId} + * @memberof BaseOrganizationItemAllOf + */ + 'picture_id'?: BaseOrganizationItemAllOfPictureId; + /** + * The country code of the organization + * @type {string} + * @memberof BaseOrganizationItemAllOf + */ + 'country_code'?: string; + /** + * The first character of the organization name + * @type {string} + * @memberof BaseOrganizationItemAllOf + */ + 'first_char'?: string; + /** + * The creation date and time of the organization + * @type {string} + * @memberof BaseOrganizationItemAllOf + */ + 'add_time'?: string; + /** + * The last updated date and time of the organization + * @type {string} + * @memberof BaseOrganizationItemAllOf + */ + 'update_time'?: string; + /** + * The visibility group ID of who can see the organization + * @type {string} + * @memberof BaseOrganizationItemAllOf + */ + 'visible_to'?: string; + /** + * The label assigned to the organization + * @type {number} + * @memberof BaseOrganizationItemAllOf + */ + 'label'?: number; + /** + * The name of the organization owner + * @type {string} + * @memberof BaseOrganizationItemAllOf + */ + 'owner_name'?: string; + /** + * The BCC email associated with the organization + * @type {string} + * @memberof BaseOrganizationItemAllOf + */ + 'cc_email'?: string; +} + diff --git a/models/base-organization-item-with-edit-name-flag-all-of.ts b/models/base-organization-item-with-edit-name-flag-all-of.ts new file mode 100644 index 00000000..a830fb97 --- /dev/null +++ b/models/base-organization-item-with-edit-name-flag-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface BaseOrganizationItemWithEditNameFlagAllOf + */ +export interface BaseOrganizationItemWithEditNameFlagAllOf { + /** + * If the company ID of the organization and company ID of the request is same or not + * @type {boolean} + * @memberof BaseOrganizationItemWithEditNameFlagAllOf + */ + 'edit_name'?: boolean; +} + diff --git a/models/base-organization-item-with-edit-name-flag.ts b/models/base-organization-item-with-edit-name-flag.ts new file mode 100644 index 00000000..aead77bb --- /dev/null +++ b/models/base-organization-item-with-edit-name-flag.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseOrganizationItem } from './base-organization-item'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseOrganizationItemAllOfPictureId } from './base-organization-item-all-of-picture-id'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseOrganizationItemWithEditNameFlagAllOf } from './base-organization-item-with-edit-name-flag-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { Owner } from './owner'; + +/** + * @type BaseOrganizationItemWithEditNameFlag + * @export + */ +export type BaseOrganizationItemWithEditNameFlag = BaseOrganizationItem & BaseOrganizationItemWithEditNameFlagAllOf; + + diff --git a/models/base-organization-item.ts b/models/base-organization-item.ts new file mode 100644 index 00000000..4a16c40c --- /dev/null +++ b/models/base-organization-item.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AdditionalBaseOrganizationItemInfo } from './additional-base-organization-item-info'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseOrganizationItemAllOf } from './base-organization-item-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseOrganizationItemAllOfPictureId } from './base-organization-item-all-of-picture-id'; +// May contain unused imports in some cases +// @ts-ignore +import { Owner } from './owner'; + +/** + * @type BaseOrganizationItem + * @export + */ +export type BaseOrganizationItem = AdditionalBaseOrganizationItemInfo & BaseOrganizationItemAllOf; + + diff --git a/models/base-pipeline-with-selected-flag-all-of.ts b/models/base-pipeline-with-selected-flag-all-of.ts new file mode 100644 index 00000000..b6be6c74 --- /dev/null +++ b/models/base-pipeline-with-selected-flag-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface BasePipelineWithSelectedFlagAllOf + */ +export interface BasePipelineWithSelectedFlagAllOf { + /** + * A boolean that shows if the pipeline is selected from a filter or not + * @type {boolean} + * @memberof BasePipelineWithSelectedFlagAllOf + */ + 'selected'?: boolean; +} + diff --git a/models/base-pipeline-with-selected-flag.ts b/models/base-pipeline-with-selected-flag.ts new file mode 100644 index 00000000..335802a3 --- /dev/null +++ b/models/base-pipeline-with-selected-flag.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BasePipelineWithSelectedFlagAllOf } from './base-pipeline-with-selected-flag-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedDealsResponse200AllOfRelatedObjectsPipeline } from './get-associated-deals-response200-all-of-related-objects-pipeline'; + +/** + * @type BasePipelineWithSelectedFlag + * @export + */ +export type BasePipelineWithSelectedFlag = BasePipelineWithSelectedFlagAllOf & GetAssociatedDealsResponse200AllOfRelatedObjectsPipeline; + + diff --git a/models/base-response.ts b/models/base-response.ts new file mode 100644 index 00000000..44e1cecb --- /dev/null +++ b/models/base-response.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface BaseResponse + */ +export interface BaseResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof BaseResponse + */ + 'success'?: boolean; +} + diff --git a/models/base-response200-all-of.ts b/models/base-response200-all-of.ts new file mode 100644 index 00000000..b33ea4df --- /dev/null +++ b/models/base-response200-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface BaseResponse200AllOf + */ +export interface BaseResponse200AllOf { + /** + * The status of the response + * @type {string} + * @memberof BaseResponse200AllOf + */ + 'status'?: string; +} + diff --git a/models/base-response200.ts b/models/base-response200.ts new file mode 100644 index 00000000..0e485a98 --- /dev/null +++ b/models/base-response200.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse200AllOf } from './base-response200-all-of'; + +/** + * @type BaseResponse200 + * @export + */ +export type BaseResponse200 = BaseResponse & BaseResponse200AllOf; + + diff --git a/models/base-role-request.ts b/models/base-role-request.ts new file mode 100644 index 00000000..e250d536 --- /dev/null +++ b/models/base-role-request.ts @@ -0,0 +1,36 @@ +/* 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. + */ + + + +/** + * The details of the role + * @export + * @interface BaseRoleRequest + */ +export interface BaseRoleRequest { + /** + * The ID of the parent role + * @type {number} + * @memberof BaseRoleRequest + */ + 'parent_role_id'?: number; + /** + * The name of the role + * @type {string} + * @memberof BaseRoleRequest + */ + 'name'?: string; +} + diff --git a/models/base-team-additional-properties.ts b/models/base-team-additional-properties.ts new file mode 100644 index 00000000..be54aab8 --- /dev/null +++ b/models/base-team-additional-properties.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface BaseTeamAdditionalProperties + */ +export interface BaseTeamAdditionalProperties { + /** + * The team creation time. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof BaseTeamAdditionalProperties + */ + 'add_time'?: string; + /** + * The ID of the user who created the team + * @type {number} + * @memberof BaseTeamAdditionalProperties + */ + 'created_by_user_id'?: number; +} + diff --git a/models/base-team.ts b/models/base-team.ts new file mode 100644 index 00000000..3f94dcd4 --- /dev/null +++ b/models/base-team.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { TeamId } from './team-id'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdateTeamWithAdditionalProperties } from './update-team-with-additional-properties'; + +/** + * @type BaseTeam + * @export + */ +export type BaseTeam = TeamId & UpdateTeamWithAdditionalProperties; + + diff --git a/models/basic-deal-product-request.ts b/models/basic-deal-product-request.ts new file mode 100644 index 00000000..e99e2fde --- /dev/null +++ b/models/basic-deal-product-request.ts @@ -0,0 +1,120 @@ +/* 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 + * @interface BasicDealProductRequest + */ +export interface BasicDealProductRequest { + /** + * The ID of the product to use + * @type {number} + * @memberof BasicDealProductRequest + */ + 'product_id': number; + /** + * The price at which this product will be added to the deal + * @type {number} + * @memberof BasicDealProductRequest + */ + 'item_price': number; + /** + * Quantity – e.g. how many items of this product will be added to the deal + * @type {number} + * @memberof BasicDealProductRequest + */ + 'quantity': number; + /** + * The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage. + * @type {number} + * @memberof BasicDealProductRequest + */ + 'discount'?: number; + /** + * The type of the discount\'s value. + * @type {string} + * @memberof BasicDealProductRequest + */ + 'discount_type'?: BasicDealProductRequestDiscountTypeConst; + /** + * The duration of the product. If omitted, will be set to 1. + * @type {number} + * @memberof BasicDealProductRequest + */ + 'duration'?: number; + /** + * + * @type {string} + * @memberof BasicDealProductRequest + */ + 'duration_unit'?: BasicDealProductRequestDurationUnitConst; + /** + * The ID of the product variation to use. When omitted, no variation will be used. + * @type {number} + * @memberof BasicDealProductRequest + */ + 'product_variation_id'?: number | null; + /** + * A textual comment associated with this product-deal attachment + * @type {string} + * @memberof BasicDealProductRequest + */ + 'comments'?: string; + /** + * The tax percentage + * @type {number} + * @memberof BasicDealProductRequest + */ + 'tax'?: number; + /** + * The tax option to be applied to the products. When using `inclusive`, the tax percentage will already be included in the price. When using `exclusive`, the tax will not be included in the price. When using `none`, no tax will be added. Use the `tax` field for defining the tax percentage amount. By default, the user setting value for tax options will be used. Changing this in one product affects the rest of the products attached to the deal. + * @type {string} + * @memberof BasicDealProductRequest + */ + 'tax_method'?: BasicDealProductRequestTaxMethodConst; + /** + * Whether the product is enabled for a deal or not. This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default. + * @type {boolean} + * @memberof BasicDealProductRequest + */ + 'enabled_flag'?: boolean; +} + +export const BasicDealProductRequestDiscountTypeConst = { + percentage: 'percentage', + amount: 'amount' +} as const; + +export type BasicDealProductRequestDiscountTypeConst = typeof BasicDealProductRequestDiscountTypeConst[keyof typeof BasicDealProductRequestDiscountTypeConst]; +export const BasicDealProductRequestDurationUnitConst = { + hourly: 'hourly', + daily: 'daily', + weekly: 'weekly', + monthly: 'monthly', + yearly: 'yearly' +} as const; + +export type BasicDealProductRequestDurationUnitConst = typeof BasicDealProductRequestDurationUnitConst[keyof typeof BasicDealProductRequestDurationUnitConst]; +export const BasicDealProductRequestTaxMethodConst = { + exclusive: 'exclusive', + inclusive: 'inclusive', + none: 'none' +} as const; + +export type BasicDealProductRequestTaxMethodConst = typeof BasicDealProductRequestTaxMethodConst[keyof typeof BasicDealProductRequestTaxMethodConst]; + + diff --git a/models/basic-deal.ts b/models/basic-deal.ts new file mode 100644 index 00000000..a6a13409 --- /dev/null +++ b/models/basic-deal.ts @@ -0,0 +1,58 @@ +/* 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 + * @interface BasicDeal + */ +export interface BasicDeal { + /** + * The expected close date of the deal. In ISO 8601 format: YYYY-MM-DD. + * @type {string} + * @memberof BasicDeal + */ + 'expected_close_date'?: string; + /** + * The success probability percentage of the deal. Used/shown only when `deal_probability` for the pipeline of the deal is enabled. + * @type {number} + * @memberof BasicDeal + */ + 'probability'?: number; + /** + * The optional message about why the deal was lost (to be used when status = lost) + * @type {string} + * @memberof BasicDeal + */ + 'lost_reason'?: string; + /** + * + * @type {string} + * @memberof BasicDeal + */ + 'visible_to'?: BasicDealVisibleToConst; +} + +export const BasicDealVisibleToConst = { + _1: '1', + _3: '3', + _5: '5', + _7: '7' +} as const; + +export type BasicDealVisibleToConst = typeof BasicDealVisibleToConst[keyof typeof BasicDealVisibleToConst]; + + diff --git a/models/basic-goal-request.ts b/models/basic-goal-request.ts new file mode 100644 index 00000000..de76296b --- /dev/null +++ b/models/basic-goal-request.ts @@ -0,0 +1,70 @@ +/* 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 + * @interface BasicGoalRequest + */ +export interface BasicGoalRequest { + /** + * The title of the goal + * @type {string} + * @memberof BasicGoalRequest + */ + 'title'?: string; + /** + * Who this goal is assigned to. It requires the following JSON structure: `{ \"id\": \"1\", \"type\": \"person\" }`. `type` can be either `person`, `company` or `team`. ID of the assignee person, company or team. + * @type {object} + * @memberof BasicGoalRequest + */ + 'assignee'?: object; + /** + * The type of the goal. It requires the following JSON structure: `{ \"name\": \"deals_started\", \"params\": { \"pipeline_id\": [1, 2], \"activity_type_id\": [9] } }`. Type can be one of: `deals_won`, `deals_progressed`, `activities_completed`, `activities_added`, `deals_started` or `revenue_forecast`. `params` can include `pipeline_id`, `stage_id` or `activity_type_id`. `stage_id` is related to only `deals_progressed` type of goals and `activity_type_id` to `activities_completed` or `activities_added` types of goals. The `pipeline_id` and `activity_type_id` need to be given as an array of integers. To track the goal in all pipelines, set `pipeline_id` as `null` and similarly, to track the goal for all activities, set `activity_type_id` as `null`.” + * @type {object} + * @memberof BasicGoalRequest + */ + 'type'?: object; + /** + * The expected outcome of the goal. Expected outcome can be tracked either by `quantity` or by `sum`. It requires the following JSON structure: `{ \"target\": \"50\", \"tracking_metric\": \"quantity\" }` or `{ \"target\": \"50\", \"tracking_metric\": \"sum\", \"currency_id\": 1 }`. `currency_id` should only be added to `sum` type of goals. + * @type {object} + * @memberof BasicGoalRequest + */ + 'expected_outcome'?: object; + /** + * The date when the goal starts and ends. It requires the following JSON structure: `{ \"start\": \"2019-01-01\", \"end\": \"2022-12-31\" }`. Date in format of YYYY-MM-DD. \"end\" can be set to `null` for an infinite, open-ended goal. + * @type {object} + * @memberof BasicGoalRequest + */ + 'duration'?: object; + /** + * The interval of the goal + * @type {string} + * @memberof BasicGoalRequest + */ + 'interval'?: BasicGoalRequestIntervalConst; +} + +export const BasicGoalRequestIntervalConst = { + weekly: 'weekly', + monthly: 'monthly', + quarterly: 'quarterly', + yearly: 'yearly' +} as const; + +export type BasicGoalRequestIntervalConst = typeof BasicGoalRequestIntervalConst[keyof typeof BasicGoalRequestIntervalConst]; + + diff --git a/models/basic-organization.ts b/models/basic-organization.ts new file mode 100644 index 00000000..230ced5a --- /dev/null +++ b/models/basic-organization.ts @@ -0,0 +1,52 @@ +/* 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 + * @interface BasicOrganization + */ +export interface BasicOrganization { + /** + * The ID of the user who will be marked as the owner of this organization. When omitted, the authorized user ID will be used. + * @type {number} + * @memberof BasicOrganization + */ + 'owner_id'?: number; + /** + * The ID of the label. + * @type {number} + * @memberof BasicOrganization + */ + 'label'?: number; + /** + * + * @type {string} + * @memberof BasicOrganization + */ + 'visible_to'?: BasicOrganizationVisibleToConst; +} + +export const BasicOrganizationVisibleToConst = { + _1: '1', + _3: '3', + _5: '5', + _7: '7' +} as const; + +export type BasicOrganizationVisibleToConst = typeof BasicOrganizationVisibleToConst[keyof typeof BasicOrganizationVisibleToConst]; + + diff --git a/models/basic-person-request-email-inner.ts b/models/basic-person-request-email-inner.ts new file mode 100644 index 00000000..1f34a4c1 --- /dev/null +++ b/models/basic-person-request-email-inner.ts @@ -0,0 +1,42 @@ +/* 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 + * @interface BasicPersonRequestEmailInner + */ +export interface BasicPersonRequestEmailInner { + /** + * The email + * @type {string} + * @memberof BasicPersonRequestEmailInner + */ + 'value'?: string; + /** + * Boolean that indicates if email is primary for the person or not + * @type {boolean} + * @memberof BasicPersonRequestEmailInner + */ + 'primary'?: boolean; + /** + * The label that indicates the type of the email. (Possible values - work, home or other) + * @type {string} + * @memberof BasicPersonRequestEmailInner + */ + 'label'?: string; +} + diff --git a/models/basic-person-request.ts b/models/basic-person-request.ts new file mode 100644 index 00000000..c5b93710 --- /dev/null +++ b/models/basic-person-request.ts @@ -0,0 +1,96 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BasicPersonRequestEmailInner } from './basic-person-request-email-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOfPhoneInner } from './person-item-all-of-phone-inner'; + +/** + * + * @export + * @interface BasicPersonRequest + */ +export interface BasicPersonRequest { + /** + * The ID of the user who will be marked as the owner of this person. When omitted, the authorized user ID will be used. + * @type {number} + * @memberof BasicPersonRequest + */ + 'owner_id'?: number; + /** + * The ID of the organization this person will belong to + * @type {number} + * @memberof BasicPersonRequest + */ + 'org_id'?: number; + /** + * An email address as a string or an array of email objects related to the person. The structure of the array is as follows: `[{ \"value\": \"mail@example.com\", \"primary\": \"true\", \"label\": \"main\" }]`. Please note that only `value` is required. + * @type {Array} + * @memberof BasicPersonRequest + */ + 'email'?: Array; + /** + * A phone number supplied as a string or an array of phone objects related to the person. The structure of the array is as follows: `[{ \"value\": \"12345\", \"primary\": \"true\", \"label\": \"mobile\" }]`. Please note that only `value` is required. + * @type {Array} + * @memberof BasicPersonRequest + */ + 'phone'?: Array; + /** + * The ID of the label. + * @type {number} + * @memberof BasicPersonRequest + */ + 'label'?: number; + /** + * + * @type {string} + * @memberof BasicPersonRequest + */ + 'visible_to'?: BasicPersonRequestVisibleToConst; + /** + * + * @type {string} + * @memberof BasicPersonRequest + */ + 'marketing_status'?: BasicPersonRequestMarketingStatusConst; + /** + * The optional creation date & time of the person in UTC. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof BasicPersonRequest + */ + 'add_time'?: string; +} + +export const BasicPersonRequestVisibleToConst = { + _1: '1', + _3: '3', + _5: '5', + _7: '7' +} as const; + +export type BasicPersonRequestVisibleToConst = typeof BasicPersonRequestVisibleToConst[keyof typeof BasicPersonRequestVisibleToConst]; +export const BasicPersonRequestMarketingStatusConst = { + no_consent: 'no_consent', + unsubscribed: 'unsubscribed', + subscribed: 'subscribed', + archived: 'archived' +} as const; + +export type BasicPersonRequestMarketingStatusConst = typeof BasicPersonRequestMarketingStatusConst[keyof typeof BasicPersonRequestMarketingStatusConst]; + + diff --git a/models/call-log-response200.ts b/models/call-log-response200.ts new file mode 100644 index 00000000..be0153f7 --- /dev/null +++ b/models/call-log-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ResponseCallLogObject } from './response-call-log-object'; + +/** + * + * @export + * @interface CallLogResponse200 + */ +export interface CallLogResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof CallLogResponse200 + */ + 'success'?: boolean; + /** + * + * @type {ResponseCallLogObject} + * @memberof CallLogResponse200 + */ + 'data'?: ResponseCallLogObject; +} + diff --git a/models/call-log-response400.ts b/models/call-log-response400.ts new file mode 100644 index 00000000..100e9f1f --- /dev/null +++ b/models/call-log-response400.ts @@ -0,0 +1,54 @@ +/* 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 + * @interface CallLogResponse400 + */ +export interface CallLogResponse400 { + /** + * + * @type {boolean} + * @memberof CallLogResponse400 + */ + 'success'?: boolean; + /** + * The description of the error + * @type {string} + * @memberof CallLogResponse400 + */ + 'error'?: string; + /** + * A message describing how to solve the problem + * @type {string} + * @memberof CallLogResponse400 + */ + 'error_info'?: string; + /** + * + * @type {object} + * @memberof CallLogResponse400 + */ + 'data'?: object | null; + /** + * + * @type {object} + * @memberof CallLogResponse400 + */ + 'additional_data'?: object | null; +} + diff --git a/models/call-log-response403.ts b/models/call-log-response403.ts new file mode 100644 index 00000000..2b36cb23 --- /dev/null +++ b/models/call-log-response403.ts @@ -0,0 +1,54 @@ +/* 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 + * @interface CallLogResponse403 + */ +export interface CallLogResponse403 { + /** + * + * @type {boolean} + * @memberof CallLogResponse403 + */ + 'success'?: boolean; + /** + * The description of the error + * @type {string} + * @memberof CallLogResponse403 + */ + 'error'?: string; + /** + * A message describing how to solve the problem + * @type {string} + * @memberof CallLogResponse403 + */ + 'error_info'?: string; + /** + * + * @type {object} + * @memberof CallLogResponse403 + */ + 'data'?: object | null; + /** + * + * @type {object} + * @memberof CallLogResponse403 + */ + 'additional_data'?: object | null; +} + diff --git a/models/call-log-response404.ts b/models/call-log-response404.ts new file mode 100644 index 00000000..736cc65a --- /dev/null +++ b/models/call-log-response404.ts @@ -0,0 +1,54 @@ +/* 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 + * @interface CallLogResponse404 + */ +export interface CallLogResponse404 { + /** + * + * @type {boolean} + * @memberof CallLogResponse404 + */ + 'success'?: boolean; + /** + * The description of the error + * @type {string} + * @memberof CallLogResponse404 + */ + 'error'?: string; + /** + * A message describing how to solve the problem + * @type {string} + * @memberof CallLogResponse404 + */ + 'error_info'?: string; + /** + * + * @type {object} + * @memberof CallLogResponse404 + */ + 'data'?: object | null; + /** + * + * @type {object} + * @memberof CallLogResponse404 + */ + 'additional_data'?: object | null; +} + diff --git a/models/call-log-response409.ts b/models/call-log-response409.ts new file mode 100644 index 00000000..037d8442 --- /dev/null +++ b/models/call-log-response409.ts @@ -0,0 +1,54 @@ +/* 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 + * @interface CallLogResponse409 + */ +export interface CallLogResponse409 { + /** + * + * @type {boolean} + * @memberof CallLogResponse409 + */ + 'success'?: boolean; + /** + * The description of the error + * @type {string} + * @memberof CallLogResponse409 + */ + 'error'?: string; + /** + * A message describing how to solve the problem + * @type {string} + * @memberof CallLogResponse409 + */ + 'error_info'?: string; + /** + * + * @type {object} + * @memberof CallLogResponse409 + */ + 'data'?: object | null; + /** + * + * @type {object} + * @memberof CallLogResponse409 + */ + 'additional_data'?: object | null; +} + diff --git a/models/call-log-response410.ts b/models/call-log-response410.ts new file mode 100644 index 00000000..2fe3bd01 --- /dev/null +++ b/models/call-log-response410.ts @@ -0,0 +1,54 @@ +/* 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 + * @interface CallLogResponse410 + */ +export interface CallLogResponse410 { + /** + * + * @type {boolean} + * @memberof CallLogResponse410 + */ + 'success'?: boolean; + /** + * The description of the error + * @type {string} + * @memberof CallLogResponse410 + */ + 'error'?: string; + /** + * A message describing how to solve the problem + * @type {string} + * @memberof CallLogResponse410 + */ + 'error_info'?: string; + /** + * + * @type {object} + * @memberof CallLogResponse410 + */ + 'data'?: object | null; + /** + * + * @type {object} + * @memberof CallLogResponse410 + */ + 'additional_data'?: object | null; +} + diff --git a/models/call-log-response500.ts b/models/call-log-response500.ts new file mode 100644 index 00000000..157bf13f --- /dev/null +++ b/models/call-log-response500.ts @@ -0,0 +1,54 @@ +/* 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 + * @interface CallLogResponse500 + */ +export interface CallLogResponse500 { + /** + * + * @type {boolean} + * @memberof CallLogResponse500 + */ + 'success'?: boolean; + /** + * The description of the error + * @type {string} + * @memberof CallLogResponse500 + */ + 'error'?: string; + /** + * A message describing how to solve the problem + * @type {string} + * @memberof CallLogResponse500 + */ + 'error_info'?: string; + /** + * + * @type {object} + * @memberof CallLogResponse500 + */ + 'data'?: object | null; + /** + * + * @type {object} + * @memberof CallLogResponse500 + */ + 'additional_data'?: object | null; +} + diff --git a/models/call-logs-response-additional-data.ts b/models/call-logs-response-additional-data.ts new file mode 100644 index 00000000..0f1dc968 --- /dev/null +++ b/models/call-logs-response-additional-data.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; + +/** + * + * @export + * @interface CallLogsResponseAdditionalData + */ +export interface CallLogsResponseAdditionalData { + /** + * + * @type {FieldsResponse200AllOfAdditionalData} + * @memberof CallLogsResponseAdditionalData + */ + 'pagination'?: FieldsResponse200AllOfAdditionalData; +} + diff --git a/models/call-logs-response.ts b/models/call-logs-response.ts new file mode 100644 index 00000000..d7127999 --- /dev/null +++ b/models/call-logs-response.ts @@ -0,0 +1,48 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { CallLogsResponseAdditionalData } from './call-logs-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { ResponseCallLogObject } from './response-call-log-object'; + +/** + * + * @export + * @interface CallLogsResponse + */ +export interface CallLogsResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof CallLogsResponse + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof CallLogsResponse + */ + 'data'?: Array; + /** + * + * @type {CallLogsResponseAdditionalData} + * @memberof CallLogsResponse + */ + 'additional_data'?: CallLogsResponseAdditionalData; +} + diff --git a/models/cancel-recurring-subscription-request.ts b/models/cancel-recurring-subscription-request.ts new file mode 100644 index 00000000..857e6e24 --- /dev/null +++ b/models/cancel-recurring-subscription-request.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface CancelRecurringSubscriptionRequest + */ +export interface CancelRecurringSubscriptionRequest { + /** + * The subscription termination date. All payments after the specified date will be deleted. The end_date of the subscription will be set to the due date of the payment to follow the specified date. Default value is the current date. + * @type {string} + * @memberof CancelRecurringSubscriptionRequest + */ + 'end_date'?: string; +} + diff --git a/models/comment-post-put-object.ts b/models/comment-post-put-object.ts new file mode 100644 index 00000000..9f22468d --- /dev/null +++ b/models/comment-post-put-object.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface CommentPostPutObject + */ +export interface CommentPostPutObject { + /** + * The content of the comment in HTML format. Subject to sanitization on the back-end. + * @type {string} + * @memberof CommentPostPutObject + */ + 'content': string; +} + diff --git a/models/create-field-request-all-of.ts b/models/create-field-request-all-of.ts new file mode 100644 index 00000000..9f359e75 --- /dev/null +++ b/models/create-field-request-all-of.ts @@ -0,0 +1,42 @@ +/* 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 + * @interface CreateFieldRequestAllOf + */ +export interface CreateFieldRequestAllOf { + /** + * The name of the field + * @type {string} + * @memberof CreateFieldRequestAllOf + */ + 'name': string; + /** + * When `field_type` is either set or enum, possible options must be supplied as a JSON-encoded sequential array of objects. Example: `[{\"label\":\"New Item\"}]` + * @type {Array} + * @memberof CreateFieldRequestAllOf + */ + 'options'?: Array; + /** + * Whether the field is available in the \'add new\' modal or not (both in the web and mobile app) + * @type {boolean} + * @memberof CreateFieldRequestAllOf + */ + 'add_visible_flag'?: boolean; +} + diff --git a/models/create-field-request-all-of1.ts b/models/create-field-request-all-of1.ts new file mode 100644 index 00000000..4b8b848b --- /dev/null +++ b/models/create-field-request-all-of1.ts @@ -0,0 +1,53 @@ +/* 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 + * @interface CreateFieldRequestAllOf1 + */ +export interface CreateFieldRequestAllOf1 { + /** + * The type of the field
ValueDescription
`address`Address field (has multiple subfields, autocompleted by Google Maps)
`date`Date (format YYYY-MM-DD)
`daterange`Date-range field (has a start date and end date value, both YYYY-MM-DD)
`double`Numeric value
`enum`Options field with a single possible chosen option
`monetary`Monetary field (has a numeric value and a currency value)
`org`Organization field (contains an organization ID which is stored on the same account)
`people`Person field (contains a person ID which is stored on the same account)
`phone`Phone field (up to 255 numbers and/or characters)
`set`Options field with a possibility of having multiple chosen options
`text`Long text (up to 65k characters)
`time`Time field (format HH:MM:SS)
`timerange`Time-range field (has a start time and end time value, both HH:MM:SS)
`user`User field (contains a user ID of another Pipedrive user)
`varchar`Text (up to 255 characters)
`varchar_auto`Autocomplete text (up to 255 characters)
`visible_to`System field that keeps item\'s visibility setting
+ * @type {string} + * @memberof CreateFieldRequestAllOf1 + */ + 'field_type': CreateFieldRequestAllOf1FieldTypeConst; +} + +export const CreateFieldRequestAllOf1FieldTypeConst = { + address: 'address', + date: 'date', + daterange: 'daterange', + double: 'double', + enum: 'enum', + monetary: 'monetary', + org: 'org', + people: 'people', + phone: 'phone', + set: 'set', + text: 'text', + time: 'time', + timerange: 'timerange', + user: 'user', + varchar: 'varchar', + varchar_auto: 'varchar_auto', + visible_to: 'visible_to' +} as const; + +export type CreateFieldRequestAllOf1FieldTypeConst = typeof CreateFieldRequestAllOf1FieldTypeConst[keyof typeof CreateFieldRequestAllOf1FieldTypeConst]; + + diff --git a/models/create-field-request.ts b/models/create-field-request.ts new file mode 100644 index 00000000..ca38ba89 --- /dev/null +++ b/models/create-field-request.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { CreateFieldRequestAllOf } from './create-field-request-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { CreateFieldRequestAllOf1 } from './create-field-request-all-of1'; + +/** + * @type CreateFieldRequest + * @export + */ +export type CreateFieldRequest = CreateFieldRequestAllOf & CreateFieldRequestAllOf1; + + diff --git a/models/create-update-delete-activity-type-response200-all-of.ts b/models/create-update-delete-activity-type-response200-all-of.ts new file mode 100644 index 00000000..158cd972 --- /dev/null +++ b/models/create-update-delete-activity-type-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivityTypesResponse200AllOfDataInner } from './get-activity-types-response200-all-of-data-inner'; + +/** + * + * @export + * @interface CreateUpdateDeleteActivityTypeResponse200AllOf + */ +export interface CreateUpdateDeleteActivityTypeResponse200AllOf { + /** + * + * @type {GetActivityTypesResponse200AllOfDataInner} + * @memberof CreateUpdateDeleteActivityTypeResponse200AllOf + */ + 'data'?: GetActivityTypesResponse200AllOfDataInner; +} + diff --git a/models/create-update-delete-activity-type-response200.ts b/models/create-update-delete-activity-type-response200.ts new file mode 100644 index 00000000..1aecd72c --- /dev/null +++ b/models/create-update-delete-activity-type-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { CreateUpdateDeleteActivityTypeResponse200AllOf } from './create-update-delete-activity-type-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivityTypesResponse200AllOfDataInner } from './get-activity-types-response200-all-of-data-inner'; + +/** + * @type CreateUpdateDeleteActivityTypeResponse200 + * @export + */ +export type CreateUpdateDeleteActivityTypeResponse200 = BaseResponse & CreateUpdateDeleteActivityTypeResponse200AllOf; + + diff --git a/models/deal-collection-response-object.ts b/models/deal-collection-response-object.ts new file mode 100644 index 00000000..ff0b5986 --- /dev/null +++ b/models/deal-collection-response-object.ts @@ -0,0 +1,150 @@ +/* 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 + * @interface DealCollectionResponseObject + */ +export interface DealCollectionResponseObject { + /** + * The ID of the deal + * @type {number} + * @memberof DealCollectionResponseObject + */ + 'id'?: number; + /** + * The ID of the deal creator + * @type {number} + * @memberof DealCollectionResponseObject + */ + 'creator_user_id'?: number; + /** + * The ID of the user + * @type {number} + * @memberof DealCollectionResponseObject + */ + 'user_id'?: number; + /** + * The ID of the person associated with the deal + * @type {number} + * @memberof DealCollectionResponseObject + */ + 'person_id'?: number; + /** + * The ID of the organization associated with the deal + * @type {number} + * @memberof DealCollectionResponseObject + */ + 'org_id'?: number; + /** + * The ID of the deal stage + * @type {number} + * @memberof DealCollectionResponseObject + */ + 'stage_id'?: number; + /** + * The title of the deal + * @type {string} + * @memberof DealCollectionResponseObject + */ + 'title'?: string; + /** + * The value of the deal + * @type {number} + * @memberof DealCollectionResponseObject + */ + 'value'?: number; + /** + * The currency associated with the deal + * @type {string} + * @memberof DealCollectionResponseObject + */ + 'currency'?: string; + /** + * The creation date and time of the deal in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof DealCollectionResponseObject + */ + 'add_time'?: string; + /** + * The last update date and time of the deal in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof DealCollectionResponseObject + */ + 'update_time'?: string; + /** + * The status of the deal + * @type {string} + * @memberof DealCollectionResponseObject + */ + 'status'?: string; + /** + * The success probability percentage of the deal + * @type {number} + * @memberof DealCollectionResponseObject + */ + 'probability'?: number | null; + /** + * The reason for losing the deal + * @type {string} + * @memberof DealCollectionResponseObject + */ + 'lost_reason'?: string | null; + /** + * The visibility of the deal + * @type {string} + * @memberof DealCollectionResponseObject + */ + 'visible_to'?: string; + /** + * The date and time of closing the deal in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof DealCollectionResponseObject + */ + 'close_time'?: string | null; + /** + * The ID of the pipeline associated with the deal + * @type {number} + * @memberof DealCollectionResponseObject + */ + 'pipeline_id'?: number; + /** + * The date and time of changing the deal status to won in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof DealCollectionResponseObject + */ + 'won_time'?: string; + /** + * The date and time of changing the deal status to lost in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof DealCollectionResponseObject + */ + 'lost_time'?: string; + /** + * The expected close date of the deal + * @type {string} + * @memberof DealCollectionResponseObject + */ + 'expected_close_date'?: string; + /** + * The label or multiple labels assigned to the deal + * @type {string} + * @memberof DealCollectionResponseObject + */ + 'label'?: string; +} + diff --git a/models/deal-count-and-activity-info-all-of.ts b/models/deal-count-and-activity-info-all-of.ts new file mode 100644 index 00000000..8d9c9d8e --- /dev/null +++ b/models/deal-count-and-activity-info-all-of.ts @@ -0,0 +1,72 @@ +/* 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 + * @interface DealCountAndActivityInfoAllOf + */ +export interface DealCountAndActivityInfoAllOf { + /** + * The count of open deals related with the item + * @type {number} + * @memberof DealCountAndActivityInfoAllOf + */ + 'open_deals_count'?: number; + /** + * The count of related open deals related with the item + * @type {number} + * @memberof DealCountAndActivityInfoAllOf + */ + 'related_open_deals_count'?: number; + /** + * The count of closed deals related with the item + * @type {number} + * @memberof DealCountAndActivityInfoAllOf + */ + 'closed_deals_count'?: number; + /** + * The count of related closed deals related with the item + * @type {number} + * @memberof DealCountAndActivityInfoAllOf + */ + 'related_closed_deals_count'?: number; + /** + * The count of won deals related with the item + * @type {number} + * @memberof DealCountAndActivityInfoAllOf + */ + 'won_deals_count'?: number; + /** + * The count of related won deals related with the item + * @type {number} + * @memberof DealCountAndActivityInfoAllOf + */ + 'related_won_deals_count'?: number; + /** + * The count of lost deals related with the item + * @type {number} + * @memberof DealCountAndActivityInfoAllOf + */ + 'lost_deals_count'?: number; + /** + * The count of related lost deals related with the item + * @type {number} + * @memberof DealCountAndActivityInfoAllOf + */ + 'related_lost_deals_count'?: number; +} + diff --git a/models/deal-count-and-activity-info-all-of1.ts b/models/deal-count-and-activity-info-all-of1.ts new file mode 100644 index 00000000..abd5eb94 --- /dev/null +++ b/models/deal-count-and-activity-info-all-of1.ts @@ -0,0 +1,54 @@ +/* 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 + * @interface DealCountAndActivityInfoAllOf1 + */ +export interface DealCountAndActivityInfoAllOf1 { + /** + * The date of the next activity associated with the deal + * @type {string} + * @memberof DealCountAndActivityInfoAllOf1 + */ + 'next_activity_date'?: string | null; + /** + * The time of the next activity associated with the deal + * @type {string} + * @memberof DealCountAndActivityInfoAllOf1 + */ + 'next_activity_time'?: string | null; + /** + * The ID of the next activity associated with the deal + * @type {number} + * @memberof DealCountAndActivityInfoAllOf1 + */ + 'next_activity_id'?: number | null; + /** + * The ID of the last activity associated with the deal + * @type {number} + * @memberof DealCountAndActivityInfoAllOf1 + */ + 'last_activity_id'?: number | null; + /** + * The date of the last activity associated with the deal + * @type {string} + * @memberof DealCountAndActivityInfoAllOf1 + */ + 'last_activity_date'?: string | null; +} + diff --git a/models/deal-count-and-activity-info.ts b/models/deal-count-and-activity-info.ts new file mode 100644 index 00000000..0020be61 --- /dev/null +++ b/models/deal-count-and-activity-info.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DealCountAndActivityInfoAllOf } from './deal-count-and-activity-info-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DealCountAndActivityInfoAllOf1 } from './deal-count-and-activity-info-all-of1'; + +/** + * @type DealCountAndActivityInfo + * @export + */ +export type DealCountAndActivityInfo = DealCountAndActivityInfoAllOf & DealCountAndActivityInfoAllOf1; + + diff --git a/models/deal-non-strict-all-of-creator-user-id.ts b/models/deal-non-strict-all-of-creator-user-id.ts new file mode 100644 index 00000000..c71ae58d --- /dev/null +++ b/models/deal-non-strict-all-of-creator-user-id.ts @@ -0,0 +1,66 @@ +/* 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. + */ + + + +/** + * The creator of the deal + * @export + * @interface DealNonStrictAllOfCreatorUserId + */ +export interface DealNonStrictAllOfCreatorUserId { + /** + * The ID of the deal creator + * @type {number} + * @memberof DealNonStrictAllOfCreatorUserId + */ + 'id'?: number; + /** + * The name of the deal creator + * @type {string} + * @memberof DealNonStrictAllOfCreatorUserId + */ + 'name'?: string; + /** + * The email of the deal creator + * @type {string} + * @memberof DealNonStrictAllOfCreatorUserId + */ + 'email'?: string; + /** + * If the creator has a picture or not + * @type {boolean} + * @memberof DealNonStrictAllOfCreatorUserId + */ + 'has_pic'?: boolean; + /** + * The creator picture hash + * @type {string} + * @memberof DealNonStrictAllOfCreatorUserId + */ + 'pic_hash'?: string | null; + /** + * Whether the creator is active or not + * @type {boolean} + * @memberof DealNonStrictAllOfCreatorUserId + */ + 'active_flag'?: boolean; + /** + * The ID of the deal creator + * @type {number} + * @memberof DealNonStrictAllOfCreatorUserId + */ + 'value'?: number; +} + diff --git a/models/deal-non-strict-all-of.ts b/models/deal-non-strict-all-of.ts new file mode 100644 index 00000000..bd59fa06 --- /dev/null +++ b/models/deal-non-strict-all-of.ts @@ -0,0 +1,66 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DealNonStrictAllOfCreatorUserId } from './deal-non-strict-all-of-creator-user-id'; +// May contain unused imports in some cases +// @ts-ignore +import { DealOrganizationDataWithId } from './deal-organization-data-with-id'; +// May contain unused imports in some cases +// @ts-ignore +import { DealPersonDataWithId } from './deal-person-data-with-id'; +// May contain unused imports in some cases +// @ts-ignore +import { DealUserDataWithId } from './deal-user-data-with-id'; + +/** + * + * @export + * @interface DealNonStrictAllOf + */ +export interface DealNonStrictAllOf { + /** + * The ID of the deal + * @type {number} + * @memberof DealNonStrictAllOf + */ + 'id'?: number; + /** + * + * @type {DealNonStrictAllOfCreatorUserId} + * @memberof DealNonStrictAllOf + */ + 'creator_user_id'?: DealNonStrictAllOfCreatorUserId; + /** + * + * @type {DealUserDataWithId} + * @memberof DealNonStrictAllOf + */ + 'user_id'?: DealUserDataWithId; + /** + * + * @type {DealPersonDataWithId} + * @memberof DealNonStrictAllOf + */ + 'person_id'?: DealPersonDataWithId; + /** + * + * @type {DealOrganizationDataWithId} + * @memberof DealNonStrictAllOf + */ + 'org_id'?: DealOrganizationDataWithId; +} + diff --git a/models/deal-non-strict-with-details-all-of-age.ts b/models/deal-non-strict-with-details-all-of-age.ts new file mode 100644 index 00000000..236c5c20 --- /dev/null +++ b/models/deal-non-strict-with-details-all-of-age.ts @@ -0,0 +1,66 @@ +/* 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. + */ + + + +/** + * The lifetime of the deal + * @export + * @interface DealNonStrictWithDetailsAllOfAge + */ +export interface DealNonStrictWithDetailsAllOfAge { + /** + * Years + * @type {number} + * @memberof DealNonStrictWithDetailsAllOfAge + */ + 'y'?: number; + /** + * Months + * @type {number} + * @memberof DealNonStrictWithDetailsAllOfAge + */ + 'm'?: number; + /** + * Days + * @type {number} + * @memberof DealNonStrictWithDetailsAllOfAge + */ + 'd'?: number; + /** + * Hours + * @type {number} + * @memberof DealNonStrictWithDetailsAllOfAge + */ + 'h'?: number; + /** + * Minutes + * @type {number} + * @memberof DealNonStrictWithDetailsAllOfAge + */ + 'i'?: number; + /** + * Seconds + * @type {number} + * @memberof DealNonStrictWithDetailsAllOfAge + */ + 's'?: number; + /** + * The total time in seconds + * @type {number} + * @memberof DealNonStrictWithDetailsAllOfAge + */ + 'total_seconds'?: number; +} + diff --git a/models/deal-non-strict-with-details-all-of-average-time-to-won.ts b/models/deal-non-strict-with-details-all-of-average-time-to-won.ts new file mode 100644 index 00000000..550996bf --- /dev/null +++ b/models/deal-non-strict-with-details-all-of-average-time-to-won.ts @@ -0,0 +1,66 @@ +/* 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. + */ + + + +/** + * The average time to win the deal + * @export + * @interface DealNonStrictWithDetailsAllOfAverageTimeToWon + */ +export interface DealNonStrictWithDetailsAllOfAverageTimeToWon { + /** + * Years + * @type {number} + * @memberof DealNonStrictWithDetailsAllOfAverageTimeToWon + */ + 'y'?: number; + /** + * Months + * @type {number} + * @memberof DealNonStrictWithDetailsAllOfAverageTimeToWon + */ + 'm'?: number; + /** + * Days + * @type {number} + * @memberof DealNonStrictWithDetailsAllOfAverageTimeToWon + */ + 'd'?: number; + /** + * Hours + * @type {number} + * @memberof DealNonStrictWithDetailsAllOfAverageTimeToWon + */ + 'h'?: number; + /** + * Minutes + * @type {number} + * @memberof DealNonStrictWithDetailsAllOfAverageTimeToWon + */ + 'i'?: number; + /** + * Seconds + * @type {number} + * @memberof DealNonStrictWithDetailsAllOfAverageTimeToWon + */ + 's'?: number; + /** + * The total time in seconds + * @type {number} + * @memberof DealNonStrictWithDetailsAllOfAverageTimeToWon + */ + 'total_seconds'?: number; +} + diff --git a/models/deal-non-strict-with-details-all-of-stay-in-pipeline-stages.ts b/models/deal-non-strict-with-details-all-of-stay-in-pipeline-stages.ts new file mode 100644 index 00000000..5a325ffe --- /dev/null +++ b/models/deal-non-strict-with-details-all-of-stay-in-pipeline-stages.ts @@ -0,0 +1,36 @@ +/* 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. + */ + + + +/** + * The details of the duration of the deal being in each stage of the pipeline + * @export + * @interface DealNonStrictWithDetailsAllOfStayInPipelineStages + */ +export interface DealNonStrictWithDetailsAllOfStayInPipelineStages { + /** + * The number of seconds a deal has been in each stage of the pipeline + * @type {object} + * @memberof DealNonStrictWithDetailsAllOfStayInPipelineStages + */ + 'times_in_stages'?: object; + /** + * The order of the deal progression through the pipeline stages + * @type {Array} + * @memberof DealNonStrictWithDetailsAllOfStayInPipelineStages + */ + 'order_of_stages'?: Array; +} + diff --git a/models/deal-non-strict-with-details-all-of.ts b/models/deal-non-strict-with-details-all-of.ts new file mode 100644 index 00000000..61cf5685 --- /dev/null +++ b/models/deal-non-strict-with-details-all-of.ts @@ -0,0 +1,69 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DealNonStrictWithDetailsAllOfAge } from './deal-non-strict-with-details-all-of-age'; +// May contain unused imports in some cases +// @ts-ignore +import { DealNonStrictWithDetailsAllOfAverageTimeToWon } from './deal-non-strict-with-details-all-of-average-time-to-won'; +// May contain unused imports in some cases +// @ts-ignore +import { DealNonStrictWithDetailsAllOfStayInPipelineStages } from './deal-non-strict-with-details-all-of-stay-in-pipeline-stages'; + +/** + * + * @export + * @interface DealNonStrictWithDetailsAllOf + */ +export interface DealNonStrictWithDetailsAllOf { + /** + * + * @type {DealNonStrictWithDetailsAllOfAverageTimeToWon} + * @memberof DealNonStrictWithDetailsAllOf + */ + 'average_time_to_won'?: DealNonStrictWithDetailsAllOfAverageTimeToWon; + /** + * The average of the deal stage progression + * @type {number} + * @memberof DealNonStrictWithDetailsAllOf + */ + 'average_stage_progress'?: number; + /** + * + * @type {DealNonStrictWithDetailsAllOfAge} + * @memberof DealNonStrictWithDetailsAllOf + */ + 'age'?: DealNonStrictWithDetailsAllOfAge; + /** + * + * @type {DealNonStrictWithDetailsAllOfStayInPipelineStages} + * @memberof DealNonStrictWithDetailsAllOf + */ + 'stay_in_pipeline_stages'?: DealNonStrictWithDetailsAllOfStayInPipelineStages; + /** + * The details of the last activity associated with the deal + * @type {object} + * @memberof DealNonStrictWithDetailsAllOf + */ + 'last_activity'?: object | null; + /** + * The details of the next activity associated with the deal + * @type {object} + * @memberof DealNonStrictWithDetailsAllOf + */ + 'next_activity'?: object | null; +} + diff --git a/models/deal-non-strict-with-details.ts b/models/deal-non-strict-with-details.ts new file mode 100644 index 00000000..a79de1f0 --- /dev/null +++ b/models/deal-non-strict-with-details.ts @@ -0,0 +1,50 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DealNonStrict } from './deal-non-strict'; +// May contain unused imports in some cases +// @ts-ignore +import { DealNonStrictAllOfCreatorUserId } from './deal-non-strict-all-of-creator-user-id'; +// May contain unused imports in some cases +// @ts-ignore +import { DealNonStrictWithDetailsAllOf } from './deal-non-strict-with-details-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DealNonStrictWithDetailsAllOfAge } from './deal-non-strict-with-details-all-of-age'; +// May contain unused imports in some cases +// @ts-ignore +import { DealNonStrictWithDetailsAllOfAverageTimeToWon } from './deal-non-strict-with-details-all-of-average-time-to-won'; +// May contain unused imports in some cases +// @ts-ignore +import { DealNonStrictWithDetailsAllOfStayInPipelineStages } from './deal-non-strict-with-details-all-of-stay-in-pipeline-stages'; +// May contain unused imports in some cases +// @ts-ignore +import { DealOrganizationDataWithId } from './deal-organization-data-with-id'; +// May contain unused imports in some cases +// @ts-ignore +import { DealPersonDataWithId } from './deal-person-data-with-id'; +// May contain unused imports in some cases +// @ts-ignore +import { DealUserDataWithId } from './deal-user-data-with-id'; + +/** + * @type DealNonStrictWithDetails + * @export + */ +export type DealNonStrictWithDetails = DealNonStrict & DealNonStrictWithDetailsAllOf; + + diff --git a/models/deal-non-strict.ts b/models/deal-non-strict.ts new file mode 100644 index 00000000..64a27ce9 --- /dev/null +++ b/models/deal-non-strict.ts @@ -0,0 +1,41 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseDeal } from './base-deal'; +// May contain unused imports in some cases +// @ts-ignore +import { DealNonStrictAllOf } from './deal-non-strict-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DealNonStrictAllOfCreatorUserId } from './deal-non-strict-all-of-creator-user-id'; +// May contain unused imports in some cases +// @ts-ignore +import { DealOrganizationDataWithId } from './deal-organization-data-with-id'; +// May contain unused imports in some cases +// @ts-ignore +import { DealPersonDataWithId } from './deal-person-data-with-id'; +// May contain unused imports in some cases +// @ts-ignore +import { DealUserDataWithId } from './deal-user-data-with-id'; + +/** + * @type DealNonStrict + * @export + */ +export type DealNonStrict = BaseDeal & DealNonStrictAllOf; + + diff --git a/models/deal-organization-data-with-id-all-of.ts b/models/deal-organization-data-with-id-all-of.ts new file mode 100644 index 00000000..d73a1025 --- /dev/null +++ b/models/deal-organization-data-with-id-all-of.ts @@ -0,0 +1,60 @@ +/* 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. + */ + + + +/** + * The organization which is associated with the deal + * @export + * @interface DealOrganizationDataWithIdAllOf + */ +export interface DealOrganizationDataWithIdAllOf { + /** + * The name of the organization associated with the deal + * @type {string} + * @memberof DealOrganizationDataWithIdAllOf + */ + 'name'?: string; + /** + * The number of people connected with the organization that is associated with the deal + * @type {number} + * @memberof DealOrganizationDataWithIdAllOf + */ + 'people_count'?: number; + /** + * The ID of the owner of the organization that is associated with the deal + * @type {number} + * @memberof DealOrganizationDataWithIdAllOf + */ + 'owner_id'?: number; + /** + * The address of the organization that is associated with the deal + * @type {string} + * @memberof DealOrganizationDataWithIdAllOf + */ + 'address'?: string; + /** + * Whether the associated organization is active or not + * @type {boolean} + * @memberof DealOrganizationDataWithIdAllOf + */ + 'active_flag'?: boolean; + /** + * The BCC email of the organization associated with the deal + * @type {string} + * @memberof DealOrganizationDataWithIdAllOf + */ + 'cc_email'?: string; +} + diff --git a/models/deal-organization-data-with-id-all-of1.ts b/models/deal-organization-data-with-id-all-of1.ts new file mode 100644 index 00000000..17889f44 --- /dev/null +++ b/models/deal-organization-data-with-id-all-of1.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DealOrganizationDataWithIdAllOf1 + */ +export interface DealOrganizationDataWithIdAllOf1 { + /** + * The ID of the organization associated with the deal + * @type {number} + * @memberof DealOrganizationDataWithIdAllOf1 + */ + 'value'?: number; +} + diff --git a/models/deal-organization-data-with-id.ts b/models/deal-organization-data-with-id.ts new file mode 100644 index 00000000..42544fa4 --- /dev/null +++ b/models/deal-organization-data-with-id.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DealOrganizationDataWithIdAllOf } from './deal-organization-data-with-id-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DealOrganizationDataWithIdAllOf1 } from './deal-organization-data-with-id-all-of1'; + +/** + * @type DealOrganizationDataWithId + * @export + */ +export type DealOrganizationDataWithId = DealOrganizationDataWithIdAllOf & DealOrganizationDataWithIdAllOf1; + + diff --git a/models/deal-person-data-with-id-all-of-email-inner.ts b/models/deal-person-data-with-id-all-of-email-inner.ts new file mode 100644 index 00000000..38ecd734 --- /dev/null +++ b/models/deal-person-data-with-id-all-of-email-inner.ts @@ -0,0 +1,42 @@ +/* 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 + * @interface DealPersonDataWithIdAllOfEmailInner + */ +export interface DealPersonDataWithIdAllOfEmailInner { + /** + * The type of the email + * @type {string} + * @memberof DealPersonDataWithIdAllOfEmailInner + */ + 'label'?: string; + /** + * The email of the associated person + * @type {string} + * @memberof DealPersonDataWithIdAllOfEmailInner + */ + 'value'?: string; + /** + * If this is the primary email or not + * @type {boolean} + * @memberof DealPersonDataWithIdAllOfEmailInner + */ + 'primary'?: boolean; +} + diff --git a/models/deal-person-data-with-id-all-of-phone-inner.ts b/models/deal-person-data-with-id-all-of-phone-inner.ts new file mode 100644 index 00000000..af9df3d3 --- /dev/null +++ b/models/deal-person-data-with-id-all-of-phone-inner.ts @@ -0,0 +1,42 @@ +/* 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 + * @interface DealPersonDataWithIdAllOfPhoneInner + */ +export interface DealPersonDataWithIdAllOfPhoneInner { + /** + * The type of the phone number + * @type {string} + * @memberof DealPersonDataWithIdAllOfPhoneInner + */ + 'label'?: string; + /** + * The phone number of the person associated with the deal + * @type {string} + * @memberof DealPersonDataWithIdAllOfPhoneInner + */ + 'value'?: string; + /** + * If this is the primary phone number or not + * @type {boolean} + * @memberof DealPersonDataWithIdAllOfPhoneInner + */ + 'primary'?: boolean; +} + diff --git a/models/deal-person-data-with-id-all-of.ts b/models/deal-person-data-with-id-all-of.ts new file mode 100644 index 00000000..3e7f8ce4 --- /dev/null +++ b/models/deal-person-data-with-id-all-of.ts @@ -0,0 +1,60 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DealPersonDataWithIdAllOfEmailInner } from './deal-person-data-with-id-all-of-email-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { DealPersonDataWithIdAllOfPhoneInner } from './deal-person-data-with-id-all-of-phone-inner'; + +/** + * The person who is associated with the deal + * @export + * @interface DealPersonDataWithIdAllOf + */ +export interface DealPersonDataWithIdAllOf { + /** + * Whether the associated person is active or not + * @type {boolean} + * @memberof DealPersonDataWithIdAllOf + */ + 'active_flag'?: boolean; + /** + * The name of the person associated with the deal + * @type {string} + * @memberof DealPersonDataWithIdAllOf + */ + 'name'?: string; + /** + * The emails of the person associated with the deal + * @type {Array} + * @memberof DealPersonDataWithIdAllOf + */ + 'email'?: Array; + /** + * The phone numbers of the person associated with the deal + * @type {Array} + * @memberof DealPersonDataWithIdAllOf + */ + 'phone'?: Array; + /** + * The ID of the owner of the person that is associated with the deal + * @type {number} + * @memberof DealPersonDataWithIdAllOf + */ + 'owner_id'?: number; +} + diff --git a/models/deal-person-data-with-id-all-of1.ts b/models/deal-person-data-with-id-all-of1.ts new file mode 100644 index 00000000..01d34531 --- /dev/null +++ b/models/deal-person-data-with-id-all-of1.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DealPersonDataWithIdAllOf1 + */ +export interface DealPersonDataWithIdAllOf1 { + /** + * The ID of the person associated with the deal + * @type {number} + * @memberof DealPersonDataWithIdAllOf1 + */ + 'value'?: number; +} + diff --git a/models/deal-person-data-with-id.ts b/models/deal-person-data-with-id.ts new file mode 100644 index 00000000..3fd625ae --- /dev/null +++ b/models/deal-person-data-with-id.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DealPersonDataWithIdAllOf } from './deal-person-data-with-id-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DealPersonDataWithIdAllOf1 } from './deal-person-data-with-id-all-of1'; +// May contain unused imports in some cases +// @ts-ignore +import { DealPersonDataWithIdAllOfEmailInner } from './deal-person-data-with-id-all-of-email-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { DealPersonDataWithIdAllOfPhoneInner } from './deal-person-data-with-id-all-of-phone-inner'; + +/** + * @type DealPersonDataWithId + * @export + */ +export type DealPersonDataWithId = DealPersonDataWithIdAllOf & DealPersonDataWithIdAllOf1; + + diff --git a/models/deal-response200.ts b/models/deal-response200.ts new file mode 100644 index 00000000..50e4f7d0 --- /dev/null +++ b/models/deal-response200.ts @@ -0,0 +1,48 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DealNonStrict } from './deal-non-strict'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealsResponse200RelatedObjects } from './get-deals-response200-related-objects'; + +/** + * + * @export + * @interface DealResponse200 + */ +export interface DealResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof DealResponse200 + */ + 'success'?: boolean; + /** + * + * @type {DealNonStrict} + * @memberof DealResponse200 + */ + 'data'?: DealNonStrict; + /** + * + * @type {GetDealsResponse200RelatedObjects} + * @memberof DealResponse200 + */ + 'related_objects'?: GetDealsResponse200RelatedObjects; +} + diff --git a/models/deal-strict-all-of.ts b/models/deal-strict-all-of.ts new file mode 100644 index 00000000..5a3eb2e7 --- /dev/null +++ b/models/deal-strict-all-of.ts @@ -0,0 +1,54 @@ +/* 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 + * @interface DealStrictAllOf + */ +export interface DealStrictAllOf { + /** + * The ID of the deal + * @type {number} + * @memberof DealStrictAllOf + */ + 'id'?: number; + /** + * The ID of the deal creator + * @type {number} + * @memberof DealStrictAllOf + */ + 'creator_user_id'?: number; + /** + * The ID of the user + * @type {number} + * @memberof DealStrictAllOf + */ + 'user_id'?: number; + /** + * The ID of the person associated with the deal + * @type {number} + * @memberof DealStrictAllOf + */ + 'person_id'?: number; + /** + * The ID of the organization associated with the deal + * @type {number} + * @memberof DealStrictAllOf + */ + 'org_id'?: number; +} + diff --git a/models/deal-strict.ts b/models/deal-strict.ts new file mode 100644 index 00000000..16993239 --- /dev/null +++ b/models/deal-strict.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseDeal } from './base-deal'; +// May contain unused imports in some cases +// @ts-ignore +import { DealStrictAllOf } from './deal-strict-all-of'; + +/** + * @type DealStrict + * @export + */ +export type DealStrict = BaseDeal & DealStrictAllOf; + + diff --git a/models/deal-title-param.ts b/models/deal-title-param.ts new file mode 100644 index 00000000..c37a6cc7 --- /dev/null +++ b/models/deal-title-param.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DealTitleParam + */ +export interface DealTitleParam { + /** + * The title of the deal + * @type {string} + * @memberof DealTitleParam + */ + 'title'?: string; +} + diff --git a/models/deal-user-data-with-id-all-of.ts b/models/deal-user-data-with-id-all-of.ts new file mode 100644 index 00000000..4a77bf8c --- /dev/null +++ b/models/deal-user-data-with-id-all-of.ts @@ -0,0 +1,60 @@ +/* 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. + */ + + + +/** + * The user who is associated with the deal + * @export + * @interface DealUserDataWithIdAllOf + */ +export interface DealUserDataWithIdAllOf { + /** + * The ID of the user + * @type {number} + * @memberof DealUserDataWithIdAllOf + */ + 'id'?: number; + /** + * The name of the user + * @type {string} + * @memberof DealUserDataWithIdAllOf + */ + 'name'?: string; + /** + * The email of the user + * @type {string} + * @memberof DealUserDataWithIdAllOf + */ + 'email'?: string; + /** + * If the user has a picture or not + * @type {boolean} + * @memberof DealUserDataWithIdAllOf + */ + 'has_pic'?: boolean; + /** + * The user picture hash + * @type {string} + * @memberof DealUserDataWithIdAllOf + */ + 'pic_hash'?: string | null; + /** + * Whether the user is active or not + * @type {boolean} + * @memberof DealUserDataWithIdAllOf + */ + 'active_flag'?: boolean; +} + diff --git a/models/deal-user-data-with-id-all-of1.ts b/models/deal-user-data-with-id-all-of1.ts new file mode 100644 index 00000000..6410af2d --- /dev/null +++ b/models/deal-user-data-with-id-all-of1.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DealUserDataWithIdAllOf1 + */ +export interface DealUserDataWithIdAllOf1 { + /** + * The ID of the user + * @type {number} + * @memberof DealUserDataWithIdAllOf1 + */ + 'value'?: number; +} + diff --git a/models/deal-user-data-with-id.ts b/models/deal-user-data-with-id.ts new file mode 100644 index 00000000..e7b588ec --- /dev/null +++ b/models/deal-user-data-with-id.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DealUserDataWithIdAllOf } from './deal-user-data-with-id-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DealUserDataWithIdAllOf1 } from './deal-user-data-with-id-all-of1'; + +/** + * @type DealUserDataWithId + * @export + */ +export type DealUserDataWithId = DealUserDataWithIdAllOf & DealUserDataWithIdAllOf1; + + diff --git a/models/deals-count-and-activity-info.ts b/models/deals-count-and-activity-info.ts new file mode 100644 index 00000000..38f5b7a8 --- /dev/null +++ b/models/deals-count-and-activity-info.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DealCountAndActivityInfoAllOf } from './deal-count-and-activity-info-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DealCountAndActivityInfoAllOf1 } from './deal-count-and-activity-info-all-of1'; + +/** + * @type DealsCountAndActivityInfo + * @export + */ +export type DealsCountAndActivityInfo = DealCountAndActivityInfoAllOf & DealCountAndActivityInfoAllOf1; + + diff --git a/models/delete-activities-response200-data.ts b/models/delete-activities-response200-data.ts new file mode 100644 index 00000000..2418b6fd --- /dev/null +++ b/models/delete-activities-response200-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteActivitiesResponse200Data + */ +export interface DeleteActivitiesResponse200Data { + /** + * An array of the IDs of activities that were deleted + * @type {Array} + * @memberof DeleteActivitiesResponse200Data + */ + 'id'?: Array; +} + diff --git a/models/delete-activities-response200.ts b/models/delete-activities-response200.ts new file mode 100644 index 00000000..8a52a47c --- /dev/null +++ b/models/delete-activities-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteActivitiesResponse200Data } from './delete-activities-response200-data'; + +/** + * + * @export + * @interface DeleteActivitiesResponse200 + */ +export interface DeleteActivitiesResponse200 { + /** + * + * @type {boolean} + * @memberof DeleteActivitiesResponse200 + */ + 'success'?: boolean; + /** + * + * @type {DeleteActivitiesResponse200Data} + * @memberof DeleteActivitiesResponse200 + */ + 'data'?: DeleteActivitiesResponse200Data; +} + diff --git a/models/delete-activity-response200-data.ts b/models/delete-activity-response200-data.ts new file mode 100644 index 00000000..432ea2e4 --- /dev/null +++ b/models/delete-activity-response200-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteActivityResponse200Data + */ +export interface DeleteActivityResponse200Data { + /** + * The ID of the activity that was deleted + * @type {number} + * @memberof DeleteActivityResponse200Data + */ + 'id'?: number; +} + diff --git a/models/delete-activity-response200.ts b/models/delete-activity-response200.ts new file mode 100644 index 00000000..5afab925 --- /dev/null +++ b/models/delete-activity-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteActivityResponse200Data } from './delete-activity-response200-data'; + +/** + * + * @export + * @interface DeleteActivityResponse200 + */ +export interface DeleteActivityResponse200 { + /** + * + * @type {boolean} + * @memberof DeleteActivityResponse200 + */ + 'success'?: boolean; + /** + * + * @type {DeleteActivityResponse200Data} + * @memberof DeleteActivityResponse200 + */ + 'data'?: DeleteActivityResponse200Data; +} + diff --git a/models/delete-activity-types-response200-all-of-data.ts b/models/delete-activity-types-response200-all-of-data.ts new file mode 100644 index 00000000..703bd171 --- /dev/null +++ b/models/delete-activity-types-response200-all-of-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteActivityTypesResponse200AllOfData + */ +export interface DeleteActivityTypesResponse200AllOfData { + /** + * The IDs of the deleted activity types + * @type {Array} + * @memberof DeleteActivityTypesResponse200AllOfData + */ + 'id'?: Array; +} + diff --git a/models/delete-activity-types-response200-all-of.ts b/models/delete-activity-types-response200-all-of.ts new file mode 100644 index 00000000..c43c1fd2 --- /dev/null +++ b/models/delete-activity-types-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteActivityTypesResponse200AllOfData } from './delete-activity-types-response200-all-of-data'; + +/** + * + * @export + * @interface DeleteActivityTypesResponse200AllOf + */ +export interface DeleteActivityTypesResponse200AllOf { + /** + * + * @type {DeleteActivityTypesResponse200AllOfData} + * @memberof DeleteActivityTypesResponse200AllOf + */ + 'data'?: DeleteActivityTypesResponse200AllOfData; +} + diff --git a/models/delete-activity-types-response200.ts b/models/delete-activity-types-response200.ts new file mode 100644 index 00000000..8bef8f77 --- /dev/null +++ b/models/delete-activity-types-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { DeleteActivityTypesResponse200AllOf } from './delete-activity-types-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DeleteActivityTypesResponse200AllOfData } from './delete-activity-types-response200-all-of-data'; + +/** + * @type DeleteActivityTypesResponse200 + * @export + */ +export type DeleteActivityTypesResponse200 = BaseResponse & DeleteActivityTypesResponse200AllOf; + + diff --git a/models/delete-channel200-response.ts b/models/delete-channel200-response.ts new file mode 100644 index 00000000..1ec58041 --- /dev/null +++ b/models/delete-channel200-response.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteChannel200Response + */ +export interface DeleteChannel200Response { + /** + * + * @type {boolean} + * @memberof DeleteChannel200Response + */ + 'success'?: boolean; +} + diff --git a/models/delete-comment-response200.ts b/models/delete-comment-response200.ts new file mode 100644 index 00000000..d65133fe --- /dev/null +++ b/models/delete-comment-response200.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface DeleteCommentResponse200 + */ +export interface DeleteCommentResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteCommentResponse200 + */ + 'success'?: boolean; + /** + * If the response is successful or not + * @type {boolean} + * @memberof DeleteCommentResponse200 + */ + 'data'?: boolean; +} + diff --git a/models/delete-conversation403-response-additional-data.ts b/models/delete-conversation403-response-additional-data.ts new file mode 100644 index 00000000..765ab494 --- /dev/null +++ b/models/delete-conversation403-response-additional-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteConversation403ResponseAdditionalData + */ +export interface DeleteConversation403ResponseAdditionalData { + /** + * An error code sent by the API + * @type {string} + * @memberof DeleteConversation403ResponseAdditionalData + */ + 'code'?: string; +} + diff --git a/models/delete-conversation403-response.ts b/models/delete-conversation403-response.ts new file mode 100644 index 00000000..6930d77f --- /dev/null +++ b/models/delete-conversation403-response.ts @@ -0,0 +1,51 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteConversation403ResponseAdditionalData } from './delete-conversation403-response-additional-data'; + +/** + * + * @export + * @interface DeleteConversation403Response + */ +export interface DeleteConversation403Response { + /** + * + * @type {boolean} + * @memberof DeleteConversation403Response + */ + 'success'?: boolean; + /** + * The error description + * @type {string} + * @memberof DeleteConversation403Response + */ + 'error'?: string; + /** + * + * @type {string} + * @memberof DeleteConversation403Response + */ + 'error_info'?: string; + /** + * + * @type {DeleteConversation403ResponseAdditionalData} + * @memberof DeleteConversation403Response + */ + 'additional_data'?: DeleteConversation403ResponseAdditionalData; +} + diff --git a/models/delete-conversation404-response-additional-data.ts b/models/delete-conversation404-response-additional-data.ts new file mode 100644 index 00000000..f28da23f --- /dev/null +++ b/models/delete-conversation404-response-additional-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteConversation404ResponseAdditionalData + */ +export interface DeleteConversation404ResponseAdditionalData { + /** + * An error code sent by the API + * @type {string} + * @memberof DeleteConversation404ResponseAdditionalData + */ + 'code'?: string; +} + diff --git a/models/delete-conversation404-response.ts b/models/delete-conversation404-response.ts new file mode 100644 index 00000000..b9dc702c --- /dev/null +++ b/models/delete-conversation404-response.ts @@ -0,0 +1,51 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteConversation404ResponseAdditionalData } from './delete-conversation404-response-additional-data'; + +/** + * + * @export + * @interface DeleteConversation404Response + */ +export interface DeleteConversation404Response { + /** + * + * @type {boolean} + * @memberof DeleteConversation404Response + */ + 'success'?: boolean; + /** + * The error description + * @type {string} + * @memberof DeleteConversation404Response + */ + 'error'?: string; + /** + * + * @type {string} + * @memberof DeleteConversation404Response + */ + 'error_info'?: string; + /** + * + * @type {DeleteConversation404ResponseAdditionalData} + * @memberof DeleteConversation404Response + */ + 'additional_data'?: DeleteConversation404ResponseAdditionalData; +} + diff --git a/models/delete-deal-follower-response200-data.ts b/models/delete-deal-follower-response200-data.ts new file mode 100644 index 00000000..39462719 --- /dev/null +++ b/models/delete-deal-follower-response200-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteDealFollowerResponse200Data + */ +export interface DeleteDealFollowerResponse200Data { + /** + * The ID of the deal follower that was deleted + * @type {number} + * @memberof DeleteDealFollowerResponse200Data + */ + 'id'?: number; +} + diff --git a/models/delete-deal-follower-response200.ts b/models/delete-deal-follower-response200.ts new file mode 100644 index 00000000..6841d471 --- /dev/null +++ b/models/delete-deal-follower-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteDealFollowerResponse200Data } from './delete-deal-follower-response200-data'; + +/** + * + * @export + * @interface DeleteDealFollowerResponse200 + */ +export interface DeleteDealFollowerResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteDealFollowerResponse200 + */ + 'success'?: boolean; + /** + * + * @type {DeleteDealFollowerResponse200Data} + * @memberof DeleteDealFollowerResponse200 + */ + 'data'?: DeleteDealFollowerResponse200Data; +} + diff --git a/models/delete-deal-participant-response200-data.ts b/models/delete-deal-participant-response200-data.ts new file mode 100644 index 00000000..18856337 --- /dev/null +++ b/models/delete-deal-participant-response200-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteDealParticipantResponse200Data + */ +export interface DeleteDealParticipantResponse200Data { + /** + * The ID of the deal participant that was deleted + * @type {number} + * @memberof DeleteDealParticipantResponse200Data + */ + 'id'?: number; +} + diff --git a/models/delete-deal-participant-response200.ts b/models/delete-deal-participant-response200.ts new file mode 100644 index 00000000..23c3d025 --- /dev/null +++ b/models/delete-deal-participant-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteDealParticipantResponse200Data } from './delete-deal-participant-response200-data'; + +/** + * + * @export + * @interface DeleteDealParticipantResponse200 + */ +export interface DeleteDealParticipantResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteDealParticipantResponse200 + */ + 'success'?: boolean; + /** + * + * @type {DeleteDealParticipantResponse200Data} + * @memberof DeleteDealParticipantResponse200 + */ + 'data'?: DeleteDealParticipantResponse200Data; +} + diff --git a/models/delete-deal-product-response200-data.ts b/models/delete-deal-product-response200-data.ts new file mode 100644 index 00000000..13725687 --- /dev/null +++ b/models/delete-deal-product-response200-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteDealProductResponse200Data + */ +export interface DeleteDealProductResponse200Data { + /** + * The ID of an attached product that was deleted from the deal + * @type {number} + * @memberof DeleteDealProductResponse200Data + */ + 'id'?: number; +} + diff --git a/models/delete-deal-product-response200.ts b/models/delete-deal-product-response200.ts new file mode 100644 index 00000000..32533d35 --- /dev/null +++ b/models/delete-deal-product-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteDealProductResponse200Data } from './delete-deal-product-response200-data'; + +/** + * + * @export + * @interface DeleteDealProductResponse200 + */ +export interface DeleteDealProductResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteDealProductResponse200 + */ + 'success'?: boolean; + /** + * + * @type {DeleteDealProductResponse200Data} + * @memberof DeleteDealProductResponse200 + */ + 'data'?: DeleteDealProductResponse200Data; +} + diff --git a/models/delete-deal-response200-data.ts b/models/delete-deal-response200-data.ts new file mode 100644 index 00000000..1cc7bd6a --- /dev/null +++ b/models/delete-deal-response200-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteDealResponse200Data + */ +export interface DeleteDealResponse200Data { + /** + * The ID of the deal that was deleted + * @type {number} + * @memberof DeleteDealResponse200Data + */ + 'id'?: number; +} + diff --git a/models/delete-deal-response200.ts b/models/delete-deal-response200.ts new file mode 100644 index 00000000..f2e01e03 --- /dev/null +++ b/models/delete-deal-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteDealResponse200Data } from './delete-deal-response200-data'; + +/** + * + * @export + * @interface DeleteDealResponse200 + */ +export interface DeleteDealResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteDealResponse200 + */ + 'success'?: boolean; + /** + * + * @type {DeleteDealResponse200Data} + * @memberof DeleteDealResponse200 + */ + 'data'?: DeleteDealResponse200Data; +} + diff --git a/models/delete-deals-response200-data.ts b/models/delete-deals-response200-data.ts new file mode 100644 index 00000000..cbc615ce --- /dev/null +++ b/models/delete-deals-response200-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteDealsResponse200Data + */ +export interface DeleteDealsResponse200Data { + /** + * The list of deleted deals IDs + * @type {Array} + * @memberof DeleteDealsResponse200Data + */ + 'id'?: Array; +} + diff --git a/models/delete-deals-response200.ts b/models/delete-deals-response200.ts new file mode 100644 index 00000000..0854f160 --- /dev/null +++ b/models/delete-deals-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteDealsResponse200Data } from './delete-deals-response200-data'; + +/** + * + * @export + * @interface DeleteDealsResponse200 + */ +export interface DeleteDealsResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof DeleteDealsResponse200 + */ + 'success'?: boolean; + /** + * + * @type {DeleteDealsResponse200Data} + * @memberof DeleteDealsResponse200 + */ + 'data'?: DeleteDealsResponse200Data; +} + diff --git a/models/delete-field-response200-all-of-data.ts b/models/delete-field-response200-all-of-data.ts new file mode 100644 index 00000000..076ddba1 --- /dev/null +++ b/models/delete-field-response200-all-of-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteFieldResponse200AllOfData + */ +export interface DeleteFieldResponse200AllOfData { + /** + * The ID of the field that was deleted + * @type {number} + * @memberof DeleteFieldResponse200AllOfData + */ + 'id'?: number; +} + diff --git a/models/delete-field-response200-all-of.ts b/models/delete-field-response200-all-of.ts new file mode 100644 index 00000000..43b58913 --- /dev/null +++ b/models/delete-field-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteFieldResponse200AllOfData } from './delete-field-response200-all-of-data'; + +/** + * + * @export + * @interface DeleteFieldResponse200AllOf + */ +export interface DeleteFieldResponse200AllOf { + /** + * + * @type {DeleteFieldResponse200AllOfData} + * @memberof DeleteFieldResponse200AllOf + */ + 'data'?: DeleteFieldResponse200AllOfData; +} + diff --git a/models/delete-field-response200.ts b/models/delete-field-response200.ts new file mode 100644 index 00000000..8ec694f7 --- /dev/null +++ b/models/delete-field-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { DeleteFieldResponse200AllOf } from './delete-field-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DeleteFieldResponse200AllOfData } from './delete-field-response200-all-of-data'; + +/** + * @type DeleteFieldResponse200 + * @export + */ +export type DeleteFieldResponse200 = BaseResponse & DeleteFieldResponse200AllOf; + + diff --git a/models/delete-fields-response200-all-of-data.ts b/models/delete-fields-response200-all-of-data.ts new file mode 100644 index 00000000..bcb69ccc --- /dev/null +++ b/models/delete-fields-response200-all-of-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteFieldsResponse200AllOfData + */ +export interface DeleteFieldsResponse200AllOfData { + /** + * The list of deleted field IDs + * @type {Array} + * @memberof DeleteFieldsResponse200AllOfData + */ + 'id'?: Array; +} + diff --git a/models/delete-fields-response200-all-of.ts b/models/delete-fields-response200-all-of.ts new file mode 100644 index 00000000..5c08448b --- /dev/null +++ b/models/delete-fields-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteFieldsResponse200AllOfData } from './delete-fields-response200-all-of-data'; + +/** + * + * @export + * @interface DeleteFieldsResponse200AllOf + */ +export interface DeleteFieldsResponse200AllOf { + /** + * + * @type {DeleteFieldsResponse200AllOfData} + * @memberof DeleteFieldsResponse200AllOf + */ + 'data'?: DeleteFieldsResponse200AllOfData; +} + diff --git a/models/delete-fields-response200.ts b/models/delete-fields-response200.ts new file mode 100644 index 00000000..14555eca --- /dev/null +++ b/models/delete-fields-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { DeleteFieldsResponse200AllOf } from './delete-fields-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DeleteFieldsResponse200AllOfData } from './delete-fields-response200-all-of-data'; + +/** + * @type DeleteFieldsResponse200 + * @export + */ +export type DeleteFieldsResponse200 = BaseResponse & DeleteFieldsResponse200AllOf; + + diff --git a/models/delete-file-response200-data.ts b/models/delete-file-response200-data.ts new file mode 100644 index 00000000..23a4778a --- /dev/null +++ b/models/delete-file-response200-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteFileResponse200Data + */ +export interface DeleteFileResponse200Data { + /** + * The ID of the file + * @type {number} + * @memberof DeleteFileResponse200Data + */ + 'id'?: number; +} + diff --git a/models/delete-file-response200.ts b/models/delete-file-response200.ts new file mode 100644 index 00000000..71d6fb9f --- /dev/null +++ b/models/delete-file-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteFileResponse200Data } from './delete-file-response200-data'; + +/** + * + * @export + * @interface DeleteFileResponse200 + */ +export interface DeleteFileResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteFileResponse200 + */ + 'success'?: boolean; + /** + * + * @type {DeleteFileResponse200Data} + * @memberof DeleteFileResponse200 + */ + 'data'?: DeleteFileResponse200Data; +} + diff --git a/models/delete-filter-response200-all-of-data.ts b/models/delete-filter-response200-all-of-data.ts new file mode 100644 index 00000000..c015db5a --- /dev/null +++ b/models/delete-filter-response200-all-of-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteFilterResponse200AllOfData + */ +export interface DeleteFilterResponse200AllOfData { + /** + * The ID of the deleted filter + * @type {number} + * @memberof DeleteFilterResponse200AllOfData + */ + 'id'?: number; +} + diff --git a/models/delete-filter-response200-all-of.ts b/models/delete-filter-response200-all-of.ts new file mode 100644 index 00000000..73ad5690 --- /dev/null +++ b/models/delete-filter-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteFilterResponse200AllOfData } from './delete-filter-response200-all-of-data'; + +/** + * + * @export + * @interface DeleteFilterResponse200AllOf + */ +export interface DeleteFilterResponse200AllOf { + /** + * + * @type {DeleteFilterResponse200AllOfData} + * @memberof DeleteFilterResponse200AllOf + */ + 'data'?: DeleteFilterResponse200AllOfData; +} + diff --git a/models/delete-filter-response200.ts b/models/delete-filter-response200.ts new file mode 100644 index 00000000..785ee067 --- /dev/null +++ b/models/delete-filter-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { DeleteFilterResponse200AllOf } from './delete-filter-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DeleteFilterResponse200AllOfData } from './delete-filter-response200-all-of-data'; + +/** + * @type DeleteFilterResponse200 + * @export + */ +export type DeleteFilterResponse200 = BaseResponse & DeleteFilterResponse200AllOf; + + diff --git a/models/delete-filters-response200-all-of-data.ts b/models/delete-filters-response200-all-of-data.ts new file mode 100644 index 00000000..4af54409 --- /dev/null +++ b/models/delete-filters-response200-all-of-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteFiltersResponse200AllOfData + */ +export interface DeleteFiltersResponse200AllOfData { + /** + * The array of the IDs of the deleted filter + * @type {Array} + * @memberof DeleteFiltersResponse200AllOfData + */ + 'id'?: Array; +} + diff --git a/models/delete-filters-response200-all-of.ts b/models/delete-filters-response200-all-of.ts new file mode 100644 index 00000000..6e32dc58 --- /dev/null +++ b/models/delete-filters-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteFiltersResponse200AllOfData } from './delete-filters-response200-all-of-data'; + +/** + * + * @export + * @interface DeleteFiltersResponse200AllOf + */ +export interface DeleteFiltersResponse200AllOf { + /** + * + * @type {DeleteFiltersResponse200AllOfData} + * @memberof DeleteFiltersResponse200AllOf + */ + 'data'?: DeleteFiltersResponse200AllOfData; +} + diff --git a/models/delete-filters-response200.ts b/models/delete-filters-response200.ts new file mode 100644 index 00000000..9e18d2fd --- /dev/null +++ b/models/delete-filters-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { DeleteFiltersResponse200AllOf } from './delete-filters-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DeleteFiltersResponse200AllOfData } from './delete-filters-response200-all-of-data'; + +/** + * @type DeleteFiltersResponse200 + * @export + */ +export type DeleteFiltersResponse200 = BaseResponse & DeleteFiltersResponse200AllOf; + + diff --git a/models/delete-goal-response200.ts b/models/delete-goal-response200.ts new file mode 100644 index 00000000..78d0d5be --- /dev/null +++ b/models/delete-goal-response200.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteGoalResponse200 + */ +export interface DeleteGoalResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteGoalResponse200 + */ + 'success'?: boolean; +} + diff --git a/models/delete-mail-thread-response200-all-of-data.ts b/models/delete-mail-thread-response200-all-of-data.ts new file mode 100644 index 00000000..73753fe6 --- /dev/null +++ b/models/delete-mail-thread-response200-all-of-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteMailThreadResponse200AllOfData + */ +export interface DeleteMailThreadResponse200AllOfData { + /** + * The ID of the deleted mail thread + * @type {number} + * @memberof DeleteMailThreadResponse200AllOfData + */ + 'id'?: number; +} + diff --git a/models/delete-mail-thread-response200-all-of.ts b/models/delete-mail-thread-response200-all-of.ts new file mode 100644 index 00000000..71a7cc67 --- /dev/null +++ b/models/delete-mail-thread-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteMailThreadResponse200AllOfData } from './delete-mail-thread-response200-all-of-data'; + +/** + * + * @export + * @interface DeleteMailThreadResponse200AllOf + */ +export interface DeleteMailThreadResponse200AllOf { + /** + * + * @type {DeleteMailThreadResponse200AllOfData} + * @memberof DeleteMailThreadResponse200AllOf + */ + 'data'?: DeleteMailThreadResponse200AllOfData; +} + diff --git a/models/delete-mail-thread-response200.ts b/models/delete-mail-thread-response200.ts new file mode 100644 index 00000000..c6ecd6fb --- /dev/null +++ b/models/delete-mail-thread-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { DeleteMailThreadResponse200AllOf } from './delete-mail-thread-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DeleteMailThreadResponse200AllOfData } from './delete-mail-thread-response200-all-of-data'; + +/** + * @type DeleteMailThreadResponse200 + * @export + */ +export type DeleteMailThreadResponse200 = BaseResponse & DeleteMailThreadResponse200AllOf; + + diff --git a/models/delete-note-response200.ts b/models/delete-note-response200.ts new file mode 100644 index 00000000..74a57ee0 --- /dev/null +++ b/models/delete-note-response200.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface DeleteNoteResponse200 + */ +export interface DeleteNoteResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteNoteResponse200 + */ + 'success'?: boolean; + /** + * If the response is successful or not + * @type {boolean} + * @memberof DeleteNoteResponse200 + */ + 'data'?: boolean; +} + diff --git a/models/delete-organization-follower-response200-data.ts b/models/delete-organization-follower-response200-data.ts new file mode 100644 index 00000000..52664c80 --- /dev/null +++ b/models/delete-organization-follower-response200-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteOrganizationFollowerResponse200Data + */ +export interface DeleteOrganizationFollowerResponse200Data { + /** + * The ID of the follower that was deleted from the organization + * @type {number} + * @memberof DeleteOrganizationFollowerResponse200Data + */ + 'id'?: number; +} + diff --git a/models/delete-organization-follower-response200.ts b/models/delete-organization-follower-response200.ts new file mode 100644 index 00000000..264c01e3 --- /dev/null +++ b/models/delete-organization-follower-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteOrganizationFollowerResponse200Data } from './delete-organization-follower-response200-data'; + +/** + * + * @export + * @interface DeleteOrganizationFollowerResponse200 + */ +export interface DeleteOrganizationFollowerResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteOrganizationFollowerResponse200 + */ + 'success'?: boolean; + /** + * + * @type {DeleteOrganizationFollowerResponse200Data} + * @memberof DeleteOrganizationFollowerResponse200 + */ + 'data'?: DeleteOrganizationFollowerResponse200Data; +} + diff --git a/models/delete-organization-relationship-response200-all-of-data.ts b/models/delete-organization-relationship-response200-all-of-data.ts new file mode 100644 index 00000000..8972adb6 --- /dev/null +++ b/models/delete-organization-relationship-response200-all-of-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteOrganizationRelationshipResponse200AllOfData + */ +export interface DeleteOrganizationRelationshipResponse200AllOfData { + /** + * The ID of the deleted organization relationship + * @type {number} + * @memberof DeleteOrganizationRelationshipResponse200AllOfData + */ + 'id'?: number; +} + diff --git a/models/delete-organization-relationship-response200-all-of.ts b/models/delete-organization-relationship-response200-all-of.ts new file mode 100644 index 00000000..4e907d7b --- /dev/null +++ b/models/delete-organization-relationship-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteOrganizationRelationshipResponse200AllOfData } from './delete-organization-relationship-response200-all-of-data'; + +/** + * + * @export + * @interface DeleteOrganizationRelationshipResponse200AllOf + */ +export interface DeleteOrganizationRelationshipResponse200AllOf { + /** + * + * @type {DeleteOrganizationRelationshipResponse200AllOfData} + * @memberof DeleteOrganizationRelationshipResponse200AllOf + */ + 'data'?: DeleteOrganizationRelationshipResponse200AllOfData; +} + diff --git a/models/delete-organization-relationship-response200.ts b/models/delete-organization-relationship-response200.ts new file mode 100644 index 00000000..fe5b4354 --- /dev/null +++ b/models/delete-organization-relationship-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { DeleteOrganizationRelationshipResponse200AllOf } from './delete-organization-relationship-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DeleteOrganizationRelationshipResponse200AllOfData } from './delete-organization-relationship-response200-all-of-data'; + +/** + * @type DeleteOrganizationRelationshipResponse200 + * @export + */ +export type DeleteOrganizationRelationshipResponse200 = BaseResponse & DeleteOrganizationRelationshipResponse200AllOf; + + diff --git a/models/delete-organization-response200-data.ts b/models/delete-organization-response200-data.ts new file mode 100644 index 00000000..788c7cf8 --- /dev/null +++ b/models/delete-organization-response200-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteOrganizationResponse200Data + */ +export interface DeleteOrganizationResponse200Data { + /** + * The ID of the organization that was deleted + * @type {number} + * @memberof DeleteOrganizationResponse200Data + */ + 'id'?: number; +} + diff --git a/models/delete-organization-response200.ts b/models/delete-organization-response200.ts new file mode 100644 index 00000000..ca7651fe --- /dev/null +++ b/models/delete-organization-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteOrganizationResponse200Data } from './delete-organization-response200-data'; + +/** + * + * @export + * @interface DeleteOrganizationResponse200 + */ +export interface DeleteOrganizationResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteOrganizationResponse200 + */ + 'success'?: boolean; + /** + * + * @type {DeleteOrganizationResponse200Data} + * @memberof DeleteOrganizationResponse200 + */ + 'data'?: DeleteOrganizationResponse200Data; +} + diff --git a/models/delete-organizations-response200-data.ts b/models/delete-organizations-response200-data.ts new file mode 100644 index 00000000..18cc7e9d --- /dev/null +++ b/models/delete-organizations-response200-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteOrganizationsResponse200Data + */ +export interface DeleteOrganizationsResponse200Data { + /** + * The IDs of the organizations that were deleted + * @type {Array} + * @memberof DeleteOrganizationsResponse200Data + */ + 'id'?: Array; +} + diff --git a/models/delete-organizations-response200.ts b/models/delete-organizations-response200.ts new file mode 100644 index 00000000..9b6d8c80 --- /dev/null +++ b/models/delete-organizations-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteOrganizationsResponse200Data } from './delete-organizations-response200-data'; + +/** + * + * @export + * @interface DeleteOrganizationsResponse200 + */ +export interface DeleteOrganizationsResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteOrganizationsResponse200 + */ + 'success'?: boolean; + /** + * + * @type {DeleteOrganizationsResponse200Data} + * @memberof DeleteOrganizationsResponse200 + */ + 'data'?: DeleteOrganizationsResponse200Data; +} + diff --git a/models/delete-person-response200-all-of-data.ts b/models/delete-person-response200-all-of-data.ts new file mode 100644 index 00000000..41fb919b --- /dev/null +++ b/models/delete-person-response200-all-of-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeletePersonResponse200AllOfData + */ +export interface DeletePersonResponse200AllOfData { + /** + * The ID of the deleted person + * @type {number} + * @memberof DeletePersonResponse200AllOfData + */ + 'id'?: number; +} + diff --git a/models/delete-person-response200-all-of.ts b/models/delete-person-response200-all-of.ts new file mode 100644 index 00000000..71c1f215 --- /dev/null +++ b/models/delete-person-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeletePersonResponse200AllOfData } from './delete-person-response200-all-of-data'; + +/** + * + * @export + * @interface DeletePersonResponse200AllOf + */ +export interface DeletePersonResponse200AllOf { + /** + * + * @type {DeletePersonResponse200AllOfData} + * @memberof DeletePersonResponse200AllOf + */ + 'data'?: DeletePersonResponse200AllOfData; +} + diff --git a/models/delete-person-response200.ts b/models/delete-person-response200.ts new file mode 100644 index 00000000..ad84b2e7 --- /dev/null +++ b/models/delete-person-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { DeletePersonResponse200AllOf } from './delete-person-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DeletePersonResponse200AllOfData } from './delete-person-response200-all-of-data'; + +/** + * @type DeletePersonResponse200 + * @export + */ +export type DeletePersonResponse200 = BaseResponse & DeletePersonResponse200AllOf; + + diff --git a/models/delete-persons-response200-all-of-data.ts b/models/delete-persons-response200-all-of-data.ts new file mode 100644 index 00000000..7a32f54e --- /dev/null +++ b/models/delete-persons-response200-all-of-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeletePersonsResponse200AllOfData + */ +export interface DeletePersonsResponse200AllOfData { + /** + * The list of deleted persons IDs + * @type {Array} + * @memberof DeletePersonsResponse200AllOfData + */ + 'id'?: Array; +} + diff --git a/models/delete-persons-response200-all-of.ts b/models/delete-persons-response200-all-of.ts new file mode 100644 index 00000000..461296e6 --- /dev/null +++ b/models/delete-persons-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeletePersonsResponse200AllOfData } from './delete-persons-response200-all-of-data'; + +/** + * + * @export + * @interface DeletePersonsResponse200AllOf + */ +export interface DeletePersonsResponse200AllOf { + /** + * + * @type {DeletePersonsResponse200AllOfData} + * @memberof DeletePersonsResponse200AllOf + */ + 'data'?: DeletePersonsResponse200AllOfData; +} + diff --git a/models/delete-persons-response200.ts b/models/delete-persons-response200.ts new file mode 100644 index 00000000..7da4de3b --- /dev/null +++ b/models/delete-persons-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { DeletePersonsResponse200AllOf } from './delete-persons-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DeletePersonsResponse200AllOfData } from './delete-persons-response200-all-of-data'; + +/** + * @type DeletePersonsResponse200 + * @export + */ +export type DeletePersonsResponse200 = BaseResponse & DeletePersonsResponse200AllOf; + + diff --git a/models/delete-pipeline-response200-data.ts b/models/delete-pipeline-response200-data.ts new file mode 100644 index 00000000..bdf41fbd --- /dev/null +++ b/models/delete-pipeline-response200-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeletePipelineResponse200Data + */ +export interface DeletePipelineResponse200Data { + /** + * Deleted Pipeline ID + * @type {number} + * @memberof DeletePipelineResponse200Data + */ + 'id'?: number; +} + diff --git a/models/delete-pipeline-response200.ts b/models/delete-pipeline-response200.ts new file mode 100644 index 00000000..9c0adf7e --- /dev/null +++ b/models/delete-pipeline-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeletePipelineResponse200Data } from './delete-pipeline-response200-data'; + +/** + * + * @export + * @interface DeletePipelineResponse200 + */ +export interface DeletePipelineResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeletePipelineResponse200 + */ + 'success'?: boolean; + /** + * + * @type {DeletePipelineResponse200Data} + * @memberof DeletePipelineResponse200 + */ + 'data'?: DeletePipelineResponse200Data; +} + diff --git a/models/delete-product-field-response200.ts b/models/delete-product-field-response200.ts new file mode 100644 index 00000000..f4d375ab --- /dev/null +++ b/models/delete-product-field-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteProductResponse200Data } from './delete-product-response200-data'; + +/** + * + * @export + * @interface DeleteProductFieldResponse200 + */ +export interface DeleteProductFieldResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof DeleteProductFieldResponse200 + */ + 'success'?: boolean; + /** + * + * @type {DeleteProductResponse200Data} + * @memberof DeleteProductFieldResponse200 + */ + 'data'?: DeleteProductResponse200Data; +} + diff --git a/models/delete-product-fields-response200-data.ts b/models/delete-product-fields-response200-data.ts new file mode 100644 index 00000000..fcc94c17 --- /dev/null +++ b/models/delete-product-fields-response200-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteProductFieldsResponse200Data + */ +export interface DeleteProductFieldsResponse200Data { + /** + * Array of all the IDs of the deleted product fields + * @type {Array} + * @memberof DeleteProductFieldsResponse200Data + */ + 'id'?: Array; +} + diff --git a/models/delete-product-fields-response200.ts b/models/delete-product-fields-response200.ts new file mode 100644 index 00000000..249c1c2b --- /dev/null +++ b/models/delete-product-fields-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteProductFieldsResponse200Data } from './delete-product-fields-response200-data'; + +/** + * + * @export + * @interface DeleteProductFieldsResponse200 + */ +export interface DeleteProductFieldsResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof DeleteProductFieldsResponse200 + */ + 'success'?: boolean; + /** + * + * @type {DeleteProductFieldsResponse200Data} + * @memberof DeleteProductFieldsResponse200 + */ + 'data'?: DeleteProductFieldsResponse200Data; +} + diff --git a/models/delete-product-follower-response200.ts b/models/delete-product-follower-response200.ts new file mode 100644 index 00000000..208b9eeb --- /dev/null +++ b/models/delete-product-follower-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteProductResponse200Data } from './delete-product-response200-data'; + +/** + * + * @export + * @interface DeleteProductFollowerResponse200 + */ +export interface DeleteProductFollowerResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof DeleteProductFollowerResponse200 + */ + 'success'?: boolean; + /** + * + * @type {DeleteProductResponse200Data} + * @memberof DeleteProductFollowerResponse200 + */ + 'data'?: DeleteProductResponse200Data; +} + diff --git a/models/delete-product-response200-data.ts b/models/delete-product-response200-data.ts new file mode 100644 index 00000000..b3c85f07 --- /dev/null +++ b/models/delete-product-response200-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteProductResponse200Data + */ +export interface DeleteProductResponse200Data { + /** + * + * @type {number} + * @memberof DeleteProductResponse200Data + */ + 'id'?: number; +} + diff --git a/models/delete-product-response200.ts b/models/delete-product-response200.ts new file mode 100644 index 00000000..137eec75 --- /dev/null +++ b/models/delete-product-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteProductResponse200Data } from './delete-product-response200-data'; + +/** + * + * @export + * @interface DeleteProductResponse200 + */ +export interface DeleteProductResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof DeleteProductResponse200 + */ + 'success'?: boolean; + /** + * + * @type {DeleteProductResponse200Data} + * @memberof DeleteProductResponse200 + */ + 'data'?: DeleteProductResponse200Data; +} + diff --git a/models/delete-project-data.ts b/models/delete-project-data.ts new file mode 100644 index 00000000..a3369938 --- /dev/null +++ b/models/delete-project-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteProjectData + */ +export interface DeleteProjectData { + /** + * The ID of the project that was deleted + * @type {number} + * @memberof DeleteProjectData + */ + 'id'?: number; +} + diff --git a/models/delete-project-response200.ts b/models/delete-project-response200.ts new file mode 100644 index 00000000..a05ef8c4 --- /dev/null +++ b/models/delete-project-response200.ts @@ -0,0 +1,45 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteProject } from './delete-project'; + +/** + * + * @export + * @interface DeleteProjectResponse200 + */ +export interface DeleteProjectResponse200 { + /** + * + * @type {boolean} + * @memberof DeleteProjectResponse200 + */ + 'success'?: boolean; + /** + * + * @type {DeleteProject} + * @memberof DeleteProjectResponse200 + */ + 'data'?: DeleteProject; + /** + * + * @type {object} + * @memberof DeleteProjectResponse200 + */ + 'additional_data'?: object | null; +} + diff --git a/models/delete-project.ts b/models/delete-project.ts new file mode 100644 index 00000000..c9ef44e2 --- /dev/null +++ b/models/delete-project.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteProjectData } from './delete-project-data'; + +/** + * + * @export + * @interface DeleteProject + */ +export interface DeleteProject { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteProject + */ + 'success'?: boolean; + /** + * + * @type {DeleteProjectData} + * @memberof DeleteProject + */ + 'data'?: DeleteProjectData; +} + diff --git a/models/delete-role-assignment-request.ts b/models/delete-role-assignment-request.ts new file mode 100644 index 00000000..ce45dac3 --- /dev/null +++ b/models/delete-role-assignment-request.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteRoleAssignmentRequest + */ +export interface DeleteRoleAssignmentRequest { + /** + * The ID of the user + * @type {number} + * @memberof DeleteRoleAssignmentRequest + */ + 'user_id': number; +} + diff --git a/models/delete-role-assignment-response200.ts b/models/delete-role-assignment-response200.ts new file mode 100644 index 00000000..3889960e --- /dev/null +++ b/models/delete-role-assignment-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddRoleResponse200AllOf } from './add-role-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { AddRoleResponse200AllOfData } from './add-role-response200-all-of-data'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; + +/** + * @type DeleteRoleAssignmentResponse200 + * @export + */ +export type DeleteRoleAssignmentResponse200 = AddRoleResponse200AllOf & BaseResponse; + + diff --git a/models/delete-role-response200.ts b/models/delete-role-response200.ts new file mode 100644 index 00000000..c2b5c7aa --- /dev/null +++ b/models/delete-role-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddRoleResponse200AllOf } from './add-role-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { AddRoleResponse200AllOfData } from './add-role-response200-all-of-data'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; + +/** + * @type DeleteRoleResponse200 + * @export + */ +export type DeleteRoleResponse200 = AddRoleResponse200AllOf & BaseResponse; + + diff --git a/models/delete-stage-response200-data.ts b/models/delete-stage-response200-data.ts new file mode 100644 index 00000000..5944494e --- /dev/null +++ b/models/delete-stage-response200-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteStageResponse200Data + */ +export interface DeleteStageResponse200Data { + /** + * Deleted stage ID + * @type {number} + * @memberof DeleteStageResponse200Data + */ + 'id'?: number; +} + diff --git a/models/delete-stage-response200.ts b/models/delete-stage-response200.ts new file mode 100644 index 00000000..61f6a317 --- /dev/null +++ b/models/delete-stage-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteStageResponse200Data } from './delete-stage-response200-data'; + +/** + * + * @export + * @interface DeleteStageResponse200 + */ +export interface DeleteStageResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteStageResponse200 + */ + 'success'?: boolean; + /** + * + * @type {DeleteStageResponse200Data} + * @memberof DeleteStageResponse200 + */ + 'data'?: DeleteStageResponse200Data; +} + diff --git a/models/delete-stages-response200-data.ts b/models/delete-stages-response200-data.ts new file mode 100644 index 00000000..0bf02141 --- /dev/null +++ b/models/delete-stages-response200-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteStagesResponse200Data + */ +export interface DeleteStagesResponse200Data { + /** + * The list of deleted stage IDs + * @type {Array} + * @memberof DeleteStagesResponse200Data + */ + 'id'?: Array; +} + diff --git a/models/delete-stages-response200.ts b/models/delete-stages-response200.ts new file mode 100644 index 00000000..f6d66c65 --- /dev/null +++ b/models/delete-stages-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteStagesResponse200Data } from './delete-stages-response200-data'; + +/** + * + * @export + * @interface DeleteStagesResponse200 + */ +export interface DeleteStagesResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteStagesResponse200 + */ + 'success'?: boolean; + /** + * + * @type {DeleteStagesResponse200Data} + * @memberof DeleteStagesResponse200 + */ + 'data'?: DeleteStagesResponse200Data; +} + diff --git a/models/delete-task-data.ts b/models/delete-task-data.ts new file mode 100644 index 00000000..fbc74d52 --- /dev/null +++ b/models/delete-task-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteTaskData + */ +export interface DeleteTaskData { + /** + * The ID of the task that was deleted + * @type {number} + * @memberof DeleteTaskData + */ + 'id'?: number; +} + diff --git a/models/delete-task-response200.ts b/models/delete-task-response200.ts new file mode 100644 index 00000000..3178cd94 --- /dev/null +++ b/models/delete-task-response200.ts @@ -0,0 +1,45 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteTask } from './delete-task'; + +/** + * + * @export + * @interface DeleteTaskResponse200 + */ +export interface DeleteTaskResponse200 { + /** + * + * @type {boolean} + * @memberof DeleteTaskResponse200 + */ + 'success'?: boolean; + /** + * + * @type {DeleteTask} + * @memberof DeleteTaskResponse200 + */ + 'data'?: DeleteTask; + /** + * + * @type {object} + * @memberof DeleteTaskResponse200 + */ + 'additional_data'?: object | null; +} + diff --git a/models/delete-task.ts b/models/delete-task.ts new file mode 100644 index 00000000..a5c52693 --- /dev/null +++ b/models/delete-task.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DeleteTaskData } from './delete-task-data'; + +/** + * + * @export + * @interface DeleteTask + */ +export interface DeleteTask { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteTask + */ + 'success'?: boolean; + /** + * + * @type {DeleteTaskData} + * @memberof DeleteTask + */ + 'data'?: DeleteTaskData; +} + diff --git a/models/delete-team-user-request.ts b/models/delete-team-user-request.ts new file mode 100644 index 00000000..69c3403e --- /dev/null +++ b/models/delete-team-user-request.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteTeamUserRequest + */ +export interface DeleteTeamUserRequest { + /** + * The list of user IDs + * @type {Array} + * @memberof DeleteTeamUserRequest + */ + 'users': Array; +} + diff --git a/models/delete-webhook403-response-all-of.ts b/models/delete-webhook403-response-all-of.ts new file mode 100644 index 00000000..d5381efe --- /dev/null +++ b/models/delete-webhook403-response-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface DeleteWebhook403ResponseAllOf + */ +export interface DeleteWebhook403ResponseAllOf { + /** + * The error message + * @type {string} + * @memberof DeleteWebhook403ResponseAllOf + */ + 'message'?: string; +} + diff --git a/models/delete-webhook403-response.ts b/models/delete-webhook403-response.ts new file mode 100644 index 00000000..23d23eea --- /dev/null +++ b/models/delete-webhook403-response.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { DeleteWebhook403ResponseAllOf } from './delete-webhook403-response-all-of'; + +/** + * @type DeleteWebhook403Response + * @export + */ +export type DeleteWebhook403Response = BaseResponse & DeleteWebhook403ResponseAllOf; + + diff --git a/models/duplicate-deal-response200.ts b/models/duplicate-deal-response200.ts new file mode 100644 index 00000000..f44887a3 --- /dev/null +++ b/models/duplicate-deal-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DealStrict } from './deal-strict'; + +/** + * + * @export + * @interface DuplicateDealResponse200 + */ +export interface DuplicateDealResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof DuplicateDealResponse200 + */ + 'success'?: boolean; + /** + * + * @type {DealStrict} + * @memberof DuplicateDealResponse200 + */ + 'data'?: DealStrict; +} + diff --git a/models/fail-response.ts b/models/fail-response.ts new file mode 100644 index 00000000..077f006b --- /dev/null +++ b/models/fail-response.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface FailResponse + */ +export interface FailResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof FailResponse + */ + 'success'?: boolean; + /** + * The error message + * @type {string} + * @memberof FailResponse + */ + 'error'?: string; +} + diff --git a/models/field-response200-all-of.ts b/models/field-response200-all-of.ts new file mode 100644 index 00000000..6f82d573 --- /dev/null +++ b/models/field-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfDataInner } from './fields-response200-all-of-data-inner'; + +/** + * + * @export + * @interface FieldResponse200AllOf + */ +export interface FieldResponse200AllOf { + /** + * + * @type {FieldsResponse200AllOfDataInner} + * @memberof FieldResponse200AllOf + */ + 'data'?: FieldsResponse200AllOfDataInner; +} + diff --git a/models/field-response200.ts b/models/field-response200.ts new file mode 100644 index 00000000..391bd1c5 --- /dev/null +++ b/models/field-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { FieldResponse200AllOf } from './field-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfDataInner } from './fields-response200-all-of-data-inner'; + +/** + * @type FieldResponse200 + * @export + */ +export type FieldResponse200 = BaseResponse & FieldResponse200AllOf; + + diff --git a/models/fields-response200-all-of-additional-data.ts b/models/fields-response200-all-of-additional-data.ts new file mode 100644 index 00000000..cc18ebf6 --- /dev/null +++ b/models/fields-response200-all-of-additional-data.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + + +/** + * The additional data of the list + * @export + * @interface FieldsResponse200AllOfAdditionalData + */ +export interface FieldsResponse200AllOfAdditionalData { + /** + * Pagination start + * @type {number} + * @memberof FieldsResponse200AllOfAdditionalData + */ + 'start'?: number; + /** + * Items shown per page + * @type {number} + * @memberof FieldsResponse200AllOfAdditionalData + */ + 'limit'?: number; + /** + * If there are more list items in the collection than displayed or not + * @type {boolean} + * @memberof FieldsResponse200AllOfAdditionalData + */ + 'more_items_in_collection'?: boolean; +} + diff --git a/models/fields-response200-all-of-data-inner.ts b/models/fields-response200-all-of-data-inner.ts new file mode 100644 index 00000000..4bbe4734 --- /dev/null +++ b/models/fields-response200-all-of-data-inner.ts @@ -0,0 +1,185 @@ +/* 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 + * @interface FieldsResponse200AllOfDataInner + */ +export interface FieldsResponse200AllOfDataInner { + /** + * The ID of the field. Value is `null` in case of subfields. + * @type {number} + * @memberof FieldsResponse200AllOfDataInner + */ + 'id'?: number; + /** + * The key of the field. For custom fields this is generated upon creation. + * @type {string} + * @memberof FieldsResponse200AllOfDataInner + */ + 'key'?: string; + /** + * The name of the field + * @type {string} + * @memberof FieldsResponse200AllOfDataInner + */ + 'name'?: string; + /** + * The order number of the field + * @type {number} + * @memberof FieldsResponse200AllOfDataInner + */ + 'order_nr'?: number; + /** + * The type of the field
ValueDescription
`address`Address field (has multiple subfields, autocompleted by Google Maps)
`date`Date (format YYYY-MM-DD)
`daterange`Date-range field (has a start date and end date value, both YYYY-MM-DD)
`double`Numeric value
`enum`Options field with a single possible chosen option
`monetary`Monetary field (has a numeric value and a currency value)
`org`Organization field (contains an organization ID which is stored on the same account)
`people`Person field (contains a person ID which is stored on the same account)
`phone`Phone field (up to 255 numbers and/or characters)
`set`Options field with a possibility of having multiple chosen options
`text`Long text (up to 65k characters)
`time`Time field (format HH:MM:SS)
`timerange`Time-range field (has a start time and end time value, both HH:MM:SS)
`user`User field (contains a user ID of another Pipedrive user)
`varchar`Text (up to 255 characters)
`varchar_auto`Autocomplete text (up to 255 characters)
`visible_to`System field that keeps item\'s visibility setting
+ * @type {string} + * @memberof FieldsResponse200AllOfDataInner + */ + 'field_type'?: FieldsResponse200AllOfDataInnerFieldTypeConst; + /** + * The creation time of the field + * @type {string} + * @memberof FieldsResponse200AllOfDataInner + */ + 'add_time'?: string; + /** + * The update time of the field + * @type {string} + * @memberof FieldsResponse200AllOfDataInner + */ + 'update_time'?: string; + /** + * The ID of the user who created or most recently updated the field, only applicable for custom fields + * @type {number} + * @memberof FieldsResponse200AllOfDataInner + */ + 'last_updated_by_user_id'?: number; + /** + * The active flag of the field + * @type {boolean} + * @memberof FieldsResponse200AllOfDataInner + */ + 'active_flag'?: boolean; + /** + * The edit flag of the field + * @type {boolean} + * @memberof FieldsResponse200AllOfDataInner + */ + 'edit_flag'?: boolean; + /** + * Not used + * @type {boolean} + * @memberof FieldsResponse200AllOfDataInner + */ + 'index_visible_flag'?: boolean; + /** + * Not used + * @type {boolean} + * @memberof FieldsResponse200AllOfDataInner + */ + 'details_visible_flag'?: boolean; + /** + * Not used + * @type {boolean} + * @memberof FieldsResponse200AllOfDataInner + */ + 'add_visible_flag'?: boolean; + /** + * Not used + * @type {boolean} + * @memberof FieldsResponse200AllOfDataInner + */ + 'important_flag'?: boolean; + /** + * Whether or not the field of an item can be edited in bulk + * @type {boolean} + * @memberof FieldsResponse200AllOfDataInner + */ + 'bulk_edit_allowed'?: boolean; + /** + * Whether or not items can be searched by this field + * @type {boolean} + * @memberof FieldsResponse200AllOfDataInner + */ + 'searchable_flag'?: boolean; + /** + * Whether or not items can be filtered by this field + * @type {boolean} + * @memberof FieldsResponse200AllOfDataInner + */ + 'filtering_allowed'?: boolean; + /** + * Whether or not items can be sorted by this field + * @type {boolean} + * @memberof FieldsResponse200AllOfDataInner + */ + 'sortable_flag'?: boolean; + /** + * Whether or not the field is mandatory + * @type {boolean} + * @memberof FieldsResponse200AllOfDataInner + */ + 'mandatory_flag'?: boolean; + /** + * The options of the field. When there are no options, `null` is returned. + * @type {Array} + * @memberof FieldsResponse200AllOfDataInner + */ + 'options'?: Array | null; + /** + * The deleted options of the field. Only present when there is at least 1 deleted option. + * @type {Array} + * @memberof FieldsResponse200AllOfDataInner + */ + 'options_deleted'?: Array; + /** + * Whether or not the field is a subfield of another field. Only present if field is subfield. + * @type {boolean} + * @memberof FieldsResponse200AllOfDataInner + */ + 'is_subfield'?: boolean; + /** + * The subfields of the field. Only present when the field has subfields. + * @type {Array} + * @memberof FieldsResponse200AllOfDataInner + */ + 'subfields'?: Array; +} + +export const FieldsResponse200AllOfDataInnerFieldTypeConst = { + address: 'address', + date: 'date', + daterange: 'daterange', + double: 'double', + enum: 'enum', + monetary: 'monetary', + org: 'org', + people: 'people', + phone: 'phone', + set: 'set', + text: 'text', + time: 'time', + timerange: 'timerange', + user: 'user', + varchar: 'varchar', + varchar_auto: 'varchar_auto', + visible_to: 'visible_to' +} as const; + +export type FieldsResponse200AllOfDataInnerFieldTypeConst = typeof FieldsResponse200AllOfDataInnerFieldTypeConst[keyof typeof FieldsResponse200AllOfDataInnerFieldTypeConst]; + + diff --git a/models/fields-response200-all-of.ts b/models/fields-response200-all-of.ts new file mode 100644 index 00000000..2bbcba5a --- /dev/null +++ b/models/fields-response200-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfDataInner } from './fields-response200-all-of-data-inner'; + +/** + * + * @export + * @interface FieldsResponse200AllOf + */ +export interface FieldsResponse200AllOf { + /** + * + * @type {Array} + * @memberof FieldsResponse200AllOf + */ + 'data'?: Array; + /** + * + * @type {FieldsResponse200AllOfAdditionalData} + * @memberof FieldsResponse200AllOf + */ + 'additional_data'?: FieldsResponse200AllOfAdditionalData; +} + diff --git a/models/fields-response200.ts b/models/fields-response200.ts new file mode 100644 index 00000000..2af5ceb9 --- /dev/null +++ b/models/fields-response200.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOf } from './fields-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfDataInner } from './fields-response200-all-of-data-inner'; + +/** + * @type FieldsResponse200 + * @export + */ +export type FieldsResponse200 = BaseResponse & FieldsResponse200AllOf; + + diff --git a/models/full-project-object-all-of.ts b/models/full-project-object-all-of.ts new file mode 100644 index 00000000..49df6ed0 --- /dev/null +++ b/models/full-project-object-all-of.ts @@ -0,0 +1,42 @@ +/* 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 + * @interface FullProjectObjectAllOf + */ +export interface FullProjectObjectAllOf { + /** + * The title of the project + * @type {string} + * @memberof FullProjectObjectAllOf + */ + 'title'?: string; + /** + * The ID of the board this project is associated with + * @type {number} + * @memberof FullProjectObjectAllOf + */ + 'board_id'?: number; + /** + * The ID of the phase this project is associated with + * @type {number} + * @memberof FullProjectObjectAllOf + */ + 'phase_id'?: number; +} + diff --git a/models/full-project-object-all-of1.ts b/models/full-project-object-all-of1.ts new file mode 100644 index 00000000..2dc0048f --- /dev/null +++ b/models/full-project-object-all-of1.ts @@ -0,0 +1,78 @@ +/* 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 + * @interface FullProjectObjectAllOf1 + */ +export interface FullProjectObjectAllOf1 { + /** + * The description of the project + * @type {string} + * @memberof FullProjectObjectAllOf1 + */ + 'description'?: string; + /** + * The status of the project + * @type {string} + * @memberof FullProjectObjectAllOf1 + */ + 'status'?: string; + /** + * The ID of a project owner + * @type {number} + * @memberof FullProjectObjectAllOf1 + */ + 'owner_id'?: number; + /** + * The start date of the project. Format: YYYY-MM-DD. + * @type {string} + * @memberof FullProjectObjectAllOf1 + */ + 'start_date'?: string; + /** + * The end date of the project. Format: YYYY-MM-DD. + * @type {string} + * @memberof FullProjectObjectAllOf1 + */ + 'end_date'?: string; + /** + * An array of IDs of the deals this project is associated with + * @type {Array} + * @memberof FullProjectObjectAllOf1 + */ + 'deal_ids'?: Array; + /** + * The ID of the organization this project is associated with + * @type {number} + * @memberof FullProjectObjectAllOf1 + */ + 'org_id'?: number; + /** + * The ID of the person this project is associated with + * @type {number} + * @memberof FullProjectObjectAllOf1 + */ + 'person_id'?: number; + /** + * An array of IDs of the labels this project has + * @type {Array} + * @memberof FullProjectObjectAllOf1 + */ + 'labels'?: Array; +} + diff --git a/models/full-project-object-all-of2.ts b/models/full-project-object-all-of2.ts new file mode 100644 index 00000000..ee00b2e8 --- /dev/null +++ b/models/full-project-object-all-of2.ts @@ -0,0 +1,48 @@ +/* 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 + * @interface FullProjectObjectAllOf2 + */ +export interface FullProjectObjectAllOf2 { + /** + * The creation date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof FullProjectObjectAllOf2 + */ + 'add_time'?: string; + /** + * The update date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof FullProjectObjectAllOf2 + */ + 'update_time'?: string; + /** + * The status changed date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof FullProjectObjectAllOf2 + */ + 'status_change_time'?: string; + /** + * The archived date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS. If not archived then \'null\'. + * @type {string} + * @memberof FullProjectObjectAllOf2 + */ + 'archive_time'?: string; +} + diff --git a/models/full-project-object.ts b/models/full-project-object.ts new file mode 100644 index 00000000..159ca62a --- /dev/null +++ b/models/full-project-object.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FullProjectObjectAllOf } from './full-project-object-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { FullProjectObjectAllOf1 } from './full-project-object-all-of1'; +// May contain unused imports in some cases +// @ts-ignore +import { FullProjectObjectAllOf2 } from './full-project-object-all-of2'; + +/** + * @type FullProjectObject + * @export + */ +export type FullProjectObject = FullProjectObjectAllOf & FullProjectObjectAllOf1 & FullProjectObjectAllOf2; + + diff --git a/models/full-role-all-of.ts b/models/full-role-all-of.ts new file mode 100644 index 00000000..d915c051 --- /dev/null +++ b/models/full-role-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface FullRoleAllOf + */ +export interface FullRoleAllOf { + /** + * The level of role in the role hierarchy + * @type {number} + * @memberof FullRoleAllOf + */ + 'level'?: number; +} + diff --git a/models/full-role.ts b/models/full-role.ts new file mode 100644 index 00000000..916c7831 --- /dev/null +++ b/models/full-role.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FullRoleAllOf } from './full-role-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { SubRole } from './sub-role'; + +/** + * @type FullRole + * @export + */ +export type FullRole = FullRoleAllOf & SubRole; + + diff --git a/models/get-activities-collection-response200-additional-data.ts b/models/get-activities-collection-response200-additional-data.ts new file mode 100644 index 00000000..ec4bd74e --- /dev/null +++ b/models/get-activities-collection-response200-additional-data.ts @@ -0,0 +1,30 @@ +/* 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. + */ + + + +/** + * The additional data of the list + * @export + * @interface GetActivitiesCollectionResponse200AdditionalData + */ +export interface GetActivitiesCollectionResponse200AdditionalData { + /** + * The first item on the next page. The value of the `next_cursor` field will be `null` if you have reached the end of the dataset and there’s no more pages to be returned. + * @type {string} + * @memberof GetActivitiesCollectionResponse200AdditionalData + */ + 'next_cursor'?: string; +} + diff --git a/models/get-activities-collection-response200.ts b/models/get-activities-collection-response200.ts new file mode 100644 index 00000000..99fd4748 --- /dev/null +++ b/models/get-activities-collection-response200.ts @@ -0,0 +1,48 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ActivityCollectionResponseObject } from './activity-collection-response-object'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesCollectionResponse200AdditionalData } from './get-activities-collection-response200-additional-data'; + +/** + * + * @export + * @interface GetActivitiesCollectionResponse200 + */ +export interface GetActivitiesCollectionResponse200 { + /** + * + * @type {boolean} + * @memberof GetActivitiesCollectionResponse200 + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetActivitiesCollectionResponse200 + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesCollectionResponse200AdditionalData} + * @memberof GetActivitiesCollectionResponse200 + */ + 'additional_data'?: GetActivitiesCollectionResponse200AdditionalData; +} + diff --git a/models/get-activities-response200-additional-data-pagination.ts b/models/get-activities-response200-additional-data-pagination.ts new file mode 100644 index 00000000..7fd8703a --- /dev/null +++ b/models/get-activities-response200-additional-data-pagination.ts @@ -0,0 +1,48 @@ +/* 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. + */ + + + +/** + * Pagination details of the list + * @export + * @interface GetActivitiesResponse200AdditionalDataPagination + */ +export interface GetActivitiesResponse200AdditionalDataPagination { + /** + * Pagination start + * @type {number} + * @memberof GetActivitiesResponse200AdditionalDataPagination + */ + 'start'?: number; + /** + * Items shown per page + * @type {number} + * @memberof GetActivitiesResponse200AdditionalDataPagination + */ + 'limit'?: number; + /** + * Whether there are more list items in the collection than displayed + * @type {boolean} + * @memberof GetActivitiesResponse200AdditionalDataPagination + */ + 'more_items_in_collection'?: boolean; + /** + * Next pagination start + * @type {number} + * @memberof GetActivitiesResponse200AdditionalDataPagination + */ + 'next_start'?: number; +} + diff --git a/models/get-activities-response200-additional-data.ts b/models/get-activities-response200-additional-data.ts new file mode 100644 index 00000000..8aaff656 --- /dev/null +++ b/models/get-activities-response200-additional-data.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalDataPagination } from './get-activities-response200-additional-data-pagination'; + +/** + * + * @export + * @interface GetActivitiesResponse200AdditionalData + */ +export interface GetActivitiesResponse200AdditionalData { + /** + * + * @type {GetActivitiesResponse200AdditionalDataPagination} + * @memberof GetActivitiesResponse200AdditionalData + */ + 'pagination'?: GetActivitiesResponse200AdditionalDataPagination; +} + diff --git a/models/get-activities-response200-related-objects-deal-dealid.ts b/models/get-activities-response200-related-objects-deal-dealid.ts new file mode 100644 index 00000000..e1164c9c --- /dev/null +++ b/models/get-activities-response200-related-objects-deal-dealid.ts @@ -0,0 +1,66 @@ +/* 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. + */ + + + +/** + * The ID of the deal which is associated with the item + * @export + * @interface GetActivitiesResponse200RelatedObjectsDealDEALID + */ +export interface GetActivitiesResponse200RelatedObjectsDealDEALID { + /** + * The ID of the deal associated with the item + * @type {number} + * @memberof GetActivitiesResponse200RelatedObjectsDealDEALID + */ + 'id'?: number; + /** + * The title of the deal associated with the item + * @type {string} + * @memberof GetActivitiesResponse200RelatedObjectsDealDEALID + */ + 'title'?: string; + /** + * The status of the deal associated with the item + * @type {string} + * @memberof GetActivitiesResponse200RelatedObjectsDealDEALID + */ + 'status'?: string; + /** + * The value of the deal that is associated with the item + * @type {number} + * @memberof GetActivitiesResponse200RelatedObjectsDealDEALID + */ + 'value'?: number; + /** + * The currency of the deal value + * @type {string} + * @memberof GetActivitiesResponse200RelatedObjectsDealDEALID + */ + 'currency'?: string; + /** + * The ID of the stage the deal is currently at + * @type {number} + * @memberof GetActivitiesResponse200RelatedObjectsDealDEALID + */ + 'stage_id'?: number; + /** + * The ID of the pipeline the deal is in + * @type {number} + * @memberof GetActivitiesResponse200RelatedObjectsDealDEALID + */ + 'pipeline_id'?: number; +} + diff --git a/models/get-activities-response200-related-objects-deal.ts b/models/get-activities-response200-related-objects-deal.ts new file mode 100644 index 00000000..53a6e68f --- /dev/null +++ b/models/get-activities-response200-related-objects-deal.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsDealDEALID } from './get-activities-response200-related-objects-deal-dealid'; + +/** + * + * @export + * @interface GetActivitiesResponse200RelatedObjectsDeal + */ +export interface GetActivitiesResponse200RelatedObjectsDeal { + /** + * + * @type {GetActivitiesResponse200RelatedObjectsDealDEALID} + * @memberof GetActivitiesResponse200RelatedObjectsDeal + */ + 'DEAL_ID'?: GetActivitiesResponse200RelatedObjectsDealDEALID; +} + diff --git a/models/get-activities-response200-related-objects-organization-organizationid.ts b/models/get-activities-response200-related-objects-organization-organizationid.ts new file mode 100644 index 00000000..b152bac1 --- /dev/null +++ b/models/get-activities-response200-related-objects-organization-organizationid.ts @@ -0,0 +1,30 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsOrganizationORGANIZATIONIDAllOf } from './get-activities-response200-related-objects-organization-organizationidall-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsOrganizationORGANIZATIONIDAllOf1 } from './get-activities-response200-related-objects-organization-organizationidall-of1'; + +/** + * @type GetActivitiesResponse200RelatedObjectsOrganizationORGANIZATIONID + * The ID of the organization associated with the item + * @export + */ +export type GetActivitiesResponse200RelatedObjectsOrganizationORGANIZATIONID = GetActivitiesResponse200RelatedObjectsOrganizationORGANIZATIONIDAllOf & GetActivitiesResponse200RelatedObjectsOrganizationORGANIZATIONIDAllOf1; + + diff --git a/models/get-activities-response200-related-objects-organization-organizationidall-of.ts b/models/get-activities-response200-related-objects-organization-organizationidall-of.ts new file mode 100644 index 00000000..873e0f60 --- /dev/null +++ b/models/get-activities-response200-related-objects-organization-organizationidall-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface GetActivitiesResponse200RelatedObjectsOrganizationORGANIZATIONIDAllOf + */ +export interface GetActivitiesResponse200RelatedObjectsOrganizationORGANIZATIONIDAllOf { + /** + * The ID of the organization associated with the item + * @type {number} + * @memberof GetActivitiesResponse200RelatedObjectsOrganizationORGANIZATIONIDAllOf + */ + 'id'?: number; +} + diff --git a/models/get-activities-response200-related-objects-organization-organizationidall-of1.ts b/models/get-activities-response200-related-objects-organization-organizationidall-of1.ts new file mode 100644 index 00000000..7730eb0c --- /dev/null +++ b/models/get-activities-response200-related-objects-organization-organizationidall-of1.ts @@ -0,0 +1,54 @@ +/* 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 + * @interface GetActivitiesResponse200RelatedObjectsOrganizationORGANIZATIONIDAllOf1 + */ +export interface GetActivitiesResponse200RelatedObjectsOrganizationORGANIZATIONIDAllOf1 { + /** + * The name of the organization associated with the item + * @type {string} + * @memberof GetActivitiesResponse200RelatedObjectsOrganizationORGANIZATIONIDAllOf1 + */ + 'name'?: string; + /** + * The number of people connected with the organization that is associated with the item + * @type {number} + * @memberof GetActivitiesResponse200RelatedObjectsOrganizationORGANIZATIONIDAllOf1 + */ + 'people_count'?: number; + /** + * The ID of the owner of the organization that is associated with the item + * @type {number} + * @memberof GetActivitiesResponse200RelatedObjectsOrganizationORGANIZATIONIDAllOf1 + */ + 'owner_id'?: number; + /** + * The address of the organization + * @type {string} + * @memberof GetActivitiesResponse200RelatedObjectsOrganizationORGANIZATIONIDAllOf1 + */ + 'address'?: string; + /** + * The BCC email of the organization associated with the item + * @type {string} + * @memberof GetActivitiesResponse200RelatedObjectsOrganizationORGANIZATIONIDAllOf1 + */ + 'cc_email'?: string; +} + diff --git a/models/get-activities-response200-related-objects-organization.ts b/models/get-activities-response200-related-objects-organization.ts new file mode 100644 index 00000000..90e22f9e --- /dev/null +++ b/models/get-activities-response200-related-objects-organization.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsOrganizationORGANIZATIONID } from './get-activities-response200-related-objects-organization-organizationid'; + +/** + * + * @export + * @interface GetActivitiesResponse200RelatedObjectsOrganization + */ +export interface GetActivitiesResponse200RelatedObjectsOrganization { + /** + * + * @type {GetActivitiesResponse200RelatedObjectsOrganizationORGANIZATIONID} + * @memberof GetActivitiesResponse200RelatedObjectsOrganization + */ + 'ORGANIZATION_ID'?: GetActivitiesResponse200RelatedObjectsOrganizationORGANIZATIONID; +} + diff --git a/models/get-activities-response200-related-objects-person-personid.ts b/models/get-activities-response200-related-objects-person-personid.ts new file mode 100644 index 00000000..a120bcc3 --- /dev/null +++ b/models/get-activities-response200-related-objects-person-personid.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOf } from './get-activities-response200-related-objects-person-personidall-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOfEmailInner } from './get-activities-response200-related-objects-person-personidall-of-email-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOfPhoneInner } from './get-activities-response200-related-objects-person-personidall-of-phone-inner'; + +/** + * @type GetActivitiesResponse200RelatedObjectsPersonPERSONID + * The ID of the person associated with the item + * @export + */ +export type GetActivitiesResponse200RelatedObjectsPersonPERSONID = GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOf; + + diff --git a/models/get-activities-response200-related-objects-person-personidall-of-email-inner.ts b/models/get-activities-response200-related-objects-person-personidall-of-email-inner.ts new file mode 100644 index 00000000..8d7129ca --- /dev/null +++ b/models/get-activities-response200-related-objects-person-personidall-of-email-inner.ts @@ -0,0 +1,42 @@ +/* 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 + * @interface GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOfEmailInner + */ +export interface GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOfEmailInner { + /** + * The type of the email + * @type {string} + * @memberof GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOfEmailInner + */ + 'label'?: string; + /** + * The email of the associated person + * @type {string} + * @memberof GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOfEmailInner + */ + 'value'?: string; + /** + * Whether this is the primary email or not + * @type {boolean} + * @memberof GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOfEmailInner + */ + 'primary'?: boolean; +} + diff --git a/models/get-activities-response200-related-objects-person-personidall-of-phone-inner.ts b/models/get-activities-response200-related-objects-person-personidall-of-phone-inner.ts new file mode 100644 index 00000000..1e6559f1 --- /dev/null +++ b/models/get-activities-response200-related-objects-person-personidall-of-phone-inner.ts @@ -0,0 +1,42 @@ +/* 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 + * @interface GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOfPhoneInner + */ +export interface GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOfPhoneInner { + /** + * The type of the phone number + * @type {string} + * @memberof GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOfPhoneInner + */ + 'label'?: string; + /** + * The phone number of the person associated with the item + * @type {string} + * @memberof GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOfPhoneInner + */ + 'value'?: string; + /** + * Whether this is the primary phone number or not + * @type {boolean} + * @memberof GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOfPhoneInner + */ + 'primary'?: boolean; +} + diff --git a/models/get-activities-response200-related-objects-person-personidall-of.ts b/models/get-activities-response200-related-objects-person-personidall-of.ts new file mode 100644 index 00000000..82efdbfd --- /dev/null +++ b/models/get-activities-response200-related-objects-person-personidall-of.ts @@ -0,0 +1,60 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOfEmailInner } from './get-activities-response200-related-objects-person-personidall-of-email-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOfPhoneInner } from './get-activities-response200-related-objects-person-personidall-of-phone-inner'; + +/** + * + * @export + * @interface GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOf + */ +export interface GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOf { + /** + * The ID of the person associated with the item + * @type {number} + * @memberof GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOf + */ + 'id'?: number; + /** + * The name of the person associated with the item + * @type {string} + * @memberof GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOf + */ + 'name'?: string; + /** + * The emails of the person associated with the item + * @type {Array} + * @memberof GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOf + */ + 'email'?: Array; + /** + * The phone numbers of the person associated with the item + * @type {Array} + * @memberof GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOf + */ + 'phone'?: Array; + /** + * The ID of the owner of the person that is associated with the item + * @type {number} + * @memberof GetActivitiesResponse200RelatedObjectsPersonPERSONIDAllOf + */ + 'owner_id'?: number; +} + diff --git a/models/get-activities-response200-related-objects-person.ts b/models/get-activities-response200-related-objects-person.ts new file mode 100644 index 00000000..4942a2a1 --- /dev/null +++ b/models/get-activities-response200-related-objects-person.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsPersonPERSONID } from './get-activities-response200-related-objects-person-personid'; + +/** + * + * @export + * @interface GetActivitiesResponse200RelatedObjectsPerson + */ +export interface GetActivitiesResponse200RelatedObjectsPerson { + /** + * + * @type {GetActivitiesResponse200RelatedObjectsPersonPERSONID} + * @memberof GetActivitiesResponse200RelatedObjectsPerson + */ + 'PERSON_ID'?: GetActivitiesResponse200RelatedObjectsPersonPERSONID; +} + diff --git a/models/get-activities-response200-related-objects-user.ts b/models/get-activities-response200-related-objects-user.ts new file mode 100644 index 00000000..2c272d1a --- /dev/null +++ b/models/get-activities-response200-related-objects-user.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { UserDataWithId } from './user-data-with-id'; + +/** + * + * @export + * @interface GetActivitiesResponse200RelatedObjectsUser + */ +export interface GetActivitiesResponse200RelatedObjectsUser { + /** + * + * @type {UserDataWithId} + * @memberof GetActivitiesResponse200RelatedObjectsUser + */ + 'USER_ID'?: UserDataWithId; +} + diff --git a/models/get-activities-response200-related-objects.ts b/models/get-activities-response200-related-objects.ts new file mode 100644 index 00000000..1bcaeb2b --- /dev/null +++ b/models/get-activities-response200-related-objects.ts @@ -0,0 +1,60 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsDeal } from './get-activities-response200-related-objects-deal'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsOrganization } from './get-activities-response200-related-objects-organization'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsPerson } from './get-activities-response200-related-objects-person'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsUser } from './get-activities-response200-related-objects-user'; + +/** + * + * @export + * @interface GetActivitiesResponse200RelatedObjects + */ +export interface GetActivitiesResponse200RelatedObjects { + /** + * + * @type {GetActivitiesResponse200RelatedObjectsUser} + * @memberof GetActivitiesResponse200RelatedObjects + */ + 'user'?: GetActivitiesResponse200RelatedObjectsUser; + /** + * + * @type {GetActivitiesResponse200RelatedObjectsDeal} + * @memberof GetActivitiesResponse200RelatedObjects + */ + 'deal'?: GetActivitiesResponse200RelatedObjectsDeal; + /** + * + * @type {GetActivitiesResponse200RelatedObjectsPerson} + * @memberof GetActivitiesResponse200RelatedObjects + */ + 'person'?: GetActivitiesResponse200RelatedObjectsPerson; + /** + * + * @type {GetActivitiesResponse200RelatedObjectsOrganization} + * @memberof GetActivitiesResponse200RelatedObjects + */ + 'organization'?: GetActivitiesResponse200RelatedObjectsOrganization; +} + diff --git a/models/get-activities-response200.ts b/models/get-activities-response200.ts new file mode 100644 index 00000000..8f9a89e9 --- /dev/null +++ b/models/get-activities-response200.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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ActivityResponseObject } from './activity-response-object'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalData } from './get-activities-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjects } from './get-activities-response200-related-objects'; + +/** + * + * @export + * @interface GetActivitiesResponse200 + */ +export interface GetActivitiesResponse200 { + /** + * + * @type {boolean} + * @memberof GetActivitiesResponse200 + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetActivitiesResponse200 + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesResponse200AdditionalData} + * @memberof GetActivitiesResponse200 + */ + 'additional_data'?: GetActivitiesResponse200AdditionalData; + /** + * + * @type {GetActivitiesResponse200RelatedObjects} + * @memberof GetActivitiesResponse200 + */ + 'related_objects'?: GetActivitiesResponse200RelatedObjects; +} + diff --git a/models/get-activity-response200.ts b/models/get-activity-response200.ts new file mode 100644 index 00000000..b011b970 --- /dev/null +++ b/models/get-activity-response200.ts @@ -0,0 +1,48 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ActivityResponseObject } from './activity-response-object'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjects } from './get-activities-response200-related-objects'; + +/** + * + * @export + * @interface GetActivityResponse200 + */ +export interface GetActivityResponse200 { + /** + * + * @type {boolean} + * @memberof GetActivityResponse200 + */ + 'success'?: boolean; + /** + * + * @type {ActivityResponseObject} + * @memberof GetActivityResponse200 + */ + 'data'?: ActivityResponseObject; + /** + * + * @type {GetActivitiesResponse200RelatedObjects} + * @memberof GetActivityResponse200 + */ + 'related_objects'?: GetActivitiesResponse200RelatedObjects; +} + diff --git a/models/get-activity-types-response200-all-of-data-inner.ts b/models/get-activity-types-response200-all-of-data-inner.ts new file mode 100644 index 00000000..062d1125 --- /dev/null +++ b/models/get-activity-types-response200-all-of-data-inner.ts @@ -0,0 +1,130 @@ +/* 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 + * @interface GetActivityTypesResponse200AllOfDataInner + */ +export interface GetActivityTypesResponse200AllOfDataInner { + /** + * The ID of the activity type + * @type {number} + * @memberof GetActivityTypesResponse200AllOfDataInner + */ + 'id'?: number; + /** + * The name of the activity type + * @type {string} + * @memberof GetActivityTypesResponse200AllOfDataInner + */ + 'name'?: string; + /** + * Icon graphic to use for representing this activity type + * @type {string} + * @memberof GetActivityTypesResponse200AllOfDataInner + */ + 'icon_key'?: GetActivityTypesResponse200AllOfDataInnerIconKeyConst; + /** + * A designated color for the activity type in 6-character HEX format (e.g. `FFFFFF` for white, `000000` for black) + * @type {string} + * @memberof GetActivityTypesResponse200AllOfDataInner + */ + 'color'?: string; + /** + * An order number for the activity type. Order numbers should be used to order the types in the activity type selections. + * @type {number} + * @memberof GetActivityTypesResponse200AllOfDataInner + */ + 'order_nr'?: number; + /** + * A string that is generated by the API based on the given name of the activity type upon creation + * @type {string} + * @memberof GetActivityTypesResponse200AllOfDataInner + */ + 'key_string'?: string; + /** + * The active flag of the activity type + * @type {boolean} + * @memberof GetActivityTypesResponse200AllOfDataInner + */ + 'active_flag'?: boolean; + /** + * Whether the activity type is a custom one or not + * @type {boolean} + * @memberof GetActivityTypesResponse200AllOfDataInner + */ + 'is_custom_flag'?: boolean; + /** + * The creation time of the activity type + * @type {string} + * @memberof GetActivityTypesResponse200AllOfDataInner + */ + 'add_time'?: string; + /** + * The update time of the activity type + * @type {string} + * @memberof GetActivityTypesResponse200AllOfDataInner + */ + 'update_time'?: string; +} + +export const GetActivityTypesResponse200AllOfDataInnerIconKeyConst = { + task: 'task', + email: 'email', + meeting: 'meeting', + deadline: 'deadline', + call: 'call', + lunch: 'lunch', + calendar: 'calendar', + downarrow: 'downarrow', + document: 'document', + smartphone: 'smartphone', + camera: 'camera', + scissors: 'scissors', + cogs: 'cogs', + bubble: 'bubble', + uparrow: 'uparrow', + checkbox: 'checkbox', + signpost: 'signpost', + shuffle: 'shuffle', + addressbook: 'addressbook', + linegraph: 'linegraph', + picture: 'picture', + car: 'car', + world: 'world', + search: 'search', + clip: 'clip', + sound: 'sound', + brush: 'brush', + key: 'key', + padlock: 'padlock', + pricetag: 'pricetag', + suitcase: 'suitcase', + finish: 'finish', + plane: 'plane', + loop: 'loop', + wifi: 'wifi', + truck: 'truck', + cart: 'cart', + bulb: 'bulb', + bell: 'bell', + presentation: 'presentation' +} as const; + +export type GetActivityTypesResponse200AllOfDataInnerIconKeyConst = typeof GetActivityTypesResponse200AllOfDataInnerIconKeyConst[keyof typeof GetActivityTypesResponse200AllOfDataInnerIconKeyConst]; + + diff --git a/models/get-activity-types-response200-all-of.ts b/models/get-activity-types-response200-all-of.ts new file mode 100644 index 00000000..e94e5fa5 --- /dev/null +++ b/models/get-activity-types-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivityTypesResponse200AllOfDataInner } from './get-activity-types-response200-all-of-data-inner'; + +/** + * + * @export + * @interface GetActivityTypesResponse200AllOf + */ +export interface GetActivityTypesResponse200AllOf { + /** + * The array of activity types + * @type {Array} + * @memberof GetActivityTypesResponse200AllOf + */ + 'data'?: Array; +} + diff --git a/models/get-activity-types-response200.ts b/models/get-activity-types-response200.ts new file mode 100644 index 00000000..1f537d8a --- /dev/null +++ b/models/get-activity-types-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivityTypesResponse200AllOf } from './get-activity-types-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivityTypesResponse200AllOfDataInner } from './get-activity-types-response200-all-of-data-inner'; + +/** + * @type GetActivityTypesResponse200 + * @export + */ +export type GetActivityTypesResponse200 = BaseResponse & GetActivityTypesResponse200AllOf; + + diff --git a/models/get-add-product-attachement-response200-data-all-of-all-of-all-of.ts b/models/get-add-product-attachement-response200-data-all-of-all-of-all-of.ts new file mode 100644 index 00000000..c9b314ba --- /dev/null +++ b/models/get-add-product-attachement-response200-data-all-of-all-of-all-of.ts @@ -0,0 +1,96 @@ +/* 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 + * @interface GetAddProductAttachementResponse200DataAllOfAllOfAllOf + */ +export interface GetAddProductAttachementResponse200DataAllOfAllOfAllOf { + /** + * The ID of the deal-product (the ID of the product attached to the deal) + * @type {number} + * @memberof GetAddProductAttachementResponse200DataAllOfAllOfAllOf + */ + 'id'?: number; + /** + * The ID of the company + * @type {number} + * @memberof GetAddProductAttachementResponse200DataAllOfAllOfAllOf + */ + 'company_id'?: number; + /** + * The ID of the deal + * @type {number} + * @memberof GetAddProductAttachementResponse200DataAllOfAllOfAllOf + */ + 'deal_id'?: number; + /** + * The ID of the product + * @type {number} + * @memberof GetAddProductAttachementResponse200DataAllOfAllOfAllOf + */ + 'product_id'?: number; + /** + * The type of the duration. (For example hourly, daily, etc.) + * @type {string} + * @memberof GetAddProductAttachementResponse200DataAllOfAllOfAllOf + */ + 'duration_unit'?: string; + /** + * The sum of all the products attached to the deal + * @type {number} + * @memberof GetAddProductAttachementResponse200DataAllOfAllOfAllOf + */ + 'sum'?: number; + /** + * The currency associated with the deal product + * @type {string} + * @memberof GetAddProductAttachementResponse200DataAllOfAllOfAllOf + */ + 'currency'?: string; + /** + * The date and time when the product was added to the deal + * @type {string} + * @memberof GetAddProductAttachementResponse200DataAllOfAllOfAllOf + */ + 'add_time'?: string; + /** + * The date and time when the deal product was last edited + * @type {string} + * @memberof GetAddProductAttachementResponse200DataAllOfAllOfAllOf + */ + 'last_edit'?: string; + /** + * Whether the product is active or not + * @type {boolean} + * @memberof GetAddProductAttachementResponse200DataAllOfAllOfAllOf + */ + 'active_flag'?: boolean; + /** + * The product tax + * @type {number} + * @memberof GetAddProductAttachementResponse200DataAllOfAllOfAllOf + */ + 'tax'?: number; + /** + * The product name + * @type {string} + * @memberof GetAddProductAttachementResponse200DataAllOfAllOfAllOf + */ + 'name'?: string; +} + diff --git a/models/get-add-product-attachement-response200-data-all-of-all-of.ts b/models/get-add-product-attachement-response200-data-all-of-all-of.ts new file mode 100644 index 00000000..cfa366a2 --- /dev/null +++ b/models/get-add-product-attachement-response200-data-all-of-all-of.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BasicDealProductRequest } from './basic-deal-product-request'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAddProductAttachementResponse200DataAllOfAllOfAllOf } from './get-add-product-attachement-response200-data-all-of-all-of-all-of'; + +/** + * @type GetAddProductAttachementResponse200DataAllOfAllOf + * @export + */ +export type GetAddProductAttachementResponse200DataAllOfAllOf = BasicDealProductRequest & GetAddProductAttachementResponse200DataAllOfAllOfAllOf; + + diff --git a/models/get-add-product-attachement-response200-data-all-of-all-of1.ts b/models/get-add-product-attachement-response200-data-all-of-all-of1.ts new file mode 100644 index 00000000..2d1be35d --- /dev/null +++ b/models/get-add-product-attachement-response200-data-all-of-all-of1.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface GetAddProductAttachementResponse200DataAllOfAllOf1 + */ +export interface GetAddProductAttachementResponse200DataAllOfAllOf1 { + /** + * The ID of the deal-product (the ID of the product attached to the deal) + * @type {number} + * @memberof GetAddProductAttachementResponse200DataAllOfAllOf1 + */ + 'product_attachment_id'?: number; +} + diff --git a/models/get-add-product-attachement-response200-data-all-of.ts b/models/get-add-product-attachement-response200-data-all-of.ts new file mode 100644 index 00000000..14c6c53c --- /dev/null +++ b/models/get-add-product-attachement-response200-data-all-of.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetAddProductAttachementResponse200DataAllOfAllOf } from './get-add-product-attachement-response200-data-all-of-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAddProductAttachementResponse200DataAllOfAllOf1 } from './get-add-product-attachement-response200-data-all-of-all-of1'; + +/** + * @type GetAddProductAttachementResponse200DataAllOf + * @export + */ +export type GetAddProductAttachementResponse200DataAllOf = GetAddProductAttachementResponse200DataAllOfAllOf & GetAddProductAttachementResponse200DataAllOfAllOf1; + + diff --git a/models/get-add-product-attachement-response200-data.ts b/models/get-add-product-attachement-response200-data.ts new file mode 100644 index 00000000..469776c8 --- /dev/null +++ b/models/get-add-product-attachement-response200-data.ts @@ -0,0 +1,27 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetAddProductAttachementResponse200DataAllOf } from './get-add-product-attachement-response200-data-all-of'; + +/** + * @type GetAddProductAttachementResponse200Data + * The added product object attached to the deal + * @export + */ +export type GetAddProductAttachementResponse200Data = GetAddProductAttachementResponse200DataAllOf; + + diff --git a/models/get-add-product-attachement-response200.ts b/models/get-add-product-attachement-response200.ts new file mode 100644 index 00000000..223c5f36 --- /dev/null +++ b/models/get-add-product-attachement-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetAddProductAttachementResponse200Data } from './get-add-product-attachement-response200-data'; + +/** + * + * @export + * @interface GetAddProductAttachementResponse200 + */ +export interface GetAddProductAttachementResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetAddProductAttachementResponse200 + */ + 'success'?: boolean; + /** + * + * @type {GetAddProductAttachementResponse200Data} + * @memberof GetAddProductAttachementResponse200 + */ + 'data'?: GetAddProductAttachementResponse200Data; +} + diff --git a/models/get-all-mail-messages-of-mail-thread-response200-all-of-data-inner-all-of.ts b/models/get-all-mail-messages-of-mail-thread-response200-all-of-data-inner-all-of.ts new file mode 100644 index 00000000..5a791313 --- /dev/null +++ b/models/get-all-mail-messages-of-mail-thread-response200-all-of-data-inner-all-of.ts @@ -0,0 +1,125 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseMailThreadAllOf1PartiesToInner } from './base-mail-thread-all-of1-parties-to-inner'; + +/** + * + * @export + * @interface GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOf + */ +export interface GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOf { + /** + * Senders of the mail thread + * @type {Array} + * @memberof GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOf + */ + 'from'?: Array; + /** + * Recipients of the mail thread + * @type {Array} + * @memberof GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOf + */ + 'to'?: Array; + /** + * Participants of the Cc + * @type {Array} + * @memberof GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOf + */ + 'cc'?: Array; + /** + * Participants of the Bcc + * @type {Array} + * @memberof GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOf + */ + 'bcc'?: Array; + /** + * A link to the mail thread message + * @type {string} + * @memberof GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOf + */ + 'body_url'?: string; + /** + * ID of the mail thread + * @type {number} + * @memberof GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOf + */ + 'mail_thread_id'?: number; + /** + * If the mail message has a draft status then the value is the mail message object as JSON formatted string, otherwise `null`. + * @type {string} + * @memberof GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOf + */ + 'draft'?: string | null; + /** + * + * @type {number} + * @memberof GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOf + */ + 'has_body_flag'?: GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOfHasBodyFlagConst; + /** + * + * @type {number} + * @memberof GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOf + */ + 'sent_flag'?: GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOfSentFlagConst; + /** + * + * @type {number} + * @memberof GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOf + */ + 'sent_from_pipedrive_flag'?: GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOfSentFromPipedriveFlagConst; + /** + * The time when the mail message was received or created + * @type {string} + * @memberof GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOf + */ + 'message_time'?: string; + /** + * The time when the mail message was inserted to database + * @type {string} + * @memberof GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOf + */ + 'add_time'?: string; + /** + * The time when the mail message was updated in database received + * @type {string} + * @memberof GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOf + */ + 'update_time'?: string; +} + +export const GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOfHasBodyFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOfHasBodyFlagConst = typeof GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOfHasBodyFlagConst[keyof typeof GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOfHasBodyFlagConst]; +export const GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOfSentFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOfSentFlagConst = typeof GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOfSentFlagConst[keyof typeof GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOfSentFlagConst]; +export const GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOfSentFromPipedriveFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOfSentFromPipedriveFlagConst = typeof GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOfSentFromPipedriveFlagConst[keyof typeof GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOfSentFromPipedriveFlagConst]; + + diff --git a/models/get-all-mail-messages-of-mail-thread-response200-all-of-data-inner.ts b/models/get-all-mail-messages-of-mail-thread-response200-all-of-data-inner.ts new file mode 100644 index 00000000..bc20049d --- /dev/null +++ b/models/get-all-mail-messages-of-mail-thread-response200-all-of-data-inner.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseMailThreadAllOf } from './base-mail-thread-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseMailThreadAllOf1PartiesToInner } from './base-mail-thread-all-of1-parties-to-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOf } from './get-all-mail-messages-of-mail-thread-response200-all-of-data-inner-all-of'; + +/** + * @type GetAllMailMessagesOfMailThreadResponse200AllOfDataInner + * @export + */ +export type GetAllMailMessagesOfMailThreadResponse200AllOfDataInner = BaseMailThreadAllOf & GetAllMailMessagesOfMailThreadResponse200AllOfDataInnerAllOf; + + diff --git a/models/get-all-mail-messages-of-mail-thread-response200-all-of.ts b/models/get-all-mail-messages-of-mail-thread-response200-all-of.ts new file mode 100644 index 00000000..8a5c049a --- /dev/null +++ b/models/get-all-mail-messages-of-mail-thread-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetAllMailMessagesOfMailThreadResponse200AllOfDataInner } from './get-all-mail-messages-of-mail-thread-response200-all-of-data-inner'; + +/** + * + * @export + * @interface GetAllMailMessagesOfMailThreadResponse200AllOf + */ +export interface GetAllMailMessagesOfMailThreadResponse200AllOf { + /** + * The array of the mail messages of the mail thread + * @type {Array} + * @memberof GetAllMailMessagesOfMailThreadResponse200AllOf + */ + 'data'?: Array; +} + diff --git a/models/get-all-mail-messages-of-mail-thread-response200.ts b/models/get-all-mail-messages-of-mail-thread-response200.ts new file mode 100644 index 00000000..92fb8c6b --- /dev/null +++ b/models/get-all-mail-messages-of-mail-thread-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAllMailMessagesOfMailThreadResponse200AllOf } from './get-all-mail-messages-of-mail-thread-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAllMailMessagesOfMailThreadResponse200AllOfDataInner } from './get-all-mail-messages-of-mail-thread-response200-all-of-data-inner'; + +/** + * @type GetAllMailMessagesOfMailThreadResponse200 + * @export + */ +export type GetAllMailMessagesOfMailThreadResponse200 = BaseResponse & GetAllMailMessagesOfMailThreadResponse200AllOf; + + diff --git a/models/get-associated-activities-response200-all-of.ts b/models/get-associated-activities-response200-all-of.ts new file mode 100644 index 00000000..eca3ea4a --- /dev/null +++ b/models/get-associated-activities-response200-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ActivityDistributionDataWithAdditionalData } from './activity-distribution-data-with-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { ActivityResponseObject } from './activity-response-object'; + +/** + * + * @export + * @interface GetAssociatedActivitiesResponse200AllOf + */ +export interface GetAssociatedActivitiesResponse200AllOf { + /** + * The array of activities + * @type {Array} + * @memberof GetAssociatedActivitiesResponse200AllOf + */ + 'data'?: Array; + /** + * + * @type {ActivityDistributionDataWithAdditionalData} + * @memberof GetAssociatedActivitiesResponse200AllOf + */ + 'additional_data'?: ActivityDistributionDataWithAdditionalData; +} + diff --git a/models/get-associated-activities-response200.ts b/models/get-associated-activities-response200.ts new file mode 100644 index 00000000..59faebc1 --- /dev/null +++ b/models/get-associated-activities-response200.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ActivityDistributionDataWithAdditionalData } from './activity-distribution-data-with-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { ActivityResponseObject } from './activity-response-object'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedActivitiesResponse200AllOf } from './get-associated-activities-response200-all-of'; + +/** + * @type GetAssociatedActivitiesResponse200 + * @export + */ +export type GetAssociatedActivitiesResponse200 = BaseResponse & GetAssociatedActivitiesResponse200AllOf; + + diff --git a/models/get-associated-deals-response200-all-of-related-objects-pipeline.ts b/models/get-associated-deals-response200-all-of-related-objects-pipeline.ts new file mode 100644 index 00000000..22e23bdd --- /dev/null +++ b/models/get-associated-deals-response200-all-of-related-objects-pipeline.ts @@ -0,0 +1,72 @@ +/* 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 + * @interface GetAssociatedDealsResponse200AllOfRelatedObjectsPipeline + */ +export interface GetAssociatedDealsResponse200AllOfRelatedObjectsPipeline { + /** + * The ID of the pipeline + * @type {number} + * @memberof GetAssociatedDealsResponse200AllOfRelatedObjectsPipeline + */ + 'id'?: number; + /** + * The name of the pipeline + * @type {string} + * @memberof GetAssociatedDealsResponse200AllOfRelatedObjectsPipeline + */ + 'name'?: string; + /** + * The pipeline title displayed in the URL + * @type {string} + * @memberof GetAssociatedDealsResponse200AllOfRelatedObjectsPipeline + */ + 'url_title'?: string; + /** + * Defines the order of pipelines. First order (`order_nr=0`) is the default pipeline. + * @type {number} + * @memberof GetAssociatedDealsResponse200AllOfRelatedObjectsPipeline + */ + 'order_nr'?: number; + /** + * Whether this pipeline will be made inactive (hidden) or active + * @type {boolean} + * @memberof GetAssociatedDealsResponse200AllOfRelatedObjectsPipeline + */ + 'active'?: boolean; + /** + * Whether deal probability is disabled or enabled for this pipeline + * @type {boolean} + * @memberof GetAssociatedDealsResponse200AllOfRelatedObjectsPipeline + */ + 'deal_probability'?: boolean; + /** + * The pipeline creation time. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof GetAssociatedDealsResponse200AllOfRelatedObjectsPipeline + */ + 'add_time'?: string; + /** + * The pipeline update time. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof GetAssociatedDealsResponse200AllOfRelatedObjectsPipeline + */ + 'update_time'?: string; +} + diff --git a/models/get-associated-deals-response200-all-of-related-objects-stage.ts b/models/get-associated-deals-response200-all-of-related-objects-stage.ts new file mode 100644 index 00000000..48cd3e38 --- /dev/null +++ b/models/get-associated-deals-response200-all-of-related-objects-stage.ts @@ -0,0 +1,84 @@ +/* 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 + * @interface GetAssociatedDealsResponse200AllOfRelatedObjectsStage + */ +export interface GetAssociatedDealsResponse200AllOfRelatedObjectsStage { + /** + * The ID of the stage + * @type {number} + * @memberof GetAssociatedDealsResponse200AllOfRelatedObjectsStage + */ + 'id'?: number; + /** + * Defines the order of the stage + * @type {number} + * @memberof GetAssociatedDealsResponse200AllOfRelatedObjectsStage + */ + 'order_nr'?: number; + /** + * The name of the stage + * @type {string} + * @memberof GetAssociatedDealsResponse200AllOfRelatedObjectsStage + */ + 'name'?: string; + /** + * Whether the stage is active or deleted + * @type {boolean} + * @memberof GetAssociatedDealsResponse200AllOfRelatedObjectsStage + */ + 'active_flag'?: boolean; + /** + * The success probability percentage of the deal. Used/shown when the deal weighted values are used. + * @type {number} + * @memberof GetAssociatedDealsResponse200AllOfRelatedObjectsStage + */ + 'deal_probability'?: number; + /** + * The ID of the pipeline to add the stage to + * @type {number} + * @memberof GetAssociatedDealsResponse200AllOfRelatedObjectsStage + */ + 'pipeline_id'?: number; + /** + * Whether deals in this stage can become rotten + * @type {boolean} + * @memberof GetAssociatedDealsResponse200AllOfRelatedObjectsStage + */ + 'rotten_flag'?: boolean; + /** + * The number of days the deals not updated in this stage would become rotten. Applies only if the `rotten_flag` is set. + * @type {number} + * @memberof GetAssociatedDealsResponse200AllOfRelatedObjectsStage + */ + 'rotten_days'?: number; + /** + * The stage creation time. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof GetAssociatedDealsResponse200AllOfRelatedObjectsStage + */ + 'add_time'?: string; + /** + * The stage update time. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof GetAssociatedDealsResponse200AllOfRelatedObjectsStage + */ + 'update_time'?: string; +} + diff --git a/models/get-associated-deals-response200-all-of-related-objects.ts b/models/get-associated-deals-response200-all-of-related-objects.ts new file mode 100644 index 00000000..7350d822 --- /dev/null +++ b/models/get-associated-deals-response200-all-of-related-objects.ts @@ -0,0 +1,69 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityResponse200RelatedObjectsOrganization } from './add-activity-response200-related-objects-organization'; +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityResponse200RelatedObjectsPerson } from './add-activity-response200-related-objects-person'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsUser } from './get-activities-response200-related-objects-user'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedDealsResponse200AllOfRelatedObjectsPipeline } from './get-associated-deals-response200-all-of-related-objects-pipeline'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedDealsResponse200AllOfRelatedObjectsStage } from './get-associated-deals-response200-all-of-related-objects-stage'; + +/** + * + * @export + * @interface GetAssociatedDealsResponse200AllOfRelatedObjects + */ +export interface GetAssociatedDealsResponse200AllOfRelatedObjects { + /** + * + * @type {AddActivityResponse200RelatedObjectsOrganization} + * @memberof GetAssociatedDealsResponse200AllOfRelatedObjects + */ + 'organization'?: AddActivityResponse200RelatedObjectsOrganization; + /** + * + * @type {AddActivityResponse200RelatedObjectsPerson} + * @memberof GetAssociatedDealsResponse200AllOfRelatedObjects + */ + 'person'?: AddActivityResponse200RelatedObjectsPerson; + /** + * + * @type {GetActivitiesResponse200RelatedObjectsUser} + * @memberof GetAssociatedDealsResponse200AllOfRelatedObjects + */ + 'user'?: GetActivitiesResponse200RelatedObjectsUser; + /** + * + * @type {GetAssociatedDealsResponse200AllOfRelatedObjectsStage} + * @memberof GetAssociatedDealsResponse200AllOfRelatedObjects + */ + 'stage'?: GetAssociatedDealsResponse200AllOfRelatedObjectsStage; + /** + * + * @type {GetAssociatedDealsResponse200AllOfRelatedObjectsPipeline} + * @memberof GetAssociatedDealsResponse200AllOfRelatedObjects + */ + 'pipeline'?: GetAssociatedDealsResponse200AllOfRelatedObjectsPipeline; +} + diff --git a/models/get-associated-deals-response200-all-of.ts b/models/get-associated-deals-response200-all-of.ts new file mode 100644 index 00000000..f74fd367 --- /dev/null +++ b/models/get-associated-deals-response200-all-of.ts @@ -0,0 +1,51 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DealNonStrict } from './deal-non-strict'; +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedDealsResponse200AllOfRelatedObjects } from './get-associated-deals-response200-all-of-related-objects'; + +/** + * + * @export + * @interface GetAssociatedDealsResponse200AllOf + */ +export interface GetAssociatedDealsResponse200AllOf { + /** + * The array of deals + * @type {Array} + * @memberof GetAssociatedDealsResponse200AllOf + */ + 'data'?: Array; + /** + * + * @type {FieldsResponse200AllOfAdditionalData} + * @memberof GetAssociatedDealsResponse200AllOf + */ + 'additional_data'?: FieldsResponse200AllOfAdditionalData; + /** + * + * @type {GetAssociatedDealsResponse200AllOfRelatedObjects} + * @memberof GetAssociatedDealsResponse200AllOf + */ + 'related_objects'?: GetAssociatedDealsResponse200AllOfRelatedObjects; +} + diff --git a/models/get-associated-deals-response200.ts b/models/get-associated-deals-response200.ts new file mode 100644 index 00000000..bce0c538 --- /dev/null +++ b/models/get-associated-deals-response200.ts @@ -0,0 +1,38 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { DealNonStrict } from './deal-non-strict'; +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedDealsResponse200AllOf } from './get-associated-deals-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedDealsResponse200AllOfRelatedObjects } from './get-associated-deals-response200-all-of-related-objects'; + +/** + * @type GetAssociatedDealsResponse200 + * @export + */ +export type GetAssociatedDealsResponse200 = BaseResponse & GetAssociatedDealsResponse200AllOf; + + diff --git a/models/get-associated-files-response200-all-of-data-inner.ts b/models/get-associated-files-response200-all-of-data-inner.ts new file mode 100644 index 00000000..e70f9d9b --- /dev/null +++ b/models/get-associated-files-response200-all-of-data-inner.ts @@ -0,0 +1,192 @@ +/* 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. + */ + + + +/** + * The file data + * @export + * @interface GetAssociatedFilesResponse200AllOfDataInner + */ +export interface GetAssociatedFilesResponse200AllOfDataInner { + /** + * The ID of the file + * @type {number} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'id'?: number; + /** + * The ID of the user to associate the file with + * @type {number} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'user_id'?: number; + /** + * The ID of the deal to associate the file with + * @type {number} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'deal_id'?: number; + /** + * The ID of the person to associate the file with + * @type {number} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'person_id'?: number; + /** + * The ID of the organization to associate the file with + * @type {number} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'org_id'?: number; + /** + * The ID of the product to associate the file with + * @type {number} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'product_id'?: number; + /** + * The ID of the activity to associate the file with + * @type {number} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'activity_id'?: number; + /** + * The ID of the lead to associate the file with + * @type {string} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'lead_id'?: string; + /** + * The date and time when the file was added/created. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'add_time'?: string; + /** + * The last updated date and time of the file. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'update_time'?: string; + /** + * The original name of the file + * @type {string} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'file_name'?: string; + /** + * The size of the file + * @type {number} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'file_size'?: number; + /** + * Whether the user is active or not. false = Not activated, true = Activated + * @type {boolean} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'active_flag'?: boolean; + /** + * Whether the file was uploaded as inline or not + * @type {boolean} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'inline_flag'?: boolean; + /** + * The location type to send the file to. Only googledrive is supported at the moment. + * @type {string} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'remote_location'?: string; + /** + * The ID of the remote item + * @type {string} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'remote_id'?: string; + /** + * The ID of the inline attachment + * @type {string} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'cid'?: string; + /** + * The location of the cloud storage + * @type {string} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 's3_bucket'?: string; + /** + * The ID of the mail message to associate the file with + * @type {string} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'mail_message_id'?: string; + /** + * The ID of the mail template to associate the file with + * @type {string} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'mail_template_id'?: string; + /** + * The name of the deal associated with the dile + * @type {string} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'deal_name'?: string; + /** + * The name of the person associated with the file + * @type {string} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'person_name'?: string; + /** + * The name of the organization associated with the file + * @type {string} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'org_name'?: string; + /** + * The name of the product associated with the file + * @type {string} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'product_name'?: string; + /** + * The name of the lead associated with the file + * @type {string} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'lead_name'?: string; + /** + * The URL of the download file + * @type {string} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'url'?: string; + /** + * The visible name of the file + * @type {string} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'name'?: string; + /** + * The description of the file + * @type {string} + * @memberof GetAssociatedFilesResponse200AllOfDataInner + */ + 'description'?: string; +} + diff --git a/models/get-associated-files-response200-all-of.ts b/models/get-associated-files-response200-all-of.ts new file mode 100644 index 00000000..8a2edce7 --- /dev/null +++ b/models/get-associated-files-response200-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedFilesResponse200AllOfDataInner } from './get-associated-files-response200-all-of-data-inner'; + +/** + * + * @export + * @interface GetAssociatedFilesResponse200AllOf + */ +export interface GetAssociatedFilesResponse200AllOf { + /** + * The array of files + * @type {Array} + * @memberof GetAssociatedFilesResponse200AllOf + */ + 'data'?: Array; + /** + * + * @type {FieldsResponse200AllOfAdditionalData} + * @memberof GetAssociatedFilesResponse200AllOf + */ + 'additional_data'?: FieldsResponse200AllOfAdditionalData; +} + diff --git a/models/get-associated-files-response200.ts b/models/get-associated-files-response200.ts new file mode 100644 index 00000000..8b267715 --- /dev/null +++ b/models/get-associated-files-response200.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedFilesResponse200AllOf } from './get-associated-files-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedFilesResponse200AllOfDataInner } from './get-associated-files-response200-all-of-data-inner'; + +/** + * @type GetAssociatedFilesResponse200 + * @export + */ +export type GetAssociatedFilesResponse200 = BaseResponse & GetAssociatedFilesResponse200AllOf; + + diff --git a/models/get-associated-files-response2001-all-of-data-inner.ts b/models/get-associated-files-response2001-all-of-data-inner.ts new file mode 100644 index 00000000..f64dde78 --- /dev/null +++ b/models/get-associated-files-response2001-all-of-data-inner.ts @@ -0,0 +1,114 @@ +/* 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. + */ + + + +/** + * The file data + * @export + * @interface GetAssociatedFilesResponse2001AllOfDataInner + */ +export interface GetAssociatedFilesResponse2001AllOfDataInner { + /** + * The ID of the file + * @type {number} + * @memberof GetAssociatedFilesResponse2001AllOfDataInner + */ + 'id'?: number; + /** + * The ID of the product associated with the file + * @type {number} + * @memberof GetAssociatedFilesResponse2001AllOfDataInner + */ + 'product_id'?: number; + /** + * The UTC date time when the file was uploaded. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof GetAssociatedFilesResponse2001AllOfDataInner + */ + 'add_time'?: string; + /** + * The UTC date time when the file was last updated. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof GetAssociatedFilesResponse2001AllOfDataInner + */ + 'update_time'?: string; + /** + * The original name of the file + * @type {string} + * @memberof GetAssociatedFilesResponse2001AllOfDataInner + */ + 'file_name'?: string; + /** + * The size of the file in bytes + * @type {number} + * @memberof GetAssociatedFilesResponse2001AllOfDataInner + */ + 'file_size'?: number; + /** + * Whether the user is active or not. + * @type {boolean} + * @memberof GetAssociatedFilesResponse2001AllOfDataInner + */ + 'active_flag'?: boolean; + /** + * Whether the file was uploaded as inline or not + * @type {boolean} + * @memberof GetAssociatedFilesResponse2001AllOfDataInner + */ + 'inline_flag'?: boolean; + /** + * The location type to send the file to. Only googledrive is supported at the moment. + * @type {string} + * @memberof GetAssociatedFilesResponse2001AllOfDataInner + */ + 'remote_location'?: string; + /** + * The ID of the remote item + * @type {string} + * @memberof GetAssociatedFilesResponse2001AllOfDataInner + */ + 'remote_id'?: string; + /** + * The location of the cloud storage + * @type {string} + * @memberof GetAssociatedFilesResponse2001AllOfDataInner + */ + 's3_bucket'?: string; + /** + * The name of the product associated with the file + * @type {string} + * @memberof GetAssociatedFilesResponse2001AllOfDataInner + */ + 'product_name'?: string; + /** + * The URL to download the file + * @type {string} + * @memberof GetAssociatedFilesResponse2001AllOfDataInner + */ + 'url'?: string; + /** + * The visible name of the file + * @type {string} + * @memberof GetAssociatedFilesResponse2001AllOfDataInner + */ + 'name'?: string; + /** + * The description of the file + * @type {string} + * @memberof GetAssociatedFilesResponse2001AllOfDataInner + */ + 'description'?: string; +} + diff --git a/models/get-associated-files-response2001-all-of.ts b/models/get-associated-files-response2001-all-of.ts new file mode 100644 index 00000000..872e1f6c --- /dev/null +++ b/models/get-associated-files-response2001-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedFilesResponse2001AllOfDataInner } from './get-associated-files-response2001-all-of-data-inner'; + +/** + * + * @export + * @interface GetAssociatedFilesResponse2001AllOf + */ +export interface GetAssociatedFilesResponse2001AllOf { + /** + * The array of files + * @type {Array} + * @memberof GetAssociatedFilesResponse2001AllOf + */ + 'data'?: Array; + /** + * + * @type {FieldsResponse200AllOfAdditionalData} + * @memberof GetAssociatedFilesResponse2001AllOf + */ + 'additional_data'?: FieldsResponse200AllOfAdditionalData; +} + diff --git a/models/get-associated-files-response2001.ts b/models/get-associated-files-response2001.ts new file mode 100644 index 00000000..5cf7a6f6 --- /dev/null +++ b/models/get-associated-files-response2001.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedFilesResponse2001AllOf } from './get-associated-files-response2001-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedFilesResponse2001AllOfDataInner } from './get-associated-files-response2001-all-of-data-inner'; + +/** + * @type GetAssociatedFilesResponse2001 + * @export + */ +export type GetAssociatedFilesResponse2001 = BaseResponse & GetAssociatedFilesResponse2001AllOf; + + diff --git a/models/get-associated-followers-response200-all-of-data-inner.ts b/models/get-associated-followers-response200-all-of-data-inner.ts new file mode 100644 index 00000000..768d6105 --- /dev/null +++ b/models/get-associated-followers-response200-all-of-data-inner.ts @@ -0,0 +1,48 @@ +/* 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 + * @interface GetAssociatedFollowersResponse200AllOfDataInner + */ +export interface GetAssociatedFollowersResponse200AllOfDataInner { + /** + * The ID of the user + * @type {number} + * @memberof GetAssociatedFollowersResponse200AllOfDataInner + */ + 'user_id'?: number; + /** + * The ID of the user follower + * @type {number} + * @memberof GetAssociatedFollowersResponse200AllOfDataInner + */ + 'id'?: number; + /** + * The ID of the deal which the follower was added to + * @type {number} + * @memberof GetAssociatedFollowersResponse200AllOfDataInner + */ + 'deal_id'?: number; + /** + * The date and time when the follower was added to the person + * @type {string} + * @memberof GetAssociatedFollowersResponse200AllOfDataInner + */ + 'add_time'?: string; +} + diff --git a/models/get-associated-followers-response200-all-of.ts b/models/get-associated-followers-response200-all-of.ts new file mode 100644 index 00000000..47888b37 --- /dev/null +++ b/models/get-associated-followers-response200-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedFollowersResponse200AllOfDataInner } from './get-associated-followers-response200-all-of-data-inner'; + +/** + * + * @export + * @interface GetAssociatedFollowersResponse200AllOf + */ +export interface GetAssociatedFollowersResponse200AllOf { + /** + * The list of followers + * @type {Array} + * @memberof GetAssociatedFollowersResponse200AllOf + */ + 'data'?: Array; + /** + * + * @type {FieldsResponse200AllOfAdditionalData} + * @memberof GetAssociatedFollowersResponse200AllOf + */ + 'additional_data'?: FieldsResponse200AllOfAdditionalData; +} + diff --git a/models/get-associated-followers-response200.ts b/models/get-associated-followers-response200.ts new file mode 100644 index 00000000..c496199d --- /dev/null +++ b/models/get-associated-followers-response200.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedFollowersResponse200AllOf } from './get-associated-followers-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedFollowersResponse200AllOfDataInner } from './get-associated-followers-response200-all-of-data-inner'; + +/** + * @type GetAssociatedFollowersResponse200 + * @export + */ +export type GetAssociatedFollowersResponse200 = BaseResponse & GetAssociatedFollowersResponse200AllOf; + + diff --git a/models/get-associated-followers-response2001-data-inner-all-of.ts b/models/get-associated-followers-response2001-data-inner-all-of.ts new file mode 100644 index 00000000..78a8698e --- /dev/null +++ b/models/get-associated-followers-response2001-data-inner-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface GetAssociatedFollowersResponse2001DataInnerAllOf + */ +export interface GetAssociatedFollowersResponse2001DataInnerAllOf { + /** + * The ID of the organization + * @type {number} + * @memberof GetAssociatedFollowersResponse2001DataInnerAllOf + */ + 'org_id'?: number; +} + diff --git a/models/get-associated-followers-response2001-data-inner-all-of1.ts b/models/get-associated-followers-response2001-data-inner-all-of1.ts new file mode 100644 index 00000000..bc2cf379 --- /dev/null +++ b/models/get-associated-followers-response2001-data-inner-all-of1.ts @@ -0,0 +1,42 @@ +/* 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 + * @interface GetAssociatedFollowersResponse2001DataInnerAllOf1 + */ +export interface GetAssociatedFollowersResponse2001DataInnerAllOf1 { + /** + * The user ID of the follower related to the item + * @type {number} + * @memberof GetAssociatedFollowersResponse2001DataInnerAllOf1 + */ + 'user_id'?: number; + /** + * The ID of the follower + * @type {number} + * @memberof GetAssociatedFollowersResponse2001DataInnerAllOf1 + */ + 'id'?: number; + /** + * The date and time of adding the follower to the item + * @type {string} + * @memberof GetAssociatedFollowersResponse2001DataInnerAllOf1 + */ + 'add_time'?: string; +} + diff --git a/models/get-associated-followers-response2001-data-inner.ts b/models/get-associated-followers-response2001-data-inner.ts new file mode 100644 index 00000000..54943029 --- /dev/null +++ b/models/get-associated-followers-response2001-data-inner.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedFollowersResponse2001DataInnerAllOf } from './get-associated-followers-response2001-data-inner-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedFollowersResponse2001DataInnerAllOf1 } from './get-associated-followers-response2001-data-inner-all-of1'; + +/** + * @type GetAssociatedFollowersResponse2001DataInner + * @export + */ +export type GetAssociatedFollowersResponse2001DataInner = GetAssociatedFollowersResponse2001DataInnerAllOf & GetAssociatedFollowersResponse2001DataInnerAllOf1; + + diff --git a/models/get-associated-followers-response2001.ts b/models/get-associated-followers-response2001.ts new file mode 100644 index 00000000..3dd205bd --- /dev/null +++ b/models/get-associated-followers-response2001.ts @@ -0,0 +1,48 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalData } from './get-activities-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedFollowersResponse2001DataInner } from './get-associated-followers-response2001-data-inner'; + +/** + * + * @export + * @interface GetAssociatedFollowersResponse2001 + */ +export interface GetAssociatedFollowersResponse2001 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetAssociatedFollowersResponse2001 + */ + 'success'?: boolean; + /** + * The array of followers + * @type {Array} + * @memberof GetAssociatedFollowersResponse2001 + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesResponse200AdditionalData} + * @memberof GetAssociatedFollowersResponse2001 + */ + 'additional_data'?: GetActivitiesResponse200AdditionalData; +} + diff --git a/models/get-associated-mail-messages-response200-all-of-data-inner.ts b/models/get-associated-mail-messages-response200-all-of-data-inner.ts new file mode 100644 index 00000000..49a7343d --- /dev/null +++ b/models/get-associated-mail-messages-response200-all-of-data-inner.ts @@ -0,0 +1,45 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { MailMessageItemForList } from './mail-message-item-for-list'; + +/** + * + * @export + * @interface GetAssociatedMailMessagesResponse200AllOfDataInner + */ +export interface GetAssociatedMailMessagesResponse200AllOfDataInner { + /** + * The type of the data item + * @type {string} + * @memberof GetAssociatedMailMessagesResponse200AllOfDataInner + */ + 'object'?: string; + /** + * The date and time when the item was created + * @type {string} + * @memberof GetAssociatedMailMessagesResponse200AllOfDataInner + */ + 'timestamp'?: string; + /** + * + * @type {MailMessageItemForList} + * @memberof GetAssociatedMailMessagesResponse200AllOfDataInner + */ + 'data'?: MailMessageItemForList; +} + diff --git a/models/get-associated-mail-messages-response200-all-of.ts b/models/get-associated-mail-messages-response200-all-of.ts new file mode 100644 index 00000000..ef3a26c8 --- /dev/null +++ b/models/get-associated-mail-messages-response200-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedMailMessagesResponse200AllOfDataInner } from './get-associated-mail-messages-response200-all-of-data-inner'; + +/** + * + * @export + * @interface GetAssociatedMailMessagesResponse200AllOf + */ +export interface GetAssociatedMailMessagesResponse200AllOf { + /** + * The array of mail messages + * @type {Array} + * @memberof GetAssociatedMailMessagesResponse200AllOf + */ + 'data'?: Array; + /** + * + * @type {FieldsResponse200AllOfAdditionalData} + * @memberof GetAssociatedMailMessagesResponse200AllOf + */ + 'additional_data'?: FieldsResponse200AllOfAdditionalData; +} + diff --git a/models/get-associated-mail-messages-response200.ts b/models/get-associated-mail-messages-response200.ts new file mode 100644 index 00000000..933863ea --- /dev/null +++ b/models/get-associated-mail-messages-response200.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedMailMessagesResponse200AllOf } from './get-associated-mail-messages-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedMailMessagesResponse200AllOfDataInner } from './get-associated-mail-messages-response200-all-of-data-inner'; + +/** + * @type GetAssociatedMailMessagesResponse200 + * @export + */ +export type GetAssociatedMailMessagesResponse200 = BaseResponse & GetAssociatedMailMessagesResponse200AllOf; + + diff --git a/models/get-associated-person-updates-response200-all-of-data-inner.ts b/models/get-associated-person-updates-response200-all-of-data-inner.ts new file mode 100644 index 00000000..54785572 --- /dev/null +++ b/models/get-associated-person-updates-response200-all-of-data-inner.ts @@ -0,0 +1,42 @@ +/* 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 + * @interface GetAssociatedPersonUpdatesResponse200AllOfDataInner + */ +export interface GetAssociatedPersonUpdatesResponse200AllOfDataInner { + /** + * The type of the person update. (Possible object types - personChange, note, activity, file) + * @type {string} + * @memberof GetAssociatedPersonUpdatesResponse200AllOfDataInner + */ + 'object'?: string; + /** + * The creation date and time of the update + * @type {string} + * @memberof GetAssociatedPersonUpdatesResponse200AllOfDataInner + */ + 'timestamp'?: string; + /** + * The data related to the update + * @type {object} + * @memberof GetAssociatedPersonUpdatesResponse200AllOfDataInner + */ + 'data'?: object; +} + diff --git a/models/get-associated-person-updates-response200-all-of.ts b/models/get-associated-person-updates-response200-all-of.ts new file mode 100644 index 00000000..f37cea26 --- /dev/null +++ b/models/get-associated-person-updates-response200-all-of.ts @@ -0,0 +1,51 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedPersonUpdatesResponse200AllOfDataInner } from './get-associated-person-updates-response200-all-of-data-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealUpdatesResponse200AllOfRelatedObjects } from './get-deal-updates-response200-all-of-related-objects'; + +/** + * + * @export + * @interface GetAssociatedPersonUpdatesResponse200AllOf + */ +export interface GetAssociatedPersonUpdatesResponse200AllOf { + /** + * + * @type {Array} + * @memberof GetAssociatedPersonUpdatesResponse200AllOf + */ + 'data'?: Array; + /** + * + * @type {FieldsResponse200AllOfAdditionalData} + * @memberof GetAssociatedPersonUpdatesResponse200AllOf + */ + 'additional_data'?: FieldsResponse200AllOfAdditionalData; + /** + * + * @type {GetDealUpdatesResponse200AllOfRelatedObjects} + * @memberof GetAssociatedPersonUpdatesResponse200AllOf + */ + 'related_objects'?: GetDealUpdatesResponse200AllOfRelatedObjects; +} + diff --git a/models/get-associated-person-updates-response200.ts b/models/get-associated-person-updates-response200.ts new file mode 100644 index 00000000..ea8f56ee --- /dev/null +++ b/models/get-associated-person-updates-response200.ts @@ -0,0 +1,38 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedPersonUpdatesResponse200AllOf } from './get-associated-person-updates-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedPersonUpdatesResponse200AllOfDataInner } from './get-associated-person-updates-response200-all-of-data-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealUpdatesResponse200AllOfRelatedObjects } from './get-deal-updates-response200-all-of-related-objects'; + +/** + * @type GetAssociatedPersonUpdatesResponse200 + * @export + */ +export type GetAssociatedPersonUpdatesResponse200 = BaseResponse & GetAssociatedPersonUpdatesResponse200AllOf; + + diff --git a/models/get-associated-updates-response200-all-of-data-inner.ts b/models/get-associated-updates-response200-all-of-data-inner.ts new file mode 100644 index 00000000..c6464a5e --- /dev/null +++ b/models/get-associated-updates-response200-all-of-data-inner.ts @@ -0,0 +1,42 @@ +/* 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 + * @interface GetAssociatedUpdatesResponse200AllOfDataInner + */ +export interface GetAssociatedUpdatesResponse200AllOfDataInner { + /** + * The type of the person update. (Possible object types - organizationChange, dealChange, file, activity) + * @type {string} + * @memberof GetAssociatedUpdatesResponse200AllOfDataInner + */ + 'object'?: string; + /** + * The creation date and time of the update + * @type {string} + * @memberof GetAssociatedUpdatesResponse200AllOfDataInner + */ + 'timestamp'?: string; + /** + * The data related to the update + * @type {object} + * @memberof GetAssociatedUpdatesResponse200AllOfDataInner + */ + 'data'?: object; +} + diff --git a/models/get-associated-updates-response200-all-of-related-objects.ts b/models/get-associated-updates-response200-all-of-related-objects.ts new file mode 100644 index 00000000..2031a6c7 --- /dev/null +++ b/models/get-associated-updates-response200-all-of-related-objects.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsOrganization } from './get-activities-response200-related-objects-organization'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsUser } from './get-activities-response200-related-objects-user'; + +/** + * + * @export + * @interface GetAssociatedUpdatesResponse200AllOfRelatedObjects + */ +export interface GetAssociatedUpdatesResponse200AllOfRelatedObjects { + /** + * + * @type {GetActivitiesResponse200RelatedObjectsOrganization} + * @memberof GetAssociatedUpdatesResponse200AllOfRelatedObjects + */ + 'organization'?: GetActivitiesResponse200RelatedObjectsOrganization; + /** + * + * @type {GetActivitiesResponse200RelatedObjectsUser} + * @memberof GetAssociatedUpdatesResponse200AllOfRelatedObjects + */ + 'user'?: GetActivitiesResponse200RelatedObjectsUser; +} + diff --git a/models/get-associated-updates-response200-all-of.ts b/models/get-associated-updates-response200-all-of.ts new file mode 100644 index 00000000..cc1463b2 --- /dev/null +++ b/models/get-associated-updates-response200-all-of.ts @@ -0,0 +1,51 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedUpdatesResponse200AllOfDataInner } from './get-associated-updates-response200-all-of-data-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedUpdatesResponse200AllOfRelatedObjects } from './get-associated-updates-response200-all-of-related-objects'; + +/** + * + * @export + * @interface GetAssociatedUpdatesResponse200AllOf + */ +export interface GetAssociatedUpdatesResponse200AllOf { + /** + * + * @type {Array} + * @memberof GetAssociatedUpdatesResponse200AllOf + */ + 'data'?: Array; + /** + * + * @type {FieldsResponse200AllOfAdditionalData} + * @memberof GetAssociatedUpdatesResponse200AllOf + */ + 'additional_data'?: FieldsResponse200AllOfAdditionalData; + /** + * + * @type {GetAssociatedUpdatesResponse200AllOfRelatedObjects} + * @memberof GetAssociatedUpdatesResponse200AllOf + */ + 'related_objects'?: GetAssociatedUpdatesResponse200AllOfRelatedObjects; +} + diff --git a/models/get-associated-updates-response200.ts b/models/get-associated-updates-response200.ts new file mode 100644 index 00000000..79c024a4 --- /dev/null +++ b/models/get-associated-updates-response200.ts @@ -0,0 +1,38 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedUpdatesResponse200AllOf } from './get-associated-updates-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedUpdatesResponse200AllOfDataInner } from './get-associated-updates-response200-all-of-data-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedUpdatesResponse200AllOfRelatedObjects } from './get-associated-updates-response200-all-of-related-objects'; + +/** + * @type GetAssociatedUpdatesResponse200 + * @export + */ +export type GetAssociatedUpdatesResponse200 = BaseResponse & GetAssociatedUpdatesResponse200AllOf; + + diff --git a/models/get-comments-response200-data-inner.ts b/models/get-comments-response200-data-inner.ts new file mode 100644 index 00000000..dd12cfe0 --- /dev/null +++ b/models/get-comments-response200-data-inner.ts @@ -0,0 +1,84 @@ +/* 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 + * @interface GetCommentsResponse200DataInner + */ +export interface GetCommentsResponse200DataInner { + /** + * The ID of the note + * @type {string} + * @memberof GetCommentsResponse200DataInner + */ + 'uuid'?: string; + /** + * Whether the note is active or deleted + * @type {boolean} + * @memberof GetCommentsResponse200DataInner + */ + 'active_flag'?: boolean; + /** + * The creation date and time of the note + * @type {string} + * @memberof GetCommentsResponse200DataInner + */ + 'add_time'?: string; + /** + * The creation date and time of the note + * @type {string} + * @memberof GetCommentsResponse200DataInner + */ + 'update_time'?: string; + /** + * The content of the note in HTML format. Subject to sanitization on the back-end. + * @type {string} + * @memberof GetCommentsResponse200DataInner + */ + 'content'?: string; + /** + * The ID of the object that the comment is attached to, will be the id of the note + * @type {string} + * @memberof GetCommentsResponse200DataInner + */ + 'object_id'?: string; + /** + * The type of object that the comment is attached to, will be \"note\" + * @type {string} + * @memberof GetCommentsResponse200DataInner + */ + 'object_type'?: string; + /** + * The ID of the user who created the comment + * @type {number} + * @memberof GetCommentsResponse200DataInner + */ + 'user_id'?: number; + /** + * The ID of the user who last updated the comment + * @type {number} + * @memberof GetCommentsResponse200DataInner + */ + 'updater_id'?: number; + /** + * The ID of the company + * @type {number} + * @memberof GetCommentsResponse200DataInner + */ + 'company_id'?: number; +} + diff --git a/models/get-comments-response200.ts b/models/get-comments-response200.ts new file mode 100644 index 00000000..7a8f45cb --- /dev/null +++ b/models/get-comments-response200.ts @@ -0,0 +1,48 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetCommentsResponse200DataInner } from './get-comments-response200-data-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetNotesResponse200AdditionalData } from './get-notes-response200-additional-data'; + +/** + * + * @export + * @interface GetCommentsResponse200 + */ +export interface GetCommentsResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetCommentsResponse200 + */ + 'success'?: boolean; + /** + * The array of comments + * @type {Array} + * @memberof GetCommentsResponse200 + */ + 'data'?: Array; + /** + * + * @type {GetNotesResponse200AdditionalData} + * @memberof GetCommentsResponse200 + */ + 'additional_data'?: GetNotesResponse200AdditionalData; +} + diff --git a/models/get-currencies-response200-data-inner.ts b/models/get-currencies-response200-data-inner.ts new file mode 100644 index 00000000..82180fc4 --- /dev/null +++ b/models/get-currencies-response200-data-inner.ts @@ -0,0 +1,66 @@ +/* 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 + * @interface GetCurrenciesResponse200DataInner + */ +export interface GetCurrenciesResponse200DataInner { + /** + * The ID of the currency + * @type {number} + * @memberof GetCurrenciesResponse200DataInner + */ + 'id'?: number; + /** + * The code of the currency + * @type {string} + * @memberof GetCurrenciesResponse200DataInner + */ + 'code'?: string; + /** + * The name of the currency + * @type {string} + * @memberof GetCurrenciesResponse200DataInner + */ + 'name'?: string; + /** + * The amount of decimal points of the currency + * @type {number} + * @memberof GetCurrenciesResponse200DataInner + */ + 'decimal_points'?: number; + /** + * The symbol of the currency + * @type {string} + * @memberof GetCurrenciesResponse200DataInner + */ + 'symbol'?: string; + /** + * Whether the currency is active or not + * @type {boolean} + * @memberof GetCurrenciesResponse200DataInner + */ + 'active_flag'?: boolean; + /** + * Whether the currency is a custom one or not + * @type {boolean} + * @memberof GetCurrenciesResponse200DataInner + */ + 'is_custom_flag'?: boolean; +} + diff --git a/models/get-currencies-response200.ts b/models/get-currencies-response200.ts new file mode 100644 index 00000000..87ae9c11 --- /dev/null +++ b/models/get-currencies-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetCurrenciesResponse200DataInner } from './get-currencies-response200-data-inner'; + +/** + * + * @export + * @interface GetCurrenciesResponse200 + */ +export interface GetCurrenciesResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetCurrenciesResponse200 + */ + 'success'?: boolean; + /** + * The array of currencies + * @type {Array} + * @memberof GetCurrenciesResponse200 + */ + 'data'?: Array; +} + diff --git a/models/get-current-user-response200-all-of-data-all-of-language.ts b/models/get-current-user-response200-all-of-data-all-of-language.ts new file mode 100644 index 00000000..9c5a71a4 --- /dev/null +++ b/models/get-current-user-response200-all-of-data-all-of-language.ts @@ -0,0 +1,36 @@ +/* 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. + */ + + + +/** + * The user language details + * @export + * @interface GetCurrentUserResponse200AllOfDataAllOfLanguage + */ +export interface GetCurrentUserResponse200AllOfDataAllOfLanguage { + /** + * The language code. E.g. en + * @type {string} + * @memberof GetCurrentUserResponse200AllOfDataAllOfLanguage + */ + 'language_code'?: string; + /** + * The country code. E.g. US + * @type {string} + * @memberof GetCurrentUserResponse200AllOfDataAllOfLanguage + */ + 'country_code'?: string; +} + diff --git a/models/get-current-user-response200-all-of-data-all-of.ts b/models/get-current-user-response200-all-of-data-all-of.ts new file mode 100644 index 00000000..bd207dec --- /dev/null +++ b/models/get-current-user-response200-all-of-data-all-of.ts @@ -0,0 +1,63 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetCurrentUserResponse200AllOfDataAllOfLanguage } from './get-current-user-response200-all-of-data-all-of-language'; + +/** + * + * @export + * @interface GetCurrentUserResponse200AllOfDataAllOf + */ +export interface GetCurrentUserResponse200AllOfDataAllOf { + /** + * The user company ID + * @type {number} + * @memberof GetCurrentUserResponse200AllOfDataAllOf + */ + 'company_id'?: number; + /** + * The user company name + * @type {string} + * @memberof GetCurrentUserResponse200AllOfDataAllOf + */ + 'company_name'?: string; + /** + * The user company domain + * @type {string} + * @memberof GetCurrentUserResponse200AllOfDataAllOf + */ + 'company_domain'?: string; + /** + * The user company country + * @type {string} + * @memberof GetCurrentUserResponse200AllOfDataAllOf + */ + 'company_country'?: string; + /** + * The user company industry + * @type {string} + * @memberof GetCurrentUserResponse200AllOfDataAllOf + */ + 'company_industry'?: string; + /** + * + * @type {GetCurrentUserResponse200AllOfDataAllOfLanguage} + * @memberof GetCurrentUserResponse200AllOfDataAllOf + */ + 'language'?: GetCurrentUserResponse200AllOfDataAllOfLanguage; +} + diff --git a/models/get-current-user-response200-all-of-data.ts b/models/get-current-user-response200-all-of-data.ts new file mode 100644 index 00000000..46c2c2c3 --- /dev/null +++ b/models/get-current-user-response200-all-of-data.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetCurrentUserResponse200AllOfDataAllOf } from './get-current-user-response200-all-of-data-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetCurrentUserResponse200AllOfDataAllOfLanguage } from './get-current-user-response200-all-of-data-all-of-language'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRecentsResponse200DataInnerAnyOf11Data } from './get-recents-response200-data-inner-any-of11-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRecentsResponse200DataInnerAnyOf11DataAccessInner } from './get-recents-response200-data-inner-any-of11-data-access-inner'; + +/** + * @type GetCurrentUserResponse200AllOfData + * @export + */ +export type GetCurrentUserResponse200AllOfData = GetCurrentUserResponse200AllOfDataAllOf & GetRecentsResponse200DataInnerAnyOf11Data; + + diff --git a/models/get-current-user-response200-all-of.ts b/models/get-current-user-response200-all-of.ts new file mode 100644 index 00000000..76f8e185 --- /dev/null +++ b/models/get-current-user-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetCurrentUserResponse200AllOfData } from './get-current-user-response200-all-of-data'; + +/** + * + * @export + * @interface GetCurrentUserResponse200AllOf + */ +export interface GetCurrentUserResponse200AllOf { + /** + * + * @type {GetCurrentUserResponse200AllOfData} + * @memberof GetCurrentUserResponse200AllOf + */ + 'data'?: GetCurrentUserResponse200AllOfData; +} + diff --git a/models/get-current-user-response200.ts b/models/get-current-user-response200.ts new file mode 100644 index 00000000..47426f6c --- /dev/null +++ b/models/get-current-user-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetCurrentUserResponse200AllOf } from './get-current-user-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetCurrentUserResponse200AllOfData } from './get-current-user-response200-all-of-data'; + +/** + * @type GetCurrentUserResponse200 + * @export + */ +export type GetCurrentUserResponse200 = BaseResponse & GetCurrentUserResponse200AllOf; + + diff --git a/models/get-deal-activities-response200-all-of-related-objects.ts b/models/get-deal-activities-response200-all-of-related-objects.ts new file mode 100644 index 00000000..2564b086 --- /dev/null +++ b/models/get-deal-activities-response200-all-of-related-objects.ts @@ -0,0 +1,60 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityResponse200RelatedObjectsOrganization } from './add-activity-response200-related-objects-organization'; +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityResponse200RelatedObjectsPerson } from './add-activity-response200-related-objects-person'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsDeal } from './get-activities-response200-related-objects-deal'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsUser } from './get-activities-response200-related-objects-user'; + +/** + * + * @export + * @interface GetDealActivitiesResponse200AllOfRelatedObjects + */ +export interface GetDealActivitiesResponse200AllOfRelatedObjects { + /** + * + * @type {AddActivityResponse200RelatedObjectsOrganization} + * @memberof GetDealActivitiesResponse200AllOfRelatedObjects + */ + 'organization'?: AddActivityResponse200RelatedObjectsOrganization; + /** + * + * @type {AddActivityResponse200RelatedObjectsPerson} + * @memberof GetDealActivitiesResponse200AllOfRelatedObjects + */ + 'person'?: AddActivityResponse200RelatedObjectsPerson; + /** + * + * @type {GetActivitiesResponse200RelatedObjectsDeal} + * @memberof GetDealActivitiesResponse200AllOfRelatedObjects + */ + 'deal'?: GetActivitiesResponse200RelatedObjectsDeal; + /** + * + * @type {GetActivitiesResponse200RelatedObjectsUser} + * @memberof GetDealActivitiesResponse200AllOfRelatedObjects + */ + 'user'?: GetActivitiesResponse200RelatedObjectsUser; +} + diff --git a/models/get-deal-activities-response200-all-of.ts b/models/get-deal-activities-response200-all-of.ts new file mode 100644 index 00000000..751f8d89 --- /dev/null +++ b/models/get-deal-activities-response200-all-of.ts @@ -0,0 +1,51 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ActivityDistributionDataWithAdditionalData } from './activity-distribution-data-with-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { ActivityResponseObject } from './activity-response-object'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealActivitiesResponse200AllOfRelatedObjects } from './get-deal-activities-response200-all-of-related-objects'; + +/** + * + * @export + * @interface GetDealActivitiesResponse200AllOf + */ +export interface GetDealActivitiesResponse200AllOf { + /** + * The array of activities + * @type {Array} + * @memberof GetDealActivitiesResponse200AllOf + */ + 'data'?: Array; + /** + * + * @type {ActivityDistributionDataWithAdditionalData} + * @memberof GetDealActivitiesResponse200AllOf + */ + 'additional_data'?: ActivityDistributionDataWithAdditionalData; + /** + * + * @type {GetDealActivitiesResponse200AllOfRelatedObjects} + * @memberof GetDealActivitiesResponse200AllOf + */ + 'related_objects'?: GetDealActivitiesResponse200AllOfRelatedObjects; +} + diff --git a/models/get-deal-activities-response200.ts b/models/get-deal-activities-response200.ts new file mode 100644 index 00000000..bdda9070 --- /dev/null +++ b/models/get-deal-activities-response200.ts @@ -0,0 +1,38 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ActivityDistributionDataWithAdditionalData } from './activity-distribution-data-with-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { ActivityResponseObject } from './activity-response-object'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealActivitiesResponse200AllOf } from './get-deal-activities-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealActivitiesResponse200AllOfRelatedObjects } from './get-deal-activities-response200-all-of-related-objects'; + +/** + * @type GetDealActivitiesResponse200 + * @export + */ +export type GetDealActivitiesResponse200 = BaseResponse & GetDealActivitiesResponse200AllOf; + + diff --git a/models/get-deal-participants-response200.ts b/models/get-deal-participants-response200.ts new file mode 100644 index 00000000..98ffedb2 --- /dev/null +++ b/models/get-deal-participants-response200.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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealsResponse200RelatedObjects } from './get-deals-response200-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItem } from './person-item'; + +/** + * + * @export + * @interface GetDealParticipantsResponse200 + */ +export interface GetDealParticipantsResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetDealParticipantsResponse200 + */ + 'success'?: boolean; + /** + * The array of participants + * @type {Array} + * @memberof GetDealParticipantsResponse200 + */ + 'data'?: Array; + /** + * + * @type {FieldsResponse200AllOfAdditionalData} + * @memberof GetDealParticipantsResponse200 + */ + 'additional_data'?: FieldsResponse200AllOfAdditionalData; + /** + * + * @type {GetDealsResponse200RelatedObjects} + * @memberof GetDealParticipantsResponse200 + */ + 'related_objects'?: GetDealsResponse200RelatedObjects; +} + diff --git a/models/get-deal-response200-additional-data.ts b/models/get-deal-response200-additional-data.ts new file mode 100644 index 00000000..8ffd6c7b --- /dev/null +++ b/models/get-deal-response200-additional-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface GetDealResponse200AdditionalData + */ +export interface GetDealResponse200AdditionalData { + /** + * The BCC email of the deal + * @type {string} + * @memberof GetDealResponse200AdditionalData + */ + 'dropbox_email'?: string; +} + diff --git a/models/get-deal-response200-related-objects.ts b/models/get-deal-response200-related-objects.ts new file mode 100644 index 00000000..a4c7eb7e --- /dev/null +++ b/models/get-deal-response200-related-objects.ts @@ -0,0 +1,51 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityResponse200RelatedObjectsOrganization } from './add-activity-response200-related-objects-organization'; +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityResponse200RelatedObjectsPerson } from './add-activity-response200-related-objects-person'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsUser } from './get-activities-response200-related-objects-user'; + +/** + * + * @export + * @interface GetDealResponse200RelatedObjects + */ +export interface GetDealResponse200RelatedObjects { + /** + * + * @type {GetActivitiesResponse200RelatedObjectsUser} + * @memberof GetDealResponse200RelatedObjects + */ + 'user'?: GetActivitiesResponse200RelatedObjectsUser; + /** + * + * @type {AddActivityResponse200RelatedObjectsPerson} + * @memberof GetDealResponse200RelatedObjects + */ + 'person'?: AddActivityResponse200RelatedObjectsPerson; + /** + * + * @type {AddActivityResponse200RelatedObjectsOrganization} + * @memberof GetDealResponse200RelatedObjects + */ + 'organization'?: AddActivityResponse200RelatedObjectsOrganization; +} + diff --git a/models/get-deal-response200.ts b/models/get-deal-response200.ts new file mode 100644 index 00000000..e6e23742 --- /dev/null +++ b/models/get-deal-response200.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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DealNonStrictWithDetails } from './deal-non-strict-with-details'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealResponse200AdditionalData } from './get-deal-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealResponse200RelatedObjects } from './get-deal-response200-related-objects'; + +/** + * + * @export + * @interface GetDealResponse200 + */ +export interface GetDealResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetDealResponse200 + */ + 'success'?: boolean; + /** + * + * @type {DealNonStrictWithDetails} + * @memberof GetDealResponse200 + */ + 'data'?: DealNonStrictWithDetails; + /** + * + * @type {GetDealResponse200AdditionalData} + * @memberof GetDealResponse200 + */ + 'additional_data'?: GetDealResponse200AdditionalData; + /** + * + * @type {GetDealResponse200RelatedObjects} + * @memberof GetDealResponse200 + */ + 'related_objects'?: GetDealResponse200RelatedObjects; +} + diff --git a/models/get-deal-updates-response200-all-of-data-inner.ts b/models/get-deal-updates-response200-all-of-data-inner.ts new file mode 100644 index 00000000..5d1106df --- /dev/null +++ b/models/get-deal-updates-response200-all-of-data-inner.ts @@ -0,0 +1,42 @@ +/* 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 + * @interface GetDealUpdatesResponse200AllOfDataInner + */ +export interface GetDealUpdatesResponse200AllOfDataInner { + /** + * The type of the deal update. (Possible object types - dealChange, note, activity, mailMessage, invoice, document, file) + * @type {string} + * @memberof GetDealUpdatesResponse200AllOfDataInner + */ + 'object'?: string; + /** + * The creation date and time of the update + * @type {string} + * @memberof GetDealUpdatesResponse200AllOfDataInner + */ + 'timestamp'?: string; + /** + * The data related to the update + * @type {object} + * @memberof GetDealUpdatesResponse200AllOfDataInner + */ + 'data'?: object; +} + diff --git a/models/get-deal-updates-response200-all-of-related-objects.ts b/models/get-deal-updates-response200-all-of-related-objects.ts new file mode 100644 index 00000000..c2d13c3c --- /dev/null +++ b/models/get-deal-updates-response200-all-of-related-objects.ts @@ -0,0 +1,60 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityResponse200RelatedObjectsPerson } from './add-activity-response200-related-objects-person'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsDeal } from './get-activities-response200-related-objects-deal'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsOrganization } from './get-activities-response200-related-objects-organization'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsUser } from './get-activities-response200-related-objects-user'; + +/** + * + * @export + * @interface GetDealUpdatesResponse200AllOfRelatedObjects + */ +export interface GetDealUpdatesResponse200AllOfRelatedObjects { + /** + * + * @type {GetActivitiesResponse200RelatedObjectsDeal} + * @memberof GetDealUpdatesResponse200AllOfRelatedObjects + */ + 'deal'?: GetActivitiesResponse200RelatedObjectsDeal; + /** + * + * @type {GetActivitiesResponse200RelatedObjectsOrganization} + * @memberof GetDealUpdatesResponse200AllOfRelatedObjects + */ + 'organization'?: GetActivitiesResponse200RelatedObjectsOrganization; + /** + * + * @type {GetActivitiesResponse200RelatedObjectsUser} + * @memberof GetDealUpdatesResponse200AllOfRelatedObjects + */ + 'user'?: GetActivitiesResponse200RelatedObjectsUser; + /** + * + * @type {AddActivityResponse200RelatedObjectsPerson} + * @memberof GetDealUpdatesResponse200AllOfRelatedObjects + */ + 'person'?: AddActivityResponse200RelatedObjectsPerson; +} + diff --git a/models/get-deal-updates-response200-all-of.ts b/models/get-deal-updates-response200-all-of.ts new file mode 100644 index 00000000..9b59de4d --- /dev/null +++ b/models/get-deal-updates-response200-all-of.ts @@ -0,0 +1,51 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealUpdatesResponse200AllOfDataInner } from './get-deal-updates-response200-all-of-data-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealUpdatesResponse200AllOfRelatedObjects } from './get-deal-updates-response200-all-of-related-objects'; + +/** + * + * @export + * @interface GetDealUpdatesResponse200AllOf + */ +export interface GetDealUpdatesResponse200AllOf { + /** + * + * @type {Array} + * @memberof GetDealUpdatesResponse200AllOf + */ + 'data'?: Array; + /** + * + * @type {FieldsResponse200AllOfAdditionalData} + * @memberof GetDealUpdatesResponse200AllOf + */ + 'additional_data'?: FieldsResponse200AllOfAdditionalData; + /** + * + * @type {GetDealUpdatesResponse200AllOfRelatedObjects} + * @memberof GetDealUpdatesResponse200AllOf + */ + 'related_objects'?: GetDealUpdatesResponse200AllOfRelatedObjects; +} + diff --git a/models/get-deal-updates-response200.ts b/models/get-deal-updates-response200.ts new file mode 100644 index 00000000..09cd8d59 --- /dev/null +++ b/models/get-deal-updates-response200.ts @@ -0,0 +1,38 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealUpdatesResponse200AllOf } from './get-deal-updates-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealUpdatesResponse200AllOfDataInner } from './get-deal-updates-response200-all-of-data-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealUpdatesResponse200AllOfRelatedObjects } from './get-deal-updates-response200-all-of-related-objects'; + +/** + * @type GetDealUpdatesResponse200 + * @export + */ +export type GetDealUpdatesResponse200 = BaseResponse & GetDealUpdatesResponse200AllOf; + + diff --git a/models/get-deals-collection-response200.ts b/models/get-deals-collection-response200.ts new file mode 100644 index 00000000..21ee9ef4 --- /dev/null +++ b/models/get-deals-collection-response200.ts @@ -0,0 +1,48 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DealCollectionResponseObject } from './deal-collection-response-object'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesCollectionResponse200AdditionalData } from './get-activities-collection-response200-additional-data'; + +/** + * + * @export + * @interface GetDealsCollectionResponse200 + */ +export interface GetDealsCollectionResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetDealsCollectionResponse200 + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetDealsCollectionResponse200 + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesCollectionResponse200AdditionalData} + * @memberof GetDealsCollectionResponse200 + */ + 'additional_data'?: GetActivitiesCollectionResponse200AdditionalData; +} + diff --git a/models/get-deals-response200-related-objects.ts b/models/get-deals-response200-related-objects.ts new file mode 100644 index 00000000..1151503c --- /dev/null +++ b/models/get-deals-response200-related-objects.ts @@ -0,0 +1,51 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityResponse200RelatedObjectsOrganization } from './add-activity-response200-related-objects-organization'; +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityResponse200RelatedObjectsPerson } from './add-activity-response200-related-objects-person'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsUser } from './get-activities-response200-related-objects-user'; + +/** + * + * @export + * @interface GetDealsResponse200RelatedObjects + */ +export interface GetDealsResponse200RelatedObjects { + /** + * + * @type {GetActivitiesResponse200RelatedObjectsUser} + * @memberof GetDealsResponse200RelatedObjects + */ + 'user'?: GetActivitiesResponse200RelatedObjectsUser; + /** + * + * @type {AddActivityResponse200RelatedObjectsOrganization} + * @memberof GetDealsResponse200RelatedObjects + */ + 'organization'?: AddActivityResponse200RelatedObjectsOrganization; + /** + * + * @type {AddActivityResponse200RelatedObjectsPerson} + * @memberof GetDealsResponse200RelatedObjects + */ + 'person'?: AddActivityResponse200RelatedObjectsPerson; +} + diff --git a/models/get-deals-response200.ts b/models/get-deals-response200.ts new file mode 100644 index 00000000..e9d20c25 --- /dev/null +++ b/models/get-deals-response200.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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DealNonStrict } from './deal-non-strict'; +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealsResponse200RelatedObjects } from './get-deals-response200-related-objects'; + +/** + * + * @export + * @interface GetDealsResponse200 + */ +export interface GetDealsResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetDealsResponse200 + */ + 'success'?: boolean; + /** + * The array of deals + * @type {Array} + * @memberof GetDealsResponse200 + */ + 'data'?: Array; + /** + * + * @type {FieldsResponse200AllOfAdditionalData} + * @memberof GetDealsResponse200 + */ + 'additional_data'?: FieldsResponse200AllOfAdditionalData; + /** + * + * @type {GetDealsResponse200RelatedObjects} + * @memberof GetDealsResponse200 + */ + 'related_objects'?: GetDealsResponse200RelatedObjects; +} + diff --git a/models/get-deals-summary-response200-data-values-total.ts b/models/get-deals-summary-response200-data-values-total.ts new file mode 100644 index 00000000..b873fcf5 --- /dev/null +++ b/models/get-deals-summary-response200-data-values-total.ts @@ -0,0 +1,54 @@ +/* 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. + */ + + + +/** + * The total values of the deals grouped by deal currency + * @export + * @interface GetDealsSummaryResponse200DataValuesTotal + */ +export interface GetDealsSummaryResponse200DataValuesTotal { + /** + * The total value of deals in the deal currency group + * @type {number} + * @memberof GetDealsSummaryResponse200DataValuesTotal + */ + 'value'?: number; + /** + * The number of deals in the deal currency group + * @type {number} + * @memberof GetDealsSummaryResponse200DataValuesTotal + */ + 'count'?: number; + /** + * The total value of deals converted into the company default currency + * @type {number} + * @memberof GetDealsSummaryResponse200DataValuesTotal + */ + 'value_converted'?: number; + /** + * The total value of deals formatted with deal currency. E.g. €50 + * @type {string} + * @memberof GetDealsSummaryResponse200DataValuesTotal + */ + 'value_formatted'?: string; + /** + * The value_converted formatted with deal currency. E.g. US$50.10 + * @type {string} + * @memberof GetDealsSummaryResponse200DataValuesTotal + */ + 'value_converted_formatted'?: string; +} + diff --git a/models/get-deals-summary-response200-data-weighted-values-total.ts b/models/get-deals-summary-response200-data-weighted-values-total.ts new file mode 100644 index 00000000..e39b29ee --- /dev/null +++ b/models/get-deals-summary-response200-data-weighted-values-total.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + + +/** + * The total weighted values of the deals grouped by deal currency. The weighted value is calculated as probability times deal value. + * @export + * @interface GetDealsSummaryResponse200DataWeightedValuesTotal + */ +export interface GetDealsSummaryResponse200DataWeightedValuesTotal { + /** + * The total weighted value of the deals in the deal currency group + * @type {number} + * @memberof GetDealsSummaryResponse200DataWeightedValuesTotal + */ + 'value'?: number; + /** + * The number of deals in the deal currency group + * @type {number} + * @memberof GetDealsSummaryResponse200DataWeightedValuesTotal + */ + 'count'?: number; + /** + * The total weighted value of the deals formatted with deal currency. E.g. €50 + * @type {string} + * @memberof GetDealsSummaryResponse200DataWeightedValuesTotal + */ + 'value_formatted'?: string; +} + diff --git a/models/get-deals-summary-response200-data.ts b/models/get-deals-summary-response200-data.ts new file mode 100644 index 00000000..dade186b --- /dev/null +++ b/models/get-deals-summary-response200-data.ts @@ -0,0 +1,72 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetDealsSummaryResponse200DataValuesTotal } from './get-deals-summary-response200-data-values-total'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealsSummaryResponse200DataWeightedValuesTotal } from './get-deals-summary-response200-data-weighted-values-total'; + +/** + * The summary of deals + * @export + * @interface GetDealsSummaryResponse200Data + */ +export interface GetDealsSummaryResponse200Data { + /** + * + * @type {GetDealsSummaryResponse200DataValuesTotal} + * @memberof GetDealsSummaryResponse200Data + */ + 'values_total'?: GetDealsSummaryResponse200DataValuesTotal; + /** + * + * @type {GetDealsSummaryResponse200DataWeightedValuesTotal} + * @memberof GetDealsSummaryResponse200Data + */ + 'weighted_values_total'?: GetDealsSummaryResponse200DataWeightedValuesTotal; + /** + * The total number of deals + * @type {number} + * @memberof GetDealsSummaryResponse200Data + */ + 'total_count'?: number; + /** + * The total value of deals converted into the company default currency + * @type {number} + * @memberof GetDealsSummaryResponse200Data + */ + 'total_currency_converted_value'?: number; + /** + * The total weighted value of deals converted into the company default currency + * @type {number} + * @memberof GetDealsSummaryResponse200Data + */ + 'total_weighted_currency_converted_value'?: number; + /** + * The total converted value of deals formatted with the company default currency. E.g. US$5,100.96 + * @type {string} + * @memberof GetDealsSummaryResponse200Data + */ + 'total_currency_converted_value_formatted'?: string; + /** + * The total weighted value of deals formatted with the company default currency. E.g. US$5,100.96 + * @type {string} + * @memberof GetDealsSummaryResponse200Data + */ + 'total_weighted_currency_converted_value_formatted'?: string; +} + diff --git a/models/get-deals-summary-response200.ts b/models/get-deals-summary-response200.ts new file mode 100644 index 00000000..45387fae --- /dev/null +++ b/models/get-deals-summary-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetDealsSummaryResponse200Data } from './get-deals-summary-response200-data'; + +/** + * + * @export + * @interface GetDealsSummaryResponse200 + */ +export interface GetDealsSummaryResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetDealsSummaryResponse200 + */ + 'success'?: boolean; + /** + * + * @type {GetDealsSummaryResponse200Data} + * @memberof GetDealsSummaryResponse200 + */ + 'data'?: GetDealsSummaryResponse200Data; +} + diff --git a/models/get-deals-timeline-response200-data-totals.ts b/models/get-deals-timeline-response200-data-totals.ts new file mode 100644 index 00000000..551cb025 --- /dev/null +++ b/models/get-deals-timeline-response200-data-totals.ts @@ -0,0 +1,72 @@ +/* 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. + */ + + + +/** + * The total values of deals for the given period + * @export + * @interface GetDealsTimelineResponse200DataTotals + */ +export interface GetDealsTimelineResponse200DataTotals { + /** + * The number of deals for the given period + * @type {number} + * @memberof GetDealsTimelineResponse200DataTotals + */ + 'count'?: number; + /** + * The total values of deals grouped by deal currency + * @type {object} + * @memberof GetDealsTimelineResponse200DataTotals + */ + 'values'?: object; + /** + * The total weighted values of deals for the given period grouped by deal currency. The weighted value of a deal is calculated as probability times deal value. + * @type {object} + * @memberof GetDealsTimelineResponse200DataTotals + */ + 'weighted_values'?: object; + /** + * The number of open deals for the given period + * @type {number} + * @memberof GetDealsTimelineResponse200DataTotals + */ + 'open_count'?: number; + /** + * The total values of open deals for the given period grouped by deal currency + * @type {object} + * @memberof GetDealsTimelineResponse200DataTotals + */ + 'open_values'?: object; + /** + * The total weighted values of open deals for the given period grouped by deal currency. The weighted value of a deal is calculated as probability times deal value. + * @type {object} + * @memberof GetDealsTimelineResponse200DataTotals + */ + 'weighted_open_values'?: object; + /** + * The number of won deals for the given period + * @type {number} + * @memberof GetDealsTimelineResponse200DataTotals + */ + 'won_count'?: number; + /** + * The total values of won deals for the given period grouped by deal currency + * @type {object} + * @memberof GetDealsTimelineResponse200DataTotals + */ + 'won_values'?: object; +} + diff --git a/models/get-deals-timeline-response200-data.ts b/models/get-deals-timeline-response200-data.ts new file mode 100644 index 00000000..41f9c5b0 --- /dev/null +++ b/models/get-deals-timeline-response200-data.ts @@ -0,0 +1,54 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DealStrict } from './deal-strict'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealsTimelineResponse200DataTotals } from './get-deals-timeline-response200-data-totals'; + +/** + * Open and won deals grouped into periods by defined interval, amount and date-type dealField (`field_key`) + * @export + * @interface GetDealsTimelineResponse200Data + */ +export interface GetDealsTimelineResponse200Data { + /** + * The start date and time of the period + * @type {string} + * @memberof GetDealsTimelineResponse200Data + */ + 'period_start'?: string; + /** + * The end date and time of the period + * @type {string} + * @memberof GetDealsTimelineResponse200Data + */ + 'period_end'?: string; + /** + * + * @type {Array} + * @memberof GetDealsTimelineResponse200Data + */ + 'deals'?: Array; + /** + * + * @type {GetDealsTimelineResponse200DataTotals} + * @memberof GetDealsTimelineResponse200Data + */ + 'totals'?: GetDealsTimelineResponse200DataTotals; +} + diff --git a/models/get-deals-timeline-response200.ts b/models/get-deals-timeline-response200.ts new file mode 100644 index 00000000..57668cfa --- /dev/null +++ b/models/get-deals-timeline-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetDealsTimelineResponse200Data } from './get-deals-timeline-response200-data'; + +/** + * + * @export + * @interface GetDealsTimelineResponse200 + */ +export interface GetDealsTimelineResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetDealsTimelineResponse200 + */ + 'success'?: boolean; + /** + * + * @type {GetDealsTimelineResponse200Data} + * @memberof GetDealsTimelineResponse200 + */ + 'data'?: GetDealsTimelineResponse200Data; +} + diff --git a/models/get-file-response200.ts b/models/get-file-response200.ts new file mode 100644 index 00000000..f6202957 --- /dev/null +++ b/models/get-file-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetFilesResponse200DataInner } from './get-files-response200-data-inner'; + +/** + * + * @export + * @interface GetFileResponse200 + */ +export interface GetFileResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetFileResponse200 + */ + 'success'?: boolean; + /** + * + * @type {GetFilesResponse200DataInner} + * @memberof GetFileResponse200 + */ + 'data'?: GetFilesResponse200DataInner; +} + diff --git a/models/get-files-response200-additional-data.ts b/models/get-files-response200-additional-data.ts new file mode 100644 index 00000000..8a9baf6f --- /dev/null +++ b/models/get-files-response200-additional-data.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { PaginationDetails } from './pagination-details'; + +/** + * + * @export + * @interface GetFilesResponse200AdditionalData + */ +export interface GetFilesResponse200AdditionalData { + /** + * + * @type {PaginationDetails} + * @memberof GetFilesResponse200AdditionalData + */ + 'pagination'?: PaginationDetails; +} + diff --git a/models/get-files-response200-data-inner.ts b/models/get-files-response200-data-inner.ts new file mode 100644 index 00000000..81c7026f --- /dev/null +++ b/models/get-files-response200-data-inner.ts @@ -0,0 +1,192 @@ +/* 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. + */ + + + +/** + * The file data + * @export + * @interface GetFilesResponse200DataInner + */ +export interface GetFilesResponse200DataInner { + /** + * The ID of the file + * @type {number} + * @memberof GetFilesResponse200DataInner + */ + 'id'?: number; + /** + * The ID of the user to associate the file with + * @type {number} + * @memberof GetFilesResponse200DataInner + */ + 'user_id'?: number; + /** + * The ID of the deal to associate the file with + * @type {number} + * @memberof GetFilesResponse200DataInner + */ + 'deal_id'?: number; + /** + * The ID of the person to associate the file with + * @type {number} + * @memberof GetFilesResponse200DataInner + */ + 'person_id'?: number; + /** + * The ID of the organization to associate the file with + * @type {number} + * @memberof GetFilesResponse200DataInner + */ + 'org_id'?: number; + /** + * The ID of the product to associate the file with + * @type {number} + * @memberof GetFilesResponse200DataInner + */ + 'product_id'?: number; + /** + * The ID of the activity to associate the file with + * @type {number} + * @memberof GetFilesResponse200DataInner + */ + 'activity_id'?: number; + /** + * The ID of the lead to associate the file with + * @type {string} + * @memberof GetFilesResponse200DataInner + */ + 'lead_id'?: string; + /** + * The date and time when the file was added/created. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof GetFilesResponse200DataInner + */ + 'add_time'?: string; + /** + * The last updated date and time of the file. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof GetFilesResponse200DataInner + */ + 'update_time'?: string; + /** + * The original name of the file + * @type {string} + * @memberof GetFilesResponse200DataInner + */ + 'file_name'?: string; + /** + * The size of the file + * @type {number} + * @memberof GetFilesResponse200DataInner + */ + 'file_size'?: number; + /** + * Whether the user is active or not. false = Not activated, true = Activated + * @type {boolean} + * @memberof GetFilesResponse200DataInner + */ + 'active_flag'?: boolean; + /** + * Whether the file was uploaded as inline or not + * @type {boolean} + * @memberof GetFilesResponse200DataInner + */ + 'inline_flag'?: boolean; + /** + * The location type to send the file to. Only googledrive is supported at the moment. + * @type {string} + * @memberof GetFilesResponse200DataInner + */ + 'remote_location'?: string; + /** + * The ID of the remote item + * @type {string} + * @memberof GetFilesResponse200DataInner + */ + 'remote_id'?: string; + /** + * The ID of the inline attachment + * @type {string} + * @memberof GetFilesResponse200DataInner + */ + 'cid'?: string; + /** + * The location of the cloud storage + * @type {string} + * @memberof GetFilesResponse200DataInner + */ + 's3_bucket'?: string; + /** + * The ID of the mail message to associate the file with + * @type {string} + * @memberof GetFilesResponse200DataInner + */ + 'mail_message_id'?: string; + /** + * The ID of the mail template to associate the file with + * @type {string} + * @memberof GetFilesResponse200DataInner + */ + 'mail_template_id'?: string; + /** + * The name of the deal associated with the file + * @type {string} + * @memberof GetFilesResponse200DataInner + */ + 'deal_name'?: string; + /** + * The name of the person associated with the file + * @type {string} + * @memberof GetFilesResponse200DataInner + */ + 'person_name'?: string; + /** + * The name of the organization associated with the file + * @type {string} + * @memberof GetFilesResponse200DataInner + */ + 'org_name'?: string; + /** + * The name of the product associated with the file + * @type {string} + * @memberof GetFilesResponse200DataInner + */ + 'product_name'?: string; + /** + * The name of the lead associated with the file + * @type {string} + * @memberof GetFilesResponse200DataInner + */ + 'lead_name'?: string; + /** + * The URL of the download file + * @type {string} + * @memberof GetFilesResponse200DataInner + */ + 'url'?: string; + /** + * The visible name of the file + * @type {string} + * @memberof GetFilesResponse200DataInner + */ + 'name'?: string; + /** + * The description of the file + * @type {string} + * @memberof GetFilesResponse200DataInner + */ + 'description'?: string; +} + diff --git a/models/get-files-response200.ts b/models/get-files-response200.ts new file mode 100644 index 00000000..de9a1f9d --- /dev/null +++ b/models/get-files-response200.ts @@ -0,0 +1,48 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetFilesResponse200AdditionalData } from './get-files-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFilesResponse200DataInner } from './get-files-response200-data-inner'; + +/** + * + * @export + * @interface GetFilesResponse200 + */ +export interface GetFilesResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetFilesResponse200 + */ + 'success'?: boolean; + /** + * The array of all uploaded files + * @type {Array} + * @memberof GetFilesResponse200 + */ + 'data'?: Array; + /** + * + * @type {GetFilesResponse200AdditionalData} + * @memberof GetFilesResponse200 + */ + 'additional_data'?: GetFilesResponse200AdditionalData; +} + diff --git a/models/get-filter-response200-all-of.ts b/models/get-filter-response200-all-of.ts new file mode 100644 index 00000000..75a9d05c --- /dev/null +++ b/models/get-filter-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetFiltersResponse200AllOfDataInner } from './get-filters-response200-all-of-data-inner'; + +/** + * + * @export + * @interface GetFilterResponse200AllOf + */ +export interface GetFilterResponse200AllOf { + /** + * + * @type {GetFiltersResponse200AllOfDataInner} + * @memberof GetFilterResponse200AllOf + */ + 'data'?: GetFiltersResponse200AllOfDataInner; +} + diff --git a/models/get-filter-response200.ts b/models/get-filter-response200.ts new file mode 100644 index 00000000..1b86320f --- /dev/null +++ b/models/get-filter-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFilterResponse200AllOf } from './get-filter-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFiltersResponse200AllOfDataInner } from './get-filters-response200-all-of-data-inner'; + +/** + * @type GetFilterResponse200 + * @export + */ +export type GetFilterResponse200 = BaseResponse & GetFilterResponse200AllOf; + + diff --git a/models/get-filters-response200-all-of-data-inner.ts b/models/get-filters-response200-all-of-data-inner.ts new file mode 100644 index 00000000..66ef6b0f --- /dev/null +++ b/models/get-filters-response200-all-of-data-inner.ts @@ -0,0 +1,78 @@ +/* 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. + */ + + + +/** + * The filter object + * @export + * @interface GetFiltersResponse200AllOfDataInner + */ +export interface GetFiltersResponse200AllOfDataInner { + /** + * The ID of the filter + * @type {number} + * @memberof GetFiltersResponse200AllOfDataInner + */ + 'id'?: number; + /** + * The name of the filter + * @type {string} + * @memberof GetFiltersResponse200AllOfDataInner + */ + 'name'?: string; + /** + * The active flag of the filter + * @type {boolean} + * @memberof GetFiltersResponse200AllOfDataInner + */ + 'active_flag'?: boolean; + /** + * The type of the item + * @type {string} + * @memberof GetFiltersResponse200AllOfDataInner + */ + 'type'?: string; + /** + * The owner of the filter + * @type {number} + * @memberof GetFiltersResponse200AllOfDataInner + */ + 'user_id'?: number; + /** + * The date and time when the filter was added + * @type {string} + * @memberof GetFiltersResponse200AllOfDataInner + */ + 'add_time'?: string; + /** + * The date and time when the filter was updated + * @type {string} + * @memberof GetFiltersResponse200AllOfDataInner + */ + 'update_time'?: string; + /** + * The visibility group ID of who can see then filter + * @type {number} + * @memberof GetFiltersResponse200AllOfDataInner + */ + 'visible_to'?: number; + /** + * Used by Pipedrive webapp + * @type {number} + * @memberof GetFiltersResponse200AllOfDataInner + */ + 'custom_view_id'?: number; +} + diff --git a/models/get-filters-response200-all-of.ts b/models/get-filters-response200-all-of.ts new file mode 100644 index 00000000..10395189 --- /dev/null +++ b/models/get-filters-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetFiltersResponse200AllOfDataInner } from './get-filters-response200-all-of-data-inner'; + +/** + * + * @export + * @interface GetFiltersResponse200AllOf + */ +export interface GetFiltersResponse200AllOf { + /** + * The array of filters + * @type {Array} + * @memberof GetFiltersResponse200AllOf + */ + 'data'?: Array; +} + diff --git a/models/get-filters-response200.ts b/models/get-filters-response200.ts new file mode 100644 index 00000000..0c4ca635 --- /dev/null +++ b/models/get-filters-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFiltersResponse200AllOf } from './get-filters-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFiltersResponse200AllOfDataInner } from './get-filters-response200-all-of-data-inner'; + +/** + * @type GetFiltersResponse200 + * @export + */ +export type GetFiltersResponse200 = BaseResponse & GetFiltersResponse200AllOf; + + diff --git a/models/get-goal-result-response200-data.ts b/models/get-goal-result-response200-data.ts new file mode 100644 index 00000000..75da3ecc --- /dev/null +++ b/models/get-goal-result-response200-data.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddOrUpdateGoalResponse200DataGoal } from './add-or-update-goal-response200-data-goal'; + +/** + * + * @export + * @interface GetGoalResultResponse200Data + */ +export interface GetGoalResultResponse200Data { + /** + * The numeric progress of the goal + * @type {number} + * @memberof GetGoalResultResponse200Data + */ + 'progress'?: number; + /** + * + * @type {AddOrUpdateGoalResponse200DataGoal} + * @memberof GetGoalResultResponse200Data + */ + 'goal'?: AddOrUpdateGoalResponse200DataGoal; +} + diff --git a/models/get-goal-result-response200.ts b/models/get-goal-result-response200.ts new file mode 100644 index 00000000..dbcfec80 --- /dev/null +++ b/models/get-goal-result-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetGoalResultResponse200Data } from './get-goal-result-response200-data'; + +/** + * + * @export + * @interface GetGoalResultResponse200 + */ +export interface GetGoalResultResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetGoalResultResponse200 + */ + 'success'?: boolean; + /** + * + * @type {GetGoalResultResponse200Data} + * @memberof GetGoalResultResponse200 + */ + 'data'?: GetGoalResultResponse200Data; +} + diff --git a/models/get-goals-response200-data.ts b/models/get-goals-response200-data.ts new file mode 100644 index 00000000..a3bc4bf0 --- /dev/null +++ b/models/get-goals-response200-data.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddOrUpdateGoalResponse200DataGoal } from './add-or-update-goal-response200-data-goal'; + +/** + * + * @export + * @interface GetGoalsResponse200Data + */ +export interface GetGoalsResponse200Data { + /** + * + * @type {Array} + * @memberof GetGoalsResponse200Data + */ + 'goals'?: Array; +} + diff --git a/models/get-goals-response200.ts b/models/get-goals-response200.ts new file mode 100644 index 00000000..fcd621a9 --- /dev/null +++ b/models/get-goals-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetGoalsResponse200Data } from './get-goals-response200-data'; + +/** + * + * @export + * @interface GetGoalsResponse200 + */ +export interface GetGoalsResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetGoalsResponse200 + */ + 'success'?: boolean; + /** + * + * @type {GetGoalsResponse200Data} + * @memberof GetGoalsResponse200 + */ + 'data'?: GetGoalsResponse200Data; +} + diff --git a/models/get-lead-labels-response200-data-inner.ts b/models/get-lead-labels-response200-data-inner.ts new file mode 100644 index 00000000..b32d42cf --- /dev/null +++ b/models/get-lead-labels-response200-data-inner.ts @@ -0,0 +1,66 @@ +/* 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 + * @interface GetLeadLabelsResponse200DataInner + */ +export interface GetLeadLabelsResponse200DataInner { + /** + * The unique ID of the lead label + * @type {string} + * @memberof GetLeadLabelsResponse200DataInner + */ + 'id'?: string; + /** + * The name of the lead label + * @type {string} + * @memberof GetLeadLabelsResponse200DataInner + */ + 'name'?: string; + /** + * The color of the label. Only a subset of colors can be used. + * @type {string} + * @memberof GetLeadLabelsResponse200DataInner + */ + 'color'?: GetLeadLabelsResponse200DataInnerColorConst; + /** + * The date and time of when the lead label was created. In ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. + * @type {string} + * @memberof GetLeadLabelsResponse200DataInner + */ + 'add_time'?: string; + /** + * The date and time of when the lead label was last updated. In ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. + * @type {string} + * @memberof GetLeadLabelsResponse200DataInner + */ + 'update_time'?: string; +} + +export const GetLeadLabelsResponse200DataInnerColorConst = { + green: 'green', + blue: 'blue', + red: 'red', + yellow: 'yellow', + purple: 'purple', + gray: 'gray' +} as const; + +export type GetLeadLabelsResponse200DataInnerColorConst = typeof GetLeadLabelsResponse200DataInnerColorConst[keyof typeof GetLeadLabelsResponse200DataInnerColorConst]; + + diff --git a/models/get-lead-labels-response200.ts b/models/get-lead-labels-response200.ts new file mode 100644 index 00000000..0ad9f2cd --- /dev/null +++ b/models/get-lead-labels-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetLeadLabelsResponse200DataInner } from './get-lead-labels-response200-data-inner'; + +/** + * + * @export + * @interface GetLeadLabelsResponse200 + */ +export interface GetLeadLabelsResponse200 { + /** + * + * @type {boolean} + * @memberof GetLeadLabelsResponse200 + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetLeadLabelsResponse200 + */ + 'data'?: Array; +} + diff --git a/models/get-lead-sources-response200-data-inner.ts b/models/get-lead-sources-response200-data-inner.ts new file mode 100644 index 00000000..758bffd9 --- /dev/null +++ b/models/get-lead-sources-response200-data-inner.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface GetLeadSourcesResponse200DataInner + */ +export interface GetLeadSourcesResponse200DataInner { + /** + * The unique name of a lead source + * @type {string} + * @memberof GetLeadSourcesResponse200DataInner + */ + 'name'?: string; +} + diff --git a/models/get-lead-sources-response200.ts b/models/get-lead-sources-response200.ts new file mode 100644 index 00000000..80437b65 --- /dev/null +++ b/models/get-lead-sources-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetLeadSourcesResponse200DataInner } from './get-lead-sources-response200-data-inner'; + +/** + * + * @export + * @interface GetLeadSourcesResponse200 + */ +export interface GetLeadSourcesResponse200 { + /** + * + * @type {boolean} + * @memberof GetLeadSourcesResponse200 + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetLeadSourcesResponse200 + */ + 'data'?: Array; +} + diff --git a/models/get-leads-response200-data-inner-value.ts b/models/get-leads-response200-data-inner-value.ts new file mode 100644 index 00000000..56ebdbdc --- /dev/null +++ b/models/get-leads-response200-data-inner-value.ts @@ -0,0 +1,36 @@ +/* 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. + */ + + + +/** + * The potential value of the lead + * @export + * @interface GetLeadsResponse200DataInnerValue + */ +export interface GetLeadsResponse200DataInnerValue { + /** + * + * @type {number} + * @memberof GetLeadsResponse200DataInnerValue + */ + 'amount': number; + /** + * + * @type {string} + * @memberof GetLeadsResponse200DataInnerValue + */ + 'currency': string; +} + diff --git a/models/get-leads-response200-data-inner.ts b/models/get-leads-response200-data-inner.ts new file mode 100644 index 00000000..80ed0f75 --- /dev/null +++ b/models/get-leads-response200-data-inner.ts @@ -0,0 +1,139 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetLeadsResponse200DataInnerValue } from './get-leads-response200-data-inner-value'; + +/** + * + * @export + * @interface GetLeadsResponse200DataInner + */ +export interface GetLeadsResponse200DataInner { + /** + * The unique ID of the lead in the UUID format + * @type {string} + * @memberof GetLeadsResponse200DataInner + */ + 'id'?: string; + /** + * The title of the lead + * @type {string} + * @memberof GetLeadsResponse200DataInner + */ + 'title'?: string; + /** + * The ID of the user who owns the lead + * @type {number} + * @memberof GetLeadsResponse200DataInner + */ + 'owner_id'?: number; + /** + * The ID of the user who created the lead + * @type {number} + * @memberof GetLeadsResponse200DataInner + */ + 'creator_id'?: number; + /** + * The IDs of the lead labels which are associated with the lead + * @type {Array} + * @memberof GetLeadsResponse200DataInner + */ + 'label_ids'?: Array; + /** + * The ID of a person which this lead is linked to + * @type {number} + * @memberof GetLeadsResponse200DataInner + */ + 'person_id'?: number | null; + /** + * The ID of an organization which this lead is linked to + * @type {number} + * @memberof GetLeadsResponse200DataInner + */ + 'organization_id'?: number | null; + /** + * Defines where the lead comes from. Will be `API` if the lead was created through the Public API and will be `Manually created` if the lead was created manually through the UI. + * @type {string} + * @memberof GetLeadsResponse200DataInner + */ + 'source_name'?: string; + /** + * A flag indicating whether the lead is archived or not + * @type {boolean} + * @memberof GetLeadsResponse200DataInner + */ + 'is_archived'?: boolean; + /** + * A flag indicating whether the lead was seen by someone in the Pipedrive UI + * @type {boolean} + * @memberof GetLeadsResponse200DataInner + */ + 'was_seen'?: boolean; + /** + * + * @type {GetLeadsResponse200DataInnerValue} + * @memberof GetLeadsResponse200DataInner + */ + 'value'?: GetLeadsResponse200DataInnerValue; + /** + * The date of when the deal which will be created from the lead is expected to be closed. In ISO 8601 format: YYYY-MM-DD. + * @type {string} + * @memberof GetLeadsResponse200DataInner + */ + 'expected_close_date'?: string | null; + /** + * The ID of the next activity associated with the lead + * @type {number} + * @memberof GetLeadsResponse200DataInner + */ + 'next_activity_id'?: number | null; + /** + * The date and time of when the lead was created. In ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. + * @type {string} + * @memberof GetLeadsResponse200DataInner + */ + 'add_time'?: string; + /** + * The date and time of when the lead was last updated. In ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. + * @type {string} + * @memberof GetLeadsResponse200DataInner + */ + 'update_time'?: string; + /** + * + * @type {string} + * @memberof GetLeadsResponse200DataInner + */ + 'visible_to'?: GetLeadsResponse200DataInnerVisibleToConst; + /** + * The BCC email of the lead + * @type {string} + * @memberof GetLeadsResponse200DataInner + */ + 'cc_email'?: string; +} + +export const GetLeadsResponse200DataInnerVisibleToConst = { + _1: '1', + _3: '3', + _5: '5', + _7: '7' +} as const; + +export type GetLeadsResponse200DataInnerVisibleToConst = typeof GetLeadsResponse200DataInnerVisibleToConst[keyof typeof GetLeadsResponse200DataInnerVisibleToConst]; + + diff --git a/models/get-leads-response200.ts b/models/get-leads-response200.ts new file mode 100644 index 00000000..7728b735 --- /dev/null +++ b/models/get-leads-response200.ts @@ -0,0 +1,48 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetLeadsResponse200DataInner } from './get-leads-response200-data-inner'; + +/** + * + * @export + * @interface GetLeadsResponse200 + */ +export interface GetLeadsResponse200 { + /** + * + * @type {boolean} + * @memberof GetLeadsResponse200 + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetLeadsResponse200 + */ + 'data'?: Array; + /** + * + * @type {FieldsResponse200AllOfAdditionalData} + * @memberof GetLeadsResponse200 + */ + 'additional_data'?: FieldsResponse200AllOfAdditionalData; +} + diff --git a/models/get-mail-threads-response200-all-of.ts b/models/get-mail-threads-response200-all-of.ts new file mode 100644 index 00000000..42963d4a --- /dev/null +++ b/models/get-mail-threads-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseMailThread } from './base-mail-thread'; + +/** + * + * @export + * @interface GetMailThreadsResponse200AllOf + */ +export interface GetMailThreadsResponse200AllOf { + /** + * The array of mail threads + * @type {Array} + * @memberof GetMailThreadsResponse200AllOf + */ + 'data'?: Array; +} + diff --git a/models/get-mail-threads-response200.ts b/models/get-mail-threads-response200.ts new file mode 100644 index 00000000..a98b865e --- /dev/null +++ b/models/get-mail-threads-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseMailThread } from './base-mail-thread'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetMailThreadsResponse200AllOf } from './get-mail-threads-response200-all-of'; + +/** + * @type GetMailThreadsResponse200 + * @export + */ +export type GetMailThreadsResponse200 = BaseResponse & GetMailThreadsResponse200AllOf; + + diff --git a/models/get-note-fields-response200-all-of-data-inner-options-inner.ts b/models/get-note-fields-response200-all-of-data-inner-options-inner.ts new file mode 100644 index 00000000..46654c15 --- /dev/null +++ b/models/get-note-fields-response200-all-of-data-inner-options-inner.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface GetNoteFieldsResponse200AllOfDataInnerOptionsInner + */ +export interface GetNoteFieldsResponse200AllOfDataInnerOptionsInner { + /** + * + * @type {number} + * @memberof GetNoteFieldsResponse200AllOfDataInnerOptionsInner + */ + 'id'?: number; + /** + * + * @type {string} + * @memberof GetNoteFieldsResponse200AllOfDataInnerOptionsInner + */ + 'label'?: string; +} + diff --git a/models/get-note-fields-response200-all-of-data-inner.ts b/models/get-note-fields-response200-all-of-data-inner.ts new file mode 100644 index 00000000..f14b901b --- /dev/null +++ b/models/get-note-fields-response200-all-of-data-inner.ts @@ -0,0 +1,104 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetNoteFieldsResponse200AllOfDataInnerOptionsInner } from './get-note-fields-response200-all-of-data-inner-options-inner'; + +/** + * + * @export + * @interface GetNoteFieldsResponse200AllOfDataInner + */ +export interface GetNoteFieldsResponse200AllOfDataInner { + /** + * The ID of the field + * @type {number} + * @memberof GetNoteFieldsResponse200AllOfDataInner + */ + 'id'?: number; + /** + * The key of the field + * @type {string} + * @memberof GetNoteFieldsResponse200AllOfDataInner + */ + 'key'?: string; + /** + * The name of the field + * @type {string} + * @memberof GetNoteFieldsResponse200AllOfDataInner + */ + 'name'?: string; + /** + * The type of the field
ValueDescription
`address`Address field (has multiple subfields, autocompleted by Google Maps)
`date`Date (format YYYY-MM-DD)
`daterange`Date-range field (has a start date and end date value, both YYYY-MM-DD)
`double`Numeric value
`enum`Options field with a single possible chosen option
`monetary`Monetary field (has a numeric value and a currency value)
`org`Organization field (contains an organization ID which is stored on the same account)
`people`Person field (contains a person ID which is stored on the same account)
`phone`Phone field (up to 255 numbers and/or characters)
`set`Options field with a possibility of having multiple chosen options
`text`Long text (up to 65k characters)
`time`Time field (format HH:MM:SS)
`timerange`Time-range field (has a start time and end time value, both HH:MM:SS)
`user`User field (contains a user ID of another Pipedrive user)
`varchar`Text (up to 255 characters)
`varchar_auto`Autocomplete text (up to 255 characters)
`visible_to`System field that keeps item\'s visibility setting
+ * @type {string} + * @memberof GetNoteFieldsResponse200AllOfDataInner + */ + 'field_type'?: GetNoteFieldsResponse200AllOfDataInnerFieldTypeConst; + /** + * The active flag of the field + * @type {boolean} + * @memberof GetNoteFieldsResponse200AllOfDataInner + */ + 'active_flag'?: boolean; + /** + * The edit flag of the field + * @type {boolean} + * @memberof GetNoteFieldsResponse200AllOfDataInner + */ + 'edit_flag'?: boolean; + /** + * Not used + * @type {boolean} + * @memberof GetNoteFieldsResponse200AllOfDataInner + */ + 'bulk_edit_allowed'?: boolean; + /** + * Whether or not the field is mandatory + * @type {boolean} + * @memberof GetNoteFieldsResponse200AllOfDataInner + */ + 'mandatory_flag'?: boolean; + /** + * The options of the field. When there are no options, `null` is returned. + * @type {Array} + * @memberof GetNoteFieldsResponse200AllOfDataInner + */ + 'options'?: Array; +} + +export const GetNoteFieldsResponse200AllOfDataInnerFieldTypeConst = { + address: 'address', + date: 'date', + daterange: 'daterange', + double: 'double', + enum: 'enum', + monetary: 'monetary', + org: 'org', + people: 'people', + phone: 'phone', + set: 'set', + text: 'text', + time: 'time', + timerange: 'timerange', + user: 'user', + varchar: 'varchar', + varchar_auto: 'varchar_auto', + visible_to: 'visible_to' +} as const; + +export type GetNoteFieldsResponse200AllOfDataInnerFieldTypeConst = typeof GetNoteFieldsResponse200AllOfDataInnerFieldTypeConst[keyof typeof GetNoteFieldsResponse200AllOfDataInnerFieldTypeConst]; + + diff --git a/models/get-note-fields-response200-all-of.ts b/models/get-note-fields-response200-all-of.ts new file mode 100644 index 00000000..4c6ab487 --- /dev/null +++ b/models/get-note-fields-response200-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetNoteFieldsResponse200AllOfDataInner } from './get-note-fields-response200-all-of-data-inner'; + +/** + * + * @export + * @interface GetNoteFieldsResponse200AllOf + */ +export interface GetNoteFieldsResponse200AllOf { + /** + * + * @type {Array} + * @memberof GetNoteFieldsResponse200AllOf + */ + 'data'?: Array; + /** + * + * @type {FieldsResponse200AllOfAdditionalData} + * @memberof GetNoteFieldsResponse200AllOf + */ + 'additional_data'?: FieldsResponse200AllOfAdditionalData; +} + diff --git a/models/get-note-fields-response200.ts b/models/get-note-fields-response200.ts new file mode 100644 index 00000000..df205510 --- /dev/null +++ b/models/get-note-fields-response200.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetNoteFieldsResponse200AllOf } from './get-note-fields-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetNoteFieldsResponse200AllOfDataInner } from './get-note-fields-response200-all-of-data-inner'; + +/** + * @type GetNoteFieldsResponse200 + * @export + */ +export type GetNoteFieldsResponse200 = BaseResponse & GetNoteFieldsResponse200AllOf; + + diff --git a/models/get-notes-response200-additional-data-pagination.ts b/models/get-notes-response200-additional-data-pagination.ts new file mode 100644 index 00000000..287f6bb8 --- /dev/null +++ b/models/get-notes-response200-additional-data-pagination.ts @@ -0,0 +1,30 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { PaginationDetailsAllOf } from './pagination-details-all-of'; + +/** + * @type GetNotesResponse200AdditionalDataPagination + * The pagination details of the list + * @export + */ +export type GetNotesResponse200AdditionalDataPagination = FieldsResponse200AllOfAdditionalData & PaginationDetailsAllOf; + + diff --git a/models/get-notes-response200-additional-data.ts b/models/get-notes-response200-additional-data.ts new file mode 100644 index 00000000..ba0802d7 --- /dev/null +++ b/models/get-notes-response200-additional-data.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetNotesResponse200AdditionalDataPagination } from './get-notes-response200-additional-data-pagination'; + +/** + * + * @export + * @interface GetNotesResponse200AdditionalData + */ +export interface GetNotesResponse200AdditionalData { + /** + * + * @type {GetNotesResponse200AdditionalDataPagination} + * @memberof GetNotesResponse200AdditionalData + */ + 'pagination'?: GetNotesResponse200AdditionalDataPagination; +} + diff --git a/models/get-notes-response200-data-inner-deal.ts b/models/get-notes-response200-data-inner-deal.ts new file mode 100644 index 00000000..47306c42 --- /dev/null +++ b/models/get-notes-response200-data-inner-deal.ts @@ -0,0 +1,30 @@ +/* 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. + */ + + + +/** + * The deal this note is attached to + * @export + * @interface GetNotesResponse200DataInnerDeal + */ +export interface GetNotesResponse200DataInnerDeal { + /** + * The title of the deal this note is attached to + * @type {string} + * @memberof GetNotesResponse200DataInnerDeal + */ + 'title'?: string; +} + diff --git a/models/get-notes-response200-data-inner-organization.ts b/models/get-notes-response200-data-inner-organization.ts new file mode 100644 index 00000000..db825497 --- /dev/null +++ b/models/get-notes-response200-data-inner-organization.ts @@ -0,0 +1,30 @@ +/* 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. + */ + + + +/** + * The organization the note is attached to + * @export + * @interface GetNotesResponse200DataInnerOrganization + */ +export interface GetNotesResponse200DataInnerOrganization { + /** + * The name of the organization the note is attached to + * @type {string} + * @memberof GetNotesResponse200DataInnerOrganization + */ + 'name'?: string; +} + diff --git a/models/get-notes-response200-data-inner-person.ts b/models/get-notes-response200-data-inner-person.ts new file mode 100644 index 00000000..a4105acc --- /dev/null +++ b/models/get-notes-response200-data-inner-person.ts @@ -0,0 +1,30 @@ +/* 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. + */ + + + +/** + * The person the note is attached to + * @export + * @interface GetNotesResponse200DataInnerPerson + */ +export interface GetNotesResponse200DataInnerPerson { + /** + * The name of the person the note is attached to + * @type {string} + * @memberof GetNotesResponse200DataInnerPerson + */ + 'name'?: string; +} + diff --git a/models/get-notes-response200-data-inner-user.ts b/models/get-notes-response200-data-inner-user.ts new file mode 100644 index 00000000..1d8dacdb --- /dev/null +++ b/models/get-notes-response200-data-inner-user.ts @@ -0,0 +1,48 @@ +/* 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. + */ + + + +/** + * The user who created the note + * @export + * @interface GetNotesResponse200DataInnerUser + */ +export interface GetNotesResponse200DataInnerUser { + /** + * The email of the note creator + * @type {string} + * @memberof GetNotesResponse200DataInnerUser + */ + 'email'?: string; + /** + * The URL of the note creator avatar picture + * @type {string} + * @memberof GetNotesResponse200DataInnerUser + */ + 'icon_url'?: string; + /** + * Whether the note is created by you or not + * @type {boolean} + * @memberof GetNotesResponse200DataInnerUser + */ + 'is_you'?: boolean; + /** + * The name of the note creator + * @type {string} + * @memberof GetNotesResponse200DataInnerUser + */ + 'name'?: string; +} + diff --git a/models/get-notes-response200-data-inner.ts b/models/get-notes-response200-data-inner.ts new file mode 100644 index 00000000..ba32e621 --- /dev/null +++ b/models/get-notes-response200-data-inner.ts @@ -0,0 +1,144 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetNotesResponse200DataInnerDeal } from './get-notes-response200-data-inner-deal'; +// May contain unused imports in some cases +// @ts-ignore +import { GetNotesResponse200DataInnerOrganization } from './get-notes-response200-data-inner-organization'; +// May contain unused imports in some cases +// @ts-ignore +import { GetNotesResponse200DataInnerPerson } from './get-notes-response200-data-inner-person'; +// May contain unused imports in some cases +// @ts-ignore +import { GetNotesResponse200DataInnerUser } from './get-notes-response200-data-inner-user'; + +/** + * + * @export + * @interface GetNotesResponse200DataInner + */ +export interface GetNotesResponse200DataInner { + /** + * The ID of the note + * @type {number} + * @memberof GetNotesResponse200DataInner + */ + 'id'?: number; + /** + * Whether the note is active or deleted + * @type {boolean} + * @memberof GetNotesResponse200DataInner + */ + 'active_flag'?: boolean; + /** + * The creation date and time of the note + * @type {string} + * @memberof GetNotesResponse200DataInner + */ + 'add_time'?: string; + /** + * The content of the note in HTML format. Subject to sanitization on the back-end. + * @type {string} + * @memberof GetNotesResponse200DataInner + */ + 'content'?: string; + /** + * + * @type {GetNotesResponse200DataInnerDeal} + * @memberof GetNotesResponse200DataInner + */ + 'deal'?: GetNotesResponse200DataInnerDeal; + /** + * The ID of the lead the note is attached to + * @type {string} + * @memberof GetNotesResponse200DataInner + */ + 'lead_id'?: string; + /** + * The ID of the deal the note is attached to + * @type {number} + * @memberof GetNotesResponse200DataInner + */ + 'deal_id'?: number; + /** + * The ID of the user who last updated the note + * @type {number} + * @memberof GetNotesResponse200DataInner + */ + 'last_update_user_id'?: number; + /** + * The ID of the organization the note is attached to + * @type {number} + * @memberof GetNotesResponse200DataInner + */ + 'org_id'?: number; + /** + * + * @type {GetNotesResponse200DataInnerOrganization} + * @memberof GetNotesResponse200DataInner + */ + 'organization'?: GetNotesResponse200DataInnerOrganization; + /** + * + * @type {GetNotesResponse200DataInnerPerson} + * @memberof GetNotesResponse200DataInner + */ + 'person'?: GetNotesResponse200DataInnerPerson; + /** + * The ID of the person the note is attached to + * @type {number} + * @memberof GetNotesResponse200DataInner + */ + 'person_id'?: number; + /** + * If true, the results are filtered by note to deal pinning state + * @type {boolean} + * @memberof GetNotesResponse200DataInner + */ + 'pinned_to_deal_flag'?: boolean; + /** + * If true, the results are filtered by note to organization pinning state + * @type {boolean} + * @memberof GetNotesResponse200DataInner + */ + 'pinned_to_organization_flag'?: boolean; + /** + * If true, the results are filtered by note to person pinning state + * @type {boolean} + * @memberof GetNotesResponse200DataInner + */ + 'pinned_to_person_flag'?: boolean; + /** + * The last updated date and time of the note + * @type {string} + * @memberof GetNotesResponse200DataInner + */ + 'update_time'?: string; + /** + * + * @type {GetNotesResponse200DataInnerUser} + * @memberof GetNotesResponse200DataInner + */ + 'user'?: GetNotesResponse200DataInnerUser; + /** + * The ID of the note creator + * @type {number} + * @memberof GetNotesResponse200DataInner + */ + 'user_id'?: number; +} + diff --git a/models/get-notes-response200.ts b/models/get-notes-response200.ts new file mode 100644 index 00000000..c814e468 --- /dev/null +++ b/models/get-notes-response200.ts @@ -0,0 +1,48 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetNotesResponse200AdditionalData } from './get-notes-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetNotesResponse200DataInner } from './get-notes-response200-data-inner'; + +/** + * + * @export + * @interface GetNotesResponse200 + */ +export interface GetNotesResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetNotesResponse200 + */ + 'success'?: boolean; + /** + * The array of notes + * @type {Array} + * @memberof GetNotesResponse200 + */ + 'data'?: Array; + /** + * + * @type {GetNotesResponse200AdditionalData} + * @memberof GetNotesResponse200 + */ + 'additional_data'?: GetNotesResponse200AdditionalData; +} + diff --git a/models/get-one-mail-thread-response200-all-of-data.ts b/models/get-one-mail-thread-response200-all-of-data.ts new file mode 100644 index 00000000..a82c7d19 --- /dev/null +++ b/models/get-one-mail-thread-response200-all-of-data.ts @@ -0,0 +1,30 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseMailThread } from './base-mail-thread'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseMailThreadAllOf1Parties } from './base-mail-thread-all-of1-parties'; + +/** + * @type GetOneMailThreadResponse200AllOfData + * The mail thread object + * @export + */ +export type GetOneMailThreadResponse200AllOfData = BaseMailThread; + + diff --git a/models/get-one-mail-thread-response200-all-of.ts b/models/get-one-mail-thread-response200-all-of.ts new file mode 100644 index 00000000..cc421f49 --- /dev/null +++ b/models/get-one-mail-thread-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetOneMailThreadResponse200AllOfData } from './get-one-mail-thread-response200-all-of-data'; + +/** + * + * @export + * @interface GetOneMailThreadResponse200AllOf + */ +export interface GetOneMailThreadResponse200AllOf { + /** + * + * @type {GetOneMailThreadResponse200AllOfData} + * @memberof GetOneMailThreadResponse200AllOf + */ + 'data'?: GetOneMailThreadResponse200AllOfData; +} + diff --git a/models/get-one-mail-thread-response200.ts b/models/get-one-mail-thread-response200.ts new file mode 100644 index 00000000..42aff652 --- /dev/null +++ b/models/get-one-mail-thread-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOneMailThreadResponse200AllOf } from './get-one-mail-thread-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOneMailThreadResponse200AllOfData } from './get-one-mail-thread-response200-all-of-data'; + +/** + * @type GetOneMailThreadResponse200 + * @export + */ +export type GetOneMailThreadResponse200 = BaseResponse & GetOneMailThreadResponse200AllOf; + + diff --git a/models/get-organization-relationship-response200-all-of.ts b/models/get-organization-relationship-response200-all-of.ts new file mode 100644 index 00000000..4dcfcbc1 --- /dev/null +++ b/models/get-organization-relationship-response200-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationRelationshipsResponse200AllOfRelatedObjects } from './get-organization-relationships-response200-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationRelationshipWithCalculatedFields } from './organization-relationship-with-calculated-fields'; + +/** + * + * @export + * @interface GetOrganizationRelationshipResponse200AllOf + */ +export interface GetOrganizationRelationshipResponse200AllOf { + /** + * + * @type {OrganizationRelationshipWithCalculatedFields} + * @memberof GetOrganizationRelationshipResponse200AllOf + */ + 'data'?: OrganizationRelationshipWithCalculatedFields; + /** + * + * @type {GetOrganizationRelationshipsResponse200AllOfRelatedObjects} + * @memberof GetOrganizationRelationshipResponse200AllOf + */ + 'related_objects'?: GetOrganizationRelationshipsResponse200AllOfRelatedObjects; +} + diff --git a/models/get-organization-relationship-response200.ts b/models/get-organization-relationship-response200.ts new file mode 100644 index 00000000..1ee3bbf8 --- /dev/null +++ b/models/get-organization-relationship-response200.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationRelationshipResponse200AllOf } from './get-organization-relationship-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationRelationshipsResponse200AllOfRelatedObjects } from './get-organization-relationships-response200-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationRelationshipWithCalculatedFields } from './organization-relationship-with-calculated-fields'; + +/** + * @type GetOrganizationRelationshipResponse200 + * @export + */ +export type GetOrganizationRelationshipResponse200 = BaseResponse & GetOrganizationRelationshipResponse200AllOf; + + diff --git a/models/get-organization-relationships-response200-all-of-related-objects.ts b/models/get-organization-relationships-response200-all-of-related-objects.ts new file mode 100644 index 00000000..1ef8d358 --- /dev/null +++ b/models/get-organization-relationships-response200-all-of-related-objects.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsOrganization } from './get-activities-response200-related-objects-organization'; + +/** + * + * @export + * @interface GetOrganizationRelationshipsResponse200AllOfRelatedObjects + */ +export interface GetOrganizationRelationshipsResponse200AllOfRelatedObjects { + /** + * + * @type {GetActivitiesResponse200RelatedObjectsOrganization} + * @memberof GetOrganizationRelationshipsResponse200AllOfRelatedObjects + */ + 'organization'?: GetActivitiesResponse200RelatedObjectsOrganization; +} + diff --git a/models/get-organization-relationships-response200-all-of.ts b/models/get-organization-relationships-response200-all-of.ts new file mode 100644 index 00000000..01cf94d5 --- /dev/null +++ b/models/get-organization-relationships-response200-all-of.ts @@ -0,0 +1,51 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationRelationshipsResponse200AllOfRelatedObjects } from './get-organization-relationships-response200-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationRelationshipDetails } from './organization-relationship-details'; + +/** + * + * @export + * @interface GetOrganizationRelationshipsResponse200AllOf + */ +export interface GetOrganizationRelationshipsResponse200AllOf { + /** + * The array of organization relationships + * @type {Array} + * @memberof GetOrganizationRelationshipsResponse200AllOf + */ + 'data'?: Array; + /** + * + * @type {FieldsResponse200AllOfAdditionalData} + * @memberof GetOrganizationRelationshipsResponse200AllOf + */ + 'additional_data'?: FieldsResponse200AllOfAdditionalData; + /** + * + * @type {GetOrganizationRelationshipsResponse200AllOfRelatedObjects} + * @memberof GetOrganizationRelationshipsResponse200AllOf + */ + 'related_objects'?: GetOrganizationRelationshipsResponse200AllOfRelatedObjects; +} + diff --git a/models/get-organization-relationships-response200.ts b/models/get-organization-relationships-response200.ts new file mode 100644 index 00000000..0348da18 --- /dev/null +++ b/models/get-organization-relationships-response200.ts @@ -0,0 +1,38 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationRelationshipsResponse200AllOf } from './get-organization-relationships-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationRelationshipsResponse200AllOfRelatedObjects } from './get-organization-relationships-response200-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationRelationshipDetails } from './organization-relationship-details'; + +/** + * @type GetOrganizationRelationshipsResponse200 + * @export + */ +export type GetOrganizationRelationshipsResponse200 = BaseResponse & GetOrganizationRelationshipsResponse200AllOf; + + diff --git a/models/get-organization-response200-all-of-additional-data-followers-followeruserid.ts b/models/get-organization-response200-all-of-additional-data-followers-followeruserid.ts new file mode 100644 index 00000000..79e4270a --- /dev/null +++ b/models/get-organization-response200-all-of-additional-data-followers-followeruserid.ts @@ -0,0 +1,27 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationResponse200AllOfAdditionalDataFollowersFOLLOWERUSERIDAllOf } from './get-organization-response200-all-of-additional-data-followers-followeruseridall-of'; + +/** + * @type GetOrganizationResponse200AllOfAdditionalDataFollowersFOLLOWERUSERID + * The user ID of the follower + * @export + */ +export type GetOrganizationResponse200AllOfAdditionalDataFollowersFOLLOWERUSERID = GetOrganizationResponse200AllOfAdditionalDataFollowersFOLLOWERUSERIDAllOf; + + diff --git a/models/get-organization-response200-all-of-additional-data-followers-followeruseridall-of-all-of.ts b/models/get-organization-response200-all-of-additional-data-followers-followeruseridall-of-all-of.ts new file mode 100644 index 00000000..ac100e8c --- /dev/null +++ b/models/get-organization-response200-all-of-additional-data-followers-followeruseridall-of-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface GetOrganizationResponse200AllOfAdditionalDataFollowersFOLLOWERUSERIDAllOfAllOf + */ +export interface GetOrganizationResponse200AllOfAdditionalDataFollowersFOLLOWERUSERIDAllOfAllOf { + /** + * The ID of the follower associated with the item + * @type {number} + * @memberof GetOrganizationResponse200AllOfAdditionalDataFollowersFOLLOWERUSERIDAllOfAllOf + */ + 'id'?: number; +} + diff --git a/models/get-organization-response200-all-of-additional-data-followers-followeruseridall-of-all-of1.ts b/models/get-organization-response200-all-of-additional-data-followers-followeruseridall-of-all-of1.ts new file mode 100644 index 00000000..b4688b92 --- /dev/null +++ b/models/get-organization-response200-all-of-additional-data-followers-followeruseridall-of-all-of1.ts @@ -0,0 +1,48 @@ +/* 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 + * @interface GetOrganizationResponse200AllOfAdditionalDataFollowersFOLLOWERUSERIDAllOfAllOf1 + */ +export interface GetOrganizationResponse200AllOfAdditionalDataFollowersFOLLOWERUSERIDAllOfAllOf1 { + /** + * The name of the follower + * @type {string} + * @memberof GetOrganizationResponse200AllOfAdditionalDataFollowersFOLLOWERUSERIDAllOfAllOf1 + */ + 'name'?: string; + /** + * The email of the follower + * @type {string} + * @memberof GetOrganizationResponse200AllOfAdditionalDataFollowersFOLLOWERUSERIDAllOfAllOf1 + */ + 'email'?: string; + /** + * The user ID of the follower + * @type {number} + * @memberof GetOrganizationResponse200AllOfAdditionalDataFollowersFOLLOWERUSERIDAllOfAllOf1 + */ + 'user_id'?: number; + /** + * The follower picture hash + * @type {string} + * @memberof GetOrganizationResponse200AllOfAdditionalDataFollowersFOLLOWERUSERIDAllOfAllOf1 + */ + 'pic_hash'?: string; +} + diff --git a/models/get-organization-response200-all-of-additional-data-followers-followeruseridall-of.ts b/models/get-organization-response200-all-of-additional-data-followers-followeruseridall-of.ts new file mode 100644 index 00000000..40c6dcb2 --- /dev/null +++ b/models/get-organization-response200-all-of-additional-data-followers-followeruseridall-of.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationResponse200AllOfAdditionalDataFollowersFOLLOWERUSERIDAllOfAllOf } from './get-organization-response200-all-of-additional-data-followers-followeruseridall-of-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationResponse200AllOfAdditionalDataFollowersFOLLOWERUSERIDAllOfAllOf1 } from './get-organization-response200-all-of-additional-data-followers-followeruseridall-of-all-of1'; + +/** + * @type GetOrganizationResponse200AllOfAdditionalDataFollowersFOLLOWERUSERIDAllOf + * @export + */ +export type GetOrganizationResponse200AllOfAdditionalDataFollowersFOLLOWERUSERIDAllOf = GetOrganizationResponse200AllOfAdditionalDataFollowersFOLLOWERUSERIDAllOfAllOf & GetOrganizationResponse200AllOfAdditionalDataFollowersFOLLOWERUSERIDAllOfAllOf1; + + diff --git a/models/get-organization-response200-all-of-additional-data-followers.ts b/models/get-organization-response200-all-of-additional-data-followers.ts new file mode 100644 index 00000000..d1592692 --- /dev/null +++ b/models/get-organization-response200-all-of-additional-data-followers.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationResponse200AllOfAdditionalDataFollowersFOLLOWERUSERID } from './get-organization-response200-all-of-additional-data-followers-followeruserid'; + +/** + * The follower that is associated with the item + * @export + * @interface GetOrganizationResponse200AllOfAdditionalDataFollowers + */ +export interface GetOrganizationResponse200AllOfAdditionalDataFollowers { + /** + * + * @type {GetOrganizationResponse200AllOfAdditionalDataFollowersFOLLOWERUSERID} + * @memberof GetOrganizationResponse200AllOfAdditionalDataFollowers + */ + 'FOLLOWER_USER_ID'?: GetOrganizationResponse200AllOfAdditionalDataFollowersFOLLOWERUSERID; +} + diff --git a/models/get-organization-response200-all-of-additional-data.ts b/models/get-organization-response200-all-of-additional-data.ts new file mode 100644 index 00000000..c1aa0af0 --- /dev/null +++ b/models/get-organization-response200-all-of-additional-data.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationResponse200AllOfAdditionalDataFollowers } from './get-organization-response200-all-of-additional-data-followers'; + +/** + * + * @export + * @interface GetOrganizationResponse200AllOfAdditionalData + */ +export interface GetOrganizationResponse200AllOfAdditionalData { + /** + * + * @type {GetOrganizationResponse200AllOfAdditionalDataFollowers} + * @memberof GetOrganizationResponse200AllOfAdditionalData + */ + 'followers'?: GetOrganizationResponse200AllOfAdditionalDataFollowers; + /** + * Dropbox email for the organization + * @type {string} + * @memberof GetOrganizationResponse200AllOfAdditionalData + */ + 'dropbox_email'?: string; +} + diff --git a/models/get-organization-response200-all-of.ts b/models/get-organization-response200-all-of.ts new file mode 100644 index 00000000..e5248a15 --- /dev/null +++ b/models/get-organization-response200-all-of.ts @@ -0,0 +1,51 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationResponse200AllOfAdditionalData } from './get-organization-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsResponse200AllOfRelatedObjects } from './get-organizations-response200-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationItem } from './organization-item'; + +/** + * + * @export + * @interface GetOrganizationResponse200AllOf + */ +export interface GetOrganizationResponse200AllOf { + /** + * + * @type {OrganizationItem} + * @memberof GetOrganizationResponse200AllOf + */ + 'data'?: OrganizationItem; + /** + * + * @type {GetOrganizationResponse200AllOfAdditionalData} + * @memberof GetOrganizationResponse200AllOf + */ + 'additional_data'?: GetOrganizationResponse200AllOfAdditionalData; + /** + * + * @type {GetOrganizationsResponse200AllOfRelatedObjects} + * @memberof GetOrganizationResponse200AllOf + */ + 'related_objects'?: GetOrganizationsResponse200AllOfRelatedObjects; +} + diff --git a/models/get-organization-response200.ts b/models/get-organization-response200.ts new file mode 100644 index 00000000..679cd481 --- /dev/null +++ b/models/get-organization-response200.ts @@ -0,0 +1,38 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationResponse200AllOf } from './get-organization-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationResponse200AllOfAdditionalData } from './get-organization-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsResponse200AllOfRelatedObjects } from './get-organizations-response200-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationItem } from './organization-item'; + +/** + * @type GetOrganizationResponse200 + * @export + */ +export type GetOrganizationResponse200 = BaseResponse & GetOrganizationResponse200AllOf; + + diff --git a/models/get-organizations-collection200-response.ts b/models/get-organizations-collection200-response.ts new file mode 100644 index 00000000..f8f72936 --- /dev/null +++ b/models/get-organizations-collection200-response.ts @@ -0,0 +1,48 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesCollectionResponse200AdditionalData } from './get-activities-collection-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationsCollectionResponseObject } from './organizations-collection-response-object'; + +/** + * + * @export + * @interface GetOrganizationsCollection200Response + */ +export interface GetOrganizationsCollection200Response { + /** + * + * @type {boolean} + * @memberof GetOrganizationsCollection200Response + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetOrganizationsCollection200Response + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesCollectionResponse200AdditionalData} + * @memberof GetOrganizationsCollection200Response + */ + 'additional_data'?: GetActivitiesCollectionResponse200AdditionalData; +} + diff --git a/models/get-organizations-response200-all-of-related-objects-picture-pictureid.ts b/models/get-organizations-response200-all-of-related-objects-picture-pictureid.ts new file mode 100644 index 00000000..76618935 --- /dev/null +++ b/models/get-organizations-response200-all-of-related-objects-picture-pictureid.ts @@ -0,0 +1,30 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOfPictureId } from './person-item-all-of-picture-id'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOfPictureIdAllOf1Pictures } from './person-item-all-of-picture-id-all-of1-pictures'; + +/** + * @type GetOrganizationsResponse200AllOfRelatedObjectsPicturePICTUREID + * The ID of the picture + * @export + */ +export type GetOrganizationsResponse200AllOfRelatedObjectsPicturePICTUREID = PersonItemAllOfPictureId; + + diff --git a/models/get-organizations-response200-all-of-related-objects-picture.ts b/models/get-organizations-response200-all-of-related-objects-picture.ts new file mode 100644 index 00000000..ce383dc7 --- /dev/null +++ b/models/get-organizations-response200-all-of-related-objects-picture.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsResponse200AllOfRelatedObjectsPicturePICTUREID } from './get-organizations-response200-all-of-related-objects-picture-pictureid'; + +/** + * The picture that is associated with the item + * @export + * @interface GetOrganizationsResponse200AllOfRelatedObjectsPicture + */ +export interface GetOrganizationsResponse200AllOfRelatedObjectsPicture { + /** + * + * @type {GetOrganizationsResponse200AllOfRelatedObjectsPicturePICTUREID} + * @memberof GetOrganizationsResponse200AllOfRelatedObjectsPicture + */ + 'PICTURE_ID'?: GetOrganizationsResponse200AllOfRelatedObjectsPicturePICTUREID; +} + diff --git a/models/get-organizations-response200-all-of-related-objects.ts b/models/get-organizations-response200-all-of-related-objects.ts new file mode 100644 index 00000000..df508577 --- /dev/null +++ b/models/get-organizations-response200-all-of-related-objects.ts @@ -0,0 +1,51 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsOrganization } from './get-activities-response200-related-objects-organization'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsUser } from './get-activities-response200-related-objects-user'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsResponse200AllOfRelatedObjectsPicture } from './get-organizations-response200-all-of-related-objects-picture'; + +/** + * + * @export + * @interface GetOrganizationsResponse200AllOfRelatedObjects + */ +export interface GetOrganizationsResponse200AllOfRelatedObjects { + /** + * + * @type {GetActivitiesResponse200RelatedObjectsOrganization} + * @memberof GetOrganizationsResponse200AllOfRelatedObjects + */ + 'organization'?: GetActivitiesResponse200RelatedObjectsOrganization; + /** + * + * @type {GetActivitiesResponse200RelatedObjectsUser} + * @memberof GetOrganizationsResponse200AllOfRelatedObjects + */ + 'user'?: GetActivitiesResponse200RelatedObjectsUser; + /** + * + * @type {GetOrganizationsResponse200AllOfRelatedObjectsPicture} + * @memberof GetOrganizationsResponse200AllOfRelatedObjects + */ + 'picture'?: GetOrganizationsResponse200AllOfRelatedObjectsPicture; +} + diff --git a/models/get-organizations-response200-all-of.ts b/models/get-organizations-response200-all-of.ts new file mode 100644 index 00000000..02d71ad5 --- /dev/null +++ b/models/get-organizations-response200-all-of.ts @@ -0,0 +1,51 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseOrganizationItem } from './base-organization-item'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalData } from './get-activities-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsResponse200AllOfRelatedObjects } from './get-organizations-response200-all-of-related-objects'; + +/** + * + * @export + * @interface GetOrganizationsResponse200AllOf + */ +export interface GetOrganizationsResponse200AllOf { + /** + * The array of organizations + * @type {Array} + * @memberof GetOrganizationsResponse200AllOf + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesResponse200AdditionalData} + * @memberof GetOrganizationsResponse200AllOf + */ + 'additional_data'?: GetActivitiesResponse200AdditionalData; + /** + * + * @type {GetOrganizationsResponse200AllOfRelatedObjects} + * @memberof GetOrganizationsResponse200AllOf + */ + 'related_objects'?: GetOrganizationsResponse200AllOfRelatedObjects; +} + diff --git a/models/get-organizations-response200.ts b/models/get-organizations-response200.ts new file mode 100644 index 00000000..4a35d48b --- /dev/null +++ b/models/get-organizations-response200.ts @@ -0,0 +1,38 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseOrganizationItem } from './base-organization-item'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalData } from './get-activities-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsResponse200AllOf } from './get-organizations-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsResponse200AllOfRelatedObjects } from './get-organizations-response200-all-of-related-objects'; + +/** + * @type GetOrganizationsResponse200 + * @export + */ +export type GetOrganizationsResponse200 = BaseResponse & GetOrganizationsResponse200AllOf; + + diff --git a/models/get-permission-sets-response200-all-of-data-inner.ts b/models/get-permission-sets-response200-all-of-data-inner.ts new file mode 100644 index 00000000..7005336f --- /dev/null +++ b/models/get-permission-sets-response200-all-of-data-inner.ts @@ -0,0 +1,79 @@ +/* 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 + * @interface GetPermissionSetsResponse200AllOfDataInner + */ +export interface GetPermissionSetsResponse200AllOfDataInner { + /** + * The ID of user permission set + * @type {string} + * @memberof GetPermissionSetsResponse200AllOfDataInner + */ + 'id'?: string; + /** + * The name of the permission set + * @type {string} + * @memberof GetPermissionSetsResponse200AllOfDataInner + */ + 'name'?: string; + /** + * The description of the permission set + * @type {string} + * @memberof GetPermissionSetsResponse200AllOfDataInner + */ + 'description'?: string; + /** + * The app that permission set belongs to + * @type {string} + * @memberof GetPermissionSetsResponse200AllOfDataInner + */ + 'app'?: GetPermissionSetsResponse200AllOfDataInnerAppConst; + /** + * The type of permission set + * @type {string} + * @memberof GetPermissionSetsResponse200AllOfDataInner + */ + 'type'?: GetPermissionSetsResponse200AllOfDataInnerTypeConst; + /** + * The number of users assigned to this permission set + * @type {number} + * @memberof GetPermissionSetsResponse200AllOfDataInner + */ + 'assignment_count'?: number; +} + +export const GetPermissionSetsResponse200AllOfDataInnerAppConst = { + sales: 'sales', + projects: 'projects', + campaigns: 'campaigns', + global: 'global', + account_settings: 'account_settings' +} as const; + +export type GetPermissionSetsResponse200AllOfDataInnerAppConst = typeof GetPermissionSetsResponse200AllOfDataInnerAppConst[keyof typeof GetPermissionSetsResponse200AllOfDataInnerAppConst]; +export const GetPermissionSetsResponse200AllOfDataInnerTypeConst = { + admin: 'admin', + manager: 'manager', + regular: 'regular', + custom: 'custom' +} as const; + +export type GetPermissionSetsResponse200AllOfDataInnerTypeConst = typeof GetPermissionSetsResponse200AllOfDataInnerTypeConst[keyof typeof GetPermissionSetsResponse200AllOfDataInnerTypeConst]; + + diff --git a/models/get-permission-sets-response200-all-of.ts b/models/get-permission-sets-response200-all-of.ts new file mode 100644 index 00000000..566a5b9c --- /dev/null +++ b/models/get-permission-sets-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetPermissionSetsResponse200AllOfDataInner } from './get-permission-sets-response200-all-of-data-inner'; + +/** + * + * @export + * @interface GetPermissionSetsResponse200AllOf + */ +export interface GetPermissionSetsResponse200AllOf { + /** + * The array of permission set + * @type {Array} + * @memberof GetPermissionSetsResponse200AllOf + */ + 'data'?: Array; +} + diff --git a/models/get-permission-sets-response200.ts b/models/get-permission-sets-response200.ts new file mode 100644 index 00000000..c9183afb --- /dev/null +++ b/models/get-permission-sets-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPermissionSetsResponse200AllOf } from './get-permission-sets-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPermissionSetsResponse200AllOfDataInner } from './get-permission-sets-response200-all-of-data-inner'; + +/** + * @type GetPermissionSetsResponse200 + * @export + */ +export type GetPermissionSetsResponse200 = BaseResponse & GetPermissionSetsResponse200AllOf; + + diff --git a/models/get-person-products-response200-all-of-data-inner-dealid.ts b/models/get-person-products-response200-all-of-data-inner-dealid.ts new file mode 100644 index 00000000..8faaab7f --- /dev/null +++ b/models/get-person-products-response200-all-of-data-inner-dealid.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonProductsResponse200AllOfDataInnerDEALIDDeal } from './get-person-products-response200-all-of-data-inner-dealiddeal'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonProductsResponse200AllOfDataInnerDEALIDProduct } from './get-person-products-response200-all-of-data-inner-dealidproduct'; + +/** + * + * @export + * @interface GetPersonProductsResponse200AllOfDataInnerDEALID + */ +export interface GetPersonProductsResponse200AllOfDataInnerDEALID { + /** + * + * @type {GetPersonProductsResponse200AllOfDataInnerDEALIDDeal} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALID + */ + 'deal'?: GetPersonProductsResponse200AllOfDataInnerDEALIDDeal; + /** + * + * @type {GetPersonProductsResponse200AllOfDataInnerDEALIDProduct} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALID + */ + 'product'?: GetPersonProductsResponse200AllOfDataInnerDEALIDProduct; +} + diff --git a/models/get-person-products-response200-all-of-data-inner-dealiddeal.ts b/models/get-person-products-response200-all-of-data-inner-dealiddeal.ts new file mode 100644 index 00000000..67a26b69 --- /dev/null +++ b/models/get-person-products-response200-all-of-data-inner-dealiddeal.ts @@ -0,0 +1,282 @@ +/* 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 + * @interface GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ +export interface GetPersonProductsResponse200AllOfDataInnerDEALIDDeal { + /** + * The ID of the deal + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'id'?: number; + /** + * The ID of the company + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'company_id'?: number; + /** + * The ID of the deal creator + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'creator_user_id'?: number; + /** + * The ID of the user + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'user_id'?: number; + /** + * The ID of the person associated with the deal + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'person_id'?: number; + /** + * The ID of the organization associated with the deal + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'org_id'?: number; + /** + * The ID of the deal stage + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'stage_id'?: number; + /** + * The title of the deal + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'title'?: string; + /** + * The value of the deal + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'value'?: number; + /** + * The currency associated with the deal + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'currency'?: string; + /** + * The creation date and time of the deal + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'add_time'?: string; + /** + * The first creation date and time of the deal + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'first_add_time'?: string; + /** + * The last updated date and time of the deal + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'update_time'?: string; + /** + * The last updated date and time of the deal stage + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'stage_change_time'?: string; + /** + * Whether the deal is active or not + * @type {boolean} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'active'?: boolean; + /** + * Whether the deal is deleted or not + * @type {boolean} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'deleted'?: boolean; + /** + * The status of the deal + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'status'?: string; + /** + * The success probability percentage of the deal + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'probability'?: number | null; + /** + * The date of the next activity associated with the deal + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'next_activity_date'?: string; + /** + * The time of the next activity associated with the deal + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'next_activity_time'?: string; + /** + * The ID of the next activity associated with the deal + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'next_activity_id'?: number | null; + /** + * The ID of the last activity associated with the deal + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'last_activity_id'?: number | null; + /** + * The date of the last activity associated with the deal + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'last_activity_date'?: string | null; + /** + * The reason for losing the deal + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'lost_reason'?: string | null; + /** + * The visibility of the deal + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'visible_to'?: string; + /** + * The date and time of closing the deal + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'close_time'?: string | null; + /** + * The ID of the pipeline associated with the deal + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'pipeline_id'?: number; + /** + * The date and time of changing the deal status as won + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'won_time'?: string; + /** + * The date and time of the first time changing the deal status as won + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'first_won_time'?: string; + /** + * The date and time of changing the deal status as lost + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'lost_time'?: string; + /** + * The number of products associated with the deal + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'products_count'?: number; + /** + * The number of files associated with the deal + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'files_count'?: number; + /** + * The number of notes associated with the deal + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'notes_count'?: number; + /** + * The number of followers associated with the deal + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'followers_count'?: number; + /** + * The number of emails associated with the deal + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'email_messages_count'?: number; + /** + * The number of activities associated with the deal + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'activities_count'?: number; + /** + * The number of completed activities associated with the deal + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'done_activities_count'?: number; + /** + * The number of incomplete activities associated with the deal + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'undone_activities_count'?: number; + /** + * The number of participants associated with the deal + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'participants_count'?: number; + /** + * The expected close date of the deal + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'expected_close_date'?: string; + /** + * The date and time of the last incoming email associated with the deal + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'last_incoming_mail_time'?: string; + /** + * The date and time of the last outgoing email associated with the deal + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'last_outgoing_mail_time'?: string; + /** + * The label or multiple labels assigned to the deal + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDDeal + */ + 'label'?: string; +} + diff --git a/models/get-person-products-response200-all-of-data-inner-dealidproduct.ts b/models/get-person-products-response200-all-of-data-inner-dealidproduct.ts new file mode 100644 index 00000000..5756ceff --- /dev/null +++ b/models/get-person-products-response200-all-of-data-inner-dealidproduct.ts @@ -0,0 +1,136 @@ +/* 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 + * @interface GetPersonProductsResponse200AllOfDataInnerDEALIDProduct + */ +export interface GetPersonProductsResponse200AllOfDataInnerDEALIDProduct { + /** + * The ID of the product + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDProduct + */ + 'id'?: number; + /** + * The ID of the company + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDProduct + */ + 'company_id'?: number; + /** + * The name of the product + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDProduct + */ + 'name'?: string; + /** + * The product code + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDProduct + */ + 'code'?: string; + /** + * The description of the product + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDProduct + */ + 'description'?: string; + /** + * The unit in which this product is sold + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDProduct + */ + 'unit'?: string; + /** + * The tax percentage + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDProduct + */ + 'tax'?: number; + /** + * The category of the product + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDProduct + */ + 'category'?: string; + /** + * Whether this product will be made active or not + * @type {boolean} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDProduct + */ + 'active_flag'?: boolean; + /** + * Whether this product can be selected in deals or not + * @type {boolean} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDProduct + */ + 'selectable'?: boolean; + /** + * The first letter of the product name + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDProduct + */ + 'first_char'?: string; + /** + * + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDProduct + */ + 'visible_to'?: GetPersonProductsResponse200AllOfDataInnerDEALIDProductVisibleToConst; + /** + * The ID of the user who will be marked as the owner of this product. When omitted, the authorized user ID will be used. + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDProduct + */ + 'owner_id'?: number; + /** + * The count of files + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDProduct + */ + 'files_count'?: number; + /** + * The date and time when the product was added to the deal + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDProduct + */ + 'add_time'?: string; + /** + * The date and time when the product was updated to the deal + * @type {string} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDProduct + */ + 'update_time'?: string; + /** + * The ID of the deal + * @type {number} + * @memberof GetPersonProductsResponse200AllOfDataInnerDEALIDProduct + */ + 'deal_id'?: number; +} + +export const GetPersonProductsResponse200AllOfDataInnerDEALIDProductVisibleToConst = { + _1: '1', + _3: '3', + _5: '5', + _7: '7' +} as const; + +export type GetPersonProductsResponse200AllOfDataInnerDEALIDProductVisibleToConst = typeof GetPersonProductsResponse200AllOfDataInnerDEALIDProductVisibleToConst[keyof typeof GetPersonProductsResponse200AllOfDataInnerDEALIDProductVisibleToConst]; + + diff --git a/models/get-person-products-response200-all-of-data-inner.ts b/models/get-person-products-response200-all-of-data-inner.ts new file mode 100644 index 00000000..a1c51e43 --- /dev/null +++ b/models/get-person-products-response200-all-of-data-inner.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonProductsResponse200AllOfDataInnerDEALID } from './get-person-products-response200-all-of-data-inner-dealid'; + +/** + * + * @export + * @interface GetPersonProductsResponse200AllOfDataInner + */ +export interface GetPersonProductsResponse200AllOfDataInner { + /** + * + * @type {GetPersonProductsResponse200AllOfDataInnerDEALID} + * @memberof GetPersonProductsResponse200AllOfDataInner + */ + 'DEAL_ID'?: GetPersonProductsResponse200AllOfDataInnerDEALID; +} + diff --git a/models/get-person-products-response200-all-of.ts b/models/get-person-products-response200-all-of.ts new file mode 100644 index 00000000..ccbde4c8 --- /dev/null +++ b/models/get-person-products-response200-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalData } from './get-activities-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonProductsResponse200AllOfDataInner } from './get-person-products-response200-all-of-data-inner'; + +/** + * + * @export + * @interface GetPersonProductsResponse200AllOf + */ +export interface GetPersonProductsResponse200AllOf { + /** + * The array of deal products + * @type {Array} + * @memberof GetPersonProductsResponse200AllOf + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesResponse200AdditionalData} + * @memberof GetPersonProductsResponse200AllOf + */ + 'additional_data'?: GetActivitiesResponse200AdditionalData; +} + diff --git a/models/get-person-products-response200.ts b/models/get-person-products-response200.ts new file mode 100644 index 00000000..8bbcdb7c --- /dev/null +++ b/models/get-person-products-response200.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalData } from './get-activities-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonProductsResponse200AllOf } from './get-person-products-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonProductsResponse200AllOfDataInner } from './get-person-products-response200-all-of-data-inner'; + +/** + * @type GetPersonProductsResponse200 + * @export + */ +export type GetPersonProductsResponse200 = BaseResponse & GetPersonProductsResponse200AllOf; + + diff --git a/models/get-person-response200-all-of-additional-data.ts b/models/get-person-response200-all-of-additional-data.ts new file mode 100644 index 00000000..11307083 --- /dev/null +++ b/models/get-person-response200-all-of-additional-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface GetPersonResponse200AllOfAdditionalData + */ +export interface GetPersonResponse200AllOfAdditionalData { + /** + * Dropbox email for the person + * @type {string} + * @memberof GetPersonResponse200AllOfAdditionalData + */ + 'dropbox_email'?: string; +} + diff --git a/models/get-person-response200-all-of.ts b/models/get-person-response200-all-of.ts new file mode 100644 index 00000000..d7b497f8 --- /dev/null +++ b/models/get-person-response200-all-of.ts @@ -0,0 +1,51 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsResponse200AllOfRelatedObjects } from './get-organizations-response200-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonResponse200AllOfAdditionalData } from './get-person-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItem } from './person-item'; + +/** + * + * @export + * @interface GetPersonResponse200AllOf + */ +export interface GetPersonResponse200AllOf { + /** + * + * @type {PersonItem} + * @memberof GetPersonResponse200AllOf + */ + 'data'?: PersonItem; + /** + * + * @type {GetPersonResponse200AllOfAdditionalData} + * @memberof GetPersonResponse200AllOf + */ + 'additional_data'?: GetPersonResponse200AllOfAdditionalData; + /** + * + * @type {GetOrganizationsResponse200AllOfRelatedObjects} + * @memberof GetPersonResponse200AllOf + */ + 'related_objects'?: GetOrganizationsResponse200AllOfRelatedObjects; +} + diff --git a/models/get-person-response200.ts b/models/get-person-response200.ts new file mode 100644 index 00000000..1be3fd8d --- /dev/null +++ b/models/get-person-response200.ts @@ -0,0 +1,38 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsResponse200AllOfRelatedObjects } from './get-organizations-response200-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonResponse200AllOf } from './get-person-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonResponse200AllOfAdditionalData } from './get-person-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItem } from './person-item'; + +/** + * @type GetPersonResponse200 + * @export + */ +export type GetPersonResponse200 = BaseResponse & GetPersonResponse200AllOf; + + diff --git a/models/get-persons-collection200-response.ts b/models/get-persons-collection200-response.ts new file mode 100644 index 00000000..d0679be1 --- /dev/null +++ b/models/get-persons-collection200-response.ts @@ -0,0 +1,48 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesCollectionResponse200AdditionalData } from './get-activities-collection-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonsCollectionResponseObject } from './persons-collection-response-object'; + +/** + * + * @export + * @interface GetPersonsCollection200Response + */ +export interface GetPersonsCollection200Response { + /** + * + * @type {boolean} + * @memberof GetPersonsCollection200Response + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetPersonsCollection200Response + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesCollectionResponse200AdditionalData} + * @memberof GetPersonsCollection200Response + */ + 'additional_data'?: GetActivitiesCollectionResponse200AdditionalData; +} + diff --git a/models/get-persons-response200-all-of.ts b/models/get-persons-response200-all-of.ts new file mode 100644 index 00000000..4ec8909e --- /dev/null +++ b/models/get-persons-response200-all-of.ts @@ -0,0 +1,51 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalData } from './get-activities-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsResponse200AllOfRelatedObjects } from './get-organizations-response200-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItem } from './person-item'; + +/** + * + * @export + * @interface GetPersonsResponse200AllOf + */ +export interface GetPersonsResponse200AllOf { + /** + * The array of persons + * @type {Array} + * @memberof GetPersonsResponse200AllOf + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesResponse200AdditionalData} + * @memberof GetPersonsResponse200AllOf + */ + 'additional_data'?: GetActivitiesResponse200AdditionalData; + /** + * + * @type {GetOrganizationsResponse200AllOfRelatedObjects} + * @memberof GetPersonsResponse200AllOf + */ + 'related_objects'?: GetOrganizationsResponse200AllOfRelatedObjects; +} + diff --git a/models/get-persons-response200.ts b/models/get-persons-response200.ts new file mode 100644 index 00000000..05ac336d --- /dev/null +++ b/models/get-persons-response200.ts @@ -0,0 +1,38 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalData } from './get-activities-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsResponse200AllOfRelatedObjects } from './get-organizations-response200-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonsResponse200AllOf } from './get-persons-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItem } from './person-item'; + +/** + * @type GetPersonsResponse200 + * @export + */ +export type GetPersonsResponse200 = BaseResponse & GetPersonsResponse200AllOf; + + diff --git a/models/get-pipeline-conversion-statistics-response200-all-of-data-stage-conversions-inner.ts b/models/get-pipeline-conversion-statistics-response200-all-of-data-stage-conversions-inner.ts new file mode 100644 index 00000000..aa3f988a --- /dev/null +++ b/models/get-pipeline-conversion-statistics-response200-all-of-data-stage-conversions-inner.ts @@ -0,0 +1,42 @@ +/* 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 + * @interface GetPipelineConversionStatisticsResponse200AllOfDataStageConversionsInner + */ +export interface GetPipelineConversionStatisticsResponse200AllOfDataStageConversionsInner { + /** + * The stage ID from where conversion starts + * @type {number} + * @memberof GetPipelineConversionStatisticsResponse200AllOfDataStageConversionsInner + */ + 'from_stage_id'?: number; + /** + * The stage ID to where conversion ends + * @type {number} + * @memberof GetPipelineConversionStatisticsResponse200AllOfDataStageConversionsInner + */ + 'to_stage_id'?: number; + /** + * The conversion rate + * @type {number} + * @memberof GetPipelineConversionStatisticsResponse200AllOfDataStageConversionsInner + */ + 'conversion_rate'?: number; +} + diff --git a/models/get-pipeline-conversion-statistics-response200-all-of-data.ts b/models/get-pipeline-conversion-statistics-response200-all-of-data.ts new file mode 100644 index 00000000..dfd2e6f5 --- /dev/null +++ b/models/get-pipeline-conversion-statistics-response200-all-of-data.ts @@ -0,0 +1,45 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetPipelineConversionStatisticsResponse200AllOfDataStageConversionsInner } from './get-pipeline-conversion-statistics-response200-all-of-data-stage-conversions-inner'; + +/** + * The pipeline object + * @export + * @interface GetPipelineConversionStatisticsResponse200AllOfData + */ +export interface GetPipelineConversionStatisticsResponse200AllOfData { + /** + * The stage conversions + * @type {Array} + * @memberof GetPipelineConversionStatisticsResponse200AllOfData + */ + 'stage_conversions'?: Array; + /** + * The won conversion + * @type {number} + * @memberof GetPipelineConversionStatisticsResponse200AllOfData + */ + 'won_conversion'?: number; + /** + * The lost conversion + * @type {number} + * @memberof GetPipelineConversionStatisticsResponse200AllOfData + */ + 'lost_conversion'?: number; +} + diff --git a/models/get-pipeline-conversion-statistics-response200-all-of.ts b/models/get-pipeline-conversion-statistics-response200-all-of.ts new file mode 100644 index 00000000..1602f283 --- /dev/null +++ b/models/get-pipeline-conversion-statistics-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetPipelineConversionStatisticsResponse200AllOfData } from './get-pipeline-conversion-statistics-response200-all-of-data'; + +/** + * + * @export + * @interface GetPipelineConversionStatisticsResponse200AllOf + */ +export interface GetPipelineConversionStatisticsResponse200AllOf { + /** + * + * @type {GetPipelineConversionStatisticsResponse200AllOfData} + * @memberof GetPipelineConversionStatisticsResponse200AllOf + */ + 'data'?: GetPipelineConversionStatisticsResponse200AllOfData; +} + diff --git a/models/get-pipeline-conversion-statistics-response200.ts b/models/get-pipeline-conversion-statistics-response200.ts new file mode 100644 index 00000000..d68ee891 --- /dev/null +++ b/models/get-pipeline-conversion-statistics-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPipelineConversionStatisticsResponse200AllOf } from './get-pipeline-conversion-statistics-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPipelineConversionStatisticsResponse200AllOfData } from './get-pipeline-conversion-statistics-response200-all-of-data'; + +/** + * @type GetPipelineConversionStatisticsResponse200 + * @export + */ +export type GetPipelineConversionStatisticsResponse200 = BaseResponse & GetPipelineConversionStatisticsResponse200AllOf; + + diff --git a/models/get-pipeline-movement-statistics-response200-all-of-data-average-age-in-days-by-stages-inner.ts b/models/get-pipeline-movement-statistics-response200-all-of-data-average-age-in-days-by-stages-inner.ts new file mode 100644 index 00000000..4de8df19 --- /dev/null +++ b/models/get-pipeline-movement-statistics-response200-all-of-data-average-age-in-days-by-stages-inner.ts @@ -0,0 +1,36 @@ +/* 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. + */ + + + +/** + * The moved deals average age by the stage + * @export + * @interface GetPipelineMovementStatisticsResponse200AllOfDataAverageAgeInDaysByStagesInner + */ +export interface GetPipelineMovementStatisticsResponse200AllOfDataAverageAgeInDaysByStagesInner { + /** + * The stage ID + * @type {number} + * @memberof GetPipelineMovementStatisticsResponse200AllOfDataAverageAgeInDaysByStagesInner + */ + 'stage_id'?: number; + /** + * The average deals age in specific stage + * @type {number} + * @memberof GetPipelineMovementStatisticsResponse200AllOfDataAverageAgeInDaysByStagesInner + */ + 'value'?: number; +} + diff --git a/models/get-pipeline-movement-statistics-response200-all-of-data-average-age-in-days.ts b/models/get-pipeline-movement-statistics-response200-all-of-data-average-age-in-days.ts new file mode 100644 index 00000000..5ed6105f --- /dev/null +++ b/models/get-pipeline-movement-statistics-response200-all-of-data-average-age-in-days.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetPipelineMovementStatisticsResponse200AllOfDataAverageAgeInDaysByStagesInner } from './get-pipeline-movement-statistics-response200-all-of-data-average-age-in-days-by-stages-inner'; + +/** + * The moved deals average age in days + * @export + * @interface GetPipelineMovementStatisticsResponse200AllOfDataAverageAgeInDays + */ +export interface GetPipelineMovementStatisticsResponse200AllOfDataAverageAgeInDays { + /** + * The moved deals average age across all stages + * @type {number} + * @memberof GetPipelineMovementStatisticsResponse200AllOfDataAverageAgeInDays + */ + 'across_all_stages'?: number; + /** + * The moved deals average age by stages + * @type {Array} + * @memberof GetPipelineMovementStatisticsResponse200AllOfDataAverageAgeInDays + */ + 'by_stages'?: Array; +} + diff --git a/models/get-pipeline-movement-statistics-response200-all-of-data-movements-between-stages.ts b/models/get-pipeline-movement-statistics-response200-all-of-data-movements-between-stages.ts new file mode 100644 index 00000000..c2f764f5 --- /dev/null +++ b/models/get-pipeline-movement-statistics-response200-all-of-data-movements-between-stages.ts @@ -0,0 +1,30 @@ +/* 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. + */ + + + +/** + * Movements between stages + * @export + * @interface GetPipelineMovementStatisticsResponse200AllOfDataMovementsBetweenStages + */ +export interface GetPipelineMovementStatisticsResponse200AllOfDataMovementsBetweenStages { + /** + * The count of the deals that have been moved between stages + * @type {number} + * @memberof GetPipelineMovementStatisticsResponse200AllOfDataMovementsBetweenStages + */ + 'count'?: number; +} + diff --git a/models/get-pipeline-movement-statistics-response200-all-of-data-new-deals-formatted-values.ts b/models/get-pipeline-movement-statistics-response200-all-of-data-new-deals-formatted-values.ts new file mode 100644 index 00000000..a0bede2e --- /dev/null +++ b/models/get-pipeline-movement-statistics-response200-all-of-data-new-deals-formatted-values.ts @@ -0,0 +1,30 @@ +/* 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. + */ + + + +/** + * The formatted values of the deals + * @export + * @interface GetPipelineMovementStatisticsResponse200AllOfDataNewDealsFormattedValues + */ +export interface GetPipelineMovementStatisticsResponse200AllOfDataNewDealsFormattedValues { + /** + * The formatted values of the deals + * @type {string} + * @memberof GetPipelineMovementStatisticsResponse200AllOfDataNewDealsFormattedValues + */ + 'CURRENCY_ID'?: string; +} + diff --git a/models/get-pipeline-movement-statistics-response200-all-of-data-new-deals-values.ts b/models/get-pipeline-movement-statistics-response200-all-of-data-new-deals-values.ts new file mode 100644 index 00000000..43c0eb7f --- /dev/null +++ b/models/get-pipeline-movement-statistics-response200-all-of-data-new-deals-values.ts @@ -0,0 +1,30 @@ +/* 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. + */ + + + +/** + * The values of the deals + * @export + * @interface GetPipelineMovementStatisticsResponse200AllOfDataNewDealsValues + */ +export interface GetPipelineMovementStatisticsResponse200AllOfDataNewDealsValues { + /** + * The value of the deals + * @type {number} + * @memberof GetPipelineMovementStatisticsResponse200AllOfDataNewDealsValues + */ + 'CURRENCY_ID'?: number; +} + diff --git a/models/get-pipeline-movement-statistics-response200-all-of-data-new-deals.ts b/models/get-pipeline-movement-statistics-response200-all-of-data-new-deals.ts new file mode 100644 index 00000000..8ea96f31 --- /dev/null +++ b/models/get-pipeline-movement-statistics-response200-all-of-data-new-deals.ts @@ -0,0 +1,54 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetPipelineMovementStatisticsResponse200AllOfDataNewDealsFormattedValues } from './get-pipeline-movement-statistics-response200-all-of-data-new-deals-formatted-values'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPipelineMovementStatisticsResponse200AllOfDataNewDealsValues } from './get-pipeline-movement-statistics-response200-all-of-data-new-deals-values'; + +/** + * Deals summary + * @export + * @interface GetPipelineMovementStatisticsResponse200AllOfDataNewDeals + */ +export interface GetPipelineMovementStatisticsResponse200AllOfDataNewDeals { + /** + * The count of the deals + * @type {number} + * @memberof GetPipelineMovementStatisticsResponse200AllOfDataNewDeals + */ + 'count'?: number; + /** + * The IDs of the deals that have been moved + * @type {Array} + * @memberof GetPipelineMovementStatisticsResponse200AllOfDataNewDeals + */ + 'deals_ids'?: Array; + /** + * + * @type {GetPipelineMovementStatisticsResponse200AllOfDataNewDealsValues} + * @memberof GetPipelineMovementStatisticsResponse200AllOfDataNewDeals + */ + 'values'?: GetPipelineMovementStatisticsResponse200AllOfDataNewDealsValues; + /** + * + * @type {GetPipelineMovementStatisticsResponse200AllOfDataNewDealsFormattedValues} + * @memberof GetPipelineMovementStatisticsResponse200AllOfDataNewDeals + */ + 'formatted_values'?: GetPipelineMovementStatisticsResponse200AllOfDataNewDealsFormattedValues; +} + diff --git a/models/get-pipeline-movement-statistics-response200-all-of-data.ts b/models/get-pipeline-movement-statistics-response200-all-of-data.ts new file mode 100644 index 00000000..3a9a27da --- /dev/null +++ b/models/get-pipeline-movement-statistics-response200-all-of-data.ts @@ -0,0 +1,69 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetPipelineMovementStatisticsResponse200AllOfDataAverageAgeInDays } from './get-pipeline-movement-statistics-response200-all-of-data-average-age-in-days'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPipelineMovementStatisticsResponse200AllOfDataMovementsBetweenStages } from './get-pipeline-movement-statistics-response200-all-of-data-movements-between-stages'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPipelineMovementStatisticsResponse200AllOfDataNewDeals } from './get-pipeline-movement-statistics-response200-all-of-data-new-deals'; + +/** + * The pipeline object + * @export + * @interface GetPipelineMovementStatisticsResponse200AllOfData + */ +export interface GetPipelineMovementStatisticsResponse200AllOfData { + /** + * + * @type {GetPipelineMovementStatisticsResponse200AllOfDataMovementsBetweenStages} + * @memberof GetPipelineMovementStatisticsResponse200AllOfData + */ + 'movements_between_stages'?: GetPipelineMovementStatisticsResponse200AllOfDataMovementsBetweenStages; + /** + * + * @type {GetPipelineMovementStatisticsResponse200AllOfDataNewDeals} + * @memberof GetPipelineMovementStatisticsResponse200AllOfData + */ + 'new_deals'?: GetPipelineMovementStatisticsResponse200AllOfDataNewDeals; + /** + * + * @type {GetPipelineMovementStatisticsResponse200AllOfDataNewDeals} + * @memberof GetPipelineMovementStatisticsResponse200AllOfData + */ + 'deals_left_open'?: GetPipelineMovementStatisticsResponse200AllOfDataNewDeals; + /** + * + * @type {GetPipelineMovementStatisticsResponse200AllOfDataNewDeals} + * @memberof GetPipelineMovementStatisticsResponse200AllOfData + */ + 'won_deals'?: GetPipelineMovementStatisticsResponse200AllOfDataNewDeals; + /** + * + * @type {GetPipelineMovementStatisticsResponse200AllOfDataNewDeals} + * @memberof GetPipelineMovementStatisticsResponse200AllOfData + */ + 'lost_deals'?: GetPipelineMovementStatisticsResponse200AllOfDataNewDeals; + /** + * + * @type {GetPipelineMovementStatisticsResponse200AllOfDataAverageAgeInDays} + * @memberof GetPipelineMovementStatisticsResponse200AllOfData + */ + 'average_age_in_days'?: GetPipelineMovementStatisticsResponse200AllOfDataAverageAgeInDays; +} + diff --git a/models/get-pipeline-movement-statistics-response200-all-of.ts b/models/get-pipeline-movement-statistics-response200-all-of.ts new file mode 100644 index 00000000..a4393e08 --- /dev/null +++ b/models/get-pipeline-movement-statistics-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetPipelineMovementStatisticsResponse200AllOfData } from './get-pipeline-movement-statistics-response200-all-of-data'; + +/** + * + * @export + * @interface GetPipelineMovementStatisticsResponse200AllOf + */ +export interface GetPipelineMovementStatisticsResponse200AllOf { + /** + * + * @type {GetPipelineMovementStatisticsResponse200AllOfData} + * @memberof GetPipelineMovementStatisticsResponse200AllOf + */ + 'data'?: GetPipelineMovementStatisticsResponse200AllOfData; +} + diff --git a/models/get-pipeline-movement-statistics-response200.ts b/models/get-pipeline-movement-statistics-response200.ts new file mode 100644 index 00000000..15d6eda1 --- /dev/null +++ b/models/get-pipeline-movement-statistics-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPipelineMovementStatisticsResponse200AllOf } from './get-pipeline-movement-statistics-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPipelineMovementStatisticsResponse200AllOfData } from './get-pipeline-movement-statistics-response200-all-of-data'; + +/** + * @type GetPipelineMovementStatisticsResponse200 + * @export + */ +export type GetPipelineMovementStatisticsResponse200 = BaseResponse & GetPipelineMovementStatisticsResponse200AllOf; + + diff --git a/models/get-pipeline-response200-all-of.ts b/models/get-pipeline-response200-all-of.ts new file mode 100644 index 00000000..c57cc189 --- /dev/null +++ b/models/get-pipeline-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { PipelineDetails } from './pipeline-details'; + +/** + * + * @export + * @interface GetPipelineResponse200AllOf + */ +export interface GetPipelineResponse200AllOf { + /** + * + * @type {PipelineDetails} + * @memberof GetPipelineResponse200AllOf + */ + 'data'?: PipelineDetails; +} + diff --git a/models/get-pipeline-response200.ts b/models/get-pipeline-response200.ts new file mode 100644 index 00000000..4d59cca1 --- /dev/null +++ b/models/get-pipeline-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPipelineResponse200AllOf } from './get-pipeline-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { PipelineDetails } from './pipeline-details'; + +/** + * @type GetPipelineResponse200 + * @export + */ +export type GetPipelineResponse200 = BaseResponse & GetPipelineResponse200AllOf; + + diff --git a/models/get-pipelines-response200-all-of.ts b/models/get-pipelines-response200-all-of.ts new file mode 100644 index 00000000..36b32447 --- /dev/null +++ b/models/get-pipelines-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BasePipelineWithSelectedFlag } from './base-pipeline-with-selected-flag'; + +/** + * + * @export + * @interface GetPipelinesResponse200AllOf + */ +export interface GetPipelinesResponse200AllOf { + /** + * Pipelines array + * @type {Array} + * @memberof GetPipelinesResponse200AllOf + */ + 'data'?: Array; +} + diff --git a/models/get-pipelines-response200.ts b/models/get-pipelines-response200.ts new file mode 100644 index 00000000..d1b59676 --- /dev/null +++ b/models/get-pipelines-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BasePipelineWithSelectedFlag } from './base-pipeline-with-selected-flag'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPipelinesResponse200AllOf } from './get-pipelines-response200-all-of'; + +/** + * @type GetPipelinesResponse200 + * @export + */ +export type GetPipelinesResponse200 = BaseResponse & GetPipelinesResponse200AllOf; + + diff --git a/models/get-product-attachement-response200-data.ts b/models/get-product-attachement-response200-data.ts new file mode 100644 index 00000000..943b9be8 --- /dev/null +++ b/models/get-product-attachement-response200-data.ts @@ -0,0 +1,27 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetAddProductAttachementResponse200DataAllOfAllOf } from './get-add-product-attachement-response200-data-all-of-all-of'; + +/** + * @type GetProductAttachementResponse200Data + * The updated product object attached to the deal + * @export + */ +export type GetProductAttachementResponse200Data = GetAddProductAttachementResponse200DataAllOfAllOf; + + diff --git a/models/get-product-attachement-response200.ts b/models/get-product-attachement-response200.ts new file mode 100644 index 00000000..56ec6d89 --- /dev/null +++ b/models/get-product-attachement-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetProductAttachementResponse200Data } from './get-product-attachement-response200-data'; + +/** + * + * @export + * @interface GetProductAttachementResponse200 + */ +export interface GetProductAttachementResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetProductAttachementResponse200 + */ + 'success'?: boolean; + /** + * + * @type {GetProductAttachementResponse200Data} + * @memberof GetProductAttachementResponse200 + */ + 'data'?: GetProductAttachementResponse200Data; +} + diff --git a/models/get-product-field-response200-data.ts b/models/get-product-field-response200-data.ts new file mode 100644 index 00000000..bd018ea1 --- /dev/null +++ b/models/get-product-field-response200-data.ts @@ -0,0 +1,27 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ProductField } from './product-field'; + +/** + * @type GetProductFieldResponse200Data + * All data for the product field + * @export + */ +export type GetProductFieldResponse200Data = ProductField; + + diff --git a/models/get-product-field-response200.ts b/models/get-product-field-response200.ts new file mode 100644 index 00000000..850ff17b --- /dev/null +++ b/models/get-product-field-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetProductFieldResponse200Data } from './get-product-field-response200-data'; + +/** + * + * @export + * @interface GetProductFieldResponse200 + */ +export interface GetProductFieldResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetProductFieldResponse200 + */ + 'success'?: boolean; + /** + * + * @type {GetProductFieldResponse200Data} + * @memberof GetProductFieldResponse200 + */ + 'data'?: GetProductFieldResponse200Data; +} + diff --git a/models/get-product-fields-response200.ts b/models/get-product-fields-response200.ts new file mode 100644 index 00000000..d6173084 --- /dev/null +++ b/models/get-product-fields-response200.ts @@ -0,0 +1,45 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ProductField } from './product-field'; + +/** + * + * @export + * @interface GetProductFieldsResponse200 + */ +export interface GetProductFieldsResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetProductFieldsResponse200 + */ + 'success'?: boolean; + /** + * Array containing data for all product fields + * @type {Array} + * @memberof GetProductFieldsResponse200 + */ + 'data'?: Array; + /** + * Additional data for the product field, such as pagination + * @type {object} + * @memberof GetProductFieldsResponse200 + */ + 'additional_data'?: object; +} + diff --git a/models/get-product-followers-response-success-all-of-data-inner.ts b/models/get-product-followers-response-success-all-of-data-inner.ts new file mode 100644 index 00000000..24930914 --- /dev/null +++ b/models/get-product-followers-response-success-all-of-data-inner.ts @@ -0,0 +1,48 @@ +/* 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 + * @interface GetProductFollowersResponseSuccessAllOfDataInner + */ +export interface GetProductFollowersResponseSuccessAllOfDataInner { + /** + * The ID of the user + * @type {number} + * @memberof GetProductFollowersResponseSuccessAllOfDataInner + */ + 'user_id'?: number; + /** + * The ID of the user follower + * @type {number} + * @memberof GetProductFollowersResponseSuccessAllOfDataInner + */ + 'id'?: number; + /** + * The ID of the product + * @type {number} + * @memberof GetProductFollowersResponseSuccessAllOfDataInner + */ + 'product_id'?: number; + /** + * The date and time when the follower was added to the person + * @type {string} + * @memberof GetProductFollowersResponseSuccessAllOfDataInner + */ + 'add_time'?: string; +} + diff --git a/models/get-product-followers-response-success-all-of.ts b/models/get-product-followers-response-success-all-of.ts new file mode 100644 index 00000000..b8d0813a --- /dev/null +++ b/models/get-product-followers-response-success-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetProductFollowersResponseSuccessAllOfDataInner } from './get-product-followers-response-success-all-of-data-inner'; + +/** + * + * @export + * @interface GetProductFollowersResponseSuccessAllOf + */ +export interface GetProductFollowersResponseSuccessAllOf { + /** + * The list of followers + * @type {Array} + * @memberof GetProductFollowersResponseSuccessAllOf + */ + 'data'?: Array; + /** + * + * @type {FieldsResponse200AllOfAdditionalData} + * @memberof GetProductFollowersResponseSuccessAllOf + */ + 'additional_data'?: FieldsResponse200AllOfAdditionalData; +} + diff --git a/models/get-product-followers-response-success.ts b/models/get-product-followers-response-success.ts new file mode 100644 index 00000000..0fc06fc1 --- /dev/null +++ b/models/get-product-followers-response-success.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetProductFollowersResponseSuccessAllOf } from './get-product-followers-response-success-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetProductFollowersResponseSuccessAllOfDataInner } from './get-product-followers-response-success-all-of-data-inner'; + +/** + * @type GetProductFollowersResponseSuccess + * @export + */ +export type GetProductFollowersResponseSuccess = BaseResponse & GetProductFollowersResponseSuccessAllOf; + + diff --git a/models/get-products-response200-additional-data.ts b/models/get-products-response200-additional-data.ts new file mode 100644 index 00000000..0a947ffb --- /dev/null +++ b/models/get-products-response200-additional-data.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + + +/** + * Any additional data related to the products + * @export + * @interface GetProductsResponse200AdditionalData + */ +export interface GetProductsResponse200AdditionalData { + /** + * Pagination start + * @type {number} + * @memberof GetProductsResponse200AdditionalData + */ + 'start'?: number; + /** + * Items shown per page + * @type {number} + * @memberof GetProductsResponse200AdditionalData + */ + 'limit'?: number; + /** + * If there are more list items in the collection than displayed or not + * @type {boolean} + * @memberof GetProductsResponse200AdditionalData + */ + 'more_items_in_collection'?: boolean; +} + diff --git a/models/get-products-response200.ts b/models/get-products-response200.ts new file mode 100644 index 00000000..da0ac53a --- /dev/null +++ b/models/get-products-response200.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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjects } from './get-activities-response200-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { GetProductsResponse200AdditionalData } from './get-products-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetproductResponse200 } from './getproduct-response200'; + +/** + * + * @export + * @interface GetProductsResponse200 + */ +export interface GetProductsResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetProductsResponse200 + */ + 'success'?: boolean; + /** + * Array containing data for all products + * @type {Array} + * @memberof GetProductsResponse200 + */ + 'data'?: Array; + /** + * + * @type {GetProductsResponse200AdditionalData} + * @memberof GetProductsResponse200 + */ + 'additional_data'?: GetProductsResponse200AdditionalData; + /** + * + * @type {GetActivitiesResponse200RelatedObjects} + * @memberof GetProductsResponse200 + */ + 'related_objects'?: GetActivitiesResponse200RelatedObjects; +} + diff --git a/models/get-project-board-response200.ts b/models/get-project-board-response200.ts new file mode 100644 index 00000000..a47a01c8 --- /dev/null +++ b/models/get-project-board-response200.ts @@ -0,0 +1,45 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetProjectBoardsResponse200DataInner } from './get-project-boards-response200-data-inner'; + +/** + * + * @export + * @interface GetProjectBoardResponse200 + */ +export interface GetProjectBoardResponse200 { + /** + * + * @type {boolean} + * @memberof GetProjectBoardResponse200 + */ + 'success'?: boolean; + /** + * + * @type {GetProjectBoardsResponse200DataInner} + * @memberof GetProjectBoardResponse200 + */ + 'data'?: GetProjectBoardsResponse200DataInner; + /** + * + * @type {object} + * @memberof GetProjectBoardResponse200 + */ + 'additional_data'?: object | null; +} + diff --git a/models/get-project-boards-response200-data-inner.ts b/models/get-project-boards-response200-data-inner.ts new file mode 100644 index 00000000..dc658728 --- /dev/null +++ b/models/get-project-boards-response200-data-inner.ts @@ -0,0 +1,54 @@ +/* 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 + * @interface GetProjectBoardsResponse200DataInner + */ +export interface GetProjectBoardsResponse200DataInner { + /** + * The ID of the project board + * @type {number} + * @memberof GetProjectBoardsResponse200DataInner + */ + 'id'?: number; + /** + * Name of a project board + * @type {string} + * @memberof GetProjectBoardsResponse200DataInner + */ + 'name'?: string; + /** + * The order of a board + * @type {number} + * @memberof GetProjectBoardsResponse200DataInner + */ + 'order_nr'?: number; + /** + * The creation date and time of the board in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof GetProjectBoardsResponse200DataInner + */ + 'add_time'?: string; + /** + * The update date and time of the board in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof GetProjectBoardsResponse200DataInner + */ + 'update_time'?: string; +} + diff --git a/models/get-project-boards-response200.ts b/models/get-project-boards-response200.ts new file mode 100644 index 00000000..4c61290b --- /dev/null +++ b/models/get-project-boards-response200.ts @@ -0,0 +1,45 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetProjectBoardsResponse200DataInner } from './get-project-boards-response200-data-inner'; + +/** + * + * @export + * @interface GetProjectBoardsResponse200 + */ +export interface GetProjectBoardsResponse200 { + /** + * + * @type {boolean} + * @memberof GetProjectBoardsResponse200 + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetProjectBoardsResponse200 + */ + 'data'?: Array; + /** + * + * @type {object} + * @memberof GetProjectBoardsResponse200 + */ + 'additional_data'?: object | null; +} + diff --git a/models/get-project-groups-response200-data-inner.ts b/models/get-project-groups-response200-data-inner.ts new file mode 100644 index 00000000..0e8865dc --- /dev/null +++ b/models/get-project-groups-response200-data-inner.ts @@ -0,0 +1,42 @@ +/* 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 + * @interface GetProjectGroupsResponse200DataInner + */ +export interface GetProjectGroupsResponse200DataInner { + /** + * ID of the group + * @type {number} + * @memberof GetProjectGroupsResponse200DataInner + */ + 'id'?: number; + /** + * Name of the group + * @type {string} + * @memberof GetProjectGroupsResponse200DataInner + */ + 'name'?: string; + /** + * Order number of the group + * @type {number} + * @memberof GetProjectGroupsResponse200DataInner + */ + 'order_nr'?: number; +} + diff --git a/models/get-project-groups-response200.ts b/models/get-project-groups-response200.ts new file mode 100644 index 00000000..1bc55958 --- /dev/null +++ b/models/get-project-groups-response200.ts @@ -0,0 +1,45 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetProjectGroupsResponse200DataInner } from './get-project-groups-response200-data-inner'; + +/** + * + * @export + * @interface GetProjectGroupsResponse200 + */ +export interface GetProjectGroupsResponse200 { + /** + * + * @type {boolean} + * @memberof GetProjectGroupsResponse200 + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetProjectGroupsResponse200 + */ + 'data'?: Array; + /** + * + * @type {object} + * @memberof GetProjectGroupsResponse200 + */ + 'additional_data'?: object | null; +} + diff --git a/models/get-project-phase-response200.ts b/models/get-project-phase-response200.ts new file mode 100644 index 00000000..3b8bce92 --- /dev/null +++ b/models/get-project-phase-response200.ts @@ -0,0 +1,45 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetProjectPhasesResponse200DataInner } from './get-project-phases-response200-data-inner'; + +/** + * + * @export + * @interface GetProjectPhaseResponse200 + */ +export interface GetProjectPhaseResponse200 { + /** + * + * @type {boolean} + * @memberof GetProjectPhaseResponse200 + */ + 'success'?: boolean; + /** + * + * @type {GetProjectPhasesResponse200DataInner} + * @memberof GetProjectPhaseResponse200 + */ + 'data'?: GetProjectPhasesResponse200DataInner; + /** + * + * @type {object} + * @memberof GetProjectPhaseResponse200 + */ + 'additional_data'?: object | null; +} + diff --git a/models/get-project-phases-response200-data-inner.ts b/models/get-project-phases-response200-data-inner.ts new file mode 100644 index 00000000..7246dd77 --- /dev/null +++ b/models/get-project-phases-response200-data-inner.ts @@ -0,0 +1,60 @@ +/* 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 + * @interface GetProjectPhasesResponse200DataInner + */ +export interface GetProjectPhasesResponse200DataInner { + /** + * The ID of the project phase + * @type {number} + * @memberof GetProjectPhasesResponse200DataInner + */ + 'id'?: number; + /** + * Name of a project phase + * @type {string} + * @memberof GetProjectPhasesResponse200DataInner + */ + 'name'?: string; + /** + * The ID of the project board this phase is linked to + * @type {number} + * @memberof GetProjectPhasesResponse200DataInner + */ + 'board_id'?: number; + /** + * The order of a phase + * @type {number} + * @memberof GetProjectPhasesResponse200DataInner + */ + 'order_nr'?: number; + /** + * The creation date and time of the board in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof GetProjectPhasesResponse200DataInner + */ + 'add_time'?: string; + /** + * The update date and time of the board in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof GetProjectPhasesResponse200DataInner + */ + 'update_time'?: string; +} + diff --git a/models/get-project-phases-response200.ts b/models/get-project-phases-response200.ts new file mode 100644 index 00000000..eb09ea12 --- /dev/null +++ b/models/get-project-phases-response200.ts @@ -0,0 +1,45 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetProjectPhasesResponse200DataInner } from './get-project-phases-response200-data-inner'; + +/** + * + * @export + * @interface GetProjectPhasesResponse200 + */ +export interface GetProjectPhasesResponse200 { + /** + * + * @type {boolean} + * @memberof GetProjectPhasesResponse200 + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetProjectPhasesResponse200 + */ + 'data'?: Array; + /** + * + * @type {object} + * @memberof GetProjectPhasesResponse200 + */ + 'additional_data'?: object | null; +} + diff --git a/models/get-project-plan-response200-data-inner.ts b/models/get-project-plan-response200-data-inner.ts new file mode 100644 index 00000000..e52644aa --- /dev/null +++ b/models/get-project-plan-response200-data-inner.ts @@ -0,0 +1,48 @@ +/* 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 + * @interface GetProjectPlanResponse200DataInner + */ +export interface GetProjectPlanResponse200DataInner { + /** + * ID of plan item (either activity or task ID) + * @type {number} + * @memberof GetProjectPlanResponse200DataInner + */ + 'item_id'?: number; + /** + * Type of a plan item (task / activity) + * @type {string} + * @memberof GetProjectPlanResponse200DataInner + */ + 'item_type'?: string; + /** + * The ID of the board this project is associated with. If null then plan item is not in any phase. + * @type {number} + * @memberof GetProjectPlanResponse200DataInner + */ + 'phase_id'?: number; + /** + * The ID of the board this project is associated with. If null then plan item is not in any group. + * @type {number} + * @memberof GetProjectPlanResponse200DataInner + */ + 'group_id'?: number; +} + diff --git a/models/get-project-plan-response200.ts b/models/get-project-plan-response200.ts new file mode 100644 index 00000000..457fce9c --- /dev/null +++ b/models/get-project-plan-response200.ts @@ -0,0 +1,45 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetProjectPlanResponse200DataInner } from './get-project-plan-response200-data-inner'; + +/** + * + * @export + * @interface GetProjectPlanResponse200 + */ +export interface GetProjectPlanResponse200 { + /** + * + * @type {boolean} + * @memberof GetProjectPlanResponse200 + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetProjectPlanResponse200 + */ + 'data'?: Array; + /** + * + * @type {object} + * @memberof GetProjectPlanResponse200 + */ + 'additional_data'?: object | null; +} + diff --git a/models/get-project-response200.ts b/models/get-project-response200.ts new file mode 100644 index 00000000..0907ce22 --- /dev/null +++ b/models/get-project-response200.ts @@ -0,0 +1,45 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ProjectResponseObject } from './project-response-object'; + +/** + * + * @export + * @interface GetProjectResponse200 + */ +export interface GetProjectResponse200 { + /** + * + * @type {boolean} + * @memberof GetProjectResponse200 + */ + 'success'?: boolean; + /** + * + * @type {ProjectResponseObject} + * @memberof GetProjectResponse200 + */ + 'data'?: ProjectResponseObject; + /** + * + * @type {object} + * @memberof GetProjectResponse200 + */ + 'additional_data'?: object | null; +} + diff --git a/models/get-project-template-response200.ts b/models/get-project-template-response200.ts new file mode 100644 index 00000000..d0702544 --- /dev/null +++ b/models/get-project-template-response200.ts @@ -0,0 +1,45 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { TemplateResponseObject } from './template-response-object'; + +/** + * + * @export + * @interface GetProjectTemplateResponse200 + */ +export interface GetProjectTemplateResponse200 { + /** + * + * @type {boolean} + * @memberof GetProjectTemplateResponse200 + */ + 'success'?: boolean; + /** + * + * @type {TemplateResponseObject} + * @memberof GetProjectTemplateResponse200 + */ + 'data'?: TemplateResponseObject; + /** + * + * @type {object} + * @memberof GetProjectTemplateResponse200 + */ + 'additional_data'?: object | null; +} + diff --git a/models/get-project-templates-response200.ts b/models/get-project-templates-response200.ts new file mode 100644 index 00000000..d366a634 --- /dev/null +++ b/models/get-project-templates-response200.ts @@ -0,0 +1,48 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesCollectionResponse200AdditionalData } from './get-activities-collection-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { TemplateResponseObject } from './template-response-object'; + +/** + * + * @export + * @interface GetProjectTemplatesResponse200 + */ +export interface GetProjectTemplatesResponse200 { + /** + * + * @type {boolean} + * @memberof GetProjectTemplatesResponse200 + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetProjectTemplatesResponse200 + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesCollectionResponse200AdditionalData} + * @memberof GetProjectTemplatesResponse200 + */ + 'additional_data'?: GetActivitiesCollectionResponse200AdditionalData; +} + diff --git a/models/get-projects-response200.ts b/models/get-projects-response200.ts new file mode 100644 index 00000000..c8ad5eaf --- /dev/null +++ b/models/get-projects-response200.ts @@ -0,0 +1,48 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesCollectionResponse200AdditionalData } from './get-activities-collection-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { ProjectResponseObject } from './project-response-object'; + +/** + * + * @export + * @interface GetProjectsResponse200 + */ +export interface GetProjectsResponse200 { + /** + * + * @type {boolean} + * @memberof GetProjectsResponse200 + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetProjectsResponse200 + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesCollectionResponse200AdditionalData} + * @memberof GetProjectsResponse200 + */ + 'additional_data'?: GetActivitiesCollectionResponse200AdditionalData; +} + diff --git a/models/get-recents-response200-additional-data.ts b/models/get-recents-response200-additional-data.ts new file mode 100644 index 00000000..dda4894d --- /dev/null +++ b/models/get-recents-response200-additional-data.ts @@ -0,0 +1,45 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; + +/** + * + * @export + * @interface GetRecentsResponse200AdditionalData + */ +export interface GetRecentsResponse200AdditionalData { + /** + * The timestamp in UTC. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof GetRecentsResponse200AdditionalData + */ + 'since_timestamp'?: string; + /** + * The timestamp in UTC. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof GetRecentsResponse200AdditionalData + */ + 'last_timestamp_on_page'?: string; + /** + * + * @type {FieldsResponse200AllOfAdditionalData} + * @memberof GetRecentsResponse200AdditionalData + */ + 'pagination'?: FieldsResponse200AllOfAdditionalData; +} + diff --git a/models/get-recents-response200-data-inner-any-of.ts b/models/get-recents-response200-data-inner-any-of.ts new file mode 100644 index 00000000..dcde5773 --- /dev/null +++ b/models/get-recents-response200-data-inner-any-of.ts @@ -0,0 +1,52 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ActivityResponseObject } from './activity-response-object'; + +/** + * + * @export + * @interface GetRecentsResponse200DataInnerAnyOf + */ +export interface GetRecentsResponse200DataInnerAnyOf { + /** + * + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf + */ + 'item'?: GetRecentsResponse200DataInnerAnyOfItemConst; + /** + * + * @type {number} + * @memberof GetRecentsResponse200DataInnerAnyOf + */ + 'id'?: number; + /** + * + * @type {ActivityResponseObject} + * @memberof GetRecentsResponse200DataInnerAnyOf + */ + 'data'?: ActivityResponseObject; +} + +export const GetRecentsResponse200DataInnerAnyOfItemConst = { + activity: 'activity' +} as const; + +export type GetRecentsResponse200DataInnerAnyOfItemConst = typeof GetRecentsResponse200DataInnerAnyOfItemConst[keyof typeof GetRecentsResponse200DataInnerAnyOfItemConst]; + + diff --git a/models/get-recents-response200-data-inner-any-of1.ts b/models/get-recents-response200-data-inner-any-of1.ts new file mode 100644 index 00000000..f554731a --- /dev/null +++ b/models/get-recents-response200-data-inner-any-of1.ts @@ -0,0 +1,52 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivityTypesResponse200AllOfDataInner } from './get-activity-types-response200-all-of-data-inner'; + +/** + * + * @export + * @interface GetRecentsResponse200DataInnerAnyOf1 + */ +export interface GetRecentsResponse200DataInnerAnyOf1 { + /** + * + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf1 + */ + 'item'?: GetRecentsResponse200DataInnerAnyOf1ItemConst; + /** + * + * @type {number} + * @memberof GetRecentsResponse200DataInnerAnyOf1 + */ + 'id'?: number; + /** + * + * @type {GetActivityTypesResponse200AllOfDataInner} + * @memberof GetRecentsResponse200DataInnerAnyOf1 + */ + 'data'?: GetActivityTypesResponse200AllOfDataInner; +} + +export const GetRecentsResponse200DataInnerAnyOf1ItemConst = { + activityType: 'activityType' +} as const; + +export type GetRecentsResponse200DataInnerAnyOf1ItemConst = typeof GetRecentsResponse200DataInnerAnyOf1ItemConst[keyof typeof GetRecentsResponse200DataInnerAnyOf1ItemConst]; + + diff --git a/models/get-recents-response200-data-inner-any-of10.ts b/models/get-recents-response200-data-inner-any-of10.ts new file mode 100644 index 00000000..42ca50b3 --- /dev/null +++ b/models/get-recents-response200-data-inner-any-of10.ts @@ -0,0 +1,52 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedDealsResponse200AllOfRelatedObjectsStage } from './get-associated-deals-response200-all-of-related-objects-stage'; + +/** + * + * @export + * @interface GetRecentsResponse200DataInnerAnyOf10 + */ +export interface GetRecentsResponse200DataInnerAnyOf10 { + /** + * + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf10 + */ + 'item'?: GetRecentsResponse200DataInnerAnyOf10ItemConst; + /** + * + * @type {number} + * @memberof GetRecentsResponse200DataInnerAnyOf10 + */ + 'id'?: number; + /** + * + * @type {GetAssociatedDealsResponse200AllOfRelatedObjectsStage} + * @memberof GetRecentsResponse200DataInnerAnyOf10 + */ + 'data'?: GetAssociatedDealsResponse200AllOfRelatedObjectsStage; +} + +export const GetRecentsResponse200DataInnerAnyOf10ItemConst = { + stage: 'stage' +} as const; + +export type GetRecentsResponse200DataInnerAnyOf10ItemConst = typeof GetRecentsResponse200DataInnerAnyOf10ItemConst[keyof typeof GetRecentsResponse200DataInnerAnyOf10ItemConst]; + + diff --git a/models/get-recents-response200-data-inner-any-of11-data-access-inner.ts b/models/get-recents-response200-data-inner-any-of11-data-access-inner.ts new file mode 100644 index 00000000..52fbaa5c --- /dev/null +++ b/models/get-recents-response200-data-inner-any-of11-data-access-inner.ts @@ -0,0 +1,53 @@ +/* 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 + * @interface GetRecentsResponse200DataInnerAnyOf11DataAccessInner + */ +export interface GetRecentsResponse200DataInnerAnyOf11DataAccessInner { + /** + * + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf11DataAccessInner + */ + 'app'?: GetRecentsResponse200DataInnerAnyOf11DataAccessInnerAppConst; + /** + * + * @type {boolean} + * @memberof GetRecentsResponse200DataInnerAnyOf11DataAccessInner + */ + 'admin'?: boolean; + /** + * + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf11DataAccessInner + */ + 'permission_set_id'?: string; +} + +export const GetRecentsResponse200DataInnerAnyOf11DataAccessInnerAppConst = { + sales: 'sales', + projects: 'projects', + campaigns: 'campaigns', + global: 'global', + account_settings: 'account_settings' +} as const; + +export type GetRecentsResponse200DataInnerAnyOf11DataAccessInnerAppConst = typeof GetRecentsResponse200DataInnerAnyOf11DataAccessInnerAppConst[keyof typeof GetRecentsResponse200DataInnerAnyOf11DataAccessInnerAppConst]; + + diff --git a/models/get-recents-response200-data-inner-any-of11-data.ts b/models/get-recents-response200-data-inner-any-of11-data.ts new file mode 100644 index 00000000..403928a3 --- /dev/null +++ b/models/get-recents-response200-data-inner-any-of11-data.ts @@ -0,0 +1,141 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetRecentsResponse200DataInnerAnyOf11DataAccessInner } from './get-recents-response200-data-inner-any-of11-data-access-inner'; + +/** + * + * @export + * @interface GetRecentsResponse200DataInnerAnyOf11Data + */ +export interface GetRecentsResponse200DataInnerAnyOf11Data { + /** + * The user ID + * @type {number} + * @memberof GetRecentsResponse200DataInnerAnyOf11Data + */ + 'id'?: number; + /** + * The user name + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf11Data + */ + 'name'?: string; + /** + * The user default currency + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf11Data + */ + 'default_currency'?: string; + /** + * The user locale + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf11Data + */ + 'locale'?: string; + /** + * The user language ID + * @type {number} + * @memberof GetRecentsResponse200DataInnerAnyOf11Data + */ + 'lang'?: number; + /** + * The user email + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf11Data + */ + 'email'?: string; + /** + * The user phone + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf11Data + */ + 'phone'?: string | null; + /** + * Boolean that indicates whether the user is activated + * @type {boolean} + * @memberof GetRecentsResponse200DataInnerAnyOf11Data + */ + 'activated'?: boolean; + /** + * The last login date and time of the user. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf11Data + */ + 'last_login'?: string; + /** + * The creation date and time of the user. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf11Data + */ + 'created'?: string; + /** + * The last modification date and time of the user. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf11Data + */ + 'modified'?: string | null; + /** + * Boolean that indicates whether the user has created a company + * @type {boolean} + * @memberof GetRecentsResponse200DataInnerAnyOf11Data + */ + 'has_created_company'?: boolean; + /** + * + * @type {Array} + * @memberof GetRecentsResponse200DataInnerAnyOf11Data + */ + 'access'?: Array; + /** + * Boolean that indicates whether the user is activated + * @type {boolean} + * @memberof GetRecentsResponse200DataInnerAnyOf11Data + */ + 'active_flag'?: boolean; + /** + * The user timezone name + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf11Data + */ + 'timezone_name'?: string; + /** + * The user timezone offset + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf11Data + */ + 'timezone_offset'?: string; + /** + * The ID of the user role + * @type {number} + * @memberof GetRecentsResponse200DataInnerAnyOf11Data + */ + 'role_id'?: number; + /** + * The user icon URL + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf11Data + */ + 'icon_url'?: string | null; + /** + * Boolean that indicates if the requested user is the same which is logged in (in this case, always true) + * @type {boolean} + * @memberof GetRecentsResponse200DataInnerAnyOf11Data + */ + 'is_you'?: boolean; +} + diff --git a/models/get-recents-response200-data-inner-any-of11.ts b/models/get-recents-response200-data-inner-any-of11.ts new file mode 100644 index 00000000..7cd1f8c4 --- /dev/null +++ b/models/get-recents-response200-data-inner-any-of11.ts @@ -0,0 +1,52 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetRecentsResponse200DataInnerAnyOf11Data } from './get-recents-response200-data-inner-any-of11-data'; + +/** + * + * @export + * @interface GetRecentsResponse200DataInnerAnyOf11 + */ +export interface GetRecentsResponse200DataInnerAnyOf11 { + /** + * + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf11 + */ + 'item'?: GetRecentsResponse200DataInnerAnyOf11ItemConst; + /** + * + * @type {number} + * @memberof GetRecentsResponse200DataInnerAnyOf11 + */ + 'id'?: number; + /** + * + * @type {GetRecentsResponse200DataInnerAnyOf11Data} + * @memberof GetRecentsResponse200DataInnerAnyOf11 + */ + 'data'?: GetRecentsResponse200DataInnerAnyOf11Data; +} + +export const GetRecentsResponse200DataInnerAnyOf11ItemConst = { + user: 'user' +} as const; + +export type GetRecentsResponse200DataInnerAnyOf11ItemConst = typeof GetRecentsResponse200DataInnerAnyOf11ItemConst[keyof typeof GetRecentsResponse200DataInnerAnyOf11ItemConst]; + + diff --git a/models/get-recents-response200-data-inner-any-of2.ts b/models/get-recents-response200-data-inner-any-of2.ts new file mode 100644 index 00000000..05db790b --- /dev/null +++ b/models/get-recents-response200-data-inner-any-of2.ts @@ -0,0 +1,52 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DealStrict } from './deal-strict'; + +/** + * + * @export + * @interface GetRecentsResponse200DataInnerAnyOf2 + */ +export interface GetRecentsResponse200DataInnerAnyOf2 { + /** + * + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf2 + */ + 'item'?: GetRecentsResponse200DataInnerAnyOf2ItemConst; + /** + * + * @type {number} + * @memberof GetRecentsResponse200DataInnerAnyOf2 + */ + 'id'?: number; + /** + * + * @type {DealStrict} + * @memberof GetRecentsResponse200DataInnerAnyOf2 + */ + 'data'?: DealStrict; +} + +export const GetRecentsResponse200DataInnerAnyOf2ItemConst = { + deal: 'deal' +} as const; + +export type GetRecentsResponse200DataInnerAnyOf2ItemConst = typeof GetRecentsResponse200DataInnerAnyOf2ItemConst[keyof typeof GetRecentsResponse200DataInnerAnyOf2ItemConst]; + + diff --git a/models/get-recents-response200-data-inner-any-of3.ts b/models/get-recents-response200-data-inner-any-of3.ts new file mode 100644 index 00000000..6da7fe8d --- /dev/null +++ b/models/get-recents-response200-data-inner-any-of3.ts @@ -0,0 +1,52 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedFilesResponse200AllOfDataInner } from './get-associated-files-response200-all-of-data-inner'; + +/** + * + * @export + * @interface GetRecentsResponse200DataInnerAnyOf3 + */ +export interface GetRecentsResponse200DataInnerAnyOf3 { + /** + * + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf3 + */ + 'item'?: GetRecentsResponse200DataInnerAnyOf3ItemConst; + /** + * + * @type {number} + * @memberof GetRecentsResponse200DataInnerAnyOf3 + */ + 'id'?: number; + /** + * + * @type {GetAssociatedFilesResponse200AllOfDataInner} + * @memberof GetRecentsResponse200DataInnerAnyOf3 + */ + 'data'?: GetAssociatedFilesResponse200AllOfDataInner; +} + +export const GetRecentsResponse200DataInnerAnyOf3ItemConst = { + file: 'file' +} as const; + +export type GetRecentsResponse200DataInnerAnyOf3ItemConst = typeof GetRecentsResponse200DataInnerAnyOf3ItemConst[keyof typeof GetRecentsResponse200DataInnerAnyOf3ItemConst]; + + diff --git a/models/get-recents-response200-data-inner-any-of4.ts b/models/get-recents-response200-data-inner-any-of4.ts new file mode 100644 index 00000000..3cb37aed --- /dev/null +++ b/models/get-recents-response200-data-inner-any-of4.ts @@ -0,0 +1,52 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetFiltersResponse200AllOfDataInner } from './get-filters-response200-all-of-data-inner'; + +/** + * + * @export + * @interface GetRecentsResponse200DataInnerAnyOf4 + */ +export interface GetRecentsResponse200DataInnerAnyOf4 { + /** + * + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf4 + */ + 'item'?: GetRecentsResponse200DataInnerAnyOf4ItemConst; + /** + * + * @type {number} + * @memberof GetRecentsResponse200DataInnerAnyOf4 + */ + 'id'?: number; + /** + * + * @type {GetFiltersResponse200AllOfDataInner} + * @memberof GetRecentsResponse200DataInnerAnyOf4 + */ + 'data'?: GetFiltersResponse200AllOfDataInner; +} + +export const GetRecentsResponse200DataInnerAnyOf4ItemConst = { + filter: 'filter' +} as const; + +export type GetRecentsResponse200DataInnerAnyOf4ItemConst = typeof GetRecentsResponse200DataInnerAnyOf4ItemConst[keyof typeof GetRecentsResponse200DataInnerAnyOf4ItemConst]; + + diff --git a/models/get-recents-response200-data-inner-any-of5.ts b/models/get-recents-response200-data-inner-any-of5.ts new file mode 100644 index 00000000..7304e88a --- /dev/null +++ b/models/get-recents-response200-data-inner-any-of5.ts @@ -0,0 +1,52 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetNotesResponse200DataInner } from './get-notes-response200-data-inner'; + +/** + * + * @export + * @interface GetRecentsResponse200DataInnerAnyOf5 + */ +export interface GetRecentsResponse200DataInnerAnyOf5 { + /** + * + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf5 + */ + 'item'?: GetRecentsResponse200DataInnerAnyOf5ItemConst; + /** + * + * @type {number} + * @memberof GetRecentsResponse200DataInnerAnyOf5 + */ + 'id'?: number; + /** + * + * @type {GetNotesResponse200DataInner} + * @memberof GetRecentsResponse200DataInnerAnyOf5 + */ + 'data'?: GetNotesResponse200DataInner; +} + +export const GetRecentsResponse200DataInnerAnyOf5ItemConst = { + note: 'note' +} as const; + +export type GetRecentsResponse200DataInnerAnyOf5ItemConst = typeof GetRecentsResponse200DataInnerAnyOf5ItemConst[keyof typeof GetRecentsResponse200DataInnerAnyOf5ItemConst]; + + diff --git a/models/get-recents-response200-data-inner-any-of6.ts b/models/get-recents-response200-data-inner-any-of6.ts new file mode 100644 index 00000000..67316818 --- /dev/null +++ b/models/get-recents-response200-data-inner-any-of6.ts @@ -0,0 +1,52 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { MergePersonItem } from './merge-person-item'; + +/** + * + * @export + * @interface GetRecentsResponse200DataInnerAnyOf6 + */ +export interface GetRecentsResponse200DataInnerAnyOf6 { + /** + * + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf6 + */ + 'item'?: GetRecentsResponse200DataInnerAnyOf6ItemConst; + /** + * + * @type {number} + * @memberof GetRecentsResponse200DataInnerAnyOf6 + */ + 'id'?: number; + /** + * + * @type {MergePersonItem} + * @memberof GetRecentsResponse200DataInnerAnyOf6 + */ + 'data'?: MergePersonItem; +} + +export const GetRecentsResponse200DataInnerAnyOf6ItemConst = { + person: 'person' +} as const; + +export type GetRecentsResponse200DataInnerAnyOf6ItemConst = typeof GetRecentsResponse200DataInnerAnyOf6ItemConst[keyof typeof GetRecentsResponse200DataInnerAnyOf6ItemConst]; + + diff --git a/models/get-recents-response200-data-inner-any-of7.ts b/models/get-recents-response200-data-inner-any-of7.ts new file mode 100644 index 00000000..aa45e549 --- /dev/null +++ b/models/get-recents-response200-data-inner-any-of7.ts @@ -0,0 +1,52 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseOrganizationItem } from './base-organization-item'; + +/** + * + * @export + * @interface GetRecentsResponse200DataInnerAnyOf7 + */ +export interface GetRecentsResponse200DataInnerAnyOf7 { + /** + * + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf7 + */ + 'item'?: GetRecentsResponse200DataInnerAnyOf7ItemConst; + /** + * + * @type {number} + * @memberof GetRecentsResponse200DataInnerAnyOf7 + */ + 'id'?: number; + /** + * + * @type {BaseOrganizationItem} + * @memberof GetRecentsResponse200DataInnerAnyOf7 + */ + 'data'?: BaseOrganizationItem; +} + +export const GetRecentsResponse200DataInnerAnyOf7ItemConst = { + organization: 'organization' +} as const; + +export type GetRecentsResponse200DataInnerAnyOf7ItemConst = typeof GetRecentsResponse200DataInnerAnyOf7ItemConst[keyof typeof GetRecentsResponse200DataInnerAnyOf7ItemConst]; + + diff --git a/models/get-recents-response200-data-inner-any-of8.ts b/models/get-recents-response200-data-inner-any-of8.ts new file mode 100644 index 00000000..1b25b9fa --- /dev/null +++ b/models/get-recents-response200-data-inner-any-of8.ts @@ -0,0 +1,52 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedDealsResponse200AllOfRelatedObjectsPipeline } from './get-associated-deals-response200-all-of-related-objects-pipeline'; + +/** + * + * @export + * @interface GetRecentsResponse200DataInnerAnyOf8 + */ +export interface GetRecentsResponse200DataInnerAnyOf8 { + /** + * + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf8 + */ + 'item'?: GetRecentsResponse200DataInnerAnyOf8ItemConst; + /** + * + * @type {number} + * @memberof GetRecentsResponse200DataInnerAnyOf8 + */ + 'id'?: number; + /** + * + * @type {GetAssociatedDealsResponse200AllOfRelatedObjectsPipeline} + * @memberof GetRecentsResponse200DataInnerAnyOf8 + */ + 'data'?: GetAssociatedDealsResponse200AllOfRelatedObjectsPipeline; +} + +export const GetRecentsResponse200DataInnerAnyOf8ItemConst = { + pipeline: 'pipeline' +} as const; + +export type GetRecentsResponse200DataInnerAnyOf8ItemConst = typeof GetRecentsResponse200DataInnerAnyOf8ItemConst[keyof typeof GetRecentsResponse200DataInnerAnyOf8ItemConst]; + + diff --git a/models/get-recents-response200-data-inner-any-of9-data.ts b/models/get-recents-response200-data-inner-any-of9-data.ts new file mode 100644 index 00000000..d94e9ded --- /dev/null +++ b/models/get-recents-response200-data-inner-any-of9-data.ts @@ -0,0 +1,120 @@ +/* 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 + * @interface GetRecentsResponse200DataInnerAnyOf9Data + */ +export interface GetRecentsResponse200DataInnerAnyOf9Data { + /** + * The ID of the product + * @type {number} + * @memberof GetRecentsResponse200DataInnerAnyOf9Data + */ + 'id'?: number; + /** + * The name of the product + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf9Data + */ + 'name'?: string; + /** + * The product code + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf9Data + */ + 'code'?: string; + /** + * The description of the product + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf9Data + */ + 'description'?: string; + /** + * The unit in which this product is sold + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf9Data + */ + 'unit'?: string; + /** + * The tax percentage + * @type {number} + * @memberof GetRecentsResponse200DataInnerAnyOf9Data + */ + 'tax'?: number; + /** + * The category of the product + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf9Data + */ + 'category'?: string; + /** + * Whether this product will be made active or not + * @type {boolean} + * @memberof GetRecentsResponse200DataInnerAnyOf9Data + */ + 'active_flag'?: boolean; + /** + * Whether this product can be selected in deals or not + * @type {boolean} + * @memberof GetRecentsResponse200DataInnerAnyOf9Data + */ + 'selectable'?: boolean; + /** + * The first letter of the product name + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf9Data + */ + 'first_char'?: string; + /** + * The visibility of the product. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user. + * @type {number} + * @memberof GetRecentsResponse200DataInnerAnyOf9Data + */ + 'visible_to'?: number; + /** + * The ID of the user who will be marked as the owner of this product. When omitted, authorized user ID will be used. + * @type {number} + * @memberof GetRecentsResponse200DataInnerAnyOf9Data + */ + 'owner_id'?: number; + /** + * The count of files + * @type {number} + * @memberof GetRecentsResponse200DataInnerAnyOf9Data + */ + 'files_count'?: number; + /** + * The date and time when the product was added to the deal + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf9Data + */ + 'add_time'?: string; + /** + * The date and time when the product was updated to the deal + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf9Data + */ + 'update_time'?: string; + /** + * Array of objects, each containing: `currency` (string), `price` (number), `cost` (number, optional), `overhead_cost` (number, optional). Note that there can only be one price per product per currency. When `prices` is omitted altogether, a default price of 0 and a default currency based on the company\'s currency will be assigned. + * @type {Array} + * @memberof GetRecentsResponse200DataInnerAnyOf9Data + */ + 'prices'?: Array; +} + diff --git a/models/get-recents-response200-data-inner-any-of9.ts b/models/get-recents-response200-data-inner-any-of9.ts new file mode 100644 index 00000000..ef14db0d --- /dev/null +++ b/models/get-recents-response200-data-inner-any-of9.ts @@ -0,0 +1,52 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetRecentsResponse200DataInnerAnyOf9Data } from './get-recents-response200-data-inner-any-of9-data'; + +/** + * + * @export + * @interface GetRecentsResponse200DataInnerAnyOf9 + */ +export interface GetRecentsResponse200DataInnerAnyOf9 { + /** + * + * @type {string} + * @memberof GetRecentsResponse200DataInnerAnyOf9 + */ + 'item'?: GetRecentsResponse200DataInnerAnyOf9ItemConst; + /** + * + * @type {number} + * @memberof GetRecentsResponse200DataInnerAnyOf9 + */ + 'id'?: number; + /** + * + * @type {GetRecentsResponse200DataInnerAnyOf9Data} + * @memberof GetRecentsResponse200DataInnerAnyOf9 + */ + 'data'?: GetRecentsResponse200DataInnerAnyOf9Data; +} + +export const GetRecentsResponse200DataInnerAnyOf9ItemConst = { + product: 'product' +} as const; + +export type GetRecentsResponse200DataInnerAnyOf9ItemConst = typeof GetRecentsResponse200DataInnerAnyOf9ItemConst[keyof typeof GetRecentsResponse200DataInnerAnyOf9ItemConst]; + + diff --git a/models/get-recents-response200-data-inner.ts b/models/get-recents-response200-data-inner.ts new file mode 100644 index 00000000..a0346167 --- /dev/null +++ b/models/get-recents-response200-data-inner.ts @@ -0,0 +1,88 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetRecentsResponse200DataInnerAnyOf } from './get-recents-response200-data-inner-any-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRecentsResponse200DataInnerAnyOf1 } from './get-recents-response200-data-inner-any-of1'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRecentsResponse200DataInnerAnyOf10 } from './get-recents-response200-data-inner-any-of10'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRecentsResponse200DataInnerAnyOf11 } from './get-recents-response200-data-inner-any-of11'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRecentsResponse200DataInnerAnyOf11Data } from './get-recents-response200-data-inner-any-of11-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRecentsResponse200DataInnerAnyOf2 } from './get-recents-response200-data-inner-any-of2'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRecentsResponse200DataInnerAnyOf3 } from './get-recents-response200-data-inner-any-of3'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRecentsResponse200DataInnerAnyOf4 } from './get-recents-response200-data-inner-any-of4'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRecentsResponse200DataInnerAnyOf5 } from './get-recents-response200-data-inner-any-of5'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRecentsResponse200DataInnerAnyOf6 } from './get-recents-response200-data-inner-any-of6'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRecentsResponse200DataInnerAnyOf7 } from './get-recents-response200-data-inner-any-of7'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRecentsResponse200DataInnerAnyOf8 } from './get-recents-response200-data-inner-any-of8'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRecentsResponse200DataInnerAnyOf9 } from './get-recents-response200-data-inner-any-of9'; + +/** + * + * @export + * @interface GetRecentsResponse200DataInner + */ +export interface GetRecentsResponse200DataInner { + /** + * + * @type {string} + * @memberof GetRecentsResponse200DataInner + */ + 'item'?: GetRecentsResponse200DataInnerItemConst; + /** + * + * @type {number} + * @memberof GetRecentsResponse200DataInner + */ + 'id'?: number; + /** + * + * @type {GetRecentsResponse200DataInnerAnyOf11Data} + * @memberof GetRecentsResponse200DataInner + */ + 'data'?: GetRecentsResponse200DataInnerAnyOf11Data; +} + +export const GetRecentsResponse200DataInnerItemConst = { + user: 'user' +} as const; + +export type GetRecentsResponse200DataInnerItemConst = typeof GetRecentsResponse200DataInnerItemConst[keyof typeof GetRecentsResponse200DataInnerItemConst]; + + diff --git a/models/get-recents-response200.ts b/models/get-recents-response200.ts new file mode 100644 index 00000000..2aa15958 --- /dev/null +++ b/models/get-recents-response200.ts @@ -0,0 +1,48 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetRecentsResponse200AdditionalData } from './get-recents-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRecentsResponse200DataInner } from './get-recents-response200-data-inner'; + +/** + * + * @export + * @interface GetRecentsResponse200 + */ +export interface GetRecentsResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetRecentsResponse200 + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetRecentsResponse200 + */ + 'data'?: Array; + /** + * + * @type {GetRecentsResponse200AdditionalData} + * @memberof GetRecentsResponse200 + */ + 'additional_data'?: GetRecentsResponse200AdditionalData; +} + diff --git a/models/get-role-pipelines200-all-of-data.ts b/models/get-role-pipelines200-all-of-data.ts new file mode 100644 index 00000000..204fa1db --- /dev/null +++ b/models/get-role-pipelines200-all-of-data.ts @@ -0,0 +1,36 @@ +/* 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. + */ + + + +/** + * The response data + * @export + * @interface GetRolePipelines200AllOfData + */ +export interface GetRolePipelines200AllOfData { + /** + * Either visible or hidden pipeline ids + * @type {Array} + * @memberof GetRolePipelines200AllOfData + */ + 'pipeline_ids'?: Array; + /** + * Whether visible or hidden pipeline ids were returned + * @type {boolean} + * @memberof GetRolePipelines200AllOfData + */ + 'visible'?: boolean; +} + diff --git a/models/get-role-pipelines200-all-of.ts b/models/get-role-pipelines200-all-of.ts new file mode 100644 index 00000000..5b3a32e4 --- /dev/null +++ b/models/get-role-pipelines200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetRolePipelines200AllOfData } from './get-role-pipelines200-all-of-data'; + +/** + * + * @export + * @interface GetRolePipelines200AllOf + */ +export interface GetRolePipelines200AllOf { + /** + * + * @type {GetRolePipelines200AllOfData} + * @memberof GetRolePipelines200AllOf + */ + 'data'?: GetRolePipelines200AllOfData; +} + diff --git a/models/get-role-pipelines200.ts b/models/get-role-pipelines200.ts new file mode 100644 index 00000000..d94e0f6c --- /dev/null +++ b/models/get-role-pipelines200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRolePipelines200AllOf } from './get-role-pipelines200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRolePipelines200AllOfData } from './get-role-pipelines200-all-of-data'; + +/** + * @type GetRolePipelines200 + * @export + */ +export type GetRolePipelines200 = BaseResponse & GetRolePipelines200AllOf; + + diff --git a/models/get-role-response200-all-of-additional-data-settings.ts b/models/get-role-response200-all-of-additional-data-settings.ts new file mode 100644 index 00000000..3a1c47fc --- /dev/null +++ b/models/get-role-response200-all-of-additional-data-settings.ts @@ -0,0 +1,78 @@ +/* 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. + */ + + + +/** + * The settings for the role + * @export + * @interface GetRoleResponse200AllOfAdditionalDataSettings + */ +export interface GetRoleResponse200AllOfAdditionalDataSettings { + /** + * The default visibility level of the deals for the role + * @type {number} + * @memberof GetRoleResponse200AllOfAdditionalDataSettings + */ + 'deal_default_visibility'?: number; + /** + * The default visibility level of the leads for the role + * @type {number} + * @memberof GetRoleResponse200AllOfAdditionalDataSettings + */ + 'lead_default_visibility'?: number; + /** + * The default visibility level of the organizations for the role + * @type {number} + * @memberof GetRoleResponse200AllOfAdditionalDataSettings + */ + 'org_default_visibility'?: number; + /** + * The default visibility level of the people for the role + * @type {number} + * @memberof GetRoleResponse200AllOfAdditionalDataSettings + */ + 'person_default_visibility'?: number; + /** + * The default visibility level of the products for the role + * @type {number} + * @memberof GetRoleResponse200AllOfAdditionalDataSettings + */ + 'product_default_visibility'?: number; + /** + * The access level of the deals for the role (only for default role) + * @type {number} + * @memberof GetRoleResponse200AllOfAdditionalDataSettings + */ + 'deal_access_level'?: number; + /** + * The access level of the organizations for the role (only for default role) + * @type {number} + * @memberof GetRoleResponse200AllOfAdditionalDataSettings + */ + 'org_access_level'?: number; + /** + * The access level of the people for the role (only for default role) + * @type {number} + * @memberof GetRoleResponse200AllOfAdditionalDataSettings + */ + 'person_access_level'?: number; + /** + * The access level of the products for the role (only for default role) + * @type {number} + * @memberof GetRoleResponse200AllOfAdditionalDataSettings + */ + 'product_access_level'?: number; +} + diff --git a/models/get-role-response200-all-of-additional-data.ts b/models/get-role-response200-all-of-additional-data.ts new file mode 100644 index 00000000..bc76876b --- /dev/null +++ b/models/get-role-response200-all-of-additional-data.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetRoleResponse200AllOfAdditionalDataSettings } from './get-role-response200-all-of-additional-data-settings'; + +/** + * The additional data in the role + * @export + * @interface GetRoleResponse200AllOfAdditionalData + */ +export interface GetRoleResponse200AllOfAdditionalData { + /** + * + * @type {GetRoleResponse200AllOfAdditionalDataSettings} + * @memberof GetRoleResponse200AllOfAdditionalData + */ + 'settings'?: GetRoleResponse200AllOfAdditionalDataSettings; +} + diff --git a/models/get-role-response200-all-of.ts b/models/get-role-response200-all-of.ts new file mode 100644 index 00000000..c12a9630 --- /dev/null +++ b/models/get-role-response200-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetRoleResponse200AllOfAdditionalData } from './get-role-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { SubRole } from './sub-role'; + +/** + * + * @export + * @interface GetRoleResponse200AllOf + */ +export interface GetRoleResponse200AllOf { + /** + * + * @type {SubRole} + * @memberof GetRoleResponse200AllOf + */ + 'data'?: SubRole; + /** + * + * @type {GetRoleResponse200AllOfAdditionalData} + * @memberof GetRoleResponse200AllOf + */ + 'additional_data'?: GetRoleResponse200AllOfAdditionalData; +} + diff --git a/models/get-role-response200.ts b/models/get-role-response200.ts new file mode 100644 index 00000000..bfaaf874 --- /dev/null +++ b/models/get-role-response200.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRoleResponse200AllOf } from './get-role-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRoleResponse200AllOfAdditionalData } from './get-role-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { SubRole } from './sub-role'; + +/** + * @type GetRoleResponse200 + * @export + */ +export type GetRoleResponse200 = BaseResponse & GetRoleResponse200AllOf; + + diff --git a/models/get-role-settings-response200-all-of.ts b/models/get-role-settings-response200-all-of.ts new file mode 100644 index 00000000..afe3479e --- /dev/null +++ b/models/get-role-settings-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetRoleResponse200AllOfAdditionalDataSettings } from './get-role-response200-all-of-additional-data-settings'; + +/** + * + * @export + * @interface GetRoleSettingsResponse200AllOf + */ +export interface GetRoleSettingsResponse200AllOf { + /** + * + * @type {GetRoleResponse200AllOfAdditionalDataSettings} + * @memberof GetRoleSettingsResponse200AllOf + */ + 'data'?: GetRoleResponse200AllOfAdditionalDataSettings; +} + diff --git a/models/get-role-settings-response200.ts b/models/get-role-settings-response200.ts new file mode 100644 index 00000000..e725fd26 --- /dev/null +++ b/models/get-role-settings-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRoleResponse200AllOfAdditionalDataSettings } from './get-role-response200-all-of-additional-data-settings'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRoleSettingsResponse200AllOf } from './get-role-settings-response200-all-of'; + +/** + * @type GetRoleSettingsResponse200 + * @export + */ +export type GetRoleSettingsResponse200 = BaseResponse & GetRoleSettingsResponse200AllOf; + + diff --git a/models/get-roles-response200-all-of-additional-data-pagination.ts b/models/get-roles-response200-all-of-additional-data-pagination.ts new file mode 100644 index 00000000..c45cb2fc --- /dev/null +++ b/models/get-roles-response200-all-of-additional-data-pagination.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + + +/** + * The pagination details in the role list + * @export + * @interface GetRolesResponse200AllOfAdditionalDataPagination + */ +export interface GetRolesResponse200AllOfAdditionalDataPagination { + /** + * Pagination start + * @type {number} + * @memberof GetRolesResponse200AllOfAdditionalDataPagination + */ + 'start'?: number; + /** + * Items shown per page + * @type {number} + * @memberof GetRolesResponse200AllOfAdditionalDataPagination + */ + 'limit'?: number; + /** + * Whether there are more list items in the collection than displayed + * @type {boolean} + * @memberof GetRolesResponse200AllOfAdditionalDataPagination + */ + 'more_items_in_collection'?: boolean; +} + diff --git a/models/get-roles-response200-all-of-additional-data.ts b/models/get-roles-response200-all-of-additional-data.ts new file mode 100644 index 00000000..47d45b17 --- /dev/null +++ b/models/get-roles-response200-all-of-additional-data.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetRolesResponse200AllOfAdditionalDataPagination } from './get-roles-response200-all-of-additional-data-pagination'; + +/** + * The additional data in the role list + * @export + * @interface GetRolesResponse200AllOfAdditionalData + */ +export interface GetRolesResponse200AllOfAdditionalData { + /** + * + * @type {GetRolesResponse200AllOfAdditionalDataPagination} + * @memberof GetRolesResponse200AllOfAdditionalData + */ + 'pagination'?: GetRolesResponse200AllOfAdditionalDataPagination; +} + diff --git a/models/get-roles-response200-all-of.ts b/models/get-roles-response200-all-of.ts new file mode 100644 index 00000000..e0779c67 --- /dev/null +++ b/models/get-roles-response200-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FullRole } from './full-role'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRolesResponse200AllOfAdditionalData } from './get-roles-response200-all-of-additional-data'; + +/** + * + * @export + * @interface GetRolesResponse200AllOf + */ +export interface GetRolesResponse200AllOf { + /** + * The array of roles + * @type {Array} + * @memberof GetRolesResponse200AllOf + */ + 'data'?: Array; + /** + * + * @type {GetRolesResponse200AllOfAdditionalData} + * @memberof GetRolesResponse200AllOf + */ + 'additional_data'?: GetRolesResponse200AllOfAdditionalData; +} + diff --git a/models/get-roles-response200.ts b/models/get-roles-response200.ts new file mode 100644 index 00000000..fed69dbd --- /dev/null +++ b/models/get-roles-response200.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { FullRole } from './full-role'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRolesResponse200AllOf } from './get-roles-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRolesResponse200AllOfAdditionalData } from './get-roles-response200-all-of-additional-data'; + +/** + * @type GetRolesResponse200 + * @export + */ +export type GetRolesResponse200 = BaseResponse & GetRolesResponse200AllOf; + + diff --git a/models/get-stage-deals-response200.ts b/models/get-stage-deals-response200.ts new file mode 100644 index 00000000..c73fa2f2 --- /dev/null +++ b/models/get-stage-deals-response200.ts @@ -0,0 +1,48 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DealStrict } from './deal-strict'; +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; + +/** + * + * @export + * @interface GetStageDealsResponse200 + */ +export interface GetStageDealsResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetStageDealsResponse200 + */ + 'success'?: boolean; + /** + * The array of deals + * @type {Array} + * @memberof GetStageDealsResponse200 + */ + 'data'?: Array; + /** + * + * @type {FieldsResponse200AllOfAdditionalData} + * @memberof GetStageDealsResponse200 + */ + 'additional_data'?: FieldsResponse200AllOfAdditionalData; +} + diff --git a/models/get-stage-response200-data.ts b/models/get-stage-response200-data.ts new file mode 100644 index 00000000..8a5e359c --- /dev/null +++ b/models/get-stage-response200-data.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedDealsResponse200AllOfRelatedObjectsStage } from './get-associated-deals-response200-all-of-related-objects-stage'; +// May contain unused imports in some cases +// @ts-ignore +import { PipelineDetailsAllOf } from './pipeline-details-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { PipelineDetailsAllOfDealsSummary } from './pipeline-details-all-of-deals-summary'; + +/** + * @type GetStageResponse200Data + * The stage object + * @export + */ +export type GetStageResponse200Data = GetAssociatedDealsResponse200AllOfRelatedObjectsStage & PipelineDetailsAllOf; + + diff --git a/models/get-stage-response200.ts b/models/get-stage-response200.ts new file mode 100644 index 00000000..c556e59a --- /dev/null +++ b/models/get-stage-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetStageResponse200Data } from './get-stage-response200-data'; + +/** + * + * @export + * @interface GetStageResponse200 + */ +export interface GetStageResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetStageResponse200 + */ + 'success'?: boolean; + /** + * + * @type {GetStageResponse200Data} + * @memberof GetStageResponse200 + */ + 'data'?: GetStageResponse200Data; +} + diff --git a/models/get-stages-response200-data-inner-all-of.ts b/models/get-stages-response200-data-inner-all-of.ts new file mode 100644 index 00000000..e18073af --- /dev/null +++ b/models/get-stages-response200-data-inner-all-of.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface GetStagesResponse200DataInnerAllOf + */ +export interface GetStagesResponse200DataInnerAllOf { + /** + * The name of the pipeline + * @type {string} + * @memberof GetStagesResponse200DataInnerAllOf + */ + 'pipeline_name'?: string; + /** + * The pipeline deal probability. When `true`, overrides the stage probability. + * @type {boolean} + * @memberof GetStagesResponse200DataInnerAllOf + */ + 'pipeline_deal_probability'?: boolean; +} + diff --git a/models/get-stages-response200-data-inner.ts b/models/get-stages-response200-data-inner.ts new file mode 100644 index 00000000..b7f4bd0a --- /dev/null +++ b/models/get-stages-response200-data-inner.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedDealsResponse200AllOfRelatedObjectsStage } from './get-associated-deals-response200-all-of-related-objects-stage'; +// May contain unused imports in some cases +// @ts-ignore +import { GetStagesResponse200DataInnerAllOf } from './get-stages-response200-data-inner-all-of'; + +/** + * @type GetStagesResponse200DataInner + * @export + */ +export type GetStagesResponse200DataInner = GetAssociatedDealsResponse200AllOfRelatedObjectsStage & GetStagesResponse200DataInnerAllOf; + + diff --git a/models/get-stages-response200.ts b/models/get-stages-response200.ts new file mode 100644 index 00000000..f6da7276 --- /dev/null +++ b/models/get-stages-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetStagesResponse200DataInner } from './get-stages-response200-data-inner'; + +/** + * + * @export + * @interface GetStagesResponse200 + */ +export interface GetStagesResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetStagesResponse200 + */ + 'success'?: boolean; + /** + * The array of stages + * @type {Array} + * @memberof GetStagesResponse200 + */ + 'data'?: Array; +} + diff --git a/models/get-task-response200.ts b/models/get-task-response200.ts new file mode 100644 index 00000000..e1dfba27 --- /dev/null +++ b/models/get-task-response200.ts @@ -0,0 +1,45 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { TaskResponseObject } from './task-response-object'; + +/** + * + * @export + * @interface GetTaskResponse200 + */ +export interface GetTaskResponse200 { + /** + * + * @type {boolean} + * @memberof GetTaskResponse200 + */ + 'success'?: boolean; + /** + * + * @type {TaskResponseObject} + * @memberof GetTaskResponse200 + */ + 'data'?: TaskResponseObject; + /** + * + * @type {object} + * @memberof GetTaskResponse200 + */ + 'additional_data'?: object | null; +} + diff --git a/models/get-tasks-response200.ts b/models/get-tasks-response200.ts new file mode 100644 index 00000000..fdadcc65 --- /dev/null +++ b/models/get-tasks-response200.ts @@ -0,0 +1,48 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesCollectionResponse200AdditionalData } from './get-activities-collection-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { TaskResponseObject } from './task-response-object'; + +/** + * + * @export + * @interface GetTasksResponse200 + */ +export interface GetTasksResponse200 { + /** + * + * @type {boolean} + * @memberof GetTasksResponse200 + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetTasksResponse200 + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesCollectionResponse200AdditionalData} + * @memberof GetTasksResponse200 + */ + 'additional_data'?: GetActivitiesCollectionResponse200AdditionalData; +} + diff --git a/models/get-user-permissions-response200-all-of-data.ts b/models/get-user-permissions-response200-all-of-data.ts new file mode 100644 index 00000000..a5bdc586 --- /dev/null +++ b/models/get-user-permissions-response200-all-of-data.ts @@ -0,0 +1,210 @@ +/* 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 + * @interface GetUserPermissionsResponse200AllOfData + */ +export interface GetUserPermissionsResponse200AllOfData { + /** + * If the user can add custom fields + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_add_custom_fields'?: boolean; + /** + * If the user can add products + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_add_products'?: boolean; + /** + * If the user can add prospects as leads + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_add_prospects_as_leads'?: boolean; + /** + * If the user can bulk edit items + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_bulk_edit_items'?: boolean; + /** + * If the user can change visibility of items + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_change_visibility_of_items'?: boolean; + /** + * If the user can convert deals to leads + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_convert_deals_to_leads'?: boolean; + /** + * If the user can create workflows + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_create_own_workflow'?: boolean; + /** + * If the user can delete activities + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_delete_activities'?: boolean; + /** + * If the user can delete custom fields + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_delete_custom_fields'?: boolean; + /** + * If the user can delete deals + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_delete_deals'?: boolean; + /** + * If the user can edit custom fields + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_edit_custom_fields'?: boolean; + /** + * If the user can edit deals\' closed date + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_edit_deals_closed_date'?: boolean; + /** + * If the user can edit products + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_edit_products'?: boolean; + /** + * If the user can edit shared filters + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_edit_shared_filters'?: boolean; + /** + * If the user can export data from item lists + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_export_data_from_lists'?: boolean; + /** + * If the user can follow other users + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_follow_other_users'?: boolean; + /** + * If the user can merge deals + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_merge_deals'?: boolean; + /** + * If the user can merge organizations + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_merge_organizations'?: boolean; + /** + * If the user can merge people + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_merge_people'?: boolean; + /** + * If the user can modify labels + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_modify_labels'?: boolean; + /** + * If the user can see company-wide statistics + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_see_company_wide_statistics'?: boolean; + /** + * If the user can see the summary on the deals page + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_see_deals_list_summary'?: boolean; + /** + * If the user can see the names of hidden items + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_see_hidden_items_names'?: boolean; + /** + * If the user can see other users + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_see_other_users'?: boolean; + /** + * If the user can see other users\' statistics + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_see_other_users_statistics'?: boolean; + /** + * If the user can see security dashboard + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_see_security_dashboard'?: boolean; + /** + * If the user can share filters + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_share_filters'?: boolean; + /** + * If the user can share insights + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_share_insights'?: boolean; + /** + * If the user can use API + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_use_api'?: boolean; + /** + * If the user can use email tracking + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_use_email_tracking'?: boolean; + /** + * If the user can use import + * @type {boolean} + * @memberof GetUserPermissionsResponse200AllOfData + */ + 'can_use_import'?: boolean; +} + diff --git a/models/get-user-permissions-response200-all-of.ts b/models/get-user-permissions-response200-all-of.ts new file mode 100644 index 00000000..a04acd61 --- /dev/null +++ b/models/get-user-permissions-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetUserPermissionsResponse200AllOfData } from './get-user-permissions-response200-all-of-data'; + +/** + * + * @export + * @interface GetUserPermissionsResponse200AllOf + */ +export interface GetUserPermissionsResponse200AllOf { + /** + * + * @type {GetUserPermissionsResponse200AllOfData} + * @memberof GetUserPermissionsResponse200AllOf + */ + 'data'?: GetUserPermissionsResponse200AllOfData; +} + diff --git a/models/get-user-permissions-response200.ts b/models/get-user-permissions-response200.ts new file mode 100644 index 00000000..cc35df43 --- /dev/null +++ b/models/get-user-permissions-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetUserPermissionsResponse200AllOf } from './get-user-permissions-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetUserPermissionsResponse200AllOfData } from './get-user-permissions-response200-all-of-data'; + +/** + * @type GetUserPermissionsResponse200 + * @export + */ +export type GetUserPermissionsResponse200 = BaseResponse & GetUserPermissionsResponse200AllOf; + + diff --git a/models/get-user-role-assignments-response200-all-of.ts b/models/get-user-role-assignments-response200-all-of.ts new file mode 100644 index 00000000..a31edef4 --- /dev/null +++ b/models/get-user-role-assignments-response200-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetRolesResponse200AllOfAdditionalData } from './get-roles-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { RoleAssignment } from './role-assignment'; + +/** + * + * @export + * @interface GetUserRoleAssignmentsResponse200AllOf + */ +export interface GetUserRoleAssignmentsResponse200AllOf { + /** + * The role assignments + * @type {Array} + * @memberof GetUserRoleAssignmentsResponse200AllOf + */ + 'data'?: Array; + /** + * + * @type {GetRolesResponse200AllOfAdditionalData} + * @memberof GetUserRoleAssignmentsResponse200AllOf + */ + 'additional_data'?: GetRolesResponse200AllOfAdditionalData; +} + diff --git a/models/get-user-role-assignments-response200.ts b/models/get-user-role-assignments-response200.ts new file mode 100644 index 00000000..8868ee0a --- /dev/null +++ b/models/get-user-role-assignments-response200.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRolesResponse200AllOfAdditionalData } from './get-roles-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetUserRoleAssignmentsResponse200AllOf } from './get-user-role-assignments-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { RoleAssignment } from './role-assignment'; + +/** + * @type GetUserRoleAssignmentsResponse200 + * @export + */ +export type GetUserRoleAssignmentsResponse200 = BaseResponse & GetUserRoleAssignmentsResponse200AllOf; + + diff --git a/models/get-user-settings-response200-all-of-data.ts b/models/get-user-settings-response200-all-of-data.ts new file mode 100644 index 00000000..d4336b6c --- /dev/null +++ b/models/get-user-settings-response200-all-of-data.ts @@ -0,0 +1,84 @@ +/* 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 + * @interface GetUserSettingsResponse200AllOfData + */ +export interface GetUserSettingsResponse200AllOfData { + /** + * If the vendors are allowed to install custom Marketplace apps with functionality and content in the Pipedrive UI or not + * @type {boolean} + * @memberof GetUserSettingsResponse200AllOfData + */ + 'marketplace_allow_custom_install_url'?: boolean; + /** + * If the vendors are allowed to extend their Marketplace apps with functionality and content in the Pipedrive UI or not + * @type {boolean} + * @memberof GetUserSettingsResponse200AllOfData + */ + 'marketplace_app_extensions_vendor'?: boolean; + /** + * If the vendors are allowed to be part of the Marketplace team or not + * @type {boolean} + * @memberof GetUserSettingsResponse200AllOfData + */ + 'marketplace_team'?: boolean; + /** + * The number of results shown in list by default + * @type {number} + * @memberof GetUserSettingsResponse200AllOfData + */ + 'list_limit'?: number; + /** + * Whether beta app is enabled + * @type {boolean} + * @memberof GetUserSettingsResponse200AllOfData + */ + 'beta_app'?: boolean; + /** + * Prevent salesphone call to override + * @type {boolean} + * @memberof GetUserSettingsResponse200AllOfData + */ + 'prevent_salesphone_callto_override'?: boolean; + /** + * The destination of file upload + * @type {string} + * @memberof GetUserSettingsResponse200AllOfData + */ + 'file_upload_destination'?: string; + /** + * The call to link syntax + * @type {string} + * @memberof GetUserSettingsResponse200AllOfData + */ + 'callto_link_syntax'?: string; + /** + * Whether the expected close date of the deal is filled automatically or not + * @type {boolean} + * @memberof GetUserSettingsResponse200AllOfData + */ + 'autofill_deal_expected_close_date'?: boolean; + /** + * Allow the vendors to duplicate a person + * @type {string} + * @memberof GetUserSettingsResponse200AllOfData + */ + 'person_duplicate_condition'?: string; +} + diff --git a/models/get-user-settings-response200-all-of.ts b/models/get-user-settings-response200-all-of.ts new file mode 100644 index 00000000..8e01cada --- /dev/null +++ b/models/get-user-settings-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetUserSettingsResponse200AllOfData } from './get-user-settings-response200-all-of-data'; + +/** + * + * @export + * @interface GetUserSettingsResponse200AllOf + */ +export interface GetUserSettingsResponse200AllOf { + /** + * + * @type {GetUserSettingsResponse200AllOfData} + * @memberof GetUserSettingsResponse200AllOf + */ + 'data'?: GetUserSettingsResponse200AllOfData; +} + diff --git a/models/get-user-settings-response200.ts b/models/get-user-settings-response200.ts new file mode 100644 index 00000000..9602ac9c --- /dev/null +++ b/models/get-user-settings-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetUserSettingsResponse200AllOf } from './get-user-settings-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetUserSettingsResponse200AllOfData } from './get-user-settings-response200-all-of-data'; + +/** + * @type GetUserSettingsResponse200 + * @export + */ +export type GetUserSettingsResponse200 = BaseResponse & GetUserSettingsResponse200AllOf; + + diff --git a/models/get-webhooks-response200-all-of-data-inner.ts b/models/get-webhooks-response200-all-of-data-inner.ts new file mode 100644 index 00000000..e0ebec2b --- /dev/null +++ b/models/get-webhooks-response200-all-of-data-inner.ts @@ -0,0 +1,146 @@ +/* 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 + * @interface GetWebhooksResponse200AllOfDataInner + */ +export interface GetWebhooksResponse200AllOfDataInner { + /** + * The ID of the Webhook + * @type {number} + * @memberof GetWebhooksResponse200AllOfDataInner + */ + 'id'?: number; + /** + * The ID of the company related to the Webhook + * @type {number} + * @memberof GetWebhooksResponse200AllOfDataInner + */ + 'company_id'?: number; + /** + * The ID of the user who owns the Webhook + * @type {number} + * @memberof GetWebhooksResponse200AllOfDataInner + */ + 'owner_id'?: number; + /** + * The ID of the user related to the Webhook + * @type {number} + * @memberof GetWebhooksResponse200AllOfDataInner + */ + 'user_id'?: number; + /** + * The Webhook action + * @type {string} + * @memberof GetWebhooksResponse200AllOfDataInner + */ + 'event_action'?: string; + /** + * The Webhook object + * @type {string} + * @memberof GetWebhooksResponse200AllOfDataInner + */ + 'event_object'?: string; + /** + * The subscription URL of the Webhook + * @type {string} + * @memberof GetWebhooksResponse200AllOfDataInner + */ + 'subscription_url'?: string; + /** + * + * @type {number} + * @memberof GetWebhooksResponse200AllOfDataInner + */ + 'is_active'?: GetWebhooksResponse200AllOfDataInnerIsActiveConst; + /** + * The date when the Webhook was added + * @type {string} + * @memberof GetWebhooksResponse200AllOfDataInner + */ + 'add_time'?: string; + /** + * The date when the Webhook was removed (if removed) + * @type {string} + * @memberof GetWebhooksResponse200AllOfDataInner + */ + 'remove_time'?: string | null; + /** + * The type of the Webhook + * @type {string} + * @memberof GetWebhooksResponse200AllOfDataInner + */ + 'type'?: GetWebhooksResponse200AllOfDataInnerTypeConst; + /** + * The username of the `subscription_url` of the Webhook + * @type {string} + * @memberof GetWebhooksResponse200AllOfDataInner + */ + 'http_auth_user'?: string | null; + /** + * The password of the `subscription_url` of the Webhook + * @type {string} + * @memberof GetWebhooksResponse200AllOfDataInner + */ + 'http_auth_password'?: string | null; + /** + * Any additional data related to the Webhook + * @type {object} + * @memberof GetWebhooksResponse200AllOfDataInner + */ + 'additional_data'?: object; + /** + * The removal reason of the Webhook (if removed) + * @type {string} + * @memberof GetWebhooksResponse200AllOfDataInner + */ + 'remove_reason'?: string | null; + /** + * The last delivery time of the Webhook + * @type {string} + * @memberof GetWebhooksResponse200AllOfDataInner + */ + 'last_delivery_time'?: string | null; + /** + * The last delivery HTTP status of the Webhook + * @type {number} + * @memberof GetWebhooksResponse200AllOfDataInner + */ + 'last_http_status'?: number | null; + /** + * The ID of the admin of the Webhook + * @type {number} + * @memberof GetWebhooksResponse200AllOfDataInner + */ + 'admin_id'?: number; +} + +export const GetWebhooksResponse200AllOfDataInnerIsActiveConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type GetWebhooksResponse200AllOfDataInnerIsActiveConst = typeof GetWebhooksResponse200AllOfDataInnerIsActiveConst[keyof typeof GetWebhooksResponse200AllOfDataInnerIsActiveConst]; +export const GetWebhooksResponse200AllOfDataInnerTypeConst = { + general: 'general', + app: 'app' +} as const; + +export type GetWebhooksResponse200AllOfDataInnerTypeConst = typeof GetWebhooksResponse200AllOfDataInnerTypeConst[keyof typeof GetWebhooksResponse200AllOfDataInnerTypeConst]; + + diff --git a/models/get-webhooks-response200-all-of.ts b/models/get-webhooks-response200-all-of.ts new file mode 100644 index 00000000..1096e744 --- /dev/null +++ b/models/get-webhooks-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetWebhooksResponse200AllOfDataInner } from './get-webhooks-response200-all-of-data-inner'; + +/** + * + * @export + * @interface GetWebhooksResponse200AllOf + */ +export interface GetWebhooksResponse200AllOf { + /** + * The array of Webhooks + * @type {Array} + * @memberof GetWebhooksResponse200AllOf + */ + 'data'?: Array; +} + diff --git a/models/get-webhooks-response200.ts b/models/get-webhooks-response200.ts new file mode 100644 index 00000000..18a43e6a --- /dev/null +++ b/models/get-webhooks-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse200 } from './base-response200'; +// May contain unused imports in some cases +// @ts-ignore +import { GetWebhooksResponse200AllOf } from './get-webhooks-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetWebhooksResponse200AllOfDataInner } from './get-webhooks-response200-all-of-data-inner'; + +/** + * @type GetWebhooksResponse200 + * @export + */ +export type GetWebhooksResponse200 = BaseResponse200 & GetWebhooksResponse200AllOf; + + diff --git a/models/getproduct-response200-data-all-of.ts b/models/getproduct-response200-data-all-of.ts new file mode 100644 index 00000000..d805c705 --- /dev/null +++ b/models/getproduct-response200-data-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface GetproductResponse200DataAllOf + */ +export interface GetproductResponse200DataAllOf { + /** + * Array of objects, each containing: currency (string), price (number), cost (number, optional), overhead_cost (number, optional) + * @type {Array} + * @memberof GetproductResponse200DataAllOf + */ + 'prices'?: Array; +} + diff --git a/models/getproduct-response200-data.ts b/models/getproduct-response200-data.ts new file mode 100644 index 00000000..817e1639 --- /dev/null +++ b/models/getproduct-response200-data.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetproductResponse200DataAllOf } from './getproduct-response200-data-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { ListProductsResponse200AllOfDataInnerProductAllOf } from './list-products-response200-all-of-data-inner-product-all-of'; + +/** + * @type GetproductResponse200Data + * @export + */ +export type GetproductResponse200Data = GetproductResponse200DataAllOf & ListProductsResponse200AllOfDataInnerProductAllOf; + + diff --git a/models/getproduct-response200.ts b/models/getproduct-response200.ts new file mode 100644 index 00000000..576cc928 --- /dev/null +++ b/models/getproduct-response200.ts @@ -0,0 +1,48 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjects } from './get-activities-response200-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { GetproductResponse200Data } from './getproduct-response200-data'; + +/** + * + * @export + * @interface GetproductResponse200 + */ +export interface GetproductResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetproductResponse200 + */ + 'success'?: boolean; + /** + * + * @type {GetproductResponse200Data} + * @memberof GetproductResponse200 + */ + 'data'?: GetproductResponse200Data; + /** + * + * @type {GetActivitiesResponse200RelatedObjects} + * @memberof GetproductResponse200 + */ + 'related_objects'?: GetActivitiesResponse200RelatedObjects; +} + diff --git a/models/index.ts b/models/index.ts new file mode 100644 index 00000000..5342ebe9 --- /dev/null +++ b/models/index.ts @@ -0,0 +1,792 @@ +export * from './activity-collection-response-object'; +export * from './activity-collection-response-object-all-of'; +export * from './activity-distribution-data-with-additional-data'; +export * from './activity-distribution-data-with-additional-data-all-of'; +export * from './activity-distribution-data-with-additional-data-all-of-activity-distribution'; +export * from './activity-distribution-data-with-additional-data-all-of-activity-distribution-assignedtouserid'; +export * from './activity-distribution-data-with-additional-data-all-of-activity-distribution-assignedtouseridactivities'; +export * from './activity-response-object'; +export * from './activity-response-object-all-of'; +export * from './activity-response-object-all-of1'; +export * from './add-activity-request'; +export * from './add-activity-request-all-of'; +export * from './add-activity-response200'; +export * from './add-activity-response200-additional-data'; +export * from './add-activity-response200-related-objects'; +export * from './add-activity-response200-related-objects-organization'; +export * from './add-activity-response200-related-objects-organization-organizationid'; +export * from './add-activity-response200-related-objects-organization-organizationidall-of'; +export * from './add-activity-response200-related-objects-person'; +export * from './add-activity-response200-related-objects-person-personid'; +export * from './add-activity-response200-related-objects-person-personidall-of'; +export * from './add-activity-type-request'; +export * from './add-call-log-request'; +export * from './add-channel200-response'; +export * from './add-channel200-response-data'; +export * from './add-channel400-response'; +export * from './add-channel400-response-additional-data'; +export * from './add-channel403-response'; +export * from './add-channel403-response-additional-data'; +export * from './add-channel-request'; +export * from './add-deal-follower-request'; +export * from './add-deal-follower-response200'; +export * from './add-deal-follower-response200-data'; +export * from './add-deal-participant-request'; +export * from './add-deal-participant-response200'; +export * from './add-deal-participant-response200-data'; +export * from './add-deal-participant-response200-related-objects'; +export * from './add-deal-product-request'; +export * from './add-deal-request'; +export * from './add-file-and-link-it-response200'; +export * from './add-file-response200'; +export * from './add-filter-request'; +export * from './add-goal-request'; +export * from './add-lead-label-request'; +export * from './add-lead-request'; +export * from './add-lead-request-value'; +export * from './add-note-request'; +export * from './add-note-request-all-of'; +export * from './add-note-request-all-of1'; +export * from './add-or-update-goal-response200'; +export * from './add-or-update-goal-response200-data'; +export * from './add-or-update-goal-response200-data-goal'; +export * from './add-or-update-goal-response200-data-goal-assignee'; +export * from './add-or-update-goal-response200-data-goal-duration'; +export * from './add-or-update-goal-response200-data-goal-expected-outcome'; +export * from './add-or-update-goal-response200-data-goal-type'; +export * from './add-or-update-goal-response200-data-goal-type-params'; +export * from './add-or-update-lead-label-response200'; +export * from './add-or-update-role-setting-request'; +export * from './add-or-update-role-setting-response200'; +export * from './add-or-update-role-setting-response200-all-of'; +export * from './add-or-update-role-setting-response200-all-of-data'; +export * from './add-organization-follower-request'; +export * from './add-organization-follower-response200'; +export * from './add-organization-relationship-request'; +export * from './add-organization-relationship-response200'; +export * from './add-organization-relationship-response200-all-of'; +export * from './add-organization-request'; +export * from './add-organization-request-all-of'; +export * from './add-organization-response200'; +export * from './add-organization-response200-all-of'; +export * from './add-person-follower-request'; +export * from './add-person-follower-response200'; +export * from './add-person-follower-response200-all-of'; +export * from './add-person-follower-response200-all-of-data'; +export * from './add-person-picture-response200'; +export * from './add-person-picture-response200-all-of'; +export * from './add-person-request'; +export * from './add-person-request-all-of'; +export * from './add-person-response200'; +export * from './add-person-response200-all-of'; +export * from './add-pipeline-response200'; +export * from './add-pipeline-response200-all-of'; +export * from './add-pipeline-response200-all-of-data'; +export * from './add-product-follower-request'; +export * from './add-product-request'; +export * from './add-product-request1'; +export * from './add-product-request1-all-of'; +export * from './add-product-request-all-of'; +export * from './add-project-request'; +export * from './add-project-request-all-of'; +export * from './add-project-response201'; +export * from './add-recurring-subscription-request'; +export * from './add-role-assignment-request'; +export * from './add-role-assignment-response200'; +export * from './add-role-assignment-response200-all-of'; +export * from './add-role-assignment-response200-all-of-data'; +export * from './add-role-request'; +export * from './add-role-response200'; +export * from './add-role-response200-all-of'; +export * from './add-role-response200-all-of-data'; +export * from './add-stage-request'; +export * from './add-subscription-installment-request'; +export * from './add-task-request'; +export * from './add-task-response201'; +export * from './add-team-request'; +export * from './add-team-request1'; +export * from './add-team-user-request'; +export * from './add-user-request'; +export * from './add-user-request-access-inner'; +export * from './add-webhook-request'; +export * from './additional-base-organization-item-info'; +export * from './additional-merge-person-info'; +export * from './additional-person-info'; +export * from './base-deal'; +export * from './base-mail-thread'; +export * from './base-mail-thread1'; +export * from './base-mail-thread-all-of'; +export * from './base-mail-thread-all-of1'; +export * from './base-mail-thread-all-of1-parties'; +export * from './base-mail-thread-all-of1-parties-to-inner'; +export * from './base-organization-item'; +export * from './base-organization-item-all-of'; +export * from './base-organization-item-all-of-picture-id'; +export * from './base-organization-item-all-of-picture-id-all-of'; +export * from './base-organization-item-with-edit-name-flag'; +export * from './base-organization-item-with-edit-name-flag-all-of'; +export * from './base-pipeline-with-selected-flag'; +export * from './base-pipeline-with-selected-flag-all-of'; +export * from './base-response'; +export * from './base-response200'; +export * from './base-response200-all-of'; +export * from './base-role-request'; +export * from './base-team'; +export * from './base-team-additional-properties'; +export * from './basic-deal'; +export * from './basic-deal-product-request'; +export * from './basic-goal-request'; +export * from './basic-organization'; +export * from './basic-person-request'; +export * from './basic-person-request-email-inner'; +export * from './call-log-response200'; +export * from './call-log-response400'; +export * from './call-log-response403'; +export * from './call-log-response404'; +export * from './call-log-response409'; +export * from './call-log-response410'; +export * from './call-log-response500'; +export * from './call-logs-response'; +export * from './call-logs-response-additional-data'; +export * from './cancel-recurring-subscription-request'; +export * from './comment-post-put-object'; +export * from './create-field-request'; +export * from './create-field-request-all-of'; +export * from './create-field-request-all-of1'; +export * from './create-update-delete-activity-type-response200'; +export * from './create-update-delete-activity-type-response200-all-of'; +export * from './deal-collection-response-object'; +export * from './deal-count-and-activity-info'; +export * from './deal-count-and-activity-info-all-of'; +export * from './deal-count-and-activity-info-all-of1'; +export * from './deal-non-strict'; +export * from './deal-non-strict-all-of'; +export * from './deal-non-strict-all-of-creator-user-id'; +export * from './deal-non-strict-with-details'; +export * from './deal-non-strict-with-details-all-of'; +export * from './deal-non-strict-with-details-all-of-age'; +export * from './deal-non-strict-with-details-all-of-average-time-to-won'; +export * from './deal-non-strict-with-details-all-of-stay-in-pipeline-stages'; +export * from './deal-organization-data-with-id'; +export * from './deal-organization-data-with-id-all-of'; +export * from './deal-organization-data-with-id-all-of1'; +export * from './deal-person-data-with-id'; +export * from './deal-person-data-with-id-all-of'; +export * from './deal-person-data-with-id-all-of1'; +export * from './deal-person-data-with-id-all-of-email-inner'; +export * from './deal-person-data-with-id-all-of-phone-inner'; +export * from './deal-response200'; +export * from './deal-strict'; +export * from './deal-strict-all-of'; +export * from './deal-title-param'; +export * from './deal-user-data-with-id'; +export * from './deal-user-data-with-id-all-of'; +export * from './deal-user-data-with-id-all-of1'; +export * from './deals-count-and-activity-info'; +export * from './delete-activities-response200'; +export * from './delete-activities-response200-data'; +export * from './delete-activity-response200'; +export * from './delete-activity-response200-data'; +export * from './delete-activity-types-response200'; +export * from './delete-activity-types-response200-all-of'; +export * from './delete-activity-types-response200-all-of-data'; +export * from './delete-channel200-response'; +export * from './delete-comment-response200'; +export * from './delete-conversation403-response'; +export * from './delete-conversation403-response-additional-data'; +export * from './delete-conversation404-response'; +export * from './delete-conversation404-response-additional-data'; +export * from './delete-deal-follower-response200'; +export * from './delete-deal-follower-response200-data'; +export * from './delete-deal-participant-response200'; +export * from './delete-deal-participant-response200-data'; +export * from './delete-deal-product-response200'; +export * from './delete-deal-product-response200-data'; +export * from './delete-deal-response200'; +export * from './delete-deal-response200-data'; +export * from './delete-deals-response200'; +export * from './delete-deals-response200-data'; +export * from './delete-field-response200'; +export * from './delete-field-response200-all-of'; +export * from './delete-field-response200-all-of-data'; +export * from './delete-fields-response200'; +export * from './delete-fields-response200-all-of'; +export * from './delete-fields-response200-all-of-data'; +export * from './delete-file-response200'; +export * from './delete-file-response200-data'; +export * from './delete-filter-response200'; +export * from './delete-filter-response200-all-of'; +export * from './delete-filter-response200-all-of-data'; +export * from './delete-filters-response200'; +export * from './delete-filters-response200-all-of'; +export * from './delete-filters-response200-all-of-data'; +export * from './delete-goal-response200'; +export * from './delete-mail-thread-response200'; +export * from './delete-mail-thread-response200-all-of'; +export * from './delete-mail-thread-response200-all-of-data'; +export * from './delete-note-response200'; +export * from './delete-organization-follower-response200'; +export * from './delete-organization-follower-response200-data'; +export * from './delete-organization-relationship-response200'; +export * from './delete-organization-relationship-response200-all-of'; +export * from './delete-organization-relationship-response200-all-of-data'; +export * from './delete-organization-response200'; +export * from './delete-organization-response200-data'; +export * from './delete-organizations-response200'; +export * from './delete-organizations-response200-data'; +export * from './delete-person-response200'; +export * from './delete-person-response200-all-of'; +export * from './delete-person-response200-all-of-data'; +export * from './delete-persons-response200'; +export * from './delete-persons-response200-all-of'; +export * from './delete-persons-response200-all-of-data'; +export * from './delete-pipeline-response200'; +export * from './delete-pipeline-response200-data'; +export * from './delete-product-field-response200'; +export * from './delete-product-fields-response200'; +export * from './delete-product-fields-response200-data'; +export * from './delete-product-follower-response200'; +export * from './delete-product-response200'; +export * from './delete-product-response200-data'; +export * from './delete-project'; +export * from './delete-project-data'; +export * from './delete-project-response200'; +export * from './delete-role-assignment-request'; +export * from './delete-role-assignment-response200'; +export * from './delete-role-response200'; +export * from './delete-stage-response200'; +export * from './delete-stage-response200-data'; +export * from './delete-stages-response200'; +export * from './delete-stages-response200-data'; +export * from './delete-task'; +export * from './delete-task-data'; +export * from './delete-task-response200'; +export * from './delete-team-user-request'; +export * from './delete-webhook403-response'; +export * from './delete-webhook403-response-all-of'; +export * from './duplicate-deal-response200'; +export * from './fail-response'; +export * from './field-response200'; +export * from './field-response200-all-of'; +export * from './fields-response200'; +export * from './fields-response200-all-of'; +export * from './fields-response200-all-of-additional-data'; +export * from './fields-response200-all-of-data-inner'; +export * from './full-project-object'; +export * from './full-project-object-all-of'; +export * from './full-project-object-all-of1'; +export * from './full-project-object-all-of2'; +export * from './full-role'; +export * from './full-role-all-of'; +export * from './get-activities-collection-response200'; +export * from './get-activities-collection-response200-additional-data'; +export * from './get-activities-response200'; +export * from './get-activities-response200-additional-data'; +export * from './get-activities-response200-additional-data-pagination'; +export * from './get-activities-response200-related-objects'; +export * from './get-activities-response200-related-objects-deal'; +export * from './get-activities-response200-related-objects-deal-dealid'; +export * from './get-activities-response200-related-objects-organization'; +export * from './get-activities-response200-related-objects-organization-organizationid'; +export * from './get-activities-response200-related-objects-organization-organizationidall-of'; +export * from './get-activities-response200-related-objects-organization-organizationidall-of1'; +export * from './get-activities-response200-related-objects-person'; +export * from './get-activities-response200-related-objects-person-personid'; +export * from './get-activities-response200-related-objects-person-personidall-of'; +export * from './get-activities-response200-related-objects-person-personidall-of-email-inner'; +export * from './get-activities-response200-related-objects-person-personidall-of-phone-inner'; +export * from './get-activities-response200-related-objects-user'; +export * from './get-activity-response200'; +export * from './get-activity-types-response200'; +export * from './get-activity-types-response200-all-of'; +export * from './get-activity-types-response200-all-of-data-inner'; +export * from './get-add-product-attachement-response200'; +export * from './get-add-product-attachement-response200-data'; +export * from './get-add-product-attachement-response200-data-all-of'; +export * from './get-add-product-attachement-response200-data-all-of-all-of'; +export * from './get-add-product-attachement-response200-data-all-of-all-of1'; +export * from './get-add-product-attachement-response200-data-all-of-all-of-all-of'; +export * from './get-all-mail-messages-of-mail-thread-response200'; +export * from './get-all-mail-messages-of-mail-thread-response200-all-of'; +export * from './get-all-mail-messages-of-mail-thread-response200-all-of-data-inner'; +export * from './get-all-mail-messages-of-mail-thread-response200-all-of-data-inner-all-of'; +export * from './get-associated-activities-response200'; +export * from './get-associated-activities-response200-all-of'; +export * from './get-associated-deals-response200'; +export * from './get-associated-deals-response200-all-of'; +export * from './get-associated-deals-response200-all-of-related-objects'; +export * from './get-associated-deals-response200-all-of-related-objects-pipeline'; +export * from './get-associated-deals-response200-all-of-related-objects-stage'; +export * from './get-associated-files-response200'; +export * from './get-associated-files-response2001'; +export * from './get-associated-files-response2001-all-of'; +export * from './get-associated-files-response2001-all-of-data-inner'; +export * from './get-associated-files-response200-all-of'; +export * from './get-associated-files-response200-all-of-data-inner'; +export * from './get-associated-followers-response200'; +export * from './get-associated-followers-response2001'; +export * from './get-associated-followers-response2001-data-inner'; +export * from './get-associated-followers-response2001-data-inner-all-of'; +export * from './get-associated-followers-response2001-data-inner-all-of1'; +export * from './get-associated-followers-response200-all-of'; +export * from './get-associated-followers-response200-all-of-data-inner'; +export * from './get-associated-mail-messages-response200'; +export * from './get-associated-mail-messages-response200-all-of'; +export * from './get-associated-mail-messages-response200-all-of-data-inner'; +export * from './get-associated-person-updates-response200'; +export * from './get-associated-person-updates-response200-all-of'; +export * from './get-associated-person-updates-response200-all-of-data-inner'; +export * from './get-associated-updates-response200'; +export * from './get-associated-updates-response200-all-of'; +export * from './get-associated-updates-response200-all-of-data-inner'; +export * from './get-associated-updates-response200-all-of-related-objects'; +export * from './get-comments-response200'; +export * from './get-comments-response200-data-inner'; +export * from './get-currencies-response200'; +export * from './get-currencies-response200-data-inner'; +export * from './get-current-user-response200'; +export * from './get-current-user-response200-all-of'; +export * from './get-current-user-response200-all-of-data'; +export * from './get-current-user-response200-all-of-data-all-of'; +export * from './get-current-user-response200-all-of-data-all-of-language'; +export * from './get-deal-activities-response200'; +export * from './get-deal-activities-response200-all-of'; +export * from './get-deal-activities-response200-all-of-related-objects'; +export * from './get-deal-participants-response200'; +export * from './get-deal-response200'; +export * from './get-deal-response200-additional-data'; +export * from './get-deal-response200-related-objects'; +export * from './get-deal-updates-response200'; +export * from './get-deal-updates-response200-all-of'; +export * from './get-deal-updates-response200-all-of-data-inner'; +export * from './get-deal-updates-response200-all-of-related-objects'; +export * from './get-deals-collection-response200'; +export * from './get-deals-response200'; +export * from './get-deals-response200-related-objects'; +export * from './get-deals-summary-response200'; +export * from './get-deals-summary-response200-data'; +export * from './get-deals-summary-response200-data-values-total'; +export * from './get-deals-summary-response200-data-weighted-values-total'; +export * from './get-deals-timeline-response200'; +export * from './get-deals-timeline-response200-data'; +export * from './get-deals-timeline-response200-data-totals'; +export * from './get-file-response200'; +export * from './get-files-response200'; +export * from './get-files-response200-additional-data'; +export * from './get-files-response200-data-inner'; +export * from './get-filter-response200'; +export * from './get-filter-response200-all-of'; +export * from './get-filters-response200'; +export * from './get-filters-response200-all-of'; +export * from './get-filters-response200-all-of-data-inner'; +export * from './get-goal-result-response200'; +export * from './get-goal-result-response200-data'; +export * from './get-goals-response200'; +export * from './get-goals-response200-data'; +export * from './get-lead-labels-response200'; +export * from './get-lead-labels-response200-data-inner'; +export * from './get-lead-sources-response200'; +export * from './get-lead-sources-response200-data-inner'; +export * from './get-leads-response200'; +export * from './get-leads-response200-data-inner'; +export * from './get-leads-response200-data-inner-value'; +export * from './get-mail-threads-response200'; +export * from './get-mail-threads-response200-all-of'; +export * from './get-note-fields-response200'; +export * from './get-note-fields-response200-all-of'; +export * from './get-note-fields-response200-all-of-data-inner'; +export * from './get-note-fields-response200-all-of-data-inner-options-inner'; +export * from './get-notes-response200'; +export * from './get-notes-response200-additional-data'; +export * from './get-notes-response200-additional-data-pagination'; +export * from './get-notes-response200-data-inner'; +export * from './get-notes-response200-data-inner-deal'; +export * from './get-notes-response200-data-inner-organization'; +export * from './get-notes-response200-data-inner-person'; +export * from './get-notes-response200-data-inner-user'; +export * from './get-one-mail-thread-response200'; +export * from './get-one-mail-thread-response200-all-of'; +export * from './get-one-mail-thread-response200-all-of-data'; +export * from './get-organization-relationship-response200'; +export * from './get-organization-relationship-response200-all-of'; +export * from './get-organization-relationships-response200'; +export * from './get-organization-relationships-response200-all-of'; +export * from './get-organization-relationships-response200-all-of-related-objects'; +export * from './get-organization-response200'; +export * from './get-organization-response200-all-of'; +export * from './get-organization-response200-all-of-additional-data'; +export * from './get-organization-response200-all-of-additional-data-followers'; +export * from './get-organization-response200-all-of-additional-data-followers-followeruserid'; +export * from './get-organization-response200-all-of-additional-data-followers-followeruseridall-of'; +export * from './get-organization-response200-all-of-additional-data-followers-followeruseridall-of-all-of'; +export * from './get-organization-response200-all-of-additional-data-followers-followeruseridall-of-all-of1'; +export * from './get-organizations-collection200-response'; +export * from './get-organizations-response200'; +export * from './get-organizations-response200-all-of'; +export * from './get-organizations-response200-all-of-related-objects'; +export * from './get-organizations-response200-all-of-related-objects-picture'; +export * from './get-organizations-response200-all-of-related-objects-picture-pictureid'; +export * from './get-permission-sets-response200'; +export * from './get-permission-sets-response200-all-of'; +export * from './get-permission-sets-response200-all-of-data-inner'; +export * from './get-person-products-response200'; +export * from './get-person-products-response200-all-of'; +export * from './get-person-products-response200-all-of-data-inner'; +export * from './get-person-products-response200-all-of-data-inner-dealid'; +export * from './get-person-products-response200-all-of-data-inner-dealiddeal'; +export * from './get-person-products-response200-all-of-data-inner-dealidproduct'; +export * from './get-person-response200'; +export * from './get-person-response200-all-of'; +export * from './get-person-response200-all-of-additional-data'; +export * from './get-persons-collection200-response'; +export * from './get-persons-response200'; +export * from './get-persons-response200-all-of'; +export * from './get-pipeline-conversion-statistics-response200'; +export * from './get-pipeline-conversion-statistics-response200-all-of'; +export * from './get-pipeline-conversion-statistics-response200-all-of-data'; +export * from './get-pipeline-conversion-statistics-response200-all-of-data-stage-conversions-inner'; +export * from './get-pipeline-movement-statistics-response200'; +export * from './get-pipeline-movement-statistics-response200-all-of'; +export * from './get-pipeline-movement-statistics-response200-all-of-data'; +export * from './get-pipeline-movement-statistics-response200-all-of-data-average-age-in-days'; +export * from './get-pipeline-movement-statistics-response200-all-of-data-average-age-in-days-by-stages-inner'; +export * from './get-pipeline-movement-statistics-response200-all-of-data-movements-between-stages'; +export * from './get-pipeline-movement-statistics-response200-all-of-data-new-deals'; +export * from './get-pipeline-movement-statistics-response200-all-of-data-new-deals-formatted-values'; +export * from './get-pipeline-movement-statistics-response200-all-of-data-new-deals-values'; +export * from './get-pipeline-response200'; +export * from './get-pipeline-response200-all-of'; +export * from './get-pipelines-response200'; +export * from './get-pipelines-response200-all-of'; +export * from './get-product-attachement-response200'; +export * from './get-product-attachement-response200-data'; +export * from './get-product-field-response200'; +export * from './get-product-field-response200-data'; +export * from './get-product-fields-response200'; +export * from './get-product-followers-response-success'; +export * from './get-product-followers-response-success-all-of'; +export * from './get-product-followers-response-success-all-of-data-inner'; +export * from './get-products-response200'; +export * from './get-products-response200-additional-data'; +export * from './get-project-board-response200'; +export * from './get-project-boards-response200'; +export * from './get-project-boards-response200-data-inner'; +export * from './get-project-groups-response200'; +export * from './get-project-groups-response200-data-inner'; +export * from './get-project-phase-response200'; +export * from './get-project-phases-response200'; +export * from './get-project-phases-response200-data-inner'; +export * from './get-project-plan-response200'; +export * from './get-project-plan-response200-data-inner'; +export * from './get-project-response200'; +export * from './get-project-template-response200'; +export * from './get-project-templates-response200'; +export * from './get-projects-response200'; +export * from './get-recents-response200'; +export * from './get-recents-response200-additional-data'; +export * from './get-recents-response200-data-inner'; +export * from './get-recents-response200-data-inner-any-of'; +export * from './get-recents-response200-data-inner-any-of1'; +export * from './get-recents-response200-data-inner-any-of10'; +export * from './get-recents-response200-data-inner-any-of11'; +export * from './get-recents-response200-data-inner-any-of11-data'; +export * from './get-recents-response200-data-inner-any-of11-data-access-inner'; +export * from './get-recents-response200-data-inner-any-of2'; +export * from './get-recents-response200-data-inner-any-of3'; +export * from './get-recents-response200-data-inner-any-of4'; +export * from './get-recents-response200-data-inner-any-of5'; +export * from './get-recents-response200-data-inner-any-of6'; +export * from './get-recents-response200-data-inner-any-of7'; +export * from './get-recents-response200-data-inner-any-of8'; +export * from './get-recents-response200-data-inner-any-of9'; +export * from './get-recents-response200-data-inner-any-of9-data'; +export * from './get-role-pipelines200'; +export * from './get-role-pipelines200-all-of'; +export * from './get-role-pipelines200-all-of-data'; +export * from './get-role-response200'; +export * from './get-role-response200-all-of'; +export * from './get-role-response200-all-of-additional-data'; +export * from './get-role-response200-all-of-additional-data-settings'; +export * from './get-role-settings-response200'; +export * from './get-role-settings-response200-all-of'; +export * from './get-roles-response200'; +export * from './get-roles-response200-all-of'; +export * from './get-roles-response200-all-of-additional-data'; +export * from './get-roles-response200-all-of-additional-data-pagination'; +export * from './get-stage-deals-response200'; +export * from './get-stage-response200'; +export * from './get-stage-response200-data'; +export * from './get-stages-response200'; +export * from './get-stages-response200-data-inner'; +export * from './get-stages-response200-data-inner-all-of'; +export * from './get-task-response200'; +export * from './get-tasks-response200'; +export * from './get-user-permissions-response200'; +export * from './get-user-permissions-response200-all-of'; +export * from './get-user-permissions-response200-all-of-data'; +export * from './get-user-role-assignments-response200'; +export * from './get-user-role-assignments-response200-all-of'; +export * from './get-user-settings-response200'; +export * from './get-user-settings-response200-all-of'; +export * from './get-user-settings-response200-all-of-data'; +export * from './get-webhooks-response200'; +export * from './get-webhooks-response200-all-of'; +export * from './get-webhooks-response200-all-of-data-inner'; +export * from './getproduct-response200'; +export * from './getproduct-response200-data'; +export * from './getproduct-response200-data-all-of'; +export * from './lead-id-response200'; +export * from './lead-id-response200-data'; +export * from './lead-response404'; +export * from './link-file-to-item-response200'; +export * from './list-permitted-users-response200'; +export * from './list-permitted-users-response2001'; +export * from './list-permitted-users-response2001-all-of'; +export * from './list-permitted-users-response200-all-of'; +export * from './list-permitted-users-response200-all-of-data'; +export * from './list-persons-response200'; +export * from './list-persons-response200-all-of'; +export * from './list-persons-response200-all-of-related-objects'; +export * from './list-products-response200'; +export * from './list-products-response200-all-of'; +export * from './list-products-response200-all-of-additional-data'; +export * from './list-products-response200-all-of-additional-data-all-of'; +export * from './list-products-response200-all-of-data-inner'; +export * from './list-products-response200-all-of-data-inner-product'; +export * from './list-products-response200-all-of-data-inner-product-all-of'; +export * from './list-products-response200-all-of-data-inner-product-all-of1'; +export * from './list-products-response200-all-of-related-objects'; +export * from './mail-message-item-for-list'; +export * from './mail-message-item-for-list-all-of'; +export * from './mail-message-item-for-list-all-of1'; +export * from './mail-message-item-for-list-all-of-from-inner'; +export * from './mail-message-response200'; +export * from './mail-message-response200-all-of'; +export * from './mail-message-response200-all-of1'; +export * from './merge-deals-request'; +export * from './merge-deals-response200'; +export * from './merge-deals-response200-data'; +export * from './merge-deals-response200-data-all-of'; +export * from './merge-organizations-request'; +export * from './merge-organizations-response200'; +export * from './merge-organizations-response200-data'; +export * from './merge-person-deal-related-info'; +export * from './merge-person-deal-related-info-all-of'; +export * from './merge-person-item'; +export * from './merge-persons-request'; +export * from './merge-persons-response200'; +export * from './merge-persons-response200-all-of'; +export * from './new-deal-parameters'; +export * from './new-follower-response200'; +export * from './new-follower-response200-data'; +export * from './note-request'; +export * from './note-request-all-of'; +export * from './note-request-all-of1'; +export * from './one-comment-response200'; +export * from './one-lead-response200'; +export * from './one-note-response200'; +export * from './organization-count-and-address-info'; +export * from './organization-count-and-address-info-all-of'; +export * from './organization-count-and-address-info-all-of1'; +export * from './organization-item'; +export * from './organization-item-all-of'; +export * from './organization-relationship'; +export * from './organization-relationship-details'; +export * from './organization-relationship-details-all-of'; +export * from './organization-relationship-with-calculated-fields'; +export * from './organization-relationship-with-calculated-fields-all-of'; +export * from './organization-relationship-with-calculated-fields-all-of1'; +export * from './organizations-collection-response-object'; +export * from './organizations-collection-response-object-all-of'; +export * from './owner'; +export * from './owner-all-of'; +export * from './pagination-details'; +export * from './pagination-details-all-of'; +export * from './payment-response200'; +export * from './payment-response200-all-of'; +export * from './payment-response200-all-of-data-inner'; +export * from './person-count-and-email-info'; +export * from './person-count-and-email-info-all-of'; +export * from './person-count-and-email-info-all-of1'; +export * from './person-count-email-deal-and-activity-info'; +export * from './person-item'; +export * from './person-item-all-of'; +export * from './person-item-all-of-email-inner'; +export * from './person-item-all-of-phone-inner'; +export * from './person-item-all-of-picture-id'; +export * from './person-item-all-of-picture-id-all-of'; +export * from './person-item-all-of-picture-id-all-of1'; +export * from './person-item-all-of-picture-id-all-of1-pictures'; +export * from './person-name-count-and-email-info'; +export * from './person-name-count-and-email-info-with-ids'; +export * from './person-name-count-and-email-info-with-ids-all-of'; +export * from './person-name-info-with-org-and-owner-id'; +export * from './person-name-info-with-org-and-owner-id-all-of'; +export * from './person-name-info-with-org-and-owner-id-all-of1'; +export * from './persons-collection-response-object'; +export * from './pipeline-details'; +export * from './pipeline-details-all-of'; +export * from './pipeline-details-all-of-deals-summary'; +export * from './pipeline-details-all-of-deals-summary-per-currency'; +export * from './pipeline-details-all-of-deals-summary-per-currency-full'; +export * from './pipeline-details-all-of-deals-summary-per-currency-full-currencyid'; +export * from './pipeline-details-all-of-deals-summary-per-stages'; +export * from './pipeline-details-all-of-deals-summary-per-stages-stageid'; +export * from './pipeline-details-all-of-deals-summary-per-stages-stageidcurrencyid'; +export * from './pipeline-request'; +export * from './pipeline-request1'; +export * from './post-filter-response200'; +export * from './post-filter-response200-all-of'; +export * from './post-filter-response200-all-of-data'; +export * from './product-field'; +export * from './product-field-all-of'; +export * from './product-field-all-of1'; +export * from './product-request'; +export * from './project-put-plan-item-body-object'; +export * from './project-response-object'; +export * from './project-response-object-all-of'; +export * from './put-role-pipelines-body'; +export * from './receive-message200-response'; +export * from './receive-message400-response'; +export * from './receive-message400-response-additional-data'; +export * from './receive-message-request'; +export * from './receive-message-request-attachments-inner'; +export * from './relationship-organization-info-item'; +export * from './relationship-organization-info-item-all-of'; +export * from './relationship-organization-info-item-with-active-flag'; +export * from './requied-post-project-parameters'; +export * from './required-post-project-parameters'; +export * from './requred-title-parameter'; +export * from './response-call-log-object'; +export * from './response-call-log-object-all-of'; +export * from './role-assignment'; +export * from './role-assignment-all-of'; +export * from './search-deals-response200'; +export * from './search-deals-response200-all-of'; +export * from './search-deals-response200-all-of-data'; +export * from './search-deals-response200-all-of-data-items-inner'; +export * from './search-deals-response200-all-of-data-items-inner-item'; +export * from './search-deals-response200-all-of-data-items-inner-item-organization'; +export * from './search-deals-response200-all-of-data-items-inner-item-owner'; +export * from './search-deals-response200-all-of-data-items-inner-item-person'; +export * from './search-deals-response200-all-of-data-items-inner-item-stage'; +export * from './search-item-by-field-response200'; +export * from './search-item-by-field-response200-all-of'; +export * from './search-item-by-field-response200-all-of-data-inner'; +export * from './search-item-response200'; +export * from './search-item-response200-all-of'; +export * from './search-item-response200-all-of-data'; +export * from './search-item-response200-all-of-data-items-inner'; +export * from './search-leads-response200'; +export * from './search-leads-response200-all-of'; +export * from './search-leads-response200-all-of-data'; +export * from './search-leads-response200-all-of-data-items-inner'; +export * from './search-leads-response200-all-of-data-items-inner-item'; +export * from './search-leads-response200-all-of-data-items-inner-item-organization'; +export * from './search-leads-response200-all-of-data-items-inner-item-owner'; +export * from './search-leads-response200-all-of-data-items-inner-item-person'; +export * from './search-organization-response200'; +export * from './search-organization-response200-all-of'; +export * from './search-organization-response200-all-of-data'; +export * from './search-organization-response200-all-of-data-items-inner'; +export * from './search-organization-response200-all-of-data-items-inner-item'; +export * from './search-persons-response200'; +export * from './search-persons-response200-all-of'; +export * from './search-persons-response200-all-of-data'; +export * from './search-persons-response200-all-of-data-items-inner'; +export * from './search-persons-response200-all-of-data-items-inner-item'; +export * from './search-persons-response200-all-of-data-items-inner-item-organization'; +export * from './search-persons-response200-all-of-data-items-inner-item-owner'; +export * from './search-products-response200'; +export * from './search-products-response200-all-of'; +export * from './search-products-response200-all-of-data'; +export * from './search-products-response200-all-of-data-items-inner'; +export * from './search-products-response200-all-of-data-items-inner-item'; +export * from './search-products-response200-all-of-data-items-inner-item-owner'; +export * from './single-permission-set-response200'; +export * from './single-permission-set-response200-all-of'; +export * from './stage-response200'; +export * from './stage-response200-data'; +export * from './sub-role'; +export * from './sub-role-all-of'; +export * from './subscription-addons-response200'; +export * from './subscription-addons-response200-all-of'; +export * from './subscriptions-id-response200'; +export * from './subscriptions-id-response200-all-of'; +export * from './subscriptions-id-response200-all-of-data'; +export * from './task-response-object'; +export * from './task-response-object-all-of'; +export * from './team-id'; +export * from './team-response200'; +export * from './team-response200-all-of'; +export * from './teams-response200'; +export * from './teams-response200-all-of'; +export * from './template-response-object'; +export * from './template-response-object-all-of'; +export * from './unathorized-response'; +export * from './update-activity-request'; +export * from './update-activity-request-all-of'; +export * from './update-activity-response200'; +export * from './update-activity-type-request'; +export * from './update-deal-parameters'; +export * from './update-deal-product-request'; +export * from './update-deal-request'; +export * from './update-field-request'; +export * from './update-file-response200'; +export * from './update-filter-request'; +export * from './update-lead-label-request'; +export * from './update-lead-request'; +export * from './update-lead-request-value'; +export * from './update-mail-thread-details-response200'; +export * from './update-mail-thread-details-response200-all-of'; +export * from './update-organization-relationship-response200'; +export * from './update-organization-request'; +export * from './update-organization-request-all-of'; +export * from './update-organization-response200'; +export * from './update-organization-response200-all-of'; +export * from './update-person-request'; +export * from './update-person-request-all-of'; +export * from './update-person-response200'; +export * from './update-pipeline-response200'; +export * from './update-pipeline-response200-all-of'; +export * from './update-pipeline-response200-all-of-data'; +export * from './update-product-field-response200'; +export * from './update-product-response200'; +export * from './update-project-request'; +export * from './update-project-request1'; +export * from './update-project-request1-all-of'; +export * from './update-project-request1-all-of1'; +export * from './update-project-request1-all-of2'; +export * from './update-project-request2'; +export * from './update-project-response200'; +export * from './update-recurring-subscription-request'; +export * from './update-role-response200'; +export * from './update-stage-request'; +export * from './update-stage-request-all-of'; +export * from './update-stage-request-all-of1'; +export * from './update-subscription-installment-request'; +export * from './update-task-response200'; +export * from './update-team-request'; +export * from './update-team-request-all-of'; +export * from './update-team-with-additional-properties'; +export * from './update-user-request'; +export * from './updated-activity-plan-item200'; +export * from './updated-task-plan-item200'; +export * from './user-assignments-to-permission-set-response200'; +export * from './user-assignments-to-permission-set-response200-all-of'; +export * from './user-assignments-to-permission-set-response200-all-of-data-inner'; +export * from './user-connections-response200'; +export * from './user-connections-response200-all-of'; +export * from './user-connections-response200-all-of-data'; +export * from './user-data-with-id'; +export * from './user-data-with-id-all-of'; +export * from './user-ids'; +export * from './user-ids-all-of'; +export * from './user-response200'; +export * from './user-response200-all-of'; +export * from './users-response200'; +export * from './users-response200-all-of'; +export * from './webhook-response200'; +export * from './webhook-response200-all-of'; +export * from './webhooks-bad-request-response'; +export * from './webhooks-bad-request-response-all-of'; diff --git a/models/lead-id-response200-data.ts b/models/lead-id-response200-data.ts new file mode 100644 index 00000000..61c4033a --- /dev/null +++ b/models/lead-id-response200-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface LeadIdResponse200Data + */ +export interface LeadIdResponse200Data { + /** + * + * @type {string} + * @memberof LeadIdResponse200Data + */ + 'id'?: string; +} + diff --git a/models/lead-id-response200.ts b/models/lead-id-response200.ts new file mode 100644 index 00000000..82e1de58 --- /dev/null +++ b/models/lead-id-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { LeadIdResponse200Data } from './lead-id-response200-data'; + +/** + * + * @export + * @interface LeadIdResponse200 + */ +export interface LeadIdResponse200 { + /** + * + * @type {boolean} + * @memberof LeadIdResponse200 + */ + 'success'?: boolean; + /** + * + * @type {LeadIdResponse200Data} + * @memberof LeadIdResponse200 + */ + 'data'?: LeadIdResponse200Data; +} + diff --git a/models/lead-response404.ts b/models/lead-response404.ts new file mode 100644 index 00000000..47e3ba34 --- /dev/null +++ b/models/lead-response404.ts @@ -0,0 +1,54 @@ +/* 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 + * @interface LeadResponse404 + */ +export interface LeadResponse404 { + /** + * + * @type {boolean} + * @memberof LeadResponse404 + */ + 'success'?: boolean; + /** + * The description of the error + * @type {string} + * @memberof LeadResponse404 + */ + 'error'?: string; + /** + * A message describing how to solve the problem + * @type {string} + * @memberof LeadResponse404 + */ + 'error_info'?: string; + /** + * + * @type {object} + * @memberof LeadResponse404 + */ + 'data'?: object | null; + /** + * + * @type {object} + * @memberof LeadResponse404 + */ + 'additional_data'?: object | null; +} + diff --git a/models/link-file-to-item-response200.ts b/models/link-file-to-item-response200.ts new file mode 100644 index 00000000..c17b8dd4 --- /dev/null +++ b/models/link-file-to-item-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetFilesResponse200DataInner } from './get-files-response200-data-inner'; + +/** + * + * @export + * @interface LinkFileToItemResponse200 + */ +export interface LinkFileToItemResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof LinkFileToItemResponse200 + */ + 'success'?: boolean; + /** + * + * @type {GetFilesResponse200DataInner} + * @memberof LinkFileToItemResponse200 + */ + 'data'?: GetFilesResponse200DataInner; +} + diff --git a/models/list-permitted-users-response200-all-of-data.ts b/models/list-permitted-users-response200-all-of-data.ts new file mode 100644 index 00000000..a82710ae --- /dev/null +++ b/models/list-permitted-users-response200-all-of-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface ListPermittedUsersResponse200AllOfData + */ +export interface ListPermittedUsersResponse200AllOfData { + /** + * The list of permitted users IDs + * @type {Array} + * @memberof ListPermittedUsersResponse200AllOfData + */ + 'id'?: Array; +} + diff --git a/models/list-permitted-users-response200-all-of.ts b/models/list-permitted-users-response200-all-of.ts new file mode 100644 index 00000000..7e6cc7db --- /dev/null +++ b/models/list-permitted-users-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ListPermittedUsersResponse200AllOfData } from './list-permitted-users-response200-all-of-data'; + +/** + * + * @export + * @interface ListPermittedUsersResponse200AllOf + */ +export interface ListPermittedUsersResponse200AllOf { + /** + * + * @type {ListPermittedUsersResponse200AllOfData} + * @memberof ListPermittedUsersResponse200AllOf + */ + 'data'?: ListPermittedUsersResponse200AllOfData; +} + diff --git a/models/list-permitted-users-response200.ts b/models/list-permitted-users-response200.ts new file mode 100644 index 00000000..48b6a2d9 --- /dev/null +++ b/models/list-permitted-users-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { ListPermittedUsersResponse200AllOf } from './list-permitted-users-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { ListPermittedUsersResponse200AllOfData } from './list-permitted-users-response200-all-of-data'; + +/** + * @type ListPermittedUsersResponse200 + * @export + */ +export type ListPermittedUsersResponse200 = BaseResponse & ListPermittedUsersResponse200AllOf; + + diff --git a/models/list-permitted-users-response2001-all-of.ts b/models/list-permitted-users-response2001-all-of.ts new file mode 100644 index 00000000..5f12ff04 --- /dev/null +++ b/models/list-permitted-users-response2001-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface ListPermittedUsersResponse2001AllOf + */ +export interface ListPermittedUsersResponse2001AllOf { + /** + * The list of permitted user IDs + * @type {Array} + * @memberof ListPermittedUsersResponse2001AllOf + */ + 'data'?: Array; +} + diff --git a/models/list-permitted-users-response2001.ts b/models/list-permitted-users-response2001.ts new file mode 100644 index 00000000..213aa790 --- /dev/null +++ b/models/list-permitted-users-response2001.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { ListPermittedUsersResponse2001AllOf } from './list-permitted-users-response2001-all-of'; + +/** + * @type ListPermittedUsersResponse2001 + * @export + */ +export type ListPermittedUsersResponse2001 = BaseResponse & ListPermittedUsersResponse2001AllOf; + + diff --git a/models/list-persons-response200-all-of-related-objects.ts b/models/list-persons-response200-all-of-related-objects.ts new file mode 100644 index 00000000..539a2d61 --- /dev/null +++ b/models/list-persons-response200-all-of-related-objects.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityResponse200RelatedObjectsOrganization } from './add-activity-response200-related-objects-organization'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsUser } from './get-activities-response200-related-objects-user'; + +/** + * + * @export + * @interface ListPersonsResponse200AllOfRelatedObjects + */ +export interface ListPersonsResponse200AllOfRelatedObjects { + /** + * + * @type {AddActivityResponse200RelatedObjectsOrganization} + * @memberof ListPersonsResponse200AllOfRelatedObjects + */ + 'organization'?: AddActivityResponse200RelatedObjectsOrganization; + /** + * + * @type {GetActivitiesResponse200RelatedObjectsUser} + * @memberof ListPersonsResponse200AllOfRelatedObjects + */ + 'user'?: GetActivitiesResponse200RelatedObjectsUser; +} + diff --git a/models/list-persons-response200-all-of.ts b/models/list-persons-response200-all-of.ts new file mode 100644 index 00000000..4e4670cd --- /dev/null +++ b/models/list-persons-response200-all-of.ts @@ -0,0 +1,51 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { ListPersonsResponse200AllOfRelatedObjects } from './list-persons-response200-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItem } from './person-item'; + +/** + * + * @export + * @interface ListPersonsResponse200AllOf + */ +export interface ListPersonsResponse200AllOf { + /** + * The array of persons + * @type {Array} + * @memberof ListPersonsResponse200AllOf + */ + 'data'?: Array; + /** + * + * @type {FieldsResponse200AllOfAdditionalData} + * @memberof ListPersonsResponse200AllOf + */ + 'additional_data'?: FieldsResponse200AllOfAdditionalData; + /** + * + * @type {ListPersonsResponse200AllOfRelatedObjects} + * @memberof ListPersonsResponse200AllOf + */ + 'related_objects'?: ListPersonsResponse200AllOfRelatedObjects; +} + diff --git a/models/list-persons-response200.ts b/models/list-persons-response200.ts new file mode 100644 index 00000000..0ae899ea --- /dev/null +++ b/models/list-persons-response200.ts @@ -0,0 +1,38 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { ListPersonsResponse200AllOf } from './list-persons-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { ListPersonsResponse200AllOfRelatedObjects } from './list-persons-response200-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItem } from './person-item'; + +/** + * @type ListPersonsResponse200 + * @export + */ +export type ListPersonsResponse200 = BaseResponse & ListPersonsResponse200AllOf; + + diff --git a/models/list-products-response200-all-of-additional-data-all-of.ts b/models/list-products-response200-all-of-additional-data-all-of.ts new file mode 100644 index 00000000..0111131f --- /dev/null +++ b/models/list-products-response200-all-of-additional-data-all-of.ts @@ -0,0 +1,48 @@ +/* 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 + * @interface ListProductsResponse200AllOfAdditionalDataAllOf + */ +export interface ListProductsResponse200AllOfAdditionalDataAllOf { + /** + * The total quantity of the products + * @type {number} + * @memberof ListProductsResponse200AllOfAdditionalDataAllOf + */ + 'products_quantity_total'?: number; + /** + * The total sum of the products + * @type {number} + * @memberof ListProductsResponse200AllOfAdditionalDataAllOf + */ + 'products_sum_total'?: number; + /** + * The total formatted quantity of the products + * @type {string} + * @memberof ListProductsResponse200AllOfAdditionalDataAllOf + */ + 'products_quantity_total_formatted'?: string; + /** + * The total formatted sum of the products + * @type {string} + * @memberof ListProductsResponse200AllOfAdditionalDataAllOf + */ + 'products_sum_total_formatted'?: string; +} + diff --git a/models/list-products-response200-all-of-additional-data.ts b/models/list-products-response200-all-of-additional-data.ts new file mode 100644 index 00000000..48d6a7e5 --- /dev/null +++ b/models/list-products-response200-all-of-additional-data.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalData } from './get-activities-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalDataPagination } from './get-activities-response200-additional-data-pagination'; +// May contain unused imports in some cases +// @ts-ignore +import { ListProductsResponse200AllOfAdditionalDataAllOf } from './list-products-response200-all-of-additional-data-all-of'; + +/** + * @type ListProductsResponse200AllOfAdditionalData + * @export + */ +export type ListProductsResponse200AllOfAdditionalData = GetActivitiesResponse200AdditionalData & ListProductsResponse200AllOfAdditionalDataAllOf; + + diff --git a/models/list-products-response200-all-of-data-inner-product-all-of.ts b/models/list-products-response200-all-of-data-inner-product-all-of.ts new file mode 100644 index 00000000..e538198e --- /dev/null +++ b/models/list-products-response200-all-of-data-inner-product-all-of.ts @@ -0,0 +1,88 @@ +/* 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 + * @interface ListProductsResponse200AllOfDataInnerProductAllOf + */ +export interface ListProductsResponse200AllOfDataInnerProductAllOf { + /** + * The ID of the product + * @type {number} + * @memberof ListProductsResponse200AllOfDataInnerProductAllOf + */ + 'id'?: number; + /** + * The name of the product + * @type {string} + * @memberof ListProductsResponse200AllOfDataInnerProductAllOf + */ + 'name'?: string; + /** + * The product code + * @type {string} + * @memberof ListProductsResponse200AllOfDataInnerProductAllOf + */ + 'code'?: string; + /** + * The unit in which this product is sold + * @type {string} + * @memberof ListProductsResponse200AllOfDataInnerProductAllOf + */ + 'unit'?: string; + /** + * The ax percentage + * @type {number} + * @memberof ListProductsResponse200AllOfDataInnerProductAllOf + */ + 'tax'?: number; + /** + * Whether this product is active or not + * @type {boolean} + * @memberof ListProductsResponse200AllOfDataInnerProductAllOf + */ + 'active_flag'?: boolean; + /** + * Whether this product is selected in deals or not + * @type {boolean} + * @memberof ListProductsResponse200AllOfDataInnerProductAllOf + */ + 'selectable'?: boolean; + /** + * + * @type {string} + * @memberof ListProductsResponse200AllOfDataInnerProductAllOf + */ + 'visible_to'?: ListProductsResponse200AllOfDataInnerProductAllOfVisibleToConst; + /** + * Information about the Pipedrive user who owns the product + * @type {object} + * @memberof ListProductsResponse200AllOfDataInnerProductAllOf + */ + 'owner_id'?: object; +} + +export const ListProductsResponse200AllOfDataInnerProductAllOfVisibleToConst = { + _1: '1', + _3: '3', + _5: '5', + _7: '7' +} as const; + +export type ListProductsResponse200AllOfDataInnerProductAllOfVisibleToConst = typeof ListProductsResponse200AllOfDataInnerProductAllOfVisibleToConst[keyof typeof ListProductsResponse200AllOfDataInnerProductAllOfVisibleToConst]; + + diff --git a/models/list-products-response200-all-of-data-inner-product-all-of1.ts b/models/list-products-response200-all-of-data-inner-product-all-of1.ts new file mode 100644 index 00000000..536510fe --- /dev/null +++ b/models/list-products-response200-all-of-data-inner-product-all-of1.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface ListProductsResponse200AllOfDataInnerProductAllOf1 + */ +export interface ListProductsResponse200AllOfDataInnerProductAllOf1 { + /** + * Object of objects, each containing: currency (string), price (number), cost (number, optional), overhead_cost (number, optional) + * @type {object} + * @memberof ListProductsResponse200AllOfDataInnerProductAllOf1 + */ + 'prices'?: object; +} + diff --git a/models/list-products-response200-all-of-data-inner-product.ts b/models/list-products-response200-all-of-data-inner-product.ts new file mode 100644 index 00000000..d0be772a --- /dev/null +++ b/models/list-products-response200-all-of-data-inner-product.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ListProductsResponse200AllOfDataInnerProductAllOf } from './list-products-response200-all-of-data-inner-product-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { ListProductsResponse200AllOfDataInnerProductAllOf1 } from './list-products-response200-all-of-data-inner-product-all-of1'; + +/** + * @type ListProductsResponse200AllOfDataInnerProduct + * @export + */ +export type ListProductsResponse200AllOfDataInnerProduct = ListProductsResponse200AllOfDataInnerProductAllOf & ListProductsResponse200AllOfDataInnerProductAllOf1; + + diff --git a/models/list-products-response200-all-of-data-inner.ts b/models/list-products-response200-all-of-data-inner.ts new file mode 100644 index 00000000..249a19f3 --- /dev/null +++ b/models/list-products-response200-all-of-data-inner.ts @@ -0,0 +1,186 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ListProductsResponse200AllOfDataInnerProduct } from './list-products-response200-all-of-data-inner-product'; + +/** + * + * @export + * @interface ListProductsResponse200AllOfDataInner + */ +export interface ListProductsResponse200AllOfDataInner { + /** + * The ID of the deal-product (the ID of the product attached to the deal) + * @type {number} + * @memberof ListProductsResponse200AllOfDataInner + */ + 'id'?: number; + /** + * The ID of the deal + * @type {number} + * @memberof ListProductsResponse200AllOfDataInner + */ + 'deal_id'?: number; + /** + * The order number of the product + * @type {number} + * @memberof ListProductsResponse200AllOfDataInner + */ + 'order_nr'?: number; + /** + * The ID of the product + * @type {number} + * @memberof ListProductsResponse200AllOfDataInner + */ + 'product_id'?: number; + /** + * The ID of the product variation + * @type {number} + * @memberof ListProductsResponse200AllOfDataInner + */ + 'product_variation_id'?: number | null; + /** + * The price value of the product + * @type {number} + * @memberof ListProductsResponse200AllOfDataInner + */ + 'item_price'?: number; + /** + * The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage. + * @type {number} + * @memberof ListProductsResponse200AllOfDataInner + */ + 'discount'?: number; + /** + * The type of the discount\'s value. + * @type {string} + * @memberof ListProductsResponse200AllOfDataInner + */ + 'discount_type'?: ListProductsResponse200AllOfDataInnerDiscountTypeConst; + /** + * The duration of the product + * @type {number} + * @memberof ListProductsResponse200AllOfDataInner + */ + 'duration'?: number; + /** + * The type of the duration. (For example hourly, daily, etc.) + * @type {string} + * @memberof ListProductsResponse200AllOfDataInner + */ + 'duration_unit'?: string; + /** + * The sum of all the products attached to the deal + * @type {number} + * @memberof ListProductsResponse200AllOfDataInner + */ + 'sum'?: number; + /** + * The currency associated with the deal product + * @type {string} + * @memberof ListProductsResponse200AllOfDataInner + */ + 'currency'?: string; + /** + * Whether the product is enabled or not + * @type {boolean} + * @memberof ListProductsResponse200AllOfDataInner + */ + 'enabled_flag'?: boolean; + /** + * The date and time when the product was added to the deal + * @type {string} + * @memberof ListProductsResponse200AllOfDataInner + */ + 'add_time'?: string; + /** + * The date and time when the deal product was last edited + * @type {string} + * @memberof ListProductsResponse200AllOfDataInner + */ + 'last_edit'?: string; + /** + * The comments of the product + * @type {string} + * @memberof ListProductsResponse200AllOfDataInner + */ + 'comments'?: string; + /** + * Whether the product is active or not + * @type {boolean} + * @memberof ListProductsResponse200AllOfDataInner + */ + 'active_flag'?: boolean; + /** + * The product tax + * @type {number} + * @memberof ListProductsResponse200AllOfDataInner + */ + 'tax'?: number; + /** + * The tax option to be applied to the products. When using `inclusive`, the tax percentage will already be included in the price. When using `exclusive`, the tax will not be included in the price. When using `none`, no tax will be added. Use the `tax` field for defining the tax percentage amount. By default, the user setting value for tax options will be used. Changing this in one product affects the rest of the products attached to the deal. + * @type {string} + * @memberof ListProductsResponse200AllOfDataInner + */ + 'tax_method'?: ListProductsResponse200AllOfDataInnerTaxMethodConst; + /** + * The product name + * @type {string} + * @memberof ListProductsResponse200AllOfDataInner + */ + 'name'?: string; + /** + * The formatted sum of the product + * @type {string} + * @memberof ListProductsResponse200AllOfDataInner + */ + 'sum_formatted'?: string; + /** + * The formatted quantity of the product + * @type {string} + * @memberof ListProductsResponse200AllOfDataInner + */ + 'quantity_formatted'?: string; + /** + * The quantity of the product + * @type {number} + * @memberof ListProductsResponse200AllOfDataInner + */ + 'quantity'?: number; + /** + * + * @type {ListProductsResponse200AllOfDataInnerProduct} + * @memberof ListProductsResponse200AllOfDataInner + */ + 'product'?: ListProductsResponse200AllOfDataInnerProduct; +} + +export const ListProductsResponse200AllOfDataInnerDiscountTypeConst = { + percentage: 'percentage', + amount: 'amount' +} as const; + +export type ListProductsResponse200AllOfDataInnerDiscountTypeConst = typeof ListProductsResponse200AllOfDataInnerDiscountTypeConst[keyof typeof ListProductsResponse200AllOfDataInnerDiscountTypeConst]; +export const ListProductsResponse200AllOfDataInnerTaxMethodConst = { + exclusive: 'exclusive', + inclusive: 'inclusive', + none: 'none' +} as const; + +export type ListProductsResponse200AllOfDataInnerTaxMethodConst = typeof ListProductsResponse200AllOfDataInnerTaxMethodConst[keyof typeof ListProductsResponse200AllOfDataInnerTaxMethodConst]; + + diff --git a/models/list-products-response200-all-of-related-objects.ts b/models/list-products-response200-all-of-related-objects.ts new file mode 100644 index 00000000..f55b3578 --- /dev/null +++ b/models/list-products-response200-all-of-related-objects.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsUser } from './get-activities-response200-related-objects-user'; + +/** + * + * @export + * @interface ListProductsResponse200AllOfRelatedObjects + */ +export interface ListProductsResponse200AllOfRelatedObjects { + /** + * + * @type {GetActivitiesResponse200RelatedObjectsUser} + * @memberof ListProductsResponse200AllOfRelatedObjects + */ + 'user'?: GetActivitiesResponse200RelatedObjectsUser; +} + diff --git a/models/list-products-response200-all-of.ts b/models/list-products-response200-all-of.ts new file mode 100644 index 00000000..b0e48d44 --- /dev/null +++ b/models/list-products-response200-all-of.ts @@ -0,0 +1,51 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ListProductsResponse200AllOfAdditionalData } from './list-products-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { ListProductsResponse200AllOfDataInner } from './list-products-response200-all-of-data-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { ListProductsResponse200AllOfRelatedObjects } from './list-products-response200-all-of-related-objects'; + +/** + * + * @export + * @interface ListProductsResponse200AllOf + */ +export interface ListProductsResponse200AllOf { + /** + * The array of products + * @type {Array} + * @memberof ListProductsResponse200AllOf + */ + 'data'?: Array; + /** + * + * @type {ListProductsResponse200AllOfAdditionalData} + * @memberof ListProductsResponse200AllOf + */ + 'additional_data'?: ListProductsResponse200AllOfAdditionalData; + /** + * + * @type {ListProductsResponse200AllOfRelatedObjects} + * @memberof ListProductsResponse200AllOf + */ + 'related_objects'?: ListProductsResponse200AllOfRelatedObjects; +} + diff --git a/models/list-products-response200.ts b/models/list-products-response200.ts new file mode 100644 index 00000000..0682ab58 --- /dev/null +++ b/models/list-products-response200.ts @@ -0,0 +1,38 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { ListProductsResponse200AllOf } from './list-products-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { ListProductsResponse200AllOfAdditionalData } from './list-products-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { ListProductsResponse200AllOfDataInner } from './list-products-response200-all-of-data-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { ListProductsResponse200AllOfRelatedObjects } from './list-products-response200-all-of-related-objects'; + +/** + * @type ListProductsResponse200 + * @export + */ +export type ListProductsResponse200 = BaseResponse & ListProductsResponse200AllOf; + + diff --git a/models/mail-message-item-for-list-all-of-from-inner.ts b/models/mail-message-item-for-list-all-of-from-inner.ts new file mode 100644 index 00000000..d801ab42 --- /dev/null +++ b/models/mail-message-item-for-list-all-of-from-inner.ts @@ -0,0 +1,60 @@ +/* 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 + * @interface MailMessageItemForListAllOfFromInner + */ +export interface MailMessageItemForListAllOfFromInner { + /** + * ID of the mail participant + * @type {number} + * @memberof MailMessageItemForListAllOfFromInner + */ + 'id'?: number; + /** + * Mail address of the mail participant + * @type {string} + * @memberof MailMessageItemForListAllOfFromInner + */ + 'email_address'?: string; + /** + * Name of the mail participant + * @type {string} + * @memberof MailMessageItemForListAllOfFromInner + */ + 'name'?: string; + /** + * ID of the linked person to the mail message + * @type {number} + * @memberof MailMessageItemForListAllOfFromInner + */ + 'linked_person_id'?: number; + /** + * Name of the linked person to the mail message + * @type {string} + * @memberof MailMessageItemForListAllOfFromInner + */ + 'linked_person_name'?: string; + /** + * ID of the mail message participant + * @type {number} + * @memberof MailMessageItemForListAllOfFromInner + */ + 'mail_message_party_id'?: number; +} + diff --git a/models/mail-message-item-for-list-all-of.ts b/models/mail-message-item-for-list-all-of.ts new file mode 100644 index 00000000..4dea9fae --- /dev/null +++ b/models/mail-message-item-for-list-all-of.ts @@ -0,0 +1,275 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { MailMessageItemForListAllOfFromInner } from './mail-message-item-for-list-all-of-from-inner'; + +/** + * + * @export + * @interface MailMessageItemForListAllOf + */ +export interface MailMessageItemForListAllOf { + /** + * ID of the mail message. + * @type {number} + * @memberof MailMessageItemForListAllOf + */ + 'id'?: number; + /** + * The array of mail message sender (object) + * @type {Array} + * @memberof MailMessageItemForListAllOf + */ + 'from'?: Array; + /** + * The array of mail message receiver (object) + * @type {Array} + * @memberof MailMessageItemForListAllOf + */ + 'to'?: Array; + /** + * The array of mail message copies (object) + * @type {Array} + * @memberof MailMessageItemForListAllOf + */ + 'cc'?: Array; + /** + * The array of mail message blind copies (object) + * @type {Array} + * @memberof MailMessageItemForListAllOf + */ + 'bcc'?: Array; + /** + * The mail message body URL + * @type {string} + * @memberof MailMessageItemForListAllOf + */ + 'body_url'?: string; + /** + * The connection account ID + * @type {string} + * @memberof MailMessageItemForListAllOf + */ + 'account_id'?: string; + /** + * ID of the user whom mail message will be assigned to + * @type {number} + * @memberof MailMessageItemForListAllOf + */ + 'user_id'?: number; + /** + * ID of the mail message thread + * @type {number} + * @memberof MailMessageItemForListAllOf + */ + 'mail_thread_id'?: number; + /** + * The subject of mail message + * @type {string} + * @memberof MailMessageItemForListAllOf + */ + 'subject'?: string; + /** + * The snippet of mail message. Snippet length is up to 225 characters. + * @type {string} + * @memberof MailMessageItemForListAllOf + */ + 'snippet'?: string; + /** + * The status of tracking mail message. Value is `null` if tracking is not enabled. + * @type {string} + * @memberof MailMessageItemForListAllOf + */ + 'mail_tracking_status'?: MailMessageItemForListAllOfMailTrackingStatusConst; + /** + * + * @type {number} + * @memberof MailMessageItemForListAllOf + */ + 'mail_link_tracking_enabled_flag'?: MailMessageItemForListAllOfMailLinkTrackingEnabledFlagConst; + /** + * + * @type {number} + * @memberof MailMessageItemForListAllOf + */ + 'read_flag'?: MailMessageItemForListAllOfReadFlagConst; + /** + * If the mail message has a draft status then the value is the mail message object as JSON formatted string, otherwise `null`. + * @type {string} + * @memberof MailMessageItemForListAllOf + */ + 'draft'?: string; + /** + * + * @type {number} + * @memberof MailMessageItemForListAllOf + */ + 'draft_flag'?: MailMessageItemForListAllOfDraftFlagConst; + /** + * + * @type {number} + * @memberof MailMessageItemForListAllOf + */ + 'synced_flag'?: MailMessageItemForListAllOfSyncedFlagConst; + /** + * + * @type {number} + * @memberof MailMessageItemForListAllOf + */ + 'deleted_flag'?: MailMessageItemForListAllOfDeletedFlagConst; + /** + * + * @type {number} + * @memberof MailMessageItemForListAllOf + */ + 'has_body_flag'?: MailMessageItemForListAllOfHasBodyFlagConst; + /** + * + * @type {number} + * @memberof MailMessageItemForListAllOf + */ + 'sent_flag'?: MailMessageItemForListAllOfSentFlagConst; + /** + * + * @type {number} + * @memberof MailMessageItemForListAllOf + */ + 'sent_from_pipedrive_flag'?: MailMessageItemForListAllOfSentFromPipedriveFlagConst; + /** + * + * @type {number} + * @memberof MailMessageItemForListAllOf + */ + 'smart_bcc_flag'?: MailMessageItemForListAllOfSmartBccFlagConst; + /** + * Creation or receival time of the mail message + * @type {string} + * @memberof MailMessageItemForListAllOf + */ + 'message_time'?: string; + /** + * The insertion into the database time of the mail message + * @type {string} + * @memberof MailMessageItemForListAllOf + */ + 'add_time'?: string; + /** + * The updating time in the database of the mail message + * @type {string} + * @memberof MailMessageItemForListAllOf + */ + 'update_time'?: string; + /** + * + * @type {number} + * @memberof MailMessageItemForListAllOf + */ + 'has_attachments_flag'?: MailMessageItemForListAllOfHasAttachmentsFlagConst; + /** + * + * @type {number} + * @memberof MailMessageItemForListAllOf + */ + 'has_inline_attachments_flag'?: MailMessageItemForListAllOfHasInlineAttachmentsFlagConst; + /** + * + * @type {number} + * @memberof MailMessageItemForListAllOf + */ + 'has_real_attachments_flag'?: MailMessageItemForListAllOfHasRealAttachmentsFlagConst; +} + +export const MailMessageItemForListAllOfMailTrackingStatusConst = { + opened: 'opened', + not_opened: 'not opened' +} as const; + +export type MailMessageItemForListAllOfMailTrackingStatusConst = typeof MailMessageItemForListAllOfMailTrackingStatusConst[keyof typeof MailMessageItemForListAllOfMailTrackingStatusConst]; +export const MailMessageItemForListAllOfMailLinkTrackingEnabledFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailMessageItemForListAllOfMailLinkTrackingEnabledFlagConst = typeof MailMessageItemForListAllOfMailLinkTrackingEnabledFlagConst[keyof typeof MailMessageItemForListAllOfMailLinkTrackingEnabledFlagConst]; +export const MailMessageItemForListAllOfReadFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailMessageItemForListAllOfReadFlagConst = typeof MailMessageItemForListAllOfReadFlagConst[keyof typeof MailMessageItemForListAllOfReadFlagConst]; +export const MailMessageItemForListAllOfDraftFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailMessageItemForListAllOfDraftFlagConst = typeof MailMessageItemForListAllOfDraftFlagConst[keyof typeof MailMessageItemForListAllOfDraftFlagConst]; +export const MailMessageItemForListAllOfSyncedFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailMessageItemForListAllOfSyncedFlagConst = typeof MailMessageItemForListAllOfSyncedFlagConst[keyof typeof MailMessageItemForListAllOfSyncedFlagConst]; +export const MailMessageItemForListAllOfDeletedFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailMessageItemForListAllOfDeletedFlagConst = typeof MailMessageItemForListAllOfDeletedFlagConst[keyof typeof MailMessageItemForListAllOfDeletedFlagConst]; +export const MailMessageItemForListAllOfHasBodyFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailMessageItemForListAllOfHasBodyFlagConst = typeof MailMessageItemForListAllOfHasBodyFlagConst[keyof typeof MailMessageItemForListAllOfHasBodyFlagConst]; +export const MailMessageItemForListAllOfSentFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailMessageItemForListAllOfSentFlagConst = typeof MailMessageItemForListAllOfSentFlagConst[keyof typeof MailMessageItemForListAllOfSentFlagConst]; +export const MailMessageItemForListAllOfSentFromPipedriveFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailMessageItemForListAllOfSentFromPipedriveFlagConst = typeof MailMessageItemForListAllOfSentFromPipedriveFlagConst[keyof typeof MailMessageItemForListAllOfSentFromPipedriveFlagConst]; +export const MailMessageItemForListAllOfSmartBccFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailMessageItemForListAllOfSmartBccFlagConst = typeof MailMessageItemForListAllOfSmartBccFlagConst[keyof typeof MailMessageItemForListAllOfSmartBccFlagConst]; +export const MailMessageItemForListAllOfHasAttachmentsFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailMessageItemForListAllOfHasAttachmentsFlagConst = typeof MailMessageItemForListAllOfHasAttachmentsFlagConst[keyof typeof MailMessageItemForListAllOfHasAttachmentsFlagConst]; +export const MailMessageItemForListAllOfHasInlineAttachmentsFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailMessageItemForListAllOfHasInlineAttachmentsFlagConst = typeof MailMessageItemForListAllOfHasInlineAttachmentsFlagConst[keyof typeof MailMessageItemForListAllOfHasInlineAttachmentsFlagConst]; +export const MailMessageItemForListAllOfHasRealAttachmentsFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailMessageItemForListAllOfHasRealAttachmentsFlagConst = typeof MailMessageItemForListAllOfHasRealAttachmentsFlagConst[keyof typeof MailMessageItemForListAllOfHasRealAttachmentsFlagConst]; + + diff --git a/models/mail-message-item-for-list-all-of1.ts b/models/mail-message-item-for-list-all-of1.ts new file mode 100644 index 00000000..82925900 --- /dev/null +++ b/models/mail-message-item-for-list-all-of1.ts @@ -0,0 +1,78 @@ +/* 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 + * @interface MailMessageItemForListAllOf1 + */ +export interface MailMessageItemForListAllOf1 { + /** + * The Mail Message ID assigned by the sync provider + * @type {string} + * @memberof MailMessageItemForListAllOf1 + */ + 'nylas_id'?: string; + /** + * The name of the S3 bucket + * @type {string} + * @memberof MailMessageItemForListAllOf1 + */ + 's3_bucket'?: string; + /** + * The path of the S3 bucket + * @type {string} + * @memberof MailMessageItemForListAllOf1 + */ + 's3_bucket_path'?: string; + /** + * If the Mail Message has been deleted on the provider side or not + * @type {boolean} + * @memberof MailMessageItemForListAllOf1 + */ + 'external_deleted_flag'?: boolean; + /** + * The Mail Message ID assigned by the mail user agent + * @type {string} + * @memberof MailMessageItemForListAllOf1 + */ + 'mua_message_id'?: string; + /** + * The ID of the mail template + * @type {number} + * @memberof MailMessageItemForListAllOf1 + */ + 'template_id'?: number; + /** + * The add date and time of the Mail Message + * @type {string} + * @memberof MailMessageItemForListAllOf1 + */ + 'timestamp'?: string; + /** + * The type of the data item + * @type {string} + * @memberof MailMessageItemForListAllOf1 + */ + 'item_type'?: string; + /** + * The ID of the company + * @type {number} + * @memberof MailMessageItemForListAllOf1 + */ + 'company_id'?: number; +} + diff --git a/models/mail-message-item-for-list.ts b/models/mail-message-item-for-list.ts new file mode 100644 index 00000000..e8b6b8ba --- /dev/null +++ b/models/mail-message-item-for-list.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { MailMessageItemForListAllOf } from './mail-message-item-for-list-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { MailMessageItemForListAllOf1 } from './mail-message-item-for-list-all-of1'; +// May contain unused imports in some cases +// @ts-ignore +import { MailMessageItemForListAllOfFromInner } from './mail-message-item-for-list-all-of-from-inner'; + +/** + * @type MailMessageItemForList + * @export + */ +export type MailMessageItemForList = MailMessageItemForListAllOf & MailMessageItemForListAllOf1; + + diff --git a/models/mail-message-response200-all-of.ts b/models/mail-message-response200-all-of.ts new file mode 100644 index 00000000..169f2780 --- /dev/null +++ b/models/mail-message-response200-all-of.ts @@ -0,0 +1,48 @@ +/* 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 + * @interface MailMessageResponse200AllOf + */ +export interface MailMessageResponse200AllOf { + /** + * If the response is successful or not + * @type {boolean} + * @memberof MailMessageResponse200AllOf + */ + 'success'?: boolean; + /** + * The email service specific status code and it is returned through the response body. + * @type {number} + * @memberof MailMessageResponse200AllOf + */ + 'statusCode'?: number; + /** + * The status text of the response. + * @type {string} + * @memberof MailMessageResponse200AllOf + */ + 'statusText'?: string; + /** + * The service name of the response. + * @type {string} + * @memberof MailMessageResponse200AllOf + */ + 'service'?: string; +} + diff --git a/models/mail-message-response200-all-of1.ts b/models/mail-message-response200-all-of1.ts new file mode 100644 index 00000000..9038f842 --- /dev/null +++ b/models/mail-message-response200-all-of1.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { MailMessageItemForListAllOf } from './mail-message-item-for-list-all-of'; + +/** + * + * @export + * @interface MailMessageResponse200AllOf1 + */ +export interface MailMessageResponse200AllOf1 { + /** + * + * @type {MailMessageItemForListAllOf} + * @memberof MailMessageResponse200AllOf1 + */ + 'data'?: MailMessageItemForListAllOf; +} + diff --git a/models/mail-message-response200.ts b/models/mail-message-response200.ts new file mode 100644 index 00000000..ec7dd3be --- /dev/null +++ b/models/mail-message-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { MailMessageItemForListAllOf } from './mail-message-item-for-list-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { MailMessageResponse200AllOf } from './mail-message-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { MailMessageResponse200AllOf1 } from './mail-message-response200-all-of1'; + +/** + * @type MailMessageResponse200 + * @export + */ +export type MailMessageResponse200 = MailMessageResponse200AllOf & MailMessageResponse200AllOf1; + + diff --git a/models/merge-deals-request.ts b/models/merge-deals-request.ts new file mode 100644 index 00000000..f5402c64 --- /dev/null +++ b/models/merge-deals-request.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface MergeDealsRequest + */ +export interface MergeDealsRequest { + /** + * The ID of the deal that the deal will be merged with + * @type {number} + * @memberof MergeDealsRequest + */ + 'merge_with_id': number; +} + diff --git a/models/merge-deals-response200-data-all-of.ts b/models/merge-deals-response200-data-all-of.ts new file mode 100644 index 00000000..a560b4f3 --- /dev/null +++ b/models/merge-deals-response200-data-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface MergeDealsResponse200DataAllOf + */ +export interface MergeDealsResponse200DataAllOf { + /** + * The deal ID of the deal which the original deal was merged with + * @type {number} + * @memberof MergeDealsResponse200DataAllOf + */ + 'merge_what_id'?: number; +} + diff --git a/models/merge-deals-response200-data.ts b/models/merge-deals-response200-data.ts new file mode 100644 index 00000000..9278c480 --- /dev/null +++ b/models/merge-deals-response200-data.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DealStrict } from './deal-strict'; +// May contain unused imports in some cases +// @ts-ignore +import { MergeDealsResponse200DataAllOf } from './merge-deals-response200-data-all-of'; + +/** + * @type MergeDealsResponse200Data + * @export + */ +export type MergeDealsResponse200Data = DealStrict & MergeDealsResponse200DataAllOf; + + diff --git a/models/merge-deals-response200.ts b/models/merge-deals-response200.ts new file mode 100644 index 00000000..80023101 --- /dev/null +++ b/models/merge-deals-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { MergeDealsResponse200Data } from './merge-deals-response200-data'; + +/** + * + * @export + * @interface MergeDealsResponse200 + */ +export interface MergeDealsResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof MergeDealsResponse200 + */ + 'success'?: boolean; + /** + * + * @type {MergeDealsResponse200Data} + * @memberof MergeDealsResponse200 + */ + 'data'?: MergeDealsResponse200Data; +} + diff --git a/models/merge-organizations-request.ts b/models/merge-organizations-request.ts new file mode 100644 index 00000000..fe723571 --- /dev/null +++ b/models/merge-organizations-request.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface MergeOrganizationsRequest + */ +export interface MergeOrganizationsRequest { + /** + * The ID of the organization that the organization will be merged with + * @type {number} + * @memberof MergeOrganizationsRequest + */ + 'merge_with_id': number; +} + diff --git a/models/merge-organizations-response200-data.ts b/models/merge-organizations-response200-data.ts new file mode 100644 index 00000000..454f0375 --- /dev/null +++ b/models/merge-organizations-response200-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface MergeOrganizationsResponse200Data + */ +export interface MergeOrganizationsResponse200Data { + /** + * The ID of the merged organization + * @type {number} + * @memberof MergeOrganizationsResponse200Data + */ + 'id'?: number; +} + diff --git a/models/merge-organizations-response200.ts b/models/merge-organizations-response200.ts new file mode 100644 index 00000000..495543bf --- /dev/null +++ b/models/merge-organizations-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { MergeOrganizationsResponse200Data } from './merge-organizations-response200-data'; + +/** + * + * @export + * @interface MergeOrganizationsResponse200 + */ +export interface MergeOrganizationsResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof MergeOrganizationsResponse200 + */ + 'success'?: boolean; + /** + * + * @type {MergeOrganizationsResponse200Data} + * @memberof MergeOrganizationsResponse200 + */ + 'data'?: MergeOrganizationsResponse200Data; +} + diff --git a/models/merge-person-deal-related-info-all-of.ts b/models/merge-person-deal-related-info-all-of.ts new file mode 100644 index 00000000..70be9f77 --- /dev/null +++ b/models/merge-person-deal-related-info-all-of.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface MergePersonDealRelatedInfoAllOf + */ +export interface MergePersonDealRelatedInfoAllOf { + /** + * The count of open participant deals related with the item + * @type {number} + * @memberof MergePersonDealRelatedInfoAllOf + */ + 'participant_open_deals_count'?: number; + /** + * The count of closed participant deals related with the item + * @type {number} + * @memberof MergePersonDealRelatedInfoAllOf + */ + 'participant_closed_deals_count'?: number; +} + diff --git a/models/merge-person-deal-related-info.ts b/models/merge-person-deal-related-info.ts new file mode 100644 index 00000000..39eb3351 --- /dev/null +++ b/models/merge-person-deal-related-info.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DealCountAndActivityInfo } from './deal-count-and-activity-info'; +// May contain unused imports in some cases +// @ts-ignore +import { MergePersonDealRelatedInfoAllOf } from './merge-person-deal-related-info-all-of'; + +/** + * @type MergePersonDealRelatedInfo + * @export + */ +export type MergePersonDealRelatedInfo = DealCountAndActivityInfo & MergePersonDealRelatedInfoAllOf; + + diff --git a/models/merge-person-item.ts b/models/merge-person-item.ts new file mode 100644 index 00000000..cbcdace9 --- /dev/null +++ b/models/merge-person-item.ts @@ -0,0 +1,38 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AdditionalMergePersonInfo } from './additional-merge-person-info'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOf } from './person-item-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOfEmailInner } from './person-item-all-of-email-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOfPhoneInner } from './person-item-all-of-phone-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOfPictureId } from './person-item-all-of-picture-id'; + +/** + * @type MergePersonItem + * @export + */ +export type MergePersonItem = AdditionalMergePersonInfo & PersonItemAllOf; + + diff --git a/models/merge-persons-request.ts b/models/merge-persons-request.ts new file mode 100644 index 00000000..8d85a70b --- /dev/null +++ b/models/merge-persons-request.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface MergePersonsRequest + */ +export interface MergePersonsRequest { + /** + * The ID of the person that will not be overwritten. This person’s data will be prioritized in case of conflict with the other person. + * @type {number} + * @memberof MergePersonsRequest + */ + 'merge_with_id': number; +} + diff --git a/models/merge-persons-response200-all-of.ts b/models/merge-persons-response200-all-of.ts new file mode 100644 index 00000000..4f377755 --- /dev/null +++ b/models/merge-persons-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { MergePersonItem } from './merge-person-item'; + +/** + * + * @export + * @interface MergePersonsResponse200AllOf + */ +export interface MergePersonsResponse200AllOf { + /** + * + * @type {MergePersonItem} + * @memberof MergePersonsResponse200AllOf + */ + 'data'?: MergePersonItem; +} + diff --git a/models/merge-persons-response200.ts b/models/merge-persons-response200.ts new file mode 100644 index 00000000..85f095a4 --- /dev/null +++ b/models/merge-persons-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { MergePersonItem } from './merge-person-item'; +// May contain unused imports in some cases +// @ts-ignore +import { MergePersonsResponse200AllOf } from './merge-persons-response200-all-of'; + +/** + * @type MergePersonsResponse200 + * @export + */ +export type MergePersonsResponse200 = BaseResponse & MergePersonsResponse200AllOf; + + diff --git a/models/new-deal-parameters.ts b/models/new-deal-parameters.ts new file mode 100644 index 00000000..83ca42ec --- /dev/null +++ b/models/new-deal-parameters.ts @@ -0,0 +1,94 @@ +/* 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 + * @interface NewDealParameters + */ +export interface NewDealParameters { + /** + * The value of the deal. If omitted, value will be set to 0. + * @type {string} + * @memberof NewDealParameters + */ + 'value'?: string; + /** + * The array of the labels IDs. + * @type {Array} + * @memberof NewDealParameters + */ + 'label'?: Array; + /** + * The currency of the deal. Accepts a 3-character currency code. If omitted, currency will be set to the default currency of the authorized user. + * @type {string} + * @memberof NewDealParameters + */ + 'currency'?: string; + /** + * The ID of the user which will be the owner of the created deal. If not provided, the user making the request will be used. + * @type {number} + * @memberof NewDealParameters + */ + 'user_id'?: number; + /** + * The ID of a person which this deal will be linked to. If the person does not exist yet, it needs to be created first. This property is required unless `org_id` is specified. + * @type {number} + * @memberof NewDealParameters + */ + 'person_id'?: number; + /** + * The ID of an organization which this deal will be linked to. If the organization does not exist yet, it needs to be created first. This property is required unless `person_id` is specified. + * @type {number} + * @memberof NewDealParameters + */ + 'org_id'?: number; + /** + * The ID of the pipeline this deal will be added to. By default, the deal will be added to the first stage of the specified pipeline. Please note that `pipeline_id` and `stage_id` should not be used together as `pipeline_id` will be ignored. + * @type {number} + * @memberof NewDealParameters + */ + 'pipeline_id'?: number; + /** + * The ID of the stage this deal will be added to. Please note that a pipeline will be assigned automatically based on the `stage_id`. If omitted, the deal will be placed in the first stage of the default pipeline. + * @type {number} + * @memberof NewDealParameters + */ + 'stage_id'?: number; + /** + * open = Open, won = Won, lost = Lost, deleted = Deleted. If omitted, status will be set to open. + * @type {string} + * @memberof NewDealParameters + */ + 'status'?: NewDealParametersStatusConst; + /** + * The optional creation date & time of the deal in UTC. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof NewDealParameters + */ + 'add_time'?: string; +} + +export const NewDealParametersStatusConst = { + open: 'open', + won: 'won', + lost: 'lost', + deleted: 'deleted' +} as const; + +export type NewDealParametersStatusConst = typeof NewDealParametersStatusConst[keyof typeof NewDealParametersStatusConst]; + + diff --git a/models/new-follower-response200-data.ts b/models/new-follower-response200-data.ts new file mode 100644 index 00000000..235c5d27 --- /dev/null +++ b/models/new-follower-response200-data.ts @@ -0,0 +1,48 @@ +/* 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 + * @interface NewFollowerResponse200Data + */ +export interface NewFollowerResponse200Data { + /** + * The ID of the user that was added as follower + * @type {number} + * @memberof NewFollowerResponse200Data + */ + 'user_id'?: number; + /** + * The ID of the follower + * @type {number} + * @memberof NewFollowerResponse200Data + */ + 'id'?: number; + /** + * The ID of the product + * @type {number} + * @memberof NewFollowerResponse200Data + */ + 'product_id'?: number; + /** + * The follower creation time. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof NewFollowerResponse200Data + */ + 'add_time'?: string; +} + diff --git a/models/new-follower-response200.ts b/models/new-follower-response200.ts new file mode 100644 index 00000000..8eb607b9 --- /dev/null +++ b/models/new-follower-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { NewFollowerResponse200Data } from './new-follower-response200-data'; + +/** + * + * @export + * @interface NewFollowerResponse200 + */ +export interface NewFollowerResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof NewFollowerResponse200 + */ + 'success'?: boolean; + /** + * + * @type {NewFollowerResponse200Data} + * @memberof NewFollowerResponse200 + */ + 'data'?: NewFollowerResponse200Data; +} + diff --git a/models/note-request-all-of.ts b/models/note-request-all-of.ts new file mode 100644 index 00000000..5deb7caf --- /dev/null +++ b/models/note-request-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface NoteRequestAllOf + */ +export interface NoteRequestAllOf { + /** + * The content of the note in HTML format. Subject to sanitization on the back-end. + * @type {string} + * @memberof NoteRequestAllOf + */ + 'content'?: string; +} + diff --git a/models/note-request-all-of1.ts b/models/note-request-all-of1.ts new file mode 100644 index 00000000..8d9630d1 --- /dev/null +++ b/models/note-request-all-of1.ts @@ -0,0 +1,48 @@ +/* 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 + * @interface NoteRequestAllOf1 + */ +export interface NoteRequestAllOf1 { + /** + * The ID of the lead the note will be attached to + * @type {string} + * @memberof NoteRequestAllOf1 + */ + 'lead_id'?: string; + /** + * The ID of the deal the note will be attached to + * @type {number} + * @memberof NoteRequestAllOf1 + */ + 'deal_id'?: number; + /** + * The ID of the person the note will be attached to + * @type {number} + * @memberof NoteRequestAllOf1 + */ + 'person_id'?: number; + /** + * The ID of the organization the note will be attached to + * @type {number} + * @memberof NoteRequestAllOf1 + */ + 'org_id'?: number; +} + diff --git a/models/note-request.ts b/models/note-request.ts new file mode 100644 index 00000000..0f001e1b --- /dev/null +++ b/models/note-request.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddNoteRequestAllOf1 } from './add-note-request-all-of1'; +// May contain unused imports in some cases +// @ts-ignore +import { NoteRequestAllOf } from './note-request-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { NoteRequestAllOf1 } from './note-request-all-of1'; + +/** + * @type NoteRequest + * @export + */ +export type NoteRequest = AddNoteRequestAllOf1 & NoteRequestAllOf & NoteRequestAllOf1; + + diff --git a/models/one-comment-response200.ts b/models/one-comment-response200.ts new file mode 100644 index 00000000..448b13e5 --- /dev/null +++ b/models/one-comment-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetCommentsResponse200DataInner } from './get-comments-response200-data-inner'; + +/** + * + * @export + * @interface OneCommentResponse200 + */ +export interface OneCommentResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof OneCommentResponse200 + */ + 'success'?: boolean; + /** + * + * @type {GetCommentsResponse200DataInner} + * @memberof OneCommentResponse200 + */ + 'data'?: GetCommentsResponse200DataInner; +} + diff --git a/models/one-lead-response200.ts b/models/one-lead-response200.ts new file mode 100644 index 00000000..371d619f --- /dev/null +++ b/models/one-lead-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetLeadsResponse200DataInner } from './get-leads-response200-data-inner'; + +/** + * + * @export + * @interface OneLeadResponse200 + */ +export interface OneLeadResponse200 { + /** + * + * @type {boolean} + * @memberof OneLeadResponse200 + */ + 'success'?: boolean; + /** + * + * @type {GetLeadsResponse200DataInner} + * @memberof OneLeadResponse200 + */ + 'data'?: GetLeadsResponse200DataInner; +} + diff --git a/models/one-note-response200.ts b/models/one-note-response200.ts new file mode 100644 index 00000000..d517b4f0 --- /dev/null +++ b/models/one-note-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetNotesResponse200DataInner } from './get-notes-response200-data-inner'; + +/** + * + * @export + * @interface OneNoteResponse200 + */ +export interface OneNoteResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof OneNoteResponse200 + */ + 'success'?: boolean; + /** + * + * @type {GetNotesResponse200DataInner} + * @memberof OneNoteResponse200 + */ + 'data'?: GetNotesResponse200DataInner; +} + diff --git a/models/organization-count-and-address-info-all-of.ts b/models/organization-count-and-address-info-all-of.ts new file mode 100644 index 00000000..ae90f4d5 --- /dev/null +++ b/models/organization-count-and-address-info-all-of.ts @@ -0,0 +1,72 @@ +/* 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 + * @interface OrganizationCountAndAddressInfoAllOf + */ +export interface OrganizationCountAndAddressInfoAllOf { + /** + * The count of email messages related to the organization + * @type {number} + * @memberof OrganizationCountAndAddressInfoAllOf + */ + 'email_messages_count'?: number; + /** + * The count of persons related to the organization + * @type {number} + * @memberof OrganizationCountAndAddressInfoAllOf + */ + 'people_count'?: number; + /** + * The count of activities related to the organization + * @type {number} + * @memberof OrganizationCountAndAddressInfoAllOf + */ + 'activities_count'?: number; + /** + * The count of done activities related to the organization + * @type {number} + * @memberof OrganizationCountAndAddressInfoAllOf + */ + 'done_activities_count'?: number; + /** + * The count of undone activities related to the organization + * @type {number} + * @memberof OrganizationCountAndAddressInfoAllOf + */ + 'undone_activities_count'?: number; + /** + * The count of files related to the organization + * @type {number} + * @memberof OrganizationCountAndAddressInfoAllOf + */ + 'files_count'?: number; + /** + * The count of notes related to the organization + * @type {number} + * @memberof OrganizationCountAndAddressInfoAllOf + */ + 'notes_count'?: number; + /** + * The count of followers related to the organization + * @type {number} + * @memberof OrganizationCountAndAddressInfoAllOf + */ + 'followers_count'?: number; +} + diff --git a/models/organization-count-and-address-info-all-of1.ts b/models/organization-count-and-address-info-all-of1.ts new file mode 100644 index 00000000..ff2bc436 --- /dev/null +++ b/models/organization-count-and-address-info-all-of1.ts @@ -0,0 +1,90 @@ +/* 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 + * @interface OrganizationCountAndAddressInfoAllOf1 + */ +export interface OrganizationCountAndAddressInfoAllOf1 { + /** + * The full address of the organization + * @type {string} + * @memberof OrganizationCountAndAddressInfoAllOf1 + */ + 'address'?: string; + /** + * The sub-premise of the organization location + * @type {string} + * @memberof OrganizationCountAndAddressInfoAllOf1 + */ + 'address_subpremise'?: string; + /** + * The street number of the organization location + * @type {string} + * @memberof OrganizationCountAndAddressInfoAllOf1 + */ + 'address_street_number'?: string; + /** + * The route of the organization location + * @type {string} + * @memberof OrganizationCountAndAddressInfoAllOf1 + */ + 'address_route'?: string; + /** + * The sub-locality of the organization location + * @type {string} + * @memberof OrganizationCountAndAddressInfoAllOf1 + */ + 'address_sublocality'?: string; + /** + * The locality of the organization location + * @type {string} + * @memberof OrganizationCountAndAddressInfoAllOf1 + */ + 'address_locality'?: string; + /** + * The level 1 admin area of the organization location + * @type {string} + * @memberof OrganizationCountAndAddressInfoAllOf1 + */ + 'address_admin_area_level_1'?: string; + /** + * The level 2 admin area of the organization location + * @type {string} + * @memberof OrganizationCountAndAddressInfoAllOf1 + */ + 'address_admin_area_level_2'?: string; + /** + * The country of the organization location + * @type {string} + * @memberof OrganizationCountAndAddressInfoAllOf1 + */ + 'address_country'?: string; + /** + * The postal code of the organization location + * @type {string} + * @memberof OrganizationCountAndAddressInfoAllOf1 + */ + 'address_postal_code'?: string; + /** + * The formatted organization location + * @type {string} + * @memberof OrganizationCountAndAddressInfoAllOf1 + */ + 'address_formatted_address'?: string; +} + diff --git a/models/organization-count-and-address-info.ts b/models/organization-count-and-address-info.ts new file mode 100644 index 00000000..27e81a21 --- /dev/null +++ b/models/organization-count-and-address-info.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationCountAndAddressInfoAllOf } from './organization-count-and-address-info-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationCountAndAddressInfoAllOf1 } from './organization-count-and-address-info-all-of1'; + +/** + * @type OrganizationCountAndAddressInfo + * @export + */ +export type OrganizationCountAndAddressInfo = OrganizationCountAndAddressInfoAllOf & OrganizationCountAndAddressInfoAllOf1; + + diff --git a/models/organization-item-all-of.ts b/models/organization-item-all-of.ts new file mode 100644 index 00000000..7eef279e --- /dev/null +++ b/models/organization-item-all-of.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface OrganizationItemAllOf + */ +export interface OrganizationItemAllOf { + /** + * Please refer to response schema of Activity + * @type {object} + * @memberof OrganizationItemAllOf + */ + 'last_activity'?: object | null; + /** + * Please refer to response schema of Activity + * @type {object} + * @memberof OrganizationItemAllOf + */ + 'next_activity'?: object | null; +} + diff --git a/models/organization-item.ts b/models/organization-item.ts new file mode 100644 index 00000000..1d691961 --- /dev/null +++ b/models/organization-item.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseOrganizationItemAllOfPictureId } from './base-organization-item-all-of-picture-id'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseOrganizationItemWithEditNameFlag } from './base-organization-item-with-edit-name-flag'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationItemAllOf } from './organization-item-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { Owner } from './owner'; + +/** + * @type OrganizationItem + * @export + */ +export type OrganizationItem = BaseOrganizationItemWithEditNameFlag & OrganizationItemAllOf; + + diff --git a/models/organization-relationship-details-all-of.ts b/models/organization-relationship-details-all-of.ts new file mode 100644 index 00000000..95804436 --- /dev/null +++ b/models/organization-relationship-details-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface OrganizationRelationshipDetailsAllOf + */ +export interface OrganizationRelationshipDetailsAllOf { + /** + * The name of the linked organization + * @type {string} + * @memberof OrganizationRelationshipDetailsAllOf + */ + 'related_organization_name'?: string; +} + diff --git a/models/organization-relationship-details.ts b/models/organization-relationship-details.ts new file mode 100644 index 00000000..589eed9f --- /dev/null +++ b/models/organization-relationship-details.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationRelationshipDetailsAllOf } from './organization-relationship-details-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationRelationshipWithCalculatedFields } from './organization-relationship-with-calculated-fields'; +// May contain unused imports in some cases +// @ts-ignore +import { RelationshipOrganizationInfoItem } from './relationship-organization-info-item'; + +/** + * @type OrganizationRelationshipDetails + * @export + */ +export type OrganizationRelationshipDetails = OrganizationRelationshipDetailsAllOf & OrganizationRelationshipWithCalculatedFields; + + diff --git a/models/organization-relationship-with-calculated-fields-all-of.ts b/models/organization-relationship-with-calculated-fields-all-of.ts new file mode 100644 index 00000000..c5e31d90 --- /dev/null +++ b/models/organization-relationship-with-calculated-fields-all-of.ts @@ -0,0 +1,69 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { RelationshipOrganizationInfoItem } from './relationship-organization-info-item'; + +/** + * + * @export + * @interface OrganizationRelationshipWithCalculatedFieldsAllOf + */ +export interface OrganizationRelationshipWithCalculatedFieldsAllOf { + /** + * The ID of the organization relationship + * @type {number} + * @memberof OrganizationRelationshipWithCalculatedFieldsAllOf + */ + 'id'?: number; + /** + * The type of the relationship + * @type {string} + * @memberof OrganizationRelationshipWithCalculatedFieldsAllOf + */ + 'type'?: string; + /** + * + * @type {RelationshipOrganizationInfoItem} + * @memberof OrganizationRelationshipWithCalculatedFieldsAllOf + */ + 'rel_owner_org_id'?: RelationshipOrganizationInfoItem; + /** + * + * @type {RelationshipOrganizationInfoItem} + * @memberof OrganizationRelationshipWithCalculatedFieldsAllOf + */ + 'rel_linked_org_id'?: RelationshipOrganizationInfoItem; + /** + * The creation date and time of the relationship + * @type {string} + * @memberof OrganizationRelationshipWithCalculatedFieldsAllOf + */ + 'add_time'?: string; + /** + * The last updated date and time of the relationship + * @type {string} + * @memberof OrganizationRelationshipWithCalculatedFieldsAllOf + */ + 'update_time'?: string; + /** + * Whether the relationship is active or not + * @type {string} + * @memberof OrganizationRelationshipWithCalculatedFieldsAllOf + */ + 'active_flag'?: string; +} + diff --git a/models/organization-relationship-with-calculated-fields-all-of1.ts b/models/organization-relationship-with-calculated-fields-all-of1.ts new file mode 100644 index 00000000..8586c501 --- /dev/null +++ b/models/organization-relationship-with-calculated-fields-all-of1.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface OrganizationRelationshipWithCalculatedFieldsAllOf1 + */ +export interface OrganizationRelationshipWithCalculatedFieldsAllOf1 { + /** + * The calculated type of the relationship with the linked organization + * @type {string} + * @memberof OrganizationRelationshipWithCalculatedFieldsAllOf1 + */ + 'calculated_type'?: string; + /** + * The ID of the linked organization + * @type {number} + * @memberof OrganizationRelationshipWithCalculatedFieldsAllOf1 + */ + 'calculated_related_org_id'?: number; +} + diff --git a/models/organization-relationship-with-calculated-fields.ts b/models/organization-relationship-with-calculated-fields.ts new file mode 100644 index 00000000..ed7236d6 --- /dev/null +++ b/models/organization-relationship-with-calculated-fields.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationRelationshipWithCalculatedFieldsAllOf } from './organization-relationship-with-calculated-fields-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationRelationshipWithCalculatedFieldsAllOf1 } from './organization-relationship-with-calculated-fields-all-of1'; +// May contain unused imports in some cases +// @ts-ignore +import { RelationshipOrganizationInfoItem } from './relationship-organization-info-item'; + +/** + * @type OrganizationRelationshipWithCalculatedFields + * @export + */ +export type OrganizationRelationshipWithCalculatedFields = OrganizationRelationshipWithCalculatedFieldsAllOf & OrganizationRelationshipWithCalculatedFieldsAllOf1; + + diff --git a/models/organization-relationship.ts b/models/organization-relationship.ts new file mode 100644 index 00000000..51336f21 --- /dev/null +++ b/models/organization-relationship.ts @@ -0,0 +1,56 @@ +/* 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 + * @interface OrganizationRelationship + */ +export interface OrganizationRelationship { + /** + * The ID of the base organization for the returned calculated values + * @type {number} + * @memberof OrganizationRelationship + */ + 'org_id'?: number; + /** + * The type of organization relationship + * @type {string} + * @memberof OrganizationRelationship + */ + 'type'?: OrganizationRelationshipTypeConst; + /** + * The owner of this relationship. If type is `parent`, then the owner is the parent and the linked organization is the daughter. + * @type {number} + * @memberof OrganizationRelationship + */ + 'rel_owner_org_id'?: number; + /** + * The linked organization in this relationship. If type is `parent`, then the linked organization is the daughter. + * @type {number} + * @memberof OrganizationRelationship + */ + 'rel_linked_org_id'?: number; +} + +export const OrganizationRelationshipTypeConst = { + parent: 'parent', + related: 'related' +} as const; + +export type OrganizationRelationshipTypeConst = typeof OrganizationRelationshipTypeConst[keyof typeof OrganizationRelationshipTypeConst]; + + diff --git a/models/organizations-collection-response-object-all-of.ts b/models/organizations-collection-response-object-all-of.ts new file mode 100644 index 00000000..41bea727 --- /dev/null +++ b/models/organizations-collection-response-object-all-of.ts @@ -0,0 +1,84 @@ +/* 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 + * @interface OrganizationsCollectionResponseObjectAllOf + */ +export interface OrganizationsCollectionResponseObjectAllOf { + /** + * The ID of the organization + * @type {number} + * @memberof OrganizationsCollectionResponseObjectAllOf + */ + 'id'?: number; + /** + * Whether the organization is active or not + * @type {boolean} + * @memberof OrganizationsCollectionResponseObjectAllOf + */ + 'active_flag'?: boolean; + /** + * The ID of the owner + * @type {number} + * @memberof OrganizationsCollectionResponseObjectAllOf + */ + 'owner_id'?: number; + /** + * The name of the organization + * @type {string} + * @memberof OrganizationsCollectionResponseObjectAllOf + */ + 'name'?: string; + /** + * The last updated date and time of the organization. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof OrganizationsCollectionResponseObjectAllOf + */ + 'update_time'?: string; + /** + * The date and time this organization was deleted. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof OrganizationsCollectionResponseObjectAllOf + */ + 'delete_time'?: string | null; + /** + * The date and time when the organization was added/created. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof OrganizationsCollectionResponseObjectAllOf + */ + 'add_time'?: string; + /** + * The visibility group ID of who can see the organization + * @type {string} + * @memberof OrganizationsCollectionResponseObjectAllOf + */ + 'visible_to'?: string; + /** + * The label assigned to the organization + * @type {number} + * @memberof OrganizationsCollectionResponseObjectAllOf + */ + 'label'?: number | null; + /** + * The BCC email associated with the organization + * @type {string} + * @memberof OrganizationsCollectionResponseObjectAllOf + */ + 'cc_email'?: string; +} + diff --git a/models/organizations-collection-response-object.ts b/models/organizations-collection-response-object.ts new file mode 100644 index 00000000..f2017b4f --- /dev/null +++ b/models/organizations-collection-response-object.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationCountAndAddressInfoAllOf1 } from './organization-count-and-address-info-all-of1'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationsCollectionResponseObjectAllOf } from './organizations-collection-response-object-all-of'; + +/** + * @type OrganizationsCollectionResponseObject + * @export + */ +export type OrganizationsCollectionResponseObject = OrganizationCountAndAddressInfoAllOf1 & OrganizationsCollectionResponseObjectAllOf; + + diff --git a/models/owner-all-of.ts b/models/owner-all-of.ts new file mode 100644 index 00000000..ad4338cf --- /dev/null +++ b/models/owner-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface OwnerAllOf + */ +export interface OwnerAllOf { + /** + * The ID of the owner + * @type {number} + * @memberof OwnerAllOf + */ + 'value'?: number; +} + diff --git a/models/owner.ts b/models/owner.ts new file mode 100644 index 00000000..4a30f820 --- /dev/null +++ b/models/owner.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { OwnerAllOf } from './owner-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { UserDataWithIdAllOf } from './user-data-with-id-all-of'; + +/** + * @type Owner + * @export + */ +export type Owner = OwnerAllOf & UserDataWithIdAllOf; + + diff --git a/models/pagination-details-all-of.ts b/models/pagination-details-all-of.ts new file mode 100644 index 00000000..c6ec8acb --- /dev/null +++ b/models/pagination-details-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface PaginationDetailsAllOf + */ +export interface PaginationDetailsAllOf { + /** + * Next pagination start + * @type {number} + * @memberof PaginationDetailsAllOf + */ + 'next_start'?: number; +} + diff --git a/models/pagination-details.ts b/models/pagination-details.ts new file mode 100644 index 00000000..9889ba91 --- /dev/null +++ b/models/pagination-details.ts @@ -0,0 +1,30 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FieldsResponse200AllOfAdditionalData } from './fields-response200-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { PaginationDetailsAllOf } from './pagination-details-all-of'; + +/** + * @type PaginationDetails + * Pagination details of the list + * @export + */ +export type PaginationDetails = FieldsResponse200AllOfAdditionalData & PaginationDetailsAllOf; + + diff --git a/models/payment-response200-all-of-data-inner.ts b/models/payment-response200-all-of-data-inner.ts new file mode 100644 index 00000000..93db4822 --- /dev/null +++ b/models/payment-response200-all-of-data-inner.ts @@ -0,0 +1,121 @@ +/* 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 + * @interface PaymentResponse200AllOfDataInner + */ +export interface PaymentResponse200AllOfDataInner { + /** + * The ID of the payment + * @type {number} + * @memberof PaymentResponse200AllOfDataInner + */ + 'id'?: number; + /** + * The ID of the subscription this payment is associated with + * @type {number} + * @memberof PaymentResponse200AllOfDataInner + */ + 'subscription_id'?: number; + /** + * The ID of the deal this payment is associated with + * @type {number} + * @memberof PaymentResponse200AllOfDataInner + */ + 'deal_id'?: number; + /** + * The payment status + * @type {boolean} + * @memberof PaymentResponse200AllOfDataInner + */ + 'is_active'?: boolean; + /** + * The payment amount + * @type {number} + * @memberof PaymentResponse200AllOfDataInner + */ + 'amount'?: number; + /** + * The currency of the payment + * @type {string} + * @memberof PaymentResponse200AllOfDataInner + */ + 'currency'?: string; + /** + * The difference between the amount of the current payment and the previous payment. The value can be either positive or negative. + * @type {number} + * @memberof PaymentResponse200AllOfDataInner + */ + 'change_amount'?: number; + /** + * The date when payment occurs + * @type {string} + * @memberof PaymentResponse200AllOfDataInner + */ + 'due_at'?: string; + /** + * Represents the movement of revenue in comparison with the previous payment. Possible values are: `New` - first payment of the subscription. `Recurring` - no movement. `Expansion` - current payment amount > previous payment amount. `Contraction` - current payment amount < previous payment amount. `Churn` - last payment of the subscription. + * @type {string} + * @memberof PaymentResponse200AllOfDataInner + */ + 'revenue_movement_type'?: PaymentResponse200AllOfDataInnerRevenueMovementTypeConst; + /** + * The type of the payment. Possible values are: `Recurring` - payments occur over fixed intervals of time, `Additional` - extra payment not the recurring payment of the recurring subscription, `Installment` - payment of the installment subscription. + * @type {string} + * @memberof PaymentResponse200AllOfDataInner + */ + 'payment_type'?: PaymentResponse200AllOfDataInnerPaymentTypeConst; + /** + * The description of the payment + * @type {string} + * @memberof PaymentResponse200AllOfDataInner + */ + 'description'?: string; + /** + * The creation time of the payment + * @type {string} + * @memberof PaymentResponse200AllOfDataInner + */ + 'add_time'?: string; + /** + * The update time of the payment + * @type {string} + * @memberof PaymentResponse200AllOfDataInner + */ + 'update_time'?: string; +} + +export const PaymentResponse200AllOfDataInnerRevenueMovementTypeConst = { + new: 'new', + recurring: 'recurring', + expansion: 'expansion', + contraction: 'contraction', + none: 'none', + churn: 'churn' +} as const; + +export type PaymentResponse200AllOfDataInnerRevenueMovementTypeConst = typeof PaymentResponse200AllOfDataInnerRevenueMovementTypeConst[keyof typeof PaymentResponse200AllOfDataInnerRevenueMovementTypeConst]; +export const PaymentResponse200AllOfDataInnerPaymentTypeConst = { + recurring: 'recurring', + additional: 'additional', + installment: 'installment' +} as const; + +export type PaymentResponse200AllOfDataInnerPaymentTypeConst = typeof PaymentResponse200AllOfDataInnerPaymentTypeConst[keyof typeof PaymentResponse200AllOfDataInnerPaymentTypeConst]; + + diff --git a/models/payment-response200-all-of.ts b/models/payment-response200-all-of.ts new file mode 100644 index 00000000..66135ff2 --- /dev/null +++ b/models/payment-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { PaymentResponse200AllOfDataInner } from './payment-response200-all-of-data-inner'; + +/** + * + * @export + * @interface PaymentResponse200AllOf + */ +export interface PaymentResponse200AllOf { + /** + * + * @type {Array} + * @memberof PaymentResponse200AllOf + */ + 'data'?: Array; +} + diff --git a/models/payment-response200.ts b/models/payment-response200.ts new file mode 100644 index 00000000..16118c5d --- /dev/null +++ b/models/payment-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { PaymentResponse200AllOf } from './payment-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { PaymentResponse200AllOfDataInner } from './payment-response200-all-of-data-inner'; + +/** + * @type PaymentResponse200 + * @export + */ +export type PaymentResponse200 = BaseResponse & PaymentResponse200AllOf; + + diff --git a/models/person-count-and-email-info-all-of.ts b/models/person-count-and-email-info-all-of.ts new file mode 100644 index 00000000..400f9e37 --- /dev/null +++ b/models/person-count-and-email-info-all-of.ts @@ -0,0 +1,66 @@ +/* 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 + * @interface PersonCountAndEmailInfoAllOf + */ +export interface PersonCountAndEmailInfoAllOf { + /** + * The count of email messages related to the person + * @type {number} + * @memberof PersonCountAndEmailInfoAllOf + */ + 'email_messages_count'?: number; + /** + * The count of activities related to the person + * @type {number} + * @memberof PersonCountAndEmailInfoAllOf + */ + 'activities_count'?: number; + /** + * The count of done activities related to the person + * @type {number} + * @memberof PersonCountAndEmailInfoAllOf + */ + 'done_activities_count'?: number; + /** + * The count of undone activities related to the person + * @type {number} + * @memberof PersonCountAndEmailInfoAllOf + */ + 'undone_activities_count'?: number; + /** + * The count of files related to the person + * @type {number} + * @memberof PersonCountAndEmailInfoAllOf + */ + 'files_count'?: number; + /** + * The count of notes related to the person + * @type {number} + * @memberof PersonCountAndEmailInfoAllOf + */ + 'notes_count'?: number; + /** + * The count of followers related to the person + * @type {number} + * @memberof PersonCountAndEmailInfoAllOf + */ + 'followers_count'?: number; +} + diff --git a/models/person-count-and-email-info-all-of1.ts b/models/person-count-and-email-info-all-of1.ts new file mode 100644 index 00000000..dabb09e6 --- /dev/null +++ b/models/person-count-and-email-info-all-of1.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface PersonCountAndEmailInfoAllOf1 + */ +export interface PersonCountAndEmailInfoAllOf1 { + /** + * The date and time of the last incoming email associated with the person + * @type {string} + * @memberof PersonCountAndEmailInfoAllOf1 + */ + 'last_incoming_mail_time'?: string; + /** + * The date and time of the last outgoing email associated with the person + * @type {string} + * @memberof PersonCountAndEmailInfoAllOf1 + */ + 'last_outgoing_mail_time'?: string; +} + diff --git a/models/person-count-and-email-info.ts b/models/person-count-and-email-info.ts new file mode 100644 index 00000000..bf401fe5 --- /dev/null +++ b/models/person-count-and-email-info.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { PersonCountAndEmailInfoAllOf } from './person-count-and-email-info-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonCountAndEmailInfoAllOf1 } from './person-count-and-email-info-all-of1'; + +/** + * @type PersonCountAndEmailInfo + * @export + */ +export type PersonCountAndEmailInfo = PersonCountAndEmailInfoAllOf & PersonCountAndEmailInfoAllOf1; + + diff --git a/models/person-count-email-deal-and-activity-info.ts b/models/person-count-email-deal-and-activity-info.ts new file mode 100644 index 00000000..583d8624 --- /dev/null +++ b/models/person-count-email-deal-and-activity-info.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { DealCountAndActivityInfo } from './deal-count-and-activity-info'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonCountAndEmailInfo } from './person-count-and-email-info'; + +/** + * @type PersonCountEmailDealAndActivityInfo + * @export + */ +export type PersonCountEmailDealAndActivityInfo = DealCountAndActivityInfo & PersonCountAndEmailInfo; + + diff --git a/models/person-item-all-of-email-inner.ts b/models/person-item-all-of-email-inner.ts new file mode 100644 index 00000000..8010ac46 --- /dev/null +++ b/models/person-item-all-of-email-inner.ts @@ -0,0 +1,42 @@ +/* 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 + * @interface PersonItemAllOfEmailInner + */ +export interface PersonItemAllOfEmailInner { + /** + * Email + * @type {string} + * @memberof PersonItemAllOfEmailInner + */ + 'value'?: string; + /** + * Boolean that indicates if email is primary for the person or not + * @type {boolean} + * @memberof PersonItemAllOfEmailInner + */ + 'primary'?: boolean; + /** + * The label that indicates the type of the email. (Possible values - work, home or other) + * @type {string} + * @memberof PersonItemAllOfEmailInner + */ + 'label'?: string; +} + diff --git a/models/person-item-all-of-phone-inner.ts b/models/person-item-all-of-phone-inner.ts new file mode 100644 index 00000000..aaa4c2a2 --- /dev/null +++ b/models/person-item-all-of-phone-inner.ts @@ -0,0 +1,42 @@ +/* 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 + * @interface PersonItemAllOfPhoneInner + */ +export interface PersonItemAllOfPhoneInner { + /** + * The phone number + * @type {string} + * @memberof PersonItemAllOfPhoneInner + */ + 'value'?: string; + /** + * Boolean that indicates if phone number is primary for the person or not + * @type {boolean} + * @memberof PersonItemAllOfPhoneInner + */ + 'primary'?: boolean; + /** + * The label that indicates the type of the phone number. (Possible values - work, home, mobile or other) + * @type {string} + * @memberof PersonItemAllOfPhoneInner + */ + 'label'?: string; +} + diff --git a/models/person-item-all-of-picture-id-all-of.ts b/models/person-item-all-of-picture-id-all-of.ts new file mode 100644 index 00000000..cac130a6 --- /dev/null +++ b/models/person-item-all-of-picture-id-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface PersonItemAllOfPictureIdAllOf + */ +export interface PersonItemAllOfPictureIdAllOf { + /** + * The ID of the picture associated with the item + * @type {number} + * @memberof PersonItemAllOfPictureIdAllOf + */ + 'id'?: number; +} + diff --git a/models/person-item-all-of-picture-id-all-of1-pictures.ts b/models/person-item-all-of-picture-id-all-of1-pictures.ts new file mode 100644 index 00000000..59838b2b --- /dev/null +++ b/models/person-item-all-of-picture-id-all-of1-pictures.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface PersonItemAllOfPictureIdAllOf1Pictures + */ +export interface PersonItemAllOfPictureIdAllOf1Pictures { + /** + * The URL of the 128*128 picture + * @type {string} + * @memberof PersonItemAllOfPictureIdAllOf1Pictures + */ + '128'?: string; + /** + * The URL of the 512*512 picture + * @type {string} + * @memberof PersonItemAllOfPictureIdAllOf1Pictures + */ + '512'?: string; +} + diff --git a/models/person-item-all-of-picture-id-all-of1.ts b/models/person-item-all-of-picture-id-all-of1.ts new file mode 100644 index 00000000..8dd7c3b7 --- /dev/null +++ b/models/person-item-all-of-picture-id-all-of1.ts @@ -0,0 +1,69 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOfPictureIdAllOf1Pictures } from './person-item-all-of-picture-id-all-of1-pictures'; + +/** + * + * @export + * @interface PersonItemAllOfPictureIdAllOf1 + */ +export interface PersonItemAllOfPictureIdAllOf1 { + /** + * The type of item the picture is related to + * @type {string} + * @memberof PersonItemAllOfPictureIdAllOf1 + */ + 'item_type'?: string; + /** + * The ID of related item + * @type {number} + * @memberof PersonItemAllOfPictureIdAllOf1 + */ + 'item_id'?: number; + /** + * Whether the associated picture is active or not + * @type {boolean} + * @memberof PersonItemAllOfPictureIdAllOf1 + */ + 'active_flag'?: boolean; + /** + * The add time of the picture + * @type {string} + * @memberof PersonItemAllOfPictureIdAllOf1 + */ + 'add_time'?: string; + /** + * The update time of the picture + * @type {string} + * @memberof PersonItemAllOfPictureIdAllOf1 + */ + 'update_time'?: string; + /** + * The ID of the user who added the picture + * @type {number} + * @memberof PersonItemAllOfPictureIdAllOf1 + */ + 'added_by_user_id'?: number; + /** + * + * @type {PersonItemAllOfPictureIdAllOf1Pictures} + * @memberof PersonItemAllOfPictureIdAllOf1 + */ + 'pictures'?: PersonItemAllOfPictureIdAllOf1Pictures; +} + diff --git a/models/person-item-all-of-picture-id.ts b/models/person-item-all-of-picture-id.ts new file mode 100644 index 00000000..9e58bc3c --- /dev/null +++ b/models/person-item-all-of-picture-id.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOfPictureIdAllOf } from './person-item-all-of-picture-id-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOfPictureIdAllOf1 } from './person-item-all-of-picture-id-all-of1'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOfPictureIdAllOf1Pictures } from './person-item-all-of-picture-id-all-of1-pictures'; + +/** + * @type PersonItemAllOfPictureId + * @export + */ +export type PersonItemAllOfPictureId = PersonItemAllOfPictureIdAllOf & PersonItemAllOfPictureIdAllOf1; + + diff --git a/models/person-item-all-of.ts b/models/person-item-all-of.ts new file mode 100644 index 00000000..0c36fd66 --- /dev/null +++ b/models/person-item-all-of.ts @@ -0,0 +1,117 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOfEmailInner } from './person-item-all-of-email-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOfPhoneInner } from './person-item-all-of-phone-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOfPictureId } from './person-item-all-of-picture-id'; + +/** + * + * @export + * @interface PersonItemAllOf + */ +export interface PersonItemAllOf { + /** + * The ID of the person + * @type {number} + * @memberof PersonItemAllOf + */ + 'id'?: number; + /** + * The ID of the company related to the person + * @type {number} + * @memberof PersonItemAllOf + */ + 'company_id'?: number; + /** + * Whether the person is active or not + * @type {boolean} + * @memberof PersonItemAllOf + */ + 'active_flag'?: boolean; + /** + * A phone number supplied as a string or an array of phone objects related to the person. The structure of the array is as follows: `[{ \"value\": \"12345\", \"primary\": \"true\", \"label\": \"mobile\" }]`. Please note that only `value` is required. + * @type {Array} + * @memberof PersonItemAllOf + */ + 'phone'?: Array; + /** + * An email address as a string or an array of email objects related to the person. The structure of the array is as follows: `[{ \"value\": \"mail@example.com\", \"primary\": \"true\", \"label\": \"main\" } ]`. Please note that only `value` is required. + * @type {Array} + * @memberof PersonItemAllOf + */ + 'email'?: Array; + /** + * The first letter of the name of the person + * @type {string} + * @memberof PersonItemAllOf + */ + 'first_char'?: string; + /** + * The date and time when the person was added/created. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof PersonItemAllOf + */ + 'add_time'?: string; + /** + * The last updated date and time of the person. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof PersonItemAllOf + */ + 'update_time'?: string; + /** + * The visibility group ID of who can see the person + * @type {string} + * @memberof PersonItemAllOf + */ + 'visible_to'?: string; + /** + * + * @type {PersonItemAllOfPictureId} + * @memberof PersonItemAllOf + */ + 'picture_id'?: PersonItemAllOfPictureId; + /** + * The label assigned to the person + * @type {number} + * @memberof PersonItemAllOf + */ + 'label'?: number; + /** + * The name of the organization associated with the person + * @type {string} + * @memberof PersonItemAllOf + */ + 'org_name'?: string; + /** + * The name of the owner associated with the person + * @type {string} + * @memberof PersonItemAllOf + */ + 'owner_name'?: string; + /** + * The BCC email associated with the person + * @type {string} + * @memberof PersonItemAllOf + */ + 'cc_email'?: string; +} + diff --git a/models/person-item.ts b/models/person-item.ts new file mode 100644 index 00000000..994932a2 --- /dev/null +++ b/models/person-item.ts @@ -0,0 +1,44 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AdditionalPersonInfo } from './additional-person-info'; +// May contain unused imports in some cases +// @ts-ignore +import { Owner } from './owner'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOf } from './person-item-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOfEmailInner } from './person-item-all-of-email-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOfPhoneInner } from './person-item-all-of-phone-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOfPictureId } from './person-item-all-of-picture-id'; +// May contain unused imports in some cases +// @ts-ignore +import { RelationshipOrganizationInfoItemWithActiveFlag } from './relationship-organization-info-item-with-active-flag'; + +/** + * @type PersonItem + * @export + */ +export type PersonItem = AdditionalPersonInfo & PersonItemAllOf; + + diff --git a/models/person-name-count-and-email-info-with-ids-all-of.ts b/models/person-name-count-and-email-info-with-ids-all-of.ts new file mode 100644 index 00000000..8156d668 --- /dev/null +++ b/models/person-name-count-and-email-info-with-ids-all-of.ts @@ -0,0 +1,42 @@ +/* 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 + * @interface PersonNameCountAndEmailInfoWithIdsAllOf + */ +export interface PersonNameCountAndEmailInfoWithIdsAllOf { + /** + * The ID of the owner related to the person + * @type {number} + * @memberof PersonNameCountAndEmailInfoWithIdsAllOf + */ + 'owner_id'?: number; + /** + * The ID of the organization related to the person + * @type {number} + * @memberof PersonNameCountAndEmailInfoWithIdsAllOf + */ + 'org_id'?: number; + /** + * The ID of the person with what the main person was merged + * @type {number} + * @memberof PersonNameCountAndEmailInfoWithIdsAllOf + */ + 'merge_what_id'?: number; +} + diff --git a/models/person-name-count-and-email-info-with-ids.ts b/models/person-name-count-and-email-info-with-ids.ts new file mode 100644 index 00000000..b54c084e --- /dev/null +++ b/models/person-name-count-and-email-info-with-ids.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { PersonNameCountAndEmailInfo } from './person-name-count-and-email-info'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonNameCountAndEmailInfoWithIdsAllOf } from './person-name-count-and-email-info-with-ids-all-of'; + +/** + * @type PersonNameCountAndEmailInfoWithIds + * @export + */ +export type PersonNameCountAndEmailInfoWithIds = PersonNameCountAndEmailInfo & PersonNameCountAndEmailInfoWithIdsAllOf; + + diff --git a/models/person-name-count-and-email-info.ts b/models/person-name-count-and-email-info.ts new file mode 100644 index 00000000..be9c18d2 --- /dev/null +++ b/models/person-name-count-and-email-info.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { PersonCountAndEmailInfo } from './person-count-and-email-info'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonNameInfoWithOrgAndOwnerIdAllOf1 } from './person-name-info-with-org-and-owner-id-all-of1'; + +/** + * @type PersonNameCountAndEmailInfo + * @export + */ +export type PersonNameCountAndEmailInfo = PersonCountAndEmailInfo & PersonNameInfoWithOrgAndOwnerIdAllOf1; + + diff --git a/models/person-name-info-with-org-and-owner-id-all-of.ts b/models/person-name-info-with-org-and-owner-id-all-of.ts new file mode 100644 index 00000000..f4aaeb19 --- /dev/null +++ b/models/person-name-info-with-org-and-owner-id-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { Owner } from './owner'; +// May contain unused imports in some cases +// @ts-ignore +import { RelationshipOrganizationInfoItemWithActiveFlag } from './relationship-organization-info-item-with-active-flag'; + +/** + * + * @export + * @interface PersonNameInfoWithOrgAndOwnerIdAllOf + */ +export interface PersonNameInfoWithOrgAndOwnerIdAllOf { + /** + * + * @type {Owner} + * @memberof PersonNameInfoWithOrgAndOwnerIdAllOf + */ + 'owner_id'?: Owner; + /** + * + * @type {RelationshipOrganizationInfoItemWithActiveFlag} + * @memberof PersonNameInfoWithOrgAndOwnerIdAllOf + */ + 'org_id'?: RelationshipOrganizationInfoItemWithActiveFlag; +} + diff --git a/models/person-name-info-with-org-and-owner-id-all-of1.ts b/models/person-name-info-with-org-and-owner-id-all-of1.ts new file mode 100644 index 00000000..53bfefc4 --- /dev/null +++ b/models/person-name-info-with-org-and-owner-id-all-of1.ts @@ -0,0 +1,42 @@ +/* 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 + * @interface PersonNameInfoWithOrgAndOwnerIdAllOf1 + */ +export interface PersonNameInfoWithOrgAndOwnerIdAllOf1 { + /** + * The name of the person + * @type {string} + * @memberof PersonNameInfoWithOrgAndOwnerIdAllOf1 + */ + 'name'?: string; + /** + * The first name of the person + * @type {string} + * @memberof PersonNameInfoWithOrgAndOwnerIdAllOf1 + */ + 'first_name'?: string; + /** + * The last name of the person + * @type {string} + * @memberof PersonNameInfoWithOrgAndOwnerIdAllOf1 + */ + 'last_name'?: string; +} + diff --git a/models/person-name-info-with-org-and-owner-id.ts b/models/person-name-info-with-org-and-owner-id.ts new file mode 100644 index 00000000..92a7fa46 --- /dev/null +++ b/models/person-name-info-with-org-and-owner-id.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { Owner } from './owner'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonNameInfoWithOrgAndOwnerIdAllOf } from './person-name-info-with-org-and-owner-id-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonNameInfoWithOrgAndOwnerIdAllOf1 } from './person-name-info-with-org-and-owner-id-all-of1'; +// May contain unused imports in some cases +// @ts-ignore +import { RelationshipOrganizationInfoItemWithActiveFlag } from './relationship-organization-info-item-with-active-flag'; + +/** + * @type PersonNameInfoWithOrgAndOwnerId + * @export + */ +export type PersonNameInfoWithOrgAndOwnerId = PersonNameInfoWithOrgAndOwnerIdAllOf & PersonNameInfoWithOrgAndOwnerIdAllOf1; + + diff --git a/models/persons-collection-response-object.ts b/models/persons-collection-response-object.ts new file mode 100644 index 00000000..76d81299 --- /dev/null +++ b/models/persons-collection-response-object.ts @@ -0,0 +1,114 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BasicPersonRequestEmailInner } from './basic-person-request-email-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOfPhoneInner } from './person-item-all-of-phone-inner'; + +/** + * + * @export + * @interface PersonsCollectionResponseObject + */ +export interface PersonsCollectionResponseObject { + /** + * The ID of the person + * @type {number} + * @memberof PersonsCollectionResponseObject + */ + 'id'?: number; + /** + * Whether the person is active or not + * @type {boolean} + * @memberof PersonsCollectionResponseObject + */ + 'active_flag'?: boolean; + /** + * The ID of the owner related to the person + * @type {number} + * @memberof PersonsCollectionResponseObject + */ + 'owner_id'?: number; + /** + * The ID of the organization related to the person + * @type {number} + * @memberof PersonsCollectionResponseObject + */ + 'org_id'?: number; + /** + * The name of the person + * @type {string} + * @memberof PersonsCollectionResponseObject + */ + 'name'?: string; + /** + * An email address as a string or an array of email objects related to the person. The structure of the array is as follows: `[{ \"value\": \"mail@example.com\", \"primary\": \"true\", \"label\": \"main\" }]`. Please note that only `value` is required. + * @type {Array} + * @memberof PersonsCollectionResponseObject + */ + 'email'?: Array; + /** + * A phone number supplied as a string or an array of phone objects related to the person. The structure of the array is as follows: `[{ \"value\": \"12345\", \"primary\": \"true\", \"label\": \"mobile\" }]`. Please note that only `value` is required. + * @type {Array} + * @memberof PersonsCollectionResponseObject + */ + 'phone'?: Array; + /** + * The last updated date and time of the person. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof PersonsCollectionResponseObject + */ + 'update_time'?: string; + /** + * The date and time this person was deleted. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof PersonsCollectionResponseObject + */ + 'delete_time'?: string | null; + /** + * The date and time when the person was added/created. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof PersonsCollectionResponseObject + */ + 'add_time'?: string; + /** + * The visibility group ID of who can see the person + * @type {string} + * @memberof PersonsCollectionResponseObject + */ + 'visible_to'?: string; + /** + * The ID of the picture associated with the item + * @type {number} + * @memberof PersonsCollectionResponseObject + */ + 'picture_id'?: number | null; + /** + * The label assigned to the person + * @type {number} + * @memberof PersonsCollectionResponseObject + */ + 'label'?: number | null; + /** + * The BCC email associated with the person + * @type {string} + * @memberof PersonsCollectionResponseObject + */ + 'cc_email'?: string; +} + diff --git a/models/pipeline-details-all-of-deals-summary-per-currency-full-currencyid.ts b/models/pipeline-details-all-of-deals-summary-per-currency-full-currencyid.ts new file mode 100644 index 00000000..d8ee9809 --- /dev/null +++ b/models/pipeline-details-all-of-deals-summary-per-currency-full-currencyid.ts @@ -0,0 +1,36 @@ +/* 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. + */ + + + +/** + * The currency summary. This parameter is dynamic and changes according to `currency_id` value. + * @export + * @interface PipelineDetailsAllOfDealsSummaryPerCurrencyFullCURRENCYID + */ +export interface PipelineDetailsAllOfDealsSummaryPerCurrencyFullCURRENCYID { + /** + * Deals count per currency + * @type {number} + * @memberof PipelineDetailsAllOfDealsSummaryPerCurrencyFullCURRENCYID + */ + 'count'?: number; + /** + * Deals value per currency + * @type {number} + * @memberof PipelineDetailsAllOfDealsSummaryPerCurrencyFullCURRENCYID + */ + 'value'?: number; +} + diff --git a/models/pipeline-details-all-of-deals-summary-per-currency-full.ts b/models/pipeline-details-all-of-deals-summary-per-currency-full.ts new file mode 100644 index 00000000..4e400fc0 --- /dev/null +++ b/models/pipeline-details-all-of-deals-summary-per-currency-full.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { PipelineDetailsAllOfDealsSummaryPerCurrencyFullCURRENCYID } from './pipeline-details-all-of-deals-summary-per-currency-full-currencyid'; + +/** + * Full currency summaries + * @export + * @interface PipelineDetailsAllOfDealsSummaryPerCurrencyFull + */ +export interface PipelineDetailsAllOfDealsSummaryPerCurrencyFull { + /** + * + * @type {PipelineDetailsAllOfDealsSummaryPerCurrencyFullCURRENCYID} + * @memberof PipelineDetailsAllOfDealsSummaryPerCurrencyFull + */ + 'CURRENCY_ID'?: PipelineDetailsAllOfDealsSummaryPerCurrencyFullCURRENCYID; +} + diff --git a/models/pipeline-details-all-of-deals-summary-per-currency.ts b/models/pipeline-details-all-of-deals-summary-per-currency.ts new file mode 100644 index 00000000..312b0db5 --- /dev/null +++ b/models/pipeline-details-all-of-deals-summary-per-currency.ts @@ -0,0 +1,30 @@ +/* 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. + */ + + + +/** + * The currency count summary + * @export + * @interface PipelineDetailsAllOfDealsSummaryPerCurrency + */ +export interface PipelineDetailsAllOfDealsSummaryPerCurrency { + /** + * Deals count per currency. This parameter is dynamic and changes according to `currency_id` value. + * @type {number} + * @memberof PipelineDetailsAllOfDealsSummaryPerCurrency + */ + 'CURRENCY_ID'?: number; +} + diff --git a/models/pipeline-details-all-of-deals-summary-per-stages-stageid.ts b/models/pipeline-details-all-of-deals-summary-per-stages-stageid.ts new file mode 100644 index 00000000..204c9857 --- /dev/null +++ b/models/pipeline-details-all-of-deals-summary-per-stages-stageid.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { PipelineDetailsAllOfDealsSummaryPerStagesSTAGEIDCURRENCYID } from './pipeline-details-all-of-deals-summary-per-stages-stageidcurrencyid'; + +/** + * The currency summaries per stage. This parameter is dynamic and changes according to `stage_id` value. + * @export + * @interface PipelineDetailsAllOfDealsSummaryPerStagesSTAGEID + */ +export interface PipelineDetailsAllOfDealsSummaryPerStagesSTAGEID { + /** + * + * @type {PipelineDetailsAllOfDealsSummaryPerStagesSTAGEIDCURRENCYID} + * @memberof PipelineDetailsAllOfDealsSummaryPerStagesSTAGEID + */ + 'CURRENCY_ID'?: PipelineDetailsAllOfDealsSummaryPerStagesSTAGEIDCURRENCYID; +} + diff --git a/models/pipeline-details-all-of-deals-summary-per-stages-stageidcurrencyid.ts b/models/pipeline-details-all-of-deals-summary-per-stages-stageidcurrencyid.ts new file mode 100644 index 00000000..20059def --- /dev/null +++ b/models/pipeline-details-all-of-deals-summary-per-stages-stageidcurrencyid.ts @@ -0,0 +1,54 @@ +/* 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. + */ + + + +/** + * The currency summary. This parameter is dynamic and changes according to `currency_id` value. + * @export + * @interface PipelineDetailsAllOfDealsSummaryPerStagesSTAGEIDCURRENCYID + */ +export interface PipelineDetailsAllOfDealsSummaryPerStagesSTAGEIDCURRENCYID { + /** + * Deals count per currency + * @type {number} + * @memberof PipelineDetailsAllOfDealsSummaryPerStagesSTAGEIDCURRENCYID + */ + 'count'?: number; + /** + * Deals value per currency + * @type {number} + * @memberof PipelineDetailsAllOfDealsSummaryPerStagesSTAGEIDCURRENCYID + */ + 'value'?: number; + /** + * Deals value formatted per currency + * @type {string} + * @memberof PipelineDetailsAllOfDealsSummaryPerStagesSTAGEIDCURRENCYID + */ + 'value_formatted'?: string; + /** + * Deals weighted value per currency + * @type {number} + * @memberof PipelineDetailsAllOfDealsSummaryPerStagesSTAGEIDCURRENCYID + */ + 'weighted_value'?: number; + /** + * Deals weighted value formatted per currency + * @type {string} + * @memberof PipelineDetailsAllOfDealsSummaryPerStagesSTAGEIDCURRENCYID + */ + 'weighted_value_formatted'?: string; +} + diff --git a/models/pipeline-details-all-of-deals-summary-per-stages.ts b/models/pipeline-details-all-of-deals-summary-per-stages.ts new file mode 100644 index 00000000..2a56123c --- /dev/null +++ b/models/pipeline-details-all-of-deals-summary-per-stages.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { PipelineDetailsAllOfDealsSummaryPerStagesSTAGEID } from './pipeline-details-all-of-deals-summary-per-stages-stageid'; + +/** + * The stage objects containing deals currency information + * @export + * @interface PipelineDetailsAllOfDealsSummaryPerStages + */ +export interface PipelineDetailsAllOfDealsSummaryPerStages { + /** + * + * @type {PipelineDetailsAllOfDealsSummaryPerStagesSTAGEID} + * @memberof PipelineDetailsAllOfDealsSummaryPerStages + */ + 'STAGE_ID'?: PipelineDetailsAllOfDealsSummaryPerStagesSTAGEID; +} + diff --git a/models/pipeline-details-all-of-deals-summary.ts b/models/pipeline-details-all-of-deals-summary.ts new file mode 100644 index 00000000..eddca5e8 --- /dev/null +++ b/models/pipeline-details-all-of-deals-summary.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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { PipelineDetailsAllOfDealsSummaryPerCurrency } from './pipeline-details-all-of-deals-summary-per-currency'; +// May contain unused imports in some cases +// @ts-ignore +import { PipelineDetailsAllOfDealsSummaryPerCurrencyFull } from './pipeline-details-all-of-deals-summary-per-currency-full'; +// May contain unused imports in some cases +// @ts-ignore +import { PipelineDetailsAllOfDealsSummaryPerStages } from './pipeline-details-all-of-deals-summary-per-stages'; + +/** + * Deals summary + * @export + * @interface PipelineDetailsAllOfDealsSummary + */ +export interface PipelineDetailsAllOfDealsSummary { + /** + * + * @type {PipelineDetailsAllOfDealsSummaryPerStages} + * @memberof PipelineDetailsAllOfDealsSummary + */ + 'per_stages'?: PipelineDetailsAllOfDealsSummaryPerStages; + /** + * + * @type {PipelineDetailsAllOfDealsSummaryPerCurrency} + * @memberof PipelineDetailsAllOfDealsSummary + */ + 'per_currency'?: PipelineDetailsAllOfDealsSummaryPerCurrency; + /** + * Deals count + * @type {number} + * @memberof PipelineDetailsAllOfDealsSummary + */ + 'total_count'?: number; + /** + * + * @type {PipelineDetailsAllOfDealsSummaryPerCurrencyFull} + * @memberof PipelineDetailsAllOfDealsSummary + */ + 'per_currency_full'?: PipelineDetailsAllOfDealsSummaryPerCurrencyFull; +} + diff --git a/models/pipeline-details-all-of.ts b/models/pipeline-details-all-of.ts new file mode 100644 index 00000000..2a22276b --- /dev/null +++ b/models/pipeline-details-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { PipelineDetailsAllOfDealsSummary } from './pipeline-details-all-of-deals-summary'; + +/** + * + * @export + * @interface PipelineDetailsAllOf + */ +export interface PipelineDetailsAllOf { + /** + * + * @type {PipelineDetailsAllOfDealsSummary} + * @memberof PipelineDetailsAllOf + */ + 'deals_summary'?: PipelineDetailsAllOfDealsSummary; +} + diff --git a/models/pipeline-details.ts b/models/pipeline-details.ts new file mode 100644 index 00000000..1f0754d3 --- /dev/null +++ b/models/pipeline-details.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BasePipelineWithSelectedFlag } from './base-pipeline-with-selected-flag'; +// May contain unused imports in some cases +// @ts-ignore +import { PipelineDetailsAllOf } from './pipeline-details-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { PipelineDetailsAllOfDealsSummary } from './pipeline-details-all-of-deals-summary'; + +/** + * @type PipelineDetails + * The pipeline object + * @export + */ +export type PipelineDetails = BasePipelineWithSelectedFlag & PipelineDetailsAllOf; + + diff --git a/models/pipeline-request.ts b/models/pipeline-request.ts new file mode 100644 index 00000000..c9ff676b --- /dev/null +++ b/models/pipeline-request.ts @@ -0,0 +1,62 @@ +/* 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 + * @interface PipelineRequest + */ +export interface PipelineRequest { + /** + * The name of the pipeline + * @type {string} + * @memberof PipelineRequest + */ + 'name': string; + /** + * + * @type {number} + * @memberof PipelineRequest + */ + 'deal_probability'?: PipelineRequestDealProbabilityConst; + /** + * Defines the order of pipelines. First order (`order_nr=0`) is the default pipeline. + * @type {number} + * @memberof PipelineRequest + */ + 'order_nr'?: number; + /** + * + * @type {number} + * @memberof PipelineRequest + */ + 'active'?: PipelineRequestActiveConst; +} + +export const PipelineRequestDealProbabilityConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type PipelineRequestDealProbabilityConst = typeof PipelineRequestDealProbabilityConst[keyof typeof PipelineRequestDealProbabilityConst]; +export const PipelineRequestActiveConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type PipelineRequestActiveConst = typeof PipelineRequestActiveConst[keyof typeof PipelineRequestActiveConst]; + + diff --git a/models/pipeline-request1.ts b/models/pipeline-request1.ts new file mode 100644 index 00000000..4ee52df7 --- /dev/null +++ b/models/pipeline-request1.ts @@ -0,0 +1,62 @@ +/* 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 + * @interface PipelineRequest1 + */ +export interface PipelineRequest1 { + /** + * The name of the pipeline + * @type {string} + * @memberof PipelineRequest1 + */ + 'name'?: string; + /** + * + * @type {number} + * @memberof PipelineRequest1 + */ + 'deal_probability'?: PipelineRequest1DealProbabilityConst; + /** + * Defines the order of pipelines. First order (`order_nr=0`) is the default pipeline. + * @type {number} + * @memberof PipelineRequest1 + */ + 'order_nr'?: number; + /** + * + * @type {number} + * @memberof PipelineRequest1 + */ + 'active'?: PipelineRequest1ActiveConst; +} + +export const PipelineRequest1DealProbabilityConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type PipelineRequest1DealProbabilityConst = typeof PipelineRequest1DealProbabilityConst[keyof typeof PipelineRequest1DealProbabilityConst]; +export const PipelineRequest1ActiveConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type PipelineRequest1ActiveConst = typeof PipelineRequest1ActiveConst[keyof typeof PipelineRequest1ActiveConst]; + + diff --git a/models/post-filter-response200-all-of-data.ts b/models/post-filter-response200-all-of-data.ts new file mode 100644 index 00000000..a22cf998 --- /dev/null +++ b/models/post-filter-response200-all-of-data.ts @@ -0,0 +1,103 @@ +/* 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 + * @interface PostFilterResponse200AllOfData + */ +export interface PostFilterResponse200AllOfData { + /** + * The ID of the created filter + * @type {number} + * @memberof PostFilterResponse200AllOfData + */ + 'id'?: number; + /** + * The name of the created filter + * @type {string} + * @memberof PostFilterResponse200AllOfData + */ + 'name'?: string; + /** + * The activity flag of the created filter + * @type {boolean} + * @memberof PostFilterResponse200AllOfData + */ + 'active_flag'?: boolean; + /** + * + * @type {string} + * @memberof PostFilterResponse200AllOfData + */ + 'type'?: PostFilterResponse200AllOfDataTypeConst; + /** + * If the created filter is temporary or not + * @type {boolean} + * @memberof PostFilterResponse200AllOfData + */ + 'temporary_flag'?: boolean; + /** + * The user ID of the created filter + * @type {number} + * @memberof PostFilterResponse200AllOfData + */ + 'user_id'?: number; + /** + * The add time of the created filter + * @type {string} + * @memberof PostFilterResponse200AllOfData + */ + 'add_time'?: string; + /** + * The update time of the created filter + * @type {string} + * @memberof PostFilterResponse200AllOfData + */ + 'update_time'?: string; + /** + * The visibility group ID of the created filter + * @type {number} + * @memberof PostFilterResponse200AllOfData + */ + 'visible_to'?: number; + /** + * The custom view ID of the created filter + * @type {number} + * @memberof PostFilterResponse200AllOfData + */ + 'custom_view_id'?: number; + /** + * The created filter conditions object + * @type {object} + * @memberof PostFilterResponse200AllOfData + */ + 'conditions'?: object; +} + +export const PostFilterResponse200AllOfDataTypeConst = { + deals: 'deals', + leads: 'leads', + org: 'org', + people: 'people', + products: 'products', + activity: 'activity', + projects: 'projects' +} as const; + +export type PostFilterResponse200AllOfDataTypeConst = typeof PostFilterResponse200AllOfDataTypeConst[keyof typeof PostFilterResponse200AllOfDataTypeConst]; + + diff --git a/models/post-filter-response200-all-of.ts b/models/post-filter-response200-all-of.ts new file mode 100644 index 00000000..0c243c4e --- /dev/null +++ b/models/post-filter-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { PostFilterResponse200AllOfData } from './post-filter-response200-all-of-data'; + +/** + * + * @export + * @interface PostFilterResponse200AllOf + */ +export interface PostFilterResponse200AllOf { + /** + * + * @type {PostFilterResponse200AllOfData} + * @memberof PostFilterResponse200AllOf + */ + 'data'?: PostFilterResponse200AllOfData; +} + diff --git a/models/post-filter-response200.ts b/models/post-filter-response200.ts new file mode 100644 index 00000000..74d69100 --- /dev/null +++ b/models/post-filter-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { PostFilterResponse200AllOf } from './post-filter-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { PostFilterResponse200AllOfData } from './post-filter-response200-all-of-data'; + +/** + * @type PostFilterResponse200 + * @export + */ +export type PostFilterResponse200 = BaseResponse & PostFilterResponse200AllOf; + + diff --git a/models/product-field-all-of.ts b/models/product-field-all-of.ts new file mode 100644 index 00000000..b380460b --- /dev/null +++ b/models/product-field-all-of.ts @@ -0,0 +1,64 @@ +/* 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 + * @interface ProductFieldAllOf + */ +export interface ProductFieldAllOf { + /** + * The name of the field + * @type {string} + * @memberof ProductFieldAllOf + */ + 'name': string; + /** + * The type of the field
ValueDescription
`varchar`Text (up to 255 characters)
`varchar_auto`Autocomplete text (up to 255 characters)
`text`Long text (up to 65k characters)
`double`Numeric value
`monetary`Monetary field (has a numeric value and a currency value)
`date`Date (format YYYY-MM-DD)
`set`Options field with a possibility of having multiple chosen options
`enum`Options field with a single possible chosen option
`user`User field (contains a user ID of another Pipedrive user)
`org`Organization field (contains an organization ID which is stored on the same account)
`people`Person field (contains a product ID which is stored on the same account)
`phone`Phone field (up to 255 numbers and/or characters)
`time`Time field (format HH:MM:SS)
`timerange`Time-range field (has a start time and end time value, both HH:MM:SS)
`daterange`Date-range field (has a start date and end date value, both YYYY-MM-DD)
`address`Address field (autocompleted by Google Maps)
+ * @type {string} + * @memberof ProductFieldAllOf + */ + 'field_type': ProductFieldAllOfFieldTypeConst; + /** + * When `field_type` is either `set` or `enum`, possible options must be supplied as a JSON-encoded sequential array, for example:
`[{\"label\":\"red\"}, {\"label\":\"blue\"}, {\"label\":\"lilac\"}]` + * @type {Array} + * @memberof ProductFieldAllOf + */ + 'options'?: Array; +} + +export const ProductFieldAllOfFieldTypeConst = { + varchar: 'varchar', + varchar_auto: 'varchar_auto', + text: 'text', + double: 'double', + monetary: 'monetary', + date: 'date', + set: 'set', + enum: 'enum', + user: 'user', + org: 'org', + people: 'people', + phone: 'phone', + time: 'time', + timerange: 'timerange', + daterange: 'daterange', + address: 'address' +} as const; + +export type ProductFieldAllOfFieldTypeConst = typeof ProductFieldAllOfFieldTypeConst[keyof typeof ProductFieldAllOfFieldTypeConst]; + + diff --git a/models/product-field-all-of1.ts b/models/product-field-all-of1.ts new file mode 100644 index 00000000..9551e9db --- /dev/null +++ b/models/product-field-all-of1.ts @@ -0,0 +1,114 @@ +/* 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 + * @interface ProductFieldAllOf1 + */ +export interface ProductFieldAllOf1 { + /** + * The ID of the product field + * @type {number} + * @memberof ProductFieldAllOf1 + */ + 'id'?: number; + /** + * The key of the product field + * @type {string} + * @memberof ProductFieldAllOf1 + */ + 'key'?: string; + /** + * The position (index) of the product field in the detail view + * @type {number} + * @memberof ProductFieldAllOf1 + */ + 'order_nr'?: number; + /** + * The product field creation time. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof ProductFieldAllOf1 + */ + 'add_time'?: string; + /** + * The product field last update time. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof ProductFieldAllOf1 + */ + 'update_time'?: string; + /** + * The ID of the last user to update the product field + * @type {number} + * @memberof ProductFieldAllOf1 + */ + 'last_updated_by_user_id'?: number; + /** + * Whether or not the product field is currently active + * @type {boolean} + * @memberof ProductFieldAllOf1 + */ + 'active_flag'?: boolean; + /** + * Whether or not the product field name and metadata is editable + * @type {boolean} + * @memberof ProductFieldAllOf1 + */ + 'edit_flag'?: boolean; + /** + * Whether or not the product field is visible in the Add Product Modal + * @type {boolean} + * @memberof ProductFieldAllOf1 + */ + 'add_visible_flag'?: boolean; + /** + * Whether or not the product field is marked as important + * @type {boolean} + * @memberof ProductFieldAllOf1 + */ + 'important_flag'?: boolean; + /** + * Whether or not the product field data can be edited + * @type {boolean} + * @memberof ProductFieldAllOf1 + */ + 'bulk_edit_allowed'?: boolean; + /** + * Whether or not the product field is searchable + * @type {boolean} + * @memberof ProductFieldAllOf1 + */ + 'searchable_flag'?: boolean; + /** + * Whether or not the product field value can be used when filtering searches + * @type {boolean} + * @memberof ProductFieldAllOf1 + */ + 'filtering_allowed'?: boolean; + /** + * Whether or not the product field is sortable + * @type {boolean} + * @memberof ProductFieldAllOf1 + */ + 'sortable_flag'?: boolean; + /** + * Whether or not the product field is mandatory when creating products + * @type {boolean} + * @memberof ProductFieldAllOf1 + */ + 'mandatory_flag'?: boolean; +} + diff --git a/models/product-field.ts b/models/product-field.ts new file mode 100644 index 00000000..3595dfaa --- /dev/null +++ b/models/product-field.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ProductFieldAllOf } from './product-field-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { ProductFieldAllOf1 } from './product-field-all-of1'; + +/** + * @type ProductField + * @export + */ +export type ProductField = ProductFieldAllOf & ProductFieldAllOf1; + + diff --git a/models/product-request.ts b/models/product-request.ts new file mode 100644 index 00000000..410930fd --- /dev/null +++ b/models/product-request.ts @@ -0,0 +1,82 @@ +/* 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 + * @interface ProductRequest + */ +export interface ProductRequest { + /** + * The product code + * @type {string} + * @memberof ProductRequest + */ + 'code'?: string; + /** + * The unit in which this product is sold + * @type {string} + * @memberof ProductRequest + */ + 'unit'?: string; + /** + * The tax percentage + * @type {number} + * @memberof ProductRequest + */ + 'tax'?: number; + /** + * Whether this product will be made active or not + * @type {boolean} + * @memberof ProductRequest + */ + 'active_flag'?: boolean; + /** + * Whether this product can be selected in deals or not + * @type {boolean} + * @memberof ProductRequest + */ + 'selectable'?: boolean; + /** + * + * @type {string} + * @memberof ProductRequest + */ + 'visible_to'?: ProductRequestVisibleToConst; + /** + * The ID of the user who will be marked as the owner of this product. When omitted, the authorized user ID will be used. + * @type {number} + * @memberof ProductRequest + */ + 'owner_id'?: number; + /** + * An array of objects, each containing: `currency` (string), `price` (number), `cost` (number, optional), `overhead_cost` (number, optional). Note that there can only be one price per product per currency. When `prices` is omitted altogether, a default price of 0 and a default currency based on the company\'s currency will be assigned. + * @type {Array} + * @memberof ProductRequest + */ + 'prices'?: Array; +} + +export const ProductRequestVisibleToConst = { + _1: '1', + _3: '3', + _5: '5', + _7: '7' +} as const; + +export type ProductRequestVisibleToConst = typeof ProductRequestVisibleToConst[keyof typeof ProductRequestVisibleToConst]; + + diff --git a/models/project-put-plan-item-body-object.ts b/models/project-put-plan-item-body-object.ts new file mode 100644 index 00000000..44cd56e3 --- /dev/null +++ b/models/project-put-plan-item-body-object.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface ProjectPutPlanItemBodyObject + */ +export interface ProjectPutPlanItemBodyObject { + /** + * The ID of a phase on a project board + * @type {number} + * @memberof ProjectPutPlanItemBodyObject + */ + 'phase_id'?: number; + /** + * The ID of a group on a project board + * @type {number} + * @memberof ProjectPutPlanItemBodyObject + */ + 'group_id'?: number; +} + diff --git a/models/project-response-object-all-of.ts b/models/project-response-object-all-of.ts new file mode 100644 index 00000000..65131c3a --- /dev/null +++ b/models/project-response-object-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface ProjectResponseObjectAllOf + */ +export interface ProjectResponseObjectAllOf { + /** + * The ID of the project, generated when the task was created + * @type {number} + * @memberof ProjectResponseObjectAllOf + */ + 'id'?: number; +} + diff --git a/models/project-response-object.ts b/models/project-response-object.ts new file mode 100644 index 00000000..ca2a1467 --- /dev/null +++ b/models/project-response-object.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FullProjectObject } from './full-project-object'; +// May contain unused imports in some cases +// @ts-ignore +import { ProjectResponseObjectAllOf } from './project-response-object-all-of'; + +/** + * @type ProjectResponseObject + * @export + */ +export type ProjectResponseObject = FullProjectObject & ProjectResponseObjectAllOf; + + diff --git a/models/put-role-pipelines-body.ts b/models/put-role-pipelines-body.ts new file mode 100644 index 00000000..a211396c --- /dev/null +++ b/models/put-role-pipelines-body.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface PutRolePipelinesBody + */ +export interface PutRolePipelinesBody { + /** + * The pipeline IDs to make the pipelines visible (add) and/or hidden (remove) for the specified role. It requires the following JSON structure: `{ \"add\": \"[1]\", \"remove\": \"[3, 4]\" }`. + * @type {object} + * @memberof PutRolePipelinesBody + */ + 'visible_pipeline_ids': object; +} + diff --git a/models/receive-message-request-attachments-inner.ts b/models/receive-message-request-attachments-inner.ts new file mode 100644 index 00000000..4d2fd6d0 --- /dev/null +++ b/models/receive-message-request-attachments-inner.ts @@ -0,0 +1,66 @@ +/* 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 + * @interface ReceiveMessageRequestAttachmentsInner + */ +export interface ReceiveMessageRequestAttachmentsInner { + /** + * The ID of the attachment + * @type {string} + * @memberof ReceiveMessageRequestAttachmentsInner + */ + 'id': string; + /** + * The mime-type of the attachment + * @type {string} + * @memberof ReceiveMessageRequestAttachmentsInner + */ + 'type': string; + /** + * A URL to the file + * @type {string} + * @memberof ReceiveMessageRequestAttachmentsInner + */ + 'url': string; + /** + * The name of the attachment + * @type {string} + * @memberof ReceiveMessageRequestAttachmentsInner + */ + 'name'?: string; + /** + * The size of the attachment + * @type {number} + * @memberof ReceiveMessageRequestAttachmentsInner + */ + 'size'?: number; + /** + * A URL to a preview picture of the file + * @type {string} + * @memberof ReceiveMessageRequestAttachmentsInner + */ + 'preview_url'?: string; + /** + * If true, it will use the getMessageById endpoint for fetching updated attachment\'s urls. Find out more [here](https://pipedrive.readme.io/docs/implementing-messaging-app-extension) + * @type {boolean} + * @memberof ReceiveMessageRequestAttachmentsInner + */ + 'link_expires'?: boolean; +} + diff --git a/models/receive-message-request.ts b/models/receive-message-request.ts new file mode 100644 index 00000000..3ffd126d --- /dev/null +++ b/models/receive-message-request.ts @@ -0,0 +1,97 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ReceiveMessageRequestAttachmentsInner } from './receive-message-request-attachments-inner'; + +/** + * + * @export + * @interface ReceiveMessageRequest + */ +export interface ReceiveMessageRequest { + /** + * The ID of the message + * @type {string} + * @memberof ReceiveMessageRequest + */ + 'id': string; + /** + * The channel ID as in the provider + * @type {string} + * @memberof ReceiveMessageRequest + */ + 'channel_id': string; + /** + * The ID of the provider\'s user that sent the message + * @type {string} + * @memberof ReceiveMessageRequest + */ + 'sender_id': string; + /** + * The ID of the conversation + * @type {string} + * @memberof ReceiveMessageRequest + */ + 'conversation_id': string; + /** + * The body of the message + * @type {string} + * @memberof ReceiveMessageRequest + */ + 'message': string; + /** + * The status of the message + * @type {string} + * @memberof ReceiveMessageRequest + */ + 'status': ReceiveMessageRequestStatusConst; + /** + * The date and time when the message was created in the provider, in UTC. Format: YYYY-MM-DD HH:MM + * @type {string} + * @memberof ReceiveMessageRequest + */ + 'created_at': string; + /** + * The date and time when the message can no longer receive a reply, in UTC. Format: YYYY-MM-DD HH:MM + * @type {string} + * @memberof ReceiveMessageRequest + */ + 'reply_by'?: string; + /** + * A URL that can open the conversation in the provider\'s side + * @type {string} + * @memberof ReceiveMessageRequest + */ + 'conversation_link'?: string; + /** + * The list of attachments available in the message + * @type {Array} + * @memberof ReceiveMessageRequest + */ + 'attachments'?: Array; +} + +export const ReceiveMessageRequestStatusConst = { + sent: 'sent', + delivered: 'delivered', + read: 'read', + failed: 'failed' +} as const; + +export type ReceiveMessageRequestStatusConst = typeof ReceiveMessageRequestStatusConst[keyof typeof ReceiveMessageRequestStatusConst]; + + diff --git a/models/receive-message200-response.ts b/models/receive-message200-response.ts new file mode 100644 index 00000000..5abb0e55 --- /dev/null +++ b/models/receive-message200-response.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ReceiveMessageRequest } from './receive-message-request'; + +/** + * + * @export + * @interface ReceiveMessage200Response + */ +export interface ReceiveMessage200Response { + /** + * If the request was successful or not + * @type {boolean} + * @memberof ReceiveMessage200Response + */ + 'success'?: boolean; + /** + * + * @type {ReceiveMessageRequest} + * @memberof ReceiveMessage200Response + */ + 'data'?: ReceiveMessageRequest; +} + diff --git a/models/receive-message400-response-additional-data.ts b/models/receive-message400-response-additional-data.ts new file mode 100644 index 00000000..485679a6 --- /dev/null +++ b/models/receive-message400-response-additional-data.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface ReceiveMessage400ResponseAdditionalData + */ +export interface ReceiveMessage400ResponseAdditionalData { + /** + * An error code sent by the API + * @type {string} + * @memberof ReceiveMessage400ResponseAdditionalData + */ + 'code'?: string; +} + diff --git a/models/receive-message400-response.ts b/models/receive-message400-response.ts new file mode 100644 index 00000000..d26dad1c --- /dev/null +++ b/models/receive-message400-response.ts @@ -0,0 +1,51 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ReceiveMessage400ResponseAdditionalData } from './receive-message400-response-additional-data'; + +/** + * + * @export + * @interface ReceiveMessage400Response + */ +export interface ReceiveMessage400Response { + /** + * + * @type {boolean} + * @memberof ReceiveMessage400Response + */ + 'success'?: boolean; + /** + * The error description + * @type {string} + * @memberof ReceiveMessage400Response + */ + 'error'?: string; + /** + * + * @type {string} + * @memberof ReceiveMessage400Response + */ + 'error_info'?: string; + /** + * + * @type {ReceiveMessage400ResponseAdditionalData} + * @memberof ReceiveMessage400Response + */ + 'additional_data'?: ReceiveMessage400ResponseAdditionalData; +} + diff --git a/models/relationship-organization-info-item-all-of.ts b/models/relationship-organization-info-item-all-of.ts new file mode 100644 index 00000000..06d74347 --- /dev/null +++ b/models/relationship-organization-info-item-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface RelationshipOrganizationInfoItemAllOf + */ +export interface RelationshipOrganizationInfoItemAllOf { + /** + * The ID of the organization + * @type {number} + * @memberof RelationshipOrganizationInfoItemAllOf + */ + 'value'?: number; +} + diff --git a/models/relationship-organization-info-item-with-active-flag.ts b/models/relationship-organization-info-item-with-active-flag.ts new file mode 100644 index 00000000..aef8a790 --- /dev/null +++ b/models/relationship-organization-info-item-with-active-flag.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityResponse200RelatedObjectsOrganizationORGANIZATIONIDAllOf } from './add-activity-response200-related-objects-organization-organizationidall-of'; +// May contain unused imports in some cases +// @ts-ignore +import { RelationshipOrganizationInfoItem } from './relationship-organization-info-item'; + +/** + * @type RelationshipOrganizationInfoItemWithActiveFlag + * @export + */ +export type RelationshipOrganizationInfoItemWithActiveFlag = AddActivityResponse200RelatedObjectsOrganizationORGANIZATIONIDAllOf & RelationshipOrganizationInfoItem; + + diff --git a/models/relationship-organization-info-item.ts b/models/relationship-organization-info-item.ts new file mode 100644 index 00000000..1dbd88c8 --- /dev/null +++ b/models/relationship-organization-info-item.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjectsOrganizationORGANIZATIONIDAllOf1 } from './get-activities-response200-related-objects-organization-organizationidall-of1'; +// May contain unused imports in some cases +// @ts-ignore +import { RelationshipOrganizationInfoItemAllOf } from './relationship-organization-info-item-all-of'; + +/** + * @type RelationshipOrganizationInfoItem + * @export + */ +export type RelationshipOrganizationInfoItem = GetActivitiesResponse200RelatedObjectsOrganizationORGANIZATIONIDAllOf1 & RelationshipOrganizationInfoItemAllOf; + + diff --git a/models/requied-post-project-parameters.ts b/models/requied-post-project-parameters.ts new file mode 100644 index 00000000..88c62092 --- /dev/null +++ b/models/requied-post-project-parameters.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface RequiedPostProjectParameters + */ +export interface RequiedPostProjectParameters { + /** + * The title of the task + * @type {string} + * @memberof RequiedPostProjectParameters + */ + 'title': string; + /** + * The ID of a project + * @type {number} + * @memberof RequiedPostProjectParameters + */ + 'project_id': number; +} + diff --git a/models/required-post-project-parameters.ts b/models/required-post-project-parameters.ts new file mode 100644 index 00000000..d9741e23 --- /dev/null +++ b/models/required-post-project-parameters.ts @@ -0,0 +1,42 @@ +/* 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 + * @interface RequiredPostProjectParameters + */ +export interface RequiredPostProjectParameters { + /** + * The title of the project + * @type {string} + * @memberof RequiredPostProjectParameters + */ + 'title': string; + /** + * The ID of a project board + * @type {number} + * @memberof RequiredPostProjectParameters + */ + 'board_id': number; + /** + * The ID of a phase on a project board + * @type {number} + * @memberof RequiredPostProjectParameters + */ + 'phase_id': number; +} + diff --git a/models/requred-title-parameter.ts b/models/requred-title-parameter.ts new file mode 100644 index 00000000..c67a9d10 --- /dev/null +++ b/models/requred-title-parameter.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface RequredTitleParameter + */ +export interface RequredTitleParameter { + /** + * The title of the deal + * @type {string} + * @memberof RequredTitleParameter + */ + 'title': string; +} + diff --git a/models/response-call-log-object-all-of.ts b/models/response-call-log-object-all-of.ts new file mode 100644 index 00000000..190e839f --- /dev/null +++ b/models/response-call-log-object-all-of.ts @@ -0,0 +1,42 @@ +/* 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 + * @interface ResponseCallLogObjectAllOf + */ +export interface ResponseCallLogObjectAllOf { + /** + * The call log ID, generated when the call log was created + * @type {string} + * @memberof ResponseCallLogObjectAllOf + */ + 'id'?: string; + /** + * If the call log has an audio recording attached, the value should be true + * @type {boolean} + * @memberof ResponseCallLogObjectAllOf + */ + 'has_recording'?: boolean; + /** + * The company ID of the owner of the call log + * @type {number} + * @memberof ResponseCallLogObjectAllOf + */ + 'company_id'?: number; +} + diff --git a/models/response-call-log-object.ts b/models/response-call-log-object.ts new file mode 100644 index 00000000..ba825cde --- /dev/null +++ b/models/response-call-log-object.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddCallLogRequest } from './add-call-log-request'; +// May contain unused imports in some cases +// @ts-ignore +import { ResponseCallLogObjectAllOf } from './response-call-log-object-all-of'; + +/** + * @type ResponseCallLogObject + * @export + */ +export type ResponseCallLogObject = AddCallLogRequest & ResponseCallLogObjectAllOf; + + diff --git a/models/role-assignment-all-of.ts b/models/role-assignment-all-of.ts new file mode 100644 index 00000000..ab3cc156 --- /dev/null +++ b/models/role-assignment-all-of.ts @@ -0,0 +1,48 @@ +/* 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 + * @interface RoleAssignmentAllOf + */ +export interface RoleAssignmentAllOf { + /** + * The user ID + * @type {number} + * @memberof RoleAssignmentAllOf + */ + 'user_id'?: number; + /** + * The role ID + * @type {number} + * @memberof RoleAssignmentAllOf + */ + 'role_id'?: number; + /** + * Whether the role is active or not + * @type {boolean} + * @memberof RoleAssignmentAllOf + */ + 'active_flag'?: boolean; + /** + * The assignment type + * @type {string} + * @memberof RoleAssignmentAllOf + */ + 'type'?: string; +} + diff --git a/models/role-assignment.ts b/models/role-assignment.ts new file mode 100644 index 00000000..bea2cf51 --- /dev/null +++ b/models/role-assignment.ts @@ -0,0 +1,30 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseRoleRequest } from './base-role-request'; +// May contain unused imports in some cases +// @ts-ignore +import { RoleAssignmentAllOf } from './role-assignment-all-of'; + +/** + * @type RoleAssignment + * The assignment data of the role + * @export + */ +export type RoleAssignment = BaseRoleRequest & RoleAssignmentAllOf; + + diff --git a/models/search-deals-response200-all-of-data-items-inner-item-organization.ts b/models/search-deals-response200-all-of-data-items-inner-item-organization.ts new file mode 100644 index 00000000..909a25e2 --- /dev/null +++ b/models/search-deals-response200-all-of-data-items-inner-item-organization.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface SearchDealsResponse200AllOfDataItemsInnerItemOrganization + */ +export interface SearchDealsResponse200AllOfDataItemsInnerItemOrganization { + /** + * The ID of the organization the deal is associated with + * @type {number} + * @memberof SearchDealsResponse200AllOfDataItemsInnerItemOrganization + */ + 'id'?: number; + /** + * The name of the organization the deal is associated with + * @type {string} + * @memberof SearchDealsResponse200AllOfDataItemsInnerItemOrganization + */ + 'name'?: string; +} + diff --git a/models/search-deals-response200-all-of-data-items-inner-item-owner.ts b/models/search-deals-response200-all-of-data-items-inner-item-owner.ts new file mode 100644 index 00000000..4b9a71d6 --- /dev/null +++ b/models/search-deals-response200-all-of-data-items-inner-item-owner.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface SearchDealsResponse200AllOfDataItemsInnerItemOwner + */ +export interface SearchDealsResponse200AllOfDataItemsInnerItemOwner { + /** + * The ID of the owner of the deal + * @type {number} + * @memberof SearchDealsResponse200AllOfDataItemsInnerItemOwner + */ + 'id'?: number; +} + diff --git a/models/search-deals-response200-all-of-data-items-inner-item-person.ts b/models/search-deals-response200-all-of-data-items-inner-item-person.ts new file mode 100644 index 00000000..295edeb4 --- /dev/null +++ b/models/search-deals-response200-all-of-data-items-inner-item-person.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface SearchDealsResponse200AllOfDataItemsInnerItemPerson + */ +export interface SearchDealsResponse200AllOfDataItemsInnerItemPerson { + /** + * The ID of the person the deal is associated with + * @type {number} + * @memberof SearchDealsResponse200AllOfDataItemsInnerItemPerson + */ + 'id'?: number; + /** + * The name of the person the deal is associated with + * @type {string} + * @memberof SearchDealsResponse200AllOfDataItemsInnerItemPerson + */ + 'name'?: string; +} + diff --git a/models/search-deals-response200-all-of-data-items-inner-item-stage.ts b/models/search-deals-response200-all-of-data-items-inner-item-stage.ts new file mode 100644 index 00000000..0867d10e --- /dev/null +++ b/models/search-deals-response200-all-of-data-items-inner-item-stage.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface SearchDealsResponse200AllOfDataItemsInnerItemStage + */ +export interface SearchDealsResponse200AllOfDataItemsInnerItemStage { + /** + * The ID of the stage of the deal + * @type {number} + * @memberof SearchDealsResponse200AllOfDataItemsInnerItemStage + */ + 'id'?: number; + /** + * The name of the stage of the deal + * @type {string} + * @memberof SearchDealsResponse200AllOfDataItemsInnerItemStage + */ + 'name'?: string; +} + diff --git a/models/search-deals-response200-all-of-data-items-inner-item.ts b/models/search-deals-response200-all-of-data-items-inner-item.ts new file mode 100644 index 00000000..06ba4683 --- /dev/null +++ b/models/search-deals-response200-all-of-data-items-inner-item.ts @@ -0,0 +1,114 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { SearchDealsResponse200AllOfDataItemsInnerItemOrganization } from './search-deals-response200-all-of-data-items-inner-item-organization'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchDealsResponse200AllOfDataItemsInnerItemOwner } from './search-deals-response200-all-of-data-items-inner-item-owner'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchDealsResponse200AllOfDataItemsInnerItemPerson } from './search-deals-response200-all-of-data-items-inner-item-person'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchDealsResponse200AllOfDataItemsInnerItemStage } from './search-deals-response200-all-of-data-items-inner-item-stage'; + +/** + * + * @export + * @interface SearchDealsResponse200AllOfDataItemsInnerItem + */ +export interface SearchDealsResponse200AllOfDataItemsInnerItem { + /** + * The ID of the deal + * @type {number} + * @memberof SearchDealsResponse200AllOfDataItemsInnerItem + */ + 'id'?: number; + /** + * The type of the item + * @type {string} + * @memberof SearchDealsResponse200AllOfDataItemsInnerItem + */ + 'type'?: string; + /** + * The title of the deal + * @type {string} + * @memberof SearchDealsResponse200AllOfDataItemsInnerItem + */ + 'title'?: string; + /** + * The value of the deal + * @type {number} + * @memberof SearchDealsResponse200AllOfDataItemsInnerItem + */ + 'value'?: number; + /** + * The currency of the deal + * @type {string} + * @memberof SearchDealsResponse200AllOfDataItemsInnerItem + */ + 'currency'?: string; + /** + * The status of the deal + * @type {string} + * @memberof SearchDealsResponse200AllOfDataItemsInnerItem + */ + 'status'?: string; + /** + * The visibility of the deal + * @type {number} + * @memberof SearchDealsResponse200AllOfDataItemsInnerItem + */ + 'visible_to'?: number; + /** + * + * @type {SearchDealsResponse200AllOfDataItemsInnerItemOwner} + * @memberof SearchDealsResponse200AllOfDataItemsInnerItem + */ + 'owner'?: SearchDealsResponse200AllOfDataItemsInnerItemOwner; + /** + * + * @type {SearchDealsResponse200AllOfDataItemsInnerItemStage} + * @memberof SearchDealsResponse200AllOfDataItemsInnerItem + */ + 'stage'?: SearchDealsResponse200AllOfDataItemsInnerItemStage; + /** + * + * @type {SearchDealsResponse200AllOfDataItemsInnerItemPerson} + * @memberof SearchDealsResponse200AllOfDataItemsInnerItem + */ + 'person'?: SearchDealsResponse200AllOfDataItemsInnerItemPerson | null; + /** + * + * @type {SearchDealsResponse200AllOfDataItemsInnerItemOrganization} + * @memberof SearchDealsResponse200AllOfDataItemsInnerItem + */ + 'organization'?: SearchDealsResponse200AllOfDataItemsInnerItemOrganization | null; + /** + * Custom fields + * @type {Array} + * @memberof SearchDealsResponse200AllOfDataItemsInnerItem + */ + 'custom_fields'?: Array; + /** + * An array of notes + * @type {Array} + * @memberof SearchDealsResponse200AllOfDataItemsInnerItem + */ + 'notes'?: Array; +} + diff --git a/models/search-deals-response200-all-of-data-items-inner.ts b/models/search-deals-response200-all-of-data-items-inner.ts new file mode 100644 index 00000000..75029e2e --- /dev/null +++ b/models/search-deals-response200-all-of-data-items-inner.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { SearchDealsResponse200AllOfDataItemsInnerItem } from './search-deals-response200-all-of-data-items-inner-item'; + +/** + * + * @export + * @interface SearchDealsResponse200AllOfDataItemsInner + */ +export interface SearchDealsResponse200AllOfDataItemsInner { + /** + * Search result relevancy + * @type {number} + * @memberof SearchDealsResponse200AllOfDataItemsInner + */ + 'result_score'?: number; + /** + * + * @type {SearchDealsResponse200AllOfDataItemsInnerItem} + * @memberof SearchDealsResponse200AllOfDataItemsInner + */ + 'item'?: SearchDealsResponse200AllOfDataItemsInnerItem; +} + diff --git a/models/search-deals-response200-all-of-data.ts b/models/search-deals-response200-all-of-data.ts new file mode 100644 index 00000000..933908e5 --- /dev/null +++ b/models/search-deals-response200-all-of-data.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { SearchDealsResponse200AllOfDataItemsInner } from './search-deals-response200-all-of-data-items-inner'; + +/** + * + * @export + * @interface SearchDealsResponse200AllOfData + */ +export interface SearchDealsResponse200AllOfData { + /** + * The array of deals + * @type {Array} + * @memberof SearchDealsResponse200AllOfData + */ + 'items'?: Array; +} + diff --git a/models/search-deals-response200-all-of.ts b/models/search-deals-response200-all-of.ts new file mode 100644 index 00000000..a84e2b9e --- /dev/null +++ b/models/search-deals-response200-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalData } from './get-activities-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchDealsResponse200AllOfData } from './search-deals-response200-all-of-data'; + +/** + * + * @export + * @interface SearchDealsResponse200AllOf + */ +export interface SearchDealsResponse200AllOf { + /** + * + * @type {SearchDealsResponse200AllOfData} + * @memberof SearchDealsResponse200AllOf + */ + 'data'?: SearchDealsResponse200AllOfData; + /** + * + * @type {GetActivitiesResponse200AdditionalData} + * @memberof SearchDealsResponse200AllOf + */ + 'additional_data'?: GetActivitiesResponse200AdditionalData; +} + diff --git a/models/search-deals-response200.ts b/models/search-deals-response200.ts new file mode 100644 index 00000000..86c12533 --- /dev/null +++ b/models/search-deals-response200.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalData } from './get-activities-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchDealsResponse200AllOf } from './search-deals-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchDealsResponse200AllOfData } from './search-deals-response200-all-of-data'; + +/** + * @type SearchDealsResponse200 + * @export + */ +export type SearchDealsResponse200 = BaseResponse & SearchDealsResponse200AllOf; + + diff --git a/models/search-item-by-field-response200-all-of-data-inner.ts b/models/search-item-by-field-response200-all-of-data-inner.ts new file mode 100644 index 00000000..e0ceb0e4 --- /dev/null +++ b/models/search-item-by-field-response200-all-of-data-inner.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface SearchItemByFieldResponse200AllOfDataInner + */ +export interface SearchItemByFieldResponse200AllOfDataInner { + /** + * The ID of the item + * @type {number} + * @memberof SearchItemByFieldResponse200AllOfDataInner + */ + 'id'?: number; + /** + * The value of the searched `field_key` + * @type {any} + * @memberof SearchItemByFieldResponse200AllOfDataInner + */ + '$field_key'?: any; +} + diff --git a/models/search-item-by-field-response200-all-of.ts b/models/search-item-by-field-response200-all-of.ts new file mode 100644 index 00000000..48c35a2a --- /dev/null +++ b/models/search-item-by-field-response200-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalData } from './get-activities-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchItemByFieldResponse200AllOfDataInner } from './search-item-by-field-response200-all-of-data-inner'; + +/** + * + * @export + * @interface SearchItemByFieldResponse200AllOf + */ +export interface SearchItemByFieldResponse200AllOf { + /** + * The array of results + * @type {Array} + * @memberof SearchItemByFieldResponse200AllOf + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesResponse200AdditionalData} + * @memberof SearchItemByFieldResponse200AllOf + */ + 'additional_data'?: GetActivitiesResponse200AdditionalData; +} + diff --git a/models/search-item-by-field-response200.ts b/models/search-item-by-field-response200.ts new file mode 100644 index 00000000..268862d8 --- /dev/null +++ b/models/search-item-by-field-response200.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalData } from './get-activities-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchItemByFieldResponse200AllOf } from './search-item-by-field-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchItemByFieldResponse200AllOfDataInner } from './search-item-by-field-response200-all-of-data-inner'; + +/** + * @type SearchItemByFieldResponse200 + * @export + */ +export type SearchItemByFieldResponse200 = BaseResponse & SearchItemByFieldResponse200AllOf; + + diff --git a/models/search-item-response200-all-of-data-items-inner.ts b/models/search-item-response200-all-of-data-items-inner.ts new file mode 100644 index 00000000..536276ab --- /dev/null +++ b/models/search-item-response200-all-of-data-items-inner.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface SearchItemResponse200AllOfDataItemsInner + */ +export interface SearchItemResponse200AllOfDataItemsInner { + /** + * Search result relevancy + * @type {number} + * @memberof SearchItemResponse200AllOfDataItemsInner + */ + 'result_score'?: number; + /** + * Item + * @type {object} + * @memberof SearchItemResponse200AllOfDataItemsInner + */ + 'item'?: object; +} + diff --git a/models/search-item-response200-all-of-data.ts b/models/search-item-response200-all-of-data.ts new file mode 100644 index 00000000..200df21e --- /dev/null +++ b/models/search-item-response200-all-of-data.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { SearchItemResponse200AllOfDataItemsInner } from './search-item-response200-all-of-data-items-inner'; + +/** + * + * @export + * @interface SearchItemResponse200AllOfData + */ +export interface SearchItemResponse200AllOfData { + /** + * The array of found items + * @type {Array} + * @memberof SearchItemResponse200AllOfData + */ + 'items'?: Array; + /** + * The array of related items if `search_for_related_items` was enabled + * @type {Array} + * @memberof SearchItemResponse200AllOfData + */ + 'related_items'?: Array; +} + diff --git a/models/search-item-response200-all-of.ts b/models/search-item-response200-all-of.ts new file mode 100644 index 00000000..db914d22 --- /dev/null +++ b/models/search-item-response200-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalData } from './get-activities-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchItemResponse200AllOfData } from './search-item-response200-all-of-data'; + +/** + * + * @export + * @interface SearchItemResponse200AllOf + */ +export interface SearchItemResponse200AllOf { + /** + * + * @type {SearchItemResponse200AllOfData} + * @memberof SearchItemResponse200AllOf + */ + 'data'?: SearchItemResponse200AllOfData; + /** + * + * @type {GetActivitiesResponse200AdditionalData} + * @memberof SearchItemResponse200AllOf + */ + 'additional_data'?: GetActivitiesResponse200AdditionalData; +} + diff --git a/models/search-item-response200.ts b/models/search-item-response200.ts new file mode 100644 index 00000000..272e465b --- /dev/null +++ b/models/search-item-response200.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalData } from './get-activities-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchItemResponse200AllOf } from './search-item-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchItemResponse200AllOfData } from './search-item-response200-all-of-data'; + +/** + * @type SearchItemResponse200 + * @export + */ +export type SearchItemResponse200 = BaseResponse & SearchItemResponse200AllOf; + + diff --git a/models/search-leads-response200-all-of-data-items-inner-item-organization.ts b/models/search-leads-response200-all-of-data-items-inner-item-organization.ts new file mode 100644 index 00000000..3d949f37 --- /dev/null +++ b/models/search-leads-response200-all-of-data-items-inner-item-organization.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface SearchLeadsResponse200AllOfDataItemsInnerItemOrganization + */ +export interface SearchLeadsResponse200AllOfDataItemsInnerItemOrganization { + /** + * The ID of the organization the lead is associated with + * @type {number} + * @memberof SearchLeadsResponse200AllOfDataItemsInnerItemOrganization + */ + 'id'?: number; + /** + * The name of the organization the lead is associated with + * @type {string} + * @memberof SearchLeadsResponse200AllOfDataItemsInnerItemOrganization + */ + 'name'?: string; +} + diff --git a/models/search-leads-response200-all-of-data-items-inner-item-owner.ts b/models/search-leads-response200-all-of-data-items-inner-item-owner.ts new file mode 100644 index 00000000..b4e13be6 --- /dev/null +++ b/models/search-leads-response200-all-of-data-items-inner-item-owner.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface SearchLeadsResponse200AllOfDataItemsInnerItemOwner + */ +export interface SearchLeadsResponse200AllOfDataItemsInnerItemOwner { + /** + * The ID of the owner of the lead + * @type {number} + * @memberof SearchLeadsResponse200AllOfDataItemsInnerItemOwner + */ + 'id'?: number; +} + diff --git a/models/search-leads-response200-all-of-data-items-inner-item-person.ts b/models/search-leads-response200-all-of-data-items-inner-item-person.ts new file mode 100644 index 00000000..75ed89b6 --- /dev/null +++ b/models/search-leads-response200-all-of-data-items-inner-item-person.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface SearchLeadsResponse200AllOfDataItemsInnerItemPerson + */ +export interface SearchLeadsResponse200AllOfDataItemsInnerItemPerson { + /** + * The ID of the person the lead is associated with + * @type {number} + * @memberof SearchLeadsResponse200AllOfDataItemsInnerItemPerson + */ + 'id'?: number; + /** + * The name of the person the lead is associated with + * @type {string} + * @memberof SearchLeadsResponse200AllOfDataItemsInnerItemPerson + */ + 'name'?: string; +} + diff --git a/models/search-leads-response200-all-of-data-items-inner-item.ts b/models/search-leads-response200-all-of-data-items-inner-item.ts new file mode 100644 index 00000000..6cb739a6 --- /dev/null +++ b/models/search-leads-response200-all-of-data-items-inner-item.ts @@ -0,0 +1,117 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { SearchLeadsResponse200AllOfDataItemsInnerItemOrganization } from './search-leads-response200-all-of-data-items-inner-item-organization'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchLeadsResponse200AllOfDataItemsInnerItemOwner } from './search-leads-response200-all-of-data-items-inner-item-owner'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchLeadsResponse200AllOfDataItemsInnerItemPerson } from './search-leads-response200-all-of-data-items-inner-item-person'; + +/** + * + * @export + * @interface SearchLeadsResponse200AllOfDataItemsInnerItem + */ +export interface SearchLeadsResponse200AllOfDataItemsInnerItem { + /** + * The ID of the lead + * @type {string} + * @memberof SearchLeadsResponse200AllOfDataItemsInnerItem + */ + 'id'?: string; + /** + * The type of the item + * @type {string} + * @memberof SearchLeadsResponse200AllOfDataItemsInnerItem + */ + 'type'?: string; + /** + * The title of the lead + * @type {string} + * @memberof SearchLeadsResponse200AllOfDataItemsInnerItem + */ + 'title'?: string; + /** + * + * @type {SearchLeadsResponse200AllOfDataItemsInnerItemOwner} + * @memberof SearchLeadsResponse200AllOfDataItemsInnerItem + */ + 'owner'?: SearchLeadsResponse200AllOfDataItemsInnerItemOwner; + /** + * + * @type {SearchLeadsResponse200AllOfDataItemsInnerItemPerson} + * @memberof SearchLeadsResponse200AllOfDataItemsInnerItem + */ + 'person'?: SearchLeadsResponse200AllOfDataItemsInnerItemPerson; + /** + * + * @type {SearchLeadsResponse200AllOfDataItemsInnerItemOrganization} + * @memberof SearchLeadsResponse200AllOfDataItemsInnerItem + */ + 'organization'?: SearchLeadsResponse200AllOfDataItemsInnerItemOrganization; + /** + * + * @type {Array} + * @memberof SearchLeadsResponse200AllOfDataItemsInnerItem + */ + 'phones'?: Array; + /** + * + * @type {Array} + * @memberof SearchLeadsResponse200AllOfDataItemsInnerItem + */ + 'emails'?: Array; + /** + * Custom fields + * @type {Array} + * @memberof SearchLeadsResponse200AllOfDataItemsInnerItem + */ + 'custom_fields'?: Array; + /** + * An array of notes + * @type {Array} + * @memberof SearchLeadsResponse200AllOfDataItemsInnerItem + */ + 'notes'?: Array; + /** + * The value of the lead + * @type {number} + * @memberof SearchLeadsResponse200AllOfDataItemsInnerItem + */ + 'value'?: number; + /** + * The currency of the lead + * @type {string} + * @memberof SearchLeadsResponse200AllOfDataItemsInnerItem + */ + 'currency'?: string; + /** + * The visibility of the lead + * @type {number} + * @memberof SearchLeadsResponse200AllOfDataItemsInnerItem + */ + 'visible_to'?: number; + /** + * A flag indicating whether the lead is archived or not + * @type {boolean} + * @memberof SearchLeadsResponse200AllOfDataItemsInnerItem + */ + 'is_archived'?: boolean; +} + diff --git a/models/search-leads-response200-all-of-data-items-inner.ts b/models/search-leads-response200-all-of-data-items-inner.ts new file mode 100644 index 00000000..ad2c12c1 --- /dev/null +++ b/models/search-leads-response200-all-of-data-items-inner.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { SearchLeadsResponse200AllOfDataItemsInnerItem } from './search-leads-response200-all-of-data-items-inner-item'; + +/** + * + * @export + * @interface SearchLeadsResponse200AllOfDataItemsInner + */ +export interface SearchLeadsResponse200AllOfDataItemsInner { + /** + * Search result relevancy + * @type {number} + * @memberof SearchLeadsResponse200AllOfDataItemsInner + */ + 'result_score'?: number; + /** + * + * @type {SearchLeadsResponse200AllOfDataItemsInnerItem} + * @memberof SearchLeadsResponse200AllOfDataItemsInner + */ + 'item'?: SearchLeadsResponse200AllOfDataItemsInnerItem; +} + diff --git a/models/search-leads-response200-all-of-data.ts b/models/search-leads-response200-all-of-data.ts new file mode 100644 index 00000000..d910b6d1 --- /dev/null +++ b/models/search-leads-response200-all-of-data.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { SearchLeadsResponse200AllOfDataItemsInner } from './search-leads-response200-all-of-data-items-inner'; + +/** + * + * @export + * @interface SearchLeadsResponse200AllOfData + */ +export interface SearchLeadsResponse200AllOfData { + /** + * The array of leads + * @type {Array} + * @memberof SearchLeadsResponse200AllOfData + */ + 'items'?: Array; +} + diff --git a/models/search-leads-response200-all-of.ts b/models/search-leads-response200-all-of.ts new file mode 100644 index 00000000..3bfe4d30 --- /dev/null +++ b/models/search-leads-response200-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalData } from './get-activities-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchLeadsResponse200AllOfData } from './search-leads-response200-all-of-data'; + +/** + * + * @export + * @interface SearchLeadsResponse200AllOf + */ +export interface SearchLeadsResponse200AllOf { + /** + * + * @type {SearchLeadsResponse200AllOfData} + * @memberof SearchLeadsResponse200AllOf + */ + 'data'?: SearchLeadsResponse200AllOfData; + /** + * + * @type {GetActivitiesResponse200AdditionalData} + * @memberof SearchLeadsResponse200AllOf + */ + 'additional_data'?: GetActivitiesResponse200AdditionalData; +} + diff --git a/models/search-leads-response200.ts b/models/search-leads-response200.ts new file mode 100644 index 00000000..83428f18 --- /dev/null +++ b/models/search-leads-response200.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalData } from './get-activities-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchLeadsResponse200AllOf } from './search-leads-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchLeadsResponse200AllOfData } from './search-leads-response200-all-of-data'; + +/** + * @type SearchLeadsResponse200 + * @export + */ +export type SearchLeadsResponse200 = BaseResponse & SearchLeadsResponse200AllOf; + + diff --git a/models/search-organization-response200-all-of-data-items-inner-item.ts b/models/search-organization-response200-all-of-data-items-inner-item.ts new file mode 100644 index 00000000..2dc5b172 --- /dev/null +++ b/models/search-organization-response200-all-of-data-items-inner-item.ts @@ -0,0 +1,75 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { SearchDealsResponse200AllOfDataItemsInnerItemOwner } from './search-deals-response200-all-of-data-items-inner-item-owner'; + +/** + * + * @export + * @interface SearchOrganizationResponse200AllOfDataItemsInnerItem + */ +export interface SearchOrganizationResponse200AllOfDataItemsInnerItem { + /** + * The ID of the organization + * @type {number} + * @memberof SearchOrganizationResponse200AllOfDataItemsInnerItem + */ + 'id'?: number; + /** + * The type of the item + * @type {string} + * @memberof SearchOrganizationResponse200AllOfDataItemsInnerItem + */ + 'type'?: string; + /** + * The name of the organization + * @type {string} + * @memberof SearchOrganizationResponse200AllOfDataItemsInnerItem + */ + 'name'?: string; + /** + * The address of the organization + * @type {string} + * @memberof SearchOrganizationResponse200AllOfDataItemsInnerItem + */ + 'address'?: string; + /** + * The visibility of the organization + * @type {number} + * @memberof SearchOrganizationResponse200AllOfDataItemsInnerItem + */ + 'visible_to'?: number; + /** + * + * @type {SearchDealsResponse200AllOfDataItemsInnerItemOwner} + * @memberof SearchOrganizationResponse200AllOfDataItemsInnerItem + */ + 'owner'?: SearchDealsResponse200AllOfDataItemsInnerItemOwner; + /** + * Custom fields + * @type {Array} + * @memberof SearchOrganizationResponse200AllOfDataItemsInnerItem + */ + 'custom_fields'?: Array; + /** + * An array of notes + * @type {Array} + * @memberof SearchOrganizationResponse200AllOfDataItemsInnerItem + */ + 'notes'?: Array; +} + diff --git a/models/search-organization-response200-all-of-data-items-inner.ts b/models/search-organization-response200-all-of-data-items-inner.ts new file mode 100644 index 00000000..8f18fcda --- /dev/null +++ b/models/search-organization-response200-all-of-data-items-inner.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { SearchOrganizationResponse200AllOfDataItemsInnerItem } from './search-organization-response200-all-of-data-items-inner-item'; + +/** + * + * @export + * @interface SearchOrganizationResponse200AllOfDataItemsInner + */ +export interface SearchOrganizationResponse200AllOfDataItemsInner { + /** + * Search result relevancy + * @type {number} + * @memberof SearchOrganizationResponse200AllOfDataItemsInner + */ + 'result_score'?: number; + /** + * + * @type {SearchOrganizationResponse200AllOfDataItemsInnerItem} + * @memberof SearchOrganizationResponse200AllOfDataItemsInner + */ + 'item'?: SearchOrganizationResponse200AllOfDataItemsInnerItem; +} + diff --git a/models/search-organization-response200-all-of-data.ts b/models/search-organization-response200-all-of-data.ts new file mode 100644 index 00000000..1151f120 --- /dev/null +++ b/models/search-organization-response200-all-of-data.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { SearchOrganizationResponse200AllOfDataItemsInner } from './search-organization-response200-all-of-data-items-inner'; + +/** + * + * @export + * @interface SearchOrganizationResponse200AllOfData + */ +export interface SearchOrganizationResponse200AllOfData { + /** + * The array of found items + * @type {Array} + * @memberof SearchOrganizationResponse200AllOfData + */ + 'items'?: Array; +} + diff --git a/models/search-organization-response200-all-of.ts b/models/search-organization-response200-all-of.ts new file mode 100644 index 00000000..a9535006 --- /dev/null +++ b/models/search-organization-response200-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalData } from './get-activities-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchOrganizationResponse200AllOfData } from './search-organization-response200-all-of-data'; + +/** + * + * @export + * @interface SearchOrganizationResponse200AllOf + */ +export interface SearchOrganizationResponse200AllOf { + /** + * + * @type {SearchOrganizationResponse200AllOfData} + * @memberof SearchOrganizationResponse200AllOf + */ + 'data'?: SearchOrganizationResponse200AllOfData; + /** + * + * @type {GetActivitiesResponse200AdditionalData} + * @memberof SearchOrganizationResponse200AllOf + */ + 'additional_data'?: GetActivitiesResponse200AdditionalData; +} + diff --git a/models/search-organization-response200.ts b/models/search-organization-response200.ts new file mode 100644 index 00000000..20b20871 --- /dev/null +++ b/models/search-organization-response200.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalData } from './get-activities-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchOrganizationResponse200AllOf } from './search-organization-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchOrganizationResponse200AllOfData } from './search-organization-response200-all-of-data'; + +/** + * @type SearchOrganizationResponse200 + * @export + */ +export type SearchOrganizationResponse200 = BaseResponse & SearchOrganizationResponse200AllOf; + + diff --git a/models/search-persons-response200-all-of-data-items-inner-item-organization.ts b/models/search-persons-response200-all-of-data-items-inner-item-organization.ts new file mode 100644 index 00000000..46f44ac8 --- /dev/null +++ b/models/search-persons-response200-all-of-data-items-inner-item-organization.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface SearchPersonsResponse200AllOfDataItemsInnerItemOrganization + */ +export interface SearchPersonsResponse200AllOfDataItemsInnerItemOrganization { + /** + * The ID of the organization the person is associated with + * @type {number} + * @memberof SearchPersonsResponse200AllOfDataItemsInnerItemOrganization + */ + 'id'?: number; + /** + * The name of the organization the person is associated with + * @type {string} + * @memberof SearchPersonsResponse200AllOfDataItemsInnerItemOrganization + */ + 'name'?: string; +} + diff --git a/models/search-persons-response200-all-of-data-items-inner-item-owner.ts b/models/search-persons-response200-all-of-data-items-inner-item-owner.ts new file mode 100644 index 00000000..98bc042f --- /dev/null +++ b/models/search-persons-response200-all-of-data-items-inner-item-owner.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface SearchPersonsResponse200AllOfDataItemsInnerItemOwner + */ +export interface SearchPersonsResponse200AllOfDataItemsInnerItemOwner { + /** + * The ID of the owner of the person + * @type {number} + * @memberof SearchPersonsResponse200AllOfDataItemsInnerItemOwner + */ + 'id'?: number; +} + diff --git a/models/search-persons-response200-all-of-data-items-inner-item.ts b/models/search-persons-response200-all-of-data-items-inner-item.ts new file mode 100644 index 00000000..e34c645b --- /dev/null +++ b/models/search-persons-response200-all-of-data-items-inner-item.ts @@ -0,0 +1,90 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { SearchPersonsResponse200AllOfDataItemsInnerItemOrganization } from './search-persons-response200-all-of-data-items-inner-item-organization'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchPersonsResponse200AllOfDataItemsInnerItemOwner } from './search-persons-response200-all-of-data-items-inner-item-owner'; + +/** + * + * @export + * @interface SearchPersonsResponse200AllOfDataItemsInnerItem + */ +export interface SearchPersonsResponse200AllOfDataItemsInnerItem { + /** + * The ID of the person + * @type {number} + * @memberof SearchPersonsResponse200AllOfDataItemsInnerItem + */ + 'id'?: number; + /** + * The type of the item + * @type {string} + * @memberof SearchPersonsResponse200AllOfDataItemsInnerItem + */ + 'type'?: string; + /** + * The name of the person + * @type {string} + * @memberof SearchPersonsResponse200AllOfDataItemsInnerItem + */ + 'name'?: string; + /** + * An array of phone numbers + * @type {Array} + * @memberof SearchPersonsResponse200AllOfDataItemsInnerItem + */ + 'phones'?: Array; + /** + * An array of email addresses + * @type {Array} + * @memberof SearchPersonsResponse200AllOfDataItemsInnerItem + */ + 'emails'?: Array; + /** + * The visibility of the person + * @type {number} + * @memberof SearchPersonsResponse200AllOfDataItemsInnerItem + */ + 'visible_to'?: number; + /** + * + * @type {SearchPersonsResponse200AllOfDataItemsInnerItemOwner} + * @memberof SearchPersonsResponse200AllOfDataItemsInnerItem + */ + 'owner'?: SearchPersonsResponse200AllOfDataItemsInnerItemOwner; + /** + * + * @type {SearchPersonsResponse200AllOfDataItemsInnerItemOrganization} + * @memberof SearchPersonsResponse200AllOfDataItemsInnerItem + */ + 'organization'?: SearchPersonsResponse200AllOfDataItemsInnerItemOrganization; + /** + * Custom fields + * @type {Array} + * @memberof SearchPersonsResponse200AllOfDataItemsInnerItem + */ + 'custom_fields'?: Array; + /** + * An array of notes + * @type {Array} + * @memberof SearchPersonsResponse200AllOfDataItemsInnerItem + */ + 'notes'?: Array; +} + diff --git a/models/search-persons-response200-all-of-data-items-inner.ts b/models/search-persons-response200-all-of-data-items-inner.ts new file mode 100644 index 00000000..b05c742a --- /dev/null +++ b/models/search-persons-response200-all-of-data-items-inner.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { SearchPersonsResponse200AllOfDataItemsInnerItem } from './search-persons-response200-all-of-data-items-inner-item'; + +/** + * + * @export + * @interface SearchPersonsResponse200AllOfDataItemsInner + */ +export interface SearchPersonsResponse200AllOfDataItemsInner { + /** + * Search result relevancy + * @type {number} + * @memberof SearchPersonsResponse200AllOfDataItemsInner + */ + 'result_score'?: number; + /** + * + * @type {SearchPersonsResponse200AllOfDataItemsInnerItem} + * @memberof SearchPersonsResponse200AllOfDataItemsInner + */ + 'item'?: SearchPersonsResponse200AllOfDataItemsInnerItem; +} + diff --git a/models/search-persons-response200-all-of-data.ts b/models/search-persons-response200-all-of-data.ts new file mode 100644 index 00000000..66d148bc --- /dev/null +++ b/models/search-persons-response200-all-of-data.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { SearchPersonsResponse200AllOfDataItemsInner } from './search-persons-response200-all-of-data-items-inner'; + +/** + * + * @export + * @interface SearchPersonsResponse200AllOfData + */ +export interface SearchPersonsResponse200AllOfData { + /** + * The array of found items + * @type {Array} + * @memberof SearchPersonsResponse200AllOfData + */ + 'items'?: Array; +} + diff --git a/models/search-persons-response200-all-of.ts b/models/search-persons-response200-all-of.ts new file mode 100644 index 00000000..712df6e8 --- /dev/null +++ b/models/search-persons-response200-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalData } from './get-activities-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchPersonsResponse200AllOfData } from './search-persons-response200-all-of-data'; + +/** + * + * @export + * @interface SearchPersonsResponse200AllOf + */ +export interface SearchPersonsResponse200AllOf { + /** + * + * @type {SearchPersonsResponse200AllOfData} + * @memberof SearchPersonsResponse200AllOf + */ + 'data'?: SearchPersonsResponse200AllOfData; + /** + * + * @type {GetActivitiesResponse200AdditionalData} + * @memberof SearchPersonsResponse200AllOf + */ + 'additional_data'?: GetActivitiesResponse200AdditionalData; +} + diff --git a/models/search-persons-response200.ts b/models/search-persons-response200.ts new file mode 100644 index 00000000..c881c383 --- /dev/null +++ b/models/search-persons-response200.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalData } from './get-activities-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchPersonsResponse200AllOf } from './search-persons-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchPersonsResponse200AllOfData } from './search-persons-response200-all-of-data'; + +/** + * @type SearchPersonsResponse200 + * @export + */ +export type SearchPersonsResponse200 = BaseResponse & SearchPersonsResponse200AllOf; + + diff --git a/models/search-products-response200-all-of-data-items-inner-item-owner.ts b/models/search-products-response200-all-of-data-items-inner-item-owner.ts new file mode 100644 index 00000000..bbd9067a --- /dev/null +++ b/models/search-products-response200-all-of-data-items-inner-item-owner.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface SearchProductsResponse200AllOfDataItemsInnerItemOwner + */ +export interface SearchProductsResponse200AllOfDataItemsInnerItemOwner { + /** + * The ID of the owner of the product + * @type {number} + * @memberof SearchProductsResponse200AllOfDataItemsInnerItemOwner + */ + 'id'?: number; +} + diff --git a/models/search-products-response200-all-of-data-items-inner-item.ts b/models/search-products-response200-all-of-data-items-inner-item.ts new file mode 100644 index 00000000..bf8efd94 --- /dev/null +++ b/models/search-products-response200-all-of-data-items-inner-item.ts @@ -0,0 +1,69 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { SearchProductsResponse200AllOfDataItemsInnerItemOwner } from './search-products-response200-all-of-data-items-inner-item-owner'; + +/** + * + * @export + * @interface SearchProductsResponse200AllOfDataItemsInnerItem + */ +export interface SearchProductsResponse200AllOfDataItemsInnerItem { + /** + * The ID of the product + * @type {number} + * @memberof SearchProductsResponse200AllOfDataItemsInnerItem + */ + 'id'?: number; + /** + * The type of the item + * @type {string} + * @memberof SearchProductsResponse200AllOfDataItemsInnerItem + */ + 'type'?: string; + /** + * The name of the product + * @type {string} + * @memberof SearchProductsResponse200AllOfDataItemsInnerItem + */ + 'name'?: string; + /** + * The code of the product + * @type {number} + * @memberof SearchProductsResponse200AllOfDataItemsInnerItem + */ + 'code'?: number; + /** + * The visibility of the product + * @type {number} + * @memberof SearchProductsResponse200AllOfDataItemsInnerItem + */ + 'visible_to'?: number; + /** + * + * @type {SearchProductsResponse200AllOfDataItemsInnerItemOwner} + * @memberof SearchProductsResponse200AllOfDataItemsInnerItem + */ + 'owner'?: SearchProductsResponse200AllOfDataItemsInnerItemOwner; + /** + * The custom fields + * @type {Array} + * @memberof SearchProductsResponse200AllOfDataItemsInnerItem + */ + 'custom_fields'?: Array; +} + diff --git a/models/search-products-response200-all-of-data-items-inner.ts b/models/search-products-response200-all-of-data-items-inner.ts new file mode 100644 index 00000000..8798c5aa --- /dev/null +++ b/models/search-products-response200-all-of-data-items-inner.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { SearchProductsResponse200AllOfDataItemsInnerItem } from './search-products-response200-all-of-data-items-inner-item'; + +/** + * + * @export + * @interface SearchProductsResponse200AllOfDataItemsInner + */ +export interface SearchProductsResponse200AllOfDataItemsInner { + /** + * Search result relevancy + * @type {number} + * @memberof SearchProductsResponse200AllOfDataItemsInner + */ + 'result_score'?: number; + /** + * + * @type {SearchProductsResponse200AllOfDataItemsInnerItem} + * @memberof SearchProductsResponse200AllOfDataItemsInner + */ + 'item'?: SearchProductsResponse200AllOfDataItemsInnerItem; +} + diff --git a/models/search-products-response200-all-of-data.ts b/models/search-products-response200-all-of-data.ts new file mode 100644 index 00000000..2ed57901 --- /dev/null +++ b/models/search-products-response200-all-of-data.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { SearchProductsResponse200AllOfDataItemsInner } from './search-products-response200-all-of-data-items-inner'; + +/** + * + * @export + * @interface SearchProductsResponse200AllOfData + */ +export interface SearchProductsResponse200AllOfData { + /** + * The array of found items + * @type {Array} + * @memberof SearchProductsResponse200AllOfData + */ + 'items'?: Array; +} + diff --git a/models/search-products-response200-all-of.ts b/models/search-products-response200-all-of.ts new file mode 100644 index 00000000..e3e00657 --- /dev/null +++ b/models/search-products-response200-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalData } from './get-activities-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchProductsResponse200AllOfData } from './search-products-response200-all-of-data'; + +/** + * + * @export + * @interface SearchProductsResponse200AllOf + */ +export interface SearchProductsResponse200AllOf { + /** + * + * @type {SearchProductsResponse200AllOfData} + * @memberof SearchProductsResponse200AllOf + */ + 'data'?: SearchProductsResponse200AllOfData; + /** + * + * @type {GetActivitiesResponse200AdditionalData} + * @memberof SearchProductsResponse200AllOf + */ + 'additional_data'?: GetActivitiesResponse200AdditionalData; +} + diff --git a/models/search-products-response200.ts b/models/search-products-response200.ts new file mode 100644 index 00000000..c5e6c0ba --- /dev/null +++ b/models/search-products-response200.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200AdditionalData } from './get-activities-response200-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchProductsResponse200AllOf } from './search-products-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { SearchProductsResponse200AllOfData } from './search-products-response200-all-of-data'; + +/** + * @type SearchProductsResponse200 + * @export + */ +export type SearchProductsResponse200 = BaseResponse & SearchProductsResponse200AllOf; + + diff --git a/models/single-permission-set-response200-all-of.ts b/models/single-permission-set-response200-all-of.ts new file mode 100644 index 00000000..c25911ba --- /dev/null +++ b/models/single-permission-set-response200-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface SinglePermissionSetResponse200AllOf + */ +export interface SinglePermissionSetResponse200AllOf { + /** + * A permission assigned to this permission set + * @type {Array} + * @memberof SinglePermissionSetResponse200AllOf + */ + 'contents'?: Array; +} + diff --git a/models/single-permission-set-response200.ts b/models/single-permission-set-response200.ts new file mode 100644 index 00000000..9520c98b --- /dev/null +++ b/models/single-permission-set-response200.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetPermissionSetsResponse200AllOfDataInner } from './get-permission-sets-response200-all-of-data-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { SinglePermissionSetResponse200AllOf } from './single-permission-set-response200-all-of'; + +/** + * @type SinglePermissionSetResponse200 + * @export + */ +export type SinglePermissionSetResponse200 = GetPermissionSetsResponse200AllOfDataInner & SinglePermissionSetResponse200AllOf; + + diff --git a/models/stage-response200-data.ts b/models/stage-response200-data.ts new file mode 100644 index 00000000..78ed949b --- /dev/null +++ b/models/stage-response200-data.ts @@ -0,0 +1,84 @@ +/* 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. + */ + + + +/** + * Updated stage object + * @export + * @interface StageResponse200Data + */ +export interface StageResponse200Data { + /** + * The ID of the stage + * @type {number} + * @memberof StageResponse200Data + */ + 'id'?: number; + /** + * Defines the order of the stage + * @type {number} + * @memberof StageResponse200Data + */ + 'order_nr'?: number; + /** + * The name of the stage + * @type {string} + * @memberof StageResponse200Data + */ + 'name'?: string; + /** + * Whether the stage is active or deleted + * @type {boolean} + * @memberof StageResponse200Data + */ + 'active_flag'?: boolean; + /** + * The success probability percentage of the deal. Used/shown when the deal weighted values are used. + * @type {number} + * @memberof StageResponse200Data + */ + 'deal_probability'?: number; + /** + * The ID of the pipeline to add the stage to + * @type {number} + * @memberof StageResponse200Data + */ + 'pipeline_id'?: number; + /** + * Whether deals in this stage can become rotten + * @type {boolean} + * @memberof StageResponse200Data + */ + 'rotten_flag'?: boolean; + /** + * The number of days the deals not updated in this stage would become rotten. Applies only if the `rotten_flag` is set. + * @type {number} + * @memberof StageResponse200Data + */ + 'rotten_days'?: number; + /** + * The stage creation time. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof StageResponse200Data + */ + 'add_time'?: string; + /** + * The stage update time. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof StageResponse200Data + */ + 'update_time'?: string; +} + diff --git a/models/stage-response200.ts b/models/stage-response200.ts new file mode 100644 index 00000000..c389e965 --- /dev/null +++ b/models/stage-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { StageResponse200Data } from './stage-response200-data'; + +/** + * + * @export + * @interface StageResponse200 + */ +export interface StageResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof StageResponse200 + */ + 'success'?: boolean; + /** + * + * @type {StageResponse200Data} + * @memberof StageResponse200 + */ + 'data'?: StageResponse200Data; +} + diff --git a/models/sub-role-all-of.ts b/models/sub-role-all-of.ts new file mode 100644 index 00000000..43cc4095 --- /dev/null +++ b/models/sub-role-all-of.ts @@ -0,0 +1,48 @@ +/* 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 + * @interface SubRoleAllOf + */ +export interface SubRoleAllOf { + /** + * The ID of the role + * @type {number} + * @memberof SubRoleAllOf + */ + 'id'?: number; + /** + * Whether the role is active or not + * @type {boolean} + * @memberof SubRoleAllOf + */ + 'active_flag'?: boolean; + /** + * The number of users assigned to this role + * @type {string} + * @memberof SubRoleAllOf + */ + 'assignment_count'?: string; + /** + * The number of sub-roles + * @type {string} + * @memberof SubRoleAllOf + */ + 'sub_role_count'?: string; +} + diff --git a/models/sub-role.ts b/models/sub-role.ts new file mode 100644 index 00000000..8a8d9625 --- /dev/null +++ b/models/sub-role.ts @@ -0,0 +1,30 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseRoleRequest } from './base-role-request'; +// May contain unused imports in some cases +// @ts-ignore +import { SubRoleAllOf } from './sub-role-all-of'; + +/** + * @type SubRole + * The details of the sub-role + * @export + */ +export type SubRole = BaseRoleRequest & SubRoleAllOf; + + diff --git a/models/subscription-addons-response200-all-of.ts b/models/subscription-addons-response200-all-of.ts new file mode 100644 index 00000000..7951f94f --- /dev/null +++ b/models/subscription-addons-response200-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface SubscriptionAddonsResponse200AllOf + */ +export interface SubscriptionAddonsResponse200AllOf { + /** + * An array of add-ons that the company has. + * @type {Array} + * @memberof SubscriptionAddonsResponse200AllOf + */ + 'data'?: Array; +} + diff --git a/models/subscription-addons-response200.ts b/models/subscription-addons-response200.ts new file mode 100644 index 00000000..58c9937e --- /dev/null +++ b/models/subscription-addons-response200.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { SubscriptionAddonsResponse200AllOf } from './subscription-addons-response200-all-of'; + +/** + * @type SubscriptionAddonsResponse200 + * @export + */ +export type SubscriptionAddonsResponse200 = BaseResponse & SubscriptionAddonsResponse200AllOf; + + diff --git a/models/subscriptions-id-response200-all-of-data.ts b/models/subscriptions-id-response200-all-of-data.ts new file mode 100644 index 00000000..ce443928 --- /dev/null +++ b/models/subscriptions-id-response200-all-of-data.ts @@ -0,0 +1,120 @@ +/* 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 + * @interface SubscriptionsIdResponse200AllOfData + */ +export interface SubscriptionsIdResponse200AllOfData { + /** + * The ID of the subscription + * @type {number} + * @memberof SubscriptionsIdResponse200AllOfData + */ + 'id'?: number; + /** + * The ID of the user who created the subscription + * @type {number} + * @memberof SubscriptionsIdResponse200AllOfData + */ + 'user_id'?: number; + /** + * The ID of the deal this subscription is associated with + * @type {number} + * @memberof SubscriptionsIdResponse200AllOfData + */ + 'deal_id'?: number; + /** + * The description of the recurring subscription + * @type {string} + * @memberof SubscriptionsIdResponse200AllOfData + */ + 'description'?: string; + /** + * The subscription status + * @type {boolean} + * @memberof SubscriptionsIdResponse200AllOfData + */ + 'is_active'?: boolean; + /** + * Shows how many payments a recurring subscription has + * @type {number} + * @memberof SubscriptionsIdResponse200AllOfData + */ + 'cycles_count'?: number; + /** + * The amount of each payment + * @type {number} + * @memberof SubscriptionsIdResponse200AllOfData + */ + 'cycle_amount'?: number; + /** + * Indicates that the recurring subscription will last until it is manually canceled or deleted + * @type {boolean} + * @memberof SubscriptionsIdResponse200AllOfData + */ + 'infinite'?: boolean; + /** + * The currency of the subscription + * @type {string} + * @memberof SubscriptionsIdResponse200AllOfData + */ + 'currency'?: string; + /** + * The interval between payments + * @type {string} + * @memberof SubscriptionsIdResponse200AllOfData + */ + 'cadence_type'?: string; + /** + * The start date of the recurring subscription + * @type {string} + * @memberof SubscriptionsIdResponse200AllOfData + */ + 'start_date'?: string; + /** + * The end date of the subscription + * @type {string} + * @memberof SubscriptionsIdResponse200AllOfData + */ + 'end_date'?: string; + /** + * The total value of all payments + * @type {number} + * @memberof SubscriptionsIdResponse200AllOfData + */ + 'lifetime_value'?: number; + /** + * The final status of the subscription + * @type {string} + * @memberof SubscriptionsIdResponse200AllOfData + */ + 'final_status'?: string | null; + /** + * The creation time of the subscription + * @type {string} + * @memberof SubscriptionsIdResponse200AllOfData + */ + 'add_time'?: string; + /** + * The update time of the subscription + * @type {string} + * @memberof SubscriptionsIdResponse200AllOfData + */ + 'update_time'?: string; +} + diff --git a/models/subscriptions-id-response200-all-of.ts b/models/subscriptions-id-response200-all-of.ts new file mode 100644 index 00000000..9d01e350 --- /dev/null +++ b/models/subscriptions-id-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { SubscriptionsIdResponse200AllOfData } from './subscriptions-id-response200-all-of-data'; + +/** + * + * @export + * @interface SubscriptionsIdResponse200AllOf + */ +export interface SubscriptionsIdResponse200AllOf { + /** + * + * @type {SubscriptionsIdResponse200AllOfData} + * @memberof SubscriptionsIdResponse200AllOf + */ + 'data'?: SubscriptionsIdResponse200AllOfData; +} + diff --git a/models/subscriptions-id-response200.ts b/models/subscriptions-id-response200.ts new file mode 100644 index 00000000..73ec5b97 --- /dev/null +++ b/models/subscriptions-id-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { SubscriptionsIdResponse200AllOf } from './subscriptions-id-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { SubscriptionsIdResponse200AllOfData } from './subscriptions-id-response200-all-of-data'; + +/** + * @type SubscriptionsIdResponse200 + * @export + */ +export type SubscriptionsIdResponse200 = BaseResponse & SubscriptionsIdResponse200AllOf; + + diff --git a/models/task-response-object-all-of.ts b/models/task-response-object-all-of.ts new file mode 100644 index 00000000..12f7eb14 --- /dev/null +++ b/models/task-response-object-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface TaskResponseObjectAllOf + */ +export interface TaskResponseObjectAllOf { + /** + * The ID of the task, generated when the task was created + * @type {number} + * @memberof TaskResponseObjectAllOf + */ + 'id'?: number; +} + diff --git a/models/task-response-object.ts b/models/task-response-object.ts new file mode 100644 index 00000000..8c84ab7f --- /dev/null +++ b/models/task-response-object.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { TaskResponseObjectAllOf } from './task-response-object-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdateProjectRequest1 } from './update-project-request1'; + +/** + * @type TaskResponseObject + * @export + */ +export type TaskResponseObject = TaskResponseObjectAllOf & UpdateProjectRequest1; + + diff --git a/models/team-id.ts b/models/team-id.ts new file mode 100644 index 00000000..aee4491c --- /dev/null +++ b/models/team-id.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface TeamId + */ +export interface TeamId { + /** + * The team ID + * @type {number} + * @memberof TeamId + */ + 'id'?: number; +} + diff --git a/models/team-response200-all-of.ts b/models/team-response200-all-of.ts new file mode 100644 index 00000000..7c9234fb --- /dev/null +++ b/models/team-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseTeam } from './base-team'; + +/** + * + * @export + * @interface TeamResponse200AllOf + */ +export interface TeamResponse200AllOf { + /** + * + * @type {BaseTeam} + * @memberof TeamResponse200AllOf + */ + 'data'?: BaseTeam; +} + diff --git a/models/team-response200.ts b/models/team-response200.ts new file mode 100644 index 00000000..52234e6b --- /dev/null +++ b/models/team-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseTeam } from './base-team'; +// May contain unused imports in some cases +// @ts-ignore +import { TeamResponse200AllOf } from './team-response200-all-of'; + +/** + * @type TeamResponse200 + * @export + */ +export type TeamResponse200 = BaseResponse & TeamResponse200AllOf; + + diff --git a/models/teams-response200-all-of.ts b/models/teams-response200-all-of.ts new file mode 100644 index 00000000..ec0b5e09 --- /dev/null +++ b/models/teams-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseTeam } from './base-team'; + +/** + * + * @export + * @interface TeamsResponse200AllOf + */ +export interface TeamsResponse200AllOf { + /** + * + * @type {Array} + * @memberof TeamsResponse200AllOf + */ + 'data'?: Array; +} + diff --git a/models/teams-response200.ts b/models/teams-response200.ts new file mode 100644 index 00000000..43e510ea --- /dev/null +++ b/models/teams-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseTeam } from './base-team'; +// May contain unused imports in some cases +// @ts-ignore +import { TeamsResponse200AllOf } from './teams-response200-all-of'; + +/** + * @type TeamsResponse200 + * @export + */ +export type TeamsResponse200 = BaseResponse & TeamsResponse200AllOf; + + diff --git a/models/template-response-object-all-of.ts b/models/template-response-object-all-of.ts new file mode 100644 index 00000000..ed57b1ef --- /dev/null +++ b/models/template-response-object-all-of.ts @@ -0,0 +1,66 @@ +/* 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 + * @interface TemplateResponseObjectAllOf + */ +export interface TemplateResponseObjectAllOf { + /** + * The ID of a template + * @type {number} + * @memberof TemplateResponseObjectAllOf + */ + 'id'?: number; + /** + * The title of a template + * @type {string} + * @memberof TemplateResponseObjectAllOf + */ + 'title'?: string; + /** + * The description of a template + * @type {string} + * @memberof TemplateResponseObjectAllOf + */ + 'description'?: string; + /** + * The ID of the project board this template is associated with + * @type {number} + * @memberof TemplateResponseObjectAllOf + */ + 'projects_board_id'?: number; + /** + * The ID of a template owner + * @type {number} + * @memberof TemplateResponseObjectAllOf + */ + 'owner_id'?: number; + /** + * The creation date and time of the template in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof TemplateResponseObjectAllOf + */ + 'add_time'?: string; + /** + * The update date and time of the template in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof TemplateResponseObjectAllOf + */ + 'update_time'?: string; +} + diff --git a/models/template-response-object.ts b/models/template-response-object.ts new file mode 100644 index 00000000..d0ba4fc2 --- /dev/null +++ b/models/template-response-object.ts @@ -0,0 +1,26 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { TemplateResponseObjectAllOf } from './template-response-object-all-of'; + +/** + * @type TemplateResponseObject + * @export + */ +export type TemplateResponseObject = TemplateResponseObjectAllOf; + + diff --git a/models/unathorized-response.ts b/models/unathorized-response.ts new file mode 100644 index 00000000..8fc20450 --- /dev/null +++ b/models/unathorized-response.ts @@ -0,0 +1,42 @@ +/* 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 + * @interface UnathorizedResponse + */ +export interface UnathorizedResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof UnathorizedResponse + */ + 'success'?: boolean; + /** + * The error message + * @type {string} + * @memberof UnathorizedResponse + */ + 'error'?: string; + /** + * The response error code + * @type {number} + * @memberof UnathorizedResponse + */ + 'errorCode'?: number; +} + diff --git a/models/update-activity-request-all-of.ts b/models/update-activity-request-all-of.ts new file mode 100644 index 00000000..e487f4a2 --- /dev/null +++ b/models/update-activity-request-all-of.ts @@ -0,0 +1,80 @@ +/* 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 + * @interface UpdateActivityRequestAllOf + */ +export interface UpdateActivityRequestAllOf { + /** + * The note of the activity (HTML format) + * @type {string} + * @memberof UpdateActivityRequestAllOf + */ + 'note'?: string; + /** + * The subject of the activity + * @type {string} + * @memberof UpdateActivityRequestAllOf + */ + 'subject'?: string; + /** + * The type of the activity. This is in correlation with the `key_string` parameter of ActivityTypes. + * @type {string} + * @memberof UpdateActivityRequestAllOf + */ + 'type'?: string; + /** + * The ID of the user whom the activity is assigned to + * @type {number} + * @memberof UpdateActivityRequestAllOf + */ + 'user_id'?: number; + /** + * List of multiple persons (participants) this activity is associated with. It requires a structure as follows: `[{\"person_id\":1,\"primary_flag\":true}]` + * @type {Array} + * @memberof UpdateActivityRequestAllOf + */ + 'participants'?: Array; + /** + * Set the activity as \'Busy\' or \'Free\'. If the flag is set to `true`, your customers will not be able to book that time slot through any Scheduler links. The flag can also be unset by never setting it or overriding it with `null`. When the value of the flag is unset (`null`), the flag defaults to \'Busy\' if it has a time set, and \'Free\' if it is an all-day event without specified time. + * @type {boolean} + * @memberof UpdateActivityRequestAllOf + */ + 'busy_flag'?: boolean; + /** + * The attendees of the activity. This can be either your existing Pipedrive contacts or an external email address. It requires a structure as follows: `[{\"email_address\":\"mail@example.org\"}]` or `[{\"person_id\":1, \"email_address\":\"mail@example.org\"}]` + * @type {Array} + * @memberof UpdateActivityRequestAllOf + */ + 'attendees'?: Array; + /** + * + * @type {number} + * @memberof UpdateActivityRequestAllOf + */ + 'done'?: UpdateActivityRequestAllOfDoneConst; +} + +export const UpdateActivityRequestAllOfDoneConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type UpdateActivityRequestAllOfDoneConst = typeof UpdateActivityRequestAllOfDoneConst[keyof typeof UpdateActivityRequestAllOfDoneConst]; + + diff --git a/models/update-activity-request.ts b/models/update-activity-request.ts new file mode 100644 index 00000000..1398ac04 --- /dev/null +++ b/models/update-activity-request.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ActivityResponseObjectAllOf } from './activity-response-object-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdateActivityRequestAllOf } from './update-activity-request-all-of'; + +/** + * @type UpdateActivityRequest + * @export + */ +export type UpdateActivityRequest = ActivityResponseObjectAllOf & UpdateActivityRequestAllOf; + + diff --git a/models/update-activity-response200.ts b/models/update-activity-response200.ts new file mode 100644 index 00000000..86036658 --- /dev/null +++ b/models/update-activity-response200.ts @@ -0,0 +1,48 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ActivityResponseObject } from './activity-response-object'; +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityResponse200RelatedObjects } from './add-activity-response200-related-objects'; + +/** + * + * @export + * @interface UpdateActivityResponse200 + */ +export interface UpdateActivityResponse200 { + /** + * + * @type {boolean} + * @memberof UpdateActivityResponse200 + */ + 'success'?: boolean; + /** + * + * @type {ActivityResponseObject} + * @memberof UpdateActivityResponse200 + */ + 'data'?: ActivityResponseObject; + /** + * + * @type {AddActivityResponse200RelatedObjects} + * @memberof UpdateActivityResponse200 + */ + 'related_objects'?: AddActivityResponse200RelatedObjects; +} + diff --git a/models/update-activity-type-request.ts b/models/update-activity-type-request.ts new file mode 100644 index 00000000..635c5c7d --- /dev/null +++ b/models/update-activity-type-request.ts @@ -0,0 +1,94 @@ +/* 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 + * @interface UpdateActivityTypeRequest + */ +export interface UpdateActivityTypeRequest { + /** + * The name of the activity type + * @type {string} + * @memberof UpdateActivityTypeRequest + */ + 'name'?: string; + /** + * Icon graphic to use for representing this activity type + * @type {string} + * @memberof UpdateActivityTypeRequest + */ + 'icon_key'?: UpdateActivityTypeRequestIconKeyConst; + /** + * A designated color for the activity type in 6-character HEX format (e.g. `FFFFFF` for white, `000000` for black) + * @type {string} + * @memberof UpdateActivityTypeRequest + */ + 'color'?: string; + /** + * An order number for this activity type. Order numbers should be used to order the types in the activity type selections. + * @type {number} + * @memberof UpdateActivityTypeRequest + */ + 'order_nr'?: number; +} + +export const UpdateActivityTypeRequestIconKeyConst = { + task: 'task', + email: 'email', + meeting: 'meeting', + deadline: 'deadline', + call: 'call', + lunch: 'lunch', + calendar: 'calendar', + downarrow: 'downarrow', + document: 'document', + smartphone: 'smartphone', + camera: 'camera', + scissors: 'scissors', + cogs: 'cogs', + bubble: 'bubble', + uparrow: 'uparrow', + checkbox: 'checkbox', + signpost: 'signpost', + shuffle: 'shuffle', + addressbook: 'addressbook', + linegraph: 'linegraph', + picture: 'picture', + car: 'car', + world: 'world', + search: 'search', + clip: 'clip', + sound: 'sound', + brush: 'brush', + key: 'key', + padlock: 'padlock', + pricetag: 'pricetag', + suitcase: 'suitcase', + finish: 'finish', + plane: 'plane', + loop: 'loop', + wifi: 'wifi', + truck: 'truck', + cart: 'cart', + bulb: 'bulb', + bell: 'bell', + presentation: 'presentation' +} as const; + +export type UpdateActivityTypeRequestIconKeyConst = typeof UpdateActivityTypeRequestIconKeyConst[keyof typeof UpdateActivityTypeRequestIconKeyConst]; + + diff --git a/models/update-deal-parameters.ts b/models/update-deal-parameters.ts new file mode 100644 index 00000000..30805f22 --- /dev/null +++ b/models/update-deal-parameters.ts @@ -0,0 +1,88 @@ +/* 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 + * @interface UpdateDealParameters + */ +export interface UpdateDealParameters { + /** + * The value of the deal. + * @type {string} + * @memberof UpdateDealParameters + */ + 'value'?: string; + /** + * Array of the deal labels IDs. + * @type {Array} + * @memberof UpdateDealParameters + */ + 'label'?: Array; + /** + * The currency of the deal. Accepts a 3-character currency code. + * @type {string} + * @memberof UpdateDealParameters + */ + 'currency'?: string; + /** + * The ID of the user which will be the new owner of the deal. + * @type {number} + * @memberof UpdateDealParameters + */ + 'user_id'?: number; + /** + * The ID of a person which this deal will be linked to. If the person does not exist yet, it needs to be created first. + * @type {number} + * @memberof UpdateDealParameters + */ + 'person_id'?: number; + /** + * The ID of an organization which this deal will be linked to. If the organization does not exist yet, it needs to be created first. + * @type {number} + * @memberof UpdateDealParameters + */ + 'org_id'?: number; + /** + * The ID of the pipeline this deal will be added to. By default, the deal will be added to the first stage of the specified pipeline. Please note that `pipeline_id` and `stage_id` should not be used together as `pipeline_id` will be ignored. + * @type {number} + * @memberof UpdateDealParameters + */ + 'pipeline_id'?: number; + /** + * The ID of the stage this deal will be added to. Please note that a pipeline will be assigned automatically based on the `stage_id`. + * @type {number} + * @memberof UpdateDealParameters + */ + 'stage_id'?: number; + /** + * open = Open, won = Won, lost = Lost, deleted = Deleted. + * @type {string} + * @memberof UpdateDealParameters + */ + 'status'?: UpdateDealParametersStatusConst; +} + +export const UpdateDealParametersStatusConst = { + open: 'open', + won: 'won', + lost: 'lost', + deleted: 'deleted' +} as const; + +export type UpdateDealParametersStatusConst = typeof UpdateDealParametersStatusConst[keyof typeof UpdateDealParametersStatusConst]; + + diff --git a/models/update-deal-product-request.ts b/models/update-deal-product-request.ts new file mode 100644 index 00000000..9d3dbe2a --- /dev/null +++ b/models/update-deal-product-request.ts @@ -0,0 +1,120 @@ +/* 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 + * @interface UpdateDealProductRequest + */ +export interface UpdateDealProductRequest { + /** + * The ID of the product to use + * @type {number} + * @memberof UpdateDealProductRequest + */ + 'product_id'?: number; + /** + * The price at which this product will be added to the deal + * @type {number} + * @memberof UpdateDealProductRequest + */ + 'item_price'?: number; + /** + * How many items of this product will be added to the deal + * @type {number} + * @memberof UpdateDealProductRequest + */ + 'quantity'?: number; + /** + * The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage. + * @type {number} + * @memberof UpdateDealProductRequest + */ + 'discount'?: number; + /** + * The type of the discount\'s value. + * @type {string} + * @memberof UpdateDealProductRequest + */ + 'discount_type'?: UpdateDealProductRequestDiscountTypeConst; + /** + * The duration of the product + * @type {number} + * @memberof UpdateDealProductRequest + */ + 'duration'?: number; + /** + * + * @type {string} + * @memberof UpdateDealProductRequest + */ + 'duration_unit'?: UpdateDealProductRequestDurationUnitConst; + /** + * The ID of the product variation to use. When omitted, no variation will be used. + * @type {number} + * @memberof UpdateDealProductRequest + */ + 'product_variation_id'?: number; + /** + * A textual comment associated with this product-deal attachment + * @type {string} + * @memberof UpdateDealProductRequest + */ + 'comments'?: string; + /** + * The tax percentage + * @type {number} + * @memberof UpdateDealProductRequest + */ + 'tax'?: number; + /** + * The tax option to be applied to the products. When using `inclusive`, the tax percentage will already be included in the price. When using `exclusive`, the tax will not be included in the price. When using `none`, no tax will be added. Use the `tax` field for defining the tax percentage amount. + * @type {string} + * @memberof UpdateDealProductRequest + */ + 'tax_method'?: UpdateDealProductRequestTaxMethodConst; + /** + * Whether the product is enabled for a deal or not. This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default. + * @type {boolean} + * @memberof UpdateDealProductRequest + */ + 'enabled_flag'?: boolean; +} + +export const UpdateDealProductRequestDiscountTypeConst = { + percentage: 'percentage', + amount: 'amount' +} as const; + +export type UpdateDealProductRequestDiscountTypeConst = typeof UpdateDealProductRequestDiscountTypeConst[keyof typeof UpdateDealProductRequestDiscountTypeConst]; +export const UpdateDealProductRequestDurationUnitConst = { + hourly: 'hourly', + daily: 'daily', + weekly: 'weekly', + monthly: 'monthly', + yearly: 'yearly' +} as const; + +export type UpdateDealProductRequestDurationUnitConst = typeof UpdateDealProductRequestDurationUnitConst[keyof typeof UpdateDealProductRequestDurationUnitConst]; +export const UpdateDealProductRequestTaxMethodConst = { + exclusive: 'exclusive', + inclusive: 'inclusive', + none: 'none' +} as const; + +export type UpdateDealProductRequestTaxMethodConst = typeof UpdateDealProductRequestTaxMethodConst[keyof typeof UpdateDealProductRequestTaxMethodConst]; + + diff --git a/models/update-deal-request.ts b/models/update-deal-request.ts new file mode 100644 index 00000000..cb09a641 --- /dev/null +++ b/models/update-deal-request.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BasicDeal } from './basic-deal'; +// May contain unused imports in some cases +// @ts-ignore +import { DealTitleParam } from './deal-title-param'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdateDealParameters } from './update-deal-parameters'; + +/** + * @type UpdateDealRequest + * @export + */ +export type UpdateDealRequest = BasicDeal & DealTitleParam & UpdateDealParameters; + + diff --git a/models/update-field-request.ts b/models/update-field-request.ts new file mode 100644 index 00000000..0aa7d4ac --- /dev/null +++ b/models/update-field-request.ts @@ -0,0 +1,42 @@ +/* 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 + * @interface UpdateFieldRequest + */ +export interface UpdateFieldRequest { + /** + * The name of the field + * @type {string} + * @memberof UpdateFieldRequest + */ + 'name'?: string; + /** + * When `field_type` is either set or enum, possible options must be supplied as a JSON-encoded sequential array of objects. All active items must be supplied and already existing items must have their ID supplied. New items only require a label. Example: `[{\"id\":123,\"label\":\"Existing Item\"},{\"label\":\"New Item\"}]` + * @type {Array} + * @memberof UpdateFieldRequest + */ + 'options'?: Array; + /** + * Whether the field is available in \'add new\' modal or not (both in web and mobile app) + * @type {boolean} + * @memberof UpdateFieldRequest + */ + 'add_visible_flag'?: boolean; +} + diff --git a/models/update-file-response200.ts b/models/update-file-response200.ts new file mode 100644 index 00000000..cbf426b2 --- /dev/null +++ b/models/update-file-response200.ts @@ -0,0 +1,39 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetFilesResponse200DataInner } from './get-files-response200-data-inner'; + +/** + * + * @export + * @interface UpdateFileResponse200 + */ +export interface UpdateFileResponse200 { + /** + * If the request was successful or not + * @type {boolean} + * @memberof UpdateFileResponse200 + */ + 'success'?: boolean; + /** + * + * @type {GetFilesResponse200DataInner} + * @memberof UpdateFileResponse200 + */ + 'data'?: GetFilesResponse200DataInner; +} + diff --git a/models/update-filter-request.ts b/models/update-filter-request.ts new file mode 100644 index 00000000..d91be35b --- /dev/null +++ b/models/update-filter-request.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface UpdateFilterRequest + */ +export interface UpdateFilterRequest { + /** + * The conditions of the filter as a JSON object. Please note that a maximum of 16 conditions is allowed per filter and `date` values must be supplied in the `YYYY-MM-DD` format. It requires a minimum structure as follows: `{\"glue\":\"and\",\"conditions\":[{\"glue\":\"and\",\"conditions\": [CONDITION_OBJECTS]},{\"glue\":\"or\",\"conditions\":[CONDITION_OBJECTS]}]}`. Replace `CONDITION_OBJECTS` with JSON objects of the following structure: `{\"object\":\"\",\"field_id\":\"\", \"operator\":\"\",\"value\":\"\", \"extra_value\":\"\"}` or leave the array empty. Depending on the object type you should use another API endpoint to get `field_id`. There are five types of objects you can choose from: `\"person\"`, `\"deal\"`, `\"organization\"`, `\"product\"`, `\"activity\"` and you can use these types of operators depending on what type of a field you have: `\"IS NOT NULL\"`, `\"IS NULL\"`, `\"<=\"`, `\">=\"`, `\"<\"`, `\">\"`, `\"!=\"`, `\"=\"`, `\"LIKE \'$%\'\"`, `\"LIKE \'%$%\'\"`, `\"NOT LIKE \'$%\'\"`. To get a better understanding of how filters work try creating them directly from the Pipedrive application. + * @type {object} + * @memberof UpdateFilterRequest + */ + 'conditions': object; + /** + * The name of the filter + * @type {string} + * @memberof UpdateFilterRequest + */ + 'name'?: string; +} + diff --git a/models/update-lead-label-request.ts b/models/update-lead-label-request.ts new file mode 100644 index 00000000..8d6aac91 --- /dev/null +++ b/models/update-lead-label-request.ts @@ -0,0 +1,48 @@ +/* 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 + * @interface UpdateLeadLabelRequest + */ +export interface UpdateLeadLabelRequest { + /** + * The name of the lead label + * @type {string} + * @memberof UpdateLeadLabelRequest + */ + 'name'?: string; + /** + * The color of the label. Only a subset of colors can be used. + * @type {string} + * @memberof UpdateLeadLabelRequest + */ + 'color'?: UpdateLeadLabelRequestColorConst; +} + +export const UpdateLeadLabelRequestColorConst = { + green: 'green', + blue: 'blue', + red: 'red', + yellow: 'yellow', + purple: 'purple', + gray: 'gray' +} as const; + +export type UpdateLeadLabelRequestColorConst = typeof UpdateLeadLabelRequestColorConst[keyof typeof UpdateLeadLabelRequestColorConst]; + + diff --git a/models/update-lead-request-value.ts b/models/update-lead-request-value.ts new file mode 100644 index 00000000..8046bf33 --- /dev/null +++ b/models/update-lead-request-value.ts @@ -0,0 +1,36 @@ +/* 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. + */ + + + +/** + * The potential value of the lead as a JSON object. It requires the following JSON structure: `{ \"amount\": 200, \"currency\": \"EUR\" }`. Both amount and currency are required. + * @export + * @interface UpdateLeadRequestValue + */ +export interface UpdateLeadRequestValue { + /** + * + * @type {number} + * @memberof UpdateLeadRequestValue + */ + 'amount': number; + /** + * + * @type {string} + * @memberof UpdateLeadRequestValue + */ + 'currency': string; +} + diff --git a/models/update-lead-request.ts b/models/update-lead-request.ts new file mode 100644 index 00000000..e1c691bc --- /dev/null +++ b/models/update-lead-request.ts @@ -0,0 +1,97 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { UpdateLeadRequestValue } from './update-lead-request-value'; + +/** + * + * @export + * @interface UpdateLeadRequest + */ +export interface UpdateLeadRequest { + /** + * The name of the lead + * @type {string} + * @memberof UpdateLeadRequest + */ + 'title'?: string | null; + /** + * The ID of the user which will be the owner of the created lead. If not provided, the user making the request will be used. + * @type {number} + * @memberof UpdateLeadRequest + */ + 'owner_id'?: number; + /** + * The IDs of the lead labels which will be associated with the lead + * @type {Array} + * @memberof UpdateLeadRequest + */ + 'label_ids'?: Array; + /** + * The ID of a person which this lead will be linked to. If the person does not exist yet, it needs to be created first. A lead always has to be linked to a person or organization or both. + * @type {number} + * @memberof UpdateLeadRequest + */ + 'person_id'?: number | null; + /** + * The ID of an organization which this lead will be linked to. If the organization does not exist yet, it needs to be created first. A lead always has to be linked to a person or organization or both. + * @type {number} + * @memberof UpdateLeadRequest + */ + 'organization_id'?: number | null; + /** + * A flag indicating whether the lead is archived or not + * @type {boolean} + * @memberof UpdateLeadRequest + */ + 'is_archived'?: boolean; + /** + * + * @type {UpdateLeadRequestValue} + * @memberof UpdateLeadRequest + */ + 'value'?: UpdateLeadRequestValue | null; + /** + * The date of when the deal which will be created from the lead is expected to be closed. In ISO 8601 format: YYYY-MM-DD. + * @type {string} + * @memberof UpdateLeadRequest + */ + 'expected_close_date'?: string | null; + /** + * + * @type {string} + * @memberof UpdateLeadRequest + */ + 'visible_to'?: UpdateLeadRequestVisibleToConst; + /** + * A flag indicating whether the lead was seen by someone in the Pipedrive UI + * @type {boolean} + * @memberof UpdateLeadRequest + */ + 'was_seen'?: boolean; +} + +export const UpdateLeadRequestVisibleToConst = { + _1: '1', + _3: '3', + _5: '5', + _7: '7' +} as const; + +export type UpdateLeadRequestVisibleToConst = typeof UpdateLeadRequestVisibleToConst[keyof typeof UpdateLeadRequestVisibleToConst]; + + diff --git a/models/update-mail-thread-details-response200-all-of.ts b/models/update-mail-thread-details-response200-all-of.ts new file mode 100644 index 00000000..6446b241 --- /dev/null +++ b/models/update-mail-thread-details-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseMailThread1 } from './base-mail-thread1'; + +/** + * + * @export + * @interface UpdateMailThreadDetailsResponse200AllOf + */ +export interface UpdateMailThreadDetailsResponse200AllOf { + /** + * + * @type {BaseMailThread1} + * @memberof UpdateMailThreadDetailsResponse200AllOf + */ + 'data'?: BaseMailThread1; +} + diff --git a/models/update-mail-thread-details-response200.ts b/models/update-mail-thread-details-response200.ts new file mode 100644 index 00000000..17f0082c --- /dev/null +++ b/models/update-mail-thread-details-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseMailThread1 } from './base-mail-thread1'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdateMailThreadDetailsResponse200AllOf } from './update-mail-thread-details-response200-all-of'; + +/** + * @type UpdateMailThreadDetailsResponse200 + * @export + */ +export type UpdateMailThreadDetailsResponse200 = BaseResponse & UpdateMailThreadDetailsResponse200AllOf; + + diff --git a/models/update-organization-relationship-response200.ts b/models/update-organization-relationship-response200.ts new file mode 100644 index 00000000..4918c347 --- /dev/null +++ b/models/update-organization-relationship-response200.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddOrganizationRelationshipResponse200AllOf } from './add-organization-relationship-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationRelationshipsResponse200AllOfRelatedObjects } from './get-organization-relationships-response200-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationRelationshipWithCalculatedFieldsAllOf } from './organization-relationship-with-calculated-fields-all-of'; + +/** + * @type UpdateOrganizationRelationshipResponse200 + * @export + */ +export type UpdateOrganizationRelationshipResponse200 = AddOrganizationRelationshipResponse200AllOf & BaseResponse; + + diff --git a/models/update-organization-request-all-of.ts b/models/update-organization-request-all-of.ts new file mode 100644 index 00000000..bd258af9 --- /dev/null +++ b/models/update-organization-request-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface UpdateOrganizationRequestAllOf + */ +export interface UpdateOrganizationRequestAllOf { + /** + * The name of the organization + * @type {string} + * @memberof UpdateOrganizationRequestAllOf + */ + 'name'?: string; +} + diff --git a/models/update-organization-request.ts b/models/update-organization-request.ts new file mode 100644 index 00000000..95f9d24f --- /dev/null +++ b/models/update-organization-request.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BasicOrganization } from './basic-organization'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdateOrganizationRequestAllOf } from './update-organization-request-all-of'; + +/** + * @type UpdateOrganizationRequest + * @export + */ +export type UpdateOrganizationRequest = BasicOrganization & UpdateOrganizationRequestAllOf; + + diff --git a/models/update-organization-response200-all-of.ts b/models/update-organization-response200-all-of.ts new file mode 100644 index 00000000..002088c5 --- /dev/null +++ b/models/update-organization-response200-all-of.ts @@ -0,0 +1,42 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseOrganizationItem } from './base-organization-item'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsResponse200AllOfRelatedObjects } from './get-organizations-response200-all-of-related-objects'; + +/** + * + * @export + * @interface UpdateOrganizationResponse200AllOf + */ +export interface UpdateOrganizationResponse200AllOf { + /** + * + * @type {BaseOrganizationItem} + * @memberof UpdateOrganizationResponse200AllOf + */ + 'data'?: BaseOrganizationItem; + /** + * + * @type {GetOrganizationsResponse200AllOfRelatedObjects} + * @memberof UpdateOrganizationResponse200AllOf + */ + 'related_objects'?: GetOrganizationsResponse200AllOfRelatedObjects; +} + diff --git a/models/update-organization-response200.ts b/models/update-organization-response200.ts new file mode 100644 index 00000000..40944efd --- /dev/null +++ b/models/update-organization-response200.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseOrganizationItem } from './base-organization-item'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsResponse200AllOfRelatedObjects } from './get-organizations-response200-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdateOrganizationResponse200AllOf } from './update-organization-response200-all-of'; + +/** + * @type UpdateOrganizationResponse200 + * @export + */ +export type UpdateOrganizationResponse200 = BaseResponse & UpdateOrganizationResponse200AllOf; + + diff --git a/models/update-person-request-all-of.ts b/models/update-person-request-all-of.ts new file mode 100644 index 00000000..381e9091 --- /dev/null +++ b/models/update-person-request-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface UpdatePersonRequestAllOf + */ +export interface UpdatePersonRequestAllOf { + /** + * The name of the person + * @type {string} + * @memberof UpdatePersonRequestAllOf + */ + 'name'?: string; +} + diff --git a/models/update-person-request.ts b/models/update-person-request.ts new file mode 100644 index 00000000..de069860 --- /dev/null +++ b/models/update-person-request.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BasicPersonRequest } from './basic-person-request'; +// May contain unused imports in some cases +// @ts-ignore +import { BasicPersonRequestEmailInner } from './basic-person-request-email-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItemAllOfPhoneInner } from './person-item-all-of-phone-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdatePersonRequestAllOf } from './update-person-request-all-of'; + +/** + * @type UpdatePersonRequest + * @export + */ +export type UpdatePersonRequest = BasicPersonRequest & UpdatePersonRequestAllOf; + + diff --git a/models/update-person-response200.ts b/models/update-person-response200.ts new file mode 100644 index 00000000..64a11bf2 --- /dev/null +++ b/models/update-person-response200.ts @@ -0,0 +1,35 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddPersonResponse200AllOf } from './add-person-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { ListProductsResponse200AllOfRelatedObjects } from './list-products-response200-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonItem } from './person-item'; + +/** + * @type UpdatePersonResponse200 + * @export + */ +export type UpdatePersonResponse200 = AddPersonResponse200AllOf & BaseResponse; + + diff --git a/models/update-pipeline-response200-all-of-data.ts b/models/update-pipeline-response200-all-of-data.ts new file mode 100644 index 00000000..bfcd0715 --- /dev/null +++ b/models/update-pipeline-response200-all-of-data.ts @@ -0,0 +1,27 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BasePipelineWithSelectedFlag } from './base-pipeline-with-selected-flag'; + +/** + * @type UpdatePipelineResponse200AllOfData + * The pipeline object + * @export + */ +export type UpdatePipelineResponse200AllOfData = BasePipelineWithSelectedFlag; + + diff --git a/models/update-pipeline-response200-all-of.ts b/models/update-pipeline-response200-all-of.ts new file mode 100644 index 00000000..7c6037c3 --- /dev/null +++ b/models/update-pipeline-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { UpdatePipelineResponse200AllOfData } from './update-pipeline-response200-all-of-data'; + +/** + * + * @export + * @interface UpdatePipelineResponse200AllOf + */ +export interface UpdatePipelineResponse200AllOf { + /** + * + * @type {UpdatePipelineResponse200AllOfData} + * @memberof UpdatePipelineResponse200AllOf + */ + 'data'?: UpdatePipelineResponse200AllOfData; +} + diff --git a/models/update-pipeline-response200.ts b/models/update-pipeline-response200.ts new file mode 100644 index 00000000..678b9d69 --- /dev/null +++ b/models/update-pipeline-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdatePipelineResponse200AllOf } from './update-pipeline-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdatePipelineResponse200AllOfData } from './update-pipeline-response200-all-of-data'; + +/** + * @type UpdatePipelineResponse200 + * @export + */ +export type UpdatePipelineResponse200 = BaseResponse & UpdatePipelineResponse200AllOf; + + diff --git a/models/update-product-field-response200.ts b/models/update-product-field-response200.ts new file mode 100644 index 00000000..c8d84213 --- /dev/null +++ b/models/update-product-field-response200.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface UpdateProductFieldResponse200 + */ +export interface UpdateProductFieldResponse200 { + /** + * The name of the field + * @type {string} + * @memberof UpdateProductFieldResponse200 + */ + 'name'?: string; + /** + * When `field_type` is either set or enum, possible options on update must be supplied as an array of objects each containing id and label, for example: [{\"id\":1, \"label\":\"red\"},{\"id\":2, \"label\":\"blue\"},{\"id\":3, \"label\":\"lilac\"}] + * @type {Array} + * @memberof UpdateProductFieldResponse200 + */ + 'options'?: Array; +} + diff --git a/models/update-product-response200.ts b/models/update-product-response200.ts new file mode 100644 index 00000000..650fb35b --- /dev/null +++ b/models/update-product-response200.ts @@ -0,0 +1,48 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponse200RelatedObjects } from './get-activities-response200-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { ListProductsResponse200AllOfDataInnerProduct } from './list-products-response200-all-of-data-inner-product'; + +/** + * + * @export + * @interface UpdateProductResponse200 + */ +export interface UpdateProductResponse200 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof UpdateProductResponse200 + */ + 'success'?: boolean; + /** + * + * @type {ListProductsResponse200AllOfDataInnerProduct} + * @memberof UpdateProductResponse200 + */ + 'data'?: ListProductsResponse200AllOfDataInnerProduct; + /** + * + * @type {GetActivitiesResponse200RelatedObjects} + * @memberof UpdateProductResponse200 + */ + 'related_objects'?: GetActivitiesResponse200RelatedObjects; +} + diff --git a/models/update-project-request.ts b/models/update-project-request.ts new file mode 100644 index 00000000..0f977f25 --- /dev/null +++ b/models/update-project-request.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { FullProjectObjectAllOf } from './full-project-object-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { FullProjectObjectAllOf1 } from './full-project-object-all-of1'; + +/** + * @type UpdateProjectRequest + * @export + */ +export type UpdateProjectRequest = FullProjectObjectAllOf & FullProjectObjectAllOf1; + + diff --git a/models/update-project-request1-all-of.ts b/models/update-project-request1-all-of.ts new file mode 100644 index 00000000..d3df5344 --- /dev/null +++ b/models/update-project-request1-all-of.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface UpdateProjectRequest1AllOf + */ +export interface UpdateProjectRequest1AllOf { + /** + * The title of the task + * @type {string} + * @memberof UpdateProjectRequest1AllOf + */ + 'title'?: string; + /** + * The ID of the project this task is associated with + * @type {number} + * @memberof UpdateProjectRequest1AllOf + */ + 'project_id'?: number; +} + diff --git a/models/update-project-request1-all-of1.ts b/models/update-project-request1-all-of1.ts new file mode 100644 index 00000000..4160caa4 --- /dev/null +++ b/models/update-project-request1-all-of1.ts @@ -0,0 +1,62 @@ +/* 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 + * @interface UpdateProjectRequest1AllOf1 + */ +export interface UpdateProjectRequest1AllOf1 { + /** + * The description of the task + * @type {string} + * @memberof UpdateProjectRequest1AllOf1 + */ + 'description'?: string; + /** + * The ID of a parent task. Can not be ID of a task which is already a subtask. + * @type {number} + * @memberof UpdateProjectRequest1AllOf1 + */ + 'parent_task_id'?: number; + /** + * The ID of the user who will be the assignee of the task + * @type {number} + * @memberof UpdateProjectRequest1AllOf1 + */ + 'assignee_id'?: number; + /** + * + * @type {number} + * @memberof UpdateProjectRequest1AllOf1 + */ + 'done'?: UpdateProjectRequest1AllOf1DoneConst; + /** + * The due date of the task. Format: YYYY-MM-DD. + * @type {string} + * @memberof UpdateProjectRequest1AllOf1 + */ + 'due_date'?: string; +} + +export const UpdateProjectRequest1AllOf1DoneConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type UpdateProjectRequest1AllOf1DoneConst = typeof UpdateProjectRequest1AllOf1DoneConst[keyof typeof UpdateProjectRequest1AllOf1DoneConst]; + + diff --git a/models/update-project-request1-all-of2.ts b/models/update-project-request1-all-of2.ts new file mode 100644 index 00000000..e9fd5017 --- /dev/null +++ b/models/update-project-request1-all-of2.ts @@ -0,0 +1,48 @@ +/* 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 + * @interface UpdateProjectRequest1AllOf2 + */ +export interface UpdateProjectRequest1AllOf2 { + /** + * The creator of a task + * @type {number} + * @memberof UpdateProjectRequest1AllOf2 + */ + 'creator_id'?: number; + /** + * The creation date and time of the task in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof UpdateProjectRequest1AllOf2 + */ + 'add_time'?: string; + /** + * The update date and time of the task in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof UpdateProjectRequest1AllOf2 + */ + 'update_time'?: string; + /** + * The marked as done date and time of the task in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof UpdateProjectRequest1AllOf2 + */ + 'marked_as_done_time'?: string; +} + diff --git a/models/update-project-request1.ts b/models/update-project-request1.ts new file mode 100644 index 00000000..d9dc67c4 --- /dev/null +++ b/models/update-project-request1.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { UpdateProjectRequest1AllOf } from './update-project-request1-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdateProjectRequest1AllOf1 } from './update-project-request1-all-of1'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdateProjectRequest1AllOf2 } from './update-project-request1-all-of2'; + +/** + * @type UpdateProjectRequest1 + * @export + */ +export type UpdateProjectRequest1 = UpdateProjectRequest1AllOf & UpdateProjectRequest1AllOf1 & UpdateProjectRequest1AllOf2; + + diff --git a/models/update-project-request2.ts b/models/update-project-request2.ts new file mode 100644 index 00000000..f240ccc6 --- /dev/null +++ b/models/update-project-request2.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { UpdateProjectRequest1AllOf } from './update-project-request1-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdateProjectRequest1AllOf1 } from './update-project-request1-all-of1'; + +/** + * @type UpdateProjectRequest2 + * @export + */ +export type UpdateProjectRequest2 = UpdateProjectRequest1AllOf & UpdateProjectRequest1AllOf1; + + diff --git a/models/update-project-response200.ts b/models/update-project-response200.ts new file mode 100644 index 00000000..5be7fed0 --- /dev/null +++ b/models/update-project-response200.ts @@ -0,0 +1,45 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ProjectResponseObject } from './project-response-object'; + +/** + * + * @export + * @interface UpdateProjectResponse200 + */ +export interface UpdateProjectResponse200 { + /** + * + * @type {boolean} + * @memberof UpdateProjectResponse200 + */ + 'success'?: boolean; + /** + * + * @type {ProjectResponseObject} + * @memberof UpdateProjectResponse200 + */ + 'data'?: ProjectResponseObject; + /** + * + * @type {object} + * @memberof UpdateProjectResponse200 + */ + 'additional_data'?: object | null; +} + diff --git a/models/update-recurring-subscription-request.ts b/models/update-recurring-subscription-request.ts new file mode 100644 index 00000000..175a6f13 --- /dev/null +++ b/models/update-recurring-subscription-request.ts @@ -0,0 +1,54 @@ +/* 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 + * @interface UpdateRecurringSubscriptionRequest + */ +export interface UpdateRecurringSubscriptionRequest { + /** + * All payments after that date will be affected. Format: YYYY-MM-DD + * @type {string} + * @memberof UpdateRecurringSubscriptionRequest + */ + 'effective_date': string; + /** + * The description of the recurring subscription + * @type {string} + * @memberof UpdateRecurringSubscriptionRequest + */ + 'description'?: string; + /** + * The amount of each payment + * @type {number} + * @memberof UpdateRecurringSubscriptionRequest + */ + 'cycle_amount'?: number; + /** + * Array of additional payments. It requires a minimum structure as follows: [{ amount:SUM, description:DESCRIPTION, due_at:PAYMENT_DATE }]. Replace SUM with a payment amount, DESCRIPTION with an explanation string, PAYMENT_DATE with a date (format YYYY-MM-DD). + * @type {Array} + * @memberof UpdateRecurringSubscriptionRequest + */ + 'payments'?: Array; + /** + * Indicates that the deal value must be set to recurring subscription\'s MRR value + * @type {boolean} + * @memberof UpdateRecurringSubscriptionRequest + */ + 'update_deal_value'?: boolean; +} + diff --git a/models/update-role-response200.ts b/models/update-role-response200.ts new file mode 100644 index 00000000..84e09c74 --- /dev/null +++ b/models/update-role-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddRoleResponse200AllOf } from './add-role-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { AddRoleResponse200AllOfData } from './add-role-response200-all-of-data'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; + +/** + * @type UpdateRoleResponse200 + * @export + */ +export type UpdateRoleResponse200 = AddRoleResponse200AllOf & BaseResponse; + + diff --git a/models/update-stage-request-all-of.ts b/models/update-stage-request-all-of.ts new file mode 100644 index 00000000..651daffa --- /dev/null +++ b/models/update-stage-request-all-of.ts @@ -0,0 +1,54 @@ +/* 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 + * @interface UpdateStageRequestAllOf + */ +export interface UpdateStageRequestAllOf { + /** + * The name of the stage + * @type {string} + * @memberof UpdateStageRequestAllOf + */ + 'name'?: string; + /** + * The ID of the pipeline to add stage to + * @type {number} + * @memberof UpdateStageRequestAllOf + */ + 'pipeline_id'?: number; + /** + * The success probability percentage of the deal. Used/shown when deal weighted values are used. + * @type {number} + * @memberof UpdateStageRequestAllOf + */ + 'deal_probability'?: number; + /** + * Whether deals in this stage can become rotten + * @type {boolean} + * @memberof UpdateStageRequestAllOf + */ + 'rotten_flag'?: boolean; + /** + * The number of days the deals not updated in this stage would become rotten. Applies only if the `rotten_flag` is set. + * @type {number} + * @memberof UpdateStageRequestAllOf + */ + 'rotten_days'?: number; +} + diff --git a/models/update-stage-request-all-of1.ts b/models/update-stage-request-all-of1.ts new file mode 100644 index 00000000..47290927 --- /dev/null +++ b/models/update-stage-request-all-of1.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface UpdateStageRequestAllOf1 + */ +export interface UpdateStageRequestAllOf1 { + /** + * An order number for this stage. Order numbers should be used to order the stages in the pipeline. + * @type {number} + * @memberof UpdateStageRequestAllOf1 + */ + 'order_nr'?: number; +} + diff --git a/models/update-stage-request.ts b/models/update-stage-request.ts new file mode 100644 index 00000000..10509180 --- /dev/null +++ b/models/update-stage-request.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { UpdateStageRequestAllOf } from './update-stage-request-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdateStageRequestAllOf1 } from './update-stage-request-all-of1'; + +/** + * @type UpdateStageRequest + * @export + */ +export type UpdateStageRequest = UpdateStageRequestAllOf & UpdateStageRequestAllOf1; + + diff --git a/models/update-subscription-installment-request.ts b/models/update-subscription-installment-request.ts new file mode 100644 index 00000000..f0f6a9d1 --- /dev/null +++ b/models/update-subscription-installment-request.ts @@ -0,0 +1,36 @@ +/* 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 + * @interface UpdateSubscriptionInstallmentRequest + */ +export interface UpdateSubscriptionInstallmentRequest { + /** + * Array of payments. It requires a minimum structure as follows: [{ amount:SUM, description:DESCRIPTION, due_at:PAYMENT_DATE }]. Replace SUM with a payment amount, DESCRIPTION with a explanation string, PAYMENT_DATE with a date (format YYYY-MM-DD). + * @type {Array} + * @memberof UpdateSubscriptionInstallmentRequest + */ + 'payments': Array; + /** + * Indicates that the deal value must be set to installment subscription\'s total value + * @type {boolean} + * @memberof UpdateSubscriptionInstallmentRequest + */ + 'update_deal_value'?: boolean; +} + diff --git a/models/update-task-response200.ts b/models/update-task-response200.ts new file mode 100644 index 00000000..e9ac5f29 --- /dev/null +++ b/models/update-task-response200.ts @@ -0,0 +1,45 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { TaskResponseObject } from './task-response-object'; + +/** + * + * @export + * @interface UpdateTaskResponse200 + */ +export interface UpdateTaskResponse200 { + /** + * + * @type {boolean} + * @memberof UpdateTaskResponse200 + */ + 'success'?: boolean; + /** + * + * @type {TaskResponseObject} + * @memberof UpdateTaskResponse200 + */ + 'data'?: TaskResponseObject; + /** + * + * @type {object} + * @memberof UpdateTaskResponse200 + */ + 'additional_data'?: object | null; +} + diff --git a/models/update-team-request-all-of.ts b/models/update-team-request-all-of.ts new file mode 100644 index 00000000..8c5cf93f --- /dev/null +++ b/models/update-team-request-all-of.ts @@ -0,0 +1,50 @@ +/* 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 + * @interface UpdateTeamRequestAllOf + */ +export interface UpdateTeamRequestAllOf { + /** + * + * @type {number} + * @memberof UpdateTeamRequestAllOf + */ + 'active_flag'?: UpdateTeamRequestAllOfActiveFlagConst; + /** + * + * @type {number} + * @memberof UpdateTeamRequestAllOf + */ + 'deleted_flag'?: UpdateTeamRequestAllOfDeletedFlagConst; +} + +export const UpdateTeamRequestAllOfActiveFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type UpdateTeamRequestAllOfActiveFlagConst = typeof UpdateTeamRequestAllOfActiveFlagConst[keyof typeof UpdateTeamRequestAllOfActiveFlagConst]; +export const UpdateTeamRequestAllOfDeletedFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type UpdateTeamRequestAllOfDeletedFlagConst = typeof UpdateTeamRequestAllOfDeletedFlagConst[keyof typeof UpdateTeamRequestAllOfDeletedFlagConst]; + + diff --git a/models/update-team-request.ts b/models/update-team-request.ts new file mode 100644 index 00000000..51d3959b --- /dev/null +++ b/models/update-team-request.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AddTeamRequest } from './add-team-request'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdateTeamRequestAllOf } from './update-team-request-all-of'; + +/** + * @type UpdateTeamRequest + * @export + */ +export type UpdateTeamRequest = AddTeamRequest & UpdateTeamRequestAllOf; + + diff --git a/models/update-team-with-additional-properties.ts b/models/update-team-with-additional-properties.ts new file mode 100644 index 00000000..a63ff3e9 --- /dev/null +++ b/models/update-team-with-additional-properties.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseTeamAdditionalProperties } from './base-team-additional-properties'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdateTeamRequest } from './update-team-request'; + +/** + * @type UpdateTeamWithAdditionalProperties + * @export + */ +export type UpdateTeamWithAdditionalProperties = BaseTeamAdditionalProperties & UpdateTeamRequest; + + diff --git a/models/update-user-request.ts b/models/update-user-request.ts new file mode 100644 index 00000000..41d73174 --- /dev/null +++ b/models/update-user-request.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface UpdateUserRequest + */ +export interface UpdateUserRequest { + /** + * Whether the user is active or not. `false` = Not activated, `true` = Activated + * @type {boolean} + * @memberof UpdateUserRequest + */ + 'active_flag': boolean; +} + diff --git a/models/updated-activity-plan-item200.ts b/models/updated-activity-plan-item200.ts new file mode 100644 index 00000000..5eb6ce84 --- /dev/null +++ b/models/updated-activity-plan-item200.ts @@ -0,0 +1,45 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetProjectPlanResponse200DataInner } from './get-project-plan-response200-data-inner'; + +/** + * + * @export + * @interface UpdatedActivityPlanItem200 + */ +export interface UpdatedActivityPlanItem200 { + /** + * + * @type {boolean} + * @memberof UpdatedActivityPlanItem200 + */ + 'success'?: boolean; + /** + * + * @type {GetProjectPlanResponse200DataInner} + * @memberof UpdatedActivityPlanItem200 + */ + 'data'?: GetProjectPlanResponse200DataInner; + /** + * + * @type {object} + * @memberof UpdatedActivityPlanItem200 + */ + 'additional_data'?: object | null; +} + diff --git a/models/updated-task-plan-item200.ts b/models/updated-task-plan-item200.ts new file mode 100644 index 00000000..1c510f53 --- /dev/null +++ b/models/updated-task-plan-item200.ts @@ -0,0 +1,45 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetProjectPlanResponse200DataInner } from './get-project-plan-response200-data-inner'; + +/** + * + * @export + * @interface UpdatedTaskPlanItem200 + */ +export interface UpdatedTaskPlanItem200 { + /** + * + * @type {boolean} + * @memberof UpdatedTaskPlanItem200 + */ + 'success'?: boolean; + /** + * + * @type {GetProjectPlanResponse200DataInner} + * @memberof UpdatedTaskPlanItem200 + */ + 'data'?: GetProjectPlanResponse200DataInner; + /** + * + * @type {object} + * @memberof UpdatedTaskPlanItem200 + */ + 'additional_data'?: object | null; +} + diff --git a/models/user-assignments-to-permission-set-response200-all-of-data-inner.ts b/models/user-assignments-to-permission-set-response200-all-of-data-inner.ts new file mode 100644 index 00000000..6387d356 --- /dev/null +++ b/models/user-assignments-to-permission-set-response200-all-of-data-inner.ts @@ -0,0 +1,42 @@ +/* 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 + * @interface UserAssignmentsToPermissionSetResponse200AllOfDataInner + */ +export interface UserAssignmentsToPermissionSetResponse200AllOfDataInner { + /** + * The ID of the user in the permission set + * @type {number} + * @memberof UserAssignmentsToPermissionSetResponse200AllOfDataInner + */ + 'user_id'?: number; + /** + * The ID of the permission set + * @type {string} + * @memberof UserAssignmentsToPermissionSetResponse200AllOfDataInner + */ + 'permission_set_id'?: string; + /** + * The name of the permission set + * @type {string} + * @memberof UserAssignmentsToPermissionSetResponse200AllOfDataInner + */ + 'name'?: string; +} + diff --git a/models/user-assignments-to-permission-set-response200-all-of.ts b/models/user-assignments-to-permission-set-response200-all-of.ts new file mode 100644 index 00000000..5366051b --- /dev/null +++ b/models/user-assignments-to-permission-set-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { UserAssignmentsToPermissionSetResponse200AllOfDataInner } from './user-assignments-to-permission-set-response200-all-of-data-inner'; + +/** + * + * @export + * @interface UserAssignmentsToPermissionSetResponse200AllOf + */ +export interface UserAssignmentsToPermissionSetResponse200AllOf { + /** + * An array of the assignments of the user + * @type {Array} + * @memberof UserAssignmentsToPermissionSetResponse200AllOf + */ + 'data'?: Array; +} + diff --git a/models/user-assignments-to-permission-set-response200.ts b/models/user-assignments-to-permission-set-response200.ts new file mode 100644 index 00000000..32b4361b --- /dev/null +++ b/models/user-assignments-to-permission-set-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { UserAssignmentsToPermissionSetResponse200AllOf } from './user-assignments-to-permission-set-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { UserAssignmentsToPermissionSetResponse200AllOfDataInner } from './user-assignments-to-permission-set-response200-all-of-data-inner'; + +/** + * @type UserAssignmentsToPermissionSetResponse200 + * @export + */ +export type UserAssignmentsToPermissionSetResponse200 = BaseResponse & UserAssignmentsToPermissionSetResponse200AllOf; + + diff --git a/models/user-connections-response200-all-of-data.ts b/models/user-connections-response200-all-of-data.ts new file mode 100644 index 00000000..0f9b7678 --- /dev/null +++ b/models/user-connections-response200-all-of-data.ts @@ -0,0 +1,30 @@ +/* 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. + */ + + + +/** + * The object of UserConnections + * @export + * @interface UserConnectionsResponse200AllOfData + */ +export interface UserConnectionsResponse200AllOfData { + /** + * The third party ID or false in case the ID is not found + * @type {string} + * @memberof UserConnectionsResponse200AllOfData + */ + 'google'?: string; +} + diff --git a/models/user-connections-response200-all-of.ts b/models/user-connections-response200-all-of.ts new file mode 100644 index 00000000..cbf2cfc8 --- /dev/null +++ b/models/user-connections-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { UserConnectionsResponse200AllOfData } from './user-connections-response200-all-of-data'; + +/** + * + * @export + * @interface UserConnectionsResponse200AllOf + */ +export interface UserConnectionsResponse200AllOf { + /** + * + * @type {UserConnectionsResponse200AllOfData} + * @memberof UserConnectionsResponse200AllOf + */ + 'data'?: UserConnectionsResponse200AllOfData; +} + diff --git a/models/user-connections-response200.ts b/models/user-connections-response200.ts new file mode 100644 index 00000000..7aa9ae6b --- /dev/null +++ b/models/user-connections-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { UserConnectionsResponse200AllOf } from './user-connections-response200-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { UserConnectionsResponse200AllOfData } from './user-connections-response200-all-of-data'; + +/** + * @type UserConnectionsResponse200 + * @export + */ +export type UserConnectionsResponse200 = BaseResponse & UserConnectionsResponse200AllOf; + + diff --git a/models/user-data-with-id-all-of.ts b/models/user-data-with-id-all-of.ts new file mode 100644 index 00000000..2272bc74 --- /dev/null +++ b/models/user-data-with-id-all-of.ts @@ -0,0 +1,60 @@ +/* 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 + * @interface UserDataWithIdAllOf + */ +export interface UserDataWithIdAllOf { + /** + * The ID of the user + * @type {number} + * @memberof UserDataWithIdAllOf + */ + 'id'?: number; + /** + * The name of the user + * @type {string} + * @memberof UserDataWithIdAllOf + */ + 'name'?: string; + /** + * The email of the user + * @type {string} + * @memberof UserDataWithIdAllOf + */ + 'email'?: string; + /** + * Whether the user has picture or not. 0 = No picture, 1 = Has picture. + * @type {number} + * @memberof UserDataWithIdAllOf + */ + 'has_pic'?: number; + /** + * The user picture hash + * @type {string} + * @memberof UserDataWithIdAllOf + */ + 'pic_hash'?: string | null; + /** + * Whether the user is active or not + * @type {boolean} + * @memberof UserDataWithIdAllOf + */ + 'active_flag'?: boolean; +} + diff --git a/models/user-data-with-id.ts b/models/user-data-with-id.ts new file mode 100644 index 00000000..bd1fcf94 --- /dev/null +++ b/models/user-data-with-id.ts @@ -0,0 +1,26 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { UserDataWithIdAllOf } from './user-data-with-id-all-of'; + +/** + * @type UserDataWithId + * @export + */ +export type UserDataWithId = UserDataWithIdAllOf; + + diff --git a/models/user-ids-all-of.ts b/models/user-ids-all-of.ts new file mode 100644 index 00000000..758224f7 --- /dev/null +++ b/models/user-ids-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface UserIdsAllOf + */ +export interface UserIdsAllOf { + /** + * The list of user IDs + * @type {Array} + * @memberof UserIdsAllOf + */ + 'data'?: Array; +} + diff --git a/models/user-ids.ts b/models/user-ids.ts new file mode 100644 index 00000000..39be2aff --- /dev/null +++ b/models/user-ids.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { UserIdsAllOf } from './user-ids-all-of'; + +/** + * @type UserIds + * @export + */ +export type UserIds = BaseResponse & UserIdsAllOf; + + diff --git a/models/user-response200-all-of.ts b/models/user-response200-all-of.ts new file mode 100644 index 00000000..1012d932 --- /dev/null +++ b/models/user-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetRecentsResponse200DataInnerAnyOf11Data } from './get-recents-response200-data-inner-any-of11-data'; + +/** + * + * @export + * @interface UserResponse200AllOf + */ +export interface UserResponse200AllOf { + /** + * + * @type {GetRecentsResponse200DataInnerAnyOf11Data} + * @memberof UserResponse200AllOf + */ + 'data'?: GetRecentsResponse200DataInnerAnyOf11Data; +} + diff --git a/models/user-response200.ts b/models/user-response200.ts new file mode 100644 index 00000000..02ea990a --- /dev/null +++ b/models/user-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRecentsResponse200DataInnerAnyOf11Data } from './get-recents-response200-data-inner-any-of11-data'; +// May contain unused imports in some cases +// @ts-ignore +import { UserResponse200AllOf } from './user-response200-all-of'; + +/** + * @type UserResponse200 + * @export + */ +export type UserResponse200 = BaseResponse & UserResponse200AllOf; + + diff --git a/models/users-response200-all-of.ts b/models/users-response200-all-of.ts new file mode 100644 index 00000000..b426dbde --- /dev/null +++ b/models/users-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetRecentsResponse200DataInnerAnyOf11Data } from './get-recents-response200-data-inner-any-of11-data'; + +/** + * + * @export + * @interface UsersResponse200AllOf + */ +export interface UsersResponse200AllOf { + /** + * + * @type {Array} + * @memberof UsersResponse200AllOf + */ + 'data'?: Array; +} + diff --git a/models/users-response200.ts b/models/users-response200.ts new file mode 100644 index 00000000..4ef109ff --- /dev/null +++ b/models/users-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRecentsResponse200DataInnerAnyOf11Data } from './get-recents-response200-data-inner-any-of11-data'; +// May contain unused imports in some cases +// @ts-ignore +import { UsersResponse200AllOf } from './users-response200-all-of'; + +/** + * @type UsersResponse200 + * @export + */ +export type UsersResponse200 = BaseResponse & UsersResponse200AllOf; + + diff --git a/models/webhook-response200-all-of.ts b/models/webhook-response200-all-of.ts new file mode 100644 index 00000000..29a065f7 --- /dev/null +++ b/models/webhook-response200-all-of.ts @@ -0,0 +1,33 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetWebhooksResponse200AllOfDataInner } from './get-webhooks-response200-all-of-data-inner'; + +/** + * + * @export + * @interface WebhookResponse200AllOf + */ +export interface WebhookResponse200AllOf { + /** + * + * @type {GetWebhooksResponse200AllOfDataInner} + * @memberof WebhookResponse200AllOf + */ + 'data'?: GetWebhooksResponse200AllOfDataInner; +} + diff --git a/models/webhook-response200.ts b/models/webhook-response200.ts new file mode 100644 index 00000000..d02e62ed --- /dev/null +++ b/models/webhook-response200.ts @@ -0,0 +1,32 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse200 } from './base-response200'; +// May contain unused imports in some cases +// @ts-ignore +import { GetWebhooksResponse200AllOfDataInner } from './get-webhooks-response200-all-of-data-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { WebhookResponse200AllOf } from './webhook-response200-all-of'; + +/** + * @type WebhookResponse200 + * @export + */ +export type WebhookResponse200 = BaseResponse200 & WebhookResponse200AllOf; + + diff --git a/models/webhooks-bad-request-response-all-of.ts b/models/webhooks-bad-request-response-all-of.ts new file mode 100644 index 00000000..0630597a --- /dev/null +++ b/models/webhooks-bad-request-response-all-of.ts @@ -0,0 +1,30 @@ +/* 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 + * @interface WebhooksBadRequestResponseAllOf + */ +export interface WebhooksBadRequestResponseAllOf { + /** + * List of errors + * @type {object} + * @memberof WebhooksBadRequestResponseAllOf + */ + 'errors'?: object; +} + diff --git a/models/webhooks-bad-request-response.ts b/models/webhooks-bad-request-response.ts new file mode 100644 index 00000000..cc79d0da --- /dev/null +++ b/models/webhooks-bad-request-response.ts @@ -0,0 +1,29 @@ +/* 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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse200 } from './base-response200'; +// May contain unused imports in some cases +// @ts-ignore +import { WebhooksBadRequestResponseAllOf } from './webhooks-bad-request-response-all-of'; + +/** + * @type WebhooksBadRequestResponse + * @export + */ +export type WebhooksBadRequestResponse = BaseResponse200 & WebhooksBadRequestResponseAllOf; + + diff --git a/tsconfig.esm.json b/tsconfig.esm.json new file mode 100644 index 00000000..2c0331cc --- /dev/null +++ b/tsconfig.esm.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "esnext", + "outDir": "dist/esm" + } +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..30dc264e --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "declaration": true, + "target": "ES6", + "module": "commonjs", + "noImplicitAny": true, + "outDir": "dist", + "rootDir": ".", + "moduleResolution": "node", + "typeRoots": [ + "node_modules/@types" + ] + }, + "exclude": [ + "dist", + "node_modules" + ] +}