@reopt-ai/brandapp-sdk 3.5.0 → 4.0.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.
Files changed (64) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/README.md +14 -13
  3. package/dist/ai/index.d.ts +1 -1
  4. package/dist/ai/index.js +1 -1
  5. package/dist/ai-provider/index.js +1 -1
  6. package/dist/auth/index.d.ts +1 -1
  7. package/dist/auth/index.js +1 -1
  8. package/dist/better-auth/client.d.ts +56 -12
  9. package/dist/better-auth/client.js +27 -11
  10. package/dist/better-auth/index.d.ts +30 -2
  11. package/dist/better-auth/index.js +22 -3
  12. package/dist/{client-7PCoxVhZ.js → client-2qKKpHVy.js} +2 -2
  13. package/dist/{client-B7rZQ8Zi.d.ts → client-A4YrHjDc.d.ts} +2 -2
  14. package/dist/{client-wEVKLdly.js → client-B0uRUF3T.js} +3 -3
  15. package/dist/{client-aMR4CRB8.d.ts → client-BGLDrf3N.d.ts} +3 -3
  16. package/dist/{client-DDw5yz_h.d.ts → client-BTS6Ewv_.d.ts} +2 -2
  17. package/dist/{client-BoIuyx4S.js → client-C6USfykM.js} +3 -3
  18. package/dist/{client-BGGd_cpV.d.ts → client-CAGo56KO.d.ts} +2 -2
  19. package/dist/{client-61ldOHMz.js → client-CAjqKz8i.js} +3 -3
  20. package/dist/{client-BruP5_nU.d.ts → client-Ckm-i_Du.d.ts} +2 -2
  21. package/dist/{client-BxtZt405.js → client-D72MLGRY.js} +4 -4
  22. package/dist/{client-CAghoGD_.js → client-D9MGqXbn.js} +2 -2
  23. package/dist/{client-lk6wBu_0.d.ts → client-DHZ484kb.d.ts} +3 -3
  24. package/dist/{client-D0eBxh8j.d.ts → client-DPbXH8tr.d.ts} +2 -2
  25. package/dist/{client-zF1RG2uA.js → client-DTWpLo8X.js} +2 -2
  26. package/dist/{client-ByN3EQdk.js → client-DUvf9x_b.js} +2 -2
  27. package/dist/{client-D6gs61w8.d.ts → client-DfEeaOsQ.d.ts} +2 -2
  28. package/dist/{client-C_pHsPlj.js → client-Djlg4STl.js} +2 -2
  29. package/dist/{client-Dxg8_DIH.d.ts → client-yBQen4Yi.d.ts} +2 -2
  30. package/dist/cms/index.d.ts +1 -1
  31. package/dist/cms/index.js +1 -1
  32. package/dist/{config-CRytOPPl.d.ts → config-C7WQtC3l.d.ts} +3 -1
  33. package/dist/{config-aml9oQpX.js → config-D31PK7eu.js} +2 -2
  34. package/dist/dev/index.d.ts +1 -1
  35. package/dist/dev/index.js +33 -4
  36. package/dist/eav/index.d.ts +2 -2
  37. package/dist/eav/index.js +2 -2
  38. package/dist/eav/migrate.d.ts +2 -2
  39. package/dist/eav/schema.d.ts +2 -2
  40. package/dist/feedback/index.d.ts +1 -1
  41. package/dist/feedback/index.js +1 -1
  42. package/dist/files/index.d.ts +1 -1
  43. package/dist/files/index.js +1 -1
  44. package/dist/{http-client-BZc2mngq.js → http-client-D1vuc20o.js} +2 -2
  45. package/dist/{index-CeOLGdyL.d.ts → index-CvNJ8zp1.d.ts} +11 -11
  46. package/dist/{index-1j_738qk.d.ts → index-DV_OWwx5.d.ts} +2 -2
  47. package/dist/index.d.ts +4 -4
  48. package/dist/index.js +11 -11
  49. package/dist/logout/index.d.ts +1 -1
  50. package/dist/logout/index.js +1 -1
  51. package/dist/plans/index.d.ts +1 -1
  52. package/dist/plans/index.js +1 -1
  53. package/dist/push/index.d.ts +1 -1
  54. package/dist/push/index.js +1 -1
  55. package/dist/{query-xWqtfkvR.js → query-DyiwJX92.js} +2 -2
  56. package/dist/react/hooks.d.ts +4 -4
  57. package/dist/terms/index.d.ts +2 -2
  58. package/dist/terms/index.js +1 -1
  59. package/dist/testing/index.d.ts +2 -2
  60. package/dist/{types-BrghN2rJ.d.ts → types-C69OzBn6.d.ts} +2 -2
  61. package/dist/{types-B-SMkH6s.d.ts → types-MXLudLBP.d.ts} +6 -2
  62. package/docs/api-reference.md +7 -0
  63. package/docs/errors.md +5 -5
  64. package/package.json +5 -5
@@ -1,4 +1,4 @@
1
- import { t as BaseHttpClient } from "./http-client-BZc2mngq.js";
1
+ import { t as BaseHttpClient } from "./http-client-D1vuc20o.js";
2
2
 
3
3
  //#region src/plans/client.ts
