Skip to content

Commit

Permalink
Merge pull request #3 from epilot-dev/feat/add_closing_reasons
Browse files Browse the repository at this point in the history
Add resource for closing reasons in workflow provider
  • Loading branch information
NishuGoel authored Aug 9, 2024
2 parents 1ff710d + b2f0804 commit 25c88b0
Show file tree
Hide file tree
Showing 132 changed files with 2,131 additions and 532 deletions.
37 changes: 27 additions & 10 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 5a857039-7f4b-42d5-86fd-449767242ed2
management:
docChecksum: cdc191ce1bf61d7565b6f4caa1ea7ff9
docChecksum: 088d1c5acb62ad859574f77a4fa9cfe7
docVersion: 1.0.0
speakeasyVersion: 1.330.0
generationVersion: 2.361.10
releaseVersion: 0.11.0
configChecksum: fe1f4f47e217555f3049bc6b86f7300b
speakeasyVersion: 1.346.0
generationVersion: 2.379.3
releaseVersion: 0.12.0
configChecksum: c0d92b66a873af7e8a44f04f3d7ceed7
repoURL: https://github.com/epilot-dev/terraform-provider-epilot-workflow.git
repoSubDirectory: .
published: true
Expand All @@ -21,12 +21,13 @@ features:
unions: 2.85.0
terraform:
additionalDependencies: 0.1.0
core: 3.23.3
core: 3.24.3
deprecations: 2.81.1
globalSecurity: 2.81.6
globalServerURLs: 2.82.1
unions: 2.81.15
generatedFiles:
- internal/sdk/closingreason.go
- internal/sdk/workflows.go
- internal/sdk/sdk.go
- internal/sdk/models/errors/sdkerror.go
Expand All @@ -46,14 +47,22 @@ generatedFiles:
- internal/sdk/internal/utils/retries.go
- internal/sdk/internal/utils/security.go
- internal/sdk/internal/utils/utils.go
- internal/sdk/models/operations/changereasonstatus.go
- internal/sdk/models/operations/createclosingreason.go
- internal/sdk/models/operations/getallclosingreasons.go
- internal/sdk/models/operations/getclosingreason.go
- internal/sdk/models/operations/createdefinition.go
- internal/sdk/models/operations/deletedefinition.go
- internal/sdk/models/operations/getdefinition.go
- internal/sdk/models/operations/getdefinitions.go
- internal/sdk/models/operations/getmaxallowedlimit.go
- internal/sdk/models/operations/getworkflowclosingreasons.go
- internal/sdk/models/operations/setworkflowclosingreasons.go
- internal/sdk/models/operations/updatedefinition.go
- internal/sdk/models/shared/errorresp.go
- internal/sdk/models/shared/changereasonstatusreq.go
- internal/sdk/models/shared/closingreasonsstatus.go
- internal/sdk/models/shared/closingreason.go
- internal/sdk/models/shared/closingreasons.go
- internal/sdk/models/shared/closingreasonnotfoundresp.go
- internal/sdk/models/shared/workflowdefinition.go
- internal/sdk/models/shared/updateentityattributes.go
- internal/sdk/models/shared/section.go
Expand All @@ -66,15 +75,15 @@ generatedFiles:
- internal/sdk/models/shared/dynamicduedate.go
- internal/sdk/models/shared/stepdescription.go
- internal/sdk/models/shared/closingreasonid.go
- internal/sdk/models/shared/errorresp.go
- internal/sdk/models/shared/definitionnotfoundresp.go
- internal/sdk/models/shared/maxallowedlimit.go
- internal/sdk/models/shared/closingreasonsids.go
- internal/sdk/models/shared/security.go
- internal/sdk/.gitignore
- internal/sdk/models/operations/options.go
- internal/sdk/.gitattributes
- internal/sdk/internal/hooks/registration.go
- internal/sdk/internal/hooks/hooks.go
- internal/sdk/CONTRIBUTING.md
- examples/README.md
- go.mod
- go.sum
Expand Down Expand Up @@ -134,11 +143,19 @@ generatedFiles:
- USAGE.md
- internal/provider/provider.go
- examples/provider/provider.tf
- examples/resources/epilot-workflow_closing_reason/import.sh
- internal/provider/closingreason_resource.go
- internal/provider/closingreason_resource_sdk.go
- examples/resources/epilot-workflow_closing_reason/resource.tf
- examples/resources/epilot-workflow_workflow_definition/import.sh
- internal/provider/workflowdefinition_resource.go
- internal/provider/workflowdefinition_resource_sdk.go
- examples/resources/epilot-workflow_workflow_definition/resource.tf
- internal/provider/closingreason_data_source.go
- internal/provider/closingreason_data_source_sdk.go
- examples/data-sources/epilot-workflow_closing_reason/data-source.tf
- internal/provider/workflowdefinition_data_source.go
- internal/provider/workflowdefinition_data_source_sdk.go
- examples/data-sources/epilot-workflow_workflow_definition/data-source.tf
- .gitattributes
- CONTRIBUTING.md
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Contributing to This Repository

