@reopt-ai/brandapp-sdk 4.7.0-rc.3 → 4.7.0-rc.4

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 (37) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/ai/index.js +1 -1
  3. package/dist/ai-provider/index.js +1 -1
  4. package/dist/analytics/index.js +1 -1
  5. package/dist/auth/index.js +1 -1
  6. package/dist/better-auth/index.js +2 -2
  7. package/dist/{client-C09GqOsD.js → client-BIO9amcp.js} +2 -2
  8. package/dist/{client-2CaNRYKb.js → client-BPLSaCrs.js} +51 -12
  9. package/dist/{client-Dzux9iCO.js → client-BojYI4jP.js} +4 -4
  10. package/dist/{client-D6WGQQw8.js → client-CD8WQsmF.js} +2 -2
  11. package/dist/{client-BwFaLqeU.js → client-CQmuEZik.js} +2 -2
  12. package/dist/{client-CnVCMyEO.js → client-Cj92U3fu.js} +2 -2
  13. package/dist/{client-DWUvj6iA.js → client-DAyfkqrY.js} +3 -3
  14. package/dist/{client-DHrZcdxq.js → client-DTFxSfCG.js} +3 -3
  15. package/dist/{client-BeNi8CJ8.js → client-DrxN768l.js} +3 -3
  16. package/dist/{client-COD-OtO6.js → client-GSy6AKsZ.js} +2 -2
  17. package/dist/{client-Cezzpa3v.js → client-ZmjLpkjt.js} +2 -2
  18. package/dist/{client-xycvTLR7.js → client-ywlujscY.js} +2 -2
  19. package/dist/cms/index.js +1 -1
  20. package/dist/{config-CCPAE9xX.js → config-DKINyq4g.js} +2 -2
  21. package/dist/eav/index.js +2 -2
  22. package/dist/feedback/index.js +1 -1
  23. package/dist/files/index.js +1 -1
  24. package/dist/{http-client-BTrQ0KrQ.js → http-client-aggnrSsb.js} +2 -2
  25. package/dist/index.js +12 -12
  26. package/dist/installation/index.d.ts +5 -1
  27. package/dist/installation/index.js +14 -9
  28. package/dist/logout/index.js +1 -1
  29. package/dist/machine/index.js +1 -1
  30. package/dist/plans/index.js +1 -1
  31. package/dist/push/index.js +1 -1
  32. package/dist/{query-BTPb66iO.js → query-BFqEr2OW.js} +2 -2
  33. package/dist/terms/index.js +1 -1
  34. package/dist/workspace/index.js +1 -1
  35. package/docs/api-reference.md +7 -0
  36. package/docs/errors.md +16 -0
  37. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,33 @@ This project adheres to [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [4.7.0-rc.4] — 2026-10-14
11
+
12
+ Pre-release (`npm i @reopt-ai/brandapp-sdk@next`) — EAV `listAll()` 커서 훑기와 설치 back-channel 재생 거절 보강.
13
+
14
+ ### Changed
15
+
16
+ - **`eav.records.listAll()`이 커서로 훑는다.** 번호 페이지로 훑으면 필터가 있을 때 서버가 페이지마다 조건에 맞는 행
17
+ 전체를 다시 읽어 그 페이지만 잘랐다 — 훑는 비용이 행 수의 제곱이었다. 이제 `GET …/records?cursor=`로 앞 페이지의
18
+ 마지막 자리 다음부터 그 페이지 분량만 읽는다. 호출부는 바꿀 것이 없다(`backfill()`·typed `entity().listAll()` 포함).
19
+ - 정렬이 `createdAt`(기본)·`updatedAt`일 때만 커서를 쓴다. 커스텀 속성 정렬은 종전대로 번호 페이지다.
20
+ - 커서를 모르는 서버(이전 버전의 reopt, 로컬 dev 서버)는 `cursor`를 무시하고 1페이지를 주므로, 그때는 2페이지부터
21
+ 번호로 이어 간다 — 결과는 같다.
22
+ - 같은 정렬 키를 가진 행들의 순서는 커서 방식에서 id가 정한다(번호 페이지는 createdAt → id). `updatedAt` 정렬로
23
+ 훑는 도중 갱신된 행은 자리를 옮기므로, 전 행을 정확히 한 번씩 읽어야 하면 기본값인 `createdAt`을 쓴다.
24
+ - SQL로 좁혀지지 않는 필터(`neq`·`not_in`·`after`·`before`)로 큰 엔티티를 훑어도 `QUERY_TOO_BROAD`(422)가 나지
25
+ 않는다 — 서버가 요청 한 건이 읽는 행 수를 묶고 커서로 이어 준다.
26
+ - 새 에러 코드 `CURSOR_SCAN_INTERRUPTED`(훑는 도중 커서를 모르는 인스턴스가 응답 — 처음부터 다시),
27
+ `CURSOR_SCAN_STALLED`(서버가 커서를 전진시키지 않음).
28
+
29
+ ### Fixed
30
+
31
+ - **`createInstallationBackchannelHandler`의 재생 거절에 빈틈이 있었다.** 통지의 jti를 `exp`까지만 기억했는데 검증은
32
+ `clockToleranceSeconds`(기본 60초)만큼 더 받아 주므로, `exp` 직후 그 시간 동안은 같은 통지가 다시 통과했다. 이제
33
+ 받아 줄 수 있는 마지막 순간(`exp + clockTolerance`)까지 기억한다.
34
+ - `createMemoryBackchannelReplayStore(now?)` — 시계를 받는다. 핸들러의 `now` 옵션이 기본 메모리 저장소에도 적용돼
35
+ 만료 판정과 기억을 지우는 시점이 같은 시계를 본다(예전에는 저장소만 실제 시계를 봤다).
36
+
10
37
  ## [4.7.0-rc.3] — 2026-10-11
11
38
 
12
39
  Pre-release (`npm i @reopt-ai/brandapp-sdk@next`) — RFC-0034 2·3단계: 리소스 서버 검증기와 운영자 가드.
package/dist/ai/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { n as createReoptAiClient, t as ReoptAiClient } from "../client-Dzux9iCO.js";
1
+ import { n as createReoptAiClient, t as ReoptAiClient } from "../client-BojYI4jP.js";
2
2
 
3
3
  export { ReoptAiClient, createReoptAiClient };
@@ -1,4 +1,4 @@
1
- import { i as resolveBaseUrl, j as mapHttpStatusToError, n as SDK_VERSION, o as validateConfig, r as assertBrowserSafe } from "../config-CCPAE9xX.js";
1
+ import { i as resolveBaseUrl, j as mapHttpStatusToError, n as SDK_VERSION, o as validateConfig, r as assertBrowserSafe } from "../config-DKINyq4g.js";
2
2
  import { t as createManagedAbort } from "../abort--nOBFN4M.js";
3
3
  import { t as createAuthHeader } from "../encoding-Bwfm3iaE.js";
4
4
  import { t as createSSELineProcessor } from "../sse-parser-FMjxM7sY.js";
@@ -1,4 +1,4 @@
1
- import { n as createReoptAnalyticsClient, t as ReoptAnalyticsClient } from "../client-xycvTLR7.js";
1
+ import { n as createReoptAnalyticsClient, t as ReoptAnalyticsClient } from "../client-ywlujscY.js";
2
2
  import { getInstance, identify, init, pageView, setConsent, track } from "@reopt-ai/data-sdk";
3
3
 
4
4
  //#region src/analytics/browser.ts
@@ -1,4 +1,4 @@
1
- import { n as createReoptAuthClient, t as ReoptAuthClient } from "../client-C09GqOsD.js";
1
+ import { n as createReoptAuthClient, t as ReoptAuthClient } from "../client-BIO9amcp.js";
2
2
 
3
3
  //#region src/auth/session.ts
4
4
  /**
@@ -1,5 +1,5 @@
1
- import { O as isReoptSDKError, S as ReoptSDKError, a as resolveIdBaseUrl, s as AuthError, t as REOPT_BASE_URLS, w as ServerError, x as RateLimitError } from "../config-CCPAE9xX.js";
2
- import { t as BaseHttpClient } from "../http-client-BTrQ0KrQ.js";
1
+ import { O as isReoptSDKError, S as ReoptSDKError, a as resolveIdBaseUrl, s as AuthError, t as REOPT_BASE_URLS, w as ServerError, x as RateLimitError } from "../config-DKINyq4g.js";
2
+ import { t as BaseHttpClient } from "../http-client-aggnrSsb.js";
3
3
  import { o as readClientKeyRing } from "../keys-B_R_lsyF.js";
4
4
  import { a as STEP_UP_MAX_AUTH_AGE_SECONDS, i as REOPT_STEP_UP_PROVIDER_ID, n as REOPT_PROVIDER_ID, r as REOPT_PROVIDER_IDS, t as REOPT_DEFAULT_SCOPES } from "../types-DGAVaUCc.js";
5
5
  import { createAdapterFactory } from "better-auth/adapters";
@@ -1,4 +1,4 @@
1
- import { t as BaseHttpClient } from "./http-client-BTrQ0KrQ.js";
1
+ import { t as BaseHttpClient } from "./http-client-aggnrSsb.js";
2
2
 
3
3
  //#region src/auth/client.ts
4
4
  function unwrap(body) {
@@ -50,4 +50,4 @@ function createReoptAuthClient(config) {
50
50
 
51
51
  //#endregion
52
52
  export { createReoptAuthClient as n, ReoptAuthClient as t };
53
- //# sourceMappingURL=client-C09GqOsD.js.map
53
+ //# sourceMappingURL=client-BIO9amcp.js.map
@@ -1,6 +1,6 @@
1
- import { u as BadRequestError } from "./config-CCPAE9xX.js";
2
- import { t as BaseHttpClient } from "./http-client-BTrQ0KrQ.js";
3
- import { t as buildQuery } from "./query-BTPb66iO.js";
1
+ import { S as ReoptSDKError, u as BadRequestError } from "./config-DKINyq4g.js";
2
+ import { t as BaseHttpClient } from "./http-client-aggnrSsb.js";
3
+ import { t as buildQuery } from "./query-BFqEr2OW.js";
4
4
 
5
5
  //#region src/eav/cache.ts
6
6
  var SchemaCache = class {
@@ -99,6 +99,13 @@ function assertPageLimit(limit) {
99
99
  if (Number.isInteger(limit) && limit >= 1 && limit <= 100) return;
100
100
  throw new BadRequestError(`limit must be an integer between 1 and ${100} (got ${limit}). Use records.listAll() to read every record across pages.`);
101
101
  }
102
+ function isCursorPage(data) {
103
+ return "nextCursor" in data;
104
+ }
105
+ /** The server scans by cursor only for its built-in time orders. */
106
+ function isCursorSortable(sortBy) {
107
+ return sortBy === void 0 || sortBy === "createdAt" || sortBy === "updatedAt";
108
+ }
102
109
  /** Page size for the paging helpers, held inside the server's accepted range. */
103
110
  function clampPageLimit(limit) {
104
111
  if (!Number.isFinite(limit)) return 100;
@@ -344,17 +351,49 @@ function createReoptEavClient(config) {
344
351
  * ```
345
352
  */
346
353
  async *listAll(entityId, query) {
347
- let page = 1;
348
354
  const limit = clampPageLimit(query?.limit ?? 100);
349
- while (true) {
350
- const res = await client.records.list(entityId, {
355
+ async function* numberedPages(from, knownLast) {
356
+ let page = from;
357
+ let last = knownLast;
358
+ while (last === void 0 || page <= last) {
359
+ const res = await client.records.list(entityId, {
360
+ ...query,
361
+ page,
362
+ limit
363
+ });
364
+ yield* res.records;
365
+ last = res.totalPages;
366
+ page++;
367
+ }
368
+ }
369
+ if (!isCursorSortable(query?.sortBy)) {
370
+ yield* numberedPages(1);
371
+ return;
372
+ }
373
+ let cursor = "";
374
+ for (;;) {
375
+ const qs = buildQuery({
351
376
  ...query,
352
- page,
353
- limit
377
+ limit,
378
+ cursor
379
+ });
380
+ const data = (await http.fetch("GET", `/entities/${entityId}/records${qs}`)).data;
381
+ if (!isCursorPage(data)) {
382
+ if (cursor !== "") throw new ReoptSDKError("The server stopped honoring the listAll cursor mid-scan. Restart the scan.", 0, "CURSOR_SCAN_INTERRUPTED", void 0, {
383
+ cause: "훑는 도중 커서를 모르는 서버 인스턴스가 응답함(배포 전환 중일 수 있음)",
384
+ fix: "listAll()을 처음부터 다시 실행"
385
+ });
386
+ yield* data.records;
387
+ yield* numberedPages(2, data.totalPages);
388
+ return;
389
+ }
390
+ yield* data.records;
391
+ if (data.nextCursor === null) return;
392
+ if (data.nextCursor === cursor) throw new ReoptSDKError("The listAll cursor did not advance.", 0, "CURSOR_SCAN_STALLED", void 0, {
393
+ cause: "서버가 받은 커서를 그대로 돌려줌 — 계속하면 같은 페이지를 끝없이 읽는다",
394
+ fix: "reopt 서버 버전을 확인하고 재시도"
354
395
  });
355
- for (const record of res.records) yield record;
356
- if (page >= res.totalPages) break;
357
- page++;
396
+ cursor = data.nextCursor;
358
397
  }
359
398
  },
360
399
  /**
@@ -564,4 +603,4 @@ function createReoptEavClient(config) {
564
603
 
565
604
  //#endregion
566
605
  export { RECORDS_PAGE_LIMIT_MAX as i, ATTRIBUTE_FILTER_LIST_MAX as n, ATTRIBUTE_FILTER_OPERATORS as r, createReoptEavClient as t };
567
- //# sourceMappingURL=client-2CaNRYKb.js.map
606
+ //# sourceMappingURL=client-BPLSaCrs.js.map
@@ -1,6 +1,6 @@
1
- import { S as ReoptSDKError, j as mapHttpStatusToError, n as SDK_VERSION, o as validateConfig } from "./config-CCPAE9xX.js";
1
+ import { S as ReoptSDKError, j as mapHttpStatusToError, n as SDK_VERSION, o as validateConfig } from "./config-DKINyq4g.js";
2
2
  import { t as createManagedAbort } from "./abort--nOBFN4M.js";
3
- import { t as BaseHttpClient } from "./http-client-BTrQ0KrQ.js";
3
+ import { t as BaseHttpClient } from "./http-client-aggnrSsb.js";
4
4
  import { n as parseSSEStream } from "./sse-parser-FMjxM7sY.js";
5
5
 
6
6
  //#region src/ai/client.ts
@@ -231,7 +231,7 @@ var ReoptAiClient = class {
231
231
  }
232
232
  async fetchSSE(options) {
233
233
  const url = `${this.http.requestBaseUrl}/chat/completions`;
234
- const requestId = globalThis.crypto?.randomUUID?.() ?? `sdk-${"4.7.0-rc.3"}-${url.length}`;
234
+ const requestId = globalThis.crypto?.randomUUID?.() ?? `sdk-${"4.7.0-rc.4"}-${url.length}`;
235
235
  const ctx = {
236
236
  method: "POST",
237
237
  url,
@@ -309,4 +309,4 @@ function createReoptAiClient(config) {
309
309
 
310
310
  //#endregion
311
311
  export { createReoptAiClient as n, ReoptAiClient as t };
312
- //# sourceMappingURL=client-Dzux9iCO.js.map
312
+ //# sourceMappingURL=client-BojYI4jP.js.map
@@ -1,4 +1,4 @@
1
- import { a as resolveIdBaseUrl } from "./config-CCPAE9xX.js";
1
+ import { a as resolveIdBaseUrl } from "./config-DKINyq4g.js";
2
2
  import { o as readClientKeyRing, s as toPublicJwk } from "./keys-B_R_lsyF.js";
3
3
  import { createPrivateKeyJwtClientAssertionGetter } from "@better-auth/core/oauth2";
4
4
  import * as jose from "jose";
@@ -191,4 +191,4 @@ function createMachineClient(config) {
191
191
 
192
192
  //#endregion
193
193
  export { createDpopProof as n, createMachineClient as r, MachineTokenError as t };
194
- //# sourceMappingURL=client-D6WGQQw8.js.map
194
+ //# sourceMappingURL=client-CD8WQsmF.js.map
@@ -1,4 +1,4 @@
1
- import { t as BaseHttpClient } from "./http-client-BTrQ0KrQ.js";
1
+ import { t as BaseHttpClient } from "./http-client-aggnrSsb.js";
2
2
 
3
3
  //#region src/terms/client.ts
4
4
  function unwrap(body) {
@@ -80,4 +80,4 @@ function createReoptTermsClient(config) {
80
80
 
81
81
  //#endregion
82
82
  export { createReoptTermsClient as n, ReoptTermsClient as t };
83
- //# sourceMappingURL=client-BwFaLqeU.js.map
83
+ //# sourceMappingURL=client-CQmuEZik.js.map
@@ -1,4 +1,4 @@
1
- import { t as BaseHttpClient } from "./http-client-BTrQ0KrQ.js";
1
+ import { t as BaseHttpClient } from "./http-client-aggnrSsb.js";
2
2
 
3
3
  //#region src/push/client.ts
4
4
  var ReoptPushClient = class {
@@ -25,4 +25,4 @@ function createReoptPushClient(config) {
25
25
 
26
26
  //#endregion
27
27
  export { createReoptPushClient as n, ReoptPushClient as t };
28
- //# sourceMappingURL=client-CnVCMyEO.js.map
28
+ //# sourceMappingURL=client-Cj92U3fu.js.map
@@ -1,6 +1,6 @@
1
- import { n as SDK_VERSION } from "./config-CCPAE9xX.js";
1
+ import { n as SDK_VERSION } from "./config-DKINyq4g.js";
2
2
  import { o as readClientKeyRing } from "./keys-B_R_lsyF.js";
3
- import { r as createMachineClient } from "./client-D6WGQQw8.js";
3
+ import { r as createMachineClient } from "./client-CD8WQsmF.js";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region src/workspace/schemas.ts
@@ -733,4 +733,4 @@ function createPlatformClient(config) {
733
733
 
734
734
  //#endregion
735
735
  export { platformWorkTaskStageChangedEventSchema as $, platformErrorSchema as A, platformPipelineSchema as B, platformBrandappUpsertInputSchema as C, platformEavSchemaApplyInputSchema as D, platformEavEntityResourceSchema as E, platformOAuthClientImportInputSchema as F, platformResourcesV2Schema as G, platformPipelineUpsertInputSchema as H, platformOAuthClientResourceSchema as I, platformTaskStageSchema as J, platformTaskSchema as K, platformOAuthClientUpsertInputSchema as L, platformLockAcquiredSchema as M, platformLockReleasedSchema as N, platformEavSchemaApplyResultSchema as O, platformMeSchema as P, platformWebhookUpsertInputSchema as Q, platformPipelineImportInputSchema as R, platformBrandappResourceSchema as S, platformEavBrandappResourcesSchema as T, platformResourceKeySchema as U, platformPipelineStageInputSchema as V, platformResourcesSchema as W, platformWebhookResourceSchema as X, platformTaskUpsertInputSchema as Y, platformWebhookSchema as Z, PLATFORM_TOKEN_ENDPOINT_AUTH_METHODS as _, createPlatformClient as a, platformBrandResourceSchema as b, PLATFORM_BRANDAPP_STATUSES as c, PLATFORM_OAUTH_APPLICATION_TYPES as d, platformWriteMetaSchema as et, PLATFORM_OAUTH_CLIENT_PURPOSES as f, PLATFORM_TASK_PRIORITIES as g, PLATFORM_TASK_OUTCOMES as h, REOPT_PLATFORM_URLS as i, platformExternalIdSchema as j, platformEavSchemaOperationSchema as k, PLATFORM_DOMAIN_STATUSES as l, PLATFORM_STAGE_COLORS as m, PlatformApiError as n, resolvePlatformUrls as o, PLATFORM_OAUTH_GRANT_TYPES as p, platformTaskStageInputSchema as q, REOPT_PLATFORM_ID_URLS as r, PLATFORM_ADMIN_SCOPE as s, DEFAULT_PLATFORM_SCOPES as t, PLATFORM_MANAGED_BY_VALUES as u, PLATFORM_WEBHOOK_TRIGGERS as v, platformCustomerUpsertInputSchema as w, platformBrandUpsertInputSchema as x, platformBrandImportInputSchema as y, platformPipelineResourceSchema as z };
736
- //# sourceMappingURL=client-DWUvj6iA.js.map
736
+ //# sourceMappingURL=client-DAyfkqrY.js.map
@@ -1,6 +1,6 @@
1
- import { S as ReoptSDKError, j as mapHttpStatusToError, n as SDK_VERSION, o as validateConfig } from "./config-CCPAE9xX.js";
1
+ import { S as ReoptSDKError, j as mapHttpStatusToError, n as SDK_VERSION, o as validateConfig } from "./config-DKINyq4g.js";
2
2
  import { t as createManagedAbort } from "./abort--nOBFN4M.js";
3
- import { n as parseFieldErrors, t as BaseHttpClient } from "./http-client-BTrQ0KrQ.js";
3
+ import { n as parseFieldErrors, t as BaseHttpClient } from "./http-client-aggnrSsb.js";
4
4
 
5
5
  //#region src/files/client.ts
6
6
  var ReoptFileClient = class {
@@ -270,4 +270,4 @@ function createReoptFileClient(config) {
270
270
 
271
271
  //#endregion
272
272
  export { createReoptFileClient as n, ReoptFileClient as t };
273
- //# sourceMappingURL=client-DHrZcdxq.js.map
273
+ //# sourceMappingURL=client-DTFxSfCG.js.map
@@ -1,5 +1,5 @@
1
- import { t as BaseHttpClient } from "./http-client-BTrQ0KrQ.js";
2
- import { t as buildQuery } from "./query-BTPb66iO.js";
1
+ import { t as BaseHttpClient } from "./http-client-aggnrSsb.js";
2
+ import { t as buildQuery } from "./query-BFqEr2OW.js";
3
3
 
4
4
  //#region src/cms/client.ts
5
5
  function createReoptCmsClient(config) {
@@ -52,4 +52,4 @@ async list(query) {
52
52
 
53
53
  //#endregion
54
54
  export { createReoptCmsClient as t };
55
- //# sourceMappingURL=client-BeNi8CJ8.js.map
55
+ //# sourceMappingURL=client-DrxN768l.js.map
@@ -1,4 +1,4 @@
1
- import { t as BaseHttpClient } from "./http-client-BTrQ0KrQ.js";
1
+ import { t as BaseHttpClient } from "./http-client-aggnrSsb.js";
2
2
 
3
3
  //#region src/feedback/client.ts
4
4
  function buildListQuery(query) {
@@ -83,4 +83,4 @@ function createReoptFeedbackClient(config) {
83
83
 
84
84
  //#endregion
85
85
  export { createReoptFeedbackClient as n, ReoptFeedbackClient as t };
86
- //# sourceMappingURL=client-COD-OtO6.js.map
86
+ //# sourceMappingURL=client-GSy6AKsZ.js.map
@@ -1,4 +1,4 @@
1
- import { t as BaseHttpClient } from "./http-client-BTrQ0KrQ.js";
1
+ import { t as BaseHttpClient } from "./http-client-aggnrSsb.js";
2
2
 
3
3
  //#region src/plans/client.ts
4
4
  function unwrap(body) {
@@ -99,4 +99,4 @@ function createReoptPlansClient(config) {
99
99
 
100
100
  //#endregion
101
101
  export { createReoptPlansClient as n, ReoptPlansClient as t };
102
- //# sourceMappingURL=client-Cezzpa3v.js.map
102
+ //# sourceMappingURL=client-ZmjLpkjt.js.map
@@ -1,4 +1,4 @@
1
- import { t as BaseHttpClient } from "./http-client-BTrQ0KrQ.js";
1
+ import { t as BaseHttpClient } from "./http-client-aggnrSsb.js";
2
2
 
3
3
  //#region src/analytics/client.ts
4
4
  var ReoptAnalyticsClient = class {
@@ -17,4 +17,4 @@ function createReoptAnalyticsClient(config) {
17
17
 
18
18
  //#endregion
19
19
  export { createReoptAnalyticsClient as n, ReoptAnalyticsClient as t };
20
- //# sourceMappingURL=client-xycvTLR7.js.map
20
+ //# sourceMappingURL=client-ywlujscY.js.map
package/dist/cms/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as createReoptCmsClient } from "../client-BeNi8CJ8.js";
1
+ import { t as createReoptCmsClient } from "../client-DrxN768l.js";
2
2
 
3
3
  //#region src/cms/helpers.ts
4
4
  function joinUrl(siteUrl, path) {
@@ -319,7 +319,7 @@ function mapHttpStatusToError(status, code, message, ctx, fieldErrors) {
319
319
 
320
320
  //#endregion
321
321
  //#region src/core/config.ts
322
- const SDK_VERSION = "4.7.0-rc.3";
322
+ const SDK_VERSION = "4.7.0-rc.4";
323
323
  /**
324
324
  * Default API host for EAV / AI / Files / CMS / Terms. Consumers can override
325
325
  * via `config.baseUrl` or the `REOPT_BASE_URL` env var.
@@ -501,4 +501,4 @@ function deriveIdFromBaseUrl(baseUrl) {
501
501
 
502
502
  //#endregion
503
503
  export { isValidationError as A, RequiredTermsError as C, isModelAccessError as D, isCreditLimitError as E, isReoptSDKError as O, ReoptSDKError as S, ValidationError as T, ModelAccessError as _, resolveIdBaseUrl as a, PreconditionFailedError as b, AuthUserNotFoundError as c, ConflictError as d, ContentFilterError as f, LimitExceededError as g, ForbiddenError as h, resolveBaseUrl as i, mapHttpStatusToError as j, isRequiredTermsError 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, ServerError as w, RateLimitError as x, NotFoundError as y };
504
- //# sourceMappingURL=config-CCPAE9xX.js.map
504
+ //# sourceMappingURL=config-DKINyq4g.js.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-CCPAE9xX.js";
2
- import { i as RECORDS_PAGE_LIMIT_MAX, n as ATTRIBUTE_FILTER_LIST_MAX, r as ATTRIBUTE_FILTER_OPERATORS, t as createReoptEavClient } from "../client-2CaNRYKb.js";
1
+ import { c as AuthUserNotFoundError, g as LimitExceededError, l as AuthUserRecordExistsError, m as DuplicateAuthUserError } from "../config-DKINyq4g.js";
2
+ import { i as RECORDS_PAGE_LIMIT_MAX, n as ATTRIBUTE_FILTER_LIST_MAX, r as ATTRIBUTE_FILTER_OPERATORS, t as createReoptEavClient } from "../client-BPLSaCrs.js";
3
3
 
4
4
  //#region src/eav/verify.ts
5
5
  async function verifyEavSchema(input) {
@@ -1,3 +1,3 @@
1
- import { n as createReoptFeedbackClient, t as ReoptFeedbackClient } from "../client-COD-OtO6.js";
1
+ import { n as createReoptFeedbackClient, t as ReoptFeedbackClient } from "../client-GSy6AKsZ.js";
2
2
 
3
3
  export { ReoptFeedbackClient, createReoptFeedbackClient };
@@ -1,4 +1,4 @@
1
- import { n as createReoptFileClient, t as ReoptFileClient } from "../client-DHrZcdxq.js";
1
+ import { n as createReoptFileClient, t as ReoptFileClient } from "../client-DTFxSfCG.js";
2
2
 
3
3
  //#region src/files/helpers.ts
4
4
  const REOPT_IMAGE_REMOTE_PATTERNS = [{
@@ -1,4 +1,4 @@
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-CCPAE9xX.js";
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-DKINyq4g.js";
2
2
  import { t as createAuthHeader } from "./encoding-Bwfm3iaE.js";
3
3
 
4
4
  //#region src/core/debug.ts
@@ -389,4 +389,4 @@ function parseFieldErrors(body) {
389
389
 
390
390
  //#endregion
391
391
  export { parseFieldErrors as n, BaseHttpClient as t };
392
- //# sourceMappingURL=http-client-BTrQ0KrQ.js.map
392
+ //# sourceMappingURL=http-client-aggnrSsb.js.map
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
- import { A as isValidationError, C as RequiredTermsError, D as isModelAccessError, E as isCreditLimitError, O as isReoptSDKError, S as ReoptSDKError, T as ValidationError, _ as ModelAccessError, b as PreconditionFailedError, c as AuthUserNotFoundError, d as ConflictError, f as ContentFilterError, g as LimitExceededError, h as ForbiddenError, i as resolveBaseUrl, j as mapHttpStatusToError, k as isRequiredTermsError, 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 ServerError, x as RateLimitError, y as NotFoundError } from "./config-CCPAE9xX.js";
2
- import { t as BaseHttpClient } from "./http-client-BTrQ0KrQ.js";
3
- import { n as createReoptAiClient } from "./client-Dzux9iCO.js";
4
- import { n as createReoptAuthClient } from "./client-C09GqOsD.js";
5
- import { t as createReoptCmsClient } from "./client-BeNi8CJ8.js";
6
- import { t as createReoptEavClient } from "./client-2CaNRYKb.js";
7
- import { n as createReoptFeedbackClient } from "./client-COD-OtO6.js";
8
- import { n as createReoptFileClient } from "./client-DHrZcdxq.js";
9
- import { n as createReoptAnalyticsClient } from "./client-xycvTLR7.js";
10
- import { n as createReoptPlansClient } from "./client-Cezzpa3v.js";
11
- import { n as createReoptPushClient } from "./client-CnVCMyEO.js";
12
- import { n as createReoptTermsClient } from "./client-BwFaLqeU.js";
1
+ import { A as isValidationError, C as RequiredTermsError, D as isModelAccessError, E as isCreditLimitError, O as isReoptSDKError, S as ReoptSDKError, T as ValidationError, _ as ModelAccessError, b as PreconditionFailedError, c as AuthUserNotFoundError, d as ConflictError, f as ContentFilterError, g as LimitExceededError, h as ForbiddenError, i as resolveBaseUrl, j as mapHttpStatusToError, k as isRequiredTermsError, 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 ServerError, x as RateLimitError, y as NotFoundError } from "./config-DKINyq4g.js";
2
+ import { t as BaseHttpClient } from "./http-client-aggnrSsb.js";
3
+ import { n as createReoptAiClient } from "./client-BojYI4jP.js";
4
+ import { n as createReoptAuthClient } from "./client-BIO9amcp.js";
5
+ import { t as createReoptCmsClient } from "./client-DrxN768l.js";
6
+ import { t as createReoptEavClient } from "./client-BPLSaCrs.js";
7
+ import { n as createReoptFeedbackClient } from "./client-GSy6AKsZ.js";
8
+ import { n as createReoptFileClient } from "./client-DTFxSfCG.js";
9
+ import { n as createReoptAnalyticsClient } from "./client-ywlujscY.js";
10
+ import { n as createReoptPlansClient } from "./client-ZmjLpkjt.js";
11
+ import { n as createReoptPushClient } from "./client-Cj92U3fu.js";
12
+ import { n as createReoptTermsClient } from "./client-CQmuEZik.js";
13
13
 
14
14
  //#region src/singleton.ts
15
15
  let _instance;
@@ -276,7 +276,11 @@ type InstallationEvent = {
276
276
  type BackchannelReplayStore = {
277
277
  reserve(jti: string, expiresAt: Date): Promise<boolean>;
278
278
  };
279
- declare function createMemoryBackchannelReplayStore(): BackchannelReplayStore;
279
+ /**
280
+ * `now`는 핸들러와 **같은 시계**여야 한다 — 만료 판정(서명 검증)과 기억을 지우는 시점이 다른
281
+ * 시계를 보면, 핸들러가 아직 유효하다고 본 통지의 jti를 저장소가 먼저 잊어 재생이 통과한다.
282
+ */
283
+ declare function createMemoryBackchannelReplayStore(now?: () => Date): BackchannelReplayStore;
280
284
  type InstallationBackchannelHandlerOptions = {
281
285
  idBaseUrl: string;
282
286
  /** 매니페스트에 적은 그 URL — `aud`와 대조한다. */
@@ -1,7 +1,7 @@
1
- import { n as SDK_VERSION } from "../config-CCPAE9xX.js";
1
+ import { n as SDK_VERSION } from "../config-DKINyq4g.js";
2
2
  import { o as readClientKeyRing } from "../keys-B_R_lsyF.js";
3
- import { r as createMachineClient } from "../client-D6WGQQw8.js";
4
- import { A as platformErrorSchema, C as platformBrandappUpsertInputSchema, H as platformPipelineUpsertInputSchema, U as platformResourceKeySchema, f as PLATFORM_OAUTH_CLIENT_PURPOSES, n as PlatformApiError, o as resolvePlatformUrls, v as PLATFORM_WEBHOOK_TRIGGERS, x as platformBrandUpsertInputSchema } from "../client-DWUvj6iA.js";
3
+ import { r as createMachineClient } from "../client-CD8WQsmF.js";
4
+ import { A as platformErrorSchema, C as platformBrandappUpsertInputSchema, H as platformPipelineUpsertInputSchema, U as platformResourceKeySchema, f as PLATFORM_OAUTH_CLIENT_PURPOSES, n as PlatformApiError, o as resolvePlatformUrls, v as PLATFORM_WEBHOOK_TRIGGERS, x as platformBrandUpsertInputSchema } from "../client-DAyfkqrY.js";
5
5
  import * as jose from "jose";
6
6
  import { z } from "zod";
7
7
 
@@ -506,11 +506,15 @@ const INSTALLATION_EVENT_NAMES = [
506
506
  "installation.resumed",
507
507
  "installation.revoked"
508
508
  ];
509
- function createMemoryBackchannelReplayStore() {
509
+ /**
510
+ * `now`는 핸들러와 **같은 시계**여야 한다 — 만료 판정(서명 검증)과 기억을 지우는 시점이 다른
511
+ * 시계를 보면, 핸들러가 아직 유효하다고 본 통지의 jti를 저장소가 먼저 잊어 재생이 통과한다.
512
+ */
513
+ function createMemoryBackchannelReplayStore(now = () => /* @__PURE__ */ new Date()) {
510
514
  const seen = /* @__PURE__ */ new Map();
511
515
  return { async reserve(jti, expiresAt) {
512
- const now = Date.now();
513
- for (const [key, until] of seen) if (until <= now) seen.delete(key);
516
+ const current = now().getTime();
517
+ for (const [key, until] of seen) if (until <= current) seen.delete(key);
514
518
  if (seen.has(jti)) return false;
515
519
  seen.set(jti, expiresAt.getTime());
516
520
  return true;
@@ -548,7 +552,8 @@ function createInstallationBackchannelHandler(options) {
548
552
  cacheMaxAge: 6e5,
549
553
  ...options.jwksFetch ? { [jose.customFetch]: options.jwksFetch } : {}
550
554
  });
551
- const replayStore = options.replayStore ?? createMemoryBackchannelReplayStore();
555
+ const clockToleranceSeconds = options.clockToleranceSeconds ?? 60;
556
+ const replayStore = options.replayStore ?? createMemoryBackchannelReplayStore(options.now);
552
557
  return async (request) => {
553
558
  const token = (await request.text()).trim();
554
559
  if (!token || token.split(".").length !== 3) return new Response(null, { status: 400 });
@@ -557,7 +562,7 @@ function createInstallationBackchannelHandler(options) {
557
562
  const verified = await jose.jwtVerify(token, jwks, {
558
563
  issuer,
559
564
  audience: options.backchannelUri,
560
- clockTolerance: options.clockToleranceSeconds ?? 60,
565
+ clockTolerance: clockToleranceSeconds,
561
566
  currentDate: options.now?.()
562
567
  });
563
568
  payload = verified.payload;
@@ -567,7 +572,7 @@ function createInstallationBackchannelHandler(options) {
567
572
  }
568
573
  const event = readEvent(payload);
569
574
  if (!event) return new Response(null, { status: 400 });
570
- const expiresAt = /* @__PURE__ */ new Date((typeof payload.exp === "number" ? payload.exp : event.iat + 300) * 1e3);
575
+ const expiresAt = /* @__PURE__ */ new Date(((typeof payload.exp === "number" ? payload.exp : event.iat + 300) + clockToleranceSeconds) * 1e3);
571
576
  if (!await replayStore.reserve(event.jti, expiresAt)) return new Response(null, { status: 401 });
572
577
  try {
573
578
  await options.onEvent(event);
@@ -1,4 +1,4 @@
1
- import { S as ReoptSDKError, a as resolveIdBaseUrl } from "../config-CCPAE9xX.js";
1
+ import { S as ReoptSDKError, a as resolveIdBaseUrl } from "../config-DKINyq4g.js";
2
2
 
3
3
  //#region src/logout/verify.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
1
  import { a as parseClientPrivateJwk, i as generateClientKeyPair, n as DEFAULT_CLIENT_KEY_ALGORITHM, o as readClientKeyRing, r as buildClientJwks, s as toPublicJwk, t as CLIENT_JWKS_PATH } from "../keys-B_R_lsyF.js";
2
- import { n as createDpopProof, r as createMachineClient, t as MachineTokenError } from "../client-D6WGQQw8.js";
2
+ import { n as createDpopProof, r as createMachineClient, t as MachineTokenError } from "../client-CD8WQsmF.js";
3
3
 
4
4
  export { CLIENT_JWKS_PATH, DEFAULT_CLIENT_KEY_ALGORITHM, MachineTokenError, buildClientJwks, createDpopProof, createMachineClient, generateClientKeyPair, parseClientPrivateJwk, readClientKeyRing, toPublicJwk };
@@ -1,3 +1,3 @@
1
- import { n as createReoptPlansClient, t as ReoptPlansClient } from "../client-Cezzpa3v.js";
1
+ import { n as createReoptPlansClient, t as ReoptPlansClient } from "../client-ZmjLpkjt.js";
2
2
 
3
3
  export { ReoptPlansClient, createReoptPlansClient };
@@ -1,3 +1,3 @@
1
- import { n as createReoptPushClient, t as ReoptPushClient } from "../client-CnVCMyEO.js";
1
+ import { n as createReoptPushClient, t as ReoptPushClient } from "../client-Cj92U3fu.js";
2
2
 
3
3
  export { ReoptPushClient, createReoptPushClient };
@@ -1,4 +1,4 @@
1
- import { S as ReoptSDKError } from "./config-CCPAE9xX.js";
1
+ import { S as ReoptSDKError } from "./config-DKINyq4g.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-BTPb66iO.js.map
35
+ //# sourceMappingURL=query-BFqEr2OW.js.map
@@ -1,3 +1,3 @@
1
- import { n as createReoptTermsClient, t as ReoptTermsClient } from "../client-BwFaLqeU.js";
1
+ import { n as createReoptTermsClient, t as ReoptTermsClient } from "../client-CQmuEZik.js";
2
2
 
3
3
  export { ReoptTermsClient, createReoptTermsClient };
@@ -1,3 +1,3 @@
1
- import { $ as platformWorkTaskStageChangedEventSchema, A as platformErrorSchema, B as platformPipelineSchema, C as platformBrandappUpsertInputSchema, D as platformEavSchemaApplyInputSchema, E as platformEavEntityResourceSchema, F as platformOAuthClientImportInputSchema, G as platformResourcesV2Schema, H as platformPipelineUpsertInputSchema, I as platformOAuthClientResourceSchema, J as platformTaskStageSchema, K as platformTaskSchema, L as platformOAuthClientUpsertInputSchema, M as platformLockAcquiredSchema, N as platformLockReleasedSchema, O as platformEavSchemaApplyResultSchema, P as platformMeSchema, Q as platformWebhookUpsertInputSchema, R as platformPipelineImportInputSchema, S as platformBrandappResourceSchema, T as platformEavBrandappResourcesSchema, U as platformResourceKeySchema, V as platformPipelineStageInputSchema, W as platformResourcesSchema, X as platformWebhookResourceSchema, Y as platformTaskUpsertInputSchema, Z as platformWebhookSchema, _ as PLATFORM_TOKEN_ENDPOINT_AUTH_METHODS, a as createPlatformClient, b as platformBrandResourceSchema, c as PLATFORM_BRANDAPP_STATUSES, d as PLATFORM_OAUTH_APPLICATION_TYPES, et as platformWriteMetaSchema, f as PLATFORM_OAUTH_CLIENT_PURPOSES, g as PLATFORM_TASK_PRIORITIES, h as PLATFORM_TASK_OUTCOMES, i as REOPT_PLATFORM_URLS, j as platformExternalIdSchema, k as platformEavSchemaOperationSchema, l as PLATFORM_DOMAIN_STATUSES, m as PLATFORM_STAGE_COLORS, n as PlatformApiError, o as resolvePlatformUrls, p as PLATFORM_OAUTH_GRANT_TYPES, q as platformTaskStageInputSchema, r as REOPT_PLATFORM_ID_URLS, s as PLATFORM_ADMIN_SCOPE, t as DEFAULT_PLATFORM_SCOPES, u as PLATFORM_MANAGED_BY_VALUES, v as PLATFORM_WEBHOOK_TRIGGERS, w as platformCustomerUpsertInputSchema, x as platformBrandUpsertInputSchema, y as platformBrandImportInputSchema, z as platformPipelineResourceSchema } from "../client-DWUvj6iA.js";
1
+ import { $ as platformWorkTaskStageChangedEventSchema, A as platformErrorSchema, B as platformPipelineSchema, C as platformBrandappUpsertInputSchema, D as platformEavSchemaApplyInputSchema, E as platformEavEntityResourceSchema, F as platformOAuthClientImportInputSchema, G as platformResourcesV2Schema, H as platformPipelineUpsertInputSchema, I as platformOAuthClientResourceSchema, J as platformTaskStageSchema, K as platformTaskSchema, L as platformOAuthClientUpsertInputSchema, M as platformLockAcquiredSchema, N as platformLockReleasedSchema, O as platformEavSchemaApplyResultSchema, P as platformMeSchema, Q as platformWebhookUpsertInputSchema, R as platformPipelineImportInputSchema, S as platformBrandappResourceSchema, T as platformEavBrandappResourcesSchema, U as platformResourceKeySchema, V as platformPipelineStageInputSchema, W as platformResourcesSchema, X as platformWebhookResourceSchema, Y as platformTaskUpsertInputSchema, Z as platformWebhookSchema, _ as PLATFORM_TOKEN_ENDPOINT_AUTH_METHODS, a as createPlatformClient, b as platformBrandResourceSchema, c as PLATFORM_BRANDAPP_STATUSES, d as PLATFORM_OAUTH_APPLICATION_TYPES, et as platformWriteMetaSchema, f as PLATFORM_OAUTH_CLIENT_PURPOSES, g as PLATFORM_TASK_PRIORITIES, h as PLATFORM_TASK_OUTCOMES, i as REOPT_PLATFORM_URLS, j as platformExternalIdSchema, k as platformEavSchemaOperationSchema, l as PLATFORM_DOMAIN_STATUSES, m as PLATFORM_STAGE_COLORS, n as PlatformApiError, o as resolvePlatformUrls, p as PLATFORM_OAUTH_GRANT_TYPES, q as platformTaskStageInputSchema, r as REOPT_PLATFORM_ID_URLS, s as PLATFORM_ADMIN_SCOPE, t as DEFAULT_PLATFORM_SCOPES, u as PLATFORM_MANAGED_BY_VALUES, v as PLATFORM_WEBHOOK_TRIGGERS, w as platformCustomerUpsertInputSchema, x as platformBrandUpsertInputSchema, y as platformBrandImportInputSchema, z as platformPipelineResourceSchema } from "../client-DAyfkqrY.js";
2
2
 
3
3
  export { DEFAULT_PLATFORM_SCOPES, PLATFORM_ADMIN_SCOPE, PLATFORM_BRANDAPP_STATUSES, PLATFORM_DOMAIN_STATUSES, PLATFORM_MANAGED_BY_VALUES, PLATFORM_OAUTH_APPLICATION_TYPES, PLATFORM_OAUTH_CLIENT_PURPOSES, PLATFORM_OAUTH_GRANT_TYPES, PLATFORM_STAGE_COLORS, PLATFORM_TASK_OUTCOMES, PLATFORM_TASK_PRIORITIES, PLATFORM_TOKEN_ENDPOINT_AUTH_METHODS, PLATFORM_WEBHOOK_TRIGGERS, PlatformApiError, REOPT_PLATFORM_ID_URLS, REOPT_PLATFORM_URLS, createPlatformClient, platformBrandImportInputSchema, platformBrandResourceSchema, platformBrandUpsertInputSchema, platformBrandappResourceSchema, platformBrandappUpsertInputSchema, platformCustomerUpsertInputSchema, platformEavBrandappResourcesSchema, platformEavEntityResourceSchema, platformEavSchemaApplyInputSchema, platformEavSchemaApplyResultSchema, platformEavSchemaOperationSchema, platformErrorSchema, platformExternalIdSchema, platformLockAcquiredSchema, platformLockReleasedSchema, platformMeSchema, platformOAuthClientImportInputSchema, platformOAuthClientResourceSchema, platformOAuthClientUpsertInputSchema, platformPipelineImportInputSchema, platformPipelineResourceSchema, platformPipelineSchema, platformPipelineStageInputSchema, platformPipelineUpsertInputSchema, platformResourceKeySchema, platformResourcesSchema, platformResourcesV2Schema, platformTaskSchema, platformTaskStageInputSchema, platformTaskStageSchema, platformTaskUpsertInputSchema, platformWebhookResourceSchema, platformWebhookSchema, platformWebhookUpsertInputSchema, platformWorkTaskStageChangedEventSchema, platformWriteMetaSchema, resolvePlatformUrls };
@@ -426,6 +426,13 @@ import { RECORDS_PAGE_LIMIT_MAX } from "@reopt-ai/brandapp-sdk/eav"; // 100
426
426
  for await (const record of sdk.eav.records.listAll(entityId)) { ... }
427
427
  ```
428
428
 
429
+ `listAll()`은 커서로 훑는다(`?cursor=`) — 요청마다 앞 페이지의 마지막 자리 다음부터 그 페이지 분량만 읽으므로
430
+ 필터를 걸어도 엔티티 크기에 비례하는 비용으로 끝난다. 엔티티 전체를 읽을 때는 `list()`로 `page`를 직접 돌리지 말고
431
+ 이것을 쓴다(번호 페이지 + 필터는 페이지마다 조건에 맞는 행 전체를 다시 읽는다). 정렬이 `createdAt`(기본)·`updatedAt`일
432
+ 때만 커서를 쓰고 커스텀 속성 정렬은 번호 페이지로 돈다. 커서 방식에서 정렬 키가 같은 행의 순서는 id가 정하며,
433
+ `updatedAt` 정렬로 훑는 도중 갱신된 행은 자리를 옮긴다 — 전 행을 정확히 한 번씩 읽어야 하면 `createdAt`을 쓴다.
434
+ SQL로 좁혀지지 않는 필터로 큰 엔티티를 훑어도 `QUERY_TOO_BROAD`가 나지 않는다(그 상한은 번호 페이지의 것이다).
435
+
429
436
  ## Filter Builder
430
437
 
431
438
  ```typescript
package/docs/errors.md CHANGED
@@ -308,6 +308,22 @@ try {
308
308
  - **Fix**: Reduce the number of filters or the size of filter values; split a
309
309
  large query into several smaller calls.
310
310
 
311
+ ### CURSOR_SCAN_INTERRUPTED: the server stopped honoring the `listAll` cursor (0)
312
+
313
+ - **Cause**: `records.listAll()` was scanning by cursor and a response came back
314
+ as a numbered page instead. That answer is page 1 again — typically an older
315
+ server instance answering during a deploy switch-over — and continuing would
316
+ yield every record twice, so the scan stops.
317
+ - **Fix**: Run `listAll()` again from the start. Records already yielded are
318
+ valid; only the remainder was not read.
319
+
320
+ ### CURSOR_SCAN_STALLED: the `listAll` cursor did not advance (0)
321
+
322
+ - **Cause**: The server returned the same `nextCursor` it was given. Continuing
323
+ would read the same page forever.
324
+ - **Fix**: Retry; if it repeats, report it with the request ID — the server is
325
+ not advancing the scan.
326
+
311
327
  ### FILE_NOT_FOUND: `File not found` (404)
312
328
 
313
329
  - **Cause**: The requested file ID does not exist or has been deleted
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reopt-ai/brandapp-sdk",
3
- "version": "4.7.0-rc.3",
3
+ "version": "4.7.0-rc.4",
4
4
  "description": "Reopt Brandapp SDK — Better Auth adapter, OAuth login, and EAV client",
5
5
  "author": "Reopt",
6
6
  "license": "MIT",