# @embedpdf/plugin-stamp — ./contract/host AddAssetInput [InterfaceDeclaration] (from packages/plugin/stamp/src/contract.ts): export interface AddAssetInput{ libraryId?: string; name?: string; label?: string; kind?: StampAssetKind; subject?: string; categories?: string[]; source?: BinarySource; mark?: MarkSource; preview?: BinarySource; size?:{ width: number; height: number} ; } DEFAULT_LIBRARY_KIND [VariableDeclaration] (from packages/plugin/stamp/src/convention.ts): DEFAULT_LIBRARY_KIND = 'stamps' ImportLibraryOptions [InterfaceDeclaration] (from packages/plugin/stamp/src/contract.ts): export interface ImportLibraryOptions{ name?: string; categories?: string[]; kind?: StampAssetKind; libraryKind?: StampLibraryKind; assetName?: (pageIndex: number) => string; } MarkSource [TypeAliasDeclaration] (from packages/plugin/stamp/src/contract.ts): export type MarkSource = |{ kind: 'ink'; strokes: ReadonlyArray>; color?: string; strokeWidth?: number; } |{ kind: 'text'; text: string; fontFamily: string; color?: string; fontSize?: number} |{ kind: 'image'; source: BinarySource} |{ kind: 'pdf'; source: BinarySource; pageIndex?: number} ; StampAction [TypeAliasDeclaration] (from packages/plugin/stamp/src/model.ts): export type StampAction = |{ type: 'LIBRARY_ADDED'; library: StampLibrary} |{ type: 'LIBRARY_UPDATED'; library: StampLibrary} |{ type: 'LIBRARY_REMOVED'; libraryId: string} |{ type: 'ASSET_ADDED'; asset: StampAsset} |{ type: 'ASSET_UPDATED'; asset: StampAsset} |{ type: 'ASSET_REMOVED'; assetId: string} ; StampArmChangedEvent [InterfaceDeclaration] (from packages/plugin/stamp/src/contract.ts): export interface StampArmChangedEvent{ readonly documentId: string; readonly assetId: string | null; } StampAsset [InterfaceDeclaration] (from packages/plugin/stamp/src/contract.ts): export interface StampAsset{ id: string; libraryId: string; kind: StampAssetKind; name: string; label: string; size:{ width: number; height: number} ; page: PageRef; subject?: string; categories?: string[]; } StampAssetEvent [InterfaceDeclaration] (from packages/plugin/stamp/src/contract.ts): export interface StampAssetEvent{ readonly assetId: string; readonly libraryId: string; readonly asset: StampAsset | null; } StampAssetFilter [InterfaceDeclaration] (from packages/plugin/stamp/src/contract.ts): export interface StampAssetFilter{ readonly libraryId?: string; readonly kind?: StampAssetKind; readonly category?: string; } StampAssetKind [TypeAliasDeclaration] (from packages/plugin/stamp/src/contract.ts): export type StampAssetKind = 'stamp' | 'signature' | 'initials'; StampAssetPreview [InterfaceDeclaration] (from packages/plugin/stamp/src/contract.ts): export interface StampAssetPreview{ bytes: Uint8Array; mimeType: string; } StampCapability [InterfaceDeclaration] (from packages/plugin/stamp/src/contract.ts): export interface StampCapability{ listLibraries(filter?: StampLibraryFilter): readonly StampLibrary[]; getLibrary(id: string): StampLibrary | null; listAssets(filter?: StampAssetFilter): readonly StampAsset[]; getAsset(id: string): StampAsset | null; getAssetPreview(id: string): StampAssetPreview | null; renderAssetPreview( id: string, options:{ width: number} & OperationOptions, ): Promise; readAssetBytes(id: string): Uint8Array | null; createLibrary( name: string, options?:{ id?: string; kind?: StampLibraryKind; categories?: string[]} , ): Promise; updateLibrary(id: string, patch:{ name?: string; categories?: string[]} ): Promise; deleteLibrary(id: string): Promise; importLibrary(source: BinarySource, options?: ImportLibraryOptions): Promise; exportLibrary(id: string): Promise; createAsset(input: AddAssetInput): Promise; createAssetFromAnnotations( documentId: string, page: PageRef, refs: readonly AnnotationRef[], input: Omit, ): Promise; updateAsset( id: string, patch:{ label?: string; subject?: string | null; categories?: string[]} , ): Promise; deleteAsset(id: string): Promise; moveAsset(id: string, to:{ libraryId: string} ): Promise; duplicateAsset(id: string, options?:{ label?: string} ): Promise; armAsset(documentId: string, assetId: string, options?:{ targetWidth?: number} ): Promise; disarm(documentId: string): void; getArmedAsset(documentId: string): StampAsset | null; placeAsset( documentId: string, assetId: string, placement: StampPlacement, ): Promise; placeAssetOnPages( documentId: string, assetId: string, pages: readonly PageRef[] | 'all', placement: Omit, options?: OperationOptions, ): Promise>; canPlace(documentId?: string): boolean; canImport(): boolean; readonly onLibraryCreated: EventHook; readonly onLibraryUpdated: EventHook; readonly onLibraryDeleted: EventHook; readonly onAssetCreated: EventHook; readonly onAssetUpdated: EventHook; readonly onAssetDeleted: EventHook; readonly onArmChanged: EventHook; readonly onLibraryChanged: EventHook; } StampConfig [InterfaceDeclaration] (from packages/plugin/stamp/src/contract.ts): export interface StampConfig{ assetEngine?: Engine | (() => Engine | Promise); previewWidth?: number; dynamic?: boolean; } StampHostCapability [TypeAliasDeclaration]: export type StampHostCapability = StampCapability; StampLibrary [InterfaceDeclaration] (from packages/plugin/stamp/src/contract.ts): export interface StampLibrary{ id: string; name: string; kind: StampLibraryKind; locale?: string; categories?: string[]; assetIds: string[]; } StampLibraryChange [InterfaceDeclaration] (from packages/plugin/stamp/src/contract.ts): export interface StampLibraryChange{ libraryId: string; reason: | 'created' | 'imported' | 'updated' | 'asset-added' | 'asset-updated' | 'asset-removed' | 'removed'; } StampLibraryEvent [InterfaceDeclaration] (from packages/plugin/stamp/src/contract.ts): export interface StampLibraryEvent{ readonly libraryId: string; readonly library: StampLibrary | null; } StampLibraryFilter [InterfaceDeclaration] (from packages/plugin/stamp/src/contract.ts): export interface StampLibraryFilter{ readonly kind?: StampLibraryKind | readonly StampLibraryKind[]; } StampLibraryKind [TypeAliasDeclaration] (from packages/plugin/stamp/src/contract.ts): export type StampLibraryKind = string; StampLibraryStore [InterfaceDeclaration] (from packages/plugin/stamp/src/persistence.ts): export interface StampLibraryStore{ list(): Promise>; put(id: string, bytes: Uint8Array): Promise; delete(id: string): Promise; } StampState [InterfaceDeclaration] (from packages/plugin/stamp/src/model.ts): export interface StampState{ libraries: Record; libraryOrder: string[]; assets: Record; } StampToken [VariableDeclaration] (from packages/plugin/stamp/src/token.ts): StampToken = createCapabilityToken('stamp', { hint: `add stampPlugin() from '@embedpdf/plugin-stamp' to your plugins list`, } )