@reopt-ai/brandapp-sdk 3.4.0 → 3.6.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 +62 -0
- package/README.md +2 -0
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/index.js +1 -1
- package/dist/ai-provider/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 +1 -1
- package/dist/better-auth/index.js +2 -2
- package/dist/client-A4YrHjDc.d.ts +272 -0
- package/dist/{client-D-yNxNfk.js → client-B84P9y2F.js} +2 -2
- package/dist/{client-DPmoKuR9.js → client-BFM7OGqI.js} +4 -4
- package/dist/{client-D3RHHUUW.d.ts → client-BGLDrf3N.d.ts} +12 -8
- package/dist/{client-DDw5yz_h.d.ts → client-BTS6Ewv_.d.ts} +2 -2
- package/dist/{client-BGGd_cpV.d.ts → client-CAGo56KO.d.ts} +2 -2
- package/dist/{client-B1q5P8rv.js → client-C_YUxs_X.js} +2 -2
- package/dist/{client-Beivhucf.js → client-CiCPE2MW.js} +3 -3
- package/dist/{client-BruP5_nU.d.ts → client-Ckm-i_Du.d.ts} +2 -2
- package/dist/{client-DBnK7ooQ.js → client-CxyXO_0C.js} +2 -2
- package/dist/{client-EbhUIhHq.js → client-D4Z2xj4t.js} +2 -2
- package/dist/{client-lk6wBu_0.d.ts → client-DHZ484kb.d.ts} +3 -3
- package/dist/{client-D0eBxh8j.d.ts → client-DPbXH8tr.d.ts} +2 -2
- package/dist/{client-DsdakibF.js → client-DVydvzc2.js} +3 -3
- package/dist/{client-D6gs61w8.d.ts → client-DfEeaOsQ.d.ts} +2 -2
- package/dist/{client-B9QHVhdM.js → client-WP3Xsxri.js} +11 -7
- package/dist/client-m29R8F0R.js +273 -0
- package/dist/{client-Dxg8_DIH.d.ts → client-yBQen4Yi.d.ts} +2 -2
- package/dist/cms/index.d.ts +1 -1
- package/dist/cms/index.js +1 -1
- package/dist/{config-Cw0a3-C8.js → config-BV8Fn7Uo.js} +2 -2
- package/dist/{config-CRytOPPl.d.ts → config-C7WQtC3l.d.ts} +3 -1
- package/dist/dev/index.d.ts +1 -1
- package/dist/dev/index.js +351 -6
- 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 +2 -2
- package/dist/files/index.js +1 -1
- package/dist/{http-client-QKUvvirs.js → http-client-6XUgrg3k.js} +2 -2
- package/dist/{index-Z6OGcurJ.d.ts → index-CvNJ8zp1.d.ts} +11 -11
- package/dist/{index-DrVaKfhs.d.ts → index-DV_OWwx5.d.ts} +16 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +11 -11
- package/dist/logout/index.d.ts +1 -1
- package/dist/logout/index.js +1 -1
- 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-BvbCiGWb.js → query-C98fDfVW.js} +2 -2
- package/dist/react/hooks.d.ts +64 -5
- package/dist/react/hooks.js +121 -3
- package/dist/terms/index.d.ts +2 -2
- package/dist/terms/index.js +1 -1
- package/dist/testing/index.d.ts +2 -2
- package/dist/{types-BrghN2rJ.d.ts → types-C69OzBn6.d.ts} +2 -2
- package/docs/api-reference.md +41 -2
- package/docs/errors.md +19 -0
- package/docs/files.md +165 -7
- package/package.json +2 -2
- package/dist/client-BJcy1V1a.js +0 -140
- package/dist/client-p49ol9pg.d.ts +0 -124
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,68 @@ This project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [3.6.0] — 2026-08-08
|
|
11
|
+
|
|
12
|
+
EAV 목록에서 필요한 값만 받을 수 있는 응답 projection을 추가했다. 기존 호출은
|
|
13
|
+
모든 값을 그대로 받으므로 backward-compatible(minor)이다.
|
|
14
|
+
|
|
15
|
+
### Added — EAV records projection
|
|
16
|
+
|
|
17
|
+
- **`sdk.eav.records.list(entityId, { select })`** — attribute ID 배열을 넘기면 각
|
|
18
|
+
`record.values`에 선택한 값만 포함한다. pagination·filter·sort 결과는 동일하고,
|
|
19
|
+
continuation token이나 큰 본문처럼 목록에 불필요한 값을 네트워크 응답에서 제외할 수 있다.
|
|
20
|
+
- **`records.listAll` / typed entity client / 사용자 레코드 목록**에도 같은 `select` 옵션이
|
|
21
|
+
전달된다.
|
|
22
|
+
- production API와 SDK dev server가 같은 projection 및 입력 검증 계약을 제공한다.
|
|
23
|
+
|
|
24
|
+
## [3.5.0] — 2026-08-02
|
|
25
|
+
|
|
26
|
+
파일 매니저를 만들 수 있게 됐다 — 폴더 계층, rename/move, 텍스트 미리보기,
|
|
27
|
+
저장공간 미터가 추가됐다. 전부 backward-compatible(minor).
|
|
28
|
+
커넥터 기반 파일 매니저 UI(`@reopt-ai/opt-filemanager`)가 첫 소비자다.
|
|
29
|
+
|
|
30
|
+
### Added — 폴더 (`sdk.files.*Folder*`)
|
|
31
|
+
|
|
32
|
+
- **`sdk.files.listFolders({ parentId? })`** — 직속 자식 폴더 목록 (미지정/`null` = 루트).
|
|
33
|
+
`FolderInfo`: `{ id, name, parentId, childCount, fileCount, createdAt, updatedAt }`.
|
|
34
|
+
- **`sdk.files.createFolder({ name, parentId? })`** — 같은 위치 동명 폴더는 409 `CONFLICT`.
|
|
35
|
+
- **`sdk.files.updateFolder(folderId, { name?, parentId? })`** — rename + move 겸용.
|
|
36
|
+
자기 자신/자손으로의 이동은 400 (cycle 방지).
|
|
37
|
+
- **`sdk.files.deleteFolder(folderId)`** — 비어있지 않으면 409 `FOLDER_NOT_EMPTY`
|
|
38
|
+
(메시지에 남은 파일/폴더 수).
|
|
39
|
+
|
|
40
|
+
### Added — 파일 rename/move·내용 읽기·사용량
|
|
41
|
+
|
|
42
|
+
- **`sdk.files.update(fileId, { name?, folderId? })`** — 이름 변경(+`pathname` 불변)과
|
|
43
|
+
폴더 이동(`folderId: null` = 루트로).
|
|
44
|
+
- **`sdk.files.readContent(fileId)`** — 텍스트 파일 내용 읽기 (미리보기용).
|
|
45
|
+
텍스트 계열만 — 그 외 415 `UNSUPPORTED_CONTENT_TYPE`, 1MB 초과 413 `CONTENT_TOO_LARGE`.
|
|
46
|
+
- **`sdk.files.usage()`** — `{ usedBytes, limitBytes, fileCount }`. 402 `STORAGE_LIMIT`
|
|
47
|
+
판정과 동일 소스(워크스페이스 단위)라 미터와 실제 거부가 정합. `limitBytes: null` = 무제한.
|
|
48
|
+
- **`FileInfo.folderId`** (additive) / **`FileListQuery.folderId`**(미지정=전체,
|
|
49
|
+
`null`=루트만) / **`UploadOptions.folderId`**.
|
|
50
|
+
|
|
51
|
+
### Added — React hooks
|
|
52
|
+
|
|
53
|
+
- `useFolders` / `useCreateFolder` / `useUpdateFolder` / `useDeleteFolder` /
|
|
54
|
+
`useUpdateFile` / `useFileUsage`. 파일 mutation은 folders/usage 캐시까지 무효화.
|
|
55
|
+
- `reoptQueryKeys.filesPrefix/folders/foldersPrefix/fileUsage` 추가.
|
|
56
|
+
|
|
57
|
+
### Fixed
|
|
58
|
+
|
|
59
|
+
- **`contentType: "image/*"` 와일드카드가 실제로 동작** — 문서는 와일드카드를
|
|
60
|
+
광고했지만 서버가 정확 일치만 지원해 조용히 0건을 반환했다. 서버가 prefix
|
|
61
|
+
매치를 구현했고(구버전 서버는 여전히 정확 일치), dev 서버도 패리티.
|
|
62
|
+
- **파일 mutation 훅의 목록 캐시 무효화 누락** — `useUploadFile`/`useDeleteFile`이
|
|
63
|
+
trailing `undefined`가 붙은 키로 invalidate해 query 객체로 조회된 목록
|
|
64
|
+
(`useFiles(sdk, { … })`)이 갱신되지 않던 것을 length-3 prefix 키로 수정.
|
|
65
|
+
|
|
66
|
+
### Dev server
|
|
67
|
+
|
|
68
|
+
- `reopt brandapp dev` 인메모리 서버에 위 엔드포인트 전부 구현 (folders CRUD,
|
|
69
|
+
file PATCH/content/usage, folderId·contentType 와일드카드 필터). usage는
|
|
70
|
+
인메모리 파일 크기 합산(`limitBytes: null`).
|
|
71
|
+
|
|
10
72
|
## [3.4.0] — 2026-07-27
|
|
11
73
|
|
|
12
74
|
구독 생애주기를 **서버에서** 따라갈 수 있게 됐다 — 웹훅 4종과 실 결제 해지 결과가
|
package/README.md
CHANGED
|
@@ -229,6 +229,8 @@ const sdk = getReoptSDK();
|
|
|
229
229
|
// Iterate all records across pages
|
|
230
230
|
for await (const record of sdk.eav.records.listAll("entity-id", {
|
|
231
231
|
limit: 100,
|
|
232
|
+
// Optional: return only these attribute IDs in record.values
|
|
233
|
+
select: [titleAttributeId, statusAttributeId],
|
|
232
234
|
})) {
|
|
233
235
|
console.log(record.values);
|
|
234
236
|
}
|
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-DPbXH8tr.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 { A as mapHttpStatusToError, i as resolveBaseUrl, n as SDK_VERSION, o as validateConfig, r as assertBrowserSafe } from "../config-
|
|
1
|
+
import { A as mapHttpStatusToError, i as resolveBaseUrl, n as SDK_VERSION, o as validateConfig, r as assertBrowserSafe } from "../config-BV8Fn7Uo.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";
|
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-yBQen4Yi.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,4 +1,4 @@
|
|
|
1
|
-
import { n as ReoptSDKConfig, t as REOPT_BASE_URLS } from "../config-
|
|
1
|
+
import { n as ReoptSDKConfig, t as REOPT_BASE_URLS } from "../config-C7WQtC3l.js";
|
|
2
2
|
import { i as REOPT_PROVIDER_ID, n as AdapterRequestBody, r as REOPT_DEFAULT_SCOPES, t as AdapterOperation } from "../types-B-SMkH6s.js";
|
|
3
3
|
import { _ as ReoptSDKError, b as ServerError, g as RateLimitError, t as AuthError, w as isReoptSDKError } from "../errors-CRCcErNC.js";
|
|
4
4
|
import { AdapterFactory } from "better-auth/adapters";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ServerError, D as isReoptSDKError, a as resolveIdBaseUrl, b as RateLimitError, s as AuthError, t as REOPT_BASE_URLS, x as ReoptSDKError } from "../config-
|
|
2
|
-
import { t as BaseHttpClient } from "../http-client-
|
|
1
|
+
import { C as ServerError, D as isReoptSDKError, a as resolveIdBaseUrl, b as RateLimitError, s as AuthError, t as REOPT_BASE_URLS, x as ReoptSDKError } from "../config-BV8Fn7Uo.js";
|
|
2
|
+
import { t as BaseHttpClient } from "../http-client-6XUgrg3k.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";
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { n as ReoptSDKConfig } from "./config-C7WQtC3l.js";
|
|
2
|
+
//#region src/files/types.d.ts
|
|
3
|
+
/** 파일 정보 */
|
|
4
|
+
type FileInfo = {
|
|
5
|
+
/** 파일 ID */
|
|
6
|
+
id: string;
|
|
7
|
+
/** 파일명 */
|
|
8
|
+
name: string;
|
|
9
|
+
/** 파일 URL (Vercel Blob) */
|
|
10
|
+
url: string | null;
|
|
11
|
+
/** 파일 크기 (bytes) */
|
|
12
|
+
size: number;
|
|
13
|
+
/** MIME 타입 */
|
|
14
|
+
contentType: string | null;
|
|
15
|
+
/** 저장 경로 */
|
|
16
|
+
pathname: string;
|
|
17
|
+
/** 소속 폴더 ID — 루트(폴더 밖)면 null. 서버 1.x(폴더 도입 전) 응답엔 없을 수 있다. */
|
|
18
|
+
folderId?: string | null;
|
|
19
|
+
/** 생성일 (ISO 8601) */
|
|
20
|
+
createdAt: string;
|
|
21
|
+
/** 수정일 (ISO 8601) */
|
|
22
|
+
updatedAt: string;
|
|
23
|
+
};
|
|
24
|
+
/** 파일 목록 조회 쿼리 */
|
|
25
|
+
type FileListQuery = {
|
|
26
|
+
/** 페이지 번호 (기본 1) */
|
|
27
|
+
page?: number;
|
|
28
|
+
/** 페이지 당 항목 수 (기본 20) */
|
|
29
|
+
limit?: number;
|
|
30
|
+
/** MIME 타입 필터 (e.g. "image/png", 와일드카드 "image/*") */
|
|
31
|
+
contentType?: string;
|
|
32
|
+
/**
|
|
33
|
+
* 폴더 필터 — 미지정이면 전체(폴더 무시, 하위 호환), `null`이면 루트(폴더
|
|
34
|
+
* 미소속)만, 폴더 ID면 해당 폴더 직속 파일만.
|
|
35
|
+
*/
|
|
36
|
+
folderId?: string | null;
|
|
37
|
+
/** 정렬 기준 */
|
|
38
|
+
sortBy?: "createdAt" | "name" | "size";
|
|
39
|
+
/** 정렬 순서 */
|
|
40
|
+
sortOrder?: "asc" | "desc";
|
|
41
|
+
};
|
|
42
|
+
/** 파일 목록 응답 */
|
|
43
|
+
type FileListResponse = {
|
|
44
|
+
data: FileInfo[];
|
|
45
|
+
meta: {
|
|
46
|
+
page: number;
|
|
47
|
+
limit: number;
|
|
48
|
+
total: number;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
/** 파일 업로드 옵션 */
|
|
52
|
+
type UploadOptions = {
|
|
53
|
+
/** 파일명 (미지정 시 원본 파일명 또는 자동 생성) */
|
|
54
|
+
name?: string;
|
|
55
|
+
/** MIME 타입 (미지정 시 자동 감지) */
|
|
56
|
+
contentType?: string;
|
|
57
|
+
/** 업로드할 폴더 ID (미지정 시 루트) */
|
|
58
|
+
folderId?: string;
|
|
59
|
+
/** 외부 AbortSignal — 업로드 중도 취소용. SDK 타임아웃과 병합됨. */
|
|
60
|
+
signal?: AbortSignal;
|
|
61
|
+
/** 이 호출에만 적용할 타임아웃 (ms). 미지정 시 SDK 기본값. */
|
|
62
|
+
timeout?: number;
|
|
63
|
+
};
|
|
64
|
+
/** 파일 수정 입력 — rename + move (최소 한 필드 필요) */
|
|
65
|
+
type UpdateFileInput = {
|
|
66
|
+
/** 새 파일명 (표시명만 변경 — 저장 경로 pathname은 불변) */
|
|
67
|
+
name?: string;
|
|
68
|
+
/** 이동할 폴더 ID — null이면 루트(폴더 밖)로 이동 */
|
|
69
|
+
folderId?: string | null;
|
|
70
|
+
};
|
|
71
|
+
/** 폴더 정보 */
|
|
72
|
+
type FolderInfo = {
|
|
73
|
+
/** 폴더 ID */
|
|
74
|
+
id: string;
|
|
75
|
+
/** 폴더명 */
|
|
76
|
+
name: string;
|
|
77
|
+
/** 부모 폴더 ID (루트면 null) */
|
|
78
|
+
parentId: string | null;
|
|
79
|
+
/** 직속 하위 폴더 수 */
|
|
80
|
+
childCount: number;
|
|
81
|
+
/** 직속 파일 수 */
|
|
82
|
+
fileCount: number;
|
|
83
|
+
/** 생성일 (ISO 8601) */
|
|
84
|
+
createdAt: string;
|
|
85
|
+
/** 수정일 (ISO 8601) */
|
|
86
|
+
updatedAt: string;
|
|
87
|
+
};
|
|
88
|
+
/** 폴더 목록 조회 쿼리 */
|
|
89
|
+
type FolderListQuery = {
|
|
90
|
+
/** 부모 폴더 ID — 미지정 또는 null이면 루트의 직속 자식 폴더 */
|
|
91
|
+
parentId?: string | null;
|
|
92
|
+
};
|
|
93
|
+
/** 폴더 생성 입력 */
|
|
94
|
+
type CreateFolderInput = {
|
|
95
|
+
name: string;
|
|
96
|
+
/** 부모 폴더 ID (미지정/null = 루트) */
|
|
97
|
+
parentId?: string | null;
|
|
98
|
+
};
|
|
99
|
+
/** 폴더 수정 입력 — rename + move (최소 한 필드 필요) */
|
|
100
|
+
type UpdateFolderInput = {
|
|
101
|
+
name?: string;
|
|
102
|
+
/** 이동할 부모 폴더 ID — null이면 루트로 이동. 자기 자신/자손으로의 이동은 400. */
|
|
103
|
+
parentId?: string | null;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* 저장공간 사용량. `usedBytes`/`limitBytes`는 워크스페이스 단위(한도 판정과 동일
|
|
107
|
+
* 소스 — 초과 업로드 402 STORAGE_LIMIT과 정합), `fileCount`는 이 brandapp 스코프.
|
|
108
|
+
*/
|
|
109
|
+
type FileUsageInfo = {
|
|
110
|
+
/** 워크스페이스 전체 사용량 (bytes) */
|
|
111
|
+
usedBytes: number;
|
|
112
|
+
/** 플랜 스토리지 한도 (bytes) — null이면 무제한 */
|
|
113
|
+
limitBytes: number | null;
|
|
114
|
+
/** 이 brandapp 파일 수 */
|
|
115
|
+
fileCount: number;
|
|
116
|
+
};
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region src/files/client.d.ts
|
|
119
|
+
declare class ReoptFileClient {
|
|
120
|
+
private readonly http;
|
|
121
|
+
/** 폴더 계열은 형제 리소스(/folders) — 파일과 같은 인증/에러 계약을 공유 */
|
|
122
|
+
private readonly folderHttp;
|
|
123
|
+
private readonly timeout;
|
|
124
|
+
constructor(config: ReoptSDKConfig);
|
|
125
|
+
/**
|
|
126
|
+
* 파일 목록 조회
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* ```ts
|
|
130
|
+
* const { data: files, meta } = await sdk.files.list({
|
|
131
|
+
* page: 1,
|
|
132
|
+
* limit: 20,
|
|
133
|
+
* contentType: "image/*",
|
|
134
|
+
* sortBy: "createdAt",
|
|
135
|
+
* sortOrder: "desc",
|
|
136
|
+
* });
|
|
137
|
+
* console.log(`Total: ${meta.total}`);
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
list(query?: FileListQuery): Promise<FileListResponse>;
|
|
141
|
+
/**
|
|
142
|
+
* 단일 파일 조회
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* ```ts
|
|
146
|
+
* const file = await sdk.files.get("file-uuid");
|
|
147
|
+
* console.log(file.name, file.url);
|
|
148
|
+
* ```
|
|
149
|
+
*/
|
|
150
|
+
get(fileId: string): Promise<FileInfo>;
|
|
151
|
+
/**
|
|
152
|
+
* 파일 수정 — 이름 변경(rename) + 폴더 이동(move)
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* ```ts
|
|
156
|
+
* await sdk.files.update(fileId, { name: "renamed.png" });
|
|
157
|
+
* await sdk.files.update(fileId, { folderId }); // 폴더로 이동
|
|
158
|
+
* await sdk.files.update(fileId, { folderId: null }); // 루트로 이동
|
|
159
|
+
* ```
|
|
160
|
+
*/
|
|
161
|
+
update(fileId: string, input: UpdateFileInput): Promise<FileInfo>;
|
|
162
|
+
/**
|
|
163
|
+
* 텍스트 파일 내용 읽기 (미리보기용)
|
|
164
|
+
*
|
|
165
|
+
* 텍스트 계열(`text/*`, `application/json` 등)만 지원 — 그 외는 415
|
|
166
|
+
* (`UNSUPPORTED_CONTENT_TYPE`), 1MB 초과는 413 (`CONTENT_TOO_LARGE`).
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
* ```ts
|
|
170
|
+
* const text = await sdk.files.readContent(fileId);
|
|
171
|
+
* ```
|
|
172
|
+
*/
|
|
173
|
+
readContent(fileId: string, options?: {
|
|
174
|
+
signal?: AbortSignal;
|
|
175
|
+
timeout?: number;
|
|
176
|
+
}): Promise<string>;
|
|
177
|
+
/**
|
|
178
|
+
* 저장공간 사용량 조회 — 사용량 미터·"한도 임박" 경고용
|
|
179
|
+
*
|
|
180
|
+
* `usedBytes`/`limitBytes`는 워크스페이스 단위(초과 업로드 402
|
|
181
|
+
* `STORAGE_LIMIT` 판정과 동일 소스), `fileCount`는 이 brandapp 스코프.
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```ts
|
|
185
|
+
* const { usedBytes, limitBytes } = await sdk.files.usage();
|
|
186
|
+
* if (limitBytes != null && usedBytes / limitBytes > 0.9) warnAlmostFull();
|
|
187
|
+
* ```
|
|
188
|
+
*/
|
|
189
|
+
usage(): Promise<FileUsageInfo>;
|
|
190
|
+
/**
|
|
191
|
+
* 직속 자식 폴더 목록 조회
|
|
192
|
+
*
|
|
193
|
+
* @example
|
|
194
|
+
* ```ts
|
|
195
|
+
* const rootFolders = await sdk.files.listFolders();
|
|
196
|
+
* const children = await sdk.files.listFolders({ parentId: folder.id });
|
|
197
|
+
* ```
|
|
198
|
+
*/
|
|
199
|
+
listFolders(query?: FolderListQuery): Promise<FolderInfo[]>;
|
|
200
|
+
/**
|
|
201
|
+
* 폴더 생성
|
|
202
|
+
*
|
|
203
|
+
* @example
|
|
204
|
+
* ```ts
|
|
205
|
+
* const folder = await sdk.files.createFolder({ name: "invoices" });
|
|
206
|
+
* const child = await sdk.files.createFolder({ name: "2026", parentId: folder.id });
|
|
207
|
+
* ```
|
|
208
|
+
*/
|
|
209
|
+
createFolder(input: CreateFolderInput): Promise<FolderInfo>;
|
|
210
|
+
/**
|
|
211
|
+
* 폴더 수정 — 이름 변경(rename) + 이동(move)
|
|
212
|
+
*
|
|
213
|
+
* 자기 자신/자손으로의 이동은 400으로 거부된다 (cycle 방지).
|
|
214
|
+
*
|
|
215
|
+
* @example
|
|
216
|
+
* ```ts
|
|
217
|
+
* await sdk.files.updateFolder(folderId, { name: "archive" });
|
|
218
|
+
* await sdk.files.updateFolder(folderId, { parentId: otherFolderId });
|
|
219
|
+
* ```
|
|
220
|
+
*/
|
|
221
|
+
updateFolder(folderId: string, input: UpdateFolderInput): Promise<FolderInfo>;
|
|
222
|
+
/**
|
|
223
|
+
* 폴더 삭제 — 비어있어야 한다 (아니면 409 `FOLDER_NOT_EMPTY`)
|
|
224
|
+
*
|
|
225
|
+
* @example
|
|
226
|
+
* ```ts
|
|
227
|
+
* await sdk.files.deleteFolder(folderId);
|
|
228
|
+
* ```
|
|
229
|
+
*/
|
|
230
|
+
deleteFolder(folderId: string): Promise<void>;
|
|
231
|
+
/**
|
|
232
|
+
* 파일 삭제
|
|
233
|
+
*
|
|
234
|
+
* @example
|
|
235
|
+
* ```ts
|
|
236
|
+
* await sdk.files.delete("file-uuid");
|
|
237
|
+
* ```
|
|
238
|
+
*/
|
|
239
|
+
delete(fileId: string): Promise<void>;
|
|
240
|
+
/**
|
|
241
|
+
* 파일 업로드
|
|
242
|
+
*
|
|
243
|
+
* FormData(multipart)로 파일을 전송합니다.
|
|
244
|
+
* BaseHttpClient는 JSON 전용이므로 globalThis.fetch를 직접 사용합니다.
|
|
245
|
+
*
|
|
246
|
+
* TODO(files): 업로드 진행률(onProgress) 미지원 — fetch 단일 요청이라 진행
|
|
247
|
+
* 이벤트가 없다. XHR 기반 onProgress 또는 presigned 2-step 업로드(10MB 상한
|
|
248
|
+
* 완화 동반)는 서버 계약 변경이 필요해 별도 RFC로 다룬다.
|
|
249
|
+
*
|
|
250
|
+
* @example
|
|
251
|
+
* ```ts
|
|
252
|
+
* // Blob 업로드
|
|
253
|
+
* const blob = new Blob(["hello"], { type: "text/plain" });
|
|
254
|
+
* const file = await sdk.files.upload(blob, { name: "hello.txt" });
|
|
255
|
+
*
|
|
256
|
+
* // File 업로드 (브라우저)
|
|
257
|
+
* const file = await sdk.files.upload(inputEl.files[0]);
|
|
258
|
+
*
|
|
259
|
+
* // Buffer 업로드 (Node.js)
|
|
260
|
+
* const buf = fs.readFileSync("image.png");
|
|
261
|
+
* const file = await sdk.files.upload(buf, {
|
|
262
|
+
* name: "image.png",
|
|
263
|
+
* contentType: "image/png",
|
|
264
|
+
* });
|
|
265
|
+
* ```
|
|
266
|
+
*/
|
|
267
|
+
upload(file: Blob | Uint8Array | File, options?: UploadOptions): Promise<FileInfo>;
|
|
268
|
+
}
|
|
269
|
+
declare function createReoptFileClient(config: ReoptSDKConfig): ReoptFileClient;
|
|
270
|
+
//#endregion
|
|
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-A4YrHjDc.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-6XUgrg3k.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-B84P9y2F.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as mapHttpStatusToError, n as SDK_VERSION, o as validateConfig, x as ReoptSDKError } from "./config-
|
|
1
|
+
import { A as mapHttpStatusToError, n as SDK_VERSION, o as validateConfig, x as ReoptSDKError } from "./config-BV8Fn7Uo.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-6XUgrg3k.js";
|
|
4
4
|
import { n as parseSSEStream } from "./sse-parser-FMjxM7sY.js";
|
|
5
5
|
|
|
6
6
|
//#region src/ai/client.ts
|
|
@@ -224,7 +224,7 @@ var ReoptAiClient = class {
|
|
|
224
224
|
}
|
|
225
225
|
async fetchSSE(options) {
|
|
226
226
|
const url = `${this.http.requestBaseUrl}/chat/completions`;
|
|
227
|
-
const requestId = globalThis.crypto?.randomUUID?.() ?? `sdk-${"3.
|
|
227
|
+
const requestId = globalThis.crypto?.randomUUID?.() ?? `sdk-${"3.6.0"}-${url.length}`;
|
|
228
228
|
const ctx = {
|
|
229
229
|
method: "POST",
|
|
230
230
|
url,
|
|
@@ -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-BFM7OGqI.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ReoptSDKConfig } from "./config-
|
|
1
|
+
import { n as ReoptSDKConfig } from "./config-C7WQtC3l.js";
|
|
2
2
|
//#region src/plans/types.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Brandapp Plans types.
|
|
@@ -43,7 +43,7 @@ type PlanMeter = {
|
|
|
43
43
|
type PlanRequiredTerms = {
|
|
44
44
|
id: string;
|
|
45
45
|
title: string;
|
|
46
|
-
/** Prisma `
|
|
46
|
+
/** Prisma `BrandTermsType` (termsOfService/privacyPolicy/marketingConsent/custom). */
|
|
47
47
|
type: string;
|
|
48
48
|
};
|
|
49
49
|
type Plan = {
|
|
@@ -171,13 +171,17 @@ declare class ReoptPlansClient {
|
|
|
171
171
|
/**
|
|
172
172
|
* Start a hosted checkout to subscribe the current customer (identified by
|
|
173
173
|
* `accessToken`) to `input.planId`, then redirect the browser to the returned
|
|
174
|
-
* `checkoutUrl`.
|
|
175
|
-
*
|
|
174
|
+
* `checkoutUrl`. That URL is an order-review page on id.reopt.ai showing the
|
|
175
|
+
* server-truth plan details (price, features, renewal terms) and collecting
|
|
176
|
+
* any required-terms consent **before** payment, then returning to your
|
|
176
177
|
* `successUrl` / `cancelUrl`.
|
|
177
178
|
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
179
|
+
* Missing required-terms consent no longer fails this call — consent is
|
|
180
|
+
* collected on the hosted order-review page. Pre-collecting via `sdk.terms`
|
|
181
|
+
* still works (the page skips already-consented terms), and
|
|
182
|
+
* `RequiredTermsError` remains for backward compatibility with older
|
|
183
|
+
* servers.
|
|
184
|
+
*
|
|
181
185
|
* @throws {ReoptSDKError} `LIVE_MODE_UNSUPPORTED` (409) when the Brandapp is
|
|
182
186
|
* configured for live **Toss** payments and the plan is priced (use the
|
|
183
187
|
* brandfront checkout). Live Paddle is supported since 3.4.
|
|
@@ -204,4 +208,4 @@ declare class ReoptPlansClient {
|
|
|
204
208
|
declare function createReoptPlansClient(config: ReoptSDKConfig): ReoptPlansClient;
|
|
205
209
|
//#endregion
|
|
206
210
|
export { CheckoutStatus as a, MeterPricingMode as c, PlanInterval as d, PlanMeter as f, CheckoutSession as i, Plan as l, PlanRequiredTerms as m, createReoptPlansClient as n, CreateCheckoutInput as o, PlanMeterTier as p, CancelSubscriptionResult as r, CurrentPlan as s, ReoptPlansClient as t, PlanBillingModel as u };
|
|
207
|
-
//# sourceMappingURL=client-
|
|
211
|
+
//# sourceMappingURL=client-BGLDrf3N.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ReoptSDKConfig } from "./config-
|
|
1
|
+
import { n as ReoptSDKConfig } from "./config-C7WQtC3l.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-BTS6Ewv_.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as UpdateEntityInput, C as EavEntity, D as ListRecordsQuery, M as UpsertRecordInput, N as UpsertRecordResult, O as PaginatedResponse, _ as CreateEntityInput, b as EavAttribute, c as InferValues, f as BackfillOptions, g as CreateAttributeInput, h as CountRecordsQuery, j as UpdateRecordInput, k as UpdateAttributeInput, l as SchemaDef, m as BulkUpdateItem, n as ReoptSDKConfig, p as BackfillResult, s as EntityDef, u as AttributeFilter, v as CreateRecordInput, w as EavRecord, y as DeleteWhereInput } from "./config-
|
|
1
|
+
import { A as UpdateEntityInput, C as EavEntity, D as ListRecordsQuery, M as UpsertRecordInput, N as UpsertRecordResult, O as PaginatedResponse, _ as CreateEntityInput, b as EavAttribute, c as InferValues, f as BackfillOptions, g as CreateAttributeInput, h as CountRecordsQuery, j as UpdateRecordInput, k as UpdateAttributeInput, l as SchemaDef, m as BulkUpdateItem, n as ReoptSDKConfig, p as BackfillResult, s as EntityDef, u as AttributeFilter, v as CreateRecordInput, w as EavRecord, y as DeleteWhereInput } from "./config-C7WQtC3l.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"> & {
|
|
@@ -100,4 +100,4 @@ type ReoptEavClient<S extends SchemaDef = SchemaDef> = {
|
|
|
100
100
|
declare function createReoptEavClient<S extends SchemaDef = SchemaDef>(config: ReoptSDKConfig<S>): ReoptEavClient<S>;
|
|
101
101
|
//#endregion
|
|
102
102
|
export { TypedEavRecord as i, createReoptEavClient as n, EntityClient as r, ReoptEavClient as t };
|
|
103
|
-
//# sourceMappingURL=client-
|
|
103
|
+
//# sourceMappingURL=client-CAGo56KO.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-6XUgrg3k.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-C_YUxs_X.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-6XUgrg3k.js";
|
|
2
|
+
import { t as buildQuery } from "./query-C98fDfVW.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-CiCPE2MW.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ReoptSDKConfig } from "./config-
|
|
1
|
+
import { n as ReoptSDKConfig } from "./config-C7WQtC3l.js";
|
|
2
2
|
//#region src/feedback/types.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Feedback processing status. `reopened` means the customer replied after the
|
|
@@ -144,4 +144,4 @@ declare class ReoptFeedbackClient {
|
|
|
144
144
|
declare function createReoptFeedbackClient(config: ReoptSDKConfig): ReoptFeedbackClient;
|
|
145
145
|
//#endregion
|
|
146
146
|
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-
|
|
147
|
+
//# sourceMappingURL=client-Ckm-i_Du.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-6XUgrg3k.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-CxyXO_0C.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-6XUgrg3k.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-D4Z2xj4t.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ReoptSDKConfig } from "./config-
|
|
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-
|
|
1
|
+
import { n as ReoptSDKConfig } from "./config-C7WQtC3l.js";
|
|
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 {
|
|
5
5
|
private readonly http;
|
|
@@ -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-DHZ484kb.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ReoptSDKConfig } from "./config-
|
|
1
|
+
import { n as ReoptSDKConfig } from "./config-C7WQtC3l.js";
|
|
2
2
|
//#region src/ai/types.d.ts
|
|
3
3
|
/** 메시지 역할 */
|
|
4
4
|
type MessageRole = "system" | "user" | "assistant";
|
|
@@ -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-DPbXH8tr.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-6XUgrg3k.js";
|
|
2
|
+
import { t as buildQuery } from "./query-C98fDfVW.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-DVydvzc2.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ReoptSDKConfig } from "./config-
|
|
1
|
+
import { n as ReoptSDKConfig } from "./config-C7WQtC3l.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-DfEeaOsQ.d.ts.map
|