@reopt-ai/brandapp-sdk 4.2.0 → 4.3.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/CHANGELOG.md +11 -2
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/index.js +1 -1
- package/dist/ai-provider/index.js +2 -2
- package/dist/analytics/index.js +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/better-auth/index.d.ts +1 -1
- package/dist/better-auth/index.js +2 -2
- package/dist/{client-CeYaCY1n.d.ts → client-B4CiEei5.d.ts} +6 -4
- package/dist/{client-C5CsGtWK.js → client-BD1-resY.js} +3 -3
- package/dist/{client-DR5Eb36i.js → client-BMgVQ4U-.js} +7 -7
- package/dist/{client-Dd1QpCUq.js → client-BVvAfEXG.js} +2 -2
- package/dist/{client-B_7XihyW.js → client-BpEWDfSl.js} +2 -2
- package/dist/{client-DfGEiRKb.js → client-CIUecAJE.js} +2 -2
- package/dist/{client-ClX0it9Z.js → client-CaWHvclV.js} +3 -3
- package/dist/{client-C1zORyWz.js → client-D4kUDFwW.js} +2 -2
- package/dist/{client-DEY11EBB.d.ts → client-DA9ibl3G.d.ts} +9 -9
- package/dist/{client-C3hlUyaZ.js → client-Hc7SfeIf.js} +2 -2
- package/dist/{client-DY62Nb7m.js → client-p4LmfF27.js} +2 -2
- package/dist/{client-oDJVL5JF.js → client-vjIDamSf.js} +3 -3
- package/dist/cms/index.js +1 -1
- package/dist/{config-BrJAy95F.js → config-D8dSL6OQ.js} +4 -4
- package/dist/dev/index.js +15 -5
- package/dist/eav/index.d.ts +1 -1
- package/dist/eav/index.js +2 -2
- package/dist/{errors-BnIRV-Px.d.ts → errors-U3TsyWVq.d.ts} +2 -2
- package/dist/feedback/index.d.ts +1 -1
- package/dist/feedback/index.js +1 -1
- package/dist/files/index.js +1 -1
- package/dist/{http-client-Dw_U7Wgx.js → http-client-0Sp8wQGQ.js} +2 -2
- package/dist/{index-CBPdczmp.d.ts → index-DwIr8W3Y.d.ts} +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +12 -12
- package/dist/logout/index.js +1 -1
- package/dist/plans/index.js +1 -1
- package/dist/push/index.js +1 -1
- package/dist/{query-l08AoqXP.js → query-C18XolkY.js} +2 -2
- package/dist/react/hooks.d.ts +4 -4
- package/dist/react/hooks.js +1 -1
- package/dist/terms/index.js +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/docs/api-reference.md +4 -1
- package/docs/dev-server.md +1 -1
- package/docs/errors.md +16 -16
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,15 @@ This project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- `FeedbackStatus`에 `resolved`(해결됨)가 추가됐다 — `responded`는 "답변함", `resolved`는 "고쳐졌다/결론이 났다"를 뜻한다. `feedback.list({ status })` 필터와 응답의 `status`에 그대로 나타난다.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- 로컬 dev EAV 서버의 레코드/엔티티 상한이 production과 같이 `BRANDAPP_EAV_MAX_RECORDS_PER_ENTITY`를 읽는다(기본 10,000).
|
|
17
|
+
- 문서: 필터 연산자 목록에 `in`/`notIn`, `expiresAt`는 클라이언트 계산 절대 시각이라는 주의.
|
|
18
|
+
|
|
10
19
|
## [4.2.0] — 2026-08-30
|
|
11
20
|
|
|
12
21
|
### Added
|
|
@@ -399,7 +408,7 @@ OIDC **Single Logout** 상호운용 — reopt와 외부 앱 사이 세션 종료
|
|
|
399
408
|
|
|
400
409
|
- **에러 형태 통일** — HTTP 상태 → typed 에러 매핑을 단일 출처(`mapHttpStatusToError`)로
|
|
401
410
|
통합. 비스트림 HTTP / SSE 스트리밍 / AI SDK provider가 동일한 코드·진단을 갖는 에러를
|
|
402
|
-
생성한다. **스트리밍 402
|
|
411
|
+
생성한다. **스트리밍 402/사용량 소진이 이제 `CreditLimitError`(`.diagnostic` 포함)로**
|
|
403
412
|
표면화된다(이전엔 `STREAM_ERROR`로 뭉뚱그려짐).
|
|
404
413
|
- **provider 에러 = `APICallError`** — AI SDK provider는 bare `Error` 대신
|
|
405
414
|
`APICallError`를 던진다 → AI SDK 내장 재시도(`isRetryable`)가 동작하고, `error.data.code`
|
|
@@ -433,7 +442,7 @@ OIDC **Single Logout** 상호운용 — reopt와 외부 앱 사이 세션 종료
|
|
|
433
442
|
생성이 스트림 도중 끊기던 문제, provider가 첫 토큰 후 stall 시 무한 hang하던 문제를
|
|
434
443
|
함께 해소. 공통 로직은 신규 `core/abort.ts`(`createManagedAbort`).
|
|
435
444
|
- **비멱등 재시도 차단** — POST/PATCH는 5xx·네트워크·timeout 시 기본적으로 **재시도하지
|
|
436
|
-
않음**(중복 레코드 생성·중복
|
|
445
|
+
않음**(중복 레코드 생성·중복 사용량 차감·중복 동의 방지). 429(rate limit)는 메서드와
|
|
437
446
|
무관하게 항상 재시도. 옵트인 `config.retryNonIdempotent: true`로 복원 가능. 변이
|
|
438
447
|
요청에는 `Idempotency-Key`(요청 id) 헤더를 부여해 서버측 dedup 연동 가능.
|
|
439
448
|
- **백오프 jitter + cap** — 지수 백오프에 full jitter(`[base/2, base]`)와 30s 상한 추가
|
package/dist/ai/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CompletionOptions, c as FinishReason, d as MessageRole, f as ModelInfo, i as ChatMessage, l as ImageGenerateOptions, m as StreamEvent, n as createReoptAiClient, o as CompletionResult, p as StreamDoneData, r as AgentInfo, s as CreditInfo, t as ReoptAiClient, u as ImageGenerateResult } from "../client-
|
|
1
|
+
import { a as CompletionOptions, c as FinishReason, d as MessageRole, f as ModelInfo, i as ChatMessage, l as ImageGenerateOptions, m as StreamEvent, n as createReoptAiClient, o as CompletionResult, p as StreamDoneData, r as AgentInfo, s as CreditInfo, t as ReoptAiClient, u as ImageGenerateResult } from "../client-DA9ibl3G.js";
|
|
2
2
|
export { type AgentInfo, type ChatMessage, type CompletionOptions, type CompletionResult, type CreditInfo, type FinishReason, type ImageGenerateOptions, type ImageGenerateResult, type MessageRole, type ModelInfo, ReoptAiClient, type StreamDoneData, type StreamEvent, createReoptAiClient };
|
package/dist/ai/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as resolveBaseUrl, j as mapHttpStatusToError, n as SDK_VERSION, o as validateConfig, r as assertBrowserSafe } from "../config-
|
|
1
|
+
import { i as resolveBaseUrl, j as mapHttpStatusToError, n as SDK_VERSION, o as validateConfig, r as assertBrowserSafe } from "../config-D8dSL6OQ.js";
|
|
2
2
|
import { t as createManagedAbort } from "../abort--nOBFN4M.js";
|
|
3
3
|
import { t as createAuthHeader } from "../encoding-Bwfm3iaE.js";
|
|
4
4
|
import { t as createSSELineProcessor } from "../sse-parser-FMjxM7sY.js";
|
|
@@ -637,7 +637,7 @@ var BrandappLanguageModel = class {
|
|
|
637
637
|
* Vercel AI SDK와 호환되는 커스텀 프로바이더를 생성합니다.
|
|
638
638
|
*
|
|
639
639
|
* **지원**: `generateText()`, `streamText()` (텍스트 생성), `generateImage()`
|
|
640
|
-
* (이미지 생성), `providerMetadata.brandapp`(
|
|
640
|
+
* (이미지 생성), `providerMetadata.brandapp`(사용량/사용량), `providerOptions.brandapp`.
|
|
641
641
|
*
|
|
642
642
|
* **미지원** (호출 시 `warnings`로 알리고 해당 부분은 무시됨): tool/function calling,
|
|
643
643
|
* 구조화 출력(`generateObject`/`responseFormat: json`), 비전·파일 입력, `topP`/`topK`/
|
package/dist/analytics/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createReoptAnalyticsClient, t as ReoptAnalyticsClient } from "../client-
|
|
1
|
+
import { n as createReoptAnalyticsClient, t as ReoptAnalyticsClient } from "../client-Hc7SfeIf.js";
|
|
2
2
|
import { getInstance, identify, init, pageView, setConsent, track } from "@reopt-ai/data-sdk";
|
|
3
3
|
|
|
4
4
|
//#region src/analytics/browser.ts
|
package/dist/auth/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as ReoptSDKConfig, t as REOPT_BASE_URLS } from "../config-D28P8iwm.js";
|
|
2
2
|
import { i as REOPT_PROVIDER_ID, n as AdapterRequestBody, r as REOPT_DEFAULT_SCOPES, t as AdapterOperation } from "../types-MXLudLBP.js";
|
|
3
|
-
import { T as isReoptSDKError, _ as RateLimitError, t as AuthError, v as ReoptSDKError, x as ServerError } from "../errors-
|
|
3
|
+
import { T as isReoptSDKError, _ as RateLimitError, t as AuthError, v as ReoptSDKError, x as ServerError } from "../errors-U3TsyWVq.js";
|
|
4
4
|
import { AdapterFactory } from "better-auth/adapters";
|
|
5
5
|
import { BetterAuthOptions, BetterAuthPlugin } from "better-auth";
|
|
6
6
|
//#region src/better-auth/adapter.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as isReoptSDKError, S as ReoptSDKError, a as resolveIdBaseUrl, s as AuthError, t as REOPT_BASE_URLS, w as ServerError, x as RateLimitError } from "../config-
|
|
2
|
-
import { t as BaseHttpClient } from "../http-client-
|
|
1
|
+
import { O as isReoptSDKError, S as ReoptSDKError, a as resolveIdBaseUrl, s as AuthError, t as REOPT_BASE_URLS, w as ServerError, x as RateLimitError } from "../config-D8dSL6OQ.js";
|
|
2
|
+
import { t as BaseHttpClient } from "../http-client-0Sp8wQGQ.js";
|
|
3
3
|
import { n as REOPT_PROVIDER_ID, t as REOPT_DEFAULT_SCOPES } from "../types-DjDRszNj.js";
|
|
4
4
|
import { createAdapterFactory } from "better-auth/adapters";
|
|
5
5
|
import { genericOAuth } from "better-auth/plugins";
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { n as ReoptSDKConfig } from "./config-D28P8iwm.js";
|
|
2
2
|
//#region src/feedback/types.d.ts
|
|
3
3
|
/**
|
|
4
|
-
* Feedback processing status. `
|
|
5
|
-
*
|
|
4
|
+
* Feedback processing status. `responded` means staff have answered but the
|
|
5
|
+
* matter may still be open; `resolved` means the workspace declared it fixed or
|
|
6
|
+
* concluded. `reopened` means the customer replied after the staff had answered
|
|
7
|
+
* — the thread is waiting on the workspace again.
|
|
6
8
|
*/
|
|
7
|
-
type FeedbackStatus = "new" | "in_progress" | "responded" | "reopened" | "archived";
|
|
9
|
+
type FeedbackStatus = "new" | "in_progress" | "responded" | "resolved" | "reopened" | "archived";
|
|
8
10
|
/** Who wrote a message in the feedback thread. */
|
|
9
11
|
type FeedbackReplyAuthor = "staff" | "customer";
|
|
10
12
|
/**
|
|
@@ -144,4 +146,4 @@ declare class ReoptFeedbackClient {
|
|
|
144
146
|
declare function createReoptFeedbackClient(config: ReoptSDKConfig): ReoptFeedbackClient;
|
|
145
147
|
//#endregion
|
|
146
148
|
export { CreateFeedbackResult as a, FeedbackListMeta as c, FeedbackReplyAuthor as d, FeedbackStatus as f, CreateFeedbackReplyResult as i, FeedbackListResult as l, RateFeedbackReplyResult as m, createReoptFeedbackClient as n, Feedback as o, ListFeedbackQuery as p, CreateFeedbackInput as r, FeedbackDetail as s, ReoptFeedbackClient as t, FeedbackReply as u };
|
|
147
|
-
//# sourceMappingURL=client-
|
|
149
|
+
//# sourceMappingURL=client-B4CiEei5.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
2
|
-
import { t as buildQuery } from "./query-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-0Sp8wQGQ.js";
|
|
2
|
+
import { t as buildQuery } from "./query-C18XolkY.js";
|
|
3
3
|
|
|
4
4
|
//#region src/cms/client.ts
|
|
5
5
|
function createReoptCmsClient(config) {
|
|
@@ -52,4 +52,4 @@ async list(query) {
|
|
|
52
52
|
|
|
53
53
|
//#endregion
|
|
54
54
|
export { createReoptCmsClient as t };
|
|
55
|
-
//# sourceMappingURL=client-
|
|
55
|
+
//# sourceMappingURL=client-BD1-resY.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as ReoptSDKError, j as mapHttpStatusToError, n as SDK_VERSION, o as validateConfig } from "./config-
|
|
1
|
+
import { S as ReoptSDKError, j as mapHttpStatusToError, n as SDK_VERSION, o as validateConfig } from "./config-D8dSL6OQ.js";
|
|
2
2
|
import { t as createManagedAbort } from "./abort--nOBFN4M.js";
|
|
3
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
3
|
+
import { t as BaseHttpClient } from "./http-client-0Sp8wQGQ.js";
|
|
4
4
|
import { n as parseSSEStream } from "./sse-parser-FMjxM7sY.js";
|
|
5
5
|
|
|
6
6
|
//#region src/ai/client.ts
|
|
@@ -88,7 +88,7 @@ var ReoptAiClient = class {
|
|
|
88
88
|
/**
|
|
89
89
|
* AI 텍스트 생성 (SSE 스트리밍 + 메타데이터)
|
|
90
90
|
*
|
|
91
|
-
* 텍스트 청크와 함께 최종
|
|
91
|
+
* 텍스트 청크와 함께 최종 사용량/사용량 메타데이터를 반환합니다.
|
|
92
92
|
*
|
|
93
93
|
* @example
|
|
94
94
|
* ```ts
|
|
@@ -102,7 +102,7 @@ var ReoptAiClient = class {
|
|
|
102
102
|
* }
|
|
103
103
|
*
|
|
104
104
|
* const meta = await metadata;
|
|
105
|
-
* console.log(`사용
|
|
105
|
+
* console.log(`사용 사용량: ${meta?.usage.creditCost}`);
|
|
106
106
|
* ```
|
|
107
107
|
*/
|
|
108
108
|
streamWithMetadata(options) {
|
|
@@ -160,7 +160,7 @@ var ReoptAiClient = class {
|
|
|
160
160
|
/**
|
|
161
161
|
* 이미지 생성
|
|
162
162
|
*
|
|
163
|
-
* BrandApp의 AI
|
|
163
|
+
* BrandApp의 AI 사용량으로 이미지를 생성합니다.
|
|
164
164
|
* 생성된 이미지는 자동으로 Vercel Blob에 저장되고 URL이 반환됩니다.
|
|
165
165
|
*
|
|
166
166
|
* @example
|
|
@@ -185,7 +185,7 @@ var ReoptAiClient = class {
|
|
|
185
185
|
})).data;
|
|
186
186
|
}
|
|
187
187
|
/**
|
|
188
|
-
*
|
|
188
|
+
* 사용량 잔액 조회
|
|
189
189
|
*
|
|
190
190
|
* @example
|
|
191
191
|
* ```ts
|
|
@@ -302,4 +302,4 @@ function createReoptAiClient(config) {
|
|
|
302
302
|
|
|
303
303
|
//#endregion
|
|
304
304
|
export { createReoptAiClient as n, ReoptAiClient as t };
|
|
305
|
-
//# sourceMappingURL=client-
|
|
305
|
+
//# sourceMappingURL=client-BMgVQ4U-.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-0Sp8wQGQ.js";
|
|
2
2
|
|
|
3
3
|
//#region src/plans/client.ts
|
|
4
4
|
function unwrap(body) {
|
|
@@ -78,4 +78,4 @@ function createReoptPlansClient(config) {
|
|
|
78
78
|
|
|
79
79
|
//#endregion
|
|
80
80
|
export { createReoptPlansClient as n, ReoptPlansClient as t };
|
|
81
|
-
//# sourceMappingURL=client-
|
|
81
|
+
//# sourceMappingURL=client-BVvAfEXG.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-0Sp8wQGQ.js";
|
|
2
2
|
|
|
3
3
|
//#region src/terms/client.ts
|
|
4
4
|
function unwrap(body) {
|
|
@@ -80,4 +80,4 @@ function createReoptTermsClient(config) {
|
|
|
80
80
|
|
|
81
81
|
//#endregion
|
|
82
82
|
export { createReoptTermsClient as n, ReoptTermsClient as t };
|
|
83
|
-
//# sourceMappingURL=client-
|
|
83
|
+
//# sourceMappingURL=client-BpEWDfSl.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-0Sp8wQGQ.js";
|
|
2
2
|
|
|
3
3
|
//#region src/auth/client.ts
|
|
4
4
|
function unwrap(body) {
|
|
@@ -50,4 +50,4 @@ function createReoptAuthClient(config) {
|
|
|
50
50
|
|
|
51
51
|
//#endregion
|
|
52
52
|
export { createReoptAuthClient as n, ReoptAuthClient as t };
|
|
53
|
-
//# sourceMappingURL=client-
|
|
53
|
+
//# sourceMappingURL=client-CIUecAJE.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
2
|
-
import { t as buildQuery } from "./query-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-0Sp8wQGQ.js";
|
|
2
|
+
import { t as buildQuery } from "./query-C18XolkY.js";
|
|
3
3
|
|
|
4
4
|
//#region src/eav/cache.ts
|
|
5
5
|
var SchemaCache = class {
|
|
@@ -500,4 +500,4 @@ function createReoptEavClient(config) {
|
|
|
500
500
|
|
|
501
501
|
//#endregion
|
|
502
502
|
export { createReoptEavClient as t };
|
|
503
|
-
//# sourceMappingURL=client-
|
|
503
|
+
//# sourceMappingURL=client-CaWHvclV.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-0Sp8wQGQ.js";
|
|
2
2
|
|
|
3
3
|
//#region src/push/client.ts
|
|
4
4
|
var ReoptPushClient = class {
|
|
@@ -25,4 +25,4 @@ function createReoptPushClient(config) {
|
|
|
25
25
|
|
|
26
26
|
//#endregion
|
|
27
27
|
export { createReoptPushClient as n, ReoptPushClient as t };
|
|
28
|
-
//# sourceMappingURL=client-
|
|
28
|
+
//# sourceMappingURL=client-D4kUDFwW.js.map
|
|
@@ -50,11 +50,11 @@ type CompletionResult = {
|
|
|
50
50
|
finishReason?: FinishReason;
|
|
51
51
|
/**
|
|
52
52
|
* true면 이 호출은 잔액을 초과해 차감됐다(출력은 이미 생성되어 반환되지만 잔액은
|
|
53
|
-
* 0으로 소진). 다음 호출은 사전
|
|
53
|
+
* 0으로 소진). 다음 호출은 사전 사용량 체크에서 차단된다 — "1회 후 차단" 의도.
|
|
54
54
|
*/
|
|
55
55
|
creditLimited?: boolean;
|
|
56
56
|
};
|
|
57
|
-
/**
|
|
57
|
+
/** 사용량 잔액 정보 */
|
|
58
58
|
type CreditInfo = {
|
|
59
59
|
balance: number;
|
|
60
60
|
limit: number;
|
|
@@ -82,7 +82,7 @@ type ModelInfo = {
|
|
|
82
82
|
inputRate: number;
|
|
83
83
|
/** credits per 1K output tokens (image-only 모델은 0) */
|
|
84
84
|
outputRate: number;
|
|
85
|
-
/** 이미지 생성당 고정
|
|
85
|
+
/** 이미지 생성당 고정 사용량 (image 모델 전용) */
|
|
86
86
|
creditsPerImage?: number;
|
|
87
87
|
/** 최대 입력 컨텍스트 토큰 */
|
|
88
88
|
contextWindow?: number;
|
|
@@ -124,7 +124,7 @@ type ImageGenerateResult = {
|
|
|
124
124
|
usage: {
|
|
125
125
|
creditCost: number;
|
|
126
126
|
};
|
|
127
|
-
/** 남은
|
|
127
|
+
/** 남은 사용량 */
|
|
128
128
|
creditsRemaining: number;
|
|
129
129
|
/** true면 잔액 초과 차감(이미지는 반환되나 잔액 소진, 다음 호출 차단) */
|
|
130
130
|
creditLimited?: boolean;
|
|
@@ -205,7 +205,7 @@ declare class ReoptAiClient {
|
|
|
205
205
|
/**
|
|
206
206
|
* AI 텍스트 생성 (SSE 스트리밍 + 메타데이터)
|
|
207
207
|
*
|
|
208
|
-
* 텍스트 청크와 함께 최종
|
|
208
|
+
* 텍스트 청크와 함께 최종 사용량/사용량 메타데이터를 반환합니다.
|
|
209
209
|
*
|
|
210
210
|
* @example
|
|
211
211
|
* ```ts
|
|
@@ -219,7 +219,7 @@ declare class ReoptAiClient {
|
|
|
219
219
|
* }
|
|
220
220
|
*
|
|
221
221
|
* const meta = await metadata;
|
|
222
|
-
* console.log(`사용
|
|
222
|
+
* console.log(`사용 사용량: ${meta?.usage.creditCost}`);
|
|
223
223
|
* ```
|
|
224
224
|
*/
|
|
225
225
|
streamWithMetadata(options: CompletionOptions): {
|
|
@@ -229,7 +229,7 @@ declare class ReoptAiClient {
|
|
|
229
229
|
/**
|
|
230
230
|
* 이미지 생성
|
|
231
231
|
*
|
|
232
|
-
* BrandApp의 AI
|
|
232
|
+
* BrandApp의 AI 사용량으로 이미지를 생성합니다.
|
|
233
233
|
* 생성된 이미지는 자동으로 Vercel Blob에 저장되고 URL이 반환됩니다.
|
|
234
234
|
*
|
|
235
235
|
* @example
|
|
@@ -245,7 +245,7 @@ declare class ReoptAiClient {
|
|
|
245
245
|
*/
|
|
246
246
|
generateImage(options: ImageGenerateOptions): Promise<ImageGenerateResult>;
|
|
247
247
|
/**
|
|
248
|
-
*
|
|
248
|
+
* 사용량 잔액 조회
|
|
249
249
|
*
|
|
250
250
|
* @example
|
|
251
251
|
* ```ts
|
|
@@ -281,4 +281,4 @@ declare class ReoptAiClient {
|
|
|
281
281
|
declare function createReoptAiClient(config: ReoptSDKConfig): ReoptAiClient;
|
|
282
282
|
//#endregion
|
|
283
283
|
export { CompletionOptions as a, FinishReason as c, MessageRole as d, ModelInfo as f, ChatMessage as i, ImageGenerateOptions as l, StreamEvent as m, createReoptAiClient as n, CompletionResult as o, StreamDoneData as p, AgentInfo as r, CreditInfo as s, ReoptAiClient as t, ImageGenerateResult as u };
|
|
284
|
-
//# sourceMappingURL=client-
|
|
284
|
+
//# sourceMappingURL=client-DA9ibl3G.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-0Sp8wQGQ.js";
|
|
2
2
|
|
|
3
3
|
//#region src/analytics/client.ts
|
|
4
4
|
var ReoptAnalyticsClient = class {
|
|
@@ -17,4 +17,4 @@ function createReoptAnalyticsClient(config) {
|
|
|
17
17
|
|
|
18
18
|
//#endregion
|
|
19
19
|
export { createReoptAnalyticsClient as n, ReoptAnalyticsClient as t };
|
|
20
|
-
//# sourceMappingURL=client-
|
|
20
|
+
//# sourceMappingURL=client-Hc7SfeIf.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-0Sp8wQGQ.js";
|
|
2
2
|
|
|
3
3
|
//#region src/feedback/client.ts
|
|
4
4
|
function buildListQuery(query) {
|
|
@@ -83,4 +83,4 @@ function createReoptFeedbackClient(config) {
|
|
|
83
83
|
|
|
84
84
|
//#endregion
|
|
85
85
|
export { createReoptFeedbackClient as n, ReoptFeedbackClient as t };
|
|
86
|
-
//# sourceMappingURL=client-
|
|
86
|
+
//# sourceMappingURL=client-p4LmfF27.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as ReoptSDKError, j as mapHttpStatusToError, n as SDK_VERSION, o as validateConfig } from "./config-
|
|
1
|
+
import { S as ReoptSDKError, j as mapHttpStatusToError, n as SDK_VERSION, o as validateConfig } from "./config-D8dSL6OQ.js";
|
|
2
2
|
import { t as createManagedAbort } from "./abort--nOBFN4M.js";
|
|
3
|
-
import { n as parseFieldErrors, t as BaseHttpClient } from "./http-client-
|
|
3
|
+
import { n as parseFieldErrors, t as BaseHttpClient } from "./http-client-0Sp8wQGQ.js";
|
|
4
4
|
|
|
5
5
|
//#region src/files/client.ts
|
|
6
6
|
var ReoptFileClient = class {
|
|
@@ -270,4 +270,4 @@ function createReoptFileClient(config) {
|
|
|
270
270
|
|
|
271
271
|
//#endregion
|
|
272
272
|
export { createReoptFileClient as n, ReoptFileClient as t };
|
|
273
|
-
//# sourceMappingURL=client-
|
|
273
|
+
//# sourceMappingURL=client-vjIDamSf.js.map
|
package/dist/cms/index.js
CHANGED
|
@@ -44,12 +44,12 @@ var ServerError = class extends ReoptSDKError {
|
|
|
44
44
|
this.name = "ServerError";
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
|
-
/** AI
|
|
47
|
+
/** AI 사용량 잔액 부족 (HTTP 402). */
|
|
48
48
|
var CreditLimitError = class extends ReoptSDKError {
|
|
49
49
|
constructor(message = "Insufficient AI credits", context, code = "CREDIT_LIMIT") {
|
|
50
50
|
super(message, 402, code, context, {
|
|
51
|
-
cause: "BrandApp AI
|
|
52
|
-
fix: "Studio → BrandApp → AI
|
|
51
|
+
cause: "BrandApp AI 사용량 잔액 부족",
|
|
52
|
+
fix: "Studio → BrandApp → AI 사용량 페이지에서 충전",
|
|
53
53
|
doc: "docs/errors.md#credit_limit"
|
|
54
54
|
});
|
|
55
55
|
this.name = "CreditLimitError";
|
|
@@ -498,4 +498,4 @@ function deriveIdFromBaseUrl(baseUrl) {
|
|
|
498
498
|
|
|
499
499
|
//#endregion
|
|
500
500
|
export { isValidationError as A, RequiredTermsError as C, isModelAccessError as D, isCreditLimitError as E, isReoptSDKError as O, ReoptSDKError as S, ValidationError as T, ModelAccessError as _, resolveIdBaseUrl as a, PreconditionFailedError as b, AuthUserNotFoundError as c, ConflictError as d, ContentFilterError as f, LimitExceededError as g, ForbiddenError as h, resolveBaseUrl as i, mapHttpStatusToError as j, isRequiredTermsError as k, AuthUserRecordExistsError as l, DuplicateAuthUserError as m, SDK_VERSION as n, validateConfig as o, CreditLimitError as p, assertBrowserSafe as r, AuthError as s, REOPT_BASE_URLS as t, BadRequestError as u, ModelNotFoundError as v, ServerError as w, RateLimitError as x, NotFoundError as y };
|
|
501
|
-
//# sourceMappingURL=config-
|
|
501
|
+
//# sourceMappingURL=config-D8dSL6OQ.js.map
|
package/dist/dev/index.js
CHANGED
|
@@ -243,10 +243,20 @@ var InMemoryStore = class {
|
|
|
243
243
|
*/
|
|
244
244
|
const LIMITS = {
|
|
245
245
|
ATTRIBUTES_PER_ENTITY: 100,
|
|
246
|
-
RECORDS_PER_ENTITY: 1e4,
|
|
247
246
|
/** Max records per bulk operation (matches production API). */
|
|
248
247
|
BULK_BATCH_SIZE: 100
|
|
249
248
|
};
|
|
249
|
+
/**
|
|
250
|
+
* Records per entity — mirrors production, where the default of 10,000 can be raised
|
|
251
|
+
* with `BRANDAPP_EAV_MAX_RECORDS_PER_ENTITY` (the in-memory fallback path is bounded
|
|
252
|
+
* separately there, so raising it is safe). Read lazily so tests can stub the env.
|
|
253
|
+
*/
|
|
254
|
+
function resolveRecordLimit() {
|
|
255
|
+
const raw = process.env.BRANDAPP_EAV_MAX_RECORDS_PER_ENTITY?.trim();
|
|
256
|
+
if (!raw) return 1e4;
|
|
257
|
+
const parsed = Number(raw);
|
|
258
|
+
return Number.isSafeInteger(parsed) && parsed > 0 ? parsed : 1e4;
|
|
259
|
+
}
|
|
250
260
|
function bulkSizeError(op, got) {
|
|
251
261
|
return {
|
|
252
262
|
ok: false,
|
|
@@ -494,7 +504,7 @@ function createEavRoutes(store, brandappId) {
|
|
|
494
504
|
description: body.description ?? null,
|
|
495
505
|
icon: body.icon ?? "📊",
|
|
496
506
|
linkedTo: body.linkedTo ?? "brandapp",
|
|
497
|
-
maxRecords:
|
|
507
|
+
maxRecords: resolveRecordLimit(),
|
|
498
508
|
createdAt: now,
|
|
499
509
|
updatedAt: now
|
|
500
510
|
};
|
|
@@ -748,7 +758,7 @@ function createEavRoutes(store, brandappId) {
|
|
|
748
758
|
}
|
|
749
759
|
}, check.status);
|
|
750
760
|
} else {
|
|
751
|
-
const maxRecords = entity.maxRecords ??
|
|
761
|
+
const maxRecords = entity.maxRecords ?? resolveRecordLimit();
|
|
752
762
|
if (store.count(store.records, (r) => r.entityId === entityId) >= maxRecords) return c.json({
|
|
753
763
|
ok: false,
|
|
754
764
|
error: {
|
|
@@ -956,7 +966,7 @@ function createEavRoutes(store, brandappId) {
|
|
|
956
966
|
}, check.status);
|
|
957
967
|
}
|
|
958
968
|
} else {
|
|
959
|
-
const maxRecords = entity.maxRecords ??
|
|
969
|
+
const maxRecords = entity.maxRecords ?? resolveRecordLimit();
|
|
960
970
|
if (store.count(store.records, (r) => r.entityId === entityId) + body.records.length > maxRecords) return c.json({
|
|
961
971
|
ok: false,
|
|
962
972
|
error: {
|
|
@@ -1110,7 +1120,7 @@ function createEavRoutes(store, brandappId) {
|
|
|
1110
1120
|
});
|
|
1111
1121
|
}
|
|
1112
1122
|
if (!isAuthUserLinked) {
|
|
1113
|
-
const maxRecords = entity.maxRecords ??
|
|
1123
|
+
const maxRecords = entity.maxRecords ?? resolveRecordLimit();
|
|
1114
1124
|
if (store.count(store.records, (r) => r.entityId === entityId) >= maxRecords) return c.json({
|
|
1115
1125
|
ok: false,
|
|
1116
1126
|
error: {
|
package/dist/eav/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as ListRecordsQuery, C as EavAttribute, D as EavRecord, E as EavEntity, F as UpsertRecordInput, I as UpsertRecordResult, M as UpdateAttributeInput, N as UpdateEntityInput, O as EavSchemaLinkedTo, P as UpdateRecordInput, S as DeleteWhereInput, T as EavDataType, _ as BulkUpdateItem, b as CreateEntityInput, d as ATTRIBUTE_FILTER_OPERATORS, f as AttributeFilter, j as PaginatedResponse, k as EavValidation, m as AttributeFilterOperator, n as ReoptSDKConfig, p as AttributeFilterListValue, u as ATTRIBUTE_FILTER_LIST_MAX, v as CountRecordsQuery, w as EavAttributeOption, x as CreateRecordInput, y as CreateAttributeInput } from "../config-D28P8iwm.js";
|
|
2
|
-
import { c as DuplicateAuthUserError, f as LimitExceededError, n as AuthUserNotFoundError, r as AuthUserRecordExistsError } from "../errors-
|
|
2
|
+
import { c as DuplicateAuthUserError, f as LimitExceededError, n as AuthUserNotFoundError, r as AuthUserRecordExistsError } from "../errors-U3TsyWVq.js";
|
|
3
3
|
import { i as TypedEavRecord, n as createReoptEavClient, r as EntityClient, t as ReoptEavClient } from "../client-DjgoTlfv.js";
|
|
4
4
|
//#region src/eav/verify.d.ts
|
|
5
5
|
/**
|
package/dist/eav/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as AuthUserNotFoundError, g as LimitExceededError, l as AuthUserRecordExistsError, m as DuplicateAuthUserError } from "../config-
|
|
2
|
-
import { t as createReoptEavClient } from "../client-
|
|
1
|
+
import { c as AuthUserNotFoundError, g as LimitExceededError, l as AuthUserRecordExistsError, m as DuplicateAuthUserError } from "../config-D8dSL6OQ.js";
|
|
2
|
+
import { t as createReoptEavClient } from "../client-CaWHvclV.js";
|
|
3
3
|
|
|
4
4
|
//#region src/eav/verify.ts
|
|
5
5
|
async function verifyEavSchema(input) {
|
|
@@ -37,7 +37,7 @@ declare class RateLimitError extends ReoptSDKError {
|
|
|
37
37
|
declare class ServerError extends ReoptSDKError {
|
|
38
38
|
constructor(message?: string, context?: ReoptSDKErrorContext);
|
|
39
39
|
}
|
|
40
|
-
/** AI
|
|
40
|
+
/** AI 사용량 잔액 부족 (HTTP 402). */
|
|
41
41
|
declare class CreditLimitError extends ReoptSDKError {
|
|
42
42
|
constructor(message?: string, context?: ReoptSDKErrorContext, code?: string);
|
|
43
43
|
}
|
|
@@ -186,4 +186,4 @@ declare function isModelAccessError(error: unknown): error is ModelAccessError;
|
|
|
186
186
|
declare function mapHttpStatusToError(status: number, code: string | undefined, message: string | undefined, ctx?: ReoptSDKErrorContext, fieldErrors?: FieldError[]): ReoptSDKError;
|
|
187
187
|
//#endregion
|
|
188
188
|
export { isCreditLimitError as C, isValidationError as D, isRequiredTermsError as E, mapHttpStatusToError as O, ValidationError as S, isReoptSDKError as T, RateLimitError as _, ConflictError as a, RequiredTermsError as b, DuplicateAuthUserError as c, ForbiddenError as d, LimitExceededError as f, PreconditionFailedError as g, NotFoundError as h, BadRequestError as i, ErrorDiagnostic as l, ModelNotFoundError as m, AuthUserNotFoundError as n, ContentFilterError as o, ModelAccessError as p, AuthUserRecordExistsError as r, CreditLimitError as s, AuthError as t, FieldError as u, ReoptSDKError as v, isModelAccessError as w, ServerError as x, ReoptSDKErrorContext as y };
|
|
189
|
-
//# sourceMappingURL=errors-
|
|
189
|
+
//# sourceMappingURL=errors-U3TsyWVq.d.ts.map
|
package/dist/feedback/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CreateFeedbackResult, c as FeedbackListMeta, d as FeedbackReplyAuthor, f as FeedbackStatus, i as CreateFeedbackReplyResult, l as FeedbackListResult, m as RateFeedbackReplyResult, n as createReoptFeedbackClient, o as Feedback, p as ListFeedbackQuery, r as CreateFeedbackInput, s as FeedbackDetail, t as ReoptFeedbackClient, u as FeedbackReply } from "../client-
|
|
1
|
+
import { a as CreateFeedbackResult, c as FeedbackListMeta, d as FeedbackReplyAuthor, f as FeedbackStatus, i as CreateFeedbackReplyResult, l as FeedbackListResult, m as RateFeedbackReplyResult, n as createReoptFeedbackClient, o as Feedback, p as ListFeedbackQuery, r as CreateFeedbackInput, s as FeedbackDetail, t as ReoptFeedbackClient, u as FeedbackReply } from "../client-B4CiEei5.js";
|
|
2
2
|
export { type CreateFeedbackInput, type CreateFeedbackReplyResult, type CreateFeedbackResult, type Feedback, type FeedbackDetail, type FeedbackListMeta, type FeedbackListResult, type FeedbackReply, type FeedbackReplyAuthor, type FeedbackStatus, type ListFeedbackQuery, type RateFeedbackReplyResult, ReoptFeedbackClient, createReoptFeedbackClient };
|
package/dist/feedback/index.js
CHANGED
package/dist/files/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as ReoptSDKError, a as resolveIdBaseUrl, i as resolveBaseUrl, j as mapHttpStatusToError, n as SDK_VERSION, o as validateConfig, w as ServerError, x as RateLimitError } from "./config-
|
|
1
|
+
import { S as ReoptSDKError, a as resolveIdBaseUrl, i as resolveBaseUrl, j as mapHttpStatusToError, n as SDK_VERSION, o as validateConfig, w as ServerError, x as RateLimitError } from "./config-D8dSL6OQ.js";
|
|
2
2
|
import { t as createAuthHeader } from "./encoding-Bwfm3iaE.js";
|
|
3
3
|
|
|
4
4
|
//#region src/core/debug.ts
|
|
@@ -383,4 +383,4 @@ function parseFieldErrors(body) {
|
|
|
383
383
|
|
|
384
384
|
//#endregion
|
|
385
385
|
export { parseFieldErrors as n, BaseHttpClient as t };
|
|
386
|
-
//# sourceMappingURL=http-client-
|
|
386
|
+
//# sourceMappingURL=http-client-0Sp8wQGQ.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { l as SchemaDef, n as ReoptSDKConfig } from "./config-D28P8iwm.js";
|
|
2
|
-
import { t as ReoptAiClient } from "./client-
|
|
2
|
+
import { t as ReoptAiClient } from "./client-DA9ibl3G.js";
|
|
3
3
|
import { t as ReoptAnalyticsClient } from "./client-D5F6-YYU.js";
|
|
4
4
|
import { t as ReoptAuthClient } from "./client-CNPfjmT0.js";
|
|
5
5
|
import { t as ReoptCmsClient } from "./client-DYammrtw.js";
|
|
6
6
|
import { t as ReoptEavClient } from "./client-DjgoTlfv.js";
|
|
7
|
-
import { t as ReoptFeedbackClient } from "./client-
|
|
7
|
+
import { t as ReoptFeedbackClient } from "./client-B4CiEei5.js";
|
|
8
8
|
import { t as ReoptFileClient } from "./client-BOEyVc8V.js";
|
|
9
9
|
import { t as ReoptPlansClient } from "./client-CRim5LCH.js";
|
|
10
10
|
import { t as ReoptPushClient } from "./client-bXAnGNzC.js";
|
|
@@ -168,4 +168,4 @@ type ReoptSDK<S extends SchemaDef = SchemaDef> = {
|
|
|
168
168
|
declare function createReoptSDK<S extends SchemaDef = SchemaDef>(config: ReoptSDKConfig<S>): ReoptSDK<S>;
|
|
169
169
|
//#endregion
|
|
170
170
|
export { initReoptSDK as a, getReoptSDK as i, createReoptSDK as n, resetSDK as o, createLazySDK as r, BaseHttpClient as s, ReoptSDK as t };
|
|
171
|
-
//# sourceMappingURL=index-
|
|
171
|
+
//# sourceMappingURL=index-DwIr8W3Y.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as DebugLogger, i as DebugLevel, n as ReoptSDKConfig, r as resolveBaseUrl, t as REOPT_BASE_URLS } from "./config-D28P8iwm.js";
|
|
2
|
-
import { a as CompletionOptions, c as FinishReason, d as MessageRole, f as ModelInfo, i as ChatMessage, l as ImageGenerateOptions, m as StreamEvent, o as CompletionResult, p as StreamDoneData, r as AgentInfo, s as CreditInfo, u as ImageGenerateResult } from "./client-
|
|
3
|
-
import { C as isCreditLimitError, D as isValidationError, E as isRequiredTermsError, O as mapHttpStatusToError, S as ValidationError, T as isReoptSDKError, _ as RateLimitError, a as ConflictError, b as RequiredTermsError, c as DuplicateAuthUserError, d as ForbiddenError, f as LimitExceededError, g as PreconditionFailedError, h as NotFoundError, i as BadRequestError, l as ErrorDiagnostic, m as ModelNotFoundError, n as AuthUserNotFoundError, o as ContentFilterError, p as ModelAccessError, r as AuthUserRecordExistsError, s as CreditLimitError, t as AuthError, u as FieldError, v as ReoptSDKError, w as isModelAccessError, x as ServerError, y as ReoptSDKErrorContext } from "./errors-
|
|
2
|
+
import { a as CompletionOptions, c as FinishReason, d as MessageRole, f as ModelInfo, i as ChatMessage, l as ImageGenerateOptions, m as StreamEvent, o as CompletionResult, p as StreamDoneData, r as AgentInfo, s as CreditInfo, u as ImageGenerateResult } from "./client-DA9ibl3G.js";
|
|
3
|
+
import { C as isCreditLimitError, D as isValidationError, E as isRequiredTermsError, O as mapHttpStatusToError, S as ValidationError, T as isReoptSDKError, _ as RateLimitError, a as ConflictError, b as RequiredTermsError, c as DuplicateAuthUserError, d as ForbiddenError, f as LimitExceededError, g as PreconditionFailedError, h as NotFoundError, i as BadRequestError, l as ErrorDiagnostic, m as ModelNotFoundError, n as AuthUserNotFoundError, o as ContentFilterError, p as ModelAccessError, r as AuthUserRecordExistsError, s as CreditLimitError, t as AuthError, u as FieldError, v as ReoptSDKError, w as isModelAccessError, x as ServerError, y as ReoptSDKErrorContext } from "./errors-U3TsyWVq.js";
|
|
4
4
|
import { i as TypedEavRecord, r as EntityClient } from "./client-DjgoTlfv.js";
|
|
5
|
-
import { a as initReoptSDK, i as getReoptSDK, n as createReoptSDK, o as resetSDK, r as createLazySDK, s as BaseHttpClient, t as ReoptSDK } from "./index-
|
|
5
|
+
import { a as initReoptSDK, i as getReoptSDK, n as createReoptSDK, o as resetSDK, r as createLazySDK, s as BaseHttpClient, t as ReoptSDK } from "./index-DwIr8W3Y.js";
|
|
6
6
|
export { type AgentInfo, AuthError, AuthUserNotFoundError, AuthUserRecordExistsError, BadRequestError, BaseHttpClient, type ChatMessage, type CompletionOptions, type CompletionResult, ConflictError, ContentFilterError, type CreditInfo, CreditLimitError, type DebugLevel, type DebugLogger, DuplicateAuthUserError, type EntityClient, type ErrorDiagnostic, type FieldError, type FinishReason, ForbiddenError, type ImageGenerateOptions, type ImageGenerateResult, LimitExceededError, type MessageRole, ModelAccessError, type ModelInfo, ModelNotFoundError, NotFoundError, PreconditionFailedError, REOPT_BASE_URLS, RateLimitError, ReoptSDK, type ReoptSDKConfig, ReoptSDKError, type ReoptSDKErrorContext, RequiredTermsError, ServerError, type StreamDoneData, type StreamEvent, type TypedEavRecord, ValidationError, createLazySDK, createReoptSDK, getReoptSDK, initReoptSDK, isCreditLimitError, isModelAccessError, isReoptSDKError, isRequiredTermsError, isValidationError, mapHttpStatusToError, resetSDK, resolveBaseUrl };
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { A as isValidationError, C as RequiredTermsError, D as isModelAccessError, E as isCreditLimitError, O as isReoptSDKError, S as ReoptSDKError, T as ValidationError, _ as ModelAccessError, b as PreconditionFailedError, c as AuthUserNotFoundError, d as ConflictError, f as ContentFilterError, g as LimitExceededError, h as ForbiddenError, i as resolveBaseUrl, j as mapHttpStatusToError, k as isRequiredTermsError, l as AuthUserRecordExistsError, m as DuplicateAuthUserError, p as CreditLimitError, r as assertBrowserSafe, s as AuthError, t as REOPT_BASE_URLS, u as BadRequestError, v as ModelNotFoundError, w as ServerError, x as RateLimitError, y as NotFoundError } from "./config-
|
|
2
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
3
|
-
import { n as createReoptAiClient } from "./client-
|
|
4
|
-
import { n as createReoptAuthClient } from "./client-
|
|
5
|
-
import { t as createReoptCmsClient } from "./client-
|
|
6
|
-
import { t as createReoptEavClient } from "./client-
|
|
7
|
-
import { n as createReoptFeedbackClient } from "./client-
|
|
8
|
-
import { n as createReoptFileClient } from "./client-
|
|
9
|
-
import { n as createReoptAnalyticsClient } from "./client-
|
|
10
|
-
import { n as createReoptPlansClient } from "./client-
|
|
11
|
-
import { n as createReoptPushClient } from "./client-
|
|
12
|
-
import { n as createReoptTermsClient } from "./client-
|
|
1
|
+
import { A as isValidationError, C as RequiredTermsError, D as isModelAccessError, E as isCreditLimitError, O as isReoptSDKError, S as ReoptSDKError, T as ValidationError, _ as ModelAccessError, b as PreconditionFailedError, c as AuthUserNotFoundError, d as ConflictError, f as ContentFilterError, g as LimitExceededError, h as ForbiddenError, i as resolveBaseUrl, j as mapHttpStatusToError, k as isRequiredTermsError, l as AuthUserRecordExistsError, m as DuplicateAuthUserError, p as CreditLimitError, r as assertBrowserSafe, s as AuthError, t as REOPT_BASE_URLS, u as BadRequestError, v as ModelNotFoundError, w as ServerError, x as RateLimitError, y as NotFoundError } from "./config-D8dSL6OQ.js";
|
|
2
|
+
import { t as BaseHttpClient } from "./http-client-0Sp8wQGQ.js";
|
|
3
|
+
import { n as createReoptAiClient } from "./client-BMgVQ4U-.js";
|
|
4
|
+
import { n as createReoptAuthClient } from "./client-CIUecAJE.js";
|
|
5
|
+
import { t as createReoptCmsClient } from "./client-BD1-resY.js";
|
|
6
|
+
import { t as createReoptEavClient } from "./client-CaWHvclV.js";
|
|
7
|
+
import { n as createReoptFeedbackClient } from "./client-p4LmfF27.js";
|
|
8
|
+
import { n as createReoptFileClient } from "./client-vjIDamSf.js";
|
|
9
|
+
import { n as createReoptAnalyticsClient } from "./client-Hc7SfeIf.js";
|
|
10
|
+
import { n as createReoptPlansClient } from "./client-BVvAfEXG.js";
|
|
11
|
+
import { n as createReoptPushClient } from "./client-D4kUDFwW.js";
|
|
12
|
+
import { n as createReoptTermsClient } from "./client-BpEWDfSl.js";
|
|
13
13
|
|
|
14
14
|
//#region src/singleton.ts
|
|
15
15
|
let _instance;
|
package/dist/logout/index.js
CHANGED
package/dist/plans/index.js
CHANGED
package/dist/push/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as ReoptSDKError } from "./config-
|
|
1
|
+
import { S as ReoptSDKError } from "./config-D8dSL6OQ.js";
|
|
2
2
|
|
|
3
3
|
//#region src/core/query.ts
|
|
4
4
|
/**
|
|
@@ -32,4 +32,4 @@ function buildQuery(params) {
|
|
|
32
32
|
|
|
33
33
|
//#endregion
|
|
34
34
|
export { buildQuery as t };
|
|
35
|
-
//# sourceMappingURL=query-
|
|
35
|
+
//# sourceMappingURL=query-C18XolkY.js.map
|
package/dist/react/hooks.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { A as ListRecordsQuery, C as EavAttribute, D as EavRecord, E as EavEntity, F as UpsertRecordInput, I as UpsertRecordResult, P as UpdateRecordInput, S as DeleteWhereInput, _ as BulkUpdateItem, j as PaginatedResponse, x as CreateRecordInput } from "../config-D28P8iwm.js";
|
|
2
|
-
import { a as CompletionOptions, f as ModelInfo, l as ImageGenerateOptions, o as CompletionResult, p as StreamDoneData, r as AgentInfo, s as CreditInfo, u as ImageGenerateResult } from "../client-
|
|
3
|
-
import { v as ReoptSDKError } from "../errors-
|
|
2
|
+
import { a as CompletionOptions, f as ModelInfo, l as ImageGenerateOptions, o as CompletionResult, p as StreamDoneData, r as AgentInfo, s as CreditInfo, u as ImageGenerateResult } from "../client-DA9ibl3G.js";
|
|
3
|
+
import { v as ReoptSDKError } from "../errors-U3TsyWVq.js";
|
|
4
4
|
import { a as ListTagsQuery, c as PostGroup, d as Tag, i as ListPostsQuery, o as Post, r as ListPostGroupsQuery, s as PostDetail, t as CmsPaginatedResponse } from "../types-BXDcoJHG.js";
|
|
5
5
|
import { a as FileListQuery, c as FolderInfo, d as UpdateFolderInput, f as UploadOptions, i as FileInfo, l as FolderListQuery, o as FileListResponse, r as CreateFolderInput, s as FileUsageInfo, u as UpdateFileInput } from "../client-BOEyVc8V.js";
|
|
6
|
-
import { t as ReoptSDK } from "../index-
|
|
6
|
+
import { t as ReoptSDK } from "../index-DwIr8W3Y.js";
|
|
7
7
|
import { UseInfiniteQueryOptions, UseInfiniteQueryResult, UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
|
|
8
8
|
//#region src/react/use-ai-stream.d.ts
|
|
9
9
|
type UseAiStreamOptions = {
|
|
@@ -200,7 +200,7 @@ declare function useBulkDeleteRecords(sdk: ReoptSDK, entityId: string, options?:
|
|
|
200
200
|
*/
|
|
201
201
|
declare function useDeleteRecordsWhere(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<number, Error, DeleteWhereInput>): UseMutationResult<number, Error, DeleteWhereInput>;
|
|
202
202
|
/**
|
|
203
|
-
* BrandApp AI
|
|
203
|
+
* BrandApp AI 사용량 잔액 조회
|
|
204
204
|
*
|
|
205
205
|
* @example
|
|
206
206
|
* ```tsx
|
package/dist/react/hooks.js
CHANGED
package/dist/terms/index.js
CHANGED
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as SeedAllInput, c as SeedPostGroupInput, d as SeedTermsItem, l as SeedPostInput, n as DevServer, o as SeedData, t as DevSchema } from "../index-C6fyJTud.js";
|
|
2
|
-
import { t as ReoptSDK } from "../index-
|
|
2
|
+
import { t as ReoptSDK } from "../index-DwIr8W3Y.js";
|
|
3
3
|
//#region src/testing/index.d.ts
|
|
4
4
|
type TestSDKOptions = {
|
|
5
5
|
/** EAV schema to seed entities and attributes */
|
package/docs/api-reference.md
CHANGED
|
@@ -392,6 +392,8 @@ await sdk.eav.records.create(entityId, {
|
|
|
392
392
|
expiresAt: new Date(Date.now() + 60_000).toISOString(),
|
|
393
393
|
});
|
|
394
394
|
await sdk.eav.records.update(entityId, recordId, { expiresAt: null }); // TTL 해제
|
|
395
|
+
// ⚠️ expiresAt는 클라이언트가 계산한 절대 시각이다 — 서버 수신 시각 기준이 아니다.
|
|
396
|
+
// 콜드스타트 create가 수 초 걸릴 수 있으니(실측 3.7초) 초 단위 짧은 TTL은 그만큼 여유를 둘 것.
|
|
395
397
|
```
|
|
396
398
|
|
|
397
399
|
### 한도 (production API 기준, 2026-08-30)
|
|
@@ -430,7 +432,8 @@ where("deletedAt").isNull();
|
|
|
430
432
|
const w = createFilterBuilder(ATTRIBUTE_IDS.contacts);
|
|
431
433
|
w("status").eq("active"); // TypeScript validates field names
|
|
432
434
|
|
|
433
|
-
// Operators: eq, neq, contains, gt, lt, gte, lte, isNull, isNotNull, after, before
|
|
435
|
+
// Operators: eq, neq, in, notIn, contains, gt, lt, gte, lte, isNull, isNotNull, after, before
|
|
436
|
+
// in/notIn은 빈 배열을 받지 않는다(400) — "제외 없음"은 필터를 빼서 표현한다.
|
|
434
437
|
```
|
|
435
438
|
|
|
436
439
|
## Schema & JSON Schema
|
package/docs/dev-server.md
CHANGED
|
@@ -87,7 +87,7 @@ await dev.seed({
|
|
|
87
87
|
| --------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
|
|
88
88
|
| **EAV** | `/api/v1/brandapp/{id}/eav/*` | Entity/Attribute/Record CRUD + 벌크 + 필터링 + 정렬 |
|
|
89
89
|
| **Auth** | `/api/v1/brandapp/{id}/auth/adapter` | Better Auth 어댑터 (user/session/account/verification CRUD) |
|
|
90
|
-
| **AI** | `/api/v1/brandapp/{id}/ai/*` | Mock 텍스트/이미지 생성, 모델 목록,
|
|
90
|
+
| **AI** | `/api/v1/brandapp/{id}/ai/*` | Mock 텍스트/이미지 생성, 모델 목록, 사용량 |
|
|
91
91
|
| **Files** | `/api/v1/brandapp/{id}/files/*` | 인메모리 파일 업로드/다운로드/삭제 |
|
|
92
92
|
| **CMS** | `/api/v1/brandapp/{id}/cms/*` | Post/PostGroup CRUD |
|
|
93
93
|
| **OAuth** | `/api/auth/.well-known/*`, `/api/auth/{token,jwks,oauth2/end-session}` | OIDC Discovery + EdDSA로 서명된 mock `id_token` + JWKS + RP-initiated end-session (faithful OIDC mock) |
|
package/docs/errors.md
CHANGED
|
@@ -50,7 +50,7 @@ treating a transient JWKS outage as a permanently bad token). See
|
|
|
50
50
|
`sdk.files.*` 도메인 코드. 409는 `ConflictError`로, 413/415는 base
|
|
51
51
|
`ReoptSDKError`로 도착한다 — `.code`/`.status`로 분기하면 된다. ⚠️ 402는 클래스
|
|
52
52
|
매핑이 status 단위라 저장공간 초과도 **`CreditLimitError` 클래스**로 도착한다
|
|
53
|
-
(이름과 달리 AI
|
|
53
|
+
(이름과 달리 AI 사용량이 아님) — `.code === "STORAGE_LIMIT"`으로 구분할 것.
|
|
54
54
|
|
|
55
55
|
| Code | Status | Class | When |
|
|
56
56
|
| -------------------------- | ------ | ------------------ | ------------------------------------------------------------------------ |
|
|
@@ -70,26 +70,26 @@ These extend the general classes above so existing `instanceof ConflictError` /
|
|
|
70
70
|
`instanceof BadRequestError` checks keep working — narrower classes just give
|
|
71
71
|
you a more direct branch when you care about the specific case.
|
|
72
72
|
|
|
73
|
-
| Error Class | Extends | Status | Code | When
|
|
74
|
-
| --------------------------- | --------------- | ------- | ------------------------- |
|
|
75
|
-
| `AuthUserRecordExistsError` | `ConflictError` | 409 | `AUTH_USER_RECORD_EXISTS` | 1:1 메타 entity에 같은 user의 record가 이미 있음 (→ upsert)
|
|
76
|
-
| `DuplicateAuthUserError` | `ConflictError` | 409 | `DUPLICATE_AUTH_USER` | bulk create 입력에 같은 authUserId가 중복
|
|
77
|
-
| `AuthUserNotFoundError` | `ReoptSDKError` | 400/422 | `AUTH_USER_NOT_FOUND` | 참조한 authUserId가 이 brandapp에 없음
|
|
78
|
-
| `LimitExceededError` | `ReoptSDKError` | 422 | `LIMIT_EXCEEDED_*` | EAV 자원 한도 초과 (entity/attribute/record)
|
|
73
|
+
| Error Class | Extends | Status | Code | When |
|
|
74
|
+
| --------------------------- | --------------- | ------- | ------------------------- | ------------------------------------------------------------------------------- |
|
|
75
|
+
| `AuthUserRecordExistsError` | `ConflictError` | 409 | `AUTH_USER_RECORD_EXISTS` | 1:1 메타 entity에 같은 user의 record가 이미 있음 (→ upsert) |
|
|
76
|
+
| `DuplicateAuthUserError` | `ConflictError` | 409 | `DUPLICATE_AUTH_USER` | bulk create 입력에 같은 authUserId가 중복 |
|
|
77
|
+
| `AuthUserNotFoundError` | `ReoptSDKError` | 400/422 | `AUTH_USER_NOT_FOUND` | 참조한 authUserId가 이 brandapp에 없음 |
|
|
78
|
+
| `LimitExceededError` | `ReoptSDKError` | 422 | `LIMIT_EXCEEDED_*` | EAV 자원 한도 초과 (entity/attribute/record) |
|
|
79
79
|
| `PreconditionFailedError` | `ReoptSDKError` | 412 | `PRECONDITION_FAILED` | `records.update(..., { ifVersion })`의 version이 현재와 다름 — 다시 읽고 재시도 |
|
|
80
80
|
|
|
81
81
|
추가 EAV 코드 (전용 클래스 없이 일반 클래스 + `.code`로 분기):
|
|
82
82
|
|
|
83
|
-
| Code | Status | Class | Notes
|
|
84
|
-
| ----------------------- | ------ | ----------------- |
|
|
85
|
-
| `ENTITY_NOT_FOUND` | 404 | `NotFoundError` | URL의 entityId가 이 brandapp 소속이 아님
|
|
86
|
-
| `ATTRIBUTE_NOT_FOUND` | 404 | `NotFoundError` | URL의 attributeId가 entity 소속이 아님
|
|
87
|
-
| `RECORD_NOT_FOUND` | 404 | `NotFoundError` | URL의 recordId가 entity 소속이 아님
|
|
88
|
-
| `USER_NOT_FOUND` | 404 | `NotFoundError` | `/users/:authUserId/records` 경로의 user가 brandapp에 없음
|
|
89
|
-
| `RECORDS_NOT_FOUND` | 400 | `BadRequestError` | bulkUpdate에서 일부 record id가 entity에 없음
|
|
90
|
-
| `DUPLICATE_RECORD_ID` | 409 | `ConflictError` | bulkUpdate(brandappAuthUser) 입력에 같은 record id가 중복
|
|
83
|
+
| Code | Status | Class | Notes |
|
|
84
|
+
| ----------------------- | ------ | ----------------- | -------------------------------------------------------------------------- |
|
|
85
|
+
| `ENTITY_NOT_FOUND` | 404 | `NotFoundError` | URL의 entityId가 이 brandapp 소속이 아님 |
|
|
86
|
+
| `ATTRIBUTE_NOT_FOUND` | 404 | `NotFoundError` | URL의 attributeId가 entity 소속이 아님 |
|
|
87
|
+
| `RECORD_NOT_FOUND` | 404 | `NotFoundError` | URL의 recordId가 entity 소속이 아님 |
|
|
88
|
+
| `USER_NOT_FOUND` | 404 | `NotFoundError` | `/users/:authUserId/records` 경로의 user가 brandapp에 없음 |
|
|
89
|
+
| `RECORDS_NOT_FOUND` | 400 | `BadRequestError` | bulkUpdate에서 일부 record id가 entity에 없음 |
|
|
90
|
+
| `DUPLICATE_RECORD_ID` | 409 | `ConflictError` | bulkUpdate(brandappAuthUser) 입력에 같은 record id가 중복 |
|
|
91
91
|
| `QUERY_TOO_BROAD` | 422 | `ReoptSDKError` | 필터 후보가 인메모리 상한(10k행)을 넘음 — `eq`/`in`/`authUserId`로 좁힐 것 |
|
|
92
|
-
| `AUTH_USER_ID_REQUIRED` | 400 | `BadRequestError` | `linkedTo='brandappAuthUser'` entity인데 authUserId 누락
|
|
92
|
+
| `AUTH_USER_ID_REQUIRED` | 400 | `BadRequestError` | `linkedTo='brandappAuthUser'` entity인데 authUserId 누락 |
|
|
93
93
|
|
|
94
94
|
All classes extend `ReoptSDKError`, so `instanceof ReoptSDKError` and
|
|
95
95
|
`isReoptSDKError(err)` match every SDK error.
|