pipedrive 17.5.3 → 18.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (799) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/README.md +15 -8
  3. package/dist/ApiClient.js +71 -218
  4. package/dist/api/ActivitiesApi.js +21 -52
  5. package/dist/api/ActivityFieldsApi.js +3 -16
  6. package/dist/api/ActivityTypesApi.js +17 -45
  7. package/dist/api/BillingApi.js +3 -16
  8. package/dist/api/CallLogsApi.js +19 -52
  9. package/dist/api/ChannelsApi.js +15 -55
  10. package/dist/api/CurrenciesApi.js +3 -16
  11. package/dist/api/DealFieldsApi.js +21 -49
  12. package/dist/api/DealsApi.js +134 -234
  13. package/dist/api/FilesApi.js +45 -78
  14. package/dist/api/FiltersApi.js +25 -62
  15. package/dist/api/GlobalMessagesApi.js +6 -22
  16. package/dist/api/GoalsApi.js +36 -47
  17. package/dist/api/ItemSearchApi.js +19 -35
  18. package/dist/api/LeadLabelsApi.js +13 -40
  19. package/dist/api/LeadSourcesApi.js +3 -16
  20. package/dist/api/LeadsApi.js +23 -54
  21. package/dist/api/LegacyTeamsApi.js +29 -69
  22. package/dist/api/MailboxApi.js +25 -55
  23. package/dist/api/NoteFieldsApi.js +3 -16
  24. package/dist/api/NotesApi.js +43 -85
  25. package/dist/api/OrganizationFieldsApi.js +21 -49
  26. package/dist/api/OrganizationRelationshipsApi.js +19 -50
  27. package/dist/api/OrganizationsApi.js +75 -146
  28. package/dist/api/PermissionSetsApi.js +11 -30
  29. package/dist/api/PersonFieldsApi.js +21 -49
  30. package/dist/api/PersonsApi.js +85 -160
  31. package/dist/api/PipelinesApi.js +37 -73
  32. package/dist/api/ProductFieldsApi.js +21 -53
  33. package/dist/api/ProductsApi.js +51 -100
  34. package/dist/api/RecentsApi.js +5 -18
  35. package/dist/api/RolesApi.js +41 -95
  36. package/dist/api/SearchResultsApi.js +12 -31
  37. package/dist/api/StagesApi.js +25 -58
  38. package/dist/api/SubscriptionsApi.js +33 -80
  39. package/dist/api/TeamsApi.js +28 -68
  40. package/dist/api/UserConnectionsApi.js +3 -17
  41. package/dist/api/UserSettingsApi.js +3 -17
  42. package/dist/api/UsersApi.js +35 -80
  43. package/dist/api/WebhooksApi.js +9 -36
  44. package/dist/exceptions/FailResponseException.js +3 -8
  45. package/dist/exceptions/NotFoundException.js +3 -8
  46. package/dist/exceptions/OAuthProviderException.js +3 -8
  47. package/dist/exceptions/UnauthorizedException.js +3 -8
  48. package/dist/index.js +7 -755
  49. package/dist/model/ActivityDistributionData.js +2 -15
  50. package/dist/model/ActivityDistributionDataActivityDistribution.js +2 -15
  51. package/dist/model/ActivityDistributionDataActivityDistributionASSIGNEDTOUSERID.js +5 -21
  52. package/dist/model/ActivityDistributionDataActivityDistributionASSIGNEDTOUSERIDActivities.js +2 -14
  53. package/dist/model/ActivityDistributionDataWithAdditionalData.js +9 -35
  54. package/dist/model/ActivityInfo.js +6 -22
  55. package/dist/model/ActivityObjectFragment.js +11 -32
  56. package/dist/model/ActivityPostObject.js +23 -76
  57. package/dist/model/ActivityPostObjectAllOf.js +9 -29
  58. package/dist/model/ActivityPutObject.js +23 -76
  59. package/dist/model/ActivityPutObjectAllOf.js +9 -29
  60. package/dist/model/ActivityRecordAdditionalData.js +2 -14
  61. package/dist/model/ActivityResponseObject.js +68 -211
  62. package/dist/model/ActivityResponseObjectAllOf.js +55 -120
  63. package/dist/model/ActivityTypeBulkDeleteResponse.js +7 -29
  64. package/dist/model/ActivityTypeBulkDeleteResponseAllOf.js +2 -15
  65. package/dist/model/ActivityTypeBulkDeleteResponseAllOfData.js +2 -14
  66. package/dist/model/ActivityTypeCreateRequest.js +4 -19
  67. package/dist/model/ActivityTypeCreateUpdateDeleteResponse.js +7 -29
  68. package/dist/model/ActivityTypeCreateUpdateDeleteResponseAllOf.js +2 -15
  69. package/dist/model/ActivityTypeListResponse.js +7 -29
  70. package/dist/model/ActivityTypeListResponseAllOf.js +2 -15
  71. package/dist/model/ActivityTypeObjectResponse.js +11 -33
  72. package/dist/model/ActivityTypeUpdateRequest.js +5 -21
  73. package/dist/model/AddActivityResponse200.js +5 -23
  74. package/dist/model/AddActivityResponse200RelatedObjects.js +5 -24
  75. package/dist/model/AddCallLogAudioFileRequest.js +2 -14
  76. package/dist/model/AddDealFollowerRequest.js +2 -14
  77. package/dist/model/AddDealParticipantRequest.js +2 -14
  78. package/dist/model/AddFile.js +3 -17
  79. package/dist/model/AddFileAndLinkItRequest.js +9 -31
  80. package/dist/model/AddFileRequest.js +7 -24
  81. package/dist/model/AddFilterRequest.js +6 -21
  82. package/dist/model/AddFollowerToPersonResponse.js +7 -29
  83. package/dist/model/AddFollowerToPersonResponseAllOf.js +2 -15
  84. package/dist/model/AddFollowerToPersonResponseAllOfData.js +5 -20
  85. package/dist/model/AddLeadLabelRequest.js +3 -17
  86. package/dist/model/AddLeadRequest.js +11 -34
  87. package/dist/model/AddNewPipeline.js +7 -29
  88. package/dist/model/AddNewPipelineAllOf.js +2 -15
  89. package/dist/model/AddNoteRequest.js +16 -56
  90. package/dist/model/AddNoteRequestAllOf.js +6 -22
  91. package/dist/model/AddOrUpdateGoalResponse200.js +3 -17
  92. package/dist/model/AddOrUpdateLeadLabelResponse200.js +3 -17
  93. package/dist/model/AddOrUpdateRoleSettingRequest.js +5 -25
  94. package/dist/model/AddOrganizationFollowerRequest.js +2 -14
  95. package/dist/model/AddOrganizationRelationshipRequest.js +6 -22
  96. package/dist/model/AddPersonFollowerRequest.js +2 -14
  97. package/dist/model/AddPersonPictureRequest.js +6 -22
  98. package/dist/model/AddPersonPictureResponse.js +7 -29
  99. package/dist/model/AddPersonPictureResponseAllOf.js +2 -15
  100. package/dist/model/AddPersonResponse.js +8 -33
  101. package/dist/model/AddPersonResponseAllOf.js +3 -18
  102. package/dist/model/AddPersonResponseAllOfRelatedObjects.js +2 -15
  103. package/dist/model/AddProductAttachmentDetails.js +45 -105
  104. package/dist/model/AddProductAttachmentDetailsAllOf.js +2 -14
  105. package/dist/model/AddProductFollowerRequest.js +2 -14
  106. package/dist/model/AddProductRequestBody.js +14 -51
  107. package/dist/model/AddRole.js +3 -16
  108. package/dist/model/AddRoleAssignmentRequest.js +2 -14
  109. package/dist/model/AddTeamUserRequest.js +2 -14
  110. package/dist/model/AddUserBlacklistedEmailRequest.js +2 -14
  111. package/dist/model/AddUserRequest.js +5 -21
  112. package/dist/model/AddUserRoleAssignmentRequest.js +2 -14
  113. package/dist/model/AddWebhookRequest.js +9 -40
  114. package/dist/model/AddedDealFollower.js +3 -17
  115. package/dist/model/AddedDealFollowerData.js +5 -20
  116. package/dist/model/AdditionalBaseOrganizationItemInfo.js +37 -118
  117. package/dist/model/AdditionalData.js +4 -18
  118. package/dist/model/AdditionalDataWithPagination.js +2 -15
  119. package/dist/model/AdditionalDataWithPaginationDetails.js +2 -15
  120. package/dist/model/AdditionalMergePersonInfo.js +35 -112
  121. package/dist/model/AdditionalPersonInfo.js +32 -105
  122. package/dist/model/AllOrganizationRelationshipsGetResponse.js +9 -37
  123. package/dist/model/AllOrganizationRelationshipsGetResponseAllOf.js +4 -21
  124. package/dist/model/AllOrganizationRelationshipsGetResponseAllOfRelatedObjects.js +2 -15
  125. package/dist/model/AllOrganizationsGetResponse.js +9 -37
  126. package/dist/model/AllOrganizationsGetResponseAllOf.js +4 -21
  127. package/dist/model/AllOrganizationsGetResponseAllOfRelatedObjects.js +4 -21
  128. package/dist/model/AnyOfRecents.js +1 -7
  129. package/dist/model/AnyOfRecentsActivityRecentsActivityTypeRecentsDealRecentsFileRecentsFilterRecentsNoteRecentsPersonRecentsOrganizationRecentsPipelineRecentsProductRecentsStageRecentsUser.js +1 -7
  130. package/dist/model/AnyType.js +1 -7
  131. package/dist/model/ArrayPrices.js +2 -14
  132. package/dist/model/Assignee.js +3 -16
  133. package/dist/model/BaseComment.js +11 -32
  134. package/dist/model/BaseCurrency.js +8 -26
  135. package/dist/model/BaseDeal.js +55 -118
  136. package/dist/model/BaseFollowerItem.js +4 -18
  137. package/dist/model/BaseMailThread.js +42 -135
  138. package/dist/model/BaseMailThreadAllOf.js +24 -60
  139. package/dist/model/BaseMailThreadAllOfParties.js +3 -17
  140. package/dist/model/BaseMailThreadMessages.js +32 -105
  141. package/dist/model/BaseMailThreadMessagesAllOf.js +14 -40
  142. package/dist/model/BaseNote.js +19 -52
  143. package/dist/model/BaseNoteDealTitle.js +2 -14
  144. package/dist/model/BaseNoteOrganization.js +2 -14
  145. package/dist/model/BaseNotePerson.js +2 -14
  146. package/dist/model/BaseOrganizationItem.js +51 -162
  147. package/dist/model/BaseOrganizationItemFields.js +15 -42
  148. package/dist/model/BaseOrganizationItemWithEditNameFlag.js +52 -165
  149. package/dist/model/BaseOrganizationItemWithEditNameFlagAllOf.js +2 -14
  150. package/dist/model/BaseOrganizationRelationshipItem.js +8 -27
  151. package/dist/model/BasePersonItem.js +16 -55
  152. package/dist/model/BasePersonItemEmail.js +4 -18
  153. package/dist/model/BasePersonItemPhone.js +4 -18
  154. package/dist/model/BasePipeline.js +9 -28
  155. package/dist/model/BasePipelineWithSelectedFlag.js +14 -49
  156. package/dist/model/BasePipelineWithSelectedFlagAllOf.js +2 -14
  157. package/dist/model/BaseProduct.js +10 -32
  158. package/dist/model/BaseResponse.js +2 -14
  159. package/dist/model/BaseResponseWithStatus.js +7 -28
  160. package/dist/model/BaseResponseWithStatusAllOf.js +2 -14
  161. package/dist/model/BaseRole.js +3 -16
  162. package/dist/model/BaseStage.js +12 -34
  163. package/dist/model/BaseTeam.js +14 -50
  164. package/dist/model/BaseTeamAdditionalProperties.js +3 -16
  165. package/dist/model/BaseUser.js +20 -51
  166. package/dist/model/BaseUserMe.js +30 -99
  167. package/dist/model/BaseUserMeAllOf.js +7 -25
  168. package/dist/model/BaseUserMeAllOfLanguage.js +3 -16
  169. package/dist/model/BaseWebhook.js +20 -51
  170. package/dist/model/BasicDeal.js +14 -41
  171. package/dist/model/BasicDealProduct.js +24 -32
  172. package/dist/model/BasicGoal.js +12 -32
  173. package/dist/model/BasicOrganization.js +3 -17
  174. package/dist/model/BasicPerson.js +9 -42
  175. package/dist/model/BasicPersonEmail.js +4 -18
  176. package/dist/model/BasicProductField.js +3 -16
  177. package/dist/model/BulkDeleteResponse.js +7 -29
  178. package/dist/model/BulkDeleteResponseAllOf.js +2 -15
  179. package/dist/model/BulkDeleteResponseAllOfData.js +2 -14
  180. package/dist/model/CalculatedFields.js +3 -16
  181. package/dist/model/CallLogObject.js +15 -44
  182. package/dist/model/CallLogResponse400.js +6 -22
  183. package/dist/model/CallLogResponse403.js +6 -22
  184. package/dist/model/CallLogResponse404.js +6 -22
  185. package/dist/model/CallLogResponse409.js +6 -22
  186. package/dist/model/CallLogResponse410.js +6 -22
  187. package/dist/model/CallLogResponse500.js +6 -22
  188. package/dist/model/ChannelObject.js +7 -25
  189. package/dist/model/ChannelObjectResponse.js +3 -17
  190. package/dist/model/ChannelObjectResponseData.js +12 -35
  191. package/dist/model/CommentPostPutObject.js +2 -14
  192. package/dist/model/CommonMailThread.js +15 -41
  193. package/dist/model/CreateRemoteFileAndLinkItToItem.js +3 -17
  194. package/dist/model/CreateTeam.js +5 -20
  195. package/dist/model/Currencies.js +3 -17
  196. package/dist/model/DealCountAndActivityInfo.js +18 -61
  197. package/dist/model/DealFlowResponse.js +9 -37
  198. package/dist/model/DealFlowResponseAllOf.js +4 -21
  199. package/dist/model/DealFlowResponseAllOfData.js +4 -18
  200. package/dist/model/DealFlowResponseAllOfRelatedObjects.js +5 -24
  201. package/dist/model/DealListActivitiesResponse.js +9 -37
  202. package/dist/model/DealListActivitiesResponseAllOf.js +4 -21
  203. package/dist/model/DealListActivitiesResponseAllOfRelatedObjects.js +5 -24
  204. package/dist/model/DealNonStrict.js +65 -200
  205. package/dist/model/DealNonStrictModeFields.js +6 -26
  206. package/dist/model/DealNonStrictModeFieldsCreatorUserId.js +8 -26
  207. package/dist/model/DealNonStrictWithDetails.js +71 -221
  208. package/dist/model/DealNonStrictWithDetailsAllOf.js +7 -27
  209. package/dist/model/DealNonStrictWithDetailsAllOfAge.js +8 -26
  210. package/dist/model/DealNonStrictWithDetailsAllOfAverageTimeToWon.js +8 -26
  211. package/dist/model/DealNonStrictWithDetailsAllOfStayInPipelineStages.js +3 -16
  212. package/dist/model/DealOrganizationData.js +7 -24
  213. package/dist/model/DealOrganizationDataWithId.js +12 -43
  214. package/dist/model/DealOrganizationDataWithIdAllOf.js +2 -14
  215. package/dist/model/DealParticipantCountInfo.js +3 -16
  216. package/dist/model/DealParticipants.js +5 -23
  217. package/dist/model/DealPersonData.js +6 -24
  218. package/dist/model/DealPersonDataEmail.js +4 -18
  219. package/dist/model/DealPersonDataPhone.js +4 -18
  220. package/dist/model/DealPersonDataWithId.js +11 -42
  221. package/dist/model/DealPersonDataWithIdAllOf.js +2 -14
  222. package/dist/model/DealSearchItem.js +3 -17
  223. package/dist/model/DealSearchItemItem.js +14 -42
  224. package/dist/model/DealSearchItemItemOrganization.js +3 -16
  225. package/dist/model/DealSearchItemItemOwner.js +2 -14
  226. package/dist/model/DealSearchItemItemPerson.js +3 -16
  227. package/dist/model/DealSearchItemItemStage.js +3 -16
  228. package/dist/model/DealSearchResponse.js +8 -33
  229. package/dist/model/DealSearchResponseAllOf.js +3 -18
  230. package/dist/model/DealSearchResponseAllOfData.js +2 -15
  231. package/dist/model/DealStrict.js +65 -196
  232. package/dist/model/DealStrictModeFields.js +6 -22
  233. package/dist/model/DealStrictWithMergeId.js +66 -199
  234. package/dist/model/DealStrictWithMergeIdAllOf.js +2 -14
  235. package/dist/model/DealSummary.js +5 -23
  236. package/dist/model/DealSummaryPerCurrency.js +2 -14
  237. package/dist/model/DealSummaryPerCurrencyFull.js +2 -15
  238. package/dist/model/DealSummaryPerCurrencyFullCURRENCYID.js +3 -16
  239. package/dist/model/DealSummaryPerStages.js +2 -15
  240. package/dist/model/DealSummaryPerStagesSTAGEID.js +2 -15
  241. package/dist/model/DealSummaryPerStagesSTAGEIDCURRENCYID.js +6 -22
  242. package/dist/model/DealTitleParameter.js +2 -14
  243. package/dist/model/DealUserData.js +7 -24
  244. package/dist/model/DealUserDataWithId.js +12 -43
  245. package/dist/model/DealUserDataWithIdAllOf.js +2 -14
  246. package/dist/model/DealsCountAndActivityInfo.js +18 -61
  247. package/dist/model/DealsCountInfo.js +9 -28
  248. package/dist/model/DealsMovementsInfo.js +5 -22
  249. package/dist/model/DealsMovementsInfoFormattedValues.js +2 -14
  250. package/dist/model/DealsMovementsInfoValues.js +2 -14
  251. package/dist/model/DeleteActivitiesResponse200.js +3 -17
  252. package/dist/model/DeleteActivitiesResponse200Data.js +2 -14
  253. package/dist/model/DeleteActivityResponse200.js +3 -17
  254. package/dist/model/DeleteActivityResponse200Data.js +2 -14
  255. package/dist/model/DeleteChannelSuccess.js +2 -14
  256. package/dist/model/DeleteComment.js +3 -16
  257. package/dist/model/DeleteConversationSuccess.js +2 -14
  258. package/dist/model/DeleteDeal.js +3 -17
  259. package/dist/model/DeleteDealData.js +2 -14
  260. package/dist/model/DeleteDealFollower.js +3 -17
  261. package/dist/model/DeleteDealFollowerData.js +2 -14
  262. package/dist/model/DeleteDealParticipant.js +3 -17
  263. package/dist/model/DeleteDealParticipantData.js +2 -14
  264. package/dist/model/DeleteDealProduct.js +3 -17
  265. package/dist/model/DeleteDealProductData.js +3 -16
  266. package/dist/model/DeleteFile.js +3 -17
  267. package/dist/model/DeleteFileData.js +2 -14
  268. package/dist/model/DeleteGoalResponse200.js +2 -14
  269. package/dist/model/DeleteMultipleDeals.js +3 -17
  270. package/dist/model/DeleteMultipleDealsData.js +2 -14
  271. package/dist/model/DeleteMultipleProductFieldsResponse.js +3 -17
  272. package/dist/model/DeleteMultipleProductFieldsResponseData.js +2 -14
  273. package/dist/model/DeleteNote.js +3 -16
  274. package/dist/model/DeletePersonResponse.js +7 -29
  275. package/dist/model/DeletePersonResponseAllOf.js +2 -15
  276. package/dist/model/DeletePersonResponseAllOfData.js +2 -14
  277. package/dist/model/DeletePersonsInBulkResponse.js +7 -29
  278. package/dist/model/DeletePersonsInBulkResponseAllOf.js +2 -15
  279. package/dist/model/DeletePersonsInBulkResponseAllOfData.js +2 -14
  280. package/dist/model/DeletePipelineResponse200.js +3 -17
  281. package/dist/model/DeletePipelineResponse200Data.js +2 -14
  282. package/dist/model/DeleteProductFieldResponse.js +3 -17
  283. package/dist/model/DeleteProductFieldResponseData.js +2 -14
  284. package/dist/model/DeleteProductFollowerResponse.js +3 -17
  285. package/dist/model/DeleteProductFollowerResponseData.js +2 -14
  286. package/dist/model/DeleteProductResponse.js +3 -17
  287. package/dist/model/DeleteProductResponseData.js +2 -14
  288. package/dist/model/DeleteResponse.js +7 -29
  289. package/dist/model/DeleteResponseAllOf.js +2 -15
  290. package/dist/model/DeleteResponseAllOfData.js +2 -14
  291. package/dist/model/DeleteRole.js +7 -29
  292. package/dist/model/DeleteRoleAllOf.js +2 -15
  293. package/dist/model/DeleteRoleAllOfData.js +2 -14
  294. package/dist/model/DeleteRoleAssignment.js +7 -29
  295. package/dist/model/DeleteRoleAssignmentAllOf.js +2 -15
  296. package/dist/model/DeleteRoleAssignmentAllOfData.js +2 -14
  297. package/dist/model/DeleteRoleAssignmentRequest.js +2 -14
  298. package/dist/model/DeleteStageResponse200.js +3 -17
  299. package/dist/model/DeleteStageResponse200Data.js +2 -14
  300. package/dist/model/DeleteStagesResponse200.js +3 -17
  301. package/dist/model/DeleteStagesResponse200Data.js +2 -14
  302. package/dist/model/DeleteTeamUserRequest.js +2 -14
  303. package/dist/model/Duration.js +3 -16
  304. package/dist/model/EditPipeline.js +7 -29
  305. package/dist/model/EditPipelineAllOf.js +2 -15
  306. package/dist/model/EmailInfo.js +3 -16
  307. package/dist/model/ExpectedOutcome.js +3 -16
  308. package/dist/model/FailResponse.js +3 -16
  309. package/dist/model/Field.js +24 -59
  310. package/dist/model/FieldCreateRequest.js +10 -37
  311. package/dist/model/FieldCreateRequestAllOf.js +5 -20
  312. package/dist/model/FieldResponse.js +7 -29
  313. package/dist/model/FieldResponseAllOf.js +2 -15
  314. package/dist/model/FieldType.js +2 -15
  315. package/dist/model/FieldTypeAsString.js +1 -10
  316. package/dist/model/FieldUpdateRequest.js +5 -20
  317. package/dist/model/FieldsResponse.js +8 -33
  318. package/dist/model/FieldsResponseAllOf.js +3 -18
  319. package/dist/model/FileData.js +27 -64
  320. package/dist/model/FileItem.js +27 -64
  321. package/dist/model/FilterGetItem.js +10 -30
  322. package/dist/model/FilterType.js +1 -10
  323. package/dist/model/FiltersBulkDeleteResponse.js +7 -29
  324. package/dist/model/FiltersBulkDeleteResponseAllOf.js +2 -15
  325. package/dist/model/FiltersBulkDeleteResponseAllOfData.js +2 -14
  326. package/dist/model/FiltersBulkGetResponse.js +7 -29
  327. package/dist/model/FiltersBulkGetResponseAllOf.js +2 -15
  328. package/dist/model/FiltersDeleteResponse.js +7 -29
  329. package/dist/model/FiltersDeleteResponseAllOf.js +2 -15
  330. package/dist/model/FiltersDeleteResponseAllOfData.js +2 -14
  331. package/dist/model/FiltersGetResponse.js +7 -29
  332. package/dist/model/FiltersGetResponseAllOf.js +2 -15
  333. package/dist/model/FiltersPostResponse.js +7 -29
  334. package/dist/model/FiltersPostResponseAllOf.js +2 -15
  335. package/dist/model/FiltersPostResponseAllOfData.js +12 -35
  336. package/dist/model/FindGoalResponse.js +2 -15
  337. package/dist/model/FindProductsByNameResponse.js +4 -19
  338. package/dist/model/FindProductsByNameResponseData.js +8 -26
  339. package/dist/model/FollowerData.js +5 -20
  340. package/dist/model/FollowerDataWithID.js +10 -37
  341. package/dist/model/FollowerDataWithIDAllOf.js +2 -14
  342. package/dist/model/FullRole.js +12 -43
  343. package/dist/model/FullRoleAllOf.js +2 -14
  344. package/dist/model/GetActivitiesResponse200.js +5 -23
  345. package/dist/model/GetActivitiesResponse200RelatedObjects.js +5 -24
  346. package/dist/model/GetActivityResponse200.js +4 -20
  347. package/dist/model/GetAddProductAttachementDetails.js +3 -17
  348. package/dist/model/GetAddUpdateStage.js +3 -17
  349. package/dist/model/GetAddedDeal.js +4 -20
  350. package/dist/model/GetAddedDealAdditionalData.js +2 -14
  351. package/dist/model/GetAllFiles.js +4 -20
  352. package/dist/model/GetAllPersonsResponse.js +9 -37
  353. package/dist/model/GetAllPersonsResponseAllOf.js +4 -21
  354. package/dist/model/GetAllPipelines.js +7 -29
  355. package/dist/model/GetAllPipelinesAllOf.js +2 -15
  356. package/dist/model/GetAllProductFieldsResponse.js +4 -19
  357. package/dist/model/GetComments.js +4 -20
  358. package/dist/model/GetDeal.js +5 -23
  359. package/dist/model/GetDealAdditionalData.js +2 -14
  360. package/dist/model/GetDeals.js +5 -23
  361. package/dist/model/GetDealsByName.js +4 -20
  362. package/dist/model/GetDealsByNameAdditionalData.js +2 -15
  363. package/dist/model/GetDealsByNameData.js +14 -38
  364. package/dist/model/GetDealsConversionRatesInPipeline.js +7 -29
  365. package/dist/model/GetDealsConversionRatesInPipelineAllOf.js +2 -15
  366. package/dist/model/GetDealsConversionRatesInPipelineAllOfData.js +4 -19
  367. package/dist/model/GetDealsMovementsInPipeline.js +7 -29
  368. package/dist/model/GetDealsMovementsInPipelineAllOf.js +2 -15
  369. package/dist/model/GetDealsMovementsInPipelineAllOfData.js +7 -27
  370. package/dist/model/GetDealsMovementsInPipelineAllOfDataAverageAgeInDays.js +3 -17
  371. package/dist/model/GetDealsMovementsInPipelineAllOfDataAverageAgeInDaysByStages.js +3 -16
  372. package/dist/model/GetDealsMovementsInPipelineAllOfDataMovementsBetweenStages.js +2 -14
  373. package/dist/model/GetDealsRelatedObjects.js +4 -21
  374. package/dist/model/GetDealsSummary.js +3 -17
  375. package/dist/model/GetDealsSummaryData.js +8 -28
  376. package/dist/model/GetDealsSummaryDataValuesTotal.js +6 -22
  377. package/dist/model/GetDealsSummaryDataWeightedValuesTotal.js +4 -18
  378. package/dist/model/GetDealsTimeline.js +3 -17
  379. package/dist/model/GetDealsTimelineData.js +5 -22
  380. package/dist/model/GetDealsTimelineDataTotals.js +9 -28
  381. package/dist/model/GetDuplicatedDeal.js +3 -17
  382. package/dist/model/GetGoalResultResponse200.js +3 -17
  383. package/dist/model/GetGoalsResponse200.js +3 -17
  384. package/dist/model/GetLeadLabelsResponse200.js +3 -17
  385. package/dist/model/GetLeadSourcesResponse200.js +3 -17
  386. package/dist/model/GetLeadSourcesResponse200Data.js +2 -14
  387. package/dist/model/GetLeadsResponse200.js +4 -20
  388. package/dist/model/GetMergedDeal.js +3 -17
  389. package/dist/model/GetNotes.js +4 -20
  390. package/dist/model/GetOneFile.js +3 -17
  391. package/dist/model/GetOnePipeline.js +7 -29
  392. package/dist/model/GetOnePipelineAllOf.js +2 -15
  393. package/dist/model/GetOneStage.js +3 -17
  394. package/dist/model/GetPersonDetailsResponse.js +9 -37
  395. package/dist/model/GetPersonDetailsResponseAllOf.js +4 -21
  396. package/dist/model/GetPersonDetailsResponseAllOfAdditionalData.js +2 -14
  397. package/dist/model/GetProductAttachementDetails.js +3 -17
  398. package/dist/model/GetProductFieldResponse.js +3 -17
  399. package/dist/model/GetRecents.js +4 -20
  400. package/dist/model/GetRecentsAdditionalData.js +4 -19
  401. package/dist/model/GetRole.js +8 -33
  402. package/dist/model/GetRoleAllOf.js +3 -18
  403. package/dist/model/GetRoleAllOfAdditionalData.js +2 -15
  404. package/dist/model/GetRoleAssignments.js +8 -33
  405. package/dist/model/GetRoleAssignmentsAllOf.js +3 -18
  406. package/dist/model/GetRoleSettings.js +7 -29
  407. package/dist/model/GetRoleSettingsAllOf.js +2 -15
  408. package/dist/model/GetRoleSubroles.js +8 -33
  409. package/dist/model/GetRoleSubrolesAllOf.js +3 -18
  410. package/dist/model/GetRoles.js +8 -33
  411. package/dist/model/GetRolesAllOf.js +3 -18
  412. package/dist/model/GetStageDeals.js +4 -20
  413. package/dist/model/GetStages.js +3 -17
  414. package/dist/model/GlobalMessageBaseResponse.js +2 -14
  415. package/dist/model/GlobalMessageData.js +7 -25
  416. package/dist/model/GlobalMessageDelete.js +9 -35
  417. package/dist/model/GlobalMessageDeleteAllOf.js +4 -19
  418. package/dist/model/GlobalMessageGet.js +9 -35
  419. package/dist/model/GlobalMessageGetAllOf.js +4 -19
  420. package/dist/model/GlobalMessageUserData.js +4 -18
  421. package/dist/model/GoalResults.js +3 -17
  422. package/dist/model/GoalType.js +3 -17
  423. package/dist/model/GoalsResponseComponent.js +11 -36
  424. package/dist/model/IconKey.js +1 -10
  425. package/dist/model/InlineResponse200.js +3 -17
  426. package/dist/model/InlineResponse400.js +5 -21
  427. package/dist/model/InlineResponse4001.js +5 -21
  428. package/dist/model/InlineResponse4001AdditionalData.js +2 -14
  429. package/dist/model/InlineResponse400AdditionalData.js +2 -14
  430. package/dist/model/InlineResponse403.js +5 -21
  431. package/dist/model/InlineResponse4031.js +5 -21
  432. package/dist/model/InlineResponse4031AdditionalData.js +2 -14
  433. package/dist/model/InlineResponse403AdditionalData.js +2 -14
  434. package/dist/model/InlineResponse404.js +5 -21
  435. package/dist/model/InlineResponse404AdditionalData.js +2 -14
  436. package/dist/model/ItemSearchAdditionalData.js +2 -15
  437. package/dist/model/ItemSearchAdditionalDataPagination.js +5 -20
  438. package/dist/model/ItemSearchFieldResponse.js +8 -33
  439. package/dist/model/ItemSearchFieldResponseAllOf.js +3 -18
  440. package/dist/model/ItemSearchFieldResponseAllOfData.js +3 -16
  441. package/dist/model/ItemSearchItem.js +3 -16
  442. package/dist/model/ItemSearchResponse.js +8 -33
  443. package/dist/model/ItemSearchResponseAllOf.js +3 -18
  444. package/dist/model/ItemSearchResponseAllOfData.js +3 -17
  445. package/dist/model/LeadIdResponse200.js +3 -17
  446. package/dist/model/LeadIdResponse200Data.js +2 -14
  447. package/dist/model/LeadLabelColor.js +1 -10
  448. package/dist/model/LeadLabelResponse.js +6 -23
  449. package/dist/model/LeadResponse.js +18 -48
  450. package/dist/model/LeadResponse404.js +6 -22
  451. package/dist/model/LeadSearchItem.js +3 -17
  452. package/dist/model/LeadSearchItemItem.js +15 -43
  453. package/dist/model/LeadSearchItemItemOrganization.js +3 -16
  454. package/dist/model/LeadSearchItemItemOwner.js +2 -14
  455. package/dist/model/LeadSearchItemItemPerson.js +3 -16
  456. package/dist/model/LeadSearchResponse.js +8 -33
  457. package/dist/model/LeadSearchResponseAllOf.js +3 -18
  458. package/dist/model/LeadSearchResponseAllOfData.js +2 -15
  459. package/dist/model/LeadValue.js +3 -16
  460. package/dist/model/LinkFileToItemRequest.js +7 -24
  461. package/dist/model/LinkRemoteFileToItem.js +3 -17
  462. package/dist/model/ListActivitiesResponse.js +8 -33
  463. package/dist/model/ListActivitiesResponseAllOf.js +3 -18
  464. package/dist/model/ListDealsResponse.js +9 -37
  465. package/dist/model/ListDealsResponseAllOf.js +4 -21
  466. package/dist/model/ListDealsResponseAllOfRelatedObjects.js +6 -27
  467. package/dist/model/ListFilesResponse.js +8 -33
  468. package/dist/model/ListFilesResponseAllOf.js +3 -18
  469. package/dist/model/ListFollowersResponse.js +8 -33
  470. package/dist/model/ListFollowersResponseAllOf.js +3 -18
  471. package/dist/model/ListFollowersResponseAllOfData.js +5 -20
  472. package/dist/model/ListMailMessagesResponse.js +8 -33
  473. package/dist/model/ListMailMessagesResponseAllOf.js +3 -18
  474. package/dist/model/ListMailMessagesResponseAllOfData.js +4 -19
  475. package/dist/model/ListPermittedUsersResponse.js +7 -29
  476. package/dist/model/ListPermittedUsersResponse1.js +7 -28
  477. package/dist/model/ListPermittedUsersResponse1AllOf.js +2 -14
  478. package/dist/model/ListPermittedUsersResponse2.js +7 -28
  479. package/dist/model/ListPermittedUsersResponse2AllOf.js +2 -14
  480. package/dist/model/ListPermittedUsersResponseAllOf.js +2 -15
  481. package/dist/model/ListPermittedUsersResponseAllOfData.js +2 -14
  482. package/dist/model/ListPersonProductsResponse.js +8 -33
  483. package/dist/model/ListPersonProductsResponseAllOf.js +3 -18
  484. package/dist/model/ListPersonProductsResponseAllOfDEALID.js +3 -18
  485. package/dist/model/ListPersonProductsResponseAllOfData.js +2 -15
  486. package/dist/model/ListPersonsResponse.js +9 -37
  487. package/dist/model/ListPersonsResponseAllOf.js +4 -21
  488. package/dist/model/ListPersonsResponseAllOfRelatedObjects.js +3 -18
  489. package/dist/model/ListProductAdditionalData.js +11 -41
  490. package/dist/model/ListProductAdditionalDataAllOf.js +6 -22
  491. package/dist/model/ListProductFollowersResponse.js +8 -33
  492. package/dist/model/ListProductFollowersResponseAllOf.js +3 -18
  493. package/dist/model/ListProductFollowersResponseAllOfData.js +5 -20
  494. package/dist/model/ListProductsResponse.js +9 -37
  495. package/dist/model/ListProductsResponseAllOf.js +4 -21
  496. package/dist/model/ListProductsResponseAllOfData.js +2 -15
  497. package/dist/model/ListProductsResponseAllOfRelatedObjects.js +2 -15
  498. package/dist/model/MailMessage.js +10 -38
  499. package/dist/model/MailMessageAllOf.js +2 -15
  500. package/dist/model/MailMessageData.js +30 -72
  501. package/dist/model/MailMessageItemForList.js +43 -137
  502. package/dist/model/MailMessageItemForListAllOf.js +10 -30
  503. package/dist/model/MailParticipant.js +7 -24
  504. package/dist/model/MailServiceBaseResponse.js +5 -20
  505. package/dist/model/MailThread.js +7 -29
  506. package/dist/model/MailThreadAllOf.js +2 -15
  507. package/dist/model/MailThreadDelete.js +11 -35
  508. package/dist/model/MailThreadDeleteAllOf.js +5 -19
  509. package/dist/model/MailThreadDeleteAllOfData.js +78 -0
  510. package/dist/model/MailThreadMessages.js +7 -29
  511. package/dist/model/MailThreadMessagesAllOf.js +2 -15
  512. package/dist/model/MailThreadOne.js +7 -29
  513. package/dist/model/MailThreadOneAllOf.js +2 -15
  514. package/dist/model/MailThreadParticipant.js +10 -30
  515. package/dist/model/MailThreadPut.js +7 -29
  516. package/dist/model/MailThreadPutAllOf.js +2 -15
  517. package/dist/model/MarketingStatus.js +1 -10
  518. package/dist/model/MergeDealsRequest.js +2 -14
  519. package/dist/model/MergeOrganizationsRequest.js +2 -14
  520. package/dist/model/MergePersonDealRelatedInfo.js +20 -67
  521. package/dist/model/MergePersonItem.js +52 -177
  522. package/dist/model/MergePersonsRequest.js +2 -14
  523. package/dist/model/MergePersonsResponse.js +7 -29
  524. package/dist/model/MergePersonsResponseAllOf.js +2 -15
  525. package/dist/model/MessageObject.js +12 -37
  526. package/dist/model/MessageObjectAttachments.js +8 -26
  527. package/dist/model/NewDeal.js +22 -74
  528. package/dist/model/NewDealAllOf.js +2 -14
  529. package/dist/model/NewDealProduct.js +32 -46
  530. package/dist/model/NewDealProductAllOf.js +2 -14
  531. package/dist/model/NewFollowerResponse.js +3 -17
  532. package/dist/model/NewFollowerResponseData.js +5 -20
  533. package/dist/model/NewGoal.js +26 -80
  534. package/dist/model/NewOrganization.js +9 -35
  535. package/dist/model/NewOrganizationAllOf.js +3 -16
  536. package/dist/model/NewPerson.js +16 -70
  537. package/dist/model/NewPersonAllOf.js +2 -14
  538. package/dist/model/NewProductField.js +5 -34
  539. package/dist/model/NewProductFieldAllOf.js +5 -34
  540. package/dist/model/Note.js +18 -61
  541. package/dist/model/NoteAllOf.js +2 -14
  542. package/dist/model/NoteConnectToParams.js +5 -20
  543. package/dist/model/NoteCreatorUser.js +5 -20
  544. package/dist/model/NoteField.js +10 -32
  545. package/dist/model/NoteFieldOptions.js +3 -16
  546. package/dist/model/NoteFieldsResponse.js +8 -33
  547. package/dist/model/NoteFieldsResponseAllOf.js +3 -18
  548. package/dist/model/NoteParams.js +7 -25
  549. package/dist/model/NumberBoolean.js +1 -10
  550. package/dist/model/NumberBooleanDefault0.js +1 -10
  551. package/dist/model/NumberBooleanDefault1.js +1 -10
  552. package/dist/model/ObjectPrices.js +2 -14
  553. package/dist/model/OneLeadResponse200.js +3 -17
  554. package/dist/model/OptionalNameObject.js +2 -14
  555. package/dist/model/OrgAndOwnerId.js +3 -18
  556. package/dist/model/OrganizationAddressInfo.js +12 -34
  557. package/dist/model/OrganizationCountAndAddressInfo.js +24 -79
  558. package/dist/model/OrganizationCountInfo.js +9 -28
  559. package/dist/model/OrganizationData.js +6 -22
  560. package/dist/model/OrganizationDataWithId.js +11 -40
  561. package/dist/model/OrganizationDataWithIdAllOf.js +2 -14
  562. package/dist/model/OrganizationDataWithIdAndActiveFlag.js +12 -43
  563. package/dist/model/OrganizationDataWithIdAndActiveFlagAllOf.js +2 -14
  564. package/dist/model/OrganizationDeleteResponse.js +3 -17
  565. package/dist/model/OrganizationDeleteResponseData.js +2 -14
  566. package/dist/model/OrganizationDetailsGetResponse.js +9 -37
  567. package/dist/model/OrganizationDetailsGetResponseAllOf.js +4 -21
  568. package/dist/model/OrganizationDetailsGetResponseAllOfAdditionalData.js +3 -17
  569. package/dist/model/OrganizationFlowResponse.js +9 -37
  570. package/dist/model/OrganizationFlowResponseAllOf.js +4 -21
  571. package/dist/model/OrganizationFlowResponseAllOfData.js +4 -18
  572. package/dist/model/OrganizationFlowResponseAllOfRelatedObjects.js +3 -18
  573. package/dist/model/OrganizationFollowerDeleteResponse.js +3 -17
  574. package/dist/model/OrganizationFollowerDeleteResponseData.js +2 -14
  575. package/dist/model/OrganizationFollowerItem.js +9 -34
  576. package/dist/model/OrganizationFollowerItemAllOf.js +2 -14
  577. package/dist/model/OrganizationFollowerPostResponse.js +3 -17
  578. package/dist/model/OrganizationFollowersListResponse.js +4 -20
  579. package/dist/model/OrganizationItem.js +54 -171
  580. package/dist/model/OrganizationItemAllOf.js +3 -16
  581. package/dist/model/OrganizationPostResponse.js +8 -33
  582. package/dist/model/OrganizationPostResponseAllOf.js +3 -18
  583. package/dist/model/OrganizationRelationship.js +6 -22
  584. package/dist/model/OrganizationRelationshipDeleteResponse.js +7 -29
  585. package/dist/model/OrganizationRelationshipDeleteResponseAllOf.js +2 -15
  586. package/dist/model/OrganizationRelationshipDeleteResponseAllOfData.js +2 -14
  587. package/dist/model/OrganizationRelationshipDetails.js +15 -53
  588. package/dist/model/OrganizationRelationshipGetResponse.js +8 -33
  589. package/dist/model/OrganizationRelationshipGetResponseAllOf.js +3 -18
  590. package/dist/model/OrganizationRelationshipPostResponse.js +8 -33
  591. package/dist/model/OrganizationRelationshipPostResponseAllOf.js +3 -18
  592. package/dist/model/OrganizationRelationshipUpdateResponse.js +8 -33
  593. package/dist/model/OrganizationRelationshipWithCalculatedFields.js +14 -50
  594. package/dist/model/OrganizationSearchItem.js +3 -17
  595. package/dist/model/OrganizationSearchItemItem.js +9 -29
  596. package/dist/model/OrganizationSearchResponse.js +8 -33
  597. package/dist/model/OrganizationSearchResponseAllOf.js +3 -18
  598. package/dist/model/OrganizationSearchResponseAllOfData.js +2 -15
  599. package/dist/model/OrganizationUpdateResponse.js +8 -33
  600. package/dist/model/OrganizationUpdateResponseAllOf.js +3 -18
  601. package/dist/model/OrganizationsDeleteResponse.js +3 -17
  602. package/dist/model/OrganizationsDeleteResponseData.js +2 -14
  603. package/dist/model/OrganizationsMergeResponse.js +3 -17
  604. package/dist/model/OrganizationsMergeResponseData.js +2 -14
  605. package/dist/model/Owner.js +12 -43
  606. package/dist/model/OwnerAllOf.js +2 -14
  607. package/dist/model/PaginationDetails.js +9 -34
  608. package/dist/model/PaginationDetailsAllOf.js +2 -14
  609. package/dist/model/Params.js +3 -16
  610. package/dist/model/PaymentItem.js +16 -47
  611. package/dist/model/PaymentsResponse.js +7 -29
  612. package/dist/model/PaymentsResponseAllOf.js +2 -15
  613. package/dist/model/PaymentsResponseAllOfData.js +2 -15
  614. package/dist/model/PermissionSets.js +7 -29
  615. package/dist/model/PermissionSetsAllOf.js +2 -15
  616. package/dist/model/PermissionSetsItem.js +9 -33
  617. package/dist/model/PersonCountAndEmailInfo.js +14 -49
  618. package/dist/model/PersonCountEmailDealAndActivityInfo.js +27 -88
  619. package/dist/model/PersonCountInfo.js +8 -26
  620. package/dist/model/PersonData.js +6 -24
  621. package/dist/model/PersonDataEmail.js +4 -18
  622. package/dist/model/PersonDataPhone.js +4 -18
  623. package/dist/model/PersonDataWithActiveFlag.js +11 -42
  624. package/dist/model/PersonDataWithActiveFlagAllOf.js +2 -14
  625. package/dist/model/PersonFlowResponse.js +9 -37
  626. package/dist/model/PersonFlowResponseAllOf.js +4 -21
  627. package/dist/model/PersonFlowResponseAllOfData.js +4 -18
  628. package/dist/model/PersonItem.js +49 -170
  629. package/dist/model/PersonListProduct.js +19 -50
  630. package/dist/model/PersonNameCountAndEmailInfo.js +17 -58
  631. package/dist/model/PersonNameCountAndEmailInfoWithIds.js +20 -67
  632. package/dist/model/PersonNameCountAndEmailInfoWithIdsAllOf.js +4 -18
  633. package/dist/model/PersonNameInfo.js +4 -18
  634. package/dist/model/PersonNameInfoWithOrgAndOwnerId.js +10 -39
  635. package/dist/model/PersonSearchItem.js +3 -17
  636. package/dist/model/PersonSearchItemItem.js +11 -34
  637. package/dist/model/PersonSearchItemItemOrganization.js +3 -16
  638. package/dist/model/PersonSearchItemItemOwner.js +2 -14
  639. package/dist/model/PersonSearchResponse.js +8 -33
  640. package/dist/model/PersonSearchResponseAllOf.js +3 -18
  641. package/dist/model/PersonSearchResponseAllOfData.js +2 -15
  642. package/dist/model/PictureData.js +8 -27
  643. package/dist/model/PictureDataPictures.js +3 -16
  644. package/dist/model/PictureDataWithID.js +13 -47
  645. package/dist/model/PictureDataWithIDAllOf.js +2 -14
  646. package/dist/model/PictureDataWithValue.js +13 -47
  647. package/dist/model/PictureDataWithValueAllOf.js +2 -14
  648. package/dist/model/Pipeline.js +5 -21
  649. package/dist/model/PipelineDetails.js +15 -53
  650. package/dist/model/PipelineDetailsAllOf.js +2 -15
  651. package/dist/model/PostComment.js +3 -17
  652. package/dist/model/PostDealParticipants.js +4 -20
  653. package/dist/model/PostGoalResponse.js +2 -15
  654. package/dist/model/PostNote.js +3 -17
  655. package/dist/model/PostRoleAssignment.js +7 -29
  656. package/dist/model/PostRoleAssignmentAllOf.js +2 -15
  657. package/dist/model/PostRoleAssignmentAllOfData.js +3 -16
  658. package/dist/model/PostRoleSettings.js +7 -29
  659. package/dist/model/PostRoleSettingsAllOf.js +2 -15
  660. package/dist/model/PostRoleSettingsAllOfData.js +4 -20
  661. package/dist/model/PostRoles.js +7 -29
  662. package/dist/model/PostRolesAllOf.js +2 -15
  663. package/dist/model/PostRolesAllOfData.js +2 -14
  664. package/dist/model/Product.js +11 -34
  665. package/dist/model/ProductAttachementFields.js +14 -38
  666. package/dist/model/ProductAttachmentDetails.js +44 -98
  667. package/dist/model/ProductBaseDeal.js +44 -98
  668. package/dist/model/ProductField.js +24 -92
  669. package/dist/model/ProductFieldAllOf.js +16 -42
  670. package/dist/model/ProductListItem.js +24 -59
  671. package/dist/model/ProductRequest.js +9 -30
  672. package/dist/model/ProductResponse.js +4 -20
  673. package/dist/model/ProductSearchItem.js +3 -17
  674. package/dist/model/ProductSearchItemItem.js +8 -27
  675. package/dist/model/ProductSearchItemItemOwner.js +2 -14
  676. package/dist/model/ProductSearchResponse.js +8 -33
  677. package/dist/model/ProductSearchResponseAllOf.js +3 -18
  678. package/dist/model/ProductSearchResponseAllOfData.js +2 -15
  679. package/dist/model/ProductWithArrayPrices.js +15 -54
  680. package/dist/model/ProductWithObjectPrices.js +15 -54
  681. package/dist/model/ProductsResponse.js +5 -23
  682. package/dist/model/PutRole.js +7 -29
  683. package/dist/model/PutRoleAllOf.js +2 -15
  684. package/dist/model/PutRoleAllOfData.js +2 -14
  685. package/dist/model/RecentDataProduct.js +18 -46
  686. package/dist/model/RecentsActivity.js +5 -20
  687. package/dist/model/RecentsActivityType.js +5 -20
  688. package/dist/model/RecentsDeal.js +5 -20
  689. package/dist/model/RecentsFile.js +5 -20
  690. package/dist/model/RecentsFilter.js +5 -20
  691. package/dist/model/RecentsNote.js +5 -20
  692. package/dist/model/RecentsOrganization.js +5 -20
  693. package/dist/model/RecentsPerson.js +5 -20
  694. package/dist/model/RecentsPipeline.js +5 -20
  695. package/dist/model/RecentsProduct.js +5 -20
  696. package/dist/model/RecentsStage.js +5 -20
  697. package/dist/model/RecentsUser.js +5 -20
  698. package/dist/model/RelatedDealData.js +2 -15
  699. package/dist/model/RelatedDealDataDEALID.js +8 -26
  700. package/dist/model/RelatedFollowerData.js +2 -15
  701. package/dist/model/RelatedOrganizationData.js +2 -15
  702. package/dist/model/RelatedOrganizationDataWithActiveFlag.js +2 -15
  703. package/dist/model/RelatedOrganizationName.js +2 -14
  704. package/dist/model/RelatedPersonData.js +2 -15
  705. package/dist/model/RelatedPersonDataWithActiveFlag.js +2 -15
  706. package/dist/model/RelatedPictureData.js +2 -15
  707. package/dist/model/RelatedUserData.js +2 -15
  708. package/dist/model/RelationshipOrganizationInfoItem.js +11 -40
  709. package/dist/model/RelationshipOrganizationInfoItemAllOf.js +2 -14
  710. package/dist/model/RelationshipOrganizationInfoItemWithActiveFlag.js +12 -43
  711. package/dist/model/RequiredNameObject.js +2 -14
  712. package/dist/model/RequredTitleParameter.js +2 -14
  713. package/dist/model/ResponseCallLogObject.js +22 -76
  714. package/dist/model/ResponseCallLogObjectAllOf.js +4 -18
  715. package/dist/model/RoleAssignment.js +11 -40
  716. package/dist/model/RoleAssignmentAllOf.js +5 -20
  717. package/dist/model/RoleSettings.js +10 -30
  718. package/dist/model/RolesAdditionalData.js +2 -15
  719. package/dist/model/RolesAdditionalDataPagination.js +4 -18
  720. package/dist/model/SinglePermissionSetsItem.js +14 -52
  721. package/dist/model/SinglePermissionSetsItemAllOf.js +2 -14
  722. package/dist/model/Stage.js +7 -24
  723. package/dist/model/StageConversions.js +4 -18
  724. package/dist/model/StageDetails.js +17 -58
  725. package/dist/model/StageWithPipelineInfo.js +18 -60
  726. package/dist/model/StageWithPipelineInfoAllOf.js +3 -16
  727. package/dist/model/SubRole.js +11 -40
  728. package/dist/model/SubRoleAllOf.js +5 -20
  729. package/dist/model/SubscriptionAddonsResponse.js +7 -28
  730. package/dist/model/SubscriptionAddonsResponseAllOf.js +2 -14
  731. package/dist/model/SubscriptionInstallmentCreateRequest.js +5 -20
  732. package/dist/model/SubscriptionInstallmentUpdateRequest.js +3 -16
  733. package/dist/model/SubscriptionItem.js +17 -44
  734. package/dist/model/SubscriptionRecurringCancelRequest.js +2 -14
  735. package/dist/model/SubscriptionRecurringCreateRequest.js +12 -36
  736. package/dist/model/SubscriptionRecurringUpdateRequest.js +6 -22
  737. package/dist/model/SubscriptionsIdResponse.js +7 -29
  738. package/dist/model/SubscriptionsIdResponseAllOf.js +2 -15
  739. package/dist/model/Team.js +7 -29
  740. package/dist/model/TeamAllOf.js +2 -15
  741. package/dist/model/TeamId.js +2 -14
  742. package/dist/model/Teams.js +7 -29
  743. package/dist/model/TeamsAllOf.js +2 -15
  744. package/dist/model/Unauthorized.js +4 -18
  745. package/dist/model/UpdateActivityResponse200.js +4 -20
  746. package/dist/model/UpdateDealRequest.js +19 -66
  747. package/dist/model/UpdateFile.js +3 -17
  748. package/dist/model/UpdateFileRequest.js +3 -16
  749. package/dist/model/UpdateFilterRequest.js +5 -18
  750. package/dist/model/UpdateLeadLabelRequest.js +3 -17
  751. package/dist/model/UpdateLeadRequest.js +12 -36
  752. package/dist/model/UpdateMailThreadDetailsRequest.js +6 -23
  753. package/dist/model/UpdateOrganization.js +8 -32
  754. package/dist/model/UpdateOrganizationAllOf.js +2 -14
  755. package/dist/model/UpdatePerson.js +16 -70
  756. package/dist/model/UpdatePersonAllOf.js +2 -14
  757. package/dist/model/UpdatePersonResponse.js +8 -33
  758. package/dist/model/UpdateProductField.js +3 -16
  759. package/dist/model/UpdateProductRequestBody.js +14 -51
  760. package/dist/model/UpdateProductResponse.js +4 -20
  761. package/dist/model/UpdateStageRequest.js +12 -42
  762. package/dist/model/UpdateStageRequestAllOf.js +2 -14
  763. package/dist/model/UpdateTeam.js +11 -41
  764. package/dist/model/UpdateTeamAllOf.js +3 -17
  765. package/dist/model/UpdateTeamWithAdditionalProperties.js +13 -47
  766. package/dist/model/UpdateUserRequest.js +2 -14
  767. package/dist/model/User.js +7 -29
  768. package/dist/model/UserAccess.js +5 -23
  769. package/dist/model/UserAllOf.js +2 -15
  770. package/dist/model/UserAssignmentToPermissionSet.js +4 -18
  771. package/dist/model/UserAssignmentsToPermissionSet.js +7 -29
  772. package/dist/model/UserAssignmentsToPermissionSetAllOf.js +2 -15
  773. package/dist/model/UserConnections.js +7 -29
  774. package/dist/model/UserConnectionsAllOf.js +2 -15
  775. package/dist/model/UserConnectionsAllOfData.js +2 -14
  776. package/dist/model/UserData.js +7 -24
  777. package/dist/model/UserDataWithId.js +9 -35
  778. package/dist/model/UserIDs.js +7 -28
  779. package/dist/model/UserIDsAllOf.js +2 -14
  780. package/dist/model/UserMe.js +7 -29
  781. package/dist/model/UserMeAllOf.js +2 -15
  782. package/dist/model/UserPermissions.js +7 -29
  783. package/dist/model/UserPermissionsAllOf.js +2 -15
  784. package/dist/model/UserPermissionsItem.js +32 -74
  785. package/dist/model/UserSettings.js +7 -29
  786. package/dist/model/UserSettingsAllOf.js +2 -15
  787. package/dist/model/UserSettingsItem.js +11 -32
  788. package/dist/model/Users.js +7 -29
  789. package/dist/model/UsersAllOf.js +2 -15
  790. package/dist/model/VisibleTo.js +1 -10
  791. package/dist/model/Webhook.js +8 -32
  792. package/dist/model/WebhookAllOf.js +2 -15
  793. package/dist/model/WebhookBadRequest.js +8 -31
  794. package/dist/model/WebhookBadRequestAllOf.js +2 -14
  795. package/dist/model/Webhooks.js +8 -32
  796. package/dist/model/WebhooksAllOf.js +2 -15
  797. package/dist/model/WebhooksDeleteForbiddenSchema.js +7 -28
  798. package/dist/model/WebhooksDeleteForbiddenSchemaAllOf.js +2 -14
  799. package/package.json +25 -11
