refactor: remove all any types, add strict GraphQL scalar typing
All checks were successful
Build Docker Image / build (push) Successful in 4m3s
All checks were successful
Build Docker Image / build (push) Successful in 4m3s
- Add strictScalars: true to codegen.ts with proper scalar mappings (Date, Decimal, JSONString, JSON, UUID, BigInt → string/Record) - Replace all ref<any[]> with proper GraphQL-derived types - Add type guards for null filtering in arrays - Fix bugs exposed by typing (locationLatitude vs latitude, etc.) - Add interfaces for external components (MapboxSearchBox) This enables end-to-end type safety from GraphQL schema to frontend.
This commit is contained in:
@@ -154,10 +154,44 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
interface KycSubmitData {
|
||||
company_name: string
|
||||
company_full_name: string
|
||||
inn: string
|
||||
kpp: string
|
||||
ogrn: string
|
||||
address: string
|
||||
bank_name: string
|
||||
bik: string
|
||||
correspondent_account: string
|
||||
contact_person: string
|
||||
contact_email: string
|
||||
contact_phone: string
|
||||
}
|
||||
|
||||
interface CompanySuggestion {
|
||||
value: string
|
||||
unrestricted_value: string
|
||||
data: {
|
||||
inn: string
|
||||
kpp?: string
|
||||
ogrn?: string
|
||||
address?: { value: string }
|
||||
}
|
||||
}
|
||||
|
||||
interface BankSuggestion {
|
||||
value: string
|
||||
data: {
|
||||
bic: string
|
||||
correspondent_account?: string
|
||||
}
|
||||
}
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
const emit = defineEmits<{
|
||||
submit: [data: any]
|
||||
submit: [data: KycSubmitData]
|
||||
}>()
|
||||
|
||||
const loading = ref(false)
|
||||
@@ -195,7 +229,7 @@ const isFormValid = computed(() => {
|
||||
})
|
||||
|
||||
// Handlers
|
||||
const onCompanySelect = (company: any) => {
|
||||
const onCompanySelect = (company: CompanySuggestion) => {
|
||||
formData.value.company = {
|
||||
companyName: company.value,
|
||||
companyFullName: company.unrestricted_value,
|
||||
@@ -206,7 +240,7 @@ const onCompanySelect = (company: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
const onBankSelect = (bank: any) => {
|
||||
const onBankSelect = (bank: BankSuggestion) => {
|
||||
formData.value.bank = {
|
||||
bankName: bank.value,
|
||||
bik: bank.data.bic,
|
||||
|
||||
Reference in New Issue
Block a user