@reopt-ai/brandapp-sdk 4.1.0 → 4.2.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 +26 -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/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 +12 -2
- package/dist/better-auth/index.js +8 -3
- package/dist/{client-DHZ484kb.d.ts → client-BBxhqs8l.d.ts} +2 -2
- package/dist/{client-A4YrHjDc.d.ts → client-BOEyVc8V.d.ts} +2 -2
- package/dist/{client-Dnp7_J0-.js → client-B_7XihyW.js} +2 -2
- package/dist/{client-D_7G37OB.js → client-C1zORyWz.js} +2 -2
- package/dist/{client-2IaU8yUs.js → client-C3hlUyaZ.js} +2 -2
- package/dist/{client-CTefnLKY.js → client-C5CsGtWK.js} +3 -3
- package/dist/{client-yBQen4Yi.d.ts → client-CNPfjmT0.d.ts} +2 -2
- package/dist/{client-BGLDrf3N.d.ts → client-CRim5LCH.d.ts} +2 -2
- package/dist/{client-Ckm-i_Du.d.ts → client-CeYaCY1n.d.ts} +2 -2
- package/dist/{client-CHp-oNJB.js → client-ClX0it9Z.js} +3 -3
- package/dist/{client-DZu4msTG.d.ts → client-D5F6-YYU.d.ts} +2 -2
- package/dist/{client-DPbXH8tr.d.ts → client-DEY11EBB.d.ts} +2 -2
- package/dist/{client-Dx3sYx7V.js → client-DR5Eb36i.js} +4 -4
- package/dist/{client-SwByFT8p.js → client-DY62Nb7m.js} +2 -2
- package/dist/{client-BTS6Ewv_.d.ts → client-DYammrtw.d.ts} +2 -2
- package/dist/{client-DE3FvPFs.js → client-Dd1QpCUq.js} +2 -2
- package/dist/{client-CP9RSAzn.js → client-DfGEiRKb.js} +2 -2
- package/dist/{client-CAGo56KO.d.ts → client-DjgoTlfv.d.ts} +2 -2
- package/dist/{client-DfEeaOsQ.d.ts → client-bXAnGNzC.d.ts} +2 -2
- package/dist/{client-mvcEj1Vq.js → client-oDJVL5JF.js} +3 -3
- package/dist/cms/index.d.ts +1 -1
- package/dist/cms/index.js +1 -1
- package/dist/{config-tEsB7QhQ.js → config-BrJAy95F.js} +17 -3
- package/dist/{config-C7WQtC3l.d.ts → config-D28P8iwm.d.ts} +42 -4
- package/dist/dev/index.d.ts +1 -1
- package/dist/dev/index.js +99 -16
- package/dist/eav/index.d.ts +13 -4
- package/dist/eav/index.js +46 -3
- package/dist/eav/migrate.d.ts +4 -4
- package/dist/eav/migrate.js +1 -1
- package/dist/eav/schema.d.ts +2 -2
- package/dist/{errors-CRCcErNC.d.ts → errors-BnIRV-Px.d.ts} +9 -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-CCFmwnaQ.js → http-client-Dw_U7Wgx.js} +2 -2
- package/dist/{index-DV_OWwx5.d.ts → index-C6fyJTud.d.ts} +7 -1
- package/dist/{index-DJMr3ixA.d.ts → index-CBPdczmp.d.ts} +12 -12
- package/dist/index.d.ts +6 -6
- package/dist/index.js +13 -13
- 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-Bsgb85OE.js → query-l08AoqXP.js} +2 -2
- package/dist/react/hooks.d.ts +5 -5
- package/dist/terms/index.d.ts +1 -1
- package/dist/terms/index.js +1 -1
- package/dist/testing/index.d.ts +2 -2
- package/docs/api-reference.md +34 -0
- package/docs/errors.md +2 -0
- package/package.json +1 -1
package/dist/react/hooks.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as CompletionOptions, f as ModelInfo, l as ImageGenerateOptions, o as CompletionResult, p as StreamDoneData, r as AgentInfo, s as CreditInfo, u as ImageGenerateResult } from "../client-
|
|
3
|
-
import {
|
|
1
|
+
import { A as ListRecordsQuery, C as EavAttribute, D as EavRecord, E as EavEntity, F as UpsertRecordInput, I as UpsertRecordResult, P as UpdateRecordInput, S as DeleteWhereInput, _ as BulkUpdateItem, j as PaginatedResponse, x as CreateRecordInput } from "../config-D28P8iwm.js";
|
|
2
|
+
import { a as CompletionOptions, f as ModelInfo, l as ImageGenerateOptions, o as CompletionResult, p as StreamDoneData, r as AgentInfo, s as CreditInfo, u as ImageGenerateResult } from "../client-DEY11EBB.js";
|
|
3
|
+
import { v as ReoptSDKError } from "../errors-BnIRV-Px.js";
|
|
4
4
|
import { a as ListTagsQuery, c as PostGroup, d as Tag, i as ListPostsQuery, o as Post, r as ListPostGroupsQuery, s as PostDetail, t as CmsPaginatedResponse } from "../types-BXDcoJHG.js";
|
|
5
|
-
import { a as FileListQuery, c as FolderInfo, d as UpdateFolderInput, f as UploadOptions, i as FileInfo, l as FolderListQuery, o as FileListResponse, r as CreateFolderInput, s as FileUsageInfo, u as UpdateFileInput } from "../client-
|
|
6
|
-
import { t as ReoptSDK } from "../index-
|
|
5
|
+
import { a as FileListQuery, c as FolderInfo, d as UpdateFolderInput, f as UploadOptions, i as FileInfo, l as FolderListQuery, o as FileListResponse, r as CreateFolderInput, s as FileUsageInfo, u as UpdateFileInput } from "../client-BOEyVc8V.js";
|
|
6
|
+
import { t as ReoptSDK } from "../index-CBPdczmp.js";
|
|
7
7
|
import { UseInfiniteQueryOptions, UseInfiniteQueryResult, UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
|
|
8
8
|
//#region src/react/use-ai-stream.d.ts
|
|
9
9
|
type UseAiStreamOptions = {
|
package/dist/terms/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as CreateConsentsResult, c as TermsJurisdiction, d as TermsVersion, f as WithdrawConsentResult, i as CreateConsentsRequest, l as TermsListResponse, n as ConsentRecord, o as ListTermsOptions, r as ConsentStatus, s as TermsItem, t as ConsentInput, u as TermsType } from "../types-C69OzBn6.js";
|
|
2
|
-
import { n as createReoptTermsClient, t as ReoptTermsClient } from "../client-
|
|
2
|
+
import { n as createReoptTermsClient, t as ReoptTermsClient } from "../client-BBxhqs8l.js";
|
|
3
3
|
export { type ConsentInput, type ConsentRecord, type ConsentStatus, type CreateConsentsRequest, type CreateConsentsResult, type ListTermsOptions, ReoptTermsClient, type TermsItem, type TermsJurisdiction, type TermsListResponse, type TermsType, type TermsVersion, type WithdrawConsentResult, createReoptTermsClient };
|
package/dist/terms/index.js
CHANGED
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as SeedAllInput, c as SeedPostGroupInput, d as SeedTermsItem, l as SeedPostInput, n as DevServer, o as SeedData, t as DevSchema } from "../index-
|
|
2
|
-
import { t as ReoptSDK } from "../index-
|
|
1
|
+
import { a as SeedAllInput, c as SeedPostGroupInput, d as SeedTermsItem, l as SeedPostInput, n as DevServer, o as SeedData, t as DevSchema } from "../index-C6fyJTud.js";
|
|
2
|
+
import { t as ReoptSDK } from "../index-CBPdczmp.js";
|
|
3
3
|
//#region src/testing/index.d.ts
|
|
4
4
|
type TestSDKOptions = {
|
|
5
5
|
/** EAV schema to seed entities and attributes */
|
package/docs/api-reference.md
CHANGED
|
@@ -378,6 +378,40 @@ await sdk.eav.records.bulkCreate(entityId, items);
|
|
|
378
378
|
await sdk.eav.records.bulkUpdate(entityId, items);
|
|
379
379
|
await sdk.eav.records.bulkDelete(entityId, ids);
|
|
380
380
|
|
|
381
|
+
// 동시성·TTL 원시연산 (brandapp 자유 테이블 전용)
|
|
382
|
+
const current = await sdk.eav.records.get(entityId, recordId); // current.version
|
|
383
|
+
await sdk.eav.records.update(entityId, recordId, {
|
|
384
|
+
values: { [statusAttr]: "done" },
|
|
385
|
+
ifVersion: current.version, // 그 사이 다른 쓰기가 있었으면 412 PreconditionFailedError
|
|
386
|
+
});
|
|
387
|
+
await sdk.eav.records.update(entityId, recordId, {
|
|
388
|
+
increments: { [balanceAttr]: -30 }, // number 속성 원자 가감 — values 없이도 된다
|
|
389
|
+
});
|
|
390
|
+
await sdk.eav.records.create(entityId, {
|
|
391
|
+
values: { [keyAttr]: "lease:job-42" }, // isUnique 속성 + TTL = claim/lease
|
|
392
|
+
expiresAt: new Date(Date.now() + 60_000).toISOString(),
|
|
393
|
+
});
|
|
394
|
+
await sdk.eav.records.update(entityId, recordId, { expiresAt: null }); // TTL 해제
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
### 한도 (production API 기준, 2026-08-30)
|
|
398
|
+
|
|
399
|
+
| 항목 | 값 | 초과 시 |
|
|
400
|
+
| ------------------------- | -------------------------------------------------------------------------------------------------- | ------------------------------ |
|
|
401
|
+
| 엔티티/브랜드앱 | 무제한 (운영자 opt-in `BRANDAPP_EAV_MAX_ENTITIES`) | `LIMIT_EXCEEDED_ENTITIES` |
|
|
402
|
+
| 속성/엔티티 | 100 | `LIMIT_EXCEEDED_ATTRIBUTES` |
|
|
403
|
+
| 레코드/엔티티 | 10,000 기본 (운영자 `BRANDAPP_EAV_MAX_RECORDS_PER_ENTITY`로 인상) — 만료 행 제외 | `LIMIT_EXCEEDED_RECORDS` (422) |
|
|
404
|
+
| 인메모리 후보 상한 | 10,000행 — 필터가 SQL로 못 내려가는 요청(`neq`/`not_in`/`after`/`before`, 커스텀 속성 정렬)만 해당 | `QUERY_TOO_BROAD` (422) |
|
|
405
|
+
| `list` limit | 최대 100, 기본 50 | 400 |
|
|
406
|
+
| bulk create/update/delete | 호출당 100건 | 400 |
|
|
407
|
+
| 레코드 값 직렬화 | 128KB/레코드 | `VALIDATION_ERROR` (422) |
|
|
408
|
+
| 엔티티·속성 name/label | 100자, description 500자 | 400 |
|
|
409
|
+
|
|
410
|
+
`eq`·`in`·`is_null`·`is_not_null`·`contains`·범위(`gt/lt/gte/lte`)는 GIN 인덱스로 후보를
|
|
411
|
+
좁히므로 엔티티 크기와 무관하게 싸다. 부재 속성은 `is_null`에 매치된다(`null` 값과 동일).
|
|
412
|
+
|
|
413
|
+
```typescript
|
|
414
|
+
|
|
381
415
|
// Pagination (async generator)
|
|
382
416
|
for await (const record of sdk.eav.records.listAll(entityId)) { ... }
|
|
383
417
|
```
|
package/docs/errors.md
CHANGED
|
@@ -76,6 +76,7 @@ you a more direct branch when you care about the specific case.
|
|
|
76
76
|
| `DuplicateAuthUserError` | `ConflictError` | 409 | `DUPLICATE_AUTH_USER` | bulk create 입력에 같은 authUserId가 중복 |
|
|
77
77
|
| `AuthUserNotFoundError` | `ReoptSDKError` | 400/422 | `AUTH_USER_NOT_FOUND` | 참조한 authUserId가 이 brandapp에 없음 |
|
|
78
78
|
| `LimitExceededError` | `ReoptSDKError` | 422 | `LIMIT_EXCEEDED_*` | EAV 자원 한도 초과 (entity/attribute/record) |
|
|
79
|
+
| `PreconditionFailedError` | `ReoptSDKError` | 412 | `PRECONDITION_FAILED` | `records.update(..., { ifVersion })`의 version이 현재와 다름 — 다시 읽고 재시도 |
|
|
79
80
|
|
|
80
81
|
추가 EAV 코드 (전용 클래스 없이 일반 클래스 + `.code`로 분기):
|
|
81
82
|
|
|
@@ -87,6 +88,7 @@ you a more direct branch when you care about the specific case.
|
|
|
87
88
|
| `USER_NOT_FOUND` | 404 | `NotFoundError` | `/users/:authUserId/records` 경로의 user가 brandapp에 없음 |
|
|
88
89
|
| `RECORDS_NOT_FOUND` | 400 | `BadRequestError` | bulkUpdate에서 일부 record id가 entity에 없음 |
|
|
89
90
|
| `DUPLICATE_RECORD_ID` | 409 | `ConflictError` | bulkUpdate(brandappAuthUser) 입력에 같은 record id가 중복 |
|
|
91
|
+
| `QUERY_TOO_BROAD` | 422 | `ReoptSDKError` | 필터 후보가 인메모리 상한(10k행)을 넘음 — `eq`/`in`/`authUserId`로 좁힐 것 |
|
|
90
92
|
| `AUTH_USER_ID_REQUIRED` | 400 | `BadRequestError` | `linkedTo='brandappAuthUser'` entity인데 authUserId 누락 |
|
|
91
93
|
|
|
92
94
|
All classes extend `ReoptSDKError`, so `instanceof ReoptSDKError` and
|