use super::OutputFieldDoc;
pub(super) const PACKAGE_FIELDS: &[OutputFieldDoc] = &[
OutputFieldDoc {
json_name: "type",
rust_field: "package_type",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package ecosystem/type identifier on the public ScanCode-compatible surface.",
},
OutputFieldDoc {
json_name: "namespace",
rust_field: "namespace",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package namespace on the public package surface.",
},
OutputFieldDoc {
json_name: "name",
rust_field: "name",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package name on the public package surface.",
},
OutputFieldDoc {
json_name: "version",
rust_field: "version",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package version on the public package surface.",
},
OutputFieldDoc {
json_name: "qualifiers",
rust_field: "qualifiers",
value_shape: "object",
presence: "Always emitted.",
meaning: "PURL-style qualifier key/value pairs. Empty object when qualifiers are absent.",
},
OutputFieldDoc {
json_name: "subpath",
rust_field: "subpath",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package subpath on the public package surface.",
},
OutputFieldDoc {
json_name: "primary_language",
rust_field: "primary_language",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Primary language associated with the package.",
},
OutputFieldDoc {
json_name: "description",
rust_field: "description",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package description.",
},
OutputFieldDoc {
json_name: "release_date",
rust_field: "release_date",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package release date.",
},
OutputFieldDoc {
json_name: "parties",
rust_field: "parties",
value_shape: "array<object>",
presence: "Always emitted.",
meaning: "Party records attached to the package.",
},
OutputFieldDoc {
json_name: "keywords",
rust_field: "keywords",
value_shape: "array<string>",
presence: "Always emitted.",
meaning: "Keywords attached to the package.",
},
OutputFieldDoc {
json_name: "homepage_url",
rust_field: "homepage_url",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package homepage URL.",
},
OutputFieldDoc {
json_name: "download_url",
rust_field: "download_url",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package download URL.",
},
OutputFieldDoc {
json_name: "size",
rust_field: "size",
value_shape: "integer | null",
presence: "Always emitted.",
meaning: "Package size when known.",
},
OutputFieldDoc {
json_name: "sha1",
rust_field: "sha1",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package SHA-1 checksum when known.",
},
OutputFieldDoc {
json_name: "md5",
rust_field: "md5",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package MD5 checksum when known.",
},
OutputFieldDoc {
json_name: "sha256",
rust_field: "sha256",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package SHA-256 checksum when known.",
},
OutputFieldDoc {
json_name: "sha512",
rust_field: "sha512",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package SHA-512 checksum when known.",
},
OutputFieldDoc {
json_name: "bug_tracking_url",
rust_field: "bug_tracking_url",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package bug-tracker URL.",
},
OutputFieldDoc {
json_name: "code_view_url",
rust_field: "code_view_url",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package code-view URL.",
},
OutputFieldDoc {
json_name: "vcs_url",
rust_field: "vcs_url",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package VCS URL.",
},
OutputFieldDoc {
json_name: "copyright",
rust_field: "copyright",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package copyright string.",
},
OutputFieldDoc {
json_name: "holder",
rust_field: "holder",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package holder string.",
},
OutputFieldDoc {
json_name: "declared_license_expression",
rust_field: "declared_license_expression",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Primary declared license expression on the package record.",
},
OutputFieldDoc {
json_name: "declared_license_expression_spdx",
rust_field: "declared_license_expression_spdx",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "SPDX-form primary declared license expression on the package record.",
},
OutputFieldDoc {
json_name: "license_detections",
rust_field: "license_detections",
value_shape: "array<object>",
presence: "Always emitted.",
meaning: "Structured declared or extracted license detections attached to the package record.",
},
OutputFieldDoc {
json_name: "other_license_expression",
rust_field: "other_license_expression",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Non-primary declared license text normalized into an auxiliary expression lane.",
},
OutputFieldDoc {
json_name: "other_license_expression_spdx",
rust_field: "other_license_expression_spdx",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "SPDX-form auxiliary non-primary declared license expression on the package record.",
},
OutputFieldDoc {
json_name: "other_license_detections",
rust_field: "other_license_detections",
value_shape: "array<object>",
presence: "Always emitted.",
meaning: "Detections associated with the auxiliary or non-primary license lane.",
},
OutputFieldDoc {
json_name: "extracted_license_statement",
rust_field: "extracted_license_statement",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Raw extracted license statement on the package record.",
},
OutputFieldDoc {
json_name: "notice_text",
rust_field: "notice_text",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package notice text.",
},
OutputFieldDoc {
json_name: "source_packages",
rust_field: "source_packages",
value_shape: "array<string>",
presence: "Always emitted.",
meaning: "Referenced source-package package URLs or identifiers associated with this package.",
},
OutputFieldDoc {
json_name: "is_private",
rust_field: "is_private",
value_shape: "boolean",
presence: "Always emitted.",
meaning: "Package-level private/public signal when the parser or datasource can state it confidently.",
},
OutputFieldDoc {
json_name: "is_virtual",
rust_field: "is_virtual",
value_shape: "boolean",
presence: "Always emitted.",
meaning: "Marks package records that represent virtual or synthetic package identities rather than concrete deliverables.",
},
OutputFieldDoc {
json_name: "extra_data",
rust_field: "extra_data",
value_shape: "object",
presence: "Always emitted.",
meaning: "Datasource-specific structured metadata preserved without promoting it into the core package contract. Empty object when extra data is absent.",
},
OutputFieldDoc {
json_name: "repository_homepage_url",
rust_field: "repository_homepage_url",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Repository homepage URL for the package.",
},
OutputFieldDoc {
json_name: "repository_download_url",
rust_field: "repository_download_url",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Repository download URL for the package.",
},
OutputFieldDoc {
json_name: "api_data_url",
rust_field: "api_data_url",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "API data URL for the package.",
},
OutputFieldDoc {
json_name: "purl",
rust_field: "purl",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package URL for the package record.",
},
OutputFieldDoc {
json_name: "package_uid",
rust_field: "package_uid",
value_shape: "string",
presence: "Always emitted.",
meaning: "Stable package identifier used internally and on output links such as `for_packages`.",
},
OutputFieldDoc {
json_name: "datafile_paths",
rust_field: "datafile_paths",
value_shape: "array<string>",
presence: "Always emitted.",
meaning: "Manifest or metadata file paths that contributed to this assembled package record.",
},
OutputFieldDoc {
json_name: "datasource_ids",
rust_field: "datasource_ids",
value_shape: "array<string>",
presence: "Always emitted.",
meaning: "Datasource identifiers that explain which parser/input surfaces contributed to this package record.",
},
];
pub(super) const PACKAGE_DATA_FIELDS: &[OutputFieldDoc] = &[
OutputFieldDoc {
json_name: "type",
rust_field: "package_type",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package ecosystem/type identifier on a file-local package_data row.",
},
OutputFieldDoc {
json_name: "namespace",
rust_field: "namespace",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package namespace on the file-local package_data row.",
},
OutputFieldDoc {
json_name: "name",
rust_field: "name",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package name on the file-local package_data row.",
},
OutputFieldDoc {
json_name: "version",
rust_field: "version",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package version on the file-local package_data row.",
},
OutputFieldDoc {
json_name: "qualifiers",
rust_field: "qualifiers",
value_shape: "object",
presence: "Always emitted.",
meaning: "PURL-style qualifier key/value pairs on a file-local package_data row.",
},
OutputFieldDoc {
json_name: "subpath",
rust_field: "subpath",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package subpath on the file-local package_data row.",
},
OutputFieldDoc {
json_name: "primary_language",
rust_field: "primary_language",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Primary language associated with the file-local package_data row.",
},
OutputFieldDoc {
json_name: "description",
rust_field: "description",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package description on the file-local package_data row.",
},
OutputFieldDoc {
json_name: "release_date",
rust_field: "release_date",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Release date on the file-local package_data row.",
},
OutputFieldDoc {
json_name: "parties",
rust_field: "parties",
value_shape: "array<object>",
presence: "Always emitted.",
meaning: "Party records attached to the file-local package_data row.",
},
OutputFieldDoc {
json_name: "keywords",
rust_field: "keywords",
value_shape: "array<string>",
presence: "Always emitted.",
meaning: "Keywords attached to the file-local package_data row.",
},
OutputFieldDoc {
json_name: "homepage_url",
rust_field: "homepage_url",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Homepage URL on the file-local package_data row.",
},
OutputFieldDoc {
json_name: "download_url",
rust_field: "download_url",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Download URL on the file-local package_data row.",
},
OutputFieldDoc {
json_name: "size",
rust_field: "size",
value_shape: "integer | null",
presence: "Always emitted.",
meaning: "Package size on the file-local package_data row when known.",
},
OutputFieldDoc {
json_name: "sha1",
rust_field: "sha1",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "SHA-1 checksum on the file-local package_data row when known.",
},
OutputFieldDoc {
json_name: "md5",
rust_field: "md5",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "MD5 checksum on the file-local package_data row when known.",
},
OutputFieldDoc {
json_name: "sha256",
rust_field: "sha256",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "SHA-256 checksum on the file-local package_data row when known.",
},
OutputFieldDoc {
json_name: "sha512",
rust_field: "sha512",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "SHA-512 checksum on the file-local package_data row when known.",
},
OutputFieldDoc {
json_name: "bug_tracking_url",
rust_field: "bug_tracking_url",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Bug-tracker URL on the file-local package_data row.",
},
OutputFieldDoc {
json_name: "code_view_url",
rust_field: "code_view_url",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Code-view URL on the file-local package_data row.",
},
OutputFieldDoc {
json_name: "vcs_url",
rust_field: "vcs_url",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "VCS URL on the file-local package_data row.",
},
OutputFieldDoc {
json_name: "copyright",
rust_field: "copyright",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Copyright string on the file-local package_data row.",
},
OutputFieldDoc {
json_name: "holder",
rust_field: "holder",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Holder string on the file-local package_data row.",
},
OutputFieldDoc {
json_name: "declared_license_expression",
rust_field: "declared_license_expression",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Primary declared license expression on the file-local package_data row.",
},
OutputFieldDoc {
json_name: "declared_license_expression_spdx",
rust_field: "declared_license_expression_spdx",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "SPDX-form primary declared license expression on the file-local package_data row.",
},
OutputFieldDoc {
json_name: "license_detections",
rust_field: "license_detections",
value_shape: "array<object>",
presence: "Always emitted.",
meaning: "Structured license detections attached to the raw parser-emitted package_data row.",
},
OutputFieldDoc {
json_name: "other_license_expression",
rust_field: "other_license_expression",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Auxiliary non-primary license expression lane for the package_data row.",
},
OutputFieldDoc {
json_name: "other_license_expression_spdx",
rust_field: "other_license_expression_spdx",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "SPDX-form auxiliary non-primary license expression lane for the package_data row.",
},
OutputFieldDoc {
json_name: "other_license_detections",
rust_field: "other_license_detections",
value_shape: "array<object>",
presence: "Always emitted.",
meaning: "Detections associated with the auxiliary or non-primary license lane.",
},
OutputFieldDoc {
json_name: "extracted_license_statement",
rust_field: "extracted_license_statement",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Raw extracted license statement on the package_data row.",
},
OutputFieldDoc {
json_name: "notice_text",
rust_field: "notice_text",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Notice text on the package_data row.",
},
OutputFieldDoc {
json_name: "source_packages",
rust_field: "source_packages",
value_shape: "array<string>",
presence: "Always emitted.",
meaning: "Referenced source-package identifiers preserved on the raw package_data row.",
},
OutputFieldDoc {
json_name: "file_references",
rust_field: "file_references",
value_shape: "array<object>",
presence: "Always emitted.",
meaning: "File-reference hints emitted by parsers for later resolution or ownership assignment.",
},
OutputFieldDoc {
json_name: "is_private",
rust_field: "is_private",
value_shape: "boolean",
presence: "Always emitted.",
meaning: "Private/public package signal on the raw parser-emitted row.",
},
OutputFieldDoc {
json_name: "is_virtual",
rust_field: "is_virtual",
value_shape: "boolean",
presence: "Always emitted.",
meaning: "Virtual/synthetic package signal on the raw parser-emitted row.",
},
OutputFieldDoc {
json_name: "extra_data",
rust_field: "extra_data",
value_shape: "object",
presence: "Always emitted.",
meaning: "Datasource-specific structured metadata preserved without promotion into core fields.",
},
OutputFieldDoc {
json_name: "dependencies",
rust_field: "dependencies",
value_shape: "array<object>",
presence: "Always emitted.",
meaning: "Raw dependency rows emitted directly by the parser before top-level assembly.",
},
OutputFieldDoc {
json_name: "repository_homepage_url",
rust_field: "repository_homepage_url",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Repository homepage URL on the file-local package_data row.",
},
OutputFieldDoc {
json_name: "repository_download_url",
rust_field: "repository_download_url",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Repository download URL on the file-local package_data row.",
},
OutputFieldDoc {
json_name: "api_data_url",
rust_field: "api_data_url",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "API data URL on the file-local package_data row.",
},
OutputFieldDoc {
json_name: "datasource_id",
rust_field: "datasource_id",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Single datasource identifier for the parser surface that produced this package_data row.",
},
OutputFieldDoc {
json_name: "purl",
rust_field: "purl",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Package URL on the file-local package_data row.",
},
];
pub(super) const PARTY_FIELDS: &[OutputFieldDoc] = &[
OutputFieldDoc {
json_name: "type",
rust_field: "r#type",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Normalized party type such as person or organization.",
},
OutputFieldDoc {
json_name: "role",
rust_field: "role",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Role of the party on the package or metadata record.",
},
OutputFieldDoc {
json_name: "name",
rust_field: "name",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Human-readable party name.",
},
OutputFieldDoc {
json_name: "email",
rust_field: "email",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Party email address.",
},
OutputFieldDoc {
json_name: "url",
rust_field: "url",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Party homepage or profile URL.",
},
OutputFieldDoc {
json_name: "organization",
rust_field: "organization",
value_shape: "string | null",
presence: "Emitted only when available.",
meaning: "Owning organization for the party, when captured separately from the party name.",
},
OutputFieldDoc {
json_name: "organization_url",
rust_field: "organization_url",
value_shape: "string | null",
presence: "Emitted only when available.",
meaning: "Owning organization URL for the party.",
},
OutputFieldDoc {
json_name: "timezone",
rust_field: "timezone",
value_shape: "string | null",
presence: "Emitted only when available.",
meaning: "Timezone associated with the party metadata, when available.",
},
];
pub(super) const FILE_REFERENCE_FIELDS: &[OutputFieldDoc] = &[
OutputFieldDoc {
json_name: "path",
rust_field: "path",
value_shape: "string",
presence: "Always emitted.",
meaning: "Referenced file path preserved on the package/file-reference surface.",
},
OutputFieldDoc {
json_name: "size",
rust_field: "size",
value_shape: "integer | null",
presence: "Emitted only when available.",
meaning: "Referenced file size when known.",
},
OutputFieldDoc {
json_name: "sha1",
rust_field: "sha1",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Referenced file SHA-1 checksum when known.",
},
OutputFieldDoc {
json_name: "md5",
rust_field: "md5",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Referenced file MD5 checksum when known.",
},
OutputFieldDoc {
json_name: "sha256",
rust_field: "sha256",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Referenced file SHA-256 checksum when known.",
},
OutputFieldDoc {
json_name: "sha512",
rust_field: "sha512",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Referenced file SHA-512 checksum when known.",
},
OutputFieldDoc {
json_name: "extra_data",
rust_field: "extra_data",
value_shape: "object",
presence: "Always emitted.",
meaning: "Additional metadata preserved on the referenced-file row.",
},
];