// @ts-ignore /* eslint-disable */ import request from '@repo/api-client' /** Create a credential Creates a credential that can be used by nodes of the specified type. POST /credentials */ export async function postCredentials(body: API.credential, options?: { [key: string]: any }) { return request('/credentials', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) }) } /** Delete credential by ID Deletes a credential from your instance. You must be the owner of the credentials DELETE /credentials/${param0} */ export async function deleteCredential( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.deleteCredentialParams, options?: { [key: string]: any } ) { const { id: param0, ...queryParams } = params return request(`/credentials/${param0}`, { method: 'DELETE', params: { ...queryParams }, ...(options || {}) }) } /** Update credential by ID Updates an existing credential. You must be the owner of the credential. PATCH /credentials/${param0} */ export async function updateCredential( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.updateCredentialParams, body: API.updateCredentialRequest, options?: { [key: string]: any } ) { const { id: param0, ...queryParams } = params return request(`/credentials/${param0}`, { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, params: { ...queryParams }, data: body, ...(options || {}) }) } /** Transfer a credential to another project. Transfer a credential to another project. PUT /credentials/${param0}/transfer */ export async function putCredentialsIdTransfer( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.putCredentialsIdTransferParams, body: { /** The ID of the project to transfer the credential to. */ destinationProjectId: string }, options?: { [key: string]: any } ) { const { id: param0, ...queryParams } = params return request(`/credentials/${param0}/transfer`, { method: 'PUT', headers: { 'Content-Type': 'application/json' }, params: { ...queryParams }, data: body, ...(options || {}) }) } /** Show credential data schema GET /credentials/schema/${param0} */ export async function getCredentialsSchemaCredentialTypeName( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.getCredentialsSchemaCredentialTypeNameParams, options?: { [key: string]: any } ) { const { credentialTypeName: param0, ...queryParams } = params return request>(`/credentials/schema/${param0}`, { method: 'GET', params: { ...queryParams }, ...(options || {}) }) }