mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-10 20:37:29 -08:00
14 lines
449 B
TypeScript
14 lines
449 B
TypeScript
|
import {
|
||
|
ICredentialsResponse,
|
||
|
IRestApiContext,
|
||
|
IShareCredentialsPayload,
|
||
|
} from '@/Interface';
|
||
|
import { makeRestApiRequest } from './helpers';
|
||
|
import {
|
||
|
IDataObject,
|
||
|
} from 'n8n-workflow';
|
||
|
|
||
|
export async function setCredentialSharedWith(context: IRestApiContext, id: string, data: IShareCredentialsPayload): Promise<ICredentialsResponse> {
|
||
|
return makeRestApiRequest(context, 'PUT', `/credentials/${id}/share`, data as unknown as IDataObject);
|
||
|
}
|