package/dist/ApiClient.js CHANGED
@@ -1,36 +1,22 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports["default"] = void 0;
9
-
10
8
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
11
-
12
9
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
13
-
14
10
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
15
-
16
11
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
17
-
18
12
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
19
-
20
13
  var _superagent = _interopRequireDefault(require("superagent"));
21
-
22
14
  var _querystring = _interopRequireDefault(require("querystring"));
23
-
24
15
  var _lodash = require("lodash");
25
-
26
16
  var _UnauthorizedException = _interopRequireDefault(require("./exceptions/UnauthorizedException"));
27
-
28
17
  var _OAuthProviderException = _interopRequireDefault(require("./exceptions/OAuthProviderException"));
29
-
30
18
  var _NotFoundException = _interopRequireDefault(require("./exceptions/NotFoundException"));
31
-
32
19
  var _FailResponseException = _interopRequireDefault(require("./exceptions/FailResponseException"));
33
-
34
20
  /**
35
21
  * Pipedrive API v1
36
22
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
@@ -43,12 +29,10 @@ var _FailResponseException = _interopRequireDefault(require("./exceptions/FailRe
43
29
  * Do not edit the class manually.
44
30
  *
45
31
  */
46
-
47
32
  /**
48
33
  * @module ApiClient
49
34
  * @version 1.0.0
50
35
  */
