2026-10-08 22:27:19 +00:00
|
|
|
import type { RelationshipInputDTO } from "../../../../common/relationships";
|
|
|
|
|
import { RelationshipResponseSchema } from "../../../../common/relationships";
|
|
|
|
|
import { inventoryRequest } from "../../../shared/api/inventory-request";
|
|
|
|
|
|
2026-10-10 10:42:56 +00:00
|
|
|
export async function createAssetRelationship(companyId: string, values: RelationshipInputDTO) {
|
2026-10-08 22:27:19 +00:00
|
|
|
return RelationshipResponseSchema.parse(
|
2026-10-10 10:42:56 +00:00
|
|
|
await inventoryRequest(`${companyId}/relationships`, { values })
|
2026-10-08 22:27:19 +00:00
|
|
|
);
|
|
|
|
|
}
|