@alneas/business-jp API リファレンス
@alneas/business-jp API リファレンス
Section titled “@alneas/business-jp API リファレンス”FUNCTION legalDocument
Section titled “FUNCTION legalDocument”【未翻訳】Exported symbol legalDocument
export const legalDocumentFUNCTION notifications
Section titled “FUNCTION notifications”【未翻訳】Exported symbol notifications
export const notificationsFUNCTION resolveSealLabel
Section titled “FUNCTION resolveSealLabel”【未翻訳】Resolves the label (typically family name) to display on a fallback seal.
Priority order:
options.sealLabeloptions.familyNamefullNameparsing (applyingnameOrderrule)
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 =引数 (Parameters)
Section titled “引数 (Parameters)”| 引数 | 型 | 必須 | 説明 |
|---|---|---|---|
fullName |
`string | undefined` | 任意 |
options |
SealLabelOptions |
任意 | 【未翻訳】Label resolution options |
戻り値 (Returns)
Section titled “戻り値 (Returns)”- Type:
string - Description: Stamp label (
""if empty)
使用例 (Example)
Section titled “使用例 (Example)”```tsresolveSealLabel("山田 太郎") // => "山田"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.
```typescriptexport function createFallbackSealSvg( fullName?: string, options: FallbackSealOptions =引数 (Parameters)
Section titled “引数 (Parameters)”| 引数 | 型 | 必須 | 説明 |
|---|---|---|---|
fullName |
`string | undefined` | 任意 |
options |
FallbackSealOptions |
任意 | 【未翻訳】Generation options |
戻り値 (Returns)
Section titled “戻り値 (Returns)”- Type:
string | null - Description: SVG string, or
nullif the seal face label cannot be resolved
使用例 (Example)
Section titled “使用例 (Example)”```tsconst svg = createFallbackSealSvg("山田 太郎");---
### `FUNCTION` `createFallbackSealPngDataUrl`
【未翻訳】Generates a PNG Data URL for a fallback stamp seal.Returns `null` in environments where the Canvas API is unavailable.
```typescriptexport function createFallbackSealPngDataUrl( fullName?: string, options: FallbackSealOptions =引数 (Parameters)
Section titled “引数 (Parameters)”| 引数 | 型 | 必須 | 説明 |
|---|---|---|---|
fullName |
`string | undefined` | 任意 |
options |
FallbackSealOptions |
任意 | 【未翻訳】Generation options |
戻り値 (Returns)
Section titled “戻り値 (Returns)”- Type:
string | null - Description: PNG Data URL, or
nullif generation fails
FUNCTION createFallbackSealDataUrl
Section titled “FUNCTION createFallbackSealDataUrl”【未翻訳】Generates a Data URL for a fallback stamp seal.
Behavior of outputFormat:
auto(default): PNG when Canvas is available, otherwise SVGpng: PNG only (nullif Canvas is unavailable)svg: SVG only
export function createFallbackSealDataUrl( fullName?: string, options: FallbackSealOptions =引数 (Parameters)
Section titled “引数 (Parameters)”| 引数 | 型 | 必須 | 説明 |
|---|---|---|---|
fullName |
`string | undefined` | 任意 |
options |
FallbackSealOptions |
任意 | 【未翻訳】Generation options |
戻り値 (Returns)
Section titled “戻り値 (Returns)”- Type:
string | null - Description: Data URL, or
nullif the seal face label cannot be resolved
使用例 (Example)
Section titled “使用例 (Example)”```tsconst dataUrl = createFallbackSealDataUrl("John Smith", { nameOrder: "given-first" });---
### `TYPE` `SealNameOrder`
【未翻訳】Type `SealNameOrder`
```typescripttype SealNameOrderINTERFACE SealLabelOptions
Section titled “INTERFACE SealLabelOptions”【未翻訳】Options for determining the stamp label (text on the seal face).
interface SealLabelOptionsINTERFACE FallbackSealOptions
Section titled “INTERFACE FallbackSealOptions”【未翻訳】Options for generating fallback seal SVG or Data URL.
interface FallbackSealOptionsFUNCTION parseLegalDocument
Section titled “FUNCTION parseLegalDocument”【未翻訳】Parses Japanese legal documents formatted in Markdown and returns structured data.
export function parseLegalDocument(markdown: string): ParsedDocument引数 (Parameters)
Section titled “引数 (Parameters)”| 引数 | 型 | 必須 | 説明 |
|---|---|---|---|
markdown |
string |
必須 |
戻り値 (Returns)
Section titled “戻り値 (Returns)”- Type:
ParsedDocument
FUNCTION buildLegalDocumentPdfmakeContent
Section titled “FUNCTION buildLegalDocumentPdfmakeContent”【未翻訳】Builds pdfmake document definition content from a ParsedDocument.
export function buildLegalDocumentPdfmakeContent( parsed: ParsedDocument,)引数 (Parameters)
Section titled “引数 (Parameters)”| 引数 | 型 | 必須 | 説明 |
|---|---|---|---|
parsed |
ParsedDocument |
必須 |
戻り値 (Returns)
Section titled “戻り値 (Returns)”- 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
Section titled “TYPE PartyType”【未翻訳】Type PartyType
type PartyType