/** * VRM meta (`VRMC_vrm.meta` / `VRM.meta`) → a normalised record for the asset and for provenance. * * Two things were being thrown away at import. The first is the licence: VRM's meta is the only place a file * states what its author allows (redistribution, modification, commercial use, credit), and a converted avatar * that drops it cannot be published honestly — the platform's own provenance record then has to be re-typed by * hand or left empty. The second is the authored authorship: `authors`, a title and a version. * * What this does NOT do is invent a provenance record. `CharacterSourceProvenance` requires a source URL, and the * file has no idea where it was downloaded from. So this returns the facts plus a list of the required fields it * could not fill, and `provenanceFromVrmMeta` returns a valid record only when the caller supplies what the file * cannot know. */ import type { CharacterSourceProvenance } from '../importTrust'; export interface VrmMetaRecord { specVersion: '0.x' | '1.0'; name?: string; version?: string; authors: string[]; contactInformation?: string; /** 1.0 only (`copyrightInformation`, `thirdPartyLicenses`). */ copyrightInformation?: string; thirdPartyLicenses?: string; references: string[]; /** The licence as the file names it (0.x's `licenseName`, or 1.0's URL). */ licenseName?: string; licenseUrl?: string; otherLicenseUrl?: string; thumbnailUrl?: string; /** * Permission terms, `undefined` when the file does not say. 0.x states the usage terms as `Allow`/`Disallow` * strings; 1.0 states them as booleans (`allowExcessivelyViolentUsage` ...), kept as booleans here. */ allowedUser?: string; violentUsage?: string | boolean; sexualUsage?: string | boolean; commercialUsage?: string; politicalOrReligiousUsage?: string | boolean; antisocialOrHateUsage?: string | boolean; creditNotation?: string; allowRedistribution?: boolean; modification?: string; } export declare function convertVrmMeta(json: { extensions?: Record; }): VrmMetaRecord | null; /** * A provenance record the file can actually support, or the list of what is still missing. * * Only called with a caller-supplied `sourceUrl`: the URL of the page the file came from is the one required * field no file carries. A licence must be either a 1.0 `licenseUrl` or a 0.x name that maps to an SPDX id; a * file that forbids redistribution still records its terms, and the publish gate decides. */ export declare function provenanceFromVrmMeta(meta: VrmMetaRecord, sourceUrl: string | undefined): { provenance: CharacterSourceProvenance | null; missing: string[]; };