Skip to content

Commit

Permalink
Upgrade provider to add back entityId
Browse files Browse the repository at this point in the history
  • Loading branch information
Nishu Goel committed Aug 16, 2024
1 parent 3edc93a commit 94c73fb
Show file tree
Hide file tree
Showing 124 changed files with 21,314 additions and 1,498 deletions.
121 changes: 66 additions & 55 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,27 +1,75 @@
lockVersion: 2.0.0
id: 1afd37bc-cea9-4679-ac40-35ad5de414fc
management:
docChecksum: 25eb21ef4a0c170c431dedb3401afc84
docChecksum: a2a4e6e0c5d448a2079d174f9d7ed7fe
docVersion: 1.0.0
speakeasyVersion: internal
generationVersion: 2.230.1
releaseVersion: 0.2.7
configChecksum: ba1909901d42d5999d4327d01df604d8
speakeasyVersion: 1.346.0
generationVersion: 2.379.3
releaseVersion: 0.3.2
configChecksum: 6429bafb37993b177594dcd335dadc26
repoURL: https://github.com/epilot-dev/terraform-provider-epilot-journey.git
repoSubDirectory: .
published: true
features:
terraform:
additionalDependencies: 0.1.0
additionalProperties: 0.1.2
constsAndDefaults: 0.1.2
core: 3.8.1
globalSecurity: 2.81.2
constsAndDefaults: 0.1.4
core: 3.24.3
globalSecurity: 2.81.6
globalServerURLs: 2.82.1
nullables: 0.0.0
retries: 2.81.1
generatedFiles:
- internal/sdk/journeys.go
- internal/sdk/journeysv2.go
- internal/sdk/sdk.go
- internal/sdk/models/errors/sdkerror.go
- internal/sdk/retry/config.go
- internal/sdk/types/bigint.go
- internal/sdk/types/date.go
- internal/sdk/types/datetime.go
- internal/sdk/types/decimal.go
- internal/sdk/types/pointers.go
- internal/sdk/internal/utils/contenttype.go
- internal/sdk/internal/utils/form.go
- internal/sdk/internal/utils/headers.go
- internal/sdk/internal/utils/json.go
- internal/sdk/internal/utils/pathparams.go
- internal/sdk/internal/utils/queryparams.go
- internal/sdk/internal/utils/requestbody.go
- internal/sdk/internal/utils/retries.go
- internal/sdk/internal/utils/security.go
- internal/sdk/internal/utils/utils.go
- internal/sdk/models/operations/createjourney.go
- internal/sdk/models/operations/getjourney.go
- internal/sdk/models/operations/getjourneyproducts.go
- internal/sdk/models/operations/getjourneysbyorgid.go
- internal/sdk/models/operations/patchupdatejourney.go
- internal/sdk/models/operations/removejourney.go
- internal/sdk/models/operations/searchjourneys.go
- internal/sdk/models/operations/updatejourney.go
- internal/sdk/models/operations/createjourneyv2.go
- internal/sdk/models/operations/getjourneyv2.go
- internal/sdk/models/operations/patchupdatejourneyv2.go
- internal/sdk/models/operations/removejourneyv2.go
- internal/sdk/models/operations/updatejourneyv2.go
- internal/sdk/models/shared/journey.go
- internal/sdk/models/shared/journeycreationrequest.go
- internal/sdk/models/shared/journeyproductsresponse.go
- internal/sdk/models/shared/getjourneysresponse.go
- internal/sdk/models/shared/journeyresponse.go
- internal/sdk/models/shared/patchupdatejourneyrequest.go
- internal/sdk/models/shared/searchjourneysresponse.go
- internal/sdk/models/shared/searchjourneysqueryrequest.go
- internal/sdk/models/shared/journeycreationrequestv2.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 @@ -50,22 +98,6 @@ generatedFiles:
- internal/provider/reflect/slice.go
- internal/provider/reflect/struct.go
- internal/provider/utils.go
- internal/sdk/pkg/models/sdkerrors/sdkerror.go
- internal/sdk/pkg/types/bigint.go
- internal/sdk/pkg/types/date.go
- internal/sdk/pkg/types/datetime.go
- internal/sdk/pkg/types/decimal.go
- internal/sdk/pkg/types/pointers.go
- internal/sdk/pkg/utils/contenttype.go
- internal/sdk/pkg/utils/form.go
- internal/sdk/pkg/utils/headers.go
- internal/sdk/pkg/utils/json.go
- internal/sdk/pkg/utils/pathparams.go
- internal/sdk/pkg/utils/queryparams.go
- internal/sdk/pkg/utils/requestbody.go
- internal/sdk/pkg/utils/retries.go
- internal/sdk/pkg/utils/security.go
- internal/sdk/pkg/utils/utils.go
- internal/validators/DateValidator.go
- internal/validators/ExactlyOneChild.go
- internal/validators/JSONParseValidator.go
Expand All @@ -82,44 +114,23 @@ generatedFiles:
- main.go
- terraform-registry-manifest.json
- tools/tools.go
- internal/sdk/pkg/models/operations/createjourney.go
- internal/sdk/pkg/models/operations/getjourney.go
- internal/sdk/pkg/models/operations/getjourneyproducts.go
- internal/sdk/pkg/models/operations/getjourneysbyorgid.go
- internal/sdk/pkg/models/operations/patchupdatejourney.go
- internal/sdk/pkg/models/operations/removejourney.go
- internal/sdk/pkg/models/operations/searchjourneys.go
- internal/sdk/pkg/models/operations/updatejourney.go
- internal/sdk/pkg/models/operations/createjourneyv2.go
- internal/sdk/pkg/models/operations/getjourneyv2.go
- internal/sdk/pkg/models/operations/patchupdatejourneyv2.go
- internal/sdk/pkg/models/operations/removejourneyv2.go
- internal/sdk/pkg/models/operations/updatejourneyv2.go
- internal/sdk/pkg/models/shared/journey.go
- internal/sdk/pkg/models/shared/journeycreationrequest.go
- internal/sdk/pkg/models/shared/journeyproductsresponse.go
- internal/sdk/pkg/models/shared/getjourneysresponse.go
- internal/sdk/pkg/models/shared/journeyresponse.go
- internal/sdk/pkg/models/shared/patchupdatejourneyrequest.go
- internal/sdk/pkg/models/shared/searchjourneysresponse.go
- internal/sdk/pkg/models/shared/searchjourneysqueryrequest.go
- internal/sdk/pkg/models/shared/journeycreationrequestv2.go
- internal/sdk/pkg/models/shared/security.go
- internal/provider/type_journey_creation_request_v2_design.go
- internal/provider/type_journey_creation_request_v2_logics.go
- internal/provider/type_journey_creation_request_v2_rules.go
- internal/provider/type_journey_creation_request_v2_button.go
- internal/provider/type_journey_creation_request_v2_embed_options.go
- internal/provider/type_journey_creation_request_v2_settings.go
- internal/provider/type_journey_creation_request_v2_steps.go
- internal/provider/types/journey_creation_request_v2_context_schema.go
- internal/provider/types/journey_creation_request_v2_design.go
- internal/provider/types/journey_creation_request_v2_logics.go
- internal/provider/types/journey_creation_request_v2_rules.go
- internal/provider/types/journey_creation_request_v2_button.go
- internal/provider/types/journey_creation_request_v2_embed_options.go
- internal/provider/types/journey_creation_request_v2_settings.go
- internal/provider/types/journey_creation_request_v2_steps.go
- USAGE.md
- internal/provider/provider.go
- examples/provider/provider.tf
- examples/resources/epilot-journey_journey/import.sh
- internal/provider/journey_resource.go
- internal/provider/journey_resource_sdk.go
- examples/resources/epilot-journey_journey/resource.tf
- internal/provider/journey_data_source.go
- internal/provider/journey_data_source_sdk.go
- examples/data-sources/epilot-journey_journey/data-source.tf
- internal/sdk/pkg/models/operations/options.go
- .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
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@
all: speakeasy docs

