Skip to content

Commit

Permalink
29.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PureCloud Jenkins committed Jan 11, 2021
1 parent b6d16d2 commit 89a3887
Show file tree
Hide file tree
Showing 202 changed files with 1,262 additions and 1,181 deletions.
33 changes: 30 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Platform API Client SDK - Go

A Go package to interface with the Genesys Cloud Platform API. View the documentation on the [pkg.go.dev](https://pkg.go.dev/github.com/MyPureCloud/platform-client-sdk-go/platformclientv2). Browse the source code on [Github](https://github.com/MyPureCloud/platform-client-sdk-go).

Latest version: 28.0.0 [![GitHub release](https://img.shields.io/github/release/mypurecloud/platform-client-sdk-go.svg)]()
Latest version: 29.0.0 [![GitHub release](https://img.shields.io/github/release/mypurecloud/platform-client-sdk-go.svg)]()
[![Release Notes Badge](https://developer.mypurecloud.com/images/sdk-release-notes.png)](releaseNotes.md)

## Golang Version Dependency
Expand Down Expand Up @@ -51,7 +51,7 @@ When creating configuration instances, they must be used when creating new API i

```go
// Create new config
config := NewConfiguration()
config := platformclientv2.NewConfiguration()

// Create API instance using config
usersAPI := platformclientv2.NewUsersApiWithConfig(config)
Expand All @@ -67,7 +67,7 @@ config.BasePath = "https://api.mypurecloud.jp"

#### Setting the access token

If using a grant other than client credentials, the access token can be set manually:
If using a grant other than client credentials and code authorization, the access token can be set manually:

```go
config.AccessToken = "anaccesstokenobtainedmanuallyfromanoauthgrant"
Expand All @@ -94,6 +94,33 @@ if err != nil {
}
```

#### Authorization Code Grant

* The app is authenticating as a human, the [Authorization Code Grant](https://developer.mypurecloud.com/api/rest/authorization/use-authorization-code.html)
* The app is served via a web server
* There is server-side code that will be making API requests

Use the `AuthorizeCodeGrant` function on the client to make a request to Genesys Cloud to exchange the client id, client secret and authorization code for an access token. If no error was returned, the configuration instance is now authorized and can begin making API requests.

```go
authData, err := config.AuthorizeCodeGrant(clientId, clientSecret, authCode, redirectUri)
if err != nil {
panic(err)
}
```

By default the SDK will transparently request a new access token when it expires. If multiple threads are running 1 thread will request a new token, other threads will wait a maximum of 10 seconds for the token refresh to complete, this time can be overriden with the _RefreshTokenWaitTime_ field of the _Configuration_ struct.
If you wish to apply the refresh logic yourself, set `ShouldRefreshAccessToken` to false and store the refresh token. The `ExpiresIn` member of the `authData` struct can be used to preemptively request a new token. Use `RefreshAuthorizationCodeGrant` to request a new token when necessary

```go
config.ShouldRefreshAccessToken = false
// When token expires
authData, err := config.RefreshAuthorizationCodeGrant(clientId, clientSecret, authData.RefreshToken)
if err != nil {
panic(err)
}
```

### Making Requests

Once the SDK is authorized, API requests can be made. Each function on the API instance returns three values, or just the latter two if the resource does not return any value (e.g. a DELETE operation):
Expand Down
33 changes: 30 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Platform API Client SDK - Go

A Go package to interface with the Genesys Cloud Platform API. View the documentation on the [pkg.go.dev](https://pkg.go.dev/github.com/MyPureCloud/platform-client-sdk-go/platformclientv2). Browse the source code on [Github](https://github.com/MyPureCloud/platform-client-sdk-go).

Latest version: 28.0.0 [![GitHub release](https://img.shields.io/github/release/mypurecloud/platform-client-sdk-go.svg)]()
Latest version: 29.0.0 [![GitHub release](https://img.shields.io/github/release/mypurecloud/platform-client-sdk-go.svg)]()
[![Release Notes Badge](https://developer.mypurecloud.com/images/sdk-release-notes.png)](releaseNotes.md)

## Golang Version Dependency
Expand Down Expand Up @@ -51,7 +51,7 @@ When creating configuration instances, they must be used when creating new API i

```go
// Create new config
config := NewConfiguration()
config := platformclientv2.NewConfiguration()

// Create API instance using config
usersAPI := platformclientv2.NewUsersApiWithConfig(config)
Expand All @@ -67,7 +67,7 @@ config.BasePath = "https://api.mypurecloud.jp"

#### Setting the access token

If using a grant other than client credentials, the access token can be set manually:
If using a grant other than client credentials and code authorization, the access token can be set manually:

```go
config.AccessToken = "anaccesstokenobtainedmanuallyfromanoauthgrant"
Expand All @@ -94,6 +94,33 @@ if err != nil {
}
```

#### Authorization Code Grant

* The app is authenticating as a human, the [Authorization Code Grant](https://developer.mypurecloud.com/api/rest/authorization/use-authorization-code.html)
* The app is served via a web server
* There is server-side code that will be making API requests

Use the `AuthorizeCodeGrant` function on the client to make a request to Genesys Cloud to exchange the client id, client secret and authorization code for an access token. If no error was returned, the configuration instance is now authorized and can begin making API requests.

```go
authData, err := config.AuthorizeCodeGrant(clientId, clientSecret, authCode, redirectUri)
if err != nil {
panic(err)
}
```

By default the SDK will transparently request a new access token when it expires. If multiple threads are running 1 thread will request a new token, other threads will wait a maximum of 10 seconds for the token refresh to complete, this time can be overriden with the _RefreshTokenWaitTime_ field of the _Configuration_ struct.
If you wish to apply the refresh logic yourself, set `ShouldRefreshAccessToken` to false and store the refresh token. The `ExpiresIn` member of the `authData` struct can be used to preemptively request a new token. Use `RefreshAuthorizationCodeGrant` to request a new token when necessary

```go
config.ShouldRefreshAccessToken = false
// When token expires
authData, err := config.RefreshAuthorizationCodeGrant(clientId, clientSecret, authData.RefreshToken)
if err != nil {
panic(err)
}
```

### Making Requests

Once the SDK is authorized, API requests can be made. Each function on the API instance returns three values, or just the latter two if the resource does not return any value (e.g. a DELETE operation):
Expand Down
209 changes: 19 additions & 190 deletions docs/releaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,218 +1,47 @@
Platform API version: 4382
Platform API version: 4407


# Major Changes (10 changes)
# Major Changes (3 changes)

**PUT /api/v2/telephony/providers/edges/dids/{didId}** (1 change)
**GET /api/v2/languageunderstanding/domains/{domainId}/feedback** (2 changes)

* Has been deprecated
* Parameter enableCursorPagination was added
* Parameter after was added

**PUT /api/v2/telephony/providers/edges/extensions/{extensionId}** (1 change)
**EntityListing** (1 change)

* Has been deprecated
* Property entities was changed from object[] to DataTableImportJob[]

**GET /api/v2/telephony/providers/edges/{edgeId}/lines** (1 change)

* Has been deprecated
# Minor Changes (10 changes)

**GET /api/v2/telephony/providers/edges/{edgeId}/lines/{lineId}** (1 change)

* Has been deprecated

**PUT /api/v2/telephony/providers/edges/{edgeId}/lines/{lineId}** (1 change)

* Has been deprecated

**EntityListing** (5 changes)

* Property pageSize was removed
* Property pageNumber was removed
* Property total was removed
* Property pageCount was removed
* Property entities was changed from DataTableImportJob[] to object[]


# Minor Changes (69 changes)

**/api/v2/conversations/messaging/integrations/twitter/{integrationId}** (1 change)

* Operation patch was added. Summary: Update Twitter messaging integration

**/api/v2/recording/crossplatform/mediaretentionpolicies/{policyId}** (5 changes)
**/api/v2/coaching/appointments/{appointmentId}/conversations** (2 changes)

* Path was added
* Operation GET was added
* Operation PUT was added
* Operation DELETE was added
* Operation PATCH was added

**PUT /api/v2/flows/milestones/{milestoneId}** (1 change)

* Response 409 was added

**/api/v2/recording/crossplatform/mediaretentionpolicies** (4 changes)

* Path was added
* Operation GET was added
* Operation POST was added
* Operation DELETE was added

**MediaType** (1 change)

* Model was added

**MediaTypeAccess** (1 change)

* Model was added

**MediaTypes** (1 change)

* Model was added

**SupportedContent** (1 change)

* Model was added

**StatisticalSummary** (2 changes)

* Optional property countNegative was added
* Optional property countPositive was added

**JourneyAggregationQuery** (1 change)

* Enum value nWebActionsFrequencyCapReached was added to property metrics
* Enum value nWebActionsOfferedOutsideSchedule was added to property metrics

**JourneyAggregationView** (1 change)

* Enum value nWebActionsFrequencyCapReached was added to property target

**Dependency** (2 changes)

* Enum value BOTCONNECTORBOT was added to property type
* Enum value BOTCONNECTORBOTVERSION was added to property type

**DependencyObject** (2 changes)

* Enum value BOTCONNECTORBOT was added to property type
* Enum value BOTCONNECTORBOTVERSION was added to property type

**ReportingExportJobResponse** (4 changes)

* Enum value CONTENT_SEARCH_VIEW was added to property viewType
* Enum value LANDING_PAGE was added to property viewType
* Enum value DASHBOARD_SUMMARY was added to property viewType
* Enum value DASHBOARD_DETAIL was added to property viewType

**Transcripts** (1 change)

* Model was added

**ViewFilter** (6 changes)

* Optional property transcripts was added
* Optional property transcriptLanguages was added
* Optional property participantPurposes was added
* Optional property showFirstQueue was added
* Optional property teamIds was added
* Optional property filterUsersByTeamIds was added
* Enum value nWebActionsOfferedOutsideSchedule was added to property target

**AuditQueryExecutionStatusResponse** (1 change)
**EntityListing** (4 changes)

* Enum value Presence was added to property serviceName
* Optional property pageSize was added
* Optional property pageNumber was added
* Optional property total was added
* Optional property pageCount was added

**AuditLogMessage** (7 changes)

* Optional property userHomeOrgId was added
* Enum value Presence was added to property serviceName
* Enum value Revoke was added to property action
* Enum value UserPresence was added to property entityType
* Enum value MaxOrgRoutingUtilizationCapacity was added to property entityType
* Enum value OrganizationAuthorizationTrust was added to property entityType
* Enum value OrganizationAuthorizationUserTrust was added to property entityType

**AuditQueryEntity** (5 changes)

* Enum value UserPresence was added to property name
* Enum value MaxOrgRoutingUtilizationCapacity was added to property name
* Enum value OrganizationAuthorizationTrust was added to property name
* Enum value OrganizationAuthorizationUserTrust was added to property name
* Enum value Revoke was added to property actions

**AuditQueryService** (1 change)

* Enum value Presence was added to property name

**AuditQueryRequest** (1 change)

* Enum value Presence was added to property serviceName

**AuditRealtimeQueryRequest** (1 change)

* Enum value Presence was added to property serviceName

**ReportingExportJobRequest** (4 changes)

* Enum value CONTENT_SEARCH_VIEW was added to property viewType
* Enum value LANDING_PAGE was added to property viewType
* Enum value DASHBOARD_SUMMARY was added to property viewType
* Enum value DASHBOARD_DETAIL was added to property viewType

**CrossPlatformCallMediaPolicy** (1 change)

* Model was added

**CrossPlatformChatMediaPolicy** (1 change)

* Model was added

**CrossPlatformEmailMediaPolicy** (1 change)

* Model was added

**CrossPlatformMediaPolicies** (1 change)

* Model was added

**CrossPlatformMessageMediaPolicy** (1 change)

* Model was added

**CrossPlatformPolicy** (1 change)

* Model was added

**CrossPlatformPolicyActions** (1 change)
**AddConversationResponse** (1 change)

* Model was added

**FacebookIntegrationUpdateRequest** (3 changes)

* Optional property id was added
* Optional property name was added
* Optional property selfUri was added

**CrossPlatformPolicyCreate** (1 change)
**AddConversationRequest** (1 change)

* Model was added

**ReportingExportMetadataJobResponse** (4 changes)

* Enum value CONTENT_SEARCH_VIEW was added to property viewType
* Enum value LANDING_PAGE was added to property viewType
* Enum value DASHBOARD_SUMMARY was added to property viewType
* Enum value DASHBOARD_DETAIL was added to property viewType


# Point Changes (3 changes)

**PATCH /api/v2/conversations/messaging/integrations/whatsapp/{integrationId}** (1 change)

* Summary was changed

**GET /api/v2/routing/wrapupcodes** (1 change)

* Description was changed for parameter name

**GET /api/v2/authorization/divisions/{divisionId}/grants** (1 change)

* Description was changed
# Point Changes (0 changes)
8 changes: 8 additions & 0 deletions notificationMappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,14 @@
"topic": "v2.users.{id}.workforcemanagement.timeoffrequests",
"class": "WfmTimeOffRequestUpdateTopicTimeOffRequestUpdate"
},
{
"topic": "v2.webdeployments.configurations.{id}",
"class": "WebDeploymentsConfigTopicWebMessagingConfigChangeEventBody"
},
{
"topic": "v2.webdeployments.deployments.{id}",
"class": "WebDeploymentsDeploymentTopicWebMessagingDeploymentChangeEventBody"
},
{
"topic": "v2.wem.learning.assignments.modules.{id}",
"class": "WemLearningAssignmentRuleRunTopicLearningAssignmentRuleRunNotification"
Expand Down
8 changes: 4 additions & 4 deletions platformclientv2/actionentitylisting.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ type Actionentitylisting struct {
SelfUri *string `json:"selfUri,omitempty"`


// PreviousUri
PreviousUri *string `json:"previousUri,omitempty"`


// NextUri
NextUri *string `json:"nextUri,omitempty"`

Expand All @@ -41,6 +37,10 @@ type Actionentitylisting struct {
LastUri *string `json:"lastUri,omitempty"`


// PreviousUri
PreviousUri *string `json:"previousUri,omitempty"`


// PageCount
PageCount *int32 `json:"pageCount,omitempty"`

Expand Down
Loading

0 comments on commit 89a3887

Please sign in to comment.