@reopt-ai/brandapp-sdk 4.7.0-rc.18 → 4.7.0-rc.19
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 +23 -0
- package/dist/ai/index.js +2 -2
- package/dist/ai-provider/index.js +1 -1
- 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-BK5xduMg.js → client-B6lzuAA9.js} +4 -4
- package/dist/{client-CI6edzub.js → client-C40CSsIa.js} +4 -4
- package/dist/{client-BUyCNTgp.js → client-CIhl2PY7.js} +2 -2
- package/dist/{client-CwulaOAs.js → client-CRhgd-ua.js} +3 -3
- package/dist/{client-CQJR2ljq.js → client-CV0tF5Ks.js} +2 -2
- package/dist/{client-SEUXn1U0.js → client-CxHEiGgA.js} +2 -2
- package/dist/{client-BX723xSY.js → client-CxJrZ2Mp.js} +2 -2
- package/dist/{client-BIltTnuj.js → client-DUSN1VHA.js} +3 -3
- package/dist/{client-D6JLlNg3.js → client-DlR4d-wh.js} +2 -2
- package/dist/{client-5DyQugKG.js → client-RZnBdWRi.js} +2 -2
- package/dist/cms/index.js +1 -1
- package/dist/{config-DyIm8bHR.js → config-CVP1tz1i.js} +30 -5
- package/dist/eav/index.d.ts +1 -1
- package/dist/eav/index.js +2 -2
- package/dist/{errors-D-Va8oeC.d.ts → errors-suUYUdWb.d.ts} +17 -3
- package/dist/feedback/index.js +1 -1
- package/dist/files/index.js +1 -1
- package/dist/{http-client-DIs2To-W.js → http-client-Bmx6EffK.js} +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +13 -13
- package/dist/logout/index.js +1 -1
- package/dist/plans/index.js +1 -1
- package/dist/push/index.js +1 -1
- package/dist/{query-BRsbDI4F.js → query-jIN6hp6x.js} +2 -2
- package/dist/react/hooks.d.ts +1 -1
- package/dist/terms/index.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,29 @@ This project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [4.7.0-rc.19] — 2026-11-22
|
|
11
|
+
|
|
12
|
+
Pre-release (`npm i @reopt-ai/brandapp-sdk@next`) — `@reopt-ai/workspace-sdk@0.1.0-rc.10`을 싣는다.
|
|
13
|
+
|
|
14
|
+
### Changed (breaking — `/workspace` 재수출만)
|
|
15
|
+
|
|
16
|
+
- `@reopt-ai/brandapp-sdk/workspace`는 `@reopt-ai/workspace-sdk`의 재수출이라 그 패키지의 rc.10 변경이 그대로 온다: 위임
|
|
17
|
+
클라이언트(`createConnectClient`)의 목록이 전부 `{ items, nextOffset }`, 쓰기가 객체 전체, 기계 `platform.posts.list`가
|
|
18
|
+
`{ posts }` → `{ items }`. 옮기는 표는 workspace-sdk의 `docs/workspace.md` "Migrating from 0.1.0-rc.9". 브랜드앱 표면
|
|
19
|
+
(`createBrandappSdk`·`cms`·`eav`·결제·인증)은 바뀌지 않았다.
|
|
20
|
+
- 새 서브패스(`/connect`·`/permissions`·`/webhooks`)는 여기서 재수출하지 않는다 — 워크스페이스 앱은 `@reopt-ai/workspace-sdk`를 직접 쓴다
|
|
21
|
+
(`/workspace` 재수출은 5.0에서 제거).
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- **400 `VALIDATION_ERROR`의 필드별 이유가 버려지던 것.** 서버는 요청 검증 실패를 400 + `fields`로 보내는데 SDK는 422에서만
|
|
26
|
+
읽었다. `BadRequestError`가 `fieldErrors`·`getFieldError()`·`toFieldMap()`을 갖고(클래스·상태·코드는 그대로),
|
|
27
|
+
`fieldErrorsOf(error)`가 400·422를 가리지 않고 읽는다.
|
|
28
|
+
|
|
29
|
+
### Security
|
|
30
|
+
|
|
31
|
+
- `/resource` 재수출 — 키에 묶인 위임 토큰의 DPoP 증명 검증, 재생 저장소 기본값(workspace-sdk rc.10 "Security").
|
|
32
|
+
|
|
10
33
|
## [4.7.0-rc.18] — 2026-11-21
|
|
11
34
|
|
|
12
35
|
Pre-release (`npm i @reopt-ai/brandapp-sdk@next`) — `@reopt-ai/workspace-sdk@0.1.0-rc.9`를 싣는다. 소비자 SDK 리뷰 결과:
|
package/dist/ai/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as ReoptSDKError } from "../config-
|
|
2
|
-
import { n as createReoptAiClient, t as ReoptAiClient } from "../client-
|
|
1
|
+
import { S as ReoptSDKError } from "../config-CVP1tz1i.js";
|
|
2
|
+
import { n as createReoptAiClient, t as ReoptAiClient } from "../client-C40CSsIa.js";
|
|
3
3
|
|
|
4
4
|
//#region src/ai/evaluator.ts
|
|
5
5
|
function createBrandappEvaluator(source, options = {}) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { M as mapHttpStatusToError, i as resolveBaseUrl, n as SDK_VERSION, o as validateConfig, r as assertBrowserSafe } from "../config-CVP1tz1i.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-D65dmL4A.js";
|
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-CIhl2PY7.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-BugNVP5q.js";
|
|
2
2
|
import { a as REOPT_PROVIDER_IDS, i as REOPT_PROVIDER_ID, n as AdapterRequestBody, o as REOPT_STEP_UP_PROVIDER_ID, r as REOPT_DEFAULT_SCOPES, s as STEP_UP_MAX_AUTH_AGE_SECONDS, t as AdapterOperation } from "../types-BFg1ywqD.js";
|
|
3
|
-
import {
|
|
3
|
+
import { E as isReoptSDKError, _ as RateLimitError, t as AuthError, v as ReoptSDKError, x as ServerError } from "../errors-suUYUdWb.js";
|
|
4
4
|
import { AdapterFactory } from "better-auth/adapters";
|
|
5
5
|
import { ClientPrivateJwk } from "@reopt-ai/workspace-sdk/machine";
|
|
6
6
|
import { PhoneNumberOptions } from "better-auth/plugins/phone-number";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as BaseHttpClient } from "../http-client-
|
|
1
|
+
import { S as ReoptSDKError, a as resolveIdBaseUrl, k as isReoptSDKError, s as AuthError, t as REOPT_BASE_URLS, w as ServerError, x as RateLimitError } from "../config-CVP1tz1i.js";
|
|
2
|
+
import { t as BaseHttpClient } from "../http-client-Bmx6EffK.js";
|
|
3
3
|
import { a as STEP_UP_MAX_AUTH_AGE_SECONDS, i as REOPT_STEP_UP_PROVIDER_ID, n as REOPT_PROVIDER_ID, r as REOPT_PROVIDER_IDS, t as REOPT_DEFAULT_SCOPES } from "../types-Dq032jKk.js";
|
|
4
4
|
import { createAdapterFactory } from "better-auth/adapters";
|
|
5
5
|
import { createPrivateKeyJwtClientAssertionGetter } from "@better-auth/core/oauth2";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as ReoptSDKError, u as BadRequestError } from "./config-
|
|
2
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
3
|
-
import { t as buildQuery } from "./query-
|
|
1
|
+
import { S as ReoptSDKError, u as BadRequestError } from "./config-CVP1tz1i.js";
|
|
2
|
+
import { t as BaseHttpClient } from "./http-client-Bmx6EffK.js";
|
|
3
|
+
import { t as buildQuery } from "./query-jIN6hp6x.js";
|
|
4
4
|
|
|
5
5
|
//#region src/eav/attribute-keys.ts
|
|
6
6
|
const BUILT_IN_SORT_KEYS = /* @__PURE__ */ new Set(["createdAt", "updatedAt"]);
|
|
@@ -740,4 +740,4 @@ function createReoptEavClient(config) {
|
|
|
740
740
|
|
|
741
741
|
//#endregion
|
|
742
742
|
export { RECORDS_PAGE_LIMIT_MAX as i, ATTRIBUTE_FILTER_LIST_MAX as n, ATTRIBUTE_FILTER_OPERATORS as r, createReoptEavClient as t };
|
|
743
|
-
//# sourceMappingURL=client-
|
|
743
|
+
//# sourceMappingURL=client-B6lzuAA9.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { M as mapHttpStatusToError, S as ReoptSDKError, n as SDK_VERSION, o as validateConfig } from "./config-CVP1tz1i.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-Bmx6EffK.js";
|
|
4
4
|
import { n as parseSSEStream } from "./sse-parser-D65dmL4A.js";
|
|
5
5
|
|
|
6
6
|
//#region src/ai/client.ts
|
|
@@ -262,7 +262,7 @@ var ReoptAiClient = class {
|
|
|
262
262
|
}
|
|
263
263
|
async fetchSSE(options) {
|
|
264
264
|
const url = `${this.http.requestBaseUrl}/chat/completions`;
|
|
265
|
-
const requestId = globalThis.crypto?.randomUUID?.() ?? `sdk-${"4.7.0-rc.
|
|
265
|
+
const requestId = globalThis.crypto?.randomUUID?.() ?? `sdk-${"4.7.0-rc.19"}-${url.length}`;
|
|
266
266
|
const ctx = {
|
|
267
267
|
method: "POST",
|
|
268
268
|
url,
|
|
@@ -343,4 +343,4 @@ function createReoptAiClient(config) {
|
|
|
343
343
|
|
|
344
344
|
//#endregion
|
|
345
345
|
export { createReoptAiClient as n, ReoptAiClient as t };
|
|
346
|
-
//# sourceMappingURL=client-
|
|
346
|
+
//# sourceMappingURL=client-C40CSsIa.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-Bmx6EffK.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-CIhl2PY7.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-Bmx6EffK.js";
|
|
2
|
+
import { t as buildQuery } from "./query-jIN6hp6x.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-CRhgd-ua.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-Bmx6EffK.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-CV0tF5Ks.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-Bmx6EffK.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-CxHEiGgA.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-Bmx6EffK.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-CxJrZ2Mp.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { M as mapHttpStatusToError, S as ReoptSDKError, n as SDK_VERSION, o as validateConfig } from "./config-CVP1tz1i.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-Bmx6EffK.js";
|
|
4
4
|
|
|
5
5
|
//#region src/files/client.ts
|
|
6
6
|
var ReoptFileClient = class {
|
|
@@ -276,4 +276,4 @@ function createReoptFileClient(config) {
|
|
|
276
276
|
|
|
277
277
|
//#endregion
|
|
278
278
|
export { createReoptFileClient as n, ReoptFileClient as t };
|
|
279
|
-
//# sourceMappingURL=client-
|
|
279
|
+
//# sourceMappingURL=client-DUSN1VHA.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-Bmx6EffK.js";
|
|
2
2
|
|
|
3
3
|
//#region src/plans/client.ts
|
|
4
4
|
function unwrap(body) {
|
|
@@ -143,4 +143,4 @@ function createReoptPlansClient(config) {
|
|
|
143
143
|
|
|
144
144
|
//#endregion
|
|
145
145
|
export { createReoptPlansClient as n, ReoptPlansClient as t };
|
|
146
|
-
//# sourceMappingURL=client-
|
|
146
|
+
//# sourceMappingURL=client-DlR4d-wh.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-Bmx6EffK.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-RZnBdWRi.js.map
|
package/dist/cms/index.js
CHANGED
|
@@ -120,7 +120,12 @@ var ContentFilterError = class extends ReoptSDKError {
|
|
|
120
120
|
}
|
|
121
121
|
};
|
|
122
122
|
var BadRequestError = class extends ReoptSDKError {
|
|
123
|
-
|
|
123
|
+
/**
|
|
124
|
+
* 서버가 짚어 준 필드별 이유 — 요청 검증 실패(400 `VALIDATION_ERROR`)에 실려 온다. 없으면 빈 배열.
|
|
125
|
+
* (4.7.0-rc.19까지는 422에서만 읽어서, 서버가 400에 실어 보낸 필드 이유가 버려졌다.)
|
|
126
|
+
*/
|
|
127
|
+
fieldErrors;
|
|
128
|
+
constructor(message = "Bad request", context, code = "BAD_REQUEST", fieldErrors = []) {
|
|
124
129
|
super(message, 400, code, context, code === "EVALUATION_REJECTED" ? {
|
|
125
130
|
cause: "평가 모델 사업자가 질문 모양을 거절함 (과금되지 않음) — 메시지가 이유를 말한다",
|
|
126
131
|
fix: "score 레벨 2~10개, choice 선택지 1~100개, 질문 128개 이하로 맞추기",
|
|
@@ -130,6 +135,17 @@ var BadRequestError = class extends ReoptSDKError {
|
|
|
130
135
|
fix: "요청 본문과 쿼리 파라미터를 확인"
|
|
131
136
|
});
|
|
132
137
|
this.name = "BadRequestError";
|
|
138
|
+
this.fieldErrors = fieldErrors;
|
|
139
|
+
}
|
|
140
|
+
/** 특정 필드의 에러 메시지 */
|
|
141
|
+
getFieldError(field) {
|
|
142
|
+
return this.fieldErrors.find((e) => e.field === field)?.message;
|
|
143
|
+
}
|
|
144
|
+
/** 필드 → 메시지 맵 */
|
|
145
|
+
toFieldMap() {
|
|
146
|
+
const map = {};
|
|
147
|
+
for (const fe of this.fieldErrors) map[fe.field] = fe.message;
|
|
148
|
+
return map;
|
|
133
149
|
}
|
|
134
150
|
};
|
|
135
151
|
/** 403 중 고칠 자리가 정해진 코드 — 일반 문구 대신 그 자리를 가리킨다. */
|
|
@@ -300,6 +316,15 @@ var ValidationError = class extends ReoptSDKError {
|
|
|
300
316
|
return map;
|
|
301
317
|
}
|
|
302
318
|
};
|
|
319
|
+
/**
|
|
320
|
+
* 에러에 실린 필드별 이유 — 400(`BadRequestError`)·422(`ValidationError`) 어느 쪽이든 읽는다. 없으면 빈 배열.
|
|
321
|
+
* 폼에 필드 오류를 표시할 때 상태 코드를 가리지 않고 이것 하나를 쓴다.
|
|
322
|
+
*/
|
|
323
|
+
function fieldErrorsOf(error) {
|
|
324
|
+
if (!error || typeof error !== "object") return [];
|
|
325
|
+
const fields = error.fieldErrors;
|
|
326
|
+
return Array.isArray(fields) ? fields : [];
|
|
327
|
+
}
|
|
303
328
|
/** Bundle-safe type guard for ValidationError */
|
|
304
329
|
function isValidationError(error) {
|
|
305
330
|
return error instanceof Error && error.name === "ValidationError" && "fieldErrors" in error;
|
|
@@ -341,7 +366,7 @@ function mapHttpStatusToError(status, code, message, ctx, fieldErrors) {
|
|
|
341
366
|
case 402: return new CreditLimitError(message ?? "Insufficient AI credits", ctx, code ?? "CREDIT_LIMIT");
|
|
342
367
|
case 400:
|
|
343
368
|
if (code === "AUTH_USER_NOT_FOUND") return new AuthUserNotFoundError(message ?? "Auth user not found in this brandapp", 400, ctx);
|
|
344
|
-
return new BadRequestError(message ?? "Bad request", ctx, code ?? "BAD_REQUEST");
|
|
369
|
+
return new BadRequestError(message ?? "Bad request", ctx, code ?? "BAD_REQUEST", fieldErrors ?? []);
|
|
345
370
|
case 403:
|
|
346
371
|
if (code === "MODEL_ACCESS_DENIED") return new ModelAccessError(message ?? "Model not available for this plan tier", ctx);
|
|
347
372
|
return new ForbiddenError(message ?? "Forbidden", ctx, code ?? "FORBIDDEN");
|
|
@@ -372,7 +397,7 @@ function mapHttpStatusToError(status, code, message, ctx, fieldErrors) {
|
|
|
372
397
|
|
|
373
398
|
//#endregion
|
|
374
399
|
//#region src/core/config.ts
|
|
375
|
-
const SDK_VERSION = "4.7.0-rc.
|
|
400
|
+
const SDK_VERSION = "4.7.0-rc.19";
|
|
376
401
|
/**
|
|
377
402
|
* Default API host for EAV / AI / Files / CMS / Terms. Consumers can override
|
|
378
403
|
* via `config.baseUrl` or the `REOPT_BASE_URL` env var.
|
|
@@ -524,5 +549,5 @@ function resolveBaseUrl(config) {
|
|
|
524
549
|
}
|
|
525
550
|
|
|
526
551
|
//#endregion
|
|
527
|
-
export {
|
|
528
|
-
//# sourceMappingURL=config-
|
|
552
|
+
export { isRequiredTermsError as A, RequiredTermsError as C, isCreditLimitError as D, fieldErrorsOf as E, mapHttpStatusToError as M, isModelAccessError 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, isValidationError as j, isReoptSDKError 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 };
|
|
553
|
+
//# sourceMappingURL=config-CVP1tz1i.js.map
|
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 UpdateRecordInput, I as UpsertRecordInput, L as UpsertRecordResult, M as RECORDS_PAGE_LIMIT_MAX, N as UpdateAttributeInput, O as EavSchemaLinkedTo, P as UpdateEntityInput, 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-BugNVP5q.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-suUYUdWb.js";
|
|
3
3
|
import { a as TypedAttributeFilter, c as TypedDeleteWhereInput, d as TypedPatch, f as TypedUpdateInput, i as EntityClient, l as TypedEavRecord, n as createReoptEavClient, o as TypedBackfillOptions, r as AttributeName, s as TypedCountQuery, t as ReoptEavClient, u as TypedListQuery } from "../client-KkCYwia-.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 { i as RECORDS_PAGE_LIMIT_MAX, n as ATTRIBUTE_FILTER_LIST_MAX, r as ATTRIBUTE_FILTER_OPERATORS, t as createReoptEavClient } from "../client-
|
|
1
|
+
import { c as AuthUserNotFoundError, g as LimitExceededError, l as AuthUserRecordExistsError, m as DuplicateAuthUserError } from "../config-CVP1tz1i.js";
|
|
2
|
+
import { i as RECORDS_PAGE_LIMIT_MAX, n as ATTRIBUTE_FILTER_LIST_MAX, r as ATTRIBUTE_FILTER_OPERATORS, t as createReoptEavClient } from "../client-B6lzuAA9.js";
|
|
3
3
|
|
|
4
4
|
//#region src/eav/verify.ts
|
|
5
5
|
async function verifyEavSchema(input) {
|
|
@@ -60,7 +60,16 @@ declare class ContentFilterError extends ReoptSDKError {
|
|
|
60
60
|
constructor(message?: string, context?: ReoptSDKErrorContext);
|
|
61
61
|
}
|
|
62
62
|
declare class BadRequestError extends ReoptSDKError {
|
|
63
|
-
|
|
63
|
+
/**
|
|
64
|
+
* 서버가 짚어 준 필드별 이유 — 요청 검증 실패(400 `VALIDATION_ERROR`)에 실려 온다. 없으면 빈 배열.
|
|
65
|
+
* (4.7.0-rc.19까지는 422에서만 읽어서, 서버가 400에 실어 보낸 필드 이유가 버려졌다.)
|
|
66
|
+
*/
|
|
67
|
+
readonly fieldErrors: FieldError[];
|
|
68
|
+
constructor(message?: string, context?: ReoptSDKErrorContext, code?: string, fieldErrors?: FieldError[]);
|
|
69
|
+
/** 특정 필드의 에러 메시지 */
|
|
70
|
+
getFieldError(field: string): string | undefined;
|
|
71
|
+
/** 필드 → 메시지 맵 */
|
|
72
|
+
toFieldMap(): Record<string, string>;
|
|
64
73
|
}
|
|
65
74
|
declare class ForbiddenError extends ReoptSDKError {
|
|
66
75
|
constructor(message?: string, context?: ReoptSDKErrorContext, code?: string);
|
|
@@ -159,6 +168,11 @@ declare class ValidationError extends ReoptSDKError {
|
|
|
159
168
|
/** 필드 → 메시지 맵 반환 */
|
|
160
169
|
toFieldMap(): Record<string, string>;
|
|
161
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* 에러에 실린 필드별 이유 — 400(`BadRequestError`)·422(`ValidationError`) 어느 쪽이든 읽는다. 없으면 빈 배열.
|
|
173
|
+
* 폼에 필드 오류를 표시할 때 상태 코드를 가리지 않고 이것 하나를 쓴다.
|
|
174
|
+
*/
|
|
175
|
+
declare function fieldErrorsOf(error: unknown): FieldError[];
|
|
162
176
|
/** Bundle-safe type guard for ValidationError */
|
|
163
177
|
declare function isValidationError(error: unknown): error is ValidationError;
|
|
164
178
|
/**
|
|
@@ -188,5 +202,5 @@ declare function isModelAccessError(error: unknown): error is ModelAccessError;
|
|
|
188
202
|
*/
|
|
189
203
|
declare function mapHttpStatusToError(status: number, code: string | undefined, message: string | undefined, ctx?: ReoptSDKErrorContext, fieldErrors?: FieldError[]): ReoptSDKError;
|
|
190
204
|
//#endregion
|
|
191
|
-
export {
|
|
192
|
-
//# sourceMappingURL=errors-
|
|
205
|
+
export { fieldErrorsOf as C, isRequiredTermsError as D, isReoptSDKError as E, isValidationError as O, ValidationError as S, isModelAccessError 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, mapHttpStatusToError as k, 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, isCreditLimitError as w, ServerError as x, ReoptSDKErrorContext as y };
|
|
206
|
+
//# sourceMappingURL=errors-suUYUdWb.d.ts.map
|
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,
|
|
1
|
+
import { M as mapHttpStatusToError, S as ReoptSDKError, a as resolveIdBaseUrl, i as resolveBaseUrl, n as SDK_VERSION, o as validateConfig, r as assertBrowserSafe, w as ServerError, x as RateLimitError } from "./config-CVP1tz1i.js";
|
|
2
2
|
import { t as createAuthHeader } from "./encoding-Bwfm3iaE.js";
|
|
3
3
|
|
|
4
4
|
//#region src/core/debug.ts
|
|
@@ -334,7 +334,7 @@ var BaseHttpClient = class {
|
|
|
334
334
|
}
|
|
335
335
|
const errorBody = await response.json().catch(() => ({}));
|
|
336
336
|
const { code: errorCode, message: errorMessage } = parseErrorBody(errorBody);
|
|
337
|
-
const fieldErrors = response.status === 422 ? parseFieldErrors(errorBody) : [];
|
|
337
|
+
const fieldErrors = response.status === 422 || response.status === 400 ? parseFieldErrors(errorBody) : [];
|
|
338
338
|
const mapped = mapHttpStatusToError(response.status, errorCode, errorMessage, ctx, fieldErrors);
|
|
339
339
|
if (response.status === 429) {
|
|
340
340
|
lastError = mapped;
|
|
@@ -413,4 +413,4 @@ function parseFieldErrors(body) {
|
|
|
413
413
|
|
|
414
414
|
//#endregion
|
|
415
415
|
export { parseFieldErrors as n, BaseHttpClient as t };
|
|
416
|
-
//# sourceMappingURL=http-client-
|
|
416
|
+
//# sourceMappingURL=http-client-Bmx6EffK.js.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-BugNVP5q.js";
|
|
2
2
|
import { C as StreamEvent, S as StreamDoneData, _ as ImageGenerateOptions, b as ModelInfo, d as EvaluateOptions, f as EvaluationAnswer, g as FinishReason, h as EvaluationResult, i as ChatMessage, m as EvaluationQuestion, o as CompletionOptions, p as EvaluationInput, r as AgentInfo, s as CompletionResult, u as CreditInfo, v as ImageGenerateResult, y as MessageRole } from "./client-DqZXU9pY.js";
|
|
3
|
-
import { C as
|
|
3
|
+
import { C as fieldErrorsOf, D as isRequiredTermsError, E as isReoptSDKError, O as isValidationError, S as ValidationError, T as isModelAccessError, _ 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, k as mapHttpStatusToError, 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 isCreditLimitError, x as ServerError, y as ReoptSDKErrorContext } from "./errors-suUYUdWb.js";
|
|
4
4
|
import { i as EntityClient, l as TypedEavRecord } from "./client-KkCYwia-.js";
|
|
5
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-nJgNCO5P.js";
|
|
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 EvaluateOptions, type EvaluationAnswer, type EvaluationInput, type EvaluationQuestion, type EvaluationResult, 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 };
|
|
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 EvaluateOptions, type EvaluationAnswer, type EvaluationInput, type EvaluationQuestion, type EvaluationResult, 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, fieldErrorsOf, getReoptSDK, initReoptSDK, isCreditLimitError, isModelAccessError, isReoptSDKError, isRequiredTermsError, isValidationError, mapHttpStatusToError, resetSDK, resolveBaseUrl };
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { A as
|
|
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 isRequiredTermsError, C as RequiredTermsError, D as isCreditLimitError, E as fieldErrorsOf, M as mapHttpStatusToError, O as isModelAccessError, 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 isValidationError, k as isReoptSDKError, 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-CVP1tz1i.js";
|
|
2
|
+
import { t as BaseHttpClient } from "./http-client-Bmx6EffK.js";
|
|
3
|
+
import { n as createReoptAiClient } from "./client-C40CSsIa.js";
|
|
4
|
+
import { n as createReoptAuthClient } from "./client-CxJrZ2Mp.js";
|
|
5
|
+
import { t as createReoptCmsClient } from "./client-CRhgd-ua.js";
|
|
6
|
+
import { t as createReoptEavClient } from "./client-B6lzuAA9.js";
|
|
7
|
+
import { n as createReoptFeedbackClient } from "./client-CxHEiGgA.js";
|
|
8
|
+
import { n as createReoptFileClient } from "./client-DUSN1VHA.js";
|
|
9
|
+
import { n as createReoptAnalyticsClient } from "./client-CIhl2PY7.js";
|
|
10
|
+
import { n as createReoptPlansClient } from "./client-DlR4d-wh.js";
|
|
11
|
+
import { n as createReoptPushClient } from "./client-CV0tF5Ks.js";
|
|
12
|
+
import { n as createReoptTermsClient } from "./client-RZnBdWRi.js";
|
|
13
13
|
|
|
14
14
|
//#region src/singleton.ts
|
|
15
15
|
let _instance;
|
|
@@ -131,5 +131,5 @@ function createReoptSDK(config) {
|
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
//#endregion
|
|
134
|
-
export { AuthError, AuthUserNotFoundError, AuthUserRecordExistsError, BadRequestError, BaseHttpClient, ConflictError, ContentFilterError, CreditLimitError, DuplicateAuthUserError, ForbiddenError, LimitExceededError, ModelAccessError, ModelNotFoundError, NotFoundError, PreconditionFailedError, REOPT_BASE_URLS, RateLimitError, ReoptSDKError, RequiredTermsError, ServerError, ValidationError, createLazySDK, createReoptSDK, getReoptSDK, initReoptSDK, isCreditLimitError, isModelAccessError, isReoptSDKError, isRequiredTermsError, isValidationError, mapHttpStatusToError, resetSDK, resolveBaseUrl };
|
|
134
|
+
export { AuthError, AuthUserNotFoundError, AuthUserRecordExistsError, BadRequestError, BaseHttpClient, ConflictError, ContentFilterError, CreditLimitError, DuplicateAuthUserError, ForbiddenError, LimitExceededError, ModelAccessError, ModelNotFoundError, NotFoundError, PreconditionFailedError, REOPT_BASE_URLS, RateLimitError, ReoptSDKError, RequiredTermsError, ServerError, ValidationError, createLazySDK, createReoptSDK, fieldErrorsOf, getReoptSDK, initReoptSDK, isCreditLimitError, isModelAccessError, isReoptSDKError, isRequiredTermsError, isValidationError, mapHttpStatusToError, resetSDK, resolveBaseUrl };
|
|
135
135
|
//# sourceMappingURL=index.js.map
|
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-CVP1tz1i.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-jIN6hp6x.js.map
|
package/dist/react/hooks.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { A as ListRecordsQuery, C as EavAttribute, D as EavRecord, E as EavEntity, F as UpdateRecordInput, I as UpsertRecordInput, L as UpsertRecordResult, S as DeleteWhereInput, _ as BulkUpdateItem, j as PaginatedResponse, x as CreateRecordInput } from "../config-BugNVP5q.js";
|
|
2
2
|
import { S as StreamDoneData, _ as ImageGenerateOptions, b as ModelInfo, o as CompletionOptions, r as AgentInfo, s as CompletionResult, u as CreditInfo, v as ImageGenerateResult } from "../client-DqZXU9pY.js";
|
|
3
|
-
import { v as ReoptSDKError } from "../errors-
|
|
3
|
+
import { v as ReoptSDKError } from "../errors-suUYUdWb.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-CUC1Ignp.js";
|
|
6
6
|
import { t as ReoptSDK } from "../index-nJgNCO5P.js";
|
package/dist/terms/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reopt-ai/brandapp-sdk",
|
|
3
|
-
"version": "4.7.0-rc.
|
|
3
|
+
"version": "4.7.0-rc.19",
|
|
4
4
|
"description": "Reopt Brandapp SDK — Better Auth adapter, OAuth login, and EAV client",
|
|
5
5
|
"author": "Reopt",
|
|
6
6
|
"license": "MIT",
|
|
@@ -212,7 +212,7 @@
|
|
|
212
212
|
"reopt-keygen": "./dist/machine/keygen-cli.js"
|
|
213
213
|
},
|
|
214
214
|
"dependencies": {
|
|
215
|
-
"@reopt-ai/workspace-sdk": "0.1.0-rc.
|
|
215
|
+
"@reopt-ai/workspace-sdk": "0.1.0-rc.10",
|
|
216
216
|
"jose": "^6.2.3"
|
|
217
217
|
},
|
|
218
218
|
"scripts": {
|