This commit is contained in:
Shotaro Nakamura
2026-07-10 19:03:57 +09:00
parent df40c591a5
commit 23aa3e5775
42 changed files with 259 additions and 256 deletions
+1
View File
@@ -14,6 +14,7 @@
"hono": "^4.8.3"
},
"devDependencies": {
"@repo/tsconfig": "workspace:*",
"@types/bun": "latest",
"typescript": "^5"
}
+1 -1
View File
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "@repo/tsconfig/tsconfig.json",
"compilerOptions": {
"types": ["bun"],
"rootDir": "src",
+1
View File
@@ -24,6 +24,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
"@repo/tsconfig": "workspace:*",
"@types/bun": "latest",
"drizzle-kit": "^0.31.1",
"typescript": "^5"
+1 -1
View File
@@ -1,7 +1,7 @@
import { mkdirSync } from 'node:fs'
import { dirname, resolve } from 'node:path'
export type ServerConfig = {
export interface ServerConfig {
port: number
databasePath: string
corsOrigin: string
+1 -1
View File
@@ -1,7 +1,7 @@
import type { ServerConfig } from './config'
import type { Db } from './db'
export type AppBindings = {
export interface AppBindings {
Variables: {
db: Db
config: ServerConfig
+1 -1
View File
@@ -14,7 +14,7 @@ import {
import { randomId } from '../security/crypto'
import { deleteSecret, saveSecret } from '../security/keyring'
export type StoredSbiPasskeySecret = {
export interface StoredSbiPasskeySecret {
credential: PlaintextStoredWebAuthnCredential
tradePassword?: string
deviceId?: string
+1 -1
View File
@@ -32,7 +32,7 @@ const requireAuthenticated = (auth: AuthContext) => {
const ORDER_SUBMIT_TICKET_TTL_MS = 10 * 60 * 1000
type OrderSubmitTicket = {
interface OrderSubmitTicket {
passkeyId: string
estimateMethod: RpcMethod
submitMethod: RpcMethod
+3 -3
View File
@@ -11,14 +11,14 @@ import {
import { invokeSbiMethod, isRpcMethod, isTradingMethod, RPC_METHODS } from './methods'
import { connectSbi } from './sbi-session'
type JsonRpcRequest = {
interface JsonRpcRequest {
jsonrpc?: '2.0'
id?: string | number | null
method?: string
params?: unknown
}
type RpcSocketState = {
interface RpcSocketState {
client?: SbiClientMethods
sbiPasskeyId?: string
apiKeyId?: string
@@ -26,7 +26,7 @@ type RpcSocketState = {
boardPollingSubscriptions: Map<string, AbortController>
}
type BoardPollingParams = {
interface BoardPollingParams {
issueCode: string
market: MarketCode
intervalSeconds?: number
+1 -1
View File
@@ -3,7 +3,7 @@ import type { Db } from '../db'
import { apiKeys } from '../db/schema'
import { randomId, randomToken, sha256 } from './crypto'
export type ApiKeySettings = {
export interface ApiKeySettings {
maxTradesPerHour?: number | null
maxTradesPer6Hours?: number | null
maxTradesPerDay?: number | null
@@ -5,7 +5,7 @@ import type { RpcMethod } from '../rpc/methods'
type WindowName = '1h' | '3h' | '1d'
type TradeLimitInput = {
interface TradeLimitInput {
apiKeyId: string
params: unknown
}
+1 -1
View File
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "@repo/tsconfig/tsconfig.json",
"compilerOptions": {
"types": ["bun"],
"rootDir": "src",
+1
View File
@@ -19,6 +19,7 @@
"vue-router": "^5.1.0"
},
"devDependencies": {
"@repo/tsconfig": "workspace:*",
"@tailwindcss/vite": "^4.3.1",
"@types/d3": "^7.4.3",
"@vitejs/plugin-vue": "^6.0.7",
+3 -3
View File
@@ -1,9 +1,9 @@
export type AuthStatus = {
export interface AuthStatus {
configured: boolean
authenticated: boolean
}
export type ApiKey = {
export interface ApiKey {
id: string
label: string
maxTradesPerHour?: number | null
@@ -30,7 +30,7 @@ export type ApiKeySettings = Pick<
| 'scopes'
>
export type SbiPasskey = {
export interface SbiPasskey {
id: string
label: string
createdAt: string
+1 -1
View File
@@ -2,7 +2,7 @@ import { ArrowLeftRight, History, Settings, WalletCards } from 'lucide-vue-next'
import type { Component } from 'vue'
import type { RouteName } from '../router'
export type PageMeta = {
export interface PageMeta {
title: string
icon: Component
}
@@ -2,7 +2,7 @@ import { ref } from 'vue'
import type { ApiKeySettings } from '../../api'
import { defaultApiKeyPolicy } from '../auth/api-key-policy'
export type OAuthApprovalState = {
export interface OAuthApprovalState {
active: boolean
clientId: string
clientName: string
@@ -45,19 +45,19 @@ import { currency, currencyForMarket } from '../../utils/format'
import RealtimePriceChart from './RealtimePriceChart.vue'
type StockInfoTab = 'detail' | 'holding'
type CashOrderAccountTypeOption = {
interface CashOrderAccountTypeOption {
label: string
value: CashOrderAccountType
}
type CashOrderMarketOption = {
interface CashOrderMarketOption {
label: string
value: CashOrderMarket
}
type CashOrderTermOption = {
interface CashOrderTermOption {
label: string
value: CashOrderTerm
}
type CashOrderDateOption = {
interface CashOrderDateOption {
label: string
value: string
}
@@ -12,7 +12,7 @@ import type {
import { currency } from '../../utils/format'
export type RecordLike = Record<string, unknown>
type IssueLike = {
interface IssueLike {
code: string
market: string
name: string
@@ -54,27 +54,27 @@ import {
type RecordLike,
} from './trading-data'
type RpcResolver = {
interface RpcResolver {
resolve: (value: unknown) => void
reject: (reason: Error) => void
}
type CashOrderTermOption = {
interface CashOrderTermOption {
label: string
value: CashOrderTerm
}
type CashOrderAccountTypeOption = {
interface CashOrderAccountTypeOption {
label: string
value: CashOrderAccountType
}
type CashOrderMarketOption = {
interface CashOrderMarketOption {
label: string
value: CashOrderMarket
}
type CashOrderDateOption = {
interface CashOrderDateOption {
label: string
value: string
}
+10 -10
View File
@@ -27,13 +27,13 @@ export type CashOrderTriggerZone = 'above' | 'below'
export type ChartMode = 'line' | 'box'
export type ChartRange = '1D' | '3D' | '3M' | '1Y' | 'ALL'
export type RpcMessage = {
export interface RpcMessage {
id: number
method: string
params?: unknown
}
export type OrderPreview = {
export interface OrderPreview {
issue: {
code: string
market: string
@@ -50,7 +50,7 @@ export type OrderPreview = {
message?: string
}
export type JsonRpcResponse = {
export interface JsonRpcResponse {
id?: number
method?: string
params?: unknown
@@ -60,7 +60,7 @@ export type JsonRpcResponse = {
}
}
export type RealtimePricePoint = {
export interface RealtimePricePoint {
at: string
price: number
open?: number
@@ -70,12 +70,12 @@ export type RealtimePricePoint = {
volume?: number | null
}
export type ChartNotice = {
export interface ChartNotice {
title: string
detail?: string
}
export type MarketIndex = {
export interface MarketIndex {
code?: string
name: string
value: number | null
@@ -88,7 +88,7 @@ export type MarketIndex = {
timestamp?: string
}
export type Stock = {
export interface Stock {
code: string
name: string
symbol: string
@@ -115,7 +115,7 @@ export type Stock = {
}
}
export type OrderRow = {
export interface OrderRow {
id: string
code: string
date: string
@@ -143,7 +143,7 @@ export type OrderDetail = OrderRow & {
accountInformation?: string
}
export type TradeRecordRow = {
export interface TradeRecordRow {
id: string
code: string
stock: string
@@ -158,7 +158,7 @@ export type TradeRecordRow = {
settlementCurrencyCode?: string
}
export type Position = {
export interface Position {
code: string
name: string
market: string
+1 -1
View File
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "@repo/tsconfig/tsconfig.json",
"compilerOptions": {
"lib": ["ESNext", "DOM", "DOM.Iterable"],
"types": ["vite/client"],