Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- Fixed the comma-separated `include_fields` query parameter across v2 collection/detail endpoints (`GET /api/v2/activities`, `GET /api/v2/activities/{id}`, `GET /api/v2/activityFields`, `GET /api/v2/activityFields/{field_code}`, `GET /api/v2/deals`, `GET /api/v2/deals/{id}`, `GET /api/v2/dealFields`, `GET /api/v2/dealFields/{field_code}`, `GET /api/v2/organizations`, `GET /api/v2/organizations/{id}`, `GET /api/v2/organizationFields`, `GET /api/v2/organizationFields/{field_code}`, `GET /api/v2/persons`, `GET /api/v2/persons/{id}`, `GET /api/v2/personFields`, `GET /api/v2/personFields/{field_code}`, `GET /api/v2/productFields`, and `GET /api/v2/productFields/{field_code}`) that was typed as `type: string` with an enum of comma-joined value combinations despite accepting comma-separated lists — changed to `type: array` of enumerated strings with `uniqueItems: true`, `style: form`, `explode: false`
- Fixed the comma-separated `custom_fields` query parameter on v2 collection/detail endpoints (`GET /api/v2/deals`, `GET /api/v2/deals/archived`, `GET /api/v2/deals/{id}`, `GET /api/v2/organizations`, `GET /api/v2/organizations/{id}`, `GET /api/v2/persons`, `GET /api/v2/persons/{id}`, and `GET /api/v2/products`) and the `ids` query parameter on v2 collection endpoints (`GET /api/v2/activities`, `GET /api/v2/deals`, `GET /api/v2/deals/archived`, `GET /api/v2/organizations`, `GET /api/v2/persons`, and `GET /api/v2/products`) that were typed as `type: string` despite accepting comma-separated lists — changed to `type: array` of strings (`custom_fields` capped at 15 items, `ids` at 100) with `uniqueItems: true`, `style: form`, `explode: false`
### Changed
- Removed `deprecated: true` from LegacyTeams endpoints (`GET`/`POST /v1/legacyTeams`, `GET`/`PUT /v1/legacyTeams/{id}`, `GET`/`POST`/`DELETE /v1/legacyTeams/{id}/users`, `GET /v1/legacyTeams/user/{id}`) and updated the tag description to remove outdated deprecation notice

