@reopt-ai/brandapp-sdk 4.6.0 → 4.7.0-rc.2

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 (76) hide show
  1. package/CHANGELOG.md +56 -1
  2. package/README.md +13 -13
  3. package/dist/ai/index.d.ts +1 -1
  4. package/dist/ai/index.js +1 -1
  5. package/dist/ai-provider/index.d.ts +1 -1
  6. package/dist/ai-provider/index.js +1 -1
  7. package/dist/analytics/index.d.ts +1 -1
  8. package/dist/analytics/index.js +1 -1
  9. package/dist/auth/index.d.ts +1 -1
  10. package/dist/auth/index.js +1 -1
  11. package/dist/better-auth/index.d.ts +8 -2
  12. package/dist/better-auth/index.js +19 -5
  13. package/dist/{client-FM6_YJbr.js → client--ELBxfna.js} +3 -3
  14. package/dist/{client-IUSZDJio.d.ts → client-BQJepjoD.d.ts} +44 -4
  15. package/dist/{client-tJq0U_jn.js → client-BVBl3gPQ.js} +4 -4
  16. package/dist/{client-DeC127BD.js → client-BeiMpmXQ.js} +2 -2
  17. package/dist/{client-C6OXGMMV.d.ts → client-C2W4RAZV.d.ts} +2 -2
  18. package/dist/{client-7I-mz3Dw.d.ts → client-C6lx3RUQ.d.ts} +2 -2
  19. package/dist/{client-Ce0gs5Ma.js → client-C7X3w8t6.js} +2 -2
  20. package/dist/{client-DCqp0Bis.js → client-CGulAXhy.js} +2 -2
  21. package/dist/{client-yKeRJnIB.d.ts → client-CSl3o0s3.d.ts} +2 -2
  22. package/dist/{client-D1AFtJRw.d.ts → client-Cnq_X3Wp.d.ts} +2 -2
  23. package/dist/{client-Bfutv3LK.d.ts → client-Cod87ThY.d.ts} +2 -2
  24. package/dist/{client-BSW0Ncjj.d.ts → client-CsWSxMhB.d.ts} +2 -2
  25. package/dist/{client-C2xE9HGZ.js → client-D6333rpA.js} +4 -4
  26. package/dist/{client-CI2Y00Qx.js → client-DE1ynLgS.js} +23 -2
  27. package/dist/{client-BzAgabAs.js → client-DFxq2GcS.js} +2 -2
  28. package/dist/{client-DjLhTNsZ.js → client-DNZsyjA0.js} +3 -3
  29. package/dist/{client-Dmvtr1nS.d.ts → client-DfnaH99z.d.ts} +2 -2
  30. package/dist/{client-COKDtHO9.d.ts → client-MDNS9Ubf.d.ts} +2 -2
  31. package/dist/client-RPOH-LNC.js +194 -0
  32. package/dist/{client-eDd4aWDs.js → client-iyzEsEEg.js} +2 -2
  33. package/dist/{client-CniCGdmi.d.ts → client-xblzWFAL.d.ts} +2 -2
  34. package/dist/cms/index.d.ts +1 -1
  35. package/dist/cms/index.js +1 -1
  36. package/dist/{config-BeOelISH.js → config-B6U6kZxR.js} +13 -10
  37. package/dist/{config-D3SblxWt.d.ts → config-CnFnzh7Q.d.ts} +21 -6
  38. package/dist/dev/index.d.ts +1 -1
  39. package/dist/eav/index.d.ts +2 -2
  40. package/dist/eav/index.js +2 -2
  41. package/dist/eav/migrate.d.ts +2 -2
  42. package/dist/eav/schema.d.ts +2 -2
  43. package/dist/feedback/index.d.ts +1 -1
  44. package/dist/feedback/index.js +1 -1
  45. package/dist/files/index.d.ts +1 -1
  46. package/dist/files/index.js +1 -1
  47. package/dist/{http-client-Bl8u1vHN.js → http-client-pEcJtik8.js} +9 -3
  48. package/dist/{index-BnAYxnwq.d.ts → index-Bkci7euU.d.ts} +14 -12
  49. package/dist/{index-C6fyJTud.d.ts → index-Dh8XMVFF.d.ts} +2 -2
  50. package/dist/index.d.ts +4 -4
  51. package/dist/index.js +12 -12
  52. package/dist/keys-B2pA8EkU.d.ts +44 -0
  53. package/dist/keys-B_R_lsyF.js +102 -0
  54. package/dist/logout/index.d.ts +1 -1
  55. package/dist/logout/index.js +1 -1
  56. package/dist/machine/index.d.ts +72 -0
  57. package/dist/machine/index.js +4 -0
  58. package/dist/machine/keygen-cli.d.ts +7 -0
  59. package/dist/machine/keygen-cli.js +57 -0
  60. package/dist/plans/index.d.ts +2 -2
  61. package/dist/plans/index.js +1 -1
  62. package/dist/push/index.d.ts +1 -1
  63. package/dist/push/index.js +1 -1
  64. package/dist/{query-JPVK_8N5.js → query-MrzuQOFF.js} +2 -2
  65. package/dist/react/hooks.d.ts +4 -4
  66. package/dist/terms/index.d.ts +1 -1
  67. package/dist/terms/index.js +1 -1
  68. package/dist/testing/index.d.ts +2 -2
  69. package/dist/workspace/index.d.ts +39 -9
  70. package/dist/workspace/index.js +51 -9
  71. package/docs/api-reference.md +43 -24
  72. package/docs/dev-server.md +2 -2
  73. package/docs/environment.md +4 -4
  74. package/docs/machine.md +104 -0
  75. package/docs/workspace.md +12 -0
  76. package/package.json +18 -4
