Skip to content

Commit

Permalink
Merge branch 'dev' into fix/DEVTOOLING-907
Browse files Browse the repository at this point in the history
  • Loading branch information
sureshperiyappan authored Feb 6, 2025
2 parents c97ed16 + 7ac9a36 commit 471f3d0
Show file tree
Hide file tree
Showing 49 changed files with 2,916 additions and 573 deletions.
11 changes: 8 additions & 3 deletions docs/resources/outbound_contact_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,28 @@ resource "genesyscloud_outbound_contact_list" "contact-list" {

### Required

- `column_names` (List of String) The names of the contact data columns. Changing the column_names attribute will cause the outboundcontact_list object to be dropped and recreated with a new ID
- `column_names` (List of String) The names of the contact data columns. Changing the column_names attribute will cause the outbound_contact_list object to be dropped and recreated with a new ID
- `name` (String) The name for the contact list.

### Optional

- `attempt_limit_id` (String) Attempt Limit for this ContactList.
- `automatic_time_zone_mapping` (Boolean) Indicates if automatic time zone mapping is to be used for this ContactList. Changing the automatic_time_zone_mappings attribute will cause the outboundcontact_list object to be dropped and recreated with a new ID
- `column_data_type_specifications` (Block List) The settings of the columns selected for dynamic queueing. If updated, the contact list is dropped and recreated with a new ID (see [below for nested schema](#nestedblock--column_data_type_specifications))
- `contacts_filepath` (String) The path to a CSV file containing contacts to import into the contact list. When updated, existing contacts will be removed and replaced with contacts from the new file. If not specified, an empty contact list will be created.
- `contacts_id_name` (String) The name of the column in the CSV file that contains the contact's unique contact id. If updated, the contact list is dropped and recreated with a new ID
- `division_id` (String) The division this entity belongs to.
- `email_columns` (Block Set) Indicates which columns are email addresses. Changing the email_columns attribute will cause the outboundcontact_list object to be dropped and recreated with a new ID. Required if phone_columns is empty (see [below for nested schema](#nestedblock--email_columns))
- `phone_columns` (Block Set) Indicates which columns are phone numbers. Changing the phone_columns attribute will cause the outboundcontact_list object to be dropped and recreated with a new ID. Required if email_columns is empty (see [below for nested schema](#nestedblock--phone_columns))
- `email_columns` (Block Set) Indicates which columns are email addresses. Changing the email_columns attribute will cause the outbound_contact_list object to be dropped and recreated with a new ID. Required if phone_columns is empty (see [below for nested schema](#nestedblock--email_columns))
- `phone_columns` (Block Set) Indicates which columns are phone numbers. Changing the phone_columns attribute will cause the outbound_contact_list object to be dropped and recreated with a new ID. Required if email_columns is empty (see [below for nested schema](#nestedblock--phone_columns))
- `preview_mode_accepted_values` (List of String) The values in the previewModeColumnName column that indicate a contact should always be dialed in preview mode.
- `preview_mode_column_name` (String) A column to check if a contact should always be dialed in preview mode.
- `trim_whitespace` (Boolean) Indicates if leading and trailing whitespace will be trimmed when importing a contactlist CSV file
- `zip_code_column_name` (String) The name of contact list column containing the zip code for use with automatic time zone mapping. Only allowed if 'automaticTimeZoneMapping' is set to true. Changing the zip_code_column_name attribute will cause the outboundcontact_list object to be dropped and recreated with a new ID

### Read-Only

- `contacts_file_content_hash` (String) The hash of the contacts file to import. This is retained as a computed value in the state in order to detect when a file's contents have changed.
- `contacts_record_count` (Number) The number of contacts in the contact list. This is a read-only attribute and sanity check
- `id` (String) The ID of this resource.

<a id="nestedblock--column_data_type_specifications"></a>
Expand Down
34 changes: 31 additions & 3 deletions docs/resources/outbound_contact_list_contact.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
page_title: "genesyscloud_outbound_contact_list_contact Resource - terraform-provider-genesyscloud"
subcategory: ""
subcategory: "Deprecated"
description: |-
Genesys Cloud Outbound Contact List Contact
[DEPRECATED] Genesys Cloud Outbound Contact List Contact
---
# genesyscloud_outbound_contact_list_contact (Resource)

Genesys Cloud Outbound Contact List Contact
[DEPRECATED] Genesys Cloud Outbound Contact List Contact

## API Usage
The following Genesys Cloud APIs are used by this resource. Ensure your OAuth Client has been granted the necessary scopes and permissions to perform these operations:
Expand All @@ -16,6 +16,34 @@ The following Genesys Cloud APIs are used by this resource. Ensure your OAuth Cl
- [PUT /api/v2/outbound/contactlists/{contactListId}/contacts/{contactId}](https://developer.genesys.cloud/devapps/api-explorer#put-api-v2-outbound-contactlists--contactListId--contacts--contactId-)
- [DELETE /api/v2/outbound/contactlists/{contactListId}/contacts/{contactId}](https://developer.genesys.cloud/devapps/api-explorer#delete-api-v2-outbound-contactlists--contactListId--contacts--contactId-)

## Migrating from genesyscloud_outbound_contact_list_contact

### Deprecation Notice

The `genesyscloud_outbound_contact_list_contact` resource is deprecated and will be removed in a future version. Instead, use the `contacts_filepath` and `contacts_id_name` attributes in the `genesyscloud_outbound_contact_list` resource.

### Note About Exporter

The exporter functionality has been removed from this resource in favor of the `genesyscloud_outbound_contact_list` resource's built-in bulk handling of contacts via CSV exports. Contacts will now be exported within the CSV file output from the `genesyscloud_outbound_contact_list` and not be exported via this resource due to performance and scalability limitations with this resource.

### Migration Steps

1. Remove any `genesyscloud_outbound_contact_list_contact` resources from your Terraform configuration and add them to a `contacts.csv` file
2. Update your `genesyscloud_outbound_contact_list` resource to include:

```hcl
resource "genesyscloud_outbound_contact_list" "example" {
name = "Example Contact List"
# ... other existing configuration ...
contacts_filepath = "path/to/your/contacts.csv"
contacts_id_name = "contact_id_column"
}
```
3. Ensure your CSV file contains all required columns defined in `column_names`
4. Run `terraform plan` to verify the changes


## Example Usage

```terraform
Expand Down
17 changes: 14 additions & 3 deletions docs/resources/widget_deployment.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
page_title: "genesyscloud_widget_deployment Resource - terraform-provider-genesyscloud"
subcategory: ""
subcategory: "Deprecated"
description: |-
Genesys Cloud Widget Deployment
[DEPRECATED] Genesys Cloud Widget Deployment
---
# genesyscloud_widget_deployment (Resource)

Genesys Cloud Widget Deployment
[DEPRECATED] Genesys Cloud Widget Deployment

## API Usage
The following Genesys Cloud APIs are used by this resource. Ensure your OAuth Client has been granted the necessary scopes and permissions to perform these operations:
Expand All @@ -17,6 +17,17 @@ The following Genesys Cloud APIs are used by this resource. Ensure your OAuth Cl
* [PUT /api/v2/widgets/deployments/{deploymentId}](https://developer.genesys.cloud/api/rest/v2/widgets/#put-api-v2-widgets-deployments--deploymentId-)
* [DELETE /api/v2/widgets/deployments/{deploymentId}](https://developer.genesys.cloud/api/rest/v2/widgets/#delete-api-v2-widgets-deployments--deploymentId-)

## Migrating from genesyscloud_widget_deployment

### Deprecation Notice

The `genesyscloud_widget_deployment` resource is deprecated and will be removed in a future version due to this functionality being sunset in Genesys Cloud API.

### Migration Steps

1. Remove any `genesyscloud_widget_deployment` resources from your Terraform configuration.


## Example Usage

```terraform
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
inboundCall:
name: Terraform Flow Test-258fa494-f633-4c8a-b5da-5f9bfca357aa
name: test_data_flow396854db-7f83-489b-ac81-06f2794e4e54
defaultLanguage: en-us
startUpRef: ./menus/menu[mainMenu]
initialGreeting:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,31 @@
- [POST /api/v2/outbound/contactlists/{contactListId}/contacts](https://developer.genesys.cloud/devapps/api-explorer#post-api-v2-outbound-contactlists--contactListId--contacts)
- [GET /api/v2/outbound/contactlists/{contactListId}/contacts/{contactId}](https://developer.genesys.cloud/devapps/api-explorer#get-api-v2-outbound-contactlists--contactListId--contacts--contactId-)
- [PUT /api/v2/outbound/contactlists/{contactListId}/contacts/{contactId}](https://developer.genesys.cloud/devapps/api-explorer#put-api-v2-outbound-contactlists--contactListId--contacts--contactId-)
- [DELETE /api/v2/outbound/contactlists/{contactListId}/contacts/{contactId}](https://developer.genesys.cloud/devapps/api-explorer#delete-api-v2-outbound-contactlists--contactListId--contacts--contactId-)
- [DELETE /api/v2/outbound/contactlists/{contactListId}/contacts/{contactId}](https://developer.genesys.cloud/devapps/api-explorer#delete-api-v2-outbound-contactlists--contactListId--contacts--contactId-)

## Migrating from genesyscloud_outbound_contact_list_contact

### Deprecation Notice

The `genesyscloud_outbound_contact_list_contact` resource is deprecated and will be removed in a future version. Instead, use the `contacts_filepath` and `contacts_id_name` attributes in the `genesyscloud_outbound_contact_list` resource.

### Note About Exporter

The exporter functionality has been removed from this resource in favor of the `genesyscloud_outbound_contact_list` resource's built-in bulk handling of contacts via CSV exports. Contacts will now be exported within the CSV file output from the `genesyscloud_outbound_contact_list` and not be exported via this resource due to performance and scalability limitations with this resource.

### Migration Steps

1. Remove any `genesyscloud_outbound_contact_list_contact` resources from your Terraform configuration and add them to a `contacts.csv` file
2. Update your `genesyscloud_outbound_contact_list` resource to include:

```hcl
resource "genesyscloud_outbound_contact_list" "example" {
name = "Example Contact List"
# ... other existing configuration ...
contacts_filepath = "path/to/your/contacts.csv"
contacts_id_name = "contact_id_column"
}
```
3. Ensure your CSV file contains all required columns defined in `column_names`
4. Run `terraform plan` to verify the changes
12 changes: 11 additions & 1 deletion examples/resources/genesyscloud_widget_deployment/apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,14 @@
* [GET /api/v2/widgets/deployments/{deploymentId}](https://developer.genesys.cloud/api/rest/v2/widgets/#get-api-v2-widgets-deployments--deploymentId-)
* [POST /api/v2/widgets/deployments](https://developer.genesys.cloud/api/rest/v2/widgets/#post-api-v2-widgets-deployments)
* [PUT /api/v2/widgets/deployments/{deploymentId}](https://developer.genesys.cloud/api/rest/v2/widgets/#put-api-v2-widgets-deployments--deploymentId-)
* [DELETE /api/v2/widgets/deployments/{deploymentId}](https://developer.genesys.cloud/api/rest/v2/widgets/#delete-api-v2-widgets-deployments--deploymentId-)
* [DELETE /api/v2/widgets/deployments/{deploymentId}](https://developer.genesys.cloud/api/rest/v2/widgets/#delete-api-v2-widgets-deployments--deploymentId-)

## Migrating from genesyscloud_widget_deployment

### Deprecation Notice

The `genesyscloud_widget_deployment` resource is deprecated and will be removed in a future version due to this functionality being sunset in Genesys Cloud API.

### Migration Steps

1. Remove any `genesyscloud_widget_deployment` resources from your Terraform configuration.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func (d *grammarLanguageDownloader) downloadFileData(fileType FileType) error {
func (d *grammarLanguageDownloader) downloadLanguageFileAndUpdateConfigMap(url string) error {
d.fileUrl = url
d.setExportFileName()
if err := files.DownloadExportFile(d.exportFilesFolderPath, d.exportFileName, d.fileUrl); err != nil {
if _, err := files.DownloadExportFile(d.exportFilesFolderPath, d.exportFileName, d.fileUrl); err != nil {
return err
}
d.updatePathsInExportConfigMap()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func ArchitectPromptAudioResolver(promptId, exportDirectory, subDirectory string

for _, data := range audioDataList {
log.Printf("Downloading file '%s' from mediaUri", filepath.Join(fullPath, data.FileName))
if err := files.DownloadExportFile(fullPath, data.FileName, data.MediaUri); err != nil {
if _, err := files.DownloadExportFile(fullPath, data.FileName, data.MediaUri); err != nil {
return err
}
log.Println("Successfully downloaded file")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func runDataJourneySegmentTestCase(t *testing.T, testCaseName string) {
resource.Test(t, resource.TestCase{
PreCheck: func() { util.TestAccPreCheck(t) },
ProviderFactories: provider.GetProviderFactories(providerResources, providerDataSources),
Steps: testrunner.GenerateDataSourceTestSteps(resourceType, testCaseName, []resource.TestCheckFunc{
Steps: testrunner.GenerateDataJourneySourceTestSteps(resourceType, testCaseName, []resource.TestCheckFunc{
resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrPair("data."+testObjectFullName, "id", testObjectFullName, "id"),
resource.TestCheckResourceAttr(testObjectFullName, "display_name", testObjectName+"_to_find"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func runDataJourneyActionMapTestCase(t *testing.T, testCaseName string) {
resource.Test(t, resource.TestCase{
PreCheck: func() { util.TestAccPreCheck(t) },
ProviderFactories: provider.GetProviderFactories(providerResources, providerDataSources),
Steps: testrunner.GenerateDataSourceTestSteps(ResourceType, testCaseName, []resource.TestCheckFunc{
Steps: testrunner.GenerateDataJourneySourceTestSteps(ResourceType, testCaseName, []resource.TestCheckFunc{
resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrPair("data."+testObjectFullName, "id", testObjectFullName, "id"),
resource.TestCheckResourceAttr(testObjectFullName, "display_name", testObjectName+"_to_find"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func runJourneyActionMapTestCase(t *testing.T, testCaseName string) {
resource.Test(t, resource.TestCase{
PreCheck: func() { util.TestAccPreCheck(t) },
ProviderFactories: provider.GetProviderFactories(providerResources, providerDataSources),
Steps: testrunner.GenerateResourceTestSteps(ResourceType, testCaseName, nil),
Steps: testrunner.GenerateResourceJourneyTestSteps(ResourceType, testCaseName, nil),
CheckDestroy: testVerifyJourneyActionMapsDestroyed,
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func runDataJourneyActionTemplateTestCase(t *testing.T, testCaseName string) {
resource.Test(t, resource.TestCase{
PreCheck: func() { util.TestAccPreCheck(t) },
ProviderFactories: provider.GetProviderFactories(providerResources, providerDataSources),
Steps: testrunner.GenerateDataSourceTestSteps(ResourceType, testCaseName, []resource.TestCheckFunc{
Steps: testrunner.GenerateDataJourneySourceTestSteps(ResourceType, testCaseName, []resource.TestCheckFunc{
resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrPair("data."+testObjectFullName, "id", testObjectFullName, "id"),
resource.TestCheckResourceAttr(testObjectFullName, "name", testObjectName),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func runJourneyActionTemplateTestCase(t *testing.T, testCaseName string) {
resource.Test(t, resource.TestCase{
PreCheck: func() { util.TestAccPreCheck(t) },
ProviderFactories: provider.GetProviderFactories(providerResources, providerDataSources),
Steps: testrunner.GenerateResourceTestSteps(ResourceType, testCaseName, nil),
Steps: testrunner.GenerateResourceJourneyTestSteps(ResourceType, testCaseName, nil),
CheckDestroy: testVerifyJourneyActionTemplatesDestroyed,
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func runDataJourneyOutcomeTestCase(t *testing.T, testCaseName string) {
resource.Test(t, resource.TestCase{
PreCheck: func() { util.TestAccPreCheck(t) },
ProviderFactories: provider.GetProviderFactories(providerResources, providerDataSources),
Steps: testrunner.GenerateDataSourceTestSteps(ResourceType, testCaseName, []resource.TestCheckFunc{
Steps: testrunner.GenerateDataJourneySourceTestSteps(ResourceType, testCaseName, []resource.TestCheckFunc{
resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrPair("data."+testObjectFullName, "id", testObjectFullName, "id"),
resource.TestCheckResourceAttr(testObjectFullName, "display_name", testObjectName+"_to_find"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func runResourceJourneyOutcomeTestCase(t *testing.T, testCaseName string) {
resource.Test(t, resource.TestCase{
PreCheck: func() { util.TestAccPreCheck(t) },
ProviderFactories: provider.GetProviderFactories(providerResources, providerDataSources),
Steps: testrunner.GenerateResourceTestSteps(ResourceType, testCaseName, nil),
Steps: testrunner.GenerateResourceJourneyTestSteps(ResourceType, testCaseName, nil),
CheckDestroy: testVerifyJourneyOutcomesDestroyed,
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

func dataSourceOutboundContactListRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
sdkConfig := m.(*provider.ProviderMeta).ClientConfig
proxy := getOutboundContactlistProxy(sdkConfig)
proxy := GetOutboundContactlistProxy(sdkConfig)
name := d.Get("name").(string)

return util.WithRetries(ctx, 15*time.Second, func() *retry.RetryError {
Expand Down
Loading

0 comments on commit 471f3d0

Please sign in to comment.