# -*- mode: rec -*-
#
# Registry for GNU Taler form attributes
#
%rec: TalerAttributes
%unique: Identifier
%key: Identifier
%type: Identifier Identifier_t
%typedef: Identifier_t regexp /^[ABCDEFGHIJKLMNOPQRSTUVWXYZ_][ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789:\.]*$/
# Define the form's field ID
%mandatory: Identifier
# Use to specify the form's field type. Arrays and generics are allowed in typescript form.
# Literal values are enclosed by single quote `'` and enumerated type union by vertical bar `|`
%mandatory: Type
%type: Type Type_t
%typedef: Type_t regexp !^[ABCDEFGHIJKLMNOPQRSTUVWXYZ_'][ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_0123456789 \[\]|:\.,'-/]*$!
# Define for which form this form's field belongs
%mandatory: Form
# Description of the usage of the field
%allowed: Description
%type: Description Description_t
%typedef: Description_t regexp |^[ABCDEFGHIJKLMNOPQRSTUVWXYZ_][ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_0123456789 :\.,'-/?]*$|
%sort: Identifier Description Type Form

# Customer is the person with whom the member concludes the contract with regard to the financia service provided.

Identifier: SANCTION_LIST_SUPPRESS
Type: Boolean
Form: tops-property
Description: Suppress flagging this account when it creates a hit on a sanctions list, this is a false-positive.

# FIXME: Should this be DATE or DATETIME?
Identifier: SIGN_DATE
Description: Date for the signature.
Type: AbsoluteDateTime
Form: VQF_902_9
Form: VQF_902_11
Form: VQF_902_12
Form: VQF_902_13
Form: VQF_902_15

Identifier: SIGNATURE
Description: Name of the contracting party for the purpose of signing.
Type: String
Form: VQF_902_9
Form: VQF_902_11
Form: VQF_902_12
Form: VQF_902_13
Form: VQF_902_15


Identifier: CUSTOMER_TYPE
Description: Basic customer type classification to distinguish which basic info is relevant.
Type: 'NATURAL_PERSON' | 'LEGAL_ENTITY'
Form: VQF_902_1

Identifier: DATE_OF_BIRTH
Description: Date of birth for natural persons. It should be in the past and less than 120 years.
Type: ISO Date
Form: VQF_902_1
Form: GLS_Onboarding

Identifier: PERSONAL_IDENTIFICATION_DOCUMENT_COPY
Description: If the customer is a natural person.
Type: File
Form: VQF_902_1

Identifier: CUSTOMER_IS_SOLE_PROPRIETOR
Description: Is the customer a sole proprietor?
Type: Boolean
Form: vqf_902_1_customer

Identifier: COMPANY_NAME
Type: String
Form: VQF_902_1
Description: If the customer is a natural person.

Identifier: REGISTERED_OFFICE_ADDRESS
Type: String
Form: VQF_902_1

Identifier: LEGAL_ENTITY_IDENTIFICATION_DOCUMENT_COPY
Description: Digital copy of the identification document for a legal entity.
Type: FileUpload
Form: VQF_902_1

Identifier: CONTACT_PERSON_NAME
Description: Full name of the contact person.
Type: String
Form: VQF_902_1
Form: ChallengerPostal
Form: ChallengerPostalCh

Identifier: DESCRIPTION
Description: Free-form description.
Type: String
Form: supplementary_files

Identifier: FILE
Type: FileUpload[]
Form: supplementary_files

Identifier: ESTABLISHER_LIST
Type: Form<VQF_902_1_founder>[]
Form: vqf_902_1_customer
Description: List of founder with the fields below.
#Required: true

Identifier: FULL_NAME
Type: String
Description: Full name of a natural person.
Form: vqf_establisher

Identifier: DOMICILE_ADDRESS
Type: ResidentialAddress
Description: Domicile address. A domicile is a place where you live, an address is just a place where you receive mail. A residential address is somewhere you live but not necessarily your primary place.
Form: VQF_902_1_founder

Identifier: NATIONALITY
Type: CountryCode
Description: Nationality, expressed as a country code.
Form: VQF_902_1_founder

Identifier: SIGNING_AUTHORITY_TYPE
Description: Signatory of representation (single, collective two, ...)
Type: String
Form: VQF_902_1_founder

Identifier: SIGNING_AUTHORITY_TYPE_OTHER
Description: Signatory of representation (other type)
Type: String
Form: VQF_902_1_founder

Identifier: SIGNING_AUTHORITY_EVIDENCE
Type: 'CR' | 'MANDATE' | 'OTHER'
Form: VQF_902_1_founder

Identifier: SIGNING_AUTHORITY_EVIDENCE_OTHER
Type: String
Form: VQF_902_1_founder

Identifier: SIGNING_AUTHORITY_EVIDENCE_DOCUMENT_COPY
Type: File
Form: VQF_902_1_founder

Identifier: ACCEPTANCE_DATE
Description: Conclusion of the conract
Type: AbsoluteDate
Description: Conclusion of contract
Form: VQF_902_1

Identifier: ACCEPTANCE_METHOD
Type: 'FACE_TO_FACE' | 'AUTHENTICATED_COPY' | 'RESIDENTIAL_ADDRESS_VALIDATED'
Form: VQF_902_1

Identifier: CORRESPONDENCE_LANGUAGE
Description: Correspondence language of the customer.
Type: LangCode
Form: VQF_902_1

Identifier: ACCEPTANCE_FURTHER_INFO
Description: Further information on the acceptance of a customer.
Type: String
Form: VQF_902_1

Identifier: CUSTOMER_TYPE_VQF
Type: 'NATURAL_PERSON' | 'OPERATIONAL' | 'FOUNDATION' | 'TRUST' | 'LIFE_INSURANCE' | 'OTHER'
Description: Customer type under the VQF classification. Establishment of the beneficial owner of the assets and/or controlling person
Form: VQF_902_1

Identifier: EMBARGO_TERRORISM_INFO
Description: Verification whether the customer, beneficial owners of the assets, controlling persons, authorised representatives or other involved persons are listed on an embargo-/terrorism list (date of verification/result)
Type: Paragraph
Form: VQF_902_1

Identifier: EMBARGO_TERRORISM_CHECK_DATE
Description: Verification date in the sancations lists. It should be in the past and less than 120 years.
Type: Date
Form: VQF_902_1

Identifier: EMBARGO_TERRORISM_CHECK_RESULT
Description: Verification date.
Type: 'NOT_LISTED' | 'LISTED'
Form: VQF_902_1

Identifier: PEP_FOREIGN
Description: True if the person is a PEP defined by 'Art 7 lit. g numeral 1'
Type: Boolean
Form: VQF_902_4

Identifier: PEP_DOMESTIC
Description: True if the person is a PEP defined by 'Art 7 lit. g numeral 2'
Type: Boolean
Form: VQF_902_4
#Required: true

Identifier: PEP_INTERNATIONAL_ORGANIZATION
Description: True if the person is a PEP defined by 'Art 7 lit. g numeral 3'
Type: Boolean
Form: VQF_902_4
#Required: true

Identifier: PEP_ACCEPTANCE_DATE
Description: The decision of the Senior executive body on the acceptance of a business relationsip was obtained on ___. It should be in the past and less than 120 years.
Type: AbsoluteDateTime
Form: VQF_902_4

Identifier: HIGH_RISK_COUNTRY
Description: True if the person is in a country for which FATF requires increased dilegence.
Type: Boolean
Form: VQF_902_4

Identifier: HIGH_RISK_ACCEPTANCE_DATE
Description: The decision of the Senior executive body on the acceptance of a business relationsip was obtained on ___. It should be in the past and less than 120 years.
Type: AbsoluteDateTime
Form: VQF_902_4

# 3. Business relationship risk

Identifier: COUNTRY_RISK_NATIONALITY_TYPE
Type: 'NATIONALITY_CUSTOMER' | 'NATIONALITY_OWNER' | 'DOMICILE_CUSTOMER' | 'DOMICILE_OWNER' | 'DOMICILE_CONTROLLING'
Form: VQF_902_4

Identifier: COUNTRY_RISK_NATIONALITY_LEVEL
Description: Based on 902.4.1 country list
Type: 'LOW' | 'MEDIUM' | 'HIGH'
Form: VQF_902_4

Identifier: COUNTRY_RISK_BUSINESS_TYPE
Type: 'CUSTOMER' | 'OWNER'
Form: VQF_902_4

Identifier: COUNTRY_RISK_BUSINESS_LEVEL
Description: Based on 902.4.1 country list
Type: 'LOW' | 'MEDIUM' | 'HIGH'
Form: VQF_902_4

Identifier: INDUSTRY_RISK_TYPE
Type: 'CUSTOMER' | 'OWNER'
Form: VQF_902_4

Identifier: INDUSTRY_RISK_LEVEL
Type: 'TRANSPARENT' | 'HIGH_CASH_TRANSACTION' | 'NOT_WELL_KNOWN' | 'HIGH_RISK_TRADE' | 'UNKNOWN_INDUSTRY'
Form: VQF_902_4

Identifier: CONTACT_RISK_LEVEL
Description: Based on 902.4.1 country list
Type: 'LOW' | 'MEDIUM' | 'HIGH'
Form: VQF_902_4

Identifier: PRODUCT_RISK_LEVEL
Type: 'EASY' | 'SOPHISTICATED' | 'OFFSHORE' | 'COMPLEX_STRUCTURE' | 'LARGE_NUMBER_OF_ACCOUNTS' | 'COMPLEX_SERVICE' | 'FREQ_TRANS_WITH_HIGH_RISK'
Form: VQF_902_4

Identifier: RISK_CLASSIFICATION_LEVEL
Type: 'HIGH_RISK' | 'NO_HIGH_RISK'
Form: VQF_902_4

Identifier: RISK_RATIONALE
Type: Paragraph
Form: VQF_902_4
Description: Justification for differing risk assessment

Identifier: RISK_ACCEPTANCE_DATE
Description: The decision of the Senior executive body on the acceptance of a business relationsip was obtained on ___. It should be in the past and less than 120 years.
Type: AbsoluteDateTime
Form: VQF_902_4


Identifier: BIZREL_PROFESSION
Description: Profession, business activities, etc. (former, current, potentially planned)
Type: String
Form: VQF_902_5

Identifier: BIZREL_INCOME
Description: Income and assets, liabilities (estimated)
Type: String
Form: VQF_902_5

Identifier: BIZREL_HAVE_ASSETS
Description: Does the customer have assets that will be deposited?
Type: Boolean
Form: VQF_902_5

Identifier: BIZREL_ORIGIN_NATURE
Description: Nature of the involved assets (amount, currency, ...).
Type: String
Form: VQF_902_5

Identifier: BIZREL_ORIGIN_CATEGORY
Type: 'SAVINGS' | 'OWN_BUSINESS' | 'INHERITANCE' | 'OTHER'
Form: VQF_902_5

Identifier: BIZREL_ORIGIN_CATEGORY_OTHER
Type: String
Form: VQF_902_5

Identifier: BIZREL_ORIGIN_DETAIL
Description: Detailed description of the origins.
Type: Paragraph
Form: VQF_902_5

Identifier: BIZREL_PURPOSE
Description: Purpose of the business relationship.
Type: String
Form: VQF_902_5

Identifier: BIZREL_DEVELOPMENT
Description: Information on the planned development of the business relationship and the assets.
Type: String
Form: VQF_902_5

Identifier: BIZREL_FINANCIAL_VOLUME
Description: In the case of cash or money and asset transfer transacction with regular customer
Type: String
Form: VQF_902_5

Identifier: BIZREL_THIRDPARTY_RELATIONSHIP
Description: Relation of the customer to the beneficial owner, controlling persons, authorised signatories and other persons involved in the business relationship.
Type: String
Form: VQF_902_5

Identifier: BIZREL_THIRDPARTY_AMLA_FILES
Description: Relation to other AMLA-files.
Type: String
Form: VQF_902_5

Identifier: BIZREL_THIRDPARTY_REFERENCES
Description: Introducer / agents / references.
Type: String
Form: VQF_902_5

Identifier: BIZREL_FURTHER_INFO
Description: Other relevant information.
Type: String
Form: VQF_902_5

Identifier: IDENTITY_CONTRACTING_PARTNER
Type: Paragraph
Form: VQF_902_9

Identifier: ATTACHMENT_SIGNED_DOCUMENT
Type: File
Form: VQF_902_9

Identifier: IDENTITY_LIST
Description: The beneficial owners of the assets involved in the business relationship.
Type: Form<VQF_902_9_identity>[]
Form: VQF_902_9

Identifier: SUBMITTED_BY
Description: Party that is filling out the form.
Type: 'AML_OFFICER' | 'CUSTOMER'
Form: VQF_902_9
Form: VQF_902_11

Identifier: CONTROL_REASON
Type: 'HAS_25_MORE_RIGHTS' | 'OTHER_WAY' | 'DIRECTOR'
Form: VQF_902_11

Identifier: THIRD_PARTY_OWNERSHIP
Type: Boolean
Form: VQF_902_11
Description: Is a third person the beneficial owner of the assets?

Identifier: INCRISK_REASON
Description: Description of the circumstances/transactions, which triggered the special clarifications
Type: String
Form: VQF_902_14

Identifier: INCRISK_MEANS
Type: 'GATHERING' | 'CONSULTATION' | 'ENQUIRIES' | 'OTHER'
Form: VQF_902_14

Identifier: INCRISK_MEANS_OTHER
Type: String
Form: VQF_902_14

Identifier: INCRISK_SUMMARY
Type: Paragraph
Form: VQF_902_14
#Required: true

Identifier: INCRISK_DOCUMENTS
Description: Gathered or consulted documents
Type: Paragraph
Form: VQF_902_14
#Required: true

Identifier: INCRISK_RESULT
Type: 'NO_SUSPICION' | 'REASONABLE_SUSPICION' | 'SIMPLE_SUSPICION' | 'OTHER'
Form: VQF_902_14

Identifier: INCRISK_RESULT_OTHER
Type: String
Form: VQF_902_14

Identifier: PERSON_FIRST_NAMES
Description: First name(s) as on the identity document.
Form: GLS_Onboarding
Type: String

Identifier: PERSON_LAST_NAME
Description: Last name of an individual as on the identity document.
Form: GLS_Onboarding
Type: String

Identifier: PERSON_NATIONAL_ID
Description: Identification number or string of national identity card.
Form: GLS_Onboarding
Type: String


Identifier: PERSON_NATIONAL_ID_SCAN
Description: Scan of a recognized national identity card of an individual.
Form: GLS_Onboarding
Type: File

Identifier: PERSON_NATIONALITY
Description: Nationality of an individual. Format is 2-letter ISO country-code.
Form: GLS_Onboarding
Type: CountryCode

Identifier: WALLET_USER_IS_PRIVATE_CUSTOMER
Description: Confirmation that the wallet user is a private customer, not a business.
Form: tbd
Type: Boolean

## Business company information

# CHECK: vollständiger name des unternehmens
Identifier: BUSINESS_DISPLAY_NAME
Description: Name of the company or business.
Form: GLS_Onboarding
Type: String

Identifier: BUSINESS_TYPE
Description: Type of company form or business (selection from fixed list).
Form: GLS_Onboarding
Type: String

Identifier: BUSINESS_TYPE_OTHER
Description: Type of company form or business (free-form entry for OTHER).
Form: GLS_Onboarding
Type: String

# vertretungsberechtigung -> authorized to represent
# einzeln -> individual
# mehrheitlich -> majority
# zu zweit -> in pair
# anders -> Others

Identifier: COMMERCIAL_REGISTER_NUMBER
Description: Registration id on legal entity of the company or business.
Form: GLS_Onboarding
Type: String

Identifier: REGISTER_COURT_LOCATION
Description: City or location where the company or business is registered.
Form: GLS_Onboarding
Type: String

Identifier: FOUNDING_DATE
Description: Registration founding date of the company or business. It should be in the past and less than 120 years.
Form: GLS_Onboarding
Type: AbsoluteDate

# CHECK: liegt eine gemeinnützigkeit vor?
Identifier: BUSINESS_IS_NON_PROFIT
Description: True if the company or business is a non-profit.
Form: GLS_Onboarding
Type: Boolean

# CHECK: Branche
Identifier: BUSINESS_INDUSTRY
Description: Industry in which the company or business mainly operate.
Form: GLS_Onboarding
Type: String

Identifier: BUSINESS_INDUSTRY_OTHER
Description: Free-form industry, when BUSINESS_INDUSTRY is OTHER.
Form: GLS_Onboarding
Type: String

# CHECK: bitte ergänzen sie alle gesetzlichen vertreter, gesellschafter und bevollmächtigte
Identifier: BUSINESS_PERSONS
Description: List of natural persons that are legal representatives or shareholders.
Form: GLS_Onboarding
Type: GLS_BusinessRepresentative[]

Identifier: REPRESENTATIVE_TYPE
Description: List of natural persons that are legal representatives or shareholders.
Form: GLS_Onboarding
Type: LEGAL_REPRESENTATIVE | SHAREHOLDER_GT_25_PERCENT | AUTHORIZED_EMPLOYEE

## Contact information

Identifier: CONTACT_DNS_DOMAIN
Description: DNS domain name owned by the individual or business.
Form: GLS_Onboarding
Type: Hostname
Description: Can be validated by having the owner set an appropriate DNS TXT record.

Identifier: CONTACT_WEBSITE
Description: Web site owned by the individual or business.
Type: HttpHostnamePath
Form: GLS_Onboarding
Description: Can be validated by having the owner serve an appropriate well-known page.

Identifier: CONTACT_EMAIL
Description: E-mail address to contact the individual or business. Can be validated via E-mail with TAN.
Form: GLS_Onboarding
Form: ChallengerEmail
Type: Email

Identifier: CONTACT_PHONE
Description: Phone number to contact the individual or business. Can be validated via SMS-TAN or phone call.
Form: GLS_Onboarding
Form: ChallengerPhone
Type: Phone

Identifier: CONTACT_NAME
Description: Natural person full-name or name of the business to contact.
Form: ChallengerPostal
Form: ChallengerPostalCh
Type: String

## Location information

Identifier: ADDRESS_COUNTRY
Description: Country where the individual or business resides. Format is 2-letter ISO country-code.
Form: GLS_Onboarding
Form: ChallengerPostal
Type: CountryCode

Identifier: ADDRESS_STREET_NAME
Description: Street address name of the individual or business.
Form: GLS_Onboarding
Type: String

Identifier: ADDRESS_STREET_NUMBER
Description: Street address number of the individual or business.
Form: GLS_Onboarding
Type: String

Identifier: ADDRESS_LINES
Description: Additional address information of the individual or business.
Form: GLS_Onboarding
Form: ChallengerPostal
Form: ChallengerPostalCh
Type: String

Identifier: ADDRESS_BUILDING_NAME
Description: Building name of the of the individual or business.
Form: GLS_Onboarding
Type: String

Identifier: ADDRESS_BUILDING_NUMBER
Description: Building number of the individual or business.
Form: GLS_Onboarding
Type: String

Identifier: ADDRESS_ZIPCODE
Description: Postal code of the city where the individual or business resides.
Form: GLS_Onboarding
Type: String

Identifier: ADDRESS_TOWN_LOCATION
Description: Town location of the individual or business.
Form: GLS_Onboarding
Type: String

Identifier: ADDRESS_TOWN_DISTRICT
Description: Town district of the individual or business.
Form: GLS_Onboarding
Type: String

Identifier: ADDRESS_COUNTRY_SUBDIVISION
Description: Country subdivision of the individual or business.
Form: GLS_Onboarding
Type: String

## Tax information

Identifier: TAX_COUNTRY
Description: Country name of of the individual or business.
Form: GLS_Onboarding
Type: CountryCode

# CHECK: wirtschaftsidentifikationsnummer oder steuernummer
Identifier: TAX_ID
Description: Tax identifier of the individual or business.
Form: GLS_Onboarding
Type: String

# CHECK wurde die gesellschaft in den USA oder nach US-Recht gergrudent
Identifier: TAX_IS_USA_LAW
Description: Is business founded or under USA law.
Form: GLS_Onboarding
Type: Boolean

# CHECK: wirtschaftlich aktiv oder passiv
Identifier: TAX_IS_ACTIVE
Description: Is the individual or business economically active or passive.
Form: GLS_Onboarding
Type: Boolean

# CHECK: sind sie vorsteuerabzugsberechtigt
Identifier: TAX_IS_DEDUCTED
Description: Is the business entitled to deduct input tax.
Form: GLS_Onboarding
Type: Boolean

Identifier: DE_BUSINESS_OR_TAX_ID
Description: Wirtschafts-Identifikationsnummer / Steuernummer.
Form: GLS_Onboarding
Type: Boolean

## Others

Identifier: ACCEPTED_TERMS_OF_SERVICE
Form: TermOfService
Form: GLS_Onboarding
Type: Boolean
Description: Name of the version of the terms of service accepted by the customer.

Identifier: DOWNLOADED_TERMS_OF_SERVICE
Form: TermOfService
Form: GLS_Onboarding
Type: Boolean
Description: True if the customer read or downloaded the terms of service. It should be set automatically.

##########################
## KYC Forms metadata
##########################

Identifier: FORM_ID
Type: String
Form: FormMetadata
Description: Name of the form completed by the user.

Identifier: FORM_VERSION
Type: Number
Form: FormMetadata
Description: Version of the form completed by the user.

Identifier: FORM_SALT
Type: String
Form: FormMetadata
Description: High entropy value used in forms where hash is going to be stored in plain text.

Identifier: SUPPLEMENTAL_FILES_LIST
Form: vqf_902_1_officer
Type: List of records, usually the file upload and a description.
Description: List of supplemental file attachments.

Identifier: NOTE_TEXT
Type: String
Form: generic_note
Description: Generic note description

##########################

Identifier: FORM_CONTEXT
Type: JSON
Form: any
Description: Context for form submitted by the user.

# Type: { [id: string]: FILE }
Identifier: FILE_MAP
Type: MapStrFile
Form: any
Description: Map of uploaded files.
