chore: land in-progress workspace changes before 1.16.2

The tree carried uncommitted work from several areas (web push, mobile
screens, admin charts, test-hygiene cleanup, CI and map docs). It is landed
as one commit so the release pipeline can start from a clean tree; the
desktop transcript-correction behaviour shipped in the previous commit and
is unchanged here.
This commit is contained in:
Yun Chan 2026-11-05 21:58:44 +09:00
parent 9c2b6a9782
commit 7fe49c437e
144 changed files with 3760 additions and 4523 deletions

View file

@ -15,6 +15,8 @@ import type {
TeamMember,
Subscription,
SubscriptionTier,
PushProvider,
PushToken,
TeamRole,
MeetingStatus,
DocumentTemplateType,
@ -111,6 +113,38 @@ describe('api-client types', () => {
expect(check).toBe('public')
})
it('push token 행과 quota RPC 인자가 최신 DB 계약을 포함한다', () => {
const provider: PushProvider = 'webpush'
const pushToken: PushToken = {
id: 'token-uuid',
user_id: 'user-uuid',
token: 'subscription-json',
platform: 'web',
device_name: null,
device_id: 'device-uuid',
provider,
last_registered_at: '2026-11-04T00:00:00Z',
created_at: '2026-11-04T00:00:00Z',
updated_at: '2026-11-04T00:00:00Z',
}
const insert: Database['public']['Tables']['push_tokens']['Insert'] = {
user_id: pushToken.user_id,
token: pushToken.token,
platform: pushToken.platform,
device_id: pushToken.device_id,
provider,
}
const quotaArgs: Database['public']['Functions']['consume_quota']['Args'] = {
p_user_id: 'user-uuid',
p_feature: 'knowledge_embedding',
p_base_limit: 5_000,
p_period: 'weekly',
}
expect(insert.device_id).toBe('device-uuid')
expect(quotaArgs.p_period).toBe('weekly')
})
// 미사용 import 방지용
it('모든 타입 import 검증', () => {
const _unused: [

View file

@ -29,7 +29,6 @@
}
},
"dependencies": {
"@d3ro/core": "*",
"@supabase/supabase-js": "^2.45.0"
},
"peerDependencies": {

View file

@ -275,6 +275,21 @@ export type Device = {
updated_at: string
}
export type PushProvider = 'fcm' | 'apns' | 'webpush'
export type PushToken = {
id: string
user_id: string
token: string
platform: 'ios' | 'android' | 'web'
device_name: string | null
device_id: string
provider: PushProvider
last_registered_at: string
created_at: string
updated_at: string
}
export type StorePurchaseState =
| 'pending'
| 'purchased'
@ -524,22 +539,10 @@ export type Database = {
Partial<KnowledgeChunk>
>
push_tokens: TypedTable<
{
id: string
user_id: string
token: string
platform: 'ios' | 'android' | 'web'
device_name: string | null
created_at: string
updated_at: string
},
{
user_id: string
token: string
platform: 'ios' | 'android' | 'web'
device_name?: string | null
},
Partial<{ device_name: string | null }>
PushToken,
Pick<PushToken, 'user_id' | 'token' | 'platform' | 'device_id' | 'provider'> &
Partial<Pick<PushToken, 'device_name' | 'last_registered_at' | 'created_at' | 'updated_at'>>,
Partial<PushToken>
>
team_invites: TypedTable<
{
@ -592,6 +595,25 @@ export type Database = {
Args: Record<string, never>
Returns: string
}
register_push_registration: {
Args: {
push_device_id: string
push_provider: PushProvider
registration_id: string
}
Returns: {
device_id: string
provider: PushProvider
registered_at: string
}
}
unregister_push_registration: {
Args: { push_device_id: string }
Returns: {
device_id: string
removed: boolean
}
}
user_team_ids: {
Args: { uid: string }
Returns: Array<{ team_id: string }>
@ -635,6 +657,7 @@ export type Database = {
p_user_id: string
p_feature: string
p_base_limit: number
p_period?: 'daily' | 'weekly'
}
Returns: Record<string, unknown>
}