@reopt-ai/brandapp-sdk 4.7.0-rc.15 → 4.7.0-rc.16
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 +39 -0
- package/README.md +5 -3
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/index.js +2 -2
- package/dist/ai-provider/index.d.ts +1 -1
- package/dist/ai-provider/index.js +1 -1
- package/dist/analytics/index.d.ts +1 -1
- package/dist/analytics/index.js +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/better-auth/index.d.ts +2 -2
- package/dist/better-auth/index.js +3 -3
- package/dist/{client-BlHPiBEo.js → client-B4pglmTS.js} +2 -2
- package/dist/{client-BjX5K-Qh.js → client-BFfyuoNI.js} +4 -4
- package/dist/{client-CTNoB_vH.d.ts → client-BpTb2n0k.d.ts} +2 -2
- package/dist/{client-C2Yhtnhs.d.ts → client-BuAtrkbd.d.ts} +2 -2
- package/dist/{client-BY0-0nhP.d.ts → client-C7L3X-6K.d.ts} +2 -2
- package/dist/{client-C08BvY3B.d.ts → client-CC7rcBX6.d.ts} +2 -2
- package/dist/{client-BrYt--zm.d.ts → client-CJRCG-km.d.ts} +2 -2
- package/dist/{client-8phVQcw8.d.ts → client-CRaeubc_.d.ts} +2 -2
- package/dist/{client-DCd3T29e.js → client-CZe_S1HM.js} +3 -3
- package/dist/{client-B9_zWxmn.js → client-CbQP3u9_.js} +2 -2
- package/dist/{client-33gSO7lm.d.ts → client-CcoGEXUB.d.ts} +2 -2
- package/dist/{client-QPvDSMNd.d.ts → client-ChLjP8Zx.d.ts} +6 -5
- package/dist/{client-DIAWwOhv.js → client-D3zSBcPj.js} +2 -2
- package/dist/{client-aB1rCHah.js → client-D5ZVsy8Y.js} +4 -4
- package/dist/{client-Ylv0P82v.js → client-DU8XR4_z.js} +2 -2
- package/dist/{client-Dg-hO_LG.js → client-DeyC3NFp.js} +2 -2
- package/dist/{client-CUdewN3W.d.ts → client-DfsH-x4k.d.ts} +2 -2
- package/dist/{client-5Z8ekxae.js → client-M1yp71xP.js} +3 -3
- package/dist/{client-DD9y7Qew.d.ts → client-ShqkrIQ6.d.ts} +2 -2
- package/dist/{client-DbbbBNJm.js → client-lHWyhnKI.js} +2 -2
- package/dist/cms/index.d.ts +1 -1
- package/dist/cms/index.js +1 -1
- package/dist/{config-CSUlKyTp.d.ts → config-CDI6Rb8i.d.ts} +13 -1
- package/dist/{config-ChctVyuz.js → config-CjwPB89K.js} +4 -60
- package/dist/eav/index.d.ts +2 -2
- package/dist/eav/index.js +2 -2
- package/dist/eav/migrate.d.ts +2 -2
- package/dist/eav/schema.d.ts +2 -2
- package/dist/feedback/index.d.ts +1 -1
- package/dist/feedback/index.js +1 -1
- package/dist/files/index.d.ts +1 -1
- package/dist/files/index.js +1 -1
- package/dist/{http-client-CpG8mEHO.js → http-client-he14vKAL.js} +2 -2
- package/dist/{index-tEgiKb5o.d.ts → index-C6TGVSOF.d.ts} +12 -12
- package/dist/index.d.ts +4 -4
- package/dist/index.js +12 -12
- package/dist/installation/index.d.ts +1 -415
- package/dist/installation/index.js +2 -840
- package/dist/logout/index.d.ts +1 -1
- package/dist/logout/index.js +1 -1
- package/dist/machine/index.d.ts +1 -3
- package/dist/machine/index.js +2 -3
- package/dist/machine/keygen-cli.d.ts +1 -7
- package/dist/machine/keygen-cli.js +2 -55
- package/dist/plans/index.d.ts +1 -1
- package/dist/plans/index.js +1 -1
- package/dist/push/index.d.ts +1 -1
- package/dist/push/index.js +1 -1
- package/dist/{query-DFwpKnPG.js → query-BmI60Jw2.js} +2 -2
- package/dist/react/hooks.d.ts +4 -4
- package/dist/resource/index.d.ts +1 -176
- package/dist/resource/index.js +2 -344
- package/dist/social/index.d.ts +1 -284
- package/dist/social/index.js +2 -305
- package/dist/terms/index.d.ts +1 -1
- package/dist/terms/index.js +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/workspace/index.d.ts +1 -2
- package/dist/workspace/index.js +2 -2
- package/docs/api-reference.md +3 -2
- package/package.json +3 -2
- package/dist/client-5N6dGCPl.js +0 -745
- package/dist/client-Ce3RqyOI.js +0 -194
- package/dist/client-DlgVNj3w.d.ts +0 -72
- package/dist/client-seu-0lbh.d.ts +0 -654
- package/dist/keys-B2pA8EkU.d.ts +0 -44
- package/dist/keys-B_R_lsyF.js +0 -102
- package/docs/installation.md +0 -128
- package/docs/machine.md +0 -109
- package/docs/resource.md +0 -75
- package/docs/social.md +0 -92
- package/docs/workspace.md +0 -153
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,45 @@ This project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [4.7.0-rc.16] — 2026-11-20
|
|
11
|
+
|
|
12
|
+
Pre-release (`npm i @reopt-ai/brandapp-sdk@next`) — 플랫폼 계층을 `@reopt-ai/workspace-sdk@0.1.0-rc.0`으로 분리하고,
|
|
13
|
+
워크스페이스 앱(RFC-0043)의 위임 클라이언트·게시본 읽기를 더했다.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- **플랫폼 계층을 `@reopt-ai/workspace-sdk`로 분리**(RFC-0043 — 워크스페이스 계층이 브랜드앱 계층 아래다). `/workspace`·
|
|
18
|
+
`/social`·`/machine`·`/installation`·`/resource`는 그 패키지의 **재수출**이 되고(같은 구현 — `PlatformApiError` 등
|
|
19
|
+
클래스 정체성도 같다), 이 SDK가 그 패키지에 의존한다. 새 코드는 `@reopt-ai/workspace-sdk`를 직접 import한다 —
|
|
20
|
+
이 서브패스들은 5.0에서 지운다. `reopt-keygen` bin은 그대로 쓸 수 있다(그 패키지 구현을 부르는 shim). id 호스트
|
|
21
|
+
해석(`resolveIdBaseUrl`·`deriveIdFromBaseUrl`·`REOPT_ID_BASE_URLS`)도 그 패키지의 `/urls` 한 벌을 재수출한다.
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- **설치 매니페스트 `kind`**(RFC-0043 워크스페이스 앱) — `kind: "workspace"`는 브랜드·브랜드앱을 만들지 않는 설치다.
|
|
26
|
+
클라이언트는 설치에만 묶이고 용도는 `connect`(멤버 위임 로그인)·`machine`(앱 서버) 둘뿐, `workspace.brandapps`
|
|
27
|
+
선언은 거절된다. 생략은 `"brandapp"`(종전)이고 기본값을 채우지 않으므로 기존 매니페스트의 해시는 그대로다.
|
|
28
|
+
`INSTALLATION_KINDS`·`WORKSPACE_APP_CLIENT_PURPOSES`·`installationKindOf`, `deriveInstallationManifest({ kind })`.
|
|
29
|
+
- **위임 클라이언트 `createConnectClient`**(`/workspace`, RFC-0043) — 워크스페이스 앱의 직원이 리옵트로 로그인해 받은
|
|
30
|
+
**자기** 토큰(설치의 `connect` 클라이언트)으로 `/v1/connect/*`를 부른다: `me`(권한 키 `permissions`)·`members`,
|
|
31
|
+
`works`(파이프라인·업무 목록·생성·수정·이동·삭제), `posts`(그룹·목록·읽기·생성·수정(`baseVersion`)·게시·내리기·삭제),
|
|
32
|
+
`folders`·`files`(업로드 4MB·원본 바이트), `forms`, `inquiries`(목록 — `customer:read`, 단계 이동). 워크스페이스와 행위자는
|
|
33
|
+
요청에 없다(동의 바인딩·토큰의 사용자). 응답 스키마(`connect*Schema`)는 약속한 필드만 검사하고 서버가 더한 필드는 통과시킨다.
|
|
34
|
+
- **게시된 글 읽기**(`/workspace`, RFC-0043 §3.6, scope `posts:read`) — `platform.posts.list({ groupId, limit, offset })`·
|
|
35
|
+
`platform.posts.get(slug)`. 게시된 글만 나온다(초안·보관은 없음). 워크스페이스 앱 공개 사이트의 소식 페이지용 —
|
|
36
|
+
브랜드앱 CMS(`sdk.cms`)는 브랜드앱이 없는 자격에서 쓸 수 없다. `platformPublishedPost{,Summary,Page,ListQuery}Schema`.
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
|
|
40
|
+
- **`platform.me()`가 워크스페이스 앱 자격에서 파싱 실패하던 것** — 서버는 브랜드앱이 없는 자격에 `brandappId`·
|
|
41
|
+
`defaultBrandId`를 `null`로 답하는데 스키마가 문자열을 요구했다. `PlatformMe`의 두 필드가 `string | null`이다
|
|
42
|
+
(⚠️ 타입이 넓어졌다 — 브랜드앱 자격만 쓰는 코드는 값이 그대로지만 `string`으로 받던 곳은 좁혀야 한다).
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
|
|
46
|
+
- `TypedPatch` 값에 `undefined`도 받는다(`?: T | null | undefined`) — `exactOptionalPropertyTypes`에서 zod
|
|
47
|
+
`.partial()` 출력을 그대로 넘기면 TS2375가 났다. `undefined` 키는 JSON에서 빠지므로 값은 그대로 둔다.
|
|
48
|
+
|
|
10
49
|
## [4.7.0-rc.15] — 2026-11-20
|
|
11
50
|
|
|
12
51
|
Pre-release (`npm i @reopt-ai/brandapp-sdk@next`) — rc.14 타입 클라이언트의 타입 갭 둘(enterprise-bootstrap 보고).
|
package/README.md
CHANGED
|
@@ -72,8 +72,10 @@ const entities = await sdk.eav.entities.list();
|
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
Register `${origin}/.well-known/reopt-client-jwks.json` as the client's
|
|
75
|
-
`jwksUri`.
|
|
76
|
-
[
|
|
75
|
+
`jwksUri`. Machine credentials, installations and the platform API now live in
|
|
76
|
+
[`@reopt-ai/workspace-sdk`](https://www.npmjs.com/package/@reopt-ai/workspace-sdk) — this SDK depends on it
|
|
77
|
+
and keeps `/machine`, `/installation`, `/workspace`, `/social` and `/resource` as re-exports (removed in 5.0).
|
|
78
|
+
Rotation and errors are in that package's machine docs.
|
|
77
79
|
|
|
78
80
|
### Connect to Reopt (installation, 4.7+)
|
|
79
81
|
|
|
@@ -105,7 +107,7 @@ const connection = createReoptConnection({
|
|
|
105
107
|
await connection.requestConnection(); // pending until an operator approves
|
|
106
108
|
```
|
|
107
109
|
|
|
108
|
-
States, the back-channel receiver and key rotation
|
|
110
|
+
States, the back-channel receiver and key rotation are in `@reopt-ai/workspace-sdk`'s installation docs.
|
|
109
111
|
|
|
110
112
|
### Better Auth
|
|
111
113
|
|
package/dist/ai/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as StreamEvent, S as StreamDoneData, _ as ImageGenerateOptions, a as CompletionContentPart, b as ModelInfo, c as CompletionUsage, d as EvaluateOptions, f as EvaluationAnswer, g as FinishReason, h as EvaluationResult, i as ChatMessage, l as CompletionWarning, m as EvaluationQuestion, n as createReoptAiClient, o as CompletionOptions, p as EvaluationInput, r as AgentInfo, s as CompletionResult, t as ReoptAiClient, u as CreditInfo, v as ImageGenerateResult, x as PartProviderMetadata, y as MessageRole } from "../client-
|
|
1
|
+
import { C as StreamEvent, S as StreamDoneData, _ as ImageGenerateOptions, a as CompletionContentPart, b as ModelInfo, c as CompletionUsage, d as EvaluateOptions, f as EvaluationAnswer, g as FinishReason, h as EvaluationResult, i as ChatMessage, l as CompletionWarning, m as EvaluationQuestion, n as createReoptAiClient, o as CompletionOptions, p as EvaluationInput, r as AgentInfo, s as CompletionResult, t as ReoptAiClient, u as CreditInfo, v as ImageGenerateResult, x as PartProviderMetadata, y as MessageRole } from "../client-ShqkrIQ6.js";
|
|
2
2
|
//#region src/ai/evaluator.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* json-render `experimental_composeSpec`의 `evaluate`와 같은 모양(0.21 `Experimental_CompositionEvaluator`).
|
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-CjwPB89K.js";
|
|
2
|
+
import { n as createReoptAiClient, t as ReoptAiClient } from "../client-D5ZVsy8Y.js";
|
|
3
3
|
|
|
4
4
|
//#region src/ai/evaluator.ts
|
|
5
5
|
function createBrandappEvaluator(source, options = {}) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ReoptSDKConfig } from "../config-
|
|
1
|
+
import { n as ReoptSDKConfig } from "../config-CDI6Rb8i.js";
|
|
2
2
|
import { Experimental_DecisionModelV4, Experimental_DecisionModelV4CallOptions, Experimental_DecisionModelV4Result, ImageModelV3, ImageModelV3CallOptions, LanguageModelV3, LanguageModelV3CallOptions, LanguageModelV3GenerateResult, LanguageModelV3StreamResult, ProviderV3 } from "@ai-sdk/provider";
|
|
3
3
|
//#region src/ai-provider/brandapp-language-model.d.ts
|
|
4
4
|
type BrandappLanguageModelConfig = {
|
|
@@ -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-CjwPB89K.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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createReoptAnalyticsClient, r as AnalyticsConfig, t as ReoptAnalyticsClient } from "../client-
|
|
1
|
+
import { n as createReoptAnalyticsClient, r as AnalyticsConfig, t as ReoptAnalyticsClient } from "../client-C7L3X-6K.js";
|
|
2
2
|
import { identify, pageView, setConsent, track } from "@reopt-ai/data-sdk";
|
|
3
3
|
//#region src/analytics/browser.d.ts
|
|
4
4
|
type BrandappAnalytics = {
|
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-lHWyhnKI.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.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as UserInfoClaims, n as createReoptAuthClient, r as LinkCurrentUserResult, t as ReoptAuthClient } from "../client-
|
|
1
|
+
import { i as UserInfoClaims, n as createReoptAuthClient, r as LinkCurrentUserResult, t as ReoptAuthClient } from "../client-DfsH-x4k.js";
|
|
2
2
|
//#region src/auth/session.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* 세션 쿠키 검증 — apps/id의 Better Auth `/api/auth/get-session`을 호출해
|
package/dist/auth/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as ReoptSDKConfig, t as REOPT_BASE_URLS } from "../config-
|
|
1
|
+
import { n as ReoptSDKConfig, t as REOPT_BASE_URLS } from "../config-CDI6Rb8i.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-FazBnzhg.js";
|
|
3
|
-
import { i as ClientPrivateJwk } from "../keys-B2pA8EkU.js";
|
|
4
3
|
import { T as isReoptSDKError, _ as RateLimitError, t as AuthError, v as ReoptSDKError, x as ServerError } from "../errors-D-Va8oeC.js";
|
|
5
4
|
import { AdapterFactory } from "better-auth/adapters";
|
|
5
|
+
import { ClientPrivateJwk } from "@reopt-ai/workspace-sdk/machine";
|
|
6
6
|
import { PhoneNumberOptions } from "better-auth/plugins/phone-number";
|
|
7
7
|
import { BetterAuthOptions, BetterAuthPlugin } from "better-auth";
|
|
8
8
|
//#region src/better-auth/adapter.d.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
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-
|
|
3
|
-
import { o as readClientKeyRing } from "../keys-B_R_lsyF.js";
|
|
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-CjwPB89K.js";
|
|
2
|
+
import { t as BaseHttpClient } from "../http-client-he14vKAL.js";
|
|
4
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-DGAVaUCc.js";
|
|
5
4
|
import { createAdapterFactory } from "better-auth/adapters";
|
|
6
5
|
import { createPrivateKeyJwtClientAssertionGetter } from "@better-auth/core/oauth2";
|
|
7
6
|
import { genericOAuth } from "better-auth/plugins";
|
|
7
|
+
import { readClientKeyRing } from "@reopt-ai/workspace-sdk/machine";
|
|
8
8
|
import { phoneNumber } from "better-auth/plugins/phone-number";
|
|
9
9
|
import { APIError, createAuthMiddleware, getIP } from "better-auth/api";
|
|
10
10
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-he14vKAL.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-B4pglmTS.js.map
|
|
@@ -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-CjwPB89K.js";
|
|
2
|
+
import { t as BaseHttpClient } from "./http-client-he14vKAL.js";
|
|
3
|
+
import { t as buildQuery } from "./query-BmI60Jw2.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-BFfyuoNI.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ReoptSDKConfig } from "./config-
|
|
1
|
+
import { n as ReoptSDKConfig } from "./config-CDI6Rb8i.js";
|
|
2
2
|
//#region src/files/types.d.ts
|
|
3
3
|
/** 파일 정보 */
|
|
4
4
|
type FileInfo = {
|
|
@@ -269,4 +269,4 @@ declare class ReoptFileClient {
|
|
|
269
269
|
declare function createReoptFileClient(config: ReoptSDKConfig): ReoptFileClient;
|
|
270
270
|
//#endregion
|
|
271
271
|
export { FileListQuery as a, FolderInfo as c, UpdateFolderInput as d, UploadOptions as f, FileInfo as i, FolderListQuery as l, createReoptFileClient as n, FileListResponse as o, CreateFolderInput as r, FileUsageInfo as s, ReoptFileClient as t, UpdateFileInput as u };
|
|
272
|
-
//# sourceMappingURL=client-
|
|
272
|
+
//# sourceMappingURL=client-BpTb2n0k.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ReoptSDKConfig } from "./config-
|
|
1
|
+
import { n as ReoptSDKConfig } from "./config-CDI6Rb8i.js";
|
|
2
2
|
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";
|
|
3
3
|
//#region src/cms/client.d.ts
|
|
4
4
|
/**
|
|
@@ -50,4 +50,4 @@ declare function createReoptCmsClient(config: ReoptSDKConfig): {
|
|
|
50
50
|
};
|
|
51
51
|
//#endregion
|
|
52
52
|
export { createReoptCmsClient as n, ReoptCmsClient as t };
|
|
53
|
-
//# sourceMappingURL=client-
|
|
53
|
+
//# sourceMappingURL=client-BuAtrkbd.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ReoptSDKConfig } from "./config-
|
|
1
|
+
import { n as ReoptSDKConfig } from "./config-CDI6Rb8i.js";
|
|
2
2
|
//#region src/analytics/types.d.ts
|
|
3
3
|
/** `GET /brandapp/{id}/analytics/config` — 브랜드의 reopt-data 브라우저 수집 설정. */
|
|
4
4
|
type AnalyticsConfig = {
|
|
@@ -21,4 +21,4 @@ declare class ReoptAnalyticsClient {
|
|
|
21
21
|
declare function createReoptAnalyticsClient(config: ReoptSDKConfig): ReoptAnalyticsClient;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { createReoptAnalyticsClient as n, AnalyticsConfig as r, ReoptAnalyticsClient as t };
|
|
24
|
-
//# sourceMappingURL=client-
|
|
24
|
+
//# sourceMappingURL=client-C7L3X-6K.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ReoptSDKConfig } from "./config-
|
|
1
|
+
import { n as ReoptSDKConfig } from "./config-CDI6Rb8i.js";
|
|
2
2
|
//#region src/feedback/types.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Feedback processing status. `responded` means staff have answered but the
|
|
@@ -146,4 +146,4 @@ declare class ReoptFeedbackClient {
|
|
|
146
146
|
declare function createReoptFeedbackClient(config: ReoptSDKConfig): ReoptFeedbackClient;
|
|
147
147
|
//#endregion
|
|
148
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 };
|
|
149
|
-
//# sourceMappingURL=client-
|
|
149
|
+
//# sourceMappingURL=client-CC7rcBX6.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ReoptSDKConfig } from "./config-
|
|
1
|
+
import { n as ReoptSDKConfig } from "./config-CDI6Rb8i.js";
|
|
2
2
|
//#region src/plans/types.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Brandapp Plans types.
|
|
@@ -289,4 +289,4 @@ declare class ReoptPlansClient {
|
|
|
289
289
|
declare function createReoptPlansClient(config: ReoptSDKConfig): ReoptPlansClient;
|
|
290
290
|
//#endregion
|
|
291
291
|
export { CheckoutStatus as a, MeterPricingMode as c, PlanInterval as d, PlanMeter as f, PlanRequiredTerms as h, CheckoutSession as i, Plan as l, PlanPaymentEnvironment as m, createReoptPlansClient as n, CreateCheckoutInput as o, PlanMeterTier as p, CancelSubscriptionResult as r, CurrentPlan as s, ReoptPlansClient as t, PlanBillingModel as u };
|
|
292
|
-
//# sourceMappingURL=client-
|
|
292
|
+
//# sourceMappingURL=client-CJRCG-km.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ReoptSDKConfig } from "./config-
|
|
1
|
+
import { n as ReoptSDKConfig } from "./config-CDI6Rb8i.js";
|
|
2
2
|
import { a as CreateConsentsResult, f as WithdrawConsentResult, i as CreateConsentsRequest, l as TermsListResponse, n as ConsentRecord, o as ListTermsOptions, s as TermsItem } from "./types-C69OzBn6.js";
|
|
3
3
|
//#region src/terms/client.d.ts
|
|
4
4
|
declare class ReoptTermsClient {
|
|
@@ -45,4 +45,4 @@ declare class ReoptTermsClient {
|
|
|
45
45
|
declare function createReoptTermsClient(config: ReoptSDKConfig): ReoptTermsClient;
|
|
46
46
|
//#endregion
|
|
47
47
|
export { createReoptTermsClient as n, ReoptTermsClient as t };
|
|
48
|
-
//# sourceMappingURL=client-
|
|
48
|
+
//# sourceMappingURL=client-CRaeubc_.d.ts.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-CjwPB89K.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-he14vKAL.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-CZe_S1HM.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-he14vKAL.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-CbQP3u9_.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ReoptSDKConfig } from "./config-
|
|
1
|
+
import { n as ReoptSDKConfig } from "./config-CDI6Rb8i.js";
|
|
2
2
|
//#region src/push/types.d.ts
|
|
3
3
|
/** Push provider — native token kind. */
|
|
4
4
|
type PushProvider = "fcm" | "apns";
|
|
@@ -50,4 +50,4 @@ declare class ReoptPushClient {
|
|
|
50
50
|
declare function createReoptPushClient(config: ReoptSDKConfig): ReoptPushClient;
|
|
51
51
|
//#endregion
|
|
52
52
|
export { RegisterPushTokenInput as a, UnregisterPushTokenInput as c, PushProvider as i, UnregisterPushTokenResult as l, createReoptPushClient as n, RegisterPushTokenResult as o, PushPlatform as r, RegisteredPushDevice as s, ReoptPushClient as t };
|
|
53
|
-
//# sourceMappingURL=client-
|
|
53
|
+
//# sourceMappingURL=client-CcoGEXUB.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ListRecordsQuery, C as EavAttribute, D as EavRecord, E as EavEntity, F as UpdateRecordInput, I as UpsertRecordInput, L as UpsertRecordResult, N as UpdateAttributeInput, P as UpdateEntityInput, S as DeleteWhereInput, _ as BulkUpdateItem, b as CreateEntityInput, c as InferValues, f as AttributeFilter, g as BackfillResult, h as BackfillOptions, j as PaginatedResponse, l as SchemaDef, n as ReoptSDKConfig, s as EntityDef, v as CountRecordsQuery, x as CreateRecordInput, y as CreateAttributeInput } from "./config-
|
|
1
|
+
import { A as ListRecordsQuery, C as EavAttribute, D as EavRecord, E as EavEntity, F as UpdateRecordInput, I as UpsertRecordInput, L as UpsertRecordResult, N as UpdateAttributeInput, P as UpdateEntityInput, S as DeleteWhereInput, _ as BulkUpdateItem, b as CreateEntityInput, c as InferValues, f as AttributeFilter, g as BackfillResult, h as BackfillOptions, j as PaginatedResponse, l as SchemaDef, n as ReoptSDKConfig, s as EntityDef, v as CountRecordsQuery, x as CreateRecordInput, y as CreateAttributeInput } from "./config-CDI6Rb8i.js";
|
|
2
2
|
//#region src/eav/typed-client.d.ts
|
|
3
3
|
/** EavRecord with typed values instead of Record<string, unknown> */
|
|
4
4
|
type TypedEavRecord<V> = Omit<EavRecord, "values"> & {
|
|
@@ -9,10 +9,11 @@ type AttributeName<V> = keyof V & string;
|
|
|
9
9
|
/** A filter written by attribute name — `where("name")` keeps the literal. */
|
|
10
10
|
type TypedAttributeFilter<V> = AttributeFilter<AttributeName<V>>;
|
|
11
11
|
/**
|
|
12
|
-
* A partial write. `null` clears a value (the server accepts it)
|
|
13
|
-
*
|
|
12
|
+
* A partial write. `null` clears a value (the server accepts it); `undefined`
|
|
13
|
+
* leaves it alone (dropped by JSON), so zod `.partial()` output passes as-is
|
|
14
|
+
* under `exactOptionalPropertyTypes`.
|
|
14
15
|
*/
|
|
15
|
-
type TypedPatch<V> = { [A in keyof V]?: V[A] | null; };
|
|
16
|
+
type TypedPatch<V> = { [A in keyof V]?: V[A] | null | undefined; };
|
|
16
17
|
type TypedListQuery<V> = Omit<ListRecordsQuery, "filters" | "sortBy" | "select"> & {
|
|
17
18
|
filters?: TypedAttributeFilter<V>[];
|
|
18
19
|
sortBy?: "createdAt" | "updatedAt" | AttributeName<V>;
|
|
@@ -144,4 +145,4 @@ type ReoptEavClient<S extends SchemaDef = SchemaDef> = {
|
|
|
144
145
|
declare function createReoptEavClient<S extends SchemaDef = SchemaDef>(config: ReoptSDKConfig<S>): ReoptEavClient<S>;
|
|
145
146
|
//#endregion
|
|
146
147
|
export { TypedAttributeFilter as a, TypedDeleteWhereInput as c, TypedPatch as d, TypedUpdateInput as f, EntityClient as i, TypedEavRecord as l, createReoptEavClient as n, TypedBackfillOptions as o, AttributeName as r, TypedCountQuery as s, ReoptEavClient as t, TypedListQuery as u };
|
|
147
|
-
//# sourceMappingURL=client-
|
|
148
|
+
//# sourceMappingURL=client-ChLjP8Zx.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-he14vKAL.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-D3zSBcPj.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-CjwPB89K.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-he14vKAL.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.16"}-${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-D5ZVsy8Y.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-he14vKAL.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-DU8XR4_z.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-he14vKAL.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-DeyC3NFp.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ReoptSDKConfig } from "./config-
|
|
1
|
+
import { n as ReoptSDKConfig } from "./config-CDI6Rb8i.js";
|
|
2
2
|
//#region src/auth/types.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* User-scoped auth types.
|
|
@@ -68,4 +68,4 @@ declare class ReoptAuthClient {
|
|
|
68
68
|
declare function createReoptAuthClient(config: ReoptSDKConfig): ReoptAuthClient;
|
|
69
69
|
//#endregion
|
|
70
70
|
export { UserInfoClaims as i, createReoptAuthClient as n, LinkCurrentUserResult as r, ReoptAuthClient as t };
|
|
71
|
-
//# sourceMappingURL=client-
|
|
71
|
+
//# sourceMappingURL=client-DfsH-x4k.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-he14vKAL.js";
|
|
2
|
+
import { t as buildQuery } from "./query-BmI60Jw2.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-M1yp71xP.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ReoptSDKConfig } from "./config-
|
|
1
|
+
import { n as ReoptSDKConfig } from "./config-CDI6Rb8i.js";
|
|
2
2
|
//#region src/ai/types.d.ts
|
|
3
3
|
/** 메시지 역할 */
|
|
4
4
|
type MessageRole = "system" | "user" | "assistant";
|
|
@@ -407,4 +407,4 @@ declare class ReoptAiClient {
|
|
|
407
407
|
declare function createReoptAiClient(config: ReoptSDKConfig): ReoptAiClient;
|
|
408
408
|
//#endregion
|
|
409
409
|
export { StreamEvent as C, StreamDoneData as S, ImageGenerateOptions as _, CompletionContentPart as a, ModelInfo as b, CompletionUsage as c, EvaluateOptions as d, EvaluationAnswer as f, FinishReason as g, EvaluationResult as h, ChatMessage as i, CompletionWarning as l, EvaluationQuestion as m, createReoptAiClient as n, CompletionOptions as o, EvaluationInput as p, AgentInfo as r, CompletionResult as s, ReoptAiClient as t, CreditInfo as u, ImageGenerateResult as v, PartProviderMetadata as x, MessageRole as y };
|
|
410
|
-
//# sourceMappingURL=client-
|
|
410
|
+
//# sourceMappingURL=client-ShqkrIQ6.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-he14vKAL.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-lHWyhnKI.js.map
|
package/dist/cms/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as ListTagsQuery, c as PostGroup, d as Tag, i as ListPostsQuery, l as PostSeo, n as EditorSpec, o as Post, r as ListPostGroupsQuery, s as PostDetail, t as CmsPaginatedResponse, u as PostStatus } from "../types-BXDcoJHG.js";
|
|
2
|
-
import { n as createReoptCmsClient, t as ReoptCmsClient } from "../client-
|
|
2
|
+
import { n as createReoptCmsClient, t as ReoptCmsClient } from "../client-BuAtrkbd.js";
|
|
3
3
|
//#region src/cms/helpers.d.ts
|
|
4
4
|
type SeoMetadata = {
|
|
5
5
|
title?: string;
|
package/dist/cms/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "@reopt-ai/workspace-sdk/urls";
|
|
1
2
|
//#region src/eav/types.d.ts
|
|
2
3
|
type EavDataType = "string" | "textarea" | "number" | "boolean" | "date" | "email" | "url" | "select" | "multiselect";
|
|
3
4
|
/**
|
|
@@ -361,6 +362,17 @@ declare const REOPT_BASE_URLS: {
|
|
|
361
362
|
readonly production: "https://brandapp.reopt.ai";
|
|
362
363
|
readonly development: "https://brand.local.reopt.io";
|
|
363
364
|
};
|
|
365
|
+
/**
|
|
366
|
+
* Better Auth handler (`/api/auth/*`) and CLI device-flow endpoints live on
|
|
367
|
+
* the dedicated id server, not the main API host. SDK helpers that hit OIDC
|
|
368
|
+
* (`getUserInfo`, OAuth discovery) must use these URLs.
|
|
369
|
+
*
|
|
370
|
+
* Override via `config.idBaseUrl` or the `REOPT_ID_BASE_URL` env var. If only
|
|
371
|
+
* the main host is overridden (`config.baseUrl` or `REOPT_BASE_URL`), the id
|
|
372
|
+
* host is auto-derived via {@link deriveIdFromBaseUrl} — e.g. setting
|
|
373
|
+
* `REOPT_BASE_URL=https://brand.local.reopt.io` is enough; `id.local.reopt.io` is
|
|
374
|
+
* inferred automatically.
|
|
375
|
+
*/
|
|
364
376
|
type ReoptSDKConfig<S extends SchemaDef = SchemaDef> = {
|
|
365
377
|
/**
|
|
366
378
|
* OAuth Client ID. Required for Basic Auth (client credentials). **Optional**
|
|
@@ -469,4 +481,4 @@ type ReoptSDKConfig<S extends SchemaDef = SchemaDef> = {
|
|
|
469
481
|
declare function resolveBaseUrl(config: ReoptSDKConfig): string;
|
|
470
482
|
//#endregion
|
|
471
483
|
export { ListRecordsQuery as A, EavAttribute as C, EavRecord as D, EavEntity as E, UpdateRecordInput as F, UpsertRecordInput as I, UpsertRecordResult as L, RECORDS_PAGE_LIMIT_MAX as M, UpdateAttributeInput as N, EavSchemaLinkedTo as O, UpdateEntityInput as P, DeleteWhereInput as S, EavDataType as T, BulkUpdateItem as _, DebugLogger as a, CreateEntityInput as b, InferValues as c, ATTRIBUTE_FILTER_OPERATORS as d, AttributeFilter as f, BackfillResult as g, BackfillOptions as h, DebugLevel as i, PaginatedResponse as j, EavValidation as k, SchemaDef as l, AttributeFilterOperator as m, ReoptSDKConfig as n, AttributeDef as o, AttributeFilterListValue as p, resolveBaseUrl as r, EntityDef as s, REOPT_BASE_URLS as t, ATTRIBUTE_FILTER_LIST_MAX as u, CountRecordsQuery as v, EavAttributeOption as w, CreateRecordInput as x, CreateAttributeInput as y };
|
|
472
|
-
//# sourceMappingURL=config-
|
|
484
|
+
//# sourceMappingURL=config-CDI6Rb8i.d.ts.map
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { resolveIdBaseUrl } from "@reopt-ai/workspace-sdk/urls";
|
|
2
|
+
|
|
1
3
|
//#region src/core/errors.ts
|
|
2
4
|
var ReoptSDKError = class extends Error {
|
|
3
5
|
status;
|
|
@@ -370,7 +372,7 @@ function mapHttpStatusToError(status, code, message, ctx, fieldErrors) {
|
|
|
370
372
|
|
|
371
373
|
//#endregion
|
|
372
374
|
//#region src/core/config.ts
|
|
373
|
-
const SDK_VERSION = "4.7.0-rc.
|
|
375
|
+
const SDK_VERSION = "4.7.0-rc.16";
|
|
374
376
|
/**
|
|
375
377
|
* Default API host for EAV / AI / Files / CMS / Terms. Consumers can override
|
|
376
378
|
* via `config.baseUrl` or the `REOPT_BASE_URL` env var.
|
|
@@ -386,21 +388,6 @@ const REOPT_BASE_URLS = {
|
|
|
386
388
|
production: "https://brandapp.reopt.ai",
|
|
387
389
|
development: "https://brand.local.reopt.io"
|
|
388
390
|
};
|
|
389
|
-
/**
|
|
390
|
-
* Better Auth handler (`/api/auth/*`) and CLI device-flow endpoints live on
|
|
391
|
-
* the dedicated id server, not the main API host. SDK helpers that hit OIDC
|
|
392
|
-
* (`getUserInfo`, OAuth discovery) must use these URLs.
|
|
393
|
-
*
|
|
394
|
-
* Override via `config.idBaseUrl` or the `REOPT_ID_BASE_URL` env var. If only
|
|
395
|
-
* the main host is overridden (`config.baseUrl` or `REOPT_BASE_URL`), the id
|
|
396
|
-
* host is auto-derived via {@link deriveIdFromBaseUrl} — e.g. setting
|
|
397
|
-
* `REOPT_BASE_URL=https://brand.local.reopt.io` is enough; `id.local.reopt.io` is
|
|
398
|
-
* inferred automatically.
|
|
399
|
-
*/
|
|
400
|
-
const REOPT_ID_BASE_URLS = {
|
|
401
|
-
production: "https://id.reopt.ai",
|
|
402
|
-
development: "https://id.local.reopt.io"
|
|
403
|
-
};
|
|
404
391
|
function validateConfig(config) {
|
|
405
392
|
const hasToken = !!config.token?.trim();
|
|
406
393
|
const hasAuthorizationProvider = typeof config.authorization === "function";
|
|
@@ -506,50 +493,7 @@ function resolveBaseUrl(config) {
|
|
|
506
493
|
if (envBaseUrl) return envBaseUrl;
|
|
507
494
|
return config.isProduction ?? (typeof process !== "undefined" && process.env?.NODE_ENV === "production") ? REOPT_BASE_URLS.production : REOPT_BASE_URLS.development;
|
|
508
495
|
}
|
|
509
|
-
/**
|
|
510
|
-
* Resolve the id (auth) base URL for the given SDK config. Priority:
|
|
511
|
-
*
|
|
512
|
-
* 1. `config.idBaseUrl` — explicit override
|
|
513
|
-
* 2. `REOPT_ID_BASE_URL` env var — explicit override via env
|
|
514
|
-
* 3. derived from `config.baseUrl` when set (e.g. `www.reopt.ai` →
|
|
515
|
-
* `id.reopt.ai`)
|
|
516
|
-
* 4. derived from `REOPT_BASE_URL` env var when set — single env override
|
|
517
|
-
* covers both API and auth hosts
|
|
518
|
-
* 5. default by `isProduction` / `NODE_ENV`
|
|
519
|
-
*
|
|
520
|
-
* Use this whenever the SDK calls `/api/auth/*` (OIDC userinfo, Better Auth
|
|
521
|
-
* discovery, session) — those endpoints only exist on `id.reopt.ai`.
|
|
522
|
-
*/
|
|
523
|
-
function resolveIdBaseUrl(config) {
|
|
524
|
-
if (config.idBaseUrl) return config.idBaseUrl.replace(/\/$/, "");
|
|
525
|
-
const envIdBaseUrl = readEnvUrl("REOPT_ID_BASE_URL");
|
|
526
|
-
if (envIdBaseUrl) return envIdBaseUrl;
|
|
527
|
-
if (config.baseUrl) return deriveIdFromBaseUrl(config.baseUrl);
|
|
528
|
-
const envBaseUrl = readEnvUrl("REOPT_BASE_URL");
|
|
529
|
-
if (envBaseUrl) return deriveIdFromBaseUrl(envBaseUrl);
|
|
530
|
-
return config.isProduction ?? (typeof process !== "undefined" && process.env?.NODE_ENV === "production") ? REOPT_ID_BASE_URLS.production : REOPT_ID_BASE_URLS.development;
|
|
531
|
-
}
|
|
532
|
-
/**
|
|
533
|
-
* Best-effort host transform — any reopt.{ai,io} / local.reopt.io subdomain folds to the
|
|
534
|
-
* shared id host for that environment. Custom hosts fall back to prepending
|
|
535
|
-
* `id.` (with a leading `www.` stripped).
|
|
536
|
-
*/
|
|
537
|
-
function deriveIdFromBaseUrl(baseUrl) {
|
|
538
|
-
const clean = baseUrl.replace(/\/$/, "");
|
|
539
|
-
try {
|
|
540
|
-
const url = new URL(clean);
|
|
541
|
-
const { hostname } = url;
|
|
542
|
-
if (hostname === "reopt.ai" || hostname.endsWith(".reopt.ai")) return REOPT_ID_BASE_URLS.production;
|
|
543
|
-
if (hostname === "local.reopt.io" || hostname.endsWith(".local.reopt.io")) return REOPT_ID_BASE_URLS.development;
|
|
544
|
-
if (hostname === "reopt.io" || hostname.endsWith(".reopt.io")) return "https://id.reopt.io";
|
|
545
|
-
if (hostname.startsWith("id.")) return url.origin;
|
|
546
|
-
url.hostname = `id.${hostname.replace(/^www\./, "")}`;
|
|
547
|
-
return url.origin;
|
|
548
|
-
} catch {
|
|
549
|
-
return clean;
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
496
|
|
|
553
497
|
//#endregion
|
|
554
498
|
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 };
|
|
555
|
-
//# sourceMappingURL=config-
|
|
499
|
+
//# sourceMappingURL=config-CjwPB89K.js.map
|
package/dist/eav/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
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-CDI6Rb8i.js";
|
|
2
2
|
import { c as DuplicateAuthUserError, f as LimitExceededError, n as AuthUserNotFoundError, r as AuthUserRecordExistsError } from "../errors-D-Va8oeC.js";
|
|
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-
|
|
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-ChLjP8Zx.js";
|
|
4
4
|
//#region src/eav/verify.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Runtime drift check between a deployed bundle and the live server schema
|
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-CjwPB89K.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-BFfyuoNI.js";
|
|
3
3
|
|
|
4
4
|
//#region src/eav/verify.ts
|
|
5
5
|
async function verifyEavSchema(input) {
|