@@ -0,0 +1,194 @@
1
+ import { a as resolveIdBaseUrl } from "./config-B6U6kZxR.js";
2
+ import { o as readClientKeyRing, s as toPublicJwk } from "./keys-B_R_lsyF.js";
3
+ import { createPrivateKeyJwtClientAssertionGetter } from "@better-auth/core/oauth2";
4
+ import * as jose from "jose";
5
+
6
+ //#region src/machine/client.ts
7
+ /**
8
+ * 기계 클라이언트 (RFC-0034 §3.2) — `private_key_jwt` 단언으로 `client_credentials` 토큰을 받고,
9
+ * 매 요청에 DPoP 증명을 붙인다. 리옵트 플랫폼 API·브랜드앱 API·서브 제품 리소스(reopt-data 등)
10
+ * 전부 같은 클라이언트로 부른다 — **호출 대상(resource)마다 토큰이 따로**다(aud 하나, RFC-0034 §3.2).
11
+ *
12
+ * 서버 전용이다. 개인키는 env(`REOPT_CLIENT_PRIVATE_KEY_JWK`)에서 읽고 브라우저 번들에 들어갈 수 없다.
13
+ *
14
+ * 흐름:
15
+ * token(): POST {id}/api/auth/oauth2/token
16
+ * grant_type=client_credentials · client_assertion(JWS, exp≤5m, jti) · scope · resource
17
+ * 헤더 DPoP: 증명(htm=POST, htu=token endpoint) → access_token(`cnf.jkt` 바인딩)
18
+ * headers(): Authorization: DPoP <token> · DPoP: 증명(htm, htu=요청 URL, ath=sha256(token))
19
+ *
20
+ * 🔑 better-auth core가 단언 서명(`createPrivateKeyJwtClientAssertionGetter`)과 서버 쪽 DPoP 검증을
21
+ * 내장하므로 클라이언트 쪽 DPoP 증명만 jose로 만든다(core의 `clientCredentialsToken`은 DPoP 헤더를
22
+ * 싣지 않아 토큰 요청은 직접 조립한다).
23
+ */
24
+ var MachineTokenError = class extends Error {
25
+ status;
26
+ code;
27
+ constructor(input) {
28
+ super(input.message);
29
+ this.name = "MachineTokenError";
30
+ this.status = input.status;
31
+ this.code = input.code;
32
+ }
33
+ };
34
+ const REFRESH_SKEW_MS = 6e4;
35
+ const CLIENT_ASSERTION_TTL_SECONDS = 120;
36
+ function assertServerRuntime() {
37
+ if (typeof window !== "undefined") throw new Error("[@reopt-ai/brandapp-sdk/machine] createMachineClient() must be called on the server — it holds the client private key.");
38
+ }
39
+ async function importPrivateKey(jwk) {
40
+ return jose.importJWK(jwk, jwk.alg);
41
+ }
42
+ /** DPoP 증명(RFC 9449 §4) — htm·htu(쿼리·프래그먼트 제거)·jti·iat, 리소스 요청이면 ath. */
43
+ async function createDpopProof(input) {
44
+ const parsed = new URL(input.url);
45
+ const htu = `${parsed.origin}${parsed.pathname}`;
46
+ const payload = {
47
+ htm: input.method.toUpperCase(),
48
+ htu,
49
+ jti: crypto.randomUUID()
50
+ };
51
+ if (input.accessToken) {
52
+ const digest = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(input.accessToken));
53
+ payload.ath = jose.base64url.encode(new Uint8Array(digest));
54
+ }
55
+ return new jose.SignJWT(payload).setProtectedHeader({
56
+ alg: input.key.alg,
57
+ typ: "dpop+jwt",
58
+ jwk: toPublicJwk(input.key)
59
+ }).setIssuedAt(input.now !== void 0 ? Math.floor(input.now / 1e3) : void 0).sign(await importPrivateKey(input.key));
60
+ }
61
+ function createMachineClient(config) {
62
+ assertServerRuntime();
63
+ if (!config.clientId) throw new Error("[@reopt-ai/brandapp-sdk/machine] clientId is required");
64
+ if (!config.resource) throw new Error("[@reopt-ai/brandapp-sdk/machine] resource (token audience) is required");
65
+ const ring = config.keyRing ?? (config.privateKeyJwk ? {
66
+ signing: config.privateKeyJwk,
67
+ published: [config.privateKeyJwk]
68
+ } : null) ?? readClientKeyRing();
69
+ if (!ring) throw new Error("[@reopt-ai/brandapp-sdk/machine] no client private key — pass privateKeyJwk or set REOPT_CLIENT_PRIVATE_KEY_JWK (generate with `npx @reopt-ai/brandapp-sdk reopt-keygen`)");
70
+ const key = ring.signing;
71
+ const useDpop = config.dpop ?? true;
72
+ const tokenEndpoint = `${resolveIdBaseUrl({
73
+ brandappId: "",
74
+ ...config.idBaseUrl ? { idBaseUrl: config.idBaseUrl } : {}
75
+ })}/api/auth/oauth2/token`;
76
+ const fetchImpl = config.fetch ?? globalThis.fetch;
77
+ const timeoutMs = config.timeoutMs ?? 1e4;
78
+ const now = config.now ?? (() => Date.now());
79
+ const scope = config.scopes.join(" ");
80
+ const getClientAssertion = createPrivateKeyJwtClientAssertionGetter({
81
+ privateKeyJwk: key,
82
+ kid: key.kid,
83
+ algorithm: key.alg,
84
+ expiresIn: CLIENT_ASSERTION_TTL_SECONDS
85
+ });
86
+ let state = null;
87
+ let inflight = null;
88
+ async function requestToken() {
89
+ const assertion = await getClientAssertion({
90
+ clientId: config.clientId,
91
+ tokenEndpoint,
92
+ grantType: "client_credentials"
93
+ });
94
+ const body = new URLSearchParams({
95
+ grant_type: "client_credentials",
96
+ client_id: config.clientId,
97
+ client_assertion_type: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
98
+ client_assertion: assertion,
99
+ scope,
100
+ resource: config.resource
101
+ });
102
+ const headers = {
103
+ "content-type": "application/x-www-form-urlencoded",
104
+ accept: "application/json"
105
+ };
106
+ if (useDpop) headers.DPoP = await createDpopProof({
107
+ key,
108
+ method: "POST",
109
+ url: tokenEndpoint,
110
+ now: now()
111
+ });
112
+ const res = await fetchImpl(tokenEndpoint, {
113
+ method: "POST",
114
+ headers,
115
+ body,
116
+ signal: AbortSignal.timeout(timeoutMs)
117
+ });
118
+ const json = await res.json().catch(() => null);
119
+ if (!res.ok || !json?.access_token) throw new MachineTokenError({
120
+ status: res.status,
121
+ code: json?.error ?? "token_error",
122
+ message: json?.error_description ?? `Failed to obtain machine access token (${res.status})`
123
+ });
124
+ const tokenType = (json.token_type ?? (useDpop ? "DPoP" : "Bearer")).toLowerCase() === "dpop" ? "DPoP" : "Bearer";
125
+ if (useDpop && tokenType !== "DPoP") throw new MachineTokenError({
126
+ status: res.status,
127
+ code: "dpop_not_bound",
128
+ message: "Token endpoint returned a Bearer token although DPoP was requested — is `dpopBoundAccessTokens` set on the client?"
129
+ });
130
+ return {
131
+ accessToken: json.access_token,
132
+ tokenType,
133
+ expiresAt: now() + (json.expires_in ?? 3600) * 1e3,
134
+ scope: json.scope ?? scope
135
+ };
136
+ }
137
+ async function getToken(force = false) {
138
+ if (!force && state && state.expiresAt - REFRESH_SKEW_MS > now()) return state.accessToken;
139
+ if (!inflight) inflight = requestToken().finally(() => {
140
+ inflight = null;
141
+ });
142
+ state = await inflight;
143
+ return state.accessToken;
144
+ }
145
+ async function headers(request) {
146
+ const token = await getToken();
147
+ if (!useDpop) return { Authorization: `Bearer ${token}` };
148
+ return {
149
+ Authorization: `DPoP ${token}`,
150
+ DPoP: await createDpopProof({
151
+ key,
152
+ method: request.method,
153
+ url: request.url,
154
+ accessToken: token,
155
+ now: now()
156
+ })
157
+ };
158
+ }
159
+ async function authedFetch(input, init = {}) {
160
+ const url = typeof input === "string" ? input : input.toString();
161
+ const method = (init.method ?? "GET").toUpperCase();
162
+ const send = async () => fetchImpl(url, {
163
+ ...init,
164
+ method,
165
+ headers: {
166
+ ...init.headers,
167
+ ...await headers({
168
+ method,
169
+ url
170
+ })
171
+ }
172
+ });
173
+ const first = await send();
174
+ if (first.status !== 401) return first;
175
+ state = null;
176
+ await getToken(true);
177
+ return send();
178
+ }
179
+ return {
180
+ clientId: config.clientId,
181
+ resource: config.resource,
182
+ kid: key.kid,
183
+ getToken,
184
+ headers,
185
+ fetch: authedFetch,
186
+ invalidateToken: () => {
187
+ state = null;
188
+ }
189
+ };
190
+ }
191
+
192
+ //#endregion
193
+ export { createDpopProof as n, createMachineClient as r, MachineTokenError as t };
194
+ //# sourceMappingURL=client-RPOH-LNC.js.map
@@ -1,4 +1,4 @@
1
- import { t as BaseHttpClient } from "./http-client-Bl8u1vHN.js";
1
+ import { t as BaseHttpClient } from "./http-client-pEcJtik8.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-eDd4aWDs.js.map
53
+ //# sourceMappingURL=client-iyzEsEEg.js.map
@@ -1,4 +1,4 @@
1
- import { n as ReoptSDKConfig } from "./config-D3SblxWt.js";
1
+ import { n as ReoptSDKConfig } from "./config-CnFnzh7Q.js";
2
2
  //#region src/files/types.d.ts