original.yaml:
curl https://docs.api.epilot.io/journey-config.yaml > original.yaml
# curl https://docs.api.epilot.io/file.yaml > original.yaml
cp openapi.yml original.yaml

original_modified.yaml: original.yaml
cp original.yaml original_modified.yaml
original_modified.yaml: original.yaml overlay.yaml
speakeasy overlay apply -s original.yaml -o overlay.yaml > original_modified.yaml

overlay.yaml:
speakeasy overlay compare -s original.yaml -s original_modified.yaml > overlay.yaml

speakeasy:
$(eval TMP := $(shell mktemp -d))
curl https://docs.api.epilot.io/journey-config.yaml > $(TMP)/openapi.yaml
# curl https://docs.api.epilot.io/file.yaml > $(TMP)/openapi.yaml
cp openapi.yml $(TMP)/openapi.yaml
speakeasy overlay apply -s $(TMP)/openapi.yaml -o overlay.yaml > $(TMP)/final.yaml
speakeasy generate sdk --lang terraform -o . -s $(TMP)/final.yaml

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ terraform {
required_providers {
epilot-journey = {
source = "epilot-dev/epilot-journey"
version = "0.2.7"
version = "0.3.2"
}
}
}
Expand Down
19 changes: 14 additions & 5 deletions docs/data-sources/journey.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,35 @@ Journey DataSource