4
4
  function unwrap(body) {
@@ -78,4 +78,4 @@ function createReoptPlansClient(config) {
78
78
 
79
79
  //#endregion
80
80
  export { createReoptPlansClient as n, ReoptPlansClient as t };
81
- //# sourceMappingURL=client-C_pHsPlj.js.map
81
+ //# sourceMappingURL=client-Djlg4STl.js.map
@@ -1,4 +1,4 @@
1
- import { n as ReoptSDKConfig } from "./config-CRytOPPl.js";
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-Dxg8_DIH.d.ts.map
71
+ //# sourceMappingURL=client-yBQen4Yi.d.ts.map
@@ -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-DDw5yz_h.js";
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
@@ -1,4 +1,4 @@
1
- import { t as createReoptCmsClient } from "../client-wEVKLdly.js";
1
+ import { t as createReoptCmsClient } from "../client-B0uRUF3T.js";
2
2
 
3
3
  //#region src/cms/helpers.ts
4
4
  function joinUrl(siteUrl, path) {
@@ -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-CRytOPPl.d.ts.map
396
+ //# sourceMappingURL=config-C7WQtC3l.d.ts.map
@@ -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.5.0";
308
+ const SDK_VERSION = "4.0.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-aml9oQpX.js.map
487
+ //# sourceMappingURL=config-D31PK7eu.js.map
@@ -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-1j_738qk.js";
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 };
package/dist/dev/index.js CHANGED
@@ -410,9 +410,12 @@ function sortRecords(records, sortBy, sortOrder) {
410
410
  });
411
411
  return sorted;
412
412
  }