Thank you for your interest in contributing to this repository. Please note that this repository contains generated code. As such, we do not accept direct changes or pull requests. Instead, we encourage you to follow the guidelines below to report issues and suggest improvements.

## How to Report Issues

If you encounter any bugs or have suggestions for improvements, please open an issue on GitHub. When reporting an issue, please provide as much detail as possible to help us reproduce the problem. This includes:

- A clear and descriptive title
- Steps to reproduce the issue
- Expected and actual behavior
- Any relevant logs, screenshots, or error messages
- Information about your environment (e.g., operating system, software versions)
- For example can be collected using the `npx envinfo` command from your terminal if you have Node.js installed

## Issue Triage and Upstream Fixes

We will review and triage issues as quickly as possible. Our goal is to address bugs and incorporate improvements in the upstream source code. Fixes will be included in the next generation of the generated code.

## Contact

If you have any questions or need further assistance, please feel free to reach out by opening an issue.

Thank you for your understanding and cooperation!

The Maintainers
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ terraform {
required_providers {
epilot-workflow = {
source = "epilot-dev/epilot-workflow"
version = "0.11.0"
version = "0.12.0"
}
}
}
Expand Down
39 changes: 36 additions & 3 deletions docs/data-sources/workflow_definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ data "epilot-workflow_workflow_definition" "my_workflowdefinition" {
- `creation_time` (String) ISO String Date & Time
- `description` (String)
- `due_date` (String)
- `dynamic_due_date` (String) set a Duedate for a step then a specific. Parsed as JSON.
- `dynamic_due_date` (Attributes) set a Duedate for a step then a specific (see [below for nested schema](#nestedatt--dynamic_due_date))
- `enable_ecp_workflow` (Boolean) Indicates whether this workflow is available for End Customer Portal or not. By default it's not.
- `flow` (Attributes List) (see [below for nested schema](#nestedatt--flow))
- `id` (String) The ID of this resource.
Expand All @@ -45,6 +45,17 @@ Read-Only:
- `id` (String)


<a id="nestedatt--dynamic_due_date"></a>
### Nested Schema for `dynamic_due_date`

Read-Only:

- `action_type_condition` (String) must be one of ["WORKFLOW_STARTED", "STEP_CLOSED"]
- `number_of_units` (Number)
- `step_id` (String)
- `time_period` (String) must be one of ["days", "weeks", "months"]


<a id="nestedatt--flow"></a>
### Nested Schema for `flow`

Expand Down Expand Up @@ -73,7 +84,7 @@ Read-Only:
- `automation_config` (Attributes) (see [below for nested schema](#nestedatt--flow--section--steps--automation_config))
- `description` (Attributes) Longer information regarding Task (see [below for nested schema](#nestedatt--flow--section--steps--description))
- `due_date` (String)
- `dynamic_due_date` (String) set a Duedate for a step then a specific. Parsed as JSON.
- `dynamic_due_date` (Attributes) set a Duedate for a step then a specific (see [below for nested schema](#nestedatt--flow--section--steps--dynamic_due_date))
- `ecp` (Attributes) Details regarding ECP for the workflow step (see [below for nested schema](#nestedatt--flow--section--steps--ecp))
- `execution_type` (String) must be one of ["MANUAL", "AUTOMATION"]
- `id` (String)
Expand Down Expand Up @@ -102,6 +113,17 @@ Read-Only:
- `value` (String)


<a id="nestedatt--flow--section--steps--dynamic_due_date"></a>
### Nested Schema for `flow.section.steps.user_ids`

Read-Only:

- `action_type_condition` (String) must be one of ["WORKFLOW_STARTED", "STEP_CLOSED"]
- `number_of_units` (Number)
- `step_id` (String)
- `time_period` (String) must be one of ["days", "weeks", "months"]


<a id="nestedatt--flow--section--steps--ecp"></a>
### Nested Schema for `flow.section.steps.user_ids`

Expand Down Expand Up @@ -175,7 +197,7 @@ Read-Only:
- `automation_config` (Attributes) (see [below for nested schema](#nestedatt--flow--step--automation_config))
- `description` (Attributes) Longer information regarding Task (see [below for nested schema](#nestedatt--flow--step--description))
- `due_date` (String)
- `dynamic_due_date` (String) set a Duedate for a step then a specific. Parsed as JSON.
- `dynamic_due_date` (Attributes) set a Duedate for a step then a specific (see [below for nested schema](#nestedatt--flow--step--dynamic_due_date))
- `ecp` (Attributes) Details regarding ECP for the workflow step (see [below for nested schema](#nestedatt--flow--step--ecp))
- `execution_type` (String) must be one of ["MANUAL", "AUTOMATION"]
- `id` (String)
Expand Down Expand Up @@ -204,6 +226,17 @@ Read-Only:
- `value` (String)


<a id="nestedatt--flow--step--dynamic_due_date"></a>
### Nested Schema for `flow.step.dynamic_due_date`

Read-Only:

- `action_type_condition` (String) must be one of ["WORKFLOW_STARTED", "STEP_CLOSED"]
- `number_of_units` (Number)
- `step_id` (String)
- `time_period` (String) must be one of ["days", "weeks", "months"]


<a id="nestedatt--flow--step--ecp"></a>
### Nested Schema for `flow.step.ecp`

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ terraform {
required_providers {
epilot-workflow = {
source = "epilot-dev/epilot-workflow"
version = "0.10.0"
version = "0.11.0"
}
}
}
Expand Down
79 changes: 58 additions & 21 deletions docs/resources/workflow_definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ resource "epilot-workflow_workflow_definition" "my_workflowdefinition" {
definition_id = "7hj28a"
description = "...my_description..."
due_date = "2021-04-27T12:00:00.000Z"
dynamic_due_date = "{ \"see\": \"documentation\" }"
enable_ecp_workflow = false
flow = [
{
Expand All @@ -38,57 +37,62 @@ resource "epilot-workflow_workflow_definition" "my_workflowdefinition" {
enabled = true
value = "...my_value..."
}
due_date = "2021-04-27T12:00:00.000Z"
dynamic_due_date = "{ \"see\": \"documentation\" }"
due_date = "2021-04-27T12:00:00.000Z"
dynamic_due_date = {
action_type_condition = "STEP_CLOSED"
number_of_units = 73.8
step_id = "...my_step_id..."
time_period = "weeks"
}
ecp = {
description = "...my_description..."
enabled = false
journey = {
id = "b9364361-b277-46d7-98c7-5f3e120ea0dc"
id = "64361b27-76d7-498c-b5f3-e120ea0dc9e1"
journey_id = "...my_journey_id..."
name = "Mrs. Grady Bins"
name = "Lorraine Witting"
}
label = "...my_label..."
}
execution_type = "AUTOMATION"
id = "f93f96aa-0e34-4085-b7db-1176521d792f"
id = "3f96aa0e-3408-45f7-9b11-76521d792fea"
installer = {
description = "...my_description..."
enabled = true
journey = {
id = "a4830af3-5ac0-4f05-96d8-6c6d56674fb2"
id = "830af35a-c0f0-4516-986c-6d56674fb26d"
journey_id = "...my_journey_id..."
name = "Elena Kuhic"
name = "Paulette O'Hara"
}
label = "...my_label..."
}
journey = {
id = "9f9b2b84-e882-493d-9869-3f16fc9936c9"
id = "9b2b84e8-8293-4d18-a93f-16fc9936c940"
journey_id = "...my_journey_id..."
name = "Kimberly Marvin"
name = "Dr. Joel Hermann"
}
name = "Dr. Eloise Nader"
order = 66.72
name = "Lorene Denesik"
order = 4.83
requirements = [
{
condition = "CLOSED"
definition_id = "...my_definition_id..."
type = "SECTION"
type = "STEP"
},
]
type = "STEP"
type = "SECTION"
user_ids = [
31.44,
9.27,
]
},
]
type = "SECTION"
type = "STEP"
}
},
]
id = "1470408a-193e-4721-a537-6b6381b5dd26"
id = "70408a19-3e72-4165-b76b-6381b5dd263e"
last_update_time = "2021-04-27T12:01:13.000Z"
name = "Eloise Kreiger DVM"
name = "Nina Bednar"
}
```

Expand All @@ -107,7 +111,7 @@ resource "epilot-workflow_workflow_definition" "my_workflowdefinition" {
- `creation_time` (String) ISO String Date & Time
- `description` (String)
- `due_date` (String)
- `dynamic_due_date` (String) set a Duedate for a step then a specific. Parsed as JSON.
- `dynamic_due_date` (Attributes) set a Duedate for a step then a specific (see [below for nested schema](#nestedatt--dynamic_due_date))
- `enable_ecp_workflow` (Boolean) Indicates whether this workflow is available for End Customer Portal or not. By default it's not.
- `last_update_time` (String) ISO String Date & Time
- `update_entity_attributes` (Attributes List) (see [below for nested schema](#nestedatt--update_entity_attributes))
Expand Down Expand Up @@ -145,7 +149,7 @@ Optional:
- `automation_config` (Attributes) (see [below for nested schema](#nestedatt--flow--section--steps--automation_config))
- `description` (Attributes) Longer information regarding Task (see [below for nested schema](#nestedatt--flow--section--steps--description))
- `due_date` (String)
- `dynamic_due_date` (String) set a Duedate for a step then a specific. Parsed as JSON.
- `dynamic_due_date` (Attributes) set a Duedate for a step then a specific (see [below for nested schema](#nestedatt--flow--section--steps--dynamic_due_date))
- `ecp` (Attributes) Details regarding ECP for the workflow step (see [below for nested schema](#nestedatt--flow--section--steps--ecp))
- `execution_type` (String) must be one of ["MANUAL", "AUTOMATION"]
- `id` (String)
Expand Down Expand Up @@ -174,6 +178,17 @@ Optional:
- `value` (String)


<a id="nestedatt--flow--section--steps--dynamic_due_date"></a>
### Nested Schema for `flow.section.steps.user_ids`

Optional:

- `action_type_condition` (String) must be one of ["WORKFLOW_STARTED", "STEP_CLOSED"]
- `number_of_units` (Number)
- `step_id` (String)
- `time_period` (String) must be one of ["days", "weeks", "months"]


<a id="nestedatt--flow--section--steps--ecp"></a>
### Nested Schema for `flow.section.steps.user_ids`

Expand Down Expand Up @@ -247,7 +262,7 @@ Optional:
- `automation_config` (Attributes) (see [below for nested schema](#nestedatt--flow--step--automation_config))
- `description` (Attributes) Longer information regarding Task (see [below for nested schema](#nestedatt--flow--step--description))
- `due_date` (String)
- `dynamic_due_date` (String) set a Duedate for a step then a specific. Parsed as JSON.
- `dynamic_due_date` (Attributes) set a Duedate for a step then a specific (see [below for nested schema](#nestedatt--flow--step--dynamic_due_date))
- `ecp` (Attributes) Details regarding ECP for the workflow step (see [below for nested schema](#nestedatt--flow--step--ecp))
- `execution_type` (String) must be one of ["MANUAL", "AUTOMATION"]
- `id` (String)
Expand Down Expand Up @@ -276,6 +291,17 @@ Optional:
- `value` (String)


<a id="nestedatt--flow--step--dynamic_due_date"></a>
### Nested Schema for `flow.step.dynamic_due_date`

Optional:

- `action_type_condition` (String) must be one of ["WORKFLOW_STARTED", "STEP_CLOSED"]
- `number_of_units` (Number)
- `step_id` (String)
- `time_period` (String) must be one of ["days", "weeks", "months"]


<a id="nestedatt--flow--step--ecp"></a>
### Nested Schema for `flow.step.ecp`

Expand Down Expand Up @@ -348,6 +374,17 @@ Optional:
- `id` (String) Not Null


<a id="nestedatt--dynamic_due_date"></a>
### Nested Schema for `dynamic_due_date`

Optional:

- `action_type_condition` (String) must be one of ["WORKFLOW_STARTED", "STEP_CLOSED"]
- `number_of_units` (Number)
- `step_id` (String)
- `time_period` (String) must be one of ["days", "weeks", "months"]


<a id="nestedatt--update_entity_attributes"></a>
### Nested Schema for `update_entity_attributes`

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
data "epilot-workflow_closing_reason" "my_closingreason" {
reason_id = "-poOAPBa-jFZA_AWV3zN0"
}
Loading

0 comments on commit 25c88b0

Please sign in to comment.