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..8dad4a19 --- /dev/null +++ b/.openapi-generator/FILES @@ -0,0 +1,874 @@ +.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/meetings-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-all-of.ts +models/activity-all-of1.ts +models/activity-collection-response-object-all-of.ts +models/activity-collection-response-object.ts +models/activity-distribution-data-with-additional-data.ts +models/activity-distribution-data.ts +models/activity-distribution-item.ts +models/activity-distribution.ts +models/activity-type-count.ts +models/activity-type.ts +models/activity.ts +models/add-activity-request-all-of.ts +models/add-activity-request.ts +models/add-activity-response-additional-data.ts +models/add-activity-response-related-objects-person.ts +models/add-activity-response-related-objects.ts +models/add-activity-response.ts +models/add-activity-type-request.ts +models/add-call-log-request.ts +models/add-channel-bad-request-response-additional-data.ts +models/add-channel-bad-request-response.ts +models/add-channel-forbidden-error-response-additional-data.ts +models/add-channel-forbidden-error-response.ts +models/add-channel-request.ts +models/add-channel-response-data.ts +models/add-channel-response.ts +models/add-deal-follower-request.ts +models/add-deal-follower-response-data.ts +models/add-deal-follower-response.ts +models/add-deal-participant-request.ts +models/add-deal-product-request-all-of.ts +models/add-deal-product-request-all-of1.ts +models/add-deal-product-request-all-of2.ts +models/add-deal-product-request.ts +models/add-deal-request.ts +models/add-file-response.ts +models/add-filter-request.ts +models/add-filters-response-all-of.ts +models/add-filters-response.ts +models/add-goal-request.ts +models/add-lead-label-request.ts +models/add-lead-request.ts +models/add-new-follower-response-data.ts +models/add-new-follower-response.ts +models/add-note-request-all-of.ts +models/add-note-request-all-of1.ts +models/add-note-request.ts +models/add-or-update-role-setting-request.ts +models/add-organization-follower-request.ts +models/add-organization-follower-response.ts +models/add-organization-relationship-request.ts +models/add-organization-relationship-response-all-of.ts +models/add-organization-relationship-response.ts +models/add-organization-request-all-of.ts +models/add-organization-request.ts +models/add-organization-response-all-of.ts +models/add-organization-response.ts +models/add-participants-response-data.ts +models/add-participants-response-related-objects.ts +models/add-participants-response.ts +models/add-person-follower-request.ts +models/add-person-follower-response-all-of-data.ts +models/add-person-follower-response-all-of.ts +models/add-person-follower-response.ts +models/add-person-picture-response-all-of.ts +models/add-person-picture-response.ts +models/add-person-request-all-of.ts +models/add-person-request.ts +models/add-person-response-all-of.ts +models/add-person-response.ts +models/add-pipeline-response-all-of.ts +models/add-pipeline-response.ts +models/add-product-follower-request.ts +models/add-product-request-all-of.ts +models/add-product-request-all-of1.ts +models/add-product-request-all-of2.ts +models/add-product-request.ts +models/add-project-request-all-of.ts +models/add-project-request.ts +models/add-project-response.ts +models/add-recurring-subscription-request.ts +models/add-remote-file-and-link-it-to-item-response.ts +models/add-role-assignment-request.ts +models/add-role-assignment-response-data-data.ts +models/add-role-assignment-response-data.ts +models/add-role-assignment-response.ts +models/add-role-request.ts +models/add-roles-response-all-of.ts +models/add-roles-response-data.ts +models/add-roles-response.ts +models/add-stage-request.ts +models/add-subscription-installment-request.ts +models/add-task-request.ts +models/add-task-response.ts +models/add-team-request.ts +models/add-team-request1.ts +models/add-team-user-request.ts +models/add-user-provider-link-request.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-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-pipeline.ts +models/base-pipeline1.ts +models/base-product.ts +models/base-response-all-of.ts +models/base-response.ts +models/base-response1.ts +models/base-role-request.ts +models/base-stage.ts +models/base-stage1.ts +models/base-team-additional-properties.ts +models/base-team.ts +models/base-user.ts +models/base-webhook.ts +models/basic-deal-product-request-all-of.ts +models/basic-deal-product-request.ts +models/basic-deal.ts +models/basic-deal1.ts +models/basic-goal-request.ts +models/basic-organization.ts +models/basic-organization1.ts +models/basic-person-request-email-inner.ts +models/basic-person-request.ts +models/call-log-bad-request-response.ts +models/call-log-conflict-response.ts +models/call-log-forbidden-response.ts +models/call-log-gone-response.ts +models/call-log-internal-error-response.ts +models/call-log-not-found-response.ts +models/cancel-recurring-subscription-request.ts +models/comment-post-put-object.ts +models/comment.ts +models/create-field-request-all-of.ts +models/create-field-request-all-of1.ts +models/create-field-request.ts +models/deal-all-of-creator-user-id.ts +models/deal-all-of.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-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-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-product-request-body.ts +models/deal-product-request-body1.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/deal.ts +models/deals-count-and-activity-info.ts +models/delete-activities-response-data.ts +models/delete-activities-response.ts +models/delete-activity-response-data.ts +models/delete-activity-response.ts +models/delete-activity-types-response-all-of-data.ts +models/delete-activity-types-response-all-of.ts +models/delete-activity-types-response.ts +models/delete-channel200-response.ts +models/delete-comment-response.ts +models/delete-conversation-forbidden-error-response-additional-data.ts +models/delete-conversation-forbidden-error-response.ts +models/delete-conversation-not-found-error-response-additional-data.ts +models/delete-conversation-not-found-error-response.ts +models/delete-deal-follower-response-data.ts +models/delete-deal-follower-response.ts +models/delete-deal-participant-response-data.ts +models/delete-deal-participant-response.ts +models/delete-deal-product-response-data.ts +models/delete-deal-product-response.ts +models/delete-deal-response-data.ts +models/delete-deal-response.ts +models/delete-deals-response-data.ts +models/delete-deals-response.ts +models/delete-fields-response-all-of-data.ts +models/delete-fields-response-all-of.ts +models/delete-fields-response.ts +models/delete-file-response-data.ts +models/delete-file-response.ts +models/delete-filter-response-all-of-data.ts +models/delete-filter-response-all-of.ts +models/delete-filter-response.ts +models/delete-filters-response-all-of-data.ts +models/delete-filters-response-all-of.ts +models/delete-filters-response.ts +models/delete-goal-response.ts +models/delete-lead-id-response.ts +models/delete-mail-thread-response-all-of-data.ts +models/delete-mail-thread-response-all-of.ts +models/delete-mail-thread-response.ts +models/delete-note-response.ts +models/delete-organization-follower-response-data.ts +models/delete-organization-follower-response.ts +models/delete-organization-relationship-response-all-of-data.ts +models/delete-organization-relationship-response-all-of.ts +models/delete-organization-relationship-response.ts +models/delete-organization-response-data.ts +models/delete-organization-response.ts +models/delete-organizations-response-data.ts +models/delete-organizations-response.ts +models/delete-person-response-all-of-data.ts +models/delete-person-response-all-of.ts +models/delete-person-response.ts +models/delete-persons-response-all-of-data.ts +models/delete-persons-response-all-of.ts +models/delete-persons-response.ts +models/delete-pipeline-response-data.ts +models/delete-pipeline-response.ts +models/delete-product-field-response.ts +models/delete-product-fields-response-data.ts +models/delete-product-fields-response.ts +models/delete-product-follower-response.ts +models/delete-product-response-data.ts +models/delete-product-response.ts +models/delete-project-data.ts +models/delete-project-response.ts +models/delete-project.ts +models/delete-response-all-of-data.ts +models/delete-response-all-of.ts +models/delete-response.ts +models/delete-role-assignment-request.ts +models/delete-role-assignment-response-data.ts +models/delete-role-assignment-response.ts +models/delete-role-response-data-data.ts +models/delete-role-response-data.ts +models/delete-role-response.ts +models/delete-stage-response-data.ts +models/delete-stage-response.ts +models/delete-stages-response-data.ts +models/delete-stages-response.ts +models/delete-task-data.ts +models/delete-task-response.ts +models/delete-task.ts +models/delete-team-user-request.ts +models/delete-webhook403-response-all-of.ts +models/delete-webhook403-response.ts +models/fail-response.ts +models/field.ts +models/filter.ts +models/follower-data.ts +models/full-role-all-of.ts +models/full-role.ts +models/get-activities-collection-response-additional-data.ts +models/get-activities-collection-response.ts +models/get-activities-response-additional-data-pagination.ts +models/get-activities-response-additional-data.ts +models/get-activities-response-related-objects-person.ts +models/get-activities-response-related-objects-user.ts +models/get-activities-response-related-objects.ts +models/get-activities-response.ts +models/get-activity-response.ts +models/get-activity-types-response-all-of.ts +models/get-activity-types-response.ts +models/get-add-product-attachment-details-response-data-all-of-all-of-all-of.ts +models/get-add-product-attachment-details-response-data-all-of-all-of.ts +models/get-add-product-attachment-details-response-data-all-of-all-of1.ts +models/get-add-product-attachment-details-response-data-all-of.ts +models/get-add-product-attachment-details-response-data.ts +models/get-add-product-attachment-details-response.ts +models/get-added-deal-response.ts +models/get-associated-activities-response-all-of.ts +models/get-associated-activities-response.ts +models/get-associated-deals-response-all-of-related-objects.ts +models/get-associated-deals-response-all-of.ts +models/get-associated-deals-response.ts +models/get-associated-files-response-all-of-data-inner.ts +models/get-associated-files-response-all-of.ts +models/get-associated-files-response.ts +models/get-associated-followers-response-data-inner-all-of.ts +models/get-associated-followers-response-data-inner-all-of1.ts +models/get-associated-followers-response-data-inner.ts +models/get-associated-followers-response.ts +models/get-associated-mail-messages-response-all-of-data-inner.ts +models/get-associated-mail-messages-response-all-of.ts +models/get-associated-mail-messages-response.ts +models/get-associated-organization-updates-response-all-of-data-inner.ts +models/get-associated-organization-updates-response-all-of-related-objects.ts +models/get-associated-organization-updates-response-all-of.ts +models/get-associated-organization-updates-response.ts +models/get-associated-person-updates-response-all-of-data-inner.ts +models/get-associated-person-updates-response-all-of.ts +models/get-associated-person-updates-response.ts +models/get-associated-product-files-response-all-of-data-inner.ts +models/get-associated-product-files-response-all-of.ts +models/get-associated-product-files-response.ts +models/get-call-log-response.ts +models/get-call-logs-response-additional-data.ts +models/get-call-logs-response.ts +models/get-changelog-response-all-of-data-inner.ts +models/get-changelog-response-all-of.ts +models/get-changelog-response.ts +models/get-comments-response.ts +models/get-currencies-response-data-inner.ts +models/get-currencies-response.ts +models/get-current-user-response-all-of-data-all-of-language.ts +models/get-current-user-response-all-of-data-all-of.ts +models/get-current-user-response-all-of-data.ts +models/get-current-user-response-all-of.ts +models/get-current-user-response.ts +models/get-deal-activities-response-all-of-related-objects.ts +models/get-deal-activities-response-all-of.ts +models/get-deal-activities-response.ts +models/get-deal-participants-response.ts +models/get-deal-response-additional-data.ts +models/get-deal-response-related-objects.ts +models/get-deal-response.ts +models/get-deal-search-response-all-of-data-items-inner-item-organization.ts +models/get-deal-search-response-all-of-data-items-inner-item-owner.ts +models/get-deal-search-response-all-of-data-items-inner-item-person.ts +models/get-deal-search-response-all-of-data-items-inner-item-stage.ts +models/get-deal-search-response-all-of-data-items-inner-item.ts +models/get-deal-search-response-all-of-data-items-inner.ts +models/get-deal-search-response-all-of-data.ts +models/get-deal-search-response-all-of.ts +models/get-deal-search-response.ts +models/get-deal-updates-response-all-of-data-inner.ts +models/get-deal-updates-response-all-of-related-objects.ts +models/get-deal-updates-response-all-of.ts +models/get-deal-updates-response.ts +models/get-deals-collection-response.ts +models/get-deals-response-related-objects.ts +models/get-deals-response.ts +models/get-deals-summary-response-data-values-total.ts +models/get-deals-summary-response-data-weighted-values-total.ts +models/get-deals-summary-response-data.ts +models/get-deals-summary-response.ts +models/get-deals-timeline-response-data-totals.ts +models/get-deals-timeline-response-data.ts +models/get-deals-timeline-response.ts +models/get-duplicated-deal-response.ts +models/get-field-all-of.ts +models/get-field-response-all-of.ts +models/get-field-response.ts +models/get-field.ts +models/get-fields-response-all-of-additional-data.ts +models/get-fields-response-all-of.ts +models/get-fields-response.ts +models/get-file-response.ts +models/get-files-response-additional-data.ts +models/get-files-response-data-inner.ts +models/get-files-response.ts +models/get-filters-response-all-of-data-inner.ts +models/get-filters-response-all-of.ts +models/get-filters-response.ts +models/get-filters-response1-all-of.ts +models/get-filters-response1.ts +models/get-goal-result-response-data.ts +models/get-goal-result-response.ts +models/get-goals-response-data.ts +models/get-goals-response.ts +models/get-item-search-field-response-all-of-data-inner.ts +models/get-item-search-field-response-all-of.ts +models/get-item-search-field-response.ts +models/get-item-search-response-all-of-data.ts +models/get-item-search-response-all-of.ts +models/get-item-search-response.ts +models/get-lead-id-response-data.ts +models/get-lead-id-response.ts +models/get-lead-labels-response.ts +models/get-lead-response.ts +models/get-lead-search-response-all-of-data.ts +models/get-lead-search-response-all-of.ts +models/get-lead-search-response.ts +models/get-leads-response.ts +models/get-leads-source-response.ts +models/get-link-remote-file-to-item-response.ts +models/get-list-followers-response-all-of-data-inner.ts +models/get-list-followers-response-all-of.ts +models/get-list-followers-response.ts +models/get-mail-message-response-all-of.ts +models/get-mail-message-response.ts +models/get-mail-thread-messages-response-all-of-data-inner-all-of.ts +models/get-mail-thread-messages-response-all-of-data-inner.ts +models/get-mail-thread-messages-response-all-of.ts +models/get-mail-thread-messages-response.ts +models/get-mail-thread-response-all-of.ts +models/get-mail-thread-response.ts +models/get-mail-thread-response1-all-of-data.ts +models/get-mail-thread-response1-all-of.ts +models/get-mail-thread-response1.ts +models/get-merged-deal-response-data-all-of.ts +models/get-merged-deal-response-data.ts +models/get-merged-deal-response.ts +models/get-note-fields-response-all-of-data-inner-all-of-options-inner.ts +models/get-note-fields-response-all-of-data-inner-all-of.ts +models/get-note-fields-response-all-of-data-inner.ts +models/get-note-fields-response-all-of.ts +models/get-note-fields-response.ts +models/get-notes-response-additional-data-pagination.ts +models/get-notes-response-additional-data.ts +models/get-notes-response.ts +models/get-organization-item-all-of.ts +models/get-organization-item.ts +models/get-organization-relationship-response-all-of.ts +models/get-organization-relationship-response.ts +models/get-organization-relationships-response-all-of-related-objects.ts +models/get-organization-relationships-response-all-of.ts +models/get-organization-relationships-response.ts +models/get-organization-response-all-of-additional-data-followers-followeruserid.ts +models/get-organization-response-all-of-additional-data-followers-followeruseridall-of-all-of.ts +models/get-organization-response-all-of-additional-data-followers-followeruseridall-of.ts +models/get-organization-response-all-of-additional-data-followers.ts +models/get-organization-response-all-of-additional-data.ts +models/get-organization-response-all-of.ts +models/get-organization-response.ts +models/get-organization-search-response-all-of-data-items-inner-item.ts +models/get-organization-search-response-all-of-data-items-inner.ts +models/get-organization-search-response-all-of-data.ts +models/get-organization-search-response-all-of.ts +models/get-organization-search-response.ts +models/get-organizations-collection-response-object-all-of.ts +models/get-organizations-collection-response-object.ts +models/get-organizations-collection200-response.ts +models/get-organizations-response-all-of-related-objects.ts +models/get-organizations-response-all-of.ts +models/get-organizations-response.ts +models/get-participants-changelog-response.ts +models/get-payments-response-all-of-data-inner.ts +models/get-payments-response-all-of.ts +models/get-payments-response.ts +models/get-permission-set-response-all-of.ts +models/get-permission-set-response.ts +models/get-permission-sets-response-all-of.ts +models/get-permission-sets-response.ts +models/get-permitted-users-response.ts +models/get-permitted-users-response1-all-of.ts +models/get-permitted-users-response1.ts +models/get-person-details-response-all-of-additional-data.ts +models/get-person-details-response-all-of.ts +models/get-person-details-response.ts +models/get-person-products-response-all-of-data-inner-dealid.ts +models/get-person-products-response-all-of-data-inner-dealiddeal.ts +models/get-person-products-response-all-of-data-inner-dealidproduct.ts +models/get-person-products-response-all-of-data-inner.ts +models/get-person-products-response-all-of.ts +models/get-person-products-response.ts +models/get-person-search-response-all-of-data-items-inner-item-organization.ts +models/get-person-search-response-all-of-data-items-inner-item-owner.ts +models/get-person-search-response-all-of-data-items-inner-item.ts +models/get-person-search-response-all-of-data-items-inner.ts +models/get-person-search-response-all-of-data.ts +models/get-person-search-response-all-of.ts +models/get-person-search-response.ts +models/get-persons-collection200-response.ts +models/get-persons-response-all-of-related-objects.ts +models/get-persons-response-all-of.ts +models/get-persons-response.ts +models/get-persons-response1-all-of.ts +models/get-persons-response1.ts +models/get-pipeline-deals-conversion-rates-in-response-all-of-data-stage-conversions-inner.ts +models/get-pipeline-deals-conversion-rates-in-response-all-of-data.ts +models/get-pipeline-deals-conversion-rates-in-response-all-of.ts +models/get-pipeline-deals-conversion-rates-in-response.ts +models/get-pipeline-deals-movements-statistics-response-all-of-data-average-age-in-days-by-stages-inner.ts +models/get-pipeline-deals-movements-statistics-response-all-of-data-average-age-in-days.ts +models/get-pipeline-deals-movements-statistics-response-all-of-data-movements-between-stages.ts +models/get-pipeline-deals-movements-statistics-response-all-of-data-new-deals-formatted-values.ts +models/get-pipeline-deals-movements-statistics-response-all-of-data-new-deals-values.ts +models/get-pipeline-deals-movements-statistics-response-all-of-data-new-deals.ts +models/get-pipeline-deals-movements-statistics-response-all-of-data.ts +models/get-pipeline-deals-movements-statistics-response-all-of.ts +models/get-pipeline-deals-movements-statistics-response.ts +models/get-pipeline-response-all-of.ts +models/get-pipeline-response.ts +models/get-pipelines-response-all-of.ts +models/get-pipelines-response.ts +models/get-product-attachment-details-response-data.ts +models/get-product-attachment-details-response.ts +models/get-product-field-response-data.ts +models/get-product-field-response.ts +models/get-product-fields-response-data-inner.ts +models/get-product-fields-response.ts +models/get-product-followers-response-all-of-data-inner.ts +models/get-product-followers-response-all-of.ts +models/get-product-followers-response.ts +models/get-product-response.ts +models/get-product-search-response-all-of-data-items-inner-item-owner.ts +models/get-product-search-response-all-of-data-items-inner-item.ts +models/get-product-search-response-all-of-data-items-inner.ts +models/get-product-search-response-all-of-data.ts +models/get-product-search-response-all-of.ts +models/get-product-search-response.ts +models/get-products-response-all-of-additional-data-all-of.ts +models/get-products-response-all-of-additional-data.ts +models/get-products-response-all-of-related-objects.ts +models/get-products-response-all-of.ts +models/get-products-response.ts +models/get-products-response1-additional-data.ts +models/get-products-response1.ts +models/get-project-board-response.ts +models/get-project-boards-response-data-inner.ts +models/get-project-boards-response.ts +models/get-project-groups-response-data-inner.ts +models/get-project-groups-response.ts +models/get-project-phase-response.ts +models/get-project-phases-response-data-inner.ts +models/get-project-phases-response.ts +models/get-project-plan-response-data-inner.ts +models/get-project-plan-response.ts +models/get-project-response.ts +models/get-project-template-response.ts +models/get-project-templates-response.ts +models/get-projects-response.ts +models/get-receive-message-success-response.ts +models/get-recents-response-additional-data.ts +models/get-recents-response.ts +models/get-role-assignments-response-data.ts +models/get-role-assignments-response.ts +models/get-role-pipelines-response-all-of.ts +models/get-role-pipelines-response-data.ts +models/get-role-pipelines-response.ts +models/get-role-response-data-additional-data.ts +models/get-role-response-data.ts +models/get-role-response.ts +models/get-role-settings-response-data.ts +models/get-role-settings-response.ts +models/get-roles-response-all-of-additional-data-pagination.ts +models/get-roles-response-all-of-additional-data.ts +models/get-roles-response-all-of.ts +models/get-roles-response.ts +models/get-stage-deals-response.ts +models/get-stage-response-data.ts +models/get-stage-response.ts +models/get-stages-response-data-inner.ts +models/get-stages-response.ts +models/get-subscription-addons-response-all-of.ts +models/get-subscription-addons-response.ts +models/get-subscriptions-id-response-data.ts +models/get-subscriptions-id-response.ts +models/get-task-response.ts +models/get-tasks-response.ts +models/get-team-response-all-of.ts +models/get-team-response.ts +models/get-teams-response-all-of.ts +models/get-teams-response.ts +models/get-user-assignments-to-permission-set-response-all-of-data-inner.ts +models/get-user-assignments-to-permission-set-response-all-of.ts +models/get-user-assignments-to-permission-set-response.ts +models/get-user-connections-response-data-data.ts +models/get-user-connections-response-data.ts +models/get-user-connections-response.ts +models/get-user-permissions-response-all-of-data.ts +models/get-user-permissions-response-all-of.ts +models/get-user-permissions-response.ts +models/get-user-provider-link-success-response-data.ts +models/get-user-provider-link-success-response.ts +models/get-user-response-data.ts +models/get-user-response.ts +models/get-user-settings-response-data.ts +models/get-user-settings-response.ts +models/get-users-response-all-of.ts +models/get-users-response.ts +models/get-webhook-response-data.ts +models/get-webhook-response.ts +models/get-webhooks-response-all-of.ts +models/get-webhooks-response.ts +models/goal-assignee.ts +models/goal-duration.ts +models/goal-expected-outcome.ts +models/goal-type-params.ts +models/goal-type.ts +models/goal.ts +models/index.ts +models/lead-label.ts +models/lead-not-found-response.ts +models/lead-search-item-item-organization.ts +models/lead-search-item-item-owner.ts +models/lead-search-item-item-person.ts +models/lead-search-item-item.ts +models/lead-search-item.ts +models/lead-source.ts +models/lead-value.ts +models/lead.ts +models/mail-message-data-from-inner.ts +models/mail-message-data.ts +models/mail-message-item-for-list-all-of.ts +models/mail-message-item-for-list.ts +models/mail-service-base-response.ts +models/mail-thread-all-of.ts +models/mail-thread-all-of1-parties-to-inner.ts +models/mail-thread-all-of1-parties.ts +models/mail-thread-all-of1.ts +models/mail-thread.ts +models/mail-thread1.ts +models/merge-deals-request.ts +models/merge-organizations-request.ts +models/merge-organizations-response-data.ts +models/merge-organizations-response.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-response-all-of.ts +models/merge-persons-response.ts +models/new-deal-parameters.ts +models/note-deal.ts +models/note-organization.ts +models/note-person.ts +models/note-request-all-of.ts +models/note-request-all-of1.ts +models/note-request.ts +models/note-user.ts +models/note.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-data-with-id-all-of.ts +models/organization-data-with-id-all-of1.ts +models/organization-data-with-id-and-active-flag-all-of.ts +models/organization-data-with-id-and-active-flag.ts +models/organization-data-with-id.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/owner-all-of.ts +models/owner.ts +models/pagination-details-all-of.ts +models/pagination-details.ts +models/participant-changelog-item-all-of.ts +models/participant-changelog-item.ts +models/permission-set.ts +models/person-all-of-email-inner.ts +models/person-all-of-phone-inner.ts +models/person-all-of-picture-id.ts +models/person-all-of.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-data-with-active-flag-all-of.ts +models/person-data-with-active-flag.ts +models/person-data-with-id.ts +models/person-data-with-idall-of-email-inner.ts +models/person-data-with-idall-of.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/person.ts +models/persons-collection-response-object.ts +models/phone-data.ts +models/picture-data-pictures.ts +models/picture-data-with-id.ts +models/picture-data-with-value.ts +models/picture-data.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/product-field-all-of.ts +models/product-field-all-of1.ts +models/product-field.ts +models/product-list-item-product.ts +models/product-list-item.ts +models/product-prices.ts +models/product-request.ts +models/product-request1.ts +models/project-all-of.ts +models/project-all-of1.ts +models/project-all-of2.ts +models/project-id.ts +models/project-put-plan-item-body-object.ts +models/project-response-object.ts +models/project-template.ts +models/project.ts +models/put-role-pipelines-body.ts +models/receive-message-bad-request-error-response-additional-data.ts +models/receive-message-bad-request-error-response.ts +models/receive-message-request-attachments-inner.ts +models/receive-message-request.ts +models/recents-data-inner-any-of.ts +models/recents-data-inner-any-of1.ts +models/recents-data-inner-any-of10.ts +models/recents-data-inner-any-of2.ts +models/recents-data-inner-any-of3.ts +models/recents-data-inner-any-of4.ts +models/recents-data-inner-any-of5.ts +models/recents-data-inner-any-of6.ts +models/recents-data-inner-any-of7.ts +models/recents-data-inner-any-of8.ts +models/recents-data-inner-any-of9-data.ts +models/recents-data-inner-any-of9.ts +models/recents-data-inner.ts +models/recents-stage.ts +models/related-deal-data-dealid.ts +models/related-deal-data.ts +models/related-organization-data-with-active-flag.ts +models/related-organization-data.ts +models/related-picture-data-pictureid.ts +models/related-picture-data.ts +models/relationship-organization-info-item-all-of.ts +models/relationship-organization-info-item-with-active-flag-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-data.ts +models/role-assignment.ts +models/role-settings.ts +models/search-item.ts +models/stage-details-data.ts +models/stage-with-pipeline-info.ts +models/stage.ts +models/sub-role-all-of.ts +models/sub-role.ts +models/subscription-item.ts +models/task-response-object-all-of.ts +models/task-response-object.ts +models/team-id.ts +models/template-response-object.ts +models/unathorized-response.ts +models/update-activity-plan-item-response.ts +models/update-activity-request-all-of.ts +models/update-activity-request.ts +models/update-activity-response.ts +models/update-activity-type-request.ts +models/update-deal-parameters.ts +models/update-deal-product-request-all-of.ts +models/update-deal-product-request.ts +models/update-deal-request.ts +models/update-field-request.ts +models/update-file-response.ts +models/update-filter-request.ts +models/update-lead-label-request.ts +models/update-lead-request.ts +models/update-mail-thread-response-all-of.ts +models/update-mail-thread-response.ts +models/update-organization-relationship-response.ts +models/update-organization-request-all-of.ts +models/update-organization-request.ts +models/update-organization-response-all-of.ts +models/update-organization-response.ts +models/update-person-request-all-of.ts +models/update-person-request.ts +models/update-person-response.ts +models/update-pipeline-response-all-of-data.ts +models/update-pipeline-response-all-of.ts +models/update-pipeline-response.ts +models/update-product-field-response.ts +models/update-product-request-all-of.ts +models/update-product-request-all-of1.ts +models/update-product-request.ts +models/update-product-response.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-response.ts +models/update-recurring-subscription-request.ts +models/update-role-response-all-of.ts +models/update-role-response-data.ts +models/update-role-response.ts +models/update-stage-request-all-of.ts +models/update-stage-request.ts +models/update-subscription-installment-request.ts +models/update-task-plan-item-response.ts +models/update-task-response.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/upsert-activity-type-response-all-of.ts +models/upsert-activity-type-response.ts +models/upsert-comment-response.ts +models/upsert-goal-response-data.ts +models/upsert-goal-response.ts +models/upsert-lead-label-response.ts +models/upsert-note-response.ts +models/upsert-role-settings-response-data-data.ts +models/upsert-role-settings-response-data.ts +models/upsert-role-settings-response.ts +models/upsert-stage-response.ts +models/user-access.ts +models/user-access1.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-provider-link-error-response.ts +models/user-settings-item.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 b1e92fe8..70f06e55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ 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] +### Added +- Introduced a new client-nodejs library with full TypeScript support +- Added compatibility for both API v1 and v2 endpoints. See migration guide for more details ## [23.4.3] - 2024-11-22 ### Added diff --git a/README.md b/README.md index e752c7d0..1637d061 100644 --- a/README.md +++ b/README.md @@ -1,112 +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 PORT = 3000; + +// Configure Client with API key authorization +const apiConfig = new Configuration({ + apiKey: "YOUR_API_TOKEN_HERE", +}); app.listen(PORT, () => { console.log(`Listening on port ${PORT}`); }); -app.get('/', async (req, res) => { - try { - const apiClient = new pipedrive.ApiClient(); - - // Configure API key authorization: apiToken - let apiToken = apiClient.authentications.api_key; - apiToken.apiKey = 'YOUR_API_TOKEN_HERE'; - - const api = new pipedrive.DealsApi(apiClient); - const deals = await api.getDeals(); +app.get("/", async (req, res) => { + const dealsApi = new DealsApi(apiConfig); + const response = await dealsApi.getDeals(); + const { data: deals } = response; - return res.send(deals); - } catch (error) { - console.error('Error:', error); - - res.status(500).json({ - error: error.message, - }); - } + 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. @@ -117,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 @@ -142,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. @@ -172,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. @@ -240,72 +180,363 @@ 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 { Configuration, DealsApi, OAuth2Configuration } from "pipedrive"; +import cookieParser from "cookie-parser"; +import cookieSession from "cookie-session"; + const app = express(); -const cookieParser = require('cookie-parser'); -const cookieSession = require('cookie-session'); app.use(cookieParser()); -app.use( - cookieSession({ - name: 'session', - keys: ['key1'], - }), -); -const PORT = 1800; +app.use(cookieSession({ + name: "session", + keys: ["key1"] +})); + +const PORT = 3000; -const pipedrive = require('pipedrive'); + +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 +}); app.listen(PORT, () => { - console.log(`Listening on port ${PORT}`); + console.log(`Listening on port ${PORT}`); }); app.get('/', async (req, res) => { - const apiClient = new pipedrive.ApiClient(); +try { + // 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); + } - 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 - if ( - req.session.accessToken !== null && - req.session.accessToken !== undefined - ) { + 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 pipedrive.DealsApi(apiClient); - const deals = await api.getDeals(); + const dealsApi = new DealsApi(apiConfig) - res.send(deals); - } else { - const authUrl = apiClient.buildAuthorizationUrl(); + const response = await dealsApi.getDeals(); + const { data: deals } = response; - res.redirect(authUrl); - } + return res.send(deals); +} catch (error){ + console.error(error) + return res.status(500).send(error) +} }); -app.get('/callback', (req, res) => { - const authCode = req.query.code; - const promise = apiClient.authorize(authCode); - - promise.then( - () => { - req.session.accessToken = apiClient.authentications.oauth2.accessToken; - res.redirect('/'); - }, - (exception) => { - // error occurred, exception will be of type src/exceptions/OAuthProviderException - }, - ); +app.get('/callback', async (req, res) => { + try { + const authCode = req.query.code as string; + const newAccessToken = await oauth2.authorize(authCode); + + req.session.accessToken = newAccessToken; + return res.redirect("/"); + }catch (error) { + console.error(error) + return res.status(500).send(error) + } }); - - ``` +## 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 | getDealChangelog | **GET** /deals/{id}/changelog | List updates about deal field values +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 | getDealParticipantsChangelog | **GET** /deals/{id}/participantsChangelog | List updates about 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 +MeetingsApi | deleteUserProviderLink | **DELETE** /meetings/userProviderLinks/{id} | Delete the link between a user and the installed video call integration +MeetingsApi | saveUserProviderLink | **POST** /meetings/userProviderLinks | Link a user with the installed video call integration +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 | getOrganizationChangelog | **GET** /organizations/{id}/changelog | List updates about organization field values +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 | getPersonChangelog | **GET** /persons/{id}/changelog | List updates about person field values +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 @@ -331,1130 +562,29 @@ app.get('/callback', (req, res) => { - **Type**: OAuth - **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* | [**getDealChangelog**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealChangelog) | **GET** /deals/{id}/changelog | List updates about deal field values -*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* | [**getDealParticipantsChangelog**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealParticipantsChangelog) | **GET** /deals/{id}/participantsChangelog | List updates about 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.MeetingsApi* | [**deleteUserProviderLink**](https://github.com/pipedrive/client-nodejs/blob/master/docs/MeetingsApi.md#deleteUserProviderLink) | **DELETE** /meetings/userProviderLinks/{id} | Delete the link between a user and the installed video call integration -*Pipedrive.MeetingsApi* | [**saveUserProviderLink**](https://github.com/pipedrive/client-nodejs/blob/master/docs/MeetingsApi.md#saveUserProviderLink) | **POST** /meetings/userProviderLinks | Link a user with the installed video call integration -*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* | [**getOrganizationChangelog**](https://github.com/pipedrive/client-nodejs/blob/master/docs/OrganizationsApi.md#getOrganizationChangelog) | **GET** /organizations/{id}/changelog | List updates about organization field values -*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* | [**getPersonChangelog**](https://github.com/pipedrive/client-nodejs/blob/master/docs/PersonsApi.md#getPersonChangelog) | **GET** /persons/{id}/changelog | List updates about person field values -*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.AddActivityResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddActivityResponse.md) -- [Pipedrive.AddActivityResponseRelatedObjects](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddActivityResponseRelatedObjects.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.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.AddProductRequestBodyAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddProductRequestBodyAllOf.md) -- [Pipedrive.AddProjectResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddProjectResponse.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.AddTaskResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/AddTaskResponse.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.BasicDealProductAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/BasicDealProductAllOf.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.BillingFrequency](https://github.com/pipedrive/client-nodejs/blob/master/docs/BillingFrequency.md) -- [Pipedrive.BillingFrequency1](https://github.com/pipedrive/client-nodejs/blob/master/docs/BillingFrequency1.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.CallLogBadRequestResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/CallLogBadRequestResponse.md) -- [Pipedrive.CallLogConflictResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/CallLogConflictResponse.md) -- [Pipedrive.CallLogForbiddenResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/CallLogForbiddenResponse.md) -- [Pipedrive.CallLogGoneResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/CallLogGoneResponse.md) -- [Pipedrive.CallLogInternalErrorResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/CallLogInternalErrorResponse.md) -- [Pipedrive.CallLogNotFoundResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/CallLogNotFoundResponse.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.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.ChangelogResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/ChangelogResponse.md) -- [Pipedrive.ChangelogResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/ChangelogResponseAllOf.md) -- [Pipedrive.ChangelogResponseAllOfData](https://github.com/pipedrive/client-nodejs/blob/master/docs/ChangelogResponseAllOfData.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.DealParticipantsChangelog](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealParticipantsChangelog.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.DealProductRequestBody](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealProductRequestBody.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.DeleteActivitiesResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteActivitiesResponse.md) -- [Pipedrive.DeleteActivitiesResponseData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteActivitiesResponseData.md) -- [Pipedrive.DeleteActivityResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteActivityResponse.md) -- [Pipedrive.DeleteActivityResponseData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteActivityResponseData.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.DeleteGoalResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteGoalResponse.md) -- [Pipedrive.DeleteLeadIdResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteLeadIdResponse.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.DeletePipelineResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeletePipelineResponse.md) -- [Pipedrive.DeletePipelineResponseData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeletePipelineResponseData.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.DeleteProjectResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteProjectResponse.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.DeleteStageResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteStageResponse.md) -- [Pipedrive.DeleteStageResponseData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteStageResponseData.md) -- [Pipedrive.DeleteStagesResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteStagesResponse.md) -- [Pipedrive.DeleteStagesResponseData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteStagesResponseData.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.DeleteTaskResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/DeleteTaskResponse.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.GetActivitiesCollectionResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetActivitiesCollectionResponse.md) -- [Pipedrive.GetActivitiesResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetActivitiesResponse.md) -- [Pipedrive.GetActivitiesResponseRelatedObjects](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetActivitiesResponseRelatedObjects.md) -- [Pipedrive.GetActivityResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetActivityResponse.md) -- [Pipedrive.GetAddProductAttachmentDetails](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetAddProductAttachmentDetails.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.GetDealRelatedObjects](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDealRelatedObjects.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.GetField](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetField.md) -- [Pipedrive.GetFieldAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetFieldAllOf.md) -- [Pipedrive.GetGoalResultResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetGoalResultResponse.md) -- [Pipedrive.GetGoalsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetGoalsResponse.md) -- [Pipedrive.GetLeadIdResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetLeadIdResponse.md) -- [Pipedrive.GetLeadIdResponseData](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetLeadIdResponseData.md) -- [Pipedrive.GetLeadLabelsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetLeadLabelsResponse.md) -- [Pipedrive.GetLeadResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetLeadResponse.md) -- [Pipedrive.GetLeadsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetLeadsResponse.md) -- [Pipedrive.GetLeadsSourceResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetLeadsSourceResponse.md) -- [Pipedrive.GetLeadsSourceResponseData](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetLeadsSourceResponseData.md) -- [Pipedrive.GetMergedDeal](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetMergedDeal.md) -- [Pipedrive.GetNoteField](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetNoteField.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.GetProductAttachmentDetails](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProductAttachmentDetails.md) -- [Pipedrive.GetProductField](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProductField.md) -- [Pipedrive.GetProductFieldResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProductFieldResponse.md) -- [Pipedrive.GetProjectBoardResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProjectBoardResponse.md) -- [Pipedrive.GetProjectBoardsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProjectBoardsResponse.md) -- [Pipedrive.GetProjectGroupsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProjectGroupsResponse.md) -- [Pipedrive.GetProjectPhaseResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProjectPhaseResponse.md) -- [Pipedrive.GetProjectPhasesResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProjectPhasesResponse.md) -- [Pipedrive.GetProjectPlanResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProjectPlanResponse.md) -- [Pipedrive.GetProjectResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProjectResponse.md) -- [Pipedrive.GetProjectTemplateResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProjectTemplateResponse.md) -- [Pipedrive.GetProjectTemplatesResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProjectTemplatesResponse.md) -- [Pipedrive.GetProjectsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProjectsResponse.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.GetTaskResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetTaskResponse.md) -- [Pipedrive.GetTasksResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetTasksResponse.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.InternalFieldType](https://github.com/pipedrive/client-nodejs/blob/master/docs/InternalFieldType.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.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.LeadNotFoundResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadNotFoundResponse.md) -- [Pipedrive.LeadResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/LeadResponse.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.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.NameObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/NameObject.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.NewDealProductAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/NewDealProductAllOf.md) -- [Pipedrive.NewDealProductAllOf1](https://github.com/pipedrive/client-nodejs/blob/master/docs/NewDealProductAllOf1.md) -- [Pipedrive.NewDealProductAllOf2](https://github.com/pipedrive/client-nodejs/blob/master/docs/NewDealProductAllOf2.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.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.ParticipantsChangelog](https://github.com/pipedrive/client-nodejs/blob/master/docs/ParticipantsChangelog.md) -- [Pipedrive.ParticipantsChangelogItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/ParticipantsChangelogItem.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.PostDealParticipantsRelatedObjects](https://github.com/pipedrive/client-nodejs/blob/master/docs/PostDealParticipantsRelatedObjects.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.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.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.UpdateActivityPlanItemResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateActivityPlanItemResponse.md) -- [Pipedrive.UpdateActivityResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateActivityResponse.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.UpdateProjectResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateProjectResponse.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.UpdateTaskPlanItemResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateTaskPlanItemResponse.md) -- [Pipedrive.UpdateTaskResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateTaskResponse.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.UpsertGoalResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpsertGoalResponse.md) -- [Pipedrive.UpsertLeadLabelResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpsertLeadLabelResponse.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.UserProviderLinkCreateRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserProviderLinkCreateRequest.md) -- [Pipedrive.UserProviderLinkErrorResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserProviderLinkErrorResponse.md) -- [Pipedrive.UserProviderLinkSuccessResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserProviderLinkSuccessResponse.md) -- [Pipedrive.UserProviderLinkSuccessResponseData](https://github.com/pipedrive/client-nodejs/blob/master/docs/UserProviderLinkSuccessResponseData.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) - +- **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 diff --git a/api.ts b/api.ts new file mode 100644 index 00000000..87fef740 --- /dev/null +++ b/api.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 * 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/meetings-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..2c9bf4d4 --- /dev/null +++ b/api/activities-api.ts @@ -0,0 +1,886 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { AddActivityResponse } from '../models'; +// @ts-ignore +import { DeleteActivitiesResponse } from '../models'; +// @ts-ignore +import { DeleteActivityResponse } from '../models'; +// @ts-ignore +import { FailResponse } from '../models'; +// @ts-ignore +import { GetActivitiesCollectionResponse } from '../models'; +// @ts-ignore +import { GetActivitiesResponse } from '../models'; +// @ts-ignore +import { GetActivityResponse } from '../models'; +// @ts-ignore +import { UpdateActivityRequest } from '../models'; +// @ts-ignore +import { UpdateActivityResponse } 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.

***Starting from 30.09.2024, activity attendees will receive updates only if the activity owner has an active calendar sync*** + * @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).

***Starting from 30.09.2024, activity attendees will receive updates only if the activity owner has an active calendar sync*** + * @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) { + 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.

***Starting from 30.09.2024, activity attendees will receive updates only if the activity owner has an active calendar sync*** + * @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).

***Starting from 30.09.2024, activity attendees will receive updates only if the activity owner has an active calendar sync*** + * @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.

***Starting from 30.09.2024, activity attendees will receive updates only if the activity owner has an active calendar sync*** + * @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).

***Starting from 30.09.2024, activity attendees will receive updates only if the activity owner has an active calendar sync*** + * @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.

***Starting from 30.09.2024, activity attendees will receive updates only if the activity owner has an active calendar sync*** + * @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).

***Starting from 30.09.2024, activity attendees will receive updates only if the activity owner has an active calendar sync*** + * @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..d7b6024b --- /dev/null +++ b/api/activity-fields-api.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { GetFieldsResponse } 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) { + 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..5e0a1cda --- /dev/null +++ b/api/activity-types-api.ts @@ -0,0 +1,504 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { DeleteActivityTypesResponse } from '../models'; +// @ts-ignore +import { GetActivityTypesResponse } from '../models'; +// @ts-ignore +import { UpdateActivityTypeRequest } from '../models'; +// @ts-ignore +import { UpsertActivityTypeResponse } 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) { + 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..d2268d55 --- /dev/null +++ b/api/billing-api.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { GetSubscriptionAddonsResponse } 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) { + 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..531073b1 --- /dev/null +++ b/api/call-logs-api.ts @@ -0,0 +1,553 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { CallLogBadRequestResponse } from '../models'; +// @ts-ignore +import { CallLogConflictResponse } from '../models'; +// @ts-ignore +import { CallLogForbiddenResponse } from '../models'; +// @ts-ignore +import { CallLogGoneResponse } from '../models'; +// @ts-ignore +import { CallLogInternalErrorResponse } from '../models'; +// @ts-ignore +import { CallLogNotFoundResponse } from '../models'; +// @ts-ignore +import { GetCallLogResponse } from '../models'; +// @ts-ignore +import { GetCallLogsResponse } 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) { + 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..5067892d --- /dev/null +++ b/api/channels-api.ts @@ -0,0 +1,444 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { AddChannelBadRequestResponse } from '../models'; +// @ts-ignore +import { AddChannelForbiddenErrorResponse } from '../models'; +// @ts-ignore +import { AddChannelRequest } from '../models'; +// @ts-ignore +import { AddChannelResponse } from '../models'; +// @ts-ignore +import { DeleteChannel200Response } from '../models'; +// @ts-ignore +import { DeleteConversationForbiddenErrorResponse } from '../models'; +// @ts-ignore +import { DeleteConversationNotFoundErrorResponse } from '../models'; +// @ts-ignore +import { GetReceiveMessageSuccessResponse } from '../models'; +// @ts-ignore +import { ReceiveMessageBadRequestErrorResponse } 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) { + 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..95891c7d --- /dev/null +++ b/api/currencies-api.ts @@ -0,0 +1,151 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { GetCurrenciesResponse } 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) { + 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..0143883d --- /dev/null +++ b/api/deal-fields-api.ts @@ -0,0 +1,629 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { DeleteFieldsResponse } from '../models'; +// @ts-ignore +import { DeleteResponse } from '../models'; +// @ts-ignore +import { GetFieldResponse } from '../models'; +// @ts-ignore +import { GetFieldsResponse } 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) { + 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..d6412176 --- /dev/null +++ b/api/deals-api.ts @@ -0,0 +1,3642 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { AddDealFollowerResponse } from '../models'; +// @ts-ignore +import { AddDealParticipantRequest } from '../models'; +// @ts-ignore +import { AddDealProductRequest } from '../models'; +// @ts-ignore +import { AddDealRequest } from '../models'; +// @ts-ignore +import { AddParticipantsResponse } from '../models'; +// @ts-ignore +import { DeleteDealFollowerResponse } from '../models'; +// @ts-ignore +import { DeleteDealParticipantResponse } from '../models'; +// @ts-ignore +import { DeleteDealProductResponse } from '../models'; +// @ts-ignore +import { DeleteDealResponse } from '../models'; +// @ts-ignore +import { DeleteDealsResponse } from '../models'; +// @ts-ignore +import { FailResponse } from '../models'; +// @ts-ignore +import { GetAddProductAttachmentDetailsResponse } from '../models'; +// @ts-ignore +import { GetAddedDealResponse } from '../models'; +// @ts-ignore +import { GetAssociatedFilesResponse } from '../models'; +// @ts-ignore +import { GetAssociatedMailMessagesResponse } from '../models'; +// @ts-ignore +import { GetChangelogResponse } from '../models'; +// @ts-ignore +import { GetDealActivitiesResponse } from '../models'; +// @ts-ignore +import { GetDealParticipantsResponse } from '../models'; +// @ts-ignore +import { GetDealResponse } from '../models'; +// @ts-ignore +import { GetDealSearchResponse } from '../models'; +// @ts-ignore +import { GetDealUpdatesResponse } from '../models'; +// @ts-ignore +import { GetDealsCollectionResponse } from '../models'; +// @ts-ignore +import { GetDealsResponse } from '../models'; +// @ts-ignore +import { GetDealsSummaryResponse } from '../models'; +// @ts-ignore +import { GetDealsTimelineResponse } from '../models'; +// @ts-ignore +import { GetDuplicatedDealResponse } from '../models'; +// @ts-ignore +import { GetListFollowersResponse } from '../models'; +// @ts-ignore +import { GetMergedDealResponse } from '../models'; +// @ts-ignore +import { GetParticipantsChangelogResponse } from '../models'; +// @ts-ignore +import { GetPermittedUsersResponse } from '../models'; +// @ts-ignore +import { GetPersonsResponse } from '../models'; +// @ts-ignore +import { GetProductAttachmentDetailsResponse } from '../models'; +// @ts-ignore +import { GetProductsResponse } from '../models'; +// @ts-ignore +import { MergeDealsRequest } 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. All deals created through the Pipedrive API will have a `origin` set to `API`. 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` Not possible to delete the attached product if the deal has installments associated and the product is the last one enabled + * @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 updates about field values of a deal. + * @summary List updates about deal field values + * @param {number} id The ID of the deal + * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + getDealChangelog: async (id: number, cursor?: string, limit?: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getDealChangelog', 'id', id) + const localVarPath = `/deals/{id}/changelog` + .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 (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, + }; + }, + /** + * 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. Please note that a maximum value of 100 is allowed. + * @param {string} [sort] Supported fields: `id`, `update_time` + + * @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, + }; + }, + /** + * List updates about participants of a deal. This is a cursor-paginated endpoint. For more information, please refer to our documentation on pagination. + * @summary List updates about participants of a deal + * @param {number} id The ID of the deal + * @param {number} [limit] Items shown per page + * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page + + * @throws {RequiredError} + */ + getDealParticipantsChangelog: async (id: number, limit?: number, cursor?: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getDealParticipantsChangelog', 'id', id) + const localVarPath = `/deals/{id}/participantsChangelog` + .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 (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + + 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) { + const localVarAxiosParamCreator = DealsApiAxiosParamCreator(configuration) + return { + /** + * Adds a new deal. All deals created through the Pipedrive API will have a `origin` set to `API`. 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` Not possible to delete the attached product if the deal has installments associated and the product is the last one enabled + * @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 updates about field values of a deal. + * @summary List updates about deal field values + * @param {number} id The ID of the deal + * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + async getDealChangelog(id: number, cursor?: string, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getDealChangelog(id, cursor, limit, ); + 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. Please note that a maximum value of 100 is allowed. + * @param {string} [sort] Supported fields: `id`, `update_time` + + * @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); + }, + /** + * List updates about participants of a deal. This is a cursor-paginated endpoint. For more information, please refer to our documentation on pagination. + * @summary List updates about participants of a deal + * @param {number} id The ID of the deal + * @param {number} [limit] Items shown per page + * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page + + * @throws {RequiredError} + */ + async getDealParticipantsChangelog(id: number, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getDealParticipantsChangelog(id, limit, cursor, ); + 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. All deals created through the Pipedrive API will have a `origin` set to `API`. 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` Not possible to delete the attached product if the deal has installments associated and the product is the last one enabled + * @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 updates about field values of a deal. + * @summary List updates about deal field values + * @param {DealsApiGetDealChangelogRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getDealChangelog(requestParameters: DealsApiGetDealChangelogRequest, ): Promise { + return localVarFp.getDealChangelog(requestParameters.id, requestParameters.cursor, requestParameters.limit, ).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)); + }, + /** + * List updates about participants of a deal. This is a cursor-paginated endpoint. For more information, please refer to our documentation on pagination. + * @summary List updates about participants of a deal + * @param {DealsApiGetDealParticipantsChangelogRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getDealParticipantsChangelog(requestParameters: DealsApiGetDealParticipantsChangelogRequest, ): Promise { + return localVarFp.getDealParticipantsChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).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 getDealChangelog operation in DealsApi. + * @export + * @interface DealsApiGetDealChangelogRequest + */ +export interface DealsApiGetDealChangelogRequest { + /** + * The ID of the deal + * @type {number} + * @memberof DealsApiGetDealChangelog + */ + readonly id: number + + /** + * For pagination, the marker (an opaque string value) representing the first item on the next page + * @type {string} + * @memberof DealsApiGetDealChangelog + */ + readonly cursor?: string + + /** + * Items shown per page + * @type {number} + * @memberof DealsApiGetDealChangelog + */ + readonly limit?: number +} + +/** + * 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. Please note that a maximum value of 100 is allowed. + * @type {number} + * @memberof DealsApiGetDealFiles + */ + readonly limit?: number + + /** + * Supported fields: `id`, `update_time` + * @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 getDealParticipantsChangelog operation in DealsApi. + * @export + * @interface DealsApiGetDealParticipantsChangelogRequest + */ +export interface DealsApiGetDealParticipantsChangelogRequest { + /** + * The ID of the deal + * @type {number} + * @memberof DealsApiGetDealParticipantsChangelog + */ + readonly id: number + + /** + * Items shown per page + * @type {number} + * @memberof DealsApiGetDealParticipantsChangelog + */ + readonly limit?: number + + /** + * For pagination, the marker (an opaque string value) representing the first item on the next page + * @type {string} + * @memberof DealsApiGetDealParticipantsChangelog + */ + readonly cursor?: string +} + +/** + * 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. All deals created through the Pipedrive API will have a `origin` set to `API`. 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` Not possible to delete the attached product if the deal has installments associated and the product is the last one enabled + * @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 updates about field values of a deal. + * @summary List updates about deal field values + * @param {DealsApiGetDealChangelogRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof DealsApi + */ + public getDealChangelog(requestParameters: DealsApiGetDealChangelogRequest, ) { + return DealsApiFp(this.configuration).getDealChangelog(requestParameters.id, requestParameters.cursor, requestParameters.limit, ).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)); + } + + /** + * List updates about participants of a deal. This is a cursor-paginated endpoint. For more information, please refer to our documentation on pagination. + * @summary List updates about participants of a deal + * @param {DealsApiGetDealParticipantsChangelogRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof DealsApi + */ + public getDealParticipantsChangelog(requestParameters: DealsApiGetDealParticipantsChangelogRequest, ) { + return DealsApiFp(this.configuration).getDealParticipantsChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).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..196408b0 --- /dev/null +++ b/api/files-api.ts @@ -0,0 +1,1039 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { AddFileResponse } from '../models'; +// @ts-ignore +import { AddRemoteFileAndLinkItToItemResponse } from '../models'; +// @ts-ignore +import { DeleteFileResponse } from '../models'; +// @ts-ignore +import { GetFileResponse } from '../models'; +// @ts-ignore +import { GetFilesResponse } from '../models'; +// @ts-ignore +import { GetLinkRemoteFileToItemResponse } from '../models'; +// @ts-ignore +import { UpdateFileResponse } 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. Please note that a maximum value of 100 is allowed. + * @param {string} [sort] Supported fields: `id`, `update_time` + + * @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) { + 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. Please note that a maximum value of 100 is allowed. + * @param {string} [sort] Supported fields: `id`, `update_time` + + * @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. Please note that a maximum value of 100 is allowed. + * @type {number} + * @memberof FilesApiGetFiles + */ + readonly limit?: number + + /** + * Supported fields: `id`, `update_time` + * @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..e8cb5f85 --- /dev/null +++ b/api/filters-api.ts @@ -0,0 +1,685 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { AddFiltersResponse } from '../models'; +// @ts-ignore +import { DeleteFilterResponse } from '../models'; +// @ts-ignore +import { DeleteFiltersResponse } from '../models'; +// @ts-ignore +import { GetFiltersResponse } from '../models'; +// @ts-ignore +import { GetFiltersResponse1 } 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) { + 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..3b26d456 --- /dev/null +++ b/api/goals-api.ts @@ -0,0 +1,719 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { BasicGoalRequest } from '../models'; +// @ts-ignore +import { DeleteGoalResponse } from '../models'; +// @ts-ignore +import { GetGoalResultResponse } from '../models'; +// @ts-ignore +import { GetGoalsResponse } from '../models'; +// @ts-ignore +import { UpsertGoalResponse } 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) { + 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..74fd1595 --- /dev/null +++ b/api/item-search-api.ts @@ -0,0 +1,419 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { GetItemSearchFieldResponse } from '../models'; +// @ts-ignore +import { GetItemSearchResponse } 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) { + 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..733cd380 --- /dev/null +++ b/api/lead-labels-api.ts @@ -0,0 +1,415 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { DeleteLeadIdResponse } from '../models'; +// @ts-ignore +import { GetLeadLabelsResponse } from '../models'; +// @ts-ignore +import { LeadNotFoundResponse } from '../models'; +// @ts-ignore +import { UpdateLeadLabelRequest } from '../models'; +// @ts-ignore +import { UpsertLeadLabelResponse } 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) { + 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..fd1019be --- /dev/null +++ b/api/lead-sources-api.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { GetLeadsSourceResponse } 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) { + 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..a5430ec9 --- /dev/null +++ b/api/leads-api.ts @@ -0,0 +1,890 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { GetLeadIdResponse } from '../models'; +// @ts-ignore +import { GetLeadResponse } from '../models'; +// @ts-ignore +import { GetLeadSearchResponse } from '../models'; +// @ts-ignore +import { GetLeadsResponse } from '../models'; +// @ts-ignore +import { LeadNotFoundResponse } 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 and origin set to `API`. 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) { + 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 and origin set to `API`. 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 and origin set to `API`. 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 and origin set to `API`. 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..c6590feb --- /dev/null +++ b/api/legacy-teams-api.ts @@ -0,0 +1,869 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { GetTeamResponse } from '../models'; +// @ts-ignore +import { GetTeamsResponse } 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) { + 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..739e27fa --- /dev/null +++ b/api/mailbox-api.ts @@ -0,0 +1,711 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { DeleteMailThreadResponse } from '../models'; +// @ts-ignore +import { GetMailMessageResponse } from '../models'; +// @ts-ignore +import { GetMailThreadMessagesResponse } from '../models'; +// @ts-ignore +import { GetMailThreadResponse } from '../models'; +// @ts-ignore +import { GetMailThreadResponse1 } from '../models'; +// @ts-ignore +import { UpdateMailThreadResponse } 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) { + 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/meetings-api.ts b/api/meetings-api.ts new file mode 100644 index 00000000..145f73bb --- /dev/null +++ b/api/meetings-api.ts @@ -0,0 +1,242 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { AddUserProviderLinkRequest } from '../models'; +// @ts-ignore +import { GetUserProviderLinkSuccessResponse } from '../models'; +// @ts-ignore +import { UserProviderLinkErrorResponse } from '../models'; +/** + * MeetingsApi - axios parameter creator + * @export + */ +export const MeetingsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * A video calling provider must call this endpoint to remove the link between a user and the installed video calling app. + * @summary Delete the link between a user and the installed video call integration + * @param {string} id Unique identifier linking a user to the installed integration + + * @throws {RequiredError} + */ + deleteUserProviderLink: async (id: string, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteUserProviderLink', 'id', id) + const localVarPath = `/meetings/userProviderLinks/{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", ["video-calls"], configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * A video calling provider must call this endpoint after a user has installed the video calling app so that the new user\'s information is sent. + * @summary Link a user with the installed video call integration + * @param {AddUserProviderLinkRequest} [AddUserProviderLinkRequest] + + * @throws {RequiredError} + */ + saveUserProviderLink: async (AddUserProviderLinkRequest?: AddUserProviderLinkRequest, ): Promise => { + const localVarPath = `/meetings/userProviderLinks`; + // use dummy base URL string because the 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", ["video-calls"], configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, }; + localVarRequestOptions.data = serializeDataIfNeeded(AddUserProviderLinkRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + + +/** + * MeetingsApi - functional programming interface + * @export + */ +export const MeetingsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = MeetingsApiAxiosParamCreator(configuration) + return { + /** + * A video calling provider must call this endpoint to remove the link between a user and the installed video calling app. + * @summary Delete the link between a user and the installed video call integration + * @param {string} id Unique identifier linking a user to the installed integration + + * @throws {RequiredError} + */ + async deleteUserProviderLink(id: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUserProviderLink(id, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * A video calling provider must call this endpoint after a user has installed the video calling app so that the new user\'s information is sent. + * @summary Link a user with the installed video call integration + * @param {AddUserProviderLinkRequest} [AddUserProviderLinkRequest] + + * @throws {RequiredError} + */ + async saveUserProviderLink(AddUserProviderLinkRequest?: AddUserProviderLinkRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.saveUserProviderLink(AddUserProviderLinkRequest, ); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * MeetingsApi - factory interface + * @export + */ +export const MeetingsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = MeetingsApiFp(configuration) + return { + /** + * A video calling provider must call this endpoint to remove the link between a user and the installed video calling app. + * @summary Delete the link between a user and the installed video call integration + * @param {MeetingsApiDeleteUserProviderLinkRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + deleteUserProviderLink(requestParameters: MeetingsApiDeleteUserProviderLinkRequest, ): Promise { + return localVarFp.deleteUserProviderLink(requestParameters.id, ).then((request) => request(axios, basePath)); + }, + /** + * A video calling provider must call this endpoint after a user has installed the video calling app so that the new user\'s information is sent. + * @summary Link a user with the installed video call integration + * @param {MeetingsApiSaveUserProviderLinkRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + saveUserProviderLink(requestParameters: MeetingsApiSaveUserProviderLinkRequest = {}, ): Promise { + return localVarFp.saveUserProviderLink(requestParameters.AddUserProviderLinkRequest, ).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for deleteUserProviderLink operation in MeetingsApi. + * @export + * @interface MeetingsApiDeleteUserProviderLinkRequest + */ +export interface MeetingsApiDeleteUserProviderLinkRequest { + /** + * Unique identifier linking a user to the installed integration + * @type {string} + * @memberof MeetingsApiDeleteUserProviderLink + */ + readonly id: string +} + +/** + * Request parameters for saveUserProviderLink operation in MeetingsApi. + * @export + * @interface MeetingsApiSaveUserProviderLinkRequest + */ +export interface MeetingsApiSaveUserProviderLinkRequest { + /** + * + * @type {AddUserProviderLinkRequest} + * @memberof MeetingsApiSaveUserProviderLink + */ + readonly AddUserProviderLinkRequest?: AddUserProviderLinkRequest +} + +/** + * MeetingsApi - object-oriented interface + * @export + * @class MeetingsApi + * @extends {BaseAPI} + */ +export class MeetingsApi extends BaseAPI { + /** + * A video calling provider must call this endpoint to remove the link between a user and the installed video calling app. + * @summary Delete the link between a user and the installed video call integration + * @param {MeetingsApiDeleteUserProviderLinkRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof MeetingsApi + */ + public deleteUserProviderLink(requestParameters: MeetingsApiDeleteUserProviderLinkRequest, ) { + return MeetingsApiFp(this.configuration).deleteUserProviderLink(requestParameters.id, ).then((request) => request(this.axios, this.basePath)); + } + + /** + * A video calling provider must call this endpoint after a user has installed the video calling app so that the new user\'s information is sent. + * @summary Link a user with the installed video call integration + * @param {MeetingsApiSaveUserProviderLinkRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof MeetingsApi + */ + public saveUserProviderLink(requestParameters: MeetingsApiSaveUserProviderLinkRequest = {}, ) { + return MeetingsApiFp(this.configuration).saveUserProviderLink(requestParameters.AddUserProviderLinkRequest, ).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..ec8de174 --- /dev/null +++ b/api/note-fields-api.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { GetNoteFieldsResponse } 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) { + 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..f2d6d0ba --- /dev/null +++ b/api/notes-api.ts @@ -0,0 +1,1230 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { DeleteCommentResponse } from '../models'; +// @ts-ignore +import { DeleteNoteResponse } from '../models'; +// @ts-ignore +import { GetCommentsResponse } from '../models'; +// @ts-ignore +import { GetNotesResponse } from '../models'; +// @ts-ignore +import { NoteRequest } from '../models'; +// @ts-ignore +import { UpsertCommentResponse } from '../models'; +// @ts-ignore +import { UpsertNoteResponse } 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) { + 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..2dfc9ca6 --- /dev/null +++ b/api/organization-fields-api.ts @@ -0,0 +1,629 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { DeleteFieldsResponse } from '../models'; +// @ts-ignore +import { DeleteResponse } from '../models'; +// @ts-ignore +import { GetFieldResponse } from '../models'; +// @ts-ignore +import { GetFieldsResponse } 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) { + 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..c7fe6177 --- /dev/null +++ b/api/organization-relationships-api.ts @@ -0,0 +1,542 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { AddOrganizationRelationshipResponse } from '../models'; +// @ts-ignore +import { DeleteOrganizationRelationshipResponse } from '../models'; +// @ts-ignore +import { GetOrganizationRelationshipResponse } from '../models'; +// @ts-ignore +import { GetOrganizationRelationshipsResponse } from '../models'; +// @ts-ignore +import { OrganizationRelationship } from '../models'; +// @ts-ignore +import { UpdateOrganizationRelationshipResponse } 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) { + 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..8dfaf916 --- /dev/null +++ b/api/organizations-api.ts @@ -0,0 +1,2394 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { AddOrganizationFollowerResponse } from '../models'; +// @ts-ignore +import { AddOrganizationRequest } from '../models'; +// @ts-ignore +import { AddOrganizationResponse } from '../models'; +// @ts-ignore +import { DeleteOrganizationFollowerResponse } from '../models'; +// @ts-ignore +import { DeleteOrganizationResponse } from '../models'; +// @ts-ignore +import { DeleteOrganizationsResponse } from '../models'; +// @ts-ignore +import { FailResponse } from '../models'; +// @ts-ignore +import { GetAssociatedActivitiesResponse } from '../models'; +// @ts-ignore +import { GetAssociatedDealsResponse } from '../models'; +// @ts-ignore +import { GetAssociatedFilesResponse } from '../models'; +// @ts-ignore +import { GetAssociatedFollowersResponse } from '../models'; +// @ts-ignore +import { GetAssociatedMailMessagesResponse } from '../models'; +// @ts-ignore +import { GetAssociatedOrganizationUpdatesResponse } from '../models'; +// @ts-ignore +import { GetChangelogResponse } from '../models'; +// @ts-ignore +import { GetOrganizationResponse } from '../models'; +// @ts-ignore +import { GetOrganizationSearchResponse } from '../models'; +// @ts-ignore +import { GetOrganizationsCollection200Response } from '../models'; +// @ts-ignore +import { GetOrganizationsResponse } from '../models'; +// @ts-ignore +import { GetPermittedUsersResponse1 } from '../models'; +// @ts-ignore +import { GetPersonsResponse } from '../models'; +// @ts-ignore +import { MergeOrganizationsRequest } from '../models'; +// @ts-ignore +import { MergeOrganizationsResponse } from '../models'; +// @ts-ignore +import { UpdateOrganizationRequest } from '../models'; +// @ts-ignore +import { UpdateOrganizationResponse } 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 updates about field values of an organization. + * @summary List updates about organization field values + * @param {number} id The ID of the organization + * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + getOrganizationChangelog: async (id: number, cursor?: string, limit?: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getOrganizationChangelog', 'id', id) + const localVarPath = `/organizations/{id}/changelog` + .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 (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, + }; + }, + /** + * 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. Please note that a maximum value of 100 is allowed. + * @param {string} [sort] Supported fields: `id`, `update_time` + + * @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) { + 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 updates about field values of an organization. + * @summary List updates about organization field values + * @param {number} id The ID of the organization + * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + async getOrganizationChangelog(id: number, cursor?: string, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganizationChangelog(id, cursor, limit, ); + 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. Please note that a maximum value of 100 is allowed. + * @param {string} [sort] Supported fields: `id`, `update_time` + + * @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 updates about field values of an organization. + * @summary List updates about organization field values + * @param {OrganizationsApiGetOrganizationChangelogRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getOrganizationChangelog(requestParameters: OrganizationsApiGetOrganizationChangelogRequest, ): Promise { + return localVarFp.getOrganizationChangelog(requestParameters.id, requestParameters.cursor, requestParameters.limit, ).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 getOrganizationChangelog operation in OrganizationsApi. + * @export + * @interface OrganizationsApiGetOrganizationChangelogRequest + */ +export interface OrganizationsApiGetOrganizationChangelogRequest { + /** + * The ID of the organization + * @type {number} + * @memberof OrganizationsApiGetOrganizationChangelog + */ + readonly id: number + + /** + * For pagination, the marker (an opaque string value) representing the first item on the next page + * @type {string} + * @memberof OrganizationsApiGetOrganizationChangelog + */ + readonly cursor?: string + + /** + * Items shown per page + * @type {number} + * @memberof OrganizationsApiGetOrganizationChangelog + */ + readonly limit?: number +} + +/** + * 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. Please note that a maximum value of 100 is allowed. + * @type {number} + * @memberof OrganizationsApiGetOrganizationFiles + */ + readonly limit?: number + + /** + * Supported fields: `id`, `update_time` + * @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 updates about field values of an organization. + * @summary List updates about organization field values + * @param {OrganizationsApiGetOrganizationChangelogRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof OrganizationsApi + */ + public getOrganizationChangelog(requestParameters: OrganizationsApiGetOrganizationChangelogRequest, ) { + return OrganizationsApiFp(this.configuration).getOrganizationChangelog(requestParameters.id, requestParameters.cursor, requestParameters.limit, ).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..4505db33 --- /dev/null +++ b/api/permission-sets-api.ts @@ -0,0 +1,357 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { GetPermissionSetResponse } from '../models'; +// @ts-ignore +import { GetPermissionSetsResponse } from '../models'; +// @ts-ignore +import { GetUserAssignmentsToPermissionSetResponse } 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) { + 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..fa830bd9 --- /dev/null +++ b/api/person-fields-api.ts @@ -0,0 +1,629 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { DeleteFieldsResponse } from '../models'; +// @ts-ignore +import { DeleteResponse } from '../models'; +// @ts-ignore +import { GetFieldResponse } from '../models'; +// @ts-ignore +import { GetFieldsResponse } 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) { + 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..edfb766c --- /dev/null +++ b/api/persons-api.ts @@ -0,0 +1,2654 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { AddPersonFollowerResponse } from '../models'; +// @ts-ignore +import { AddPersonPictureResponse } from '../models'; +// @ts-ignore +import { AddPersonRequest } from '../models'; +// @ts-ignore +import { AddPersonResponse } from '../models'; +// @ts-ignore +import { DeletePersonResponse } from '../models'; +// @ts-ignore +import { DeletePersonsResponse } from '../models'; +// @ts-ignore +import { FailResponse } from '../models'; +// @ts-ignore +import { GetAssociatedActivitiesResponse } from '../models'; +// @ts-ignore +import { GetAssociatedDealsResponse } from '../models'; +// @ts-ignore +import { GetAssociatedFilesResponse } from '../models'; +// @ts-ignore +import { GetAssociatedMailMessagesResponse } from '../models'; +// @ts-ignore +import { GetAssociatedPersonUpdatesResponse } from '../models'; +// @ts-ignore +import { GetChangelogResponse } from '../models'; +// @ts-ignore +import { GetListFollowersResponse } from '../models'; +// @ts-ignore +import { GetPermittedUsersResponse1 } from '../models'; +// @ts-ignore +import { GetPersonDetailsResponse } from '../models'; +// @ts-ignore +import { GetPersonProductsResponse } from '../models'; +// @ts-ignore +import { GetPersonSearchResponse } from '../models'; +// @ts-ignore +import { GetPersonsCollection200Response } from '../models'; +// @ts-ignore +import { GetPersonsResponse1 } from '../models'; +// @ts-ignore +import { MergePersonsRequest } from '../models'; +// @ts-ignore +import { MergePersonsResponse } from '../models'; +// @ts-ignore +import { UpdatePersonRequest } from '../models'; +// @ts-ignore +import { UpdatePersonResponse } 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 updates about field values of a person. + * @summary List updates about person field values + * @param {number} id The ID of the person + * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + getPersonChangelog: async (id: number, cursor?: string, limit?: number, ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getPersonChangelog', 'id', id) + const localVarPath = `/persons/{id}/changelog` + .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 (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, + }; + }, + /** + * 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. Please note that a maximum value of 100 is allowed. + * @param {string} [sort] Supported fields: `id`, `update_time` + + * @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) { + 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 updates about field values of a person. + * @summary List updates about person field values + * @param {number} id The ID of the person + * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page + * @param {number} [limit] Items shown per page + + * @throws {RequiredError} + */ + async getPersonChangelog(id: number, cursor?: string, limit?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonChangelog(id, cursor, limit, ); + 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. Please note that a maximum value of 100 is allowed. + * @param {string} [sort] Supported fields: `id`, `update_time` + + * @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 updates about field values of a person. + * @summary List updates about person field values + * @param {PersonsApiGetPersonChangelogRequest} requestParameters Request parameters. + + * @throws {RequiredError} + */ + getPersonChangelog(requestParameters: PersonsApiGetPersonChangelogRequest, ): Promise { + return localVarFp.getPersonChangelog(requestParameters.id, requestParameters.cursor, requestParameters.limit, ).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 getPersonChangelog operation in PersonsApi. + * @export + * @interface PersonsApiGetPersonChangelogRequest + */ +export interface PersonsApiGetPersonChangelogRequest { + /** + * The ID of the person + * @type {number} + * @memberof PersonsApiGetPersonChangelog + */ + readonly id: number + + /** + * For pagination, the marker (an opaque string value) representing the first item on the next page + * @type {string} + * @memberof PersonsApiGetPersonChangelog + */ + readonly cursor?: string + + /** + * Items shown per page + * @type {number} + * @memberof PersonsApiGetPersonChangelog + */ + readonly limit?: number +} + +/** + * 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. Please note that a maximum value of 100 is allowed. + * @type {number} + * @memberof PersonsApiGetPersonFiles + */ + readonly limit?: number + + /** + * Supported fields: `id`, `update_time` + * @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 updates about field values of a person. + * @summary List updates about person field values + * @param {PersonsApiGetPersonChangelogRequest} requestParameters Request parameters. + + * @throws {RequiredError} + * @memberof PersonsApi + */ + public getPersonChangelog(requestParameters: PersonsApiGetPersonChangelogRequest, ) { + return PersonsApiFp(this.configuration).getPersonChangelog(requestParameters.id, requestParameters.cursor, requestParameters.limit, ).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..cc537827 --- /dev/null +++ b/api/pipelines-api.ts @@ -0,0 +1,986 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { AddPipelineResponse } from '../models'; +// @ts-ignore +import { DeletePipelineResponse } from '../models'; +// @ts-ignore +import { GetPipelineDealsConversionRatesInResponse } from '../models'; +// @ts-ignore +import { GetPipelineDealsMovementsStatisticsResponse } from '../models'; +// @ts-ignore +import { GetPipelineResponse } from '../models'; +// @ts-ignore +import { GetPipelinesResponse } from '../models'; +// @ts-ignore +import { GetStageDealsResponse } from '../models'; +// @ts-ignore +import { PipelineRequest } from '../models'; +// @ts-ignore +import { PipelineRequest1 } from '../models'; +// @ts-ignore +import { UpdatePipelineResponse } 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. If no parameters are provided open deals owned by the authorized user will be returned. + * @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) { + 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. If no parameters are provided open deals owned by the authorized user will be returned. + * @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. If no parameters are provided open deals owned by the authorized user will be returned. + * @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. If no parameters are provided open deals owned by the authorized user will be returned. + * @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..7088d374 --- /dev/null +++ b/api/product-fields-api.ts @@ -0,0 +1,631 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { DeleteProductFieldResponse } from '../models'; +// @ts-ignore +import { DeleteProductFieldsResponse } from '../models'; +// @ts-ignore +import { FailResponse } from '../models'; +// @ts-ignore +import { GetProductFieldResponse } from '../models'; +// @ts-ignore +import { GetProductFieldsResponse } from '../models'; +// @ts-ignore +import { ProductFieldAllOf } from '../models'; +// @ts-ignore +import { UpdateProductFieldResponse } 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 {UpdateProductFieldResponse} [UpdateProductFieldResponse] + + * @throws {RequiredError} + */ + updateProductField: async (id: number, UpdateProductFieldResponse?: UpdateProductFieldResponse, ): 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(UpdateProductFieldResponse, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + + +/** + * ProductFieldsApi - functional programming interface + * @export + */ +export const ProductFieldsApiFp = function(configuration?: Configuration) { + 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 {UpdateProductFieldResponse} [UpdateProductFieldResponse] + + * @throws {RequiredError} + */ + async updateProductField(id: number, UpdateProductFieldResponse?: UpdateProductFieldResponse, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateProductField(id, UpdateProductFieldResponse, ); + 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.UpdateProductFieldResponse, ).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 {UpdateProductFieldResponse} + * @memberof ProductFieldsApiUpdateProductField + */ + readonly UpdateProductFieldResponse?: UpdateProductFieldResponse +} + +/** + * 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.UpdateProductFieldResponse, ).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..b35b8133 --- /dev/null +++ b/api/products-api.ts @@ -0,0 +1,1431 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { AddNewFollowerResponse } from '../models'; +// @ts-ignore +import { AddProductFollowerRequest } from '../models'; +// @ts-ignore +import { AddProductRequest } from '../models'; +// @ts-ignore +import { DeleteProductFollowerResponse } from '../models'; +// @ts-ignore +import { DeleteProductResponse } from '../models'; +// @ts-ignore +import { GetAssociatedDealsResponse } from '../models'; +// @ts-ignore +import { GetAssociatedProductFilesResponse } from '../models'; +// @ts-ignore +import { GetProductFollowersResponse } from '../models'; +// @ts-ignore +import { GetProductResponse } from '../models'; +// @ts-ignore +import { GetProductSearchResponse } from '../models'; +// @ts-ignore +import { GetProductsResponse1 } from '../models'; +// @ts-ignore +import { UpdateProductRequest } from '../models'; +// @ts-ignore +import { UpdateProductResponse } 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. Please note that a maximum value of 100 is allowed. + * @param {string} [sort] Supported fields: `id`, `update_time` + + * @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 {UpdateProductRequest} [UpdateProductRequest] + + * @throws {RequiredError} + */ + updateProduct: async (id: number, UpdateProductRequest?: UpdateProductRequest, ): 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(UpdateProductRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + + +/** + * ProductsApi - functional programming interface + * @export + */ +export const ProductsApiFp = function(configuration?: Configuration) { + 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. Please note that a maximum value of 100 is allowed. + * @param {string} [sort] Supported fields: `id`, `update_time` + + * @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 {UpdateProductRequest} [UpdateProductRequest] + + * @throws {RequiredError} + */ + async updateProduct(id: number, UpdateProductRequest?: UpdateProductRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateProduct(id, UpdateProductRequest, ); + 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.UpdateProductRequest, ).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. Please note that a maximum value of 100 is allowed. + * @type {number} + * @memberof ProductsApiGetProductFiles + */ + readonly limit?: number + + /** + * Supported fields: `id`, `update_time` + * @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 {UpdateProductRequest} + * @memberof ProductsApiUpdateProduct + */ + readonly UpdateProductRequest?: UpdateProductRequest +} + +/** + * 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.UpdateProductRequest, ).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..f4130d19 --- /dev/null +++ b/api/project-templates-api.ts @@ -0,0 +1,434 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { GetProjectBoardResponse } from '../models'; +// @ts-ignore +import { GetProjectPhaseResponse } from '../models'; +// @ts-ignore +import { GetProjectTemplateResponse } from '../models'; +// @ts-ignore +import { GetProjectTemplatesResponse } 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) { + 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..fe9d0ff9 --- /dev/null +++ b/api/projects-api.ts @@ -0,0 +1,1432 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { AddProjectResponse } from '../models'; +// @ts-ignore +import { DeleteProjectResponse } from '../models'; +// @ts-ignore +import { GetActivitiesCollectionResponse } from '../models'; +// @ts-ignore +import { GetProjectBoardsResponse } from '../models'; +// @ts-ignore +import { GetProjectGroupsResponse } from '../models'; +// @ts-ignore +import { GetProjectPhasesResponse } from '../models'; +// @ts-ignore +import { GetProjectPlanResponse } from '../models'; +// @ts-ignore +import { GetProjectResponse } from '../models'; +// @ts-ignore +import { GetProjectsResponse } from '../models'; +// @ts-ignore +import { GetTasksResponse } from '../models'; +// @ts-ignore +import { ProjectPutPlanItemBodyObject } from '../models'; +// @ts-ignore +import { UpdateActivityPlanItemResponse } from '../models'; +// @ts-ignore +import { UpdateProjectRequest } from '../models'; +// @ts-ignore +import { UpdateProjectResponse } from '../models'; +// @ts-ignore +import { UpdateTaskPlanItemResponse } 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) { + 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..5c4b7c2b --- /dev/null +++ b/api/recents-api.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. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// 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 { GetRecentsResponse } 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) { + 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..3893de82 --- /dev/null +++ b/api/roles-api.ts @@ -0,0 +1,1263 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { AddRoleAssignmentRequest } from '../models'; +// @ts-ignore +import { AddRoleAssignmentResponse } from '../models'; +// @ts-ignore +import { AddRoleRequest } from '../models'; +// @ts-ignore +import { AddRolesResponse } from '../models'; +// @ts-ignore +import { BaseRoleRequest } from '../models'; +// @ts-ignore +import { DeleteRoleAssignmentRequest } from '../models'; +// @ts-ignore +import { DeleteRoleAssignmentResponse } from '../models'; +// @ts-ignore +import { DeleteRoleResponse } from '../models'; +// @ts-ignore +import { GetRoleAssignmentsResponse } from '../models'; +// @ts-ignore +import { GetRolePipelinesResponse } from '../models'; +// @ts-ignore +import { GetRoleResponse } from '../models'; +// @ts-ignore +import { GetRoleSettingsResponse } from '../models'; +// @ts-ignore +import { GetRolesResponse } from '../models'; +// @ts-ignore +import { PutRolePipelinesBody } from '../models'; +// @ts-ignore +import { UpdateRoleResponse } from '../models'; +// @ts-ignore +import { UpsertRoleSettingsResponse } 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) { + 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..25db90b8 --- /dev/null +++ b/api/stages-api.ts @@ -0,0 +1,812 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { DeleteStageResponse } from '../models'; +// @ts-ignore +import { DeleteStagesResponse } from '../models'; +// @ts-ignore +import { GetStageDealsResponse } from '../models'; +// @ts-ignore +import { GetStageResponse } from '../models'; +// @ts-ignore +import { GetStagesResponse } from '../models'; +// @ts-ignore +import { UpdateStageRequest } from '../models'; +// @ts-ignore +import { UpsertStageResponse } 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. If no parameters are provided open deals owned by the authorized user will be returned. + * @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) { + 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. If no parameters are provided open deals owned by the authorized user will be returned. + * @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. If no parameters are provided open deals owned by the authorized user will be returned. + * @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. If no parameters are provided open deals owned by the authorized user will be returned. + * @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..8d5ec4fb --- /dev/null +++ b/api/subscriptions-api.ts @@ -0,0 +1,902 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { GetPaymentsResponse } from '../models'; +// @ts-ignore +import { GetSubscriptionsIdResponse } 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) { + 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..7734cea4 --- /dev/null +++ b/api/tasks-api.ts @@ -0,0 +1,592 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { AddTaskResponse } from '../models'; +// @ts-ignore +import { DeleteTaskResponse } from '../models'; +// @ts-ignore +import { GetTaskResponse } from '../models'; +// @ts-ignore +import { GetTasksResponse } from '../models'; +// @ts-ignore +import { UpdateProjectRequest2 } from '../models'; +// @ts-ignore +import { UpdateTaskResponse } 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) { + 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..42165186 --- /dev/null +++ b/api/user-connections-api.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { GetUserConnectionsResponse } from '../models'; +// @ts-ignore +import { UnathorizedResponse } 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) { + 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..68d7fd18 --- /dev/null +++ b/api/user-settings-api.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { GetUserSettingsResponse } 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) { + 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..bb6e8e74 --- /dev/null +++ b/api/users-api.ts @@ -0,0 +1,974 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { GetCurrentUserResponse } from '../models'; +// @ts-ignore +import { GetRoleAssignmentsResponse } from '../models'; +// @ts-ignore +import { GetRoleSettingsResponse } from '../models'; +// @ts-ignore +import { GetUserPermissionsResponse } from '../models'; +// @ts-ignore +import { GetUserResponse } from '../models'; +// @ts-ignore +import { GetUsersResponse } from '../models'; +// @ts-ignore +import { UnathorizedResponse } from '../models'; +// @ts-ignore +import { UpdateUserRequest } from '../models'; +// @ts-ignore +import { UserIds } 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) { + 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..d8a98c65 --- /dev/null +++ b/api/webhooks-api.ts @@ -0,0 +1,317 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; +// 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 { BaseResponse } from '../models'; +// @ts-ignore +import { DeleteWebhook403Response } from '../models'; +// @ts-ignore +import { GetWebhookResponse } from '../models'; +// @ts-ignore +import { GetWebhooksResponse } from '../models'; +// @ts-ignore +import { UnathorizedResponse } 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) { + 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..df55d6d8 --- /dev/null +++ b/base.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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 { AxiosError, AxiosResponse, AxiosRequestConfig , InternalAxiosRequestConfig } from 'axios'; +import axios from 'axios'; +import { join, dirname } from 'path'; +import { existsSync } from 'fs'; + +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; +} + +const searchForPackageJson = (startPath: string): string | null => { + const filePath = join(startPath, 'package.json'); + + if (existsSync(filePath)) { + return filePath; + } + + const parentDir = dirname(startPath); + + // Stop if we've reached the root directory + if (parentDir.endsWith('/pipedrive') || parentDir === startPath) { + return null; + } + + return searchForPackageJson(parentDir); +}; + + +export const versionInterceptor = async (config:InternalAxiosRequestConfig) => { + let version:string; + try { + const path = searchForPackageJson(__dirname); + + version = path ? require(path).version : '22.x'; + } catch (error) { + version = '22.x'; + } + + config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`; + return config; +} + +export const responseInterceptor = (response: AxiosResponse) => { + return response?.data ? response.data: response; +}; + +export const errorInterceptor = (error: AxiosError) => { + if (error.response && error.response.data) { + return Promise.reject(error.response.data); + } + return Promise.reject(error); +}; + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + protected basePath: string = BASE_PATH; + protected axios = axios.create(); + constructor(configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + + this.axios.interceptors.response.use(responseInterceptor, errorInterceptor); + this.axios.interceptors.request.use(versionInterceptor); + } +}; + +/** + * + * @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..24db768f --- /dev/null +++ b/common.ts @@ -0,0 +1,148 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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'; + +/** + * + * @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..34cef856 --- /dev/null +++ b/configuration.ts @@ -0,0 +1,306 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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 axios from "axios"; +import { stringify } from "qs"; +import { errorInterceptor, responseInterceptor, versionInterceptor } from './base'; + +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; + host?:string; +}; + +export type ParamKey = keyof Parameters; + +export class OAuth2Configuration { + private axios = axios.create(); + private host: string; + 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'); + this.host = params.host || "https://oauth.pipedrive.com"; + + this.axios.interceptors.response.use(responseInterceptor, errorInterceptor); + this.axios.interceptors.request.use(versionInterceptor); + } + + 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 this.axios.post( + authorizationUrl, + stringify({ + code, + redirect_uri: this.redirectUri, + grant_type: "authorization_code", + }), + { + headers: { + "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 this.axios.post( + refreshUrl, + stringify({ + refresh_token: this.refreshToken, + grant_type: "refresh_token", + }), + { + headers: { + "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 this.axios.post( + revokeUrl, + stringify({ + token, + token_type_hint: tokenTypeHint + }),{ + headers: { + "Content-Type": "application/x-www-form-urlencoded", + 'Authorization': `Basic ${clientIdAndSecretInBase64}`, + + } + } + ); + + return response; + } + + 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-all-of.ts b/models/activity-all-of.ts new file mode 100644 index 00000000..1886bad0 --- /dev/null +++ b/models/activity-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 ActivityAllOf + */ +export interface ActivityAllOf { + /** + * The due date of the activity. Format: YYYY-MM-DD + * @type {string} + * @memberof ActivityAllOf + */ + 'due_date'?: string; + /** + * The due time of the activity in UTC. Format: HH:MM + * @type {string} + * @memberof ActivityAllOf + */ + 'due_time'?: string; + /** + * The duration of the activity. Format: HH:MM + * @type {string} + * @memberof ActivityAllOf + */ + 'duration'?: string; + /** + * The ID of the deal this activity is associated with + * @type {number} + * @memberof ActivityAllOf + */ + 'deal_id'?: number; + /** + * The ID of the lead in the UUID format this activity is associated with + * @type {string} + * @memberof ActivityAllOf + */ + 'lead_id'?: string | null; + /** + * The ID of the person this activity is associated with + * @type {number} + * @memberof ActivityAllOf + */ + 'person_id'?: number; + /** + * The ID of the project this activity is associated with + * @type {number} + * @memberof ActivityAllOf + */ + 'project_id'?: number | null; + /** + * The ID of the organization this activity is associated with + * @type {number} + * @memberof ActivityAllOf + */ + 'org_id'?: number; + /** + * The address of the activity. + * @type {string} + * @memberof ActivityAllOf + */ + '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 ActivityAllOf + */ + 'public_description'?: string; +} + diff --git a/models/activity-all-of1.ts b/models/activity-all-of1.ts new file mode 100644 index 00000000..f5339810 --- /dev/null +++ b/models/activity-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 ActivityAllOf1 + */ +export interface ActivityAllOf1 { + /** + * The ID of the activity, generated when the activity was created + * @type {number} + * @memberof ActivityAllOf1 + */ + 'id'?: number; + /** + * The note of the activity (HTML format) + * @type {string} + * @memberof ActivityAllOf1 + */ + 'note'?: string; + /** + * Whether the activity is done or not + * @type {boolean} + * @memberof ActivityAllOf1 + */ + 'done'?: boolean; + /** + * The subject of the activity + * @type {string} + * @memberof ActivityAllOf1 + */ + 'subject'?: string; + /** + * The type of the activity. This is in correlation with the `key_string` parameter of ActivityTypes. + * @type {string} + * @memberof ActivityAllOf1 + */ + 'type'?: string; + /** + * The ID of the user whom the activity is assigned to + * @type {number} + * @memberof ActivityAllOf1 + */ + 'user_id'?: number; + /** + * List of multiple persons (participants) this activity is associated with + * @type {Array} + * @memberof ActivityAllOf1 + */ + '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 ActivityAllOf1 + */ + 'busy_flag'?: boolean; + /** + * The attendees of the activity. This can be either your existing Pipedrive contacts or an external email address. + * @type {Array} + * @memberof ActivityAllOf1 + */ + 'attendees'?: Array | null; + /** + * The user\'s company ID + * @type {number} + * @memberof ActivityAllOf1 + */ + '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 ActivityAllOf1 + */ + 'reference_type'?: string; + /** + * Together with the `reference_type`, gives the ID of the other object + * @type {number} + * @memberof ActivityAllOf1 + */ + 'reference_id'?: number; + /** + * The ID of the Marketplace app, which is connected to this activity + * @type {string} + * @memberof ActivityAllOf1 + */ + 'conference_meeting_client'?: string; + /** + * The link to join the meeting which is associated with this activity + * @type {string} + * @memberof ActivityAllOf1 + */ + 'conference_meeting_url'?: string; + /** + * The meeting ID of the meeting provider (Zoom, MS Teams etc.) that is associated with this activity + * @type {string} + * @memberof ActivityAllOf1 + */ + 'conference_meeting_id'?: string; + /** + * The creation date and time of the activity in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof ActivityAllOf1 + */ + 'add_time'?: string; + /** + * The date and time this activity was marked as done. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof ActivityAllOf1 + */ + '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 ActivityAllOf1 + */ + '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 ActivityAllOf1 + */ + 'last_notification_user_id'?: number; + /** + * The ID of the language the notifications are sent in + * @type {number} + * @memberof ActivityAllOf1 + */ + 'notification_language_id'?: number; + /** + * Whether the activity is active or not + * @type {boolean} + * @memberof ActivityAllOf1 + */ + 'active_flag'?: boolean; + /** + * The last update date and time of the activity. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof ActivityAllOf1 + */ + 'update_time'?: string; + /** + * The ID of the user who was the last to update this activity + * @type {number} + * @memberof ActivityAllOf1 + */ + '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 ActivityAllOf1 + */ + '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 ActivityAllOf1 + */ + '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 ActivityAllOf1 + */ + '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 ActivityAllOf1 + */ + 'calendar_sync_include_context'?: string; + /** + * The timezone the activity was created in an external calendar + * @type {string} + * @memberof ActivityAllOf1 + */ + '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 ActivityAllOf1 + */ + '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 ActivityAllOf1 + */ + '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 ActivityAllOf1 + */ + '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 ActivityAllOf1 + */ + 'series'?: Array; + /** + * The ID of the user who created the activity + * @type {number} + * @memberof ActivityAllOf1 + */ + 'created_by_user_id'?: number; + /** + * A subfield of the location field. Indicates apartment/suite number. + * @type {string} + * @memberof ActivityAllOf1 + */ + 'location_subpremise'?: string; + /** + * A subfield of the location field. Indicates house number. + * @type {string} + * @memberof ActivityAllOf1 + */ + 'location_street_number'?: string; + /** + * A subfield of the location field. Indicates street name. + * @type {string} + * @memberof ActivityAllOf1 + */ + 'location_route'?: string; + /** + * A subfield of the location field. Indicates district/sublocality. + * @type {string} + * @memberof ActivityAllOf1 + */ + 'location_sublocality'?: string; + /** + * A subfield of the location field. Indicates city/town/village/locality. + * @type {string} + * @memberof ActivityAllOf1 + */ + 'location_locality'?: string; + /** + * A subfield of the location field. Indicates state/county. + * @type {string} + * @memberof ActivityAllOf1 + */ + 'location_admin_area_level_1'?: string; + /** + * A subfield of the location field. Indicates region. + * @type {string} + * @memberof ActivityAllOf1 + */ + 'location_admin_area_level_2'?: string; + /** + * A subfield of the location field. Indicates country. + * @type {string} + * @memberof ActivityAllOf1 + */ + 'location_country'?: string; + /** + * A subfield of the location field. Indicates ZIP/postal code. + * @type {string} + * @memberof ActivityAllOf1 + */ + 'location_postal_code'?: string; + /** + * A subfield of the location field. Indicates full/combined address. + * @type {string} + * @memberof ActivityAllOf1 + */ + 'location_formatted_address'?: string; + /** + * The name of the organization this activity is associated with + * @type {string} + * @memberof ActivityAllOf1 + */ + 'org_name'?: string; + /** + * The name of the person this activity is associated with + * @type {string} + * @memberof ActivityAllOf1 + */ + 'person_name'?: string; + /** + * The name of the deal this activity is associated with + * @type {string} + * @memberof ActivityAllOf1 + */ + 'deal_title'?: string; + /** + * The name of the user this activity is owned by + * @type {string} + * @memberof ActivityAllOf1 + */ + 'owner_name'?: string; + /** + * The BCC email address of the person + * @type {string} + * @memberof ActivityAllOf1 + */ + 'person_dropbox_bcc'?: string; + /** + * The BCC email address of the deal + * @type {string} + * @memberof ActivityAllOf1 + */ + 'deal_dropbox_bcc'?: string; + /** + * The ID of the user to whom the activity is assigned to. Equal to `user_id`. + * @type {number} + * @memberof ActivityAllOf1 + */ + '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 ActivityAllOf1 + */ + 'file'?: object; +} + 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..0375bcd8 --- /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 { ActivityAllOf } from './activity-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { ActivityCollectionResponseObjectAllOf } from './activity-collection-response-object-all-of'; + +/** + * @type ActivityCollectionResponseObject + * @export + */ +export type ActivityCollectionResponseObject = ActivityAllOf & ActivityCollectionResponseObjectAllOf; + + 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..5b4a17a5 --- /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 { ActivityDistribution } from './activity-distribution'; +// May contain unused imports in some cases +// @ts-ignore +import { ActivityDistributionData } from './activity-distribution-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; + +/** + * @type ActivityDistributionDataWithAdditionalData + * @export + */ +export type ActivityDistributionDataWithAdditionalData = ActivityDistributionData & GetFieldsResponseAllOfAdditionalData; + + diff --git a/models/activity-distribution-data.ts b/models/activity-distribution-data.ts new file mode 100644 index 00000000..67bdcfa4 --- /dev/null +++ b/models/activity-distribution-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 { ActivityDistribution } from './activity-distribution'; + +/** + * + * @export + * @interface ActivityDistributionData + */ +export interface ActivityDistributionData { + /** + * + * @type {ActivityDistribution} + * @memberof ActivityDistributionData + */ + 'activity_distribution'?: ActivityDistribution; +} + diff --git a/models/activity-distribution-item.ts b/models/activity-distribution-item.ts new file mode 100644 index 00000000..2ec95fae --- /dev/null +++ b/models/activity-distribution-item.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 { ActivityTypeCount } from './activity-type-count'; + +/** + * The ID of the user + * @export + * @interface ActivityDistributionItem + */ +export interface ActivityDistributionItem { + /** + * + * @type {ActivityTypeCount} + * @memberof ActivityDistributionItem + */ + 'activities'?: ActivityTypeCount; + /** + * The name of the user + * @type {string} + * @memberof ActivityDistributionItem + */ + 'name'?: string; + /** + * The overall count of activities for the user + * @type {number} + * @memberof ActivityDistributionItem + */ + 'activity_count'?: number; + /** + * The percentage of activities belongs to the user + * @type {number} + * @memberof ActivityDistributionItem + */ + 'share'?: number; +} + diff --git a/models/activity-distribution.ts b/models/activity-distribution.ts new file mode 100644 index 00000000..4d963294 --- /dev/null +++ b/models/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 { ActivityDistributionItem } from './activity-distribution-item'; + +/** + * The distribution of activities related to the organization grouped by the user ID + * @export + * @interface ActivityDistribution + */ +export interface ActivityDistribution { + /** + * + * @type {ActivityDistributionItem} + * @memberof ActivityDistribution + */ + 'ASSIGNED_TO_USER_ID'?: ActivityDistributionItem; +} + diff --git a/models/activity-type-count.ts b/models/activity-type-count.ts new file mode 100644 index 00000000..d43d95b6 --- /dev/null +++ b/models/activity-type-count.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 ActivityTypeCount + */ +export interface ActivityTypeCount { + /** + * The count of activities related to a specific type + * @type {number} + * @memberof ActivityTypeCount + */ + 'ACTIVITY_TYPE_NAME'?: number; +} + diff --git a/models/activity-type.ts b/models/activity-type.ts new file mode 100644 index 00000000..8fad34a0 --- /dev/null +++ b/models/activity-type.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 ActivityType + */ +export interface ActivityType { + /** + * The ID of the activity type + * @type {number} + * @memberof ActivityType + */ + 'id'?: number; + /** + * The name of the activity type + * @type {string} + * @memberof ActivityType + */ + 'name'?: string; + /** + * Icon graphic to use for representing this activity type + * @type {string} + * @memberof ActivityType + */ + 'icon_key'?: ActivityTypeIconKeyConst; + /** + * A designated color for the activity type in 6-character HEX format (e.g. `FFFFFF` for white, `000000` for black) + * @type {string} + * @memberof ActivityType + */ + '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 ActivityType + */ + '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 ActivityType + */ + 'key_string'?: string; + /** + * The active flag of the activity type + * @type {boolean} + * @memberof ActivityType + */ + 'active_flag'?: boolean; + /** + * Whether the activity type is a custom one or not + * @type {boolean} + * @memberof ActivityType + */ + 'is_custom_flag'?: boolean; + /** + * The creation time of the activity type + * @type {string} + * @memberof ActivityType + */ + 'add_time'?: string; + /** + * The update time of the activity type + * @type {string} + * @memberof ActivityType + */ + 'update_time'?: string; +} + +export const ActivityTypeIconKeyConst = { + 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 ActivityTypeIconKeyConst = typeof ActivityTypeIconKeyConst[keyof typeof ActivityTypeIconKeyConst]; + + diff --git a/models/activity.ts b/models/activity.ts new file mode 100644 index 00000000..291194d9 --- /dev/null +++ b/models/activity.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 { ActivityAllOf } from './activity-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { ActivityAllOf1 } from './activity-all-of1'; + +/** + * @type Activity + * @export + */ +export type Activity = ActivityAllOf & ActivityAllOf1; + + 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..4cfd3672 --- /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 { ActivityAllOf } from './activity-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 = ActivityAllOf & AddActivityRequestAllOf; + + diff --git a/models/add-activity-response-additional-data.ts b/models/add-activity-response-additional-data.ts new file mode 100644 index 00000000..d389c908 --- /dev/null +++ b/models/add-activity-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 AddActivityResponseAdditionalData + */ +export interface AddActivityResponseAdditionalData { + /** + * This field will be deprecated + * @type {number} + * @memberof AddActivityResponseAdditionalData + */ + 'updates_story_id'?: number; +} + diff --git a/models/add-activity-response-related-objects-person.ts b/models/add-activity-response-related-objects-person.ts new file mode 100644 index 00000000..6f775baa --- /dev/null +++ b/models/add-activity-response-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 { PersonDataWithActiveFlag } from './person-data-with-active-flag'; + +/** + * + * @export + * @interface AddActivityResponseRelatedObjectsPerson + */ +export interface AddActivityResponseRelatedObjectsPerson { + /** + * + * @type {PersonDataWithActiveFlag} + * @memberof AddActivityResponseRelatedObjectsPerson + */ + 'PERSON_ID'?: PersonDataWithActiveFlag; +} + diff --git a/models/add-activity-response-related-objects.ts b/models/add-activity-response-related-objects.ts new file mode 100644 index 00000000..92590a4e --- /dev/null +++ b/models/add-activity-response-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 { AddActivityResponseRelatedObjectsPerson } from './add-activity-response-related-objects-person'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponseRelatedObjectsUser } from './get-activities-response-related-objects-user'; +// May contain unused imports in some cases +// @ts-ignore +import { RelatedDealData } from './related-deal-data'; +// May contain unused imports in some cases +// @ts-ignore +import { RelatedOrganizationDataWithActiveFlag } from './related-organization-data-with-active-flag'; + +/** + * + * @export + * @interface AddActivityResponseRelatedObjects + */ +export interface AddActivityResponseRelatedObjects { + /** + * + * @type {GetActivitiesResponseRelatedObjectsUser} + * @memberof AddActivityResponseRelatedObjects + */ + 'user'?: GetActivitiesResponseRelatedObjectsUser; + /** + * + * @type {RelatedDealData} + * @memberof AddActivityResponseRelatedObjects + */ + 'deal'?: RelatedDealData; + /** + * + * @type {AddActivityResponseRelatedObjectsPerson} + * @memberof AddActivityResponseRelatedObjects + */ + 'person'?: AddActivityResponseRelatedObjectsPerson; + /** + * + * @type {RelatedOrganizationDataWithActiveFlag} + * @memberof AddActivityResponseRelatedObjects + */ + 'organization'?: RelatedOrganizationDataWithActiveFlag; +} + diff --git a/models/add-activity-response.ts b/models/add-activity-response.ts new file mode 100644 index 00000000..78f21c0d --- /dev/null +++ b/models/add-activity-response.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 { Activity } from './activity'; +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityResponseAdditionalData } from './add-activity-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityResponseRelatedObjects } from './add-activity-response-related-objects'; + +/** + * + * @export + * @interface AddActivityResponse + */ +export interface AddActivityResponse { + /** + * + * @type {boolean} + * @memberof AddActivityResponse + */ + 'success'?: boolean; + /** + * + * @type {Activity} + * @memberof AddActivityResponse + */ + 'data'?: Activity; + /** + * + * @type {AddActivityResponseAdditionalData} + * @memberof AddActivityResponse + */ + 'additional_data'?: AddActivityResponseAdditionalData; + /** + * + * @type {AddActivityResponseRelatedObjects} + * @memberof AddActivityResponse + */ + 'related_objects'?: AddActivityResponseRelatedObjects; +} + 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-bad-request-response-additional-data.ts b/models/add-channel-bad-request-response-additional-data.ts new file mode 100644 index 00000000..27e2303e --- /dev/null +++ b/models/add-channel-bad-request-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 AddChannelBadRequestResponseAdditionalData + */ +export interface AddChannelBadRequestResponseAdditionalData { + /** + * An error code sent by the API + * @type {string} + * @memberof AddChannelBadRequestResponseAdditionalData + */ + 'code'?: string; +} + diff --git a/models/add-channel-bad-request-response.ts b/models/add-channel-bad-request-response.ts new file mode 100644 index 00000000..4ebe2d01 --- /dev/null +++ b/models/add-channel-bad-request-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 { AddChannelBadRequestResponseAdditionalData } from './add-channel-bad-request-response-additional-data'; + +/** + * + * @export + * @interface AddChannelBadRequestResponse + */ +export interface AddChannelBadRequestResponse { + /** + * + * @type {boolean} + * @memberof AddChannelBadRequestResponse + */ + 'success'?: boolean; + /** + * The error description + * @type {string} + * @memberof AddChannelBadRequestResponse + */ + 'error'?: string; + /** + * + * @type {string} + * @memberof AddChannelBadRequestResponse + */ + 'error_info'?: string; + /** + * + * @type {AddChannelBadRequestResponseAdditionalData} + * @memberof AddChannelBadRequestResponse + */ + 'additional_data'?: AddChannelBadRequestResponseAdditionalData; +} + diff --git a/models/add-channel-forbidden-error-response-additional-data.ts b/models/add-channel-forbidden-error-response-additional-data.ts new file mode 100644 index 00000000..a6fd153e --- /dev/null +++ b/models/add-channel-forbidden-error-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 AddChannelForbiddenErrorResponseAdditionalData + */ +export interface AddChannelForbiddenErrorResponseAdditionalData { + /** + * An error code sent by the API + * @type {string} + * @memberof AddChannelForbiddenErrorResponseAdditionalData + */ + 'code'?: string; +} + diff --git a/models/add-channel-forbidden-error-response.ts b/models/add-channel-forbidden-error-response.ts new file mode 100644 index 00000000..1beabe30 --- /dev/null +++ b/models/add-channel-forbidden-error-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 { AddChannelForbiddenErrorResponseAdditionalData } from './add-channel-forbidden-error-response-additional-data'; + +/** + * + * @export + * @interface AddChannelForbiddenErrorResponse + */ +export interface AddChannelForbiddenErrorResponse { + /** + * + * @type {boolean} + * @memberof AddChannelForbiddenErrorResponse + */ + 'success'?: boolean; + /** + * The error description + * @type {string} + * @memberof AddChannelForbiddenErrorResponse + */ + 'error'?: string; + /** + * + * @type {string} + * @memberof AddChannelForbiddenErrorResponse + */ + 'error_info'?: string; + /** + * + * @type {AddChannelForbiddenErrorResponseAdditionalData} + * @memberof AddChannelForbiddenErrorResponse + */ + 'additional_data'?: AddChannelForbiddenErrorResponseAdditionalData; +} + 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-channel-response-data.ts b/models/add-channel-response-data.ts new file mode 100644 index 00000000..0baa65d2 --- /dev/null +++ b/models/add-channel-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 AddChannelResponseData + */ +export interface AddChannelResponseData { + /** + * The unique channel ID used internally in omnichannel-api and the frontend of the extension + * @type {string} + * @memberof AddChannelResponseData + */ + 'id'?: string; + /** + * The name of the channel + * @type {string} + * @memberof AddChannelResponseData + */ + 'name'?: string; + /** + * The URL for an icon that represents your channel + * @type {string} + * @memberof AddChannelResponseData + */ + 'avatar_url'?: string; + /** + * The channel ID you specified while creating the channel + * @type {string} + * @memberof AddChannelResponseData + */ + 'provider_channel_id'?: string; + /** + * The client_id of your app in Pipedrive marketplace + * @type {string} + * @memberof AddChannelResponseData + */ + 'marketplace_client_id'?: string; + /** + * The ID of the user\'s company in Pipedrive + * @type {number} + * @memberof AddChannelResponseData + */ + 'pd_company_id'?: number; + /** + * The ID of the user in Pipedrive + * @type {number} + * @memberof AddChannelResponseData + */ + 'pd_user_id'?: number; + /** + * The date and time when your channel was created in the API + * @type {string} + * @memberof AddChannelResponseData + */ + 'created_at'?: string; + /** + * Value of the provider_type sent to this endpoint + * @type {string} + * @memberof AddChannelResponseData + */ + 'provider_type'?: AddChannelResponseDataProviderTypeConst; + /** + * Value of the template_support sent to this endpoint + * @type {boolean} + * @memberof AddChannelResponseData + */ + 'template_support'?: boolean; +} + +export const AddChannelResponseDataProviderTypeConst = { + facebook: 'facebook', + whatsapp: 'whatsapp', + other: 'other' +} as const; + +export type AddChannelResponseDataProviderTypeConst = typeof AddChannelResponseDataProviderTypeConst[keyof typeof AddChannelResponseDataProviderTypeConst]; + + diff --git a/models/add-channel-response.ts b/models/add-channel-response.ts new file mode 100644 index 00000000..952c391a --- /dev/null +++ b/models/add-channel-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 { AddChannelResponseData } from './add-channel-response-data'; + +/** + * + * @export + * @interface AddChannelResponse + */ +export interface AddChannelResponse { + /** + * + * @type {boolean} + * @memberof AddChannelResponse + */ + 'success'?: boolean; + /** + * + * @type {AddChannelResponseData} + * @memberof AddChannelResponse + */ + 'data'?: AddChannelResponseData; +} + 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-response-data.ts b/models/add-deal-follower-response-data.ts new file mode 100644 index 00000000..060f9507 --- /dev/null +++ b/models/add-deal-follower-response-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 AddDealFollowerResponseData + */ +export interface AddDealFollowerResponseData { + /** + * The user ID who added the follower + * @type {number} + * @memberof AddDealFollowerResponseData + */ + 'user_id'?: number; + /** + * The follower ID + * @type {number} + * @memberof AddDealFollowerResponseData + */ + 'id'?: number; + /** + * The ID of the deal which the follower was added to + * @type {number} + * @memberof AddDealFollowerResponseData + */ + 'deal_id'?: number; + /** + * The date and time when the deal follower was added + * @type {string} + * @memberof AddDealFollowerResponseData + */ + 'add_time'?: string; +} + diff --git a/models/add-deal-follower-response.ts b/models/add-deal-follower-response.ts new file mode 100644 index 00000000..ca5f05b9 --- /dev/null +++ b/models/add-deal-follower-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 { AddDealFollowerResponseData } from './add-deal-follower-response-data'; + +/** + * + * @export + * @interface AddDealFollowerResponse + */ +export interface AddDealFollowerResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof AddDealFollowerResponse + */ + 'success'?: boolean; + /** + * + * @type {AddDealFollowerResponseData} + * @memberof AddDealFollowerResponse + */ + 'data'?: AddDealFollowerResponseData; +} + 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-product-request-all-of.ts b/models/add-deal-product-request-all-of.ts new file mode 100644 index 00000000..9e8c5349 --- /dev/null +++ b/models/add-deal-product-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 AddDealProductRequestAllOf + */ +export interface AddDealProductRequestAllOf { + /** + * Only available in Advanced and above plans How often a customer is billed for access to a service or product To set `billing_frequency` different than `one-time`, the deal must not have installments associated A deal can have up to 20 products attached with `billing_frequency` different than `one-time` + * @type {string} + * @memberof AddDealProductRequestAllOf + */ + 'billing_frequency'?: AddDealProductRequestAllOfBillingFrequencyConst; +} + +export const AddDealProductRequestAllOfBillingFrequencyConst = { + one_time: 'one-time', + annually: 'annually', + semi_annually: 'semi-annually', + quarterly: 'quarterly', + monthly: 'monthly', + weekly: 'weekly' +} as const; + +export type AddDealProductRequestAllOfBillingFrequencyConst = typeof AddDealProductRequestAllOfBillingFrequencyConst[keyof typeof AddDealProductRequestAllOfBillingFrequencyConst]; + + diff --git a/models/add-deal-product-request-all-of1.ts b/models/add-deal-product-request-all-of1.ts new file mode 100644 index 00000000..40919e0a --- /dev/null +++ b/models/add-deal-product-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 AddDealProductRequestAllOf1 + */ +export interface AddDealProductRequestAllOf1 { + /** + * Only available in Advanced and above plans The number of times the billing frequency repeats for a product in a deal When `billing_frequency` is set to `one-time`, this field must be `null` When `billing_frequency` is set to `weekly`, this field cannot be `null` For all the other values of `billing_frequency`, `null` represents a product billed indefinitely Must be a positive integer less or equal to 208 + * @type {number} + * @memberof AddDealProductRequestAllOf1 + */ + 'billing_frequency_cycles'?: number | null; +} + diff --git a/models/add-deal-product-request-all-of2.ts b/models/add-deal-product-request-all-of2.ts new file mode 100644 index 00000000..81c05023 --- /dev/null +++ b/models/add-deal-product-request-all-of2.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 AddDealProductRequestAllOf2 + */ +export interface AddDealProductRequestAllOf2 { + /** + * Only available in Advanced and above plans The billing start date. Must be between 10 years in the past and 10 years in the future + * @type {string} + * @memberof AddDealProductRequestAllOf2 + */ + 'billing_start_date'?: string | null; +} + diff --git a/models/add-deal-product-request.ts b/models/add-deal-product-request.ts new file mode 100644 index 00000000..6da03a41 --- /dev/null +++ b/models/add-deal-product-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 { AddDealProductRequestAllOf } from './add-deal-product-request-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { AddDealProductRequestAllOf1 } from './add-deal-product-request-all-of1'; +// May contain unused imports in some cases +// @ts-ignore +import { AddDealProductRequestAllOf2 } from './add-deal-product-request-all-of2'; +// May contain unused imports in some cases +// @ts-ignore +import { DealProductRequestBody } from './deal-product-request-body'; + +/** + * @type AddDealProductRequest + * @export + */ +export type AddDealProductRequest = AddDealProductRequestAllOf & AddDealProductRequestAllOf1 & AddDealProductRequestAllOf2 & DealProductRequestBody; + + 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-response.ts b/models/add-file-response.ts new file mode 100644 index 00000000..74138368 --- /dev/null +++ b/models/add-file-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 { GetFilesResponseDataInner } from './get-files-response-data-inner'; + +/** + * + * @export + * @interface AddFileResponse + */ +export interface AddFileResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof AddFileResponse + */ + 'success'?: boolean; + /** + * + * @type {GetFilesResponseDataInner} + * @memberof AddFileResponse + */ + 'data'?: GetFilesResponseDataInner; +} + 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-filters-response-all-of.ts b/models/add-filters-response-all-of.ts new file mode 100644 index 00000000..9fa22825 --- /dev/null +++ b/models/add-filters-response-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 { Filter } from './filter'; + +/** + * + * @export + * @interface AddFiltersResponseAllOf + */ +export interface AddFiltersResponseAllOf { + /** + * + * @type {Filter} + * @memberof AddFiltersResponseAllOf + */ + 'data'?: Filter; +} + diff --git a/models/add-filters-response.ts b/models/add-filters-response.ts new file mode 100644 index 00000000..449fb1f1 --- /dev/null +++ b/models/add-filters-response.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 { AddFiltersResponseAllOf } from './add-filters-response-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 { Filter } from './filter'; + +/** + * @type AddFiltersResponse + * @export + */ +export type AddFiltersResponse = AddFiltersResponseAllOf & BaseResponse; + + 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.ts b/models/add-lead-request.ts new file mode 100644 index 00000000..6ac9f3c3 --- /dev/null +++ b/models/add-lead-request.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { LeadValue } from './lead-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 {LeadValue} + * @memberof AddLeadRequest + */ + 'value'?: LeadValue | 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 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; + /** + * The optional ID to further distinguish the origin of the lead - e.g. Which API integration created this lead. If omitted, `origin_id` will be set to null. + * @type {string} + * @memberof AddLeadRequest + */ + 'origin_id'?: string | null; + /** + * The ID of Marketing channel this lead was created from. Provided value must be one of the channels configured for your company. You can fetch allowed values with GET /v1/dealFields. If omitted, channel will be set to null. + * @type {number} + * @memberof AddLeadRequest + */ + 'channel'?: number | null; + /** + * The optional ID to further distinguish the Marketing channel. If omitted, `channel_id` will be set to null. + * @type {string} + * @memberof AddLeadRequest + */ + 'channel_id'?: string | null; +} + +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-new-follower-response-data.ts b/models/add-new-follower-response-data.ts new file mode 100644 index 00000000..50c1accd --- /dev/null +++ b/models/add-new-follower-response-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 AddNewFollowerResponseData + */ +export interface AddNewFollowerResponseData { + /** + * The ID of the user that was added as follower + * @type {number} + * @memberof AddNewFollowerResponseData + */ + 'user_id'?: number; + /** + * The ID of the follower + * @type {number} + * @memberof AddNewFollowerResponseData + */ + 'id'?: number; + /** + * The ID of the product + * @type {number} + * @memberof AddNewFollowerResponseData + */ + 'product_id'?: number; + /** + * The follower creation time. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof AddNewFollowerResponseData + */ + 'add_time'?: string; +} + diff --git a/models/add-new-follower-response.ts b/models/add-new-follower-response.ts new file mode 100644 index 00000000..a6a3c228 --- /dev/null +++ b/models/add-new-follower-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 { AddNewFollowerResponseData } from './add-new-follower-response-data'; + +/** + * + * @export + * @interface AddNewFollowerResponse + */ +export interface AddNewFollowerResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof AddNewFollowerResponse + */ + 'success'?: boolean; + /** + * + * @type {AddNewFollowerResponseData} + * @memberof AddNewFollowerResponse + */ + 'data'?: AddNewFollowerResponseData; +} + 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..7be9d058 --- /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. 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-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-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-response.ts b/models/add-organization-follower-response.ts new file mode 100644 index 00000000..602c15b2 --- /dev/null +++ b/models/add-organization-follower-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 { GetAssociatedFollowersResponseDataInner } from './get-associated-followers-response-data-inner'; + +/** + * + * @export + * @interface AddOrganizationFollowerResponse + */ +export interface AddOrganizationFollowerResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof AddOrganizationFollowerResponse + */ + 'success'?: boolean; + /** + * + * @type {GetAssociatedFollowersResponseDataInner} + * @memberof AddOrganizationFollowerResponse + */ + 'data'?: GetAssociatedFollowersResponseDataInner; +} + 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-response-all-of.ts b/models/add-organization-relationship-response-all-of.ts new file mode 100644 index 00000000..d477df7d --- /dev/null +++ b/models/add-organization-relationship-response-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 { GetOrganizationRelationshipsResponseAllOfRelatedObjects } from './get-organization-relationships-response-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 AddOrganizationRelationshipResponseAllOf + */ +export interface AddOrganizationRelationshipResponseAllOf { + /** + * + * @type {OrganizationRelationshipWithCalculatedFieldsAllOf} + * @memberof AddOrganizationRelationshipResponseAllOf + */ + 'data'?: OrganizationRelationshipWithCalculatedFieldsAllOf; + /** + * + * @type {GetOrganizationRelationshipsResponseAllOfRelatedObjects} + * @memberof AddOrganizationRelationshipResponseAllOf + */ + 'related_objects'?: GetOrganizationRelationshipsResponseAllOfRelatedObjects; +} + diff --git a/models/add-organization-relationship-response.ts b/models/add-organization-relationship-response.ts new file mode 100644 index 00000000..99017c45 --- /dev/null +++ b/models/add-organization-relationship-response.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 { AddOrganizationRelationshipResponseAllOf } from './add-organization-relationship-response-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 { GetOrganizationRelationshipsResponseAllOfRelatedObjects } from './get-organization-relationships-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationRelationshipWithCalculatedFieldsAllOf } from './organization-relationship-with-calculated-fields-all-of'; + +/** + * @type AddOrganizationRelationshipResponse + * @export + */ +export type AddOrganizationRelationshipResponse = AddOrganizationRelationshipResponseAllOf & 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..61d921c3 --- /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. 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-response-all-of.ts b/models/add-organization-response-all-of.ts new file mode 100644 index 00000000..8f9e1464 --- /dev/null +++ b/models/add-organization-response-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 { GetOrganizationsResponseAllOfRelatedObjects } from './get-organizations-response-all-of-related-objects'; + +/** + * + * @export + * @interface AddOrganizationResponseAllOf + */ +export interface AddOrganizationResponseAllOf { + /** + * + * @type {BaseOrganizationItemWithEditNameFlag} + * @memberof AddOrganizationResponseAllOf + */ + 'data'?: BaseOrganizationItemWithEditNameFlag; + /** + * + * @type {GetOrganizationsResponseAllOfRelatedObjects} + * @memberof AddOrganizationResponseAllOf + */ + 'related_objects'?: GetOrganizationsResponseAllOfRelatedObjects; +} + diff --git a/models/add-organization-response.ts b/models/add-organization-response.ts new file mode 100644 index 00000000..43c79591 --- /dev/null +++ b/models/add-organization-response.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 { AddOrganizationResponseAllOf } from './add-organization-response-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 { GetOrganizationsResponseAllOfRelatedObjects } from './get-organizations-response-all-of-related-objects'; + +/** + * @type AddOrganizationResponse + * @export + */ +export type AddOrganizationResponse = AddOrganizationResponseAllOf & BaseResponse; + + diff --git a/models/add-participants-response-data.ts b/models/add-participants-response-data.ts new file mode 100644 index 00000000..73aeac91 --- /dev/null +++ b/models/add-participants-response-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 { Person } from './person'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonAllOfEmailInner } from './person-all-of-email-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonAllOfPhoneInner } from './person-all-of-phone-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonAllOfPictureId } from './person-all-of-picture-id'; +// May contain unused imports in some cases +// @ts-ignore +import { RelationshipOrganizationInfoItemWithActiveFlag } from './relationship-organization-info-item-with-active-flag'; + +/** + * @type AddParticipantsResponseData + * The object of participant + * @export + */ +export type AddParticipantsResponseData = Person; + + diff --git a/models/add-participants-response-related-objects.ts b/models/add-participants-response-related-objects.ts new file mode 100644 index 00000000..11ba27ed --- /dev/null +++ b/models/add-participants-response-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 { AddActivityResponseRelatedObjectsPerson } from './add-activity-response-related-objects-person'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponseRelatedObjectsUser } from './get-activities-response-related-objects-user'; + +/** + * + * @export + * @interface AddParticipantsResponseRelatedObjects + */ +export interface AddParticipantsResponseRelatedObjects { + /** + * + * @type {GetActivitiesResponseRelatedObjectsUser} + * @memberof AddParticipantsResponseRelatedObjects + */ + 'user'?: GetActivitiesResponseRelatedObjectsUser; + /** + * + * @type {AddActivityResponseRelatedObjectsPerson} + * @memberof AddParticipantsResponseRelatedObjects + */ + 'person'?: AddActivityResponseRelatedObjectsPerson; +} + diff --git a/models/add-participants-response.ts b/models/add-participants-response.ts new file mode 100644 index 00000000..8414bf16 --- /dev/null +++ b/models/add-participants-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 { AddParticipantsResponseData } from './add-participants-response-data'; +// May contain unused imports in some cases +// @ts-ignore +import { AddParticipantsResponseRelatedObjects } from './add-participants-response-related-objects'; + +/** + * + * @export + * @interface AddParticipantsResponse + */ +export interface AddParticipantsResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof AddParticipantsResponse + */ + 'success'?: boolean; + /** + * + * @type {AddParticipantsResponseData} + * @memberof AddParticipantsResponse + */ + 'data'?: AddParticipantsResponseData; + /** + * + * @type {AddParticipantsResponseRelatedObjects} + * @memberof AddParticipantsResponse + */ + 'related_objects'?: AddParticipantsResponseRelatedObjects; +} + 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-response-all-of-data.ts b/models/add-person-follower-response-all-of-data.ts new file mode 100644 index 00000000..fd6b2bd9 --- /dev/null +++ b/models/add-person-follower-response-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 AddPersonFollowerResponseAllOfData + */ +export interface AddPersonFollowerResponseAllOfData { + /** + * The ID of the user who was added as a follower to a person + * @type {number} + * @memberof AddPersonFollowerResponseAllOfData + */ + 'user_id'?: number; + /** + * The ID of the follower + * @type {number} + * @memberof AddPersonFollowerResponseAllOfData + */ + 'id'?: number; + /** + * The ID of the person to whom the follower was added + * @type {number} + * @memberof AddPersonFollowerResponseAllOfData + */ + '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 AddPersonFollowerResponseAllOfData + */ + 'add_time'?: string; +} + diff --git a/models/add-person-follower-response-all-of.ts b/models/add-person-follower-response-all-of.ts new file mode 100644 index 00000000..ea071022 --- /dev/null +++ b/models/add-person-follower-response-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 { AddPersonFollowerResponseAllOfData } from './add-person-follower-response-all-of-data'; + +/** + * + * @export + * @interface AddPersonFollowerResponseAllOf + */ +export interface AddPersonFollowerResponseAllOf { + /** + * + * @type {AddPersonFollowerResponseAllOfData} + * @memberof AddPersonFollowerResponseAllOf + */ + 'data'?: AddPersonFollowerResponseAllOfData; +} + diff --git a/models/add-person-follower-response.ts b/models/add-person-follower-response.ts new file mode 100644 index 00000000..884caae8 --- /dev/null +++ b/models/add-person-follower-response.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 { AddPersonFollowerResponseAllOf } from './add-person-follower-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { AddPersonFollowerResponseAllOfData } from './add-person-follower-response-all-of-data'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; + +/** + * @type AddPersonFollowerResponse + * @export + */ +export type AddPersonFollowerResponse = AddPersonFollowerResponseAllOf & BaseResponse; + + diff --git a/models/add-person-picture-response-all-of.ts b/models/add-person-picture-response-all-of.ts new file mode 100644 index 00000000..ea75ff24 --- /dev/null +++ b/models/add-person-picture-response-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 { RelatedPictureData } from './related-picture-data'; + +/** + * + * @export + * @interface AddPersonPictureResponseAllOf + */ +export interface AddPersonPictureResponseAllOf { + /** + * + * @type {RelatedPictureData} + * @memberof AddPersonPictureResponseAllOf + */ + 'data'?: RelatedPictureData; +} + diff --git a/models/add-person-picture-response.ts b/models/add-person-picture-response.ts new file mode 100644 index 00000000..f7b0bc01 --- /dev/null +++ b/models/add-person-picture-response.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 { AddPersonPictureResponseAllOf } from './add-person-picture-response-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 { RelatedPictureData } from './related-picture-data'; + +/** + * @type AddPersonPictureResponse + * @export + */ +export type AddPersonPictureResponse = AddPersonPictureResponseAllOf & 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..1bb1bfba --- /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 { PersonAllOfPhoneInner } from './person-all-of-phone-inner'; + +/** + * @type AddPersonRequest + * @export + */ +export type AddPersonRequest = AddPersonRequestAllOf & BasicPersonRequest; + + diff --git a/models/add-person-response-all-of.ts b/models/add-person-response-all-of.ts new file mode 100644 index 00000000..88510f43 --- /dev/null +++ b/models/add-person-response-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 { GetProductsResponseAllOfRelatedObjects } from './get-products-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { Person } from './person'; + +/** + * + * @export + * @interface AddPersonResponseAllOf + */ +export interface AddPersonResponseAllOf { + /** + * + * @type {Person} + * @memberof AddPersonResponseAllOf + */ + 'data'?: Person; + /** + * + * @type {GetProductsResponseAllOfRelatedObjects} + * @memberof AddPersonResponseAllOf + */ + 'related_objects'?: GetProductsResponseAllOfRelatedObjects; +} + diff --git a/models/add-person-response.ts b/models/add-person-response.ts new file mode 100644 index 00000000..0b6e9265 --- /dev/null +++ b/models/add-person-response.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 { AddPersonResponseAllOf } from './add-person-response-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 { GetProductsResponseAllOfRelatedObjects } from './get-products-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { Person } from './person'; + +/** + * @type AddPersonResponse + * @export + */ +export type AddPersonResponse = AddPersonResponseAllOf & BaseResponse; + + diff --git a/models/add-pipeline-response-all-of.ts b/models/add-pipeline-response-all-of.ts new file mode 100644 index 00000000..883a30b1 --- /dev/null +++ b/models/add-pipeline-response-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 { BasePipeline1 } from './base-pipeline1'; + +/** + * + * @export + * @interface AddPipelineResponseAllOf + */ +export interface AddPipelineResponseAllOf { + /** + * + * @type {BasePipeline1} + * @memberof AddPipelineResponseAllOf + */ + 'data'?: BasePipeline1; +} + diff --git a/models/add-pipeline-response.ts b/models/add-pipeline-response.ts new file mode 100644 index 00000000..44dd3cf8 --- /dev/null +++ b/models/add-pipeline-response.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 { AddPipelineResponseAllOf } from './add-pipeline-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { BasePipeline1 } from './base-pipeline1'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; + +/** + * @type AddPipelineResponse + * @export + */ +export type AddPipelineResponse = AddPipelineResponseAllOf & 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-all-of1.ts b/models/add-product-request-all-of1.ts new file mode 100644 index 00000000..6007338c --- /dev/null +++ b/models/add-product-request-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 AddProductRequestAllOf1 + */ +export interface AddProductRequestAllOf1 { + /** + * Only available in Advanced and above plans How often a customer is billed for access to a service or product + * @type {string} + * @memberof AddProductRequestAllOf1 + */ + 'billing_frequency'?: AddProductRequestAllOf1BillingFrequencyConst; +} + +export const AddProductRequestAllOf1BillingFrequencyConst = { + one_time: 'one-time', + annually: 'annually', + semi_annually: 'semi-annually', + quarterly: 'quarterly', + monthly: 'monthly', + weekly: 'weekly' +} as const; + +export type AddProductRequestAllOf1BillingFrequencyConst = typeof AddProductRequestAllOf1BillingFrequencyConst[keyof typeof AddProductRequestAllOf1BillingFrequencyConst]; + + diff --git a/models/add-product-request-all-of2.ts b/models/add-product-request-all-of2.ts new file mode 100644 index 00000000..48ec086a --- /dev/null +++ b/models/add-product-request-all-of2.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 AddProductRequestAllOf2 + */ +export interface AddProductRequestAllOf2 { + /** + * Only available in Advanced and above plans The number of times the billing frequency repeats for a product in a deal When `billing_frequency` is set to `one-time`, this field must be `null` For all the other values of `billing_frequency`, `null` represents a product billed indefinitely Must be a positive integer less or equal to 208 + * @type {number} + * @memberof AddProductRequestAllOf2 + */ + 'billing_frequency_cycles'?: number | null; +} + diff --git a/models/add-product-request.ts b/models/add-product-request.ts new file mode 100644 index 00000000..6d73752d --- /dev/null +++ b/models/add-product-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 { AddProductRequestAllOf } from './add-product-request-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { AddProductRequestAllOf1 } from './add-product-request-all-of1'; +// May contain unused imports in some cases +// @ts-ignore +import { AddProductRequestAllOf2 } from './add-product-request-all-of2'; +// May contain unused imports in some cases +// @ts-ignore +import { ProductRequest } from './product-request'; + +/** + * @type AddProductRequest + * @export + */ +export type AddProductRequest = AddProductRequestAllOf & AddProductRequestAllOf1 & AddProductRequestAllOf2 & 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..2d640d9b --- /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 { ProjectAllOf1 } from './project-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 & ProjectAllOf1 & RequiredPostProjectParameters; + + diff --git a/models/add-project-response.ts b/models/add-project-response.ts new file mode 100644 index 00000000..836521ed --- /dev/null +++ b/models/add-project-response.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 AddProjectResponse + */ +export interface AddProjectResponse { + /** + * + * @type {boolean} + * @memberof AddProjectResponse + */ + 'success'?: boolean; + /** + * + * @type {ProjectResponseObject} + * @memberof AddProjectResponse + */ + 'data'?: ProjectResponseObject; + /** + * + * @type {object} + * @memberof AddProjectResponse + */ + '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-remote-file-and-link-it-to-item-response.ts b/models/add-remote-file-and-link-it-to-item-response.ts new file mode 100644 index 00000000..c45a1a5c --- /dev/null +++ b/models/add-remote-file-and-link-it-to-item-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 { GetFilesResponseDataInner } from './get-files-response-data-inner'; + +/** + * + * @export + * @interface AddRemoteFileAndLinkItToItemResponse + */ +export interface AddRemoteFileAndLinkItToItemResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof AddRemoteFileAndLinkItToItemResponse + */ + 'success'?: boolean; + /** + * + * @type {GetFilesResponseDataInner} + * @memberof AddRemoteFileAndLinkItToItemResponse + */ + 'data'?: GetFilesResponseDataInner; +} + 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-response-data-data.ts b/models/add-role-assignment-response-data-data.ts new file mode 100644 index 00000000..96661ab1 --- /dev/null +++ b/models/add-role-assignment-response-data-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 AddRoleAssignmentResponseDataData + */ +export interface AddRoleAssignmentResponseDataData { + /** + * The ID of the user that was added to the role + * @type {number} + * @memberof AddRoleAssignmentResponseDataData + */ + 'user_id'?: number; + /** + * The ID of the role the user was added to + * @type {number} + * @memberof AddRoleAssignmentResponseDataData + */ + 'role_id'?: number; +} + diff --git a/models/add-role-assignment-response-data.ts b/models/add-role-assignment-response-data.ts new file mode 100644 index 00000000..8d7cbfb3 --- /dev/null +++ b/models/add-role-assignment-response-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 { AddRoleAssignmentResponseDataData } from './add-role-assignment-response-data-data'; + +/** + * + * @export + * @interface AddRoleAssignmentResponseData + */ +export interface AddRoleAssignmentResponseData { + /** + * + * @type {AddRoleAssignmentResponseDataData} + * @memberof AddRoleAssignmentResponseData + */ + 'data'?: AddRoleAssignmentResponseDataData; +} + diff --git a/models/add-role-assignment-response.ts b/models/add-role-assignment-response.ts new file mode 100644 index 00000000..163b0b29 --- /dev/null +++ b/models/add-role-assignment-response.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 { AddRoleAssignmentResponseData } from './add-role-assignment-response-data'; +// May contain unused imports in some cases +// @ts-ignore +import { AddRoleAssignmentResponseDataData } from './add-role-assignment-response-data-data'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; + +/** + * @type AddRoleAssignmentResponse + * @export + */ +export type AddRoleAssignmentResponse = AddRoleAssignmentResponseData & 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-roles-response-all-of.ts b/models/add-roles-response-all-of.ts new file mode 100644 index 00000000..cf9d0c26 --- /dev/null +++ b/models/add-roles-response-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 { AddRolesResponseData } from './add-roles-response-data'; + +/** + * + * @export + * @interface AddRolesResponseAllOf + */ +export interface AddRolesResponseAllOf { + /** + * + * @type {AddRolesResponseData} + * @memberof AddRolesResponseAllOf + */ + 'data'?: AddRolesResponseData; +} + diff --git a/models/add-roles-response-data.ts b/models/add-roles-response-data.ts new file mode 100644 index 00000000..eb040791 --- /dev/null +++ b/models/add-roles-response-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 AddRolesResponseData + */ +export interface AddRolesResponseData { + /** + * + * @type {number} + * @memberof AddRolesResponseData + */ + 'id'?: number; +} + diff --git a/models/add-roles-response.ts b/models/add-roles-response.ts new file mode 100644 index 00000000..0aa0b0cd --- /dev/null +++ b/models/add-roles-response.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 { AddRolesResponseAllOf } from './add-roles-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { AddRolesResponseData } from './add-roles-response-data'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; + +/** + * @type AddRolesResponse + * @export + */ +export type AddRolesResponse = AddRolesResponseAllOf & 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-response.ts b/models/add-task-response.ts new file mode 100644 index 00000000..8c261e31 --- /dev/null +++ b/models/add-task-response.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 AddTaskResponse + */ +export interface AddTaskResponse { + /** + * + * @type {boolean} + * @memberof AddTaskResponse + */ + 'success'?: boolean; + /** + * + * @type {TaskResponseObject} + * @memberof AddTaskResponse + */ + 'data'?: TaskResponseObject; + /** + * + * @type {object} + * @memberof AddTaskResponse + */ + '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-provider-link-request.ts b/models/add-user-provider-link-request.ts new file mode 100644 index 00000000..3c030789 --- /dev/null +++ b/models/add-user-provider-link-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 AddUserProviderLinkRequest + */ +export interface AddUserProviderLinkRequest { + /** + * Unique identifier linking a user to the installed integration. Generated by the integration. + * @type {string} + * @memberof AddUserProviderLinkRequest + */ + 'user_provider_id': string; + /** + * Pipedrive user ID + * @type {number} + * @memberof AddUserProviderLinkRequest + */ + 'user_id': number; + /** + * Pipedrive company ID + * @type {number} + * @memberof AddUserProviderLinkRequest + */ + 'company_id': number; + /** + * Pipedrive Marketplace client ID of the installed integration + * @type {string} + * @memberof AddUserProviderLinkRequest + */ + 'marketplace_client_id': string; +} + diff --git a/models/add-user-request.ts b/models/add-user-request.ts new file mode 100644 index 00000000..20ecef97 --- /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 { UserAccess1 } from './user-access1'; + +/** + * + * @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..d3a20234 --- /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. NB! Webhooks v2 will become the default from March 17th, 2025. See this Changelog post for more details. + * @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..32fbbc0f --- /dev/null +++ b/models/base-deal.ts @@ -0,0 +1,396 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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; + /** + * The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed. + * @type {string} + * @memberof BaseDeal + */ + 'origin'?: string; + /** + * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal. + * @type {string} + * @memberof BaseDeal + */ + 'origin_id'?: string | null; + /** + * The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your Company settings. + * @type {number} + * @memberof BaseDeal + */ + 'channel'?: number | null; + /** + * The optional ID to further distinguish the Marketing channel. + * @type {string} + * @memberof BaseDeal + */ + 'channel_id'?: string | null; + /** + * Only available in Advanced and above plans The Annual Recurring Revenue of the deal Null if there are no products attached to the deal + * @type {number} + * @memberof BaseDeal + */ + 'arr'?: number | null; + /** + * Only available in Advanced and above plans The Monthly Recurring Revenue of the deal Null if there are no products attached to the deal + * @type {number} + * @memberof BaseDeal + */ + 'mrr'?: number | null; + /** + * Only available in Advanced and above plans The Annual Contract Value of the deal Null if there are no products attached to the deal + * @type {number} + * @memberof BaseDeal + */ + 'acv'?: number | null; + /** + * Only available in Advanced and above plans The Currency for Annual Recurring Revenue of the deal If the `arr` is null, this will also be null + * @type {string} + * @memberof BaseDeal + */ + 'arr_currency'?: string | null; + /** + * Only available in Advanced and above plans The Currency for Monthly Recurring Revenue of the deal If the `mrr` is null, this will also be null + * @type {string} + * @memberof BaseDeal + */ + 'mrr_currency'?: string | null; + /** + * Only available in Advanced and above plans The Currency for Annual Contract Value of the deal If the `acv` is null, this will also be null + * @type {string} + * @memberof BaseDeal + */ + 'acv_currency'?: string | null; +} + 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..4ee0bf8d --- /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 { PictureData } from './picture-data'; +// May contain unused imports in some cases +// @ts-ignore +import { PictureDataPictures } from './picture-data-pictures'; +// May contain unused imports in some cases +// @ts-ignore +import { PictureDataWithValue } from './picture-data-with-value'; + +/** + * @type BaseOrganizationItemAllOfPictureId + * @export + */ +export type BaseOrganizationItemAllOfPictureId = PictureData & PictureDataWithValue; + + diff --git a/models/base-organization-item-all-of.ts b/models/base-organization-item-all-of.ts new file mode 100644 index 00000000..a074cc8f --- /dev/null +++ b/models/base-organization-item-all-of.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. + */ + + +// 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 | null; + /** + * 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. When the `label` field is updated, the `label_ids` field value will be overwritten by the `label` field value. + * @type {number} + * @memberof BaseOrganizationItemAllOf + */ + 'label'?: number; + /** + * The IDs of labels assigned to the organization. When the `label_ids` field is updated, the `label` field value will be set to the first value of the `label_ids` field. + * @type {Array} + * @memberof BaseOrganizationItemAllOf + */ + 'label_ids'?: Array; + /** + * 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..32207af0 --- /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 { BasePipeline } from './base-pipeline'; +// May contain unused imports in some cases +// @ts-ignore +import { BasePipelineWithSelectedFlagAllOf } from './base-pipeline-with-selected-flag-all-of'; + +/** + * @type BasePipelineWithSelectedFlag + * @export + */ +export type BasePipelineWithSelectedFlag = BasePipeline & BasePipelineWithSelectedFlagAllOf; + + diff --git a/models/base-pipeline.ts b/models/base-pipeline.ts new file mode 100644 index 00000000..df102804 --- /dev/null +++ b/models/base-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 BasePipeline + */ +export interface BasePipeline { + /** + * The ID of the pipeline + * @type {number} + * @memberof BasePipeline + */ + 'id'?: number; + /** + * The name of the pipeline + * @type {string} + * @memberof BasePipeline + */ + 'name'?: string; + /** + * The pipeline title displayed in the URL + * @type {string} + * @memberof BasePipeline + */ + 'url_title'?: string; + /** + * Defines the order of pipelines. First order (`order_nr=0`) is the default pipeline. + * @type {number} + * @memberof BasePipeline + */ + 'order_nr'?: number; + /** + * Whether this pipeline will be made inactive (hidden) or active + * @type {boolean} + * @memberof BasePipeline + */ + 'active'?: boolean; + /** + * Whether deal probability is disabled or enabled for this pipeline + * @type {boolean} + * @memberof BasePipeline + */ + 'deal_probability'?: boolean; + /** + * The pipeline creation time. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof BasePipeline + */ + 'add_time'?: string; + /** + * The pipeline update time. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof BasePipeline + */ + 'update_time'?: string; +} + diff --git a/models/base-pipeline1.ts b/models/base-pipeline1.ts new file mode 100644 index 00000000..01521641 --- /dev/null +++ b/models/base-pipeline1.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 BasePipeline1 + */ +export interface BasePipeline1 { + /** + * The ID of the pipeline + * @type {number} + * @memberof BasePipeline1 + */ + 'id'?: number; + /** + * The name of the pipeline + * @type {string} + * @memberof BasePipeline1 + */ + 'name'?: string; + /** + * The pipeline title displayed in the URL + * @type {string} + * @memberof BasePipeline1 + */ + 'url_title'?: string; + /** + * Defines the order of pipelines. First order (`order_nr=0`) is the default pipeline. + * @type {number} + * @memberof BasePipeline1 + */ + 'order_nr'?: number; + /** + * Whether this pipeline will be made inactive (hidden) or active + * @type {boolean} + * @memberof BasePipeline1 + */ + 'active'?: boolean; + /** + * Whether deal probability is disabled or enabled for this pipeline + * @type {boolean} + * @memberof BasePipeline1 + */ + 'deal_probability'?: boolean; + /** + * The pipeline creation time. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof BasePipeline1 + */ + 'add_time'?: string; + /** + * The pipeline update time. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof BasePipeline1 + */ + 'update_time'?: string; +} + diff --git a/models/base-product.ts b/models/base-product.ts new file mode 100644 index 00000000..1ea7074a --- /dev/null +++ b/models/base-product.ts @@ -0,0 +1,110 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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 BaseProduct + */ +export interface BaseProduct { + /** + * The ID of the product + * @type {number} + * @memberof BaseProduct + */ + 'id'?: number; + /** + * The name of the product + * @type {string} + * @memberof BaseProduct + */ + 'name'?: string; + /** + * The product code + * @type {string} + * @memberof BaseProduct + */ + 'code'?: string; + /** + * The unit in which this product is sold + * @type {string} + * @memberof BaseProduct + */ + 'unit'?: string; + /** + * The tax percentage + * @type {number} + * @memberof BaseProduct + */ + 'tax'?: number; + /** + * Whether this product is active or not + * @type {boolean} + * @memberof BaseProduct + */ + 'active_flag'?: boolean; + /** + * Whether this product is selected in deals or not + * @type {boolean} + * @memberof BaseProduct + */ + 'selectable'?: boolean; + /** + * + * @type {string} + * @memberof BaseProduct + */ + 'visible_to'?: BaseProductVisibleToConst; + /** + * Information about the Pipedrive user who owns the product + * @type {object} + * @memberof BaseProduct + */ + 'owner_id'?: object; + /** + * Only available in Advanced and above plans How often a customer is billed for access to a service or product + * @type {string} + * @memberof BaseProduct + */ + 'billing_frequency'?: BaseProductBillingFrequencyConst; + /** + * Only available in Advanced and above plans The number of times the billing frequency repeats for a product in a deal When `billing_frequency` is set to `one-time`, this field is always `null` When `billing_frequency` is set to `weekly`, this field cannot be `null` For all the other values of `billing_frequency`, `null` represents a product billed indefinitely Must be a positive integer less or equal to 208 + * @type {number} + * @memberof BaseProduct + */ + 'billing_frequency_cycles'?: number | null; +} + +export const BaseProductVisibleToConst = { + _1: '1', + _3: '3', + _5: '5', + _7: '7' +} as const; + +export type BaseProductVisibleToConst = typeof BaseProductVisibleToConst[keyof typeof BaseProductVisibleToConst]; +export const BaseProductBillingFrequencyConst = { + one_time: 'one-time', + annually: 'annually', + semi_annually: 'semi-annually', + quarterly: 'quarterly', + monthly: 'monthly', + weekly: 'weekly' +} as const; + +export type BaseProductBillingFrequencyConst = typeof BaseProductBillingFrequencyConst[keyof typeof BaseProductBillingFrequencyConst]; + + diff --git a/models/base-response-all-of.ts b/models/base-response-all-of.ts new file mode 100644 index 00000000..aeed562c --- /dev/null +++ b/models/base-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 BaseResponseAllOf + */ +export interface BaseResponseAllOf { + /** + * The status of the response + * @type {string} + * @memberof BaseResponseAllOf + */ + 'status'?: string; +} + 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-response1.ts b/models/base-response1.ts new file mode 100644 index 00000000..171311ff --- /dev/null +++ b/models/base-response1.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 BaseResponse1 + */ +export interface BaseResponse1 { + /** + * + * @type {Array} + * @memberof BaseResponse1 + */ + 'data'?: Array; +} + 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-stage.ts b/models/base-stage.ts new file mode 100644 index 00000000..459bf861 --- /dev/null +++ b/models/base-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 BaseStage + */ +export interface BaseStage { + /** + * The ID of the stage + * @type {number} + * @memberof BaseStage + */ + 'id'?: number; + /** + * Defines the order of the stage + * @type {number} + * @memberof BaseStage + */ + 'order_nr'?: number; + /** + * The name of the stage + * @type {string} + * @memberof BaseStage + */ + 'name'?: string; + /** + * Whether the stage is active or deleted + * @type {boolean} + * @memberof BaseStage + */ + 'active_flag'?: boolean; + /** + * The success probability percentage of the deal. Used/shown when the deal weighted values are used. + * @type {number} + * @memberof BaseStage + */ + 'deal_probability'?: number; + /** + * The ID of the pipeline to add the stage to + * @type {number} + * @memberof BaseStage + */ + 'pipeline_id'?: number; + /** + * Whether deals in this stage can become rotten + * @type {boolean} + * @memberof BaseStage + */ + '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 BaseStage + */ + 'rotten_days'?: number; + /** + * The stage creation time. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof BaseStage + */ + 'add_time'?: string; + /** + * The stage update time. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof BaseStage + */ + 'update_time'?: string; +} + diff --git a/models/base-stage1.ts b/models/base-stage1.ts new file mode 100644 index 00000000..7f4477cc --- /dev/null +++ b/models/base-stage1.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 BaseStage1 + */ +export interface BaseStage1 { + /** + * The ID of the stage + * @type {number} + * @memberof BaseStage1 + */ + 'id'?: number; + /** + * Defines the order of the stage + * @type {number} + * @memberof BaseStage1 + */ + 'order_nr'?: number; + /** + * The name of the stage + * @type {string} + * @memberof BaseStage1 + */ + 'name'?: string; + /** + * Whether the stage is active or deleted + * @type {boolean} + * @memberof BaseStage1 + */ + 'active_flag'?: boolean; + /** + * The success probability percentage of the deal. Used/shown when the deal weighted values are used. + * @type {number} + * @memberof BaseStage1 + */ + 'deal_probability'?: number; + /** + * The ID of the pipeline to add the stage to + * @type {number} + * @memberof BaseStage1 + */ + 'pipeline_id'?: number; + /** + * Whether deals in this stage can become rotten + * @type {boolean} + * @memberof BaseStage1 + */ + '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 BaseStage1 + */ + 'rotten_days'?: number; + /** + * The stage creation time. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof BaseStage1 + */ + 'add_time'?: string; + /** + * The stage update time. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof BaseStage1 + */ + 'update_time'?: 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/base-user.ts b/models/base-user.ts new file mode 100644 index 00000000..fdf4d34b --- /dev/null +++ b/models/base-user.ts @@ -0,0 +1,147 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { UserAccess } from './user-access'; + +/** + * + * @export + * @interface BaseUser + */ +export interface BaseUser { + /** + * The user ID + * @type {number} + * @memberof BaseUser + */ + 'id'?: number; + /** + * The user name + * @type {string} + * @memberof BaseUser + */ + 'name'?: string; + /** + * The user default currency + * @type {string} + * @memberof BaseUser + */ + 'default_currency'?: string; + /** + * The user locale + * @type {string} + * @memberof BaseUser + */ + 'locale'?: string; + /** + * The user language ID + * @type {number} + * @memberof BaseUser + */ + 'lang'?: number; + /** + * The user email + * @type {string} + * @memberof BaseUser + */ + 'email'?: string; + /** + * The user phone + * @type {string} + * @memberof BaseUser + */ + 'phone'?: string | null; + /** + * Boolean that indicates whether the user is activated + * @type {boolean} + * @memberof BaseUser + */ + 'activated'?: boolean; + /** + * The last login date and time of the user. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof BaseUser + */ + 'last_login'?: string; + /** + * The creation date and time of the user. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof BaseUser + */ + 'created'?: string; + /** + * The last modification date and time of the user. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof BaseUser + */ + 'modified'?: string | null; + /** + * Boolean that indicates whether the user has created a company + * @type {boolean} + * @memberof BaseUser + */ + 'has_created_company'?: boolean; + /** + * + * @type {Array} + * @memberof BaseUser + */ + 'access'?: Array; + /** + * Boolean that indicates whether the user is activated + * @type {boolean} + * @memberof BaseUser + */ + 'active_flag'?: boolean; + /** + * The user timezone name + * @type {string} + * @memberof BaseUser + */ + 'timezone_name'?: string; + /** + * The user timezone offset + * @type {string} + * @memberof BaseUser + */ + 'timezone_offset'?: string; + /** + * The ID of the user role + * @type {number} + * @memberof BaseUser + */ + 'role_id'?: number; + /** + * The user icon URL + * @type {string} + * @memberof BaseUser + */ + '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 BaseUser + */ + 'is_you'?: boolean; + /** + * Boolean that indicates whether the user is deleted from the company + * @type {boolean} + * @memberof BaseUser + */ + 'is_deleted'?: boolean; +} + diff --git a/models/base-webhook.ts b/models/base-webhook.ts new file mode 100644 index 00000000..f929ff01 --- /dev/null +++ b/models/base-webhook.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 BaseWebhook + */ +export interface BaseWebhook { + /** + * The ID of the Webhook + * @type {number} + * @memberof BaseWebhook + */ + 'id'?: number; + /** + * The ID of the company related to the Webhook + * @type {number} + * @memberof BaseWebhook + */ + 'company_id'?: number; + /** + * The ID of the user who owns the Webhook + * @type {number} + * @memberof BaseWebhook + */ + 'owner_id'?: number; + /** + * The ID of the user related to the Webhook + * @type {number} + * @memberof BaseWebhook + */ + 'user_id'?: number; + /** + * The Webhook action + * @type {string} + * @memberof BaseWebhook + */ + 'event_action'?: string; + /** + * The Webhook object + * @type {string} + * @memberof BaseWebhook + */ + 'event_object'?: string; + /** + * The subscription URL of the Webhook + * @type {string} + * @memberof BaseWebhook + */ + 'subscription_url'?: string; + /** + * + * @type {number} + * @memberof BaseWebhook + */ + 'is_active'?: BaseWebhookIsActiveConst; + /** + * The date when the Webhook was added + * @type {string} + * @memberof BaseWebhook + */ + 'add_time'?: string; + /** + * The date when the Webhook was removed (if removed) + * @type {string} + * @memberof BaseWebhook + */ + 'remove_time'?: string | null; + /** + * The type of the Webhook + * @type {string} + * @memberof BaseWebhook + */ + 'type'?: BaseWebhookTypeConst; + /** + * The username of the `subscription_url` of the Webhook + * @type {string} + * @memberof BaseWebhook + */ + 'http_auth_user'?: string | null; + /** + * The password of the `subscription_url` of the Webhook + * @type {string} + * @memberof BaseWebhook + */ + 'http_auth_password'?: string | null; + /** + * Any additional data related to the Webhook + * @type {object} + * @memberof BaseWebhook + */ + 'additional_data'?: object; + /** + * The removal reason of the Webhook (if removed) + * @type {string} + * @memberof BaseWebhook + */ + 'remove_reason'?: string | null; + /** + * The last delivery time of the Webhook + * @type {string} + * @memberof BaseWebhook + */ + 'last_delivery_time'?: string | null; + /** + * The last delivery HTTP status of the Webhook + * @type {number} + * @memberof BaseWebhook + */ + 'last_http_status'?: number | null; + /** + * The ID of the admin of the Webhook + * @type {number} + * @memberof BaseWebhook + */ + 'admin_id'?: number; +} + +export const BaseWebhookIsActiveConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type BaseWebhookIsActiveConst = typeof BaseWebhookIsActiveConst[keyof typeof BaseWebhookIsActiveConst]; +export const BaseWebhookTypeConst = { + general: 'general', + app: 'app' +} as const; + +export type BaseWebhookTypeConst = typeof BaseWebhookTypeConst[keyof typeof BaseWebhookTypeConst]; + + diff --git a/models/basic-deal-product-request-all-of.ts b/models/basic-deal-product-request-all-of.ts new file mode 100644 index 00000000..6ecf4383 --- /dev/null +++ b/models/basic-deal-product-request-all-of.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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 BasicDealProductRequestAllOf + */ +export interface BasicDealProductRequestAllOf { + /** + * The ID of the product to use + * @type {number} + * @memberof BasicDealProductRequestAllOf + */ + 'product_id'?: number; + /** + * The price at which this product will be added to the deal + * @type {number} + * @memberof BasicDealProductRequestAllOf + */ + 'item_price'?: number; + /** + * Quantity – e.g. how many items of this product will be added to the deal + * @type {number} + * @memberof BasicDealProductRequestAllOf + */ + '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 BasicDealProductRequestAllOf + */ + 'discount'?: number; + /** + * The type of the discount\'s value + * @type {string} + * @memberof BasicDealProductRequestAllOf + */ + 'discount_type'?: BasicDealProductRequestAllOfDiscountTypeConst; + /** + * The ID of the product variation to use. When omitted, no variation will be used + * @type {number} + * @memberof BasicDealProductRequestAllOf + */ + 'product_variation_id'?: number | null; + /** + * A textual comment associated with this product-deal attachment + * @type {string} + * @memberof BasicDealProductRequestAllOf + */ + 'comments'?: string; + /** + * The tax percentage + * @type {number} + * @memberof BasicDealProductRequestAllOf + */ + '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 BasicDealProductRequestAllOf + */ + 'tax_method'?: BasicDealProductRequestAllOfTaxMethodConst; + /** + * 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 BasicDealProductRequestAllOf + */ + 'enabled_flag'?: boolean; +} + +export const BasicDealProductRequestAllOfDiscountTypeConst = { + percentage: 'percentage', + amount: 'amount' +} as const; + +export type BasicDealProductRequestAllOfDiscountTypeConst = typeof BasicDealProductRequestAllOfDiscountTypeConst[keyof typeof BasicDealProductRequestAllOfDiscountTypeConst]; +export const BasicDealProductRequestAllOfTaxMethodConst = { + exclusive: 'exclusive', + inclusive: 'inclusive', + none: 'none' +} as const; + +export type BasicDealProductRequestAllOfTaxMethodConst = typeof BasicDealProductRequestAllOfTaxMethodConst[keyof typeof BasicDealProductRequestAllOfTaxMethodConst]; + + diff --git a/models/basic-deal-product-request.ts b/models/basic-deal-product-request.ts new file mode 100644 index 00000000..876c16fa --- /dev/null +++ b/models/basic-deal-product-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 { AddDealProductRequestAllOf } from './add-deal-product-request-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { AddDealProductRequestAllOf1 } from './add-deal-product-request-all-of1'; +// May contain unused imports in some cases +// @ts-ignore +import { AddDealProductRequestAllOf2 } from './add-deal-product-request-all-of2'; +// May contain unused imports in some cases +// @ts-ignore +import { BasicDealProductRequestAllOf } from './basic-deal-product-request-all-of'; + +/** + * @type BasicDealProductRequest + * @export + */ +export type BasicDealProductRequest = AddDealProductRequestAllOf & AddDealProductRequestAllOf1 & AddDealProductRequestAllOf2 & BasicDealProductRequestAllOf; + + diff --git a/models/basic-deal.ts b/models/basic-deal.ts new file mode 100644 index 00000000..dc810664 --- /dev/null +++ b/models/basic-deal.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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 optional date and time of changing the deal status as won in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Won. Can not be used together with `lost_time`. + * @type {string} + * @memberof BasicDeal + */ + 'won_time'?: string; + /** + * The optional date and time of changing the deal status as lost in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Lost. Can not be used together with `won_time`. + * @type {string} + * @memberof BasicDeal + */ + 'lost_time'?: string; + /** + * The optional date and time of closing the deal in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof BasicDeal + */ + 'close_time'?: string | null; + /** + * 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-deal1.ts b/models/basic-deal1.ts new file mode 100644 index 00000000..38462322 --- /dev/null +++ b/models/basic-deal1.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 BasicDeal1 + */ +export interface BasicDeal1 { + [key: string]: any; + + /** + * The optional date and time of changing the deal status as won in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Won. Can not be used together with `lost_time`. + * @type {string} + * @memberof BasicDeal1 + */ + 'won_time'?: string; + /** + * The optional date and time of changing the deal status as lost in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Lost. Can not be used together with `won_time`. + * @type {string} + * @memberof BasicDeal1 + */ + 'lost_time'?: string; + /** + * The optional date and time of closing the deal in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof BasicDeal1 + */ + 'close_time'?: string | null; + /** + * The expected close date of the deal. In ISO 8601 format: YYYY-MM-DD. + * @type {string} + * @memberof BasicDeal1 + */ + '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 BasicDeal1 + */ + 'probability'?: number; + /** + * The optional message about why the deal was lost (to be used when status = lost) + * @type {string} + * @memberof BasicDeal1 + */ + 'lost_reason'?: string; + /** + * + * @type {string} + * @memberof BasicDeal1 + */ + 'visible_to'?: BasicDeal1VisibleToConst; +} + +export const BasicDeal1VisibleToConst = { + _1: '1', + _3: '3', + _5: '5', + _7: '7' +} as const; + +export type BasicDeal1VisibleToConst = typeof BasicDeal1VisibleToConst[keyof typeof BasicDeal1VisibleToConst]; + + 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..b3535c58 --- /dev/null +++ b/models/basic-organization.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 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 label assigned to the organization. When the `label` field is updated, the `label_ids` field value will be overwritten by the `label` field value. + * @type {number} + * @memberof BasicOrganization + */ + 'label'?: number; + /** + * The IDs of labels assigned to the organization. When the `label_ids` field is updated, the `label` field value will be set to the first value of the `label_ids` field. + * @type {Array} + * @memberof BasicOrganization + */ + 'label_ids'?: Array; + /** + * + * @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-organization1.ts b/models/basic-organization1.ts new file mode 100644 index 00000000..b3b5173b --- /dev/null +++ b/models/basic-organization1.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 BasicOrganization1 + */ +export interface BasicOrganization1 { + [key: string]: any; + + /** + * 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 BasicOrganization1 + */ + 'owner_id'?: number; + /** + * The label assigned to the organization. When the `label` field is updated, the `label_ids` field value will be overwritten by the `label` field value. + * @type {number} + * @memberof BasicOrganization1 + */ + 'label'?: number; + /** + * The IDs of labels assigned to the organization. When the `label_ids` field is updated, the `label` field value will be set to the first value of the `label_ids` field. + * @type {Array} + * @memberof BasicOrganization1 + */ + 'label_ids'?: Array; + /** + * + * @type {string} + * @memberof BasicOrganization1 + */ + 'visible_to'?: BasicOrganization1VisibleToConst; +} + +export const BasicOrganization1VisibleToConst = { + _1: '1', + _3: '3', + _5: '5', + _7: '7' +} as const; + +export type BasicOrganization1VisibleToConst = typeof BasicOrganization1VisibleToConst[keyof typeof BasicOrganization1VisibleToConst]; + + 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..f769a506 --- /dev/null +++ b/models/basic-person-request.ts @@ -0,0 +1,102 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (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 { PersonAllOfPhoneInner } from './person-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 label assigned to the person. When the `label` field is updated, the `label_ids` field value will be overwritten by the `label` field value. + * @type {number} + * @memberof BasicPersonRequest + */ + 'label'?: number; + /** + * The IDs of labels assigned to the person. When the `label_ids` field is updated, the `label` field value will be set to the first value of the `label_ids` field. + * @type {Array} + * @memberof BasicPersonRequest + */ + 'label_ids'?: Array; + /** + * + * @type {string} + * @memberof BasicPersonRequest + */ + 'visible_to'?: BasicPersonRequestVisibleToConst; + /** + * + * @type {string} + * @memberof BasicPersonRequest + */ + 'marketing_status'?: BasicPersonRequestMarketingStatusConst; + /** + * The optional creation date & time of the person in UTC. 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-bad-request-response.ts b/models/call-log-bad-request-response.ts new file mode 100644 index 00000000..6c6141d4 --- /dev/null +++ b/models/call-log-bad-request-response.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 CallLogBadRequestResponse + */ +export interface CallLogBadRequestResponse { + /** + * + * @type {boolean} + * @memberof CallLogBadRequestResponse + */ + 'success'?: boolean; + /** + * The description of the error + * @type {string} + * @memberof CallLogBadRequestResponse + */ + 'error'?: string; + /** + * A message describing how to solve the problem + * @type {string} + * @memberof CallLogBadRequestResponse + */ + 'error_info'?: string; + /** + * + * @type {object} + * @memberof CallLogBadRequestResponse + */ + 'data'?: object | null; + /** + * + * @type {object} + * @memberof CallLogBadRequestResponse + */ + 'additional_data'?: object | null; +} + diff --git a/models/call-log-conflict-response.ts b/models/call-log-conflict-response.ts new file mode 100644 index 00000000..afac4941 --- /dev/null +++ b/models/call-log-conflict-response.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 CallLogConflictResponse + */ +export interface CallLogConflictResponse { + /** + * + * @type {boolean} + * @memberof CallLogConflictResponse + */ + 'success'?: boolean; + /** + * The description of the error + * @type {string} + * @memberof CallLogConflictResponse + */ + 'error'?: string; + /** + * A message describing how to solve the problem + * @type {string} + * @memberof CallLogConflictResponse + */ + 'error_info'?: string; + /** + * + * @type {object} + * @memberof CallLogConflictResponse + */ + 'data'?: object | null; + /** + * + * @type {object} + * @memberof CallLogConflictResponse + */ + 'additional_data'?: object | null; +} + diff --git a/models/call-log-forbidden-response.ts b/models/call-log-forbidden-response.ts new file mode 100644 index 00000000..9866baf8 --- /dev/null +++ b/models/call-log-forbidden-response.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 CallLogForbiddenResponse + */ +export interface CallLogForbiddenResponse { + /** + * + * @type {boolean} + * @memberof CallLogForbiddenResponse + */ + 'success'?: boolean; + /** + * The description of the error + * @type {string} + * @memberof CallLogForbiddenResponse + */ + 'error'?: string; + /** + * A message describing how to solve the problem + * @type {string} + * @memberof CallLogForbiddenResponse + */ + 'error_info'?: string; + /** + * + * @type {object} + * @memberof CallLogForbiddenResponse + */ + 'data'?: object | null; + /** + * + * @type {object} + * @memberof CallLogForbiddenResponse + */ + 'additional_data'?: object | null; +} + diff --git a/models/call-log-gone-response.ts b/models/call-log-gone-response.ts new file mode 100644 index 00000000..2f628cc9 --- /dev/null +++ b/models/call-log-gone-response.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 CallLogGoneResponse + */ +export interface CallLogGoneResponse { + /** + * + * @type {boolean} + * @memberof CallLogGoneResponse + */ + 'success'?: boolean; + /** + * The description of the error + * @type {string} + * @memberof CallLogGoneResponse + */ + 'error'?: string; + /** + * A message describing how to solve the problem + * @type {string} + * @memberof CallLogGoneResponse + */ + 'error_info'?: string; + /** + * + * @type {object} + * @memberof CallLogGoneResponse + */ + 'data'?: object | null; + /** + * + * @type {object} + * @memberof CallLogGoneResponse + */ + 'additional_data'?: object | null; +} + diff --git a/models/call-log-internal-error-response.ts b/models/call-log-internal-error-response.ts new file mode 100644 index 00000000..64f527c4 --- /dev/null +++ b/models/call-log-internal-error-response.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 CallLogInternalErrorResponse + */ +export interface CallLogInternalErrorResponse { + /** + * + * @type {boolean} + * @memberof CallLogInternalErrorResponse + */ + 'success'?: boolean; + /** + * The description of the error + * @type {string} + * @memberof CallLogInternalErrorResponse + */ + 'error'?: string; + /** + * A message describing how to solve the problem + * @type {string} + * @memberof CallLogInternalErrorResponse + */ + 'error_info'?: string; + /** + * + * @type {object} + * @memberof CallLogInternalErrorResponse + */ + 'data'?: object | null; + /** + * + * @type {object} + * @memberof CallLogInternalErrorResponse + */ + 'additional_data'?: object | null; +} + diff --git a/models/call-log-not-found-response.ts b/models/call-log-not-found-response.ts new file mode 100644 index 00000000..52d2e1e4 --- /dev/null +++ b/models/call-log-not-found-response.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 CallLogNotFoundResponse + */ +export interface CallLogNotFoundResponse { + /** + * + * @type {boolean} + * @memberof CallLogNotFoundResponse + */ + 'success'?: boolean; + /** + * The description of the error + * @type {string} + * @memberof CallLogNotFoundResponse + */ + 'error'?: string; + /** + * A message describing how to solve the problem + * @type {string} + * @memberof CallLogNotFoundResponse + */ + 'error_info'?: string; + /** + * + * @type {object} + * @memberof CallLogNotFoundResponse + */ + 'data'?: object | null; + /** + * + * @type {object} + * @memberof CallLogNotFoundResponse + */ + 'additional_data'?: object | null; +} + 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/comment.ts b/models/comment.ts new file mode 100644 index 00000000..b756414c --- /dev/null +++ b/models/comment.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 Comment + */ +export interface Comment { + /** + * The ID of the note + * @type {string} + * @memberof Comment + */ + 'uuid'?: string; + /** + * Whether the note is active or deleted + * @type {boolean} + * @memberof Comment + */ + 'active_flag'?: boolean; + /** + * The creation date and time of the note + * @type {string} + * @memberof Comment + */ + 'add_time'?: string; + /** + * The creation date and time of the note + * @type {string} + * @memberof Comment + */ + 'update_time'?: string; + /** + * The content of the note in HTML format. Subject to sanitization on the back-end. + * @type {string} + * @memberof Comment + */ + 'content'?: string; + /** + * The ID of the object that the comment is attached to, will be the id of the note + * @type {string} + * @memberof Comment + */ + 'object_id'?: string; + /** + * The type of object that the comment is attached to, will be \"note\" + * @type {string} + * @memberof Comment + */ + 'object_type'?: string; + /** + * The ID of the user who created the comment + * @type {number} + * @memberof Comment + */ + 'user_id'?: number; + /** + * The ID of the user who last updated the comment + * @type {number} + * @memberof Comment + */ + 'updater_id'?: number; + /** + * The ID of the company + * @type {number} + * @memberof Comment + */ + 'company_id'?: number; +} + 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..9516bec2 --- /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
`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/deal-all-of-creator-user-id.ts b/models/deal-all-of-creator-user-id.ts new file mode 100644 index 00000000..1b7fd03d --- /dev/null +++ b/models/deal-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 DealAllOfCreatorUserId + */ +export interface DealAllOfCreatorUserId { + /** + * The ID of the deal creator + * @type {number} + * @memberof DealAllOfCreatorUserId + */ + 'id'?: number; + /** + * The name of the deal creator + * @type {string} + * @memberof DealAllOfCreatorUserId + */ + 'name'?: string; + /** + * The email of the deal creator + * @type {string} + * @memberof DealAllOfCreatorUserId + */ + 'email'?: string; + /** + * If the creator has a picture or not + * @type {boolean} + * @memberof DealAllOfCreatorUserId + */ + 'has_pic'?: boolean; + /** + * The creator picture hash + * @type {string} + * @memberof DealAllOfCreatorUserId + */ + 'pic_hash'?: string | null; + /** + * Whether the creator is active or not + * @type {boolean} + * @memberof DealAllOfCreatorUserId + */ + 'active_flag'?: boolean; + /** + * The ID of the deal creator + * @type {number} + * @memberof DealAllOfCreatorUserId + */ + 'value'?: number; +} + diff --git a/models/deal-all-of.ts b/models/deal-all-of.ts new file mode 100644 index 00000000..47cf7414 --- /dev/null +++ b/models/deal-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 { DealAllOfCreatorUserId } from './deal-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 DealAllOf + */ +export interface DealAllOf { + /** + * The ID of the deal + * @type {number} + * @memberof DealAllOf + */ + 'id'?: number; + /** + * + * @type {DealAllOfCreatorUserId} + * @memberof DealAllOf + */ + 'creator_user_id'?: DealAllOfCreatorUserId; + /** + * + * @type {DealUserDataWithId} + * @memberof DealAllOf + */ + 'user_id'?: DealUserDataWithId; + /** + * + * @type {DealPersonDataWithId} + * @memberof DealAllOf + */ + 'person_id'?: DealPersonDataWithId; + /** + * + * @type {DealOrganizationDataWithId} + * @memberof DealAllOf + */ + 'org_id'?: DealOrganizationDataWithId; +} + 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-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..7e625ddb --- /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 { Deal } from './deal'; +// May contain unused imports in some cases +// @ts-ignore +import { DealAllOfCreatorUserId } from './deal-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 = Deal & DealNonStrictWithDetailsAllOf; + + 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-product-request-body.ts b/models/deal-product-request-body.ts new file mode 100644 index 00000000..cd519ffd --- /dev/null +++ b/models/deal-product-request-body.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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 DealProductRequestBody + */ +export interface DealProductRequestBody { + /** + * The ID of the product to use + * @type {number} + * @memberof DealProductRequestBody + */ + 'product_id': number; + /** + * The price at which this product will be added to the deal + * @type {number} + * @memberof DealProductRequestBody + */ + 'item_price': number; + /** + * How many items of this product will be added to the deal + * @type {number} + * @memberof DealProductRequestBody + */ + '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 DealProductRequestBody + */ + 'discount'?: number; + /** + * The type of the discount\'s value + * @type {string} + * @memberof DealProductRequestBody + */ + 'discount_type'?: DealProductRequestBodyDiscountTypeConst; + /** + * The ID of the product variation to use. When omitted, no variation will be used + * @type {number} + * @memberof DealProductRequestBody + */ + 'product_variation_id'?: number; + /** + * A textual comment associated with this product-deal attachment + * @type {string} + * @memberof DealProductRequestBody + */ + 'comments'?: string; + /** + * The tax percentage + * @type {number} + * @memberof DealProductRequestBody + */ + '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 DealProductRequestBody + */ + 'tax_method'?: DealProductRequestBodyTaxMethodConst; + /** + * 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 Not possible to disable the product if the deal has installments associated and the product is the last one enabled Not possible to enable the product if the deal has installments associated and the product is recurring + * @type {boolean} + * @memberof DealProductRequestBody + */ + 'enabled_flag'?: boolean; +} + +export const DealProductRequestBodyDiscountTypeConst = { + percentage: 'percentage', + amount: 'amount' +} as const; + +export type DealProductRequestBodyDiscountTypeConst = typeof DealProductRequestBodyDiscountTypeConst[keyof typeof DealProductRequestBodyDiscountTypeConst]; +export const DealProductRequestBodyTaxMethodConst = { + exclusive: 'exclusive', + inclusive: 'inclusive', + none: 'none' +} as const; + +export type DealProductRequestBodyTaxMethodConst = typeof DealProductRequestBodyTaxMethodConst[keyof typeof DealProductRequestBodyTaxMethodConst]; + + diff --git a/models/deal-product-request-body1.ts b/models/deal-product-request-body1.ts new file mode 100644 index 00000000..2c67eee5 --- /dev/null +++ b/models/deal-product-request-body1.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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 DealProductRequestBody1 + */ +export interface DealProductRequestBody1 { + /** + * The ID of the product to use + * @type {number} + * @memberof DealProductRequestBody1 + */ + 'product_id'?: number; + /** + * The price at which this product will be added to the deal + * @type {number} + * @memberof DealProductRequestBody1 + */ + 'item_price'?: number; + /** + * How many items of this product will be added to the deal + * @type {number} + * @memberof DealProductRequestBody1 + */ + '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 DealProductRequestBody1 + */ + 'discount'?: number; + /** + * The type of the discount\'s value + * @type {string} + * @memberof DealProductRequestBody1 + */ + 'discount_type'?: DealProductRequestBody1DiscountTypeConst; + /** + * The ID of the product variation to use. When omitted, no variation will be used + * @type {number} + * @memberof DealProductRequestBody1 + */ + 'product_variation_id'?: number; + /** + * A textual comment associated with this product-deal attachment + * @type {string} + * @memberof DealProductRequestBody1 + */ + 'comments'?: string; + /** + * The tax percentage + * @type {number} + * @memberof DealProductRequestBody1 + */ + '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 DealProductRequestBody1 + */ + 'tax_method'?: DealProductRequestBody1TaxMethodConst; + /** + * 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 Not possible to disable the product if the deal has installments associated and the product is the last one enabled Not possible to enable the product if the deal has installments associated and the product is recurring + * @type {boolean} + * @memberof DealProductRequestBody1 + */ + 'enabled_flag'?: boolean; +} + +export const DealProductRequestBody1DiscountTypeConst = { + percentage: 'percentage', + amount: 'amount' +} as const; + +export type DealProductRequestBody1DiscountTypeConst = typeof DealProductRequestBody1DiscountTypeConst[keyof typeof DealProductRequestBody1DiscountTypeConst]; +export const DealProductRequestBody1TaxMethodConst = { + exclusive: 'exclusive', + inclusive: 'inclusive', + none: 'none' +} as const; + +export type DealProductRequestBody1TaxMethodConst = typeof DealProductRequestBody1TaxMethodConst[keyof typeof DealProductRequestBody1TaxMethodConst]; + + 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/deal.ts b/models/deal.ts new file mode 100644 index 00000000..add9a4f4 --- /dev/null +++ b/models/deal.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 { DealAllOf } from './deal-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DealAllOfCreatorUserId } from './deal-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 Deal + * @export + */ +export type Deal = BaseDeal & DealAllOf; + + 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-response-data.ts b/models/delete-activities-response-data.ts new file mode 100644 index 00000000..de0178b0 --- /dev/null +++ b/models/delete-activities-response-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 DeleteActivitiesResponseData + */ +export interface DeleteActivitiesResponseData { + /** + * An array of the IDs of activities that were deleted + * @type {Array} + * @memberof DeleteActivitiesResponseData + */ + 'id'?: Array; +} + diff --git a/models/delete-activities-response.ts b/models/delete-activities-response.ts new file mode 100644 index 00000000..91d2da50 --- /dev/null +++ b/models/delete-activities-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 { DeleteActivitiesResponseData } from './delete-activities-response-data'; + +/** + * + * @export + * @interface DeleteActivitiesResponse + */ +export interface DeleteActivitiesResponse { + /** + * + * @type {boolean} + * @memberof DeleteActivitiesResponse + */ + 'success'?: boolean; + /** + * + * @type {DeleteActivitiesResponseData} + * @memberof DeleteActivitiesResponse + */ + 'data'?: DeleteActivitiesResponseData; +} + diff --git a/models/delete-activity-response-data.ts b/models/delete-activity-response-data.ts new file mode 100644 index 00000000..b788357d --- /dev/null +++ b/models/delete-activity-response-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 DeleteActivityResponseData + */ +export interface DeleteActivityResponseData { + /** + * The ID of the activity that was deleted + * @type {number} + * @memberof DeleteActivityResponseData + */ + 'id'?: number; +} + diff --git a/models/delete-activity-response.ts b/models/delete-activity-response.ts new file mode 100644 index 00000000..34e07d82 --- /dev/null +++ b/models/delete-activity-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 { DeleteActivityResponseData } from './delete-activity-response-data'; + +/** + * + * @export + * @interface DeleteActivityResponse + */ +export interface DeleteActivityResponse { + /** + * + * @type {boolean} + * @memberof DeleteActivityResponse + */ + 'success'?: boolean; + /** + * + * @type {DeleteActivityResponseData} + * @memberof DeleteActivityResponse + */ + 'data'?: DeleteActivityResponseData; +} + diff --git a/models/delete-activity-types-response-all-of-data.ts b/models/delete-activity-types-response-all-of-data.ts new file mode 100644 index 00000000..fc69bbec --- /dev/null +++ b/models/delete-activity-types-response-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 DeleteActivityTypesResponseAllOfData + */ +export interface DeleteActivityTypesResponseAllOfData { + /** + * The IDs of the deleted activity types + * @type {Array} + * @memberof DeleteActivityTypesResponseAllOfData + */ + 'id'?: Array; +} + diff --git a/models/delete-activity-types-response-all-of.ts b/models/delete-activity-types-response-all-of.ts new file mode 100644 index 00000000..13dbc8cb --- /dev/null +++ b/models/delete-activity-types-response-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 { DeleteActivityTypesResponseAllOfData } from './delete-activity-types-response-all-of-data'; + +/** + * + * @export + * @interface DeleteActivityTypesResponseAllOf + */ +export interface DeleteActivityTypesResponseAllOf { + /** + * + * @type {DeleteActivityTypesResponseAllOfData} + * @memberof DeleteActivityTypesResponseAllOf + */ + 'data'?: DeleteActivityTypesResponseAllOfData; +} + diff --git a/models/delete-activity-types-response.ts b/models/delete-activity-types-response.ts new file mode 100644 index 00000000..b2b96310 --- /dev/null +++ b/models/delete-activity-types-response.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 { DeleteActivityTypesResponseAllOf } from './delete-activity-types-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DeleteActivityTypesResponseAllOfData } from './delete-activity-types-response-all-of-data'; + +/** + * @type DeleteActivityTypesResponse + * @export + */ +export type DeleteActivityTypesResponse = BaseResponse & DeleteActivityTypesResponseAllOf; + + 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-response.ts b/models/delete-comment-response.ts new file mode 100644 index 00000000..fb5479f8 --- /dev/null +++ b/models/delete-comment-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 DeleteCommentResponse + */ +export interface DeleteCommentResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteCommentResponse + */ + 'success'?: boolean; + /** + * If the response is successful or not + * @type {boolean} + * @memberof DeleteCommentResponse + */ + 'data'?: boolean; +} + diff --git a/models/delete-conversation-forbidden-error-response-additional-data.ts b/models/delete-conversation-forbidden-error-response-additional-data.ts new file mode 100644 index 00000000..2b5fc7b9 --- /dev/null +++ b/models/delete-conversation-forbidden-error-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 DeleteConversationForbiddenErrorResponseAdditionalData + */ +export interface DeleteConversationForbiddenErrorResponseAdditionalData { + /** + * An error code sent by the API + * @type {string} + * @memberof DeleteConversationForbiddenErrorResponseAdditionalData + */ + 'code'?: string; +} + diff --git a/models/delete-conversation-forbidden-error-response.ts b/models/delete-conversation-forbidden-error-response.ts new file mode 100644 index 00000000..ecc5a79f --- /dev/null +++ b/models/delete-conversation-forbidden-error-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 { DeleteConversationForbiddenErrorResponseAdditionalData } from './delete-conversation-forbidden-error-response-additional-data'; + +/** + * + * @export + * @interface DeleteConversationForbiddenErrorResponse + */ +export interface DeleteConversationForbiddenErrorResponse { + /** + * + * @type {boolean} + * @memberof DeleteConversationForbiddenErrorResponse + */ + 'success'?: boolean; + /** + * The error description + * @type {string} + * @memberof DeleteConversationForbiddenErrorResponse + */ + 'error'?: string; + /** + * + * @type {string} + * @memberof DeleteConversationForbiddenErrorResponse + */ + 'error_info'?: string; + /** + * + * @type {DeleteConversationForbiddenErrorResponseAdditionalData} + * @memberof DeleteConversationForbiddenErrorResponse + */ + 'additional_data'?: DeleteConversationForbiddenErrorResponseAdditionalData; +} + diff --git a/models/delete-conversation-not-found-error-response-additional-data.ts b/models/delete-conversation-not-found-error-response-additional-data.ts new file mode 100644 index 00000000..1699bac8 --- /dev/null +++ b/models/delete-conversation-not-found-error-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 DeleteConversationNotFoundErrorResponseAdditionalData + */ +export interface DeleteConversationNotFoundErrorResponseAdditionalData { + /** + * An error code sent by the API + * @type {string} + * @memberof DeleteConversationNotFoundErrorResponseAdditionalData + */ + 'code'?: string; +} + diff --git a/models/delete-conversation-not-found-error-response.ts b/models/delete-conversation-not-found-error-response.ts new file mode 100644 index 00000000..c96fa21b --- /dev/null +++ b/models/delete-conversation-not-found-error-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 { DeleteConversationNotFoundErrorResponseAdditionalData } from './delete-conversation-not-found-error-response-additional-data'; + +/** + * + * @export + * @interface DeleteConversationNotFoundErrorResponse + */ +export interface DeleteConversationNotFoundErrorResponse { + /** + * + * @type {boolean} + * @memberof DeleteConversationNotFoundErrorResponse + */ + 'success'?: boolean; + /** + * The error description + * @type {string} + * @memberof DeleteConversationNotFoundErrorResponse + */ + 'error'?: string; + /** + * + * @type {string} + * @memberof DeleteConversationNotFoundErrorResponse + */ + 'error_info'?: string; + /** + * + * @type {DeleteConversationNotFoundErrorResponseAdditionalData} + * @memberof DeleteConversationNotFoundErrorResponse + */ + 'additional_data'?: DeleteConversationNotFoundErrorResponseAdditionalData; +} + diff --git a/models/delete-deal-follower-response-data.ts b/models/delete-deal-follower-response-data.ts new file mode 100644 index 00000000..befaf6d0 --- /dev/null +++ b/models/delete-deal-follower-response-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 DeleteDealFollowerResponseData + */ +export interface DeleteDealFollowerResponseData { + /** + * The ID of the deal follower that was deleted + * @type {number} + * @memberof DeleteDealFollowerResponseData + */ + 'id'?: number; +} + diff --git a/models/delete-deal-follower-response.ts b/models/delete-deal-follower-response.ts new file mode 100644 index 00000000..c97ad1e2 --- /dev/null +++ b/models/delete-deal-follower-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 { DeleteDealFollowerResponseData } from './delete-deal-follower-response-data'; + +/** + * + * @export + * @interface DeleteDealFollowerResponse + */ +export interface DeleteDealFollowerResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteDealFollowerResponse + */ + 'success'?: boolean; + /** + * + * @type {DeleteDealFollowerResponseData} + * @memberof DeleteDealFollowerResponse + */ + 'data'?: DeleteDealFollowerResponseData; +} + diff --git a/models/delete-deal-participant-response-data.ts b/models/delete-deal-participant-response-data.ts new file mode 100644 index 00000000..52748120 --- /dev/null +++ b/models/delete-deal-participant-response-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 DeleteDealParticipantResponseData + */ +export interface DeleteDealParticipantResponseData { + /** + * The ID of the deal participant that was deleted + * @type {number} + * @memberof DeleteDealParticipantResponseData + */ + 'id'?: number; +} + diff --git a/models/delete-deal-participant-response.ts b/models/delete-deal-participant-response.ts new file mode 100644 index 00000000..0b0ec432 --- /dev/null +++ b/models/delete-deal-participant-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 { DeleteDealParticipantResponseData } from './delete-deal-participant-response-data'; + +/** + * + * @export + * @interface DeleteDealParticipantResponse + */ +export interface DeleteDealParticipantResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteDealParticipantResponse + */ + 'success'?: boolean; + /** + * + * @type {DeleteDealParticipantResponseData} + * @memberof DeleteDealParticipantResponse + */ + 'data'?: DeleteDealParticipantResponseData; +} + diff --git a/models/delete-deal-product-response-data.ts b/models/delete-deal-product-response-data.ts new file mode 100644 index 00000000..0587d933 --- /dev/null +++ b/models/delete-deal-product-response-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 DeleteDealProductResponseData + */ +export interface DeleteDealProductResponseData { + /** + * The ID of an attached product that was deleted from the deal + * @type {number} + * @memberof DeleteDealProductResponseData + */ + 'id'?: number; +} + diff --git a/models/delete-deal-product-response.ts b/models/delete-deal-product-response.ts new file mode 100644 index 00000000..3ff40f86 --- /dev/null +++ b/models/delete-deal-product-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 { DeleteDealProductResponseData } from './delete-deal-product-response-data'; + +/** + * + * @export + * @interface DeleteDealProductResponse + */ +export interface DeleteDealProductResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteDealProductResponse + */ + 'success'?: boolean; + /** + * + * @type {DeleteDealProductResponseData} + * @memberof DeleteDealProductResponse + */ + 'data'?: DeleteDealProductResponseData; +} + diff --git a/models/delete-deal-response-data.ts b/models/delete-deal-response-data.ts new file mode 100644 index 00000000..66656d32 --- /dev/null +++ b/models/delete-deal-response-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 DeleteDealResponseData + */ +export interface DeleteDealResponseData { + /** + * The ID of the deal that was deleted + * @type {number} + * @memberof DeleteDealResponseData + */ + 'id'?: number; +} + diff --git a/models/delete-deal-response.ts b/models/delete-deal-response.ts new file mode 100644 index 00000000..99fa3210 --- /dev/null +++ b/models/delete-deal-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 { DeleteDealResponseData } from './delete-deal-response-data'; + +/** + * + * @export + * @interface DeleteDealResponse + */ +export interface DeleteDealResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteDealResponse + */ + 'success'?: boolean; + /** + * + * @type {DeleteDealResponseData} + * @memberof DeleteDealResponse + */ + 'data'?: DeleteDealResponseData; +} + diff --git a/models/delete-deals-response-data.ts b/models/delete-deals-response-data.ts new file mode 100644 index 00000000..e1a79465 --- /dev/null +++ b/models/delete-deals-response-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 DeleteDealsResponseData + */ +export interface DeleteDealsResponseData { + /** + * The list of deleted deals IDs + * @type {Array} + * @memberof DeleteDealsResponseData + */ + 'id'?: Array; +} + diff --git a/models/delete-deals-response.ts b/models/delete-deals-response.ts new file mode 100644 index 00000000..0774c424 --- /dev/null +++ b/models/delete-deals-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 { DeleteDealsResponseData } from './delete-deals-response-data'; + +/** + * + * @export + * @interface DeleteDealsResponse + */ +export interface DeleteDealsResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof DeleteDealsResponse + */ + 'success'?: boolean; + /** + * + * @type {DeleteDealsResponseData} + * @memberof DeleteDealsResponse + */ + 'data'?: DeleteDealsResponseData; +} + diff --git a/models/delete-fields-response-all-of-data.ts b/models/delete-fields-response-all-of-data.ts new file mode 100644 index 00000000..ff9b3f95 --- /dev/null +++ b/models/delete-fields-response-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 DeleteFieldsResponseAllOfData + */ +export interface DeleteFieldsResponseAllOfData { + /** + * The list of deleted field IDs + * @type {Array} + * @memberof DeleteFieldsResponseAllOfData + */ + 'id'?: Array; +} + diff --git a/models/delete-fields-response-all-of.ts b/models/delete-fields-response-all-of.ts new file mode 100644 index 00000000..6acadda2 --- /dev/null +++ b/models/delete-fields-response-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 { DeleteFieldsResponseAllOfData } from './delete-fields-response-all-of-data'; + +/** + * + * @export + * @interface DeleteFieldsResponseAllOf + */ +export interface DeleteFieldsResponseAllOf { + /** + * + * @type {DeleteFieldsResponseAllOfData} + * @memberof DeleteFieldsResponseAllOf + */ + 'data'?: DeleteFieldsResponseAllOfData; +} + diff --git a/models/delete-fields-response.ts b/models/delete-fields-response.ts new file mode 100644 index 00000000..3e3adf7d --- /dev/null +++ b/models/delete-fields-response.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 { DeleteFieldsResponseAllOf } from './delete-fields-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DeleteFieldsResponseAllOfData } from './delete-fields-response-all-of-data'; + +/** + * @type DeleteFieldsResponse + * @export + */ +export type DeleteFieldsResponse = BaseResponse & DeleteFieldsResponseAllOf; + + diff --git a/models/delete-file-response-data.ts b/models/delete-file-response-data.ts new file mode 100644 index 00000000..6e26050f --- /dev/null +++ b/models/delete-file-response-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 DeleteFileResponseData + */ +export interface DeleteFileResponseData { + /** + * The ID of the file + * @type {number} + * @memberof DeleteFileResponseData + */ + 'id'?: number; +} + diff --git a/models/delete-file-response.ts b/models/delete-file-response.ts new file mode 100644 index 00000000..f3136616 --- /dev/null +++ b/models/delete-file-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 { DeleteFileResponseData } from './delete-file-response-data'; + +/** + * + * @export + * @interface DeleteFileResponse + */ +export interface DeleteFileResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteFileResponse + */ + 'success'?: boolean; + /** + * + * @type {DeleteFileResponseData} + * @memberof DeleteFileResponse + */ + 'data'?: DeleteFileResponseData; +} + diff --git a/models/delete-filter-response-all-of-data.ts b/models/delete-filter-response-all-of-data.ts new file mode 100644 index 00000000..2740a033 --- /dev/null +++ b/models/delete-filter-response-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 DeleteFilterResponseAllOfData + */ +export interface DeleteFilterResponseAllOfData { + /** + * The ID of the deleted filter + * @type {number} + * @memberof DeleteFilterResponseAllOfData + */ + 'id'?: number; +} + diff --git a/models/delete-filter-response-all-of.ts b/models/delete-filter-response-all-of.ts new file mode 100644 index 00000000..d884b9ab --- /dev/null +++ b/models/delete-filter-response-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 { DeleteFilterResponseAllOfData } from './delete-filter-response-all-of-data'; + +/** + * + * @export + * @interface DeleteFilterResponseAllOf + */ +export interface DeleteFilterResponseAllOf { + /** + * + * @type {DeleteFilterResponseAllOfData} + * @memberof DeleteFilterResponseAllOf + */ + 'data'?: DeleteFilterResponseAllOfData; +} + diff --git a/models/delete-filter-response.ts b/models/delete-filter-response.ts new file mode 100644 index 00000000..70c92e92 --- /dev/null +++ b/models/delete-filter-response.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 { DeleteFilterResponseAllOf } from './delete-filter-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DeleteFilterResponseAllOfData } from './delete-filter-response-all-of-data'; + +/** + * @type DeleteFilterResponse + * @export + */ +export type DeleteFilterResponse = BaseResponse & DeleteFilterResponseAllOf; + + diff --git a/models/delete-filters-response-all-of-data.ts b/models/delete-filters-response-all-of-data.ts new file mode 100644 index 00000000..5598023f --- /dev/null +++ b/models/delete-filters-response-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 DeleteFiltersResponseAllOfData + */ +export interface DeleteFiltersResponseAllOfData { + /** + * The array of the IDs of the deleted filter + * @type {Array} + * @memberof DeleteFiltersResponseAllOfData + */ + 'id'?: Array; +} + diff --git a/models/delete-filters-response-all-of.ts b/models/delete-filters-response-all-of.ts new file mode 100644 index 00000000..f72c85a5 --- /dev/null +++ b/models/delete-filters-response-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 { DeleteFiltersResponseAllOfData } from './delete-filters-response-all-of-data'; + +/** + * + * @export + * @interface DeleteFiltersResponseAllOf + */ +export interface DeleteFiltersResponseAllOf { + /** + * + * @type {DeleteFiltersResponseAllOfData} + * @memberof DeleteFiltersResponseAllOf + */ + 'data'?: DeleteFiltersResponseAllOfData; +} + diff --git a/models/delete-filters-response.ts b/models/delete-filters-response.ts new file mode 100644 index 00000000..d11d4626 --- /dev/null +++ b/models/delete-filters-response.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 { DeleteFiltersResponseAllOf } from './delete-filters-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DeleteFiltersResponseAllOfData } from './delete-filters-response-all-of-data'; + +/** + * @type DeleteFiltersResponse + * @export + */ +export type DeleteFiltersResponse = BaseResponse & DeleteFiltersResponseAllOf; + + diff --git a/models/delete-goal-response.ts b/models/delete-goal-response.ts new file mode 100644 index 00000000..e167ecf5 --- /dev/null +++ b/models/delete-goal-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 DeleteGoalResponse + */ +export interface DeleteGoalResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteGoalResponse + */ + 'success'?: boolean; +} + diff --git a/models/delete-lead-id-response.ts b/models/delete-lead-id-response.ts new file mode 100644 index 00000000..9063c113 --- /dev/null +++ b/models/delete-lead-id-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 { GetLeadIdResponseData } from './get-lead-id-response-data'; + +/** + * + * @export + * @interface DeleteLeadIdResponse + */ +export interface DeleteLeadIdResponse { + /** + * + * @type {boolean} + * @memberof DeleteLeadIdResponse + */ + 'success'?: boolean; + /** + * + * @type {GetLeadIdResponseData} + * @memberof DeleteLeadIdResponse + */ + 'data'?: GetLeadIdResponseData; +} + diff --git a/models/delete-mail-thread-response-all-of-data.ts b/models/delete-mail-thread-response-all-of-data.ts new file mode 100644 index 00000000..4e07eaf2 --- /dev/null +++ b/models/delete-mail-thread-response-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 DeleteMailThreadResponseAllOfData + */ +export interface DeleteMailThreadResponseAllOfData { + /** + * The ID of the deleted mail thread + * @type {number} + * @memberof DeleteMailThreadResponseAllOfData + */ + 'id'?: number; +} + diff --git a/models/delete-mail-thread-response-all-of.ts b/models/delete-mail-thread-response-all-of.ts new file mode 100644 index 00000000..d68cb44b --- /dev/null +++ b/models/delete-mail-thread-response-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 { DeleteMailThreadResponseAllOfData } from './delete-mail-thread-response-all-of-data'; + +/** + * + * @export + * @interface DeleteMailThreadResponseAllOf + */ +export interface DeleteMailThreadResponseAllOf { + /** + * + * @type {DeleteMailThreadResponseAllOfData} + * @memberof DeleteMailThreadResponseAllOf + */ + 'data'?: DeleteMailThreadResponseAllOfData; +} + diff --git a/models/delete-mail-thread-response.ts b/models/delete-mail-thread-response.ts new file mode 100644 index 00000000..c2bbe697 --- /dev/null +++ b/models/delete-mail-thread-response.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 { DeleteMailThreadResponseAllOf } from './delete-mail-thread-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DeleteMailThreadResponseAllOfData } from './delete-mail-thread-response-all-of-data'; + +/** + * @type DeleteMailThreadResponse + * @export + */ +export type DeleteMailThreadResponse = BaseResponse & DeleteMailThreadResponseAllOf; + + diff --git a/models/delete-note-response.ts b/models/delete-note-response.ts new file mode 100644 index 00000000..8f58e452 --- /dev/null +++ b/models/delete-note-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 DeleteNoteResponse + */ +export interface DeleteNoteResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteNoteResponse + */ + 'success'?: boolean; + /** + * If the response is successful or not + * @type {boolean} + * @memberof DeleteNoteResponse + */ + 'data'?: boolean; +} + diff --git a/models/delete-organization-follower-response-data.ts b/models/delete-organization-follower-response-data.ts new file mode 100644 index 00000000..89ba06f0 --- /dev/null +++ b/models/delete-organization-follower-response-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 DeleteOrganizationFollowerResponseData + */ +export interface DeleteOrganizationFollowerResponseData { + /** + * The ID of the follower that was deleted from the organization + * @type {number} + * @memberof DeleteOrganizationFollowerResponseData + */ + 'id'?: number; +} + diff --git a/models/delete-organization-follower-response.ts b/models/delete-organization-follower-response.ts new file mode 100644 index 00000000..fd0b49a5 --- /dev/null +++ b/models/delete-organization-follower-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 { DeleteOrganizationFollowerResponseData } from './delete-organization-follower-response-data'; + +/** + * + * @export + * @interface DeleteOrganizationFollowerResponse + */ +export interface DeleteOrganizationFollowerResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteOrganizationFollowerResponse + */ + 'success'?: boolean; + /** + * + * @type {DeleteOrganizationFollowerResponseData} + * @memberof DeleteOrganizationFollowerResponse + */ + 'data'?: DeleteOrganizationFollowerResponseData; +} + diff --git a/models/delete-organization-relationship-response-all-of-data.ts b/models/delete-organization-relationship-response-all-of-data.ts new file mode 100644 index 00000000..08558cca --- /dev/null +++ b/models/delete-organization-relationship-response-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 DeleteOrganizationRelationshipResponseAllOfData + */ +export interface DeleteOrganizationRelationshipResponseAllOfData { + /** + * The ID of the deleted organization relationship + * @type {number} + * @memberof DeleteOrganizationRelationshipResponseAllOfData + */ + 'id'?: number; +} + diff --git a/models/delete-organization-relationship-response-all-of.ts b/models/delete-organization-relationship-response-all-of.ts new file mode 100644 index 00000000..49b3b158 --- /dev/null +++ b/models/delete-organization-relationship-response-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 { DeleteOrganizationRelationshipResponseAllOfData } from './delete-organization-relationship-response-all-of-data'; + +/** + * + * @export + * @interface DeleteOrganizationRelationshipResponseAllOf + */ +export interface DeleteOrganizationRelationshipResponseAllOf { + /** + * + * @type {DeleteOrganizationRelationshipResponseAllOfData} + * @memberof DeleteOrganizationRelationshipResponseAllOf + */ + 'data'?: DeleteOrganizationRelationshipResponseAllOfData; +} + diff --git a/models/delete-organization-relationship-response.ts b/models/delete-organization-relationship-response.ts new file mode 100644 index 00000000..77932423 --- /dev/null +++ b/models/delete-organization-relationship-response.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 { DeleteOrganizationRelationshipResponseAllOf } from './delete-organization-relationship-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DeleteOrganizationRelationshipResponseAllOfData } from './delete-organization-relationship-response-all-of-data'; + +/** + * @type DeleteOrganizationRelationshipResponse + * @export + */ +export type DeleteOrganizationRelationshipResponse = BaseResponse & DeleteOrganizationRelationshipResponseAllOf; + + diff --git a/models/delete-organization-response-data.ts b/models/delete-organization-response-data.ts new file mode 100644 index 00000000..0c3ff77d --- /dev/null +++ b/models/delete-organization-response-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 DeleteOrganizationResponseData + */ +export interface DeleteOrganizationResponseData { + /** + * The ID of the organization that was deleted + * @type {number} + * @memberof DeleteOrganizationResponseData + */ + 'id'?: number; +} + diff --git a/models/delete-organization-response.ts b/models/delete-organization-response.ts new file mode 100644 index 00000000..41e300af --- /dev/null +++ b/models/delete-organization-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 { DeleteOrganizationResponseData } from './delete-organization-response-data'; + +/** + * + * @export + * @interface DeleteOrganizationResponse + */ +export interface DeleteOrganizationResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteOrganizationResponse + */ + 'success'?: boolean; + /** + * + * @type {DeleteOrganizationResponseData} + * @memberof DeleteOrganizationResponse + */ + 'data'?: DeleteOrganizationResponseData; +} + diff --git a/models/delete-organizations-response-data.ts b/models/delete-organizations-response-data.ts new file mode 100644 index 00000000..3919d5c3 --- /dev/null +++ b/models/delete-organizations-response-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 DeleteOrganizationsResponseData + */ +export interface DeleteOrganizationsResponseData { + /** + * The IDs of the organizations that were deleted + * @type {Array} + * @memberof DeleteOrganizationsResponseData + */ + 'id'?: Array; +} + diff --git a/models/delete-organizations-response.ts b/models/delete-organizations-response.ts new file mode 100644 index 00000000..3edc854b --- /dev/null +++ b/models/delete-organizations-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 { DeleteOrganizationsResponseData } from './delete-organizations-response-data'; + +/** + * + * @export + * @interface DeleteOrganizationsResponse + */ +export interface DeleteOrganizationsResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteOrganizationsResponse + */ + 'success'?: boolean; + /** + * + * @type {DeleteOrganizationsResponseData} + * @memberof DeleteOrganizationsResponse + */ + 'data'?: DeleteOrganizationsResponseData; +} + diff --git a/models/delete-person-response-all-of-data.ts b/models/delete-person-response-all-of-data.ts new file mode 100644 index 00000000..8bbaeca8 --- /dev/null +++ b/models/delete-person-response-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 DeletePersonResponseAllOfData + */ +export interface DeletePersonResponseAllOfData { + /** + * The ID of the deleted person + * @type {number} + * @memberof DeletePersonResponseAllOfData + */ + 'id'?: number; +} + diff --git a/models/delete-person-response-all-of.ts b/models/delete-person-response-all-of.ts new file mode 100644 index 00000000..41caea76 --- /dev/null +++ b/models/delete-person-response-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 { DeletePersonResponseAllOfData } from './delete-person-response-all-of-data'; + +/** + * + * @export + * @interface DeletePersonResponseAllOf + */ +export interface DeletePersonResponseAllOf { + /** + * + * @type {DeletePersonResponseAllOfData} + * @memberof DeletePersonResponseAllOf + */ + 'data'?: DeletePersonResponseAllOfData; +} + diff --git a/models/delete-person-response.ts b/models/delete-person-response.ts new file mode 100644 index 00000000..6d76c996 --- /dev/null +++ b/models/delete-person-response.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 { DeletePersonResponseAllOf } from './delete-person-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DeletePersonResponseAllOfData } from './delete-person-response-all-of-data'; + +/** + * @type DeletePersonResponse + * @export + */ +export type DeletePersonResponse = BaseResponse & DeletePersonResponseAllOf; + + diff --git a/models/delete-persons-response-all-of-data.ts b/models/delete-persons-response-all-of-data.ts new file mode 100644 index 00000000..1308ed66 --- /dev/null +++ b/models/delete-persons-response-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 DeletePersonsResponseAllOfData + */ +export interface DeletePersonsResponseAllOfData { + /** + * The list of deleted persons IDs + * @type {Array} + * @memberof DeletePersonsResponseAllOfData + */ + 'id'?: Array; +} + diff --git a/models/delete-persons-response-all-of.ts b/models/delete-persons-response-all-of.ts new file mode 100644 index 00000000..0f918078 --- /dev/null +++ b/models/delete-persons-response-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 { DeletePersonsResponseAllOfData } from './delete-persons-response-all-of-data'; + +/** + * + * @export + * @interface DeletePersonsResponseAllOf + */ +export interface DeletePersonsResponseAllOf { + /** + * + * @type {DeletePersonsResponseAllOfData} + * @memberof DeletePersonsResponseAllOf + */ + 'data'?: DeletePersonsResponseAllOfData; +} + diff --git a/models/delete-persons-response.ts b/models/delete-persons-response.ts new file mode 100644 index 00000000..2e0a7875 --- /dev/null +++ b/models/delete-persons-response.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 { DeletePersonsResponseAllOf } from './delete-persons-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DeletePersonsResponseAllOfData } from './delete-persons-response-all-of-data'; + +/** + * @type DeletePersonsResponse + * @export + */ +export type DeletePersonsResponse = BaseResponse & DeletePersonsResponseAllOf; + + diff --git a/models/delete-pipeline-response-data.ts b/models/delete-pipeline-response-data.ts new file mode 100644 index 00000000..78201388 --- /dev/null +++ b/models/delete-pipeline-response-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 DeletePipelineResponseData + */ +export interface DeletePipelineResponseData { + /** + * Deleted Pipeline ID + * @type {number} + * @memberof DeletePipelineResponseData + */ + 'id'?: number; +} + diff --git a/models/delete-pipeline-response.ts b/models/delete-pipeline-response.ts new file mode 100644 index 00000000..3f13bfba --- /dev/null +++ b/models/delete-pipeline-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 { DeletePipelineResponseData } from './delete-pipeline-response-data'; + +/** + * + * @export + * @interface DeletePipelineResponse + */ +export interface DeletePipelineResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeletePipelineResponse + */ + 'success'?: boolean; + /** + * + * @type {DeletePipelineResponseData} + * @memberof DeletePipelineResponse + */ + 'data'?: DeletePipelineResponseData; +} + diff --git a/models/delete-product-field-response.ts b/models/delete-product-field-response.ts new file mode 100644 index 00000000..83b3cbfa --- /dev/null +++ b/models/delete-product-field-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 { DeleteProductResponseData } from './delete-product-response-data'; + +/** + * + * @export + * @interface DeleteProductFieldResponse + */ +export interface DeleteProductFieldResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof DeleteProductFieldResponse + */ + 'success'?: boolean; + /** + * + * @type {DeleteProductResponseData} + * @memberof DeleteProductFieldResponse + */ + 'data'?: DeleteProductResponseData; +} + diff --git a/models/delete-product-fields-response-data.ts b/models/delete-product-fields-response-data.ts new file mode 100644 index 00000000..6cc4130f --- /dev/null +++ b/models/delete-product-fields-response-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 DeleteProductFieldsResponseData + */ +export interface DeleteProductFieldsResponseData { + /** + * Array of all the IDs of the deleted product fields + * @type {Array} + * @memberof DeleteProductFieldsResponseData + */ + 'id'?: Array; +} + diff --git a/models/delete-product-fields-response.ts b/models/delete-product-fields-response.ts new file mode 100644 index 00000000..be6f4145 --- /dev/null +++ b/models/delete-product-fields-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 { DeleteProductFieldsResponseData } from './delete-product-fields-response-data'; + +/** + * + * @export + * @interface DeleteProductFieldsResponse + */ +export interface DeleteProductFieldsResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof DeleteProductFieldsResponse + */ + 'success'?: boolean; + /** + * + * @type {DeleteProductFieldsResponseData} + * @memberof DeleteProductFieldsResponse + */ + 'data'?: DeleteProductFieldsResponseData; +} + diff --git a/models/delete-product-follower-response.ts b/models/delete-product-follower-response.ts new file mode 100644 index 00000000..d674c7c9 --- /dev/null +++ b/models/delete-product-follower-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 { DeleteProductResponseData } from './delete-product-response-data'; + +/** + * + * @export + * @interface DeleteProductFollowerResponse + */ +export interface DeleteProductFollowerResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof DeleteProductFollowerResponse + */ + 'success'?: boolean; + /** + * + * @type {DeleteProductResponseData} + * @memberof DeleteProductFollowerResponse + */ + 'data'?: DeleteProductResponseData; +} + diff --git a/models/delete-product-response-data.ts b/models/delete-product-response-data.ts new file mode 100644 index 00000000..a7f53708 --- /dev/null +++ b/models/delete-product-response-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 DeleteProductResponseData + */ +export interface DeleteProductResponseData { + /** + * + * @type {number} + * @memberof DeleteProductResponseData + */ + 'id'?: number; +} + diff --git a/models/delete-product-response.ts b/models/delete-product-response.ts new file mode 100644 index 00000000..7a6342f0 --- /dev/null +++ b/models/delete-product-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 { DeleteProductResponseData } from './delete-product-response-data'; + +/** + * + * @export + * @interface DeleteProductResponse + */ +export interface DeleteProductResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof DeleteProductResponse + */ + 'success'?: boolean; + /** + * + * @type {DeleteProductResponseData} + * @memberof DeleteProductResponse + */ + 'data'?: DeleteProductResponseData; +} + 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-response.ts b/models/delete-project-response.ts new file mode 100644 index 00000000..713483cc --- /dev/null +++ b/models/delete-project-response.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 DeleteProjectResponse + */ +export interface DeleteProjectResponse { + /** + * + * @type {boolean} + * @memberof DeleteProjectResponse + */ + 'success'?: boolean; + /** + * + * @type {DeleteProject} + * @memberof DeleteProjectResponse + */ + 'data'?: DeleteProject; + /** + * + * @type {object} + * @memberof DeleteProjectResponse + */ + '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-response-all-of-data.ts b/models/delete-response-all-of-data.ts new file mode 100644 index 00000000..09e629c8 --- /dev/null +++ b/models/delete-response-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 DeleteResponseAllOfData + */ +export interface DeleteResponseAllOfData { + /** + * The ID of the field that was deleted + * @type {number} + * @memberof DeleteResponseAllOfData + */ + 'id'?: number; +} + diff --git a/models/delete-response-all-of.ts b/models/delete-response-all-of.ts new file mode 100644 index 00000000..1263cc92 --- /dev/null +++ b/models/delete-response-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 { DeleteResponseAllOfData } from './delete-response-all-of-data'; + +/** + * + * @export + * @interface DeleteResponseAllOf + */ +export interface DeleteResponseAllOf { + /** + * + * @type {DeleteResponseAllOfData} + * @memberof DeleteResponseAllOf + */ + 'data'?: DeleteResponseAllOfData; +} + diff --git a/models/delete-response.ts b/models/delete-response.ts new file mode 100644 index 00000000..6d92c0f2 --- /dev/null +++ b/models/delete-response.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 { DeleteResponseAllOf } from './delete-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { DeleteResponseAllOfData } from './delete-response-all-of-data'; + +/** + * @type DeleteResponse + * @export + */ +export type DeleteResponse = BaseResponse & DeleteResponseAllOf; + + 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-response-data.ts b/models/delete-role-assignment-response-data.ts new file mode 100644 index 00000000..329326d5 --- /dev/null +++ b/models/delete-role-assignment-response-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 { DeleteRoleResponseDataData } from './delete-role-response-data-data'; + +/** + * + * @export + * @interface DeleteRoleAssignmentResponseData + */ +export interface DeleteRoleAssignmentResponseData { + /** + * + * @type {DeleteRoleResponseDataData} + * @memberof DeleteRoleAssignmentResponseData + */ + 'data'?: DeleteRoleResponseDataData; +} + diff --git a/models/delete-role-assignment-response.ts b/models/delete-role-assignment-response.ts new file mode 100644 index 00000000..7f0951dc --- /dev/null +++ b/models/delete-role-assignment-response.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 { DeleteRoleAssignmentResponseData } from './delete-role-assignment-response-data'; +// May contain unused imports in some cases +// @ts-ignore +import { DeleteRoleResponseDataData } from './delete-role-response-data-data'; + +/** + * @type DeleteRoleAssignmentResponse + * @export + */ +export type DeleteRoleAssignmentResponse = BaseResponse & DeleteRoleAssignmentResponseData; + + diff --git a/models/delete-role-response-data-data.ts b/models/delete-role-response-data-data.ts new file mode 100644 index 00000000..b43fd1f1 --- /dev/null +++ b/models/delete-role-response-data-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 DeleteRoleResponseDataData + */ +export interface DeleteRoleResponseDataData { + /** + * + * @type {number} + * @memberof DeleteRoleResponseDataData + */ + 'id'?: number; +} + diff --git a/models/delete-role-response-data.ts b/models/delete-role-response-data.ts new file mode 100644 index 00000000..ef0350c6 --- /dev/null +++ b/models/delete-role-response-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 { DeleteRoleResponseDataData } from './delete-role-response-data-data'; + +/** + * + * @export + * @interface DeleteRoleResponseData + */ +export interface DeleteRoleResponseData { + /** + * + * @type {DeleteRoleResponseDataData} + * @memberof DeleteRoleResponseData + */ + 'data'?: DeleteRoleResponseDataData; +} + diff --git a/models/delete-role-response.ts b/models/delete-role-response.ts new file mode 100644 index 00000000..53d4e310 --- /dev/null +++ b/models/delete-role-response.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 { DeleteRoleResponseData } from './delete-role-response-data'; +// May contain unused imports in some cases +// @ts-ignore +import { DeleteRoleResponseDataData } from './delete-role-response-data-data'; + +/** + * @type DeleteRoleResponse + * @export + */ +export type DeleteRoleResponse = BaseResponse & DeleteRoleResponseData; + + diff --git a/models/delete-stage-response-data.ts b/models/delete-stage-response-data.ts new file mode 100644 index 00000000..c6afa248 --- /dev/null +++ b/models/delete-stage-response-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 DeleteStageResponseData + */ +export interface DeleteStageResponseData { + /** + * Deleted stage ID + * @type {number} + * @memberof DeleteStageResponseData + */ + 'id'?: number; +} + diff --git a/models/delete-stage-response.ts b/models/delete-stage-response.ts new file mode 100644 index 00000000..aa504136 --- /dev/null +++ b/models/delete-stage-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 { DeleteStageResponseData } from './delete-stage-response-data'; + +/** + * + * @export + * @interface DeleteStageResponse + */ +export interface DeleteStageResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteStageResponse + */ + 'success'?: boolean; + /** + * + * @type {DeleteStageResponseData} + * @memberof DeleteStageResponse + */ + 'data'?: DeleteStageResponseData; +} + diff --git a/models/delete-stages-response-data.ts b/models/delete-stages-response-data.ts new file mode 100644 index 00000000..cce591e8 --- /dev/null +++ b/models/delete-stages-response-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 DeleteStagesResponseData + */ +export interface DeleteStagesResponseData { + /** + * The list of deleted stage IDs + * @type {Array} + * @memberof DeleteStagesResponseData + */ + 'id'?: Array; +} + diff --git a/models/delete-stages-response.ts b/models/delete-stages-response.ts new file mode 100644 index 00000000..a4bff77a --- /dev/null +++ b/models/delete-stages-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 { DeleteStagesResponseData } from './delete-stages-response-data'; + +/** + * + * @export + * @interface DeleteStagesResponse + */ +export interface DeleteStagesResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof DeleteStagesResponse + */ + 'success'?: boolean; + /** + * + * @type {DeleteStagesResponseData} + * @memberof DeleteStagesResponse + */ + 'data'?: DeleteStagesResponseData; +} + 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-response.ts b/models/delete-task-response.ts new file mode 100644 index 00000000..d3636901 --- /dev/null +++ b/models/delete-task-response.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 DeleteTaskResponse + */ +export interface DeleteTaskResponse { + /** + * + * @type {boolean} + * @memberof DeleteTaskResponse + */ + 'success'?: boolean; + /** + * + * @type {DeleteTask} + * @memberof DeleteTaskResponse + */ + 'data'?: DeleteTask; + /** + * + * @type {object} + * @memberof DeleteTaskResponse + */ + '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/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.ts b/models/field.ts new file mode 100644 index 00000000..5148e4bd --- /dev/null +++ b/models/field.ts @@ -0,0 +1,191 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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 Field + */ +export interface Field { + /** + * The ID of the field. Value is `null` in case of subfields. + * @type {number} + * @memberof Field + */ + 'id'?: number; + /** + * The key of the field. For custom fields this is generated upon creation. + * @type {string} + * @memberof Field + */ + 'key'?: string; + /** + * The name of the field + * @type {string} + * @memberof Field + */ + 'name'?: string; + /** + * The order number of the field + * @type {number} + * @memberof Field + */ + 'order_nr'?: number; + /** + * The type of the field
ValueDescription
`address`Address field
`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 Field + */ + 'field_type'?: FieldFieldTypeConst; + /** + * The creation time of the field + * @type {string} + * @memberof Field + */ + 'add_time'?: string; + /** + * The update time of the field + * @type {string} + * @memberof Field + */ + 'update_time'?: string; + /** + * The ID of the user who created or most recently updated the field, only applicable for custom fields + * @type {number} + * @memberof Field + */ + 'last_updated_by_user_id'?: number; + /** + * The ID of the user who created the field + * @type {number} + * @memberof Field + */ + 'created_by_user_id'?: number; + /** + * The active flag of the field + * @type {boolean} + * @memberof Field + */ + 'active_flag'?: boolean; + /** + * The edit flag of the field + * @type {boolean} + * @memberof Field + */ + 'edit_flag'?: boolean; + /** + * Not used + * @type {boolean} + * @memberof Field + */ + 'index_visible_flag'?: boolean; + /** + * Not used + * @type {boolean} + * @memberof Field + */ + 'details_visible_flag'?: boolean; + /** + * Not used + * @type {boolean} + * @memberof Field + */ + 'add_visible_flag'?: boolean; + /** + * Not used + * @type {boolean} + * @memberof Field + */ + 'important_flag'?: boolean; + /** + * Whether or not the field of an item can be edited in bulk + * @type {boolean} + * @memberof Field + */ + 'bulk_edit_allowed'?: boolean; + /** + * Whether or not items can be searched by this field + * @type {boolean} + * @memberof Field + */ + 'searchable_flag'?: boolean; + /** + * Whether or not items can be filtered by this field + * @type {boolean} + * @memberof Field + */ + 'filtering_allowed'?: boolean; + /** + * Whether or not items can be sorted by this field + * @type {boolean} + * @memberof Field + */ + 'sortable_flag'?: boolean; + /** + * Whether or not the field is mandatory + * @type {boolean} + * @memberof Field + */ + 'mandatory_flag'?: boolean; + /** + * The options of the field. When there are no options, `null` is returned. + * @type {Array} + * @memberof Field + */ + 'options'?: Array | null; + /** + * The deleted options of the field. Only present when there is at least 1 deleted option. + * @type {Array} + * @memberof Field + */ + 'options_deleted'?: Array; + /** + * Whether or not the field is a subfield of another field. Only present if field is subfield. + * @type {boolean} + * @memberof Field + */ + 'is_subfield'?: boolean; + /** + * The subfields of the field. Only present when the field has subfields. + * @type {Array} + * @memberof Field + */ + 'subfields'?: Array; +} + +export const FieldFieldTypeConst = { + 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 FieldFieldTypeConst = typeof FieldFieldTypeConst[keyof typeof FieldFieldTypeConst]; + + diff --git a/models/filter.ts b/models/filter.ts new file mode 100644 index 00000000..4e170eae --- /dev/null +++ b/models/filter.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 Filter + */ +export interface Filter { + /** + * The ID of the created filter + * @type {number} + * @memberof Filter + */ + 'id'?: number; + /** + * The name of the created filter + * @type {string} + * @memberof Filter + */ + 'name'?: string; + /** + * The activity flag of the created filter + * @type {boolean} + * @memberof Filter + */ + 'active_flag'?: boolean; + /** + * + * @type {string} + * @memberof Filter + */ + 'type'?: FilterTypeConst; + /** + * If the created filter is temporary or not + * @type {boolean} + * @memberof Filter + */ + 'temporary_flag'?: boolean; + /** + * The user ID of the created filter + * @type {number} + * @memberof Filter + */ + 'user_id'?: number; + /** + * The add time of the created filter + * @type {string} + * @memberof Filter + */ + 'add_time'?: string; + /** + * The update time of the created filter + * @type {string} + * @memberof Filter + */ + 'update_time'?: string; + /** + * The visibility group ID of the created filter + * @type {number} + * @memberof Filter + */ + 'visible_to'?: number; + /** + * The custom view ID of the created filter + * @type {number} + * @memberof Filter + */ + 'custom_view_id'?: number; + /** + * The created filter conditions object + * @type {object} + * @memberof Filter + */ + 'conditions'?: object; +} + +export const FilterTypeConst = { + deals: 'deals', + leads: 'leads', + org: 'org', + people: 'people', + products: 'products', + activity: 'activity', + projects: 'projects' +} as const; + +export type FilterTypeConst = typeof FilterTypeConst[keyof typeof FilterTypeConst]; + + diff --git a/models/follower-data.ts b/models/follower-data.ts new file mode 100644 index 00000000..9283e651 --- /dev/null +++ b/models/follower-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 FollowerData + */ +export interface FollowerData { + /** + * The name of the follower + * @type {string} + * @memberof FollowerData + */ + 'name'?: string; + /** + * The email of the follower + * @type {string} + * @memberof FollowerData + */ + 'email'?: string; + /** + * The user ID of the follower + * @type {number} + * @memberof FollowerData + */ + 'user_id'?: number; + /** + * The follower picture hash + * @type {string} + * @memberof FollowerData + */ + 'pic_hash'?: string; +} + 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-response-additional-data.ts b/models/get-activities-collection-response-additional-data.ts new file mode 100644 index 00000000..22dcb157 --- /dev/null +++ b/models/get-activities-collection-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. + */ + + + +/** + * The additional data of the list + * @export + * @interface GetActivitiesCollectionResponseAdditionalData + */ +export interface GetActivitiesCollectionResponseAdditionalData { + /** + * 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 GetActivitiesCollectionResponseAdditionalData + */ + 'next_cursor'?: string; +} + diff --git a/models/get-activities-collection-response.ts b/models/get-activities-collection-response.ts new file mode 100644 index 00000000..0ed67ef3 --- /dev/null +++ b/models/get-activities-collection-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 { ActivityCollectionResponseObject } from './activity-collection-response-object'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesCollectionResponseAdditionalData } from './get-activities-collection-response-additional-data'; + +/** + * + * @export + * @interface GetActivitiesCollectionResponse + */ +export interface GetActivitiesCollectionResponse { + /** + * + * @type {boolean} + * @memberof GetActivitiesCollectionResponse + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetActivitiesCollectionResponse + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesCollectionResponseAdditionalData} + * @memberof GetActivitiesCollectionResponse + */ + 'additional_data'?: GetActivitiesCollectionResponseAdditionalData; +} + diff --git a/models/get-activities-response-additional-data-pagination.ts b/models/get-activities-response-additional-data-pagination.ts new file mode 100644 index 00000000..b190949a --- /dev/null +++ b/models/get-activities-response-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 GetActivitiesResponseAdditionalDataPagination + */ +export interface GetActivitiesResponseAdditionalDataPagination { + /** + * Pagination start + * @type {number} + * @memberof GetActivitiesResponseAdditionalDataPagination + */ + 'start'?: number; + /** + * Items shown per page + * @type {number} + * @memberof GetActivitiesResponseAdditionalDataPagination + */ + 'limit'?: number; + /** + * Whether there are more list items in the collection than displayed + * @type {boolean} + * @memberof GetActivitiesResponseAdditionalDataPagination + */ + 'more_items_in_collection'?: boolean; + /** + * Next pagination start + * @type {number} + * @memberof GetActivitiesResponseAdditionalDataPagination + */ + 'next_start'?: number; +} + diff --git a/models/get-activities-response-additional-data.ts b/models/get-activities-response-additional-data.ts new file mode 100644 index 00000000..f0fd6f3b --- /dev/null +++ b/models/get-activities-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 { GetActivitiesResponseAdditionalDataPagination } from './get-activities-response-additional-data-pagination'; + +/** + * + * @export + * @interface GetActivitiesResponseAdditionalData + */ +export interface GetActivitiesResponseAdditionalData { + /** + * + * @type {GetActivitiesResponseAdditionalDataPagination} + * @memberof GetActivitiesResponseAdditionalData + */ + 'pagination'?: GetActivitiesResponseAdditionalDataPagination; +} + diff --git a/models/get-activities-response-related-objects-person.ts b/models/get-activities-response-related-objects-person.ts new file mode 100644 index 00000000..4270ecdc --- /dev/null +++ b/models/get-activities-response-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 { PersonDataWithID } from './person-data-with-id'; + +/** + * + * @export + * @interface GetActivitiesResponseRelatedObjectsPerson + */ +export interface GetActivitiesResponseRelatedObjectsPerson { + /** + * + * @type {PersonDataWithID} + * @memberof GetActivitiesResponseRelatedObjectsPerson + */ + 'PERSON_ID'?: PersonDataWithID; +} + diff --git a/models/get-activities-response-related-objects-user.ts b/models/get-activities-response-related-objects-user.ts new file mode 100644 index 00000000..9f304f03 --- /dev/null +++ b/models/get-activities-response-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 GetActivitiesResponseRelatedObjectsUser + */ +export interface GetActivitiesResponseRelatedObjectsUser { + /** + * + * @type {UserDataWithId} + * @memberof GetActivitiesResponseRelatedObjectsUser + */ + 'USER_ID'?: UserDataWithId; +} + diff --git a/models/get-activities-response-related-objects.ts b/models/get-activities-response-related-objects.ts new file mode 100644 index 00000000..a27d8623 --- /dev/null +++ b/models/get-activities-response-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 { GetActivitiesResponseRelatedObjectsPerson } from './get-activities-response-related-objects-person'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponseRelatedObjectsUser } from './get-activities-response-related-objects-user'; +// May contain unused imports in some cases +// @ts-ignore +import { RelatedDealData } from './related-deal-data'; +// May contain unused imports in some cases +// @ts-ignore +import { RelatedOrganizationData } from './related-organization-data'; + +/** + * + * @export + * @interface GetActivitiesResponseRelatedObjects + */ +export interface GetActivitiesResponseRelatedObjects { + /** + * + * @type {GetActivitiesResponseRelatedObjectsUser} + * @memberof GetActivitiesResponseRelatedObjects + */ + 'user'?: GetActivitiesResponseRelatedObjectsUser; + /** + * + * @type {RelatedDealData} + * @memberof GetActivitiesResponseRelatedObjects + */ + 'deal'?: RelatedDealData; + /** + * + * @type {GetActivitiesResponseRelatedObjectsPerson} + * @memberof GetActivitiesResponseRelatedObjects + */ + 'person'?: GetActivitiesResponseRelatedObjectsPerson; + /** + * + * @type {RelatedOrganizationData} + * @memberof GetActivitiesResponseRelatedObjects + */ + 'organization'?: RelatedOrganizationData; +} + diff --git a/models/get-activities-response.ts b/models/get-activities-response.ts new file mode 100644 index 00000000..75fc52e7 --- /dev/null +++ b/models/get-activities-response.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 { Activity } from './activity'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponseAdditionalData } from './get-activities-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponseRelatedObjects } from './get-activities-response-related-objects'; + +/** + * + * @export + * @interface GetActivitiesResponse + */ +export interface GetActivitiesResponse { + /** + * + * @type {boolean} + * @memberof GetActivitiesResponse + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetActivitiesResponse + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesResponseAdditionalData} + * @memberof GetActivitiesResponse + */ + 'additional_data'?: GetActivitiesResponseAdditionalData; + /** + * + * @type {GetActivitiesResponseRelatedObjects} + * @memberof GetActivitiesResponse + */ + 'related_objects'?: GetActivitiesResponseRelatedObjects; +} + diff --git a/models/get-activity-response.ts b/models/get-activity-response.ts new file mode 100644 index 00000000..23e2d406 --- /dev/null +++ b/models/get-activity-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 { Activity } from './activity'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponseRelatedObjects } from './get-activities-response-related-objects'; + +/** + * + * @export + * @interface GetActivityResponse + */ +export interface GetActivityResponse { + /** + * + * @type {boolean} + * @memberof GetActivityResponse + */ + 'success'?: boolean; + /** + * + * @type {Activity} + * @memberof GetActivityResponse + */ + 'data'?: Activity; + /** + * + * @type {GetActivitiesResponseRelatedObjects} + * @memberof GetActivityResponse + */ + 'related_objects'?: GetActivitiesResponseRelatedObjects; +} + diff --git a/models/get-activity-types-response-all-of.ts b/models/get-activity-types-response-all-of.ts new file mode 100644 index 00000000..3b3392d0 --- /dev/null +++ b/models/get-activity-types-response-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 { ActivityType } from './activity-type'; + +/** + * + * @export + * @interface GetActivityTypesResponseAllOf + */ +export interface GetActivityTypesResponseAllOf { + /** + * The array of activity types + * @type {Array} + * @memberof GetActivityTypesResponseAllOf + */ + 'data'?: Array; +} + diff --git a/models/get-activity-types-response.ts b/models/get-activity-types-response.ts new file mode 100644 index 00000000..123382a6 --- /dev/null +++ b/models/get-activity-types-response.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 { ActivityType } from './activity-type'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivityTypesResponseAllOf } from './get-activity-types-response-all-of'; + +/** + * @type GetActivityTypesResponse + * @export + */ +export type GetActivityTypesResponse = BaseResponse & GetActivityTypesResponseAllOf; + + diff --git a/models/get-add-product-attachment-details-response-data-all-of-all-of-all-of.ts b/models/get-add-product-attachment-details-response-data-all-of-all-of-all-of.ts new file mode 100644 index 00000000..e64b5d58 --- /dev/null +++ b/models/get-add-product-attachment-details-response-data-all-of-all-of-all-of.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 GetAddProductAttachmentDetailsResponseDataAllOfAllOfAllOf + */ +export interface GetAddProductAttachmentDetailsResponseDataAllOfAllOfAllOf { + /** + * The ID of the deal-product (the ID of the product attached to the deal) + * @type {number} + * @memberof GetAddProductAttachmentDetailsResponseDataAllOfAllOfAllOf + */ + 'id'?: number; + /** + * The ID of the company + * @type {number} + * @memberof GetAddProductAttachmentDetailsResponseDataAllOfAllOfAllOf + */ + 'company_id'?: number; + /** + * The ID of the deal + * @type {number} + * @memberof GetAddProductAttachmentDetailsResponseDataAllOfAllOfAllOf + */ + 'deal_id'?: number; + /** + * The ID of the product + * @type {number} + * @memberof GetAddProductAttachmentDetailsResponseDataAllOfAllOfAllOf + */ + 'product_id'?: number; + /** + * The sum of all the products attached to the deal + * @type {number} + * @memberof GetAddProductAttachmentDetailsResponseDataAllOfAllOfAllOf + */ + 'sum'?: number; + /** + * The currency associated with the deal product + * @type {string} + * @memberof GetAddProductAttachmentDetailsResponseDataAllOfAllOfAllOf + */ + 'currency'?: string; + /** + * The date and time when the product was added to the deal + * @type {string} + * @memberof GetAddProductAttachmentDetailsResponseDataAllOfAllOfAllOf + */ + 'add_time'?: string; + /** + * The date and time when the deal product was last edited + * @type {string} + * @memberof GetAddProductAttachmentDetailsResponseDataAllOfAllOfAllOf + */ + 'last_edit'?: string; + /** + * Whether the product is active or not + * @type {boolean} + * @memberof GetAddProductAttachmentDetailsResponseDataAllOfAllOfAllOf + */ + 'active_flag'?: boolean; + /** + * The product tax + * @type {number} + * @memberof GetAddProductAttachmentDetailsResponseDataAllOfAllOfAllOf + */ + 'tax'?: number; + /** + * The product name + * @type {string} + * @memberof GetAddProductAttachmentDetailsResponseDataAllOfAllOfAllOf + */ + 'name'?: string; +} + diff --git a/models/get-add-product-attachment-details-response-data-all-of-all-of.ts b/models/get-add-product-attachment-details-response-data-all-of-all-of.ts new file mode 100644 index 00000000..c9397125 --- /dev/null +++ b/models/get-add-product-attachment-details-response-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 { GetAddProductAttachmentDetailsResponseDataAllOfAllOfAllOf } from './get-add-product-attachment-details-response-data-all-of-all-of-all-of'; + +/** + * @type GetAddProductAttachmentDetailsResponseDataAllOfAllOf + * @export + */ +export type GetAddProductAttachmentDetailsResponseDataAllOfAllOf = BasicDealProductRequest & GetAddProductAttachmentDetailsResponseDataAllOfAllOfAllOf; + + diff --git a/models/get-add-product-attachment-details-response-data-all-of-all-of1.ts b/models/get-add-product-attachment-details-response-data-all-of-all-of1.ts new file mode 100644 index 00000000..1ac95b37 --- /dev/null +++ b/models/get-add-product-attachment-details-response-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 GetAddProductAttachmentDetailsResponseDataAllOfAllOf1 + */ +export interface GetAddProductAttachmentDetailsResponseDataAllOfAllOf1 { + /** + * The ID of the deal-product (the ID of the product attached to the deal) + * @type {number} + * @memberof GetAddProductAttachmentDetailsResponseDataAllOfAllOf1 + */ + 'product_attachment_id'?: number; +} + diff --git a/models/get-add-product-attachment-details-response-data-all-of.ts b/models/get-add-product-attachment-details-response-data-all-of.ts new file mode 100644 index 00000000..a2dbf4eb --- /dev/null +++ b/models/get-add-product-attachment-details-response-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 { GetAddProductAttachmentDetailsResponseDataAllOfAllOf } from './get-add-product-attachment-details-response-data-all-of-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAddProductAttachmentDetailsResponseDataAllOfAllOf1 } from './get-add-product-attachment-details-response-data-all-of-all-of1'; + +/** + * @type GetAddProductAttachmentDetailsResponseDataAllOf + * @export + */ +export type GetAddProductAttachmentDetailsResponseDataAllOf = GetAddProductAttachmentDetailsResponseDataAllOfAllOf & GetAddProductAttachmentDetailsResponseDataAllOfAllOf1; + + diff --git a/models/get-add-product-attachment-details-response-data.ts b/models/get-add-product-attachment-details-response-data.ts new file mode 100644 index 00000000..dfbfdb1a --- /dev/null +++ b/models/get-add-product-attachment-details-response-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 { GetAddProductAttachmentDetailsResponseDataAllOf } from './get-add-product-attachment-details-response-data-all-of'; + +/** + * @type GetAddProductAttachmentDetailsResponseData + * The added product object attached to the deal + * @export + */ +export type GetAddProductAttachmentDetailsResponseData = GetAddProductAttachmentDetailsResponseDataAllOf; + + diff --git a/models/get-add-product-attachment-details-response.ts b/models/get-add-product-attachment-details-response.ts new file mode 100644 index 00000000..9773d5af --- /dev/null +++ b/models/get-add-product-attachment-details-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 { GetAddProductAttachmentDetailsResponseData } from './get-add-product-attachment-details-response-data'; + +/** + * + * @export + * @interface GetAddProductAttachmentDetailsResponse + */ +export interface GetAddProductAttachmentDetailsResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetAddProductAttachmentDetailsResponse + */ + 'success'?: boolean; + /** + * + * @type {GetAddProductAttachmentDetailsResponseData} + * @memberof GetAddProductAttachmentDetailsResponse + */ + 'data'?: GetAddProductAttachmentDetailsResponseData; +} + diff --git a/models/get-added-deal-response.ts b/models/get-added-deal-response.ts new file mode 100644 index 00000000..8fa39324 --- /dev/null +++ b/models/get-added-deal-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 { Deal } from './deal'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealsResponseRelatedObjects } from './get-deals-response-related-objects'; + +/** + * + * @export + * @interface GetAddedDealResponse + */ +export interface GetAddedDealResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetAddedDealResponse + */ + 'success'?: boolean; + /** + * + * @type {Deal} + * @memberof GetAddedDealResponse + */ + 'data'?: Deal; + /** + * + * @type {GetDealsResponseRelatedObjects} + * @memberof GetAddedDealResponse + */ + 'related_objects'?: GetDealsResponseRelatedObjects; +} + diff --git a/models/get-associated-activities-response-all-of.ts b/models/get-associated-activities-response-all-of.ts new file mode 100644 index 00000000..f2b2c153 --- /dev/null +++ b/models/get-associated-activities-response-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 { Activity } from './activity'; +// May contain unused imports in some cases +// @ts-ignore +import { ActivityDistributionDataWithAdditionalData } from './activity-distribution-data-with-additional-data'; + +/** + * + * @export + * @interface GetAssociatedActivitiesResponseAllOf + */ +export interface GetAssociatedActivitiesResponseAllOf { + /** + * The array of activities + * @type {Array} + * @memberof GetAssociatedActivitiesResponseAllOf + */ + 'data'?: Array; + /** + * + * @type {ActivityDistributionDataWithAdditionalData} + * @memberof GetAssociatedActivitiesResponseAllOf + */ + 'additional_data'?: ActivityDistributionDataWithAdditionalData; +} + diff --git a/models/get-associated-activities-response.ts b/models/get-associated-activities-response.ts new file mode 100644 index 00000000..e5bde18c --- /dev/null +++ b/models/get-associated-activities-response.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 { Activity } from './activity'; +// 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 { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedActivitiesResponseAllOf } from './get-associated-activities-response-all-of'; + +/** + * @type GetAssociatedActivitiesResponse + * @export + */ +export type GetAssociatedActivitiesResponse = BaseResponse & GetAssociatedActivitiesResponseAllOf; + + diff --git a/models/get-associated-deals-response-all-of-related-objects.ts b/models/get-associated-deals-response-all-of-related-objects.ts new file mode 100644 index 00000000..c5c09cc7 --- /dev/null +++ b/models/get-associated-deals-response-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 { AddActivityResponseRelatedObjectsPerson } from './add-activity-response-related-objects-person'; +// May contain unused imports in some cases +// @ts-ignore +import { BasePipeline } from './base-pipeline'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseStage } from './base-stage'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponseRelatedObjectsUser } from './get-activities-response-related-objects-user'; +// May contain unused imports in some cases +// @ts-ignore +import { RelatedOrganizationDataWithActiveFlag } from './related-organization-data-with-active-flag'; + +/** + * + * @export + * @interface GetAssociatedDealsResponseAllOfRelatedObjects + */ +export interface GetAssociatedDealsResponseAllOfRelatedObjects { + /** + * + * @type {RelatedOrganizationDataWithActiveFlag} + * @memberof GetAssociatedDealsResponseAllOfRelatedObjects + */ + 'organization'?: RelatedOrganizationDataWithActiveFlag; + /** + * + * @type {AddActivityResponseRelatedObjectsPerson} + * @memberof GetAssociatedDealsResponseAllOfRelatedObjects + */ + 'person'?: AddActivityResponseRelatedObjectsPerson; + /** + * + * @type {GetActivitiesResponseRelatedObjectsUser} + * @memberof GetAssociatedDealsResponseAllOfRelatedObjects + */ + 'user'?: GetActivitiesResponseRelatedObjectsUser; + /** + * + * @type {BaseStage} + * @memberof GetAssociatedDealsResponseAllOfRelatedObjects + */ + 'stage'?: BaseStage; + /** + * + * @type {BasePipeline} + * @memberof GetAssociatedDealsResponseAllOfRelatedObjects + */ + 'pipeline'?: BasePipeline; +} + diff --git a/models/get-associated-deals-response-all-of.ts b/models/get-associated-deals-response-all-of.ts new file mode 100644 index 00000000..0f43cc47 --- /dev/null +++ b/models/get-associated-deals-response-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 { Deal } from './deal'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedDealsResponseAllOfRelatedObjects } from './get-associated-deals-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; + +/** + * + * @export + * @interface GetAssociatedDealsResponseAllOf + */ +export interface GetAssociatedDealsResponseAllOf { + /** + * The array of deals + * @type {Array} + * @memberof GetAssociatedDealsResponseAllOf + */ + 'data'?: Array; + /** + * + * @type {GetFieldsResponseAllOfAdditionalData} + * @memberof GetAssociatedDealsResponseAllOf + */ + 'additional_data'?: GetFieldsResponseAllOfAdditionalData; + /** + * + * @type {GetAssociatedDealsResponseAllOfRelatedObjects} + * @memberof GetAssociatedDealsResponseAllOf + */ + 'related_objects'?: GetAssociatedDealsResponseAllOfRelatedObjects; +} + diff --git a/models/get-associated-deals-response.ts b/models/get-associated-deals-response.ts new file mode 100644 index 00000000..c42a7869 --- /dev/null +++ b/models/get-associated-deals-response.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 { Deal } from './deal'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedDealsResponseAllOf } from './get-associated-deals-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedDealsResponseAllOfRelatedObjects } from './get-associated-deals-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; + +/** + * @type GetAssociatedDealsResponse + * @export + */ +export type GetAssociatedDealsResponse = BaseResponse & GetAssociatedDealsResponseAllOf; + + diff --git a/models/get-associated-files-response-all-of-data-inner.ts b/models/get-associated-files-response-all-of-data-inner.ts new file mode 100644 index 00000000..c931bd56 --- /dev/null +++ b/models/get-associated-files-response-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 GetAssociatedFilesResponseAllOfDataInner + */ +export interface GetAssociatedFilesResponseAllOfDataInner { + /** + * The ID of the file + * @type {number} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'id'?: number; + /** + * The ID of the user to associate the file with + * @type {number} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'user_id'?: number; + /** + * The ID of the deal to associate the file with + * @type {number} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'deal_id'?: number; + /** + * The ID of the person to associate the file with + * @type {number} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'person_id'?: number; + /** + * The ID of the organization to associate the file with + * @type {number} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'org_id'?: number; + /** + * The ID of the product to associate the file with + * @type {number} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'product_id'?: number; + /** + * The ID of the activity to associate the file with + * @type {number} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'activity_id'?: number; + /** + * The ID of the lead to associate the file with + * @type {string} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'lead_id'?: string; + /** + * The date and time when the file was added/created. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'add_time'?: string; + /** + * The last updated date and time of the file. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'update_time'?: string; + /** + * The original name of the file + * @type {string} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'file_name'?: string; + /** + * The size of the file + * @type {number} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'file_size'?: number; + /** + * Whether the user is active or not. false = Not activated, true = Activated + * @type {boolean} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'active_flag'?: boolean; + /** + * Whether the file was uploaded as inline or not + * @type {boolean} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'inline_flag'?: boolean; + /** + * The location type to send the file to. Only googledrive is supported at the moment. + * @type {string} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'remote_location'?: string; + /** + * The ID of the remote item + * @type {string} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'remote_id'?: string; + /** + * The ID of the inline attachment + * @type {string} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'cid'?: string; + /** + * The location of the cloud storage + * @type {string} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 's3_bucket'?: string; + /** + * The ID of the mail message to associate the file with + * @type {string} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'mail_message_id'?: string; + /** + * The ID of the mail template to associate the file with + * @type {string} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'mail_template_id'?: string; + /** + * The name of the deal associated with the dile + * @type {string} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'deal_name'?: string; + /** + * The name of the person associated with the file + * @type {string} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'person_name'?: string; + /** + * The name of the organization associated with the file + * @type {string} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'org_name'?: string; + /** + * The name of the product associated with the file + * @type {string} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'product_name'?: string; + /** + * The name of the lead associated with the file + * @type {string} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'lead_name'?: string; + /** + * The URL of the download file + * @type {string} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'url'?: string; + /** + * The visible name of the file + * @type {string} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'name'?: string; + /** + * The description of the file + * @type {string} + * @memberof GetAssociatedFilesResponseAllOfDataInner + */ + 'description'?: string; +} + diff --git a/models/get-associated-files-response-all-of.ts b/models/get-associated-files-response-all-of.ts new file mode 100644 index 00000000..396b69e5 --- /dev/null +++ b/models/get-associated-files-response-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 { GetAssociatedFilesResponseAllOfDataInner } from './get-associated-files-response-all-of-data-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; + +/** + * + * @export + * @interface GetAssociatedFilesResponseAllOf + */ +export interface GetAssociatedFilesResponseAllOf { + /** + * The array of files + * @type {Array} + * @memberof GetAssociatedFilesResponseAllOf + */ + 'data'?: Array; + /** + * + * @type {GetFieldsResponseAllOfAdditionalData} + * @memberof GetAssociatedFilesResponseAllOf + */ + 'additional_data'?: GetFieldsResponseAllOfAdditionalData; +} + diff --git a/models/get-associated-files-response.ts b/models/get-associated-files-response.ts new file mode 100644 index 00000000..360faf00 --- /dev/null +++ b/models/get-associated-files-response.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 { GetAssociatedFilesResponseAllOf } from './get-associated-files-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedFilesResponseAllOfDataInner } from './get-associated-files-response-all-of-data-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; + +/** + * @type GetAssociatedFilesResponse + * @export + */ +export type GetAssociatedFilesResponse = BaseResponse & GetAssociatedFilesResponseAllOf; + + diff --git a/models/get-associated-followers-response-data-inner-all-of.ts b/models/get-associated-followers-response-data-inner-all-of.ts new file mode 100644 index 00000000..766003ea --- /dev/null +++ b/models/get-associated-followers-response-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 GetAssociatedFollowersResponseDataInnerAllOf + */ +export interface GetAssociatedFollowersResponseDataInnerAllOf { + /** + * The ID of the organization + * @type {number} + * @memberof GetAssociatedFollowersResponseDataInnerAllOf + */ + 'org_id'?: number; +} + diff --git a/models/get-associated-followers-response-data-inner-all-of1.ts b/models/get-associated-followers-response-data-inner-all-of1.ts new file mode 100644 index 00000000..da92cca0 --- /dev/null +++ b/models/get-associated-followers-response-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 GetAssociatedFollowersResponseDataInnerAllOf1 + */ +export interface GetAssociatedFollowersResponseDataInnerAllOf1 { + /** + * The user ID of the follower related to the item + * @type {number} + * @memberof GetAssociatedFollowersResponseDataInnerAllOf1 + */ + 'user_id'?: number; + /** + * The ID of the follower + * @type {number} + * @memberof GetAssociatedFollowersResponseDataInnerAllOf1 + */ + 'id'?: number; + /** + * The date and time of adding the follower to the item + * @type {string} + * @memberof GetAssociatedFollowersResponseDataInnerAllOf1 + */ + 'add_time'?: string; +} + diff --git a/models/get-associated-followers-response-data-inner.ts b/models/get-associated-followers-response-data-inner.ts new file mode 100644 index 00000000..897f1fff --- /dev/null +++ b/models/get-associated-followers-response-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 { GetAssociatedFollowersResponseDataInnerAllOf } from './get-associated-followers-response-data-inner-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedFollowersResponseDataInnerAllOf1 } from './get-associated-followers-response-data-inner-all-of1'; + +/** + * @type GetAssociatedFollowersResponseDataInner + * @export + */ +export type GetAssociatedFollowersResponseDataInner = GetAssociatedFollowersResponseDataInnerAllOf & GetAssociatedFollowersResponseDataInnerAllOf1; + + diff --git a/models/get-associated-followers-response.ts b/models/get-associated-followers-response.ts new file mode 100644 index 00000000..a525e464 --- /dev/null +++ b/models/get-associated-followers-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 { GetActivitiesResponseAdditionalData } from './get-activities-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedFollowersResponseDataInner } from './get-associated-followers-response-data-inner'; + +/** + * + * @export + * @interface GetAssociatedFollowersResponse + */ +export interface GetAssociatedFollowersResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetAssociatedFollowersResponse + */ + 'success'?: boolean; + /** + * The array of followers + * @type {Array} + * @memberof GetAssociatedFollowersResponse + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesResponseAdditionalData} + * @memberof GetAssociatedFollowersResponse + */ + 'additional_data'?: GetActivitiesResponseAdditionalData; +} + diff --git a/models/get-associated-mail-messages-response-all-of-data-inner.ts b/models/get-associated-mail-messages-response-all-of-data-inner.ts new file mode 100644 index 00000000..9a8500e6 --- /dev/null +++ b/models/get-associated-mail-messages-response-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 GetAssociatedMailMessagesResponseAllOfDataInner + */ +export interface GetAssociatedMailMessagesResponseAllOfDataInner { + /** + * The type of the data item + * @type {string} + * @memberof GetAssociatedMailMessagesResponseAllOfDataInner + */ + 'object'?: string; + /** + * The date and time when the item was created + * @type {string} + * @memberof GetAssociatedMailMessagesResponseAllOfDataInner + */ + 'timestamp'?: string; + /** + * + * @type {MailMessageItemForList} + * @memberof GetAssociatedMailMessagesResponseAllOfDataInner + */ + 'data'?: MailMessageItemForList; +} + diff --git a/models/get-associated-mail-messages-response-all-of.ts b/models/get-associated-mail-messages-response-all-of.ts new file mode 100644 index 00000000..174c80d8 --- /dev/null +++ b/models/get-associated-mail-messages-response-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 { GetAssociatedMailMessagesResponseAllOfDataInner } from './get-associated-mail-messages-response-all-of-data-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; + +/** + * + * @export + * @interface GetAssociatedMailMessagesResponseAllOf + */ +export interface GetAssociatedMailMessagesResponseAllOf { + /** + * The array of mail messages + * @type {Array} + * @memberof GetAssociatedMailMessagesResponseAllOf + */ + 'data'?: Array; + /** + * + * @type {GetFieldsResponseAllOfAdditionalData} + * @memberof GetAssociatedMailMessagesResponseAllOf + */ + 'additional_data'?: GetFieldsResponseAllOfAdditionalData; +} + diff --git a/models/get-associated-mail-messages-response.ts b/models/get-associated-mail-messages-response.ts new file mode 100644 index 00000000..d216cc5e --- /dev/null +++ b/models/get-associated-mail-messages-response.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 { GetAssociatedMailMessagesResponseAllOf } from './get-associated-mail-messages-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedMailMessagesResponseAllOfDataInner } from './get-associated-mail-messages-response-all-of-data-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; + +/** + * @type GetAssociatedMailMessagesResponse + * @export + */ +export type GetAssociatedMailMessagesResponse = BaseResponse & GetAssociatedMailMessagesResponseAllOf; + + diff --git a/models/get-associated-organization-updates-response-all-of-data-inner.ts b/models/get-associated-organization-updates-response-all-of-data-inner.ts new file mode 100644 index 00000000..a8dc6eed --- /dev/null +++ b/models/get-associated-organization-updates-response-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 GetAssociatedOrganizationUpdatesResponseAllOfDataInner + */ +export interface GetAssociatedOrganizationUpdatesResponseAllOfDataInner { + /** + * The type of the person update. (Possible object types - organizationChange, dealChange, file, activity) + * @type {string} + * @memberof GetAssociatedOrganizationUpdatesResponseAllOfDataInner + */ + 'object'?: string; + /** + * The creation date and time of the update + * @type {string} + * @memberof GetAssociatedOrganizationUpdatesResponseAllOfDataInner + */ + 'timestamp'?: string; + /** + * The data related to the update + * @type {object} + * @memberof GetAssociatedOrganizationUpdatesResponseAllOfDataInner + */ + 'data'?: object; +} + diff --git a/models/get-associated-organization-updates-response-all-of-related-objects.ts b/models/get-associated-organization-updates-response-all-of-related-objects.ts new file mode 100644 index 00000000..3cda70ca --- /dev/null +++ b/models/get-associated-organization-updates-response-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 { GetActivitiesResponseRelatedObjectsUser } from './get-activities-response-related-objects-user'; +// May contain unused imports in some cases +// @ts-ignore +import { RelatedOrganizationData } from './related-organization-data'; + +/** + * + * @export + * @interface GetAssociatedOrganizationUpdatesResponseAllOfRelatedObjects + */ +export interface GetAssociatedOrganizationUpdatesResponseAllOfRelatedObjects { + /** + * + * @type {RelatedOrganizationData} + * @memberof GetAssociatedOrganizationUpdatesResponseAllOfRelatedObjects + */ + 'organization'?: RelatedOrganizationData; + /** + * + * @type {GetActivitiesResponseRelatedObjectsUser} + * @memberof GetAssociatedOrganizationUpdatesResponseAllOfRelatedObjects + */ + 'user'?: GetActivitiesResponseRelatedObjectsUser; +} + diff --git a/models/get-associated-organization-updates-response-all-of.ts b/models/get-associated-organization-updates-response-all-of.ts new file mode 100644 index 00000000..7e76f27d --- /dev/null +++ b/models/get-associated-organization-updates-response-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 { GetAssociatedOrganizationUpdatesResponseAllOfDataInner } from './get-associated-organization-updates-response-all-of-data-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedOrganizationUpdatesResponseAllOfRelatedObjects } from './get-associated-organization-updates-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; + +/** + * + * @export + * @interface GetAssociatedOrganizationUpdatesResponseAllOf + */ +export interface GetAssociatedOrganizationUpdatesResponseAllOf { + /** + * + * @type {Array} + * @memberof GetAssociatedOrganizationUpdatesResponseAllOf + */ + 'data'?: Array; + /** + * + * @type {GetFieldsResponseAllOfAdditionalData} + * @memberof GetAssociatedOrganizationUpdatesResponseAllOf + */ + 'additional_data'?: GetFieldsResponseAllOfAdditionalData; + /** + * + * @type {GetAssociatedOrganizationUpdatesResponseAllOfRelatedObjects} + * @memberof GetAssociatedOrganizationUpdatesResponseAllOf + */ + 'related_objects'?: GetAssociatedOrganizationUpdatesResponseAllOfRelatedObjects; +} + diff --git a/models/get-associated-organization-updates-response.ts b/models/get-associated-organization-updates-response.ts new file mode 100644 index 00000000..5db57ff8 --- /dev/null +++ b/models/get-associated-organization-updates-response.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 { GetAssociatedOrganizationUpdatesResponseAllOf } from './get-associated-organization-updates-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedOrganizationUpdatesResponseAllOfDataInner } from './get-associated-organization-updates-response-all-of-data-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedOrganizationUpdatesResponseAllOfRelatedObjects } from './get-associated-organization-updates-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; + +/** + * @type GetAssociatedOrganizationUpdatesResponse + * @export + */ +export type GetAssociatedOrganizationUpdatesResponse = BaseResponse & GetAssociatedOrganizationUpdatesResponseAllOf; + + diff --git a/models/get-associated-person-updates-response-all-of-data-inner.ts b/models/get-associated-person-updates-response-all-of-data-inner.ts new file mode 100644 index 00000000..cdf78c25 --- /dev/null +++ b/models/get-associated-person-updates-response-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 GetAssociatedPersonUpdatesResponseAllOfDataInner + */ +export interface GetAssociatedPersonUpdatesResponseAllOfDataInner { + /** + * The type of the person update. (Possible object types - personChange, note, activity, file) + * @type {string} + * @memberof GetAssociatedPersonUpdatesResponseAllOfDataInner + */ + 'object'?: string; + /** + * The creation date and time of the update + * @type {string} + * @memberof GetAssociatedPersonUpdatesResponseAllOfDataInner + */ + 'timestamp'?: string; + /** + * The data related to the update + * @type {object} + * @memberof GetAssociatedPersonUpdatesResponseAllOfDataInner + */ + 'data'?: object; +} + diff --git a/models/get-associated-person-updates-response-all-of.ts b/models/get-associated-person-updates-response-all-of.ts new file mode 100644 index 00000000..a058b316 --- /dev/null +++ b/models/get-associated-person-updates-response-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 { GetAssociatedPersonUpdatesResponseAllOfDataInner } from './get-associated-person-updates-response-all-of-data-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealUpdatesResponseAllOfRelatedObjects } from './get-deal-updates-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; + +/** + * + * @export + * @interface GetAssociatedPersonUpdatesResponseAllOf + */ +export interface GetAssociatedPersonUpdatesResponseAllOf { + /** + * + * @type {Array} + * @memberof GetAssociatedPersonUpdatesResponseAllOf + */ + 'data'?: Array; + /** + * + * @type {GetFieldsResponseAllOfAdditionalData} + * @memberof GetAssociatedPersonUpdatesResponseAllOf + */ + 'additional_data'?: GetFieldsResponseAllOfAdditionalData; + /** + * + * @type {GetDealUpdatesResponseAllOfRelatedObjects} + * @memberof GetAssociatedPersonUpdatesResponseAllOf + */ + 'related_objects'?: GetDealUpdatesResponseAllOfRelatedObjects; +} + diff --git a/models/get-associated-person-updates-response.ts b/models/get-associated-person-updates-response.ts new file mode 100644 index 00000000..30f3d7e7 --- /dev/null +++ b/models/get-associated-person-updates-response.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 { GetAssociatedPersonUpdatesResponseAllOf } from './get-associated-person-updates-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedPersonUpdatesResponseAllOfDataInner } from './get-associated-person-updates-response-all-of-data-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealUpdatesResponseAllOfRelatedObjects } from './get-deal-updates-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; + +/** + * @type GetAssociatedPersonUpdatesResponse + * @export + */ +export type GetAssociatedPersonUpdatesResponse = BaseResponse & GetAssociatedPersonUpdatesResponseAllOf; + + diff --git a/models/get-associated-product-files-response-all-of-data-inner.ts b/models/get-associated-product-files-response-all-of-data-inner.ts new file mode 100644 index 00000000..4f67ac21 --- /dev/null +++ b/models/get-associated-product-files-response-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 GetAssociatedProductFilesResponseAllOfDataInner + */ +export interface GetAssociatedProductFilesResponseAllOfDataInner { + /** + * The ID of the file + * @type {number} + * @memberof GetAssociatedProductFilesResponseAllOfDataInner + */ + 'id'?: number; + /** + * The ID of the product associated with the file + * @type {number} + * @memberof GetAssociatedProductFilesResponseAllOfDataInner + */ + 'product_id'?: number; + /** + * The UTC date time when the file was uploaded. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof GetAssociatedProductFilesResponseAllOfDataInner + */ + 'add_time'?: string; + /** + * The UTC date time when the file was last updated. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof GetAssociatedProductFilesResponseAllOfDataInner + */ + 'update_time'?: string; + /** + * The original name of the file + * @type {string} + * @memberof GetAssociatedProductFilesResponseAllOfDataInner + */ + 'file_name'?: string; + /** + * The size of the file in bytes + * @type {number} + * @memberof GetAssociatedProductFilesResponseAllOfDataInner + */ + 'file_size'?: number; + /** + * Whether the user is active or not. + * @type {boolean} + * @memberof GetAssociatedProductFilesResponseAllOfDataInner + */ + 'active_flag'?: boolean; + /** + * Whether the file was uploaded as inline or not + * @type {boolean} + * @memberof GetAssociatedProductFilesResponseAllOfDataInner + */ + 'inline_flag'?: boolean; + /** + * The location type to send the file to. Only googledrive is supported at the moment. + * @type {string} + * @memberof GetAssociatedProductFilesResponseAllOfDataInner + */ + 'remote_location'?: string; + /** + * The ID of the remote item + * @type {string} + * @memberof GetAssociatedProductFilesResponseAllOfDataInner + */ + 'remote_id'?: string; + /** + * The location of the cloud storage + * @type {string} + * @memberof GetAssociatedProductFilesResponseAllOfDataInner + */ + 's3_bucket'?: string; + /** + * The name of the product associated with the file + * @type {string} + * @memberof GetAssociatedProductFilesResponseAllOfDataInner + */ + 'product_name'?: string; + /** + * The URL to download the file + * @type {string} + * @memberof GetAssociatedProductFilesResponseAllOfDataInner + */ + 'url'?: string; + /** + * The visible name of the file + * @type {string} + * @memberof GetAssociatedProductFilesResponseAllOfDataInner + */ + 'name'?: string; + /** + * The description of the file + * @type {string} + * @memberof GetAssociatedProductFilesResponseAllOfDataInner + */ + 'description'?: string; +} + diff --git a/models/get-associated-product-files-response-all-of.ts b/models/get-associated-product-files-response-all-of.ts new file mode 100644 index 00000000..3c5069a9 --- /dev/null +++ b/models/get-associated-product-files-response-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 { GetAssociatedProductFilesResponseAllOfDataInner } from './get-associated-product-files-response-all-of-data-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; + +/** + * + * @export + * @interface GetAssociatedProductFilesResponseAllOf + */ +export interface GetAssociatedProductFilesResponseAllOf { + /** + * The array of files + * @type {Array} + * @memberof GetAssociatedProductFilesResponseAllOf + */ + 'data'?: Array; + /** + * + * @type {GetFieldsResponseAllOfAdditionalData} + * @memberof GetAssociatedProductFilesResponseAllOf + */ + 'additional_data'?: GetFieldsResponseAllOfAdditionalData; +} + diff --git a/models/get-associated-product-files-response.ts b/models/get-associated-product-files-response.ts new file mode 100644 index 00000000..303bccd5 --- /dev/null +++ b/models/get-associated-product-files-response.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 { GetAssociatedProductFilesResponseAllOf } from './get-associated-product-files-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetAssociatedProductFilesResponseAllOfDataInner } from './get-associated-product-files-response-all-of-data-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; + +/** + * @type GetAssociatedProductFilesResponse + * @export + */ +export type GetAssociatedProductFilesResponse = BaseResponse & GetAssociatedProductFilesResponseAllOf; + + diff --git a/models/get-call-log-response.ts b/models/get-call-log-response.ts new file mode 100644 index 00000000..c614bf78 --- /dev/null +++ b/models/get-call-log-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 { ResponseCallLogObject } from './response-call-log-object'; + +/** + * + * @export + * @interface GetCallLogResponse + */ +export interface GetCallLogResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetCallLogResponse + */ + 'success'?: boolean; + /** + * + * @type {ResponseCallLogObject} + * @memberof GetCallLogResponse + */ + 'data'?: ResponseCallLogObject; +} + diff --git a/models/get-call-logs-response-additional-data.ts b/models/get-call-logs-response-additional-data.ts new file mode 100644 index 00000000..24170b2d --- /dev/null +++ b/models/get-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 { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; + +/** + * + * @export + * @interface GetCallLogsResponseAdditionalData + */ +export interface GetCallLogsResponseAdditionalData { + /** + * + * @type {GetFieldsResponseAllOfAdditionalData} + * @memberof GetCallLogsResponseAdditionalData + */ + 'pagination'?: GetFieldsResponseAllOfAdditionalData; +} + diff --git a/models/get-call-logs-response.ts b/models/get-call-logs-response.ts new file mode 100644 index 00000000..32d34636 --- /dev/null +++ b/models/get-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 { GetCallLogsResponseAdditionalData } from './get-call-logs-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { ResponseCallLogObject } from './response-call-log-object'; + +/** + * + * @export + * @interface GetCallLogsResponse + */ +export interface GetCallLogsResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetCallLogsResponse + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetCallLogsResponse + */ + 'data'?: Array; + /** + * + * @type {GetCallLogsResponseAdditionalData} + * @memberof GetCallLogsResponse + */ + 'additional_data'?: GetCallLogsResponseAdditionalData; +} + diff --git a/models/get-changelog-response-all-of-data-inner.ts b/models/get-changelog-response-all-of-data-inner.ts new file mode 100644 index 00000000..39490392 --- /dev/null +++ b/models/get-changelog-response-all-of-data-inner.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 GetChangelogResponseAllOfDataInner + */ +export interface GetChangelogResponseAllOfDataInner { + /** + * The key of the field that was changed + * @type {string} + * @memberof GetChangelogResponseAllOfDataInner + */ + 'field_key'?: string; + /** + * The value of the field before the change + * @type {string} + * @memberof GetChangelogResponseAllOfDataInner + */ + 'old_value'?: string | null; + /** + * The value of the field after the change + * @type {string} + * @memberof GetChangelogResponseAllOfDataInner + */ + 'new_value'?: string | null; + /** + * The ID of the user who made the change + * @type {number} + * @memberof GetChangelogResponseAllOfDataInner + */ + 'actor_user_id'?: number; + /** + * The date and time of the change + * @type {string} + * @memberof GetChangelogResponseAllOfDataInner + */ + 'time'?: string; + /** + * The source of change, for example \'app\', \'mobile\', \'api\', etc. + * @type {string} + * @memberof GetChangelogResponseAllOfDataInner + */ + 'change_source'?: string | null; + /** + * The user agent from which the change was made + * @type {string} + * @memberof GetChangelogResponseAllOfDataInner + */ + 'change_source_user_agent'?: string | null; + /** + * Whether the change was made as part of a bulk update + * @type {boolean} + * @memberof GetChangelogResponseAllOfDataInner + */ + 'is_bulk_update_flag'?: boolean; +} + diff --git a/models/get-changelog-response-all-of.ts b/models/get-changelog-response-all-of.ts new file mode 100644 index 00000000..fa0df602 --- /dev/null +++ b/models/get-changelog-response-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 { GetActivitiesCollectionResponseAdditionalData } from './get-activities-collection-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetChangelogResponseAllOfDataInner } from './get-changelog-response-all-of-data-inner'; + +/** + * + * @export + * @interface GetChangelogResponseAllOf + */ +export interface GetChangelogResponseAllOf { + /** + * + * @type {Array} + * @memberof GetChangelogResponseAllOf + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesCollectionResponseAdditionalData} + * @memberof GetChangelogResponseAllOf + */ + 'additional_data'?: GetActivitiesCollectionResponseAdditionalData; +} + diff --git a/models/get-changelog-response.ts b/models/get-changelog-response.ts new file mode 100644 index 00000000..ef8eee5d --- /dev/null +++ b/models/get-changelog-response.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 { GetActivitiesCollectionResponseAdditionalData } from './get-activities-collection-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetChangelogResponseAllOf } from './get-changelog-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetChangelogResponseAllOfDataInner } from './get-changelog-response-all-of-data-inner'; + +/** + * @type GetChangelogResponse + * @export + */ +export type GetChangelogResponse = BaseResponse & GetChangelogResponseAllOf; + + diff --git a/models/get-comments-response.ts b/models/get-comments-response.ts new file mode 100644 index 00000000..abd64173 --- /dev/null +++ b/models/get-comments-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 { Comment } from './comment'; +// May contain unused imports in some cases +// @ts-ignore +import { GetNotesResponseAdditionalData } from './get-notes-response-additional-data'; + +/** + * + * @export + * @interface GetCommentsResponse + */ +export interface GetCommentsResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetCommentsResponse + */ + 'success'?: boolean; + /** + * The array of comments + * @type {Array} + * @memberof GetCommentsResponse + */ + 'data'?: Array; + /** + * + * @type {GetNotesResponseAdditionalData} + * @memberof GetCommentsResponse + */ + 'additional_data'?: GetNotesResponseAdditionalData; +} + diff --git a/models/get-currencies-response-data-inner.ts b/models/get-currencies-response-data-inner.ts new file mode 100644 index 00000000..b3608d67 --- /dev/null +++ b/models/get-currencies-response-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 GetCurrenciesResponseDataInner + */ +export interface GetCurrenciesResponseDataInner { + /** + * The ID of the currency + * @type {number} + * @memberof GetCurrenciesResponseDataInner + */ + 'id'?: number; + /** + * The code of the currency + * @type {string} + * @memberof GetCurrenciesResponseDataInner + */ + 'code'?: string; + /** + * The name of the currency + * @type {string} + * @memberof GetCurrenciesResponseDataInner + */ + 'name'?: string; + /** + * The amount of decimal points of the currency + * @type {number} + * @memberof GetCurrenciesResponseDataInner + */ + 'decimal_points'?: number; + /** + * The symbol of the currency + * @type {string} + * @memberof GetCurrenciesResponseDataInner + */ + 'symbol'?: string; + /** + * Whether the currency is active or not + * @type {boolean} + * @memberof GetCurrenciesResponseDataInner + */ + 'active_flag'?: boolean; + /** + * Whether the currency is a custom one or not + * @type {boolean} + * @memberof GetCurrenciesResponseDataInner + */ + 'is_custom_flag'?: boolean; +} + diff --git a/models/get-currencies-response.ts b/models/get-currencies-response.ts new file mode 100644 index 00000000..f687950b --- /dev/null +++ b/models/get-currencies-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 { GetCurrenciesResponseDataInner } from './get-currencies-response-data-inner'; + +/** + * + * @export + * @interface GetCurrenciesResponse + */ +export interface GetCurrenciesResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetCurrenciesResponse + */ + 'success'?: boolean; + /** + * The array of currencies + * @type {Array} + * @memberof GetCurrenciesResponse + */ + 'data'?: Array; +} + diff --git a/models/get-current-user-response-all-of-data-all-of-language.ts b/models/get-current-user-response-all-of-data-all-of-language.ts new file mode 100644 index 00000000..321fb1f4 --- /dev/null +++ b/models/get-current-user-response-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 GetCurrentUserResponseAllOfDataAllOfLanguage + */ +export interface GetCurrentUserResponseAllOfDataAllOfLanguage { + /** + * The language code. E.g. en + * @type {string} + * @memberof GetCurrentUserResponseAllOfDataAllOfLanguage + */ + 'language_code'?: string; + /** + * The country code. E.g. US + * @type {string} + * @memberof GetCurrentUserResponseAllOfDataAllOfLanguage + */ + 'country_code'?: string; +} + diff --git a/models/get-current-user-response-all-of-data-all-of.ts b/models/get-current-user-response-all-of-data-all-of.ts new file mode 100644 index 00000000..a115e61b --- /dev/null +++ b/models/get-current-user-response-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 { GetCurrentUserResponseAllOfDataAllOfLanguage } from './get-current-user-response-all-of-data-all-of-language'; + +/** + * + * @export + * @interface GetCurrentUserResponseAllOfDataAllOf + */ +export interface GetCurrentUserResponseAllOfDataAllOf { + /** + * The user company ID + * @type {number} + * @memberof GetCurrentUserResponseAllOfDataAllOf + */ + 'company_id'?: number; + /** + * The user company name + * @type {string} + * @memberof GetCurrentUserResponseAllOfDataAllOf + */ + 'company_name'?: string; + /** + * The user company domain + * @type {string} + * @memberof GetCurrentUserResponseAllOfDataAllOf + */ + 'company_domain'?: string; + /** + * The user company country + * @type {string} + * @memberof GetCurrentUserResponseAllOfDataAllOf + */ + 'company_country'?: string; + /** + * The user company industry + * @type {string} + * @memberof GetCurrentUserResponseAllOfDataAllOf + */ + 'company_industry'?: string; + /** + * + * @type {GetCurrentUserResponseAllOfDataAllOfLanguage} + * @memberof GetCurrentUserResponseAllOfDataAllOf + */ + 'language'?: GetCurrentUserResponseAllOfDataAllOfLanguage; +} + diff --git a/models/get-current-user-response-all-of-data.ts b/models/get-current-user-response-all-of-data.ts new file mode 100644 index 00000000..af43ee6f --- /dev/null +++ b/models/get-current-user-response-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 { BaseUser } from './base-user'; +// May contain unused imports in some cases +// @ts-ignore +import { GetCurrentUserResponseAllOfDataAllOf } from './get-current-user-response-all-of-data-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetCurrentUserResponseAllOfDataAllOfLanguage } from './get-current-user-response-all-of-data-all-of-language'; +// May contain unused imports in some cases +// @ts-ignore +import { UserAccess } from './user-access'; + +/** + * @type GetCurrentUserResponseAllOfData + * @export + */ +export type GetCurrentUserResponseAllOfData = BaseUser & GetCurrentUserResponseAllOfDataAllOf; + + diff --git a/models/get-current-user-response-all-of.ts b/models/get-current-user-response-all-of.ts new file mode 100644 index 00000000..7bed9fa6 --- /dev/null +++ b/models/get-current-user-response-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 { GetCurrentUserResponseAllOfData } from './get-current-user-response-all-of-data'; + +/** + * + * @export + * @interface GetCurrentUserResponseAllOf + */ +export interface GetCurrentUserResponseAllOf { + /** + * + * @type {GetCurrentUserResponseAllOfData} + * @memberof GetCurrentUserResponseAllOf + */ + 'data'?: GetCurrentUserResponseAllOfData; +} + diff --git a/models/get-current-user-response.ts b/models/get-current-user-response.ts new file mode 100644 index 00000000..7f5408f1 --- /dev/null +++ b/models/get-current-user-response.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 { GetCurrentUserResponseAllOf } from './get-current-user-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetCurrentUserResponseAllOfData } from './get-current-user-response-all-of-data'; + +/** + * @type GetCurrentUserResponse + * @export + */ +export type GetCurrentUserResponse = BaseResponse & GetCurrentUserResponseAllOf; + + diff --git a/models/get-deal-activities-response-all-of-related-objects.ts b/models/get-deal-activities-response-all-of-related-objects.ts new file mode 100644 index 00000000..359ec16b --- /dev/null +++ b/models/get-deal-activities-response-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 { AddActivityResponseRelatedObjectsPerson } from './add-activity-response-related-objects-person'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponseRelatedObjectsUser } from './get-activities-response-related-objects-user'; +// May contain unused imports in some cases +// @ts-ignore +import { RelatedDealData } from './related-deal-data'; +// May contain unused imports in some cases +// @ts-ignore +import { RelatedOrganizationDataWithActiveFlag } from './related-organization-data-with-active-flag'; + +/** + * + * @export + * @interface GetDealActivitiesResponseAllOfRelatedObjects + */ +export interface GetDealActivitiesResponseAllOfRelatedObjects { + /** + * + * @type {RelatedOrganizationDataWithActiveFlag} + * @memberof GetDealActivitiesResponseAllOfRelatedObjects + */ + 'organization'?: RelatedOrganizationDataWithActiveFlag; + /** + * + * @type {AddActivityResponseRelatedObjectsPerson} + * @memberof GetDealActivitiesResponseAllOfRelatedObjects + */ + 'person'?: AddActivityResponseRelatedObjectsPerson; + /** + * + * @type {RelatedDealData} + * @memberof GetDealActivitiesResponseAllOfRelatedObjects + */ + 'deal'?: RelatedDealData; + /** + * + * @type {GetActivitiesResponseRelatedObjectsUser} + * @memberof GetDealActivitiesResponseAllOfRelatedObjects + */ + 'user'?: GetActivitiesResponseRelatedObjectsUser; +} + diff --git a/models/get-deal-activities-response-all-of.ts b/models/get-deal-activities-response-all-of.ts new file mode 100644 index 00000000..07718e5a --- /dev/null +++ b/models/get-deal-activities-response-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 { Activity } from './activity'; +// 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 { GetDealActivitiesResponseAllOfRelatedObjects } from './get-deal-activities-response-all-of-related-objects'; + +/** + * + * @export + * @interface GetDealActivitiesResponseAllOf + */ +export interface GetDealActivitiesResponseAllOf { + /** + * The array of activities + * @type {Array} + * @memberof GetDealActivitiesResponseAllOf + */ + 'data'?: Array; + /** + * + * @type {ActivityDistributionDataWithAdditionalData} + * @memberof GetDealActivitiesResponseAllOf + */ + 'additional_data'?: ActivityDistributionDataWithAdditionalData; + /** + * + * @type {GetDealActivitiesResponseAllOfRelatedObjects} + * @memberof GetDealActivitiesResponseAllOf + */ + 'related_objects'?: GetDealActivitiesResponseAllOfRelatedObjects; +} + diff --git a/models/get-deal-activities-response.ts b/models/get-deal-activities-response.ts new file mode 100644 index 00000000..01d88414 --- /dev/null +++ b/models/get-deal-activities-response.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 { Activity } from './activity'; +// 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 { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealActivitiesResponseAllOf } from './get-deal-activities-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealActivitiesResponseAllOfRelatedObjects } from './get-deal-activities-response-all-of-related-objects'; + +/** + * @type GetDealActivitiesResponse + * @export + */ +export type GetDealActivitiesResponse = BaseResponse & GetDealActivitiesResponseAllOf; + + diff --git a/models/get-deal-participants-response.ts b/models/get-deal-participants-response.ts new file mode 100644 index 00000000..27eaa520 --- /dev/null +++ b/models/get-deal-participants-response.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 { GetDealsResponseRelatedObjects } from './get-deals-response-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { Person } from './person'; + +/** + * + * @export + * @interface GetDealParticipantsResponse + */ +export interface GetDealParticipantsResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetDealParticipantsResponse + */ + 'success'?: boolean; + /** + * The array of participants + * @type {Array} + * @memberof GetDealParticipantsResponse + */ + 'data'?: Array; + /** + * + * @type {GetFieldsResponseAllOfAdditionalData} + * @memberof GetDealParticipantsResponse + */ + 'additional_data'?: GetFieldsResponseAllOfAdditionalData; + /** + * + * @type {GetDealsResponseRelatedObjects} + * @memberof GetDealParticipantsResponse + */ + 'related_objects'?: GetDealsResponseRelatedObjects; +} + diff --git a/models/get-deal-response-additional-data.ts b/models/get-deal-response-additional-data.ts new file mode 100644 index 00000000..4b994d7d --- /dev/null +++ b/models/get-deal-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 GetDealResponseAdditionalData + */ +export interface GetDealResponseAdditionalData { + /** + * The BCC email of the deal + * @type {string} + * @memberof GetDealResponseAdditionalData + */ + 'dropbox_email'?: string; +} + diff --git a/models/get-deal-response-related-objects.ts b/models/get-deal-response-related-objects.ts new file mode 100644 index 00000000..0c0f6946 --- /dev/null +++ b/models/get-deal-response-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 { AddActivityResponseRelatedObjectsPerson } from './add-activity-response-related-objects-person'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponseRelatedObjectsUser } from './get-activities-response-related-objects-user'; +// May contain unused imports in some cases +// @ts-ignore +import { RelatedOrganizationDataWithActiveFlag } from './related-organization-data-with-active-flag'; + +/** + * + * @export + * @interface GetDealResponseRelatedObjects + */ +export interface GetDealResponseRelatedObjects { + /** + * + * @type {GetActivitiesResponseRelatedObjectsUser} + * @memberof GetDealResponseRelatedObjects + */ + 'user'?: GetActivitiesResponseRelatedObjectsUser; + /** + * + * @type {AddActivityResponseRelatedObjectsPerson} + * @memberof GetDealResponseRelatedObjects + */ + 'person'?: AddActivityResponseRelatedObjectsPerson; + /** + * + * @type {RelatedOrganizationDataWithActiveFlag} + * @memberof GetDealResponseRelatedObjects + */ + 'organization'?: RelatedOrganizationDataWithActiveFlag; +} + diff --git a/models/get-deal-response.ts b/models/get-deal-response.ts new file mode 100644 index 00000000..9a3dacc7 --- /dev/null +++ b/models/get-deal-response.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 { GetDealResponseAdditionalData } from './get-deal-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealResponseRelatedObjects } from './get-deal-response-related-objects'; + +/** + * + * @export + * @interface GetDealResponse + */ +export interface GetDealResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetDealResponse + */ + 'success'?: boolean; + /** + * + * @type {DealNonStrictWithDetails} + * @memberof GetDealResponse + */ + 'data'?: DealNonStrictWithDetails; + /** + * + * @type {GetDealResponseAdditionalData} + * @memberof GetDealResponse + */ + 'additional_data'?: GetDealResponseAdditionalData; + /** + * + * @type {GetDealResponseRelatedObjects} + * @memberof GetDealResponse + */ + 'related_objects'?: GetDealResponseRelatedObjects; +} + diff --git a/models/get-deal-search-response-all-of-data-items-inner-item-organization.ts b/models/get-deal-search-response-all-of-data-items-inner-item-organization.ts new file mode 100644 index 00000000..41e5024b --- /dev/null +++ b/models/get-deal-search-response-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 GetDealSearchResponseAllOfDataItemsInnerItemOrganization + */ +export interface GetDealSearchResponseAllOfDataItemsInnerItemOrganization { + /** + * The ID of the organization the deal is associated with + * @type {number} + * @memberof GetDealSearchResponseAllOfDataItemsInnerItemOrganization + */ + 'id'?: number; + /** + * The name of the organization the deal is associated with + * @type {string} + * @memberof GetDealSearchResponseAllOfDataItemsInnerItemOrganization + */ + 'name'?: string; +} + diff --git a/models/get-deal-search-response-all-of-data-items-inner-item-owner.ts b/models/get-deal-search-response-all-of-data-items-inner-item-owner.ts new file mode 100644 index 00000000..2db37bf2 --- /dev/null +++ b/models/get-deal-search-response-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 GetDealSearchResponseAllOfDataItemsInnerItemOwner + */ +export interface GetDealSearchResponseAllOfDataItemsInnerItemOwner { + /** + * The ID of the owner of the deal + * @type {number} + * @memberof GetDealSearchResponseAllOfDataItemsInnerItemOwner + */ + 'id'?: number; +} + diff --git a/models/get-deal-search-response-all-of-data-items-inner-item-person.ts b/models/get-deal-search-response-all-of-data-items-inner-item-person.ts new file mode 100644 index 00000000..67f38d43 --- /dev/null +++ b/models/get-deal-search-response-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 GetDealSearchResponseAllOfDataItemsInnerItemPerson + */ +export interface GetDealSearchResponseAllOfDataItemsInnerItemPerson { + /** + * The ID of the person the deal is associated with + * @type {number} + * @memberof GetDealSearchResponseAllOfDataItemsInnerItemPerson + */ + 'id'?: number; + /** + * The name of the person the deal is associated with + * @type {string} + * @memberof GetDealSearchResponseAllOfDataItemsInnerItemPerson + */ + 'name'?: string; +} + diff --git a/models/get-deal-search-response-all-of-data-items-inner-item-stage.ts b/models/get-deal-search-response-all-of-data-items-inner-item-stage.ts new file mode 100644 index 00000000..5af2d451 --- /dev/null +++ b/models/get-deal-search-response-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 GetDealSearchResponseAllOfDataItemsInnerItemStage + */ +export interface GetDealSearchResponseAllOfDataItemsInnerItemStage { + /** + * The ID of the stage of the deal + * @type {number} + * @memberof GetDealSearchResponseAllOfDataItemsInnerItemStage + */ + 'id'?: number; + /** + * The name of the stage of the deal + * @type {string} + * @memberof GetDealSearchResponseAllOfDataItemsInnerItemStage + */ + 'name'?: string; +} + diff --git a/models/get-deal-search-response-all-of-data-items-inner-item.ts b/models/get-deal-search-response-all-of-data-items-inner-item.ts new file mode 100644 index 00000000..f29e0708 --- /dev/null +++ b/models/get-deal-search-response-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 { GetDealSearchResponseAllOfDataItemsInnerItemOrganization } from './get-deal-search-response-all-of-data-items-inner-item-organization'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealSearchResponseAllOfDataItemsInnerItemOwner } from './get-deal-search-response-all-of-data-items-inner-item-owner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealSearchResponseAllOfDataItemsInnerItemPerson } from './get-deal-search-response-all-of-data-items-inner-item-person'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealSearchResponseAllOfDataItemsInnerItemStage } from './get-deal-search-response-all-of-data-items-inner-item-stage'; + +/** + * + * @export + * @interface GetDealSearchResponseAllOfDataItemsInnerItem + */ +export interface GetDealSearchResponseAllOfDataItemsInnerItem { + /** + * The ID of the deal + * @type {number} + * @memberof GetDealSearchResponseAllOfDataItemsInnerItem + */ + 'id'?: number; + /** + * The type of the item + * @type {string} + * @memberof GetDealSearchResponseAllOfDataItemsInnerItem + */ + 'type'?: string; + /** + * The title of the deal + * @type {string} + * @memberof GetDealSearchResponseAllOfDataItemsInnerItem + */ + 'title'?: string; + /** + * The value of the deal + * @type {number} + * @memberof GetDealSearchResponseAllOfDataItemsInnerItem + */ + 'value'?: number; + /** + * The currency of the deal + * @type {string} + * @memberof GetDealSearchResponseAllOfDataItemsInnerItem + */ + 'currency'?: string; + /** + * The status of the deal + * @type {string} + * @memberof GetDealSearchResponseAllOfDataItemsInnerItem + */ + 'status'?: string; + /** + * The visibility of the deal + * @type {number} + * @memberof GetDealSearchResponseAllOfDataItemsInnerItem + */ + 'visible_to'?: number; + /** + * + * @type {GetDealSearchResponseAllOfDataItemsInnerItemOwner} + * @memberof GetDealSearchResponseAllOfDataItemsInnerItem + */ + 'owner'?: GetDealSearchResponseAllOfDataItemsInnerItemOwner; + /** + * + * @type {GetDealSearchResponseAllOfDataItemsInnerItemStage} + * @memberof GetDealSearchResponseAllOfDataItemsInnerItem + */ + 'stage'?: GetDealSearchResponseAllOfDataItemsInnerItemStage; + /** + * + * @type {GetDealSearchResponseAllOfDataItemsInnerItemPerson} + * @memberof GetDealSearchResponseAllOfDataItemsInnerItem + */ + 'person'?: GetDealSearchResponseAllOfDataItemsInnerItemPerson | null; + /** + * + * @type {GetDealSearchResponseAllOfDataItemsInnerItemOrganization} + * @memberof GetDealSearchResponseAllOfDataItemsInnerItem + */ + 'organization'?: GetDealSearchResponseAllOfDataItemsInnerItemOrganization | null; + /** + * Custom fields + * @type {Array} + * @memberof GetDealSearchResponseAllOfDataItemsInnerItem + */ + 'custom_fields'?: Array; + /** + * An array of notes + * @type {Array} + * @memberof GetDealSearchResponseAllOfDataItemsInnerItem + */ + 'notes'?: Array; +} + diff --git a/models/get-deal-search-response-all-of-data-items-inner.ts b/models/get-deal-search-response-all-of-data-items-inner.ts new file mode 100644 index 00000000..aa13539d --- /dev/null +++ b/models/get-deal-search-response-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 { GetDealSearchResponseAllOfDataItemsInnerItem } from './get-deal-search-response-all-of-data-items-inner-item'; + +/** + * + * @export + * @interface GetDealSearchResponseAllOfDataItemsInner + */ +export interface GetDealSearchResponseAllOfDataItemsInner { + /** + * Search result relevancy + * @type {number} + * @memberof GetDealSearchResponseAllOfDataItemsInner + */ + 'result_score'?: number; + /** + * + * @type {GetDealSearchResponseAllOfDataItemsInnerItem} + * @memberof GetDealSearchResponseAllOfDataItemsInner + */ + 'item'?: GetDealSearchResponseAllOfDataItemsInnerItem; +} + diff --git a/models/get-deal-search-response-all-of-data.ts b/models/get-deal-search-response-all-of-data.ts new file mode 100644 index 00000000..0e6f547c --- /dev/null +++ b/models/get-deal-search-response-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 { GetDealSearchResponseAllOfDataItemsInner } from './get-deal-search-response-all-of-data-items-inner'; + +/** + * + * @export + * @interface GetDealSearchResponseAllOfData + */ +export interface GetDealSearchResponseAllOfData { + /** + * The array of deals + * @type {Array} + * @memberof GetDealSearchResponseAllOfData + */ + 'items'?: Array; +} + diff --git a/models/get-deal-search-response-all-of.ts b/models/get-deal-search-response-all-of.ts new file mode 100644 index 00000000..1263c42b --- /dev/null +++ b/models/get-deal-search-response-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 { GetActivitiesResponseAdditionalData } from './get-activities-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealSearchResponseAllOfData } from './get-deal-search-response-all-of-data'; + +/** + * + * @export + * @interface GetDealSearchResponseAllOf + */ +export interface GetDealSearchResponseAllOf { + /** + * + * @type {GetDealSearchResponseAllOfData} + * @memberof GetDealSearchResponseAllOf + */ + 'data'?: GetDealSearchResponseAllOfData; + /** + * + * @type {GetActivitiesResponseAdditionalData} + * @memberof GetDealSearchResponseAllOf + */ + 'additional_data'?: GetActivitiesResponseAdditionalData; +} + diff --git a/models/get-deal-search-response.ts b/models/get-deal-search-response.ts new file mode 100644 index 00000000..f86e8051 --- /dev/null +++ b/models/get-deal-search-response.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 { GetActivitiesResponseAdditionalData } from './get-activities-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealSearchResponseAllOf } from './get-deal-search-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealSearchResponseAllOfData } from './get-deal-search-response-all-of-data'; + +/** + * @type GetDealSearchResponse + * @export + */ +export type GetDealSearchResponse = BaseResponse & GetDealSearchResponseAllOf; + + diff --git a/models/get-deal-updates-response-all-of-data-inner.ts b/models/get-deal-updates-response-all-of-data-inner.ts new file mode 100644 index 00000000..cfb854ff --- /dev/null +++ b/models/get-deal-updates-response-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 GetDealUpdatesResponseAllOfDataInner + */ +export interface GetDealUpdatesResponseAllOfDataInner { + /** + * The type of the deal update. (Possible object types - dealChange, note, activity, mailMessage, invoice, document, file) + * @type {string} + * @memberof GetDealUpdatesResponseAllOfDataInner + */ + 'object'?: string; + /** + * The creation date and time of the update + * @type {string} + * @memberof GetDealUpdatesResponseAllOfDataInner + */ + 'timestamp'?: string; + /** + * The data related to the update + * @type {object} + * @memberof GetDealUpdatesResponseAllOfDataInner + */ + 'data'?: object; +} + diff --git a/models/get-deal-updates-response-all-of-related-objects.ts b/models/get-deal-updates-response-all-of-related-objects.ts new file mode 100644 index 00000000..44a1ca0a --- /dev/null +++ b/models/get-deal-updates-response-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 { AddActivityResponseRelatedObjectsPerson } from './add-activity-response-related-objects-person'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponseRelatedObjectsUser } from './get-activities-response-related-objects-user'; +// May contain unused imports in some cases +// @ts-ignore +import { RelatedDealData } from './related-deal-data'; +// May contain unused imports in some cases +// @ts-ignore +import { RelatedOrganizationData } from './related-organization-data'; + +/** + * + * @export + * @interface GetDealUpdatesResponseAllOfRelatedObjects + */ +export interface GetDealUpdatesResponseAllOfRelatedObjects { + /** + * + * @type {RelatedDealData} + * @memberof GetDealUpdatesResponseAllOfRelatedObjects + */ + 'deal'?: RelatedDealData; + /** + * + * @type {RelatedOrganizationData} + * @memberof GetDealUpdatesResponseAllOfRelatedObjects + */ + 'organization'?: RelatedOrganizationData; + /** + * + * @type {GetActivitiesResponseRelatedObjectsUser} + * @memberof GetDealUpdatesResponseAllOfRelatedObjects + */ + 'user'?: GetActivitiesResponseRelatedObjectsUser; + /** + * + * @type {AddActivityResponseRelatedObjectsPerson} + * @memberof GetDealUpdatesResponseAllOfRelatedObjects + */ + 'person'?: AddActivityResponseRelatedObjectsPerson; +} + diff --git a/models/get-deal-updates-response-all-of.ts b/models/get-deal-updates-response-all-of.ts new file mode 100644 index 00000000..425a789c --- /dev/null +++ b/models/get-deal-updates-response-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 { GetDealUpdatesResponseAllOfDataInner } from './get-deal-updates-response-all-of-data-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealUpdatesResponseAllOfRelatedObjects } from './get-deal-updates-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; + +/** + * + * @export + * @interface GetDealUpdatesResponseAllOf + */ +export interface GetDealUpdatesResponseAllOf { + /** + * + * @type {Array} + * @memberof GetDealUpdatesResponseAllOf + */ + 'data'?: Array; + /** + * + * @type {GetFieldsResponseAllOfAdditionalData} + * @memberof GetDealUpdatesResponseAllOf + */ + 'additional_data'?: GetFieldsResponseAllOfAdditionalData; + /** + * + * @type {GetDealUpdatesResponseAllOfRelatedObjects} + * @memberof GetDealUpdatesResponseAllOf + */ + 'related_objects'?: GetDealUpdatesResponseAllOfRelatedObjects; +} + diff --git a/models/get-deal-updates-response.ts b/models/get-deal-updates-response.ts new file mode 100644 index 00000000..7438b963 --- /dev/null +++ b/models/get-deal-updates-response.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 { GetDealUpdatesResponseAllOf } from './get-deal-updates-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealUpdatesResponseAllOfDataInner } from './get-deal-updates-response-all-of-data-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealUpdatesResponseAllOfRelatedObjects } from './get-deal-updates-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; + +/** + * @type GetDealUpdatesResponse + * @export + */ +export type GetDealUpdatesResponse = BaseResponse & GetDealUpdatesResponseAllOf; + + diff --git a/models/get-deals-collection-response.ts b/models/get-deals-collection-response.ts new file mode 100644 index 00000000..1a005b1e --- /dev/null +++ b/models/get-deals-collection-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 { DealCollectionResponseObject } from './deal-collection-response-object'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesCollectionResponseAdditionalData } from './get-activities-collection-response-additional-data'; + +/** + * + * @export + * @interface GetDealsCollectionResponse + */ +export interface GetDealsCollectionResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetDealsCollectionResponse + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetDealsCollectionResponse + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesCollectionResponseAdditionalData} + * @memberof GetDealsCollectionResponse + */ + 'additional_data'?: GetActivitiesCollectionResponseAdditionalData; +} + diff --git a/models/get-deals-response-related-objects.ts b/models/get-deals-response-related-objects.ts new file mode 100644 index 00000000..dff99021 --- /dev/null +++ b/models/get-deals-response-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 { AddActivityResponseRelatedObjectsPerson } from './add-activity-response-related-objects-person'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponseRelatedObjectsUser } from './get-activities-response-related-objects-user'; +// May contain unused imports in some cases +// @ts-ignore +import { RelatedOrganizationDataWithActiveFlag } from './related-organization-data-with-active-flag'; + +/** + * + * @export + * @interface GetDealsResponseRelatedObjects + */ +export interface GetDealsResponseRelatedObjects { + /** + * + * @type {GetActivitiesResponseRelatedObjectsUser} + * @memberof GetDealsResponseRelatedObjects + */ + 'user'?: GetActivitiesResponseRelatedObjectsUser; + /** + * + * @type {RelatedOrganizationDataWithActiveFlag} + * @memberof GetDealsResponseRelatedObjects + */ + 'organization'?: RelatedOrganizationDataWithActiveFlag; + /** + * + * @type {AddActivityResponseRelatedObjectsPerson} + * @memberof GetDealsResponseRelatedObjects + */ + 'person'?: AddActivityResponseRelatedObjectsPerson; +} + diff --git a/models/get-deals-response.ts b/models/get-deals-response.ts new file mode 100644 index 00000000..200c2333 --- /dev/null +++ b/models/get-deals-response.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 { Deal } from './deal'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealsResponseRelatedObjects } from './get-deals-response-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; + +/** + * + * @export + * @interface GetDealsResponse + */ +export interface GetDealsResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetDealsResponse + */ + 'success'?: boolean; + /** + * The array of deals + * @type {Array} + * @memberof GetDealsResponse + */ + 'data'?: Array; + /** + * + * @type {GetFieldsResponseAllOfAdditionalData} + * @memberof GetDealsResponse + */ + 'additional_data'?: GetFieldsResponseAllOfAdditionalData; + /** + * + * @type {GetDealsResponseRelatedObjects} + * @memberof GetDealsResponse + */ + 'related_objects'?: GetDealsResponseRelatedObjects; +} + diff --git a/models/get-deals-summary-response-data-values-total.ts b/models/get-deals-summary-response-data-values-total.ts new file mode 100644 index 00000000..3622d8a1 --- /dev/null +++ b/models/get-deals-summary-response-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 GetDealsSummaryResponseDataValuesTotal + */ +export interface GetDealsSummaryResponseDataValuesTotal { + /** + * The total value of deals in the deal currency group + * @type {number} + * @memberof GetDealsSummaryResponseDataValuesTotal + */ + 'value'?: number; + /** + * The number of deals in the deal currency group + * @type {number} + * @memberof GetDealsSummaryResponseDataValuesTotal + */ + 'count'?: number; + /** + * The total value of deals converted into the company default currency + * @type {number} + * @memberof GetDealsSummaryResponseDataValuesTotal + */ + 'value_converted'?: number; + /** + * The total value of deals formatted with deal currency. E.g. €50 + * @type {string} + * @memberof GetDealsSummaryResponseDataValuesTotal + */ + 'value_formatted'?: string; + /** + * The value_converted formatted with deal currency. E.g. US$50.10 + * @type {string} + * @memberof GetDealsSummaryResponseDataValuesTotal + */ + 'value_converted_formatted'?: string; +} + diff --git a/models/get-deals-summary-response-data-weighted-values-total.ts b/models/get-deals-summary-response-data-weighted-values-total.ts new file mode 100644 index 00000000..c4bbb0d4 --- /dev/null +++ b/models/get-deals-summary-response-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 GetDealsSummaryResponseDataWeightedValuesTotal + */ +export interface GetDealsSummaryResponseDataWeightedValuesTotal { + /** + * The total weighted value of the deals in the deal currency group + * @type {number} + * @memberof GetDealsSummaryResponseDataWeightedValuesTotal + */ + 'value'?: number; + /** + * The number of deals in the deal currency group + * @type {number} + * @memberof GetDealsSummaryResponseDataWeightedValuesTotal + */ + 'count'?: number; + /** + * The total weighted value of the deals formatted with deal currency. E.g. €50 + * @type {string} + * @memberof GetDealsSummaryResponseDataWeightedValuesTotal + */ + 'value_formatted'?: string; +} + diff --git a/models/get-deals-summary-response-data.ts b/models/get-deals-summary-response-data.ts new file mode 100644 index 00000000..de20c547 --- /dev/null +++ b/models/get-deals-summary-response-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 { GetDealsSummaryResponseDataValuesTotal } from './get-deals-summary-response-data-values-total'; +// May contain unused imports in some cases +// @ts-ignore +import { GetDealsSummaryResponseDataWeightedValuesTotal } from './get-deals-summary-response-data-weighted-values-total'; + +/** + * The summary of deals + * @export + * @interface GetDealsSummaryResponseData + */ +export interface GetDealsSummaryResponseData { + /** + * + * @type {GetDealsSummaryResponseDataValuesTotal} + * @memberof GetDealsSummaryResponseData + */ + 'values_total'?: GetDealsSummaryResponseDataValuesTotal; + /** + * + * @type {GetDealsSummaryResponseDataWeightedValuesTotal} + * @memberof GetDealsSummaryResponseData + */ + 'weighted_values_total'?: GetDealsSummaryResponseDataWeightedValuesTotal; + /** + * The total number of deals + * @type {number} + * @memberof GetDealsSummaryResponseData + */ + 'total_count'?: number; + /** + * The total value of deals converted into the company default currency + * @type {number} + * @memberof GetDealsSummaryResponseData + */ + 'total_currency_converted_value'?: number; + /** + * The total weighted value of deals converted into the company default currency + * @type {number} + * @memberof GetDealsSummaryResponseData + */ + '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 GetDealsSummaryResponseData + */ + '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 GetDealsSummaryResponseData + */ + 'total_weighted_currency_converted_value_formatted'?: string; +} + diff --git a/models/get-deals-summary-response.ts b/models/get-deals-summary-response.ts new file mode 100644 index 00000000..0a9d8ecc --- /dev/null +++ b/models/get-deals-summary-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 { GetDealsSummaryResponseData } from './get-deals-summary-response-data'; + +/** + * + * @export + * @interface GetDealsSummaryResponse + */ +export interface GetDealsSummaryResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetDealsSummaryResponse + */ + 'success'?: boolean; + /** + * + * @type {GetDealsSummaryResponseData} + * @memberof GetDealsSummaryResponse + */ + 'data'?: GetDealsSummaryResponseData; +} + diff --git a/models/get-deals-timeline-response-data-totals.ts b/models/get-deals-timeline-response-data-totals.ts new file mode 100644 index 00000000..200f1ec9 --- /dev/null +++ b/models/get-deals-timeline-response-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 GetDealsTimelineResponseDataTotals + */ +export interface GetDealsTimelineResponseDataTotals { + /** + * The number of deals for the given period + * @type {number} + * @memberof GetDealsTimelineResponseDataTotals + */ + 'count'?: number; + /** + * The total values of deals grouped by deal currency + * @type {object} + * @memberof GetDealsTimelineResponseDataTotals + */ + '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 GetDealsTimelineResponseDataTotals + */ + 'weighted_values'?: object; + /** + * The number of open deals for the given period + * @type {number} + * @memberof GetDealsTimelineResponseDataTotals + */ + 'open_count'?: number; + /** + * The total values of open deals for the given period grouped by deal currency + * @type {object} + * @memberof GetDealsTimelineResponseDataTotals + */ + '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 GetDealsTimelineResponseDataTotals + */ + 'weighted_open_values'?: object; + /** + * The number of won deals for the given period + * @type {number} + * @memberof GetDealsTimelineResponseDataTotals + */ + 'won_count'?: number; + /** + * The total values of won deals for the given period grouped by deal currency + * @type {object} + * @memberof GetDealsTimelineResponseDataTotals + */ + 'won_values'?: object; +} + diff --git a/models/get-deals-timeline-response-data.ts b/models/get-deals-timeline-response-data.ts new file mode 100644 index 00000000..1041b401 --- /dev/null +++ b/models/get-deals-timeline-response-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 { GetDealsTimelineResponseDataTotals } from './get-deals-timeline-response-data-totals'; + +/** + * Open and won deals grouped into periods by defined interval, amount and date-type dealField (`field_key`) + * @export + * @interface GetDealsTimelineResponseData + */ +export interface GetDealsTimelineResponseData { + /** + * The start date and time of the period + * @type {string} + * @memberof GetDealsTimelineResponseData + */ + 'period_start'?: string; + /** + * The end date and time of the period + * @type {string} + * @memberof GetDealsTimelineResponseData + */ + 'period_end'?: string; + /** + * + * @type {Array} + * @memberof GetDealsTimelineResponseData + */ + 'deals'?: Array; + /** + * + * @type {GetDealsTimelineResponseDataTotals} + * @memberof GetDealsTimelineResponseData + */ + 'totals'?: GetDealsTimelineResponseDataTotals; +} + diff --git a/models/get-deals-timeline-response.ts b/models/get-deals-timeline-response.ts new file mode 100644 index 00000000..a46b9cff --- /dev/null +++ b/models/get-deals-timeline-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 { GetDealsTimelineResponseData } from './get-deals-timeline-response-data'; + +/** + * + * @export + * @interface GetDealsTimelineResponse + */ +export interface GetDealsTimelineResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetDealsTimelineResponse + */ + 'success'?: boolean; + /** + * + * @type {GetDealsTimelineResponseData} + * @memberof GetDealsTimelineResponse + */ + 'data'?: GetDealsTimelineResponseData; +} + diff --git a/models/get-duplicated-deal-response.ts b/models/get-duplicated-deal-response.ts new file mode 100644 index 00000000..95b5df86 --- /dev/null +++ b/models/get-duplicated-deal-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 { DealStrict } from './deal-strict'; + +/** + * + * @export + * @interface GetDuplicatedDealResponse + */ +export interface GetDuplicatedDealResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetDuplicatedDealResponse + */ + 'success'?: boolean; + /** + * + * @type {DealStrict} + * @memberof GetDuplicatedDealResponse + */ + 'data'?: DealStrict; +} + diff --git a/models/get-field-all-of.ts b/models/get-field-all-of.ts new file mode 100644 index 00000000..96299260 --- /dev/null +++ b/models/get-field-all-of.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 GetFieldAllOf + */ +export interface GetFieldAllOf { + /** + * List of all possible field types + * @type {string} + * @memberof GetFieldAllOf + */ + 'field_type'?: GetFieldAllOfFieldTypeConst; +} + +export const GetFieldAllOfFieldTypeConst = { + boolean: 'boolean', + double: 'double', + int: 'int', + json: 'json', + date: 'date', + daterange: 'daterange', + time: 'time', + timerange: 'timerange', + text: 'text', + varchar: 'varchar', + varchar_auto: 'varchar_auto', + varchar_options: 'varchar_options', + address: 'address', + enum: 'enum', + monetary: 'monetary', + phone: 'phone', + set: 'set', + activity: 'activity', + deal: 'deal', + lead: 'lead', + org: 'org', + people: 'people', + pipeline: 'pipeline', + product: 'product', + project: 'project', + stage: 'stage', + user: 'user', + billing_frequency: 'billing_frequency', + picture: 'picture', + price_list: 'price_list', + projects_board: 'projects_board', + projects_phase: 'projects_phase', + status: 'status', + visible_to: 'visible_to' +} as const; + +export type GetFieldAllOfFieldTypeConst = typeof GetFieldAllOfFieldTypeConst[keyof typeof GetFieldAllOfFieldTypeConst]; + + diff --git a/models/get-field-response-all-of.ts b/models/get-field-response-all-of.ts new file mode 100644 index 00000000..140e110c --- /dev/null +++ b/models/get-field-response-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 { Field } from './field'; + +/** + * + * @export + * @interface GetFieldResponseAllOf + */ +export interface GetFieldResponseAllOf { + /** + * + * @type {Field} + * @memberof GetFieldResponseAllOf + */ + 'data'?: Field; +} + diff --git a/models/get-field-response.ts b/models/get-field-response.ts new file mode 100644 index 00000000..7d3b3126 --- /dev/null +++ b/models/get-field-response.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 { Field } from './field'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFieldResponseAllOf } from './get-field-response-all-of'; + +/** + * @type GetFieldResponse + * @export + */ +export type GetFieldResponse = BaseResponse & GetFieldResponseAllOf; + + diff --git a/models/get-field.ts b/models/get-field.ts new file mode 100644 index 00000000..3846806b --- /dev/null +++ b/models/get-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 { Field } from './field'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFieldAllOf } from './get-field-all-of'; + +/** + * @type GetField + * @export + */ +export type GetField = Field & GetFieldAllOf; + + diff --git a/models/get-fields-response-all-of-additional-data.ts b/models/get-fields-response-all-of-additional-data.ts new file mode 100644 index 00000000..3db48e93 --- /dev/null +++ b/models/get-fields-response-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 GetFieldsResponseAllOfAdditionalData + */ +export interface GetFieldsResponseAllOfAdditionalData { + /** + * Pagination start + * @type {number} + * @memberof GetFieldsResponseAllOfAdditionalData + */ + 'start'?: number; + /** + * Items shown per page + * @type {number} + * @memberof GetFieldsResponseAllOfAdditionalData + */ + 'limit'?: number; + /** + * If there are more list items in the collection than displayed or not + * @type {boolean} + * @memberof GetFieldsResponseAllOfAdditionalData + */ + 'more_items_in_collection'?: boolean; +} + diff --git a/models/get-fields-response-all-of.ts b/models/get-fields-response-all-of.ts new file mode 100644 index 00000000..a60baa54 --- /dev/null +++ b/models/get-fields-response-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 { GetField } from './get-field'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; + +/** + * + * @export + * @interface GetFieldsResponseAllOf + */ +export interface GetFieldsResponseAllOf { + /** + * + * @type {Array} + * @memberof GetFieldsResponseAllOf + */ + 'data'?: Array; + /** + * + * @type {GetFieldsResponseAllOfAdditionalData} + * @memberof GetFieldsResponseAllOf + */ + 'additional_data'?: GetFieldsResponseAllOfAdditionalData; +} + diff --git a/models/get-fields-response.ts b/models/get-fields-response.ts new file mode 100644 index 00000000..8112adc0 --- /dev/null +++ b/models/get-fields-response.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 { GetField } from './get-field'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFieldsResponseAllOf } from './get-fields-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; + +/** + * @type GetFieldsResponse + * @export + */ +export type GetFieldsResponse = BaseResponse & GetFieldsResponseAllOf; + + diff --git a/models/get-file-response.ts b/models/get-file-response.ts new file mode 100644 index 00000000..bc558b7c --- /dev/null +++ b/models/get-file-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 { GetFilesResponseDataInner } from './get-files-response-data-inner'; + +/** + * + * @export + * @interface GetFileResponse + */ +export interface GetFileResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetFileResponse + */ + 'success'?: boolean; + /** + * + * @type {GetFilesResponseDataInner} + * @memberof GetFileResponse + */ + 'data'?: GetFilesResponseDataInner; +} + diff --git a/models/get-files-response-additional-data.ts b/models/get-files-response-additional-data.ts new file mode 100644 index 00000000..cc805b21 --- /dev/null +++ b/models/get-files-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 { PaginationDetails } from './pagination-details'; + +/** + * + * @export + * @interface GetFilesResponseAdditionalData + */ +export interface GetFilesResponseAdditionalData { + /** + * + * @type {PaginationDetails} + * @memberof GetFilesResponseAdditionalData + */ + 'pagination'?: PaginationDetails; +} + diff --git a/models/get-files-response-data-inner.ts b/models/get-files-response-data-inner.ts new file mode 100644 index 00000000..d0711966 --- /dev/null +++ b/models/get-files-response-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 GetFilesResponseDataInner + */ +export interface GetFilesResponseDataInner { + /** + * The ID of the file + * @type {number} + * @memberof GetFilesResponseDataInner + */ + 'id'?: number; + /** + * The ID of the user to associate the file with + * @type {number} + * @memberof GetFilesResponseDataInner + */ + 'user_id'?: number; + /** + * The ID of the deal to associate the file with + * @type {number} + * @memberof GetFilesResponseDataInner + */ + 'deal_id'?: number; + /** + * The ID of the person to associate the file with + * @type {number} + * @memberof GetFilesResponseDataInner + */ + 'person_id'?: number; + /** + * The ID of the organization to associate the file with + * @type {number} + * @memberof GetFilesResponseDataInner + */ + 'org_id'?: number; + /** + * The ID of the product to associate the file with + * @type {number} + * @memberof GetFilesResponseDataInner + */ + 'product_id'?: number; + /** + * The ID of the activity to associate the file with + * @type {number} + * @memberof GetFilesResponseDataInner + */ + 'activity_id'?: number; + /** + * The ID of the lead to associate the file with + * @type {string} + * @memberof GetFilesResponseDataInner + */ + 'lead_id'?: string; + /** + * The date and time when the file was added/created. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof GetFilesResponseDataInner + */ + 'add_time'?: string; + /** + * The last updated date and time of the file. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof GetFilesResponseDataInner + */ + 'update_time'?: string; + /** + * The original name of the file + * @type {string} + * @memberof GetFilesResponseDataInner + */ + 'file_name'?: string; + /** + * The size of the file + * @type {number} + * @memberof GetFilesResponseDataInner + */ + 'file_size'?: number; + /** + * Whether the user is active or not. false = Not activated, true = Activated + * @type {boolean} + * @memberof GetFilesResponseDataInner + */ + 'active_flag'?: boolean; + /** + * Whether the file was uploaded as inline or not + * @type {boolean} + * @memberof GetFilesResponseDataInner + */ + 'inline_flag'?: boolean; + /** + * The location type to send the file to. Only googledrive is supported at the moment. + * @type {string} + * @memberof GetFilesResponseDataInner + */ + 'remote_location'?: string; + /** + * The ID of the remote item + * @type {string} + * @memberof GetFilesResponseDataInner + */ + 'remote_id'?: string; + /** + * The ID of the inline attachment + * @type {string} + * @memberof GetFilesResponseDataInner + */ + 'cid'?: string; + /** + * The location of the cloud storage + * @type {string} + * @memberof GetFilesResponseDataInner + */ + 's3_bucket'?: string; + /** + * The ID of the mail message to associate the file with + * @type {string} + * @memberof GetFilesResponseDataInner + */ + 'mail_message_id'?: string; + /** + * The ID of the mail template to associate the file with + * @type {string} + * @memberof GetFilesResponseDataInner + */ + 'mail_template_id'?: string; + /** + * The name of the deal associated with the file + * @type {string} + * @memberof GetFilesResponseDataInner + */ + 'deal_name'?: string; + /** + * The name of the person associated with the file + * @type {string} + * @memberof GetFilesResponseDataInner + */ + 'person_name'?: string; + /** + * The name of the organization associated with the file + * @type {string} + * @memberof GetFilesResponseDataInner + */ + 'org_name'?: string; + /** + * The name of the product associated with the file + * @type {string} + * @memberof GetFilesResponseDataInner + */ + 'product_name'?: string; + /** + * The name of the lead associated with the file + * @type {string} + * @memberof GetFilesResponseDataInner + */ + 'lead_name'?: string; + /** + * The URL of the download file + * @type {string} + * @memberof GetFilesResponseDataInner + */ + 'url'?: string; + /** + * The visible name of the file + * @type {string} + * @memberof GetFilesResponseDataInner + */ + 'name'?: string; + /** + * The description of the file + * @type {string} + * @memberof GetFilesResponseDataInner + */ + 'description'?: string; +} + diff --git a/models/get-files-response.ts b/models/get-files-response.ts new file mode 100644 index 00000000..19bf676a --- /dev/null +++ b/models/get-files-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 { GetFilesResponseAdditionalData } from './get-files-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFilesResponseDataInner } from './get-files-response-data-inner'; + +/** + * + * @export + * @interface GetFilesResponse + */ +export interface GetFilesResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetFilesResponse + */ + 'success'?: boolean; + /** + * The array of all uploaded files + * @type {Array} + * @memberof GetFilesResponse + */ + 'data'?: Array; + /** + * + * @type {GetFilesResponseAdditionalData} + * @memberof GetFilesResponse + */ + 'additional_data'?: GetFilesResponseAdditionalData; +} + diff --git a/models/get-filters-response-all-of-data-inner.ts b/models/get-filters-response-all-of-data-inner.ts new file mode 100644 index 00000000..350d25ab --- /dev/null +++ b/models/get-filters-response-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 GetFiltersResponseAllOfDataInner + */ +export interface GetFiltersResponseAllOfDataInner { + /** + * The ID of the filter + * @type {number} + * @memberof GetFiltersResponseAllOfDataInner + */ + 'id'?: number; + /** + * The name of the filter + * @type {string} + * @memberof GetFiltersResponseAllOfDataInner + */ + 'name'?: string; + /** + * The active flag of the filter + * @type {boolean} + * @memberof GetFiltersResponseAllOfDataInner + */ + 'active_flag'?: boolean; + /** + * The type of the item + * @type {string} + * @memberof GetFiltersResponseAllOfDataInner + */ + 'type'?: string; + /** + * The owner of the filter + * @type {number} + * @memberof GetFiltersResponseAllOfDataInner + */ + 'user_id'?: number; + /** + * The date and time when the filter was added + * @type {string} + * @memberof GetFiltersResponseAllOfDataInner + */ + 'add_time'?: string; + /** + * The date and time when the filter was updated + * @type {string} + * @memberof GetFiltersResponseAllOfDataInner + */ + 'update_time'?: string; + /** + * The visibility group ID of who can see then filter + * @type {number} + * @memberof GetFiltersResponseAllOfDataInner + */ + 'visible_to'?: number; + /** + * Used by Pipedrive webapp + * @type {number} + * @memberof GetFiltersResponseAllOfDataInner + */ + 'custom_view_id'?: number; +} + diff --git a/models/get-filters-response-all-of.ts b/models/get-filters-response-all-of.ts new file mode 100644 index 00000000..87468a26 --- /dev/null +++ b/models/get-filters-response-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 { GetFiltersResponseAllOfDataInner } from './get-filters-response-all-of-data-inner'; + +/** + * + * @export + * @interface GetFiltersResponseAllOf + */ +export interface GetFiltersResponseAllOf { + /** + * The array of filters + * @type {Array} + * @memberof GetFiltersResponseAllOf + */ + 'data'?: Array; +} + diff --git a/models/get-filters-response.ts b/models/get-filters-response.ts new file mode 100644 index 00000000..1b048999 --- /dev/null +++ b/models/get-filters-response.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 { GetFiltersResponseAllOf } from './get-filters-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFiltersResponseAllOfDataInner } from './get-filters-response-all-of-data-inner'; + +/** + * @type GetFiltersResponse + * @export + */ +export type GetFiltersResponse = BaseResponse & GetFiltersResponseAllOf; + + diff --git a/models/get-filters-response1-all-of.ts b/models/get-filters-response1-all-of.ts new file mode 100644 index 00000000..520e965a --- /dev/null +++ b/models/get-filters-response1-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 { GetFiltersResponseAllOfDataInner } from './get-filters-response-all-of-data-inner'; + +/** + * + * @export + * @interface GetFiltersResponse1AllOf + */ +export interface GetFiltersResponse1AllOf { + /** + * + * @type {GetFiltersResponseAllOfDataInner} + * @memberof GetFiltersResponse1AllOf + */ + 'data'?: GetFiltersResponseAllOfDataInner; +} + diff --git a/models/get-filters-response1.ts b/models/get-filters-response1.ts new file mode 100644 index 00000000..5664791f --- /dev/null +++ b/models/get-filters-response1.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 { GetFiltersResponse1AllOf } from './get-filters-response1-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFiltersResponseAllOfDataInner } from './get-filters-response-all-of-data-inner'; + +/** + * @type GetFiltersResponse1 + * @export + */ +export type GetFiltersResponse1 = BaseResponse & GetFiltersResponse1AllOf; + + diff --git a/models/get-goal-result-response-data.ts b/models/get-goal-result-response-data.ts new file mode 100644 index 00000000..8a26d0df --- /dev/null +++ b/models/get-goal-result-response-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 { Goal } from './goal'; + +/** + * + * @export + * @interface GetGoalResultResponseData + */ +export interface GetGoalResultResponseData { + /** + * The numeric progress of the goal + * @type {number} + * @memberof GetGoalResultResponseData + */ + 'progress'?: number; + /** + * + * @type {Goal} + * @memberof GetGoalResultResponseData + */ + 'goal'?: Goal; +} + diff --git a/models/get-goal-result-response.ts b/models/get-goal-result-response.ts new file mode 100644 index 00000000..21c6ed57 --- /dev/null +++ b/models/get-goal-result-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 { GetGoalResultResponseData } from './get-goal-result-response-data'; + +/** + * + * @export + * @interface GetGoalResultResponse + */ +export interface GetGoalResultResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetGoalResultResponse + */ + 'success'?: boolean; + /** + * + * @type {GetGoalResultResponseData} + * @memberof GetGoalResultResponse + */ + 'data'?: GetGoalResultResponseData; +} + diff --git a/models/get-goals-response-data.ts b/models/get-goals-response-data.ts new file mode 100644 index 00000000..19c145cb --- /dev/null +++ b/models/get-goals-response-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 { Goal } from './goal'; + +/** + * + * @export + * @interface GetGoalsResponseData + */ +export interface GetGoalsResponseData { + /** + * + * @type {Array} + * @memberof GetGoalsResponseData + */ + 'goals'?: Array; +} + diff --git a/models/get-goals-response.ts b/models/get-goals-response.ts new file mode 100644 index 00000000..c39f4097 --- /dev/null +++ b/models/get-goals-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 { GetGoalsResponseData } from './get-goals-response-data'; + +/** + * + * @export + * @interface GetGoalsResponse + */ +export interface GetGoalsResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetGoalsResponse + */ + 'success'?: boolean; + /** + * + * @type {GetGoalsResponseData} + * @memberof GetGoalsResponse + */ + 'data'?: GetGoalsResponseData; +} + diff --git a/models/get-item-search-field-response-all-of-data-inner.ts b/models/get-item-search-field-response-all-of-data-inner.ts new file mode 100644 index 00000000..03406813 --- /dev/null +++ b/models/get-item-search-field-response-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 GetItemSearchFieldResponseAllOfDataInner + */ +export interface GetItemSearchFieldResponseAllOfDataInner { + /** + * The ID of the item + * @type {number} + * @memberof GetItemSearchFieldResponseAllOfDataInner + */ + 'id'?: number; + /** + * The value of the searched `field_key` + * @type {any} + * @memberof GetItemSearchFieldResponseAllOfDataInner + */ + '$field_key'?: any; +} + diff --git a/models/get-item-search-field-response-all-of.ts b/models/get-item-search-field-response-all-of.ts new file mode 100644 index 00000000..70b20ea2 --- /dev/null +++ b/models/get-item-search-field-response-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 { GetActivitiesResponseAdditionalData } from './get-activities-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetItemSearchFieldResponseAllOfDataInner } from './get-item-search-field-response-all-of-data-inner'; + +/** + * + * @export + * @interface GetItemSearchFieldResponseAllOf + */ +export interface GetItemSearchFieldResponseAllOf { + /** + * The array of results + * @type {Array} + * @memberof GetItemSearchFieldResponseAllOf + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesResponseAdditionalData} + * @memberof GetItemSearchFieldResponseAllOf + */ + 'additional_data'?: GetActivitiesResponseAdditionalData; +} + diff --git a/models/get-item-search-field-response.ts b/models/get-item-search-field-response.ts new file mode 100644 index 00000000..bc6213ab --- /dev/null +++ b/models/get-item-search-field-response.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 { GetActivitiesResponseAdditionalData } from './get-activities-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetItemSearchFieldResponseAllOf } from './get-item-search-field-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetItemSearchFieldResponseAllOfDataInner } from './get-item-search-field-response-all-of-data-inner'; + +/** + * @type GetItemSearchFieldResponse + * @export + */ +export type GetItemSearchFieldResponse = BaseResponse & GetItemSearchFieldResponseAllOf; + + diff --git a/models/get-item-search-response-all-of-data.ts b/models/get-item-search-response-all-of-data.ts new file mode 100644 index 00000000..f6178a2e --- /dev/null +++ b/models/get-item-search-response-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 { SearchItem } from './search-item'; + +/** + * + * @export + * @interface GetItemSearchResponseAllOfData + */ +export interface GetItemSearchResponseAllOfData { + /** + * The array of found items + * @type {Array} + * @memberof GetItemSearchResponseAllOfData + */ + 'items'?: Array; + /** + * The array of related items if `search_for_related_items` was enabled + * @type {Array} + * @memberof GetItemSearchResponseAllOfData + */ + 'related_items'?: Array; +} + diff --git a/models/get-item-search-response-all-of.ts b/models/get-item-search-response-all-of.ts new file mode 100644 index 00000000..fb4b9a43 --- /dev/null +++ b/models/get-item-search-response-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 { GetActivitiesResponseAdditionalData } from './get-activities-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetItemSearchResponseAllOfData } from './get-item-search-response-all-of-data'; + +/** + * + * @export + * @interface GetItemSearchResponseAllOf + */ +export interface GetItemSearchResponseAllOf { + /** + * + * @type {GetItemSearchResponseAllOfData} + * @memberof GetItemSearchResponseAllOf + */ + 'data'?: GetItemSearchResponseAllOfData; + /** + * + * @type {GetActivitiesResponseAdditionalData} + * @memberof GetItemSearchResponseAllOf + */ + 'additional_data'?: GetActivitiesResponseAdditionalData; +} + diff --git a/models/get-item-search-response.ts b/models/get-item-search-response.ts new file mode 100644 index 00000000..f5b9e00b --- /dev/null +++ b/models/get-item-search-response.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 { GetActivitiesResponseAdditionalData } from './get-activities-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetItemSearchResponseAllOf } from './get-item-search-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetItemSearchResponseAllOfData } from './get-item-search-response-all-of-data'; + +/** + * @type GetItemSearchResponse + * @export + */ +export type GetItemSearchResponse = BaseResponse & GetItemSearchResponseAllOf; + + diff --git a/models/get-lead-id-response-data.ts b/models/get-lead-id-response-data.ts new file mode 100644 index 00000000..b23b77f6 --- /dev/null +++ b/models/get-lead-id-response-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 GetLeadIdResponseData + */ +export interface GetLeadIdResponseData { + /** + * + * @type {string} + * @memberof GetLeadIdResponseData + */ + 'id'?: string; +} + diff --git a/models/get-lead-id-response.ts b/models/get-lead-id-response.ts new file mode 100644 index 00000000..066501fb --- /dev/null +++ b/models/get-lead-id-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 { GetLeadIdResponseData } from './get-lead-id-response-data'; + +/** + * + * @export + * @interface GetLeadIdResponse + */ +export interface GetLeadIdResponse { + /** + * + * @type {boolean} + * @memberof GetLeadIdResponse + */ + 'success'?: boolean; + /** + * + * @type {GetLeadIdResponseData} + * @memberof GetLeadIdResponse + */ + 'data'?: GetLeadIdResponseData; +} + diff --git a/models/get-lead-labels-response.ts b/models/get-lead-labels-response.ts new file mode 100644 index 00000000..212cd540 --- /dev/null +++ b/models/get-lead-labels-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 { LeadLabel } from './lead-label'; + +/** + * + * @export + * @interface GetLeadLabelsResponse + */ +export interface GetLeadLabelsResponse { + /** + * + * @type {boolean} + * @memberof GetLeadLabelsResponse + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetLeadLabelsResponse + */ + 'data'?: Array; +} + diff --git a/models/get-lead-response.ts b/models/get-lead-response.ts new file mode 100644 index 00000000..7435533e --- /dev/null +++ b/models/get-lead-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 { Lead } from './lead'; + +/** + * + * @export + * @interface GetLeadResponse + */ +export interface GetLeadResponse { + /** + * + * @type {boolean} + * @memberof GetLeadResponse + */ + 'success'?: boolean; + /** + * + * @type {Lead} + * @memberof GetLeadResponse + */ + 'data'?: Lead; +} + diff --git a/models/get-lead-search-response-all-of-data.ts b/models/get-lead-search-response-all-of-data.ts new file mode 100644 index 00000000..58c23ca8 --- /dev/null +++ b/models/get-lead-search-response-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 { LeadSearchItem } from './lead-search-item'; + +/** + * + * @export + * @interface GetLeadSearchResponseAllOfData + */ +export interface GetLeadSearchResponseAllOfData { + /** + * The array of leads + * @type {Array} + * @memberof GetLeadSearchResponseAllOfData + */ + 'items'?: Array; +} + diff --git a/models/get-lead-search-response-all-of.ts b/models/get-lead-search-response-all-of.ts new file mode 100644 index 00000000..55d91e0a --- /dev/null +++ b/models/get-lead-search-response-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 { GetActivitiesResponseAdditionalData } from './get-activities-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetLeadSearchResponseAllOfData } from './get-lead-search-response-all-of-data'; + +/** + * + * @export + * @interface GetLeadSearchResponseAllOf + */ +export interface GetLeadSearchResponseAllOf { + /** + * + * @type {GetLeadSearchResponseAllOfData} + * @memberof GetLeadSearchResponseAllOf + */ + 'data'?: GetLeadSearchResponseAllOfData; + /** + * + * @type {GetActivitiesResponseAdditionalData} + * @memberof GetLeadSearchResponseAllOf + */ + 'additional_data'?: GetActivitiesResponseAdditionalData; +} + diff --git a/models/get-lead-search-response.ts b/models/get-lead-search-response.ts new file mode 100644 index 00000000..c07cea0f --- /dev/null +++ b/models/get-lead-search-response.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 { GetActivitiesResponseAdditionalData } from './get-activities-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetLeadSearchResponseAllOf } from './get-lead-search-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetLeadSearchResponseAllOfData } from './get-lead-search-response-all-of-data'; + +/** + * @type GetLeadSearchResponse + * @export + */ +export type GetLeadSearchResponse = BaseResponse & GetLeadSearchResponseAllOf; + + diff --git a/models/get-leads-response.ts b/models/get-leads-response.ts new file mode 100644 index 00000000..2f51770e --- /dev/null +++ b/models/get-leads-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 { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { Lead } from './lead'; + +/** + * + * @export + * @interface GetLeadsResponse + */ +export interface GetLeadsResponse { + /** + * + * @type {boolean} + * @memberof GetLeadsResponse + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetLeadsResponse + */ + 'data'?: Array; + /** + * + * @type {GetFieldsResponseAllOfAdditionalData} + * @memberof GetLeadsResponse + */ + 'additional_data'?: GetFieldsResponseAllOfAdditionalData; +} + diff --git a/models/get-leads-source-response.ts b/models/get-leads-source-response.ts new file mode 100644 index 00000000..87d61820 --- /dev/null +++ b/models/get-leads-source-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 { LeadSource } from './lead-source'; + +/** + * + * @export + * @interface GetLeadsSourceResponse + */ +export interface GetLeadsSourceResponse { + /** + * + * @type {boolean} + * @memberof GetLeadsSourceResponse + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetLeadsSourceResponse + */ + 'data'?: Array; +} + diff --git a/models/get-link-remote-file-to-item-response.ts b/models/get-link-remote-file-to-item-response.ts new file mode 100644 index 00000000..f090808d --- /dev/null +++ b/models/get-link-remote-file-to-item-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 { GetFilesResponseDataInner } from './get-files-response-data-inner'; + +/** + * + * @export + * @interface GetLinkRemoteFileToItemResponse + */ +export interface GetLinkRemoteFileToItemResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetLinkRemoteFileToItemResponse + */ + 'success'?: boolean; + /** + * + * @type {GetFilesResponseDataInner} + * @memberof GetLinkRemoteFileToItemResponse + */ + 'data'?: GetFilesResponseDataInner; +} + diff --git a/models/get-list-followers-response-all-of-data-inner.ts b/models/get-list-followers-response-all-of-data-inner.ts new file mode 100644 index 00000000..4e1b19c3 --- /dev/null +++ b/models/get-list-followers-response-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 GetListFollowersResponseAllOfDataInner + */ +export interface GetListFollowersResponseAllOfDataInner { + /** + * The ID of the user + * @type {number} + * @memberof GetListFollowersResponseAllOfDataInner + */ + 'user_id'?: number; + /** + * The ID of the user follower + * @type {number} + * @memberof GetListFollowersResponseAllOfDataInner + */ + 'id'?: number; + /** + * The ID of the deal which the follower was added to + * @type {number} + * @memberof GetListFollowersResponseAllOfDataInner + */ + 'deal_id'?: number; + /** + * The date and time when the follower was added to the person + * @type {string} + * @memberof GetListFollowersResponseAllOfDataInner + */ + 'add_time'?: string; +} + diff --git a/models/get-list-followers-response-all-of.ts b/models/get-list-followers-response-all-of.ts new file mode 100644 index 00000000..7db40a30 --- /dev/null +++ b/models/get-list-followers-response-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 { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetListFollowersResponseAllOfDataInner } from './get-list-followers-response-all-of-data-inner'; + +/** + * + * @export + * @interface GetListFollowersResponseAllOf + */ +export interface GetListFollowersResponseAllOf { + /** + * The list of followers + * @type {Array} + * @memberof GetListFollowersResponseAllOf + */ + 'data'?: Array; + /** + * + * @type {GetFieldsResponseAllOfAdditionalData} + * @memberof GetListFollowersResponseAllOf + */ + 'additional_data'?: GetFieldsResponseAllOfAdditionalData; +} + diff --git a/models/get-list-followers-response.ts b/models/get-list-followers-response.ts new file mode 100644 index 00000000..667a4108 --- /dev/null +++ b/models/get-list-followers-response.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 { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetListFollowersResponseAllOf } from './get-list-followers-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetListFollowersResponseAllOfDataInner } from './get-list-followers-response-all-of-data-inner'; + +/** + * @type GetListFollowersResponse + * @export + */ +export type GetListFollowersResponse = BaseResponse & GetListFollowersResponseAllOf; + + diff --git a/models/get-mail-message-response-all-of.ts b/models/get-mail-message-response-all-of.ts new file mode 100644 index 00000000..14bec548 --- /dev/null +++ b/models/get-mail-message-response-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 { MailMessageData } from './mail-message-data'; + +/** + * + * @export + * @interface GetMailMessageResponseAllOf + */ +export interface GetMailMessageResponseAllOf { + /** + * + * @type {MailMessageData} + * @memberof GetMailMessageResponseAllOf + */ + 'data'?: MailMessageData; +} + diff --git a/models/get-mail-message-response.ts b/models/get-mail-message-response.ts new file mode 100644 index 00000000..be91292a --- /dev/null +++ b/models/get-mail-message-response.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 { GetMailMessageResponseAllOf } from './get-mail-message-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { MailMessageData } from './mail-message-data'; +// May contain unused imports in some cases +// @ts-ignore +import { MailServiceBaseResponse } from './mail-service-base-response'; + +/** + * @type GetMailMessageResponse + * @export + */ +export type GetMailMessageResponse = GetMailMessageResponseAllOf & MailServiceBaseResponse; + + diff --git a/models/get-mail-thread-messages-response-all-of-data-inner-all-of.ts b/models/get-mail-thread-messages-response-all-of-data-inner-all-of.ts new file mode 100644 index 00000000..40bb1447 --- /dev/null +++ b/models/get-mail-thread-messages-response-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 { MailThreadAllOf1PartiesToInner } from './mail-thread-all-of1-parties-to-inner'; + +/** + * + * @export + * @interface GetMailThreadMessagesResponseAllOfDataInnerAllOf + */ +export interface GetMailThreadMessagesResponseAllOfDataInnerAllOf { + /** + * Senders of the mail thread + * @type {Array} + * @memberof GetMailThreadMessagesResponseAllOfDataInnerAllOf + */ + 'from'?: Array; + /** + * Recipients of the mail thread + * @type {Array} + * @memberof GetMailThreadMessagesResponseAllOfDataInnerAllOf + */ + 'to'?: Array; + /** + * Participants of the Cc + * @type {Array} + * @memberof GetMailThreadMessagesResponseAllOfDataInnerAllOf + */ + 'cc'?: Array; + /** + * Participants of the Bcc + * @type {Array} + * @memberof GetMailThreadMessagesResponseAllOfDataInnerAllOf + */ + 'bcc'?: Array; + /** + * A link to the mail thread message + * @type {string} + * @memberof GetMailThreadMessagesResponseAllOfDataInnerAllOf + */ + 'body_url'?: string; + /** + * ID of the mail thread + * @type {number} + * @memberof GetMailThreadMessagesResponseAllOfDataInnerAllOf + */ + '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 GetMailThreadMessagesResponseAllOfDataInnerAllOf + */ + 'draft'?: string | null; + /** + * + * @type {number} + * @memberof GetMailThreadMessagesResponseAllOfDataInnerAllOf + */ + 'has_body_flag'?: GetMailThreadMessagesResponseAllOfDataInnerAllOfHasBodyFlagConst; + /** + * + * @type {number} + * @memberof GetMailThreadMessagesResponseAllOfDataInnerAllOf + */ + 'sent_flag'?: GetMailThreadMessagesResponseAllOfDataInnerAllOfSentFlagConst; + /** + * + * @type {number} + * @memberof GetMailThreadMessagesResponseAllOfDataInnerAllOf + */ + 'sent_from_pipedrive_flag'?: GetMailThreadMessagesResponseAllOfDataInnerAllOfSentFromPipedriveFlagConst; + /** + * The time when the mail message was received or created + * @type {string} + * @memberof GetMailThreadMessagesResponseAllOfDataInnerAllOf + */ + 'message_time'?: string; + /** + * The time when the mail message was inserted to database + * @type {string} + * @memberof GetMailThreadMessagesResponseAllOfDataInnerAllOf + */ + 'add_time'?: string; + /** + * The time when the mail message was updated in database received + * @type {string} + * @memberof GetMailThreadMessagesResponseAllOfDataInnerAllOf + */ + 'update_time'?: string; +} + +export const GetMailThreadMessagesResponseAllOfDataInnerAllOfHasBodyFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type GetMailThreadMessagesResponseAllOfDataInnerAllOfHasBodyFlagConst = typeof GetMailThreadMessagesResponseAllOfDataInnerAllOfHasBodyFlagConst[keyof typeof GetMailThreadMessagesResponseAllOfDataInnerAllOfHasBodyFlagConst]; +export const GetMailThreadMessagesResponseAllOfDataInnerAllOfSentFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type GetMailThreadMessagesResponseAllOfDataInnerAllOfSentFlagConst = typeof GetMailThreadMessagesResponseAllOfDataInnerAllOfSentFlagConst[keyof typeof GetMailThreadMessagesResponseAllOfDataInnerAllOfSentFlagConst]; +export const GetMailThreadMessagesResponseAllOfDataInnerAllOfSentFromPipedriveFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type GetMailThreadMessagesResponseAllOfDataInnerAllOfSentFromPipedriveFlagConst = typeof GetMailThreadMessagesResponseAllOfDataInnerAllOfSentFromPipedriveFlagConst[keyof typeof GetMailThreadMessagesResponseAllOfDataInnerAllOfSentFromPipedriveFlagConst]; + + diff --git a/models/get-mail-thread-messages-response-all-of-data-inner.ts b/models/get-mail-thread-messages-response-all-of-data-inner.ts new file mode 100644 index 00000000..3365615c --- /dev/null +++ b/models/get-mail-thread-messages-response-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 { GetMailThreadMessagesResponseAllOfDataInnerAllOf } from './get-mail-thread-messages-response-all-of-data-inner-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { MailThreadAllOf } from './mail-thread-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { MailThreadAllOf1PartiesToInner } from './mail-thread-all-of1-parties-to-inner'; + +/** + * @type GetMailThreadMessagesResponseAllOfDataInner + * @export + */ +export type GetMailThreadMessagesResponseAllOfDataInner = GetMailThreadMessagesResponseAllOfDataInnerAllOf & MailThreadAllOf; + + diff --git a/models/get-mail-thread-messages-response-all-of.ts b/models/get-mail-thread-messages-response-all-of.ts new file mode 100644 index 00000000..0d91e5ff --- /dev/null +++ b/models/get-mail-thread-messages-response-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 { GetMailThreadMessagesResponseAllOfDataInner } from './get-mail-thread-messages-response-all-of-data-inner'; + +/** + * + * @export + * @interface GetMailThreadMessagesResponseAllOf + */ +export interface GetMailThreadMessagesResponseAllOf { + /** + * The array of the mail messages of the mail thread + * @type {Array} + * @memberof GetMailThreadMessagesResponseAllOf + */ + 'data'?: Array; +} + diff --git a/models/get-mail-thread-messages-response.ts b/models/get-mail-thread-messages-response.ts new file mode 100644 index 00000000..9b388700 --- /dev/null +++ b/models/get-mail-thread-messages-response.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 { GetMailThreadMessagesResponseAllOf } from './get-mail-thread-messages-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetMailThreadMessagesResponseAllOfDataInner } from './get-mail-thread-messages-response-all-of-data-inner'; + +/** + * @type GetMailThreadMessagesResponse + * @export + */ +export type GetMailThreadMessagesResponse = BaseResponse & GetMailThreadMessagesResponseAllOf; + + diff --git a/models/get-mail-thread-response-all-of.ts b/models/get-mail-thread-response-all-of.ts new file mode 100644 index 00000000..b5276175 --- /dev/null +++ b/models/get-mail-thread-response-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 { MailThread } from './mail-thread'; + +/** + * + * @export + * @interface GetMailThreadResponseAllOf + */ +export interface GetMailThreadResponseAllOf { + /** + * The array of mail threads + * @type {Array} + * @memberof GetMailThreadResponseAllOf + */ + 'data'?: Array; +} + diff --git a/models/get-mail-thread-response.ts b/models/get-mail-thread-response.ts new file mode 100644 index 00000000..b0877140 --- /dev/null +++ b/models/get-mail-thread-response.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 { GetMailThreadResponseAllOf } from './get-mail-thread-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { MailThread } from './mail-thread'; + +/** + * @type GetMailThreadResponse + * @export + */ +export type GetMailThreadResponse = BaseResponse & GetMailThreadResponseAllOf; + + diff --git a/models/get-mail-thread-response1-all-of-data.ts b/models/get-mail-thread-response1-all-of-data.ts new file mode 100644 index 00000000..a8c43d23 --- /dev/null +++ b/models/get-mail-thread-response1-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 { MailThread } from './mail-thread'; +// May contain unused imports in some cases +// @ts-ignore +import { MailThreadAllOf1Parties } from './mail-thread-all-of1-parties'; + +/** + * @type GetMailThreadResponse1AllOfData + * The mail thread object + * @export + */ +export type GetMailThreadResponse1AllOfData = MailThread; + + diff --git a/models/get-mail-thread-response1-all-of.ts b/models/get-mail-thread-response1-all-of.ts new file mode 100644 index 00000000..b7ce493e --- /dev/null +++ b/models/get-mail-thread-response1-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 { GetMailThreadResponse1AllOfData } from './get-mail-thread-response1-all-of-data'; + +/** + * + * @export + * @interface GetMailThreadResponse1AllOf + */ +export interface GetMailThreadResponse1AllOf { + /** + * + * @type {GetMailThreadResponse1AllOfData} + * @memberof GetMailThreadResponse1AllOf + */ + 'data'?: GetMailThreadResponse1AllOfData; +} + diff --git a/models/get-mail-thread-response1.ts b/models/get-mail-thread-response1.ts new file mode 100644 index 00000000..d2612b05 --- /dev/null +++ b/models/get-mail-thread-response1.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 { GetMailThreadResponse1AllOf } from './get-mail-thread-response1-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetMailThreadResponse1AllOfData } from './get-mail-thread-response1-all-of-data'; + +/** + * @type GetMailThreadResponse1 + * @export + */ +export type GetMailThreadResponse1 = BaseResponse & GetMailThreadResponse1AllOf; + + diff --git a/models/get-merged-deal-response-data-all-of.ts b/models/get-merged-deal-response-data-all-of.ts new file mode 100644 index 00000000..fe0d2d14 --- /dev/null +++ b/models/get-merged-deal-response-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 GetMergedDealResponseDataAllOf + */ +export interface GetMergedDealResponseDataAllOf { + /** + * The deal ID of the deal which the original deal was merged with + * @type {number} + * @memberof GetMergedDealResponseDataAllOf + */ + 'merge_what_id'?: number; +} + diff --git a/models/get-merged-deal-response-data.ts b/models/get-merged-deal-response-data.ts new file mode 100644 index 00000000..ac7fa3ce --- /dev/null +++ b/models/get-merged-deal-response-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 { GetMergedDealResponseDataAllOf } from './get-merged-deal-response-data-all-of'; + +/** + * @type GetMergedDealResponseData + * @export + */ +export type GetMergedDealResponseData = DealStrict & GetMergedDealResponseDataAllOf; + + diff --git a/models/get-merged-deal-response.ts b/models/get-merged-deal-response.ts new file mode 100644 index 00000000..bf72d390 --- /dev/null +++ b/models/get-merged-deal-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 { GetMergedDealResponseData } from './get-merged-deal-response-data'; + +/** + * + * @export + * @interface GetMergedDealResponse + */ +export interface GetMergedDealResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetMergedDealResponse + */ + 'success'?: boolean; + /** + * + * @type {GetMergedDealResponseData} + * @memberof GetMergedDealResponse + */ + 'data'?: GetMergedDealResponseData; +} + diff --git a/models/get-note-fields-response-all-of-data-inner-all-of-options-inner.ts b/models/get-note-fields-response-all-of-data-inner-all-of-options-inner.ts new file mode 100644 index 00000000..724b9a44 --- /dev/null +++ b/models/get-note-fields-response-all-of-data-inner-all-of-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 GetNoteFieldsResponseAllOfDataInnerAllOfOptionsInner + */ +export interface GetNoteFieldsResponseAllOfDataInnerAllOfOptionsInner { + /** + * + * @type {number} + * @memberof GetNoteFieldsResponseAllOfDataInnerAllOfOptionsInner + */ + 'id'?: number; + /** + * + * @type {string} + * @memberof GetNoteFieldsResponseAllOfDataInnerAllOfOptionsInner + */ + 'label'?: string; +} + diff --git a/models/get-note-fields-response-all-of-data-inner-all-of.ts b/models/get-note-fields-response-all-of-data-inner-all-of.ts new file mode 100644 index 00000000..38eae82d --- /dev/null +++ b/models/get-note-fields-response-all-of-data-inner-all-of.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 { GetNoteFieldsResponseAllOfDataInnerAllOfOptionsInner } from './get-note-fields-response-all-of-data-inner-all-of-options-inner'; + +/** + * + * @export + * @interface GetNoteFieldsResponseAllOfDataInnerAllOf + */ +export interface GetNoteFieldsResponseAllOfDataInnerAllOf { + /** + * The ID of the field + * @type {number} + * @memberof GetNoteFieldsResponseAllOfDataInnerAllOf + */ + 'id'?: number; + /** + * The key of the field + * @type {string} + * @memberof GetNoteFieldsResponseAllOfDataInnerAllOf + */ + 'key'?: string; + /** + * The name of the field + * @type {string} + * @memberof GetNoteFieldsResponseAllOfDataInnerAllOf + */ + 'name'?: string; + /** + * The type of the field
ValueDescription
`address`Address field
`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 GetNoteFieldsResponseAllOfDataInnerAllOf + */ + 'field_type'?: GetNoteFieldsResponseAllOfDataInnerAllOfFieldTypeConst; + /** + * The active flag of the field + * @type {boolean} + * @memberof GetNoteFieldsResponseAllOfDataInnerAllOf + */ + 'active_flag'?: boolean; + /** + * The edit flag of the field + * @type {boolean} + * @memberof GetNoteFieldsResponseAllOfDataInnerAllOf + */ + 'edit_flag'?: boolean; + /** + * Not used + * @type {boolean} + * @memberof GetNoteFieldsResponseAllOfDataInnerAllOf + */ + 'bulk_edit_allowed'?: boolean; + /** + * Whether or not the field is mandatory + * @type {boolean} + * @memberof GetNoteFieldsResponseAllOfDataInnerAllOf + */ + 'mandatory_flag'?: boolean; + /** + * The options of the field. When there are no options, `null` is returned. + * @type {Array} + * @memberof GetNoteFieldsResponseAllOfDataInnerAllOf + */ + 'options'?: Array; +} + +export const GetNoteFieldsResponseAllOfDataInnerAllOfFieldTypeConst = { + 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 GetNoteFieldsResponseAllOfDataInnerAllOfFieldTypeConst = typeof GetNoteFieldsResponseAllOfDataInnerAllOfFieldTypeConst[keyof typeof GetNoteFieldsResponseAllOfDataInnerAllOfFieldTypeConst]; + + diff --git a/models/get-note-fields-response-all-of-data-inner.ts b/models/get-note-fields-response-all-of-data-inner.ts new file mode 100644 index 00000000..fb93c096 --- /dev/null +++ b/models/get-note-fields-response-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 { GetFieldAllOf } from './get-field-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetNoteFieldsResponseAllOfDataInnerAllOf } from './get-note-fields-response-all-of-data-inner-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetNoteFieldsResponseAllOfDataInnerAllOfOptionsInner } from './get-note-fields-response-all-of-data-inner-all-of-options-inner'; + +/** + * @type GetNoteFieldsResponseAllOfDataInner + * @export + */ +export type GetNoteFieldsResponseAllOfDataInner = GetFieldAllOf & GetNoteFieldsResponseAllOfDataInnerAllOf; + + diff --git a/models/get-note-fields-response-all-of.ts b/models/get-note-fields-response-all-of.ts new file mode 100644 index 00000000..d3523560 --- /dev/null +++ b/models/get-note-fields-response-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 { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetNoteFieldsResponseAllOfDataInner } from './get-note-fields-response-all-of-data-inner'; + +/** + * + * @export + * @interface GetNoteFieldsResponseAllOf + */ +export interface GetNoteFieldsResponseAllOf { + /** + * + * @type {Array} + * @memberof GetNoteFieldsResponseAllOf + */ + 'data'?: Array; + /** + * + * @type {GetFieldsResponseAllOfAdditionalData} + * @memberof GetNoteFieldsResponseAllOf + */ + 'additional_data'?: GetFieldsResponseAllOfAdditionalData; +} + diff --git a/models/get-note-fields-response.ts b/models/get-note-fields-response.ts new file mode 100644 index 00000000..c43e590e --- /dev/null +++ b/models/get-note-fields-response.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 { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetNoteFieldsResponseAllOf } from './get-note-fields-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetNoteFieldsResponseAllOfDataInner } from './get-note-fields-response-all-of-data-inner'; + +/** + * @type GetNoteFieldsResponse + * @export + */ +export type GetNoteFieldsResponse = BaseResponse & GetNoteFieldsResponseAllOf; + + diff --git a/models/get-notes-response-additional-data-pagination.ts b/models/get-notes-response-additional-data-pagination.ts new file mode 100644 index 00000000..cffce665 --- /dev/null +++ b/models/get-notes-response-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 { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { PaginationDetailsAllOf } from './pagination-details-all-of'; + +/** + * @type GetNotesResponseAdditionalDataPagination + * The pagination details of the list + * @export + */ +export type GetNotesResponseAdditionalDataPagination = GetFieldsResponseAllOfAdditionalData & PaginationDetailsAllOf; + + diff --git a/models/get-notes-response-additional-data.ts b/models/get-notes-response-additional-data.ts new file mode 100644 index 00000000..b81e2add --- /dev/null +++ b/models/get-notes-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 { GetNotesResponseAdditionalDataPagination } from './get-notes-response-additional-data-pagination'; + +/** + * + * @export + * @interface GetNotesResponseAdditionalData + */ +export interface GetNotesResponseAdditionalData { + /** + * + * @type {GetNotesResponseAdditionalDataPagination} + * @memberof GetNotesResponseAdditionalData + */ + 'pagination'?: GetNotesResponseAdditionalDataPagination; +} + diff --git a/models/get-notes-response.ts b/models/get-notes-response.ts new file mode 100644 index 00000000..f729dd0a --- /dev/null +++ b/models/get-notes-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 { GetNotesResponseAdditionalData } from './get-notes-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { Note } from './note'; + +/** + * + * @export + * @interface GetNotesResponse + */ +export interface GetNotesResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetNotesResponse + */ + 'success'?: boolean; + /** + * The array of notes + * @type {Array} + * @memberof GetNotesResponse + */ + 'data'?: Array; + /** + * + * @type {GetNotesResponseAdditionalData} + * @memberof GetNotesResponse + */ + 'additional_data'?: GetNotesResponseAdditionalData; +} + diff --git a/models/get-organization-item-all-of.ts b/models/get-organization-item-all-of.ts new file mode 100644 index 00000000..3b458144 --- /dev/null +++ b/models/get-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 GetOrganizationItemAllOf + */ +export interface GetOrganizationItemAllOf { + /** + * Please refer to response schema of Activity + * @type {object} + * @memberof GetOrganizationItemAllOf + */ + 'last_activity'?: object | null; + /** + * Please refer to response schema of Activity + * @type {object} + * @memberof GetOrganizationItemAllOf + */ + 'next_activity'?: object | null; +} + diff --git a/models/get-organization-item.ts b/models/get-organization-item.ts new file mode 100644 index 00000000..bbe01cfe --- /dev/null +++ b/models/get-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 { GetOrganizationItemAllOf } from './get-organization-item-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { Owner } from './owner'; + +/** + * @type GetOrganizationItem + * @export + */ +export type GetOrganizationItem = BaseOrganizationItemWithEditNameFlag & GetOrganizationItemAllOf; + + diff --git a/models/get-organization-relationship-response-all-of.ts b/models/get-organization-relationship-response-all-of.ts new file mode 100644 index 00000000..7aa6bdac --- /dev/null +++ b/models/get-organization-relationship-response-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 { GetOrganizationRelationshipsResponseAllOfRelatedObjects } from './get-organization-relationships-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationRelationshipWithCalculatedFields } from './organization-relationship-with-calculated-fields'; + +/** + * + * @export + * @interface GetOrganizationRelationshipResponseAllOf + */ +export interface GetOrganizationRelationshipResponseAllOf { + /** + * + * @type {OrganizationRelationshipWithCalculatedFields} + * @memberof GetOrganizationRelationshipResponseAllOf + */ + 'data'?: OrganizationRelationshipWithCalculatedFields; + /** + * + * @type {GetOrganizationRelationshipsResponseAllOfRelatedObjects} + * @memberof GetOrganizationRelationshipResponseAllOf + */ + 'related_objects'?: GetOrganizationRelationshipsResponseAllOfRelatedObjects; +} + diff --git a/models/get-organization-relationship-response.ts b/models/get-organization-relationship-response.ts new file mode 100644 index 00000000..487594ec --- /dev/null +++ b/models/get-organization-relationship-response.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 { GetOrganizationRelationshipResponseAllOf } from './get-organization-relationship-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationRelationshipsResponseAllOfRelatedObjects } from './get-organization-relationships-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationRelationshipWithCalculatedFields } from './organization-relationship-with-calculated-fields'; + +/** + * @type GetOrganizationRelationshipResponse + * @export + */ +export type GetOrganizationRelationshipResponse = BaseResponse & GetOrganizationRelationshipResponseAllOf; + + diff --git a/models/get-organization-relationships-response-all-of-related-objects.ts b/models/get-organization-relationships-response-all-of-related-objects.ts new file mode 100644 index 00000000..673aea51 --- /dev/null +++ b/models/get-organization-relationships-response-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 { RelatedOrganizationData } from './related-organization-data'; + +/** + * + * @export + * @interface GetOrganizationRelationshipsResponseAllOfRelatedObjects + */ +export interface GetOrganizationRelationshipsResponseAllOfRelatedObjects { + /** + * + * @type {RelatedOrganizationData} + * @memberof GetOrganizationRelationshipsResponseAllOfRelatedObjects + */ + 'organization'?: RelatedOrganizationData; +} + diff --git a/models/get-organization-relationships-response-all-of.ts b/models/get-organization-relationships-response-all-of.ts new file mode 100644 index 00000000..adbac9a5 --- /dev/null +++ b/models/get-organization-relationships-response-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 { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationRelationshipsResponseAllOfRelatedObjects } from './get-organization-relationships-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationRelationshipDetails } from './organization-relationship-details'; + +/** + * + * @export + * @interface GetOrganizationRelationshipsResponseAllOf + */ +export interface GetOrganizationRelationshipsResponseAllOf { + /** + * The array of organization relationships + * @type {Array} + * @memberof GetOrganizationRelationshipsResponseAllOf + */ + 'data'?: Array; + /** + * + * @type {GetFieldsResponseAllOfAdditionalData} + * @memberof GetOrganizationRelationshipsResponseAllOf + */ + 'additional_data'?: GetFieldsResponseAllOfAdditionalData; + /** + * + * @type {GetOrganizationRelationshipsResponseAllOfRelatedObjects} + * @memberof GetOrganizationRelationshipsResponseAllOf + */ + 'related_objects'?: GetOrganizationRelationshipsResponseAllOfRelatedObjects; +} + diff --git a/models/get-organization-relationships-response.ts b/models/get-organization-relationships-response.ts new file mode 100644 index 00000000..cbd79d6d --- /dev/null +++ b/models/get-organization-relationships-response.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 { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationRelationshipsResponseAllOf } from './get-organization-relationships-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationRelationshipsResponseAllOfRelatedObjects } from './get-organization-relationships-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationRelationshipDetails } from './organization-relationship-details'; + +/** + * @type GetOrganizationRelationshipsResponse + * @export + */ +export type GetOrganizationRelationshipsResponse = BaseResponse & GetOrganizationRelationshipsResponseAllOf; + + diff --git a/models/get-organization-response-all-of-additional-data-followers-followeruserid.ts b/models/get-organization-response-all-of-additional-data-followers-followeruserid.ts new file mode 100644 index 00000000..928aaf1f --- /dev/null +++ b/models/get-organization-response-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 { GetOrganizationResponseAllOfAdditionalDataFollowersFOLLOWERUSERIDAllOf } from './get-organization-response-all-of-additional-data-followers-followeruseridall-of'; + +/** + * @type GetOrganizationResponseAllOfAdditionalDataFollowersFOLLOWERUSERID + * The user ID of the follower + * @export + */ +export type GetOrganizationResponseAllOfAdditionalDataFollowersFOLLOWERUSERID = GetOrganizationResponseAllOfAdditionalDataFollowersFOLLOWERUSERIDAllOf; + + diff --git a/models/get-organization-response-all-of-additional-data-followers-followeruseridall-of-all-of.ts b/models/get-organization-response-all-of-additional-data-followers-followeruseridall-of-all-of.ts new file mode 100644 index 00000000..8f4f7992 --- /dev/null +++ b/models/get-organization-response-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 GetOrganizationResponseAllOfAdditionalDataFollowersFOLLOWERUSERIDAllOfAllOf + */ +export interface GetOrganizationResponseAllOfAdditionalDataFollowersFOLLOWERUSERIDAllOfAllOf { + /** + * The ID of the follower associated with the item + * @type {number} + * @memberof GetOrganizationResponseAllOfAdditionalDataFollowersFOLLOWERUSERIDAllOfAllOf + */ + 'id'?: number; +} + diff --git a/models/get-organization-response-all-of-additional-data-followers-followeruseridall-of.ts b/models/get-organization-response-all-of-additional-data-followers-followeruseridall-of.ts new file mode 100644 index 00000000..7acabdf9 --- /dev/null +++ b/models/get-organization-response-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 { FollowerData } from './follower-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationResponseAllOfAdditionalDataFollowersFOLLOWERUSERIDAllOfAllOf } from './get-organization-response-all-of-additional-data-followers-followeruseridall-of-all-of'; + +/** + * @type GetOrganizationResponseAllOfAdditionalDataFollowersFOLLOWERUSERIDAllOf + * @export + */ +export type GetOrganizationResponseAllOfAdditionalDataFollowersFOLLOWERUSERIDAllOf = FollowerData & GetOrganizationResponseAllOfAdditionalDataFollowersFOLLOWERUSERIDAllOfAllOf; + + diff --git a/models/get-organization-response-all-of-additional-data-followers.ts b/models/get-organization-response-all-of-additional-data-followers.ts new file mode 100644 index 00000000..b0117124 --- /dev/null +++ b/models/get-organization-response-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 { GetOrganizationResponseAllOfAdditionalDataFollowersFOLLOWERUSERID } from './get-organization-response-all-of-additional-data-followers-followeruserid'; + +/** + * The follower that is associated with the item + * @export + * @interface GetOrganizationResponseAllOfAdditionalDataFollowers + */ +export interface GetOrganizationResponseAllOfAdditionalDataFollowers { + /** + * + * @type {GetOrganizationResponseAllOfAdditionalDataFollowersFOLLOWERUSERID} + * @memberof GetOrganizationResponseAllOfAdditionalDataFollowers + */ + 'FOLLOWER_USER_ID'?: GetOrganizationResponseAllOfAdditionalDataFollowersFOLLOWERUSERID; +} + diff --git a/models/get-organization-response-all-of-additional-data.ts b/models/get-organization-response-all-of-additional-data.ts new file mode 100644 index 00000000..3f43b25b --- /dev/null +++ b/models/get-organization-response-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 { GetOrganizationResponseAllOfAdditionalDataFollowers } from './get-organization-response-all-of-additional-data-followers'; + +/** + * + * @export + * @interface GetOrganizationResponseAllOfAdditionalData + */ +export interface GetOrganizationResponseAllOfAdditionalData { + /** + * + * @type {GetOrganizationResponseAllOfAdditionalDataFollowers} + * @memberof GetOrganizationResponseAllOfAdditionalData + */ + 'followers'?: GetOrganizationResponseAllOfAdditionalDataFollowers; + /** + * Dropbox email for the organization + * @type {string} + * @memberof GetOrganizationResponseAllOfAdditionalData + */ + 'dropbox_email'?: string; +} + diff --git a/models/get-organization-response-all-of.ts b/models/get-organization-response-all-of.ts new file mode 100644 index 00000000..468a16c8 --- /dev/null +++ b/models/get-organization-response-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 { GetOrganizationItem } from './get-organization-item'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationResponseAllOfAdditionalData } from './get-organization-response-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsResponseAllOfRelatedObjects } from './get-organizations-response-all-of-related-objects'; + +/** + * + * @export + * @interface GetOrganizationResponseAllOf + */ +export interface GetOrganizationResponseAllOf { + /** + * + * @type {GetOrganizationItem} + * @memberof GetOrganizationResponseAllOf + */ + 'data'?: GetOrganizationItem; + /** + * + * @type {GetOrganizationResponseAllOfAdditionalData} + * @memberof GetOrganizationResponseAllOf + */ + 'additional_data'?: GetOrganizationResponseAllOfAdditionalData; + /** + * + * @type {GetOrganizationsResponseAllOfRelatedObjects} + * @memberof GetOrganizationResponseAllOf + */ + 'related_objects'?: GetOrganizationsResponseAllOfRelatedObjects; +} + diff --git a/models/get-organization-response.ts b/models/get-organization-response.ts new file mode 100644 index 00000000..6b080966 --- /dev/null +++ b/models/get-organization-response.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 { GetOrganizationItem } from './get-organization-item'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationResponseAllOf } from './get-organization-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationResponseAllOfAdditionalData } from './get-organization-response-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsResponseAllOfRelatedObjects } from './get-organizations-response-all-of-related-objects'; + +/** + * @type GetOrganizationResponse + * @export + */ +export type GetOrganizationResponse = BaseResponse & GetOrganizationResponseAllOf; + + diff --git a/models/get-organization-search-response-all-of-data-items-inner-item.ts b/models/get-organization-search-response-all-of-data-items-inner-item.ts new file mode 100644 index 00000000..2b5eddf1 --- /dev/null +++ b/models/get-organization-search-response-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 { GetDealSearchResponseAllOfDataItemsInnerItemOwner } from './get-deal-search-response-all-of-data-items-inner-item-owner'; + +/** + * + * @export + * @interface GetOrganizationSearchResponseAllOfDataItemsInnerItem + */ +export interface GetOrganizationSearchResponseAllOfDataItemsInnerItem { + /** + * The ID of the organization + * @type {number} + * @memberof GetOrganizationSearchResponseAllOfDataItemsInnerItem + */ + 'id'?: number; + /** + * The type of the item + * @type {string} + * @memberof GetOrganizationSearchResponseAllOfDataItemsInnerItem + */ + 'type'?: string; + /** + * The name of the organization + * @type {string} + * @memberof GetOrganizationSearchResponseAllOfDataItemsInnerItem + */ + 'name'?: string; + /** + * The address of the organization + * @type {string} + * @memberof GetOrganizationSearchResponseAllOfDataItemsInnerItem + */ + 'address'?: string; + /** + * The visibility of the organization + * @type {number} + * @memberof GetOrganizationSearchResponseAllOfDataItemsInnerItem + */ + 'visible_to'?: number; + /** + * + * @type {GetDealSearchResponseAllOfDataItemsInnerItemOwner} + * @memberof GetOrganizationSearchResponseAllOfDataItemsInnerItem + */ + 'owner'?: GetDealSearchResponseAllOfDataItemsInnerItemOwner; + /** + * Custom fields + * @type {Array} + * @memberof GetOrganizationSearchResponseAllOfDataItemsInnerItem + */ + 'custom_fields'?: Array; + /** + * An array of notes + * @type {Array} + * @memberof GetOrganizationSearchResponseAllOfDataItemsInnerItem + */ + 'notes'?: Array; +} + diff --git a/models/get-organization-search-response-all-of-data-items-inner.ts b/models/get-organization-search-response-all-of-data-items-inner.ts new file mode 100644 index 00000000..834283b7 --- /dev/null +++ b/models/get-organization-search-response-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 { GetOrganizationSearchResponseAllOfDataItemsInnerItem } from './get-organization-search-response-all-of-data-items-inner-item'; + +/** + * + * @export + * @interface GetOrganizationSearchResponseAllOfDataItemsInner + */ +export interface GetOrganizationSearchResponseAllOfDataItemsInner { + /** + * Search result relevancy + * @type {number} + * @memberof GetOrganizationSearchResponseAllOfDataItemsInner + */ + 'result_score'?: number; + /** + * + * @type {GetOrganizationSearchResponseAllOfDataItemsInnerItem} + * @memberof GetOrganizationSearchResponseAllOfDataItemsInner + */ + 'item'?: GetOrganizationSearchResponseAllOfDataItemsInnerItem; +} + diff --git a/models/get-organization-search-response-all-of-data.ts b/models/get-organization-search-response-all-of-data.ts new file mode 100644 index 00000000..19ea9357 --- /dev/null +++ b/models/get-organization-search-response-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 { GetOrganizationSearchResponseAllOfDataItemsInner } from './get-organization-search-response-all-of-data-items-inner'; + +/** + * + * @export + * @interface GetOrganizationSearchResponseAllOfData + */ +export interface GetOrganizationSearchResponseAllOfData { + /** + * The array of found items + * @type {Array} + * @memberof GetOrganizationSearchResponseAllOfData + */ + 'items'?: Array; +} + diff --git a/models/get-organization-search-response-all-of.ts b/models/get-organization-search-response-all-of.ts new file mode 100644 index 00000000..94a807a6 --- /dev/null +++ b/models/get-organization-search-response-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 { GetActivitiesResponseAdditionalData } from './get-activities-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationSearchResponseAllOfData } from './get-organization-search-response-all-of-data'; + +/** + * + * @export + * @interface GetOrganizationSearchResponseAllOf + */ +export interface GetOrganizationSearchResponseAllOf { + /** + * + * @type {GetOrganizationSearchResponseAllOfData} + * @memberof GetOrganizationSearchResponseAllOf + */ + 'data'?: GetOrganizationSearchResponseAllOfData; + /** + * + * @type {GetActivitiesResponseAdditionalData} + * @memberof GetOrganizationSearchResponseAllOf + */ + 'additional_data'?: GetActivitiesResponseAdditionalData; +} + diff --git a/models/get-organization-search-response.ts b/models/get-organization-search-response.ts new file mode 100644 index 00000000..f660bba0 --- /dev/null +++ b/models/get-organization-search-response.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 { GetActivitiesResponseAdditionalData } from './get-activities-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationSearchResponseAllOf } from './get-organization-search-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationSearchResponseAllOfData } from './get-organization-search-response-all-of-data'; + +/** + * @type GetOrganizationSearchResponse + * @export + */ +export type GetOrganizationSearchResponse = BaseResponse & GetOrganizationSearchResponseAllOf; + + diff --git a/models/get-organizations-collection-response-object-all-of.ts b/models/get-organizations-collection-response-object-all-of.ts new file mode 100644 index 00000000..db045c2f --- /dev/null +++ b/models/get-organizations-collection-response-object-all-of.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 GetOrganizationsCollectionResponseObjectAllOf + */ +export interface GetOrganizationsCollectionResponseObjectAllOf { + /** + * The ID of the organization + * @type {number} + * @memberof GetOrganizationsCollectionResponseObjectAllOf + */ + 'id'?: number; + /** + * Whether the organization is active or not + * @type {boolean} + * @memberof GetOrganizationsCollectionResponseObjectAllOf + */ + 'active_flag'?: boolean; + /** + * The ID of the owner + * @type {number} + * @memberof GetOrganizationsCollectionResponseObjectAllOf + */ + 'owner_id'?: number; + /** + * The name of the organization + * @type {string} + * @memberof GetOrganizationsCollectionResponseObjectAllOf + */ + 'name'?: string; + /** + * The last updated date and time of the organization. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof GetOrganizationsCollectionResponseObjectAllOf + */ + 'update_time'?: string; + /** + * The date and time this organization was deleted. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof GetOrganizationsCollectionResponseObjectAllOf + */ + 'delete_time'?: string | null; + /** + * The date and time when the organization was added/created. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof GetOrganizationsCollectionResponseObjectAllOf + */ + 'add_time'?: string; + /** + * The visibility group ID of who can see the organization + * @type {string} + * @memberof GetOrganizationsCollectionResponseObjectAllOf + */ + 'visible_to'?: string; + /** + * The label assigned to the organization. When the `label` field is updated, the `label_ids` field value will be overwritten by the `label` field value. + * @type {number} + * @memberof GetOrganizationsCollectionResponseObjectAllOf + */ + 'label'?: number | null; + /** + * The IDs of labels assigned to the organization. When the `label_ids` field is updated, the `label` field value will be set to the first value of the `label_ids` field. + * @type {Array} + * @memberof GetOrganizationsCollectionResponseObjectAllOf + */ + 'label_ids'?: Array; + /** + * The BCC email associated with the organization + * @type {string} + * @memberof GetOrganizationsCollectionResponseObjectAllOf + */ + 'cc_email'?: string; +} + diff --git a/models/get-organizations-collection-response-object.ts b/models/get-organizations-collection-response-object.ts new file mode 100644 index 00000000..0ec81246 --- /dev/null +++ b/models/get-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 { GetOrganizationsCollectionResponseObjectAllOf } from './get-organizations-collection-response-object-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationCountAndAddressInfoAllOf1 } from './organization-count-and-address-info-all-of1'; + +/** + * @type GetOrganizationsCollectionResponseObject + * @export + */ +export type GetOrganizationsCollectionResponseObject = GetOrganizationsCollectionResponseObjectAllOf & OrganizationCountAndAddressInfoAllOf1; + + diff --git a/models/get-organizations-collection200-response.ts b/models/get-organizations-collection200-response.ts new file mode 100644 index 00000000..8aefba4a --- /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 { GetActivitiesCollectionResponseAdditionalData } from './get-activities-collection-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsCollectionResponseObject } from './get-organizations-collection-response-object'; + +/** + * + * @export + * @interface GetOrganizationsCollection200Response + */ +export interface GetOrganizationsCollection200Response { + /** + * + * @type {boolean} + * @memberof GetOrganizationsCollection200Response + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetOrganizationsCollection200Response + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesCollectionResponseAdditionalData} + * @memberof GetOrganizationsCollection200Response + */ + 'additional_data'?: GetActivitiesCollectionResponseAdditionalData; +} + diff --git a/models/get-organizations-response-all-of-related-objects.ts b/models/get-organizations-response-all-of-related-objects.ts new file mode 100644 index 00000000..9b1ea0c1 --- /dev/null +++ b/models/get-organizations-response-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 { GetActivitiesResponseRelatedObjectsUser } from './get-activities-response-related-objects-user'; +// May contain unused imports in some cases +// @ts-ignore +import { RelatedOrganizationData } from './related-organization-data'; +// May contain unused imports in some cases +// @ts-ignore +import { RelatedPictureData } from './related-picture-data'; + +/** + * + * @export + * @interface GetOrganizationsResponseAllOfRelatedObjects + */ +export interface GetOrganizationsResponseAllOfRelatedObjects { + /** + * + * @type {RelatedOrganizationData} + * @memberof GetOrganizationsResponseAllOfRelatedObjects + */ + 'organization'?: RelatedOrganizationData; + /** + * + * @type {GetActivitiesResponseRelatedObjectsUser} + * @memberof GetOrganizationsResponseAllOfRelatedObjects + */ + 'user'?: GetActivitiesResponseRelatedObjectsUser; + /** + * + * @type {RelatedPictureData} + * @memberof GetOrganizationsResponseAllOfRelatedObjects + */ + 'picture'?: RelatedPictureData; +} + diff --git a/models/get-organizations-response-all-of.ts b/models/get-organizations-response-all-of.ts new file mode 100644 index 00000000..fa1ada99 --- /dev/null +++ b/models/get-organizations-response-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 { GetActivitiesResponseAdditionalData } from './get-activities-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsResponseAllOfRelatedObjects } from './get-organizations-response-all-of-related-objects'; + +/** + * + * @export + * @interface GetOrganizationsResponseAllOf + */ +export interface GetOrganizationsResponseAllOf { + /** + * The array of organizations + * @type {Array} + * @memberof GetOrganizationsResponseAllOf + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesResponseAdditionalData} + * @memberof GetOrganizationsResponseAllOf + */ + 'additional_data'?: GetActivitiesResponseAdditionalData; + /** + * + * @type {GetOrganizationsResponseAllOfRelatedObjects} + * @memberof GetOrganizationsResponseAllOf + */ + 'related_objects'?: GetOrganizationsResponseAllOfRelatedObjects; +} + diff --git a/models/get-organizations-response.ts b/models/get-organizations-response.ts new file mode 100644 index 00000000..dc0120d6 --- /dev/null +++ b/models/get-organizations-response.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 { GetActivitiesResponseAdditionalData } from './get-activities-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsResponseAllOf } from './get-organizations-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsResponseAllOfRelatedObjects } from './get-organizations-response-all-of-related-objects'; + +/** + * @type GetOrganizationsResponse + * @export + */ +export type GetOrganizationsResponse = BaseResponse & GetOrganizationsResponseAllOf; + + diff --git a/models/get-participants-changelog-response.ts b/models/get-participants-changelog-response.ts new file mode 100644 index 00000000..32ec8b11 --- /dev/null +++ b/models/get-participants-changelog-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 { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { ParticipantChangelogItem } from './participant-changelog-item'; + +/** + * + * @export + * @interface GetParticipantsChangelogResponse + */ +export interface GetParticipantsChangelogResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetParticipantsChangelogResponse + */ + 'success'?: boolean; + /** + * The array of participant changelog + * @type {Array} + * @memberof GetParticipantsChangelogResponse + */ + 'data'?: Array; + /** + * + * @type {GetFieldsResponseAllOfAdditionalData} + * @memberof GetParticipantsChangelogResponse + */ + 'additional_data'?: GetFieldsResponseAllOfAdditionalData; +} + diff --git a/models/get-payments-response-all-of-data-inner.ts b/models/get-payments-response-all-of-data-inner.ts new file mode 100644 index 00000000..76af84bc --- /dev/null +++ b/models/get-payments-response-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 GetPaymentsResponseAllOfDataInner + */ +export interface GetPaymentsResponseAllOfDataInner { + /** + * The ID of the payment + * @type {number} + * @memberof GetPaymentsResponseAllOfDataInner + */ + 'id'?: number; + /** + * The ID of the subscription this payment is associated with + * @type {number} + * @memberof GetPaymentsResponseAllOfDataInner + */ + 'subscription_id'?: number; + /** + * The ID of the deal this payment is associated with + * @type {number} + * @memberof GetPaymentsResponseAllOfDataInner + */ + 'deal_id'?: number; + /** + * The payment status + * @type {boolean} + * @memberof GetPaymentsResponseAllOfDataInner + */ + 'is_active'?: boolean; + /** + * The payment amount + * @type {number} + * @memberof GetPaymentsResponseAllOfDataInner + */ + 'amount'?: number; + /** + * The currency of the payment + * @type {string} + * @memberof GetPaymentsResponseAllOfDataInner + */ + '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 GetPaymentsResponseAllOfDataInner + */ + 'change_amount'?: number; + /** + * The date when payment occurs + * @type {string} + * @memberof GetPaymentsResponseAllOfDataInner + */ + '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 GetPaymentsResponseAllOfDataInner + */ + 'revenue_movement_type'?: GetPaymentsResponseAllOfDataInnerRevenueMovementTypeConst; + /** + * 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 GetPaymentsResponseAllOfDataInner + */ + 'payment_type'?: GetPaymentsResponseAllOfDataInnerPaymentTypeConst; + /** + * The description of the payment + * @type {string} + * @memberof GetPaymentsResponseAllOfDataInner + */ + 'description'?: string; + /** + * The creation time of the payment + * @type {string} + * @memberof GetPaymentsResponseAllOfDataInner + */ + 'add_time'?: string; + /** + * The update time of the payment + * @type {string} + * @memberof GetPaymentsResponseAllOfDataInner + */ + 'update_time'?: string; +} + +export const GetPaymentsResponseAllOfDataInnerRevenueMovementTypeConst = { + new: 'new', + recurring: 'recurring', + expansion: 'expansion', + contraction: 'contraction', + none: 'none', + churn: 'churn' +} as const; + +export type GetPaymentsResponseAllOfDataInnerRevenueMovementTypeConst = typeof GetPaymentsResponseAllOfDataInnerRevenueMovementTypeConst[keyof typeof GetPaymentsResponseAllOfDataInnerRevenueMovementTypeConst]; +export const GetPaymentsResponseAllOfDataInnerPaymentTypeConst = { + recurring: 'recurring', + additional: 'additional', + installment: 'installment' +} as const; + +export type GetPaymentsResponseAllOfDataInnerPaymentTypeConst = typeof GetPaymentsResponseAllOfDataInnerPaymentTypeConst[keyof typeof GetPaymentsResponseAllOfDataInnerPaymentTypeConst]; + + diff --git a/models/get-payments-response-all-of.ts b/models/get-payments-response-all-of.ts new file mode 100644 index 00000000..924a5e26 --- /dev/null +++ b/models/get-payments-response-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 { GetPaymentsResponseAllOfDataInner } from './get-payments-response-all-of-data-inner'; + +/** + * + * @export + * @interface GetPaymentsResponseAllOf + */ +export interface GetPaymentsResponseAllOf { + /** + * + * @type {Array} + * @memberof GetPaymentsResponseAllOf + */ + 'data'?: Array; +} + diff --git a/models/get-payments-response.ts b/models/get-payments-response.ts new file mode 100644 index 00000000..279d0666 --- /dev/null +++ b/models/get-payments-response.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 { GetPaymentsResponseAllOf } from './get-payments-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPaymentsResponseAllOfDataInner } from './get-payments-response-all-of-data-inner'; + +/** + * @type GetPaymentsResponse + * @export + */ +export type GetPaymentsResponse = BaseResponse & GetPaymentsResponseAllOf; + + diff --git a/models/get-permission-set-response-all-of.ts b/models/get-permission-set-response-all-of.ts new file mode 100644 index 00000000..e38fd35a --- /dev/null +++ b/models/get-permission-set-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 GetPermissionSetResponseAllOf + */ +export interface GetPermissionSetResponseAllOf { + /** + * A permission assigned to this permission set + * @type {Array} + * @memberof GetPermissionSetResponseAllOf + */ + 'contents'?: Array; +} + diff --git a/models/get-permission-set-response.ts b/models/get-permission-set-response.ts new file mode 100644 index 00000000..41ec63d2 --- /dev/null +++ b/models/get-permission-set-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 { GetPermissionSetResponseAllOf } from './get-permission-set-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { PermissionSet } from './permission-set'; + +/** + * @type GetPermissionSetResponse + * @export + */ +export type GetPermissionSetResponse = GetPermissionSetResponseAllOf & PermissionSet; + + diff --git a/models/get-permission-sets-response-all-of.ts b/models/get-permission-sets-response-all-of.ts new file mode 100644 index 00000000..31a61b11 --- /dev/null +++ b/models/get-permission-sets-response-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 { PermissionSet } from './permission-set'; + +/** + * + * @export + * @interface GetPermissionSetsResponseAllOf + */ +export interface GetPermissionSetsResponseAllOf { + /** + * The array of permission set + * @type {Array} + * @memberof GetPermissionSetsResponseAllOf + */ + 'data'?: Array; +} + diff --git a/models/get-permission-sets-response.ts b/models/get-permission-sets-response.ts new file mode 100644 index 00000000..6517b984 --- /dev/null +++ b/models/get-permission-sets-response.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 { GetPermissionSetsResponseAllOf } from './get-permission-sets-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { PermissionSet } from './permission-set'; + +/** + * @type GetPermissionSetsResponse + * @export + */ +export type GetPermissionSetsResponse = BaseResponse & GetPermissionSetsResponseAllOf; + + diff --git a/models/get-permitted-users-response.ts b/models/get-permitted-users-response.ts new file mode 100644 index 00000000..0f4ee4db --- /dev/null +++ b/models/get-permitted-users-response.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 { BaseResponse1 } from './base-response1'; + +/** + * @type GetPermittedUsersResponse + * @export + */ +export type GetPermittedUsersResponse = BaseResponse1; + + diff --git a/models/get-permitted-users-response1-all-of.ts b/models/get-permitted-users-response1-all-of.ts new file mode 100644 index 00000000..9c0c1932 --- /dev/null +++ b/models/get-permitted-users-response1-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 GetPermittedUsersResponse1AllOf + */ +export interface GetPermittedUsersResponse1AllOf { + /** + * The list of permitted user IDs + * @type {Array} + * @memberof GetPermittedUsersResponse1AllOf + */ + 'data'?: Array; +} + diff --git a/models/get-permitted-users-response1.ts b/models/get-permitted-users-response1.ts new file mode 100644 index 00000000..7b55965b --- /dev/null +++ b/models/get-permitted-users-response1.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 { GetPermittedUsersResponse1AllOf } from './get-permitted-users-response1-all-of'; + +/** + * @type GetPermittedUsersResponse1 + * @export + */ +export type GetPermittedUsersResponse1 = BaseResponse & GetPermittedUsersResponse1AllOf; + + diff --git a/models/get-person-details-response-all-of-additional-data.ts b/models/get-person-details-response-all-of-additional-data.ts new file mode 100644 index 00000000..bab28f37 --- /dev/null +++ b/models/get-person-details-response-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 GetPersonDetailsResponseAllOfAdditionalData + */ +export interface GetPersonDetailsResponseAllOfAdditionalData { + /** + * Dropbox email for the person + * @type {string} + * @memberof GetPersonDetailsResponseAllOfAdditionalData + */ + 'dropbox_email'?: string; +} + diff --git a/models/get-person-details-response-all-of.ts b/models/get-person-details-response-all-of.ts new file mode 100644 index 00000000..dc935b1e --- /dev/null +++ b/models/get-person-details-response-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 { GetOrganizationsResponseAllOfRelatedObjects } from './get-organizations-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonDetailsResponseAllOfAdditionalData } from './get-person-details-response-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { Person } from './person'; + +/** + * + * @export + * @interface GetPersonDetailsResponseAllOf + */ +export interface GetPersonDetailsResponseAllOf { + /** + * + * @type {Person} + * @memberof GetPersonDetailsResponseAllOf + */ + 'data'?: Person; + /** + * + * @type {GetPersonDetailsResponseAllOfAdditionalData} + * @memberof GetPersonDetailsResponseAllOf + */ + 'additional_data'?: GetPersonDetailsResponseAllOfAdditionalData; + /** + * + * @type {GetOrganizationsResponseAllOfRelatedObjects} + * @memberof GetPersonDetailsResponseAllOf + */ + 'related_objects'?: GetOrganizationsResponseAllOfRelatedObjects; +} + diff --git a/models/get-person-details-response.ts b/models/get-person-details-response.ts new file mode 100644 index 00000000..0ccbba69 --- /dev/null +++ b/models/get-person-details-response.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 { GetOrganizationsResponseAllOfRelatedObjects } from './get-organizations-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonDetailsResponseAllOf } from './get-person-details-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonDetailsResponseAllOfAdditionalData } from './get-person-details-response-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { Person } from './person'; + +/** + * @type GetPersonDetailsResponse + * @export + */ +export type GetPersonDetailsResponse = BaseResponse & GetPersonDetailsResponseAllOf; + + diff --git a/models/get-person-products-response-all-of-data-inner-dealid.ts b/models/get-person-products-response-all-of-data-inner-dealid.ts new file mode 100644 index 00000000..c9f5a5cc --- /dev/null +++ b/models/get-person-products-response-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 { GetPersonProductsResponseAllOfDataInnerDEALIDDeal } from './get-person-products-response-all-of-data-inner-dealiddeal'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonProductsResponseAllOfDataInnerDEALIDProduct } from './get-person-products-response-all-of-data-inner-dealidproduct'; + +/** + * + * @export + * @interface GetPersonProductsResponseAllOfDataInnerDEALID + */ +export interface GetPersonProductsResponseAllOfDataInnerDEALID { + /** + * + * @type {GetPersonProductsResponseAllOfDataInnerDEALIDDeal} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALID + */ + 'deal'?: GetPersonProductsResponseAllOfDataInnerDEALIDDeal; + /** + * + * @type {GetPersonProductsResponseAllOfDataInnerDEALIDProduct} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALID + */ + 'product'?: GetPersonProductsResponseAllOfDataInnerDEALIDProduct; +} + diff --git a/models/get-person-products-response-all-of-data-inner-dealiddeal.ts b/models/get-person-products-response-all-of-data-inner-dealiddeal.ts new file mode 100644 index 00000000..701d57c0 --- /dev/null +++ b/models/get-person-products-response-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 GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ +export interface GetPersonProductsResponseAllOfDataInnerDEALIDDeal { + /** + * The ID of the deal + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'id'?: number; + /** + * The ID of the company + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'company_id'?: number; + /** + * The ID of the deal creator + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'creator_user_id'?: number; + /** + * The ID of the user + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'user_id'?: number; + /** + * The ID of the person associated with the deal + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'person_id'?: number; + /** + * The ID of the organization associated with the deal + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'org_id'?: number; + /** + * The ID of the deal stage + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'stage_id'?: number; + /** + * The title of the deal + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'title'?: string; + /** + * The value of the deal + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'value'?: number; + /** + * The currency associated with the deal + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'currency'?: string; + /** + * The creation date and time of the deal + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'add_time'?: string; + /** + * The first creation date and time of the deal + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'first_add_time'?: string; + /** + * The last updated date and time of the deal + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'update_time'?: string; + /** + * The last updated date and time of the deal stage + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'stage_change_time'?: string; + /** + * Whether the deal is active or not + * @type {boolean} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'active'?: boolean; + /** + * Whether the deal is deleted or not + * @type {boolean} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'deleted'?: boolean; + /** + * The status of the deal + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'status'?: string; + /** + * The success probability percentage of the deal + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'probability'?: number | null; + /** + * The date of the next activity associated with the deal + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'next_activity_date'?: string; + /** + * The time of the next activity associated with the deal + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'next_activity_time'?: string; + /** + * The ID of the next activity associated with the deal + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'next_activity_id'?: number | null; + /** + * The ID of the last activity associated with the deal + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'last_activity_id'?: number | null; + /** + * The date of the last activity associated with the deal + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'last_activity_date'?: string | null; + /** + * The reason for losing the deal + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'lost_reason'?: string | null; + /** + * The visibility of the deal + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'visible_to'?: string; + /** + * The date and time of closing the deal + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'close_time'?: string | null; + /** + * The ID of the pipeline associated with the deal + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'pipeline_id'?: number; + /** + * The date and time of changing the deal status as won + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'won_time'?: string; + /** + * The date and time of the first time changing the deal status as won + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'first_won_time'?: string; + /** + * The date and time of changing the deal status as lost + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'lost_time'?: string; + /** + * The number of products associated with the deal + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'products_count'?: number; + /** + * The number of files associated with the deal + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'files_count'?: number; + /** + * The number of notes associated with the deal + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'notes_count'?: number; + /** + * The number of followers associated with the deal + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'followers_count'?: number; + /** + * The number of emails associated with the deal + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'email_messages_count'?: number; + /** + * The number of activities associated with the deal + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'activities_count'?: number; + /** + * The number of completed activities associated with the deal + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'done_activities_count'?: number; + /** + * The number of incomplete activities associated with the deal + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'undone_activities_count'?: number; + /** + * The number of participants associated with the deal + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'participants_count'?: number; + /** + * The expected close date of the deal + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'expected_close_date'?: string; + /** + * The date and time of the last incoming email associated with the deal + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'last_incoming_mail_time'?: string; + /** + * The date and time of the last outgoing email associated with the deal + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'last_outgoing_mail_time'?: string; + /** + * The label or multiple labels assigned to the deal + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDDeal + */ + 'label'?: string; +} + diff --git a/models/get-person-products-response-all-of-data-inner-dealidproduct.ts b/models/get-person-products-response-all-of-data-inner-dealidproduct.ts new file mode 100644 index 00000000..800cc6b1 --- /dev/null +++ b/models/get-person-products-response-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 GetPersonProductsResponseAllOfDataInnerDEALIDProduct + */ +export interface GetPersonProductsResponseAllOfDataInnerDEALIDProduct { + /** + * The ID of the product + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDProduct + */ + 'id'?: number; + /** + * The ID of the company + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDProduct + */ + 'company_id'?: number; + /** + * The name of the product + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDProduct + */ + 'name'?: string; + /** + * The product code + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDProduct + */ + 'code'?: string; + /** + * The description of the product + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDProduct + */ + 'description'?: string; + /** + * The unit in which this product is sold + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDProduct + */ + 'unit'?: string; + /** + * The tax percentage + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDProduct + */ + 'tax'?: number; + /** + * The category of the product + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDProduct + */ + 'category'?: string; + /** + * Whether this product will be made active or not + * @type {boolean} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDProduct + */ + 'active_flag'?: boolean; + /** + * Whether this product can be selected in deals or not + * @type {boolean} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDProduct + */ + 'selectable'?: boolean; + /** + * The first letter of the product name + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDProduct + */ + 'first_char'?: string; + /** + * + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDProduct + */ + 'visible_to'?: GetPersonProductsResponseAllOfDataInnerDEALIDProductVisibleToConst; + /** + * 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 GetPersonProductsResponseAllOfDataInnerDEALIDProduct + */ + 'owner_id'?: number; + /** + * The count of files + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDProduct + */ + 'files_count'?: number; + /** + * The date and time when the product was added to the deal + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDProduct + */ + 'add_time'?: string; + /** + * The date and time when the product was updated to the deal + * @type {string} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDProduct + */ + 'update_time'?: string; + /** + * The ID of the deal + * @type {number} + * @memberof GetPersonProductsResponseAllOfDataInnerDEALIDProduct + */ + 'deal_id'?: number; +} + +export const GetPersonProductsResponseAllOfDataInnerDEALIDProductVisibleToConst = { + _1: '1', + _3: '3', + _5: '5', + _7: '7' +} as const; + +export type GetPersonProductsResponseAllOfDataInnerDEALIDProductVisibleToConst = typeof GetPersonProductsResponseAllOfDataInnerDEALIDProductVisibleToConst[keyof typeof GetPersonProductsResponseAllOfDataInnerDEALIDProductVisibleToConst]; + + diff --git a/models/get-person-products-response-all-of-data-inner.ts b/models/get-person-products-response-all-of-data-inner.ts new file mode 100644 index 00000000..a2af8d0f --- /dev/null +++ b/models/get-person-products-response-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 { GetPersonProductsResponseAllOfDataInnerDEALID } from './get-person-products-response-all-of-data-inner-dealid'; + +/** + * + * @export + * @interface GetPersonProductsResponseAllOfDataInner + */ +export interface GetPersonProductsResponseAllOfDataInner { + /** + * + * @type {GetPersonProductsResponseAllOfDataInnerDEALID} + * @memberof GetPersonProductsResponseAllOfDataInner + */ + 'DEAL_ID'?: GetPersonProductsResponseAllOfDataInnerDEALID; +} + diff --git a/models/get-person-products-response-all-of.ts b/models/get-person-products-response-all-of.ts new file mode 100644 index 00000000..c1ef8515 --- /dev/null +++ b/models/get-person-products-response-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 { GetActivitiesResponseAdditionalData } from './get-activities-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonProductsResponseAllOfDataInner } from './get-person-products-response-all-of-data-inner'; + +/** + * + * @export + * @interface GetPersonProductsResponseAllOf + */ +export interface GetPersonProductsResponseAllOf { + /** + * The array of deal products + * @type {Array} + * @memberof GetPersonProductsResponseAllOf + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesResponseAdditionalData} + * @memberof GetPersonProductsResponseAllOf + */ + 'additional_data'?: GetActivitiesResponseAdditionalData; +} + diff --git a/models/get-person-products-response.ts b/models/get-person-products-response.ts new file mode 100644 index 00000000..27f0b20d --- /dev/null +++ b/models/get-person-products-response.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 { GetActivitiesResponseAdditionalData } from './get-activities-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonProductsResponseAllOf } from './get-person-products-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonProductsResponseAllOfDataInner } from './get-person-products-response-all-of-data-inner'; + +/** + * @type GetPersonProductsResponse + * @export + */ +export type GetPersonProductsResponse = BaseResponse & GetPersonProductsResponseAllOf; + + diff --git a/models/get-person-search-response-all-of-data-items-inner-item-organization.ts b/models/get-person-search-response-all-of-data-items-inner-item-organization.ts new file mode 100644 index 00000000..aa1356ab --- /dev/null +++ b/models/get-person-search-response-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 GetPersonSearchResponseAllOfDataItemsInnerItemOrganization + */ +export interface GetPersonSearchResponseAllOfDataItemsInnerItemOrganization { + /** + * The ID of the organization the person is associated with + * @type {number} + * @memberof GetPersonSearchResponseAllOfDataItemsInnerItemOrganization + */ + 'id'?: number; + /** + * The name of the organization the person is associated with + * @type {string} + * @memberof GetPersonSearchResponseAllOfDataItemsInnerItemOrganization + */ + 'name'?: string; +} + diff --git a/models/get-person-search-response-all-of-data-items-inner-item-owner.ts b/models/get-person-search-response-all-of-data-items-inner-item-owner.ts new file mode 100644 index 00000000..1453f8dd --- /dev/null +++ b/models/get-person-search-response-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 GetPersonSearchResponseAllOfDataItemsInnerItemOwner + */ +export interface GetPersonSearchResponseAllOfDataItemsInnerItemOwner { + /** + * The ID of the owner of the person + * @type {number} + * @memberof GetPersonSearchResponseAllOfDataItemsInnerItemOwner + */ + 'id'?: number; +} + diff --git a/models/get-person-search-response-all-of-data-items-inner-item.ts b/models/get-person-search-response-all-of-data-items-inner-item.ts new file mode 100644 index 00000000..04e1702c --- /dev/null +++ b/models/get-person-search-response-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 { GetPersonSearchResponseAllOfDataItemsInnerItemOrganization } from './get-person-search-response-all-of-data-items-inner-item-organization'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonSearchResponseAllOfDataItemsInnerItemOwner } from './get-person-search-response-all-of-data-items-inner-item-owner'; + +/** + * + * @export + * @interface GetPersonSearchResponseAllOfDataItemsInnerItem + */ +export interface GetPersonSearchResponseAllOfDataItemsInnerItem { + /** + * The ID of the person + * @type {number} + * @memberof GetPersonSearchResponseAllOfDataItemsInnerItem + */ + 'id'?: number; + /** + * The type of the item + * @type {string} + * @memberof GetPersonSearchResponseAllOfDataItemsInnerItem + */ + 'type'?: string; + /** + * The name of the person + * @type {string} + * @memberof GetPersonSearchResponseAllOfDataItemsInnerItem + */ + 'name'?: string; + /** + * An array of phone numbers + * @type {Array} + * @memberof GetPersonSearchResponseAllOfDataItemsInnerItem + */ + 'phones'?: Array; + /** + * An array of email addresses + * @type {Array} + * @memberof GetPersonSearchResponseAllOfDataItemsInnerItem + */ + 'emails'?: Array; + /** + * The visibility of the person + * @type {number} + * @memberof GetPersonSearchResponseAllOfDataItemsInnerItem + */ + 'visible_to'?: number; + /** + * + * @type {GetPersonSearchResponseAllOfDataItemsInnerItemOwner} + * @memberof GetPersonSearchResponseAllOfDataItemsInnerItem + */ + 'owner'?: GetPersonSearchResponseAllOfDataItemsInnerItemOwner; + /** + * + * @type {GetPersonSearchResponseAllOfDataItemsInnerItemOrganization} + * @memberof GetPersonSearchResponseAllOfDataItemsInnerItem + */ + 'organization'?: GetPersonSearchResponseAllOfDataItemsInnerItemOrganization; + /** + * Custom fields + * @type {Array} + * @memberof GetPersonSearchResponseAllOfDataItemsInnerItem + */ + 'custom_fields'?: Array; + /** + * An array of notes + * @type {Array} + * @memberof GetPersonSearchResponseAllOfDataItemsInnerItem + */ + 'notes'?: Array; +} + diff --git a/models/get-person-search-response-all-of-data-items-inner.ts b/models/get-person-search-response-all-of-data-items-inner.ts new file mode 100644 index 00000000..b0cc8f38 --- /dev/null +++ b/models/get-person-search-response-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 { GetPersonSearchResponseAllOfDataItemsInnerItem } from './get-person-search-response-all-of-data-items-inner-item'; + +/** + * + * @export + * @interface GetPersonSearchResponseAllOfDataItemsInner + */ +export interface GetPersonSearchResponseAllOfDataItemsInner { + /** + * Search result relevancy + * @type {number} + * @memberof GetPersonSearchResponseAllOfDataItemsInner + */ + 'result_score'?: number; + /** + * + * @type {GetPersonSearchResponseAllOfDataItemsInnerItem} + * @memberof GetPersonSearchResponseAllOfDataItemsInner + */ + 'item'?: GetPersonSearchResponseAllOfDataItemsInnerItem; +} + diff --git a/models/get-person-search-response-all-of-data.ts b/models/get-person-search-response-all-of-data.ts new file mode 100644 index 00000000..8fa4dafb --- /dev/null +++ b/models/get-person-search-response-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 { GetPersonSearchResponseAllOfDataItemsInner } from './get-person-search-response-all-of-data-items-inner'; + +/** + * + * @export + * @interface GetPersonSearchResponseAllOfData + */ +export interface GetPersonSearchResponseAllOfData { + /** + * The array of found items + * @type {Array} + * @memberof GetPersonSearchResponseAllOfData + */ + 'items'?: Array; +} + diff --git a/models/get-person-search-response-all-of.ts b/models/get-person-search-response-all-of.ts new file mode 100644 index 00000000..a1619fec --- /dev/null +++ b/models/get-person-search-response-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 { GetActivitiesResponseAdditionalData } from './get-activities-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonSearchResponseAllOfData } from './get-person-search-response-all-of-data'; + +/** + * + * @export + * @interface GetPersonSearchResponseAllOf + */ +export interface GetPersonSearchResponseAllOf { + /** + * + * @type {GetPersonSearchResponseAllOfData} + * @memberof GetPersonSearchResponseAllOf + */ + 'data'?: GetPersonSearchResponseAllOfData; + /** + * + * @type {GetActivitiesResponseAdditionalData} + * @memberof GetPersonSearchResponseAllOf + */ + 'additional_data'?: GetActivitiesResponseAdditionalData; +} + diff --git a/models/get-person-search-response.ts b/models/get-person-search-response.ts new file mode 100644 index 00000000..0875aa50 --- /dev/null +++ b/models/get-person-search-response.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 { GetActivitiesResponseAdditionalData } from './get-activities-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonSearchResponseAllOf } from './get-person-search-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonSearchResponseAllOfData } from './get-person-search-response-all-of-data'; + +/** + * @type GetPersonSearchResponse + * @export + */ +export type GetPersonSearchResponse = BaseResponse & GetPersonSearchResponseAllOf; + + diff --git a/models/get-persons-collection200-response.ts b/models/get-persons-collection200-response.ts new file mode 100644 index 00000000..4c06c320 --- /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 { GetActivitiesCollectionResponseAdditionalData } from './get-activities-collection-response-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 {GetActivitiesCollectionResponseAdditionalData} + * @memberof GetPersonsCollection200Response + */ + 'additional_data'?: GetActivitiesCollectionResponseAdditionalData; +} + diff --git a/models/get-persons-response-all-of-related-objects.ts b/models/get-persons-response-all-of-related-objects.ts new file mode 100644 index 00000000..8ffee8ae --- /dev/null +++ b/models/get-persons-response-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 { GetActivitiesResponseRelatedObjectsUser } from './get-activities-response-related-objects-user'; +// May contain unused imports in some cases +// @ts-ignore +import { RelatedOrganizationDataWithActiveFlag } from './related-organization-data-with-active-flag'; + +/** + * + * @export + * @interface GetPersonsResponseAllOfRelatedObjects + */ +export interface GetPersonsResponseAllOfRelatedObjects { + /** + * + * @type {RelatedOrganizationDataWithActiveFlag} + * @memberof GetPersonsResponseAllOfRelatedObjects + */ + 'organization'?: RelatedOrganizationDataWithActiveFlag; + /** + * + * @type {GetActivitiesResponseRelatedObjectsUser} + * @memberof GetPersonsResponseAllOfRelatedObjects + */ + 'user'?: GetActivitiesResponseRelatedObjectsUser; +} + diff --git a/models/get-persons-response-all-of.ts b/models/get-persons-response-all-of.ts new file mode 100644 index 00000000..fb5464cd --- /dev/null +++ b/models/get-persons-response-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 { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonsResponseAllOfRelatedObjects } from './get-persons-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { Person } from './person'; + +/** + * + * @export + * @interface GetPersonsResponseAllOf + */ +export interface GetPersonsResponseAllOf { + /** + * The array of persons + * @type {Array} + * @memberof GetPersonsResponseAllOf + */ + 'data'?: Array; + /** + * + * @type {GetFieldsResponseAllOfAdditionalData} + * @memberof GetPersonsResponseAllOf + */ + 'additional_data'?: GetFieldsResponseAllOfAdditionalData; + /** + * + * @type {GetPersonsResponseAllOfRelatedObjects} + * @memberof GetPersonsResponseAllOf + */ + 'related_objects'?: GetPersonsResponseAllOfRelatedObjects; +} + diff --git a/models/get-persons-response.ts b/models/get-persons-response.ts new file mode 100644 index 00000000..d1784eb5 --- /dev/null +++ b/models/get-persons-response.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 { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonsResponseAllOf } from './get-persons-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonsResponseAllOfRelatedObjects } from './get-persons-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { Person } from './person'; + +/** + * @type GetPersonsResponse + * @export + */ +export type GetPersonsResponse = BaseResponse & GetPersonsResponseAllOf; + + diff --git a/models/get-persons-response1-all-of.ts b/models/get-persons-response1-all-of.ts new file mode 100644 index 00000000..1b1e2d5b --- /dev/null +++ b/models/get-persons-response1-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 { GetActivitiesResponseAdditionalData } from './get-activities-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsResponseAllOfRelatedObjects } from './get-organizations-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { Person } from './person'; + +/** + * + * @export + * @interface GetPersonsResponse1AllOf + */ +export interface GetPersonsResponse1AllOf { + /** + * The array of persons + * @type {Array} + * @memberof GetPersonsResponse1AllOf + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesResponseAdditionalData} + * @memberof GetPersonsResponse1AllOf + */ + 'additional_data'?: GetActivitiesResponseAdditionalData; + /** + * + * @type {GetOrganizationsResponseAllOfRelatedObjects} + * @memberof GetPersonsResponse1AllOf + */ + 'related_objects'?: GetOrganizationsResponseAllOfRelatedObjects; +} + diff --git a/models/get-persons-response1.ts b/models/get-persons-response1.ts new file mode 100644 index 00000000..5092c7b7 --- /dev/null +++ b/models/get-persons-response1.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 { GetActivitiesResponseAdditionalData } from './get-activities-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetOrganizationsResponseAllOfRelatedObjects } from './get-organizations-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPersonsResponse1AllOf } from './get-persons-response1-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { Person } from './person'; + +/** + * @type GetPersonsResponse1 + * @export + */ +export type GetPersonsResponse1 = BaseResponse & GetPersonsResponse1AllOf; + + diff --git a/models/get-pipeline-deals-conversion-rates-in-response-all-of-data-stage-conversions-inner.ts b/models/get-pipeline-deals-conversion-rates-in-response-all-of-data-stage-conversions-inner.ts new file mode 100644 index 00000000..9a74e097 --- /dev/null +++ b/models/get-pipeline-deals-conversion-rates-in-response-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 GetPipelineDealsConversionRatesInResponseAllOfDataStageConversionsInner + */ +export interface GetPipelineDealsConversionRatesInResponseAllOfDataStageConversionsInner { + /** + * The stage ID from where conversion starts + * @type {number} + * @memberof GetPipelineDealsConversionRatesInResponseAllOfDataStageConversionsInner + */ + 'from_stage_id'?: number; + /** + * The stage ID to where conversion ends + * @type {number} + * @memberof GetPipelineDealsConversionRatesInResponseAllOfDataStageConversionsInner + */ + 'to_stage_id'?: number; + /** + * The conversion rate + * @type {number} + * @memberof GetPipelineDealsConversionRatesInResponseAllOfDataStageConversionsInner + */ + 'conversion_rate'?: number; +} + diff --git a/models/get-pipeline-deals-conversion-rates-in-response-all-of-data.ts b/models/get-pipeline-deals-conversion-rates-in-response-all-of-data.ts new file mode 100644 index 00000000..0efe204a --- /dev/null +++ b/models/get-pipeline-deals-conversion-rates-in-response-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 { GetPipelineDealsConversionRatesInResponseAllOfDataStageConversionsInner } from './get-pipeline-deals-conversion-rates-in-response-all-of-data-stage-conversions-inner'; + +/** + * The pipeline object + * @export + * @interface GetPipelineDealsConversionRatesInResponseAllOfData + */ +export interface GetPipelineDealsConversionRatesInResponseAllOfData { + /** + * The stage conversions + * @type {Array} + * @memberof GetPipelineDealsConversionRatesInResponseAllOfData + */ + 'stage_conversions'?: Array; + /** + * The won conversion + * @type {number} + * @memberof GetPipelineDealsConversionRatesInResponseAllOfData + */ + 'won_conversion'?: number; + /** + * The lost conversion + * @type {number} + * @memberof GetPipelineDealsConversionRatesInResponseAllOfData + */ + 'lost_conversion'?: number; +} + diff --git a/models/get-pipeline-deals-conversion-rates-in-response-all-of.ts b/models/get-pipeline-deals-conversion-rates-in-response-all-of.ts new file mode 100644 index 00000000..40d1bf42 --- /dev/null +++ b/models/get-pipeline-deals-conversion-rates-in-response-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 { GetPipelineDealsConversionRatesInResponseAllOfData } from './get-pipeline-deals-conversion-rates-in-response-all-of-data'; + +/** + * + * @export + * @interface GetPipelineDealsConversionRatesInResponseAllOf + */ +export interface GetPipelineDealsConversionRatesInResponseAllOf { + /** + * + * @type {GetPipelineDealsConversionRatesInResponseAllOfData} + * @memberof GetPipelineDealsConversionRatesInResponseAllOf + */ + 'data'?: GetPipelineDealsConversionRatesInResponseAllOfData; +} + diff --git a/models/get-pipeline-deals-conversion-rates-in-response.ts b/models/get-pipeline-deals-conversion-rates-in-response.ts new file mode 100644 index 00000000..8dceccfb --- /dev/null +++ b/models/get-pipeline-deals-conversion-rates-in-response.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 { GetPipelineDealsConversionRatesInResponseAllOf } from './get-pipeline-deals-conversion-rates-in-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPipelineDealsConversionRatesInResponseAllOfData } from './get-pipeline-deals-conversion-rates-in-response-all-of-data'; + +/** + * @type GetPipelineDealsConversionRatesInResponse + * @export + */ +export type GetPipelineDealsConversionRatesInResponse = BaseResponse & GetPipelineDealsConversionRatesInResponseAllOf; + + diff --git a/models/get-pipeline-deals-movements-statistics-response-all-of-data-average-age-in-days-by-stages-inner.ts b/models/get-pipeline-deals-movements-statistics-response-all-of-data-average-age-in-days-by-stages-inner.ts new file mode 100644 index 00000000..144fa0a1 --- /dev/null +++ b/models/get-pipeline-deals-movements-statistics-response-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 GetPipelineDealsMovementsStatisticsResponseAllOfDataAverageAgeInDaysByStagesInner + */ +export interface GetPipelineDealsMovementsStatisticsResponseAllOfDataAverageAgeInDaysByStagesInner { + /** + * The stage ID + * @type {number} + * @memberof GetPipelineDealsMovementsStatisticsResponseAllOfDataAverageAgeInDaysByStagesInner + */ + 'stage_id'?: number; + /** + * The average deals age in specific stage + * @type {number} + * @memberof GetPipelineDealsMovementsStatisticsResponseAllOfDataAverageAgeInDaysByStagesInner + */ + 'value'?: number; +} + diff --git a/models/get-pipeline-deals-movements-statistics-response-all-of-data-average-age-in-days.ts b/models/get-pipeline-deals-movements-statistics-response-all-of-data-average-age-in-days.ts new file mode 100644 index 00000000..ae76d0c8 --- /dev/null +++ b/models/get-pipeline-deals-movements-statistics-response-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 { GetPipelineDealsMovementsStatisticsResponseAllOfDataAverageAgeInDaysByStagesInner } from './get-pipeline-deals-movements-statistics-response-all-of-data-average-age-in-days-by-stages-inner'; + +/** + * The moved deals average age in days + * @export + * @interface GetPipelineDealsMovementsStatisticsResponseAllOfDataAverageAgeInDays + */ +export interface GetPipelineDealsMovementsStatisticsResponseAllOfDataAverageAgeInDays { + /** + * The moved deals average age across all stages + * @type {number} + * @memberof GetPipelineDealsMovementsStatisticsResponseAllOfDataAverageAgeInDays + */ + 'across_all_stages'?: number; + /** + * The moved deals average age by stages + * @type {Array} + * @memberof GetPipelineDealsMovementsStatisticsResponseAllOfDataAverageAgeInDays + */ + 'by_stages'?: Array; +} + diff --git a/models/get-pipeline-deals-movements-statistics-response-all-of-data-movements-between-stages.ts b/models/get-pipeline-deals-movements-statistics-response-all-of-data-movements-between-stages.ts new file mode 100644 index 00000000..338ddc59 --- /dev/null +++ b/models/get-pipeline-deals-movements-statistics-response-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 GetPipelineDealsMovementsStatisticsResponseAllOfDataMovementsBetweenStages + */ +export interface GetPipelineDealsMovementsStatisticsResponseAllOfDataMovementsBetweenStages { + /** + * The count of the deals that have been moved between stages + * @type {number} + * @memberof GetPipelineDealsMovementsStatisticsResponseAllOfDataMovementsBetweenStages + */ + 'count'?: number; +} + diff --git a/models/get-pipeline-deals-movements-statistics-response-all-of-data-new-deals-formatted-values.ts b/models/get-pipeline-deals-movements-statistics-response-all-of-data-new-deals-formatted-values.ts new file mode 100644 index 00000000..11ab8577 --- /dev/null +++ b/models/get-pipeline-deals-movements-statistics-response-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 GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDealsFormattedValues + */ +export interface GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDealsFormattedValues { + /** + * The formatted values of the deals + * @type {string} + * @memberof GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDealsFormattedValues + */ + 'CURRENCY_ID'?: string; +} + diff --git a/models/get-pipeline-deals-movements-statistics-response-all-of-data-new-deals-values.ts b/models/get-pipeline-deals-movements-statistics-response-all-of-data-new-deals-values.ts new file mode 100644 index 00000000..38e8952b --- /dev/null +++ b/models/get-pipeline-deals-movements-statistics-response-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 GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDealsValues + */ +export interface GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDealsValues { + /** + * The value of the deals + * @type {number} + * @memberof GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDealsValues + */ + 'CURRENCY_ID'?: number; +} + diff --git a/models/get-pipeline-deals-movements-statistics-response-all-of-data-new-deals.ts b/models/get-pipeline-deals-movements-statistics-response-all-of-data-new-deals.ts new file mode 100644 index 00000000..deae3248 --- /dev/null +++ b/models/get-pipeline-deals-movements-statistics-response-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 { GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDealsFormattedValues } from './get-pipeline-deals-movements-statistics-response-all-of-data-new-deals-formatted-values'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDealsValues } from './get-pipeline-deals-movements-statistics-response-all-of-data-new-deals-values'; + +/** + * Deals summary + * @export + * @interface GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDeals + */ +export interface GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDeals { + /** + * The count of the deals + * @type {number} + * @memberof GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDeals + */ + 'count'?: number; + /** + * The IDs of the deals that have been moved + * @type {Array} + * @memberof GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDeals + */ + 'deals_ids'?: Array; + /** + * + * @type {GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDealsValues} + * @memberof GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDeals + */ + 'values'?: GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDealsValues; + /** + * + * @type {GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDealsFormattedValues} + * @memberof GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDeals + */ + 'formatted_values'?: GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDealsFormattedValues; +} + diff --git a/models/get-pipeline-deals-movements-statistics-response-all-of-data.ts b/models/get-pipeline-deals-movements-statistics-response-all-of-data.ts new file mode 100644 index 00000000..66d368e9 --- /dev/null +++ b/models/get-pipeline-deals-movements-statistics-response-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 { GetPipelineDealsMovementsStatisticsResponseAllOfDataAverageAgeInDays } from './get-pipeline-deals-movements-statistics-response-all-of-data-average-age-in-days'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPipelineDealsMovementsStatisticsResponseAllOfDataMovementsBetweenStages } from './get-pipeline-deals-movements-statistics-response-all-of-data-movements-between-stages'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDeals } from './get-pipeline-deals-movements-statistics-response-all-of-data-new-deals'; + +/** + * The pipeline object + * @export + * @interface GetPipelineDealsMovementsStatisticsResponseAllOfData + */ +export interface GetPipelineDealsMovementsStatisticsResponseAllOfData { + /** + * + * @type {GetPipelineDealsMovementsStatisticsResponseAllOfDataMovementsBetweenStages} + * @memberof GetPipelineDealsMovementsStatisticsResponseAllOfData + */ + 'movements_between_stages'?: GetPipelineDealsMovementsStatisticsResponseAllOfDataMovementsBetweenStages; + /** + * + * @type {GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDeals} + * @memberof GetPipelineDealsMovementsStatisticsResponseAllOfData + */ + 'new_deals'?: GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDeals; + /** + * + * @type {GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDeals} + * @memberof GetPipelineDealsMovementsStatisticsResponseAllOfData + */ + 'deals_left_open'?: GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDeals; + /** + * + * @type {GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDeals} + * @memberof GetPipelineDealsMovementsStatisticsResponseAllOfData + */ + 'won_deals'?: GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDeals; + /** + * + * @type {GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDeals} + * @memberof GetPipelineDealsMovementsStatisticsResponseAllOfData + */ + 'lost_deals'?: GetPipelineDealsMovementsStatisticsResponseAllOfDataNewDeals; + /** + * + * @type {GetPipelineDealsMovementsStatisticsResponseAllOfDataAverageAgeInDays} + * @memberof GetPipelineDealsMovementsStatisticsResponseAllOfData + */ + 'average_age_in_days'?: GetPipelineDealsMovementsStatisticsResponseAllOfDataAverageAgeInDays; +} + diff --git a/models/get-pipeline-deals-movements-statistics-response-all-of.ts b/models/get-pipeline-deals-movements-statistics-response-all-of.ts new file mode 100644 index 00000000..57029c3d --- /dev/null +++ b/models/get-pipeline-deals-movements-statistics-response-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 { GetPipelineDealsMovementsStatisticsResponseAllOfData } from './get-pipeline-deals-movements-statistics-response-all-of-data'; + +/** + * + * @export + * @interface GetPipelineDealsMovementsStatisticsResponseAllOf + */ +export interface GetPipelineDealsMovementsStatisticsResponseAllOf { + /** + * + * @type {GetPipelineDealsMovementsStatisticsResponseAllOfData} + * @memberof GetPipelineDealsMovementsStatisticsResponseAllOf + */ + 'data'?: GetPipelineDealsMovementsStatisticsResponseAllOfData; +} + diff --git a/models/get-pipeline-deals-movements-statistics-response.ts b/models/get-pipeline-deals-movements-statistics-response.ts new file mode 100644 index 00000000..69e4c759 --- /dev/null +++ b/models/get-pipeline-deals-movements-statistics-response.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 { GetPipelineDealsMovementsStatisticsResponseAllOf } from './get-pipeline-deals-movements-statistics-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetPipelineDealsMovementsStatisticsResponseAllOfData } from './get-pipeline-deals-movements-statistics-response-all-of-data'; + +/** + * @type GetPipelineDealsMovementsStatisticsResponse + * @export + */ +export type GetPipelineDealsMovementsStatisticsResponse = BaseResponse & GetPipelineDealsMovementsStatisticsResponseAllOf; + + diff --git a/models/get-pipeline-response-all-of.ts b/models/get-pipeline-response-all-of.ts new file mode 100644 index 00000000..c576c8cb --- /dev/null +++ b/models/get-pipeline-response-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 GetPipelineResponseAllOf + */ +export interface GetPipelineResponseAllOf { + /** + * + * @type {PipelineDetails} + * @memberof GetPipelineResponseAllOf + */ + 'data'?: PipelineDetails; +} + diff --git a/models/get-pipeline-response.ts b/models/get-pipeline-response.ts new file mode 100644 index 00000000..155acc4f --- /dev/null +++ b/models/get-pipeline-response.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 { GetPipelineResponseAllOf } from './get-pipeline-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { PipelineDetails } from './pipeline-details'; + +/** + * @type GetPipelineResponse + * @export + */ +export type GetPipelineResponse = BaseResponse & GetPipelineResponseAllOf; + + diff --git a/models/get-pipelines-response-all-of.ts b/models/get-pipelines-response-all-of.ts new file mode 100644 index 00000000..e1f4b5d2 --- /dev/null +++ b/models/get-pipelines-response-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 GetPipelinesResponseAllOf + */ +export interface GetPipelinesResponseAllOf { + /** + * Pipelines array + * @type {Array} + * @memberof GetPipelinesResponseAllOf + */ + 'data'?: Array; +} + diff --git a/models/get-pipelines-response.ts b/models/get-pipelines-response.ts new file mode 100644 index 00000000..f0681817 --- /dev/null +++ b/models/get-pipelines-response.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 { GetPipelinesResponseAllOf } from './get-pipelines-response-all-of'; + +/** + * @type GetPipelinesResponse + * @export + */ +export type GetPipelinesResponse = BaseResponse & GetPipelinesResponseAllOf; + + diff --git a/models/get-product-attachment-details-response-data.ts b/models/get-product-attachment-details-response-data.ts new file mode 100644 index 00000000..926bbc35 --- /dev/null +++ b/models/get-product-attachment-details-response-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 { GetAddProductAttachmentDetailsResponseDataAllOfAllOf } from './get-add-product-attachment-details-response-data-all-of-all-of'; + +/** + * @type GetProductAttachmentDetailsResponseData + * The updated product object attached to the deal + * @export + */ +export type GetProductAttachmentDetailsResponseData = GetAddProductAttachmentDetailsResponseDataAllOfAllOf; + + diff --git a/models/get-product-attachment-details-response.ts b/models/get-product-attachment-details-response.ts new file mode 100644 index 00000000..2128c05b --- /dev/null +++ b/models/get-product-attachment-details-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 { GetProductAttachmentDetailsResponseData } from './get-product-attachment-details-response-data'; + +/** + * + * @export + * @interface GetProductAttachmentDetailsResponse + */ +export interface GetProductAttachmentDetailsResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetProductAttachmentDetailsResponse + */ + 'success'?: boolean; + /** + * + * @type {GetProductAttachmentDetailsResponseData} + * @memberof GetProductAttachmentDetailsResponse + */ + 'data'?: GetProductAttachmentDetailsResponseData; +} + diff --git a/models/get-product-field-response-data.ts b/models/get-product-field-response-data.ts new file mode 100644 index 00000000..f0d9eb70 --- /dev/null +++ b/models/get-product-field-response-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 GetProductFieldResponseData + * All data for the product field + * @export + */ +export type GetProductFieldResponseData = ProductField; + + diff --git a/models/get-product-field-response.ts b/models/get-product-field-response.ts new file mode 100644 index 00000000..d28d0be8 --- /dev/null +++ b/models/get-product-field-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 { GetProductFieldResponseData } from './get-product-field-response-data'; + +/** + * + * @export + * @interface GetProductFieldResponse + */ +export interface GetProductFieldResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetProductFieldResponse + */ + 'success'?: boolean; + /** + * + * @type {GetProductFieldResponseData} + * @memberof GetProductFieldResponse + */ + 'data'?: GetProductFieldResponseData; +} + diff --git a/models/get-product-fields-response-data-inner.ts b/models/get-product-fields-response-data-inner.ts new file mode 100644 index 00000000..2b32282a --- /dev/null +++ b/models/get-product-fields-response-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 { GetFieldAllOf } from './get-field-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { ProductField } from './product-field'; + +/** + * @type GetProductFieldsResponseDataInner + * @export + */ +export type GetProductFieldsResponseDataInner = GetFieldAllOf & ProductField; + + diff --git a/models/get-product-fields-response.ts b/models/get-product-fields-response.ts new file mode 100644 index 00000000..bf70e9ae --- /dev/null +++ b/models/get-product-fields-response.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 { GetProductFieldsResponseDataInner } from './get-product-fields-response-data-inner'; + +/** + * + * @export + * @interface GetProductFieldsResponse + */ +export interface GetProductFieldsResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetProductFieldsResponse + */ + 'success'?: boolean; + /** + * Array containing data for all product fields + * @type {Array} + * @memberof GetProductFieldsResponse + */ + 'data'?: Array; + /** + * Additional data for the product field, such as pagination + * @type {object} + * @memberof GetProductFieldsResponse + */ + 'additional_data'?: object; +} + diff --git a/models/get-product-followers-response-all-of-data-inner.ts b/models/get-product-followers-response-all-of-data-inner.ts new file mode 100644 index 00000000..2cc6b023 --- /dev/null +++ b/models/get-product-followers-response-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 GetProductFollowersResponseAllOfDataInner + */ +export interface GetProductFollowersResponseAllOfDataInner { + /** + * The ID of the user + * @type {number} + * @memberof GetProductFollowersResponseAllOfDataInner + */ + 'user_id'?: number; + /** + * The ID of the user follower + * @type {number} + * @memberof GetProductFollowersResponseAllOfDataInner + */ + 'id'?: number; + /** + * The ID of the product + * @type {number} + * @memberof GetProductFollowersResponseAllOfDataInner + */ + 'product_id'?: number; + /** + * The date and time when the follower was added to the person + * @type {string} + * @memberof GetProductFollowersResponseAllOfDataInner + */ + 'add_time'?: string; +} + diff --git a/models/get-product-followers-response-all-of.ts b/models/get-product-followers-response-all-of.ts new file mode 100644 index 00000000..7ac09f15 --- /dev/null +++ b/models/get-product-followers-response-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 { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetProductFollowersResponseAllOfDataInner } from './get-product-followers-response-all-of-data-inner'; + +/** + * + * @export + * @interface GetProductFollowersResponseAllOf + */ +export interface GetProductFollowersResponseAllOf { + /** + * The list of followers + * @type {Array} + * @memberof GetProductFollowersResponseAllOf + */ + 'data'?: Array; + /** + * + * @type {GetFieldsResponseAllOfAdditionalData} + * @memberof GetProductFollowersResponseAllOf + */ + 'additional_data'?: GetFieldsResponseAllOfAdditionalData; +} + diff --git a/models/get-product-followers-response.ts b/models/get-product-followers-response.ts new file mode 100644 index 00000000..046ab9cd --- /dev/null +++ b/models/get-product-followers-response.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 { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetProductFollowersResponseAllOf } from './get-product-followers-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetProductFollowersResponseAllOfDataInner } from './get-product-followers-response-all-of-data-inner'; + +/** + * @type GetProductFollowersResponse + * @export + */ +export type GetProductFollowersResponse = BaseResponse & GetProductFollowersResponseAllOf; + + diff --git a/models/get-product-response.ts b/models/get-product-response.ts new file mode 100644 index 00000000..56c2737a --- /dev/null +++ b/models/get-product-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 { GetActivitiesResponseRelatedObjects } from './get-activities-response-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { ProductListItemProduct } from './product-list-item-product'; + +/** + * + * @export + * @interface GetProductResponse + */ +export interface GetProductResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetProductResponse + */ + 'success'?: boolean; + /** + * + * @type {ProductListItemProduct} + * @memberof GetProductResponse + */ + 'data'?: ProductListItemProduct; + /** + * + * @type {GetActivitiesResponseRelatedObjects} + * @memberof GetProductResponse + */ + 'related_objects'?: GetActivitiesResponseRelatedObjects; +} + diff --git a/models/get-product-search-response-all-of-data-items-inner-item-owner.ts b/models/get-product-search-response-all-of-data-items-inner-item-owner.ts new file mode 100644 index 00000000..d6514519 --- /dev/null +++ b/models/get-product-search-response-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 GetProductSearchResponseAllOfDataItemsInnerItemOwner + */ +export interface GetProductSearchResponseAllOfDataItemsInnerItemOwner { + /** + * The ID of the owner of the product + * @type {number} + * @memberof GetProductSearchResponseAllOfDataItemsInnerItemOwner + */ + 'id'?: number; +} + diff --git a/models/get-product-search-response-all-of-data-items-inner-item.ts b/models/get-product-search-response-all-of-data-items-inner-item.ts new file mode 100644 index 00000000..481082e5 --- /dev/null +++ b/models/get-product-search-response-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 { GetProductSearchResponseAllOfDataItemsInnerItemOwner } from './get-product-search-response-all-of-data-items-inner-item-owner'; + +/** + * + * @export + * @interface GetProductSearchResponseAllOfDataItemsInnerItem + */ +export interface GetProductSearchResponseAllOfDataItemsInnerItem { + /** + * The ID of the product + * @type {number} + * @memberof GetProductSearchResponseAllOfDataItemsInnerItem + */ + 'id'?: number; + /** + * The type of the item + * @type {string} + * @memberof GetProductSearchResponseAllOfDataItemsInnerItem + */ + 'type'?: string; + /** + * The name of the product + * @type {string} + * @memberof GetProductSearchResponseAllOfDataItemsInnerItem + */ + 'name'?: string; + /** + * The code of the product + * @type {number} + * @memberof GetProductSearchResponseAllOfDataItemsInnerItem + */ + 'code'?: number; + /** + * The visibility of the product + * @type {number} + * @memberof GetProductSearchResponseAllOfDataItemsInnerItem + */ + 'visible_to'?: number; + /** + * + * @type {GetProductSearchResponseAllOfDataItemsInnerItemOwner} + * @memberof GetProductSearchResponseAllOfDataItemsInnerItem + */ + 'owner'?: GetProductSearchResponseAllOfDataItemsInnerItemOwner; + /** + * The custom fields + * @type {Array} + * @memberof GetProductSearchResponseAllOfDataItemsInnerItem + */ + 'custom_fields'?: Array; +} + diff --git a/models/get-product-search-response-all-of-data-items-inner.ts b/models/get-product-search-response-all-of-data-items-inner.ts new file mode 100644 index 00000000..cc87a463 --- /dev/null +++ b/models/get-product-search-response-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 { GetProductSearchResponseAllOfDataItemsInnerItem } from './get-product-search-response-all-of-data-items-inner-item'; + +/** + * + * @export + * @interface GetProductSearchResponseAllOfDataItemsInner + */ +export interface GetProductSearchResponseAllOfDataItemsInner { + /** + * Search result relevancy + * @type {number} + * @memberof GetProductSearchResponseAllOfDataItemsInner + */ + 'result_score'?: number; + /** + * + * @type {GetProductSearchResponseAllOfDataItemsInnerItem} + * @memberof GetProductSearchResponseAllOfDataItemsInner + */ + 'item'?: GetProductSearchResponseAllOfDataItemsInnerItem; +} + diff --git a/models/get-product-search-response-all-of-data.ts b/models/get-product-search-response-all-of-data.ts new file mode 100644 index 00000000..c056e8fd --- /dev/null +++ b/models/get-product-search-response-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 { GetProductSearchResponseAllOfDataItemsInner } from './get-product-search-response-all-of-data-items-inner'; + +/** + * + * @export + * @interface GetProductSearchResponseAllOfData + */ +export interface GetProductSearchResponseAllOfData { + /** + * The array of found items + * @type {Array} + * @memberof GetProductSearchResponseAllOfData + */ + 'items'?: Array; +} + diff --git a/models/get-product-search-response-all-of.ts b/models/get-product-search-response-all-of.ts new file mode 100644 index 00000000..801fd113 --- /dev/null +++ b/models/get-product-search-response-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 { GetActivitiesResponseAdditionalData } from './get-activities-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetProductSearchResponseAllOfData } from './get-product-search-response-all-of-data'; + +/** + * + * @export + * @interface GetProductSearchResponseAllOf + */ +export interface GetProductSearchResponseAllOf { + /** + * + * @type {GetProductSearchResponseAllOfData} + * @memberof GetProductSearchResponseAllOf + */ + 'data'?: GetProductSearchResponseAllOfData; + /** + * + * @type {GetActivitiesResponseAdditionalData} + * @memberof GetProductSearchResponseAllOf + */ + 'additional_data'?: GetActivitiesResponseAdditionalData; +} + diff --git a/models/get-product-search-response.ts b/models/get-product-search-response.ts new file mode 100644 index 00000000..0eb02a97 --- /dev/null +++ b/models/get-product-search-response.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 { GetActivitiesResponseAdditionalData } from './get-activities-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetProductSearchResponseAllOf } from './get-product-search-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetProductSearchResponseAllOfData } from './get-product-search-response-all-of-data'; + +/** + * @type GetProductSearchResponse + * @export + */ +export type GetProductSearchResponse = BaseResponse & GetProductSearchResponseAllOf; + + diff --git a/models/get-products-response-all-of-additional-data-all-of.ts b/models/get-products-response-all-of-additional-data-all-of.ts new file mode 100644 index 00000000..44bf4c9b --- /dev/null +++ b/models/get-products-response-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 GetProductsResponseAllOfAdditionalDataAllOf + */ +export interface GetProductsResponseAllOfAdditionalDataAllOf { + /** + * The total quantity of the products + * @type {number} + * @memberof GetProductsResponseAllOfAdditionalDataAllOf + */ + 'products_quantity_total'?: number; + /** + * The total sum of the products + * @type {number} + * @memberof GetProductsResponseAllOfAdditionalDataAllOf + */ + 'products_sum_total'?: number; + /** + * The total formatted quantity of the products + * @type {string} + * @memberof GetProductsResponseAllOfAdditionalDataAllOf + */ + 'products_quantity_total_formatted'?: string; + /** + * The total formatted sum of the products + * @type {string} + * @memberof GetProductsResponseAllOfAdditionalDataAllOf + */ + 'products_sum_total_formatted'?: string; +} + diff --git a/models/get-products-response-all-of-additional-data.ts b/models/get-products-response-all-of-additional-data.ts new file mode 100644 index 00000000..93cc3c8c --- /dev/null +++ b/models/get-products-response-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 { GetActivitiesResponseAdditionalData } from './get-activities-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetActivitiesResponseAdditionalDataPagination } from './get-activities-response-additional-data-pagination'; +// May contain unused imports in some cases +// @ts-ignore +import { GetProductsResponseAllOfAdditionalDataAllOf } from './get-products-response-all-of-additional-data-all-of'; + +/** + * @type GetProductsResponseAllOfAdditionalData + * @export + */ +export type GetProductsResponseAllOfAdditionalData = GetActivitiesResponseAdditionalData & GetProductsResponseAllOfAdditionalDataAllOf; + + diff --git a/models/get-products-response-all-of-related-objects.ts b/models/get-products-response-all-of-related-objects.ts new file mode 100644 index 00000000..27278ed1 --- /dev/null +++ b/models/get-products-response-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 { GetActivitiesResponseRelatedObjectsUser } from './get-activities-response-related-objects-user'; + +/** + * + * @export + * @interface GetProductsResponseAllOfRelatedObjects + */ +export interface GetProductsResponseAllOfRelatedObjects { + /** + * + * @type {GetActivitiesResponseRelatedObjectsUser} + * @memberof GetProductsResponseAllOfRelatedObjects + */ + 'user'?: GetActivitiesResponseRelatedObjectsUser; +} + diff --git a/models/get-products-response-all-of.ts b/models/get-products-response-all-of.ts new file mode 100644 index 00000000..d781bcdb --- /dev/null +++ b/models/get-products-response-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 { GetProductsResponseAllOfAdditionalData } from './get-products-response-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetProductsResponseAllOfRelatedObjects } from './get-products-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { ProductListItem } from './product-list-item'; + +/** + * + * @export + * @interface GetProductsResponseAllOf + */ +export interface GetProductsResponseAllOf { + /** + * The array of products + * @type {Array} + * @memberof GetProductsResponseAllOf + */ + 'data'?: Array; + /** + * + * @type {GetProductsResponseAllOfAdditionalData} + * @memberof GetProductsResponseAllOf + */ + 'additional_data'?: GetProductsResponseAllOfAdditionalData; + /** + * + * @type {GetProductsResponseAllOfRelatedObjects} + * @memberof GetProductsResponseAllOf + */ + 'related_objects'?: GetProductsResponseAllOfRelatedObjects; +} + diff --git a/models/get-products-response.ts b/models/get-products-response.ts new file mode 100644 index 00000000..ac13444f --- /dev/null +++ b/models/get-products-response.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 { GetProductsResponseAllOf } from './get-products-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetProductsResponseAllOfAdditionalData } from './get-products-response-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetProductsResponseAllOfRelatedObjects } from './get-products-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { ProductListItem } from './product-list-item'; + +/** + * @type GetProductsResponse + * @export + */ +export type GetProductsResponse = BaseResponse & GetProductsResponseAllOf; + + diff --git a/models/get-products-response1-additional-data.ts b/models/get-products-response1-additional-data.ts new file mode 100644 index 00000000..11eecb8d --- /dev/null +++ b/models/get-products-response1-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 GetProductsResponse1AdditionalData + */ +export interface GetProductsResponse1AdditionalData { + /** + * Pagination start + * @type {number} + * @memberof GetProductsResponse1AdditionalData + */ + 'start'?: number; + /** + * Items shown per page + * @type {number} + * @memberof GetProductsResponse1AdditionalData + */ + 'limit'?: number; + /** + * If there are more list items in the collection than displayed or not + * @type {boolean} + * @memberof GetProductsResponse1AdditionalData + */ + 'more_items_in_collection'?: boolean; +} + diff --git a/models/get-products-response1.ts b/models/get-products-response1.ts new file mode 100644 index 00000000..bc708196 --- /dev/null +++ b/models/get-products-response1.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 { GetActivitiesResponseRelatedObjects } from './get-activities-response-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { GetProductResponse } from './get-product-response'; +// May contain unused imports in some cases +// @ts-ignore +import { GetProductsResponse1AdditionalData } from './get-products-response1-additional-data'; + +/** + * + * @export + * @interface GetProductsResponse1 + */ +export interface GetProductsResponse1 { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetProductsResponse1 + */ + 'success'?: boolean; + /** + * Array containing data for all products + * @type {Array} + * @memberof GetProductsResponse1 + */ + 'data'?: Array; + /** + * + * @type {GetProductsResponse1AdditionalData} + * @memberof GetProductsResponse1 + */ + 'additional_data'?: GetProductsResponse1AdditionalData; + /** + * + * @type {GetActivitiesResponseRelatedObjects} + * @memberof GetProductsResponse1 + */ + 'related_objects'?: GetActivitiesResponseRelatedObjects; +} + diff --git a/models/get-project-board-response.ts b/models/get-project-board-response.ts new file mode 100644 index 00000000..b8d99acd --- /dev/null +++ b/models/get-project-board-response.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 { GetProjectBoardsResponseDataInner } from './get-project-boards-response-data-inner'; + +/** + * + * @export + * @interface GetProjectBoardResponse + */ +export interface GetProjectBoardResponse { + /** + * + * @type {boolean} + * @memberof GetProjectBoardResponse + */ + 'success'?: boolean; + /** + * + * @type {GetProjectBoardsResponseDataInner} + * @memberof GetProjectBoardResponse + */ + 'data'?: GetProjectBoardsResponseDataInner; + /** + * + * @type {object} + * @memberof GetProjectBoardResponse + */ + 'additional_data'?: object | null; +} + diff --git a/models/get-project-boards-response-data-inner.ts b/models/get-project-boards-response-data-inner.ts new file mode 100644 index 00000000..04b112fd --- /dev/null +++ b/models/get-project-boards-response-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 GetProjectBoardsResponseDataInner + */ +export interface GetProjectBoardsResponseDataInner { + /** + * The ID of the project board + * @type {number} + * @memberof GetProjectBoardsResponseDataInner + */ + 'id'?: number; + /** + * Name of a project board + * @type {string} + * @memberof GetProjectBoardsResponseDataInner + */ + 'name'?: string; + /** + * The order of a board + * @type {number} + * @memberof GetProjectBoardsResponseDataInner + */ + 'order_nr'?: number; + /** + * The creation date and time of the board in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof GetProjectBoardsResponseDataInner + */ + 'add_time'?: string; + /** + * The update date and time of the board in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof GetProjectBoardsResponseDataInner + */ + 'update_time'?: string; +} + diff --git a/models/get-project-boards-response.ts b/models/get-project-boards-response.ts new file mode 100644 index 00000000..297ed92c --- /dev/null +++ b/models/get-project-boards-response.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 { GetProjectBoardsResponseDataInner } from './get-project-boards-response-data-inner'; + +/** + * + * @export + * @interface GetProjectBoardsResponse + */ +export interface GetProjectBoardsResponse { + /** + * + * @type {boolean} + * @memberof GetProjectBoardsResponse + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetProjectBoardsResponse + */ + 'data'?: Array; + /** + * + * @type {object} + * @memberof GetProjectBoardsResponse + */ + 'additional_data'?: object | null; +} + diff --git a/models/get-project-groups-response-data-inner.ts b/models/get-project-groups-response-data-inner.ts new file mode 100644 index 00000000..c4e1c23a --- /dev/null +++ b/models/get-project-groups-response-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 GetProjectGroupsResponseDataInner + */ +export interface GetProjectGroupsResponseDataInner { + /** + * ID of the group + * @type {number} + * @memberof GetProjectGroupsResponseDataInner + */ + 'id'?: number; + /** + * Name of the group + * @type {string} + * @memberof GetProjectGroupsResponseDataInner + */ + 'name'?: string; + /** + * Order number of the group + * @type {number} + * @memberof GetProjectGroupsResponseDataInner + */ + 'order_nr'?: number; +} + diff --git a/models/get-project-groups-response.ts b/models/get-project-groups-response.ts new file mode 100644 index 00000000..3f8eb024 --- /dev/null +++ b/models/get-project-groups-response.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 { GetProjectGroupsResponseDataInner } from './get-project-groups-response-data-inner'; + +/** + * + * @export + * @interface GetProjectGroupsResponse + */ +export interface GetProjectGroupsResponse { + /** + * + * @type {boolean} + * @memberof GetProjectGroupsResponse + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetProjectGroupsResponse + */ + 'data'?: Array; + /** + * + * @type {object} + * @memberof GetProjectGroupsResponse + */ + 'additional_data'?: object | null; +} + diff --git a/models/get-project-phase-response.ts b/models/get-project-phase-response.ts new file mode 100644 index 00000000..72e5fc95 --- /dev/null +++ b/models/get-project-phase-response.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 { GetProjectPhasesResponseDataInner } from './get-project-phases-response-data-inner'; + +/** + * + * @export + * @interface GetProjectPhaseResponse + */ +export interface GetProjectPhaseResponse { + /** + * + * @type {boolean} + * @memberof GetProjectPhaseResponse + */ + 'success'?: boolean; + /** + * + * @type {GetProjectPhasesResponseDataInner} + * @memberof GetProjectPhaseResponse + */ + 'data'?: GetProjectPhasesResponseDataInner; + /** + * + * @type {object} + * @memberof GetProjectPhaseResponse + */ + 'additional_data'?: object | null; +} + diff --git a/models/get-project-phases-response-data-inner.ts b/models/get-project-phases-response-data-inner.ts new file mode 100644 index 00000000..d07aa1ed --- /dev/null +++ b/models/get-project-phases-response-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 GetProjectPhasesResponseDataInner + */ +export interface GetProjectPhasesResponseDataInner { + /** + * The ID of the project phase + * @type {number} + * @memberof GetProjectPhasesResponseDataInner + */ + 'id'?: number; + /** + * Name of a project phase + * @type {string} + * @memberof GetProjectPhasesResponseDataInner + */ + 'name'?: string; + /** + * The ID of the project board this phase is linked to + * @type {number} + * @memberof GetProjectPhasesResponseDataInner + */ + 'board_id'?: number; + /** + * The order of a phase + * @type {number} + * @memberof GetProjectPhasesResponseDataInner + */ + 'order_nr'?: number; + /** + * The creation date and time of the board in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof GetProjectPhasesResponseDataInner + */ + 'add_time'?: string; + /** + * The update date and time of the board in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof GetProjectPhasesResponseDataInner + */ + 'update_time'?: string; +} + diff --git a/models/get-project-phases-response.ts b/models/get-project-phases-response.ts new file mode 100644 index 00000000..f47ae9b3 --- /dev/null +++ b/models/get-project-phases-response.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 { GetProjectPhasesResponseDataInner } from './get-project-phases-response-data-inner'; + +/** + * + * @export + * @interface GetProjectPhasesResponse + */ +export interface GetProjectPhasesResponse { + /** + * + * @type {boolean} + * @memberof GetProjectPhasesResponse + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetProjectPhasesResponse + */ + 'data'?: Array; + /** + * + * @type {object} + * @memberof GetProjectPhasesResponse + */ + 'additional_data'?: object | null; +} + diff --git a/models/get-project-plan-response-data-inner.ts b/models/get-project-plan-response-data-inner.ts new file mode 100644 index 00000000..59671be0 --- /dev/null +++ b/models/get-project-plan-response-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 GetProjectPlanResponseDataInner + */ +export interface GetProjectPlanResponseDataInner { + /** + * ID of plan item (either activity or task ID) + * @type {number} + * @memberof GetProjectPlanResponseDataInner + */ + 'item_id'?: number; + /** + * Type of a plan item (task / activity) + * @type {string} + * @memberof GetProjectPlanResponseDataInner + */ + '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 GetProjectPlanResponseDataInner + */ + '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 GetProjectPlanResponseDataInner + */ + 'group_id'?: number; +} + diff --git a/models/get-project-plan-response.ts b/models/get-project-plan-response.ts new file mode 100644 index 00000000..8f3eafa7 --- /dev/null +++ b/models/get-project-plan-response.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 { GetProjectPlanResponseDataInner } from './get-project-plan-response-data-inner'; + +/** + * + * @export + * @interface GetProjectPlanResponse + */ +export interface GetProjectPlanResponse { + /** + * + * @type {boolean} + * @memberof GetProjectPlanResponse + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetProjectPlanResponse + */ + 'data'?: Array; + /** + * + * @type {object} + * @memberof GetProjectPlanResponse + */ + 'additional_data'?: object | null; +} + diff --git a/models/get-project-response.ts b/models/get-project-response.ts new file mode 100644 index 00000000..adb54ef9 --- /dev/null +++ b/models/get-project-response.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 GetProjectResponse + */ +export interface GetProjectResponse { + /** + * + * @type {boolean} + * @memberof GetProjectResponse + */ + 'success'?: boolean; + /** + * + * @type {ProjectResponseObject} + * @memberof GetProjectResponse + */ + 'data'?: ProjectResponseObject; + /** + * + * @type {object} + * @memberof GetProjectResponse + */ + 'additional_data'?: object | null; +} + diff --git a/models/get-project-template-response.ts b/models/get-project-template-response.ts new file mode 100644 index 00000000..a36ccfe2 --- /dev/null +++ b/models/get-project-template-response.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 GetProjectTemplateResponse + */ +export interface GetProjectTemplateResponse { + /** + * + * @type {boolean} + * @memberof GetProjectTemplateResponse + */ + 'success'?: boolean; + /** + * + * @type {TemplateResponseObject} + * @memberof GetProjectTemplateResponse + */ + 'data'?: TemplateResponseObject; + /** + * + * @type {object} + * @memberof GetProjectTemplateResponse + */ + 'additional_data'?: object | null; +} + diff --git a/models/get-project-templates-response.ts b/models/get-project-templates-response.ts new file mode 100644 index 00000000..0f04b771 --- /dev/null +++ b/models/get-project-templates-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 { GetActivitiesCollectionResponseAdditionalData } from './get-activities-collection-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { TemplateResponseObject } from './template-response-object'; + +/** + * + * @export + * @interface GetProjectTemplatesResponse + */ +export interface GetProjectTemplatesResponse { + /** + * + * @type {boolean} + * @memberof GetProjectTemplatesResponse + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetProjectTemplatesResponse + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesCollectionResponseAdditionalData} + * @memberof GetProjectTemplatesResponse + */ + 'additional_data'?: GetActivitiesCollectionResponseAdditionalData; +} + diff --git a/models/get-projects-response.ts b/models/get-projects-response.ts new file mode 100644 index 00000000..5f0ad8d2 --- /dev/null +++ b/models/get-projects-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 { GetActivitiesCollectionResponseAdditionalData } from './get-activities-collection-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { ProjectResponseObject } from './project-response-object'; + +/** + * + * @export + * @interface GetProjectsResponse + */ +export interface GetProjectsResponse { + /** + * + * @type {boolean} + * @memberof GetProjectsResponse + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetProjectsResponse + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesCollectionResponseAdditionalData} + * @memberof GetProjectsResponse + */ + 'additional_data'?: GetActivitiesCollectionResponseAdditionalData; +} + diff --git a/models/get-receive-message-success-response.ts b/models/get-receive-message-success-response.ts new file mode 100644 index 00000000..999597a0 --- /dev/null +++ b/models/get-receive-message-success-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 GetReceiveMessageSuccessResponse + */ +export interface GetReceiveMessageSuccessResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetReceiveMessageSuccessResponse + */ + 'success'?: boolean; + /** + * + * @type {ReceiveMessageRequest} + * @memberof GetReceiveMessageSuccessResponse + */ + 'data'?: ReceiveMessageRequest; +} + diff --git a/models/get-recents-response-additional-data.ts b/models/get-recents-response-additional-data.ts new file mode 100644 index 00000000..56b4766a --- /dev/null +++ b/models/get-recents-response-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 { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; + +/** + * + * @export + * @interface GetRecentsResponseAdditionalData + */ +export interface GetRecentsResponseAdditionalData { + /** + * The timestamp in UTC. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof GetRecentsResponseAdditionalData + */ + 'since_timestamp'?: string; + /** + * The timestamp in UTC. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof GetRecentsResponseAdditionalData + */ + 'last_timestamp_on_page'?: string; + /** + * + * @type {GetFieldsResponseAllOfAdditionalData} + * @memberof GetRecentsResponseAdditionalData + */ + 'pagination'?: GetFieldsResponseAllOfAdditionalData; +} + diff --git a/models/get-recents-response.ts b/models/get-recents-response.ts new file mode 100644 index 00000000..3d53303f --- /dev/null +++ b/models/get-recents-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 { GetRecentsResponseAdditionalData } from './get-recents-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { RecentsDataInner } from './recents-data-inner'; + +/** + * + * @export + * @interface GetRecentsResponse + */ +export interface GetRecentsResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof GetRecentsResponse + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetRecentsResponse + */ + 'data'?: Array; + /** + * + * @type {GetRecentsResponseAdditionalData} + * @memberof GetRecentsResponse + */ + 'additional_data'?: GetRecentsResponseAdditionalData; +} + diff --git a/models/get-role-assignments-response-data.ts b/models/get-role-assignments-response-data.ts new file mode 100644 index 00000000..020e78fb --- /dev/null +++ b/models/get-role-assignments-response-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 { GetRolesResponseAllOfAdditionalData } from './get-roles-response-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { RoleAssignment } from './role-assignment'; + +/** + * + * @export + * @interface GetRoleAssignmentsResponseData + */ +export interface GetRoleAssignmentsResponseData { + /** + * The role assignments + * @type {Array} + * @memberof GetRoleAssignmentsResponseData + */ + 'data'?: Array; + /** + * + * @type {GetRolesResponseAllOfAdditionalData} + * @memberof GetRoleAssignmentsResponseData + */ + 'additional_data'?: GetRolesResponseAllOfAdditionalData; +} + diff --git a/models/get-role-assignments-response.ts b/models/get-role-assignments-response.ts new file mode 100644 index 00000000..b0a5b9b1 --- /dev/null +++ b/models/get-role-assignments-response.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 { GetRoleAssignmentsResponseData } from './get-role-assignments-response-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRolesResponseAllOfAdditionalData } from './get-roles-response-all-of-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { RoleAssignment } from './role-assignment'; + +/** + * @type GetRoleAssignmentsResponse + * @export + */ +export type GetRoleAssignmentsResponse = BaseResponse & GetRoleAssignmentsResponseData; + + diff --git a/models/get-role-pipelines-response-all-of.ts b/models/get-role-pipelines-response-all-of.ts new file mode 100644 index 00000000..7bb4c9d6 --- /dev/null +++ b/models/get-role-pipelines-response-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 { GetRolePipelinesResponseData } from './get-role-pipelines-response-data'; + +/** + * + * @export + * @interface GetRolePipelinesResponseAllOf + */ +export interface GetRolePipelinesResponseAllOf { + /** + * + * @type {GetRolePipelinesResponseData} + * @memberof GetRolePipelinesResponseAllOf + */ + 'data'?: GetRolePipelinesResponseData; +} + diff --git a/models/get-role-pipelines-response-data.ts b/models/get-role-pipelines-response-data.ts new file mode 100644 index 00000000..e421943b --- /dev/null +++ b/models/get-role-pipelines-response-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 GetRolePipelinesResponseData + */ +export interface GetRolePipelinesResponseData { + /** + * Either visible or hidden pipeline ids + * @type {Array} + * @memberof GetRolePipelinesResponseData + */ + 'pipeline_ids'?: Array; + /** + * Whether visible or hidden pipeline ids were returned + * @type {boolean} + * @memberof GetRolePipelinesResponseData + */ + 'visible'?: boolean; +} + diff --git a/models/get-role-pipelines-response.ts b/models/get-role-pipelines-response.ts new file mode 100644 index 00000000..49350c17 --- /dev/null +++ b/models/get-role-pipelines-response.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 { GetRolePipelinesResponseAllOf } from './get-role-pipelines-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRolePipelinesResponseData } from './get-role-pipelines-response-data'; + +/** + * @type GetRolePipelinesResponse + * @export + */ +export type GetRolePipelinesResponse = BaseResponse & GetRolePipelinesResponseAllOf; + + diff --git a/models/get-role-response-data-additional-data.ts b/models/get-role-response-data-additional-data.ts new file mode 100644 index 00000000..1a84d9c2 --- /dev/null +++ b/models/get-role-response-data-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 { RoleSettings } from './role-settings'; + +/** + * The additional data in the role + * @export + * @interface GetRoleResponseDataAdditionalData + */ +export interface GetRoleResponseDataAdditionalData { + /** + * + * @type {RoleSettings} + * @memberof GetRoleResponseDataAdditionalData + */ + 'settings'?: RoleSettings; +} + diff --git a/models/get-role-response-data.ts b/models/get-role-response-data.ts new file mode 100644 index 00000000..89bebd1b --- /dev/null +++ b/models/get-role-response-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 { GetRoleResponseDataAdditionalData } from './get-role-response-data-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { SubRole } from './sub-role'; + +/** + * + * @export + * @interface GetRoleResponseData + */ +export interface GetRoleResponseData { + /** + * + * @type {SubRole} + * @memberof GetRoleResponseData + */ + 'data'?: SubRole; + /** + * + * @type {GetRoleResponseDataAdditionalData} + * @memberof GetRoleResponseData + */ + 'additional_data'?: GetRoleResponseDataAdditionalData; +} + diff --git a/models/get-role-response.ts b/models/get-role-response.ts new file mode 100644 index 00000000..f9814be8 --- /dev/null +++ b/models/get-role-response.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 { GetRoleResponseData } from './get-role-response-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRoleResponseDataAdditionalData } from './get-role-response-data-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { SubRole } from './sub-role'; + +/** + * @type GetRoleResponse + * @export + */ +export type GetRoleResponse = BaseResponse & GetRoleResponseData; + + diff --git a/models/get-role-settings-response-data.ts b/models/get-role-settings-response-data.ts new file mode 100644 index 00000000..8167513b --- /dev/null +++ b/models/get-role-settings-response-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 { RoleSettings } from './role-settings'; + +/** + * + * @export + * @interface GetRoleSettingsResponseData + */ +export interface GetRoleSettingsResponseData { + /** + * + * @type {RoleSettings} + * @memberof GetRoleSettingsResponseData + */ + 'data'?: RoleSettings; +} + diff --git a/models/get-role-settings-response.ts b/models/get-role-settings-response.ts new file mode 100644 index 00000000..adfe7d42 --- /dev/null +++ b/models/get-role-settings-response.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 { GetRoleSettingsResponseData } from './get-role-settings-response-data'; +// May contain unused imports in some cases +// @ts-ignore +import { RoleSettings } from './role-settings'; + +/** + * @type GetRoleSettingsResponse + * @export + */ +export type GetRoleSettingsResponse = BaseResponse & GetRoleSettingsResponseData; + + diff --git a/models/get-roles-response-all-of-additional-data-pagination.ts b/models/get-roles-response-all-of-additional-data-pagination.ts new file mode 100644 index 00000000..503fdc82 --- /dev/null +++ b/models/get-roles-response-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 GetRolesResponseAllOfAdditionalDataPagination + */ +export interface GetRolesResponseAllOfAdditionalDataPagination { + /** + * Pagination start + * @type {number} + * @memberof GetRolesResponseAllOfAdditionalDataPagination + */ + 'start'?: number; + /** + * Items shown per page + * @type {number} + * @memberof GetRolesResponseAllOfAdditionalDataPagination + */ + 'limit'?: number; + /** + * Whether there are more list items in the collection than displayed + * @type {boolean} + * @memberof GetRolesResponseAllOfAdditionalDataPagination + */ + 'more_items_in_collection'?: boolean; +} + diff --git a/models/get-roles-response-all-of-additional-data.ts b/models/get-roles-response-all-of-additional-data.ts new file mode 100644 index 00000000..f32427cc --- /dev/null +++ b/models/get-roles-response-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 { GetRolesResponseAllOfAdditionalDataPagination } from './get-roles-response-all-of-additional-data-pagination'; + +/** + * The additional data in the role list + * @export + * @interface GetRolesResponseAllOfAdditionalData + */ +export interface GetRolesResponseAllOfAdditionalData { + /** + * + * @type {GetRolesResponseAllOfAdditionalDataPagination} + * @memberof GetRolesResponseAllOfAdditionalData + */ + 'pagination'?: GetRolesResponseAllOfAdditionalDataPagination; +} + diff --git a/models/get-roles-response-all-of.ts b/models/get-roles-response-all-of.ts new file mode 100644 index 00000000..d7f625f1 --- /dev/null +++ b/models/get-roles-response-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 { GetRolesResponseAllOfAdditionalData } from './get-roles-response-all-of-additional-data'; + +/** + * + * @export + * @interface GetRolesResponseAllOf + */ +export interface GetRolesResponseAllOf { + /** + * The array of roles + * @type {Array} + * @memberof GetRolesResponseAllOf + */ + 'data'?: Array; + /** + * + * @type {GetRolesResponseAllOfAdditionalData} + * @memberof GetRolesResponseAllOf + */ + 'additional_data'?: GetRolesResponseAllOfAdditionalData; +} + diff --git a/models/get-roles-response.ts b/models/get-roles-response.ts new file mode 100644 index 00000000..f53150eb --- /dev/null +++ b/models/get-roles-response.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 { GetRolesResponseAllOf } from './get-roles-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetRolesResponseAllOfAdditionalData } from './get-roles-response-all-of-additional-data'; + +/** + * @type GetRolesResponse + * @export + */ +export type GetRolesResponse = BaseResponse & GetRolesResponseAllOf; + + diff --git a/models/get-stage-deals-response.ts b/models/get-stage-deals-response.ts new file mode 100644 index 00000000..a1ce16a5 --- /dev/null +++ b/models/get-stage-deals-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 { DealStrict } from './deal-strict'; +// May contain unused imports in some cases +// @ts-ignore +import { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-all-of-additional-data'; + +/** + * + * @export + * @interface GetStageDealsResponse + */ +export interface GetStageDealsResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetStageDealsResponse + */ + 'success'?: boolean; + /** + * The array of deals + * @type {Array} + * @memberof GetStageDealsResponse + */ + 'data'?: Array; + /** + * + * @type {GetFieldsResponseAllOfAdditionalData} + * @memberof GetStageDealsResponse + */ + 'additional_data'?: GetFieldsResponseAllOfAdditionalData; +} + diff --git a/models/get-stage-response-data.ts b/models/get-stage-response-data.ts new file mode 100644 index 00000000..d7273faa --- /dev/null +++ b/models/get-stage-response-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 { BaseStage } from './base-stage'; +// May contain unused imports in some cases +// @ts-ignore +import { PipelineDetailsAllOfDealsSummary } from './pipeline-details-all-of-deals-summary'; +// May contain unused imports in some cases +// @ts-ignore +import { StageDetailsData } from './stage-details-data'; + +/** + * @type GetStageResponseData + * The stage object + * @export + */ +export type GetStageResponseData = BaseStage & StageDetailsData; + + diff --git a/models/get-stage-response.ts b/models/get-stage-response.ts new file mode 100644 index 00000000..88ee1a85 --- /dev/null +++ b/models/get-stage-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 { GetStageResponseData } from './get-stage-response-data'; + +/** + * + * @export + * @interface GetStageResponse + */ +export interface GetStageResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetStageResponse + */ + 'success'?: boolean; + /** + * + * @type {GetStageResponseData} + * @memberof GetStageResponse + */ + 'data'?: GetStageResponseData; +} + diff --git a/models/get-stages-response-data-inner.ts b/models/get-stages-response-data-inner.ts new file mode 100644 index 00000000..8be106ff --- /dev/null +++ b/models/get-stages-response-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 { BaseStage } from './base-stage'; +// May contain unused imports in some cases +// @ts-ignore +import { StageWithPipelineInfo } from './stage-with-pipeline-info'; + +/** + * @type GetStagesResponseDataInner + * @export + */ +export type GetStagesResponseDataInner = BaseStage & StageWithPipelineInfo; + + diff --git a/models/get-stages-response.ts b/models/get-stages-response.ts new file mode 100644 index 00000000..e150b302 --- /dev/null +++ b/models/get-stages-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 { GetStagesResponseDataInner } from './get-stages-response-data-inner'; + +/** + * + * @export + * @interface GetStagesResponse + */ +export interface GetStagesResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof GetStagesResponse + */ + 'success'?: boolean; + /** + * The array of stages + * @type {Array} + * @memberof GetStagesResponse + */ + 'data'?: Array; +} + diff --git a/models/get-subscription-addons-response-all-of.ts b/models/get-subscription-addons-response-all-of.ts new file mode 100644 index 00000000..ae08d848 --- /dev/null +++ b/models/get-subscription-addons-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 GetSubscriptionAddonsResponseAllOf + */ +export interface GetSubscriptionAddonsResponseAllOf { + /** + * An array of add-ons that the company has. + * @type {Array} + * @memberof GetSubscriptionAddonsResponseAllOf + */ + 'data'?: Array; +} + diff --git a/models/get-subscription-addons-response.ts b/models/get-subscription-addons-response.ts new file mode 100644 index 00000000..3205196a --- /dev/null +++ b/models/get-subscription-addons-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 { GetSubscriptionAddonsResponseAllOf } from './get-subscription-addons-response-all-of'; + +/** + * @type GetSubscriptionAddonsResponse + * @export + */ +export type GetSubscriptionAddonsResponse = BaseResponse & GetSubscriptionAddonsResponseAllOf; + + diff --git a/models/get-subscriptions-id-response-data.ts b/models/get-subscriptions-id-response-data.ts new file mode 100644 index 00000000..5afc4cb4 --- /dev/null +++ b/models/get-subscriptions-id-response-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 { SubscriptionItem } from './subscription-item'; + +/** + * + * @export + * @interface GetSubscriptionsIdResponseData + */ +export interface GetSubscriptionsIdResponseData { + /** + * + * @type {SubscriptionItem} + * @memberof GetSubscriptionsIdResponseData + */ + 'data'?: SubscriptionItem; +} + diff --git a/models/get-subscriptions-id-response.ts b/models/get-subscriptions-id-response.ts new file mode 100644 index 00000000..dcb975fd --- /dev/null +++ b/models/get-subscriptions-id-response.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 { GetSubscriptionsIdResponseData } from './get-subscriptions-id-response-data'; +// May contain unused imports in some cases +// @ts-ignore +import { SubscriptionItem } from './subscription-item'; + +/** + * @type GetSubscriptionsIdResponse + * @export + */ +export type GetSubscriptionsIdResponse = BaseResponse & GetSubscriptionsIdResponseData; + + diff --git a/models/get-task-response.ts b/models/get-task-response.ts new file mode 100644 index 00000000..9f6b7222 --- /dev/null +++ b/models/get-task-response.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 GetTaskResponse + */ +export interface GetTaskResponse { + /** + * + * @type {boolean} + * @memberof GetTaskResponse + */ + 'success'?: boolean; + /** + * + * @type {TaskResponseObject} + * @memberof GetTaskResponse + */ + 'data'?: TaskResponseObject; + /** + * + * @type {object} + * @memberof GetTaskResponse + */ + 'additional_data'?: object | null; +} + diff --git a/models/get-tasks-response.ts b/models/get-tasks-response.ts new file mode 100644 index 00000000..b72eb00f --- /dev/null +++ b/models/get-tasks-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 { GetActivitiesCollectionResponseAdditionalData } from './get-activities-collection-response-additional-data'; +// May contain unused imports in some cases +// @ts-ignore +import { TaskResponseObject } from './task-response-object'; + +/** + * + * @export + * @interface GetTasksResponse + */ +export interface GetTasksResponse { + /** + * + * @type {boolean} + * @memberof GetTasksResponse + */ + 'success'?: boolean; + /** + * + * @type {Array} + * @memberof GetTasksResponse + */ + 'data'?: Array; + /** + * + * @type {GetActivitiesCollectionResponseAdditionalData} + * @memberof GetTasksResponse + */ + 'additional_data'?: GetActivitiesCollectionResponseAdditionalData; +} + diff --git a/models/get-team-response-all-of.ts b/models/get-team-response-all-of.ts new file mode 100644 index 00000000..34c220b6 --- /dev/null +++ b/models/get-team-response-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 GetTeamResponseAllOf + */ +export interface GetTeamResponseAllOf { + /** + * + * @type {BaseTeam} + * @memberof GetTeamResponseAllOf + */ + 'data'?: BaseTeam; +} + diff --git a/models/get-team-response.ts b/models/get-team-response.ts new file mode 100644 index 00000000..4af026e0 --- /dev/null +++ b/models/get-team-response.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 { GetTeamResponseAllOf } from './get-team-response-all-of'; + +/** + * @type GetTeamResponse + * @export + */ +export type GetTeamResponse = BaseResponse & GetTeamResponseAllOf; + + diff --git a/models/get-teams-response-all-of.ts b/models/get-teams-response-all-of.ts new file mode 100644 index 00000000..c135d9ee --- /dev/null +++ b/models/get-teams-response-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 GetTeamsResponseAllOf + */ +export interface GetTeamsResponseAllOf { + /** + * + * @type {Array} + * @memberof GetTeamsResponseAllOf + */ + 'data'?: Array; +} + diff --git a/models/get-teams-response.ts b/models/get-teams-response.ts new file mode 100644 index 00000000..273a510e --- /dev/null +++ b/models/get-teams-response.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 { GetTeamsResponseAllOf } from './get-teams-response-all-of'; + +/** + * @type GetTeamsResponse + * @export + */ +export type GetTeamsResponse = BaseResponse & GetTeamsResponseAllOf; + + diff --git a/models/get-user-assignments-to-permission-set-response-all-of-data-inner.ts b/models/get-user-assignments-to-permission-set-response-all-of-data-inner.ts new file mode 100644 index 00000000..7f2ec0a9 --- /dev/null +++ b/models/get-user-assignments-to-permission-set-response-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 GetUserAssignmentsToPermissionSetResponseAllOfDataInner + */ +export interface GetUserAssignmentsToPermissionSetResponseAllOfDataInner { + /** + * The ID of the user in the permission set + * @type {number} + * @memberof GetUserAssignmentsToPermissionSetResponseAllOfDataInner + */ + 'user_id'?: number; + /** + * The ID of the permission set + * @type {string} + * @memberof GetUserAssignmentsToPermissionSetResponseAllOfDataInner + */ + 'permission_set_id'?: string; + /** + * The name of the permission set + * @type {string} + * @memberof GetUserAssignmentsToPermissionSetResponseAllOfDataInner + */ + 'name'?: string; +} + diff --git a/models/get-user-assignments-to-permission-set-response-all-of.ts b/models/get-user-assignments-to-permission-set-response-all-of.ts new file mode 100644 index 00000000..468bbee6 --- /dev/null +++ b/models/get-user-assignments-to-permission-set-response-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 { GetUserAssignmentsToPermissionSetResponseAllOfDataInner } from './get-user-assignments-to-permission-set-response-all-of-data-inner'; + +/** + * + * @export + * @interface GetUserAssignmentsToPermissionSetResponseAllOf + */ +export interface GetUserAssignmentsToPermissionSetResponseAllOf { + /** + * An array of the assignments of the user + * @type {Array} + * @memberof GetUserAssignmentsToPermissionSetResponseAllOf + */ + 'data'?: Array; +} + diff --git a/models/get-user-assignments-to-permission-set-response.ts b/models/get-user-assignments-to-permission-set-response.ts new file mode 100644 index 00000000..d1ba643c --- /dev/null +++ b/models/get-user-assignments-to-permission-set-response.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 { GetUserAssignmentsToPermissionSetResponseAllOf } from './get-user-assignments-to-permission-set-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetUserAssignmentsToPermissionSetResponseAllOfDataInner } from './get-user-assignments-to-permission-set-response-all-of-data-inner'; + +/** + * @type GetUserAssignmentsToPermissionSetResponse + * @export + */ +export type GetUserAssignmentsToPermissionSetResponse = BaseResponse & GetUserAssignmentsToPermissionSetResponseAllOf; + + diff --git a/models/get-user-connections-response-data-data.ts b/models/get-user-connections-response-data-data.ts new file mode 100644 index 00000000..d32e6bb4 --- /dev/null +++ b/models/get-user-connections-response-data-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 GetUserConnectionsResponseDataData + */ +export interface GetUserConnectionsResponseDataData { + /** + * The third party ID or false in case the ID is not found + * @type {string} + * @memberof GetUserConnectionsResponseDataData + */ + 'google'?: string; +} + diff --git a/models/get-user-connections-response-data.ts b/models/get-user-connections-response-data.ts new file mode 100644 index 00000000..4b89f499 --- /dev/null +++ b/models/get-user-connections-response-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 { GetUserConnectionsResponseDataData } from './get-user-connections-response-data-data'; + +/** + * + * @export + * @interface GetUserConnectionsResponseData + */ +export interface GetUserConnectionsResponseData { + /** + * + * @type {GetUserConnectionsResponseDataData} + * @memberof GetUserConnectionsResponseData + */ + 'data'?: GetUserConnectionsResponseDataData; +} + diff --git a/models/get-user-connections-response.ts b/models/get-user-connections-response.ts new file mode 100644 index 00000000..7a8979ea --- /dev/null +++ b/models/get-user-connections-response.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 { GetUserConnectionsResponseData } from './get-user-connections-response-data'; +// May contain unused imports in some cases +// @ts-ignore +import { GetUserConnectionsResponseDataData } from './get-user-connections-response-data-data'; + +/** + * @type GetUserConnectionsResponse + * @export + */ +export type GetUserConnectionsResponse = BaseResponse & GetUserConnectionsResponseData; + + diff --git a/models/get-user-permissions-response-all-of-data.ts b/models/get-user-permissions-response-all-of-data.ts new file mode 100644 index 00000000..53c9d12a --- /dev/null +++ b/models/get-user-permissions-response-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 GetUserPermissionsResponseAllOfData + */ +export interface GetUserPermissionsResponseAllOfData { + /** + * If the user can add custom fields + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_add_custom_fields'?: boolean; + /** + * If the user can add products + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_add_products'?: boolean; + /** + * If the user can add prospects as leads + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_add_prospects_as_leads'?: boolean; + /** + * If the user can bulk edit items + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_bulk_edit_items'?: boolean; + /** + * If the user can change visibility of items + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_change_visibility_of_items'?: boolean; + /** + * If the user can convert deals to leads + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_convert_deals_to_leads'?: boolean; + /** + * If the user can create workflows + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_create_own_workflow'?: boolean; + /** + * If the user can delete activities + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_delete_activities'?: boolean; + /** + * If the user can delete custom fields + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_delete_custom_fields'?: boolean; + /** + * If the user can delete deals + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_delete_deals'?: boolean; + /** + * If the user can edit custom fields + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_edit_custom_fields'?: boolean; + /** + * If the user can edit deals\' closed date + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_edit_deals_closed_date'?: boolean; + /** + * If the user can edit products + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_edit_products'?: boolean; + /** + * If the user can edit shared filters + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_edit_shared_filters'?: boolean; + /** + * If the user can export data from item lists + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_export_data_from_lists'?: boolean; + /** + * If the user can follow other users + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_follow_other_users'?: boolean; + /** + * If the user can merge deals + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_merge_deals'?: boolean; + /** + * If the user can merge organizations + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_merge_organizations'?: boolean; + /** + * If the user can merge people + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_merge_people'?: boolean; + /** + * If the user can modify labels + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_modify_labels'?: boolean; + /** + * If the user can see company-wide statistics + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_see_company_wide_statistics'?: boolean; + /** + * If the user can see the summary on the deals page + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_see_deals_list_summary'?: boolean; + /** + * If the user can see the names of hidden items + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_see_hidden_items_names'?: boolean; + /** + * If the user can see other users + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_see_other_users'?: boolean; + /** + * If the user can see other users\' statistics + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_see_other_users_statistics'?: boolean; + /** + * If the user can see security dashboard + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_see_security_dashboard'?: boolean; + /** + * If the user can share filters + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_share_filters'?: boolean; + /** + * If the user can share insights + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_share_insights'?: boolean; + /** + * If the user can use API + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_use_api'?: boolean; + /** + * If the user can use email tracking + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_use_email_tracking'?: boolean; + /** + * If the user can use import + * @type {boolean} + * @memberof GetUserPermissionsResponseAllOfData + */ + 'can_use_import'?: boolean; +} + diff --git a/models/get-user-permissions-response-all-of.ts b/models/get-user-permissions-response-all-of.ts new file mode 100644 index 00000000..a76004bc --- /dev/null +++ b/models/get-user-permissions-response-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 { GetUserPermissionsResponseAllOfData } from './get-user-permissions-response-all-of-data'; + +/** + * + * @export + * @interface GetUserPermissionsResponseAllOf + */ +export interface GetUserPermissionsResponseAllOf { + /** + * + * @type {GetUserPermissionsResponseAllOfData} + * @memberof GetUserPermissionsResponseAllOf + */ + 'data'?: GetUserPermissionsResponseAllOfData; +} + diff --git a/models/get-user-permissions-response.ts b/models/get-user-permissions-response.ts new file mode 100644 index 00000000..94d14ebf --- /dev/null +++ b/models/get-user-permissions-response.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 { GetUserPermissionsResponseAllOf } from './get-user-permissions-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { GetUserPermissionsResponseAllOfData } from './get-user-permissions-response-all-of-data'; + +/** + * @type GetUserPermissionsResponse + * @export + */ +export type GetUserPermissionsResponse = BaseResponse & GetUserPermissionsResponseAllOf; + + diff --git a/models/get-user-provider-link-success-response-data.ts b/models/get-user-provider-link-success-response-data.ts new file mode 100644 index 00000000..dda7ce2a --- /dev/null +++ b/models/get-user-provider-link-success-response-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 GetUserProviderLinkSuccessResponseData + */ +export interface GetUserProviderLinkSuccessResponseData { + /** + * The success message of the request + * @type {string} + * @memberof GetUserProviderLinkSuccessResponseData + */ + 'message'?: string; +} + diff --git a/models/get-user-provider-link-success-response.ts b/models/get-user-provider-link-success-response.ts new file mode 100644 index 00000000..bb498980 --- /dev/null +++ b/models/get-user-provider-link-success-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 { GetUserProviderLinkSuccessResponseData } from './get-user-provider-link-success-response-data'; + +/** + * + * @export + * @interface GetUserProviderLinkSuccessResponse + */ +export interface GetUserProviderLinkSuccessResponse { + /** + * Boolean that indicates whether the request was successful or not + * @type {boolean} + * @memberof GetUserProviderLinkSuccessResponse + */ + 'success'?: boolean; + /** + * + * @type {GetUserProviderLinkSuccessResponseData} + * @memberof GetUserProviderLinkSuccessResponse + */ + 'data'?: GetUserProviderLinkSuccessResponseData; +} + diff --git a/models/get-user-response-data.ts b/models/get-user-response-data.ts new file mode 100644 index 00000000..5cb08145 --- /dev/null +++ b/models/get-user-response-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 { BaseUser } from './base-user'; + +/** + * + * @export + * @interface GetUserResponseData + */ +export interface GetUserResponseData { + /** + * + * @type {BaseUser} + * @memberof GetUserResponseData + */ + 'data'?: BaseUser; +} + diff --git a/models/get-user-response.ts b/models/get-user-response.ts new file mode 100644 index 00000000..ed4e932d --- /dev/null +++ b/models/get-user-response.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 { BaseUser } from './base-user'; +// May contain unused imports in some cases +// @ts-ignore +import { GetUserResponseData } from './get-user-response-data'; + +/** + * @type GetUserResponse + * @export + */ +export type GetUserResponse = BaseResponse & GetUserResponseData; + + diff --git a/models/get-user-settings-response-data.ts b/models/get-user-settings-response-data.ts new file mode 100644 index 00000000..0db48ff6 --- /dev/null +++ b/models/get-user-settings-response-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 { UserSettingsItem } from './user-settings-item'; + +/** + * + * @export + * @interface GetUserSettingsResponseData + */ +export interface GetUserSettingsResponseData { + /** + * + * @type {UserSettingsItem} + * @memberof GetUserSettingsResponseData + */ + 'data'?: UserSettingsItem; +} + diff --git a/models/get-user-settings-response.ts b/models/get-user-settings-response.ts new file mode 100644 index 00000000..30a328a4 --- /dev/null +++ b/models/get-user-settings-response.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 { GetUserSettingsResponseData } from './get-user-settings-response-data'; +// May contain unused imports in some cases +// @ts-ignore +import { UserSettingsItem } from './user-settings-item'; + +/** + * @type GetUserSettingsResponse + * @export + */ +export type GetUserSettingsResponse = BaseResponse & GetUserSettingsResponseData; + + diff --git a/models/get-users-response-all-of.ts b/models/get-users-response-all-of.ts new file mode 100644 index 00000000..ff545e23 --- /dev/null +++ b/models/get-users-response-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 { BaseUser } from './base-user'; + +/** + * + * @export + * @interface GetUsersResponseAllOf + */ +export interface GetUsersResponseAllOf { + /** + * + * @type {Array} + * @memberof GetUsersResponseAllOf + */ + 'data'?: Array; +} + diff --git a/models/get-users-response.ts b/models/get-users-response.ts new file mode 100644 index 00000000..623036bf --- /dev/null +++ b/models/get-users-response.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 { BaseUser } from './base-user'; +// May contain unused imports in some cases +// @ts-ignore +import { GetUsersResponseAllOf } from './get-users-response-all-of'; + +/** + * @type GetUsersResponse + * @export + */ +export type GetUsersResponse = BaseResponse & GetUsersResponseAllOf; + + diff --git a/models/get-webhook-response-data.ts b/models/get-webhook-response-data.ts new file mode 100644 index 00000000..4f9d8a35 --- /dev/null +++ b/models/get-webhook-response-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 { BaseWebhook } from './base-webhook'; + +/** + * + * @export + * @interface GetWebhookResponseData + */ +export interface GetWebhookResponseData { + /** + * + * @type {BaseWebhook} + * @memberof GetWebhookResponseData + */ + 'data'?: BaseWebhook; +} + diff --git a/models/get-webhook-response.ts b/models/get-webhook-response.ts new file mode 100644 index 00000000..43716f02 --- /dev/null +++ b/models/get-webhook-response.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 { BaseWebhook } from './base-webhook'; +// May contain unused imports in some cases +// @ts-ignore +import { GetWebhookResponseData } from './get-webhook-response-data'; + +/** + * @type GetWebhookResponse + * @export + */ +export type GetWebhookResponse = BaseResponse & GetWebhookResponseData; + + diff --git a/models/get-webhooks-response-all-of.ts b/models/get-webhooks-response-all-of.ts new file mode 100644 index 00000000..82f56990 --- /dev/null +++ b/models/get-webhooks-response-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 { BaseWebhook } from './base-webhook'; + +/** + * + * @export + * @interface GetWebhooksResponseAllOf + */ +export interface GetWebhooksResponseAllOf { + /** + * The array of Webhooks + * @type {Array} + * @memberof GetWebhooksResponseAllOf + */ + 'data'?: Array; +} + diff --git a/models/get-webhooks-response.ts b/models/get-webhooks-response.ts new file mode 100644 index 00000000..9ed93f0e --- /dev/null +++ b/models/get-webhooks-response.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 { BaseWebhook } from './base-webhook'; +// May contain unused imports in some cases +// @ts-ignore +import { GetWebhooksResponseAllOf } from './get-webhooks-response-all-of'; + +/** + * @type GetWebhooksResponse + * @export + */ +export type GetWebhooksResponse = BaseResponse & GetWebhooksResponseAllOf; + + diff --git a/models/goal-assignee.ts b/models/goal-assignee.ts new file mode 100644 index 00000000..df8777da --- /dev/null +++ b/models/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 GoalAssignee + */ +export interface GoalAssignee { + /** + * The ID of the goal assignee + * @type {number} + * @memberof GoalAssignee + */ + 'id'?: number; + /** + * The type of the assignee + * @type {string} + * @memberof GoalAssignee + */ + 'type'?: string; +} + diff --git a/models/goal-duration.ts b/models/goal-duration.ts new file mode 100644 index 00000000..fff81134 --- /dev/null +++ b/models/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 GoalDuration + */ +export interface GoalDuration { + /** + * The start date of the goal + * @type {string} + * @memberof GoalDuration + */ + 'start'?: string; + /** + * The end date of the goal + * @type {string} + * @memberof GoalDuration + */ + 'end'?: string; +} + diff --git a/models/goal-expected-outcome.ts b/models/goal-expected-outcome.ts new file mode 100644 index 00000000..1ae08cab --- /dev/null +++ b/models/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 GoalExpectedOutcome + */ +export interface GoalExpectedOutcome { + /** + * The numeric target of the goal + * @type {number} + * @memberof GoalExpectedOutcome + */ + 'target'?: number; + /** + * The tracking metric of the goal + * @type {string} + * @memberof GoalExpectedOutcome + */ + 'tracking_metric'?: string; +} + diff --git a/models/goal-type-params.ts b/models/goal-type-params.ts new file mode 100644 index 00000000..8cd795dc --- /dev/null +++ b/models/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 GoalTypeParams + */ +export interface GoalTypeParams { + /** + * The IDs of pipelines of the goal + * @type {Array} + * @memberof GoalTypeParams + */ + 'pipeline_id'?: Array; + /** + * The IDs of activity types of the goal + * @type {Array} + * @memberof GoalTypeParams + */ + 'activity_type_id'?: Array; +} + diff --git a/models/goal-type.ts b/models/goal-type.ts new file mode 100644 index 00000000..d7389278 --- /dev/null +++ b/models/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 { GoalTypeParams } from './goal-type-params'; + +/** + * The type of the goal + * @export + * @interface GoalType + */ +export interface GoalType { + /** + * The name of the goal type + * @type {string} + * @memberof GoalType + */ + 'name'?: string; + /** + * + * @type {GoalTypeParams} + * @memberof GoalType + */ + 'params'?: GoalTypeParams; +} + diff --git a/models/goal.ts b/models/goal.ts new file mode 100644 index 00000000..5229d33f --- /dev/null +++ b/models/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 { GoalAssignee } from './goal-assignee'; +// May contain unused imports in some cases +// @ts-ignore +import { GoalDuration } from './goal-duration'; +// May contain unused imports in some cases +// @ts-ignore +import { GoalExpectedOutcome } from './goal-expected-outcome'; +// May contain unused imports in some cases +// @ts-ignore +import { GoalType } from './goal-type'; + +/** + * + * @export + * @interface Goal + */ +export interface Goal { + /** + * The ID of the goal + * @type {string} + * @memberof Goal + */ + 'id'?: string; + /** + * The ID of the creator of the goal + * @type {number} + * @memberof Goal + */ + 'owner_id'?: number; + /** + * The title of the goal + * @type {string} + * @memberof Goal + */ + 'title'?: string; + /** + * + * @type {GoalType} + * @memberof Goal + */ + 'type'?: GoalType; + /** + * + * @type {GoalAssignee} + * @memberof Goal + */ + 'assignee'?: GoalAssignee; + /** + * The interval of the goal + * @type {string} + * @memberof Goal + */ + 'interval'?: string; + /** + * + * @type {GoalDuration} + * @memberof Goal + */ + 'duration'?: GoalDuration; + /** + * + * @type {GoalExpectedOutcome} + * @memberof Goal + */ + 'expected_outcome'?: GoalExpectedOutcome; + /** + * Whether the goal is currently active or not + * @type {boolean} + * @memberof Goal + */ + 'is_active'?: boolean; + /** + * The IDs of the reports that belong to the goal + * @type {Array} + * @memberof Goal + */ + 'report_ids'?: Array; +} + diff --git a/models/index.ts b/models/index.ts new file mode 100644 index 00000000..eb1d7770 --- /dev/null +++ b/models/index.ts @@ -0,0 +1,821 @@ +export * from './activity'; +export * from './activity-all-of'; +export * from './activity-all-of1'; +export * from './activity-collection-response-object'; +export * from './activity-collection-response-object-all-of'; +export * from './activity-distribution'; +export * from './activity-distribution-data'; +export * from './activity-distribution-data-with-additional-data'; +export * from './activity-distribution-item'; +export * from './activity-type'; +export * from './activity-type-count'; +export * from './add-activity-request'; +export * from './add-activity-request-all-of'; +export * from './add-activity-response'; +export * from './add-activity-response-additional-data'; +export * from './add-activity-response-related-objects'; +export * from './add-activity-response-related-objects-person'; +export * from './add-activity-type-request'; +export * from './add-call-log-request'; +export * from './add-channel-bad-request-response'; +export * from './add-channel-bad-request-response-additional-data'; +export * from './add-channel-forbidden-error-response'; +export * from './add-channel-forbidden-error-response-additional-data'; +export * from './add-channel-request'; +export * from './add-channel-response'; +export * from './add-channel-response-data'; +export * from './add-deal-follower-request'; +export * from './add-deal-follower-response'; +export * from './add-deal-follower-response-data'; +export * from './add-deal-participant-request'; +export * from './add-deal-product-request'; +export * from './add-deal-product-request-all-of'; +export * from './add-deal-product-request-all-of1'; +export * from './add-deal-product-request-all-of2'; +export * from './add-deal-request'; +export * from './add-file-response'; +export * from './add-filter-request'; +export * from './add-filters-response'; +export * from './add-filters-response-all-of'; +export * from './add-goal-request'; +export * from './add-lead-label-request'; +export * from './add-lead-request'; +export * from './add-new-follower-response'; +export * from './add-new-follower-response-data'; +export * from './add-note-request'; +export * from './add-note-request-all-of'; +export * from './add-note-request-all-of1'; +export * from './add-or-update-role-setting-request'; +export * from './add-organization-follower-request'; +export * from './add-organization-follower-response'; +export * from './add-organization-relationship-request'; +export * from './add-organization-relationship-response'; +export * from './add-organization-relationship-response-all-of'; +export * from './add-organization-request'; +export * from './add-organization-request-all-of'; +export * from './add-organization-response'; +export * from './add-organization-response-all-of'; +export * from './add-participants-response'; +export * from './add-participants-response-data'; +export * from './add-participants-response-related-objects'; +export * from './add-person-follower-request'; +export * from './add-person-follower-response'; +export * from './add-person-follower-response-all-of'; +export * from './add-person-follower-response-all-of-data'; +export * from './add-person-picture-response'; +export * from './add-person-picture-response-all-of'; +export * from './add-person-request'; +export * from './add-person-request-all-of'; +export * from './add-person-response'; +export * from './add-person-response-all-of'; +export * from './add-pipeline-response'; +export * from './add-pipeline-response-all-of'; +export * from './add-product-follower-request'; +export * from './add-product-request'; +export * from './add-product-request-all-of'; +export * from './add-product-request-all-of1'; +export * from './add-product-request-all-of2'; +export * from './add-project-request'; +export * from './add-project-request-all-of'; +export * from './add-project-response'; +export * from './add-recurring-subscription-request'; +export * from './add-remote-file-and-link-it-to-item-response'; +export * from './add-role-assignment-request'; +export * from './add-role-assignment-response'; +export * from './add-role-assignment-response-data'; +export * from './add-role-assignment-response-data-data'; +export * from './add-role-request'; +export * from './add-roles-response'; +export * from './add-roles-response-all-of'; +export * from './add-roles-response-data'; +export * from './add-stage-request'; +export * from './add-subscription-installment-request'; +export * from './add-task-request'; +export * from './add-task-response'; +export * from './add-team-request'; +export * from './add-team-request1'; +export * from './add-team-user-request'; +export * from './add-user-provider-link-request'; +export * from './add-user-request'; +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-organization-item'; +export * from './base-organization-item-all-of'; +export * from './base-organization-item-all-of-picture-id'; +export * from './base-organization-item-with-edit-name-flag'; +export * from './base-organization-item-with-edit-name-flag-all-of'; +export * from './base-pipeline'; +export * from './base-pipeline1'; +export * from './base-pipeline-with-selected-flag'; +export * from './base-pipeline-with-selected-flag-all-of'; +export * from './base-product'; +export * from './base-response'; +export * from './base-response1'; +export * from './base-response-all-of'; +export * from './base-role-request'; +export * from './base-stage'; +export * from './base-stage1'; +export * from './base-team'; +export * from './base-team-additional-properties'; +export * from './base-user'; +export * from './base-webhook'; +export * from './basic-deal'; +export * from './basic-deal1'; +export * from './basic-deal-product-request'; +export * from './basic-deal-product-request-all-of'; +export * from './basic-goal-request'; +export * from './basic-organization'; +export * from './basic-organization1'; +export * from './basic-person-request'; +export * from './basic-person-request-email-inner'; +export * from './call-log-bad-request-response'; +export * from './call-log-conflict-response'; +export * from './call-log-forbidden-response'; +export * from './call-log-gone-response'; +export * from './call-log-internal-error-response'; +export * from './call-log-not-found-response'; +export * from './cancel-recurring-subscription-request'; +export * from './comment'; +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 './deal'; +export * from './deal-all-of'; +export * from './deal-all-of-creator-user-id'; +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-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-product-request-body'; +export * from './deal-product-request-body1'; +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-response'; +export * from './delete-activities-response-data'; +export * from './delete-activity-response'; +export * from './delete-activity-response-data'; +export * from './delete-activity-types-response'; +export * from './delete-activity-types-response-all-of'; +export * from './delete-activity-types-response-all-of-data'; +export * from './delete-channel200-response'; +export * from './delete-comment-response'; +export * from './delete-conversation-forbidden-error-response'; +export * from './delete-conversation-forbidden-error-response-additional-data'; +export * from './delete-conversation-not-found-error-response'; +export * from './delete-conversation-not-found-error-response-additional-data'; +export * from './delete-deal-follower-response'; +export * from './delete-deal-follower-response-data'; +export * from './delete-deal-participant-response'; +export * from './delete-deal-participant-response-data'; +export * from './delete-deal-product-response'; +export * from './delete-deal-product-response-data'; +export * from './delete-deal-response'; +export * from './delete-deal-response-data'; +export * from './delete-deals-response'; +export * from './delete-deals-response-data'; +export * from './delete-fields-response'; +export * from './delete-fields-response-all-of'; +export * from './delete-fields-response-all-of-data'; +export * from './delete-file-response'; +export * from './delete-file-response-data'; +export * from './delete-filter-response'; +export * from './delete-filter-response-all-of'; +export * from './delete-filter-response-all-of-data'; +export * from './delete-filters-response'; +export * from './delete-filters-response-all-of'; +export * from './delete-filters-response-all-of-data'; +export * from './delete-goal-response'; +export * from './delete-lead-id-response'; +export * from './delete-mail-thread-response'; +export * from './delete-mail-thread-response-all-of'; +export * from './delete-mail-thread-response-all-of-data'; +export * from './delete-note-response'; +export * from './delete-organization-follower-response'; +export * from './delete-organization-follower-response-data'; +export * from './delete-organization-relationship-response'; +export * from './delete-organization-relationship-response-all-of'; +export * from './delete-organization-relationship-response-all-of-data'; +export * from './delete-organization-response'; +export * from './delete-organization-response-data'; +export * from './delete-organizations-response'; +export * from './delete-organizations-response-data'; +export * from './delete-person-response'; +export * from './delete-person-response-all-of'; +export * from './delete-person-response-all-of-data'; +export * from './delete-persons-response'; +export * from './delete-persons-response-all-of'; +export * from './delete-persons-response-all-of-data'; +export * from './delete-pipeline-response'; +export * from './delete-pipeline-response-data'; +export * from './delete-product-field-response'; +export * from './delete-product-fields-response'; +export * from './delete-product-fields-response-data'; +export * from './delete-product-follower-response'; +export * from './delete-product-response'; +export * from './delete-product-response-data'; +export * from './delete-project'; +export * from './delete-project-data'; +export * from './delete-project-response'; +export * from './delete-response'; +export * from './delete-response-all-of'; +export * from './delete-response-all-of-data'; +export * from './delete-role-assignment-request'; +export * from './delete-role-assignment-response'; +export * from './delete-role-assignment-response-data'; +export * from './delete-role-response'; +export * from './delete-role-response-data'; +export * from './delete-role-response-data-data'; +export * from './delete-stage-response'; +export * from './delete-stage-response-data'; +export * from './delete-stages-response'; +export * from './delete-stages-response-data'; +export * from './delete-task'; +export * from './delete-task-data'; +export * from './delete-task-response'; +export * from './delete-team-user-request'; +export * from './delete-webhook403-response'; +export * from './delete-webhook403-response-all-of'; +export * from './fail-response'; +export * from './field'; +export * from './filter'; +export * from './follower-data'; +export * from './full-role'; +export * from './full-role-all-of'; +export * from './get-activities-collection-response'; +export * from './get-activities-collection-response-additional-data'; +export * from './get-activities-response'; +export * from './get-activities-response-additional-data'; +export * from './get-activities-response-additional-data-pagination'; +export * from './get-activities-response-related-objects'; +export * from './get-activities-response-related-objects-person'; +export * from './get-activities-response-related-objects-user'; +export * from './get-activity-response'; +export * from './get-activity-types-response'; +export * from './get-activity-types-response-all-of'; +export * from './get-add-product-attachment-details-response'; +export * from './get-add-product-attachment-details-response-data'; +export * from './get-add-product-attachment-details-response-data-all-of'; +export * from './get-add-product-attachment-details-response-data-all-of-all-of'; +export * from './get-add-product-attachment-details-response-data-all-of-all-of1'; +export * from './get-add-product-attachment-details-response-data-all-of-all-of-all-of'; +export * from './get-added-deal-response'; +export * from './get-associated-activities-response'; +export * from './get-associated-activities-response-all-of'; +export * from './get-associated-deals-response'; +export * from './get-associated-deals-response-all-of'; +export * from './get-associated-deals-response-all-of-related-objects'; +export * from './get-associated-files-response'; +export * from './get-associated-files-response-all-of'; +export * from './get-associated-files-response-all-of-data-inner'; +export * from './get-associated-followers-response'; +export * from './get-associated-followers-response-data-inner'; +export * from './get-associated-followers-response-data-inner-all-of'; +export * from './get-associated-followers-response-data-inner-all-of1'; +export * from './get-associated-mail-messages-response'; +export * from './get-associated-mail-messages-response-all-of'; +export * from './get-associated-mail-messages-response-all-of-data-inner'; +export * from './get-associated-organization-updates-response'; +export * from './get-associated-organization-updates-response-all-of'; +export * from './get-associated-organization-updates-response-all-of-data-inner'; +export * from './get-associated-organization-updates-response-all-of-related-objects'; +export * from './get-associated-person-updates-response'; +export * from './get-associated-person-updates-response-all-of'; +export * from './get-associated-person-updates-response-all-of-data-inner'; +export * from './get-associated-product-files-response'; +export * from './get-associated-product-files-response-all-of'; +export * from './get-associated-product-files-response-all-of-data-inner'; +export * from './get-call-log-response'; +export * from './get-call-logs-response'; +export * from './get-call-logs-response-additional-data'; +export * from './get-changelog-response'; +export * from './get-changelog-response-all-of'; +export * from './get-changelog-response-all-of-data-inner'; +export * from './get-comments-response'; +export * from './get-currencies-response'; +export * from './get-currencies-response-data-inner'; +export * from './get-current-user-response'; +export * from './get-current-user-response-all-of'; +export * from './get-current-user-response-all-of-data'; +export * from './get-current-user-response-all-of-data-all-of'; +export * from './get-current-user-response-all-of-data-all-of-language'; +export * from './get-deal-activities-response'; +export * from './get-deal-activities-response-all-of'; +export * from './get-deal-activities-response-all-of-related-objects'; +export * from './get-deal-participants-response'; +export * from './get-deal-response'; +export * from './get-deal-response-additional-data'; +export * from './get-deal-response-related-objects'; +export * from './get-deal-search-response'; +export * from './get-deal-search-response-all-of'; +export * from './get-deal-search-response-all-of-data'; +export * from './get-deal-search-response-all-of-data-items-inner'; +export * from './get-deal-search-response-all-of-data-items-inner-item'; +export * from './get-deal-search-response-all-of-data-items-inner-item-organization'; +export * from './get-deal-search-response-all-of-data-items-inner-item-owner'; +export * from './get-deal-search-response-all-of-data-items-inner-item-person'; +export * from './get-deal-search-response-all-of-data-items-inner-item-stage'; +export * from './get-deal-updates-response'; +export * from './get-deal-updates-response-all-of'; +export * from './get-deal-updates-response-all-of-data-inner'; +export * from './get-deal-updates-response-all-of-related-objects'; +export * from './get-deals-collection-response'; +export * from './get-deals-response'; +export * from './get-deals-response-related-objects'; +export * from './get-deals-summary-response'; +export * from './get-deals-summary-response-data'; +export * from './get-deals-summary-response-data-values-total'; +export * from './get-deals-summary-response-data-weighted-values-total'; +export * from './get-deals-timeline-response'; +export * from './get-deals-timeline-response-data'; +export * from './get-deals-timeline-response-data-totals'; +export * from './get-duplicated-deal-response'; +export * from './get-field'; +export * from './get-field-all-of'; +export * from './get-field-response'; +export * from './get-field-response-all-of'; +export * from './get-fields-response'; +export * from './get-fields-response-all-of'; +export * from './get-fields-response-all-of-additional-data'; +export * from './get-file-response'; +export * from './get-files-response'; +export * from './get-files-response-additional-data'; +export * from './get-files-response-data-inner'; +export * from './get-filters-response'; +export * from './get-filters-response1'; +export * from './get-filters-response1-all-of'; +export * from './get-filters-response-all-of'; +export * from './get-filters-response-all-of-data-inner'; +export * from './get-goal-result-response'; +export * from './get-goal-result-response-data'; +export * from './get-goals-response'; +export * from './get-goals-response-data'; +export * from './get-item-search-field-response'; +export * from './get-item-search-field-response-all-of'; +export * from './get-item-search-field-response-all-of-data-inner'; +export * from './get-item-search-response'; +export * from './get-item-search-response-all-of'; +export * from './get-item-search-response-all-of-data'; +export * from './get-lead-id-response'; +export * from './get-lead-id-response-data'; +export * from './get-lead-labels-response'; +export * from './get-lead-response'; +export * from './get-lead-search-response'; +export * from './get-lead-search-response-all-of'; +export * from './get-lead-search-response-all-of-data'; +export * from './get-leads-response'; +export * from './get-leads-source-response'; +export * from './get-link-remote-file-to-item-response'; +export * from './get-list-followers-response'; +export * from './get-list-followers-response-all-of'; +export * from './get-list-followers-response-all-of-data-inner'; +export * from './get-mail-message-response'; +export * from './get-mail-message-response-all-of'; +export * from './get-mail-thread-messages-response'; +export * from './get-mail-thread-messages-response-all-of'; +export * from './get-mail-thread-messages-response-all-of-data-inner'; +export * from './get-mail-thread-messages-response-all-of-data-inner-all-of'; +export * from './get-mail-thread-response'; +export * from './get-mail-thread-response1'; +export * from './get-mail-thread-response1-all-of'; +export * from './get-mail-thread-response1-all-of-data'; +export * from './get-mail-thread-response-all-of'; +export * from './get-merged-deal-response'; +export * from './get-merged-deal-response-data'; +export * from './get-merged-deal-response-data-all-of'; +export * from './get-note-fields-response'; +export * from './get-note-fields-response-all-of'; +export * from './get-note-fields-response-all-of-data-inner'; +export * from './get-note-fields-response-all-of-data-inner-all-of'; +export * from './get-note-fields-response-all-of-data-inner-all-of-options-inner'; +export * from './get-notes-response'; +export * from './get-notes-response-additional-data'; +export * from './get-notes-response-additional-data-pagination'; +export * from './get-organization-item'; +export * from './get-organization-item-all-of'; +export * from './get-organization-relationship-response'; +export * from './get-organization-relationship-response-all-of'; +export * from './get-organization-relationships-response'; +export * from './get-organization-relationships-response-all-of'; +export * from './get-organization-relationships-response-all-of-related-objects'; +export * from './get-organization-response'; +export * from './get-organization-response-all-of'; +export * from './get-organization-response-all-of-additional-data'; +export * from './get-organization-response-all-of-additional-data-followers'; +export * from './get-organization-response-all-of-additional-data-followers-followeruserid'; +export * from './get-organization-response-all-of-additional-data-followers-followeruseridall-of'; +export * from './get-organization-response-all-of-additional-data-followers-followeruseridall-of-all-of'; +export * from './get-organization-search-response'; +export * from './get-organization-search-response-all-of'; +export * from './get-organization-search-response-all-of-data'; +export * from './get-organization-search-response-all-of-data-items-inner'; +export * from './get-organization-search-response-all-of-data-items-inner-item'; +export * from './get-organizations-collection200-response'; +export * from './get-organizations-collection-response-object'; +export * from './get-organizations-collection-response-object-all-of'; +export * from './get-organizations-response'; +export * from './get-organizations-response-all-of'; +export * from './get-organizations-response-all-of-related-objects'; +export * from './get-participants-changelog-response'; +export * from './get-payments-response'; +export * from './get-payments-response-all-of'; +export * from './get-payments-response-all-of-data-inner'; +export * from './get-permission-set-response'; +export * from './get-permission-set-response-all-of'; +export * from './get-permission-sets-response'; +export * from './get-permission-sets-response-all-of'; +export * from './get-permitted-users-response'; +export * from './get-permitted-users-response1'; +export * from './get-permitted-users-response1-all-of'; +export * from './get-person-details-response'; +export * from './get-person-details-response-all-of'; +export * from './get-person-details-response-all-of-additional-data'; +export * from './get-person-products-response'; +export * from './get-person-products-response-all-of'; +export * from './get-person-products-response-all-of-data-inner'; +export * from './get-person-products-response-all-of-data-inner-dealid'; +export * from './get-person-products-response-all-of-data-inner-dealiddeal'; +export * from './get-person-products-response-all-of-data-inner-dealidproduct'; +export * from './get-person-search-response'; +export * from './get-person-search-response-all-of'; +export * from './get-person-search-response-all-of-data'; +export * from './get-person-search-response-all-of-data-items-inner'; +export * from './get-person-search-response-all-of-data-items-inner-item'; +export * from './get-person-search-response-all-of-data-items-inner-item-organization'; +export * from './get-person-search-response-all-of-data-items-inner-item-owner'; +export * from './get-persons-collection200-response'; +export * from './get-persons-response'; +export * from './get-persons-response1'; +export * from './get-persons-response1-all-of'; +export * from './get-persons-response-all-of'; +export * from './get-persons-response-all-of-related-objects'; +export * from './get-pipeline-deals-conversion-rates-in-response'; +export * from './get-pipeline-deals-conversion-rates-in-response-all-of'; +export * from './get-pipeline-deals-conversion-rates-in-response-all-of-data'; +export * from './get-pipeline-deals-conversion-rates-in-response-all-of-data-stage-conversions-inner'; +export * from './get-pipeline-deals-movements-statistics-response'; +export * from './get-pipeline-deals-movements-statistics-response-all-of'; +export * from './get-pipeline-deals-movements-statistics-response-all-of-data'; +export * from './get-pipeline-deals-movements-statistics-response-all-of-data-average-age-in-days'; +export * from './get-pipeline-deals-movements-statistics-response-all-of-data-average-age-in-days-by-stages-inner'; +export * from './get-pipeline-deals-movements-statistics-response-all-of-data-movements-between-stages'; +export * from './get-pipeline-deals-movements-statistics-response-all-of-data-new-deals'; +export * from './get-pipeline-deals-movements-statistics-response-all-of-data-new-deals-formatted-values'; +export * from './get-pipeline-deals-movements-statistics-response-all-of-data-new-deals-values'; +export * from './get-pipeline-response'; +export * from './get-pipeline-response-all-of'; +export * from './get-pipelines-response'; +export * from './get-pipelines-response-all-of'; +export * from './get-product-attachment-details-response'; +export * from './get-product-attachment-details-response-data'; +export * from './get-product-field-response'; +export * from './get-product-field-response-data'; +export * from './get-product-fields-response'; +export * from './get-product-fields-response-data-inner'; +export * from './get-product-followers-response'; +export * from './get-product-followers-response-all-of'; +export * from './get-product-followers-response-all-of-data-inner'; +export * from './get-product-response'; +export * from './get-product-search-response'; +export * from './get-product-search-response-all-of'; +export * from './get-product-search-response-all-of-data'; +export * from './get-product-search-response-all-of-data-items-inner'; +export * from './get-product-search-response-all-of-data-items-inner-item'; +export * from './get-product-search-response-all-of-data-items-inner-item-owner'; +export * from './get-products-response'; +export * from './get-products-response1'; +export * from './get-products-response1-additional-data'; +export * from './get-products-response-all-of'; +export * from './get-products-response-all-of-additional-data'; +export * from './get-products-response-all-of-additional-data-all-of'; +export * from './get-products-response-all-of-related-objects'; +export * from './get-project-board-response'; +export * from './get-project-boards-response'; +export * from './get-project-boards-response-data-inner'; +export * from './get-project-groups-response'; +export * from './get-project-groups-response-data-inner'; +export * from './get-project-phase-response'; +export * from './get-project-phases-response'; +export * from './get-project-phases-response-data-inner'; +export * from './get-project-plan-response'; +export * from './get-project-plan-response-data-inner'; +export * from './get-project-response'; +export * from './get-project-template-response'; +export * from './get-project-templates-response'; +export * from './get-projects-response'; +export * from './get-receive-message-success-response'; +export * from './get-recents-response'; +export * from './get-recents-response-additional-data'; +export * from './get-role-assignments-response'; +export * from './get-role-assignments-response-data'; +export * from './get-role-pipelines-response'; +export * from './get-role-pipelines-response-all-of'; +export * from './get-role-pipelines-response-data'; +export * from './get-role-response'; +export * from './get-role-response-data'; +export * from './get-role-response-data-additional-data'; +export * from './get-role-settings-response'; +export * from './get-role-settings-response-data'; +export * from './get-roles-response'; +export * from './get-roles-response-all-of'; +export * from './get-roles-response-all-of-additional-data'; +export * from './get-roles-response-all-of-additional-data-pagination'; +export * from './get-stage-deals-response'; +export * from './get-stage-response'; +export * from './get-stage-response-data'; +export * from './get-stages-response'; +export * from './get-stages-response-data-inner'; +export * from './get-subscription-addons-response'; +export * from './get-subscription-addons-response-all-of'; +export * from './get-subscriptions-id-response'; +export * from './get-subscriptions-id-response-data'; +export * from './get-task-response'; +export * from './get-tasks-response'; +export * from './get-team-response'; +export * from './get-team-response-all-of'; +export * from './get-teams-response'; +export * from './get-teams-response-all-of'; +export * from './get-user-assignments-to-permission-set-response'; +export * from './get-user-assignments-to-permission-set-response-all-of'; +export * from './get-user-assignments-to-permission-set-response-all-of-data-inner'; +export * from './get-user-connections-response'; +export * from './get-user-connections-response-data'; +export * from './get-user-connections-response-data-data'; +export * from './get-user-permissions-response'; +export * from './get-user-permissions-response-all-of'; +export * from './get-user-permissions-response-all-of-data'; +export * from './get-user-provider-link-success-response'; +export * from './get-user-provider-link-success-response-data'; +export * from './get-user-response'; +export * from './get-user-response-data'; +export * from './get-user-settings-response'; +export * from './get-user-settings-response-data'; +export * from './get-users-response'; +export * from './get-users-response-all-of'; +export * from './get-webhook-response'; +export * from './get-webhook-response-data'; +export * from './get-webhooks-response'; +export * from './get-webhooks-response-all-of'; +export * from './goal'; +export * from './goal-assignee'; +export * from './goal-duration'; +export * from './goal-expected-outcome'; +export * from './goal-type'; +export * from './goal-type-params'; +export * from './lead'; +export * from './lead-label'; +export * from './lead-not-found-response'; +export * from './lead-search-item'; +export * from './lead-search-item-item'; +export * from './lead-search-item-item-organization'; +export * from './lead-search-item-item-owner'; +export * from './lead-search-item-item-person'; +export * from './lead-source'; +export * from './lead-value'; +export * from './mail-message-data'; +export * from './mail-message-data-from-inner'; +export * from './mail-message-item-for-list'; +export * from './mail-message-item-for-list-all-of'; +export * from './mail-service-base-response'; +export * from './mail-thread'; +export * from './mail-thread1'; +export * from './mail-thread-all-of'; +export * from './mail-thread-all-of1'; +export * from './mail-thread-all-of1-parties'; +export * from './mail-thread-all-of1-parties-to-inner'; +export * from './merge-deals-request'; +export * from './merge-organizations-request'; +export * from './merge-organizations-response'; +export * from './merge-organizations-response-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-response'; +export * from './merge-persons-response-all-of'; +export * from './new-deal-parameters'; +export * from './note'; +export * from './note-deal'; +export * from './note-organization'; +export * from './note-person'; +export * from './note-request'; +export * from './note-request-all-of'; +export * from './note-request-all-of1'; +export * from './note-user'; +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-data-with-id'; +export * from './organization-data-with-id-all-of'; +export * from './organization-data-with-id-all-of1'; +export * from './organization-data-with-id-and-active-flag'; +export * from './organization-data-with-id-and-active-flag-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 './owner'; +export * from './owner-all-of'; +export * from './pagination-details'; +export * from './pagination-details-all-of'; +export * from './participant-changelog-item'; +export * from './participant-changelog-item-all-of'; +export * from './permission-set'; +export * from './person'; +export * from './person-all-of'; +export * from './person-all-of-email-inner'; +export * from './person-all-of-phone-inner'; +export * from './person-all-of-picture-id'; +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-data-with-active-flag'; +export * from './person-data-with-active-flag-all-of'; +export * from './person-data-with-id'; +export * from './person-data-with-idall-of'; +export * from './person-data-with-idall-of-email-inner'; +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 './phone-data'; +export * from './picture-data'; +export * from './picture-data-pictures'; +export * from './picture-data-with-id'; +export * from './picture-data-with-value'; +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 './product-field'; +export * from './product-field-all-of'; +export * from './product-field-all-of1'; +export * from './product-list-item'; +export * from './product-list-item-product'; +export * from './product-prices'; +export * from './product-request'; +export * from './product-request1'; +export * from './project'; +export * from './project-all-of'; +export * from './project-all-of1'; +export * from './project-all-of2'; +export * from './project-id'; +export * from './project-put-plan-item-body-object'; +export * from './project-response-object'; +export * from './project-template'; +export * from './put-role-pipelines-body'; +export * from './receive-message-bad-request-error-response'; +export * from './receive-message-bad-request-error-response-additional-data'; +export * from './receive-message-request'; +export * from './receive-message-request-attachments-inner'; +export * from './recents-data-inner'; +export * from './recents-data-inner-any-of'; +export * from './recents-data-inner-any-of1'; +export * from './recents-data-inner-any-of10'; +export * from './recents-data-inner-any-of2'; +export * from './recents-data-inner-any-of3'; +export * from './recents-data-inner-any-of4'; +export * from './recents-data-inner-any-of5'; +export * from './recents-data-inner-any-of6'; +export * from './recents-data-inner-any-of7'; +export * from './recents-data-inner-any-of8'; +export * from './recents-data-inner-any-of9'; +export * from './recents-data-inner-any-of9-data'; +export * from './recents-stage'; +export * from './related-deal-data'; +export * from './related-deal-data-dealid'; +export * from './related-organization-data'; +export * from './related-organization-data-with-active-flag'; +export * from './related-picture-data'; +export * from './related-picture-data-pictureid'; +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 './relationship-organization-info-item-with-active-flag-all-of'; +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-data'; +export * from './role-settings'; +export * from './search-item'; +export * from './stage'; +export * from './stage-details-data'; +export * from './stage-with-pipeline-info'; +export * from './sub-role'; +export * from './sub-role-all-of'; +export * from './subscription-item'; +export * from './task-response-object'; +export * from './task-response-object-all-of'; +export * from './team-id'; +export * from './template-response-object'; +export * from './unathorized-response'; +export * from './update-activity-plan-item-response'; +export * from './update-activity-request'; +export * from './update-activity-request-all-of'; +export * from './update-activity-response'; +export * from './update-activity-type-request'; +export * from './update-deal-parameters'; +export * from './update-deal-product-request'; +export * from './update-deal-product-request-all-of'; +export * from './update-deal-request'; +export * from './update-field-request'; +export * from './update-file-response'; +export * from './update-filter-request'; +export * from './update-lead-label-request'; +export * from './update-lead-request'; +export * from './update-mail-thread-response'; +export * from './update-mail-thread-response-all-of'; +export * from './update-organization-relationship-response'; +export * from './update-organization-request'; +export * from './update-organization-request-all-of'; +export * from './update-organization-response'; +export * from './update-organization-response-all-of'; +export * from './update-person-request'; +export * from './update-person-request-all-of'; +export * from './update-person-response'; +export * from './update-pipeline-response'; +export * from './update-pipeline-response-all-of'; +export * from './update-pipeline-response-all-of-data'; +export * from './update-product-field-response'; +export * from './update-product-request'; +export * from './update-product-request-all-of'; +export * from './update-product-request-all-of1'; +export * from './update-product-response'; +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-response'; +export * from './update-recurring-subscription-request'; +export * from './update-role-response'; +export * from './update-role-response-all-of'; +export * from './update-role-response-data'; +export * from './update-stage-request'; +export * from './update-stage-request-all-of'; +export * from './update-subscription-installment-request'; +export * from './update-task-plan-item-response'; +export * from './update-task-response'; +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 './upsert-activity-type-response'; +export * from './upsert-activity-type-response-all-of'; +export * from './upsert-comment-response'; +export * from './upsert-goal-response'; +export * from './upsert-goal-response-data'; +export * from './upsert-lead-label-response'; +export * from './upsert-note-response'; +export * from './upsert-role-settings-response'; +export * from './upsert-role-settings-response-data'; +export * from './upsert-role-settings-response-data-data'; +export * from './upsert-stage-response'; +export * from './user-access'; +export * from './user-access1'; +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-provider-link-error-response'; +export * from './user-settings-item'; +export * from './webhooks-bad-request-response'; +export * from './webhooks-bad-request-response-all-of'; diff --git a/models/lead-label.ts b/models/lead-label.ts new file mode 100644 index 00000000..254c76de --- /dev/null +++ b/models/lead-label.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 LeadLabel + */ +export interface LeadLabel { + /** + * The unique ID of the lead label + * @type {string} + * @memberof LeadLabel + */ + 'id'?: string; + /** + * The name of the lead label + * @type {string} + * @memberof LeadLabel + */ + 'name'?: string; + /** + * The color of the label. Only a subset of colors can be used. + * @type {string} + * @memberof LeadLabel + */ + 'color'?: LeadLabelColorConst; + /** + * The date and time of when the lead label was created. In ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. + * @type {string} + * @memberof LeadLabel + */ + '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 LeadLabel + */ + 'update_time'?: string; +} + +export const LeadLabelColorConst = { + green: 'green', + blue: 'blue', + red: 'red', + yellow: 'yellow', + purple: 'purple', + gray: 'gray' +} as const; + +export type LeadLabelColorConst = typeof LeadLabelColorConst[keyof typeof LeadLabelColorConst]; + + diff --git a/models/lead-not-found-response.ts b/models/lead-not-found-response.ts new file mode 100644 index 00000000..b286f255 --- /dev/null +++ b/models/lead-not-found-response.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 LeadNotFoundResponse + */ +export interface LeadNotFoundResponse { + /** + * + * @type {boolean} + * @memberof LeadNotFoundResponse + */ + 'success'?: boolean; + /** + * The description of the error + * @type {string} + * @memberof LeadNotFoundResponse + */ + 'error'?: string; + /** + * A message describing how to solve the problem + * @type {string} + * @memberof LeadNotFoundResponse + */ + 'error_info'?: string; + /** + * + * @type {object} + * @memberof LeadNotFoundResponse + */ + 'data'?: object | null; + /** + * + * @type {object} + * @memberof LeadNotFoundResponse + */ + 'additional_data'?: object | null; +} + diff --git a/models/lead-search-item-item-organization.ts b/models/lead-search-item-item-organization.ts new file mode 100644 index 00000000..8990430e --- /dev/null +++ b/models/lead-search-item-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 LeadSearchItemItemOrganization + */ +export interface LeadSearchItemItemOrganization { + /** + * The ID of the organization the lead is associated with + * @type {number} + * @memberof LeadSearchItemItemOrganization + */ + 'id'?: number; + /** + * The name of the organization the lead is associated with + * @type {string} + * @memberof LeadSearchItemItemOrganization + */ + 'name'?: string; +} + diff --git a/models/lead-search-item-item-owner.ts b/models/lead-search-item-item-owner.ts new file mode 100644 index 00000000..d9f4067e --- /dev/null +++ b/models/lead-search-item-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 LeadSearchItemItemOwner + */ +export interface LeadSearchItemItemOwner { + /** + * The ID of the owner of the lead + * @type {number} + * @memberof LeadSearchItemItemOwner + */ + 'id'?: number; +} + diff --git a/models/lead-search-item-item-person.ts b/models/lead-search-item-item-person.ts new file mode 100644 index 00000000..13de0aed --- /dev/null +++ b/models/lead-search-item-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 LeadSearchItemItemPerson + */ +export interface LeadSearchItemItemPerson { + /** + * The ID of the person the lead is associated with + * @type {number} + * @memberof LeadSearchItemItemPerson + */ + 'id'?: number; + /** + * The name of the person the lead is associated with + * @type {string} + * @memberof LeadSearchItemItemPerson + */ + 'name'?: string; +} + diff --git a/models/lead-search-item-item.ts b/models/lead-search-item-item.ts new file mode 100644 index 00000000..697e391f --- /dev/null +++ b/models/lead-search-item-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 { LeadSearchItemItemOrganization } from './lead-search-item-item-organization'; +// May contain unused imports in some cases +// @ts-ignore +import { LeadSearchItemItemOwner } from './lead-search-item-item-owner'; +// May contain unused imports in some cases +// @ts-ignore +import { LeadSearchItemItemPerson } from './lead-search-item-item-person'; + +/** + * + * @export + * @interface LeadSearchItemItem + */ +export interface LeadSearchItemItem { + /** + * The ID of the lead + * @type {string} + * @memberof LeadSearchItemItem + */ + 'id'?: string; + /** + * The type of the item + * @type {string} + * @memberof LeadSearchItemItem + */ + 'type'?: string; + /** + * The title of the lead + * @type {string} + * @memberof LeadSearchItemItem + */ + 'title'?: string; + /** + * + * @type {LeadSearchItemItemOwner} + * @memberof LeadSearchItemItem + */ + 'owner'?: LeadSearchItemItemOwner; + /** + * + * @type {LeadSearchItemItemPerson} + * @memberof LeadSearchItemItem + */ + 'person'?: LeadSearchItemItemPerson; + /** + * + * @type {LeadSearchItemItemOrganization} + * @memberof LeadSearchItemItem + */ + 'organization'?: LeadSearchItemItemOrganization; + /** + * + * @type {Array} + * @memberof LeadSearchItemItem + */ + 'phones'?: Array; + /** + * + * @type {Array} + * @memberof LeadSearchItemItem + */ + 'emails'?: Array; + /** + * Custom fields + * @type {Array} + * @memberof LeadSearchItemItem + */ + 'custom_fields'?: Array; + /** + * An array of notes + * @type {Array} + * @memberof LeadSearchItemItem + */ + 'notes'?: Array; + /** + * The value of the lead + * @type {number} + * @memberof LeadSearchItemItem + */ + 'value'?: number; + /** + * The currency of the lead + * @type {string} + * @memberof LeadSearchItemItem + */ + 'currency'?: string; + /** + * The visibility of the lead + * @type {number} + * @memberof LeadSearchItemItem + */ + 'visible_to'?: number; + /** + * A flag indicating whether the lead is archived or not + * @type {boolean} + * @memberof LeadSearchItemItem + */ + 'is_archived'?: boolean; +} + diff --git a/models/lead-search-item.ts b/models/lead-search-item.ts new file mode 100644 index 00000000..0d64e9bf --- /dev/null +++ b/models/lead-search-item.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 { LeadSearchItemItem } from './lead-search-item-item'; + +/** + * + * @export + * @interface LeadSearchItem + */ +export interface LeadSearchItem { + /** + * Search result relevancy + * @type {number} + * @memberof LeadSearchItem + */ + 'result_score'?: number; + /** + * + * @type {LeadSearchItemItem} + * @memberof LeadSearchItem + */ + 'item'?: LeadSearchItemItem; +} + diff --git a/models/lead-source.ts b/models/lead-source.ts new file mode 100644 index 00000000..c85db640 --- /dev/null +++ b/models/lead-source.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 LeadSource + */ +export interface LeadSource { + /** + * The unique name of a lead source + * @type {string} + * @memberof LeadSource + */ + 'name'?: string; +} + diff --git a/models/lead-value.ts b/models/lead-value.ts new file mode 100644 index 00000000..2de558ac --- /dev/null +++ b/models/lead-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 represented by a JSON object: `{ \"amount\": 200, \"currency\": \"EUR\" }`. Both amount and currency are required. + * @export + * @interface LeadValue + */ +export interface LeadValue { + /** + * + * @type {number} + * @memberof LeadValue + */ + 'amount': number; + /** + * + * @type {string} + * @memberof LeadValue + */ + 'currency': string; +} + diff --git a/models/lead.ts b/models/lead.ts new file mode 100644 index 00000000..adf35d2d --- /dev/null +++ b/models/lead.ts @@ -0,0 +1,163 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { LeadValue } from './lead-value'; + +/** + * + * @export + * @interface Lead + */ +export interface Lead { + /** + * The unique ID of the lead in the UUID format + * @type {string} + * @memberof Lead + */ + 'id'?: string; + /** + * The title of the lead + * @type {string} + * @memberof Lead + */ + 'title'?: string; + /** + * The ID of the user who owns the lead + * @type {number} + * @memberof Lead + */ + 'owner_id'?: number; + /** + * The ID of the user who created the lead + * @type {number} + * @memberof Lead + */ + 'creator_id'?: number; + /** + * The IDs of the lead labels which are associated with the lead + * @type {Array} + * @memberof Lead + */ + 'label_ids'?: Array; + /** + * The ID of a person which this lead is linked to + * @type {number} + * @memberof Lead + */ + 'person_id'?: number | null; + /** + * The ID of an organization which this lead is linked to + * @type {number} + * @memberof Lead + */ + '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 Lead + */ + 'source_name'?: string; + /** + * The way this Lead was created. `origin` field is set by Pipedrive when Lead is created and cannot be changed. + * @type {string} + * @memberof Lead + */ + 'origin'?: string; + /** + * The optional ID to further distinguish the origin of the lead - e.g. Which API integration created this Lead. + * @type {string} + * @memberof Lead + */ + 'origin_id'?: string | null; + /** + * The ID of your Marketing channel this Lead was created from. Recognized Marketing channels can be configured in your Company settings. + * @type {number} + * @memberof Lead + */ + 'channel'?: number | null; + /** + * The optional ID to further distinguish the Marketing channel. + * @type {string} + * @memberof Lead + */ + 'channel_id'?: string | null; + /** + * A flag indicating whether the lead is archived or not + * @type {boolean} + * @memberof Lead + */ + 'is_archived'?: boolean; + /** + * A flag indicating whether the lead was seen by someone in the Pipedrive UI + * @type {boolean} + * @memberof Lead + */ + 'was_seen'?: boolean; + /** + * + * @type {LeadValue} + * @memberof Lead + */ + 'value'?: LeadValue | 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 Lead + */ + 'expected_close_date'?: string | null; + /** + * The ID of the next activity associated with the lead + * @type {number} + * @memberof Lead + */ + '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 Lead + */ + '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 Lead + */ + 'update_time'?: string; + /** + * + * @type {string} + * @memberof Lead + */ + 'visible_to'?: LeadVisibleToConst; + /** + * The BCC email of the lead + * @type {string} + * @memberof Lead + */ + 'cc_email'?: string; +} + +export const LeadVisibleToConst = { + _1: '1', + _3: '3', + _5: '5', + _7: '7' +} as const; + +export type LeadVisibleToConst = typeof LeadVisibleToConst[keyof typeof LeadVisibleToConst]; + + diff --git a/models/mail-message-data-from-inner.ts b/models/mail-message-data-from-inner.ts new file mode 100644 index 00000000..ae2addff --- /dev/null +++ b/models/mail-message-data-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 MailMessageDataFromInner + */ +export interface MailMessageDataFromInner { + /** + * ID of the mail participant + * @type {number} + * @memberof MailMessageDataFromInner + */ + 'id'?: number; + /** + * Mail address of the mail participant + * @type {string} + * @memberof MailMessageDataFromInner + */ + 'email_address'?: string; + /** + * Name of the mail participant + * @type {string} + * @memberof MailMessageDataFromInner + */ + 'name'?: string; + /** + * ID of the linked person to the mail message + * @type {number} + * @memberof MailMessageDataFromInner + */ + 'linked_person_id'?: number; + /** + * Name of the linked person to the mail message + * @type {string} + * @memberof MailMessageDataFromInner + */ + 'linked_person_name'?: string; + /** + * ID of the mail message participant + * @type {number} + * @memberof MailMessageDataFromInner + */ + 'mail_message_party_id'?: number; +} + diff --git a/models/mail-message-data.ts b/models/mail-message-data.ts new file mode 100644 index 00000000..d3e44889 --- /dev/null +++ b/models/mail-message-data.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 { MailMessageDataFromInner } from './mail-message-data-from-inner'; + +/** + * + * @export + * @interface MailMessageData + */ +export interface MailMessageData { + /** + * ID of the mail message. + * @type {number} + * @memberof MailMessageData + */ + 'id'?: number; + /** + * The array of mail message sender (object) + * @type {Array} + * @memberof MailMessageData + */ + 'from'?: Array; + /** + * The array of mail message receiver (object) + * @type {Array} + * @memberof MailMessageData + */ + 'to'?: Array; + /** + * The array of mail message copies (object) + * @type {Array} + * @memberof MailMessageData + */ + 'cc'?: Array; + /** + * The array of mail message blind copies (object) + * @type {Array} + * @memberof MailMessageData + */ + 'bcc'?: Array; + /** + * The mail message body URL + * @type {string} + * @memberof MailMessageData + */ + 'body_url'?: string; + /** + * The connection account ID + * @type {string} + * @memberof MailMessageData + */ + 'account_id'?: string; + /** + * ID of the user whom mail message will be assigned to + * @type {number} + * @memberof MailMessageData + */ + 'user_id'?: number; + /** + * ID of the mail message thread + * @type {number} + * @memberof MailMessageData + */ + 'mail_thread_id'?: number; + /** + * The subject of mail message + * @type {string} + * @memberof MailMessageData + */ + 'subject'?: string; + /** + * The snippet of mail message. Snippet length is up to 225 characters. + * @type {string} + * @memberof MailMessageData + */ + 'snippet'?: string; + /** + * The status of tracking mail message. Value is `null` if tracking is not enabled. + * @type {string} + * @memberof MailMessageData + */ + 'mail_tracking_status'?: MailMessageDataMailTrackingStatusConst; + /** + * + * @type {number} + * @memberof MailMessageData + */ + 'mail_link_tracking_enabled_flag'?: MailMessageDataMailLinkTrackingEnabledFlagConst; + /** + * + * @type {number} + * @memberof MailMessageData + */ + 'read_flag'?: MailMessageDataReadFlagConst; + /** + * 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 MailMessageData + */ + 'draft'?: string; + /** + * + * @type {number} + * @memberof MailMessageData + */ + 'draft_flag'?: MailMessageDataDraftFlagConst; + /** + * + * @type {number} + * @memberof MailMessageData + */ + 'synced_flag'?: MailMessageDataSyncedFlagConst; + /** + * + * @type {number} + * @memberof MailMessageData + */ + 'deleted_flag'?: MailMessageDataDeletedFlagConst; + /** + * + * @type {number} + * @memberof MailMessageData + */ + 'has_body_flag'?: MailMessageDataHasBodyFlagConst; + /** + * + * @type {number} + * @memberof MailMessageData + */ + 'sent_flag'?: MailMessageDataSentFlagConst; + /** + * + * @type {number} + * @memberof MailMessageData + */ + 'sent_from_pipedrive_flag'?: MailMessageDataSentFromPipedriveFlagConst; + /** + * + * @type {number} + * @memberof MailMessageData + */ + 'smart_bcc_flag'?: MailMessageDataSmartBccFlagConst; + /** + * Creation or receival time of the mail message + * @type {string} + * @memberof MailMessageData + */ + 'message_time'?: string; + /** + * The insertion into the database time of the mail message + * @type {string} + * @memberof MailMessageData + */ + 'add_time'?: string; + /** + * The updating time in the database of the mail message + * @type {string} + * @memberof MailMessageData + */ + 'update_time'?: string; + /** + * + * @type {number} + * @memberof MailMessageData + */ + 'has_attachments_flag'?: MailMessageDataHasAttachmentsFlagConst; + /** + * + * @type {number} + * @memberof MailMessageData + */ + 'has_inline_attachments_flag'?: MailMessageDataHasInlineAttachmentsFlagConst; + /** + * + * @type {number} + * @memberof MailMessageData + */ + 'has_real_attachments_flag'?: MailMessageDataHasRealAttachmentsFlagConst; +} + +export const MailMessageDataMailTrackingStatusConst = { + opened: 'opened', + not_opened: 'not opened' +} as const; + +export type MailMessageDataMailTrackingStatusConst = typeof MailMessageDataMailTrackingStatusConst[keyof typeof MailMessageDataMailTrackingStatusConst]; +export const MailMessageDataMailLinkTrackingEnabledFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailMessageDataMailLinkTrackingEnabledFlagConst = typeof MailMessageDataMailLinkTrackingEnabledFlagConst[keyof typeof MailMessageDataMailLinkTrackingEnabledFlagConst]; +export const MailMessageDataReadFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailMessageDataReadFlagConst = typeof MailMessageDataReadFlagConst[keyof typeof MailMessageDataReadFlagConst]; +export const MailMessageDataDraftFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailMessageDataDraftFlagConst = typeof MailMessageDataDraftFlagConst[keyof typeof MailMessageDataDraftFlagConst]; +export const MailMessageDataSyncedFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailMessageDataSyncedFlagConst = typeof MailMessageDataSyncedFlagConst[keyof typeof MailMessageDataSyncedFlagConst]; +export const MailMessageDataDeletedFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailMessageDataDeletedFlagConst = typeof MailMessageDataDeletedFlagConst[keyof typeof MailMessageDataDeletedFlagConst]; +export const MailMessageDataHasBodyFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailMessageDataHasBodyFlagConst = typeof MailMessageDataHasBodyFlagConst[keyof typeof MailMessageDataHasBodyFlagConst]; +export const MailMessageDataSentFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailMessageDataSentFlagConst = typeof MailMessageDataSentFlagConst[keyof typeof MailMessageDataSentFlagConst]; +export const MailMessageDataSentFromPipedriveFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailMessageDataSentFromPipedriveFlagConst = typeof MailMessageDataSentFromPipedriveFlagConst[keyof typeof MailMessageDataSentFromPipedriveFlagConst]; +export const MailMessageDataSmartBccFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailMessageDataSmartBccFlagConst = typeof MailMessageDataSmartBccFlagConst[keyof typeof MailMessageDataSmartBccFlagConst]; +export const MailMessageDataHasAttachmentsFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailMessageDataHasAttachmentsFlagConst = typeof MailMessageDataHasAttachmentsFlagConst[keyof typeof MailMessageDataHasAttachmentsFlagConst]; +export const MailMessageDataHasInlineAttachmentsFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailMessageDataHasInlineAttachmentsFlagConst = typeof MailMessageDataHasInlineAttachmentsFlagConst[keyof typeof MailMessageDataHasInlineAttachmentsFlagConst]; +export const MailMessageDataHasRealAttachmentsFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailMessageDataHasRealAttachmentsFlagConst = typeof MailMessageDataHasRealAttachmentsFlagConst[keyof typeof MailMessageDataHasRealAttachmentsFlagConst]; + + 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..8a2bf31d --- /dev/null +++ b/models/mail-message-item-for-list-all-of.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 MailMessageItemForListAllOf + */ +export interface MailMessageItemForListAllOf { + /** + * The Mail Message ID assigned by the sync provider + * @type {string} + * @memberof MailMessageItemForListAllOf + */ + 'nylas_id'?: string; + /** + * The name of the S3 bucket + * @type {string} + * @memberof MailMessageItemForListAllOf + */ + 's3_bucket'?: string; + /** + * The path of the S3 bucket + * @type {string} + * @memberof MailMessageItemForListAllOf + */ + 's3_bucket_path'?: string; + /** + * If the Mail Message has been deleted on the provider side or not + * @type {boolean} + * @memberof MailMessageItemForListAllOf + */ + 'external_deleted_flag'?: boolean; + /** + * The Mail Message ID assigned by the mail user agent + * @type {string} + * @memberof MailMessageItemForListAllOf + */ + 'mua_message_id'?: string; + /** + * The ID of the mail template + * @type {number} + * @memberof MailMessageItemForListAllOf + */ + 'template_id'?: number; + /** + * The add date and time of the Mail Message + * @type {string} + * @memberof MailMessageItemForListAllOf + */ + 'timestamp'?: string; + /** + * The type of the data item + * @type {string} + * @memberof MailMessageItemForListAllOf + */ + 'item_type'?: string; + /** + * The ID of the company + * @type {number} + * @memberof MailMessageItemForListAllOf + */ + '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..c3b5a75b --- /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 { MailMessageData } from './mail-message-data'; +// May contain unused imports in some cases +// @ts-ignore +import { MailMessageDataFromInner } from './mail-message-data-from-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { MailMessageItemForListAllOf } from './mail-message-item-for-list-all-of'; + +/** + * @type MailMessageItemForList + * @export + */ +export type MailMessageItemForList = MailMessageData & MailMessageItemForListAllOf; + + diff --git a/models/mail-service-base-response.ts b/models/mail-service-base-response.ts new file mode 100644 index 00000000..5c86775c --- /dev/null +++ b/models/mail-service-base-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. + */ + + + +/** + * + * @export + * @interface MailServiceBaseResponse + */ +export interface MailServiceBaseResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof MailServiceBaseResponse + */ + 'success'?: boolean; + /** + * The email service specific status code and it is returned through the response body. + * @type {number} + * @memberof MailServiceBaseResponse + */ + 'statusCode'?: number; + /** + * The status text of the response. + * @type {string} + * @memberof MailServiceBaseResponse + */ + 'statusText'?: string; + /** + * The service name of the response. + * @type {string} + * @memberof MailServiceBaseResponse + */ + 'service'?: string; +} + diff --git a/models/mail-thread-all-of.ts b/models/mail-thread-all-of.ts new file mode 100644 index 00000000..bcc7d04c --- /dev/null +++ b/models/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 MailThreadAllOf + */ +export interface MailThreadAllOf { + /** + * ID of the mail thread + * @type {number} + * @memberof MailThreadAllOf + */ + 'id'?: number; + /** + * The connection account ID + * @type {string} + * @memberof MailThreadAllOf + */ + 'account_id'?: string; + /** + * ID of the user whom mail message will be assigned to + * @type {number} + * @memberof MailThreadAllOf + */ + 'user_id'?: number; + /** + * The subject + * @type {string} + * @memberof MailThreadAllOf + */ + 'subject'?: string; + /** + * A snippet + * @type {string} + * @memberof MailThreadAllOf + */ + 'snippet'?: string; + /** + * + * @type {number} + * @memberof MailThreadAllOf + */ + 'read_flag'?: MailThreadAllOfReadFlagConst; + /** + * Mail tracking status + * @type {string} + * @memberof MailThreadAllOf + */ + 'mail_tracking_status'?: string | null; + /** + * + * @type {number} + * @memberof MailThreadAllOf + */ + 'has_attachments_flag'?: MailThreadAllOfHasAttachmentsFlagConst; + /** + * + * @type {number} + * @memberof MailThreadAllOf + */ + 'has_inline_attachments_flag'?: MailThreadAllOfHasInlineAttachmentsFlagConst; + /** + * + * @type {number} + * @memberof MailThreadAllOf + */ + 'has_real_attachments_flag'?: MailThreadAllOfHasRealAttachmentsFlagConst; + /** + * + * @type {number} + * @memberof MailThreadAllOf + */ + 'deleted_flag'?: MailThreadAllOfDeletedFlagConst; + /** + * + * @type {number} + * @memberof MailThreadAllOf + */ + 'synced_flag'?: MailThreadAllOfSyncedFlagConst; + /** + * + * @type {number} + * @memberof MailThreadAllOf + */ + 'smart_bcc_flag'?: MailThreadAllOfSmartBccFlagConst; + /** + * + * @type {number} + * @memberof MailThreadAllOf + */ + 'mail_link_tracking_enabled_flag'?: MailThreadAllOfMailLinkTrackingEnabledFlagConst; +} + +export const MailThreadAllOfReadFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailThreadAllOfReadFlagConst = typeof MailThreadAllOfReadFlagConst[keyof typeof MailThreadAllOfReadFlagConst]; +export const MailThreadAllOfHasAttachmentsFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailThreadAllOfHasAttachmentsFlagConst = typeof MailThreadAllOfHasAttachmentsFlagConst[keyof typeof MailThreadAllOfHasAttachmentsFlagConst]; +export const MailThreadAllOfHasInlineAttachmentsFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailThreadAllOfHasInlineAttachmentsFlagConst = typeof MailThreadAllOfHasInlineAttachmentsFlagConst[keyof typeof MailThreadAllOfHasInlineAttachmentsFlagConst]; +export const MailThreadAllOfHasRealAttachmentsFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailThreadAllOfHasRealAttachmentsFlagConst = typeof MailThreadAllOfHasRealAttachmentsFlagConst[keyof typeof MailThreadAllOfHasRealAttachmentsFlagConst]; +export const MailThreadAllOfDeletedFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailThreadAllOfDeletedFlagConst = typeof MailThreadAllOfDeletedFlagConst[keyof typeof MailThreadAllOfDeletedFlagConst]; +export const MailThreadAllOfSyncedFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailThreadAllOfSyncedFlagConst = typeof MailThreadAllOfSyncedFlagConst[keyof typeof MailThreadAllOfSyncedFlagConst]; +export const MailThreadAllOfSmartBccFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailThreadAllOfSmartBccFlagConst = typeof MailThreadAllOfSmartBccFlagConst[keyof typeof MailThreadAllOfSmartBccFlagConst]; +export const MailThreadAllOfMailLinkTrackingEnabledFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailThreadAllOfMailLinkTrackingEnabledFlagConst = typeof MailThreadAllOfMailLinkTrackingEnabledFlagConst[keyof typeof MailThreadAllOfMailLinkTrackingEnabledFlagConst]; + + diff --git a/models/mail-thread-all-of1-parties-to-inner.ts b/models/mail-thread-all-of1-parties-to-inner.ts new file mode 100644 index 00000000..dd3fe6c4 --- /dev/null +++ b/models/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 MailThreadAllOf1PartiesToInner + */ +export interface MailThreadAllOf1PartiesToInner { + /** + * ID of the mail thread participant + * @type {number} + * @memberof MailThreadAllOf1PartiesToInner + */ + 'id'?: number; + /** + * Name of the mail thread participant + * @type {string} + * @memberof MailThreadAllOf1PartiesToInner + */ + 'name'?: string; + /** + * Whether the mail thread participant was last to send an email + * @type {boolean} + * @memberof MailThreadAllOf1PartiesToInner + */ + 'latest_sent'?: boolean; + /** + * Email address of the mail thread participant + * @type {string} + * @memberof MailThreadAllOf1PartiesToInner + */ + 'email_address'?: string; + /** + * Message time + * @type {number} + * @memberof MailThreadAllOf1PartiesToInner + */ + 'message_time'?: number; + /** + * ID of the linked person + * @type {number} + * @memberof MailThreadAllOf1PartiesToInner + */ + 'linked_person_id'?: number; + /** + * Email of the linked person + * @type {string} + * @memberof MailThreadAllOf1PartiesToInner + */ + 'linked_person_name'?: string; + /** + * ID of the mail message party + * @type {number} + * @memberof MailThreadAllOf1PartiesToInner + */ + 'mail_message_party_id'?: number; + /** + * Linked Organization ID + * @type {number} + * @memberof MailThreadAllOf1PartiesToInner + */ + 'linked_organization_id'?: number | null; +} + diff --git a/models/mail-thread-all-of1-parties.ts b/models/mail-thread-all-of1-parties.ts new file mode 100644 index 00000000..3221b8ce --- /dev/null +++ b/models/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 { MailThreadAllOf1PartiesToInner } from './mail-thread-all-of1-parties-to-inner'; + +/** + * Parties of the mail thread + * @export + * @interface MailThreadAllOf1Parties + */ +export interface MailThreadAllOf1Parties { + /** + * Recipients of the mail thread + * @type {Array} + * @memberof MailThreadAllOf1Parties + */ + 'to'?: Array; + /** + * Senders of the mail thread + * @type {Array} + * @memberof MailThreadAllOf1Parties + */ + 'from'?: Array; +} + diff --git a/models/mail-thread-all-of1.ts b/models/mail-thread-all-of1.ts new file mode 100644 index 00000000..73c74712 --- /dev/null +++ b/models/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 { MailThreadAllOf1Parties } from './mail-thread-all-of1-parties'; + +/** + * + * @export + * @interface MailThreadAllOf1 + */ +export interface MailThreadAllOf1 { + /** + * + * @type {MailThreadAllOf1Parties} + * @memberof MailThreadAllOf1 + */ + 'parties'?: MailThreadAllOf1Parties; + /** + * Parties of the drafted mail thread + * @type {Array} + * @memberof MailThreadAllOf1 + */ + 'drafts_parties'?: Array; + /** + * Folders in which messages from thread are being stored + * @type {Array} + * @memberof MailThreadAllOf1 + */ + 'folders'?: Array; + /** + * Version + * @type {number} + * @memberof MailThreadAllOf1 + */ + 'version'?: number; + /** + * A snippet from a draft + * @type {string} + * @memberof MailThreadAllOf1 + */ + 'snippet_draft'?: string | null; + /** + * A snippet from a message sent + * @type {string} + * @memberof MailThreadAllOf1 + */ + 'snippet_sent'?: string; + /** + * An amount of messages + * @type {number} + * @memberof MailThreadAllOf1 + */ + 'message_count'?: number; + /** + * + * @type {number} + * @memberof MailThreadAllOf1 + */ + 'has_draft_flag'?: MailThreadAllOf1HasDraftFlagConst; + /** + * + * @type {number} + * @memberof MailThreadAllOf1 + */ + 'has_sent_flag'?: MailThreadAllOf1HasSentFlagConst; + /** + * + * @type {number} + * @memberof MailThreadAllOf1 + */ + 'archived_flag'?: MailThreadAllOf1ArchivedFlagConst; + /** + * + * @type {number} + * @memberof MailThreadAllOf1 + */ + 'shared_flag'?: MailThreadAllOf1SharedFlagConst; + /** + * + * @type {number} + * @memberof MailThreadAllOf1 + */ + 'external_deleted_flag'?: MailThreadAllOf1ExternalDeletedFlagConst; + /** + * + * @type {number} + * @memberof MailThreadAllOf1 + */ + 'first_message_to_me_flag'?: MailThreadAllOf1FirstMessageToMeFlagConst; + /** + * Last message timestamp + * @type {string} + * @memberof MailThreadAllOf1 + */ + 'last_message_timestamp'?: string; + /** + * The time when the mail thread has had the first message received or created + * @type {string} + * @memberof MailThreadAllOf1 + */ + 'first_message_timestamp'?: string; + /** + * The last time when the mail thread has had a message sent + * @type {string} + * @memberof MailThreadAllOf1 + */ + 'last_message_sent_timestamp'?: string | null; + /** + * The last time when the mail thread has had a message received + * @type {string} + * @memberof MailThreadAllOf1 + */ + 'last_message_received_timestamp'?: string; + /** + * The time when the mail thread was inserted to database + * @type {string} + * @memberof MailThreadAllOf1 + */ + 'add_time'?: string; + /** + * The time when the mail thread was updated in database received + * @type {string} + * @memberof MailThreadAllOf1 + */ + 'update_time'?: string; + /** + * The ID of the deal + * @type {number} + * @memberof MailThreadAllOf1 + */ + 'deal_id'?: number | null; + /** + * Status of the deal + * @type {string} + * @memberof MailThreadAllOf1 + */ + 'deal_status'?: string | null; + /** + * The ID of the lead + * @type {string} + * @memberof MailThreadAllOf1 + */ + 'lead_id'?: string | null; + /** + * + * @type {number} + * @memberof MailThreadAllOf1 + */ + 'all_messages_sent_flag'?: MailThreadAllOf1AllMessagesSentFlagConst; +} + +export const MailThreadAllOf1HasDraftFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailThreadAllOf1HasDraftFlagConst = typeof MailThreadAllOf1HasDraftFlagConst[keyof typeof MailThreadAllOf1HasDraftFlagConst]; +export const MailThreadAllOf1HasSentFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailThreadAllOf1HasSentFlagConst = typeof MailThreadAllOf1HasSentFlagConst[keyof typeof MailThreadAllOf1HasSentFlagConst]; +export const MailThreadAllOf1ArchivedFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailThreadAllOf1ArchivedFlagConst = typeof MailThreadAllOf1ArchivedFlagConst[keyof typeof MailThreadAllOf1ArchivedFlagConst]; +export const MailThreadAllOf1SharedFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailThreadAllOf1SharedFlagConst = typeof MailThreadAllOf1SharedFlagConst[keyof typeof MailThreadAllOf1SharedFlagConst]; +export const MailThreadAllOf1ExternalDeletedFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailThreadAllOf1ExternalDeletedFlagConst = typeof MailThreadAllOf1ExternalDeletedFlagConst[keyof typeof MailThreadAllOf1ExternalDeletedFlagConst]; +export const MailThreadAllOf1FirstMessageToMeFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailThreadAllOf1FirstMessageToMeFlagConst = typeof MailThreadAllOf1FirstMessageToMeFlagConst[keyof typeof MailThreadAllOf1FirstMessageToMeFlagConst]; +export const MailThreadAllOf1AllMessagesSentFlagConst = { + NUMBER_0: 0, + NUMBER_1: 1 +} as const; + +export type MailThreadAllOf1AllMessagesSentFlagConst = typeof MailThreadAllOf1AllMessagesSentFlagConst[keyof typeof MailThreadAllOf1AllMessagesSentFlagConst]; + + diff --git a/models/mail-thread.ts b/models/mail-thread.ts new file mode 100644 index 00000000..b02054d1 --- /dev/null +++ b/models/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 { MailThreadAllOf } from './mail-thread-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { MailThreadAllOf1 } from './mail-thread-all-of1'; +// May contain unused imports in some cases +// @ts-ignore +import { MailThreadAllOf1Parties } from './mail-thread-all-of1-parties'; + +/** + * @type MailThread + * @export + */ +export type MailThread = MailThreadAllOf & MailThreadAllOf1; + + diff --git a/models/mail-thread1.ts b/models/mail-thread1.ts new file mode 100644 index 00000000..e2045d5d --- /dev/null +++ b/models/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 { MailThreadAllOf } from './mail-thread-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { MailThreadAllOf1 } from './mail-thread-all-of1'; +// May contain unused imports in some cases +// @ts-ignore +import { MailThreadAllOf1Parties } from './mail-thread-all-of1-parties'; + +/** + * @type MailThread1 + * The mail thread object + * @export + */ +export type MailThread1 = MailThreadAllOf & MailThreadAllOf1; + + 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-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-response-data.ts b/models/merge-organizations-response-data.ts new file mode 100644 index 00000000..2194d305 --- /dev/null +++ b/models/merge-organizations-response-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 MergeOrganizationsResponseData + */ +export interface MergeOrganizationsResponseData { + /** + * The ID of the merged organization + * @type {number} + * @memberof MergeOrganizationsResponseData + */ + 'id'?: number; +} + diff --git a/models/merge-organizations-response.ts b/models/merge-organizations-response.ts new file mode 100644 index 00000000..50be5ede --- /dev/null +++ b/models/merge-organizations-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 { MergeOrganizationsResponseData } from './merge-organizations-response-data'; + +/** + * + * @export + * @interface MergeOrganizationsResponse + */ +export interface MergeOrganizationsResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof MergeOrganizationsResponse + */ + 'success'?: boolean; + /** + * + * @type {MergeOrganizationsResponseData} + * @memberof MergeOrganizationsResponse + */ + 'data'?: MergeOrganizationsResponseData; +} + 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..413d045b --- /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 { PersonAllOf } from './person-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonAllOfEmailInner } from './person-all-of-email-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonAllOfPhoneInner } from './person-all-of-phone-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonAllOfPictureId } from './person-all-of-picture-id'; + +/** + * @type MergePersonItem + * @export + */ +export type MergePersonItem = AdditionalMergePersonInfo & PersonAllOf; + + 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-response-all-of.ts b/models/merge-persons-response-all-of.ts new file mode 100644 index 00000000..ed4d01a9 --- /dev/null +++ b/models/merge-persons-response-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 MergePersonsResponseAllOf + */ +export interface MergePersonsResponseAllOf { + /** + * + * @type {MergePersonItem} + * @memberof MergePersonsResponseAllOf + */ + 'data'?: MergePersonItem; +} + diff --git a/models/merge-persons-response.ts b/models/merge-persons-response.ts new file mode 100644 index 00000000..d2902b07 --- /dev/null +++ b/models/merge-persons-response.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 { MergePersonsResponseAllOf } from './merge-persons-response-all-of'; + +/** + * @type MergePersonsResponse + * @export + */ +export type MergePersonsResponse = BaseResponse & MergePersonsResponseAllOf; + + diff --git a/models/new-deal-parameters.ts b/models/new-deal-parameters.ts new file mode 100644 index 00000000..2a2e7c34 --- /dev/null +++ b/models/new-deal-parameters.ts @@ -0,0 +1,112 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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 ID to further distinguish the origin of the deal - e.g. Which API integration created this deal. If omitted, `origin_id` will be set to null. + * @type {string} + * @memberof NewDealParameters + */ + 'origin_id'?: string | null; + /** + * The ID of Marketing channel this deal was created from. Provided value must be one of the channels configured for your company. You can fetch allowed values with GET /v1/dealFields. If omitted, channel will be set to null. + * @type {number} + * @memberof NewDealParameters + */ + 'channel'?: number | null; + /** + * The optional ID to further distinguish the Marketing channel. If omitted, `channel_id` will be set to null. + * @type {string} + * @memberof NewDealParameters + */ + 'channel_id'?: string | null; + /** + * The optional creation date & time of the deal in UTC. 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/note-deal.ts b/models/note-deal.ts new file mode 100644 index 00000000..a2a1bef8 --- /dev/null +++ b/models/note-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 NoteDeal + */ +export interface NoteDeal { + /** + * The title of the deal this note is attached to + * @type {string} + * @memberof NoteDeal + */ + 'title'?: string; +} + diff --git a/models/note-organization.ts b/models/note-organization.ts new file mode 100644 index 00000000..67571848 --- /dev/null +++ b/models/note-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 NoteOrganization + */ +export interface NoteOrganization { + /** + * The name of the organization the note is attached to + * @type {string} + * @memberof NoteOrganization + */ + 'name'?: string; +} + diff --git a/models/note-person.ts b/models/note-person.ts new file mode 100644 index 00000000..12ea1c55 --- /dev/null +++ b/models/note-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 NotePerson + */ +export interface NotePerson { + /** + * The name of the person the note is attached to + * @type {string} + * @memberof NotePerson + */ + 'name'?: string; +} + 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/note-user.ts b/models/note-user.ts new file mode 100644 index 00000000..51571cc8 --- /dev/null +++ b/models/note-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 NoteUser + */ +export interface NoteUser { + /** + * The email of the note creator + * @type {string} + * @memberof NoteUser + */ + 'email'?: string; + /** + * The URL of the note creator avatar picture + * @type {string} + * @memberof NoteUser + */ + 'icon_url'?: string; + /** + * Whether the note is created by you or not + * @type {boolean} + * @memberof NoteUser + */ + 'is_you'?: boolean; + /** + * The name of the note creator + * @type {string} + * @memberof NoteUser + */ + 'name'?: string; +} + diff --git a/models/note.ts b/models/note.ts new file mode 100644 index 00000000..96a60387 --- /dev/null +++ b/models/note.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 { NoteDeal } from './note-deal'; +// May contain unused imports in some cases +// @ts-ignore +import { NoteOrganization } from './note-organization'; +// May contain unused imports in some cases +// @ts-ignore +import { NotePerson } from './note-person'; +// May contain unused imports in some cases +// @ts-ignore +import { NoteUser } from './note-user'; + +/** + * + * @export + * @interface Note + */ +export interface Note { + /** + * The ID of the note + * @type {number} + * @memberof Note + */ + 'id'?: number; + /** + * Whether the note is active or deleted + * @type {boolean} + * @memberof Note + */ + 'active_flag'?: boolean; + /** + * The creation date and time of the note + * @type {string} + * @memberof Note + */ + 'add_time'?: string; + /** + * The content of the note in HTML format. Subject to sanitization on the back-end. + * @type {string} + * @memberof Note + */ + 'content'?: string; + /** + * + * @type {NoteDeal} + * @memberof Note + */ + 'deal'?: NoteDeal; + /** + * The ID of the lead the note is attached to + * @type {string} + * @memberof Note + */ + 'lead_id'?: string; + /** + * The ID of the deal the note is attached to + * @type {number} + * @memberof Note + */ + 'deal_id'?: number; + /** + * The ID of the user who last updated the note + * @type {number} + * @memberof Note + */ + 'last_update_user_id'?: number; + /** + * The ID of the organization the note is attached to + * @type {number} + * @memberof Note + */ + 'org_id'?: number; + /** + * + * @type {NoteOrganization} + * @memberof Note + */ + 'organization'?: NoteOrganization; + /** + * + * @type {NotePerson} + * @memberof Note + */ + 'person'?: NotePerson; + /** + * The ID of the person the note is attached to + * @type {number} + * @memberof Note + */ + 'person_id'?: number; + /** + * If true, the results are filtered by note to deal pinning state + * @type {boolean} + * @memberof Note + */ + 'pinned_to_deal_flag'?: boolean; + /** + * If true, the results are filtered by note to organization pinning state + * @type {boolean} + * @memberof Note + */ + 'pinned_to_organization_flag'?: boolean; + /** + * If true, the results are filtered by note to person pinning state + * @type {boolean} + * @memberof Note + */ + 'pinned_to_person_flag'?: boolean; + /** + * The last updated date and time of the note + * @type {string} + * @memberof Note + */ + 'update_time'?: string; + /** + * + * @type {NoteUser} + * @memberof Note + */ + 'user'?: NoteUser; + /** + * The ID of the note creator + * @type {number} + * @memberof Note + */ + 'user_id'?: number; +} + 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-data-with-id-all-of.ts b/models/organization-data-with-id-all-of.ts new file mode 100644 index 00000000..e49d1650 --- /dev/null +++ b/models/organization-data-with-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 OrganizationDataWithIdAllOf + */ +export interface OrganizationDataWithIdAllOf { + /** + * The ID of the organization associated with the item + * @type {number} + * @memberof OrganizationDataWithIdAllOf + */ + 'id'?: number; +} + diff --git a/models/organization-data-with-id-all-of1.ts b/models/organization-data-with-id-all-of1.ts new file mode 100644 index 00000000..cc66139b --- /dev/null +++ b/models/organization-data-with-id-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 OrganizationDataWithIdAllOf1 + */ +export interface OrganizationDataWithIdAllOf1 { + /** + * The name of the organization associated with the item + * @type {string} + * @memberof OrganizationDataWithIdAllOf1 + */ + 'name'?: string; + /** + * The number of people connected with the organization that is associated with the item + * @type {number} + * @memberof OrganizationDataWithIdAllOf1 + */ + 'people_count'?: number; + /** + * The ID of the owner of the organization that is associated with the item + * @type {number} + * @memberof OrganizationDataWithIdAllOf1 + */ + 'owner_id'?: number; + /** + * The address of the organization + * @type {string} + * @memberof OrganizationDataWithIdAllOf1 + */ + 'address'?: string; + /** + * The BCC email of the organization associated with the item + * @type {string} + * @memberof OrganizationDataWithIdAllOf1 + */ + 'cc_email'?: string; +} + diff --git a/models/organization-data-with-id-and-active-flag-all-of.ts b/models/organization-data-with-id-and-active-flag-all-of.ts new file mode 100644 index 00000000..416f7e4a --- /dev/null +++ b/models/organization-data-with-id-and-active-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 OrganizationDataWithIdAndActiveFlagAllOf + */ +export interface OrganizationDataWithIdAndActiveFlagAllOf { + /** + * Whether the associated organization is active or not + * @type {boolean} + * @memberof OrganizationDataWithIdAndActiveFlagAllOf + */ + 'active_flag'?: boolean; +} + diff --git a/models/organization-data-with-id-and-active-flag.ts b/models/organization-data-with-id-and-active-flag.ts new file mode 100644 index 00000000..57cd743b --- /dev/null +++ b/models/organization-data-with-id-and-active-flag.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 { OrganizationDataWithId } from './organization-data-with-id'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationDataWithIdAndActiveFlagAllOf } from './organization-data-with-id-and-active-flag-all-of'; + +/** + * @type OrganizationDataWithIdAndActiveFlag + * The ID of the organization associated with the item + * @export + */ +export type OrganizationDataWithIdAndActiveFlag = OrganizationDataWithId & OrganizationDataWithIdAndActiveFlagAllOf; + + diff --git a/models/organization-data-with-id.ts b/models/organization-data-with-id.ts new file mode 100644 index 00000000..944485a4 --- /dev/null +++ b/models/organization-data-with-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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationDataWithIdAllOf } from './organization-data-with-id-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationDataWithIdAllOf1 } from './organization-data-with-id-all-of1'; + +/** + * @type OrganizationDataWithId + * The ID of the organization associated with the item + * @export + */ +export type OrganizationDataWithId = OrganizationDataWithIdAllOf & OrganizationDataWithIdAllOf1; + + 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/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..151f8734 --- /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 { GetFieldsResponseAllOfAdditionalData } from './get-fields-response-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 = GetFieldsResponseAllOfAdditionalData & PaginationDetailsAllOf; + + diff --git a/models/participant-changelog-item-all-of.ts b/models/participant-changelog-item-all-of.ts new file mode 100644 index 00000000..bcfd4bd3 --- /dev/null +++ b/models/participant-changelog-item-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 ParticipantChangelogItemAllOf + */ +export interface ParticipantChangelogItemAllOf { + /** + * The ID of the user + * @type {number} + * @memberof ParticipantChangelogItemAllOf + */ + 'actor_user_id'?: number; + /** + * The ID of the person + * @type {number} + * @memberof ParticipantChangelogItemAllOf + */ + 'person_id'?: number; + /** + * Deal participant action type + * @type {string} + * @memberof ParticipantChangelogItemAllOf + */ + 'action'?: string; + /** + * The deal participant action log time + * @type {string} + * @memberof ParticipantChangelogItemAllOf + */ + 'time'?: string; +} + diff --git a/models/participant-changelog-item.ts b/models/participant-changelog-item.ts new file mode 100644 index 00000000..28f26853 --- /dev/null +++ b/models/participant-changelog-item.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 { ParticipantChangelogItemAllOf } from './participant-changelog-item-all-of'; + +/** + * @type ParticipantChangelogItem + * @export + */ +export type ParticipantChangelogItem = ParticipantChangelogItemAllOf; + + diff --git a/models/permission-set.ts b/models/permission-set.ts new file mode 100644 index 00000000..733c11a8 --- /dev/null +++ b/models/permission-set.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 PermissionSet + */ +export interface PermissionSet { + /** + * The ID of user permission set + * @type {string} + * @memberof PermissionSet + */ + 'id'?: string; + /** + * The name of the permission set + * @type {string} + * @memberof PermissionSet + */ + 'name'?: string; + /** + * The description of the permission set + * @type {string} + * @memberof PermissionSet + */ + 'description'?: string; + /** + * The app that permission set belongs to + * @type {string} + * @memberof PermissionSet + */ + 'app'?: PermissionSetAppConst; + /** + * The type of permission set + * @type {string} + * @memberof PermissionSet + */ + 'type'?: PermissionSetTypeConst; + /** + * The number of users assigned to this permission set + * @type {number} + * @memberof PermissionSet + */ + 'assignment_count'?: number; +} + +export const PermissionSetAppConst = { + sales: 'sales', + projects: 'projects', + campaigns: 'campaigns', + global: 'global', + account_settings: 'account_settings' +} as const; + +export type PermissionSetAppConst = typeof PermissionSetAppConst[keyof typeof PermissionSetAppConst]; +export const PermissionSetTypeConst = { + admin: 'admin', + manager: 'manager', + regular: 'regular', + custom: 'custom' +} as const; + +export type PermissionSetTypeConst = typeof PermissionSetTypeConst[keyof typeof PermissionSetTypeConst]; + + diff --git a/models/person-all-of-email-inner.ts b/models/person-all-of-email-inner.ts new file mode 100644 index 00000000..dc650772 --- /dev/null +++ b/models/person-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 PersonAllOfEmailInner + */ +export interface PersonAllOfEmailInner { + /** + * Email + * @type {string} + * @memberof PersonAllOfEmailInner + */ + 'value'?: string; + /** + * Boolean that indicates if email is primary for the person or not + * @type {boolean} + * @memberof PersonAllOfEmailInner + */ + 'primary'?: boolean; + /** + * The label that indicates the type of the email. (Possible values - work, home or other) + * @type {string} + * @memberof PersonAllOfEmailInner + */ + 'label'?: string; +} + diff --git a/models/person-all-of-phone-inner.ts b/models/person-all-of-phone-inner.ts new file mode 100644 index 00000000..f8f36ebc --- /dev/null +++ b/models/person-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 PersonAllOfPhoneInner + */ +export interface PersonAllOfPhoneInner { + /** + * The phone number + * @type {string} + * @memberof PersonAllOfPhoneInner + */ + 'value'?: string; + /** + * Boolean that indicates if phone number is primary for the person or not + * @type {boolean} + * @memberof PersonAllOfPhoneInner + */ + 'primary'?: boolean; + /** + * The label that indicates the type of the phone number. (Possible values - work, home, mobile or other) + * @type {string} + * @memberof PersonAllOfPhoneInner + */ + 'label'?: string; +} + diff --git a/models/person-all-of-picture-id.ts b/models/person-all-of-picture-id.ts new file mode 100644 index 00000000..6c8ae8eb --- /dev/null +++ b/models/person-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 { PictureData } from './picture-data'; +// May contain unused imports in some cases +// @ts-ignore +import { PictureDataPictures } from './picture-data-pictures'; +// May contain unused imports in some cases +// @ts-ignore +import { PictureDataWithID } from './picture-data-with-id'; + +/** + * @type PersonAllOfPictureId + * @export + */ +export type PersonAllOfPictureId = PictureData & PictureDataWithID; + + diff --git a/models/person-all-of.ts b/models/person-all-of.ts new file mode 100644 index 00000000..86bf9a3e --- /dev/null +++ b/models/person-all-of.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { PersonAllOfEmailInner } from './person-all-of-email-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonAllOfPhoneInner } from './person-all-of-phone-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonAllOfPictureId } from './person-all-of-picture-id'; + +/** + * + * @export + * @interface PersonAllOf + */ +export interface PersonAllOf { + /** + * The ID of the person + * @type {number} + * @memberof PersonAllOf + */ + 'id'?: number; + /** + * The ID of the company related to the person + * @type {number} + * @memberof PersonAllOf + */ + 'company_id'?: number; + /** + * Whether the person is active or not + * @type {boolean} + * @memberof PersonAllOf + */ + '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 PersonAllOf + */ + '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 PersonAllOf + */ + 'email'?: Array; + /** + * The first letter of the name of the person + * @type {string} + * @memberof PersonAllOf + */ + 'first_char'?: string; + /** + * The date and time when the person was added/created. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof PersonAllOf + */ + 'add_time'?: string; + /** + * The last updated date and time of the person. Format: YYYY-MM-DD HH:MM:SS + * @type {string} + * @memberof PersonAllOf + */ + 'update_time'?: string; + /** + * The visibility group ID of who can see the person + * @type {string} + * @memberof PersonAllOf + */ + 'visible_to'?: string; + /** + * + * @type {PersonAllOfPictureId} + * @memberof PersonAllOf + */ + 'picture_id'?: PersonAllOfPictureId; + /** + * The label assigned to the person. When the `label` field is updated, the `label_ids` field value will be overwritten by the `label` field value. + * @type {number} + * @memberof PersonAllOf + */ + 'label'?: number; + /** + * The IDs of labels assigned to the person. When the `label_ids` field is updated, the `label` field value will be set to the first value of the `label_ids` field. + * @type {Array} + * @memberof PersonAllOf + */ + 'label_ids'?: Array; + /** + * The name of the organization associated with the person + * @type {string} + * @memberof PersonAllOf + */ + 'org_name'?: string; + /** + * The name of the owner associated with the person + * @type {string} + * @memberof PersonAllOf + */ + 'owner_name'?: string; + /** + * The BCC email associated with the person + * @type {string} + * @memberof PersonAllOf + */ + 'cc_email'?: string; +} + 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-data-with-active-flag-all-of.ts b/models/person-data-with-active-flag-all-of.ts new file mode 100644 index 00000000..f47cfda6 --- /dev/null +++ b/models/person-data-with-active-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 PersonDataWithActiveFlagAllOf + */ +export interface PersonDataWithActiveFlagAllOf { + /** + * Whether the associated person is active or not + * @type {boolean} + * @memberof PersonDataWithActiveFlagAllOf + */ + 'active_flag'?: boolean; +} + diff --git a/models/person-data-with-active-flag.ts b/models/person-data-with-active-flag.ts new file mode 100644 index 00000000..1f1e79e4 --- /dev/null +++ b/models/person-data-with-active-flag.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 { PersonDataWithActiveFlagAllOf } from './person-data-with-active-flag-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonDataWithIDAllOf } from './person-data-with-idall-of'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonDataWithIDAllOfEmailInner } from './person-data-with-idall-of-email-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { PhoneData } from './phone-data'; + +/** + * @type PersonDataWithActiveFlag + * The ID of the person associated with the item + * @export + */ +export type PersonDataWithActiveFlag = PersonDataWithActiveFlagAllOf & PersonDataWithIDAllOf; + + diff --git a/models/person-data-with-id.ts b/models/person-data-with-id.ts new file mode 100644 index 00000000..33af6caf --- /dev/null +++ b/models/person-data-with-id.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 { PersonDataWithIDAllOf } from './person-data-with-idall-of'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonDataWithIDAllOfEmailInner } from './person-data-with-idall-of-email-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { PhoneData } from './phone-data'; + +/** + * @type PersonDataWithID + * The ID of the person associated with the item + * @export + */ +export type PersonDataWithID = PersonDataWithIDAllOf; + + diff --git a/models/person-data-with-idall-of-email-inner.ts b/models/person-data-with-idall-of-email-inner.ts new file mode 100644 index 00000000..12981378 --- /dev/null +++ b/models/person-data-with-idall-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 PersonDataWithIDAllOfEmailInner + */ +export interface PersonDataWithIDAllOfEmailInner { + /** + * The type of the email + * @type {string} + * @memberof PersonDataWithIDAllOfEmailInner + */ + 'label'?: string; + /** + * The email of the associated person + * @type {string} + * @memberof PersonDataWithIDAllOfEmailInner + */ + 'value'?: string; + /** + * Whether this is the primary email or not + * @type {boolean} + * @memberof PersonDataWithIDAllOfEmailInner + */ + 'primary'?: boolean; +} + diff --git a/models/person-data-with-idall-of.ts b/models/person-data-with-idall-of.ts new file mode 100644 index 00000000..1a643166 --- /dev/null +++ b/models/person-data-with-idall-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 { PersonDataWithIDAllOfEmailInner } from './person-data-with-idall-of-email-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { PhoneData } from './phone-data'; + +/** + * + * @export + * @interface PersonDataWithIDAllOf + */ +export interface PersonDataWithIDAllOf { + /** + * The ID of the person associated with the item + * @type {number} + * @memberof PersonDataWithIDAllOf + */ + 'id'?: number; + /** + * The name of the person associated with the item + * @type {string} + * @memberof PersonDataWithIDAllOf + */ + 'name'?: string; + /** + * The emails of the person associated with the item + * @type {Array} + * @memberof PersonDataWithIDAllOf + */ + 'email'?: Array; + /** + * The phone numbers of the person associated with the item + * @type {Array} + * @memberof PersonDataWithIDAllOf + */ + 'phone'?: Array; + /** + * The ID of the owner of the person that is associated with the item + * @type {number} + * @memberof PersonDataWithIDAllOf + */ + 'owner_id'?: number; +} + 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/person.ts b/models/person.ts new file mode 100644 index 00000000..c0eb8acb --- /dev/null +++ b/models/person.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 { PersonAllOf } from './person-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonAllOfEmailInner } from './person-all-of-email-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonAllOfPhoneInner } from './person-all-of-phone-inner'; +// May contain unused imports in some cases +// @ts-ignore +import { PersonAllOfPictureId } from './person-all-of-picture-id'; +// May contain unused imports in some cases +// @ts-ignore +import { RelationshipOrganizationInfoItemWithActiveFlag } from './relationship-organization-info-item-with-active-flag'; + +/** + * @type Person + * @export + */ +export type Person = AdditionalPersonInfo & PersonAllOf; + + diff --git a/models/persons-collection-response-object.ts b/models/persons-collection-response-object.ts new file mode 100644 index 00000000..62c4b0ab --- /dev/null +++ b/models/persons-collection-response-object.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. + */ + + +// 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 { PersonAllOfPhoneInner } from './person-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. When the `label` field is updated, the `label_ids` field value will be overwritten by the `label` field value. + * @type {number} + * @memberof PersonsCollectionResponseObject + */ + 'label'?: number | null; + /** + * The IDs of labels assigned to the person. When the `label_ids` field is updated, the `label` field value will be set to the first value of the `label_ids` field. + * @type {Array} + * @memberof PersonsCollectionResponseObject + */ + 'label_ids'?: Array; + /** + * The BCC email associated with the person + * @type {string} + * @memberof PersonsCollectionResponseObject + */ + 'cc_email'?: string; +} + diff --git a/models/phone-data.ts b/models/phone-data.ts new file mode 100644 index 00000000..039df774 --- /dev/null +++ b/models/phone-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. + */ + + + +/** + * + * @export + * @interface PhoneData + */ +export interface PhoneData { + /** + * The type of the phone number + * @type {string} + * @memberof PhoneData + */ + 'label'?: string; + /** + * The phone number of the person associated with the item + * @type {string} + * @memberof PhoneData + */ + 'value'?: string; + /** + * Whether this is the primary phone number or not + * @type {boolean} + * @memberof PhoneData + */ + 'primary'?: boolean; +} + diff --git a/models/picture-data-pictures.ts b/models/picture-data-pictures.ts new file mode 100644 index 00000000..d73ae127 --- /dev/null +++ b/models/picture-data-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 PictureDataPictures + */ +export interface PictureDataPictures { + /** + * The URL of the 128*128 picture + * @type {string} + * @memberof PictureDataPictures + */ + '128'?: string; + /** + * The URL of the 512*512 picture + * @type {string} + * @memberof PictureDataPictures + */ + '512'?: string; +} + diff --git a/models/picture-data-with-id.ts b/models/picture-data-with-id.ts new file mode 100644 index 00000000..463c6694 --- /dev/null +++ b/models/picture-data-with-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 PictureDataWithID + */ +export interface PictureDataWithID { + /** + * The ID of the picture associated with the item + * @type {number} + * @memberof PictureDataWithID + */ + 'id'?: number; +} + diff --git a/models/picture-data-with-value.ts b/models/picture-data-with-value.ts new file mode 100644 index 00000000..384782d0 --- /dev/null +++ b/models/picture-data-with-value.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 PictureDataWithValue + */ +export interface PictureDataWithValue { + /** + * The ID of the picture associated with the item + * @type {number} + * @memberof PictureDataWithValue + */ + 'value'?: number; +} + diff --git a/models/picture-data.ts b/models/picture-data.ts new file mode 100644 index 00000000..a1904303 --- /dev/null +++ b/models/picture-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 { PictureDataPictures } from './picture-data-pictures'; + +/** + * + * @export + * @interface PictureData + */ +export interface PictureData { + /** + * The type of item the picture is related to + * @type {string} + * @memberof PictureData + */ + 'item_type'?: string; + /** + * The ID of related item + * @type {number} + * @memberof PictureData + */ + 'item_id'?: number; + /** + * Whether the associated picture is active or not + * @type {boolean} + * @memberof PictureData + */ + 'active_flag'?: boolean; + /** + * The add time of the picture + * @type {string} + * @memberof PictureData + */ + 'add_time'?: string; + /** + * The update time of the picture + * @type {string} + * @memberof PictureData + */ + 'update_time'?: string; + /** + * The ID of the user who added the picture + * @type {number} + * @memberof PictureData + */ + 'added_by_user_id'?: number; + /** + * + * @type {PictureDataPictures} + * @memberof PictureData + */ + 'pictures'?: PictureDataPictures; +} + 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/product-field-all-of.ts b/models/product-field-all-of.ts new file mode 100644 index 00000000..29b80ba8 --- /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
+ * @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..2e248562 --- /dev/null +++ b/models/product-field-all-of1.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 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; + /** + * The ID of the user who created the product field + * @type {number} + * @memberof ProductFieldAllOf1 + */ + 'created_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-list-item-product.ts b/models/product-list-item-product.ts new file mode 100644 index 00000000..eeea6127 --- /dev/null +++ b/models/product-list-item-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 { BaseProduct } from './base-product'; +// May contain unused imports in some cases +// @ts-ignore +import { ProductPrices } from './product-prices'; + +/** + * @type ProductListItemProduct + * @export + */ +export type ProductListItemProduct = BaseProduct & ProductPrices; + + diff --git a/models/product-list-item.ts b/models/product-list-item.ts new file mode 100644 index 00000000..5d9c98e7 --- /dev/null +++ b/models/product-list-item.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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ProductListItemProduct } from './product-list-item-product'; + +/** + * + * @export + * @interface ProductListItem + */ +export interface ProductListItem { + /** + * The ID of the deal-product (the ID of the product attached to the deal) + * @type {number} + * @memberof ProductListItem + */ + 'id'?: number; + /** + * The ID of the deal + * @type {number} + * @memberof ProductListItem + */ + 'deal_id'?: number; + /** + * The order number of the product + * @type {number} + * @memberof ProductListItem + */ + 'order_nr'?: number; + /** + * The ID of the product + * @type {number} + * @memberof ProductListItem + */ + 'product_id'?: number; + /** + * The ID of the product variation + * @type {number} + * @memberof ProductListItem + */ + 'product_variation_id'?: number | null; + /** + * The price value of the product + * @type {number} + * @memberof ProductListItem + */ + '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 ProductListItem + */ + 'discount'?: number; + /** + * The type of the discount\'s value + * @type {string} + * @memberof ProductListItem + */ + 'discount_type'?: ProductListItemDiscountTypeConst; + /** + * The sum of all the products attached to the deal + * @type {number} + * @memberof ProductListItem + */ + 'sum'?: number; + /** + * The currency associated with the deal product + * @type {string} + * @memberof ProductListItem + */ + 'currency'?: string; + /** + * Whether the product is enabled or not + * @type {boolean} + * @memberof ProductListItem + */ + 'enabled_flag'?: boolean; + /** + * The date and time when the product was added to the deal + * @type {string} + * @memberof ProductListItem + */ + 'add_time'?: string; + /** + * The date and time when the deal product was last edited + * @type {string} + * @memberof ProductListItem + */ + 'last_edit'?: string; + /** + * The comments of the product + * @type {string} + * @memberof ProductListItem + */ + 'comments'?: string; + /** + * Whether the product is active or not + * @type {boolean} + * @memberof ProductListItem + */ + 'active_flag'?: boolean; + /** + * The product tax + * @type {number} + * @memberof ProductListItem + */ + '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 ProductListItem + */ + 'tax_method'?: ProductListItemTaxMethodConst; + /** + * The product name + * @type {string} + * @memberof ProductListItem + */ + 'name'?: string; + /** + * The formatted sum of the product + * @type {string} + * @memberof ProductListItem + */ + 'sum_formatted'?: string; + /** + * The formatted quantity of the product + * @type {string} + * @memberof ProductListItem + */ + 'quantity_formatted'?: string; + /** + * The quantity of the product + * @type {number} + * @memberof ProductListItem + */ + 'quantity'?: number; + /** + * + * @type {ProductListItemProduct} + * @memberof ProductListItem + */ + 'product'?: ProductListItemProduct; +} + +export const ProductListItemDiscountTypeConst = { + percentage: 'percentage', + amount: 'amount' +} as const; + +export type ProductListItemDiscountTypeConst = typeof ProductListItemDiscountTypeConst[keyof typeof ProductListItemDiscountTypeConst]; +export const ProductListItemTaxMethodConst = { + exclusive: 'exclusive', + inclusive: 'inclusive', + none: 'none' +} as const; + +export type ProductListItemTaxMethodConst = typeof ProductListItemTaxMethodConst[keyof typeof ProductListItemTaxMethodConst]; + + diff --git a/models/product-prices.ts b/models/product-prices.ts new file mode 100644 index 00000000..48813820 --- /dev/null +++ b/models/product-prices.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 ProductPrices + */ +export interface ProductPrices { + /** + * Array of objects, each containing: currency (string), price (number), cost (number, optional), overhead_cost (number, optional) + * @type {Array} + * @memberof ProductPrices + */ + 'prices'?: Array; +} + diff --git a/models/product-request.ts b/models/product-request.ts new file mode 100644 index 00000000..7a8dd6ac --- /dev/null +++ b/models/product-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 ProductRequest + */ +export interface ProductRequest { + /** + * The product code + * @type {string} + * @memberof ProductRequest + */ + 'code'?: string; + /** + * The product description + * @type {string} + * @memberof ProductRequest + */ + 'description'?: 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), `notes` (string, 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/product-request1.ts b/models/product-request1.ts new file mode 100644 index 00000000..bb4bbe60 --- /dev/null +++ b/models/product-request1.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 ProductRequest1 + */ +export interface ProductRequest1 { + [key: string]: any; + + /** + * The product code + * @type {string} + * @memberof ProductRequest1 + */ + 'code'?: string; + /** + * The product description + * @type {string} + * @memberof ProductRequest1 + */ + 'description'?: string; + /** + * The unit in which this product is sold + * @type {string} + * @memberof ProductRequest1 + */ + 'unit'?: string; + /** + * The tax percentage + * @type {number} + * @memberof ProductRequest1 + */ + 'tax'?: number; + /** + * Whether this product will be made active or not + * @type {boolean} + * @memberof ProductRequest1 + */ + 'active_flag'?: boolean; + /** + * Whether this product can be selected in deals or not + * @type {boolean} + * @memberof ProductRequest1 + */ + 'selectable'?: boolean; + /** + * + * @type {string} + * @memberof ProductRequest1 + */ + 'visible_to'?: ProductRequest1VisibleToConst; + /** + * 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 ProductRequest1 + */ + 'owner_id'?: number; + /** + * An array of objects, each containing: `currency` (string), `price` (number), `cost` (number, optional), `overhead_cost` (number, optional), `notes` (string, 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 ProductRequest1 + */ + 'prices'?: Array; +} + +export const ProductRequest1VisibleToConst = { + _1: '1', + _3: '3', + _5: '5', + _7: '7' +} as const; + +export type ProductRequest1VisibleToConst = typeof ProductRequest1VisibleToConst[keyof typeof ProductRequest1VisibleToConst]; + + diff --git a/models/project-all-of.ts b/models/project-all-of.ts new file mode 100644 index 00000000..8a16ccb3 --- /dev/null +++ b/models/project-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 ProjectAllOf + */ +export interface ProjectAllOf { + /** + * The title of the project + * @type {string} + * @memberof ProjectAllOf + */ + 'title'?: string; + /** + * The ID of the board this project is associated with + * @type {number} + * @memberof ProjectAllOf + */ + 'board_id'?: number; + /** + * The ID of the phase this project is associated with + * @type {number} + * @memberof ProjectAllOf + */ + 'phase_id'?: number; +} + diff --git a/models/project-all-of1.ts b/models/project-all-of1.ts new file mode 100644 index 00000000..4ed9ce9b --- /dev/null +++ b/models/project-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 ProjectAllOf1 + */ +export interface ProjectAllOf1 { + /** + * The description of the project + * @type {string} + * @memberof ProjectAllOf1 + */ + 'description'?: string; + /** + * The status of the project + * @type {string} + * @memberof ProjectAllOf1 + */ + 'status'?: string; + /** + * The ID of a project owner + * @type {number} + * @memberof ProjectAllOf1 + */ + 'owner_id'?: number; + /** + * The start date of the project. Format: YYYY-MM-DD. + * @type {string} + * @memberof ProjectAllOf1 + */ + 'start_date'?: string; + /** + * The end date of the project. Format: YYYY-MM-DD. + * @type {string} + * @memberof ProjectAllOf1 + */ + 'end_date'?: string; + /** + * An array of IDs of the deals this project is associated with + * @type {Array} + * @memberof ProjectAllOf1 + */ + 'deal_ids'?: Array; + /** + * The ID of the organization this project is associated with + * @type {number} + * @memberof ProjectAllOf1 + */ + 'org_id'?: number; + /** + * The ID of the person this project is associated with + * @type {number} + * @memberof ProjectAllOf1 + */ + 'person_id'?: number; + /** + * An array of IDs of the labels this project has + * @type {Array} + * @memberof ProjectAllOf1 + */ + 'labels'?: Array; +} + diff --git a/models/project-all-of2.ts b/models/project-all-of2.ts new file mode 100644 index 00000000..4a8be837 --- /dev/null +++ b/models/project-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 ProjectAllOf2 + */ +export interface ProjectAllOf2 { + /** + * The creation date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof ProjectAllOf2 + */ + 'add_time'?: string; + /** + * The update date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof ProjectAllOf2 + */ + 'update_time'?: string; + /** + * The status changed date and time of the project in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof ProjectAllOf2 + */ + '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 ProjectAllOf2 + */ + 'archive_time'?: string; +} + diff --git a/models/project-id.ts b/models/project-id.ts new file mode 100644 index 00000000..1f01a5ca --- /dev/null +++ b/models/project-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 ProjectId + */ +export interface ProjectId { + /** + * The ID of the project, generated when the task was created + * @type {number} + * @memberof ProjectId + */ + 'id'?: number; +} + 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.ts b/models/project-response-object.ts new file mode 100644 index 00000000..425c1940 --- /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 { Project } from './project'; +// May contain unused imports in some cases +// @ts-ignore +import { ProjectId } from './project-id'; + +/** + * @type ProjectResponseObject + * @export + */ +export type ProjectResponseObject = Project & ProjectId; + + diff --git a/models/project-template.ts b/models/project-template.ts new file mode 100644 index 00000000..955b894a --- /dev/null +++ b/models/project-template.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 ProjectTemplate + */ +export interface ProjectTemplate { + /** + * The ID of a template + * @type {number} + * @memberof ProjectTemplate + */ + 'id'?: number; + /** + * The title of a template + * @type {string} + * @memberof ProjectTemplate + */ + 'title'?: string; + /** + * The description of a template + * @type {string} + * @memberof ProjectTemplate + */ + 'description'?: string; + /** + * The ID of the project board this template is associated with + * @type {number} + * @memberof ProjectTemplate + */ + 'projects_board_id'?: number; + /** + * The ID of a template owner + * @type {number} + * @memberof ProjectTemplate + */ + 'owner_id'?: number; + /** + * The creation date and time of the template in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof ProjectTemplate + */ + 'add_time'?: string; + /** + * The update date and time of the template in UTC. Format: YYYY-MM-DD HH:MM:SS. + * @type {string} + * @memberof ProjectTemplate + */ + 'update_time'?: string; +} + diff --git a/models/project.ts b/models/project.ts new file mode 100644 index 00000000..dae3c5f2 --- /dev/null +++ b/models/project.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 { ProjectAllOf } from './project-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { ProjectAllOf1 } from './project-all-of1'; +// May contain unused imports in some cases +// @ts-ignore +import { ProjectAllOf2 } from './project-all-of2'; + +/** + * @type Project + * @export + */ +export type Project = ProjectAllOf & ProjectAllOf1 & ProjectAllOf2; + + 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-bad-request-error-response-additional-data.ts b/models/receive-message-bad-request-error-response-additional-data.ts new file mode 100644 index 00000000..e3bb839f --- /dev/null +++ b/models/receive-message-bad-request-error-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 ReceiveMessageBadRequestErrorResponseAdditionalData + */ +export interface ReceiveMessageBadRequestErrorResponseAdditionalData { + /** + * An error code sent by the API + * @type {string} + * @memberof ReceiveMessageBadRequestErrorResponseAdditionalData + */ + 'code'?: string; +} + diff --git a/models/receive-message-bad-request-error-response.ts b/models/receive-message-bad-request-error-response.ts new file mode 100644 index 00000000..aba31ac4 --- /dev/null +++ b/models/receive-message-bad-request-error-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 { ReceiveMessageBadRequestErrorResponseAdditionalData } from './receive-message-bad-request-error-response-additional-data'; + +/** + * + * @export + * @interface ReceiveMessageBadRequestErrorResponse + */ +export interface ReceiveMessageBadRequestErrorResponse { + /** + * + * @type {boolean} + * @memberof ReceiveMessageBadRequestErrorResponse + */ + 'success'?: boolean; + /** + * The error description + * @type {string} + * @memberof ReceiveMessageBadRequestErrorResponse + */ + 'error'?: string; + /** + * + * @type {string} + * @memberof ReceiveMessageBadRequestErrorResponse + */ + 'error_info'?: string; + /** + * + * @type {ReceiveMessageBadRequestErrorResponseAdditionalData} + * @memberof ReceiveMessageBadRequestErrorResponse + */ + 'additional_data'?: ReceiveMessageBadRequestErrorResponseAdditionalData; +} + 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/recents-data-inner-any-of.ts b/models/recents-data-inner-any-of.ts new file mode 100644 index 00000000..33cc1038 --- /dev/null +++ b/models/recents-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 { Activity } from './activity'; + +/** + * + * @export + * @interface RecentsDataInnerAnyOf + */ +export interface RecentsDataInnerAnyOf { + /** + * + * @type {string} + * @memberof RecentsDataInnerAnyOf + */ + 'item'?: RecentsDataInnerAnyOfItemConst; + /** + * + * @type {number} + * @memberof RecentsDataInnerAnyOf + */ + 'id'?: number; + /** + * + * @type {Activity} + * @memberof RecentsDataInnerAnyOf + */ + 'data'?: Activity; +} + +export const RecentsDataInnerAnyOfItemConst = { + activity: 'activity' +} as const; + +export type RecentsDataInnerAnyOfItemConst = typeof RecentsDataInnerAnyOfItemConst[keyof typeof RecentsDataInnerAnyOfItemConst]; + + diff --git a/models/recents-data-inner-any-of1.ts b/models/recents-data-inner-any-of1.ts new file mode 100644 index 00000000..7dec9836 --- /dev/null +++ b/models/recents-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 { ActivityType } from './activity-type'; + +/** + * + * @export + * @interface RecentsDataInnerAnyOf1 + */ +export interface RecentsDataInnerAnyOf1 { + /** + * + * @type {string} + * @memberof RecentsDataInnerAnyOf1 + */ + 'item'?: RecentsDataInnerAnyOf1ItemConst; + /** + * + * @type {number} + * @memberof RecentsDataInnerAnyOf1 + */ + 'id'?: number; + /** + * + * @type {ActivityType} + * @memberof RecentsDataInnerAnyOf1 + */ + 'data'?: ActivityType; +} + +export const RecentsDataInnerAnyOf1ItemConst = { + activityType: 'activityType' +} as const; + +export type RecentsDataInnerAnyOf1ItemConst = typeof RecentsDataInnerAnyOf1ItemConst[keyof typeof RecentsDataInnerAnyOf1ItemConst]; + + diff --git a/models/recents-data-inner-any-of10.ts b/models/recents-data-inner-any-of10.ts new file mode 100644 index 00000000..3fe4ecbd --- /dev/null +++ b/models/recents-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 { BaseUser } from './base-user'; + +/** + * + * @export + * @interface RecentsDataInnerAnyOf10 + */ +export interface RecentsDataInnerAnyOf10 { + /** + * + * @type {string} + * @memberof RecentsDataInnerAnyOf10 + */ + 'item'?: RecentsDataInnerAnyOf10ItemConst; + /** + * + * @type {number} + * @memberof RecentsDataInnerAnyOf10 + */ + 'id'?: number; + /** + * + * @type {BaseUser} + * @memberof RecentsDataInnerAnyOf10 + */ + 'data'?: BaseUser; +} + +export const RecentsDataInnerAnyOf10ItemConst = { + user: 'user' +} as const; + +export type RecentsDataInnerAnyOf10ItemConst = typeof RecentsDataInnerAnyOf10ItemConst[keyof typeof RecentsDataInnerAnyOf10ItemConst]; + + diff --git a/models/recents-data-inner-any-of2.ts b/models/recents-data-inner-any-of2.ts new file mode 100644 index 00000000..2da1959d --- /dev/null +++ b/models/recents-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 RecentsDataInnerAnyOf2 + */ +export interface RecentsDataInnerAnyOf2 { + /** + * + * @type {string} + * @memberof RecentsDataInnerAnyOf2 + */ + 'item'?: RecentsDataInnerAnyOf2ItemConst; + /** + * + * @type {number} + * @memberof RecentsDataInnerAnyOf2 + */ + 'id'?: number; + /** + * + * @type {DealStrict} + * @memberof RecentsDataInnerAnyOf2 + */ + 'data'?: DealStrict; +} + +export const RecentsDataInnerAnyOf2ItemConst = { + deal: 'deal' +} as const; + +export type RecentsDataInnerAnyOf2ItemConst = typeof RecentsDataInnerAnyOf2ItemConst[keyof typeof RecentsDataInnerAnyOf2ItemConst]; + + diff --git a/models/recents-data-inner-any-of3.ts b/models/recents-data-inner-any-of3.ts new file mode 100644 index 00000000..e3dd90ea --- /dev/null +++ b/models/recents-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 { GetAssociatedFilesResponseAllOfDataInner } from './get-associated-files-response-all-of-data-inner'; + +/** + * + * @export + * @interface RecentsDataInnerAnyOf3 + */ +export interface RecentsDataInnerAnyOf3 { + /** + * + * @type {string} + * @memberof RecentsDataInnerAnyOf3 + */ + 'item'?: RecentsDataInnerAnyOf3ItemConst; + /** + * + * @type {number} + * @memberof RecentsDataInnerAnyOf3 + */ + 'id'?: number; + /** + * + * @type {GetAssociatedFilesResponseAllOfDataInner} + * @memberof RecentsDataInnerAnyOf3 + */ + 'data'?: GetAssociatedFilesResponseAllOfDataInner; +} + +export const RecentsDataInnerAnyOf3ItemConst = { + file: 'file' +} as const; + +export type RecentsDataInnerAnyOf3ItemConst = typeof RecentsDataInnerAnyOf3ItemConst[keyof typeof RecentsDataInnerAnyOf3ItemConst]; + + diff --git a/models/recents-data-inner-any-of4.ts b/models/recents-data-inner-any-of4.ts new file mode 100644 index 00000000..cc5893d0 --- /dev/null +++ b/models/recents-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 { GetFiltersResponseAllOfDataInner } from './get-filters-response-all-of-data-inner'; + +/** + * + * @export + * @interface RecentsDataInnerAnyOf4 + */ +export interface RecentsDataInnerAnyOf4 { + /** + * + * @type {string} + * @memberof RecentsDataInnerAnyOf4 + */ + 'item'?: RecentsDataInnerAnyOf4ItemConst; + /** + * + * @type {number} + * @memberof RecentsDataInnerAnyOf4 + */ + 'id'?: number; + /** + * + * @type {GetFiltersResponseAllOfDataInner} + * @memberof RecentsDataInnerAnyOf4 + */ + 'data'?: GetFiltersResponseAllOfDataInner; +} + +export const RecentsDataInnerAnyOf4ItemConst = { + filter: 'filter' +} as const; + +export type RecentsDataInnerAnyOf4ItemConst = typeof RecentsDataInnerAnyOf4ItemConst[keyof typeof RecentsDataInnerAnyOf4ItemConst]; + + diff --git a/models/recents-data-inner-any-of5.ts b/models/recents-data-inner-any-of5.ts new file mode 100644 index 00000000..8748a16e --- /dev/null +++ b/models/recents-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 { Note } from './note'; + +/** + * + * @export + * @interface RecentsDataInnerAnyOf5 + */ +export interface RecentsDataInnerAnyOf5 { + /** + * + * @type {string} + * @memberof RecentsDataInnerAnyOf5 + */ + 'item'?: RecentsDataInnerAnyOf5ItemConst; + /** + * + * @type {number} + * @memberof RecentsDataInnerAnyOf5 + */ + 'id'?: number; + /** + * + * @type {Note} + * @memberof RecentsDataInnerAnyOf5 + */ + 'data'?: Note; +} + +export const RecentsDataInnerAnyOf5ItemConst = { + note: 'note' +} as const; + +export type RecentsDataInnerAnyOf5ItemConst = typeof RecentsDataInnerAnyOf5ItemConst[keyof typeof RecentsDataInnerAnyOf5ItemConst]; + + diff --git a/models/recents-data-inner-any-of6.ts b/models/recents-data-inner-any-of6.ts new file mode 100644 index 00000000..dbb04709 --- /dev/null +++ b/models/recents-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 RecentsDataInnerAnyOf6 + */ +export interface RecentsDataInnerAnyOf6 { + /** + * + * @type {string} + * @memberof RecentsDataInnerAnyOf6 + */ + 'item'?: RecentsDataInnerAnyOf6ItemConst; + /** + * + * @type {number} + * @memberof RecentsDataInnerAnyOf6 + */ + 'id'?: number; + /** + * + * @type {MergePersonItem} + * @memberof RecentsDataInnerAnyOf6 + */ + 'data'?: MergePersonItem; +} + +export const RecentsDataInnerAnyOf6ItemConst = { + person: 'person' +} as const; + +export type RecentsDataInnerAnyOf6ItemConst = typeof RecentsDataInnerAnyOf6ItemConst[keyof typeof RecentsDataInnerAnyOf6ItemConst]; + + diff --git a/models/recents-data-inner-any-of7.ts b/models/recents-data-inner-any-of7.ts new file mode 100644 index 00000000..42246790 --- /dev/null +++ b/models/recents-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 RecentsDataInnerAnyOf7 + */ +export interface RecentsDataInnerAnyOf7 { + /** + * + * @type {string} + * @memberof RecentsDataInnerAnyOf7 + */ + 'item'?: RecentsDataInnerAnyOf7ItemConst; + /** + * + * @type {number} + * @memberof RecentsDataInnerAnyOf7 + */ + 'id'?: number; + /** + * + * @type {BaseOrganizationItem} + * @memberof RecentsDataInnerAnyOf7 + */ + 'data'?: BaseOrganizationItem; +} + +export const RecentsDataInnerAnyOf7ItemConst = { + organization: 'organization' +} as const; + +export type RecentsDataInnerAnyOf7ItemConst = typeof RecentsDataInnerAnyOf7ItemConst[keyof typeof RecentsDataInnerAnyOf7ItemConst]; + + diff --git a/models/recents-data-inner-any-of8.ts b/models/recents-data-inner-any-of8.ts new file mode 100644 index 00000000..6a04c23a --- /dev/null +++ b/models/recents-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 { BasePipeline } from './base-pipeline'; + +/** + * + * @export + * @interface RecentsDataInnerAnyOf8 + */ +export interface RecentsDataInnerAnyOf8 { + /** + * + * @type {string} + * @memberof RecentsDataInnerAnyOf8 + */ + 'item'?: RecentsDataInnerAnyOf8ItemConst; + /** + * + * @type {number} + * @memberof RecentsDataInnerAnyOf8 + */ + 'id'?: number; + /** + * + * @type {BasePipeline} + * @memberof RecentsDataInnerAnyOf8 + */ + 'data'?: BasePipeline; +} + +export const RecentsDataInnerAnyOf8ItemConst = { + pipeline: 'pipeline' +} as const; + +export type RecentsDataInnerAnyOf8ItemConst = typeof RecentsDataInnerAnyOf8ItemConst[keyof typeof RecentsDataInnerAnyOf8ItemConst]; + + diff --git a/models/recents-data-inner-any-of9-data.ts b/models/recents-data-inner-any-of9-data.ts new file mode 100644 index 00000000..438a3363 --- /dev/null +++ b/models/recents-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 RecentsDataInnerAnyOf9Data + */ +export interface RecentsDataInnerAnyOf9Data { + /** + * The ID of the product + * @type {number} + * @memberof RecentsDataInnerAnyOf9Data + */ + 'id'?: number; + /** + * The name of the product + * @type {string} + * @memberof RecentsDataInnerAnyOf9Data + */ + 'name'?: string; + /** + * The product code + * @type {string} + * @memberof RecentsDataInnerAnyOf9Data + */ + 'code'?: string; + /** + * The description of the product + * @type {string} + * @memberof RecentsDataInnerAnyOf9Data + */ + 'description'?: string; + /** + * The unit in which this product is sold + * @type {string} + * @memberof RecentsDataInnerAnyOf9Data + */ + 'unit'?: string; + /** + * The tax percentage + * @type {number} + * @memberof RecentsDataInnerAnyOf9Data + */ + 'tax'?: number; + /** + * The category of the product + * @type {string} + * @memberof RecentsDataInnerAnyOf9Data + */ + 'category'?: string; + /** + * Whether this product will be made active or not + * @type {boolean} + * @memberof RecentsDataInnerAnyOf9Data + */ + 'active_flag'?: boolean; + /** + * Whether this product can be selected in deals or not + * @type {boolean} + * @memberof RecentsDataInnerAnyOf9Data + */ + 'selectable'?: boolean; + /** + * The first letter of the product name + * @type {string} + * @memberof RecentsDataInnerAnyOf9Data + */ + '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 RecentsDataInnerAnyOf9Data + */ + '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 RecentsDataInnerAnyOf9Data + */ + 'owner_id'?: number; + /** + * The count of files + * @type {number} + * @memberof RecentsDataInnerAnyOf9Data + */ + 'files_count'?: number; + /** + * The date and time when the product was added to the deal + * @type {string} + * @memberof RecentsDataInnerAnyOf9Data + */ + 'add_time'?: string; + /** + * The date and time when the product was updated to the deal + * @type {string} + * @memberof RecentsDataInnerAnyOf9Data + */ + '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 RecentsDataInnerAnyOf9Data + */ + 'prices'?: Array; +} + diff --git a/models/recents-data-inner-any-of9.ts b/models/recents-data-inner-any-of9.ts new file mode 100644 index 00000000..2e619eec --- /dev/null +++ b/models/recents-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 { RecentsDataInnerAnyOf9Data } from './recents-data-inner-any-of9-data'; + +/** + * + * @export + * @interface RecentsDataInnerAnyOf9 + */ +export interface RecentsDataInnerAnyOf9 { + /** + * + * @type {string} + * @memberof RecentsDataInnerAnyOf9 + */ + 'item'?: RecentsDataInnerAnyOf9ItemConst; + /** + * + * @type {number} + * @memberof RecentsDataInnerAnyOf9 + */ + 'id'?: number; + /** + * + * @type {RecentsDataInnerAnyOf9Data} + * @memberof RecentsDataInnerAnyOf9 + */ + 'data'?: RecentsDataInnerAnyOf9Data; +} + +export const RecentsDataInnerAnyOf9ItemConst = { + product: 'product' +} as const; + +export type RecentsDataInnerAnyOf9ItemConst = typeof RecentsDataInnerAnyOf9ItemConst[keyof typeof RecentsDataInnerAnyOf9ItemConst]; + + diff --git a/models/recents-data-inner.ts b/models/recents-data-inner.ts new file mode 100644 index 00000000..5cd80ad9 --- /dev/null +++ b/models/recents-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 { BaseUser } from './base-user'; +// May contain unused imports in some cases +// @ts-ignore +import { RecentsDataInnerAnyOf } from './recents-data-inner-any-of'; +// May contain unused imports in some cases +// @ts-ignore +import { RecentsDataInnerAnyOf1 } from './recents-data-inner-any-of1'; +// May contain unused imports in some cases +// @ts-ignore +import { RecentsDataInnerAnyOf10 } from './recents-data-inner-any-of10'; +// May contain unused imports in some cases +// @ts-ignore +import { RecentsDataInnerAnyOf2 } from './recents-data-inner-any-of2'; +// May contain unused imports in some cases +// @ts-ignore +import { RecentsDataInnerAnyOf3 } from './recents-data-inner-any-of3'; +// May contain unused imports in some cases +// @ts-ignore +import { RecentsDataInnerAnyOf4 } from './recents-data-inner-any-of4'; +// May contain unused imports in some cases +// @ts-ignore +import { RecentsDataInnerAnyOf5 } from './recents-data-inner-any-of5'; +// May contain unused imports in some cases +// @ts-ignore +import { RecentsDataInnerAnyOf6 } from './recents-data-inner-any-of6'; +// May contain unused imports in some cases +// @ts-ignore +import { RecentsDataInnerAnyOf7 } from './recents-data-inner-any-of7'; +// May contain unused imports in some cases +// @ts-ignore +import { RecentsDataInnerAnyOf8 } from './recents-data-inner-any-of8'; +// May contain unused imports in some cases +// @ts-ignore +import { RecentsDataInnerAnyOf9 } from './recents-data-inner-any-of9'; +// May contain unused imports in some cases +// @ts-ignore +import { RecentsStage } from './recents-stage'; + +/** + * + * @export + * @interface RecentsDataInner + */ +export interface RecentsDataInner { + /** + * + * @type {string} + * @memberof RecentsDataInner + */ + 'item'?: RecentsDataInnerItemConst; + /** + * + * @type {number} + * @memberof RecentsDataInner + */ + 'id'?: number; + /** + * + * @type {BaseUser} + * @memberof RecentsDataInner + */ + 'data'?: BaseUser; +} + +export const RecentsDataInnerItemConst = { + user: 'user' +} as const; + +export type RecentsDataInnerItemConst = typeof RecentsDataInnerItemConst[keyof typeof RecentsDataInnerItemConst]; + + diff --git a/models/recents-stage.ts b/models/recents-stage.ts new file mode 100644 index 00000000..b9670213 --- /dev/null +++ b/models/recents-stage.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 { BaseStage } from './base-stage'; + +/** + * + * @export + * @interface RecentsStage + */ +export interface RecentsStage { + /** + * + * @type {string} + * @memberof RecentsStage + */ + 'item'?: RecentsStageItemConst; + /** + * + * @type {number} + * @memberof RecentsStage + */ + 'id'?: number; + /** + * + * @type {BaseStage} + * @memberof RecentsStage + */ + 'data'?: BaseStage; +} + +export const RecentsStageItemConst = { + stage: 'stage' +} as const; + +export type RecentsStageItemConst = typeof RecentsStageItemConst[keyof typeof RecentsStageItemConst]; + + diff --git a/models/related-deal-data-dealid.ts b/models/related-deal-data-dealid.ts new file mode 100644 index 00000000..67a0a235 --- /dev/null +++ b/models/related-deal-data-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 RelatedDealDataDEALID + */ +export interface RelatedDealDataDEALID { + /** + * The ID of the deal associated with the item + * @type {number} + * @memberof RelatedDealDataDEALID + */ + 'id'?: number; + /** + * The title of the deal associated with the item + * @type {string} + * @memberof RelatedDealDataDEALID + */ + 'title'?: string; + /** + * The status of the deal associated with the item + * @type {string} + * @memberof RelatedDealDataDEALID + */ + 'status'?: string; + /** + * The value of the deal that is associated with the item + * @type {number} + * @memberof RelatedDealDataDEALID + */ + 'value'?: number; + /** + * The currency of the deal value + * @type {string} + * @memberof RelatedDealDataDEALID + */ + 'currency'?: string; + /** + * The ID of the stage the deal is currently at + * @type {number} + * @memberof RelatedDealDataDEALID + */ + 'stage_id'?: number; + /** + * The ID of the pipeline the deal is in + * @type {number} + * @memberof RelatedDealDataDEALID + */ + 'pipeline_id'?: number; +} + diff --git a/models/related-deal-data.ts b/models/related-deal-data.ts new file mode 100644 index 00000000..fdf28892 --- /dev/null +++ b/models/related-deal-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 { RelatedDealDataDEALID } from './related-deal-data-dealid'; + +/** + * + * @export + * @interface RelatedDealData + */ +export interface RelatedDealData { + /** + * + * @type {RelatedDealDataDEALID} + * @memberof RelatedDealData + */ + 'DEAL_ID'?: RelatedDealDataDEALID; +} + diff --git a/models/related-organization-data-with-active-flag.ts b/models/related-organization-data-with-active-flag.ts new file mode 100644 index 00000000..62db95ab --- /dev/null +++ b/models/related-organization-data-with-active-flag.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 { OrganizationDataWithIdAndActiveFlag } from './organization-data-with-id-and-active-flag'; + +/** + * + * @export + * @interface RelatedOrganizationDataWithActiveFlag + */ +export interface RelatedOrganizationDataWithActiveFlag { + /** + * + * @type {OrganizationDataWithIdAndActiveFlag} + * @memberof RelatedOrganizationDataWithActiveFlag + */ + 'ORGANIZATION_ID'?: OrganizationDataWithIdAndActiveFlag; +} + diff --git a/models/related-organization-data.ts b/models/related-organization-data.ts new file mode 100644 index 00000000..1e4f457d --- /dev/null +++ b/models/related-organization-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 { OrganizationDataWithId } from './organization-data-with-id'; + +/** + * + * @export + * @interface RelatedOrganizationData + */ +export interface RelatedOrganizationData { + /** + * + * @type {OrganizationDataWithId} + * @memberof RelatedOrganizationData + */ + 'ORGANIZATION_ID'?: OrganizationDataWithId; +} + diff --git a/models/related-picture-data-pictureid.ts b/models/related-picture-data-pictureid.ts new file mode 100644 index 00000000..608ad15f --- /dev/null +++ b/models/related-picture-data-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 { PersonAllOfPictureId } from './person-all-of-picture-id'; +// May contain unused imports in some cases +// @ts-ignore +import { PictureDataPictures } from './picture-data-pictures'; + +/** + * @type RelatedPictureDataPICTUREID + * The ID of the picture + * @export + */ +export type RelatedPictureDataPICTUREID = PersonAllOfPictureId; + + diff --git a/models/related-picture-data.ts b/models/related-picture-data.ts new file mode 100644 index 00000000..0faf3c79 --- /dev/null +++ b/models/related-picture-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 { RelatedPictureDataPICTUREID } from './related-picture-data-pictureid'; + +/** + * The picture that is associated with the item + * @export + * @interface RelatedPictureData + */ +export interface RelatedPictureData { + /** + * + * @type {RelatedPictureDataPICTUREID} + * @memberof RelatedPictureData + */ + 'PICTURE_ID'?: RelatedPictureDataPICTUREID; +} + 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-all-of.ts b/models/relationship-organization-info-item-with-active-flag-all-of.ts new file mode 100644 index 00000000..27b806ee --- /dev/null +++ b/models/relationship-organization-info-item-with-active-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 RelationshipOrganizationInfoItemWithActiveFlagAllOf + */ +export interface RelationshipOrganizationInfoItemWithActiveFlagAllOf { + /** + * Whether the associated organization is active or not + * @type {boolean} + * @memberof RelationshipOrganizationInfoItemWithActiveFlagAllOf + */ + 'active_flag'?: boolean; +} + 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..d701db4b --- /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 { RelationshipOrganizationInfoItem } from './relationship-organization-info-item'; +// May contain unused imports in some cases +// @ts-ignore +import { RelationshipOrganizationInfoItemWithActiveFlagAllOf } from './relationship-organization-info-item-with-active-flag-all-of'; + +/** + * @type RelationshipOrganizationInfoItemWithActiveFlag + * @export + */ +export type RelationshipOrganizationInfoItemWithActiveFlag = RelationshipOrganizationInfoItem & RelationshipOrganizationInfoItemWithActiveFlagAllOf; + + diff --git a/models/relationship-organization-info-item.ts b/models/relationship-organization-info-item.ts new file mode 100644 index 00000000..787b1c0b --- /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 { OrganizationDataWithIdAllOf1 } from './organization-data-with-id-all-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 = OrganizationDataWithIdAllOf1 & 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-data.ts b/models/role-assignment-data.ts new file mode 100644 index 00000000..5b3e8001 --- /dev/null +++ b/models/role-assignment-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 RoleAssignmentData + */ +export interface RoleAssignmentData { + /** + * The user ID + * @type {number} + * @memberof RoleAssignmentData + */ + 'user_id'?: number; + /** + * The role ID + * @type {number} + * @memberof RoleAssignmentData + */ + 'role_id'?: number; + /** + * Whether the role is active or not + * @type {boolean} + * @memberof RoleAssignmentData + */ + 'active_flag'?: boolean; + /** + * The assignment type + * @type {string} + * @memberof RoleAssignmentData + */ + 'type'?: string; +} + diff --git a/models/role-assignment.ts b/models/role-assignment.ts new file mode 100644 index 00000000..5401a583 --- /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 { RoleAssignmentData } from './role-assignment-data'; + +/** + * @type RoleAssignment + * The assignment data of the role + * @export + */ +export type RoleAssignment = BaseRoleRequest & RoleAssignmentData; + + diff --git a/models/role-settings.ts b/models/role-settings.ts new file mode 100644 index 00000000..6b874598 --- /dev/null +++ b/models/role-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 RoleSettings + */ +export interface RoleSettings { + /** + * The default visibility level of the deals for the role + * @type {number} + * @memberof RoleSettings + */ + 'deal_default_visibility'?: number; + /** + * The default visibility level of the leads for the role + * @type {number} + * @memberof RoleSettings + */ + 'lead_default_visibility'?: number; + /** + * The default visibility level of the organizations for the role + * @type {number} + * @memberof RoleSettings + */ + 'org_default_visibility'?: number; + /** + * The default visibility level of the people for the role + * @type {number} + * @memberof RoleSettings + */ + 'person_default_visibility'?: number; + /** + * The default visibility level of the products for the role + * @type {number} + * @memberof RoleSettings + */ + 'product_default_visibility'?: number; + /** + * The access level of the deals for the role (only for default role) + * @type {number} + * @memberof RoleSettings + */ + 'deal_access_level'?: number; + /** + * The access level of the organizations for the role (only for default role) + * @type {number} + * @memberof RoleSettings + */ + 'org_access_level'?: number; + /** + * The access level of the people for the role (only for default role) + * @type {number} + * @memberof RoleSettings + */ + 'person_access_level'?: number; + /** + * The access level of the products for the role (only for default role) + * @type {number} + * @memberof RoleSettings + */ + 'product_access_level'?: number; +} + diff --git a/models/search-item.ts b/models/search-item.ts new file mode 100644 index 00000000..4b73ceb5 --- /dev/null +++ b/models/search-item.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 SearchItem + */ +export interface SearchItem { + /** + * Search result relevancy + * @type {number} + * @memberof SearchItem + */ + 'result_score'?: number; + /** + * Item + * @type {object} + * @memberof SearchItem + */ + 'item'?: object; +} + diff --git a/models/stage-details-data.ts b/models/stage-details-data.ts new file mode 100644 index 00000000..00c7492d --- /dev/null +++ b/models/stage-details-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 { PipelineDetailsAllOfDealsSummary } from './pipeline-details-all-of-deals-summary'; + +/** + * + * @export + * @interface StageDetailsData + */ +export interface StageDetailsData { + /** + * + * @type {PipelineDetailsAllOfDealsSummary} + * @memberof StageDetailsData + */ + 'deals_summary'?: PipelineDetailsAllOfDealsSummary; +} + diff --git a/models/stage-with-pipeline-info.ts b/models/stage-with-pipeline-info.ts new file mode 100644 index 00000000..ba1f505c --- /dev/null +++ b/models/stage-with-pipeline-info.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 StageWithPipelineInfo + */ +export interface StageWithPipelineInfo { + /** + * The name of the pipeline + * @type {string} + * @memberof StageWithPipelineInfo + */ + 'pipeline_name'?: string; + /** + * The pipeline deal probability. When `true`, overrides the stage probability. + * @type {boolean} + * @memberof StageWithPipelineInfo + */ + 'pipeline_deal_probability'?: boolean; +} + diff --git a/models/stage.ts b/models/stage.ts new file mode 100644 index 00000000..340f87b6 --- /dev/null +++ b/models/stage.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 Stage + */ +export interface Stage { + /** + * The name of the stage + * @type {string} + * @memberof Stage + */ + 'name'?: string; + /** + * The ID of the pipeline to add stage to + * @type {number} + * @memberof Stage + */ + 'pipeline_id'?: number; + /** + * The success probability percentage of the deal. Used/shown when deal weighted values are used. + * @type {number} + * @memberof Stage + */ + 'deal_probability'?: number; + /** + * Whether deals in this stage can become rotten + * @type {boolean} + * @memberof Stage + */ + '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 Stage + */ + 'rotten_days'?: number; +} + 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-item.ts b/models/subscription-item.ts new file mode 100644 index 00000000..d2fb028d --- /dev/null +++ b/models/subscription-item.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 SubscriptionItem + */ +export interface SubscriptionItem { + /** + * The ID of the subscription + * @type {number} + * @memberof SubscriptionItem + */ + 'id'?: number; + /** + * The ID of the user who created the subscription + * @type {number} + * @memberof SubscriptionItem + */ + 'user_id'?: number; + /** + * The ID of the deal this subscription is associated with + * @type {number} + * @memberof SubscriptionItem + */ + 'deal_id'?: number; + /** + * The description of the recurring subscription + * @type {string} + * @memberof SubscriptionItem + */ + 'description'?: string; + /** + * The subscription status + * @type {boolean} + * @memberof SubscriptionItem + */ + 'is_active'?: boolean; + /** + * Shows how many payments a recurring subscription has + * @type {number} + * @memberof SubscriptionItem + */ + 'cycles_count'?: number; + /** + * The amount of each payment + * @type {number} + * @memberof SubscriptionItem + */ + 'cycle_amount'?: number; + /** + * Indicates that the recurring subscription will last until it is manually canceled or deleted + * @type {boolean} + * @memberof SubscriptionItem + */ + 'infinite'?: boolean; + /** + * The currency of the subscription + * @type {string} + * @memberof SubscriptionItem + */ + 'currency'?: string; + /** + * The interval between payments + * @type {string} + * @memberof SubscriptionItem + */ + 'cadence_type'?: string; + /** + * The start date of the recurring subscription + * @type {string} + * @memberof SubscriptionItem + */ + 'start_date'?: string; + /** + * The end date of the subscription + * @type {string} + * @memberof SubscriptionItem + */ + 'end_date'?: string; + /** + * The total value of all payments + * @type {number} + * @memberof SubscriptionItem + */ + 'lifetime_value'?: number; + /** + * The final status of the subscription + * @type {string} + * @memberof SubscriptionItem + */ + 'final_status'?: string | null; + /** + * The creation time of the subscription + * @type {string} + * @memberof SubscriptionItem + */ + 'add_time'?: string; + /** + * The update time of the subscription + * @type {string} + * @memberof SubscriptionItem + */ + 'update_time'?: string; +} + 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/template-response-object.ts b/models/template-response-object.ts new file mode 100644 index 00000000..3efa4981 --- /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 { ProjectTemplate } from './project-template'; + +/** + * @type TemplateResponseObject + * @export + */ +export type TemplateResponseObject = ProjectTemplate; + + 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-plan-item-response.ts b/models/update-activity-plan-item-response.ts new file mode 100644 index 00000000..a023300c --- /dev/null +++ b/models/update-activity-plan-item-response.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 { GetProjectPlanResponseDataInner } from './get-project-plan-response-data-inner'; + +/** + * + * @export + * @interface UpdateActivityPlanItemResponse + */ +export interface UpdateActivityPlanItemResponse { + /** + * + * @type {boolean} + * @memberof UpdateActivityPlanItemResponse + */ + 'success'?: boolean; + /** + * + * @type {GetProjectPlanResponseDataInner} + * @memberof UpdateActivityPlanItemResponse + */ + 'data'?: GetProjectPlanResponseDataInner; + /** + * + * @type {object} + * @memberof UpdateActivityPlanItemResponse + */ + 'additional_data'?: object | null; +} + 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..a4855119 --- /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 { ActivityAllOf } from './activity-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 = ActivityAllOf & UpdateActivityRequestAllOf; + + diff --git a/models/update-activity-response.ts b/models/update-activity-response.ts new file mode 100644 index 00000000..41f9c272 --- /dev/null +++ b/models/update-activity-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 { Activity } from './activity'; +// May contain unused imports in some cases +// @ts-ignore +import { AddActivityResponseRelatedObjects } from './add-activity-response-related-objects'; + +/** + * + * @export + * @interface UpdateActivityResponse + */ +export interface UpdateActivityResponse { + /** + * + * @type {boolean} + * @memberof UpdateActivityResponse + */ + 'success'?: boolean; + /** + * + * @type {Activity} + * @memberof UpdateActivityResponse + */ + 'data'?: Activity; + /** + * + * @type {AddActivityResponseRelatedObjects} + * @memberof UpdateActivityResponse + */ + 'related_objects'?: AddActivityResponseRelatedObjects; +} + 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..f7704f5e --- /dev/null +++ b/models/update-deal-parameters.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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; + /** + * The ID of Marketing channel this deal was created from. Provided value must be one of the channels configured for your company which you can fetch with GET /v1/dealFields. + * @type {number} + * @memberof UpdateDealParameters + */ + 'channel'?: number | null; + /** + * The optional ID to further distinguish the Marketing channel. + * @type {string} + * @memberof UpdateDealParameters + */ + 'channel_id'?: string | null; +} + +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-all-of.ts b/models/update-deal-product-request-all-of.ts new file mode 100644 index 00000000..d08fbb4b --- /dev/null +++ b/models/update-deal-product-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 UpdateDealProductRequestAllOf + */ +export interface UpdateDealProductRequestAllOf { + /** + * Only available in Advanced and above plans How often a customer is billed for access to a service or product To set `billing_frequency` different than `one-time`, the deal must not have installments associated A deal can have up to 20 products attached with `billing_frequency` different than `one-time` + * @type {string} + * @memberof UpdateDealProductRequestAllOf + */ + 'billing_frequency'?: UpdateDealProductRequestAllOfBillingFrequencyConst; +} + +export const UpdateDealProductRequestAllOfBillingFrequencyConst = { + one_time: 'one-time', + annually: 'annually', + semi_annually: 'semi-annually', + quarterly: 'quarterly', + monthly: 'monthly', + weekly: 'weekly' +} as const; + +export type UpdateDealProductRequestAllOfBillingFrequencyConst = typeof UpdateDealProductRequestAllOfBillingFrequencyConst[keyof typeof UpdateDealProductRequestAllOfBillingFrequencyConst]; + + diff --git a/models/update-deal-product-request.ts b/models/update-deal-product-request.ts new file mode 100644 index 00000000..23fc92d8 --- /dev/null +++ b/models/update-deal-product-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 { AddDealProductRequestAllOf1 } from './add-deal-product-request-all-of1'; +// May contain unused imports in some cases +// @ts-ignore +import { AddDealProductRequestAllOf2 } from './add-deal-product-request-all-of2'; +// May contain unused imports in some cases +// @ts-ignore +import { DealProductRequestBody1 } from './deal-product-request-body1'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdateDealProductRequestAllOf } from './update-deal-product-request-all-of'; + +/** + * @type UpdateDealProductRequest + * @export + */ +export type UpdateDealProductRequest = AddDealProductRequestAllOf1 & AddDealProductRequestAllOf2 & DealProductRequestBody1 & UpdateDealProductRequestAllOf; + + diff --git a/models/update-deal-request.ts b/models/update-deal-request.ts new file mode 100644 index 00000000..24634f1b --- /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 { BasicDeal1 } from './basic-deal1'; +// 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 = BasicDeal1 & 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-response.ts b/models/update-file-response.ts new file mode 100644 index 00000000..a716411e --- /dev/null +++ b/models/update-file-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 { GetFilesResponseDataInner } from './get-files-response-data-inner'; + +/** + * + * @export + * @interface UpdateFileResponse + */ +export interface UpdateFileResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof UpdateFileResponse + */ + 'success'?: boolean; + /** + * + * @type {GetFilesResponseDataInner} + * @memberof UpdateFileResponse + */ + 'data'?: GetFilesResponseDataInner; +} + 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.ts b/models/update-lead-request.ts new file mode 100644 index 00000000..f494c38f --- /dev/null +++ b/models/update-lead-request.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { LeadValue } from './lead-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 {LeadValue} + * @memberof UpdateLeadRequest + */ + 'value'?: LeadValue | 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; + /** + * The ID of Marketing channel this lead was created from. Provided value must be one of the channels configured for your company which you can fetch with GET /v1/dealFields. + * @type {number} + * @memberof UpdateLeadRequest + */ + 'channel'?: number | null; + /** + * The optional ID to further distinguish the Marketing channel. + * @type {string} + * @memberof UpdateLeadRequest + */ + 'channel_id'?: string | null; +} + +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-response-all-of.ts b/models/update-mail-thread-response-all-of.ts new file mode 100644 index 00000000..c441556f --- /dev/null +++ b/models/update-mail-thread-response-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 { MailThread1 } from './mail-thread1'; + +/** + * + * @export + * @interface UpdateMailThreadResponseAllOf + */ +export interface UpdateMailThreadResponseAllOf { + /** + * + * @type {MailThread1} + * @memberof UpdateMailThreadResponseAllOf + */ + 'data'?: MailThread1; +} + diff --git a/models/update-mail-thread-response.ts b/models/update-mail-thread-response.ts new file mode 100644 index 00000000..02a19a96 --- /dev/null +++ b/models/update-mail-thread-response.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 { MailThread1 } from './mail-thread1'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdateMailThreadResponseAllOf } from './update-mail-thread-response-all-of'; + +/** + * @type UpdateMailThreadResponse + * @export + */ +export type UpdateMailThreadResponse = BaseResponse & UpdateMailThreadResponseAllOf; + + diff --git a/models/update-organization-relationship-response.ts b/models/update-organization-relationship-response.ts new file mode 100644 index 00000000..042cefae --- /dev/null +++ b/models/update-organization-relationship-response.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 { AddOrganizationRelationshipResponseAllOf } from './add-organization-relationship-response-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 { GetOrganizationRelationshipsResponseAllOfRelatedObjects } from './get-organization-relationships-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { OrganizationRelationshipWithCalculatedFieldsAllOf } from './organization-relationship-with-calculated-fields-all-of'; + +/** + * @type UpdateOrganizationRelationshipResponse + * @export + */ +export type UpdateOrganizationRelationshipResponse = AddOrganizationRelationshipResponseAllOf & 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..07f8e933 --- /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 { BasicOrganization1 } from './basic-organization1'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdateOrganizationRequestAllOf } from './update-organization-request-all-of'; + +/** + * @type UpdateOrganizationRequest + * @export + */ +export type UpdateOrganizationRequest = BasicOrganization1 & UpdateOrganizationRequestAllOf; + + diff --git a/models/update-organization-response-all-of.ts b/models/update-organization-response-all-of.ts new file mode 100644 index 00000000..615166ce --- /dev/null +++ b/models/update-organization-response-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 { GetOrganizationsResponseAllOfRelatedObjects } from './get-organizations-response-all-of-related-objects'; + +/** + * + * @export + * @interface UpdateOrganizationResponseAllOf + */ +export interface UpdateOrganizationResponseAllOf { + /** + * + * @type {BaseOrganizationItem} + * @memberof UpdateOrganizationResponseAllOf + */ + 'data'?: BaseOrganizationItem; + /** + * + * @type {GetOrganizationsResponseAllOfRelatedObjects} + * @memberof UpdateOrganizationResponseAllOf + */ + 'related_objects'?: GetOrganizationsResponseAllOfRelatedObjects; +} + diff --git a/models/update-organization-response.ts b/models/update-organization-response.ts new file mode 100644 index 00000000..0a98861e --- /dev/null +++ b/models/update-organization-response.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 { GetOrganizationsResponseAllOfRelatedObjects } from './get-organizations-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdateOrganizationResponseAllOf } from './update-organization-response-all-of'; + +/** + * @type UpdateOrganizationResponse + * @export + */ +export type UpdateOrganizationResponse = BaseResponse & UpdateOrganizationResponseAllOf; + + diff --git a/models/update-person-request-all-of.ts b/models/update-person-request-all-of.ts new file mode 100644 index 00000000..cdf2042e --- /dev/null +++ b/models/update-person-request-all-of.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. + */ + + + +/** + * + * @export + * @interface UpdatePersonRequestAllOf + */ +export interface UpdatePersonRequestAllOf { + [key: string]: any; + + /** + * 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..a36cf19a --- /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 { PersonAllOfPhoneInner } from './person-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-response.ts b/models/update-person-response.ts new file mode 100644 index 00000000..e2d79869 --- /dev/null +++ b/models/update-person-response.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 { AddPersonResponseAllOf } from './add-person-response-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 { GetProductsResponseAllOfRelatedObjects } from './get-products-response-all-of-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { Person } from './person'; + +/** + * @type UpdatePersonResponse + * @export + */ +export type UpdatePersonResponse = AddPersonResponseAllOf & BaseResponse; + + diff --git a/models/update-pipeline-response-all-of-data.ts b/models/update-pipeline-response-all-of-data.ts new file mode 100644 index 00000000..858437f0 --- /dev/null +++ b/models/update-pipeline-response-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 UpdatePipelineResponseAllOfData + * The pipeline object + * @export + */ +export type UpdatePipelineResponseAllOfData = BasePipelineWithSelectedFlag; + + diff --git a/models/update-pipeline-response-all-of.ts b/models/update-pipeline-response-all-of.ts new file mode 100644 index 00000000..64a59466 --- /dev/null +++ b/models/update-pipeline-response-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 { UpdatePipelineResponseAllOfData } from './update-pipeline-response-all-of-data'; + +/** + * + * @export + * @interface UpdatePipelineResponseAllOf + */ +export interface UpdatePipelineResponseAllOf { + /** + * + * @type {UpdatePipelineResponseAllOfData} + * @memberof UpdatePipelineResponseAllOf + */ + 'data'?: UpdatePipelineResponseAllOfData; +} + diff --git a/models/update-pipeline-response.ts b/models/update-pipeline-response.ts new file mode 100644 index 00000000..18274e8d --- /dev/null +++ b/models/update-pipeline-response.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 { UpdatePipelineResponseAllOf } from './update-pipeline-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdatePipelineResponseAllOfData } from './update-pipeline-response-all-of-data'; + +/** + * @type UpdatePipelineResponse + * @export + */ +export type UpdatePipelineResponse = BaseResponse & UpdatePipelineResponseAllOf; + + diff --git a/models/update-product-field-response.ts b/models/update-product-field-response.ts new file mode 100644 index 00000000..74472d64 --- /dev/null +++ b/models/update-product-field-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 UpdateProductFieldResponse + */ +export interface UpdateProductFieldResponse { + /** + * The name of the field + * @type {string} + * @memberof UpdateProductFieldResponse + */ + '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 UpdateProductFieldResponse + */ + 'options'?: Array; +} + diff --git a/models/update-product-request-all-of.ts b/models/update-product-request-all-of.ts new file mode 100644 index 00000000..ed064a07 --- /dev/null +++ b/models/update-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 UpdateProductRequestAllOf + */ +export interface UpdateProductRequestAllOf { + /** + * The name of the product + * @type {string} + * @memberof UpdateProductRequestAllOf + */ + 'name'?: string; +} + diff --git a/models/update-product-request-all-of1.ts b/models/update-product-request-all-of1.ts new file mode 100644 index 00000000..f4f63ba5 --- /dev/null +++ b/models/update-product-request-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 UpdateProductRequestAllOf1 + */ +export interface UpdateProductRequestAllOf1 { + /** + * Only available in Advanced and above plans How often a customer is billed for access to a service or product + * @type {string} + * @memberof UpdateProductRequestAllOf1 + */ + 'billing_frequency'?: UpdateProductRequestAllOf1BillingFrequencyConst; +} + +export const UpdateProductRequestAllOf1BillingFrequencyConst = { + one_time: 'one-time', + annually: 'annually', + semi_annually: 'semi-annually', + quarterly: 'quarterly', + monthly: 'monthly', + weekly: 'weekly' +} as const; + +export type UpdateProductRequestAllOf1BillingFrequencyConst = typeof UpdateProductRequestAllOf1BillingFrequencyConst[keyof typeof UpdateProductRequestAllOf1BillingFrequencyConst]; + + diff --git a/models/update-product-request.ts b/models/update-product-request.ts new file mode 100644 index 00000000..58565464 --- /dev/null +++ b/models/update-product-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 { AddProductRequestAllOf2 } from './add-product-request-all-of2'; +// May contain unused imports in some cases +// @ts-ignore +import { ProductRequest1 } from './product-request1'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdateProductRequestAllOf } from './update-product-request-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdateProductRequestAllOf1 } from './update-product-request-all-of1'; + +/** + * @type UpdateProductRequest + * @export + */ +export type UpdateProductRequest = AddProductRequestAllOf2 & ProductRequest1 & UpdateProductRequestAllOf & UpdateProductRequestAllOf1; + + diff --git a/models/update-product-response.ts b/models/update-product-response.ts new file mode 100644 index 00000000..14abe419 --- /dev/null +++ b/models/update-product-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 { GetActivitiesResponseRelatedObjects } from './get-activities-response-related-objects'; +// May contain unused imports in some cases +// @ts-ignore +import { ProductListItemProduct } from './product-list-item-product'; + +/** + * + * @export + * @interface UpdateProductResponse + */ +export interface UpdateProductResponse { + /** + * If the response is successful or not + * @type {boolean} + * @memberof UpdateProductResponse + */ + 'success'?: boolean; + /** + * + * @type {ProductListItemProduct} + * @memberof UpdateProductResponse + */ + 'data'?: ProductListItemProduct; + /** + * + * @type {GetActivitiesResponseRelatedObjects} + * @memberof UpdateProductResponse + */ + 'related_objects'?: GetActivitiesResponseRelatedObjects; +} + diff --git a/models/update-project-request.ts b/models/update-project-request.ts new file mode 100644 index 00000000..0748784e --- /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 { ProjectAllOf } from './project-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { ProjectAllOf1 } from './project-all-of1'; + +/** + * @type UpdateProjectRequest + * @export + */ +export type UpdateProjectRequest = ProjectAllOf & ProjectAllOf1; + + 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-response.ts b/models/update-project-response.ts new file mode 100644 index 00000000..d65187ce --- /dev/null +++ b/models/update-project-response.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 UpdateProjectResponse + */ +export interface UpdateProjectResponse { + /** + * + * @type {boolean} + * @memberof UpdateProjectResponse + */ + 'success'?: boolean; + /** + * + * @type {ProjectResponseObject} + * @memberof UpdateProjectResponse + */ + 'data'?: ProjectResponseObject; + /** + * + * @type {object} + * @memberof UpdateProjectResponse + */ + '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-response-all-of.ts b/models/update-role-response-all-of.ts new file mode 100644 index 00000000..4521670c --- /dev/null +++ b/models/update-role-response-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 { UpdateRoleResponseData } from './update-role-response-data'; + +/** + * + * @export + * @interface UpdateRoleResponseAllOf + */ +export interface UpdateRoleResponseAllOf { + /** + * + * @type {UpdateRoleResponseData} + * @memberof UpdateRoleResponseAllOf + */ + 'data'?: UpdateRoleResponseData; +} + diff --git a/models/update-role-response-data.ts b/models/update-role-response-data.ts new file mode 100644 index 00000000..959b65a4 --- /dev/null +++ b/models/update-role-response-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 UpdateRoleResponseData + */ +export interface UpdateRoleResponseData { + /** + * + * @type {number} + * @memberof UpdateRoleResponseData + */ + 'id'?: number; +} + diff --git a/models/update-role-response.ts b/models/update-role-response.ts new file mode 100644 index 00000000..16204860 --- /dev/null +++ b/models/update-role-response.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 { UpdateRoleResponseAllOf } from './update-role-response-all-of'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdateRoleResponseData } from './update-role-response-data'; + +/** + * @type UpdateRoleResponse + * @export + */ +export type UpdateRoleResponse = BaseResponse & UpdateRoleResponseAllOf; + + diff --git a/models/update-stage-request-all-of.ts b/models/update-stage-request-all-of.ts new file mode 100644 index 00000000..976ec254 --- /dev/null +++ b/models/update-stage-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 UpdateStageRequestAllOf + */ +export interface UpdateStageRequestAllOf { + /** + * An order number for this stage. Order numbers should be used to order the stages in the pipeline. + * @type {number} + * @memberof UpdateStageRequestAllOf + */ + 'order_nr'?: number; +} + diff --git a/models/update-stage-request.ts b/models/update-stage-request.ts new file mode 100644 index 00000000..b253bbcb --- /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 { Stage } from './stage'; +// May contain unused imports in some cases +// @ts-ignore +import { UpdateStageRequestAllOf } from './update-stage-request-all-of'; + +/** + * @type UpdateStageRequest + * @export + */ +export type UpdateStageRequest = Stage & UpdateStageRequestAllOf; + + 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-plan-item-response.ts b/models/update-task-plan-item-response.ts new file mode 100644 index 00000000..3ff174c4 --- /dev/null +++ b/models/update-task-plan-item-response.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 { GetProjectPlanResponseDataInner } from './get-project-plan-response-data-inner'; + +/** + * + * @export + * @interface UpdateTaskPlanItemResponse + */ +export interface UpdateTaskPlanItemResponse { + /** + * + * @type {boolean} + * @memberof UpdateTaskPlanItemResponse + */ + 'success'?: boolean; + /** + * + * @type {GetProjectPlanResponseDataInner} + * @memberof UpdateTaskPlanItemResponse + */ + 'data'?: GetProjectPlanResponseDataInner; + /** + * + * @type {object} + * @memberof UpdateTaskPlanItemResponse + */ + 'additional_data'?: object | null; +} + diff --git a/models/update-task-response.ts b/models/update-task-response.ts new file mode 100644 index 00000000..93ed9805 --- /dev/null +++ b/models/update-task-response.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 UpdateTaskResponse + */ +export interface UpdateTaskResponse { + /** + * + * @type {boolean} + * @memberof UpdateTaskResponse + */ + 'success'?: boolean; + /** + * + * @type {TaskResponseObject} + * @memberof UpdateTaskResponse + */ + 'data'?: TaskResponseObject; + /** + * + * @type {object} + * @memberof UpdateTaskResponse + */ + '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/upsert-activity-type-response-all-of.ts b/models/upsert-activity-type-response-all-of.ts new file mode 100644 index 00000000..e45071ec --- /dev/null +++ b/models/upsert-activity-type-response-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 { ActivityType } from './activity-type'; + +/** + * + * @export + * @interface UpsertActivityTypeResponseAllOf + */ +export interface UpsertActivityTypeResponseAllOf { + /** + * + * @type {ActivityType} + * @memberof UpsertActivityTypeResponseAllOf + */ + 'data'?: ActivityType; +} + diff --git a/models/upsert-activity-type-response.ts b/models/upsert-activity-type-response.ts new file mode 100644 index 00000000..55142538 --- /dev/null +++ b/models/upsert-activity-type-response.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 { ActivityType } from './activity-type'; +// May contain unused imports in some cases +// @ts-ignore +import { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { UpsertActivityTypeResponseAllOf } from './upsert-activity-type-response-all-of'; + +/** + * @type UpsertActivityTypeResponse + * @export + */ +export type UpsertActivityTypeResponse = BaseResponse & UpsertActivityTypeResponseAllOf; + + diff --git a/models/upsert-comment-response.ts b/models/upsert-comment-response.ts new file mode 100644 index 00000000..1a1958b3 --- /dev/null +++ b/models/upsert-comment-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 { Comment } from './comment'; + +/** + * + * @export + * @interface UpsertCommentResponse + */ +export interface UpsertCommentResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof UpsertCommentResponse + */ + 'success'?: boolean; + /** + * + * @type {Comment} + * @memberof UpsertCommentResponse + */ + 'data'?: Comment; +} + diff --git a/models/upsert-goal-response-data.ts b/models/upsert-goal-response-data.ts new file mode 100644 index 00000000..125f9660 --- /dev/null +++ b/models/upsert-goal-response-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 { Goal } from './goal'; + +/** + * + * @export + * @interface UpsertGoalResponseData + */ +export interface UpsertGoalResponseData { + /** + * + * @type {Goal} + * @memberof UpsertGoalResponseData + */ + 'goal'?: Goal; +} + diff --git a/models/upsert-goal-response.ts b/models/upsert-goal-response.ts new file mode 100644 index 00000000..2000e6f0 --- /dev/null +++ b/models/upsert-goal-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 { UpsertGoalResponseData } from './upsert-goal-response-data'; + +/** + * + * @export + * @interface UpsertGoalResponse + */ +export interface UpsertGoalResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof UpsertGoalResponse + */ + 'success'?: boolean; + /** + * + * @type {UpsertGoalResponseData} + * @memberof UpsertGoalResponse + */ + 'data'?: UpsertGoalResponseData; +} + diff --git a/models/upsert-lead-label-response.ts b/models/upsert-lead-label-response.ts new file mode 100644 index 00000000..bd86c25c --- /dev/null +++ b/models/upsert-lead-label-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 { LeadLabel } from './lead-label'; + +/** + * + * @export + * @interface UpsertLeadLabelResponse + */ +export interface UpsertLeadLabelResponse { + /** + * + * @type {boolean} + * @memberof UpsertLeadLabelResponse + */ + 'success'?: boolean; + /** + * + * @type {LeadLabel} + * @memberof UpsertLeadLabelResponse + */ + 'data'?: LeadLabel; +} + diff --git a/models/upsert-note-response.ts b/models/upsert-note-response.ts new file mode 100644 index 00000000..ce7c6a63 --- /dev/null +++ b/models/upsert-note-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 { Note } from './note'; + +/** + * + * @export + * @interface UpsertNoteResponse + */ +export interface UpsertNoteResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof UpsertNoteResponse + */ + 'success'?: boolean; + /** + * + * @type {Note} + * @memberof UpsertNoteResponse + */ + 'data'?: Note; +} + diff --git a/models/upsert-role-settings-response-data-data.ts b/models/upsert-role-settings-response-data-data.ts new file mode 100644 index 00000000..ed74b73c --- /dev/null +++ b/models/upsert-role-settings-response-data-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 UpsertRoleSettingsResponseDataData + */ +export interface UpsertRoleSettingsResponseDataData { + /** + * The ID of the role + * @type {number} + * @memberof UpsertRoleSettingsResponseDataData + */ + 'id'?: number; + /** + * The setting + * @type {number} + * @memberof UpsertRoleSettingsResponseDataData + */ + 'deal_default_visibility'?: UpsertRoleSettingsResponseDataDataDealDefaultVisibilityConst; +} + +export const UpsertRoleSettingsResponseDataDataDealDefaultVisibilityConst = { + NUMBER_1: 1, + NUMBER_3: 3, + NUMBER_5: 5, + NUMBER_7: 7 +} as const; + +export type UpsertRoleSettingsResponseDataDataDealDefaultVisibilityConst = typeof UpsertRoleSettingsResponseDataDataDealDefaultVisibilityConst[keyof typeof UpsertRoleSettingsResponseDataDataDealDefaultVisibilityConst]; + + diff --git a/models/upsert-role-settings-response-data.ts b/models/upsert-role-settings-response-data.ts new file mode 100644 index 00000000..c27b9083 --- /dev/null +++ b/models/upsert-role-settings-response-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 { UpsertRoleSettingsResponseDataData } from './upsert-role-settings-response-data-data'; + +/** + * + * @export + * @interface UpsertRoleSettingsResponseData + */ +export interface UpsertRoleSettingsResponseData { + /** + * + * @type {UpsertRoleSettingsResponseDataData} + * @memberof UpsertRoleSettingsResponseData + */ + 'data'?: UpsertRoleSettingsResponseDataData; +} + diff --git a/models/upsert-role-settings-response.ts b/models/upsert-role-settings-response.ts new file mode 100644 index 00000000..6cdd6357 --- /dev/null +++ b/models/upsert-role-settings-response.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 { UpsertRoleSettingsResponseData } from './upsert-role-settings-response-data'; +// May contain unused imports in some cases +// @ts-ignore +import { UpsertRoleSettingsResponseDataData } from './upsert-role-settings-response-data-data'; + +/** + * @type UpsertRoleSettingsResponse + * @export + */ +export type UpsertRoleSettingsResponse = BaseResponse & UpsertRoleSettingsResponseData; + + diff --git a/models/upsert-stage-response.ts b/models/upsert-stage-response.ts new file mode 100644 index 00000000..154e2d26 --- /dev/null +++ b/models/upsert-stage-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 { BaseStage1 } from './base-stage1'; + +/** + * + * @export + * @interface UpsertStageResponse + */ +export interface UpsertStageResponse { + /** + * If the request was successful or not + * @type {boolean} + * @memberof UpsertStageResponse + */ + 'success'?: boolean; + /** + * + * @type {BaseStage1} + * @memberof UpsertStageResponse + */ + 'data'?: BaseStage1; +} + diff --git a/models/user-access.ts b/models/user-access.ts new file mode 100644 index 00000000..4ac8a4ff --- /dev/null +++ b/models/user-access.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 UserAccess + */ +export interface UserAccess { + /** + * + * @type {string} + * @memberof UserAccess + */ + 'app'?: UserAccessAppConst; + /** + * + * @type {boolean} + * @memberof UserAccess + */ + 'admin'?: boolean; + /** + * + * @type {string} + * @memberof UserAccess + */ + 'permission_set_id'?: string; +} + +export const UserAccessAppConst = { + sales: 'sales', + projects: 'projects', + campaigns: 'campaigns', + global: 'global', + account_settings: 'account_settings' +} as const; + +export type UserAccessAppConst = typeof UserAccessAppConst[keyof typeof UserAccessAppConst]; + + diff --git a/models/user-access1.ts b/models/user-access1.ts new file mode 100644 index 00000000..1cef9d02 --- /dev/null +++ b/models/user-access1.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 UserAccess1 + */ +export interface UserAccess1 { + /** + * + * @type {string} + * @memberof UserAccess1 + */ + 'app': UserAccess1AppConst; + /** + * + * @type {boolean} + * @memberof UserAccess1 + */ + 'admin'?: boolean; + /** + * + * @type {string} + * @memberof UserAccess1 + */ + 'permission_set_id'?: string; +} + +export const UserAccess1AppConst = { + sales: 'sales', + projects: 'projects', + campaigns: 'campaigns', + global: 'global', + account_settings: 'account_settings' +} as const; + +export type UserAccess1AppConst = typeof UserAccess1AppConst[keyof typeof UserAccess1AppConst]; + + 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-provider-link-error-response.ts b/models/user-provider-link-error-response.ts new file mode 100644 index 00000000..41a2d2d5 --- /dev/null +++ b/models/user-provider-link-error-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 UserProviderLinkErrorResponse + */ +export interface UserProviderLinkErrorResponse { + /** + * Boolean that indicates whether the request was successful or not + * @type {boolean} + * @memberof UserProviderLinkErrorResponse + */ + 'success'?: boolean; + /** + * The error message of the request + * @type {string} + * @memberof UserProviderLinkErrorResponse + */ + 'message'?: string; +} + diff --git a/models/user-settings-item.ts b/models/user-settings-item.ts new file mode 100644 index 00000000..04703eb5 --- /dev/null +++ b/models/user-settings-item.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 UserSettingsItem + */ +export interface UserSettingsItem { + /** + * If the vendors are allowed to be part of the Marketplace team or not + * @type {boolean} + * @memberof UserSettingsItem + */ + 'marketplace_team'?: boolean; + /** + * The number of results shown in list by default + * @type {number} + * @memberof UserSettingsItem + */ + 'list_limit'?: number; + /** + * Whether beta app is enabled + * @type {boolean} + * @memberof UserSettingsItem + */ + 'beta_app'?: boolean; + /** + * Prevent salesphone call to override + * @type {boolean} + * @memberof UserSettingsItem + */ + 'prevent_salesphone_callto_override'?: boolean; + /** + * The destination of file upload + * @type {string} + * @memberof UserSettingsItem + */ + 'file_upload_destination'?: string; + /** + * The call to link syntax + * @type {string} + * @memberof UserSettingsItem + */ + 'callto_link_syntax'?: string; + /** + * Whether the expected close date of the deal is filled automatically or not + * @type {boolean} + * @memberof UserSettingsItem + */ + 'autofill_deal_expected_close_date'?: boolean; + /** + * Allow the vendors to duplicate a person + * @type {string} + * @memberof UserSettingsItem + */ + 'person_duplicate_condition'?: string; +} + 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..715a2afc --- /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 { BaseResponse } from './base-response'; +// May contain unused imports in some cases +// @ts-ignore +import { WebhooksBadRequestResponseAllOf } from './webhooks-bad-request-response-all-of'; + +/** + * @type WebhooksBadRequestResponse + * @export + */ +export type WebhooksBadRequestResponse = BaseResponse & 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" + ] +}