413
- function transformRecord(record) {
413
+ function transformRecord(record, selectedAttributeIds) {
414
414
  const values = {};
415
- for (const v of record.values) values[v.attributeId] = parseStoredValue(v.value);
415
+ for (const v of record.values) {
416
+ if (selectedAttributeIds && !selectedAttributeIds.has(v.attributeId)) continue;
417
+ values[v.attributeId] = parseStoredValue(v.value);
418
+ }
416
419
  return {
417
420
  id: record.id,
418
421
  entityId: record.entityId,
@@ -431,6 +434,16 @@ function parseFilters(filtersJson) {
431
434
  return [];
432
435
  }
433
436
  }
437
+ function parseSelectedAttributeIds(selectJson) {
438
+ if (selectJson === void 0) return void 0;
439
+ try {
440
+ const parsed = JSON.parse(selectJson);
441
+ if (!Array.isArray(parsed) || parsed.length > 100 || parsed.some((value) => typeof value !== "string" || value.length === 0 || value.length > 200)) return null;
442
+ return new Set(parsed);
443
+ } catch {
444
+ return null;
445
+ }
446
+ }
434
447
  function createEavRoutes(store, brandappId) {
435
448
  const app = new Hono();
436
449
  app.get("/entities", (c) => {
@@ -661,6 +674,14 @@ function createEavRoutes(store, brandappId) {
661
674
  const sortBy = c.req.query("sortBy");
662
675
  const sortOrder = c.req.query("sortOrder") || "desc";
663
676
  const filtersJson = c.req.query("filters");
677
+ const selectedAttributeIds = parseSelectedAttributeIds(c.req.query("select"));
678
+ if (selectedAttributeIds === null) return c.json({
679
+ ok: false,
680
+ error: {
681
+ code: "VALIDATION_ERROR",
682
+ message: "select must be a JSON array containing at most 100 attribute IDs"
683
+ }
684
+ }, 400);
664
685
  let records = store.getRecordsByEntity(entityId);
665
686
  if (authUserId) records = records.filter((r) => r.brandappAuthUserId === authUserId);
666
687
  records = filterRecords(records, parseFilters(filtersJson));
@@ -670,7 +691,7 @@ function createEavRoutes(store, brandappId) {
670
691
  return c.json({
671
692
  ok: true,
672
693
  data: {
673
- records: paged.map(transformRecord),
694
+ records: paged.map((record) => transformRecord(record, selectedAttributeIds)),
674
695
  total,
675
696
  page,
676
697
  limit,
@@ -1074,6 +1095,14 @@ function createEavRoutes(store, brandappId) {
1074
1095
  const page = Number(c.req.query("page") || "1");
1075
1096
  const limit = Math.min(Number(c.req.query("limit") || "50"), 100);
1076
1097
  const sortOrder = c.req.query("sortOrder") || "desc";
1098
+ const selectedAttributeIds = parseSelectedAttributeIds(c.req.query("select"));
1099
+ if (selectedAttributeIds === null) return c.json({
1100
+ ok: false,
1101
+ error: {
1102
+ code: "VALIDATION_ERROR",
1103
+ message: "select must be a JSON array containing at most 100 attribute IDs"
1104
+ }
1105
+ }, 400);
1077
1106
  const entityIds = new Set(store.getEntitiesByBrandapp(brandappId).map((e) => e.id));
1078
1107
  let records = store.findMany(store.records, (r) => r.brandappAuthUserId === authUserId && entityIds.has(r.entityId));
1079
1108
  records = sortRecords(records, "createdAt", sortOrder);
@@ -1082,7 +1111,7 @@ function createEavRoutes(store, brandappId) {
1082
1111
  return c.json({
1083
1112
  ok: true,
1084
1113
  data: {
1085
- records: paged.map(transformRecord),
1114
+ records: paged.map((record) => transformRecord(record, selectedAttributeIds)),
1086
1115
  total,
1087
1116
  page,
1088
1117
  limit,
@@ -1,6 +1,6 @@
1
- import { A as UpdateEntityInput, C as EavEntity, D as ListRecordsQuery, E as EavValidation, M as UpsertRecordInput, N as UpsertRecordResult, O as PaginatedResponse, S as EavDataType, T as EavSchemaLinkedTo, _ as CreateEntityInput, b as EavAttribute, d as AttributeFilterOperator, g as CreateAttributeInput, h as CountRecordsQuery, j as UpdateRecordInput, k as UpdateAttributeInput, m as BulkUpdateItem, n as ReoptSDKConfig, u as AttributeFilter, v as CreateRecordInput, w as EavRecord, x as EavAttributeOption, y as DeleteWhereInput } from "../config-CRytOPPl.js";
1
+ import { A as UpdateEntityInput, C as EavEntity, D as ListRecordsQuery, E as EavValidation, M as UpsertRecordInput, N as UpsertRecordResult, O as PaginatedResponse, S as EavDataType, T as EavSchemaLinkedTo, _ as CreateEntityInput, b as EavAttribute, d as AttributeFilterOperator, g as CreateAttributeInput, h as CountRecordsQuery, j as UpdateRecordInput, k as UpdateAttributeInput, m as BulkUpdateItem, n as ReoptSDKConfig, u as AttributeFilter, v as CreateRecordInput, w as EavRecord, x as EavAttributeOption, y as DeleteWhereInput } from "../config-C7WQtC3l.js";
2
2
  import { c as DuplicateAuthUserError, f as LimitExceededError, n as AuthUserNotFoundError, r as AuthUserRecordExistsError } from "../errors-CRCcErNC.js";
3
- import { i as TypedEavRecord, n as createReoptEavClient, r as EntityClient, t as ReoptEavClient } from "../client-BGGd_cpV.js";
3
+ import { i as TypedEavRecord, n as createReoptEavClient, r as EntityClient, t as ReoptEavClient } from "../client-CAGo56KO.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-aml9oQpX.js";
2
- import { t as createReoptEavClient } from "../client-61ldOHMz.js";
1
+ import { c as AuthUserNotFoundError, g as LimitExceededError, l as AuthUserRecordExistsError, m as DuplicateAuthUserError } from "../config-D31PK7eu.js";
2
+ import { t as createReoptEavClient } from "../client-CAjqKz8i.js";
3
3
 
4
4
  //#region src/eav/verify.ts
5
5
  async function verifyEavSchema(input) {
@@ -1,5 +1,5 @@
1
- import { o as AttributeDef, s as EntityDef } from "../config-CRytOPPl.js";
2
- import { t as ReoptEavClient } from "../client-BGGd_cpV.js";
1
+ import { o as AttributeDef, s as EntityDef } from "../config-C7WQtC3l.js";
2
+ import { t as ReoptEavClient } from "../client-CAGo56KO.js";
3
3
  //#region src/eav/migrate/types.d.ts
4
4
  /**
5
5
  * Subset of `ReoptEavClient.records` exposed inside a migration's `up`/`down`.
@@ -1,5 +1,5 @@
1
- import { C as EavEntity, S as EavDataType, b as EavAttribute, c as InferValues, l as SchemaDef, o as AttributeDef, s as EntityDef } from "../config-CRytOPPl.js";
2
- import { t as ReoptEavClient } from "../client-BGGd_cpV.js";
1
+ import { C as EavEntity, S as EavDataType, b as EavAttribute, c as InferValues, l as SchemaDef, o as AttributeDef, s as EntityDef } from "../config-C7WQtC3l.js";
2
+ import { t as ReoptEavClient } from "../client-CAGo56KO.js";
3
3
  //#region src/eav/schema/define.d.ts
4
4
  declare function defineEntity<const A extends Record<string, AttributeDef>>(def: EntityDef<A>): EntityDef<A>;
5
5
  declare function defineSchema<const E extends Record<string, EntityDef>>(def: SchemaDef<E>): SchemaDef<E>;
@@ -1,2 +1,2 @@
1
- import { a as CreateFeedbackResult, c as FeedbackListMeta, d as FeedbackReplyAuthor, f as FeedbackStatus, i as CreateFeedbackReplyResult, l as FeedbackListResult, m as RateFeedbackReplyResult, n as createReoptFeedbackClient, o as Feedback, p as ListFeedbackQuery, r as CreateFeedbackInput, s as FeedbackDetail, t as ReoptFeedbackClient, u as FeedbackReply } from "../client-BruP5_nU.js";
1
+ import { a as CreateFeedbackResult, c as FeedbackListMeta, d as FeedbackReplyAuthor, f as FeedbackStatus, i as CreateFeedbackReplyResult, l as FeedbackListResult, m as RateFeedbackReplyResult, n as createReoptFeedbackClient, o as Feedback, p as ListFeedbackQuery, r as CreateFeedbackInput, s as FeedbackDetail, t as ReoptFeedbackClient, u as FeedbackReply } from "../client-Ckm-i_Du.js";
2
2
  export { type CreateFeedbackInput, type CreateFeedbackReplyResult, type CreateFeedbackResult, type Feedback, type FeedbackDetail, type FeedbackListMeta, type FeedbackListResult, type FeedbackReply, type FeedbackReplyAuthor, type FeedbackStatus, type ListFeedbackQuery, type RateFeedbackReplyResult, ReoptFeedbackClient, createReoptFeedbackClient };
@@ -1,3 +1,3 @@
1
- import { n as createReoptFeedbackClient, t as ReoptFeedbackClient } from "../client-zF1RG2uA.js";
1
+ import { n as createReoptFeedbackClient, t as ReoptFeedbackClient } from "../client-DTWpLo8X.js";
2
2
 
3
3
  export { ReoptFeedbackClient, createReoptFeedbackClient };
@@ -1,4 +1,4 @@
1
- import { a as FileListQuery, c as FolderInfo, d as UpdateFolderInput, f as UploadOptions, i as FileInfo, l as FolderListQuery, n as createReoptFileClient, o as FileListResponse, r as CreateFolderInput, s as FileUsageInfo, t as ReoptFileClient, u as UpdateFileInput } from "../client-B7rZQ8Zi.js";
1
+ import { a as FileListQuery, c as FolderInfo, d as UpdateFolderInput, f as UploadOptions, i as FileInfo, l as FolderListQuery, n as createReoptFileClient, o as FileListResponse, r as CreateFolderInput, s as FileUsageInfo, t as ReoptFileClient, u as UpdateFileInput } from "../client-A4YrHjDc.js";
2
2
  //#region src/files/helpers.d.ts
3
3
  /**
4
4
  * 이미지 URL 헬퍼 — Next.js `<Image>`와 결합해 사용.
@@ -1,4 +1,4 @@
1
- import { n as createReoptFileClient, t as ReoptFileClient } from "../client-BoIuyx4S.js";
1
+ import { n as createReoptFileClient, t as ReoptFileClient } from "../client-C6USfykM.js";
2
2
 
3
3
  //#region src/files/helpers.ts
4
4
  const REOPT_IMAGE_REMOTE_PATTERNS = [{
@@ -1,4 +1,4 @@
1
- import { A as mapHttpStatusToError, C as ServerError, a as resolveIdBaseUrl, b as RateLimitError, i as resolveBaseUrl, n as SDK_VERSION, o as validateConfig, x as ReoptSDKError } from "./config-aml9oQpX.js";
1
+ import { A as mapHttpStatusToError, C as ServerError, a as resolveIdBaseUrl, b as RateLimitError, i as resolveBaseUrl, n as SDK_VERSION, o as validateConfig, x as ReoptSDKError } from "./config-D31PK7eu.js";
2
2
  import { t as createAuthHeader } from "./encoding-Bwfm3iaE.js";
3
3
 
4
4
  //#region src/core/debug.ts
@@ -383,4 +383,4 @@ function parseFieldErrors(body) {
383
383
 
384
384
  //#endregion
385
385
  export { parseFieldErrors as n, BaseHttpClient as t };
386
- //# sourceMappingURL=http-client-BZc2mngq.js.map
386
+ //# sourceMappingURL=http-client-D1vuc20o.js.map
@@ -1,13 +1,13 @@
1
- import { l as SchemaDef, n as ReoptSDKConfig } from "./config-CRytOPPl.js";
2
- import { t as ReoptAiClient } from "./client-D0eBxh8j.js";
3
- import { t as ReoptAuthClient } from "./client-Dxg8_DIH.js";
4
- import { t as ReoptCmsClient } from "./client-DDw5yz_h.js";
5
- import { t as ReoptEavClient } from "./client-BGGd_cpV.js";
6
- import { t as ReoptFeedbackClient } from "./client-BruP5_nU.js";
7
- import { t as ReoptFileClient } from "./client-B7rZQ8Zi.js";
8
- import { t as ReoptPlansClient } from "./client-aMR4CRB8.js";
9
- import { t as ReoptPushClient } from "./client-D6gs61w8.js";
10
- import { t as ReoptTermsClient } from "./client-lk6wBu_0.js";
1
+ import { l as SchemaDef, n as ReoptSDKConfig } from "./config-C7WQtC3l.js";
2
+ import { t as ReoptAiClient } from "./client-DPbXH8tr.js";
3
+ import { t as ReoptAuthClient } from "./client-yBQen4Yi.js";
4
+ import { t as ReoptCmsClient } from "./client-BTS6Ewv_.js";
5
+ import { t as ReoptEavClient } from "./client-CAGo56KO.js";
6
+ import { t as ReoptFeedbackClient } from "./client-Ckm-i_Du.js";
7
+ import { t as ReoptFileClient } from "./client-A4YrHjDc.js";
8
+ import { t as ReoptPlansClient } from "./client-BGLDrf3N.js";
9
+ import { t as ReoptPushClient } from "./client-DfEeaOsQ.js";
10
+ import { t as ReoptTermsClient } from "./client-DHZ484kb.js";
11
11
  //#region src/core/http-client.d.ts
12
12
  type FetchOptions = {
13
13
  /** Abort the request via an external AbortSignal (merged with timeout signal). */
@@ -166,4 +166,4 @@ type ReoptSDK<S extends SchemaDef = SchemaDef> = {
166
166
  declare function createReoptSDK<S extends SchemaDef = SchemaDef>(config: ReoptSDKConfig<S>): ReoptSDK<S>;
167
167
  //#endregion
168
168
  export { initReoptSDK as a, getReoptSDK as i, createReoptSDK as n, resetSDK as o, createLazySDK as r, BaseHttpClient as s, ReoptSDK as t };
169
- //# sourceMappingURL=index-CeOLGdyL.d.ts.map
169
+ //# sourceMappingURL=index-CvNJ8zp1.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { n as EditorSpec } from "./types-BXDcoJHG.js";
2
- import { c as TermsJurisdiction } from "./types-BrghN2rJ.js";
2
+ import { c as TermsJurisdiction } from "./types-C69OzBn6.js";
3
3
  //#region src/dev/store.d.ts
4
4
  type DevEntity = {
5
5
  id: string;
@@ -467,4 +467,4 @@ type DevServer = {
467
467
  declare function createDevServer(options?: DevServerOptions): Promise<DevServer>;
468
468
  //#endregion
469
469
  export { DevPost as _, SeedAllInput as a, InMemoryStore as b, SeedPostGroupInput as c, SeedTermsItem as d, createDevServer as f, DevEntity as g, DevAttribute as h, ProxyConfig as i, SeedPostInput as l, markdownToEditorSpecMany as m, DevServer as n, SeedData as o, markdownToEditorSpec as p, DevServerOptions as r, SeedOptions as s, DevSchema as t, SeedRecordInput as u, DevPostGroup as v, StoreSnapshot as x, DevRecord as y };
470
- //# sourceMappingURL=index-1j_738qk.d.ts.map
470
+ //# sourceMappingURL=index-DV_OWwx5.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { a as DebugLogger, i as DebugLevel, n as ReoptSDKConfig, r as resolveBaseUrl, t as REOPT_BASE_URLS } from "./config-CRytOPPl.js";
2
- import { a as CompletionOptions, c as FinishReason, d as MessageRole, f as ModelInfo, i as ChatMessage, l as ImageGenerateOptions, m as StreamEvent, o as CompletionResult, p as StreamDoneData, r as AgentInfo, s as CreditInfo, u as ImageGenerateResult } from "./client-D0eBxh8j.js";
1
+ import { a as DebugLogger, i as DebugLevel, n as ReoptSDKConfig, r as resolveBaseUrl, t as REOPT_BASE_URLS } from "./config-C7WQtC3l.js";
2
+ import { a as CompletionOptions, c as FinishReason, d as MessageRole, f as ModelInfo, i as ChatMessage, l as ImageGenerateOptions, m as StreamEvent, o as CompletionResult, p as StreamDoneData, r as AgentInfo, s as CreditInfo, u as ImageGenerateResult } from "./client-DPbXH8tr.js";
3
3
  import { C as isModelAccessError, D as mapHttpStatusToError, E as isValidationError, S as isCreditLimitError, T as isRequiredTermsError, _ as ReoptSDKError, a as ConflictError, b as ServerError, c as DuplicateAuthUserError, d as ForbiddenError, f as LimitExceededError, g as RateLimitError, h as NotFoundError, i as BadRequestError, l as ErrorDiagnostic, m as ModelNotFoundError, n as AuthUserNotFoundError, o as ContentFilterError, p as ModelAccessError, r as AuthUserRecordExistsError, s as CreditLimitError, t as AuthError, u as FieldError, v as ReoptSDKErrorContext, w as isReoptSDKError, x as ValidationError, y as RequiredTermsError } from "./errors-CRCcErNC.js";
4
- import { i as TypedEavRecord, r as EntityClient } from "./client-BGGd_cpV.js";
5
- import { a as initReoptSDK, i as getReoptSDK, n as createReoptSDK, o as resetSDK, r as createLazySDK, s as BaseHttpClient, t as ReoptSDK } from "./index-CeOLGdyL.js";
4
+ import { i as TypedEavRecord, r as EntityClient } from "./client-CAGo56KO.js";
5
+ import { a as initReoptSDK, i as getReoptSDK, n as createReoptSDK, o as resetSDK, r as createLazySDK, s as BaseHttpClient, t as ReoptSDK } from "./index-CvNJ8zp1.js";
6
6
  export { type AgentInfo, AuthError, AuthUserNotFoundError, AuthUserRecordExistsError, BadRequestError, BaseHttpClient, type ChatMessage, type CompletionOptions, type CompletionResult, ConflictError, ContentFilterError, type CreditInfo, CreditLimitError, type DebugLevel, type DebugLogger, DuplicateAuthUserError, type EntityClient, type ErrorDiagnostic, type FieldError, type FinishReason, ForbiddenError, type ImageGenerateOptions, type ImageGenerateResult, LimitExceededError, type MessageRole, ModelAccessError, type ModelInfo, ModelNotFoundError, NotFoundError, REOPT_BASE_URLS, RateLimitError, ReoptSDK, type ReoptSDKConfig, ReoptSDKError, type ReoptSDKErrorContext, RequiredTermsError, ServerError, type StreamDoneData, type StreamEvent, type TypedEavRecord, ValidationError, createLazySDK, createReoptSDK, getReoptSDK, initReoptSDK, isCreditLimitError, isModelAccessError, isReoptSDKError, isRequiredTermsError, isValidationError, mapHttpStatusToError, resetSDK, resolveBaseUrl };
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import { A as mapHttpStatusToError, C as ServerError, D as isReoptSDKError, E as isModelAccessError, O as isRequiredTermsError, S as RequiredTermsError, T as isCreditLimitError, _ as ModelAccessError, b as RateLimitError, c as AuthUserNotFoundError, d as ConflictError, f as ContentFilterError, g as LimitExceededError, h as ForbiddenError, i as resolveBaseUrl, k as isValidationError, l as AuthUserRecordExistsError, m as DuplicateAuthUserError, p as CreditLimitError, r as assertBrowserSafe, s as AuthError, t as REOPT_BASE_URLS, u as BadRequestError, v as ModelNotFoundError, w as ValidationError, x as ReoptSDKError, y as NotFoundError } from "./config-aml9oQpX.js";
2
- import { t as BaseHttpClient } from "./http-client-BZc2mngq.js";
3
- import { n as createReoptAiClient } from "./client-BxtZt405.js";
4
- import { n as createReoptAuthClient } from "./client-CAghoGD_.js";
5
- import { t as createReoptCmsClient } from "./client-wEVKLdly.js";
6
- import { t as createReoptEavClient } from "./client-61ldOHMz.js";
7
- import { n as createReoptFeedbackClient } from "./client-zF1RG2uA.js";
8
- import { n as createReoptFileClient } from "./client-BoIuyx4S.js";
9
- import { n as createReoptPlansClient } from "./client-C_pHsPlj.js";
10
- import { n as createReoptPushClient } from "./client-7PCoxVhZ.js";
11
- import { n as createReoptTermsClient } from "./client-ByN3EQdk.js";
1
+ import { A as mapHttpStatusToError, C as ServerError, D as isReoptSDKError, E as isModelAccessError, O as isRequiredTermsError, S as RequiredTermsError, T as isCreditLimitError, _ as ModelAccessError, b as RateLimitError, c as AuthUserNotFoundError, d as ConflictError, f as ContentFilterError, g as LimitExceededError, h as ForbiddenError, i as resolveBaseUrl, k as isValidationError, l as AuthUserRecordExistsError, m as DuplicateAuthUserError, p as CreditLimitError, r as assertBrowserSafe, s as AuthError, t as REOPT_BASE_URLS, u as BadRequestError, v as ModelNotFoundError, w as ValidationError, x as ReoptSDKError, y as NotFoundError } from "./config-D31PK7eu.js";
2
+ import { t as BaseHttpClient } from "./http-client-D1vuc20o.js";
3
+ import { n as createReoptAiClient } from "./client-D72MLGRY.js";
4
+ import { n as createReoptAuthClient } from "./client-D9MGqXbn.js";
5
+ import { t as createReoptCmsClient } from "./client-B0uRUF3T.js";
6
+ import { t as createReoptEavClient } from "./client-CAjqKz8i.js";
7
+ import { n as createReoptFeedbackClient } from "./client-DTWpLo8X.js";
8
+ import { n as createReoptFileClient } from "./client-C6USfykM.js";
9
+ import { n as createReoptPlansClient } from "./client-Djlg4STl.js";
10
+ import { n as createReoptPushClient } from "./client-2qKKpHVy.js";
11
+ import { n as createReoptTermsClient } from "./client-DUvf9x_b.js";
12
12
 
13
13
  //#region src/singleton.ts
14
14
  let _instance;
@@ -1,4 +1,4 @@
1
- import { n as ReoptSDKConfig } from "../config-CRytOPPl.js";
1
+ import { n as ReoptSDKConfig } from "../config-C7WQtC3l.js";
2
2
  //#region src/logout/verify.d.ts
3
3
  type VerifyLogoutTokenOptions = {
4
4
  /** 자기 OAuth client_id — logout_token `aud` 검증. 미지정 시 config/env에서 유도. */
@@ -1,4 +1,4 @@
1
- import { a as resolveIdBaseUrl, x as ReoptSDKError } from "../config-aml9oQpX.js";
1
+ import { a as resolveIdBaseUrl, x as ReoptSDKError } from "../config-D31PK7eu.js";
2
2
 
3
3
  //#region src/logout/verify.ts
4
4
  /**
@@ -1,2 +1,2 @@
1
- import { a as CheckoutStatus, c as MeterPricingMode, d as PlanInterval, f as PlanMeter, i as CheckoutSession, l as Plan, m as PlanRequiredTerms, n as createReoptPlansClient, o as CreateCheckoutInput, p as PlanMeterTier, r as CancelSubscriptionResult, s as CurrentPlan, t as ReoptPlansClient, u as PlanBillingModel } from "../client-aMR4CRB8.js";
1
+ import { a as CheckoutStatus, c as MeterPricingMode, d as PlanInterval, f as PlanMeter, i as CheckoutSession, l as Plan, m as PlanRequiredTerms, n as createReoptPlansClient, o as CreateCheckoutInput, p as PlanMeterTier, r as CancelSubscriptionResult, s as CurrentPlan, t as ReoptPlansClient, u as PlanBillingModel } from "../client-BGLDrf3N.js";
2
2
  export { type CancelSubscriptionResult, type CheckoutSession, type CheckoutStatus, type CreateCheckoutInput, type CurrentPlan, type MeterPricingMode, type Plan, type PlanBillingModel, type PlanInterval, type PlanMeter, type PlanMeterTier, type PlanRequiredTerms, ReoptPlansClient, createReoptPlansClient };
@@ -1,3 +1,3 @@
1
- import { n as createReoptPlansClient, t as ReoptPlansClient } from "../client-C_pHsPlj.js";
1
+ import { n as createReoptPlansClient, t as ReoptPlansClient } from "../client-Djlg4STl.js";
2
2
 
3
3
  export { ReoptPlansClient, createReoptPlansClient };
@@ -1,2 +1,2 @@
1
- import { a as RegisterPushTokenInput, c as UnregisterPushTokenInput, i as PushProvider, l as UnregisterPushTokenResult, n as createReoptPushClient, o as RegisterPushTokenResult, r as PushPlatform, s as RegisteredPushDevice, t as ReoptPushClient } from "../client-D6gs61w8.js";
1
+ import { a as RegisterPushTokenInput, c as UnregisterPushTokenInput, i as PushProvider, l as UnregisterPushTokenResult, n as createReoptPushClient, o as RegisterPushTokenResult, r as PushPlatform, s as RegisteredPushDevice, t as ReoptPushClient } from "../client-DfEeaOsQ.js";
2
2
  export { type PushPlatform, type PushProvider, type RegisterPushTokenInput, type RegisterPushTokenResult, type RegisteredPushDevice, ReoptPushClient, type UnregisterPushTokenInput, type UnregisterPushTokenResult, createReoptPushClient };
@@ -1,3 +1,3 @@
1
- import { n as createReoptPushClient, t as ReoptPushClient } from "../client-7PCoxVhZ.js";
1
+ import { n as createReoptPushClient, t as ReoptPushClient } from "../client-2qKKpHVy.js";
2
2
 
3
3
  export { ReoptPushClient, createReoptPushClient };
@@ -1,4 +1,4 @@
1
- import { x as ReoptSDKError } from "./config-aml9oQpX.js";
1
+ import { x as ReoptSDKError } from "./config-D31PK7eu.js";
2
2
 
3
3
  //#region src/core/query.ts
4
4
  /**
@@ -32,4 +32,4 @@ function buildQuery(params) {
32
32
 
33
33
  //#endregion
34
34
  export { buildQuery as t };
35
- //# sourceMappingURL=query-xWqtfkvR.js.map
35
+ //# sourceMappingURL=query-DyiwJX92.js.map
@@ -1,9 +1,9 @@
1
- import { C as EavEntity, D as ListRecordsQuery, M as UpsertRecordInput, N as UpsertRecordResult, O as PaginatedResponse, b as EavAttribute, j as UpdateRecordInput, m as BulkUpdateItem, v as CreateRecordInput, w as EavRecord, y as DeleteWhereInput } from "../config-CRytOPPl.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-D0eBxh8j.js";
1
+ import { C as EavEntity, D as ListRecordsQuery, M as UpsertRecordInput, N as UpsertRecordResult, O as PaginatedResponse, b as EavAttribute, j as UpdateRecordInput, m as BulkUpdateItem, v as CreateRecordInput, w as EavRecord, y as DeleteWhereInput } from "../config-C7WQtC3l.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-DPbXH8tr.js";
3
3
  import { _ as ReoptSDKError } from "../errors-CRCcErNC.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-B7rZQ8Zi.js";
6
- import { t as ReoptSDK } from "../index-CeOLGdyL.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-A4YrHjDc.js";
6
+ import { t as ReoptSDK } from "../index-CvNJ8zp1.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 = {
@@ -1,3 +1,3 @@
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-BrghN2rJ.js";
2
- import { n as createReoptTermsClient, t as ReoptTermsClient } from "../client-lk6wBu_0.js";
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-DHZ484kb.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 };
@@ -1,3 +1,3 @@
1
- import { n as createReoptTermsClient, t as ReoptTermsClient } from "../client-ByN3EQdk.js";
1
+ import { n as createReoptTermsClient, t as ReoptTermsClient } from "../client-DUvf9x_b.js";
2
2
 
3
3
  export { ReoptTermsClient, createReoptTermsClient };
@@ -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-1j_738qk.js";
2
- import { t as ReoptSDK } from "../index-CeOLGdyL.js";
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-DV_OWwx5.js";
2
+ import { t as ReoptSDK } from "../index-CvNJ8zp1.js";
3
3
  //#region src/testing/index.d.ts
4
4
  type TestSDKOptions = {
5
5
  /** EAV schema to seed entities and attributes */
@@ -6,7 +6,7 @@ import { n as EditorSpec } from "./types-BXDcoJHG.js";
6
6
  * Mirrors the response shape of `/api/v1/brandapp/{brandappId}/terms/*`.
7
7
  */
8
8
  type TermsType = "termsOfService" | "privacyPolicy" | "marketingConsent" | "custom";
9
- /** Mirrors the Prisma `BrandappTermsJurisdiction` enum. */
9
+ /** Mirrors the Prisma `BrandTermsJurisdiction` enum. */
10
10
  type TermsJurisdiction = "global" | "KR" | "US" | "EU" | "GB" | "JP" | "CN" | "BR" | "CA" | "AU";
11
11
  type TermsVersion = {
12
12
  id: string;
@@ -102,4 +102,4 @@ type ListTermsOptions = {
102
102
  };
103
103
  //#endregion
104
104
  export { CreateConsentsResult as a, TermsJurisdiction as c, TermsVersion as d, WithdrawConsentResult as f, CreateConsentsRequest as i, TermsListResponse as l, ConsentRecord as n, ListTermsOptions as o, ConsentStatus as r, TermsItem as s, ConsentInput as t, TermsType as u };
105
- //# sourceMappingURL=types-BrghN2rJ.d.ts.map
105
+ //# sourceMappingURL=types-C69OzBn6.d.ts.map
@@ -1,7 +1,7 @@
1
1
  //#region src/better-auth/types.d.ts
2
2
  declare const REOPT_PROVIDER_ID: "reopt";
3
3
  declare const REOPT_DEFAULT_SCOPES: readonly ["openid", "profile", "email"];
4
- type AdapterOperation = "create" | "findOne" | "findMany" | "update" | "updateMany" | "delete" | "deleteMany" | "count";
4
+ type AdapterOperation = "create" | "findOne" | "findMany" | "update" | "updateMany" | "delete" | "deleteMany" | "count" | "consumeOne" | "incrementOne";
5
5
  type AdapterRequestBody = {
6
6
  operation: AdapterOperation;
7
7
  model: "user" | "session" | "account" | "verification";
@@ -13,6 +13,10 @@ type AdapterRequestBody = {
13
13
  connector?: "AND" | "OR";
14
14
  }>;
15
15
  update?: Record<string, unknown>;
16
+ /** incrementOne: signed per-field deltas (`field = field + delta`) */
17
+ increment?: Record<string, number>;
18
+ /** incrementOne: absolute assignments applied in the same atomic step */
19
+ set?: Record<string, unknown>;
16
20
  select?: string[];
17
21
  limit?: number;
18
22
  offset?: number;
@@ -23,4 +27,4 @@ type AdapterRequestBody = {
23
27
  };
24
28
  //#endregion
25
29
  export { REOPT_PROVIDER_ID as i, AdapterRequestBody as n, REOPT_DEFAULT_SCOPES as r, AdapterOperation as t };
26
- //# sourceMappingURL=types-B-SMkH6s.d.ts.map
30
+ //# sourceMappingURL=types-MXLudLBP.d.ts.map
@@ -360,6 +360,13 @@ const { records, total } = await sdk.eav.records.list(entityId, {
360
360
  filters?: AttributeFilter[];
361
361
  sortBy?: string;
362
362
  sortOrder?: "asc" | "desc";
363
+ select?: string[]; // 응답 record.values에 포함할 attribute ID만 지정
364
+ });
365
+
366
+ // 목록에 필요한 값만 받기 — pagination/filter/sort 결과는 동일
367
+ const summaries = await sdk.eav.records.list(entityId, {
368
+ limit: 100,
369
+ select: [titleAttributeId, statusAttributeId, updatedAtAttributeId],
363
370
  });
364
371
  const record = await sdk.eav.records.get(entityId, recordId);
365
372
  const created = await sdk.eav.records.create(entityId, { values: { ... } });
package/docs/errors.md CHANGED
@@ -55,11 +55,11 @@ treating a transient JWKS outage as a permanently bad token). See
55
55
  | Code | Status | Class | When |
56
56
  | -------------------------- | ------ | ------------------ | ------------------------------------------------------------------------ |
57
57
  | `STORAGE_LIMIT` | 402 | `CreditLimitError` | 업로드 — 플랜 저장공간 한도 초과 (`sdk.files.usage()`로 사전 확인 가능) |
58
- | `FILE_IN_USE` | 409 | `ConflictError` | 파일 삭제 — 브랜드프론트·이메일 등에서 사용 중 (메시지에 사용처 포함) |
59
- | `FOLDER_NOT_EMPTY` | 409 | `ConflictError` | 폴더 삭제 — 파일/하위 폴더가 남아 있음 (메시지에 남은 개수 포함) |
60
- | `CONFLICT` | 409 | `ConflictError` | 폴더 생성/이동 — 같은 위치에 동명 폴더 존재 |
61
- | `CONTENT_TOO_LARGE` | 413 | `ReoptSDKError` | `readContent` — 1MB 초과 파일 |
62
- | `UNSUPPORTED_CONTENT_TYPE` | 415 | `ReoptSDKError` | `readContent` — 텍스트 계열(`text/*`, `application/json` 등)이 아닌 파일 |
58
+ | `FILE_IN_USE` | 409 | `ConflictError` | 파일 삭제 — 브랜드프론트·이메일 등에서 사용 중 (메시지에 사용처 포함) |
59
+ | `FOLDER_NOT_EMPTY` | 409 | `ConflictError` | 폴더 삭제 — 파일/하위 폴더가 남아 있음 (메시지에 남은 개수 포함) |
60
+ | `CONFLICT` | 409 | `ConflictError` | 폴더 생성/이동 — 같은 위치에 동명 폴더 존재 |
61
+ | `CONTENT_TOO_LARGE` | 413 | `ReoptSDKError` | `readContent` — 1MB 초과 파일 |
62
+ | `UNSUPPORTED_CONTENT_TYPE` | 415 | `ReoptSDKError` | `readContent` — 텍스트 계열(`text/*`, `application/json` 등)이 아닌 파일 |
63
63
 
64
64
  `STORAGE_LIMIT`·`FILE_IN_USE`·`FOLDER_NOT_EMPTY`의 메시지는 사람이 읽을 수 있는
65
65
  형태라 UI에 그대로 표면화해도 된다.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reopt-ai/brandapp-sdk",
3
- "version": "3.5.0",
3
+ "version": "4.0.0",
4
4
  "description": "Reopt Brandapp SDK — Better Auth adapter, OAuth login, and EAV client",
5
5
  "author": "Reopt",
6
6
  "license": "MIT",
@@ -111,7 +111,7 @@
111
111
  "@ai-sdk/provider": ">=4.0.0",
112
112
  "@reopt-ai/opt-editor": ">=1.0.0",
113
113
  "@tanstack/react-query": ">=5.0.0",
114
- "better-auth": "^1.6.0",
114
+ "better-auth": "^1.7.1",
115
115
  "hono": ">=4.0.0",
116
116
  "react": ">=18.0.0"
117
117
  },
@@ -136,11 +136,11 @@
136
136
  }
137
137
  },
138
138
  "devDependencies": {
139
- "@ai-sdk/provider": "4.0.4",
140
- "@reopt-ai/opt-editor": "1.1.2",
139
+ "@ai-sdk/provider": "4.0.7",
140
+ "@reopt-ai/opt-editor": "2.0.0",
141
141
  "@testing-library/react": "^16.3.2",
142
142
  "@types/node": "22.13.9",
143
- "better-auth": "^1.4.0",
143
+ "better-auth": "^1.7.1",
144
144
  "happy-dom": "^20.8.9",
145
145
  "hono": "^4.7.0",
146
146
  "tsdown": "^0.22.14",