```terraform
data "epilot-journey_journey" "my_journey" {
journey_id = "509cdffe-424f-457a-95c2-9708c304ce77"
id = "509cdffe-424f-457a-95c2-9708c304ce77"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `journey_id` (String) Journey ID

### Read-Only

- `brand_id` (String)
- `context_schema` (Attributes List) (see [below for nested schema](#nestedatt--context_schema))
- `design` (Attributes) (see [below for nested schema](#nestedatt--design))
- `journey_id` (String)
- `logics` (Attributes List) (see [below for nested schema](#nestedatt--logics))
- `name` (String)
- `rules` (Attributes List) (see [below for nested schema](#nestedatt--rules))
- `settings` (Attributes) (see [below for nested schema](#nestedatt--settings))
- `steps` (Attributes List) (see [below for nested schema](#nestedatt--steps))

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

Read-Only:

- `is_required` (Boolean)
- `param_key` (String)
- `type` (String)


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

Expand Down Expand Up @@ -74,6 +82,7 @@ Read-Only:
- `description` (String)
- `design_id` (String)
- `embed_options` (Attributes) (see [below for nested schema](#nestedatt--settings--embed_options))
- `entity_id` (String)
- `entity_tags` (List of String)
- `file_purposes` (List of String)
- `mappings_automation_id` (String)
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-journey = {
source = "epilot-dev/epilot-journey"
version = "0.2.7"
version = "0.3.2"
}
}
}
Expand Down
33 changes: 26 additions & 7 deletions docs/resources/journey.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,21 @@ Journey Resource
```terraform
resource "epilot-journey_journey" "my_journey" {
brand_id = "...my_brand_id..."
id = "509cdffe-424f-457a-95c2-9708c304ce77"
journey_id = "...my_journey_id..."
name = "Dianne Kiehn"
name = "Nathaniel Von"
steps = [
{
hide_next_button = false
name = "Pearl Ondricka"
hide_next_button = true
name = "Devin Lehner"
schema = "{ \"see\": \"documentation\" }"
show_step_name = true
show_stepper = true
show_step_name = false
show_stepper = false
show_stepper_labels = true
show_step_subtitle = true
step_id = "...my_step_id..."
sub_title = "...my_sub_title..."
title = "Ms."
title = "Dr."
uischema = "{ \"see\": \"documentation\" }"
},
]
Expand All @@ -46,8 +47,9 @@ resource "epilot-journey_journey" "my_journey" {
### Optional

- `brand_id` (String)
- `context_schema` (Attributes List) (see [below for nested schema](#nestedatt--context_schema))
- `design` (Attributes) (see [below for nested schema](#nestedatt--design))
- `journey_id` (String) Journey ID
- `journey_id` (String)
- `logics` (Attributes List) (see [below for nested schema](#nestedatt--logics))
- `rules` (Attributes List) (see [below for nested schema](#nestedatt--rules))
- `settings` (Attributes) (see [below for nested schema](#nestedatt--settings))
Expand All @@ -70,6 +72,16 @@ Optional:
- `uischema` (String) Parsed as JSON.


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

Optional:

- `is_required` (Boolean)
- `param_key` (String) Not Null
- `type` (String) Not Null


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

Expand Down Expand Up @@ -109,6 +121,7 @@ Optional:
- `description` (String)
- `design_id` (String)
- `embed_options` (Attributes) (see [below for nested schema](#nestedatt--settings--embed_options))
- `entity_id` (String)
- `entity_tags` (List of String)
- `file_purposes` (List of String)
- `mappings_automation_id` (String)
Expand Down Expand Up @@ -137,4 +150,10 @@ Optional:
- `align` (String) must be one of ["left", "center", "right"]
- `text` (String)

## Import

Import is supported using the following syntax:

```shell
terraform import epilot-journey_journey.my_epilot-journey_journey ""
```
25 changes: 25 additions & 0 deletions examples/bigggg/bla.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Provider definitions
terraform {
required_providers {
epilot-journey = {
source = "epilot-dev/epilot-journey"
version = "1.0.1"
}
}
}

# Variables
variable "epilot_auth" {
type = string
}
variable "journey_api_url" {
type = string
default = "https://journey-config.sls.epilot.io"
}

# Providers configuration
provider "epilot-journey" {
epilot_auth = var.epilot_auth
server_url = var.journey_api_url
}
# resource "epilot-journey_journey" "journey_bla" {}
Loading

0 comments on commit 94c73fb

Please sign in to comment.