3
3
  /** 파일 정보 */
4
4
  type FileInfo = {
@@ -269,4 +269,4 @@ declare class ReoptFileClient {
269
269
  declare function createReoptFileClient(config: ReoptSDKConfig): ReoptFileClient;
270
270
  //#endregion
271
271
  export { FileListQuery as a, FolderInfo as c, UpdateFolderInput as d, UploadOptions as f, FileInfo as i, FolderListQuery as l, createReoptFileClient as n, FileListResponse as o, CreateFolderInput as r, FileUsageInfo as s, ReoptFileClient as t, UpdateFileInput as u };
272
- //# sourceMappingURL=client-CniCGdmi.d.ts.map
272
+ //# sourceMappingURL=client-xblzWFAL.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-Dmvtr1nS.js";
2
+ import { n as createReoptCmsClient, t as ReoptCmsClient } from "../client-DfnaH99z.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-FM6_YJbr.js";
1
+ import { t as createReoptCmsClient } from "../client--ELBxfna.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.6.0";
322
+ const SDK_VERSION = "4.7.0-rc.2";
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.
@@ -329,11 +329,11 @@ const SDK_VERSION = "4.6.0";
329
329
  * host stays served indefinitely as a backward-compat alias, so SDK builds
330
330
  * published before this change keep working. ⚠️ Flip takes effect only on
331
331
  * re-publish — republish after `brandapp.reopt.ai` is live on Vercel.
332
- * (dev host stays `brand.reopt.de:3443` — bound to the local hosts file + cert.)
332
+ * (dev host stays `brand.local.reopt.io` — public wildcard DNS to the dev-proxy machine.)
333
333
  */
334
334
  const REOPT_BASE_URLS = {
335
335
  production: "https://brandapp.reopt.ai",
336
- development: "https://brand.reopt.de:3443"
336
+ development: "https://brand.local.reopt.io"
337
337
  };
338
338
  /**
339
339
  * Better Auth handler (`/api/auth/*`) and CLI device-flow endpoints live on
@@ -343,15 +343,18 @@ const REOPT_BASE_URLS = {
343
343
  * Override via `config.idBaseUrl` or the `REOPT_ID_BASE_URL` env var. If only
344
344
  * the main host is overridden (`config.baseUrl` or `REOPT_BASE_URL`), the id
345
345
  * host is auto-derived via {@link deriveIdFromBaseUrl} — e.g. setting
346
- * `REOPT_BASE_URL=https://brand.reopt.de:3443` is enough; `id.reopt.de:3443` is
346
+ * `REOPT_BASE_URL=https://brand.local.reopt.io` is enough; `id.local.reopt.io` is
347
347
  * inferred automatically.
348
348
  */
349
349
  const REOPT_ID_BASE_URLS = {
350
350
  production: "https://id.reopt.ai",
351
- development: "https://id.reopt.de:3443"
351
+ development: "https://id.local.reopt.io"
352
352
  };
353
353
  function validateConfig(config) {
354
- if (!!!config.token?.trim()) {
354
+ const hasToken = !!config.token?.trim();
355
+ const hasAuthorizationProvider = typeof config.authorization === "function";
356
+ if (hasAuthorizationProvider && !config.clientId?.trim()) throw new ConfigError("ReoptSDK: clientId is required alongside `authorization`. Set BRANDAPP_CLIENT_ID environment variable.", "BRANDAPP_CLIENT_ID");
357
+ if (!hasToken && !hasAuthorizationProvider) {
355
358
  if (!config.clientId?.trim()) throw new ConfigError("ReoptSDK: clientId is required (or pass a short-lived `token`). Set BRANDAPP_CLIENT_ID environment variable.", "BRANDAPP_CLIENT_ID");
356
359
  if (!config.clientSecret?.trim()) throw new ConfigError("ReoptSDK: clientSecret is required (or pass a short-lived `token`). Set BRANDAPP_CLIENT_SECRET environment variable.", "BRANDAPP_CLIENT_SECRET");
357
360
  }
@@ -444,7 +447,7 @@ function readEnvUrl(name) {
444
447
  * 2. `REOPT_BASE_URL` env var — set this once and skip threading
445
448
  * `baseUrl` through every `createReoptSDK()` call
446
449
  * 3. default by `isProduction` / `NODE_ENV` (production →
447
- * `brandapp.reopt.ai`, otherwise → `brand.reopt.de:3443`)
450
+ * `brandapp.reopt.ai`, otherwise → `brand.local.reopt.io`)
448
451
  */
449
452
  function resolveBaseUrl(config) {
450
453
  if (config.baseUrl) return config.baseUrl.replace(/\/$/, "");
@@ -476,7 +479,7 @@ function resolveIdBaseUrl(config) {
476
479
  return config.isProduction ?? (typeof process !== "undefined" && process.env?.NODE_ENV === "production") ? REOPT_ID_BASE_URLS.production : REOPT_ID_BASE_URLS.development;
477
480
  }
478
481
  /**
479
- * Best-effort host transform — any reopt.{ai,io,de} subdomain folds to the
482
+ * Best-effort host transform — any reopt.{ai,io} / local.reopt.io subdomain folds to the
480
483
  * shared id host for that environment. Custom hosts fall back to prepending
481
484
  * `id.` (with a leading `www.` stripped).
482
485
  */
@@ -486,8 +489,8 @@ function deriveIdFromBaseUrl(baseUrl) {
486
489
  const url = new URL(clean);
487
490
  const { hostname } = url;
488
491
  if (hostname === "reopt.ai" || hostname.endsWith(".reopt.ai")) return REOPT_ID_BASE_URLS.production;
492
+ if (hostname === "local.reopt.io" || hostname.endsWith(".local.reopt.io")) return REOPT_ID_BASE_URLS.development;
489
493
  if (hostname === "reopt.io" || hostname.endsWith(".reopt.io")) return "https://id.reopt.io";
490
- if (hostname === "reopt.de" || hostname.endsWith(".reopt.de")) return REOPT_ID_BASE_URLS.development;
491
494
  if (hostname.startsWith("id.")) return url.origin;
492
495
  url.hostname = `id.${hostname.replace(/^www\./, "")}`;
493
496
  return url.origin;
@@ -498,4 +501,4 @@ function deriveIdFromBaseUrl(baseUrl) {
498
501
 
499
502
  //#endregion
500
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 };
501
- //# sourceMappingURL=config-BeOelISH.js.map
504
+ //# sourceMappingURL=config-B6U6kZxR.js.map
@@ -351,11 +351,11 @@ type DebugLogger = {
351
351
  * host stays served indefinitely as a backward-compat alias, so SDK builds
352
352
  * published before this change keep working. ⚠️ Flip takes effect only on
353
353
  * re-publish — republish after `brandapp.reopt.ai` is live on Vercel.
354
- * (dev host stays `brand.reopt.de:3443` — bound to the local hosts file + cert.)
354
+ * (dev host stays `brand.local.reopt.io` — public wildcard DNS to the dev-proxy machine.)
355
355
  */
356
356
  declare const REOPT_BASE_URLS: {
357
357
  readonly production: "https://brandapp.reopt.ai";
358
- readonly development: "https://brand.reopt.de:3443";
358
+ readonly development: "https://brand.local.reopt.io";
359
359
  };
360
360
  type ReoptSDKConfig<S extends SchemaDef = SchemaDef> = {
361
361
  /**
@@ -384,9 +384,24 @@ type ReoptSDKConfig<S extends SchemaDef = SchemaDef> = {
384
384
  * via `FetchOptions.bearerToken` still take precedence.
385
385
  */
386
386
  token?: string;
387
+ /**
388
+ * RFC-0034 — 요청마다 인증 헤더를 만드는 제공자. 기계 클라이언트(`@reopt-ai/brandapp-sdk/machine`)의
389
+ * `headers`를 넘기면 모든 요청이 `Authorization: DPoP <token>` + `DPoP` 증명으로 나가고 Basic은 쓰이지
390
+ * 않는다(clientSecret 불필요). per-call `FetchOptions.bearerToken`이 여전히 우선한다.
391
+ *
392
+ * @example
393
+ * ```ts
394
+ * const machine = createMachineClient({ clientId, resource: "https://brandapp.reopt.ai", scopes: ["brandapp:read"] });
395
+ * const sdk = createReoptSDK({ brandappId, clientId, authorization: machine.headers });
396
+ * ```
397
+ */
398
+ authorization?: (request: {
399
+ method: string;
400
+ url: string;
401
+ }) => Promise<Record<string, string>>;
387
402
  /**
388
403
  * true: production (https://brandapp.reopt.ai)
389
- * false: development (https://brand.reopt.de:3443)
404
+ * false: development (https://brand.local.reopt.io)
390
405
  * undefined (default): auto-detect from `NODE_ENV === "production"`
391
406
  */
392
407
  isProduction?: boolean;
@@ -401,7 +416,7 @@ type ReoptSDKConfig<S extends SchemaDef = SchemaDef> = {
401
416
  * Custom id (auth) base URL — overrides `REOPT_ID_BASE_URL` env and the URL
402
417
  * derived from `baseUrl` / `REOPT_BASE_URL` / `isProduction`. Set this when
403
418
  * the Better Auth handler is hosted at a non-standard origin (custom dev
404
- * cluster, on-prem deploy, etc.). For standard reopt.{ai,io,de} hosts you
419
+ * cluster, on-prem deploy, etc.). For standard reopt.{ai,io} / local.reopt.io hosts you
405
420
  * can omit both this and the env var — it's auto-derived from the API host.
406
421
  */
407
422
  idBaseUrl?: string;
@@ -443,9 +458,9 @@ type ReoptSDKConfig<S extends SchemaDef = SchemaDef> = {
443
458
  * 2. `REOPT_BASE_URL` env var — set this once and skip threading
444
459
  * `baseUrl` through every `createReoptSDK()` call
445
460
  * 3. default by `isProduction` / `NODE_ENV` (production →
446
- * `brandapp.reopt.ai`, otherwise → `brand.reopt.de:3443`)
461
+ * `brandapp.reopt.ai`, otherwise → `brand.local.reopt.io`)
447
462
  */
448
463
  declare function resolveBaseUrl(config: ReoptSDKConfig): string;
449
464
  //#endregion
450
465
  export { ListRecordsQuery as A, EavAttribute as C, EavRecord as D, EavEntity as E, UpdateRecordInput as F, UpsertRecordInput as I, UpsertRecordResult as L, RECORDS_PAGE_LIMIT_MAX as M, UpdateAttributeInput as N, EavSchemaLinkedTo as O, UpdateEntityInput 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 };
451
- //# sourceMappingURL=config-D3SblxWt.d.ts.map
466
+ //# sourceMappingURL=config-CnFnzh7Q.d.ts.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-C6fyJTud.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-Dh8XMVFF.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 };
@@ -1,6 +1,6 @@
1
- import { A as ListRecordsQuery, C as EavAttribute, D as EavRecord, E as EavEntity, F as UpdateRecordInput, I as UpsertRecordInput, L as UpsertRecordResult, M as RECORDS_PAGE_LIMIT_MAX, N as UpdateAttributeInput, O as EavSchemaLinkedTo, P as UpdateEntityInput, 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-D3SblxWt.js";
1
+ import { A as ListRecordsQuery, C as EavAttribute, D as EavRecord, E as EavEntity, F as UpdateRecordInput, I as UpsertRecordInput, L as UpsertRecordResult, M as RECORDS_PAGE_LIMIT_MAX, N as UpdateAttributeInput, O as EavSchemaLinkedTo, P as UpdateEntityInput, 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-CnFnzh7Q.js";
2
2
  import { c as DuplicateAuthUserError, f as LimitExceededError, n as AuthUserNotFoundError, r as AuthUserRecordExistsError } from "../errors-U3TsyWVq.js";
3
- import { i as TypedEavRecord, n as createReoptEavClient, r as EntityClient, t as ReoptEavClient } from "../client-C6OXGMMV.js";
3
+ import { i as TypedEavRecord, n as createReoptEavClient, r as EntityClient, t as ReoptEavClient } from "../client-C2W4RAZV.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-BeOelISH.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-tJq0U_jn.js";
1
+ import { c as AuthUserNotFoundError, g as LimitExceededError, l as AuthUserRecordExistsError, m as DuplicateAuthUserError } from "../config-B6U6kZxR.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-BVBl3gPQ.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-D3SblxWt.js";
2
- import { t as ReoptEavClient } from "../client-C6OXGMMV.js";
1
+ import { o as AttributeDef, s as EntityDef } from "../config-CnFnzh7Q.js";
2
+ import { t as ReoptEavClient } from "../client-C2W4RAZV.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 EavAttribute, E as EavEntity, T as EavDataType, c as InferValues, l as SchemaDef, o as AttributeDef, s as EntityDef } from "../config-D3SblxWt.js";
2
- import { t as ReoptEavClient } from "../client-C6OXGMMV.js";
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-CnFnzh7Q.js";
2
+ import { t as ReoptEavClient } from "../client-C2W4RAZV.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-COKDtHO9.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-MDNS9Ubf.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-Ce0gs5Ma.js";
1
+ import { n as createReoptFeedbackClient, t as ReoptFeedbackClient } from "../client-C7X3w8t6.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-CniCGdmi.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-xblzWFAL.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-DjLhTNsZ.js";
1
+ import { n as createReoptFileClient, t as ReoptFileClient } from "../client-DNZsyjA0.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-BeOelISH.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-B6U6kZxR.js";
2
2
  import { t as createAuthHeader } from "./encoding-Bwfm3iaE.js";
3
3
 
4
4
  //#region src/core/debug.ts
@@ -220,6 +220,8 @@ function parseErrorBody(errorBody) {
220
220
  var BaseHttpClient = class {
221
221
  baseUrl;
222
222
  authHeader;
223
+ /** RFC-0034 — 요청별 인증 헤더 제공자(기계 클라이언트 DPoP). 있으면 정적 Basic/Bearer 대신 쓴다. */
224
+ authorization;
223
225
  timeout;
224
226
  maxRetries;
225
227
  retryNonIdempotent;
@@ -229,6 +231,7 @@ var BaseHttpClient = class {
229
231
  const base = options?.useIdServer ? resolveIdBaseUrl(config) : resolveBaseUrl(config);
230
232
  this.baseUrl = base + pathPrefix;
231
233
  this.authHeader = createAuthHeader(config);
234
+ this.authorization = config.authorization;
232
235
  this.timeout = config.timeout ?? DEFAULT_TIMEOUT;
233
236
  this.maxRetries = config.maxRetries ?? DEFAULT_MAX_RETRIES;
234
237
  this.retryNonIdempotent = config.retryNonIdempotent ?? false;
@@ -275,7 +278,10 @@ var BaseHttpClient = class {
275
278
  else externalSignal.addEventListener("abort", onExternalAbort, { once: true });
276
279
  try {
277
280
  const headers = {
278
- Authorization: options?.bearerToken ? `Bearer ${options.bearerToken}` : this.authHeader,
281
+ ...(!options?.bearerToken && this.authorization ? await this.authorization({
282
+ method,
283
+ url
284
+ }) : null) ?? { Authorization: options?.bearerToken ? `Bearer ${options.bearerToken}` : this.authHeader },
279
285
  "X-SDK-Version": `brandapp-sdk/${SDK_VERSION}`,
280
286
  "X-SDK-Runtime": RUNTIME,
281
287
  "X-Request-Id": requestId
@@ -383,4 +389,4 @@ function parseFieldErrors(body) {
383
389
 
384
390
  //#endregion
385
391
  export { parseFieldErrors as n, BaseHttpClient as t };
386
- //# sourceMappingURL=http-client-Bl8u1vHN.js.map
392
+ //# sourceMappingURL=http-client-pEcJtik8.js.map
@@ -1,14 +1,14 @@
1
- import { l as SchemaDef, n as ReoptSDKConfig } from "./config-D3SblxWt.js";
2
- import { t as ReoptAiClient } from "./client-D1AFtJRw.js";
3
- import { t as ReoptAnalyticsClient } from "./client-7I-mz3Dw.js";
4
- import { t as ReoptAuthClient } from "./client-Bfutv3LK.js";
5
- import { t as ReoptCmsClient } from "./client-Dmvtr1nS.js";
6
- import { t as ReoptEavClient } from "./client-C6OXGMMV.js";
7
- import { t as ReoptFeedbackClient } from "./client-COKDtHO9.js";
8
- import { t as ReoptFileClient } from "./client-CniCGdmi.js";
9
- import { t as ReoptPlansClient } from "./client-IUSZDJio.js";
10
- import { t as ReoptPushClient } from "./client-BSW0Ncjj.js";
11
- import { t as ReoptTermsClient } from "./client-yKeRJnIB.js";
1
+ import { l as SchemaDef, n as ReoptSDKConfig } from "./config-CnFnzh7Q.js";
2
+ import { t as ReoptAiClient } from "./client-Cnq_X3Wp.js";
3
+ import { t as ReoptAnalyticsClient } from "./client-C6lx3RUQ.js";
4
+ import { t as ReoptAuthClient } from "./client-Cod87ThY.js";
5
+ import { t as ReoptCmsClient } from "./client-DfnaH99z.js";
6
+ import { t as ReoptEavClient } from "./client-C2W4RAZV.js";
7
+ import { t as ReoptFeedbackClient } from "./client-MDNS9Ubf.js";
8
+ import { t as ReoptFileClient } from "./client-xblzWFAL.js";
9
+ import { t as ReoptPlansClient } from "./client-BQJepjoD.js";
10
+ import { t as ReoptPushClient } from "./client-CsWSxMhB.js";
11
+ import { t as ReoptTermsClient } from "./client-CSl3o0s3.js";
12
12
  //#region src/core/http-client.d.ts
13
13
  type FetchOptions = {
14
14
  /** Abort the request via an external AbortSignal (merged with timeout signal). */
@@ -43,6 +43,8 @@ type BaseHttpClientOptions = {
43
43
  declare class BaseHttpClient {
44
44
  private readonly baseUrl;
45
45
  private readonly authHeader;
46
+ /** RFC-0034 — 요청별 인증 헤더 제공자(기계 클라이언트 DPoP). 있으면 정적 Basic/Bearer 대신 쓴다. */
47
+ private readonly authorization;
46
48
  private readonly timeout;
47
49
  private readonly maxRetries;
48
50
  private readonly retryNonIdempotent;
@@ -168,4 +170,4 @@ type ReoptSDK<S extends SchemaDef = SchemaDef> = {
168
170
  declare function createReoptSDK<S extends SchemaDef = SchemaDef>(config: ReoptSDKConfig<S>): ReoptSDK<S>;
169
171
  //#endregion
170
172
  export { initReoptSDK as a, getReoptSDK as i, createReoptSDK as n, resetSDK as o, createLazySDK as r, BaseHttpClient as s, ReoptSDK as t };
171
- //# sourceMappingURL=index-BnAYxnwq.d.ts.map
173
+ //# sourceMappingURL=index-Bkci7euU.d.ts.map
@@ -292,7 +292,7 @@ declare function markdownToEditorSpecMany(markdowns: string[]): Promise<EditorSp
292
292
  //#endregion
293
293
  //#region src/dev/index.d.ts
294
294
  type ProxyConfig = {
295
- /** Remote Reopt server URL (e.g. "https://brand.reopt.de:3443") */
295
+ /** Remote Reopt server URL (e.g. "https://brand.local.reopt.io") */
296
296
  remoteUrl: string;
297
297
  /** Remote OAuth credentials */
298
298
  remoteCredentials: {
@@ -473,4 +473,4 @@ type DevServer = {
473
473
  declare function createDevServer(options?: DevServerOptions): Promise<DevServer>;
474
474
  //#endregion
475
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 };
476
- //# sourceMappingURL=index-C6fyJTud.d.ts.map
476
+ //# sourceMappingURL=index-Dh8XMVFF.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-D3SblxWt.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-D1AFtJRw.js";
1
+ import { a as DebugLogger, i as DebugLevel, n as ReoptSDKConfig, r as resolveBaseUrl, t as REOPT_BASE_URLS } from "./config-CnFnzh7Q.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-Cnq_X3Wp.js";
3
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-U3TsyWVq.js";
4
- import { i as TypedEavRecord, r as EntityClient } from "./client-C6OXGMMV.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-BnAYxnwq.js";
4
+ import { i as TypedEavRecord, r as EntityClient } from "./client-C2W4RAZV.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-Bkci7euU.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, 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 };
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-BeOelISH.js";
2
- import { t as BaseHttpClient } from "./http-client-Bl8u1vHN.js";
3
- import { n as createReoptAiClient } from "./client-C2xE9HGZ.js";
4
- import { n as createReoptAuthClient } from "./client-eDd4aWDs.js";
5
- import { t as createReoptCmsClient } from "./client-FM6_YJbr.js";
6
- import { t as createReoptEavClient } from "./client-tJq0U_jn.js";
7
- import { n as createReoptFeedbackClient } from "./client-Ce0gs5Ma.js";
8
- import { n as createReoptFileClient } from "./client-DjLhTNsZ.js";
9
- import { n as createReoptAnalyticsClient } from "./client-BzAgabAs.js";
10
- import { n as createReoptPlansClient } from "./client-CI2Y00Qx.js";
11
- import { n as createReoptPushClient } from "./client-DeC127BD.js";
12
- import { n as createReoptTermsClient } from "./client-DCqp0Bis.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-B6U6kZxR.js";
2
+ import { t as BaseHttpClient } from "./http-client-pEcJtik8.js";
3
+ import { n as createReoptAiClient } from "./client-D6333rpA.js";
4
+ import { n as createReoptAuthClient } from "./client-iyzEsEEg.js";
5
+ import { t as createReoptCmsClient } from "./client--ELBxfna.js";
6
+ import { t as createReoptEavClient } from "./client-BVBl3gPQ.js";
7
+ import { n as createReoptFeedbackClient } from "./client-C7X3w8t6.js";
8
+ import { n as createReoptFileClient } from "./client-DNZsyjA0.js";
9
+ import { n as createReoptAnalyticsClient } from "./client-DFxq2GcS.js";
10
+ import { n as createReoptPlansClient } from "./client-DE1ynLgS.js";
11
+ import { n as createReoptPushClient } from "./client-BeiMpmXQ.js";
12
+ import { n as createReoptTermsClient } from "./client-CGulAXhy.js";
13
13
 
14
14
  //#region src/singleton.ts
15
15
  let _instance;