コンテンツにスキップ

@alneas/business-jp API リファレンス

@alneas/business-jp API リファレンス

Section titled “@alneas/business-jp API リファレンス”

【未翻訳】Exported symbol legalDocument

export const legalDocument

【未翻訳】Exported symbol notifications

export const notifications

【未翻訳】Resolves the label (typically family name) to display on a fallback seal.

Priority order:

  1. options.sealLabel
  2. options.familyName
  3. fullName parsing (applying nameOrder rule)

When nameOrder: "auto":

  • Names containing CJK characters: use first token
  • 2 or more Latin words: use last token
  • Otherwise: use first token
export function resolveSealLabel(fullName?: string, options: SealLabelOptions =
引数 型 必須 説明
fullName `string undefined` 任意
options SealLabelOptions 任意 【未翻訳】Label resolution options
  • Type: string
  • Description: Stamp label ("" if empty)
```ts
resolveSealLabel("山田 太郎") // => "山田"
resolveSealLabel("John Smith") // => "Smith"
resolveSealLabel("TANAKA", { maxChars: 2 }) // => "TA"
---
### `FUNCTION` `createFallbackSealSvg`
【未翻訳】Generates an SVG string for a fallback stamp seal.
Can be used as a fallback when no saved stamp image is available.
Output is a simple red circular seal with vertically stacked characters.
```typescript
export function createFallbackSealSvg(
fullName?: string,
options: FallbackSealOptions =
引数 型 必須 説明
fullName `string undefined` 任意
options FallbackSealOptions 任意 【未翻訳】Generation options
  • Type: string | null
  • Description: SVG string, or null if the seal face label cannot be resolved
```ts
const svg = createFallbackSealSvg("山田 太郎");
---
### `FUNCTION` `createFallbackSealPngDataUrl`
【未翻訳】Generates a PNG Data URL for a fallback stamp seal.
Returns `null` in environments where the Canvas API is unavailable.
```typescript
export function createFallbackSealPngDataUrl(
fullName?: string,
options: FallbackSealOptions =
引数 型 必須 説明
fullName `string undefined` 任意
options FallbackSealOptions 任意 【未翻訳】Generation options
  • Type: string | null
  • Description: PNG Data URL, or null if generation fails

【未翻訳】Generates a Data URL for a fallback stamp seal.

Behavior of outputFormat:

  • auto (default): PNG when Canvas is available, otherwise SVG
  • png: PNG only (null if Canvas is unavailable)
  • svg: SVG only
export function createFallbackSealDataUrl(
fullName?: string,
options: FallbackSealOptions =
引数 型 必須 説明
fullName `string undefined` 任意
options FallbackSealOptions 任意 【未翻訳】Generation options
  • Type: string | null
  • Description: Data URL, or null if the seal face label cannot be resolved
```ts
const dataUrl = createFallbackSealDataUrl("John Smith", { nameOrder: "given-first" });
---
### `TYPE` `SealNameOrder`
【未翻訳】Type `SealNameOrder`
```typescript
type SealNameOrder

【未翻訳】Options for determining the stamp label (text on the seal face).

interface SealLabelOptions

【未翻訳】Options for generating fallback seal SVG or Data URL.

interface FallbackSealOptions

【未翻訳】Parses Japanese legal documents formatted in Markdown and returns structured data.

export function parseLegalDocument(markdown: string): ParsedDocument
引数 型 必須 説明
markdown string 必須
  • Type: ParsedDocument

【未翻訳】Builds pdfmake document definition content from a ParsedDocument.

export function buildLegalDocumentPdfmakeContent(
parsed: ParsedDocument,
)
引数 型 必須 説明
parsed ParsedDocument 必須
  • Type: { content: any[]; styles: { docTitle: { fontSize: number; bold: boolean; alignment: string; }; docReference: { fontSize: number; }; articleHeader: { fontSize: number; bold: boolean; }; signatureRole: { fontSize: number; bold: boolean; margin: number[]; }; signatureText: { fontSize: number; }; }; pageSize: "A4"; pageMargins: [number, number, number, number]; defaultStyle: { fontSize: number; lineHeight: number; }; }

【未翻訳】Type PartyType

type PartyType