51
-
52
36
  /**
53
37
  * Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
54
38
  * application to use this class directly - the *Api and model classes provide the public API for the service. The
@@ -59,18 +43,17 @@ var _FailResponseException = _interopRequireDefault(require("./exceptions/FailRe
59
43
  var ApiClient = /*#__PURE__*/function () {
60
44
  function ApiClient() {
61
45
  (0, _classCallCheck2["default"])(this, ApiClient);
62
-
63
46
  /**
64
47
  * The base URL against which to resolve every API call's (relative) path.
65
48
  * @type {String}
66
49
  * @default https://api.pipedrive.com/v1
67
50
  */
68
51
  this.basePath = 'https://api.pipedrive.com/v1'.replace(/\/+$/, '');
52
+
69
53
  /**
70
54
  * The authentication methods to be included for all API calls.
71
55
  * @type {Object}
72
56
  */
73
-
74
57
  this.authentications = {
75
58
  'api_key': {
76
59
  type: 'apiKey',
@@ -94,87 +77,82 @@ var ApiClient = /*#__PURE__*/function () {
94
77
  tokenUpdateCallback: null
95
78
  }
96
79
  };
80
+
97
81
  /**
98
82
  * The default HTTP headers to be included for all API calls.
99
83
  * @type {Object}
100
84
  * @default {}
101
85
  */
102
-
103
86
  this.defaultHeaders = {
104
87
  'User-Agent': this.getUserAgent()
105
88
  };
89
+
106
90
  /**
107
91
  * The default HTTP timeout for all API calls.
108
92
  * @type {Number}
109
93
  * @default 60000
110
94
  */
111
-
112
95
  this.timeout = 60000;
96
+
113
97
  /**
114
98
  * If set to false an additional timestamp parameter is added to all API GET calls to
115
99
  * prevent browser caching
116
100
  * @type {Boolean}
117
101
  * @default true
118
102
  */
119
-
120
103
  this.cache = true;
104
+
121
105
  /**
122
106
  * If set to true, the client will save the cookies from each server
123
107
  * response, and return them in the next request.
124
108
  * @default false
125
109
  */
126
-
127
110
  this.enableCookies = false;
111
+
128
112
  /*
129
113
  * Used to save and return cookies in a node.js (non-browser) setting,
130
114
  * if this.enableCookies is set to true.
131
115
  */
132
-
133
116
  if (typeof window === 'undefined') {
134
117
  this.agent = new _superagent["default"].agent();
135
118
  }
119
+
136
120
  /*
137
121
  * Allow user to override superagent agent
138
122
  */
139
-
140
-
141
123
  this.requestAgent = null;
124
+
142
125
  /*
143
126
  * Allow user to add superagent plugins
144
127
  */
145
-
146
128
  this.plugins = null;
147
129
  }
130
+
148
131
  /**
149
132
  * Returns a string representation for an actual parameter.
150
133
  * @param param The actual parameter.
151
134
  * @returns {String} The string representation of <code>param</code>.
152
135
  */
153
-
154
-
155
136
  (0, _createClass2["default"])(ApiClient, [{
156
137
  key: "paramToString",
157
138
  value: function paramToString(param) {
158
139
  if (param == undefined || param == null) {
159
140
  return '';
160
141
  }
161
-
162
142
  if (param instanceof Date) {
163
143
  return param.toJSON();
164
144
  }
165
-
166
145
  if (ApiClient.canBeJsonified(param)) {
167
146
  return JSON.stringify(param);
168
147
  }
169
-
170
148
  return param.toString();
171
149
  }
150
+
172
151
  /**
173
152
  * Returns a boolean indicating if the parameter could be JSON.stringified
174
153
  * @param param The actual parameter
175
154
  * @returns {Boolean} Flag indicating if <code>param</code> can be JSON.stringified
176
155
  */
177
-
178
156
  }, {
179
157
  key: "buildUrl",
180
158
  value:
@@ -188,30 +166,27 @@ var ApiClient = /*#__PURE__*/function () {
188
166
  */
189
167
  function buildUrl(path, pathParams, apiBasePath) {
190
168
  var _this = this;
191
-
192
169
  if (!path.match(/^\//)) {
193
170
  path = '/' + path;
194
171
  }
172
+ var url = this.basePath + path;
195
173
 
196
- var url = this.basePath + path; // use API (operation, path) base path if defined
197
-
174
+ // use API (operation, path) base path if defined
198
175
  if (apiBasePath !== null && apiBasePath !== undefined) {
199
176
  url = apiBasePath + path;
200
177
  }
201
-
202
178
  url = url.replace(/\{([\w-]+)\}/g, function (fullMatch, key) {
203
179
  var value;
204
-
205
180
  if (pathParams.hasOwnProperty(key)) {
206
181
  value = _this.paramToString(pathParams[key]);
207
182
  } else {
208
183
  value = fullMatch;
209
184
  }
210
-
211
185
  return encodeURIComponent(value);
212
186
  });
213
187
  return url;
214
188
  }
189
+
215
190
  /**
216
191
  * Checks whether the given content type represents JSON.<br>
217
192
  * JSON content type examples:<br>
@@ -223,18 +198,17 @@ var ApiClient = /*#__PURE__*/function () {
223
198
  * @param {String} contentType The MIME content type to check.
224
199
  * @returns {Boolean} <code>true</code> if <code>contentType</code> represents JSON, otherwise <code>false</code>.
225
200
  */
226
-
227
201
  }, {
228
202
  key: "isJsonMime",
229
203
  value: function isJsonMime(contentType) {
230
204
  return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i));
231
205
  }
206
+
232
207
  /**
233
208
  * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.
234
209
  * @param {Array.<String>} contentTypes
235
210
  * @returns {String} The chosen content type, preferring JSON.
236
211
  */
237
-
238
212
  }, {
239
213
  key: "jsonPreferredMime",
240
214
  value: function jsonPreferredMime(contentTypes) {
@@ -243,48 +217,45 @@ var ApiClient = /*#__PURE__*/function () {
243
217
  return contentTypes[i];
244
218
  }
245
219
  }
246
-
247
220
  return contentTypes[0];
248
221
  }
222
+
249
223
  /**
250
224
  * Checks whether the given parameter value represents file-like content.
251
225
  * @param param The parameter to check.
252
226
  * @returns {Boolean} <code>true</code> if <code>param</code> represents a file.
253
227
  */
254
-
255
228
  }, {
256
229
  key: "isFileParam",
257
230
  value: function isFileParam(param) {
258
231
  // fs.ReadStream in Node.js and Electron (but not in runtime like browserify)
259
232
  if (typeof require === 'function') {
260
233
  var fs;
261
-
262
234
  try {
263
235
  fs = require('fs');
264
236
  } catch (err) {}
265
-
266
237
  if (fs && fs.ReadStream && param instanceof fs.ReadStream) {
267
238
  return true;
268
239
  }
269
- } // Buffer in Node.js
270
-
240
+ }
271
241
 
242
+ // Buffer in Node.js
272
243
  if (typeof Buffer === 'function' && param instanceof Buffer) {
273
244
  return true;
274
- } // Blob in browser
275
-
245
+ }
276
246
 
247
+ // Blob in browser
277
248
  if (typeof Blob === 'function' && param instanceof Blob) {
278
249
  return true;
279
- } // File in browser (it seems File object is also instance of Blob, but keep this for safe)
280
-
250
+ }
281
251
 
252
+ // File in browser (it seems File object is also instance of Blob, but keep this for safe)
282
253
  if (typeof File === 'function' && param instanceof File) {
283
254
  return true;
284
255
  }
285
-
286
256
  return false;
287
257
  }
258
+
288
259
  /**
289
260
  * Normalizes parameter values:
290
261
  * <ul>
@@ -295,16 +266,13 @@ var ApiClient = /*#__PURE__*/function () {
295
266
  * @param {Object.<String, Object>} params The parameters as object properties.
296
267
  * @returns {Object.<String, Object>} normalized parameters.
297
268
  */
298
-
299
269
  }, {
300
270
  key: "normalizeParams",
301
271
  value: function normalizeParams(params) {
302
272
  var newParams = {};
303
-
304
273
  for (var key in params) {
305
274
  if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) {
306
275
  var value = params[key];
307
-
308
276
  if (this.isFileParam(value) || Array.isArray(value)) {
309
277
  newParams[key] = value;
310
278
  } else {
@@ -312,9 +280,9 @@ var ApiClient = /*#__PURE__*/function () {
312
280
  }
313
281
  }
314
282
  }
315
-
316
283
  return newParams;
317
284
  }
285
+
318
286
  /**
319
287
  * Builds a string representation of an array-type actual parameter, according to the given collection format.
320
288
  * @param {Array} param An array parameter.
@@ -322,99 +290,81 @@ var ApiClient = /*#__PURE__*/function () {
322
290
  * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns
323
291
  * <code>param</code> as is if <code>collectionFormat</code> is <code>multi</code>.
324
292
  */
325
-
326
293
  }, {
327
294
  key: "buildCollectionParam",
328
295
  value: function buildCollectionParam(param, collectionFormat) {
329
296
  if (param == null) {
330
297
  return null;
331
298
  }
332
-
333
299
  switch (collectionFormat) {
334
300
  case 'csv':
335
301
  return param.map(this.paramToString).join(',');
336
-
337
302
  case 'ssv':
338
303
  return param.map(this.paramToString).join(' ');
339
-
340
304
  case 'tsv':
341
305
  return param.map(this.paramToString).join('\t');
342
-
343
306
  case 'pipes':
344
307
  return param.map(this.paramToString).join('|');
345
-
346
308
  case 'multi':
347
309
  //return the array directly as SuperAgent will handle it as expected
348
310
  return param.map(this.paramToString);
349
-
350
311
  default:
351
312
  throw new Error('Unknown collection format: ' + collectionFormat);
352
313
  }
353
314
  }
315
+
354
316
  /**
355
317
  * Applies authentication headers to the request.
356
318
  * @param {Object} request The request object created by a <code>superagent()</code> call.
357
319
  * @param {Array.<String>} authNames An array of authentication method names.
358
320
  */
359
-
360
321
  }, {
361
322
  key: "applyAuthToRequest",
362
323
  value: function applyAuthToRequest(request, authNames) {
363
324
  var _this2 = this;
364
-
365
325
  authNames.forEach(function (authName) {
366
326
  var auth = _this2.authentications[authName];
367
-
368
327
  switch (auth.type) {
369
328
  case 'basic':
370
329
  if (auth.username || auth.password) {
371
330
  request.auth(auth.username || '', auth.password || '');
372
331
  }
373
-
374
332
  break;
375
-
376
333
  case 'bearer':
377
334
  if (auth.accessToken) {
378
335
  request.set({
379
336
  'Authorization': 'Bearer ' + auth.accessToken
380
337
  });
381
338
  }
382
-
383
339
  break;
384
-
385
340
  case 'apiKey':
386
341
  if (auth.apiKey) {
387
342
  var data = {};
388
-
389
343
  if (auth.apiKeyPrefix) {
390
344
  data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey;
391
345
  } else {
392
346
  data[auth.name] = auth.apiKey;
393
347
  }
394
-
395
348
  if (auth['in'] === 'header') {
396
349
  request.set(data);
397
350
  } else {
398
351
  request.query(data);
399
352
  }
400
353
  }
401
-
402
354
  break;
403
-
404
355
  case 'oauth2':
405
356
  if (auth.accessToken) {
406
357
  request.set({
407
358
  'Authorization': 'Bearer ' + auth.accessToken
408
359
  });
409
360
  }
410
-
411
361
  break;
412
-
413
362
  default:
414
363
  throw new Error('Unknown authentication type: ' + auth.type);
415
364
  }
416
365
  });
417
366
  }
367
+
418
368
  /**
419
369
  * Deserializes an HTTP response body into a value of the specified type.
420
370
  * @param {Object} response A SuperAgent response object.
@@ -424,25 +374,23 @@ var ApiClient = /*#__PURE__*/function () {
424
374
  * all properties on <code>data<code> will be converted to this type.
425
375
  * @returns A value of the specified type.
426
376
  */
427
-
428
377
  }, {
429
378
  key: "deserialize",
430
379
  value: function deserialize(response, returnType) {
431
380
  if (response == null || returnType == null || response.status == 204) {
432
381
  return null;
433
- } // Rely on SuperAgent for parsing response body.
434
- // See http://visionmedia.github.io/superagent/#parsing-response-bodies
435
-
382
+ }
436
383
 
384
+ // Rely on SuperAgent for parsing response body.
385
+ // See http://visionmedia.github.io/superagent/#parsing-response-bodies
437
386
  var data = response.body;
438
-
439
387
  if (data == null || (0, _typeof2["default"])(data) === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length) {
440
388
  // SuperAgent does not always produce a body; use the unparsed response as a fallback
441
389
  data = response.text;
442
390
  }
443
-
444
391
  return ApiClient.convertToType(data, returnType);
445
392
  }
393
+
446
394
  /**
447
395
  * Invokes the REST service using the supplied settings and parameters.
448
396
  * @param {String} path The base URL to invoke.
@@ -461,29 +409,27 @@ var ApiClient = /*#__PURE__*/function () {
461
409
  * @param {Boolean} secondRequest Indicates whether this api call is done for the first or second time (this can happen after automatic access token refresh).
462
410
  * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object.
463
411
  */
464
-
465
412
  }, {
466
413
  key: "callApi",
467
414
  value: function () {
468
415
  var _callApi = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(path, httpMethod, pathParams, queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, returnType, apiBasePath) {
469
416
  var secondRequest,
470
- url,
471
- request,
472
- index,
473
- contentType,
474
- _formParams,
475
- key,
476
- normalizeBodyParams,
477
- accept,
478
- response,
479
- shouldRefreshTokenAndRetry,
480
- _exception,
481
- _exception2,
482
- exception,
483
- exceptionMessage,
484
- data,
485
- _args = arguments;
486
-
417
+ url,
418
+ request,
419
+ index,
420
+ contentType,
421
+ _formParams,
422
+ key,
423
+ normalizeBodyParams,
424
+ accept,
425
+ response,
426
+ shouldRefreshTokenAndRetry,
427
+ _exception,
428
+ _exception2,
429
+ exception,
430
+ exceptionMessage,
431
+ data,
432
+ _args = arguments;
487
433
  return _regenerator["default"].wrap(function _callee$(_context) {
488
434
  while (1) {
489
435
  switch (_context.prev = _context.next) {
@@ -491,46 +437,44 @@ var ApiClient = /*#__PURE__*/function () {
491
437
  secondRequest = _args.length > 12 && _args[12] !== undefined ? _args[12] : false;
492
438
  url = this.buildUrl(path, pathParams, apiBasePath);
493
439
  request = (0, _superagent["default"])(httpMethod, url);
494
-
495
440
  if (this.plugins !== null) {
496
441
  for (index in this.plugins) {
497
442
  if (this.plugins.hasOwnProperty(index)) {
498
443
  request.use(this.plugins[index]);
499
444
  }
500
445
  }
501
- } // apply authentications
502
-
446
+ }
503
447
 
504
- this.applyAuthToRequest(request, authNames); // set query parameters
448
+ // apply authentications
449
+ this.applyAuthToRequest(request, authNames);
505
450
 
451
+ // set query parameters
506
452
  if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {
507
453
  queryParams['_'] = new Date().getTime();
508
454
  }
455
+ request.query(this.normalizeParams(queryParams));
509
456
 
510
- request.query(this.normalizeParams(queryParams)); // set header parameters
511
-
512
- request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); // set requestAgent if it is set by user
457
+ // set header parameters
458
+ request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));
513
459
 
460
+ // set requestAgent if it is set by user
514
461
  if (this.requestAgent) {
515
462
  request.agent(this.requestAgent);
516
- } // set request timeout
517
-
463
+ }
518
464
 
465
+ // set request timeout
519
466
  request.timeout(this.timeout);
520
467
  contentType = this.jsonPreferredMime(contentTypes);
521
-
522
468
  if (contentType) {
523
469
  // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746)
524
470
  if (contentType !== 'multipart/form-data') {
525
471
  request.type(contentType);
526
472
  }
527
473
  }
528
-
529
474
  if (contentType === 'application/x-www-form-urlencoded') {
530
475
  request.send(_querystring["default"].stringify(this.normalizeParams(formParams)));
531
476
  } else if (contentType === 'multipart/form-data') {
532
477
  _formParams = this.normalizeParams(formParams);
533
-
534
478
  for (key in _formParams) {
535
479
  if (_formParams.hasOwnProperty(key)) {
536
480
  if (key === 'file' || this.isFileParam(_formParams[key])) {
@@ -545,24 +489,20 @@ var ApiClient = /*#__PURE__*/function () {
545
489
  if (!request.header['Content-Type']) {
546
490
  request.type('application/json');
547
491
  }
548
-
549
492
  normalizeBodyParams = this.replaceCamelCaseObj(bodyParam);
550
493
  request.send(normalizeBodyParams);
551
494
  }
552
-
553
495
  accept = this.jsonPreferredMime(accepts);
554
-
555
496
  if (accept) {
556
497
  request.accept(accept);
557
498
  }
558
-
559
499
  if (returnType === 'Blob') {
560
500
  request.responseType('blob');
561
501
  } else if (returnType === 'String') {
562
502
  request.responseType('string');
563
- } // Attach previously saved cookies, if enabled
564
-
503
+ }
565
504
 
505
+ // Attach previously saved cookies, if enabled
566
506
  if (this.enableCookies) {
567
507
  if (typeof window === 'undefined') {
568
508
  this.agent._attachCookies(request);
@@ -570,97 +510,73 @@ var ApiClient = /*#__PURE__*/function () {
570
510
  request.withCredentials();
571
511
  }
572
512
  }
573
-
574
513
  if (!this.shouldRefreshToken()) {
575
514
  _context.next = 20;
576
515
  break;
577
516
  }
578
-
579
517
  _context.next = 20;
580
518
  return this.refreshToken();
581
-
582
519
  case 20:
583
520
  _context.prev = 20;
584
521
  _context.next = 23;
585
522
  return request;
586
-
587
523
  case 23:
588
524
  response = _context.sent;
589
525
  _context.next = 52;
590
526
  break;
591
-
592
527
  case 26:
593
528
  _context.prev = 26;
594
529
  _context.t0 = _context["catch"](20);
595
530
  shouldRefreshTokenAndRetry = !!(!this.isApiTokenSet() && !secondRequest && _context.t0.status === 401 && this.isOauth2Supported());
596
-
597
531
  if (!shouldRefreshTokenAndRetry) {
598
532
  _context.next = 35;
599
533
  break;
600
534
  }
601
-
602
535
  _context.next = 32;
603
536
  return this.refreshToken();
604
-
605
537
  case 32:
606
538
  _context.next = 34;
607
539
  return this.callApi(path, httpMethod, pathParams, queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, returnType, apiBasePath, true);
608
-
609
540
  case 34:
610
541
  return _context.abrupt("return", _context.sent);
611
-
612
542
  case 35:
613
543
  if (!(_context.t0.status === 401)) {
614
544
  _context.next = 40;
615
545
  break;
616
546
  }
617
-
618
547
  _exception = new _UnauthorizedException["default"]();
619
-
620
548
  if (_context.t0.response.body.error_info) {
621
549
  _exception.errorInfo = _context.t0.response.body.error_info;
622
550
  }
623
-
624
551
  _exception.context = _context.t0.response;
625
552
  throw _exception;
626
-
627
553
  case 40:
628
554
  if (!(_context.t0.status === 404)) {
629
555
  _context.next = 45;
630
556
  break;
631
557
  }
632
-
633
558
  _exception2 = new _NotFoundException["default"]();
634
-
635
559
  if (_context.t0.response.body.error_info) {
636
560
  _exception2.errorInfo = _context.t0.response.body.error_info;
637
561
  }
638
-
639
562
  _exception2.context = _context.t0.response;
640
563
  throw _exception2;
641
-
642
564
  case 45:
643
565
  exception = new _FailResponseException["default"]();
644
566
  exceptionMessage = _context.t0.response && _context.t0.response.res.statusMessage || _context.t0.message;
645
567
  exception.message = exceptionMessage;
646
568
  exception.errorCode = _context.t0.status;
647
-
648
569
  if (_context.t0.response && _context.t0.response.body.error_info) {
649
570
  exception.errorInfo = _context.t0.response.body.error_info;
650
571
  }
651
-
652
572
  exception.context = _context.t0.response;
653
573
  throw exception;
654
-
655
574
  case 52:
656
575
  data = this.deserialize(response, returnType);
657
-
658
576
  if (this.enableCookies && typeof window === 'undefined') {
659
577
  this.agent._saveCookies(response);
660
578
  }
661
-
662
579
  return _context.abrupt("return", data);
663
-
664
580
  case 55:
665
581
  case "end":
666
582
  return _context.stop();
@@ -668,24 +584,19 @@ var ApiClient = /*#__PURE__*/function () {
668
584
  }
669
585
  }, _callee, this, [[20, 26]]);
670
586
  }));
671
-
672
587
  function callApi(_x, _x2, _x3, _x4, _x5, _x6, _x7, _x8, _x9, _x10, _x11, _x12) {
673
588
  return _callApi.apply(this, arguments);
674
589
  }
675
-
676
590
  return callApi;
677
591
  }()
678
592
  /**
679
593
  * Converts CamelCase attributes of an object to snake_case and returns it
680
594
  */
681
-
682
595
  }, {
683
596
  key: "replaceCamelCaseObj",
684
597
  value: function replaceCamelCaseObj(obj) {
685
598
  var _this3 = this;
686
-
687
599
  var snakeCased = {};
688
-
689
600
  for (var key in obj) {
690
601
  var keyValue = obj[key];
691
602
  var isArray = Array.isArray(keyValue);
@@ -695,87 +606,82 @@ var ApiClient = /*#__PURE__*/function () {
695
606
  if (isArray) keyValue = keyValue.map(function (kv) {
696
607
  return (0, _typeof2["default"])(kv) === 'object' ? _this3.replaceCamelCaseObj(kv) : kv;
697
608
  });
698
-
699
609
  if (isHash) {
700
610
  snakeCased[key] = isObject ? key : keyValue;
701
611
  } else {
702
612
  snakeCased[(0, _lodash.snakeCase)(key)] = isObject ? this.replaceCamelCaseObj(keyValue) : keyValue;
703
613
  }
704
614
  }
705
-
706
615
  return snakeCased;
707
616
  }
617
+
708
618
  /**
709
619
  * Checks whether the API supports oauth2 type authorization.
710
620
  * @returns {Boolean} Whether oauth2 type authorization is supported by the API.
711
621
  */
712
-
713
622
  }, {
714
623
  key: "isOauth2Supported",
715
624
  value: function isOauth2Supported() {
716
625
  return !!(this.authentications && this.authentications.oauth2);
717
626
  }
627
+
718
628
  /**
719
629
  * Checks whether the API token is set for the API calls.
720
630
  * @returns {Boolean} Whether API token is set for authorization.
721
631
  */
722
-
723
632
  }, {
724
633
  key: "isApiTokenSet",
725
634
  value: function isApiTokenSet() {
726
635
  return !!(this.authentications && this.authentications.api_key && this.authentications.api_key.apiKey);
727
636
  }
637
+
728
638
  /**
729
639
  * Checks whether the oauth2 type authorizations is set for the API calls and if the access token is expired.
730
640
  * @returns {Boolean} Whether the OAuth access token is expired.
731
641
  */
732
-
733
642
  }, {
734
643
  key: "shouldRefreshToken",
735
644
  value: function shouldRefreshToken() {
736
645
  return !this.isApiTokenSet() && this.isOauth2Supported() && !!this.authentications.oauth2.expiresAt && Date.now() > this.authentications.oauth2.expiresAt;
737
646
  }
647
+
738
648
  /**
739
649
  * Checks if the given property is set in the this.authentications.oauth2 object.
740
650
  * Error is thrown if the property is not set.
741
651
  * @param {String} property The OAuth 2 property to receive.
742
652
  * @returns The value of the given property.
743
653
  */
744
-
745
654
  }, {
746
655
  key: "getOAuth2Property",
747
656
  value: function getOAuth2Property(property) {
748
657
  var value = this.authentications.oauth2[property];
749
-
750
658
  if (!value) {
751
659
  throw new Error("OAuth 2 property ".concat(property, " is not set."));
752
660
  }
753
-
754
661
  return value;
755
662
  }
663
+
756
664
  /**
757
665
  * Creates the url for authorizing the client.
758
666
  * @returns {String} The authorization url.
759
667
  */
760
-
761
668
  }, {
762
669
  key: "buildAuthorizationUrl",
763
670
  value: function buildAuthorizationUrl() {
764
671
  if (!this.isOauth2Supported()) {
765
672
  throw new Error('Could not create authorization url. OAuth 2 is not supported.');
766
673
  }
767
-
768
674
  var host = this.getOAuth2Property('host');
769
675
  var clientId = this.getOAuth2Property('clientId');
770
676
  var redirectUri = this.getOAuth2Property('redirectUri');
771
677
  return "".concat(host, "/oauth/authorize?client_id=").concat(clientId, "&redirect_uri=").concat(encodeURIComponent(redirectUri));
772
678
  }
679
+
773
680
  /**
774
681
  * Authorizes the authorization code sent by the server and returns OAuth 2 token.
775
682
  * @param {String} code The authorization code sent by the oauth server.
776
683
  * @returns {Object} The OAuth 2 token.
777
684
  */
778
-
779
685
  }, {
780
686
  key: "authorize",
781
687
  value: function () {
@@ -789,17 +695,13 @@ var ApiClient = /*#__PURE__*/function () {
789
695
  _context2.next = 2;
790
696
  break;
791
697
  }
792
-
793
698
  throw new Error('Could not authorize the client. OAuth 2 is not supported.');
794
-
795
699
  case 2:
796
700
  if (code) {
797
701
  _context2.next = 4;
798
702
  break;
799
703
  }
800
-
801
704
  throw new Error('Authorization failed. Authorization code is not set.');
802
-
803
705
  case 4:
804
706
  clientId = this.getOAuth2Property('clientId');
805
707
  clientSecret = this.getOAuth2Property('clientSecret');
@@ -810,12 +712,10 @@ var ApiClient = /*#__PURE__*/function () {
810
712
  _context2.prev = 10;
811
713
  _context2.next = 13;
812
714
  return _superagent["default"].post(authorizationUrl).set('User-Agent', this.getUserAgent()).set('Authorization', "Basic ".concat(clientIdAndSecretInBase64)).send("code=".concat(code)).send("redirect_uri=".concat(redirectUri)).send('grant_type=authorization_code');
813
-
814
715
  case 13:
815
716
  response = _context2.sent;
816
717
  this.updateToken(response.body);
817
718
  return _context2.abrupt("return", response.body);
818
-
819
719
  case 18:
820
720
  _context2.prev = 18;
821
721
  _context2.t0 = _context2["catch"](10);
@@ -824,7 +724,6 @@ var ApiClient = /*#__PURE__*/function () {
824
724
  exception.errorCode = _context2.t0.status;
825
725
  exception.context = _context2.t0.response;
826
726
  throw exception;
827
-
828
727
  case 25:
829
728
  case "end":
830
729
  return _context2.stop();
@@ -832,18 +731,15 @@ var ApiClient = /*#__PURE__*/function () {
832
731
  }
833
732
  }, _callee2, this, [[10, 18]]);
834
733
  }));
835
-
836
734
  function authorize(_x13) {
837
735
  return _authorize.apply(this, arguments);
838
736
  }
839
-
840
737
  return authorize;
841
738
  }()
842
739
  /**
843
740
  * Refreshes the OAuth 2 access token.
844
741
  * @returns {Object} The OAuth 2 token.
845
742
  */
846
-
847
743
  }, {
848
744
  key: "refreshToken",
849
745
  value: function () {
@@ -857,9 +753,7 @@ var ApiClient = /*#__PURE__*/function () {
857
753
  _context3.next = 2;
858
754
  break;
859
755
  }
860
-
861
756
  throw new Error('Could not refresh the token. OAuth 2 is not supported.');
862
-
863
757
  case 2:
864
758
  refreshToken = this.getOAuth2Property('refreshToken');
865
759
  clientId = this.getOAuth2Property('clientId');
@@ -870,12 +764,10 @@ var ApiClient = /*#__PURE__*/function () {
870
764
  _context3.prev = 8;
871
765
  _context3.next = 11;
872
766
  return _superagent["default"].post(refreshUrl).set('User-Agent', this.getUserAgent()).set('Authorization', "Basic ".concat(clientIdAndSecretInBase64)).send("refresh_token=".concat(refreshToken)).send('grant_type=refresh_token');
873
-
874
767
  case 11:
875
768
  response = _context3.sent;
876
769
  this.updateToken(response.body);
877
770
  return _context3.abrupt("return", response.body);
878
-
879
771
  case 16:
880
772
  _context3.prev = 16;
881
773
  _context3.t0 = _context3["catch"](8);
@@ -884,7 +776,6 @@ var ApiClient = /*#__PURE__*/function () {
884
776
  exception.errorCode = _context3.t0.status;
885
777
  exception.context = _context3.t0.response;
886
778
  throw exception;
887
-
888
779
  case 23:
889
780
  case "end":
890
781
  return _context3.stop();
@@ -892,11 +783,9 @@ var ApiClient = /*#__PURE__*/function () {
892
783
  }
893
784
  }, _callee3, this, [[8, 16]]);
894
785
  }));
895
-
896
786
  function refreshToken() {
897
787
  return _refreshToken.apply(this, arguments);
898
788
  }
899
-
900
789
  return refreshToken;
901
790
  }()
