@sayren/store-sdk 0.52.0 → 0.53.0

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.mjs CHANGED
@@ -11212,8 +11212,7 @@ const subscriptionLimitsSchema = z$1.object({
11212
11212
  storefrontBuildMinutesMonthly: limit("스토어프론트 빌드 월 분"),
11213
11213
  adminApiRequestsMonthly: limit("관리 API 요청 월 포함량(넘으면 속도만 낮춘다, 주문 처리 제외)"),
11214
11214
  publicApps: limit("공개 앱(앱 스토어에 게시된 앱) 설치 수").optional(),
11215
- privateApps: limit("비공개 앱(이 상점 전용 앱) 설치 수(0이면 설치할 수 없다)").optional(),
11216
- aiCreditsMonthly: limit("AI 상점 도우미 월 크레딧").optional()
11215
+ privateApps: limit("비공개 앱(이 상점 전용 앱) 설치 수(0이면 설치할 수 없다)").optional()
11217
11216
  });
11218
11217
  const subscriptionUsageSchema = z$1.object({
11219
11218
  liveOrders: z$1.number().int().describe("이번 기간 라이브 주문 수(테스트 결제 주문 제외)"),
@@ -11247,6 +11246,7 @@ const storeSubscriptionSchema = z$1.object({
11247
11246
  adminApi: z$1.boolean().describe("관리 API(개인 액세스 토큰·외부 앱 토큰 호출)를 쓸 수 있다"),
11248
11247
  analytics: z$1.boolean().describe("애널리틱스 조회를 쓸 수 있다"),
11249
11248
  members: z$1.boolean().optional().describe("소유자 외 구성원이 상점에 접근할 수 있다(false면 소유자만, 구성원 목록은 남는다)"),
11249
+ aiAssistant: z$1.boolean().optional().describe("AI 상점 도우미를 쓸 수 있다(false면 새 실행을 시작할 수 없다)"),
11250
11250
  storeClone: z$1.boolean().describe("더 쓰지 않는다 — 상점 복제 기능을 없애 항상 false"),
11251
11251
  removeBadge: z$1.boolean().describe("더 쓰지 않는다 — 배지 키를 없애 항상 false")
11252
11252
  }),
@@ -11261,16 +11261,6 @@ const storeSubscriptionSchema = z$1.object({
11261
11261
  used: z$1.number().int(),
11262
11262
  resetsAt: z$1.string().describe("한도가 초기화되는 시각(ISO 8601)")
11263
11263
  }).describe("MCP 읽기 한도 요약"),
11264
- aiCredits: z$1.object({
11265
- monthly: z$1.number().int().nullable().describe("요금제 월 크레딧. null이면 한도 없음"),
11266
- granted: z$1.number().int().describe("이번 기간에 쓸 수 있는 추가 지급 크레딧"),
11267
- used: z$1.number().int().describe("이번 기간 사용한 크레딧"),
11268
- monthlyUsed: z$1.number().int().optional().describe("이번 기간 월 크레딧에서 쓴 양"),
11269
- purchased: z$1.number().int().optional().describe("남은 구매 크레딧 — 구매일부터 1년, 월 크레딧이 초기화돼도 남는다"),
11270
- complimentary: z$1.number().int().optional().describe("남은 무상 지급 크레딧(이벤트·보상)"),
11271
- remaining: z$1.number().int().nullable().describe("남은 크레딧(월 + 구매 + 무상). null이면 한도 없음"),
11272
- resetsAt: z$1.string().describe("월 크레딧이 초기화되는 시각(ISO 8601). 월 크레딧은 이월하지 않는다")
11273
- }).optional().describe("AI 상점 도우미 크레딧 — 1 크레딧은 모델 원가 $0.01. 남은 크레딧이 없으면 새 실행을 만들 수 없다"),
11274
11264
  salesFeePercent: z$1.literal(0).describe("판매 수수료(%). 모든 요금제 0이다")
11275
11265
  });
11276
11266
  /**
@@ -11295,20 +11285,20 @@ const planErrorDetailsSchema = z$1.object({
11295
11285
  */
11296
11286
  const limitOrContract = (description) => z$1.number().int().nullable().describe(`${description}. null이면 계약(엔터프라이즈)·한도 없음`);
