@semiont/api-client 0.2.28-build.37 → 0.2.28-build.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/dist/{index-DHh0ToZB.d.ts → index--2zlsZdR.d.ts} +269 -23
- package/dist/index.d.ts +2 -2
- package/dist/index.js +379 -36
- package/dist/index.js.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +379 -36
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# @semiont/api-client
|
|
2
2
|
|
|
3
|
+
[](https://github.com/The-AI-Alliance/semiont/actions/workflows/package-tests.yml?query=branch%3Amain+is%3Asuccess+job%3A%22Test+api-client%22)
|
|
3
4
|
[](https://www.npmjs.com/package/@semiont/api-client)
|
|
4
5
|
[](https://www.npmjs.com/package/@semiont/api-client)
|
|
5
6
|
[](https://github.com/The-AI-Alliance/semiont/blob/main/LICENSE)
|
|
@@ -104,12 +105,15 @@ const client = new SemiontApiClient({
|
|
|
104
105
|
|
|
105
106
|
📖 **[API Reference](./docs/API-Reference.md)** - Complete method documentation
|
|
106
107
|
|
|
108
|
+
🛠️ **[Utilities Guide](./docs/Utilities.md)** - Text encoding, fuzzy anchoring, SVG utilities
|
|
109
|
+
|
|
107
110
|
## Key Features
|
|
108
111
|
|
|
109
112
|
- **Type-safe** - Generated from OpenAPI spec with branded types
|
|
110
|
-
- **W3C compliant** - Web Annotation standard
|
|
113
|
+
- **W3C compliant** - Web Annotation standard with fuzzy text matching
|
|
111
114
|
- **Real-time** - SSE streaming for long operations
|
|
112
|
-
- **Framework-agnostic** -
|
|
115
|
+
- **Framework-agnostic** - Pure TypeScript utilities work everywhere
|
|
116
|
+
- **Character encoding** - Proper UTF-8, ISO-8859-1, Windows-1252 support
|
|
113
117
|
|
|
114
118
|
## Use Cases
|
|
115
119
|
|
|
@@ -3314,14 +3314,6 @@ declare function getTargetSelector(target: Annotation$1['target']): {
|
|
|
3314
3314
|
* Check if target has a selector
|
|
3315
3315
|
*/
|
|
3316
3316
|
declare function hasTargetSelector(target: Annotation$1['target']): boolean;
|
|
3317
|
-
/**
|
|
3318
|
-
* Extract entity types from annotation bodies
|
|
3319
|
-
* Entity types are stored as TextualBody with purpose: "tagging"
|
|
3320
|
-
* Accepts any object with a body property matching Annotation['body']
|
|
3321
|
-
*/
|
|
3322
|
-
declare function getEntityTypes(annotation: {
|
|
3323
|
-
body: Annotation$1['body'];
|
|
3324
|
-
}): string[];
|
|
3325
3317
|
/**
|
|
3326
3318
|
* Type guard to check if an annotation is a highlight
|
|
3327
3319
|
*/
|
|
@@ -3348,20 +3340,6 @@ declare function isTag(annotation: Annotation$1): annotation is Annotation$1;
|
|
|
3348
3340
|
* @returns The comment text, or undefined if not a comment or no text found
|
|
3349
3341
|
*/
|
|
3350
3342
|
declare function getCommentText(annotation: Annotation$1): string | undefined;
|
|
3351
|
-
/**
|
|
3352
|
-
* Extract tag category from a tag annotation's body
|
|
3353
|
-
* Tags use dual-body structure: first body has purpose: "tagging" with category value
|
|
3354
|
-
* @param annotation - The annotation to extract category from
|
|
3355
|
-
* @returns The tag category (e.g., "Issue", "Rule"), or undefined if not a tag or no category found
|
|
3356
|
-
*/
|
|
3357
|
-
declare function getTagCategory(annotation: Annotation$1): string | undefined;
|
|
3358
|
-
/**
|
|
3359
|
-
* Extract tag schema ID from a tag annotation's body
|
|
3360
|
-
* Tags use dual-body structure: second body has purpose: "classifying" with schema ID
|
|
3361
|
-
* @param annotation - The annotation to extract schema ID from
|
|
3362
|
-
* @returns The schema ID (e.g., "legal-irac"), or undefined if not a tag or no schema found
|
|
3363
|
-
*/
|
|
3364
|
-
declare function getTagSchemaId(annotation: Annotation$1): string | undefined;
|
|
3365
3343
|
/**
|
|
3366
3344
|
* Type guard to check if a reference annotation is a stub (unresolved)
|
|
3367
3345
|
* Stub if no SpecificResource in body array
|
|
@@ -3507,6 +3485,45 @@ interface ResourceCreationDetails {
|
|
|
3507
3485
|
*/
|
|
3508
3486
|
declare function getResourceCreationDetails(event: StoredEvent): ResourceCreationDetails | null;
|
|
3509
3487
|
|
|
3488
|
+
/**
|
|
3489
|
+
* Fuzzy Anchoring for W3C Web Annotation TextQuoteSelector
|
|
3490
|
+
*
|
|
3491
|
+
* Uses prefix/suffix context to disambiguate when the same text appears multiple times.
|
|
3492
|
+
* Implements fuzzy matching as specified in the W3C Web Annotation Data Model.
|
|
3493
|
+
*
|
|
3494
|
+
* @see https://www.w3.org/TR/annotation-model/#text-quote-selector
|
|
3495
|
+
*/
|
|
3496
|
+
interface TextPosition {
|
|
3497
|
+
start: number;
|
|
3498
|
+
end: number;
|
|
3499
|
+
}
|
|
3500
|
+
/**
|
|
3501
|
+
* Find text using exact match with optional prefix/suffix context
|
|
3502
|
+
*
|
|
3503
|
+
* When the exact text appears multiple times in the content, prefix and suffix
|
|
3504
|
+
* are used to disambiguate and find the correct occurrence.
|
|
3505
|
+
*
|
|
3506
|
+
* @param content - Full text content to search within
|
|
3507
|
+
* @param exact - The exact text to find
|
|
3508
|
+
* @param prefix - Optional text that should appear immediately before the match
|
|
3509
|
+
* @param suffix - Optional text that should appear immediately after the match
|
|
3510
|
+
* @returns Position of the matched text, or null if not found
|
|
3511
|
+
*
|
|
3512
|
+
* @example
|
|
3513
|
+
* ```typescript
|
|
3514
|
+
* const content = "The cat sat. The cat ran.";
|
|
3515
|
+
* // Find second "The cat" occurrence
|
|
3516
|
+
* const pos = findTextWithContext(content, "The cat", "sat. ", " ran");
|
|
3517
|
+
* // Returns { start: 13, end: 20 }
|
|
3518
|
+
* ```
|
|
3519
|
+
*/
|
|
3520
|
+
declare function findTextWithContext(content: string, exact: string, prefix?: string, suffix?: string): TextPosition | null;
|
|
3521
|
+
/**
|
|
3522
|
+
* Verify that a position correctly points to the exact text
|
|
3523
|
+
* Useful for debugging and validation
|
|
3524
|
+
*/
|
|
3525
|
+
declare function verifyPosition(content: string, position: TextPosition, expectedExact: string): boolean;
|
|
3526
|
+
|
|
3510
3527
|
/**
|
|
3511
3528
|
* Locale information
|
|
3512
3529
|
* Copied from SDK for frontend use
|
|
@@ -3570,6 +3587,235 @@ declare function getChecksum(resource: ResourceDescriptor | undefined): string |
|
|
|
3570
3587
|
* Get the language from the primary representation
|
|
3571
3588
|
*/
|
|
3572
3589
|
declare function getLanguage(resource: ResourceDescriptor | undefined): string | undefined;
|
|
3590
|
+
/**
|
|
3591
|
+
* Get storage URI from primary representation
|
|
3592
|
+
*
|
|
3593
|
+
* @param resource - ResourceDescriptor
|
|
3594
|
+
* @returns Storage URI or undefined
|
|
3595
|
+
*/
|
|
3596
|
+
declare function getStorageUri(resource: ResourceDescriptor | undefined): string | undefined;
|
|
3597
|
+
/**
|
|
3598
|
+
* Get creator agent from wasAttributedTo
|
|
3599
|
+
* Handles both single agent and array of agents
|
|
3600
|
+
*
|
|
3601
|
+
* @param resource - ResourceDescriptor
|
|
3602
|
+
* @returns First agent or undefined
|
|
3603
|
+
*/
|
|
3604
|
+
declare function getCreator(resource: ResourceDescriptor | undefined): components['schemas']['Agent'] | undefined;
|
|
3605
|
+
/**
|
|
3606
|
+
* Get derived-from URI
|
|
3607
|
+
* Handles both single URI and array of URIs
|
|
3608
|
+
*
|
|
3609
|
+
* @param resource - ResourceDescriptor
|
|
3610
|
+
* @returns First derivation URI or undefined
|
|
3611
|
+
*/
|
|
3612
|
+
declare function getDerivedFrom(resource: ResourceDescriptor | undefined): string | undefined;
|
|
3613
|
+
/**
|
|
3614
|
+
* Check if resource is archived (application-specific field)
|
|
3615
|
+
*
|
|
3616
|
+
* @param resource - ResourceDescriptor
|
|
3617
|
+
* @returns True if archived, false otherwise
|
|
3618
|
+
*/
|
|
3619
|
+
declare function isArchived(resource: ResourceDescriptor | undefined): boolean;
|
|
3620
|
+
/**
|
|
3621
|
+
* Get entity types from resource (application-specific field)
|
|
3622
|
+
*
|
|
3623
|
+
* @param resource - ResourceDescriptor
|
|
3624
|
+
* @returns Array of entity types, empty if not set
|
|
3625
|
+
*/
|
|
3626
|
+
declare function getResourceEntityTypes(resource: ResourceDescriptor | undefined): string[];
|
|
3627
|
+
/**
|
|
3628
|
+
* Check if resource is a draft (application-specific field)
|
|
3629
|
+
*
|
|
3630
|
+
* @param resource - ResourceDescriptor
|
|
3631
|
+
* @returns True if draft, false otherwise
|
|
3632
|
+
*/
|
|
3633
|
+
declare function isDraft(resource: ResourceDescriptor | undefined): boolean;
|
|
3634
|
+
/**
|
|
3635
|
+
* Map charset names to Node.js Buffer encoding names
|
|
3636
|
+
* Node.js Buffer.toString() supports: 'utf8', 'utf16le', 'latin1', 'base64', 'hex', 'ascii', 'binary', 'ucs2'
|
|
3637
|
+
*
|
|
3638
|
+
* @param charset - Charset name (e.g., "UTF-8", "ISO-8859-1", "Windows-1252")
|
|
3639
|
+
* @returns Node.js BufferEncoding
|
|
3640
|
+
*/
|
|
3641
|
+
declare function getNodeEncoding(charset: string): BufferEncoding;
|
|
3642
|
+
/**
|
|
3643
|
+
* Decode a representation buffer to string using the correct charset
|
|
3644
|
+
* Extracts charset from media type and uses appropriate encoding
|
|
3645
|
+
*
|
|
3646
|
+
* @param buffer - The raw representation data
|
|
3647
|
+
* @param mediaType - Media type with optional charset (e.g., "text/plain; charset=iso-8859-1")
|
|
3648
|
+
* @returns Decoded string
|
|
3649
|
+
*
|
|
3650
|
+
* @example
|
|
3651
|
+
* ```typescript
|
|
3652
|
+
* const content = decodeRepresentation(buffer, "text/plain; charset=utf-8");
|
|
3653
|
+
* const legacy = decodeRepresentation(buffer, "text/plain; charset=windows-1252");
|
|
3654
|
+
* ```
|
|
3655
|
+
*/
|
|
3656
|
+
declare function decodeRepresentation(buffer: Buffer, mediaType: string): string;
|
|
3657
|
+
|
|
3658
|
+
/**
|
|
3659
|
+
* SVG Utility Functions
|
|
3660
|
+
*
|
|
3661
|
+
* Utilities for creating, parsing, and manipulating W3C-compliant SVG selectors
|
|
3662
|
+
* for image annotation.
|
|
3663
|
+
*/
|
|
3664
|
+
interface Point {
|
|
3665
|
+
x: number;
|
|
3666
|
+
y: number;
|
|
3667
|
+
}
|
|
3668
|
+
interface BoundingBox {
|
|
3669
|
+
x: number;
|
|
3670
|
+
y: number;
|
|
3671
|
+
width: number;
|
|
3672
|
+
height: number;
|
|
3673
|
+
}
|
|
3674
|
+
/**
|
|
3675
|
+
* Create W3C-compliant SVG rectangle selector
|
|
3676
|
+
*/
|
|
3677
|
+
declare function createRectangleSvg(start: Point, end: Point): string;
|
|
3678
|
+
/**
|
|
3679
|
+
* Create W3C-compliant SVG polygon selector
|
|
3680
|
+
*/
|
|
3681
|
+
declare function createPolygonSvg(points: Point[]): string;
|
|
3682
|
+
/**
|
|
3683
|
+
* Create W3C-compliant SVG circle selector
|
|
3684
|
+
*/
|
|
3685
|
+
declare function createCircleSvg(center: Point, radius: number): string;
|
|
3686
|
+
/**
|
|
3687
|
+
* Parse SVG selector to extract shape type and data
|
|
3688
|
+
*/
|
|
3689
|
+
declare function parseSvgSelector(svg: string): {
|
|
3690
|
+
type: 'rect' | 'polygon' | 'circle' | 'path';
|
|
3691
|
+
data: any;
|
|
3692
|
+
} | null;
|
|
3693
|
+
/**
|
|
3694
|
+
* Normalize coordinates from display space to image native resolution
|
|
3695
|
+
*/
|
|
3696
|
+
declare function normalizeCoordinates(point: Point, displayWidth: number, displayHeight: number, imageWidth: number, imageHeight: number): Point;
|
|
3697
|
+
/**
|
|
3698
|
+
* Scale entire SVG selector from display space to image native resolution
|
|
3699
|
+
*/
|
|
3700
|
+
declare function scaleSvgToNative(svg: string, displayWidth: number, displayHeight: number, imageWidth: number, imageHeight: number): string;
|
|
3701
|
+
|
|
3702
|
+
/**
|
|
3703
|
+
* Text context extraction utilities for W3C Web Annotation TextQuoteSelector
|
|
3704
|
+
*
|
|
3705
|
+
* Provides robust prefix/suffix context extraction with word boundary detection
|
|
3706
|
+
* to ensure fuzzy anchoring works correctly when the same text appears multiple times.
|
|
3707
|
+
*
|
|
3708
|
+
* Also provides AI offset validation and correction for handling AI-generated annotations
|
|
3709
|
+
* where the model may return slightly incorrect character offsets.
|
|
3710
|
+
*
|
|
3711
|
+
* @see https://www.w3.org/TR/annotation-model/#text-quote-selector
|
|
3712
|
+
*/
|
|
3713
|
+
/**
|
|
3714
|
+
* Extract prefix and suffix context for TextQuoteSelector
|
|
3715
|
+
*
|
|
3716
|
+
* Extracts up to 64 characters before and after the selected text,
|
|
3717
|
+
* extending to word boundaries to avoid cutting words in half.
|
|
3718
|
+
* This ensures prefix/suffix are meaningful context for fuzzy anchoring.
|
|
3719
|
+
*
|
|
3720
|
+
* @param content - Full text content
|
|
3721
|
+
* @param start - Start offset of selection
|
|
3722
|
+
* @param end - End offset of selection
|
|
3723
|
+
* @returns Object with prefix and suffix (undefined if at boundaries)
|
|
3724
|
+
*
|
|
3725
|
+
* @example
|
|
3726
|
+
* ```typescript
|
|
3727
|
+
* const content = "The United States Congress...";
|
|
3728
|
+
* const context = extractContext(content, 4, 17); // "United States"
|
|
3729
|
+
* // Returns: { prefix: "The ", suffix: " Congress..." }
|
|
3730
|
+
* // NOT: { prefix: "nited ", suffix: "gress..." }
|
|
3731
|
+
* ```
|
|
3732
|
+
*/
|
|
3733
|
+
declare function extractContext(content: string, start: number, end: number): {
|
|
3734
|
+
prefix?: string;
|
|
3735
|
+
suffix?: string;
|
|
3736
|
+
};
|
|
3737
|
+
/**
|
|
3738
|
+
* Result of validating and correcting AI-provided annotation offsets
|
|
3739
|
+
*/
|
|
3740
|
+
interface ValidatedAnnotation {
|
|
3741
|
+
start: number;
|
|
3742
|
+
end: number;
|
|
3743
|
+
exact: string;
|
|
3744
|
+
prefix?: string;
|
|
3745
|
+
suffix?: string;
|
|
3746
|
+
corrected: boolean;
|
|
3747
|
+
fuzzyMatched?: boolean;
|
|
3748
|
+
matchQuality?: 'exact' | 'case-insensitive' | 'fuzzy';
|
|
3749
|
+
}
|
|
3750
|
+
/**
|
|
3751
|
+
* Validate and correct AI-provided annotation offsets with fuzzy matching tolerance
|
|
3752
|
+
*
|
|
3753
|
+
* AI models sometimes return offsets that don't match the actual text position,
|
|
3754
|
+
* or provide text with minor variations (case differences, whitespace, typos).
|
|
3755
|
+
*
|
|
3756
|
+
* This function uses a multi-strategy approach:
|
|
3757
|
+
* 1. Check if AI's offsets are exactly correct
|
|
3758
|
+
* 2. Try exact case-sensitive search
|
|
3759
|
+
* 3. Try case-insensitive search
|
|
3760
|
+
* 4. Try fuzzy matching with Levenshtein distance (5% tolerance)
|
|
3761
|
+
*
|
|
3762
|
+
* This ensures we're maximally tolerant of AI errors while still maintaining
|
|
3763
|
+
* annotation quality and logging what corrections were made.
|
|
3764
|
+
*
|
|
3765
|
+
* @param content - Full text content
|
|
3766
|
+
* @param aiStart - Start offset from AI
|
|
3767
|
+
* @param aiEnd - End offset from AI
|
|
3768
|
+
* @param exact - The exact text that should be at this position (from AI)
|
|
3769
|
+
* @returns Validated annotation with corrected offsets and context
|
|
3770
|
+
* @throws Error if no acceptable match can be found
|
|
3771
|
+
*
|
|
3772
|
+
* @example
|
|
3773
|
+
* ```typescript
|
|
3774
|
+
* // AI said start=1143, but actual text is at 1161
|
|
3775
|
+
* const result = validateAndCorrectOffsets(
|
|
3776
|
+
* content,
|
|
3777
|
+
* 1143,
|
|
3778
|
+
* 1289,
|
|
3779
|
+
* "the question \"whether..."
|
|
3780
|
+
* );
|
|
3781
|
+
* // Returns: { start: 1161, end: 1303, exact: "...", corrected: true, matchQuality: 'exact', ... }
|
|
3782
|
+
* ```
|
|
3783
|
+
*/
|
|
3784
|
+
declare function validateAndCorrectOffsets(content: string, aiStart: number, aiEnd: number, exact: string): ValidatedAnnotation;
|
|
3785
|
+
|
|
3786
|
+
/**
|
|
3787
|
+
* Text encoding utilities for consistent charset handling
|
|
3788
|
+
*
|
|
3789
|
+
* Ensures frontend decoding matches backend decoding by respecting
|
|
3790
|
+
* charset parameters in mediaType (e.g., "text/plain; charset=iso-8859-1")
|
|
3791
|
+
*/
|
|
3792
|
+
/**
|
|
3793
|
+
* Extract charset from mediaType parameter
|
|
3794
|
+
*
|
|
3795
|
+
* @param mediaType - Media type with optional charset (e.g., "text/plain; charset=utf-8")
|
|
3796
|
+
* @returns Charset name in lowercase (defaults to "utf-8")
|
|
3797
|
+
*
|
|
3798
|
+
* @example
|
|
3799
|
+
* extractCharset("text/plain; charset=iso-8859-1") // "iso-8859-1"
|
|
3800
|
+
* extractCharset("text/plain") // "utf-8"
|
|
3801
|
+
*/
|
|
3802
|
+
declare function extractCharset(mediaType: string): string;
|
|
3803
|
+
/**
|
|
3804
|
+
* Decode ArrayBuffer to string using charset from mediaType
|
|
3805
|
+
*
|
|
3806
|
+
* Uses TextDecoder with the charset extracted from mediaType parameter.
|
|
3807
|
+
* This ensures the same character space is used for both annotation creation
|
|
3808
|
+
* (backend) and rendering (frontend).
|
|
3809
|
+
*
|
|
3810
|
+
* @param buffer - Binary data to decode
|
|
3811
|
+
* @param mediaType - Media type with optional charset parameter
|
|
3812
|
+
* @returns Decoded string in the original character space
|
|
3813
|
+
*
|
|
3814
|
+
* @example
|
|
3815
|
+
* const buffer = new Uint8Array([...]);
|
|
3816
|
+
* const text = decodeWithCharset(buffer, "text/plain; charset=iso-8859-1");
|
|
3817
|
+
*/
|
|
3818
|
+
declare function decodeWithCharset(buffer: ArrayBuffer, mediaType: string): string;
|
|
3573
3819
|
|
|
3574
3820
|
/**
|
|
3575
3821
|
* Generic validation utilities for @semiont/api-client
|
|
@@ -3628,4 +3874,4 @@ declare function validateData<T>(schema: {
|
|
|
3628
3874
|
*/
|
|
3629
3875
|
declare function isValidEmail(email: string): boolean;
|
|
3630
3876
|
|
|
3631
|
-
export { type $defs as $, type AccessToken as A, type BaseUrl as B, type ContentFormat as C,
|
|
3877
|
+
export { type $defs as $, type AccessToken as A, type BaseUrl as B, type ContentFormat as C, getExactText as D, type EntityType as E, getAnnotationExactText as F, type GoogleCredential as G, getPrimarySelector as H, getTextPositionSelector as I, type JobId as J, getTextQuoteSelector as K, getSvgSelector as L, type Motivation as M, validateSvgMarkup as N, extractBoundingBox as O, type StoredEvent as P, type EventMetadata as Q, type ResourceUri as R, type SearchQuery as S, type TextPositionSelector as T, type UserDID as U, type ResourceEventType as V, getAnnotationUriFromEvent as W, isEventRelatedToAnnotation as X, isResourceEvent as Y, formatEventType as Z, getEventEmoji as _, type AnnotationUri as a, resourceAnnotationUri as a$, formatRelativeTime as a0, getEventDisplayContent as a1, getEventEntityTypes as a2, type ResourceCreationDetails as a3, getResourceCreationDetails as a4, type TextPosition as a5, findTextWithContext as a6, verifyPosition as a7, type LocaleInfo as a8, LOCALES as a9, extractContext as aA, type ValidatedAnnotation as aB, validateAndCorrectOffsets as aC, extractCharset as aD, decodeWithCharset as aE, type ValidationSuccess as aF, type ValidationFailure as aG, type ValidationResult as aH, JWTTokenSchema as aI, validateData as aJ, isValidEmail as aK, type AuthCode as aL, type MCPToken as aM, email as aN, authCode as aO, googleCredential as aP, accessToken as aQ, refreshToken as aR, mcpToken as aS, cloneToken as aT, jobId as aU, userDID as aV, entityType as aW, searchQuery as aX, baseUrl as aY, resourceUri as aZ, annotationUri as a_, getLocaleInfo as aa, getLocaleNativeName as ab, getLocaleEnglishName as ac, formatLocaleDisplay as ad, getAllLocaleCodes as ae, getResourceId as af, getPrimaryRepresentation as ag, getPrimaryMediaType as ah, getChecksum as ai, getLanguage as aj, getStorageUri as ak, getCreator as al, getDerivedFrom as am, isArchived as an, getResourceEntityTypes as ao, isDraft as ap, getNodeEncoding as aq, decodeRepresentation as ar, type Point as as, type BoundingBox as at, createRectangleSvg as au, createPolygonSvg as av, createCircleSvg as aw, parseSvgSelector as ax, normalizeCoordinates as ay, scaleSvgToNative as az, type Email as b, type ResourceEvent as b0, type components as c, type RefreshToken as d, type CloneToken as e, type ResourceAnnotationUri as f, type TextQuoteSelector as g, type SvgSelector as h, type Selector as i, getBodySource as j, getBodyType as k, isBodyResolved as l, getTargetSource as m, getTargetSelector as n, type operations as o, type paths as p, hasTargetSelector as q, isHighlight as r, isReference as s, isAssessment as t, isComment as u, isTag as v, type webhooks as w, getCommentText as x, isStubReference as y, isResolvedReference as z };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BaseUrl, A as AccessToken, R as ResourceUri, E as EntityType, a as AnnotationUri, c as components, b as Email, p as paths, d as RefreshToken, G as GoogleCredential, C as ContentFormat, S as SearchQuery, e as CloneToken, f as ResourceAnnotationUri, M as Motivation, U as UserDID, J as JobId } from './index
|
|
2
|
-
export { $ as $defs,
|
|
1
|
+
import { B as BaseUrl, A as AccessToken, R as ResourceUri, E as EntityType, a as AnnotationUri, c as components, b as Email, p as paths, d as RefreshToken, G as GoogleCredential, C as ContentFormat, S as SearchQuery, e as CloneToken, f as ResourceAnnotationUri, M as Motivation, U as UserDID, J as JobId } from './index--2zlsZdR.js';
|
|
2
|
+
export { $ as $defs, aL as AuthCode, at as BoundingBox, Q as EventMetadata, aI as JWTTokenSchema, a9 as LOCALES, a8 as LocaleInfo, aM as MCPToken, as as Point, a3 as ResourceCreationDetails, V as ResourceEventType, i as Selector, P as StoredEvent, h as SvgSelector, a5 as TextPosition, T as TextPositionSelector, g as TextQuoteSelector, aB as ValidatedAnnotation, aG as ValidationFailure, aH as ValidationResult, aF as ValidationSuccess, aQ as accessToken, a_ as annotationUri, aO as authCode, aY as baseUrl, aT as cloneToken, aw as createCircleSvg, av as createPolygonSvg, au as createRectangleSvg, ar as decodeRepresentation, aE as decodeWithCharset, aN as email, aW as entityType, O as extractBoundingBox, aD as extractCharset, aA as extractContext, a6 as findTextWithContext, Z as formatEventType, ad as formatLocaleDisplay, a0 as formatRelativeTime, ae as getAllLocaleCodes, F as getAnnotationExactText, W as getAnnotationUriFromEvent, j as getBodySource, k as getBodyType, ai as getChecksum, x as getCommentText, al as getCreator, am as getDerivedFrom, a1 as getEventDisplayContent, _ as getEventEmoji, a2 as getEventEntityTypes, D as getExactText, aj as getLanguage, ac as getLocaleEnglishName, aa as getLocaleInfo, ab as getLocaleNativeName, aq as getNodeEncoding, ah as getPrimaryMediaType, ag as getPrimaryRepresentation, H as getPrimarySelector, a4 as getResourceCreationDetails, ao as getResourceEntityTypes, af as getResourceId, ak as getStorageUri, L as getSvgSelector, n as getTargetSelector, m as getTargetSource, I as getTextPositionSelector, K as getTextQuoteSelector, aP as googleCredential, q as hasTargetSelector, an as isArchived, t as isAssessment, l as isBodyResolved, u as isComment, ap as isDraft, X as isEventRelatedToAnnotation, r as isHighlight, s as isReference, z as isResolvedReference, Y as isResourceEvent, y as isStubReference, v as isTag, aK as isValidEmail, aU as jobId, aS as mcpToken, ay as normalizeCoordinates, o as operations, ax as parseSvgSelector, aR as refreshToken, a$ as resourceAnnotationUri, aZ as resourceUri, az as scaleSvgToNative, aX as searchQuery, aV as userDID, aC as validateAndCorrectOffsets, aJ as validateData, N as validateSvgMarkup, a7 as verifyPosition, w as webhooks } from './index--2zlsZdR.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* TypeScript types for Server-Sent Events (SSE) streaming
|