902
791
  /**
@@ -905,47 +794,39 @@ var ApiClient = /*#__PURE__*/function () {
905
794
  * the expiration time of access token is calculated and set as expiresAt property.
906
795
  * @param {Object} token The OAuth 2 token got from the oauth server.
907
796
  */
908
-
909
797
  }, {
910
798
  key: "updateToken",
911
799
  value: function updateToken(token) {
912
800
  if (!this.isOauth2Supported()) {
913
801
  throw new Error('Could not update the token. OAuth 2 is not supported.');
914
802
  }
915
-
916
803
  var oauth2 = this.authentications.oauth2;
917
-
918
804
  if (!!token.access_token) {
919
805
  oauth2.accessToken = token.access_token;
920
806
  }
921
-
922
807
  if (!!token.refresh_token) {
923
808
  oauth2.refreshToken = token.refresh_token;
924
809
  }
925
-
926
810
  if (!!token.expires_in) {
927
811
  oauth2.expiresIn = token.expires_in;
928
812
  oauth2.expiresAt = Date.now() + token.expires_in * 1000;
929
813
  }
930
-
931
814
  if (!!token.scope) {
932
815
  oauth2.scope = token.scope;
933
816
  }
934
-
935
817
  if (!!token.api_domain) {
936
818
  this.basePath = "".concat(token.api_domain, "/api/v1");
937
819
  }
938
-
939
820
  if (typeof oauth2.tokenUpdateCallback === 'function') {
940
821
  oauth2.tokenUpdateCallback(token);
941
822
  }
942
823
  }
824
+
943
825
  /**
944
826
  * Parses an ISO-8601 string representation or epoch representation of a date value.
945
827
  * @param {String} str The date value as a string.
946
828
  * @returns {Date} The parsed date object.
947
829
  */
948
-
949
830
  }, {
950
831
  key: "getUserAgent",
951
832
  value:
@@ -955,14 +836,13 @@ var ApiClient = /*#__PURE__*/function () {
955
836
  */
956
837
  function getUserAgent() {
957
838
  var version = require('../package.json').version;
958
-
959
839
  return "Pipedrive-SDK-Javascript-".concat(version);
960
840
  }
841
+
961
842
  /**
962
843
  * Gets an array of host settings
963
844
  * @returns An array of host settings
964
845
  */
965
-
966
846
  }, {
967
847
  key: "hostSettings",
968
848
  value: function hostSettings() {
@@ -975,19 +855,19 @@ var ApiClient = /*#__PURE__*/function () {
975
855
  key: "getBasePathFromSettings",
976
856
  value: function getBasePathFromSettings(index) {
977
857
  var variables = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
978
- var servers = this.hostSettings(); // check array index out of bound
858
+ var servers = this.hostSettings();
979
859
 
860
+ // check array index out of bound
980
861
  if (index < 0 || index >= servers.length) {
981
862
  throw new Error("Invalid index " + index + " when selecting the host settings. Must be less than " + servers.length);
982
863
  }
983
-
984
864
  var server = servers[index];
985
- var url = server['url']; // go through variable and assign a value
865
+ var url = server['url'];
986
866
 
867
+ // go through variable and assign a value
987
868
  for (var variable_name in server['variables']) {
988
869
  if (variable_name in variables) {
989
870
  var variable = server['variables'][variable_name];
990
-
991
871
  if (!('enum_values' in variable) || variable['enum_values'].includes(variables[variable_name])) {
992
872
  url = url.replace("{" + variable_name + "}", variables[variable_name]);
993
873
  } else {
@@ -998,20 +878,18 @@ var ApiClient = /*#__PURE__*/function () {
998
878
  url = url.replace("{" + variable_name + "}", server['variables'][variable_name]['default_value']);
999
879
  }
1000
880
  }
1001
-
1002
881
  return url;
1003
882
  }
883
+
1004
884
  /**
1005
885
  * Constructs a new map or array model from REST data.
1006
886
  * @param data {Object|Array} The REST data.
1007
887
  * @param obj {Object|Array} The target object or array.
1008
888
  */
1009
-
1010
889
  }], [{
1011
890
  key: "canBeJsonified",
1012
891
  value: function canBeJsonified(str) {
1013
892
  if (typeof str !== 'string' && (0, _typeof2["default"])(str) !== 'object') return false;
1014
-
1015
893
  try {
1016
894
  var type = str.toString();
1017
895
  return type === '[object Object]' || type === '[object Array]';
@@ -1025,9 +903,9 @@ var ApiClient = /*#__PURE__*/function () {
1025
903
  if (isNaN(str)) {
1026
904
  return new Date(str);
1027
905
  }
1028
-
1029
906
  return new Date(+str);
1030
907
  }
908
+
1031
909
  /**
1032
910
  * Converts a value to the specified type.
1033
911
  * @param {(String|Object)} data The data to convert, as a string or object.
@@ -1037,35 +915,27 @@ var ApiClient = /*#__PURE__*/function () {
1037
915
  * all properties on <code>data<code> will be converted to this type.
1038
916
  * @returns An instance of the specified type or null or undefined if data is null or undefined.
1039
917
  */
1040
-
1041
918
  }, {
1042
919
  key: "convertToType",
1043
920
  value: function convertToType(data, type) {
1044
921
  if (data === null || data === undefined) return data;
1045
-
1046
922
  switch (type) {
1047
923
  case 'Boolean':
1048
924
  return Boolean(data);
1049
-
1050
925
  case 'Integer':
1051
926
  return parseInt(data, 10);
1052
-
1053
927
  case 'Number':
1054
928
  return parseFloat(data);
1055
-
1056
929
  case 'String':
1057
930
  return String(data);
1058
-
1059
931
  case 'Date':
1060
932
  if (typeof data === 'string') {
1061
933
  return String(data);
1062
934
  } else {
1063
935
  return ApiClient.parseDate(String(data));
1064
936
  }
1065
-
1066
937
  case 'Blob':
1067
938
  return data;
1068
-
1069
939
  default:
1070
940
  if (type === Object) {
1071
941
  // generic object, return directly
@@ -1082,7 +952,6 @@ var ApiClient = /*#__PURE__*/function () {
1082
952
  } else if ((0, _typeof2["default"])(type) === 'object') {
1083
953
  // for plain object type like: {'String': 'Integer'}
1084
954
  var keyType, valueType;
1085
-
1086
955
  for (var k in type) {
1087
956
  if (type.hasOwnProperty(k)) {
1088
957
  keyType = k;
@@ -1090,9 +959,7 @@ var ApiClient = /*#__PURE__*/function () {
1090
959
  break;
1091
960
  }
1092
961
  }
1093
-
1094
962
  var result = {};
1095
-
1096
963
  for (var k in data) {
1097
964
  if (data.hasOwnProperty(k)) {
1098
965
  var key = ApiClient.convertToType(k, keyType);
@@ -1100,13 +967,11 @@ var ApiClient = /*#__PURE__*/function () {
1100
967
  result[key] = value;
1101
968
  }
1102
969
  }
1103
-
1104
970
  return result;
1105
971
  } else {
1106
972
  // for unknown type, return the data directly
1107
973
  return data;
1108
974
  }
1109
-
1110
975
  }
1111
976
  }
1112
977
  }, {
@@ -1130,44 +995,32 @@ var ApiClient = /*#__PURE__*/function () {
1130
995
  * @enum {String}
1131
996
  * @readonly
1132
997
  */
1133
-
1134
-
1135
998
  ApiClient.CollectionFormatEnum = {
1136
999
  /**
1137
1000
  * Comma-separated values. Value: <code>csv</code>
1138
1001
  * @const
1139
1002
  */
1140
1003
  CSV: ',',
1141
-
1142
1004
  /**
1143
1005
  * Space-separated values. Value: <code>ssv</code>
1144
1006
  * @const
1145
1007
  */
1146
1008
  SSV: ' ',
1147
-
1148
1009
  /**
1149
1010
  * Tab-separated values. Value: <code>tsv</code>
1150
1011
  * @const
1151
1012
  */
1152
1013
  TSV: '\t',
1153
-
1154
1014
  /**
1155
1015
  * Pipe(|)-separated values. Value: <code>pipes</code>
1156
1016
  * @const
1157
1017
  */
1158
1018
  PIPES: '|',
1159
-
1160
1019
  /**
1161
1020
  * Native array. Value: <code>multi</code>
1162
1021
  * @const
1163
1022
  */
1164
1023
  MULTI: 'multi'
1165
1024
  };
1166
- /**
1167
- * The default API client implementation.
1168
- * @type {module:ApiClient}
1169
- */
1170
-
1171
- ApiClient.instance = new ApiClient();
1172
1025
  var _default = ApiClient;
1173
1026
  exports["default"] = _default;