const annotationIds: InternalId[] = [1,2];
await client.annotations.delete(annotationIds);
const limitOne = await client.annotations.list({ limit: 1, filter: fileFilter(annotatedFileId), });
const annotationIds: InternalId[] = [1,2];
const response = await client.annotations.retrieve(annotationIds);
Reverse lookup const assetQueryData = { limit: -1, filter: { annotatedResourceType: 'file', annotationType: 'images.AssetLink', data: { assetRef: { id: 123 } } } };
const resourceIdsResponse = this._client.annotations.reverseLookup(assetQuerydata);
const data = { pageNumber: 7, textRegion: { xMin: 0, xMax: 0.1, yMin: 0, yMax: 0.2 }, extractedText: 'i am your father', }; const partial: AnnotationSuggest = { annotatedResourceType: 'file', annotatedResourceId: 1, annotationType: 'documents.ExtractedText', creatingApp: 'integration-tests', creatingAppVersion: '0.0.1', creatingUser: 'integration-tests', data, };
const created = await client.annotations.suggest([partial]);
const data = { pageNumber: 8, fileRef: { externalId: 'def_file_changed' }, textRegion: { xMin: 0, xMax: 0.1, yMin: 0, yMax: 0.2 }, }; const changes: AnnotationChangeById[] = [ { id: 1, update: { data: { set: data, }, }, }, ];
const updatedResp = await client.annotations.update(changes);
Create annotations
const data = { pageNumber: 7, textRegion: { xMin: 0, xMax: 0.1, yMin: 0, yMax: 0.2 }, extractedText: 'i am your father', }; const partial: AnnotationCreate = { annotatedResourceType: 'file', annotatedResourceId: 1, annotationType: 'documents.ExtractedText', creatingApp: 'integration-tests', creatingAppVersion: '0.0.1', creatingUser: 'integration-tests', status: 'suggested', data, };
const created = await client.annotations.create([partial]);