diff --git a/client.go b/client.go index 279212c..d70d9ab 100644 --- a/client.go +++ b/client.go @@ -299,6 +299,7 @@ type RecipeFragment struct { DomainKey *string "json:\"domainKey\" graphql:\"domainKey\"" Subdomain *bool "json:\"subdomain\" graphql:\"subdomain\"" } "json:\"oidcSettings\" graphql:\"oidcSettings\"" + RecipeSections []*RecipeSectionFragment "json:\"recipeSections\" graphql:\"recipeSections\"" } type RecipeItemFragment struct { ID *string "json:\"id\" graphql:\"id\"" @@ -925,24 +926,6 @@ const GetChartInstallationsDocument = `query GetChartInstallations ($id: ID!) { } } } -fragment VersionFragment on Version { - id - readme - version - valuesTemplate - package - crds { - ... CrdFragment - } - dependencies { - ... DependenciesFragment - } -} -fragment CrdFragment on Crd { - id - name - blob -} fragment ChartInstallationFragment on ChartInstallation { id chart { @@ -978,6 +961,24 @@ fragment DependenciesFragment on Dependencies { providerWirings outputs } +fragment VersionFragment on Version { + id + readme + version + valuesTemplate + package + crds { + ... CrdFragment + } + dependencies { + ... DependenciesFragment + } +} +fragment CrdFragment on Crd { + id + name + blob +} ` func (c *Client) GetChartInstallations(ctx context.Context, id string, httpRequestOptions ...client.HTTPRequestOption) (*GetChartInstallations, error) { @@ -1009,24 +1010,6 @@ const GetPackageInstallationsDocument = `query GetPackageInstallations ($id: ID! } } } -fragment VersionFragment on Version { - id - readme - version - valuesTemplate - package - crds { - ... CrdFragment - } - dependencies { - ... DependenciesFragment - } -} -fragment CrdFragment on Crd { - id - name - blob -} fragment TerraformInstallationFragment on TerraformInstallation { id terraform { @@ -1081,6 +1064,24 @@ fragment DependenciesFragment on Dependencies { providerWirings outputs } +fragment VersionFragment on Version { + id + readme + version + valuesTemplate + package + crds { + ... CrdFragment + } + dependencies { + ... DependenciesFragment + } +} +fragment CrdFragment on Crd { + id + name + blob +} ` func (c *Client) GetPackageInstallations(ctx context.Context, id string, httpRequestOptions ...client.HTTPRequestOption) (*GetPackageInstallations, error) { @@ -1300,19 +1301,6 @@ const GetInstallationByIDDocument = `query GetInstallationById ($id: ID) { ... InstallationFragment } } -fragment InstallationFragment on Installation { - id - context - licenseKey - acmeKeyId - acmeSecret - repository { - ... RepositoryFragment - } - oidcProvider { - ... OIDCProvider - } -} fragment RepositoryFragment on Repository { id name @@ -1350,6 +1338,19 @@ fragment OIDCProvider on OidcProvider { userinfoEndpoint } } +fragment InstallationFragment on Installation { + id + context + licenseKey + acmeKeyId + acmeSecret + repository { + ... RepositoryFragment + } + oidcProvider { + ... OIDCProvider + } +} ` func (c *Client) GetInstallationByID(ctx context.Context, id *string, httpRequestOptions ...client.HTTPRequestOption) (*GetInstallationByID, error) { @@ -1477,42 +1478,11 @@ func (c *Client) ResetInstallations(ctx context.Context, httpRequestOptions ...c const GetRecipeDocument = `query GetRecipe ($repo: String, $name: String) { recipe(repo: $repo, name: $name) { ... RecipeFragment - recipeSections { - ... RecipeSectionFragment - } recipeDependencies { ... RecipeFragment } } } -fragment RecipeFragment on Recipe { - id - name - description - restricted - provider - tests { - type - name - message - args { - name - repo - key - } - } - repository { - id - name - } - oidcSettings { - uriFormat - uriFormats - authMethod - domainKey - subdomain - } -} fragment RecipeSectionFragment on RecipeSection { index repository { @@ -1603,6 +1573,37 @@ fragment RecipeConfigurationFragment on RecipeConfiguration { message } } +fragment RecipeFragment on Recipe { + id + name + description + restricted + provider + tests { + type + name + message + args { + name + repo + key + } + } + repository { + id + name + } + oidcSettings { + uriFormat + uriFormats + authMethod + domainKey + subdomain + } + recipeSections { + ... RecipeSectionFragment + } +} ` func (c *Client) GetRecipe(ctx context.Context, repo *string, name *string, httpRequestOptions ...client.HTTPRequestOption) (*GetRecipe, error) { @@ -1628,6 +1629,42 @@ const ListRecipesDocument = `query ListRecipes ($repo: String, $provider: Provid } } } +fragment DependenciesFragment on Dependencies { + dependencies { + type + name + repo + } + wait + application + providers + secrets + wirings { + terraform + helm + } + providerWirings + outputs +} +fragment RecipeConfigurationFragment on RecipeConfiguration { + name + type + default + documentation + optional + placeholder + functionName + condition { + field + operation + value + } + validation { + type + regex + message + } +} fragment RecipeFragment on Recipe { id name @@ -1655,6 +1692,63 @@ fragment RecipeFragment on Recipe { domainKey subdomain } + recipeSections { + ... RecipeSectionFragment + } +} +fragment RecipeSectionFragment on RecipeSection { + index + repository { + ... RepositoryFragment + } + recipeItems { + ... RecipeItemFragment + } + configuration { + ... RecipeConfigurationFragment + } +} +fragment RepositoryFragment on Repository { + id + name + notes + icon + darkIcon + description + publisher { + name + } + recipes { + name + } +} +fragment RecipeItemFragment on RecipeItem { + id + chart { + ... ChartFragment + } + terraform { + ... TerraformFragment + } + configuration { + ... RecipeConfigurationFragment + } +} +fragment ChartFragment on Chart { + id + name + description + latestVersion +} +fragment TerraformFragment on Terraform { + id + name + package + description + dependencies { + ... DependenciesFragment + } + valuesTemplate } ` @@ -1773,6 +1867,99 @@ fragment RecipeFragment on Recipe { domainKey subdomain } + recipeSections { + ... RecipeSectionFragment + } +} +fragment RecipeSectionFragment on RecipeSection { + index + repository { + ... RepositoryFragment + } + recipeItems { + ... RecipeItemFragment + } + configuration { + ... RecipeConfigurationFragment + } +} +fragment RecipeItemFragment on RecipeItem { + id + chart { + ... ChartFragment + } + terraform { + ... TerraformFragment + } + configuration { + ... RecipeConfigurationFragment + } +} +fragment ChartFragment on Chart { + id + name + description + latestVersion +} +fragment RepositoryFragment on Repository { + id + name + notes + icon + darkIcon + description + publisher { + name + } + recipes { + name + } +} +fragment TerraformFragment on Terraform { + id + name + package + description + dependencies { + ... DependenciesFragment + } + valuesTemplate +} +fragment DependenciesFragment on Dependencies { + dependencies { + type + name + repo + } + wait + application + providers + secrets + wirings { + terraform + helm + } + providerWirings + outputs +} +fragment RecipeConfigurationFragment on RecipeConfiguration { + name + type + default + documentation + optional + placeholder + functionName + condition { + field + operation + value + } + validation { + type + regex + message + } } ` @@ -2203,6 +2390,24 @@ const GetTerraformInstallationsDocument = `query GetTerraformInstallations ($id: } } } +fragment VersionFragment on Version { + id + readme + version + valuesTemplate + package + crds { + ... CrdFragment + } + dependencies { + ... DependenciesFragment + } +} +fragment CrdFragment on Crd { + id + name + blob +} fragment TerraformInstallationFragment on TerraformInstallation { id terraform { @@ -2239,24 +2444,6 @@ fragment DependenciesFragment on Dependencies { providerWirings outputs } -fragment VersionFragment on Version { - id - readme - version - valuesTemplate - package - crds { - ... CrdFragment - } - dependencies { - ... DependenciesFragment - } -} -fragment CrdFragment on Crd { - id - name - blob -} ` func (c *Client) GetTerraformInstallations(ctx context.Context, id string, httpRequestOptions ...client.HTTPRequestOption) (*GetTerraformInstallations, error) { diff --git a/graph/models.graphql b/graph/models.graphql index bb0d1fa..d41fd31 100644 --- a/graph/models.graphql +++ b/graph/models.graphql @@ -74,6 +74,7 @@ fragment RecipeFragment on Recipe { domainKey subdomain } + recipeSections { ...RecipeSectionFragment } } fragment RecipeItemFragment on RecipeItem { diff --git a/graph/recipes.graphql b/graph/recipes.graphql index f549a9f..6ef47c5 100644 --- a/graph/recipes.graphql +++ b/graph/recipes.graphql @@ -1,7 +1,6 @@ query GetRecipe($repo: String, $name: String) { recipe(repo: $repo, name: $name) { ...RecipeFragment - recipeSections { ...RecipeSectionFragment } recipeDependencies { ...RecipeFragment } } }