11297
11287
  /**
11298
- * 요금제 기능 키 값 — 요금제 비교표·상점 플랫폼 요금제 화면이 쓴다. 키는 서버 판정의 기능 키와 같다(추가만 한다). 상위 요금제는 하위 요금제
11299
- * 기능을 모두 포함한다
11288
+ * 요금제 기능 키 값 — 요금제 비교표·상점 플랫폼 요금제 화면이 쓴다. 키는 서버 판정의 기능 키와 같다(추가만 한다 — 예외는 0.53에서 지운
11289
+ * `limits.ai_credits_monthly`). 상위 요금제는 하위 요금제 기능을 모두 포함한다
11300
11290
  */
11301
11291
  const planEntitlementsSchema = z$1.object({
11302
11292
  "features.members": z$1.boolean().describe("소유자 외 구성원(관리자·직원)의 초대와 상점 접근. false면 소유자만 쓴다"),
11303
11293
  "features.admin_api": z$1.boolean().describe("관리 API(개인 액세스 토큰·외부 앱 토큰 호출). 상점 플랫폼·CLI·MCP는 모든 요금제에서 쓴다"),
11304
11294
  "features.analytics": z$1.boolean().describe("애널리틱스 화면·조회 API"),
11295
+ "features.ai_assistant": z$1.boolean().optional().describe("AI 상점 도우미. false면 새 실행을 시작할 수 없다(403 `PLAN_FEATURE_REQUIRED`)"),
11305
11296
  "limits.ai_reads_monthly": limitOrContract("MCP 읽기 월 한도"),
11306
11297
  "limits.ai_actions_monthly": limitOrContract("MCP 쓰기(AI 작업) 월 한도 — 주문 처리는 막지 않는다"),
11307
11298
  "limits.custom_domains": limitOrContract("내 도메인 수"),
11308
11299
  "limits.webhooks": limitOrContract("웹훅 구독 수(0이면 쓸 수 없다)"),
11309
11300
  "limits.public_apps": limitOrContract("공개 앱(앱 스토어 게시 앱) 설치 수"),
11310
11301
  "limits.private_apps": limitOrContract("비공개 앱(이 상점 전용 앱) 설치 수(0이면 설치할 수 없다)"),
11311
- "limits.ai_credits_monthly": limitOrContract("AI 상점 도우미 월 크레딧(1 크레딧 = 모델 원가 $0.01, 이월 없음)"),
11312
11302
  "limits.storefront_preview_hours_monthly": limitOrContract("편집 환경 시간(월, 시간)"),
11313
11303
  "limits.storefront_build_minutes_monthly": limitOrContract("빌드 시간(월, 분)"),
11314
11304
  "limits.storefront_requests_monthly": limitOrContract("스토어프론트 월 트래픽(요청 수) — 넘어도 막지 않고 안내만 한다"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sayren/store-sdk",
3
- "version": "0.52.0",
3
+ "version": "0.53.0",
4
4
  "main": "./dist/index.mjs",
5
5
  "types": "./dist/index.d.mts",
6
6
  "exports": {
@@ -10,8 +10,8 @@ const limitOrContract = (description: string) =>
10
10
  z.number().int().nullable().describe(`${description}. null이면 계약(엔터프라이즈)·한도 없음`);
11
11
 
12
12
  /**
13
- * 요금제 기능 키 값 — 요금제 비교표·상점 플랫폼 요금제 화면이 쓴다. 키는 서버 판정의 기능 키와 같다(추가만 한다). 상위 요금제는 하위 요금제
14
- * 기능을 모두 포함한다
13
+ * 요금제 기능 키 값 — 요금제 비교표·상점 플랫폼 요금제 화면이 쓴다. 키는 서버 판정의 기능 키와 같다(추가만 한다 — 예외는 0.53에서 지운
14
+ * `limits.ai_credits_monthly`). 상위 요금제는 하위 요금제 기능을 모두 포함한다
15
15
  */
16
16
  export const planEntitlementsSchema = z
17
17
  .object({
@@ -24,6 +24,10 @@ export const planEntitlementsSchema = z
24
24
  "관리 API(개인 액세스 토큰·외부 앱 토큰 호출). 상점 플랫폼·CLI·MCP는 모든 요금제에서 쓴다",
25
25
  ),
26
26
  "features.analytics": z.boolean().describe("애널리틱스 화면·조회 API"),
27
+ "features.ai_assistant": z
28
+ .boolean()
29
+ .optional()
30
+ .describe("AI 상점 도우미. false면 새 실행을 시작할 수 없다(403 `PLAN_FEATURE_REQUIRED`)"),
27
31
  "limits.ai_reads_monthly": limitOrContract("MCP 읽기 월 한도"),
28
32
  "limits.ai_actions_monthly": limitOrContract(
29
33
  "MCP 쓰기(AI 작업) 월 한도 — 주문 처리는 막지 않는다",
@@ -34,9 +38,6 @@ export const planEntitlementsSchema = z
34
38
  "limits.private_apps": limitOrContract(
35
39
  "비공개 앱(이 상점 전용 앱) 설치 수(0이면 설치할 수 없다)",
36
40
  ),
37
- "limits.ai_credits_monthly": limitOrContract(
38
- "AI 상점 도우미 월 크레딧(1 크레딧 = 모델 원가 $0.01, 이월 없음)",
39
- ),
40
41
  "limits.storefront_preview_hours_monthly": limitOrContract("편집 환경 시간(월, 시간)"),
41
42
  "limits.storefront_build_minutes_monthly": limitOrContract("빌드 시간(월, 분)"),
42
43
  "limits.storefront_requests_monthly": limitOrContract(
@@ -49,7 +49,6 @@ export const subscriptionLimitsSchema = z.object({
49
49
  adminApiRequestsMonthly: limit("관리 API 요청 월 포함량(넘으면 속도만 낮춘다, 주문 처리 제외)"),
50
50
  publicApps: limit("공개 앱(앱 스토어에 게시된 앱) 설치 수").optional(),
51
51
  privateApps: limit("비공개 앱(이 상점 전용 앱) 설치 수(0이면 설치할 수 없다)").optional(),
52
- aiCreditsMonthly: limit("AI 상점 도우미 월 크레딧").optional(),
53
52
  });
54
53
  export type SubscriptionLimits = z.infer<typeof subscriptionLimitsSchema>;
55
54
 
@@ -98,6 +97,10 @@ export const storeSubscriptionSchema = z.object({
98
97
  .boolean()
99
98
  .optional()
100
99
  .describe("소유자 외 구성원이 상점에 접근할 수 있다(false면 소유자만, 구성원 목록은 남는다)"),
100
+ aiAssistant: z
101
+ .boolean()
102
+ .optional()
103
+ .describe("AI 상점 도우미를 쓸 수 있다(false면 새 실행을 시작할 수 없다)"),
101
104
  storeClone: z.boolean().describe("더 쓰지 않는다 — 상점 복제 기능을 없애 항상 false"),
102
105
  removeBadge: z.boolean().describe("더 쓰지 않는다 — 배지 키를 없애 항상 false"),
103
106
  }),
@@ -116,31 +119,6 @@ export const storeSubscriptionSchema = z.object({
116
119
  resetsAt: z.string().describe("한도가 초기화되는 시각(ISO 8601)"),
117
120
  })
118
121
  .describe("MCP 읽기 한도 요약"),
119
- aiCredits: z
120
- .object({
121
- monthly: z.number().int().nullable().describe("요금제 월 크레딧. null이면 한도 없음"),
122
- granted: z.number().int().describe("이번 기간에 쓸 수 있는 추가 지급 크레딧"),
123
- used: z.number().int().describe("이번 기간 사용한 크레딧"),
124
- monthlyUsed: z.number().int().optional().describe("이번 기간 월 크레딧에서 쓴 양"),
125
- purchased: z
126
- .number()
127
- .int()
128
- .optional()
129
- .describe("남은 구매 크레딧 — 구매일부터 1년, 월 크레딧이 초기화돼도 남는다"),
130
- complimentary: z.number().int().optional().describe("남은 무상 지급 크레딧(이벤트·보상)"),
131
- remaining: z
132
- .number()
133
- .int()
134
- .nullable()
135
- .describe("남은 크레딧(월 + 구매 + 무상). null이면 한도 없음"),
136
- resetsAt: z
137
- .string()
138
- .describe("월 크레딧이 초기화되는 시각(ISO 8601). 월 크레딧은 이월하지 않는다"),
139
- })
140
- .optional()
141
- .describe(
142
- "AI 상점 도우미 크레딧 — 1 크레딧은 모델 원가 $0.01. 남은 크레딧이 없으면 새 실행을 만들 수 없다",
143
- ),
144
122
  salesFeePercent: z.literal(0).describe("판매 수수료(%). 모든 요금제 0이다"),
145
123
  });
146
124
  export type StoreSubscription = z.infer<typeof storeSubscriptionSchema>;