Skip to content

Commit

Permalink
jsonencode targets to not require types for big target blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Nishu Goel committed Aug 15, 2024
1 parent 8a456fe commit dcc6f01
Show file tree
Hide file tree
Showing 31 changed files with 63 additions and 2,667 deletions.
34 changes: 9 additions & 25 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: a76d605f-5242-4bd3-8bd6-56a119e8eec5
management:
docChecksum: 3f5b7b512239e2ae174a08744b47a8b7
docChecksum: e88271fabb4586f51b0386879f7b3c30
docVersion: 1.0.0
speakeasyVersion: 1.346.0
generationVersion: 2.379.3
releaseVersion: 0.5.0
configChecksum: a3309a6e429c2e227c4300b09309fef7
releaseVersion: 0.5.1
configChecksum: 24f54e0e9292a2aeb4a0d21167ba222d
repoURL: https://github.com/epilot-dev/terraform-provider-epilot-entitymapping.git
repoSubDirectory: .
published: true
Expand Down Expand Up @@ -54,6 +54,12 @@ generatedFiles:
- internal/sdk/models/operations/storeconfig.go
- internal/sdk/models/operations/storenewversion.go
- internal/sdk/models/shared/mappingconfig.go
- internal/sdk/models/shared/sourceconfig.go
- internal/sdk/models/shared/journeyref.go
- internal/sdk/models/shared/entityref.go
- internal/sdk/models/shared/executemappingresp.go
- internal/sdk/models/shared/mappingwarning.go
- internal/sdk/models/shared/mappingfailure.go
- internal/sdk/models/shared/targetconfig.go
- internal/sdk/models/shared/relationattribute.go
- internal/sdk/models/shared/attributeorigin.go
Expand All @@ -66,12 +72,6 @@ generatedFiles:
- internal/sdk/models/shared/mappingattributemode.go
- internal/sdk/models/shared/copyvaluemapper.go
- internal/sdk/models/shared/appendvaluemapper.go
- internal/sdk/models/shared/sourceconfig.go
- internal/sdk/models/shared/journeyref.go
- internal/sdk/models/shared/entityref.go
- internal/sdk/models/shared/executemappingresp.go
- internal/sdk/models/shared/mappingwarning.go
- internal/sdk/models/shared/mappingfailure.go
- internal/sdk/models/shared/executemappingreq.go
- internal/sdk/models/shared/executerelationsresp.go
- internal/sdk/models/shared/newrelationitem.go
Expand Down Expand Up @@ -134,22 +134,6 @@ generatedFiles:
- internal/provider/types/journey_ref.go
- internal/provider/types/config.go
- internal/provider/types/source_config.go
- internal/provider/types/loop_config.go
- internal/provider/types/append_value_mapper.go
- internal/provider/types/copy_value_mapper.go
- internal/provider/types/set_value_mapper.go
- internal/provider/types/mapping_attribute.go
- internal/provider/types/one.go
- internal/provider/types/two.go
- internal/provider/types/random_operation.go
- internal/provider/types/uniq.go
- internal/provider/types/operation_object_node.go
- internal/provider/types/operation_node.go
- internal/provider/types/mapping_attribute_v2.go
- internal/provider/types/mapping_attributes.go
- internal/provider/types/source_filter.go
- internal/provider/types/relation_attribute.go
- internal/provider/types/target_config.go
- USAGE.md
- internal/provider/provider.go
- examples/provider/provider.tf
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ terraform {
required_providers {
epilot-entitymapping = {
source = "epilot-dev/epilot-entitymapping"
version = "0.5.0"
version = "0.5.1"
}
}
}
Expand Down
185 changes: 1 addition & 184 deletions docs/data-sources/entity_mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ data "epilot-entitymapping_entity_mapping" "my_entitymapping" {
### Read-Only

- `source` (Attributes) (see [below for nested schema](#nestedatt--source))
- `targets` (Attributes List) (see [below for nested schema](#nestedatt--targets))
- `targets` (String) Parsed as JSON.

<a id="nestedatt--source"></a>
### Nested Schema for `source`
Expand Down Expand Up @@ -63,186 +63,3 @@ Read-Only:
- `journey_id` (String)




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

Read-Only:

- `allow_failure` (Boolean) Pass it as true, when you don't want failures to interrupt the mapping process.
- `condition_mode` (String) Parsed as JSON.
- `conditions` (String) Parsed as JSON.
- `id` (String) Identifier for target configuration. Useful for later usages when trying to identify which target config to map to.
- `linkback_relation_attribute` (String) Relation attribute on the main entity where the target entity will be linked. Set to false to disable linkback
- `linkback_relation_tags` (List of String) Relation tags (labels) to include in main entity linkback relation attribute
- `loop_config` (Attributes) contains config in case of running in loop mode (see [below for nested schema](#nestedatt--targets--loop_config))
- `mapping_attributes` (Attributes List) Attribute mappings (see [below for nested schema](#nestedatt--targets--mapping_attributes))
- `name` (String) A name for this configuration
- `relation_attributes` (Attributes List) Relation mappings (see [below for nested schema](#nestedatt--targets--relation_attributes))
- `target_schema` (String) Schema of target entity
- `target_unique` (List of String) Unique key for target entity (see upsertEntity of Entity API)

<a id="nestedatt--targets--loop_config"></a>
### Nested Schema for `targets.loop_config`

Read-Only:

- `length` (Number) a hard limit of how many times the loop is allowed to run.
- `source_path` (String) path to the array from the entity payload


<a id="nestedatt--targets--mapping_attributes"></a>
### Nested Schema for `targets.mapping_attributes`

Read-Only:

- `mapping_attribute` (Attributes) (see [below for nested schema](#nestedatt--targets--mapping_attributes--mapping_attribute))
- `mapping_attribute_v2` (Attributes) (see [below for nested schema](#nestedatt--targets--mapping_attributes--mapping_attribute_v2))

<a id="nestedatt--targets--mapping_attributes--mapping_attribute"></a>
### Nested Schema for `targets.mapping_attributes.mapping_attribute`

Read-Only:

- `append_value_mapper` (Attributes) (see [below for nested schema](#nestedatt--targets--mapping_attributes--mapping_attribute--append_value_mapper))
- `copy_value_mapper` (Attributes) (see [below for nested schema](#nestedatt--targets--mapping_attributes--mapping_attribute--copy_value_mapper))
- `set_value_mapper` (Attributes) (see [below for nested schema](#nestedatt--targets--mapping_attributes--mapping_attribute--set_value_mapper))

<a id="nestedatt--targets--mapping_attributes--mapping_attribute--append_value_mapper"></a>
### Nested Schema for `targets.mapping_attributes.mapping_attribute.set_value_mapper`

Read-Only:

- `mode` (String) - copy_if_exists - it replaces the target attribute with the source value - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute. - set_value - it sets a value to a predefined value. Must be used together with value property.

must be one of ["copy_if_exists", "append_if_exists", "set_value"]
- `source` (String) JSON source path for the value to be extracted from the main entity. Eg: steps[1].['Product Info'].price
- `target` (String) JSON like target path for the attribute. Eg. last_name
- `target_unique` (List of String) Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]
- `value_json` (String) To be provided only when mapping json objects into a target attribute. Eg array of addresses.


<a id="nestedatt--targets--mapping_attributes--mapping_attribute--copy_value_mapper"></a>
### Nested Schema for `targets.mapping_attributes.mapping_attribute.set_value_mapper`

Read-Only:

- `mode` (String) - copy_if_exists - it replaces the target attribute with the source value - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute. - set_value - it sets a value to a predefined value. Must be used together with value property.

must be one of ["copy_if_exists", "append_if_exists", "set_value"]
- `source` (String) JSON source path for the value to be extracted from the main entity. Eg: steps[1].['Product Info'].price
- `target` (String) JSON like target path for the attribute. Eg. last_name


<a id="nestedatt--targets--mapping_attributes--mapping_attribute--set_value_mapper"></a>
### Nested Schema for `targets.mapping_attributes.mapping_attribute.set_value_mapper`

Read-Only:

- `mode` (String) - copy_if_exists - it replaces the target attribute with the source value - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute. - set_value - it sets a value to a predefined value. Must be used together with value property.

must be one of ["copy_if_exists", "append_if_exists", "set_value"]
- `target` (String) JSON like target path for the attribute. Eg. last_name
- `value` (String) Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.

Parsed as JSON.



<a id="nestedatt--targets--mapping_attributes--mapping_attribute_v2"></a>
### Nested Schema for `targets.mapping_attributes.mapping_attribute_v2`

Read-Only:

- `operation` (Attributes) Mapping operation nodes are either primitive values or operation node objects (see [below for nested schema](#nestedatt--targets--mapping_attributes--mapping_attribute_v2--operation))
- `origin` (String) Origin of an attribute. must be one of ["system_recommendation", "user_manually", "entity_updating_system_recommendation"]
- `target` (String) Target JSON path for the attribute to set

<a id="nestedatt--targets--mapping_attributes--mapping_attribute_v2--operation"></a>
### Nested Schema for `targets.mapping_attributes.mapping_attribute_v2.target`

Read-Only:

- `any` (String) Parsed as JSON.
- `operation_object_node` (Attributes) (see [below for nested schema](#nestedatt--targets--mapping_attributes--mapping_attribute_v2--target--operation_object_node))

<a id="nestedatt--targets--mapping_attributes--mapping_attribute_v2--target--operation_object_node"></a>
### Nested Schema for `targets.mapping_attributes.mapping_attribute_v2.target.operation_object_node`

Read-Only:

- `additional_properties` (String) Parsed as JSON.
- `append` (List of String) Append to array
- `copy` (String) Copy JSONPath value from source entity context
- `random` (Attributes) (see [below for nested schema](#nestedatt--targets--mapping_attributes--mapping_attribute_v2--target--operation_object_node--random))
- `set` (String) Parsed as JSON.
- `template` (String) Define handlebars template to output a string
- `uniq` (Attributes) Unique array (see [below for nested schema](#nestedatt--targets--mapping_attributes--mapping_attribute_v2--target--operation_object_node--uniq))

<a id="nestedatt--targets--mapping_attributes--mapping_attribute_v2--target--operation_object_node--random"></a>
### Nested Schema for `targets.mapping_attributes.mapping_attribute_v2.target.operation_object_node.uniq`

Read-Only:

- `one` (Attributes) (see [below for nested schema](#nestedatt--targets--mapping_attributes--mapping_attribute_v2--target--operation_object_node--uniq--one))
- `two` (Attributes) (see [below for nested schema](#nestedatt--targets--mapping_attributes--mapping_attribute_v2--target--operation_object_node--uniq--two))

<a id="nestedatt--targets--mapping_attributes--mapping_attribute_v2--target--operation_object_node--uniq--one"></a>
### Nested Schema for `targets.mapping_attributes.mapping_attribute_v2.target.operation_object_node.uniq.two`

Read-Only:

- `type` (String) must be one of ["uuid", "nanoid"]


<a id="nestedatt--targets--mapping_attributes--mapping_attribute_v2--target--operation_object_node--uniq--two"></a>
### Nested Schema for `targets.mapping_attributes.mapping_attribute_v2.target.operation_object_node.uniq.two`

Read-Only:

- `max` (Number)
- `min` (Number)
- `type` (String) must be one of ["number"]



<a id="nestedatt--targets--mapping_attributes--mapping_attribute_v2--target--operation_object_node--uniq"></a>
### Nested Schema for `targets.mapping_attributes.mapping_attribute_v2.target.operation_object_node.uniq`

Read-Only:

- `array_of_str` (List of String)
- `boolean` (Boolean)






<a id="nestedatt--targets--relation_attributes"></a>
### Nested Schema for `targets.relation_attributes`

Read-Only:

- `mode` (String) must be one of ["append", "prepend", "set"]
- `origin` (String) Origin of an attribute. must be one of ["system_recommendation", "user_manually", "entity_updating_system_recommendation"]
- `related_to` (Map of String)
- `source_filter` (Attributes) A filter to identify which source entities to pick as relations from main entity (see [below for nested schema](#nestedatt--targets--relation_attributes--source_filter))
- `target` (String) Target attribute to store the relation in
- `target_tags` (List of String) Relation tags (labels) to set for the stored relations
- `target_tags_include_source` (Boolean) Include all relation tags (labels) present on the main entity relation

<a id="nestedatt--targets--relation_attributes--source_filter"></a>
### Nested Schema for `targets.relation_attributes.source_filter`

Read-Only:

- `attribute` (String) Filter by a specific relation attribute on the main entity
- `limit` (Number) Limit relations to maximum number (default, all matched relations)
- `relation_tag` (String) Filter by relation tag (label) on the main entity
- `schema` (String) Filter by specific schema
- `self` (Boolean) Picks main entity as relation (overrides other filters)
- `tag` (String) Filter by a specific tag on the related entity


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-entitymapping = {
source = "epilot-dev/epilot-entitymapping"
version = "0.5.0"
version = "0.5.1"
}
}
}
Expand Down
Loading

0 comments on commit dcc6f01

Please sign in to comment.