Hierarchy

Methods

  • Create annotations

    const data = {
    pageNumber: 7,
    textRegion: { xMin: 0, xMax: 0.1, yMin: 0, yMax: 0.2 },
    extractedText: 'i am your father',
    };
    const annotation = {
    annotatedResourceType: 'file' as const,
    annotatedResourceId: 1,
    annotationType: 'documents.ExtractedText',
    creatingApp: 'integration-tests',
    creatingAppVersion: '0.0.1',
    creatingUser: 'integration-tests',
    status: 'suggested' as const,
    data,
    };
    const created = await client.annotations.create([annotation]);

    Parameters

    Returns Promise<AnnotationModel[]>

  • Suggest annotations

    const data = {
    pageNumber: 7,
    textRegion: { xMin: 0, xMax: 0.1, yMin: 0, yMax: 0.2 },
    extractedText: 'i am your father',
    };
    const partial = {
    annotatedResourceType: 'file' as const,
    annotatedResourceId: 1,
    annotationType: 'documents.ExtractedText',
    creatingApp: 'integration-tests',
    creatingAppVersion: '0.0.1',
    creatingUser: 'integration-tests',
    data,
    };

    const created = await client.annotations.suggest([partial]);

    Parameters

    Returns Promise<AnnotationModel[]>