Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
import { storageServiceClient } from '@service-storage/client';
import type { CreateUnthreadedAnchorRequest } from '@service-storage/generated/schemas/createUnthreadedAnchorRequest';
export async function getPdfAnchors(documentId: string) {
const result = await storageServiceClient.annotations.getAnchors({
documentId,
});
return result.isOk() ? result.value.data : [];
}
export async function createPdfAnchor(
documentId: string,
body: CreateUnthreadedAnchorRequest
) {
const result = await storageServiceClient.annotations.createAnchor({
documentId,
body,
});
if (result.isErr()) {
console.error('Unable to create anchor');
return null;
}
return result.value;
}