From b0481f3955a51a1f8e4cd9943335d9c1c12411c0 Mon Sep 17 00:00:00 2001 From: Thomas De Meyer Date: Fri, 14 Feb 2025 14:38:51 +0100 Subject: [PATCH 1/3] feat: added additional fields to component schema resource --- go.mod | 57 ++--- go.sum | 123 +++++------ internal/assets/asset_folder.yaml | 36 +-- internal/assets/component.yaml | 64 +++--- internal/assets/component_group.yaml | 34 +-- internal/assets/space_role.yaml | 46 ++-- internal/component_model.go | 315 ++++++++++++++++----------- internal/component_resource.go | 86 ++++++++ internal/component_resource_test.go | 68 ++++++ internal/utils/types.go | 13 ++ 10 files changed, 527 insertions(+), 315 deletions(-) diff --git a/go.mod b/go.mod index 491e573..383b735 100644 --- a/go.mod +++ b/go.mod @@ -1,24 +1,25 @@ module github.com/labd/terraform-provider-storyblok -go 1.22 -toolchain go1.22.5 +go 1.22.7 -// replace github.com/labd/storyblok-go-sdk => ../storyblok-go-sdk +toolchain go1.22.8 + +//replace github.com/labd/storyblok-go-sdk => ../storyblok-go-sdk require ( github.com/davecgh/go-spew v1.1.1 github.com/deepmap/oapi-codegen v1.16.3 - github.com/hashicorp/terraform-plugin-docs v0.19.4 - github.com/hashicorp/terraform-plugin-framework v1.12.0 + github.com/hashicorp/terraform-plugin-docs v0.20.1 + github.com/hashicorp/terraform-plugin-framework v1.13.0 github.com/hashicorp/terraform-plugin-log v0.9.0 - github.com/labd/storyblok-go-sdk v0.6.0 + github.com/labd/storyblok-go-sdk v0.7.0 github.com/wk8/go-ordered-map/v2 v2.1.8 ) require ( github.com/Masterminds/goutils v1.1.1 // indirect - github.com/Masterminds/semver/v3 v3.2.1 // indirect - github.com/Masterminds/sprig/v3 v3.2.3 // indirect + github.com/Masterminds/semver/v3 v3.3.0 // indirect + github.com/Masterminds/sprig/v3 v3.3.0 // indirect github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect github.com/armon/go-radix v1.0.0 // indirect github.com/bahlo/generic-list-go v0.2.0 // indirect @@ -34,20 +35,19 @@ require ( github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-plugin v1.6.1 // indirect + github.com/hashicorp/go-plugin v1.6.2 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.7.0 // indirect - github.com/hashicorp/hc-install v0.7.0 // indirect + github.com/hashicorp/hc-install v0.9.0 // indirect github.com/hashicorp/terraform-exec v0.21.0 // indirect - github.com/hashicorp/terraform-json v0.22.1 // indirect + github.com/hashicorp/terraform-json v0.23.0 // indirect github.com/hashicorp/terraform-plugin-framework-validators v0.13.0 - github.com/hashicorp/terraform-plugin-go v0.24.0 + github.com/hashicorp/terraform-plugin-go v0.25.0 github.com/hashicorp/terraform-registry-address v0.2.3 // indirect github.com/hashicorp/terraform-svchost v0.1.1 // indirect github.com/hashicorp/yamux v0.1.1 // indirect - github.com/huandu/xstrings v1.4.0 // indirect - github.com/imdario/mergo v0.3.16 // indirect - github.com/mailru/easyjson v0.7.7 // indirect + github.com/huandu/xstrings v1.5.0 // indirect + github.com/mailru/easyjson v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect @@ -56,16 +56,16 @@ require ( github.com/oklog/run v1.1.0 // indirect github.com/posener/complete v1.2.3 // indirect github.com/shopspring/decimal v1.4.0 // indirect - github.com/spf13/cast v1.6.0 // indirect - github.com/zclconf/go-cty v1.14.4 // indirect - golang.org/x/crypto v0.24.0 // indirect + github.com/spf13/cast v1.7.0 // indirect + github.com/zclconf/go-cty v1.15.0 // indirect + golang.org/x/crypto v0.26.0 // indirect golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect - golang.org/x/mod v0.18.0 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect - google.golang.org/grpc v1.66.2 // indirect - google.golang.org/protobuf v1.34.2 // indirect + golang.org/x/mod v0.21.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/text v0.20.0 // indirect + google.golang.org/grpc v1.67.1 // indirect + google.golang.org/protobuf v1.35.1 // indirect ) require ( @@ -76,12 +76,13 @@ require ( ) require ( + dario.cat/mergo v1.0.1 // indirect github.com/BurntSushi/toml v1.3.2 // indirect github.com/Kunde21/markdownfmt/v3 v3.1.0 // indirect github.com/ProtonMail/go-crypto v1.1.0-alpha.2-proton // indirect github.com/agext/levenshtein v1.2.2 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect - github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect + github.com/bmatcuk/doublestar/v4 v4.7.1 // indirect github.com/cloudflare/circl v1.3.8 // indirect github.com/go-test/deep v1.0.8 // indirect github.com/google/go-cmp v0.6.0 // indirect @@ -98,13 +99,13 @@ require ( github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect - github.com/yuin/goldmark v1.7.1 // indirect + github.com/yuin/goldmark v1.7.7 // indirect github.com/yuin/goldmark-meta v1.1.0 // indirect go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect - golang.org/x/sync v0.7.0 // indirect + golang.org/x/sync v0.9.0 // indirect golang.org/x/tools v0.22.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index f3eae5f..44c294e 100644 --- a/go.sum +++ b/go.sum @@ -1,16 +1,15 @@ -dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= -dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= +dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/Kunde21/markdownfmt/v3 v3.1.0 h1:KiZu9LKs+wFFBQKhrZJrFZwtLnCCWJahL+S+E/3VnM0= github.com/Kunde21/markdownfmt/v3 v3.1.0/go.mod h1:tPXN1RTyOzJwhfHoon9wUr4HGYmWgVxSQN6VBJDkrVc= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= -github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= -github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= -github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= -github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= +github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= +github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe3tPhs= +github.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/ProtonMail/go-crypto v1.1.0-alpha.2-proton h1:HKz85FwoXx86kVtTvFke7rgHvq/HoloSUvW5semjFWs= @@ -30,8 +29,8 @@ github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xW github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= -github.com/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I= -github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= +github.com/bmatcuk/doublestar/v4 v4.7.1 h1:fdDeAqgT47acgwd9bd9HxJRDmc9UAmPpc+2m0CXv75Q= +github.com/bmatcuk/doublestar/v4 v4.7.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= @@ -75,7 +74,6 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hashicorp/cli v1.1.6 h1:CMOV+/LJfL1tXCOKrgAX0uRKnzjj/mpmqNXloRSy2K8= @@ -95,8 +93,8 @@ github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVH github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-plugin v1.6.1 h1:P7MR2UP6gNKGPp+y7EZw2kOiq4IR9WiqLvp0XOsVdwI= -github.com/hashicorp/go-plugin v1.6.1/go.mod h1:XPHFku2tFo3o3QKFgSYo+cghcUhw1NA1hZyMK0PWAw0= +github.com/hashicorp/go-plugin v1.6.2 h1:zdGAEd0V1lCaU0u+MxWQhtSDQmahpkwOun8U8EiRVog= +github.com/hashicorp/go-plugin v1.6.2/go.mod h1:CkgLQ5CZqNmdL9U9JzM532t8ZiYQ35+pj3b1FD37R0Q= github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU= github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= @@ -104,24 +102,24 @@ github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/C github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/hc-install v0.7.0 h1:Uu9edVqjKQxxuD28mR5TikkKDd/p55S8vzPC1659aBk= -github.com/hashicorp/hc-install v0.7.0/go.mod h1:ELmmzZlGnEcqoUMKUuykHaPCIR1sYLYX+KSggWSKZuA= +github.com/hashicorp/hc-install v0.9.0 h1:2dIk8LcvANwtv3QZLckxcjyF5w8KVtiMxu6G6eLhghE= +github.com/hashicorp/hc-install v0.9.0/go.mod h1:+6vOP+mf3tuGgMApVYtmsnDoKWMDcFXeTxCACYZ8SFg= github.com/hashicorp/hcl/v2 v2.20.1 h1:M6hgdyz7HYt1UN9e61j+qKJBqR3orTWbI1HKBJEdxtc= github.com/hashicorp/hcl/v2 v2.20.1/go.mod h1:TZDqQ4kNKCbh1iJp99FdPiUaVDDUPivbqxZulxDYqL4= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/terraform-exec v0.21.0 h1:uNkLAe95ey5Uux6KJdua6+cv8asgILFVWkd/RG0D2XQ= github.com/hashicorp/terraform-exec v0.21.0/go.mod h1:1PPeMYou+KDUSSeRE9szMZ/oHf4fYUmB923Wzbq1ICg= -github.com/hashicorp/terraform-json v0.22.1 h1:xft84GZR0QzjPVWs4lRUwvTcPnegqlyS7orfb5Ltvec= -github.com/hashicorp/terraform-json v0.22.1/go.mod h1:JbWSQCLFSXFFhg42T7l9iJwdGXBYV8fmmD6o/ML4p3A= -github.com/hashicorp/terraform-plugin-docs v0.19.4 h1:G3Bgo7J22OMtegIgn8Cd/CaSeyEljqjH3G39w28JK4c= -github.com/hashicorp/terraform-plugin-docs v0.19.4/go.mod h1:4pLASsatTmRynVzsjEhbXZ6s7xBlUw/2Kt0zfrq8HxA= -github.com/hashicorp/terraform-plugin-framework v1.12.0 h1:7HKaueHPaikX5/7cbC1r9d1m12iYHY+FlNZEGxQ42CQ= -github.com/hashicorp/terraform-plugin-framework v1.12.0/go.mod h1:N/IOQ2uYjW60Jp39Cp3mw7I/OpC/GfZ0385R0YibmkE= +github.com/hashicorp/terraform-json v0.23.0 h1:sniCkExU4iKtTADReHzACkk8fnpQXrdD2xoR+lppBkI= +github.com/hashicorp/terraform-json v0.23.0/go.mod h1:MHdXbBAbSg0GvzuWazEGKAn/cyNfIB7mN6y7KJN6y2c= +github.com/hashicorp/terraform-plugin-docs v0.20.1 h1:Fq7E/HrU8kuZu3hNliZGwloFWSYfWEOWnylFhYQIoys= +github.com/hashicorp/terraform-plugin-docs v0.20.1/go.mod h1:Yz6HoK7/EgzSrHPB9J/lWFzwl9/xep2OPnc5jaJDV90= +github.com/hashicorp/terraform-plugin-framework v1.13.0 h1:8OTG4+oZUfKgnfTdPTJwZ532Bh2BobF4H+yBiYJ/scw= +github.com/hashicorp/terraform-plugin-framework v1.13.0/go.mod h1:j64rwMGpgM3NYXTKuxrCnyubQb/4VKldEKlcG8cvmjU= github.com/hashicorp/terraform-plugin-framework-validators v0.13.0 h1:bxZfGo9DIUoLLtHMElsu+zwqI4IsMZQBRRy4iLzZJ8E= github.com/hashicorp/terraform-plugin-framework-validators v0.13.0/go.mod h1:wGeI02gEhj9nPANU62F2jCaHjXulejm/X+af4PdZaNo= -github.com/hashicorp/terraform-plugin-go v0.24.0 h1:2WpHhginCdVhFIrWHxDEg6RBn3YaWzR2o6qUeIEat2U= -github.com/hashicorp/terraform-plugin-go v0.24.0/go.mod h1:tUQ53lAsOyYSckFGEefGC5C8BAaO0ENqzFd3bQeuYQg= +github.com/hashicorp/terraform-plugin-go v0.25.0 h1:oi13cx7xXA6QciMcpcFi/rwA974rdTxjqEhXJjbAyks= +github.com/hashicorp/terraform-plugin-go v0.25.0/go.mod h1:+SYagMYadJP86Kvn+TGeV+ofr/R3g4/If0O5sO96MVw= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 h1:kJiWGx2kiQVo97Y5IOGR4EMcZ8DtMswHhUuFibsCQQE= @@ -132,17 +130,12 @@ github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc= github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= -github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= -github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= -github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= +github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= +github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= @@ -154,10 +147,10 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labd/storyblok-go-sdk v0.6.0 h1:yM6wVTn2/OqyjlnaVUJKVnnI+vSu5isjap9zIP/eWKM= -github.com/labd/storyblok-go-sdk v0.6.0/go.mod h1:79Zb12MZIzs2qF0FLZKLLGC8ijubZLn3/VaK76XdvWs= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/labd/storyblok-go-sdk v0.7.0 h1:9cMlusLdP5XBFUiWRXSj14FLVZuZYoCW+UCqfuc5NgE= +github.com/labd/storyblok-go-sdk v0.7.0/go.mod h1:dD6+mKqbYFbmfEshxG6s6Q7+cuiE42P92qT36kor9NA= +github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4= +github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -169,7 +162,6 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= @@ -178,7 +170,6 @@ github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9 github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro= @@ -194,24 +185,20 @@ github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSg github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= -github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= github.com/skeema/knownhosts v1.2.2 h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A= github.com/skeema/knownhosts v1.2.2/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= -github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w= +github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= @@ -227,38 +214,36 @@ github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+x github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yuin/goldmark v1.7.1 h1:3bajkSilaCbjdKVsKdZjZCLBNPL9pYzrCakKaf4U49U= -github.com/yuin/goldmark v1.7.1/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= +github.com/yuin/goldmark v1.7.7 h1:5m9rrB1sW3JUMToKFQfb+FGt1U7r57IHu5GrYrG2nqU= +github.com/yuin/goldmark v1.7.7/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= github.com/yuin/goldmark-meta v1.1.0 h1:pWw+JLHGZe8Rk0EGsMVssiNb/AaPMHfSRszZeUeiOUc= github.com/yuin/goldmark-meta v1.1.0/go.mod h1:U4spWENafuA7Zyg+Lj5RqK/MF+ovMYtBvXi1lBb2VP0= -github.com/zclconf/go-cty v1.14.4 h1:uXXczd9QDGsgu0i/QFR/hzI5NYCHLf6NQw/atrbnhq8= -github.com/zclconf/go-cty v1.14.4/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= +github.com/zclconf/go-cty v1.15.0 h1:tTCRWxsexYUmtt/wVxgDClUe+uQusuI443uL6e+5sXQ= +github.com/zclconf/go-cty v1.15.0/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b h1:FosyBZYxY34Wul7O/MSKey3txpPYyCqVO5ZyceuQJEI= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= go.abhg.dev/goldmark/frontmatter v0.2.0 h1:P8kPG0YkL12+aYk2yU3xHv4tcXzeVnN+gU0tJ5JnxRw= go.abhg.dev/goldmark/frontmatter v0.2.0/go.mod h1:XqrEkZuM57djk7zrlRUB02x8I5J0px76YjkOzhB4YlU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= -golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -270,21 +255,18 @@ golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= +golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= @@ -295,14 +277,14 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 h1:1GBuWVLM/KMVUv1t1En5Gs+gFZCNd360GGb4sSxtrhU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= -google.golang.org/grpc v1.66.2 h1:3QdXkuq3Bkh7w+ywLdLvM56cmGvQHUMZpiCzt6Rqaoo= -google.golang.org/grpc v1.66.2/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= @@ -312,7 +294,6 @@ gopkg.in/dnaeon/go-vcr.v3 v3.2.0/go.mod h1:2IMOnnlx9I6u9x+YBsM3tAMx6AlOxnJ0pWxQA gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/internal/assets/asset_folder.yaml b/internal/assets/asset_folder.yaml index 9d9ad77..11598d5 100644 --- a/internal/assets/asset_folder.yaml +++ b/internal/assets/asset_folder.yaml @@ -25,13 +25,13 @@ interactions: trailer: {} content_length: 139 uncompressed: false - body: '{"asset_folder":{"id":604728,"name":"asset-folder-name","parent_id":null,"uuid":"3092d6ba-5c74-416b-be9a-f2de95c64cd4","parent_uuid":null}}' + body: '{"asset_folder":{"id":737527,"name":"asset-folder-name","parent_id":null,"uuid":"e4ec739e-9264-48e1-b12e-a33a1e954df7","parent_uuid":null}}' headers: Content-Type: - application/json; charset=utf-8 status: 201 Created code: 201 - duration: 253.17725ms + duration: 150.058596ms - id: 1 request: proto: HTTP/1.1 @@ -46,7 +46,7 @@ interactions: body: "" form: {} headers: {} - url: https://mapi.storyblok.com/v1/spaces/233252/asset_folders/604728 + url: https://mapi.storyblok.com/v1/spaces/233252/asset_folders/737527 method: GET response: proto: HTTP/2.0 @@ -56,13 +56,13 @@ interactions: trailer: {} content_length: 139 uncompressed: false - body: '{"asset_folder":{"id":604728,"name":"asset-folder-name","parent_id":null,"uuid":"3092d6ba-5c74-416b-be9a-f2de95c64cd4","parent_uuid":null}}' + body: '{"asset_folder":{"id":737527,"name":"asset-folder-name","parent_id":null,"uuid":"e4ec739e-9264-48e1-b12e-a33a1e954df7","parent_uuid":null}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 102.269667ms + duration: 54.419947ms - id: 2 request: proto: HTTP/1.1 @@ -77,7 +77,7 @@ interactions: body: "" form: {} headers: {} - url: https://mapi.storyblok.com/v1/spaces/233252/asset_folders/604728 + url: https://mapi.storyblok.com/v1/spaces/233252/asset_folders/737527 method: GET response: proto: HTTP/2.0 @@ -87,13 +87,13 @@ interactions: trailer: {} content_length: 139 uncompressed: false - body: '{"asset_folder":{"id":604728,"name":"asset-folder-name","parent_id":null,"uuid":"3092d6ba-5c74-416b-be9a-f2de95c64cd4","parent_uuid":null}}' + body: '{"asset_folder":{"id":737527,"name":"asset-folder-name","parent_id":null,"uuid":"e4ec739e-9264-48e1-b12e-a33a1e954df7","parent_uuid":null}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 107.813083ms + duration: 44.634113ms - id: 3 request: proto: HTTP/1.1 @@ -108,7 +108,7 @@ interactions: body: '{"asset_folder":{"name":"new-asset-folder-name"}}' form: {} headers: {} - url: https://mapi.storyblok.com/v1/spaces/233252/asset_folders/604728 + url: https://mapi.storyblok.com/v1/spaces/233252/asset_folders/737527 method: PUT response: proto: HTTP/2.0 @@ -122,7 +122,7 @@ interactions: headers: {} status: 204 No Content code: 204 - duration: 152.376458ms + duration: 60.67675ms - id: 4 request: proto: HTTP/1.1 @@ -137,7 +137,7 @@ interactions: body: "" form: {} headers: {} - url: https://mapi.storyblok.com/v1/spaces/233252/asset_folders/604728 + url: https://mapi.storyblok.com/v1/spaces/233252/asset_folders/737527 method: GET response: proto: HTTP/2.0 @@ -147,13 +147,13 @@ interactions: trailer: {} content_length: 143 uncompressed: false - body: '{"asset_folder":{"id":604728,"name":"new-asset-folder-name","parent_id":null,"uuid":"3092d6ba-5c74-416b-be9a-f2de95c64cd4","parent_uuid":null}}' + body: '{"asset_folder":{"id":737527,"name":"new-asset-folder-name","parent_id":null,"uuid":"e4ec739e-9264-48e1-b12e-a33a1e954df7","parent_uuid":null}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 86.802167ms + duration: 48.213137ms - id: 5 request: proto: HTTP/1.1 @@ -168,7 +168,7 @@ interactions: body: "" form: {} headers: {} - url: https://mapi.storyblok.com/v1/spaces/233252/asset_folders/604728 + url: https://mapi.storyblok.com/v1/spaces/233252/asset_folders/737527 method: GET response: proto: HTTP/2.0 @@ -178,13 +178,13 @@ interactions: trailer: {} content_length: 143 uncompressed: false - body: '{"asset_folder":{"id":604728,"name":"new-asset-folder-name","parent_id":null,"uuid":"3092d6ba-5c74-416b-be9a-f2de95c64cd4","parent_uuid":null}}' + body: '{"asset_folder":{"id":737527,"name":"new-asset-folder-name","parent_id":null,"uuid":"e4ec739e-9264-48e1-b12e-a33a1e954df7","parent_uuid":null}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 80.509792ms + duration: 51.631658ms - id: 6 request: proto: HTTP/1.1 @@ -199,7 +199,7 @@ interactions: body: "" form: {} headers: {} - url: https://mapi.storyblok.com/v1/spaces/233252/asset_folders/604728 + url: https://mapi.storyblok.com/v1/spaces/233252/asset_folders/737527 method: DELETE response: proto: HTTP/2.0 @@ -213,4 +213,4 @@ interactions: headers: {} status: 204 No Content code: 204 - duration: 240.006791ms + duration: 216.9569ms diff --git a/internal/assets/component.yaml b/internal/assets/component.yaml index cfa6381..61ff9e3 100644 --- a/internal/assets/component.yaml +++ b/internal/assets/component.yaml @@ -6,13 +6,13 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 447 + content_length: 815 transfer_encoding: [] trailer: {} host: mapi.storyblok.com remote_addr: "" request_uri: "" - body: '{"component":{"is_nestable":false,"is_root":false,"name":"test-banner","preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","schema":{"title":{"pos":1,"type":"text"},"intro":{"pos":2,"type":"text"},"image":{"conditional_settings":[{"modifications":[{"required":true}],"rule_conditions":[{"validated_object":{"field_attr":"value","field_key":"intro","type":"field"},"validation":"empty","value":"empty"}],"rule_match":"all"}],"pos":3,"type":"image"}}}}' + body: '{"component":{"is_nestable":false,"is_root":false,"name":"test-banner","preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","schema":{"title":{"pos":1,"type":"text"},"intro":{"pos":2,"type":"text"},"image":{"conditional_settings":[{"modifications":[{"required":true}],"rule_conditions":[{"validated_object":{"field_attr":"value","field_key":"intro","type":"field"},"validation":"empty","value":"empty"}],"rule_match":"all"}],"pos":3,"type":"image"},"link":{"allow_advanced_search":true,"allow_custom_attributes":true,"allow_external_url":true,"allow_target_blank":true,"asset_link_type":true,"description":"Link to a page","email_link_type":true,"force_link_scope":true,"link_scope":"{0}","pos":3,"required":true,"restrict_content_types":true,"show_anchor":true,"tooltip":true,"translatable":true,"type":"multilink"}}}}' form: {} headers: {} url: https://mapi.storyblok.com/v1/spaces/233252/components/ @@ -23,15 +23,15 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 787 + content_length: 1294 uncompressed: false - body: '{"component":{"name":"test-banner","display_name":null,"created_at":"2024-07-11T14:25:04.047Z","updated_at":"2024-07-11T14:25:04.047Z","id":6038934,"schema":{"title":{"pos":1,"type":"text"},"intro":{"pos":2,"type":"text"},"image":{"conditional_settings":[{"modifications":[{"required":true}],"rule_conditions":[{"validated_object":{"field_attr":"value","field_key":"intro","type":"field"},"validation":"empty","value":"empty"}],"rule_match":"all"}],"pos":3,"type":"image"}},"image":null,"preview_field":null,"is_root":false,"preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","is_nestable":false,"all_presets":[],"preset_id":null,"real_name":"test-banner","component_group_uuid":null,"color":null,"icon":null,"internal_tags_list":[],"internal_tag_ids":[],"content_type_asset_preview":null}}' + body: '{"component":{"name":"test-banner","display_name":null,"description":null,"created_at":"2025-02-14T13:37:01.681Z","updated_at":"2025-02-14T13:37:01.681Z","id":6958547,"schema":{"title":{"pos":1,"type":"text","id":"MFX5ckDVRU6AJuKyN5Kq8A"},"intro":{"pos":2,"type":"text","id":"VWKzupWfRv6c3FLQA_j6Gw"},"image":{"conditional_settings":[{"modifications":[{"required":true}],"rule_conditions":[{"validated_object":{"field_attr":"value","field_key":"intro","type":"field"},"validation":"empty","value":"empty"}],"rule_match":"all"}],"pos":3,"type":"image","id":"UlfObGy7QA6bHnSk1u_q0Q"},"link":{"allow_advanced_search":true,"allow_custom_attributes":true,"allow_external_url":true,"allow_target_blank":true,"asset_link_type":true,"description":"Link to a page","email_link_type":true,"force_link_scope":true,"link_scope":"{0}","pos":3,"required":true,"restrict_content_types":true,"show_anchor":true,"tooltip":true,"translatable":true,"type":"multilink","id":"8ZC-thOfSnm2gn9OU4eHtA"}},"image":null,"preview_field":null,"is_root":false,"preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","is_nestable":false,"all_presets":[],"preset_id":null,"real_name":"test-banner","component_group_uuid":null,"color":null,"icon":null,"internal_tags_list":[],"internal_tag_ids":[],"content_type_asset_preview":null}}' headers: Content-Type: - application/json; charset=utf-8 status: 201 Created code: 201 - duration: 104.29925ms + duration: 72.327572ms - id: 1 request: proto: HTTP/1.1 @@ -46,7 +46,7 @@ interactions: body: "" form: {} headers: {} - url: https://mapi.storyblok.com/v1/spaces/233252/components/6038934 + url: https://mapi.storyblok.com/v1/spaces/233252/components/6958547 method: GET response: proto: HTTP/2.0 @@ -54,15 +54,15 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 787 - uncompressed: false - body: '{"component":{"name":"test-banner","display_name":null,"created_at":"2024-07-11T14:25:04.047Z","updated_at":"2024-07-11T14:25:04.047Z","id":6038934,"schema":{"title":{"pos":1,"type":"text"},"intro":{"pos":2,"type":"text"},"image":{"conditional_settings":[{"modifications":[{"required":true}],"rule_conditions":[{"validated_object":{"field_attr":"value","field_key":"intro","type":"field"},"validation":"empty","value":"empty"}],"rule_match":"all"}],"pos":3,"type":"image"}},"image":null,"preview_field":null,"is_root":false,"preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","is_nestable":false,"all_presets":[],"preset_id":null,"real_name":"test-banner","component_group_uuid":null,"color":null,"icon":null,"internal_tags_list":[],"internal_tag_ids":[],"content_type_asset_preview":null}}' + content_length: -1 + uncompressed: true + body: '{"component":{"name":"test-banner","display_name":null,"description":null,"created_at":"2025-02-14T13:37:01.681Z","updated_at":"2025-02-14T13:37:01.681Z","id":6958547,"schema":{"title":{"pos":1,"type":"text","id":"MFX5ckDVRU6AJuKyN5Kq8A"},"intro":{"pos":2,"type":"text","id":"VWKzupWfRv6c3FLQA_j6Gw"},"image":{"conditional_settings":[{"modifications":[{"required":true}],"rule_conditions":[{"validated_object":{"field_attr":"value","field_key":"intro","type":"field"},"validation":"empty","value":"empty"}],"rule_match":"all"}],"pos":3,"type":"image","id":"UlfObGy7QA6bHnSk1u_q0Q"},"link":{"allow_advanced_search":true,"allow_custom_attributes":true,"allow_external_url":true,"allow_target_blank":true,"asset_link_type":true,"description":"Link to a page","email_link_type":true,"force_link_scope":true,"link_scope":"{0}","pos":3,"required":true,"restrict_content_types":true,"show_anchor":true,"tooltip":true,"translatable":true,"type":"multilink","id":"8ZC-thOfSnm2gn9OU4eHtA"}},"image":null,"preview_field":null,"is_root":false,"preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","is_nestable":false,"all_presets":[],"preset_id":null,"real_name":"test-banner","component_group_uuid":null,"color":null,"icon":null,"internal_tags_list":[],"internal_tag_ids":[],"content_type_asset_preview":null}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 77.601416ms + duration: 43.070826ms - id: 2 request: proto: HTTP/1.1 @@ -77,7 +77,7 @@ interactions: body: "" form: {} headers: {} - url: https://mapi.storyblok.com/v1/spaces/233252/components/6038934 + url: https://mapi.storyblok.com/v1/spaces/233252/components/6958547 method: GET response: proto: HTTP/2.0 @@ -85,30 +85,30 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 787 - uncompressed: false - body: '{"component":{"name":"test-banner","display_name":null,"created_at":"2024-07-11T14:25:04.047Z","updated_at":"2024-07-11T14:25:04.047Z","id":6038934,"schema":{"title":{"pos":1,"type":"text"},"intro":{"pos":2,"type":"text"},"image":{"conditional_settings":[{"modifications":[{"required":true}],"rule_conditions":[{"validated_object":{"field_attr":"value","field_key":"intro","type":"field"},"validation":"empty","value":"empty"}],"rule_match":"all"}],"pos":3,"type":"image"}},"image":null,"preview_field":null,"is_root":false,"preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","is_nestable":false,"all_presets":[],"preset_id":null,"real_name":"test-banner","component_group_uuid":null,"color":null,"icon":null,"internal_tags_list":[],"internal_tag_ids":[],"content_type_asset_preview":null}}' + content_length: -1 + uncompressed: true + body: '{"component":{"name":"test-banner","display_name":null,"description":null,"created_at":"2025-02-14T13:37:01.681Z","updated_at":"2025-02-14T13:37:01.681Z","id":6958547,"schema":{"title":{"pos":1,"type":"text","id":"MFX5ckDVRU6AJuKyN5Kq8A"},"intro":{"pos":2,"type":"text","id":"VWKzupWfRv6c3FLQA_j6Gw"},"image":{"conditional_settings":[{"modifications":[{"required":true}],"rule_conditions":[{"validated_object":{"field_attr":"value","field_key":"intro","type":"field"},"validation":"empty","value":"empty"}],"rule_match":"all"}],"pos":3,"type":"image","id":"UlfObGy7QA6bHnSk1u_q0Q"},"link":{"allow_advanced_search":true,"allow_custom_attributes":true,"allow_external_url":true,"allow_target_blank":true,"asset_link_type":true,"description":"Link to a page","email_link_type":true,"force_link_scope":true,"link_scope":"{0}","pos":3,"required":true,"restrict_content_types":true,"show_anchor":true,"tooltip":true,"translatable":true,"type":"multilink","id":"8ZC-thOfSnm2gn9OU4eHtA"}},"image":null,"preview_field":null,"is_root":false,"preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","is_nestable":false,"all_presets":[],"preset_id":null,"real_name":"test-banner","component_group_uuid":null,"color":null,"icon":null,"internal_tags_list":[],"internal_tag_ids":[],"content_type_asset_preview":null}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 78.886416ms + duration: 45.299745ms - id: 3 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 298 + content_length: 674 transfer_encoding: [] trailer: {} host: mapi.storyblok.com remote_addr: "" request_uri: "" - body: '{"component":{"is_nestable":false,"is_root":false,"name":"new-test-banner","preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","schema":{"intro":{"pos":1,"type":"text"},"title":{"pos":2,"type":"text"},"buttons":{"filter_content_type":["button"],"pos":3,"source":"internal_stories","type":"options"}}}}' + body: '{"component":{"is_nestable":false,"is_root":false,"name":"new-test-banner","preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","schema":{"intro":{"pos":1,"type":"text"},"link":{"allow_advanced_search":false,"allow_custom_attributes":false,"allow_external_url":false,"allow_target_blank":false,"asset_link_type":false,"description":"Other link","email_link_type":false,"force_link_scope":false,"link_scope":"{0}","pos":1,"required":false,"restrict_content_types":false,"show_anchor":false,"tooltip":false,"translatable":false,"type":"multilink"},"title":{"pos":2,"type":"text"},"buttons":{"filter_content_type":["button"],"pos":3,"source":"internal_stories","type":"options"}}}}' form: {} headers: {} - url: https://mapi.storyblok.com/v1/spaces/233252/components/6038934 + url: https://mapi.storyblok.com/v1/spaces/233252/components/6958547 method: PUT response: proto: HTTP/2.0 @@ -116,15 +116,15 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 642 - uncompressed: false - body: '{"component":{"name":"new-test-banner","display_name":null,"created_at":"2024-07-11T14:25:04.047Z","updated_at":"2024-07-11T14:25:04.914Z","id":6038934,"schema":{"intro":{"pos":1,"type":"text"},"title":{"pos":2,"type":"text"},"buttons":{"filter_content_type":["button"],"pos":3,"source":"internal_stories","type":"options"}},"image":null,"preview_field":null,"is_root":false,"preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","is_nestable":false,"all_presets":[],"preset_id":null,"real_name":"new-test-banner","component_group_uuid":null,"color":null,"icon":null,"internal_tags_list":[],"internal_tag_ids":[],"content_type_asset_preview":null}}' + content_length: -1 + uncompressed: true + body: '{"component":{"name":"new-test-banner","display_name":null,"description":null,"created_at":"2025-02-14T13:37:01.681Z","updated_at":"2025-02-14T13:37:03.443Z","id":6958547,"schema":{"intro":{"pos":1,"type":"text","id":"VWKzupWfRv6c3FLQA_j6Gw"},"link":{"allow_advanced_search":false,"allow_custom_attributes":false,"allow_external_url":false,"allow_target_blank":false,"asset_link_type":false,"description":"Other link","email_link_type":false,"force_link_scope":false,"link_scope":"{0}","pos":1,"required":false,"restrict_content_types":false,"show_anchor":false,"tooltip":false,"translatable":false,"type":"multilink","id":"8ZC-thOfSnm2gn9OU4eHtA"},"title":{"pos":2,"type":"text","id":"MFX5ckDVRU6AJuKyN5Kq8A"},"buttons":{"filter_content_type":["button"],"pos":3,"source":"internal_stories","type":"options","id":"DlMZE_qXQf-uid0KNyJQ9g"}},"image":null,"preview_field":null,"is_root":false,"preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","is_nestable":false,"all_presets":[],"preset_id":null,"real_name":"new-test-banner","component_group_uuid":null,"color":null,"icon":null,"internal_tags_list":[],"internal_tag_ids":[],"content_type_asset_preview":null}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 115.851583ms + duration: 79.740843ms - id: 4 request: proto: HTTP/1.1 @@ -139,7 +139,7 @@ interactions: body: "" form: {} headers: {} - url: https://mapi.storyblok.com/v1/spaces/233252/components/6038934 + url: https://mapi.storyblok.com/v1/spaces/233252/components/6958547 method: GET response: proto: HTTP/2.0 @@ -147,15 +147,15 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 642 - uncompressed: false - body: '{"component":{"name":"new-test-banner","display_name":null,"created_at":"2024-07-11T14:25:04.047Z","updated_at":"2024-07-11T14:25:04.914Z","id":6038934,"schema":{"intro":{"pos":1,"type":"text"},"title":{"pos":2,"type":"text"},"buttons":{"filter_content_type":["button"],"pos":3,"source":"internal_stories","type":"options"}},"image":null,"preview_field":null,"is_root":false,"preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","is_nestable":false,"all_presets":[],"preset_id":null,"real_name":"new-test-banner","component_group_uuid":null,"color":null,"icon":null,"internal_tags_list":[],"internal_tag_ids":[],"content_type_asset_preview":null}}' + content_length: -1 + uncompressed: true + body: '{"component":{"name":"new-test-banner","display_name":null,"description":null,"created_at":"2025-02-14T13:37:01.681Z","updated_at":"2025-02-14T13:37:03.443Z","id":6958547,"schema":{"intro":{"pos":1,"type":"text","id":"VWKzupWfRv6c3FLQA_j6Gw"},"link":{"allow_advanced_search":false,"allow_custom_attributes":false,"allow_external_url":false,"allow_target_blank":false,"asset_link_type":false,"description":"Other link","email_link_type":false,"force_link_scope":false,"link_scope":"{0}","pos":1,"required":false,"restrict_content_types":false,"show_anchor":false,"tooltip":false,"translatable":false,"type":"multilink","id":"8ZC-thOfSnm2gn9OU4eHtA"},"title":{"pos":2,"type":"text","id":"MFX5ckDVRU6AJuKyN5Kq8A"},"buttons":{"filter_content_type":["button"],"pos":3,"source":"internal_stories","type":"options","id":"DlMZE_qXQf-uid0KNyJQ9g"}},"image":null,"preview_field":null,"is_root":false,"preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","is_nestable":false,"all_presets":[],"preset_id":null,"real_name":"new-test-banner","component_group_uuid":null,"color":null,"icon":null,"internal_tags_list":[],"internal_tag_ids":[],"content_type_asset_preview":null}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 82.617166ms + duration: 49.602716ms - id: 5 request: proto: HTTP/1.1 @@ -170,7 +170,7 @@ interactions: body: "" form: {} headers: {} - url: https://mapi.storyblok.com/v1/spaces/233252/components/6038934 + url: https://mapi.storyblok.com/v1/spaces/233252/components/6958547 method: DELETE response: proto: HTTP/2.0 @@ -178,12 +178,12 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 642 - uncompressed: false - body: '{"component":{"name":"new-test-banner","display_name":null,"created_at":"2024-07-11T14:25:04.047Z","updated_at":"2024-07-11T14:25:04.914Z","id":6038934,"schema":{"intro":{"pos":1,"type":"text"},"title":{"pos":2,"type":"text"},"buttons":{"filter_content_type":["button"],"pos":3,"source":"internal_stories","type":"options"}},"image":null,"preview_field":null,"is_root":false,"preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","is_nestable":false,"all_presets":[],"preset_id":null,"real_name":"new-test-banner","component_group_uuid":null,"color":null,"icon":null,"internal_tags_list":[],"internal_tag_ids":[],"content_type_asset_preview":null}}' + content_length: -1 + uncompressed: true + body: '{"component":{"name":"new-test-banner","display_name":null,"description":null,"created_at":"2025-02-14T13:37:01.681Z","updated_at":"2025-02-14T13:37:03.443Z","id":6958547,"schema":{"intro":{"pos":1,"type":"text","id":"VWKzupWfRv6c3FLQA_j6Gw"},"link":{"allow_advanced_search":false,"allow_custom_attributes":false,"allow_external_url":false,"allow_target_blank":false,"asset_link_type":false,"description":"Other link","email_link_type":false,"force_link_scope":false,"link_scope":"{0}","pos":1,"required":false,"restrict_content_types":false,"show_anchor":false,"tooltip":false,"translatable":false,"type":"multilink","id":"8ZC-thOfSnm2gn9OU4eHtA"},"title":{"pos":2,"type":"text","id":"MFX5ckDVRU6AJuKyN5Kq8A"},"buttons":{"filter_content_type":["button"],"pos":3,"source":"internal_stories","type":"options","id":"DlMZE_qXQf-uid0KNyJQ9g"}},"image":null,"preview_field":null,"is_root":false,"preview_tmpl":"\u003cdiv\u003e\u003c/div\u003e","is_nestable":false,"all_presets":[],"preset_id":null,"real_name":"new-test-banner","component_group_uuid":null,"color":null,"icon":null,"internal_tags_list":[],"internal_tag_ids":[],"content_type_asset_preview":null}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 146.879375ms + duration: 473.311632ms diff --git a/internal/assets/component_group.yaml b/internal/assets/component_group.yaml index 740a6fa..51679e4 100644 --- a/internal/assets/component_group.yaml +++ b/internal/assets/component_group.yaml @@ -25,13 +25,13 @@ interactions: trailer: {} content_length: 145 uncompressed: false - body: '{"component_group":{"name":"test-component-group","id":368529,"uuid":"7a856dbd-c9f8-46cc-8f1a-ff5a1e97085b","parent_id":null,"parent_uuid":null}}' + body: '{"component_group":{"name":"test-component-group","id":502185,"uuid":"b138fd41-a107-461b-92ed-9d881dbb37b0","parent_id":null,"parent_uuid":null}}' headers: Content-Type: - application/json; charset=utf-8 status: 201 Created code: 201 - duration: 101.948459ms + duration: 55.271292ms - id: 1 request: proto: HTTP/1.1 @@ -46,7 +46,7 @@ interactions: body: "" form: {} headers: {} - url: https://mapi.storyblok.com/v1/spaces/233252/component_groups/368529 + url: https://mapi.storyblok.com/v1/spaces/233252/component_groups/502185 method: GET response: proto: HTTP/2.0 @@ -56,13 +56,13 @@ interactions: trailer: {} content_length: 145 uncompressed: false - body: '{"component_group":{"name":"test-component-group","id":368529,"uuid":"7a856dbd-c9f8-46cc-8f1a-ff5a1e97085b","parent_id":null,"parent_uuid":null}}' + body: '{"component_group":{"name":"test-component-group","id":502185,"uuid":"b138fd41-a107-461b-92ed-9d881dbb37b0","parent_id":null,"parent_uuid":null}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 236.725792ms + duration: 37.508017ms - id: 2 request: proto: HTTP/1.1 @@ -77,7 +77,7 @@ interactions: body: "" form: {} headers: {} - url: https://mapi.storyblok.com/v1/spaces/233252/component_groups/368529 + url: https://mapi.storyblok.com/v1/spaces/233252/component_groups/502185 method: GET response: proto: HTTP/2.0 @@ -87,13 +87,13 @@ interactions: trailer: {} content_length: 145 uncompressed: false - body: '{"component_group":{"name":"test-component-group","id":368529,"uuid":"7a856dbd-c9f8-46cc-8f1a-ff5a1e97085b","parent_id":null,"parent_uuid":null}}' + body: '{"component_group":{"name":"test-component-group","id":502185,"uuid":"b138fd41-a107-461b-92ed-9d881dbb37b0","parent_id":null,"parent_uuid":null}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 82.279125ms + duration: 41.228477ms - id: 3 request: proto: HTTP/1.1 @@ -108,7 +108,7 @@ interactions: body: '{"component_group":{"name":"new-test-component-group"}}' form: {} headers: {} - url: https://mapi.storyblok.com/v1/spaces/233252/component_groups/368529 + url: https://mapi.storyblok.com/v1/spaces/233252/component_groups/502185 method: PUT response: proto: HTTP/2.0 @@ -118,13 +118,13 @@ interactions: trailer: {} content_length: 149 uncompressed: false - body: '{"component_group":{"name":"new-test-component-group","id":368529,"uuid":"7a856dbd-c9f8-46cc-8f1a-ff5a1e97085b","parent_id":null,"parent_uuid":null}}' + body: '{"component_group":{"name":"new-test-component-group","id":502185,"uuid":"b138fd41-a107-461b-92ed-9d881dbb37b0","parent_id":null,"parent_uuid":null}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 142.881417ms + duration: 69.490022ms - id: 4 request: proto: HTTP/1.1 @@ -139,7 +139,7 @@ interactions: body: "" form: {} headers: {} - url: https://mapi.storyblok.com/v1/spaces/233252/component_groups/368529 + url: https://mapi.storyblok.com/v1/spaces/233252/component_groups/502185 method: GET response: proto: HTTP/2.0 @@ -149,13 +149,13 @@ interactions: trailer: {} content_length: 149 uncompressed: false - body: '{"component_group":{"name":"new-test-component-group","id":368529,"uuid":"7a856dbd-c9f8-46cc-8f1a-ff5a1e97085b","parent_id":null,"parent_uuid":null}}' + body: '{"component_group":{"name":"new-test-component-group","id":502185,"uuid":"b138fd41-a107-461b-92ed-9d881dbb37b0","parent_id":null,"parent_uuid":null}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 84.502167ms + duration: 43.881682ms - id: 5 request: proto: HTTP/1.1 @@ -170,7 +170,7 @@ interactions: body: "" form: {} headers: {} - url: https://mapi.storyblok.com/v1/spaces/233252/component_groups/368529 + url: https://mapi.storyblok.com/v1/spaces/233252/component_groups/502185 method: DELETE response: proto: HTTP/2.0 @@ -180,10 +180,10 @@ interactions: trailer: {} content_length: 149 uncompressed: false - body: '{"component_group":{"name":"new-test-component-group","id":368529,"uuid":"7a856dbd-c9f8-46cc-8f1a-ff5a1e97085b","parent_id":null,"parent_uuid":null}}' + body: '{"component_group":{"name":"new-test-component-group","id":502185,"uuid":"b138fd41-a107-461b-92ed-9d881dbb37b0","parent_id":null,"parent_uuid":null}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 1.86876175s + duration: 2.207354296s diff --git a/internal/assets/space_role.yaml b/internal/assets/space_role.yaml index 259056e..5090778 100644 --- a/internal/assets/space_role.yaml +++ b/internal/assets/space_role.yaml @@ -23,15 +23,15 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 359 + content_length: 571 uncompressed: false - body: '{"space_role":{"id":67553,"resolved_allowed_paths":[],"allowed_paths":["1"],"field_permissions":["component_name.field_name"],"readonly_field_permissions":[],"permissions":["access_tasks"],"role":"tester","subtitle":"A test group","datasource_ids":[],"component_ids":[],"branch_ids":[],"allowed_languages":["default"],"asset_folder_ids":[],"ext_id":"FizBuz"}}' + body: '{"space_role":{"id":74689,"resolved_allowed_paths":[],"allowed_paths":["1"],"resolved_blocked_paths":null,"blocked_paths":[],"field_permissions":["component_name.field_name"],"allowed_field_permissions":[],"readonly_field_permissions":[],"permissions":["access_tasks"],"role":"tester","subtitle":"A test group","datasource_ids":[],"blocked_datasource_ids":[],"component_ids":[],"allowed_component_ids":[],"branch_ids":[],"blocked_branch_ids":[],"allowed_languages":["default"],"blocked_languages":[],"asset_folder_ids":[],"blocked_asset_folder_ids":[],"ext_id":"FizBuz"}}' headers: Content-Type: - application/json; charset=utf-8 status: 201 Created code: 201 - duration: 125.047042ms + duration: 80.423552ms - id: 1 request: proto: HTTP/1.1 @@ -46,7 +46,7 @@ interactions: body: "" form: {} headers: {} - url: https://mapi.storyblok.com/v1/spaces/233252/space_roles/67553 + url: https://mapi.storyblok.com/v1/spaces/233252/space_roles/74689 method: GET response: proto: HTTP/2.0 @@ -54,15 +54,15 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 359 + content_length: 571 uncompressed: false - body: '{"space_role":{"id":67553,"resolved_allowed_paths":[],"allowed_paths":["1"],"field_permissions":["component_name.field_name"],"readonly_field_permissions":[],"permissions":["access_tasks"],"role":"tester","subtitle":"A test group","datasource_ids":[],"component_ids":[],"branch_ids":[],"allowed_languages":["default"],"asset_folder_ids":[],"ext_id":"FizBuz"}}' + body: '{"space_role":{"id":74689,"resolved_allowed_paths":[],"allowed_paths":["1"],"resolved_blocked_paths":null,"blocked_paths":[],"field_permissions":["component_name.field_name"],"allowed_field_permissions":[],"readonly_field_permissions":[],"permissions":["access_tasks"],"role":"tester","subtitle":"A test group","datasource_ids":[],"blocked_datasource_ids":[],"component_ids":[],"allowed_component_ids":[],"branch_ids":[],"blocked_branch_ids":[],"allowed_languages":["default"],"blocked_languages":[],"asset_folder_ids":[],"blocked_asset_folder_ids":[],"ext_id":"FizBuz"}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 86.834792ms + duration: 53.193104ms - id: 2 request: proto: HTTP/1.1 @@ -77,7 +77,7 @@ interactions: body: "" form: {} headers: {} - url: https://mapi.storyblok.com/v1/spaces/233252/space_roles/67553 + url: https://mapi.storyblok.com/v1/spaces/233252/space_roles/74689 method: GET response: proto: HTTP/2.0 @@ -85,15 +85,15 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 359 + content_length: 571 uncompressed: false - body: '{"space_role":{"id":67553,"resolved_allowed_paths":[],"allowed_paths":["1"],"field_permissions":["component_name.field_name"],"readonly_field_permissions":[],"permissions":["access_tasks"],"role":"tester","subtitle":"A test group","datasource_ids":[],"component_ids":[],"branch_ids":[],"allowed_languages":["default"],"asset_folder_ids":[],"ext_id":"FizBuz"}}' + body: '{"space_role":{"id":74689,"resolved_allowed_paths":[],"allowed_paths":["1"],"resolved_blocked_paths":null,"blocked_paths":[],"field_permissions":["component_name.field_name"],"allowed_field_permissions":[],"readonly_field_permissions":[],"permissions":["access_tasks"],"role":"tester","subtitle":"A test group","datasource_ids":[],"blocked_datasource_ids":[],"component_ids":[],"allowed_component_ids":[],"branch_ids":[],"blocked_branch_ids":[],"allowed_languages":["default"],"blocked_languages":[],"asset_folder_ids":[],"blocked_asset_folder_ids":[],"ext_id":"FizBuz"}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 90.119083ms + duration: 56.768491ms - id: 3 request: proto: HTTP/1.1 @@ -108,7 +108,7 @@ interactions: body: '{"space_role":{"allowed_languages":["default"],"allowed_paths":["1"],"ext_id":"BuzFiz","field_permissions":["component_name.field_name"],"permissions":["access_tasks"],"role":"new-tester","subtitle":"A new test group"}}' form: {} headers: {} - url: https://mapi.storyblok.com/v1/spaces/233252/space_roles/67553 + url: https://mapi.storyblok.com/v1/spaces/233252/space_roles/74689 method: PUT response: proto: HTTP/2.0 @@ -116,15 +116,15 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 367 + content_length: 579 uncompressed: false - body: '{"space_role":{"id":67553,"resolved_allowed_paths":[],"allowed_paths":["1"],"field_permissions":["component_name.field_name"],"readonly_field_permissions":[],"permissions":["access_tasks"],"role":"new-tester","subtitle":"A new test group","datasource_ids":[],"component_ids":[],"branch_ids":[],"allowed_languages":["default"],"asset_folder_ids":[],"ext_id":"BuzFiz"}}' + body: '{"space_role":{"id":74689,"resolved_allowed_paths":[],"allowed_paths":["1"],"resolved_blocked_paths":null,"blocked_paths":[],"field_permissions":["component_name.field_name"],"allowed_field_permissions":[],"readonly_field_permissions":[],"permissions":["access_tasks"],"role":"new-tester","subtitle":"A new test group","datasource_ids":[],"blocked_datasource_ids":[],"component_ids":[],"allowed_component_ids":[],"branch_ids":[],"blocked_branch_ids":[],"allowed_languages":["default"],"blocked_languages":[],"asset_folder_ids":[],"blocked_asset_folder_ids":[],"ext_id":"BuzFiz"}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 174.415375ms + duration: 66.786299ms - id: 4 request: proto: HTTP/1.1 @@ -139,7 +139,7 @@ interactions: body: "" form: {} headers: {} - url: https://mapi.storyblok.com/v1/spaces/233252/space_roles/67553 + url: https://mapi.storyblok.com/v1/spaces/233252/space_roles/74689 method: GET response: proto: HTTP/2.0 @@ -147,15 +147,15 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 367 + content_length: 579 uncompressed: false - body: '{"space_role":{"id":67553,"resolved_allowed_paths":[],"allowed_paths":["1"],"field_permissions":["component_name.field_name"],"readonly_field_permissions":[],"permissions":["access_tasks"],"role":"new-tester","subtitle":"A new test group","datasource_ids":[],"component_ids":[],"branch_ids":[],"allowed_languages":["default"],"asset_folder_ids":[],"ext_id":"BuzFiz"}}' + body: '{"space_role":{"id":74689,"resolved_allowed_paths":[],"allowed_paths":["1"],"resolved_blocked_paths":null,"blocked_paths":[],"field_permissions":["component_name.field_name"],"allowed_field_permissions":[],"readonly_field_permissions":[],"permissions":["access_tasks"],"role":"new-tester","subtitle":"A new test group","datasource_ids":[],"blocked_datasource_ids":[],"component_ids":[],"allowed_component_ids":[],"branch_ids":[],"blocked_branch_ids":[],"allowed_languages":["default"],"blocked_languages":[],"asset_folder_ids":[],"blocked_asset_folder_ids":[],"ext_id":"BuzFiz"}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 93.840708ms + duration: 60.808683ms - id: 5 request: proto: HTTP/1.1 @@ -170,7 +170,7 @@ interactions: body: "" form: {} headers: {} - url: https://mapi.storyblok.com/v1/spaces/233252/space_roles/67553 + url: https://mapi.storyblok.com/v1/spaces/233252/space_roles/74689 method: DELETE response: proto: HTTP/2.0 @@ -178,12 +178,12 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 367 + content_length: 579 uncompressed: false - body: '{"space_role":{"id":67553,"resolved_allowed_paths":[],"allowed_paths":["1"],"field_permissions":["component_name.field_name"],"readonly_field_permissions":[],"permissions":["access_tasks"],"role":"new-tester","subtitle":"A new test group","datasource_ids":[],"component_ids":[],"branch_ids":[],"allowed_languages":["default"],"asset_folder_ids":[],"ext_id":"BuzFiz"}}' + body: '{"space_role":{"id":74689,"resolved_allowed_paths":[],"allowed_paths":["1"],"resolved_blocked_paths":null,"blocked_paths":[],"field_permissions":["component_name.field_name"],"allowed_field_permissions":[],"readonly_field_permissions":[],"permissions":["access_tasks"],"role":"new-tester","subtitle":"A new test group","datasource_ids":[],"blocked_datasource_ids":[],"component_ids":[],"allowed_component_ids":[],"branch_ids":[],"blocked_branch_ids":[],"allowed_languages":["default"],"blocked_languages":[],"asset_folder_ids":[],"blocked_asset_folder_ids":[],"ext_id":"BuzFiz"}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 121.799292ms + duration: 78.267942ms diff --git a/internal/component_model.go b/internal/component_model.go index cf2d472..f21078e 100644 --- a/internal/component_model.go +++ b/internal/component_model.go @@ -32,48 +32,69 @@ type fieldModel struct { Type types.String `tfsdk:"type"` Position types.Int64 `tfsdk:"position"` - AddHttps types.Bool `tfsdk:"add_https"` - AllowTargetBlank types.Bool `tfsdk:"allow_target_blank"` - AssetFolderId types.Int64 `tfsdk:"asset_folder_id"` - CanSync types.Bool `tfsdk:"can_sync"` - ComponentWhitelist []types.String `tfsdk:"component_whitelist"` - ConditionalSettings []conditionalSettingsModel `tfsdk:"conditional_settings"` - CustomizeToolbar types.Bool `tfsdk:"customize_toolbar"` - DatasourceSlug types.String `tfsdk:"datasource_slug"` - DefaultValue types.String `tfsdk:"default_value"` - Description types.String `tfsdk:"description"` - DisableTime types.Bool `tfsdk:"disable_time"` - DisplayName types.String `tfsdk:"display_name"` - ExternalDatasource types.String `tfsdk:"external_datasource"` - FieldType types.String `tfsdk:"field_type"` - Filetypes []types.String `tfsdk:"filetypes"` - FilterContentType []types.String `tfsdk:"filter_content_type"` - FolderSlug types.String `tfsdk:"folder_slug"` - ForceLinkScope types.Bool `tfsdk:"force_link_scope"` - ImageCrop types.Bool `tfsdk:"image_crop"` - ImageHeight types.String `tfsdk:"image_height"` - ImageWidth types.String `tfsdk:"image_width"` - KeepImageSize types.Bool `tfsdk:"keep_image_size"` - Keys []types.String `tfsdk:"keys"` - LinkScope types.String `tfsdk:"link_scope"` - Maximum types.Int64 `tfsdk:"maximum"` - MaxLength types.Int64 `tfsdk:"max_length"` - MaxOptions types.Int64 `tfsdk:"max_options"` - Minimum types.Int64 `tfsdk:"minimum"` - MinOptions types.Int64 `tfsdk:"min_options"` - NoTranslate types.Bool `tfsdk:"no_translate"` - Options []optionModel `tfsdk:"options"` - Regex types.String `tfsdk:"regex"` - Required types.Bool `tfsdk:"required"` - RestrictComponents types.Bool `tfsdk:"restrict_components"` - RestrictContentTypes types.Bool `tfsdk:"restrict_content_types"` - RichMarkdown types.Bool `tfsdk:"rich_markdown"` - Rtl types.Bool `tfsdk:"rtl"` - Source types.String `tfsdk:"source"` - Toolbar []types.String `tfsdk:"toolbar"` - Tooltip types.Bool `tfsdk:"tooltip"` - Translatable types.Bool `tfsdk:"translatable"` - UseUuid types.Bool `tfsdk:"use_uuid"` + AddHttps types.Bool `tfsdk:"add_https"` + AllowTargetBlank types.Bool `tfsdk:"allow_target_blank"` + AssetFolderId types.Int64 `tfsdk:"asset_folder_id"` + CanSync types.Bool `tfsdk:"can_sync"` + ComponentWhitelist []types.String `tfsdk:"component_whitelist"` + ConditionalSettings []conditionalSettingsModel `tfsdk:"conditional_settings"` + CustomizeToolbar types.Bool `tfsdk:"customize_toolbar"` + DatasourceSlug types.String `tfsdk:"datasource_slug"` + DefaultValue types.String `tfsdk:"default_value"` + Description types.String `tfsdk:"description"` + DisableTime types.Bool `tfsdk:"disable_time"` + DisplayName types.String `tfsdk:"display_name"` + ExternalDatasource types.String `tfsdk:"external_datasource"` + FieldType types.String `tfsdk:"field_type"` + Filetypes []types.String `tfsdk:"filetypes"` + FilterContentType []types.String `tfsdk:"filter_content_type"` + FolderSlug types.String `tfsdk:"folder_slug"` + ForceLinkScope types.Bool `tfsdk:"force_link_scope"` + ImageCrop types.Bool `tfsdk:"image_crop"` + ImageHeight types.String `tfsdk:"image_height"` + ImageWidth types.String `tfsdk:"image_width"` + KeepImageSize types.Bool `tfsdk:"keep_image_size"` + Keys []types.String `tfsdk:"keys"` + LinkScope types.String `tfsdk:"link_scope"` + Maximum types.Int64 `tfsdk:"maximum"` + MaxLength types.Int64 `tfsdk:"max_length"` + MaxOptions types.Int64 `tfsdk:"max_options"` + Minimum types.Int64 `tfsdk:"minimum"` + MinOptions types.Int64 `tfsdk:"min_options"` + NoTranslate types.Bool `tfsdk:"no_translate"` + Options []optionModel `tfsdk:"options"` + Regex types.String `tfsdk:"regex"` + Required types.Bool `tfsdk:"required"` + RestrictComponents types.Bool `tfsdk:"restrict_components"` + RestrictContentTypes types.Bool `tfsdk:"restrict_content_types"` + RichMarkdown types.Bool `tfsdk:"rich_markdown"` + Rtl types.Bool `tfsdk:"rtl"` + Source types.String `tfsdk:"source"` + Toolbar []types.String `tfsdk:"toolbar"` + Tooltip types.Bool `tfsdk:"tooltip"` + Translatable types.Bool `tfsdk:"translatable"` + UseUuid types.Bool `tfsdk:"use_uuid"` + Steps types.Int64 `tfsdk:"steps"` + ShowAnchor types.Bool `tfsdk:"show_anchor"` + RestrictType types.String `tfsdk:"restrict_type"` + ComponentGroupWhitelist []types.String `tfsdk:"component_group_whitelist"` + ComponentTagWhitelist []types.Int64 `tfsdk:"component_tag_whitelist"` + AssetLinkType types.Bool `tfsdk:"asset_link_type"` + AllowAdvancedSearch types.Bool `tfsdk:"allow_advanced_search"` + AllowCustomAttributes types.Bool `tfsdk:"allow_custom_attributes"` + AllowExternalUrl types.Bool `tfsdk:"allow_external_url"` + AllowMultiline types.Bool `tfsdk:"allow_multiline"` + Decimals types.Int64 `tfsdk:"decimals"` + EmailLinkType types.Bool `tfsdk:"email_link_type"` + EntryAppearance types.String `tfsdk:"entry_appearance"` + ExcludeEmptyOption types.Bool `tfsdk:"exclude_empty_option"` + ExcludeFromMerge types.Bool `tfsdk:"exclude_from_merge"` + ExcludeFromOverwrite types.Bool `tfsdk:"exclude_from_overwrite"` + ForceMerge types.Bool `tfsdk:"force_merge"` + InlineLabel types.Bool `tfsdk:"inline_label"` + IsReferenceType types.Bool `tfsdk:"is_reference_type"` + MaxValue types.Int64 `tfsdk:"max_value"` + MinValue types.Int64 `tfsdk:"min_value"` } type conditionalSettingsModel struct { @@ -168,48 +189,69 @@ func toFieldInput(item fieldModel) sbmgmt.FieldInput { Type: item.Type.ValueString(), Pos: item.Position.ValueInt64(), - AddHttps: item.AddHttps.ValueBoolPointer(), - AllowTargetBlank: item.AllowTargetBlank.ValueBoolPointer(), - AssetFolderId: item.AssetFolderId.ValueInt64Pointer(), - CanSync: item.CanSync.ValueBoolPointer(), - ComponentWhitelist: utils.ConvertToPointerStringSlice(item.ComponentWhitelist), - ConditionalSettings: deserializeConditionalSettings(item.ConditionalSettings), - CustomizeToolbar: item.CustomizeToolbar.ValueBoolPointer(), - DatasourceSlug: item.DatasourceSlug.ValueStringPointer(), - DefaultValue: item.DefaultValue.ValueStringPointer(), - Description: item.Description.ValueStringPointer(), - DisableTime: item.DisableTime.ValueBoolPointer(), - DisplayName: item.DisplayName.ValueStringPointer(), - ExternalDatasource: item.ExternalDatasource.ValueStringPointer(), - FieldType: item.FieldType.ValueStringPointer(), - Filetypes: utils.ConvertToPointerStringSlice(item.Filetypes), - FilterContentType: utils.ConvertToPointerStringSlice(item.FilterContentType), - FolderSlug: item.FolderSlug.ValueStringPointer(), - ForceLinkScope: item.ForceLinkScope.ValueBoolPointer(), - ImageCrop: item.ImageCrop.ValueBoolPointer(), - ImageHeight: item.ImageHeight.ValueStringPointer(), - ImageWidth: item.ImageWidth.ValueStringPointer(), - KeepImageSize: item.KeepImageSize.ValueBoolPointer(), - Keys: utils.ConvertToPointerStringSlice(item.Keys), - LinkScope: item.LinkScope.ValueStringPointer(), - Maximum: item.Maximum.ValueInt64Pointer(), - MaxLength: item.MaxLength.ValueInt64Pointer(), - MaxOptions: item.MaxOptions.ValueInt64Pointer(), - Minimum: item.Minimum.ValueInt64Pointer(), - MinOptions: item.MinOptions.ValueInt64Pointer(), - NoTranslate: item.NoTranslate.ValueBoolPointer(), - Options: deserializeOptionsModel(item.Options), - Regex: item.Regex.ValueStringPointer(), - Required: item.Required.ValueBoolPointer(), - RestrictComponents: item.RestrictComponents.ValueBoolPointer(), - RestrictContentTypes: item.RestrictContentTypes.ValueBoolPointer(), - RichMarkdown: item.RichMarkdown.ValueBoolPointer(), - Rtl: item.Rtl.ValueBoolPointer(), - Source: item.Source.ValueStringPointer(), - Toolbar: utils.ConvertToPointerStringSlice(item.Toolbar), - Tooltip: item.Tooltip.ValueBoolPointer(), - Translatable: item.Translatable.ValueBoolPointer(), - UseUuid: item.UseUuid.ValueBoolPointer(), + AddHttps: item.AddHttps.ValueBoolPointer(), + AllowTargetBlank: item.AllowTargetBlank.ValueBoolPointer(), + AssetFolderId: item.AssetFolderId.ValueInt64Pointer(), + CanSync: item.CanSync.ValueBoolPointer(), + ComponentWhitelist: utils.ConvertToPointerStringSlice(item.ComponentWhitelist), + ConditionalSettings: deserializeConditionalSettings(item.ConditionalSettings), + CustomizeToolbar: item.CustomizeToolbar.ValueBoolPointer(), + DatasourceSlug: item.DatasourceSlug.ValueStringPointer(), + DefaultValue: item.DefaultValue.ValueStringPointer(), + Description: item.Description.ValueStringPointer(), + DisableTime: item.DisableTime.ValueBoolPointer(), + DisplayName: item.DisplayName.ValueStringPointer(), + ExternalDatasource: item.ExternalDatasource.ValueStringPointer(), + FieldType: item.FieldType.ValueStringPointer(), + Filetypes: utils.ConvertToPointerStringSlice(item.Filetypes), + FilterContentType: utils.ConvertToPointerStringSlice(item.FilterContentType), + FolderSlug: item.FolderSlug.ValueStringPointer(), + ForceLinkScope: item.ForceLinkScope.ValueBoolPointer(), + ImageCrop: item.ImageCrop.ValueBoolPointer(), + ImageHeight: item.ImageHeight.ValueStringPointer(), + ImageWidth: item.ImageWidth.ValueStringPointer(), + KeepImageSize: item.KeepImageSize.ValueBoolPointer(), + Keys: utils.ConvertToPointerStringSlice(item.Keys), + LinkScope: item.LinkScope.ValueStringPointer(), + Maximum: item.Maximum.ValueInt64Pointer(), + MaxLength: item.MaxLength.ValueInt64Pointer(), + MaxOptions: item.MaxOptions.ValueInt64Pointer(), + Minimum: item.Minimum.ValueInt64Pointer(), + MinOptions: item.MinOptions.ValueInt64Pointer(), + NoTranslate: item.NoTranslate.ValueBoolPointer(), + Options: deserializeOptionsModel(item.Options), + Regex: item.Regex.ValueStringPointer(), + Required: item.Required.ValueBoolPointer(), + RestrictComponents: item.RestrictComponents.ValueBoolPointer(), + RestrictContentTypes: item.RestrictContentTypes.ValueBoolPointer(), + RichMarkdown: item.RichMarkdown.ValueBoolPointer(), + Rtl: item.Rtl.ValueBoolPointer(), + Source: item.Source.ValueStringPointer(), + Toolbar: utils.ConvertToPointerStringSlice(item.Toolbar), + Tooltip: item.Tooltip.ValueBoolPointer(), + Translatable: item.Translatable.ValueBoolPointer(), + UseUuid: item.UseUuid.ValueBoolPointer(), + Steps: item.Steps.ValueInt64Pointer(), + ShowAnchor: item.ShowAnchor.ValueBoolPointer(), + RestrictType: item.RestrictType.ValueStringPointer(), + ComponentGroupWhitelist: utils.ConvertToPointerStringSlice(item.ComponentGroupWhitelist), + ComponentTagWhitelist: utils.ConvertToPointerIntSlice(item.ComponentTagWhitelist), + AssetLinkType: item.AssetLinkType.ValueBoolPointer(), + AllowAdvancedSearch: item.AllowAdvancedSearch.ValueBoolPointer(), + AllowCustomAttributes: item.AllowCustomAttributes.ValueBoolPointer(), + AllowExternalUrl: item.AllowExternalUrl.ValueBoolPointer(), + AllowMultiline: item.AllowMultiline.ValueBoolPointer(), + Decimals: item.Decimals.ValueInt64Pointer(), + EmailLinkType: item.EmailLinkType.ValueBoolPointer(), + EntryAppearance: item.EntryAppearance.ValueStringPointer(), + ExcludeEmptyOption: item.ExcludeEmptyOption.ValueBoolPointer(), + ExcludeFromMerge: item.ExcludeFromMerge.ValueBoolPointer(), + ExcludeFromOverwrite: item.ExcludeFromOverwrite.ValueBoolPointer(), + ForceMerge: item.ForceMerge.ValueBoolPointer(), + InlineLabel: item.InlineLabel.ValueBoolPointer(), + IsReferenceType: item.IsReferenceType.ValueBoolPointer(), + MaxValue: item.MaxValue.ValueInt64Pointer(), + MinValue: item.MinValue.ValueInt64Pointer(), } } @@ -248,48 +290,69 @@ func toFieldModel(field sbmgmt.FieldInput) fieldModel { Type: types.StringValue(field.Type), Position: types.Int64Value(field.Pos), - AddHttps: types.BoolPointerValue(field.AddHttps), - AllowTargetBlank: types.BoolPointerValue(field.AllowTargetBlank), - AssetFolderId: types.Int64PointerValue(field.AssetFolderId), - CanSync: types.BoolPointerValue(field.CanSync), - ComponentWhitelist: utils.ConvertToStringSlice(field.ComponentWhitelist), - CustomizeToolbar: types.BoolPointerValue(field.CustomizeToolbar), - DatasourceSlug: types.StringPointerValue(field.DatasourceSlug), - DefaultValue: types.StringPointerValue(field.DefaultValue), - Description: types.StringPointerValue(field.Description), - DisableTime: types.BoolPointerValue(field.DisableTime), - DisplayName: types.StringPointerValue(field.DisplayName), - ExternalDatasource: types.StringPointerValue(field.ExternalDatasource), - FieldType: types.StringPointerValue(field.FieldType), - Filetypes: utils.ConvertToStringSlice(field.Filetypes), - FilterContentType: utils.ConvertToStringSlice(field.FilterContentType), - FolderSlug: types.StringPointerValue(field.FolderSlug), - ForceLinkScope: types.BoolPointerValue(field.ForceLinkScope), - ImageCrop: types.BoolPointerValue(field.ImageCrop), - ImageHeight: types.StringPointerValue(field.ImageHeight), - ImageWidth: types.StringPointerValue(field.ImageWidth), - KeepImageSize: types.BoolPointerValue(field.KeepImageSize), - Keys: utils.ConvertToStringSlice(field.Keys), - LinkScope: types.StringPointerValue(field.LinkScope), - Maximum: types.Int64PointerValue(field.Maximum), - MaxLength: types.Int64PointerValue(field.MaxLength), - MaxOptions: types.Int64PointerValue(field.MaxOptions), - Minimum: types.Int64PointerValue(field.Minimum), - MinOptions: types.Int64PointerValue(field.MinOptions), - NoTranslate: types.BoolPointerValue(field.NoTranslate), - Options: serializeOptionsModel(field.Options), - Regex: types.StringPointerValue(field.Regex), - Required: types.BoolPointerValue(field.Required), - RestrictComponents: types.BoolPointerValue(field.RestrictComponents), - RestrictContentTypes: types.BoolPointerValue(field.RestrictContentTypes), - RichMarkdown: types.BoolPointerValue(field.RichMarkdown), - Rtl: types.BoolPointerValue(field.Rtl), - Source: types.StringPointerValue(field.Source), - Toolbar: utils.ConvertToStringSlice(field.Toolbar), - Tooltip: types.BoolPointerValue(field.Tooltip), - Translatable: types.BoolPointerValue(field.Translatable), - UseUuid: types.BoolPointerValue(field.UseUuid), - ConditionalSettings: serializeConditionalSettings(field.ConditionalSettings), + AddHttps: types.BoolPointerValue(field.AddHttps), + AllowTargetBlank: types.BoolPointerValue(field.AllowTargetBlank), + AssetFolderId: types.Int64PointerValue(field.AssetFolderId), + CanSync: types.BoolPointerValue(field.CanSync), + ComponentWhitelist: utils.ConvertToStringSlice(field.ComponentWhitelist), + CustomizeToolbar: types.BoolPointerValue(field.CustomizeToolbar), + DatasourceSlug: types.StringPointerValue(field.DatasourceSlug), + DefaultValue: types.StringPointerValue(field.DefaultValue), + Description: types.StringPointerValue(field.Description), + DisableTime: types.BoolPointerValue(field.DisableTime), + DisplayName: types.StringPointerValue(field.DisplayName), + ExternalDatasource: types.StringPointerValue(field.ExternalDatasource), + FieldType: types.StringPointerValue(field.FieldType), + Filetypes: utils.ConvertToStringSlice(field.Filetypes), + FilterContentType: utils.ConvertToStringSlice(field.FilterContentType), + FolderSlug: types.StringPointerValue(field.FolderSlug), + ForceLinkScope: types.BoolPointerValue(field.ForceLinkScope), + ImageCrop: types.BoolPointerValue(field.ImageCrop), + ImageHeight: types.StringPointerValue(field.ImageHeight), + ImageWidth: types.StringPointerValue(field.ImageWidth), + KeepImageSize: types.BoolPointerValue(field.KeepImageSize), + Keys: utils.ConvertToStringSlice(field.Keys), + LinkScope: types.StringPointerValue(field.LinkScope), + Maximum: types.Int64PointerValue(field.Maximum), + MaxLength: types.Int64PointerValue(field.MaxLength), + MaxOptions: types.Int64PointerValue(field.MaxOptions), + Minimum: types.Int64PointerValue(field.Minimum), + MinOptions: types.Int64PointerValue(field.MinOptions), + NoTranslate: types.BoolPointerValue(field.NoTranslate), + Options: serializeOptionsModel(field.Options), + Regex: types.StringPointerValue(field.Regex), + Required: types.BoolPointerValue(field.Required), + RestrictComponents: types.BoolPointerValue(field.RestrictComponents), + RestrictContentTypes: types.BoolPointerValue(field.RestrictContentTypes), + RichMarkdown: types.BoolPointerValue(field.RichMarkdown), + Rtl: types.BoolPointerValue(field.Rtl), + Source: types.StringPointerValue(field.Source), + Toolbar: utils.ConvertToStringSlice(field.Toolbar), + Tooltip: types.BoolPointerValue(field.Tooltip), + Translatable: types.BoolPointerValue(field.Translatable), + UseUuid: types.BoolPointerValue(field.UseUuid), + ConditionalSettings: serializeConditionalSettings(field.ConditionalSettings), + Steps: types.Int64PointerValue(field.Steps), + ShowAnchor: types.BoolPointerValue(field.ShowAnchor), + RestrictType: types.StringPointerValue(field.RestrictType), + ComponentGroupWhitelist: utils.ConvertToStringSlice(field.ComponentGroupWhitelist), + ComponentTagWhitelist: utils.ConvertToInt64Slice(field.ComponentTagWhitelist), + AssetLinkType: types.BoolPointerValue(field.AssetLinkType), + AllowAdvancedSearch: types.BoolPointerValue(field.AllowAdvancedSearch), + AllowCustomAttributes: types.BoolPointerValue(field.AllowCustomAttributes), + AllowExternalUrl: types.BoolPointerValue(field.AllowExternalUrl), + AllowMultiline: types.BoolPointerValue(field.AllowMultiline), + Decimals: types.Int64PointerValue(field.Decimals), + EmailLinkType: types.BoolPointerValue(field.EmailLinkType), + EntryAppearance: types.StringPointerValue(field.EntryAppearance), + ExcludeEmptyOption: types.BoolPointerValue(field.ExcludeEmptyOption), + ExcludeFromMerge: types.BoolPointerValue(field.ExcludeFromMerge), + ExcludeFromOverwrite: types.BoolPointerValue(field.ExcludeFromOverwrite), + ForceMerge: types.BoolPointerValue(field.ForceMerge), + InlineLabel: types.BoolPointerValue(field.InlineLabel), + IsReferenceType: types.BoolPointerValue(field.IsReferenceType), + MaxValue: types.Int64PointerValue(field.MaxValue), + MinValue: types.Int64PointerValue(field.MinValue), } } diff --git a/internal/component_resource.go b/internal/component_resource.go index 4722d6e..45f9048 100644 --- a/internal/component_resource.go +++ b/internal/component_resource.go @@ -380,6 +380,92 @@ func (r *componentResource) Schema(_ context.Context, _ resource.SchemaRequest, Description: "Default: true; available in option and source=internal_stories", Optional: true, }, + "steps": schema.Int64Attribute{ + Description: "Step interval for number fields", + Optional: true, + }, + "show_anchor": schema.BoolAttribute{ + Description: "Enables anchor field for internal links in multilink fields", + Optional: true, + }, + "restrict_type": schema.StringAttribute{ + Description: "Restricts the type of components used in bloks fields (e.g., tags, groups).", + Optional: true, + }, + "component_group_whitelist": schema.ListAttribute{ + Description: "Array of group UUIDs for restricting components in bloks fields", + Optional: true, + ElementType: types.StringType, + }, + "component_tag_whitelist": schema.ListAttribute{ + Description: "Array of tag IDs for restricting components in bloks fields", + Optional: true, + ElementType: types.Int64Type, + }, + "asset_link_type": schema.BoolAttribute{ + Description: "Allows assets in multilink fields", + Optional: true, + }, + "allow_advanced_search": schema.BoolAttribute{ + Description: "Allows advanced search in option fields", + Optional: true, + }, + "allow_custom_attributes": schema.BoolAttribute{ + Description: "Enables custom attributes in links for richtext or multilink fields", + Optional: true, + }, + "allow_external_url": schema.BoolAttribute{ + Description: "Allows external URLs in asset or multiasset fields", + Optional: true, + }, + "allow_multiline": schema.BoolAttribute{ + Description: "Enables empty paragraphs in markdown fields", + Optional: true, + }, + "decimals": schema.Int64Attribute{ + Description: "Number of decimal places for number fields", + Optional: true, + }, + "email_link_type": schema.BoolAttribute{ + Description: "Allows email links in multilink fields", + Optional: true, + }, + "entry_appearance": schema.StringAttribute{ + Description: "Appearance of an option (link or card) in an option field", + Optional: true, + }, + "exclude_empty_option": schema.BoolAttribute{ + Description: "Hides empty options in option fields", + Optional: true, + }, + "exclude_from_merge": schema.BoolAttribute{ + Description: "Excludes a blok from merge actions (Dimensions App).", + Optional: true, + }, + "exclude_from_overwrite": schema.BoolAttribute{ + Description: "Excludes a blok from overwrite actions (Dimensions App).", + Optional: true, + }, + "force_merge": schema.BoolAttribute{ + Description: "Forces overwriting a blok during a merge action (Dimensions App).", + Optional: true, + }, + "inline_label": schema.BoolAttribute{ + Description: "Makes the label of a boolean field inline", + Optional: true, + }, + "is_reference_type": schema.BoolAttribute{ + Description: "True if the options field is of type reference", + Optional: true, + }, + "max_value": schema.Int64Attribute{ + Description: "Maximum value for number fields", + Optional: true, + }, + "min_value": schema.Int64Attribute{ + Description: "Minimum value for number fields", + Optional: true, + }, }, }, }, diff --git a/internal/component_resource_test.go b/internal/component_resource_test.go index 142e7b3..646d55e 100644 --- a/internal/component_resource_test.go +++ b/internal/component_resource_test.go @@ -33,6 +33,22 @@ func TestComponentResourceBasic(t *testing.T) { resource.TestCheckResourceAttr(rn, "schema.image.conditional_settings.0.rule_match", "all"), resource.TestCheckResourceAttr(rn, "schema.image.conditional_settings.0.rule_conditions.0.validation", "empty"), resource.TestCheckResourceAttr(rn, "schema.image.conditional_settings.0.rule_conditions.0.validated_object.field_key", "intro"), + resource.TestCheckResourceAttr(rn, "schema.link.type", "multilink"), + resource.TestCheckResourceAttr(rn, "schema.link.description", "Link to a page"), + resource.TestCheckResourceAttr(rn, "schema.link.translatable", "true"), + resource.TestCheckResourceAttr(rn, "schema.link.required", "true"), + resource.TestCheckResourceAttr(rn, "schema.link.allow_external_url", "true"), + resource.TestCheckResourceAttr(rn, "schema.link.restrict_content_types", "true"), + resource.TestCheckResourceAttr(rn, "schema.link.allow_advanced_search", "true"), + resource.TestCheckResourceAttr(rn, "schema.link.allow_custom_attributes", "true"), + resource.TestCheckResourceAttr(rn, "schema.link.asset_link_type", "true"), + resource.TestCheckResourceAttr(rn, "schema.link.show_anchor", "true"), + resource.TestCheckResourceAttr(rn, "schema.link.email_link_type", "true"), + resource.TestCheckResourceAttr(rn, "schema.link.position", "3"), + resource.TestCheckResourceAttr(rn, "schema.link.allow_target_blank", "true"), + resource.TestCheckResourceAttr(rn, "schema.link.link_scope", "{0}"), + resource.TestCheckResourceAttr(rn, "schema.link.force_link_scope", "true"), + resource.TestCheckResourceAttr(rn, "schema.link.tooltip", "true"), ), }, { @@ -46,6 +62,20 @@ func TestComponentResourceBasic(t *testing.T) { resource.TestCheckResourceAttr(rn, "schema.buttons.filter_content_type.0", "button"), resource.TestCheckResourceAttr(rn, "schema.buttons.type", "options"), resource.TestCheckResourceAttr(rn, "schema.buttons.position", "3"), + resource.TestCheckResourceAttr(rn, "schema.link.description", "Other link"), + resource.TestCheckResourceAttr(rn, "schema.link.translatable", "false"), + resource.TestCheckResourceAttr(rn, "schema.link.required", "false"), + resource.TestCheckResourceAttr(rn, "schema.link.allow_external_url", "false"), + resource.TestCheckResourceAttr(rn, "schema.link.restrict_content_types", "false"), + resource.TestCheckResourceAttr(rn, "schema.link.allow_advanced_search", "false"), + resource.TestCheckResourceAttr(rn, "schema.link.allow_custom_attributes", "false"), + resource.TestCheckResourceAttr(rn, "schema.link.asset_link_type", "false"), + resource.TestCheckResourceAttr(rn, "schema.link.show_anchor", "false"), + resource.TestCheckResourceAttr(rn, "schema.link.email_link_type", "false"), + resource.TestCheckResourceAttr(rn, "schema.link.position", "1"), + resource.TestCheckResourceAttr(rn, "schema.link.allow_target_blank", "false"), + resource.TestCheckResourceAttr(rn, "schema.link.force_link_scope", "false"), + resource.TestCheckResourceAttr(rn, "schema.link.tooltip", "false"), ), }, }, @@ -67,6 +97,25 @@ func testComponentConfig(identifier string, spaceId int) string { type = "text" position = 2 } + + link = { + type = "multilink" + description = "Link to a page" + translatable = true + required = true + allow_external_url = true + restrict_content_types = true + allow_advanced_search = true + allow_custom_attributes = true + asset_link_type = true + show_anchor = true + email_link_type = true + position = 3 + allow_target_blank = true + link_scope = "{0}" + force_link_scope = true + tooltip = true + } image = { type = "image" @@ -111,6 +160,25 @@ func testComponentConfigUpdate(identifier string, spaceId int) string { type = "text" position = 2 } + + link = { + type = "multilink" + description = "Other link" + translatable = false + required = false + allow_external_url = false + restrict_content_types = false + allow_advanced_search = false + allow_custom_attributes = false + asset_link_type = false + show_anchor = false + email_link_type = false + position = 1 + allow_target_blank = false + link_scope = "{0}" + force_link_scope = false + tooltip = false + } intro = { type = "text" diff --git a/internal/utils/types.go b/internal/utils/types.go index a263a38..292b543 100644 --- a/internal/utils/types.go +++ b/internal/utils/types.go @@ -18,6 +18,19 @@ func ConvertToStringSlice(strSlicePtr *[]string) []types.String { return strSlice } +func ConvertToInt64Slice(intSlicePtr *[]int) []types.Int64 { + if intSlicePtr == nil { + return nil + } + + intSlice := make([]types.Int64, len(*intSlicePtr)) + for i, str := range *intSlicePtr { + intSlice[i] = types.Int64Value(int64(str)) + } + + return intSlice +} + func ConvertToPointerStringSlice(slice []types.String) *[]string { if slice == nil { return nil From f771018a43c0fdcd7555318331d0df1445ea403a Mon Sep 17 00:00:00 2001 From: Thomas De Meyer Date: Tue, 18 Feb 2025 09:02:11 +0100 Subject: [PATCH 2/3] feat: fixed linter issues --- .../unreleased/Added-20250218-090151.yaml | 3 +++ docs/resources/component.md | 21 +++++++++++++++++++ internal/asset_folder_resource.go | 1 - internal/asset_folder_resource_test.go | 4 +++- internal/component_group_model.go | 2 -- internal/component_group_resource_test.go | 4 +++- internal/component_model.go | 4 ---- internal/component_resource.go | 1 - internal/component_resource_test.go | 4 +++- internal/provider_test.go | 1 - internal/space_role_model.go | 1 - internal/space_role_resource_test.go | 4 +++- internal/webhook/resource.go | 1 - 13 files changed, 36 insertions(+), 15 deletions(-) create mode 100644 .changes/unreleased/Added-20250218-090151.yaml diff --git a/.changes/unreleased/Added-20250218-090151.yaml b/.changes/unreleased/Added-20250218-090151.yaml new file mode 100644 index 0000000..df68701 --- /dev/null +++ b/.changes/unreleased/Added-20250218-090151.yaml @@ -0,0 +1,3 @@ +kind: Added +body: Added additional fields to component resource +time: 2025-02-18T09:01:51.133547493+01:00 diff --git a/docs/resources/component.md b/docs/resources/component.md index f3268f1..7d971b7 100644 --- a/docs/resources/component.md +++ b/docs/resources/component.md @@ -202,33 +202,51 @@ Required: Optional: - `add_https` (Boolean) Prepends https: to stop usage of relative protocol +- `allow_advanced_search` (Boolean) Allows advanced search in option fields +- `allow_custom_attributes` (Boolean) Enables custom attributes in links for richtext or multilink fields +- `allow_external_url` (Boolean) Allows external URLs in asset or multiasset fields +- `allow_multiline` (Boolean) Enables empty paragraphs in markdown fields - `allow_target_blank` (Boolean) Allows to open links in a new tab for Richtext; Default: false - `asset_folder_id` (Number) Default asset folder numeric id to store uploaded image of that field +- `asset_link_type` (Boolean) Allows assets in multilink fields - `can_sync` (Boolean) Advanced usage to sync with field in preview; Default: false +- `component_group_whitelist` (List of String) Array of group UUIDs for restricting components in bloks fields +- `component_tag_whitelist` (List of Number) Array of tag IDs for restricting components in bloks fields - `component_whitelist` (List of String) Array of component/content type names: ["post","page","product"]. Only for type: bloks, multilink, and richtext (for nestable bloks inside that) - `conditional_settings` (Attributes List) Array containing the object with information about conditions set on the field (see [below for nested schema](#nestedatt--schema--conditional_settings)) - `customize_toolbar` (Boolean) Allow to customize the Markdown or Richtext toolbar; Default: false - `datasource_slug` (String) Define selectable datasources string; Effects editor only if source=internal +- `decimals` (Number) Number of decimal places for number fields - `default_value` (String) Default value for the field; Can be an escaped JSON object - `description` (String) Description shown in the editor interface - `disable_time` (Boolean) Disables time selection from date picker; Default: false - `display_name` (String) Display name shown in the editor interface +- `email_link_type` (Boolean) Allows email links in multilink fields +- `entry_appearance` (String) Appearance of an option (link or card) in an option field +- `exclude_empty_option` (Boolean) Hides empty options in option fields +- `exclude_from_merge` (Boolean) Excludes a blok from merge actions (Dimensions App). +- `exclude_from_overwrite` (Boolean) Excludes a blok from overwrite actions (Dimensions App). - `external_datasource` (String) Define external datasource JSON Url; Effects editor only if source=external - `field_type` (String) Name of the custom field type plugin - `filetypes` (List of String) Array of file type names: ["images", "videos", "audios", "texts"] - `filter_content_type` (List of String) An array of content types that can be selected in a option or options field where source is internal_stories: ["post", "faq_item"] - `folder_slug` (String) Filter on selectable stories path; Effects editor only if source=internal_stories; In case you have a multi-language folder structure you can add the '{0}' placeholder and the path will be adapted dynamically. Examples: "{0}/categories/", {0}/{1}/categories/ - `force_link_scope` (Boolean) Force link scope to be internal_stories; Default: false +- `force_merge` (Boolean) Forces overwriting a blok during a merge action (Dimensions App). - `image_crop` (Boolean) Activate force crop for images: (true/false) - `image_height` (String) Define height in px or height ratio if keep_image_size is enabled - `image_width` (String) Define width in px or width ratio if keep_image_size is enabled +- `inline_label` (Boolean) Makes the label of a boolean field inline +- `is_reference_type` (Boolean) True if the options field is of type reference - `keep_image_size` (Boolean) Keep original size: (true/false) - `keys` (List of String) Array of field keys to include in this section - `link_scope` (String) A path to a folder to restrict the link scope - `max_length` (Number) Set the max length of the input string - `max_options` (Number) Maximum amount of options for this options field +- `max_value` (Number) Maximum value for number fields - `maximum` (Number) Maximum amount of added bloks in this blok field - `min_options` (Number) Minimum amount of options for this options field +- `min_value` (Number) Minimum value for number fields - `minimum` (Number) Minimum amount of added bloks in this blok field - `no_translate` (Boolean) Should be excluded in translation export - `options` (Attributes List) Array of datasource entries [{name:"", value:""}]; Effects editor only if source=undefined (see [below for nested schema](#nestedatt--schema--options)) @@ -236,9 +254,12 @@ Optional: - `required` (Boolean) Is field required; Default: false - `restrict_components` (Boolean) Activate restriction nestable component option; Default: false - `restrict_content_types` (Boolean) Activate restriction content type option +- `restrict_type` (String) Restricts the type of components used in bloks fields (e.g., tags, groups). - `rich_markdown` (Boolean) Enable rich markdown view by default (true/false) - `rtl` (Boolean) Enable global RTL for this field +- `show_anchor` (Boolean) Enables anchor field for internal links in multilink fields - `source` (String) Possible values: undefined: Self; internal_stories: Stories; internal: Datasource; external: API Endpoint in Datasource Entries Array Format +- `steps` (Number) Step interval for number fields - `toolbar` (List of String) Array of toolbar keys to include in the Richtext or Markdown toolbar - `tooltip` (Boolean) Show the description as a tooltip - `translatable` (Boolean) Can field be translated; Default: false diff --git a/internal/asset_folder_resource.go b/internal/asset_folder_resource.go index 7fd749e..9f1761a 100644 --- a/internal/asset_folder_resource.go +++ b/internal/asset_folder_resource.go @@ -259,7 +259,6 @@ func (r *assetFolderResource) Delete(ctx context.Context, req resource.DeleteReq ) return } - } func (r *assetFolderResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { diff --git a/internal/asset_folder_resource_test.go b/internal/asset_folder_resource_test.go index 15330ba..6732a0c 100644 --- a/internal/asset_folder_resource_test.go +++ b/internal/asset_folder_resource_test.go @@ -9,7 +9,9 @@ import ( func TestAssetFolderResourceBasic(t *testing.T) { f, stop := ProviderFactories("./assets/asset_folder") - defer stop() + defer func() { + _ = stop() + }() id := "test" rn := fmt.Sprintf("storyblok_asset_folder.%s", id) diff --git a/internal/component_group_model.go b/internal/component_group_model.go index ade8060..00930fd 100644 --- a/internal/component_group_model.go +++ b/internal/component_group_model.go @@ -19,7 +19,6 @@ type componentGroupResourceModel struct { } func (m *componentGroupResourceModel) toCreateInput() sbmgmt.ComponentGroupCreateInput { - return sbmgmt.ComponentGroupCreateInput{ ComponentGroup: sbmgmt.ComponentGroupBase{ Name: m.Name.ValueString(), @@ -27,7 +26,6 @@ func (m *componentGroupResourceModel) toCreateInput() sbmgmt.ComponentGroupCreat } } func (m *componentGroupResourceModel) toUpdateInput() sbmgmt.ComponentGroupUpdateInput { - return sbmgmt.ComponentGroupUpdateInput{ ComponentGroup: sbmgmt.ComponentGroupBase{ Name: m.Name.ValueString(), diff --git a/internal/component_group_resource_test.go b/internal/component_group_resource_test.go index 57a5261..c56188a 100644 --- a/internal/component_group_resource_test.go +++ b/internal/component_group_resource_test.go @@ -9,7 +9,9 @@ import ( func TestComponentGroupResourceBasic(t *testing.T) { f, stop := ProviderFactories("./assets/component_group") - defer stop() + defer func() { + _ = stop() + }() id := "test" rn := fmt.Sprintf("storyblok_component_group.%s", id) diff --git a/internal/component_model.go b/internal/component_model.go index f21078e..fcd1543 100644 --- a/internal/component_model.go +++ b/internal/component_model.go @@ -124,7 +124,6 @@ type optionModel struct { } func (m *componentResourceModel) toRemoteInput() sbmgmt.ComponentCreateInput { - raw := make(map[string]sbmgmt.FieldInput, len(m.Schema)) for name := range m.Schema { item := m.Schema[name] @@ -154,7 +153,6 @@ func (m *componentResourceModel) toRemoteInput() sbmgmt.ComponentCreateInput { } } func (m *componentResourceModel) toUpdateInput() sbmgmt.ComponentUpdateInput { - raw := make(map[string]sbmgmt.FieldInput, len(m.Schema)) for name := range m.Schema { item := m.Schema[name] @@ -491,7 +489,6 @@ func serializeModifications(modifications *[]sbmgmt.Modification) []modification return serializedModifications } func serializeRuleConditions(ruleConditions *[]sbmgmt.RuleCondition) []ruleConditionModel { - if ruleConditions == nil { return nil } @@ -519,7 +516,6 @@ func deserializeConditionalSettings(conditionalSettings []conditionalSettingsMod deserializedConditionalSettings := make([]sbmgmt.ConditionalSettings, len(conditionalSettings)) for i, setting := range conditionalSettings { - deserializedConditionalSettings[i] = sbmgmt.ConditionalSettings{ RuleMatch: (*sbmgmt.ConditionalSettingsRuleMatch)(setting.RuleMatch.ValueStringPointer()), Modifications: deserializeConditionalSettingsModificationsModel(setting.Modifications), diff --git a/internal/component_resource.go b/internal/component_resource.go index 45f9048..de384db 100644 --- a/internal/component_resource.go +++ b/internal/component_resource.go @@ -651,7 +651,6 @@ func (r *componentResource) Delete(ctx context.Context, req resource.DeleteReque ) return } - } func (r *componentResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { diff --git a/internal/component_resource_test.go b/internal/component_resource_test.go index 646d55e..2c66263 100644 --- a/internal/component_resource_test.go +++ b/internal/component_resource_test.go @@ -9,7 +9,9 @@ import ( func TestComponentResourceBasic(t *testing.T) { f, stop := ProviderFactories("./assets/component") - defer stop() + defer func() { + _ = stop() + }() id := "test" rn := fmt.Sprintf("storyblok_component.%s", id) diff --git a/internal/provider_test.go b/internal/provider_test.go index 67d681b..59870d5 100644 --- a/internal/provider_test.go +++ b/internal/provider_test.go @@ -10,5 +10,4 @@ func TestProvider(t *testing.T) { p := New() assert.NotNil(t, p) - } diff --git a/internal/space_role_model.go b/internal/space_role_model.go index 21f2fb1..3ea9aa2 100644 --- a/internal/space_role_model.go +++ b/internal/space_role_model.go @@ -48,7 +48,6 @@ func (m *spaceRoleResourceModel) toCreateInput() sbmgmt.SpaceRoleCreateInput { } } func (m *spaceRoleResourceModel) toUpdateInput() sbmgmt.SpaceRoleUpdateInput { - return sbmgmt.SpaceRoleUpdateInput{ SpaceRole: &sbmgmt.SpaceRoleBase{ AllowedLanguages: utils.ConvertToPointerStringSlice(m.AllowedLanguages), diff --git a/internal/space_role_resource_test.go b/internal/space_role_resource_test.go index 7873dee..2206b63 100644 --- a/internal/space_role_resource_test.go +++ b/internal/space_role_resource_test.go @@ -9,7 +9,9 @@ import ( func TestSpaceRoleResourceBasic(t *testing.T) { f, stop := ProviderFactories("./assets/space_role") - defer stop() + defer func() { + _ = stop() + }() id := "test" rn := fmt.Sprintf("storyblok_space_role.%s", id) diff --git a/internal/webhook/resource.go b/internal/webhook/resource.go index 1343e67..4295502 100644 --- a/internal/webhook/resource.go +++ b/internal/webhook/resource.go @@ -281,7 +281,6 @@ func (r *webhookResource) Delete(ctx context.Context, req resource.DeleteRequest ) return } - } func (r *webhookResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { From 460fab3bb71827219069efc356dd809c99c677d9 Mon Sep 17 00:00:00 2001 From: Thomas De Meyer Date: Tue, 18 Feb 2025 09:05:00 +0100 Subject: [PATCH 3/3] feat: updated enabled linters --- .golangci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index cefa390..98462e9 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -7,7 +7,7 @@ linters: - cyclop - errcheck - exhaustive - - exportloopref + - copyloopvar - forcetypeassert - goimports - gosimple @@ -15,7 +15,7 @@ linters: - ineffassign - predeclared - staticcheck - - tenv + - usetesting - typecheck - unused - whitespace