@reopt-ai/brandapp-sdk 4.0.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 +35 -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 +22 -0
- package/dist/analytics/index.js +44 -0
- 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-DUvf9x_b.js → client-B_7XihyW.js} +2 -2
- package/dist/{client-2qKKpHVy.js → client-C1zORyWz.js} +2 -2
- package/dist/client-C3hlUyaZ.js +20 -0
- package/dist/{client-B0uRUF3T.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-CAjqKz8i.js → client-ClX0it9Z.js} +3 -3
- package/dist/client-D5F6-YYU.d.ts +24 -0
- package/dist/{client-DPbXH8tr.d.ts → client-DEY11EBB.d.ts} +2 -2
- package/dist/{client-D72MLGRY.js → client-DR5Eb36i.js} +4 -4
- package/dist/{client-DTWpLo8X.js → client-DY62Nb7m.js} +2 -2
- package/dist/{client-BTS6Ewv_.d.ts → client-DYammrtw.d.ts} +2 -2
- package/dist/{client-Djlg4STl.js → client-Dd1QpCUq.js} +2 -2
- package/dist/{client-D9MGqXbn.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-C6USfykM.js → client-oDJVL5JF.js} +3 -3
- package/dist/cms/index.d.ts +1 -1
- package/dist/cms/index.js +1 -1
- package/dist/{config-D31PK7eu.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-D1vuc20o.js → http-client-Dw_U7Wgx.js} +2 -2
- package/dist/{index-DV_OWwx5.d.ts → index-C6fyJTud.d.ts} +7 -1
- package/dist/{index-CvNJ8zp1.d.ts → index-CBPdczmp.d.ts} +13 -11
- package/dist/index.d.ts +6 -6
- package/dist/index.js +14 -12
- 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-DyiwJX92.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 +11 -2
|
@@ -90,22 +90,60 @@ type EavRecord = {
|
|
|
90
90
|
values: Record<string, unknown>;
|
|
91
91
|
createdAt: string;
|
|
92
92
|
updatedAt: string;
|
|
93
|
+
/**
|
|
94
|
+
* 낙관적 동시성 토큰 — 값 갱신(update·bulkUpdate·upsert·increments)마다 +1.
|
|
95
|
+
* `update(..., { ifVersion })`에 되돌려 보내면 그 사이 다른 쓰기가 있었을 때
|
|
96
|
+
* `PreconditionFailedError`(412)로 거부된다. brandappAuthUser 연결 엔티티는 항상 1.
|
|
97
|
+
*/
|
|
98
|
+
version: number;
|
|
99
|
+
/** TTL — 지나면 읽기·유일성 검사에서 사라지고 서버 크론이 물리 삭제한다. */
|
|
100
|
+
expiresAt: string | null;
|
|
93
101
|
};
|
|
94
102
|
type CreateRecordInput = {
|
|
95
103
|
authUserId?: string;
|
|
96
104
|
values: Record<string, unknown>;
|
|
105
|
+
/** ISO 8601 TTL. brandapp 자유 테이블 전용. */
|
|
106
|
+
expiresAt?: string;
|
|
97
107
|
};
|
|
98
108
|
type UpdateRecordInput = {
|
|
99
|
-
|
|
109
|
+
/** 병합할 값. increments·expiresAt만 보낼 때는 생략 가능. */
|
|
110
|
+
values?: Record<string, unknown>;
|
|
111
|
+
/** 읽은 `EavRecord.version`. 불일치면 412 `PreconditionFailedError`. */
|
|
112
|
+
ifVersion?: number;
|
|
113
|
+
/** number 속성 원자 가감 `{ [attributeId]: delta }` — 동시 호출이 서로를 잃지 않는다. */
|
|
114
|
+
increments?: Record<string, number>;
|
|
115
|
+
/** ISO 8601이면 TTL 설정, `null`이면 해제. */
|
|
116
|
+
expiresAt?: string | null;
|
|
100
117
|
};
|
|
101
118
|
type BulkUpdateItem = {
|
|
102
119
|
id: string;
|
|
103
120
|
values: Record<string, unknown>;
|
|
104
121
|
};
|
|
105
|
-
|
|
122
|
+
/**
|
|
123
|
+
* Every filter operator the EAV record endpoints accept.
|
|
124
|
+
*
|
|
125
|
+
* Exported as a runtime value on purpose: the type alone cannot be compared
|
|
126
|
+
* against anything at test time, and this vocabulary is a copy — the server
|
|
127
|
+
* owns it in `apps/web/server/hono/routes/brandapp-eav-schemas.ts` and this
|
|
128
|
+
* package cannot import across the deployment boundary. The copy is held to
|
|
129
|
+
* the original by `apps/web/server/mcp/__tests__/eav-filter-operator-parity.test.ts`,
|
|
130
|
+
* which reads *this* array rather than a hand-written list.
|
|
131
|
+
*/
|
|
132
|
+
declare const ATTRIBUTE_FILTER_OPERATORS: readonly ["eq", "neq", "contains", "gt", "lt", "gte", "lte", "is_null", "is_not_null", "after", "before", "in", "not_in"];
|
|
133
|
+
type AttributeFilterOperator = (typeof ATTRIBUTE_FILTER_OPERATORS)[number];
|
|
134
|
+
/** Scalar accepted inside an `in` / `not_in` list. */
|
|
135
|
+
type AttributeFilterListValue = string | number | boolean | null;
|
|
136
|
+
/** Maximum number of entries in one `in` / `not_in` list (server-enforced). */
|
|
137
|
+
declare const ATTRIBUTE_FILTER_LIST_MAX = 100;
|
|
106
138
|
type AttributeFilter = {
|
|
107
139
|
attributeId: string;
|
|
108
140
|
operator: AttributeFilterOperator;
|
|
141
|
+
/**
|
|
142
|
+
* `in` / `not_in` require a non-empty array of at most
|
|
143
|
+
* {@link ATTRIBUTE_FILTER_LIST_MAX} scalars; the server rejects an empty one
|
|
144
|
+
* with 400 rather than reading it as "no exclusions", because a `not_in: []`
|
|
145
|
+
* that silently matched everything would turn a `deleteWhere` into a wipe.
|
|
146
|
+
*/
|
|
109
147
|
value?: unknown;
|
|
110
148
|
};
|
|
111
149
|
type PaginatedResponse<T> = {
|
|
@@ -392,5 +430,5 @@ type ReoptSDKConfig<S extends SchemaDef = SchemaDef> = {
|
|
|
392
430
|
*/
|
|
393
431
|
declare function resolveBaseUrl(config: ReoptSDKConfig): string;
|
|
394
432
|
//#endregion
|
|
395
|
-
export {
|
|
396
|
-
//# sourceMappingURL=config-
|
|
433
|
+
export { ListRecordsQuery as A, EavAttribute as C, EavRecord as D, EavEntity as E, UpsertRecordInput as F, UpsertRecordResult as I, UpdateAttributeInput as M, UpdateEntityInput as N, EavSchemaLinkedTo as O, UpdateRecordInput as P, DeleteWhereInput as S, EavDataType as T, BulkUpdateItem as _, DebugLogger as a, CreateEntityInput as b, InferValues as c, ATTRIBUTE_FILTER_OPERATORS as d, AttributeFilter as f, BackfillResult as g, BackfillOptions as h, DebugLevel as i, PaginatedResponse as j, EavValidation as k, SchemaDef as l, AttributeFilterOperator as m, ReoptSDKConfig as n, AttributeDef as o, AttributeFilterListValue as p, resolveBaseUrl as r, EntityDef as s, REOPT_BASE_URLS as t, ATTRIBUTE_FILTER_LIST_MAX as u, CountRecordsQuery as v, EavAttributeOption as w, CreateRecordInput as x, CreateAttributeInput as y };
|
|
434
|
+
//# sourceMappingURL=config-D28P8iwm.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-C6fyJTud.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
|
@@ -11,6 +11,10 @@ import { randomUUID } from "node:crypto";
|
|
|
11
11
|
* Map-based storage that mirrors the production Prisma models.
|
|
12
12
|
* Supports JSON serialization for persistence across restarts.
|
|
13
13
|
*/
|
|
14
|
+
/** 만료되지 않은 레코드만 "존재"한다 — production `("expiresAt" IS NULL OR > NOW())`와 같은 술어. */
|
|
15
|
+
function isRecordAlive(record, now) {
|
|
16
|
+
return record.expiresAt === null || record.expiresAt.getTime() > now.getTime();
|
|
17
|
+
}
|
|
14
18
|
var InMemoryStore = class {
|
|
15
19
|
entities = /* @__PURE__ */ new Map();
|
|
16
20
|
attributes = /* @__PURE__ */ new Map();
|
|
@@ -53,7 +57,18 @@ var InMemoryStore = class {
|
|
|
53
57
|
return this.findMany(this.attributes, (a) => a.entityId === entityId).sort((a, b) => a.sortOrder - b.sortOrder);
|
|
54
58
|
}
|
|
55
59
|
getRecordsByEntity(entityId) {
|
|
56
|
-
|
|
60
|
+
const now = this.now();
|
|
61
|
+
return this.findMany(this.records, (r) => r.entityId === entityId && isRecordAlive(r, now));
|
|
62
|
+
}
|
|
63
|
+
/** 만료된 행 물리 삭제 — production 크론 `/api/cron/eav-record-expire` 미러. */
|
|
64
|
+
purgeExpiredRecords() {
|
|
65
|
+
const now = this.now();
|
|
66
|
+
let purged = 0;
|
|
67
|
+
for (const [id, record] of this.records) if (!isRecordAlive(record, now)) {
|
|
68
|
+
this.records.delete(id);
|
|
69
|
+
purged += 1;
|
|
70
|
+
}
|
|
71
|
+
return purged;
|
|
57
72
|
}
|
|
58
73
|
getRecordValues(recordId) {
|
|
59
74
|
return this.records.get(recordId)?.values ?? [];
|
|
@@ -227,7 +242,6 @@ var InMemoryStore = class {
|
|
|
227
242
|
* mirroring brandapp-eav-operations.ts logic.
|
|
228
243
|
*/
|
|
229
244
|
const LIMITS = {
|
|
230
|
-
ENTITIES_PER_BRANDAPP: 50,
|
|
231
245
|
ATTRIBUTES_PER_ENTITY: 100,
|
|
232
246
|
RECORDS_PER_ENTITY: 1e4,
|
|
233
247
|
/** Max records per bulk operation (matches production API). */
|
|
@@ -345,11 +359,21 @@ function compareOrderableValues(left, right, mode) {
|
|
|
345
359
|
if (typeof left === "string" && typeof right === "string") return left.localeCompare(right);
|
|
346
360
|
return null;
|
|
347
361
|
}
|
|
362
|
+
/** `eq`의 동등 규칙 한 벌 — `in`/`not_in`이 이것의 집합 확장이다(서버와 같은 구조). */
|
|
363
|
+
function equalsFilterValue(recordValue, filterValue) {
|
|
364
|
+
return serializeValue(recordValue) === serializeValue(filterValue);
|
|
365
|
+
}
|
|
348
366
|
function matchesFilter(record, filter) {
|
|
349
367
|
const { exists, value } = getRecordValue(record, filter.attributeId);
|
|
350
368
|
switch (filter.operator) {
|
|
351
|
-
case "eq": return exists &&
|
|
352
|
-
case "neq": return !exists ||
|
|
369
|
+
case "eq": return exists && equalsFilterValue(value, filter.value);
|
|
370
|
+
case "neq": return !exists || !equalsFilterValue(value, filter.value);
|
|
371
|
+
case "in":
|
|
372
|
+
if (!Array.isArray(filter.value)) return false;
|
|
373
|
+
return exists && filter.value.some((c) => equalsFilterValue(value, c));
|
|
374
|
+
case "not_in":
|
|
375
|
+
if (!Array.isArray(filter.value)) return false;
|
|
376
|
+
return !exists || !filter.value.some((c) => equalsFilterValue(value, c));
|
|
353
377
|
case "contains": return exists && serializeValue(value).includes(serializeValue(filter.value));
|
|
354
378
|
case "gt": {
|
|
355
379
|
const c = compareOrderableValues(value, filter.value, "general");
|
|
@@ -377,7 +401,7 @@ function matchesFilter(record, filter) {
|
|
|
377
401
|
}
|
|
378
402
|
case "is_null": return !exists || value === null;
|
|
379
403
|
case "is_not_null": return exists && value !== null;
|
|
380
|
-
default: return
|
|
404
|
+
default: return false;
|
|
381
405
|
}
|
|
382
406
|
}
|
|
383
407
|
function filterRecords(records, filters) {
|
|
@@ -422,7 +446,9 @@ function transformRecord(record, selectedAttributeIds) {
|
|
|
422
446
|
authUserId: record.brandappAuthUserId,
|
|
423
447
|
values,
|
|
424
448
|
createdAt: record.createdAt,
|
|
425
|
-
updatedAt: record.updatedAt
|
|
449
|
+
updatedAt: record.updatedAt,
|
|
450
|
+
version: record.version,
|
|
451
|
+
expiresAt: record.expiresAt
|
|
426
452
|
};
|
|
427
453
|
}
|
|
428
454
|
function parseFilters(filtersJson) {
|
|
@@ -455,13 +481,11 @@ function createEavRoutes(store, brandappId) {
|
|
|
455
481
|
});
|
|
456
482
|
app.post("/entities", async (c) => {
|
|
457
483
|
const body = await c.req.json();
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
}
|
|
464
|
-
}, 422);
|
|
484
|
+
const existing = store.findFirst(store.entities, (entity) => entity.brandappId === brandappId && entity.name === body.name);
|
|
485
|
+
if (existing) return c.json({
|
|
486
|
+
ok: true,
|
|
487
|
+
data: existing
|
|
488
|
+
});
|
|
465
489
|
const now = store.now();
|
|
466
490
|
const entity = {
|
|
467
491
|
id: store.generateId(),
|
|
@@ -740,6 +764,8 @@ function createEavRoutes(store, brandappId) {
|
|
|
740
764
|
brandappAuthUserId: body.authUserId ?? null,
|
|
741
765
|
createdAt: now,
|
|
742
766
|
updatedAt: now,
|
|
767
|
+
version: 1,
|
|
768
|
+
expiresAt: body.expiresAt ? new Date(body.expiresAt) : null,
|
|
743
769
|
values: Object.entries(body.values).map(([attributeId, value]) => ({
|
|
744
770
|
recordId: "",
|
|
745
771
|
attributeId,
|
|
@@ -789,7 +815,7 @@ function createEavRoutes(store, brandappId) {
|
|
|
789
815
|
}
|
|
790
816
|
}, 404);
|
|
791
817
|
const record = store.records.get(recordId);
|
|
792
|
-
if (!record || record.entityId !== entityId) return c.json({
|
|
818
|
+
if (!record || record.entityId !== entityId || !isRecordAlive(record, store.now())) return c.json({
|
|
793
819
|
ok: false,
|
|
794
820
|
error: {
|
|
795
821
|
code: "NOT_FOUND",
|
|
@@ -797,8 +823,49 @@ function createEavRoutes(store, brandappId) {
|
|
|
797
823
|
}
|
|
798
824
|
}, 404);
|
|
799
825
|
const body = await c.req.json();
|
|
800
|
-
|
|
801
|
-
|
|
826
|
+
const values = body.values ?? {};
|
|
827
|
+
const increments = body.increments ?? {};
|
|
828
|
+
const attrsById = new Map(store.getAttributesByEntity(entityId).map((a) => [a.id, a]));
|
|
829
|
+
const incrementErrors = [];
|
|
830
|
+
for (const [attributeId, delta] of Object.entries(increments)) {
|
|
831
|
+
const attr = attrsById.get(attributeId);
|
|
832
|
+
if (!attr) incrementErrors.push({
|
|
833
|
+
field: attributeId,
|
|
834
|
+
message: "존재하지 않는 속성입니다."
|
|
835
|
+
});
|
|
836
|
+
else if (attr.dataType !== "number") incrementErrors.push({
|
|
837
|
+
field: attributeId,
|
|
838
|
+
message: "increment는 number 속성에만 쓸 수 있습니다."
|
|
839
|
+
});
|
|
840
|
+
if (!Number.isFinite(delta)) incrementErrors.push({
|
|
841
|
+
field: attributeId,
|
|
842
|
+
message: "increment 값은 유한한 숫자여야 합니다."
|
|
843
|
+
});
|
|
844
|
+
if (attributeId in values) incrementErrors.push({
|
|
845
|
+
field: attributeId,
|
|
846
|
+
message: "values와 increments에 같은 속성을 넣을 수 없습니다."
|
|
847
|
+
});
|
|
848
|
+
}
|
|
849
|
+
if (incrementErrors.length > 0) return c.json({
|
|
850
|
+
ok: false,
|
|
851
|
+
error: {
|
|
852
|
+
code: "VALIDATION_ERROR",
|
|
853
|
+
message: `increments 검증 실패: ${incrementErrors.map((e) => `${e.field}: ${e.message}`).join("; ")}`,
|
|
854
|
+
fields: incrementErrors
|
|
855
|
+
}
|
|
856
|
+
}, 422);
|
|
857
|
+
if (body.ifVersion !== void 0 && record.version !== body.ifVersion) return c.json({
|
|
858
|
+
ok: false,
|
|
859
|
+
error: {
|
|
860
|
+
code: "PRECONDITION_FAILED",
|
|
861
|
+
message: `Record version is ${record.version}, expected ${body.ifVersion}`
|
|
862
|
+
}
|
|
863
|
+
}, 412);
|
|
864
|
+
if (!(Object.keys(values).length > 0 || Object.keys(increments).length > 0 || body.expiresAt !== void 0)) return c.json({
|
|
865
|
+
ok: true,
|
|
866
|
+
data: transformRecord(record)
|
|
867
|
+
});
|
|
868
|
+
const setValue = (attributeId, serialized) => {
|
|
802
869
|
const existing = record.values.find((v) => v.attributeId === attributeId);
|
|
803
870
|
if (existing) existing.value = serialized;
|
|
804
871
|
else record.values.push({
|
|
@@ -806,7 +873,15 @@ function createEavRoutes(store, brandappId) {
|
|
|
806
873
|
attributeId,
|
|
807
874
|
value: serialized
|
|
808
875
|
});
|
|
876
|
+
};
|
|
877
|
+
for (const [attributeId, value] of Object.entries(values)) setValue(attributeId, typeof value === "string" ? value : JSON.stringify(value));
|
|
878
|
+
for (const [attributeId, delta] of Object.entries(increments)) {
|
|
879
|
+
const current = record.values.find((v) => v.attributeId === attributeId);
|
|
880
|
+
const parsed = current ? Number(current.value) : 0;
|
|
881
|
+
setValue(attributeId, JSON.stringify((Number.isFinite(parsed) ? parsed : 0) + delta));
|
|
809
882
|
}
|
|
883
|
+
if (body.expiresAt !== void 0) record.expiresAt = body.expiresAt ? new Date(body.expiresAt) : null;
|
|
884
|
+
record.version += 1;
|
|
810
885
|
record.updatedAt = store.now();
|
|
811
886
|
return c.json({
|
|
812
887
|
ok: true,
|
|
@@ -899,6 +974,8 @@ function createEavRoutes(store, brandappId) {
|
|
|
899
974
|
brandappAuthUserId: r.authUserId ?? null,
|
|
900
975
|
createdAt: now,
|
|
901
976
|
updatedAt: now,
|
|
977
|
+
version: 1,
|
|
978
|
+
expiresAt: null,
|
|
902
979
|
values: Object.entries(r.values).map(([attributeId, value]) => ({
|
|
903
980
|
recordId: "",
|
|
904
981
|
attributeId,
|
|
@@ -947,6 +1024,7 @@ function createEavRoutes(store, brandappId) {
|
|
|
947
1024
|
});
|
|
948
1025
|
}
|
|
949
1026
|
record.updatedAt = store.now();
|
|
1027
|
+
record.version += 1;
|
|
950
1028
|
results.push(transformRecord(record));
|
|
951
1029
|
}
|
|
952
1030
|
return c.json({
|
|
@@ -1022,6 +1100,7 @@ function createEavRoutes(store, brandappId) {
|
|
|
1022
1100
|
});
|
|
1023
1101
|
}
|
|
1024
1102
|
matched.updatedAt = store.now();
|
|
1103
|
+
matched.version += 1;
|
|
1025
1104
|
return c.json({
|
|
1026
1105
|
ok: true,
|
|
1027
1106
|
data: {
|
|
@@ -1047,6 +1126,8 @@ function createEavRoutes(store, brandappId) {
|
|
|
1047
1126
|
brandappAuthUserId: body.authUserId ?? null,
|
|
1048
1127
|
createdAt: now,
|
|
1049
1128
|
updatedAt: now,
|
|
1129
|
+
version: 1,
|
|
1130
|
+
expiresAt: null,
|
|
1050
1131
|
values: Object.entries(body.values).map(([attributeId, value]) => ({
|
|
1051
1132
|
recordId: "",
|
|
1052
1133
|
attributeId,
|
|
@@ -3091,6 +3172,8 @@ async function createDevServer(options = {}) {
|
|
|
3091
3172
|
brandappAuthUserId: r.authUserId ?? null,
|
|
3092
3173
|
createdAt: now,
|
|
3093
3174
|
updatedAt: now,
|
|
3175
|
+
version: 1,
|
|
3176
|
+
expiresAt: null,
|
|
3094
3177
|
values: buildSeedValues("", r.values)
|
|
3095
3178
|
};
|
|
3096
3179
|
record.values.forEach((v) => v.recordId = record.id);
|
package/dist/eav/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { c as DuplicateAuthUserError, f as LimitExceededError, n as AuthUserNotFoundError, r as AuthUserRecordExistsError } from "../errors-
|
|
3
|
-
import { i as TypedEavRecord, n as createReoptEavClient, r as EntityClient, t as ReoptEavClient } from "../client-
|
|
1
|
+
import { A as ListRecordsQuery, C as EavAttribute, D as EavRecord, E as EavEntity, F as UpsertRecordInput, I as UpsertRecordResult, M as UpdateAttributeInput, N as UpdateEntityInput, O as EavSchemaLinkedTo, P as UpdateRecordInput, S as DeleteWhereInput, T as EavDataType, _ as BulkUpdateItem, b as CreateEntityInput, d as ATTRIBUTE_FILTER_OPERATORS, f as AttributeFilter, j as PaginatedResponse, k as EavValidation, m as AttributeFilterOperator, n as ReoptSDKConfig, p as AttributeFilterListValue, u as ATTRIBUTE_FILTER_LIST_MAX, v as CountRecordsQuery, w as EavAttributeOption, x as CreateRecordInput, y as CreateAttributeInput } from "../config-D28P8iwm.js";
|
|
2
|
+
import { c as DuplicateAuthUserError, f as LimitExceededError, n as AuthUserNotFoundError, r as AuthUserRecordExistsError } from "../errors-BnIRV-Px.js";
|
|
3
|
+
import { i as TypedEavRecord, n as createReoptEavClient, r as EntityClient, t as ReoptEavClient } from "../client-DjgoTlfv.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
|
|
@@ -134,6 +134,15 @@ declare class FilterExpression {
|
|
|
134
134
|
eq(value: unknown): AttributeFilter;
|
|
135
135
|
/** 값이 다른 레코드 */
|
|
136
136
|
neq(value: unknown): AttributeFilter;
|
|
137
|
+
/**
|
|
138
|
+
* 값이 목록 안에 있는 레코드 (`eq`의 집합 확장)
|
|
139
|
+
*
|
|
140
|
+
* 🔴 빈 목록은 서버가 400으로 거절한다 — `[]`를 "조건 없음"으로 읽으면 필터를 건
|
|
141
|
+
* 줄 아는 호출부에 무필터 결과가 간다. 제외가 없으면 필터를 **빼야** 한다.
|
|
142
|
+
*/
|
|
143
|
+
in(values: readonly AttributeFilterListValue[]): AttributeFilter;
|
|
144
|
+
/** 값이 목록에 없는 레코드 (`neq`의 집합 확장 — 값이 없는 레코드도 포함된다) */
|
|
145
|
+
notIn(values: readonly AttributeFilterListValue[]): AttributeFilter;
|
|
137
146
|
/** 값에 문자열을 포함하는 레코드 */
|
|
138
147
|
contains(value: string): AttributeFilter;
|
|
139
148
|
/** 값이 큰 레코드 (숫자) */
|
|
@@ -182,5 +191,5 @@ declare function where(attributeNameOrId: string): FilterExpression;
|
|
|
182
191
|
*/
|
|
183
192
|
declare function createFilterBuilder<T extends Record<string, string>>(attributeIdMap: T): (name: keyof T & string) => FilterExpression;
|
|
184
193
|
//#endregion
|
|
185
|
-
export { type AttributeFilter, type AttributeFilterOperator, AuthUserNotFoundError, AuthUserRecordExistsError, type BulkUpdateItem, type CanonicalEavField, type CanonicalEavSchema, type CountRecordsQuery, type CreateAttributeInput, type CreateEntityInput, type CreateRecordInput, type DeleteWhereInput, DuplicateAuthUserError, type EavAttribute, type EavAttributeOption, type EavDataType, type EavEntity, type EavRecord, type EavSchemaLinkedTo, type EavValidation, type EntityClient, FilterExpression, LimitExceededError, type ListRecordsQuery, type PaginatedResponse, type ReoptEavClient, type ReoptSDKConfig, type TypedEavRecord, type UpdateAttributeInput, type UpdateEntityInput, type UpdateRecordInput, type UpsertRecordInput, type UpsertRecordResult, type VerifyEavSchemaInput, type VerifyEavSchemaResult, canonicalizeEavSchemas, collectAll, computeEavSchemaHash, createFilterBuilder, createReoptEavClient, hashCanonicalString, verifyEavSchema, where };
|
|
194
|
+
export { ATTRIBUTE_FILTER_LIST_MAX, ATTRIBUTE_FILTER_OPERATORS, type AttributeFilter, type AttributeFilterListValue, type AttributeFilterOperator, AuthUserNotFoundError, AuthUserRecordExistsError, type BulkUpdateItem, type CanonicalEavField, type CanonicalEavSchema, type CountRecordsQuery, type CreateAttributeInput, type CreateEntityInput, type CreateRecordInput, type DeleteWhereInput, DuplicateAuthUserError, type EavAttribute, type EavAttributeOption, type EavDataType, type EavEntity, type EavRecord, type EavSchemaLinkedTo, type EavValidation, type EntityClient, FilterExpression, LimitExceededError, type ListRecordsQuery, type PaginatedResponse, type ReoptEavClient, type ReoptSDKConfig, type TypedEavRecord, type UpdateAttributeInput, type UpdateEntityInput, type UpdateRecordInput, type UpsertRecordInput, type UpsertRecordResult, type VerifyEavSchemaInput, type VerifyEavSchemaResult, canonicalizeEavSchemas, collectAll, computeEavSchemaHash, createFilterBuilder, createReoptEavClient, hashCanonicalString, verifyEavSchema, where };
|
|
186
195
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/eav/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as AuthUserNotFoundError, g as LimitExceededError, l as AuthUserRecordExistsError, m as DuplicateAuthUserError } from "../config-
|
|
2
|
-
import { t as createReoptEavClient } from "../client-
|
|
1
|
+
import { c as AuthUserNotFoundError, g as LimitExceededError, l as AuthUserRecordExistsError, m as DuplicateAuthUserError } from "../config-BrJAy95F.js";
|
|
2
|
+
import { t as createReoptEavClient } from "../client-ClX0it9Z.js";
|
|
3
3
|
|
|
4
4
|
//#region src/eav/verify.ts
|
|
5
5
|
async function verifyEavSchema(input) {
|
|
@@ -63,6 +63,36 @@ async function computeEavSchemaHash(schemas) {
|
|
|
63
63
|
return hashCanonicalString(canonicalizeEavSchemas(schemas));
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/eav/types.ts
|
|
68
|
+
/**
|
|
69
|
+
* Every filter operator the EAV record endpoints accept.
|
|
70
|
+
*
|
|
71
|
+
* Exported as a runtime value on purpose: the type alone cannot be compared
|
|
72
|
+
* against anything at test time, and this vocabulary is a copy — the server
|
|
73
|
+
* owns it in `apps/web/server/hono/routes/brandapp-eav-schemas.ts` and this
|
|
74
|
+
* package cannot import across the deployment boundary. The copy is held to
|
|
75
|
+
* the original by `apps/web/server/mcp/__tests__/eav-filter-operator-parity.test.ts`,
|
|
76
|
+
* which reads *this* array rather than a hand-written list.
|
|
77
|
+
*/
|
|
78
|
+
const ATTRIBUTE_FILTER_OPERATORS = [
|
|
79
|
+
"eq",
|
|
80
|
+
"neq",
|
|
81
|
+
"contains",
|
|
82
|
+
"gt",
|
|
83
|
+
"lt",
|
|
84
|
+
"gte",
|
|
85
|
+
"lte",
|
|
86
|
+
"is_null",
|
|
87
|
+
"is_not_null",
|
|
88
|
+
"after",
|
|
89
|
+
"before",
|
|
90
|
+
"in",
|
|
91
|
+
"not_in"
|
|
92
|
+
];
|
|
93
|
+
/** Maximum number of entries in one `in` / `not_in` list (server-enforced). */
|
|
94
|
+
const ATTRIBUTE_FILTER_LIST_MAX = 100;
|
|
95
|
+
|
|
66
96
|
//#endregion
|
|
67
97
|
//#region src/eav/helpers.ts
|
|
68
98
|
/**
|
|
@@ -101,6 +131,19 @@ var FilterExpression = class {
|
|
|
101
131
|
neq(value) {
|
|
102
132
|
return this.make("neq", value);
|
|
103
133
|
}
|
|
134
|
+
/**
|
|
135
|
+
* 값이 목록 안에 있는 레코드 (`eq`의 집합 확장)
|
|
136
|
+
*
|
|
137
|
+
* 🔴 빈 목록은 서버가 400으로 거절한다 — `[]`를 "조건 없음"으로 읽으면 필터를 건
|
|
138
|
+
* 줄 아는 호출부에 무필터 결과가 간다. 제외가 없으면 필터를 **빼야** 한다.
|
|
139
|
+
*/
|
|
140
|
+
in(values) {
|
|
141
|
+
return this.make("in", [...values]);
|
|
142
|
+
}
|
|
143
|
+
/** 값이 목록에 없는 레코드 (`neq`의 집합 확장 — 값이 없는 레코드도 포함된다) */
|
|
144
|
+
notIn(values) {
|
|
145
|
+
return this.make("not_in", [...values]);
|
|
146
|
+
}
|
|
104
147
|
/** 값에 문자열을 포함하는 레코드 */
|
|
105
148
|
contains(value) {
|
|
106
149
|
return this.make("contains", value);
|
|
@@ -176,5 +219,5 @@ function createFilterBuilder(attributeIdMap) {
|
|
|
176
219
|
}
|
|
177
220
|
|
|
178
221
|
//#endregion
|
|
179
|
-
export { AuthUserNotFoundError, AuthUserRecordExistsError, DuplicateAuthUserError, FilterExpression, LimitExceededError, canonicalizeEavSchemas, collectAll, computeEavSchemaHash, createFilterBuilder, createReoptEavClient, hashCanonicalString, verifyEavSchema, where };
|
|
222
|
+
export { ATTRIBUTE_FILTER_LIST_MAX, ATTRIBUTE_FILTER_OPERATORS, AuthUserNotFoundError, AuthUserRecordExistsError, DuplicateAuthUserError, FilterExpression, LimitExceededError, canonicalizeEavSchemas, collectAll, computeEavSchemaHash, createFilterBuilder, createReoptEavClient, hashCanonicalString, verifyEavSchema, where };
|
|
180
223
|
//# sourceMappingURL=index.js.map
|
package/dist/eav/migrate.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as AttributeDef, s as EntityDef } from "../config-
|
|
2
|
-
import { t as ReoptEavClient } from "../client-
|
|
1
|
+
import { o as AttributeDef, s as EntityDef } from "../config-D28P8iwm.js";
|
|
2
|
+
import { t as ReoptEavClient } from "../client-DjgoTlfv.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`.
|
|
@@ -96,7 +96,7 @@ type MigrationRunResult = {
|
|
|
96
96
|
* Mirrors `apps/web/server/hono/routes/brandapp-migrations-schemas.ts`'s
|
|
97
97
|
* `MigrationOperation`. Sent to `POST /v1/brandapp/{id}/migrations/apply`
|
|
98
98
|
* where the server applies the whole array inside a single
|
|
99
|
-
*
|
|
99
|
+
* server-side database transaction (Phase A.5 atomicity, RFC-0005 ADR-2).
|
|
100
100
|
*
|
|
101
101
|
* `records.*` calls are NOT represented here — they execute immediately and
|
|
102
102
|
* outside the transaction.
|
|
@@ -218,7 +218,7 @@ type CollectMigrationResult = {
|
|
|
218
218
|
* Run a migration's `up`/`down` function with a buffering schema client so
|
|
219
219
|
* the consumer can apply the whole operation set atomically (e.g. via the
|
|
220
220
|
* server's `POST /v1/brandapp/{id}/migrations/apply` route, which wraps the
|
|
221
|
-
* whole array in
|
|
221
|
+
* whole array in one server-side database transaction).
|
|
222
222
|
*
|
|
223
223
|
* Key differences vs. `runMigration`:
|
|
224
224
|
* - **Schema ops are buffered, not sent.** The returned `operations` array
|
package/dist/eav/migrate.js
CHANGED
|
@@ -168,7 +168,7 @@ async function runMigration(eav, migration, opts) {
|
|
|
168
168
|
* Run a migration's `up`/`down` function with a buffering schema client so
|
|
169
169
|
* the consumer can apply the whole operation set atomically (e.g. via the
|
|
170
170
|
* server's `POST /v1/brandapp/{id}/migrations/apply` route, which wraps the
|
|
171
|
-
* whole array in
|
|
171
|
+
* whole array in one server-side database transaction).
|
|
172
172
|
*
|
|
173
173
|
* Key differences vs. `runMigration`:
|
|
174
174
|
* - **Schema ops are buffered, not sent.** The returned `operations` array
|
package/dist/eav/schema.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { t as ReoptEavClient } from "../client-
|
|
1
|
+
import { C as EavAttribute, E as EavEntity, T as EavDataType, c as InferValues, l as SchemaDef, o as AttributeDef, s as EntityDef } from "../config-D28P8iwm.js";
|
|
2
|
+
import { t as ReoptEavClient } from "../client-DjgoTlfv.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>;
|
|
@@ -77,6 +77,13 @@ declare class DuplicateAuthUserError extends ConflictError {
|
|
|
77
77
|
constructor(message?: string, context?: ReoptSDKErrorContext);
|
|
78
78
|
}
|
|
79
79
|
/** 참조한 brandappAuthUser가 이 brandapp에 존재하지 않음. status는 호출 경로에 따라 400 또는 422. */
|
|
80
|
+
/**
|
|
81
|
+
* 412 — `update(..., { ifVersion })`의 version이 현재와 다르다. 레코드를 다시 읽어
|
|
82
|
+
* 새 `version`으로 재시도할 것(CAS 루프).
|
|
83
|
+
*/
|
|
84
|
+
declare class PreconditionFailedError extends ReoptSDKError {
|
|
85
|
+
constructor(message: string, context?: ReoptSDKErrorContext);
|
|
86
|
+
}
|
|
80
87
|
declare class AuthUserNotFoundError extends ReoptSDKError {
|
|
81
88
|
constructor(message?: string, status?: 400 | 422, context?: ReoptSDKErrorContext);
|
|
82
89
|
}
|
|
@@ -178,5 +185,5 @@ declare function isModelAccessError(error: unknown): error is ModelAccessError;
|
|
|
178
185
|
*/
|
|
179
186
|
declare function mapHttpStatusToError(status: number, code: string | undefined, message: string | undefined, ctx?: ReoptSDKErrorContext, fieldErrors?: FieldError[]): ReoptSDKError;
|
|
180
187
|
//#endregion
|
|
181
|
-
export {
|
|
182
|
-
//# sourceMappingURL=errors-
|
|
188
|
+
export { isCreditLimitError as C, isValidationError as D, isRequiredTermsError as E, mapHttpStatusToError as O, ValidationError as S, isReoptSDKError as T, RateLimitError as _, ConflictError as a, RequiredTermsError as b, DuplicateAuthUserError as c, ForbiddenError as d, LimitExceededError as f, PreconditionFailedError as g, NotFoundError as h, BadRequestError as i, ErrorDiagnostic as l, ModelNotFoundError as m, AuthUserNotFoundError as n, ContentFilterError as o, ModelAccessError as p, AuthUserRecordExistsError as r, CreditLimitError as s, AuthError as t, FieldError as u, ReoptSDKError as v, isModelAccessError as w, ServerError as x, ReoptSDKErrorContext as y };
|
|
189
|
+
//# sourceMappingURL=errors-BnIRV-Px.d.ts.map
|
package/dist/feedback/index.d.ts
CHANGED
|
@@ -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-
|
|
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-CeYaCY1n.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 };
|
package/dist/feedback/index.js
CHANGED
package/dist/files/index.d.ts
CHANGED
|
@@ -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-
|
|
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-BOEyVc8V.js";
|
|
2
2
|
//#region src/files/helpers.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* 이미지 URL 헬퍼 — Next.js `<Image>`와 결합해 사용.
|
package/dist/files/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as ReoptSDKError, a as resolveIdBaseUrl, i as resolveBaseUrl, j as mapHttpStatusToError, n as SDK_VERSION, o as validateConfig, w as ServerError, x as RateLimitError } from "./config-BrJAy95F.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-
|
|
386
|
+
//# sourceMappingURL=http-client-Dw_U7Wgx.js.map
|
|
@@ -40,6 +40,10 @@ type DevRecord = {
|
|
|
40
40
|
createdAt: Date;
|
|
41
41
|
updatedAt: Date;
|
|
42
42
|
values: DevValue[];
|
|
43
|
+
/** 서버 미러 — 값 갱신마다 +1 (production API의 `version`). */
|
|
44
|
+
version: number;
|
|
45
|
+
/** 서버 미러 — 지나면 조회·유일성 검사에서 제외(production API의 `expiresAt`). */
|
|
46
|
+
expiresAt: Date | null;
|
|
43
47
|
};
|
|
44
48
|
type DevAuthUser = {
|
|
45
49
|
id: string;
|
|
@@ -247,6 +251,8 @@ declare class InMemoryStore {
|
|
|
247
251
|
getEntitiesByBrandapp(brandappId: string): DevEntity[];
|
|
248
252
|
getAttributesByEntity(entityId: string): DevAttribute[];
|
|
249
253
|
getRecordsByEntity(entityId: string): DevRecord[];
|
|
254
|
+
/** 만료된 행 물리 삭제 — production 크론 `/api/cron/eav-record-expire` 미러. */
|
|
255
|
+
purgeExpiredRecords(): number;
|
|
250
256
|
getRecordValues(recordId: string): DevValue[];
|
|
251
257
|
/**
|
|
252
258
|
* Produce a snapshot that is safe to mutate without affecting the store.
|
|
@@ -467,4 +473,4 @@ type DevServer = {
|
|
|
467
473
|
declare function createDevServer(options?: DevServerOptions): Promise<DevServer>;
|
|
468
474
|
//#endregion
|
|
469
475
|
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-
|
|
476
|
+
//# sourceMappingURL=index-C6fyJTud.d.ts.map
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { l as SchemaDef, n as ReoptSDKConfig } from "./config-
|
|
2
|
-
import { t as ReoptAiClient } from "./client-
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
1
|
+
import { l as SchemaDef, n as ReoptSDKConfig } from "./config-D28P8iwm.js";
|
|
2
|
+
import { t as ReoptAiClient } from "./client-DEY11EBB.js";
|
|
3
|
+
import { t as ReoptAnalyticsClient } from "./client-D5F6-YYU.js";
|
|
4
|
+
import { t as ReoptAuthClient } from "./client-CNPfjmT0.js";
|
|
5
|
+
import { t as ReoptCmsClient } from "./client-DYammrtw.js";
|
|
6
|
+
import { t as ReoptEavClient } from "./client-DjgoTlfv.js";
|
|
7
|
+
import { t as ReoptFeedbackClient } from "./client-CeYaCY1n.js";
|
|
8
|
+
import { t as ReoptFileClient } from "./client-BOEyVc8V.js";
|
|
9
|
+
import { t as ReoptPlansClient } from "./client-CRim5LCH.js";
|
|
10
|
+
import { t as ReoptPushClient } from "./client-bXAnGNzC.js";
|
|
11
|
+
import { t as ReoptTermsClient } from "./client-BBxhqs8l.js";
|
|
11
12
|
//#region src/core/http-client.d.ts
|
|
12
13
|
type FetchOptions = {
|
|
13
14
|
/** Abort the request via an external AbortSignal (merged with timeout signal). */
|
|
@@ -154,6 +155,7 @@ type ReoptSDK<S extends SchemaDef = SchemaDef> = {
|
|
|
154
155
|
debug: NonNullable<ReoptSDKConfig["debug"]>;
|
|
155
156
|
};
|
|
156
157
|
ai: ReoptAiClient;
|
|
158
|
+
analytics: ReoptAnalyticsClient;
|
|
157
159
|
auth: ReoptAuthClient;
|
|
158
160
|
cms: ReoptCmsClient;
|
|
159
161
|
eav: ReoptEavClient<S>;
|
|
@@ -166,4 +168,4 @@ type ReoptSDK<S extends SchemaDef = SchemaDef> = {
|
|
|
166
168
|
declare function createReoptSDK<S extends SchemaDef = SchemaDef>(config: ReoptSDKConfig<S>): ReoptSDK<S>;
|
|
167
169
|
//#endregion
|
|
168
170
|
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-
|
|
171
|
+
//# sourceMappingURL=index-CBPdczmp.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-
|
|
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-
|
|
3
|
-
import { C as
|
|
4
|
-
import { i as TypedEavRecord, r as EntityClient } from "./client-
|
|
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-
|
|
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 };
|
|
1
|
+
import { a as DebugLogger, i as DebugLevel, n as ReoptSDKConfig, r as resolveBaseUrl, t as REOPT_BASE_URLS } from "./config-D28P8iwm.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-DEY11EBB.js";
|
|
3
|
+
import { C as isCreditLimitError, D as isValidationError, E as isRequiredTermsError, O as mapHttpStatusToError, S as ValidationError, T as isReoptSDKError, _ as RateLimitError, a as ConflictError, b as RequiredTermsError, c as DuplicateAuthUserError, d as ForbiddenError, f as LimitExceededError, g as PreconditionFailedError, 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 ReoptSDKError, w as isModelAccessError, x as ServerError, y as ReoptSDKErrorContext } from "./errors-BnIRV-Px.js";
|
|
4
|
+
import { i as TypedEavRecord, r as EntityClient } from "./client-DjgoTlfv.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-CBPdczmp.js";
|
|
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, PreconditionFailedError, 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 };
|