@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
|
@@ -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/plans/client.ts
|
|
4
4
|
function unwrap(body) {
|
|
@@ -32,13 +32,17 @@ var ReoptPlansClient = class {
|
|
|
32
32
|
/**
|
|
33
33
|
* Start a hosted checkout to subscribe the current customer (identified by
|
|
34
34
|
* `accessToken`) to `input.planId`, then redirect the browser to the returned
|
|
35
|
-
* `checkoutUrl`.
|
|
36
|
-
*
|
|
35
|
+
* `checkoutUrl`. That URL is an order-review page on id.reopt.ai showing the
|
|
36
|
+
* server-truth plan details (price, features, renewal terms) and collecting
|
|
37
|
+
* any required-terms consent **before** payment, then returning to your
|
|
37
38
|
* `successUrl` / `cancelUrl`.
|
|
38
39
|
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
40
|
+
* Missing required-terms consent no longer fails this call — consent is
|
|
41
|
+
* collected on the hosted order-review page. Pre-collecting via `sdk.terms`
|
|
42
|
+
* still works (the page skips already-consented terms), and
|
|
43
|
+
* `RequiredTermsError` remains for backward compatibility with older
|
|
44
|
+
* servers.
|
|
45
|
+
*
|
|
42
46
|
* @throws {ReoptSDKError} `LIVE_MODE_UNSUPPORTED` (409) when the Brandapp is
|
|
43
47
|
* configured for live **Toss** payments and the plan is priced (use the
|
|
44
48
|
* brandfront checkout). Live Paddle is supported since 3.4.
|
|
@@ -74,4 +78,4 @@ function createReoptPlansClient(config) {
|
|
|
74
78
|
|
|
75
79
|
//#endregion
|
|
76
80
|
export { createReoptPlansClient as n, ReoptPlansClient as t };
|
|
77
|
-
//# sourceMappingURL=client-
|
|
81
|
+
//# sourceMappingURL=client-WP3Xsxri.js.map
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { A as mapHttpStatusToError, n as SDK_VERSION, o as validateConfig, x as ReoptSDKError } from "./config-BV8Fn7Uo.js";
|
|
2
|
+
import { t as createManagedAbort } from "./abort--nOBFN4M.js";
|
|
3
|
+
import { n as parseFieldErrors, t as BaseHttpClient } from "./http-client-6XUgrg3k.js";
|
|
4
|
+
|
|
5
|
+
//#region src/files/client.ts
|
|
6
|
+
var ReoptFileClient = class {
|
|
7
|
+
http;
|
|
8
|
+
/** 폴더 계열은 형제 리소스(/folders) — 파일과 같은 인증/에러 계약을 공유 */
|
|
9
|
+
folderHttp;
|
|
10
|
+
timeout;
|
|
11
|
+
constructor(config) {
|
|
12
|
+
validateConfig(config);
|
|
13
|
+
const pathPrefix = `/api/v1/brandapp/${config.brandappId}/files`;
|
|
14
|
+
this.http = new BaseHttpClient(config, pathPrefix);
|
|
15
|
+
this.folderHttp = new BaseHttpClient(config, `/api/v1/brandapp/${config.brandappId}/folders`);
|
|
16
|
+
this.timeout = config.timeout ?? 3e4;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 파일 목록 조회
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const { data: files, meta } = await sdk.files.list({
|
|
24
|
+
* page: 1,
|
|
25
|
+
* limit: 20,
|
|
26
|
+
* contentType: "image/*",
|
|
27
|
+
* sortBy: "createdAt",
|
|
28
|
+
* sortOrder: "desc",
|
|
29
|
+
* });
|
|
30
|
+
* console.log(`Total: ${meta.total}`);
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
async list(query) {
|
|
34
|
+
const params = new URLSearchParams();
|
|
35
|
+
if (query?.page != null) params.set("page", String(query.page));
|
|
36
|
+
if (query?.limit != null) params.set("limit", String(query.limit));
|
|
37
|
+
if (query?.contentType) params.set("contentType", query.contentType);
|
|
38
|
+
if (query?.folderId !== void 0) params.set("folderId", query.folderId ?? "");
|
|
39
|
+
if (query?.sortBy) params.set("sortBy", query.sortBy);
|
|
40
|
+
if (query?.sortOrder) params.set("sortOrder", query.sortOrder);
|
|
41
|
+
const qs = params.toString();
|
|
42
|
+
const path = qs ? `?${qs}` : "";
|
|
43
|
+
return this.http.fetch("GET", path);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* 단일 파일 조회
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const file = await sdk.files.get("file-uuid");
|
|
51
|
+
* console.log(file.name, file.url);
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
async get(fileId) {
|
|
55
|
+
return (await this.http.fetch("GET", `/${encodeURIComponent(fileId)}`)).data;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* 파일 수정 — 이름 변경(rename) + 폴더 이동(move)
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* await sdk.files.update(fileId, { name: "renamed.png" });
|
|
63
|
+
* await sdk.files.update(fileId, { folderId }); // 폴더로 이동
|
|
64
|
+
* await sdk.files.update(fileId, { folderId: null }); // 루트로 이동
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
async update(fileId, input) {
|
|
68
|
+
return (await this.http.fetch("PATCH", `/${encodeURIComponent(fileId)}`, input)).data;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* 텍스트 파일 내용 읽기 (미리보기용)
|
|
72
|
+
*
|
|
73
|
+
* 텍스트 계열(`text/*`, `application/json` 등)만 지원 — 그 외는 415
|
|
74
|
+
* (`UNSUPPORTED_CONTENT_TYPE`), 1MB 초과는 413 (`CONTENT_TOO_LARGE`).
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* const text = await sdk.files.readContent(fileId);
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
async readContent(fileId, options) {
|
|
82
|
+
const url = `${this.http.requestBaseUrl}/${encodeURIComponent(fileId)}/content`;
|
|
83
|
+
const managed = createManagedAbort({
|
|
84
|
+
timeoutMs: options?.timeout ?? this.timeout,
|
|
85
|
+
external: options?.signal
|
|
86
|
+
});
|
|
87
|
+
try {
|
|
88
|
+
const response = await globalThis.fetch(url, {
|
|
89
|
+
method: "GET",
|
|
90
|
+
headers: {
|
|
91
|
+
Authorization: this.http.authorizationHeader,
|
|
92
|
+
"X-SDK-Version": `brandapp-sdk/${SDK_VERSION}`
|
|
93
|
+
},
|
|
94
|
+
signal: managed.signal
|
|
95
|
+
});
|
|
96
|
+
if (!response.ok) {
|
|
97
|
+
const body = await response.json().catch(() => ({}));
|
|
98
|
+
const errObj = typeof body.error === "object" ? body.error : void 0;
|
|
99
|
+
const msg = errObj?.message ?? (typeof body.error === "string" ? body.error : void 0) ?? `Content read failed with status ${response.status}`;
|
|
100
|
+
throw mapHttpStatusToError(response.status, errObj?.code, msg, {
|
|
101
|
+
method: "GET",
|
|
102
|
+
url
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
return await response.text();
|
|
106
|
+
} catch (e) {
|
|
107
|
+
if (e instanceof ReoptSDKError) throw e;
|
|
108
|
+
if (e instanceof Error && e.name === "AbortError") throw new ReoptSDKError("Content read timed out", 408, "TIMEOUT");
|
|
109
|
+
throw e;
|
|
110
|
+
} finally {
|
|
111
|
+
managed.cleanup();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* 저장공간 사용량 조회 — 사용량 미터·"한도 임박" 경고용
|
|
116
|
+
*
|
|
117
|
+
* `usedBytes`/`limitBytes`는 워크스페이스 단위(초과 업로드 402
|
|
118
|
+
* `STORAGE_LIMIT` 판정과 동일 소스), `fileCount`는 이 brandapp 스코프.
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```ts
|
|
122
|
+
* const { usedBytes, limitBytes } = await sdk.files.usage();
|
|
123
|
+
* if (limitBytes != null && usedBytes / limitBytes > 0.9) warnAlmostFull();
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
async usage() {
|
|
127
|
+
return (await this.http.fetch("GET", "/usage")).data;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* 직속 자식 폴더 목록 조회
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```ts
|
|
134
|
+
* const rootFolders = await sdk.files.listFolders();
|
|
135
|
+
* const children = await sdk.files.listFolders({ parentId: folder.id });
|
|
136
|
+
* ```
|
|
137
|
+
*/
|
|
138
|
+
async listFolders(query) {
|
|
139
|
+
const params = new URLSearchParams();
|
|
140
|
+
if (query?.parentId) params.set("parentId", query.parentId);
|
|
141
|
+
const qs = params.toString();
|
|
142
|
+
return (await this.folderHttp.fetch("GET", qs ? `?${qs}` : "")).data;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* 폴더 생성
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* ```ts
|
|
149
|
+
* const folder = await sdk.files.createFolder({ name: "invoices" });
|
|
150
|
+
* const child = await sdk.files.createFolder({ name: "2026", parentId: folder.id });
|
|
151
|
+
* ```
|
|
152
|
+
*/
|
|
153
|
+
async createFolder(input) {
|
|
154
|
+
return (await this.folderHttp.fetch("POST", "", input)).data;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* 폴더 수정 — 이름 변경(rename) + 이동(move)
|
|
158
|
+
*
|
|
159
|
+
* 자기 자신/자손으로의 이동은 400으로 거부된다 (cycle 방지).
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* ```ts
|
|
163
|
+
* await sdk.files.updateFolder(folderId, { name: "archive" });
|
|
164
|
+
* await sdk.files.updateFolder(folderId, { parentId: otherFolderId });
|
|
165
|
+
* ```
|
|
166
|
+
*/
|
|
167
|
+
async updateFolder(folderId, input) {
|
|
168
|
+
return (await this.folderHttp.fetch("PATCH", `/${encodeURIComponent(folderId)}`, input)).data;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* 폴더 삭제 — 비어있어야 한다 (아니면 409 `FOLDER_NOT_EMPTY`)
|
|
172
|
+
*
|
|
173
|
+
* @example
|
|
174
|
+
* ```ts
|
|
175
|
+
* await sdk.files.deleteFolder(folderId);
|
|
176
|
+
* ```
|
|
177
|
+
*/
|
|
178
|
+
async deleteFolder(folderId) {
|
|
179
|
+
await this.folderHttp.fetch("DELETE", `/${encodeURIComponent(folderId)}`);
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* 파일 삭제
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```ts
|
|
186
|
+
* await sdk.files.delete("file-uuid");
|
|
187
|
+
* ```
|
|
188
|
+
*/
|
|
189
|
+
async delete(fileId) {
|
|
190
|
+
await this.http.fetch("DELETE", `/${encodeURIComponent(fileId)}`);
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* 파일 업로드
|
|
194
|
+
*
|
|
195
|
+
* FormData(multipart)로 파일을 전송합니다.
|
|
196
|
+
* BaseHttpClient는 JSON 전용이므로 globalThis.fetch를 직접 사용합니다.
|
|
197
|
+
*
|
|
198
|
+
* TODO(files): 업로드 진행률(onProgress) 미지원 — fetch 단일 요청이라 진행
|
|
199
|
+
* 이벤트가 없다. XHR 기반 onProgress 또는 presigned 2-step 업로드(10MB 상한
|
|
200
|
+
* 완화 동반)는 서버 계약 변경이 필요해 별도 RFC로 다룬다.
|
|
201
|
+
*
|
|
202
|
+
* @example
|
|
203
|
+
* ```ts
|
|
204
|
+
* // Blob 업로드
|
|
205
|
+
* const blob = new Blob(["hello"], { type: "text/plain" });
|
|
206
|
+
* const file = await sdk.files.upload(blob, { name: "hello.txt" });
|
|
207
|
+
*
|
|
208
|
+
* // File 업로드 (브라우저)
|
|
209
|
+
* const file = await sdk.files.upload(inputEl.files[0]);
|
|
210
|
+
*
|
|
211
|
+
* // Buffer 업로드 (Node.js)
|
|
212
|
+
* const buf = fs.readFileSync("image.png");
|
|
213
|
+
* const file = await sdk.files.upload(buf, {
|
|
214
|
+
* name: "image.png",
|
|
215
|
+
* contentType: "image/png",
|
|
216
|
+
* });
|
|
217
|
+
* ```
|
|
218
|
+
*/
|
|
219
|
+
async upload(file, options) {
|
|
220
|
+
const formData = new FormData();
|
|
221
|
+
if (file instanceof Blob) {
|
|
222
|
+
const fileName = options?.name ?? ("name" in file ? file.name : "upload");
|
|
223
|
+
formData.append("file", file, fileName);
|
|
224
|
+
} else {
|
|
225
|
+
const arrayBuffer = file.buffer.slice(file.byteOffset, file.byteOffset + file.byteLength);
|
|
226
|
+
const blob = new Blob([arrayBuffer], { type: options?.contentType ?? "application/octet-stream" });
|
|
227
|
+
formData.append("file", blob, options?.name ?? "upload");
|
|
228
|
+
}
|
|
229
|
+
if (options?.name) formData.append("name", options.name);
|
|
230
|
+
if (options?.contentType) formData.append("contentType", options.contentType);
|
|
231
|
+
if (options?.folderId) formData.append("folderId", options.folderId);
|
|
232
|
+
const url = `${this.http.requestBaseUrl}/upload`;
|
|
233
|
+
const managed = createManagedAbort({
|
|
234
|
+
timeoutMs: options?.timeout ?? this.timeout,
|
|
235
|
+
external: options?.signal
|
|
236
|
+
});
|
|
237
|
+
try {
|
|
238
|
+
const response = await globalThis.fetch(url, {
|
|
239
|
+
method: "POST",
|
|
240
|
+
headers: {
|
|
241
|
+
Authorization: this.http.authorizationHeader,
|
|
242
|
+
"X-SDK-Version": `brandapp-sdk/${SDK_VERSION}`
|
|
243
|
+
},
|
|
244
|
+
body: formData,
|
|
245
|
+
signal: managed.signal
|
|
246
|
+
});
|
|
247
|
+
if (!response.ok) {
|
|
248
|
+
const body = await response.json().catch(() => ({}));
|
|
249
|
+
const errObj = typeof body.error === "object" ? body.error : void 0;
|
|
250
|
+
const msg = errObj?.message ?? (typeof body.error === "string" ? body.error : void 0) ?? `Upload failed with status ${response.status}`;
|
|
251
|
+
const fieldErrors = response.status === 422 ? parseFieldErrors(body) : [];
|
|
252
|
+
throw mapHttpStatusToError(response.status, errObj?.code, msg, {
|
|
253
|
+
method: "POST",
|
|
254
|
+
url
|
|
255
|
+
}, fieldErrors);
|
|
256
|
+
}
|
|
257
|
+
return (await response.json()).data;
|
|
258
|
+
} catch (e) {
|
|
259
|
+
if (e instanceof ReoptSDKError) throw e;
|
|
260
|
+
if (e instanceof Error && e.name === "AbortError") throw new ReoptSDKError("Upload request timed out", 408, "TIMEOUT");
|
|
261
|
+
throw e;
|
|
262
|
+
} finally {
|
|
263
|
+
managed.cleanup();
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
function createReoptFileClient(config) {
|
|
268
|
+
return new ReoptFileClient(config);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
//#endregion
|
|
272
|
+
export { createReoptFileClient as n, ReoptFileClient as t };
|
|
273
|
+
//# sourceMappingURL=client-m29R8F0R.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/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-yBQen4Yi.d.ts.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-BTS6Ewv_.js";
|
|
3
3
|
//#region src/cms/helpers.d.ts
|
|
4
4
|
type SeoMetadata = {
|
|
5
5
|
title?: string;
|
package/dist/cms/index.js
CHANGED
|
@@ -305,7 +305,7 @@ function mapHttpStatusToError(status, code, message, ctx, fieldErrors) {
|
|
|
305
305
|
|
|
306
306
|
//#endregion
|
|
307
307
|
//#region src/core/config.ts
|
|
308
|
-
const SDK_VERSION = "3.
|
|
308
|
+
const SDK_VERSION = "3.6.0";
|
|
309
309
|
/**
|
|
310
310
|
* Default API host for EAV / AI / Files / CMS / Terms. Consumers can override
|
|
311
311
|
* via `config.baseUrl` or the `REOPT_BASE_URL` env var.
|
|
@@ -484,4 +484,4 @@ function deriveIdFromBaseUrl(baseUrl) {
|
|
|
484
484
|
|
|
485
485
|
//#endregion
|
|
486
486
|
export { mapHttpStatusToError as A, ServerError as C, isReoptSDKError as D, isModelAccessError as E, isRequiredTermsError as O, RequiredTermsError as S, isCreditLimitError as T, ModelAccessError as _, resolveIdBaseUrl as a, RateLimitError as b, AuthUserNotFoundError as c, ConflictError as d, ContentFilterError as f, LimitExceededError as g, ForbiddenError as h, resolveBaseUrl as i, isValidationError 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, ValidationError as w, ReoptSDKError as x, NotFoundError as y };
|
|
487
|
-
//# sourceMappingURL=config-
|
|
487
|
+
//# sourceMappingURL=config-BV8Fn7Uo.js.map
|
|
@@ -122,6 +122,8 @@ type ListRecordsQuery = {
|
|
|
122
122
|
sortBy?: "createdAt" | "updatedAt" | (string & {});
|
|
123
123
|
sortOrder?: "asc" | "desc";
|
|
124
124
|
filters?: AttributeFilter[];
|
|
125
|
+
/** Attribute IDs to include in `record.values`. Omit to return every value. */
|
|
126
|
+
select?: string[];
|
|
125
127
|
};
|
|
126
128
|
type CountRecordsQuery = {
|
|
127
129
|
authUserId?: string;
|
|
@@ -391,4 +393,4 @@ type ReoptSDKConfig<S extends SchemaDef = SchemaDef> = {
|
|
|
391
393
|
declare function resolveBaseUrl(config: ReoptSDKConfig): string;
|
|
392
394
|
//#endregion
|
|
393
395
|
export { UpdateEntityInput as A, EavEntity as C, ListRecordsQuery as D, EavValidation as E, UpsertRecordInput as M, UpsertRecordResult as N, PaginatedResponse as O, EavDataType as S, EavSchemaLinkedTo as T, CreateEntityInput as _, DebugLogger as a, EavAttribute as b, InferValues as c, AttributeFilterOperator as d, BackfillOptions as f, CreateAttributeInput as g, CountRecordsQuery as h, DebugLevel as i, UpdateRecordInput as j, UpdateAttributeInput as k, SchemaDef as l, BulkUpdateItem as m, ReoptSDKConfig as n, AttributeDef as o, BackfillResult as p, resolveBaseUrl as r, EntityDef as s, REOPT_BASE_URLS as t, AttributeFilter as u, CreateRecordInput as v, EavRecord as w, EavAttributeOption as x, DeleteWhereInput as y };
|
|
394
|
-
//# sourceMappingURL=config-
|
|
396
|
+
//# sourceMappingURL=config-C7WQtC3l.d.ts.map
|
package/dist/dev/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as DevPost, a as SeedAllInput, b as InMemoryStore, c as SeedPostGroupInput, d as SeedTermsItem, f as createDevServer, g as DevEntity, h as DevAttribute, i as ProxyConfig, l as SeedPostInput, m as markdownToEditorSpecMany, n as DevServer, o as SeedData, p as markdownToEditorSpec, r as DevServerOptions, s as SeedOptions, t as DevSchema, u as SeedRecordInput, v as DevPostGroup, x as StoreSnapshot, y as DevRecord } from "../index-
|
|
1
|
+
import { _ as DevPost, a as SeedAllInput, b as InMemoryStore, c as SeedPostGroupInput, d as SeedTermsItem, f as createDevServer, g as DevEntity, h as DevAttribute, i as ProxyConfig, l as SeedPostInput, m as markdownToEditorSpecMany, n as DevServer, o as SeedData, p as markdownToEditorSpec, r as DevServerOptions, s as SeedOptions, t as DevSchema, u as SeedRecordInput, v as DevPostGroup, x as StoreSnapshot, y as DevRecord } from "../index-DV_OWwx5.js";
|
|
2
2
|
export { type DevAttribute, type DevEntity, type DevPost, type DevPostGroup, type DevRecord, DevSchema, DevServer, DevServerOptions, InMemoryStore, ProxyConfig, SeedAllInput, SeedData, SeedOptions, SeedPostGroupInput, SeedPostInput, SeedRecordInput, SeedTermsItem, type StoreSnapshot, createDevServer, markdownToEditorSpec, markdownToEditorSpecMany };
|