Some checks failed
ci / 정본·보안·린트·타입·테스트 (push) Failing after 1m13s
ci / 워크스페이스 빌드 검증 (push) Has been skipped
ci / 모바일 린트·타입·Jest (push) Failing after 1m4s
ci / Supabase Edge Functions + Cloudflare Worker (push) Successful in 37s
ci / .NET API 서버 테스트 (push) Successful in 27s
deploy-site / deploy (push) Failing after 20s
Stripe is not used. Keeping its checkout, portal and webhook paths meant a
second payment provider, a second return-URL format and dead UI.
- Delete the stripe-checkout, stripe-portal and stripe-webhook functions and
their config; billing-catalog serves Payple prices only, and the web parser
rejects a catalog that still mixes in Stripe prices.
- Web: drop the Stripe checkout/portal buttons, provider toggle and return
notices; billing shows Payple only. Past rows with provider='stripe' are
still displayed ("Stripe (종료)") with a support contact instead of a portal.
- Desktop: delete the Stripe checkout modal, payment IPC channels, preload
namespace and their types; "Remove ads with Pro" opens the web billing page
via license.openBilling. Support/refund copy names Payple.
- billingUrl() loses the Stripe-only success/canceled result option; the
Deno contract is regenerated.
- Migrations and the DB's accepted provider values are untouched (history).
- Docs and the backlog record the removal (MON-04, EXT-STRIPE-01, GAP-BILL-03).
Verified: typecheck (desktop/web/admin/api-client/mobile), contract:check,
deno check all functions, deno test 80/80, desktop 1478/1480 on the Electron
runtime (2 known environment failures), web and admin builds, release
metadata and mobile boundary self-tests, eslint on changed files.
82 lines
3.3 KiB
TypeScript
82 lines
3.3 KiB
TypeScript
// packages/core/src/plan-catalog.ts
|
|
// 요금제 가격 SSOT — 데스크톱·웹·관리자·모바일·랜딩 사이트가 모두 여기서 읽는다.
|
|
//
|
|
// Supabase Edge Function(Deno)은 저장소의 이 경로를 번들할 수 없으므로
|
|
// `npm run contract:sync`가 server/supabase/functions/_shared/core-contract.generated.ts 로
|
|
// 값을 복사하고, `npm run contract:check`가 CI에서 어긋남을 막는다.
|
|
// 그래서 이 파일은 import 없이 순수 값만 둔다.
|
|
|
|
export type PaidPlanTier = 'pro' | 'pro_plus'
|
|
export type PlanTier = 'free' | PaidPlanTier
|
|
|
|
/**
|
|
* 월 요금(원). Payple 청구 금액이며, 기존 구독자도 다음 갱신부터 이 값으로 청구된다.
|
|
* Google Play 가격은 Play Console에서 따로 관리한다. 웹 결제는 Payple(KRW) 하나다.
|
|
*/
|
|
export const PLAN_PRICE_KRW: Readonly<Record<PlanTier, number>> = {
|
|
free: 0,
|
|
pro: 2900,
|
|
pro_plus: 8900,
|
|
}
|
|
|
|
// ── 클라우드 사용량 한도 ─────────────────────────────────
|
|
// 서버(Deno `_shared/quota.ts`)가 실제로 집행하고, 데스크톱·사이트는 표시만 한다.
|
|
// Free 는 주간, 나머지는 일간. limit: -1=무제한, 0=사용 불가, 양수=한도.
|
|
|
|
/** 사용량 한도를 갖는 티어. 결제 티어 외에 팀·엔터프라이즈 계약 티어를 포함한다. */
|
|
export type PlanQuotaTier = PlanTier | 'team' | 'enterprise'
|
|
|
|
/** 쿼터 추적 키 — 서버 daily_usage.feature 값과 같다. */
|
|
export type PlanQuotaFeature =
|
|
| 'stt_transcribe'
|
|
| 'llm_haiku'
|
|
| 'llm_sonnet'
|
|
| 'llm_opus'
|
|
| 'realtime_session'
|
|
|
|
export type PlanQuotaPeriod = 'daily' | 'weekly'
|
|
|
|
export interface PlanQuota {
|
|
/** -1=무제한, 0=사용 불가, 양수=한도 */
|
|
readonly limit: number
|
|
readonly period: PlanQuotaPeriod
|
|
}
|
|
|
|
export const PLAN_QUOTA: Readonly<Record<PlanQuotaTier, Readonly<Record<PlanQuotaFeature, PlanQuota>>>> = {
|
|
free: {
|
|
stt_transcribe: { limit: 250, period: 'weekly' },
|
|
llm_haiku: { limit: 250, period: 'weekly' },
|
|
llm_sonnet: { limit: 0, period: 'daily' },
|
|
llm_opus: { limit: 0, period: 'daily' },
|
|
realtime_session: { limit: 0, period: 'daily' },
|
|
},
|
|
pro: {
|
|
stt_transcribe: { limit: -1, period: 'daily' },
|
|
llm_haiku: { limit: 1500, period: 'daily' },
|
|
llm_sonnet: { limit: 300, period: 'daily' },
|
|
llm_opus: { limit: 50, period: 'daily' },
|
|
// 세션 수 기준 (~$0.016/분 mini — 세션당 평균 수 분 가정)
|
|
realtime_session: { limit: 30, period: 'daily' },
|
|
},
|
|
pro_plus: {
|
|
stt_transcribe: { limit: -1, period: 'daily' },
|
|
llm_haiku: { limit: -1, period: 'daily' },
|
|
llm_sonnet: { limit: 1500, period: 'daily' },
|
|
llm_opus: { limit: 300, period: 'daily' },
|
|
realtime_session: { limit: 120, period: 'daily' },
|
|
},
|
|
team: {
|
|
stt_transcribe: { limit: -1, period: 'daily' },
|
|
llm_haiku: { limit: -1, period: 'daily' },
|
|
llm_sonnet: { limit: 3000, period: 'daily' },
|
|
llm_opus: { limit: 600, period: 'daily' },
|
|
realtime_session: { limit: 300, period: 'daily' },
|
|
},
|
|
enterprise: {
|
|
stt_transcribe: { limit: -1, period: 'daily' },
|
|
llm_haiku: { limit: -1, period: 'daily' },
|
|
llm_sonnet: { limit: -1, period: 'daily' },
|
|
llm_opus: { limit: -1, period: 'daily' },
|
|
realtime_session: { limit: -1, period: 'daily' },
|
|
},
|
|
}
|