@thinkingcat/subscription-ui 1.0.0 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -36,8 +36,63 @@ interface SubscribePageConfig {
36
36
  primaryColor?: string;
37
37
  /** 구독 만료 안내 메시지 표시 여부 */
38
38
  showExpiredBanner?: boolean;
39
+ /**
40
+ * 테마 설정 (default: "system")
41
+ * - "light": 항상 라이트 모드
42
+ * - "dark": 항상 다크 모드
43
+ * - "system": OS/HTML 다크모드 설정 자동 적용
44
+ */
45
+ theme?: "light" | "dark" | "system";
39
46
  }
47
+ interface Subscription {
48
+ id: string;
49
+ status: string;
50
+ startDate: string;
51
+ endDate: string;
52
+ currentPeriodStart: string;
53
+ currentPeriodEnd: string;
54
+ autoRenew: boolean;
55
+ isTrial: boolean;
56
+ plan: {
57
+ id: string;
58
+ name: string;
59
+ price: number;
60
+ interval: number;
61
+ };
62
+ service: {
63
+ serviceId: string;
64
+ displayName: string;
65
+ };
66
+ remainingDays: number;
67
+ statusMessage: string;
68
+ }
69
+ interface Payment {
70
+ id: string;
71
+ paymentId: string;
72
+ orderName: string;
73
+ amount: number;
74
+ status: string;
75
+ paidAt: string;
76
+ createdAt: string;
77
+ planName: string | null;
78
+ serviceName: string | null;
79
+ maskedCardNumber: string | null;
80
+ cardBrand: string | null;
81
+ subscriptionId: string | null;
82
+ }
83
+ interface SubscriptionManagementConfig {
84
+ /** 구독 조회/취소 API 경로 (default: /api/subscribe/subscriptions) */
85
+ subscriptionsApiPath?: string;
86
+ /** 결제 이력/취소 API 경로 (default: /api/subscribe/payments) */
87
+ paymentsApiPath?: string;
88
+ /** 브랜드 색상 (default: #60A5FA) */
89
+ primaryColor?: string;
90
+ /** 테마 (default: "system") */
91
+ theme?: "light" | "dark" | "system";
92
+ }
93
+
94
+ declare function SubscribePage({ plansApiPath, cardsApiPath, payApiPath, callbackUrl, serviceName, primaryColor, showExpiredBanner, theme, }: SubscribePageConfig): react_jsx_runtime.JSX.Element;
40
95
 
41
- declare function SubscribePage({ plansApiPath, cardsApiPath, payApiPath, callbackUrl, serviceName, primaryColor, showExpiredBanner, }: SubscribePageConfig): react_jsx_runtime.JSX.Element;
96
+ declare function SubscriptionManagement({ subscriptionsApiPath, paymentsApiPath, primaryColor, theme, }: SubscriptionManagementConfig): react_jsx_runtime.JSX.Element;
42
97
 
43
- export { type Card, type Plan, SubscribePage, type SubscribePageConfig };
98
+ export { type Card, type Payment, type Plan, SubscribePage, type SubscribePageConfig, type Subscription, SubscriptionManagement, type SubscriptionManagementConfig };
package/dist/index.d.ts CHANGED
@@ -36,8 +36,63 @@ interface SubscribePageConfig {
36
36
  primaryColor?: string;
37
37
  /** 구독 만료 안내 메시지 표시 여부 */
38
38
  showExpiredBanner?: boolean;
39
+ /**
40
+ * 테마 설정 (default: "system")
41
+ * - "light": 항상 라이트 모드
42
+ * - "dark": 항상 다크 모드
43
+ * - "system": OS/HTML 다크모드 설정 자동 적용
44
+ */
45
+ theme?: "light" | "dark" | "system";
39
46
  }
47
+ interface Subscription {
48
+ id: string;
49
+ status: string;
50
+ startDate: string;
51
+ endDate: string;
52
+ currentPeriodStart: string;
53
+ currentPeriodEnd: string;
54
+ autoRenew: boolean;
55
+ isTrial: boolean;
56
+ plan: {
57
+ id: string;
58
+ name: string;
59
+ price: number;
60
+ interval: number;
61
+ };
62
+ service: {
63
+ serviceId: string;
64
+ displayName: string;
65
+ };
66
+ remainingDays: number;
67
+ statusMessage: string;
68
+ }
69
+ interface Payment {
70
+ id: string;
71
+ paymentId: string;
72
+ orderName: string;
73
+ amount: number;
74
+ status: string;
75
+ paidAt: string;
76
+ createdAt: string;
77
+ planName: string | null;
78
+ serviceName: string | null;
79
+ maskedCardNumber: string | null;
80
+ cardBrand: string | null;
81
+ subscriptionId: string | null;
82
+ }
83
+ interface SubscriptionManagementConfig {
84
+ /** 구독 조회/취소 API 경로 (default: /api/subscribe/subscriptions) */
85
+ subscriptionsApiPath?: string;
86
+ /** 결제 이력/취소 API 경로 (default: /api/subscribe/payments) */
87
+ paymentsApiPath?: string;
88
+ /** 브랜드 색상 (default: #60A5FA) */
89
+ primaryColor?: string;
90
+ /** 테마 (default: "system") */
91
+ theme?: "light" | "dark" | "system";
92
+ }
93
+
94
+ declare function SubscribePage({ plansApiPath, cardsApiPath, payApiPath, callbackUrl, serviceName, primaryColor, showExpiredBanner, theme, }: SubscribePageConfig): react_jsx_runtime.JSX.Element;
40
95
 
41
- declare function SubscribePage({ plansApiPath, cardsApiPath, payApiPath, callbackUrl, serviceName, primaryColor, showExpiredBanner, }: SubscribePageConfig): react_jsx_runtime.JSX.Element;
96
+ declare function SubscriptionManagement({ subscriptionsApiPath, paymentsApiPath, primaryColor, theme, }: SubscriptionManagementConfig): react_jsx_runtime.JSX.Element;
42
97
 
43
- export { type Card, type Plan, SubscribePage, type SubscribePageConfig };
98
+ export { type Card, type Payment, type Plan, SubscribePage, type SubscribePageConfig, type Subscription, SubscriptionManagement, type SubscriptionManagementConfig };