//native
/**
* Edit a helm repository
*
*/
export async function main(
auth: RT.Qovery,
organizationId: string,
helmRepositoryId: string,
body: Body
) {
const url = new URL(
`https://api.qovery.com/organization/${organizationId}/helmRepository/${helmRepositoryId}`
)
const response = await fetch(url, {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
Authorization: 'Token ' + auth.apiKey
},
body: JSON.stringify(body)
})
if (!response.ok) {
const text = await response.text()
throw new Error(`${response.status} ${text}`)
}
return await response.json()
}
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export interface Body {
name: string
/**
* The type of your helm repository
*/
kind:
| 'HTTPS'
| 'OCI_ECR'
| 'OCI_SCALEWAY_CR'
| 'OCI_DOCKER_HUB'
| 'OCI_PUBLIC_ECR'
| 'OCI_GENERIC_CR'
| 'OCI_GITHUB_CR'
| 'OCI_GITLAB_CR'
description?: string
/**
* URL of the helm chart repository:
* * For `OCI`: it must start by oci://
* * For `HTTPS`: it must be start by https://
*
*/
url?: string
/**
* Bypass tls certificate verification when connecting to repository
*/
skip_tls_verification: boolean
config: {
/**
* Required if the repository is private
*/
username?: string
/**
* Required if the repository is private
*/
password?: string
/**
* Required if kind is `ECR` or `PUBLIC_ECR`
*/
access_key_id?: string
/**
* Required if kind is `ECR` or `PUBLIC_ECR`
*/
secret_access_key?: string
/**
* Required if kind is `ECR` or `SCALEWAY_CR`
*/
region?: string
/**
* Required if kind is `SCALEWAY_CR`
*/
scaleway_access_key?: string
/**
* Required if kind is `SCALEWAY_CR`
*/
scaleway_secret_key?: string
/**
* Required if kind is `SCALEWAY_CR`
*/
scaleway_project_id?: string
/**
* Required if kind is `AZURE_CR`.
*/
azure_tenant_id?: string
/**
* Required if kind is `AZURE_CR`.
*/
azure_subscription_id?: string
[k: string]: unknown
}
[k: string]: unknown
}
Submitted by hugo697 235 days ago