Expand Down
10 changes: 5 additions & 5 deletions lib/versions/v1/Api/ActivityFieldsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,11 @@ public function getActivityFieldsRequest(): Request
$headers['x-api-token'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if ($this->config->getAccessToken() !== null) {
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
if ($this->config->getAccessToken() !== '') {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}

Expand Down
40 changes: 20 additions & 20 deletions lib/versions/v1/Api/ActivityTypesApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,11 @@ public function addActivityTypeRequest($activity_type_create_request = null): Re
$headers['x-api-token'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if ($this->config->getAccessToken() !== null) {
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
if ($this->config->getAccessToken() !== '') {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}

Expand Down Expand Up @@ -677,11 +677,11 @@ public function deleteActivityTypeRequest($id): Request
$headers['x-api-token'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if ($this->config->getAccessToken() !== null) {
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
if ($this->config->getAccessToken() !== '') {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}

Expand Down Expand Up @@ -953,11 +953,11 @@ public function getActivityTypesRequest(): Request
$headers['x-api-token'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if ($this->config->getAccessToken() !== null) {
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
if ($this->config->getAccessToken() !== '') {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}

Expand Down Expand Up @@ -1260,11 +1260,11 @@ public function updateActivityTypeRequest($id, $activity_type_update_request = n
$headers['x-api-token'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if ($this->config->getAccessToken() !== null) {
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
if ($this->config->getAccessToken() !== '') {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}

Expand Down
10 changes: 5 additions & 5 deletions lib/versions/v1/Api/BillingApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,11 @@ public function getCompanyAddonsRequest(): Request
$headers['x-api-token'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if ($this->config->getAccessToken() !== null) {
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
if ($this->config->getAccessToken() !== '') {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}

Expand Down
50 changes: 25 additions & 25 deletions lib/versions/v1/Api/CallLogsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -465,11 +465,11 @@ public function addCallLogRequest($call_log_object = null): Request
$headers['x-api-token'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if ($this->config->getAccessToken() !== null) {
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
if ($this->config->getAccessToken() !== '') {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}

Expand Down Expand Up @@ -849,11 +849,11 @@ public function addCallLogAudioFileRequest($id, $file): Request
$headers['x-api-token'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if ($this->config->getAccessToken() !== null) {
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
if ($this->config->getAccessToken() !== '') {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}

Expand Down Expand Up @@ -1229,11 +1229,11 @@ public function deleteCallLogRequest($id): Request
$headers['x-api-token'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if ($this->config->getAccessToken() !== null) {
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
if ($this->config->getAccessToken() !== '') {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}

Expand Down Expand Up @@ -1546,11 +1546,11 @@ public function getCallLogRequest($id): Request
$headers['x-api-token'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if ($this->config->getAccessToken() !== null) {
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
if ($this->config->getAccessToken() !== '') {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}

Expand Down Expand Up @@ -1848,11 +1848,11 @@ public function getUserCallLogsRequest($start = 0, $limit = null): Request
$headers['x-api-token'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if ($this->config->getAccessToken() !== null) {
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
if ($this->config->getAccessToken() !== '') {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}

Expand Down
40 changes: 20 additions & 20 deletions lib/versions/v1/Api/ChannelsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -428,11 +428,11 @@ public function addChannelRequest($channel_object = null): Request
$headers['x-api-token'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if ($this->config->getAccessToken() !== null) {
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
if ($this->config->getAccessToken() !== '') {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}

Expand Down Expand Up @@ -750,11 +750,11 @@ public function deleteChannelRequest($id): Request
$headers['x-api-token'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if ($this->config->getAccessToken() !== null) {
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
if ($this->config->getAccessToken() !== '') {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}

Expand Down Expand Up @@ -1113,11 +1113,11 @@ public function deleteConversationRequest($channel_id, $conversation_id): Reques
$headers['x-api-token'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if ($this->config->getAccessToken() !== null) {
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
if ($this->config->getAccessToken() !== '') {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}

Expand Down Expand Up @@ -1426,11 +1426,11 @@ public function receiveMessageRequest($message_object = null): Request
$headers['x-api-token'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if ($this->config->getAccessToken() !== null) {
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
if ($this->config->getAccessToken() !== '') {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}

Expand Down
10 changes: 5 additions & 5 deletions lib/versions/v1/Api/CurrenciesApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,11 +383,11 @@ public function getCurrenciesRequest($term = null): Request
$headers['x-api-token'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if ($this->config->getAccessToken() !== null) {
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
if ($this->config->getAccessToken() !== '') {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}

Expand Down
60 changes: 30 additions & 30 deletions lib/versions/v1/Api/DealFieldsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,11 @@ public function addDealFieldRequest($field_create_request = null): Request
$headers['x-api-token'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if ($this->config->getAccessToken() !== null) {
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
if ($this->config->getAccessToken() !== '') {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}

Expand Down Expand Up @@ -677,11 +677,11 @@ public function deleteDealFieldRequest($id): Request
$headers['x-api-token'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if ($this->config->getAccessToken() !== null) {
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
if ($this->config->getAccessToken() !== '') {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}

Expand Down Expand Up @@ -973,11 +973,11 @@ public function deleteDealFieldsRequest($ids): Request
$headers['x-api-token'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if ($this->config->getAccessToken() !== null) {
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
if ($this->config->getAccessToken() !== '') {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}

Expand Down Expand Up @@ -1269,11 +1269,11 @@ public function getDealFieldRequest($id): Request
$headers['x-api-token'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if ($this->config->getAccessToken() !== null) {
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
if ($this->config->getAccessToken() !== '') {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}

Expand Down Expand Up @@ -1571,11 +1571,11 @@ public function getDealFieldsRequest($start = 0, $limit = null): Request
$headers['x-api-token'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if ($this->config->getAccessToken() !== null) {
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
if ($this->config->getAccessToken() !== '') {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}

Expand Down Expand Up @@ -1878,11 +1878,11 @@ public function updateDealFieldRequest($id, $field_update_request = null): Reque
$headers['x-api-token'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if ($this->config->getAccessToken() !== null) {
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
// If access token is expired
if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
$this->config->refreshToken();
}
if ($this->config->getAccessToken() !== '') {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}

Expand Down
Loading