* Creates a new module link. * @param {string} workspaceSlug - The unique identifier for the workspace * @param {string} projectId - The unique identifier for the project * @param {string} moduleId - The unique identifier for the module * @param {Partial } data - The module li
(
workspaceSlug: string,
projectId: string,
moduleId: string,
data: Partial<ModuleLink>
)
| 29 | * @throws {Error} When the API request fails |
| 30 | */ |
| 31 | async create( |
| 32 | workspaceSlug: string, |
| 33 | projectId: string, |
| 34 | moduleId: string, |
| 35 | data: Partial<ModuleLink> |
| 36 | ): Promise<ILinkDetails> { |
| 37 | return this.post(`/api/workspaces/${workspaceSlug}/projects/${projectId}/modules/${moduleId}/module-links/`, data) |
| 38 | .then((response) => response?.data) |
| 39 | .catch((error) => { |
| 40 | throw error?.response; |
| 41 | }); |
| 42 | } |
| 43 | |
| 44 | /** |
| 45 | * Updates an existing module link. |