| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- // @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<API.createCredentialResponse>('/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<API.credential>(`/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<API.createCredentialResponse>(`/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<any>(`/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<Record<string, any>>(`/credentials/schema/${param0}`, {
- method: 'GET',
- params: { ...queryParams },
- ...(options || {})
- })
- }
|