{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"type": "object",
	"properties": {
		"licenseKey": {
			"type": "string",
			"minLength": 1
		},
		"nonce": {
			"type": "string",
			"minLength": 16
		},
		"documentSelection": {
			"type": "object",
			"properties": {
				"acceptedDocuments": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/Document"
					}
				},
				"rejectedDocuments": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/Document"
					}
				}
			},
			"required": [
				"acceptedDocuments"
			],
			"additionalProperties": false
		},
		"returnDataMode": {
			"type": "string",
			"enum": [
				"Full",
				"FullWithImages"
			]
		},
		"workflow": {
			"type": "object",
			"properties": {
				"showWelcomeScreenDesktop": {
					"type": "boolean"
				},
				"showWelcomeScreenMobile": {
					"type": "boolean"
				},
				"showResultScreen": {
					"type": "boolean"
				},
				"allowImageUpload": {
					"type": "boolean"
				},
				"allowHandover": {
					"type": "boolean"
				}
			},
			"additionalProperties": false
		},
		"theme": {
			"$ref": "#/$defs/Theme"
		},
		"scanner": {
			"$ref": "#/$defs/Scanner"
		},
		"textOverrides": {
			"type": "object",
			"propertyNames": {
				"anyOf": [
					{
						"type": "string",
						"enum": [
							"titles.SCANNER_HEADER",
							"titles.LOCAL_SCAN_HEADER",
							"texts.HELP_SUPPORTED_DOCUMENTS_INCLUDE_LIST",
							"texts.HELP_SUPPORTED_DOCUMENTS_INCLUDE_LIST_BRIEF",
							"texts.HELP_SUPPORTED_DOCUMENTS_EXCLUDE_LIST"
						]
					},
					{
						"not": {}
					}
				]
			},
			"additionalProperties": {
				"type": "string"
			}
		},
		"anonymizationMode": {
			"type": "string",
			"enum": [
				"none",
				"fieldsOnly",
				"imagesOnly",
				"fieldsAndImages"
			]
		},
		"anonymizedFields": {
			"type": "object",
			"properties": {
				"defaultFields": {
					"type": "boolean"
				},
				"extraFields": {
					"type": "array",
					"items": {
						"type": "object",
						"properties": {
							"document": {
								"$ref": "#/$defs/Document"
							},
							"fields": {
								"type": "array",
								"items": {
									"type": "string",
									"enum": [
										"additionalAddressInformation",
										"additionalNameInformation",
										"address",
										"age",
										"barcodeDictionary",
										"bloodType",
										"dateOfBirth",
										"dateOfExpiry",
										"dateOfIssue",
										"documentAdditionalNumber",
										"documentNumber",
										"employer",
										"fathersName",
										"firstName",
										"fullName",
										"issuingAuthority",
										"lastName",
										"maritalStatus",
										"mothersName",
										"mrzOptionalDataInLine1",
										"mrzOptionalDataInLine2",
										"nationality",
										"personalIdNumber",
										"placeOfBirth",
										"profession",
										"race",
										"religion",
										"residentialStatus",
										"sex"
									]
								}
							}
						},
						"required": [
							"document",
							"fields"
						],
						"additionalProperties": false
					}
				}
			},
			"additionalProperties": false
		},
		"externalTransactionId": {
			"type": "string"
		},
		"featureFlags": {
			"type": "object",
			"propertyNames": {
				"type": "string"
			},
			"additionalProperties": {
				"type": "boolean"
			}
		},
		"learnMore": {
			"type": "object",
			"properties": {
				"content": {
					"type": "string"
				},
				"link": {
					"type": "object",
					"properties": {
						"url": {
							"type": "string"
						},
						"text": {
							"type": "string"
						}
					},
					"required": [
						"url",
						"text"
					],
					"additionalProperties": false
				}
			},
			"required": [
				"content"
			],
			"additionalProperties": false
		}
	},
	"required": [
		"licenseKey",
		"nonce",
		"documentSelection"
	],
	"additionalProperties": false,
	"$defs": {
		"Document": {
			"id": "Document",
			"anyOf": [
				{
					"type": "object",
					"properties": {
						"type": {
							"type": "string",
							"enum": [
								"Passport",
								"IdCard",
								"DriverLicense",
								"VisaIcao",
								"ResidencePermit",
								"HealthInsuranceCard",
								"VisaLetter"
							]
						},
						"region": {
							"$ref": "#/$defs/Region"
						}
					},
					"required": [
						"type",
						"region"
					],
					"additionalProperties": false
				},
				{
					"type": "object",
					"properties": {
						"type": {
							"type": "string",
							"const": "RegionSpecific"
						},
						"region": {
							"type": "string",
							"const": "Any"
						},
						"subtype": {
							"type": "string",
							"enum": [
								"usBorderCrossingCard",
								"chinaExitEntryPermit",
								"usGlobalEntryCard",
								"chinaMainlandTravelPermitTaiwan",
								"usNexusCard",
								"chinaMainlandTravelPermitHongKongMacau",
								"apecBusinessTravelCard",
								"pakistanAfghanCitizenCard",
								"singaporeFinCard",
								"malaysiaIkad",
								"malaysiaMykad",
								"malaysiaMypr",
								"mexicoConsularVoterId",
								"germanyEid",
								"usCommonAccessCard",
								"philippinesMultipurposeId",
								"malaysiaMykas",
								"malaysiaMykid",
								"malaysiaMytentera",
								"mexicoProfessionalId",
								"malaysiaRefugeeId",
								"canadaTribalId",
								"usUniformedServicesId",
								"usVeteranId",
								"philippinesWorkPermit",
								"singaporeWorkPermit",
								"usWorkPermit",
								"philippinesSocialSecurityCard",
								"swedenSocialSecurityCard",
								"canadaSocialSecurityCard",
								"usSocialSecurityCard",
								"belgiumMinorsId",
								"colombiaMinorsId",
								"peruMinorsId",
								"boliviaMinorsId",
								"hungaryAddressCard",
								"ukAsylumRequest",
								"canadaCitizenshipCertificate",
								"singaporeEmploymentPass",
								"canadaMinorsPublicServicesCard",
								"malaysiaMypolis",
								"philippinesNbiClearance",
								"indiaPanCard",
								"philippinesPostalId",
								"pakistanProofOfRegistration",
								"singaporeSPass",
								"swedenSisId",
								"colombiaTemporaryProtectionPermit",
								"usTwicCard",
								"usWeaponPermit",
								"canadaWeaponPermit",
								"irelandPublicServicesCard",
								"canadaPublicServicesCard",
								"pakistanConsularId",
								"guatemalaConsularId",
								"mexicoConsularId",
								"philippinesTaxId",
								"mexicoTaxId",
								"chinaOneWayPermit",
								"usMedicalMarijuanaCard",
								"usMunicipalId",
								"australiaAsicCard",
								"uaeVehicleRegistrationCard",
								"uaeEsaadCard",
								"ukMilitaryId"
							]
						}
					},
					"required": [
						"type",
						"region",
						"subtype"
					],
					"additionalProperties": false
				}
			]
		},
		"Region": {
			"id": "Region",
			"type": "string",
			"enum": [
				"Any",
				"ABW",
				"AFG",
				"AGO",
				"AIA",
				"ALA",
				"ALB",
				"AND",
				"ARE",
				"ARG",
				"ARM",
				"ASM",
				"ATA",
				"ATF",
				"ATG",
				"AUS",
				"AUT",
				"AZE",
				"BDI",
				"BEL",
				"BEN",
				"BES",
				"BFA",
				"BGD",
				"BGR",
				"BHR",
				"BHS",
				"BIH",
				"BLM",
				"BLR",
				"BLZ",
				"BMU",
				"BOL",
				"BRA",
				"BRB",
				"BRN",
				"BTN",
				"BVT",
				"BWA",
				"CAF",
				"CAN",
				"CCK",
				"CHE",
				"CHL",
				"CHN",
				"CIV",
				"CMR",
				"COD",
				"COG",
				"COK",
				"COL",
				"COM",
				"CPV",
				"CRI",
				"CUB",
				"CUW",
				"CXR",
				"CYM",
				"CYP",
				"CZE",
				"DEU",
				"DJI",
				"DMA",
				"DNK",
				"DOM",
				"DZA",
				"ECU",
				"EGY",
				"ERI",
				"ESH",
				"ESP",
				"EST",
				"ETH",
				"FIN",
				"FJI",
				"FLK",
				"FRA",
				"FRO",
				"FSM",
				"GAB",
				"GBR",
				"GEO",
				"GGY",
				"GHA",
				"GIB",
				"GIN",
				"GLP",
				"GMB",
				"GNB",
				"GNQ",
				"GRC",
				"GRD",
				"GRL",
				"GTM",
				"GUF",
				"GUM",
				"GUY",
				"HKG",
				"HMD",
				"HND",
				"HRV",
				"HTI",
				"HUN",
				"IDN",
				"IMN",
				"IND",
				"IOT",
				"IRL",
				"IRN",
				"IRQ",
				"ISL",
				"ISR",
				"ITA",
				"JAM",
				"JEY",
				"JOR",
				"JPN",
				"KAZ",
				"KEN",
				"KGZ",
				"KHM",
				"KIR",
				"KNA",
				"KOR",
				"KWT",
				"LAO",
				"LBN",
				"LBR",
				"LBY",
				"LCA",
				"LIE",
				"LKA",
				"LSO",
				"LTU",
				"LUX",
				"LVA",
				"MAC",
				"MAF",
				"MAR",
				"MCO",
				"MDA",
				"MDG",
				"MDV",
				"MEX",
				"MHL",
				"MKD",
				"MLI",
				"MLT",
				"MMR",
				"MNE",
				"MNG",
				"MNP",
				"MOZ",
				"MRT",
				"MSR",
				"MTQ",
				"MUS",
				"MWI",
				"MYS",
				"MYT",
				"NAM",
				"NCL",
				"NER",
				"NFK",
				"NGA",
				"NIC",
				"NIU",
				"NLD",
				"NOR",
				"NPL",
				"NRU",
				"NZL",
				"OMN",
				"PAK",
				"PAN",
				"PCN",
				"PER",
				"PHL",
				"PLW",
				"PNG",
				"POL",
				"PRI",
				"PRK",
				"PRT",
				"PRY",
				"PSE",
				"PYF",
				"QAT",
				"REU",
				"ROU",
				"RUS",
				"RWA",
				"SAU",
				"SDN",
				"SEN",
				"SGP",
				"SGS",
				"SHN",
				"SJM",
				"SLB",
				"SLE",
				"SLV",
				"SMR",
				"SOM",
				"SPM",
				"SRB",
				"SSD",
				"STP",
				"SUR",
				"SVK",
				"SVN",
				"SWE",
				"SWZ",
				"SXM",
				"SYC",
				"SYR",
				"TCA",
				"TCD",
				"TGO",
				"THA",
				"TJK",
				"TKL",
				"TKM",
				"TLS",
				"TON",
				"TTO",
				"TUN",
				"TUR",
				"TUV",
				"TWN",
				"TZA",
				"UGA",
				"UKR",
				"UMI",
				"URY",
				"USA",
				"UZB",
				"VAT",
				"VCT",
				"VEN",
				"VGB",
				"VIR",
				"VNM",
				"VUT",
				"WLF",
				"WSM",
				"XKX",
				"YEM",
				"ZAF",
				"ZMB",
				"ZWE"
			]
		},
		"Theme": {
			"id": "Theme",
			"type": "object",
			"properties": {
				"colors": {
					"type": "object",
					"properties": {
						"primary": {
							"type": "string"
						},
						"image": {
							"type": "string"
						},
						"background": {
							"type": "string"
						},
						"backgroundSecondary": {
							"type": "string"
						},
						"backgroundInverse": {
							"type": "string"
						},
						"backgroundScannerPlaceholder": {
							"type": "string"
						},
						"textScannerPlaceholder": {
							"type": "string"
						},
						"textPrimary": {
							"type": "string"
						},
						"textSecondary": {
							"type": "string"
						},
						"textTertiary": {
							"type": "string"
						},
						"textInverse": {
							"type": "string"
						},
						"success": {
							"type": "string"
						},
						"error": {
							"type": "string"
						},
						"warning": {
							"type": "string"
						},
						"info": {
							"type": "string"
						},
						"connectionStatusConnectingBackground": {
							"type": "string"
						},
						"connectionStatusConnectingText": {
							"type": "string"
						},
						"connectionStatusSuccessBackground": {
							"type": "string"
						},
						"connectionStatusSuccessText": {
							"type": "string"
						},
						"connectionStatusErrorBackground": {
							"type": "string"
						},
						"connectionStatusErrorText": {
							"type": "string"
						},
						"buttonBackground": {
							"type": "string"
						},
						"buttonText": {
							"type": "string"
						},
						"buttonBorder": {
							"type": "string"
						},
						"buttonBorderSecondary": {
							"type": "string"
						},
						"buttonBackgroundDisabled": {
							"type": "string"
						},
						"buttonBorderDisabled": {
							"type": "string"
						},
						"buttonTextDisabled": {
							"type": "string"
						},
						"headerButtons": {
							"type": "string"
						},
						"divider": {
							"type": "string"
						}
					},
					"additionalProperties": false
				},
				"dimensions": {
					"type": "object",
					"properties": {
						"radiusPopup": {
							"type": "string"
						},
						"radiusButton": {
							"type": "string"
						},
						"radiusCard": {
							"type": "string"
						}
					},
					"additionalProperties": false
				},
				"images": {
					"type": "object",
					"properties": {
						"welcome": {
							"type": "string"
						},
						"flowCompleted": {
							"type": "string"
						},
						"acceptedId": {
							"type": "string"
						}
					},
					"additionalProperties": false
				},
				"fonts": {
					"type": "object",
					"properties": {
						"primary": {
							"type": "object",
							"properties": {
								"normal": {
									"type": "string"
								},
								"semibold": {
									"type": "string"
								},
								"bold": {
									"type": "string"
								}
							},
							"additionalProperties": false
						}
					},
					"additionalProperties": false
				},
				"banner": {
					"type": "object",
					"properties": {
						"image": {
							"type": "string"
						},
						"backgroundColor": {
							"type": "string"
						},
						"horizontalAlignment": {
							"type": "string",
							"enum": [
								"left",
								"center",
								"right"
							]
						}
					},
					"required": [
						"image"
					],
					"additionalProperties": false
				},
				"styleOverrides": {
					"type": "object",
					"properties": {
						"button": {
							"type": "string"
						},
						"link": {
							"type": "string"
						},
						"title": {
							"type": "string"
						},
						"banner": {
							"type": "string"
						}
					},
					"additionalProperties": false
				}
			},
			"additionalProperties": false
		},
		"Scanner": {
			"id": "Scanner",
			"anyOf": [
				{
					"type": "object",
					"properties": {
						"type": {
							"type": "string",
							"const": "full"
						}
					},
					"required": [
						"type"
					],
					"additionalProperties": false
				},
				{
					"type": "object",
					"properties": {
						"type": {
							"type": "string",
							"const": "singleSide"
						},
						"barcode": {
							"type": "boolean"
						},
						"machineReadableZone": {
							"type": "boolean"
						},
						"visualInspectionZone": {
							"type": "boolean"
						},
						"enforceVizForPassportScan": {
							"type": "boolean"
						}
					},
					"required": [
						"type",
						"barcode",
						"machineReadableZone",
						"visualInspectionZone"
					],
					"additionalProperties": false
				}
			]
		}
	}
}
