Skip to content

Commit 7ed592e

Browse files
committed
feat: add ts types to PostSearchRequest.Types
1 parent 7d11cc1 commit 7ed592e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

backend/pkg/api/types/search.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package types
33
type PostSearchRequest struct {
44
Input string `json:"input"`
55
Networks []interface{} `json:"networks,omitempty" tstype:"(number | string)[]"`
6-
Types []string `json:"types,omitempty"`
6+
Types []string `json:"types,omitempty" tstype:"('validator_by_index' | 'validator_by_public_key' | 'validator_list' | 'validators_by_deposit_address' | 'validators_by_withdrawal_credential' | 'validators_by_graffiti' | 'address' | 'address_by_ens_name' | 'ens_name' | 'transaction' | 'block' | 'epoch' | 'token' | 'slot' | 'slot_by_block_root' | 'slot_by_state_root')[]"`
77
}
88

99
type SearchValidator struct {

frontend/types/api/search.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import type { Address, Hash } from './common'
88
export interface PostSearchRequest {
99
input: string;
1010
networks?: (number | string)[];
11-
types?: string[];
11+
types?: ('validator_by_index' | 'validator_by_public_key' | 'validator_list' | 'validators_by_deposit_address' | 'validators_by_withdrawal_credential' | 'validators_by_graffiti' | 'address' | 'address_by_ens_name' | 'ens_name' | 'transaction' | 'block' | 'epoch' | 'token' | 'slot' | 'slot_by_block_root' | 'slot_by_state_root')[];
1212
}
1313
export interface SearchValidator {
1414
index: number /* uint64 */;

0 commit comments

Comments
 (0)