@reopt-ai/brandapp-sdk 4.7.0-rc.12 → 4.7.0-rc.14
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 +69 -0
- package/README.md +28 -19
- package/dist/ai/index.js +2 -2
- package/dist/ai-provider/index.js +1 -1
- package/dist/analytics/index.js +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/better-auth/index.d.ts +35 -26
- package/dist/better-auth/index.js +71 -46
- package/dist/{client-BtFoViKj.js → client-BAr_BNfz.js} +3 -3
- package/dist/{client-BL7vOv_M.js → client-BBx2uOT6.js} +2 -2
- package/dist/{client-CB1A7gg4.js → client-BH7PYWbE.js} +2 -2
- package/dist/{client-Bzk7eqy5.js → client-BLmIi1fg.js} +3 -3
- package/dist/{client-BUfDFULW.js → client-CU_ot3SS.js} +2 -2
- package/dist/{client-BHX14FpH.js → client-Ce0z7WTl.js} +2 -2
- package/dist/{client-BvUK6AxL.js → client-CwfUFDWS.js} +2 -2
- package/dist/{client-CJRjPSf7.d.ts → client-CyFOwE5p.d.ts} +25 -6
- package/dist/{client-tFChmi6z.js → client-DHmwj3qm.js} +4 -4
- package/dist/{client-l7dQ_fLm.js → client-Dn5CjA4d.js} +3 -3
- package/dist/{client-BHoS1dGr.js → client-OEX6i4XJ.js} +2 -2
- package/dist/{client-BvLrx0Ai.js → client-OHAVqTBu.js} +2 -2
- package/dist/{client-Ccw-FJlt.js → client-loa5Z9hY.js} +166 -29
- package/dist/cms/index.js +1 -1
- package/dist/{config-D21ZcDET.js → config-DrtdQNzj.js} +2 -2
- package/dist/dev/index.js +49 -10
- package/dist/eav/index.d.ts +1 -1
- package/dist/eav/index.js +2 -2
- package/dist/eav/migrate.d.ts +1 -1
- package/dist/eav/schema.d.ts +1 -1
- package/dist/eav/schema.js +1 -1
- package/dist/feedback/index.js +1 -1
- package/dist/files/index.d.ts +11 -0
- package/dist/files/index.js +14 -1
- package/dist/{http-client-CVwg2EAl.js → http-client-DQf8pVNw.js} +2 -2
- package/dist/{index-CaXrNTtU.d.ts → index-BQaGBa_K.d.ts} +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +12 -12
- package/dist/installation/index.js +3 -3
- package/dist/logout/index.js +1 -1
- package/dist/machine/index.js +1 -1
- package/dist/plans/index.js +1 -1
- package/dist/push/index.js +1 -1
- package/dist/{query-C_qce1vC.js → query-ktdIV5kz.js} +2 -2
- package/dist/react/hooks.d.ts +1 -1
- package/dist/social/index.js +1 -1
- package/dist/terms/index.js +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/workspace/index.js +1 -1
- package/docs/api-reference.md +2 -1
- package/docs/dev-server.md +6 -1
- package/docs/files.md +6 -1
- package/docs/testing.md +4 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,75 @@ This project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [4.7.0-rc.14] — 2026-11-20
|
|
11
|
+
|
|
12
|
+
Pre-release (`npm i @reopt-ai/brandapp-sdk@next`) — 타입 EAV 클라이언트(`sdk.eav.entity(name)`)가 실서버에서
|
|
13
|
+
쓰기를 조용히 잃던 결함을 고친다. 🔴 rc.13 이하에서 `entity()`로 값을 썼다면 실서버에는 아무것도 저장되지 않았다
|
|
14
|
+
(아래 Fixed 첫 항목).
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **`sdk.eav.entity(name)`가 속성 이름을 속성 ID로 바꿔 보낸다.** 서버는 레코드 값·필터·`sortBy`·`select`를 속성
|
|
19
|
+
ID로만 읽고 모르는 키는 말없이 버린다. 그런데 타입 클라이언트는 이름 키(`values: { title }`)를 그대로 보냈다 —
|
|
20
|
+
생성은 필수값 누락 422, 조회 결과는 ID 키라 `record.values.title`이 `undefined`, **수정은 200을 돌려주고 아무것도
|
|
21
|
+
바꾸지 않았다**. 이제 `values`·`increments`·`filters[].attributeId`(`where("name")` 포함)·`sortBy`·`select`를
|
|
22
|
+
이름 → ID로 바꿔 보내고, 응답 레코드의 `values`를 ID → 이름으로 돌려준다(`backfill`의 `transform`도 이름 키로
|
|
23
|
+
받고 이름 키로 돌려준다). 속성 ID를 키로 넘겨도 그대로 통한다(우회해 둔 코드가 깨지지 않는다).
|
|
24
|
+
모르는 키는 서버에 보내기 전에 `UNKNOWN_ATTRIBUTE`(`BadRequestError`)로 거절한다 — 스키마가 바뀐 직후일 수 있어
|
|
25
|
+
엔티티를 한 번 다시 읽은 뒤에 판정한다. 엔티티 속성 목록은 엔티티 이름 캐시와 함께 5분 캐시된다.
|
|
26
|
+
⚠️ 응답의 `values`가 이름 키가 됐다 — rc.13에서 `entity()` 결과를 `values[attributeId]`로 읽어 우회했다면
|
|
27
|
+
`values.<이름>`으로 바꾼다. ID 키 원시 API(`sdk.eav.records.*`)는 바뀌지 않았다.
|
|
28
|
+
- **dev 서버가 속성 ID를 실서버처럼 따로 발급한다.** 지금까지는 속성 이름을 ID로 써서 위 결함이 로컬에서
|
|
29
|
+
드러나지 않았고, 한 전역 맵에 넣어 서로 다른 엔티티의 같은 이름 속성(예: 두 엔티티의 `title`)이 마지막 것으로
|
|
30
|
+
덮였다. 레코드 값도 실서버처럼 그 엔티티의 속성 ID가 아닌 키를 버린다. `dev.seed()`·`seedAll`은 종전대로 이름
|
|
31
|
+
키를 받는다(ID로 바꿔 저장). ⚠️ dev 서버에 원시 HTTP·ID 키 API로 이름 키를 보내던 테스트는 실서버와 같이
|
|
32
|
+
값이 버려진다 — `entity()`를 쓰거나 `GET /entities/:id`의 속성 ID로 바꾼다.
|
|
33
|
+
- **`eav sync`가 선언하지 않은 `icon`을 변경으로 보지 않는다.** 서버는 icon 없이 만든 엔티티에 기본값(📊)을
|
|
34
|
+
넣는데, diff가 "미선언 = null"로 읽어 매 dry-run마다 `icon: null` 갱신을 내놓았다. 이제 `defineEntity`에
|
|
35
|
+
`icon`을 적었을 때만 맞춘다(서버의 icon을 지우려면 다른 값을 선언한다).
|
|
36
|
+
- **`REOPT_IMAGE_REMOTE_PATTERNS`에 실제 파일 호스트를 넣었다** — `sdk.files`가 돌려주는 `url`은
|
|
37
|
+
`https://studio.reopt.ai/api/blob/...`(리옵트 서빙 프록시)인데 목록에는 Vercel Blob 호스트만 있어 `next/image`가
|
|
38
|
+
거절했다. `ImageRemotePattern`에 `pathname`이 생겼다. 로컬(`studio.local.reopt.io`)은 루프백이라 Next.js가
|
|
39
|
+
패턴과 무관하게 거절한다 — `docs/files.md` 참고.
|
|
40
|
+
|
|
41
|
+
## [4.7.0-rc.13] — 2026-11-08
|
|
42
|
+
|
|
43
|
+
Pre-release (`npm i @reopt-ai/brandapp-sdk@next`) — 앱 심사용 번호를 리옵트 콘솔로 옮기고, 전화번호 정본을 E.164로
|
|
44
|
+
바꾼다. 🔴 rc.11·12로 받은 사용자가 있으면 배포 전에 번호를 옮긴다(아래 Changed 둘째 항목).
|
|
45
|
+
|
|
46
|
+
### Removed
|
|
47
|
+
|
|
48
|
+
- **`createReoptPhoneNumber`의 `reviewAccounts` 옵션과 `ReoptPhoneReviewAccounts` 타입**(rc.12). 앱 심사용 번호는
|
|
49
|
+
이제 리옵트 콘솔(브랜드앱 설정 → 앱 심사용 번호)에서 등록한다 — 앱을 다시 배포하지 않고 번호·코드를 바꾸거나 지울
|
|
50
|
+
수 있고, 코드는 앱 env가 아니라 리옵트에 암호화돼 남는다. 옮길 때: 옵션과 그 env를 지우고 같은 번호·코드를
|
|
51
|
+
콘솔에 등록한다(등록은 2단계 인증으로 로그인한 지 5분 안에).
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
|
|
55
|
+
- 콘솔에 등록된 심사용 번호면 리옵트가 문자를 보내지 않고 고정 코드를 돌려주고(`{ sent: false, via: "review", code }`),
|
|
56
|
+
플러그인이 그 코드를 이번 인증번호로 저장한다. 검증·시도 횟수·만료·가입은 다른 번호와 같다. 코드 길이가
|
|
57
|
+
`otpLength`와 다르면 `REVIEW_CODE_LENGTH_MISMATCH`(Better Auth 503). 플러그인은 요청에 `acceptsReviewCode: true`를
|
|
58
|
+
싣는다 — 싣지 않는 호출자(rc.12 이하, 직접 배선한 앱)에게 리옵트는 그 번호를 409 `REVIEW_ACCOUNT_SDK_OUTDATED`로
|
|
59
|
+
거절한다(코드를 돌려줘도 버려지기 때문). `createReoptOtpSmsSender`의 입력에 `acceptsReviewCode`, 결과 타입
|
|
60
|
+
`ReoptOtpSmsResult`에 `review`가 생겼다.
|
|
61
|
+
|
|
62
|
+
- **전화번호 정본이 E.164로 바뀐다**(`+821012345678`, rc.11·12는 국내 표기 `01012345678`). 해외 번호를 받을 준비다 —
|
|
63
|
+
리옵트 서버는 두 표기를 모두 받아 E.164로 저장하고 기존 행도 옮기므로 rc.11·12와도 함께 동작한다.
|
|
64
|
+
🔴 **앱의 Better Auth 사용자 행은 앱이 옮긴다** — rc.11·12는 `user.phoneNumber`에 `01012345678`을 저장했고 rc.13은
|
|
65
|
+
`+821012345678`로 찾는다. 옮기지 않으면 그 사용자가 같은 번호로 **새로 가입**된다. 업그레이드 배포 전에 한 번
|
|
66
|
+
(테이블·컬럼 이름은 앱 스키마에 맞춘다):
|
|
67
|
+
`UPDATE "user" SET "phoneNumber" = '+82' || substr("phoneNumber", 2) WHERE "phoneNumber" ~ '^01[016789][0-9]{7,8}$';`
|
|
68
|
+
번호를 앱 저장소의 다른 곳에도 두었다면 그 값도 E.164로 맞춘다. 임시 이메일은 `+`를 뺀 숫자다
|
|
69
|
+
(`821012345678.<난수>@…`). 기존 사용자의 임시 이메일은 바뀌지 않는다.
|
|
70
|
+
- `+국가코드`로 쓴 다른 국가 번호는 SDK가 거절하지 않고 리옵트로 넘긴다 — 리옵트가 브랜드앱 설정(지금은 한국만)으로
|
|
71
|
+
판정해 `PHONE_COUNTRY_NOT_ALLOWED`(Better Auth 400)로 거절한다. 표기가 이상한 번호는 종전대로 `INVALID_PHONE_NUMBER`.
|
|
72
|
+
|
|
73
|
+
### Added
|
|
74
|
+
|
|
75
|
+
- `formatReoptPhoneNumber` — 저장된 번호를 화면 표기로(`010-1234-5678`, 다른 국가는 E.164 그대로).
|
|
76
|
+
- 리옵트 거절 코드 `PHONE_LOGIN_DISABLED`(콘솔에서 전화번호 로그인을 끈 앱, Better Auth 403)·
|
|
77
|
+
`PHONE_COUNTRY_NOT_ALLOWED`(400)를 Better Auth 오류로 넘긴다.
|
|
78
|
+
|
|
10
79
|
## [4.7.0-rc.12] — 2026-11-07
|
|
11
80
|
|
|
12
81
|
Pre-release (`npm i @reopt-ai/brandapp-sdk@next`) — 전화번호 로그인 앱 심사 계정.
|
package/README.md
CHANGED
|
@@ -201,10 +201,21 @@ export const auth = betterAuth({
|
|
|
201
201
|
// await authClient.phoneNumber.verify({ phoneNumber: "010-1234-5678", code });
|
|
202
202
|
```
|
|
203
203
|
|
|
204
|
-
- **
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
204
|
+
- **Numbers are stored in E.164** (`+821012345678`). Every `/phone-number/*`
|
|
205
|
+
request is canonicalized before the plugin sees it, so different formats
|
|
206
|
+
(`010-1234-5678`, `+82 10 1234 5678`) never split one person into two
|
|
207
|
+
accounts; malformed numbers get a 400 (`INVALID_PHONE_NUMBER`).
|
|
208
|
+
**Upgrading from 4.7.0-rc.11/rc.12:** those stored domestic numbers
|
|
209
|
+
(`01012345678`). Move existing `user.phoneNumber` rows to E.164 before you
|
|
210
|
+
deploy, or those users sign up again as new accounts — see the CHANGELOG
|
|
211
|
+
entry for 4.7.0-rc.13.
|
|
212
|
+
- **Reopt sends to Korean mobile numbers only for now.** Other countries are
|
|
213
|
+
refused with `PHONE_COUNTRY_NOT_ALLOWED` (Better Auth 400). Which countries an
|
|
214
|
+
app accepts is its phone-login setting in the Platform console (Korea only
|
|
215
|
+
until international SMS opens); turning phone login off there returns
|
|
216
|
+
`PHONE_LOGIN_DISABLED` (403). Foreign numbers are the main SMS-pumping vector.
|
|
217
|
+
- `formatReoptPhoneNumber` turns a stored number back into a display form
|
|
218
|
+
(`010-1234-5678`, or E.164 for other countries).
|
|
208
219
|
- Without an SMS connection the send fails with `SMS_NOT_CONNECTED` (Better
|
|
209
220
|
Auth 503 to your client). Reopt's own system brands and test workspaces fall
|
|
210
221
|
back to Reopt's number (test workspaces: 30/hour, 100/day).
|
|
@@ -221,21 +232,19 @@ export const auth = betterAuth({
|
|
|
221
232
|
store unverified numbers on sign-up; the factory throws).
|
|
222
233
|
- Already wiring the plugin yourself? `createReoptOtpSmsSender(config)` returns
|
|
223
234
|
just the sender for your own `sendOTP` — pass canonical numbers
|
|
224
|
-
(`canonicalizeReoptPhoneNumber`) and `clientIp`.
|
|
225
|
-
|
|
226
|
-
number
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
a real number would lock its owner out and let anyone with the code into the
|
|
238
|
-
account. Read both values from env and omit the option to turn it off.
|
|
235
|
+
(`canonicalizeReoptPhoneNumber`) and `clientIp`. If you also pass
|
|
236
|
+
`acceptsReviewCode: true`, store the `code` of a `{ via: "review" }` result
|
|
237
|
+
as that number's OTP (without the flag, review numbers are refused with 409
|
|
238
|
+
`REVIEW_ACCOUNT_SDK_OUTDATED`).
|
|
239
|
+
- **App-store review numbers** — reviewers cannot receive texts. Register a
|
|
240
|
+
number and a fixed code in the Reopt console (brandapp settings → 앱 심사용
|
|
241
|
+
번호); nothing goes in your code. For those numbers Reopt sends no SMS and
|
|
242
|
+
returns the fixed code, the plugin stores it as the OTP, and verification,
|
|
243
|
+
attempt limits, expiry and sign-up run as usual. The code must be `otpLength`
|
|
244
|
+
digits (otherwise the send fails with `REVIEW_CODE_LENGTH_MISMATCH`). Use
|
|
245
|
+
numbers that are **not in service** — a real number would lock its owner out
|
|
246
|
+
and let anyone with the code into the account. Reopt does not create a CRM
|
|
247
|
+
customer for a review-number sign-up.
|
|
239
248
|
|
|
240
249
|
### External marketing site (1.8+)
|
|
241
250
|
|
package/dist/ai/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as ReoptSDKError } from "../config-
|
|
2
|
-
import { n as createReoptAiClient, t as ReoptAiClient } from "../client-
|
|
1
|
+
import { S as ReoptSDKError } from "../config-DrtdQNzj.js";
|
|
2
|
+
import { n as createReoptAiClient, t as ReoptAiClient } from "../client-DHmwj3qm.js";
|
|
3
3
|
|
|
4
4
|
//#region src/ai/evaluator.ts
|
|
5
5
|
function createBrandappEvaluator(source, options = {}) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as resolveBaseUrl, j as mapHttpStatusToError, n as SDK_VERSION, o as validateConfig, r as assertBrowserSafe } from "../config-
|
|
1
|
+
import { i as resolveBaseUrl, j as mapHttpStatusToError, n as SDK_VERSION, o as validateConfig, r as assertBrowserSafe } from "../config-DrtdQNzj.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-D65dmL4A.js";
|
package/dist/analytics/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createReoptAnalyticsClient, t as ReoptAnalyticsClient } from "../client-
|
|
1
|
+
import { n as createReoptAnalyticsClient, t as ReoptAnalyticsClient } from "../client-CU_ot3SS.js";
|
|
2
2
|
import { getInstance, identify, init, pageView, setConsent, track } from "@reopt-ai/data-sdk";
|
|
3
3
|
|
|
4
4
|
//#region src/analytics/browser.ts
|
package/dist/auth/index.js
CHANGED
|
@@ -113,14 +113,19 @@ declare function createReoptOAuth(options: ReoptOAuthOptions): BetterAuthPlugin;
|
|
|
113
113
|
* Phone-number login vocabulary. Mirrors `@reopt/constants/brandapp-phone-login` on reopt's
|
|
114
114
|
* server (the SDK cannot import it) — a reopt web test compares the two.
|
|
115
115
|
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
116
|
+
* The canonical form is **E.164** (`+821012345678`): Better Auth's plugin looks users up by the exact
|
|
117
|
+
* input string, so without one canonical form `010-1234-5678` and `+82 10-1234-5678` would become two
|
|
118
|
+
* accounts. Domestic Korean input (`010…`, `82…`) is read as a Korean mobile; other countries must be
|
|
119
|
+
* written with `+` and are only shape-checked here — whether reopt sends to that country is the
|
|
120
|
+
* brandapp's setting on reopt (today: Korea only; other countries are refused with
|
|
121
|
+
* `PHONE_COUNTRY_NOT_ALLOWED`). Foreign numbers are the main SMS-pumping (toll fraud) vector.
|
|
120
122
|
*/
|
|
121
123
|
declare const REOPT_PHONE_LOGIN_TEMP_EMAIL_DOMAIN = "phone-login.reopt.app";
|
|
122
124
|
declare const DEFAULT_REOPT_PHONE_OTP_EXPIRES_IN = 300;
|
|
123
|
-
/**
|
|
125
|
+
/**
|
|
126
|
+
* Canonical E.164 number or null. `010-1234-5678`, `+82 10-…`, `82-10-…` → `+821012345678`;
|
|
127
|
+
* `+1 415 555 0100` → `+14155550100` (shape only). Korean landlines and malformed input → null.
|
|
128
|
+
*/
|
|
124
129
|
declare function canonicalizeReoptPhoneNumber(raw: string | null | undefined): string | null;
|
|
125
130
|
declare function isValidReoptPhoneNumber(raw: string): boolean;
|
|
126
131
|
/**
|
|
@@ -129,6 +134,8 @@ declare function isValidReoptPhoneNumber(raw: string): boolean;
|
|
|
129
134
|
* reopt reads this domain as "no email" (CRM linking, console).
|
|
130
135
|
*/
|
|
131
136
|
declare function buildReoptPhoneLoginTempEmail(raw: string): string;
|
|
137
|
+
/** Display form — Korean 010 numbers as `010-1234-5678`, other Korean numbers domestic, other countries E.164. */
|
|
138
|
+
declare function formatReoptPhoneNumber(raw: string): string;
|
|
132
139
|
type ReoptPhoneNumberOptions = {
|
|
133
140
|
/** OTP length, 4–8. Default 6. */
|
|
134
141
|
otpLength?: number;
|
|
@@ -147,25 +154,13 @@ type ReoptPhoneNumberOptions = {
|
|
|
147
154
|
getTempName?: (phoneNumber: string) => string;
|
|
148
155
|
/** Called after a verification succeeds (`callbackOnVerification` of the plugin). */
|
|
149
156
|
callbackOnVerification?: PhoneNumberOptions["callbackOnVerification"];
|
|
150
|
-
/**
|
|
151
|
-
* App-store review accounts — numbers that never get an SMS and accept one fixed code, so a
|
|
152
|
-
* reviewer (who cannot receive texts) can sign in. Omit to disable.
|
|
153
|
-
*
|
|
154
|
-
* For these numbers reopt is not called (no SMS, no cost); the code the plugin just stored is
|
|
155
|
-
* replaced with `code`. Verification, attempt limits, expiry and sign-up then run exactly as for
|
|
156
|
-
* any other number.
|
|
157
|
-
*
|
|
158
|
-
* 🔴 Use numbers that are **not in service**. A real number here locks its owner out (they never
|
|
159
|
-
* get a text) and lets anyone who knows `code` into that account.
|
|
160
|
-
*/
|
|
161
|
-
reviewAccounts?: ReoptPhoneReviewAccounts;
|
|
162
|
-
};
|
|
163
|
-
type ReoptPhoneReviewAccounts = {
|
|
164
|
-
/** Any format — canonicalized like every other number. Must not be empty. */
|
|
165
|
-
phoneNumbers: readonly string[];
|
|
166
|
-
/** Digits only, exactly `otpLength` long. */
|
|
167
|
-
code: string;
|
|
168
157
|
};
|
|
158
|
+
/**
|
|
159
|
+
* - `workspace` / `reopt` — an SMS went out (through the workspace's Solapi or reopt's own number).
|
|
160
|
+
* - `review` — the number is an **app-review number** registered in the reopt console: no SMS was
|
|
161
|
+
* sent, and `code` is the fixed code the reviewer will type. The caller must store it as this
|
|
162
|
+
* number's OTP (the plugin from `createReoptPhoneNumber` does).
|
|
163
|
+
*/
|
|
169
164
|
type ReoptOtpSmsResult = {
|
|
170
165
|
sent: true;
|
|
171
166
|
via: "workspace";
|
|
@@ -173,17 +168,26 @@ type ReoptOtpSmsResult = {
|
|
|
173
168
|
sent: true;
|
|
174
169
|
via: "reopt";
|
|
175
170
|
reason: string;
|
|
171
|
+
} | {
|
|
172
|
+
sent: false;
|
|
173
|
+
via: "review";
|
|
174
|
+
code: string;
|
|
176
175
|
};
|
|
177
176
|
/**
|
|
178
177
|
* Sends one OTP SMS through reopt (`POST /auth/otp/sms`). Exposed for apps that wire the
|
|
179
178
|
* `phoneNumber` plugin themselves and only want reopt as the SMS sender. Pass `clientIp`
|
|
180
179
|
* (the end user's IP as your server sees it) so reopt can rate-limit per user, not per server.
|
|
180
|
+
*
|
|
181
|
+
* Pass `acceptsReviewCode: true` only if you handle `{ via: "review", code }` by storing `code` as
|
|
182
|
+
* that number's OTP. Without it reopt refuses app-review numbers with 409
|
|
183
|
+
* `REVIEW_ACCOUNT_SDK_OUTDATED` instead of returning a code you would drop.
|
|
181
184
|
*/
|
|
182
185
|
declare function createReoptOtpSmsSender(config: ReoptSDKConfig): (input: {
|
|
183
186
|
phoneNumber: string;
|
|
184
187
|
code: string;
|
|
185
188
|
expiresInSeconds?: number;
|
|
186
189
|
clientIp?: string | null;
|
|
190
|
+
acceptsReviewCode?: boolean;
|
|
187
191
|
}) => Promise<ReoptOtpSmsResult>;
|
|
188
192
|
/**
|
|
189
193
|
* Phone-number login for a brandapp — Better Auth's `phoneNumber` plugin with reopt as the SMS
|
|
@@ -191,8 +195,13 @@ declare function createReoptOtpSmsSender(config: ReoptSDKConfig): (input: {
|
|
|
191
195
|
* Solapi account (or, for reopt's own system brands and test workspaces, through reopt's own
|
|
192
196
|
* number). If the workspace has no SMS connection the send fails with `SMS_NOT_CONNECTED`.
|
|
193
197
|
*
|
|
194
|
-
* -
|
|
195
|
-
*
|
|
198
|
+
* - Every `/phone-number/*` request is canonicalized to E.164 (`+821012345678`) before the plugin
|
|
199
|
+
* sees it (so formats never split one person into two accounts). reopt decides which countries it
|
|
200
|
+
* sends to (the brandapp's phone-login setting — today Korea only).
|
|
201
|
+
* - **App-review numbers** (Apple/Google reviewers cannot receive texts) are registered in the reopt
|
|
202
|
+
* console, not in your code. For those numbers reopt sends no SMS and returns the fixed code; the
|
|
203
|
+
* plugin stores it as the number's OTP, so verification, attempt limits, expiry and sign-up run
|
|
204
|
+
* exactly as for any other number. Changing or removing a number needs no redeploy.
|
|
196
205
|
* - The end user's IP (per your Better Auth `advanced.ipAddress` settings) is forwarded so reopt can
|
|
197
206
|
* rate-limit per user. Keep Better Auth's own rate limiter on with shared storage as well.
|
|
198
207
|
* - Requires better-auth >= 1.7.16.
|
|
@@ -246,5 +255,5 @@ type ReoptBetterAuthBundle = {
|
|
|
246
255
|
*/
|
|
247
256
|
declare function createReoptBetterAuth(options: ReoptBetterAuthOptions): ReoptBetterAuthBundle;
|
|
248
257
|
//#endregion
|
|
249
|
-
export { type AdapterOperation, type AdapterRequestBody, AuthError, DEFAULT_REOPT_PHONE_OTP_EXPIRES_IN, REOPT_BASE_URLS, REOPT_DEFAULT_SCOPES, REOPT_PHONE_LOGIN_TEMP_EMAIL_DOMAIN, REOPT_PROVIDER_ID, REOPT_PROVIDER_IDS, REOPT_STEP_UP_PROVIDER_ID, RateLimitError, type ReoptBetterAuthOptions, type ReoptOAuthOptions, type ReoptOtpSmsResult, type ReoptPhoneNumberOptions, type
|
|
258
|
+
export { type AdapterOperation, type AdapterRequestBody, AuthError, DEFAULT_REOPT_PHONE_OTP_EXPIRES_IN, REOPT_BASE_URLS, REOPT_DEFAULT_SCOPES, REOPT_PHONE_LOGIN_TEMP_EMAIL_DOMAIN, REOPT_PROVIDER_ID, REOPT_PROVIDER_IDS, REOPT_STEP_UP_PROVIDER_ID, RateLimitError, type ReoptBetterAuthOptions, type ReoptOAuthOptions, type ReoptOtpSmsResult, type ReoptPhoneNumberOptions, type ReoptSDKConfig, ReoptSDKError, STEP_UP_MAX_AUTH_AGE_SECONDS, ServerError, buildReoptPhoneLoginTempEmail, canonicalizeReoptPhoneNumber, createReoptAdapter, createReoptBetterAuth, createReoptOAuth, createReoptOtpSmsSender, createReoptPhoneNumber, formatReoptPhoneNumber, isReoptSDKError, isValidReoptPhoneNumber };
|
|
250
259
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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-
|
|
2
|
-
import { t as BaseHttpClient } from "../http-client-
|
|
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-DrtdQNzj.js";
|
|
2
|
+
import { t as BaseHttpClient } from "../http-client-DQf8pVNw.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";
|
|
@@ -217,10 +217,12 @@ function createReoptOAuth(options) {
|
|
|
217
217
|
* Phone-number login vocabulary. Mirrors `@reopt/constants/brandapp-phone-login` on reopt's
|
|
218
218
|
* server (the SDK cannot import it) — a reopt web test compares the two.
|
|
219
219
|
*
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
*
|
|
220
|
+
* The canonical form is **E.164** (`+821012345678`): Better Auth's plugin looks users up by the exact
|
|
221
|
+
* input string, so without one canonical form `010-1234-5678` and `+82 10-1234-5678` would become two
|
|
222
|
+
* accounts. Domestic Korean input (`010…`, `82…`) is read as a Korean mobile; other countries must be
|
|
223
|
+
* written with `+` and are only shape-checked here — whether reopt sends to that country is the
|
|
224
|
+
* brandapp's setting on reopt (today: Korea only; other countries are refused with
|
|
225
|
+
* `PHONE_COUNTRY_NOT_ALLOWED`). Foreign numbers are the main SMS-pumping (toll fraud) vector.
|
|
224
226
|
*/
|
|
225
227
|
const REOPT_PHONE_LOGIN_TEMP_EMAIL_DOMAIN = "phone-login.reopt.app";
|
|
226
228
|
const DEFAULT_REOPT_PHONE_OTP_EXPIRES_IN = 300;
|
|
@@ -232,18 +234,29 @@ const MIN_BETTER_AUTH_VERSION = [
|
|
|
232
234
|
];
|
|
233
235
|
const PHONE_INPUT_PATTERN = /^\+?[0-9 ().-]+$/;
|
|
234
236
|
const KOREAN_MOBILE_PATTERN = /^01[016789][0-9]{7,8}$/;
|
|
235
|
-
|
|
237
|
+
const E164_PATTERN = /^\+[1-9][0-9]{7,14}$/;
|
|
238
|
+
const KOREA_DIAL_CODE = "82";
|
|
239
|
+
/**
|
|
240
|
+
* Canonical E.164 number or null. `010-1234-5678`, `+82 10-…`, `82-10-…` → `+821012345678`;
|
|
241
|
+
* `+1 415 555 0100` → `+14155550100` (shape only). Korean landlines and malformed input → null.
|
|
242
|
+
*/
|
|
236
243
|
function canonicalizeReoptPhoneNumber(raw) {
|
|
237
244
|
if (typeof raw !== "string") return null;
|
|
238
245
|
const trimmed = raw.trim();
|
|
239
246
|
if (!trimmed || !PHONE_INPUT_PATTERN.test(trimmed)) return null;
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
if (
|
|
247
|
+
const digits = trimmed.replace(/\D/g, "");
|
|
248
|
+
const international = trimmed.startsWith("+");
|
|
249
|
+
if (!international || digits.startsWith(KOREA_DIAL_CODE)) {
|
|
250
|
+
let national = digits;
|
|
251
|
+
if (national.startsWith(KOREA_DIAL_CODE)) {
|
|
252
|
+
national = national.slice(2);
|
|
253
|
+
if (!national.startsWith("0")) national = `0${national}`;
|
|
254
|
+
} else if (international) return null;
|
|
255
|
+
if (!KOREAN_MOBILE_PATTERN.test(national)) return null;
|
|
256
|
+
return `+${KOREA_DIAL_CODE}${national.slice(1)}`;
|
|
245
257
|
}
|
|
246
|
-
|
|
258
|
+
const candidate = `+${digits}`;
|
|
259
|
+
return E164_PATTERN.test(candidate) ? candidate : null;
|
|
247
260
|
}
|
|
248
261
|
function isValidReoptPhoneNumber(raw) {
|
|
249
262
|
return canonicalizeReoptPhoneNumber(raw) !== null;
|
|
@@ -259,15 +272,24 @@ function randomNonce() {
|
|
|
259
272
|
* reopt reads this domain as "no email" (CRM linking, console).
|
|
260
273
|
*/
|
|
261
274
|
function buildReoptPhoneLoginTempEmail(raw) {
|
|
262
|
-
return `${canonicalizeReoptPhoneNumber(raw) ?? raw.replace(/\D/g, "")}.${randomNonce()}@${REOPT_PHONE_LOGIN_TEMP_EMAIL_DOMAIN}`;
|
|
275
|
+
return `${(canonicalizeReoptPhoneNumber(raw) ?? raw).replace(/\D/g, "")}.${randomNonce()}@${REOPT_PHONE_LOGIN_TEMP_EMAIL_DOMAIN}`;
|
|
263
276
|
}
|
|
264
|
-
|
|
265
|
-
|
|
277
|
+
/** Display form — Korean 010 numbers as `010-1234-5678`, other Korean numbers domestic, other countries E.164. */
|
|
278
|
+
function formatReoptPhoneNumber(raw) {
|
|
279
|
+
const canonical = canonicalizeReoptPhoneNumber(raw);
|
|
280
|
+
if (!canonical) return raw;
|
|
281
|
+
if (!canonical.startsWith(`+${KOREA_DIAL_CODE}`)) return canonical;
|
|
282
|
+
const national = `0${canonical.slice(3)}`;
|
|
283
|
+
return /^010\d{8}$/.test(national) ? `${national.slice(0, 3)}-${national.slice(3, 7)}-${national.slice(7)}` : national;
|
|
266
284
|
}
|
|
267
285
|
/**
|
|
268
286
|
* Sends one OTP SMS through reopt (`POST /auth/otp/sms`). Exposed for apps that wire the
|
|
269
287
|
* `phoneNumber` plugin themselves and only want reopt as the SMS sender. Pass `clientIp`
|
|
270
288
|
* (the end user's IP as your server sees it) so reopt can rate-limit per user, not per server.
|
|
289
|
+
*
|
|
290
|
+
* Pass `acceptsReviewCode: true` only if you handle `{ via: "review", code }` by storing `code` as
|
|
291
|
+
* that number's OTP. Without it reopt refuses app-review numbers with 409
|
|
292
|
+
* `REVIEW_ACCOUNT_SDK_OUTDATED` instead of returning a code you would drop.
|
|
271
293
|
*/
|
|
272
294
|
function createReoptOtpSmsSender(config) {
|
|
273
295
|
const http = new BaseHttpClient(config, `/api/v1/brandapp/${config.brandappId}/auth`);
|
|
@@ -276,7 +298,8 @@ function createReoptOtpSmsSender(config) {
|
|
|
276
298
|
phoneNumber: input.phoneNumber,
|
|
277
299
|
code: input.code,
|
|
278
300
|
expiresInSeconds: input.expiresInSeconds ?? 300,
|
|
279
|
-
...input.clientIp ? { clientIp: input.clientIp } : {}
|
|
301
|
+
...input.clientIp ? { clientIp: input.clientIp } : {},
|
|
302
|
+
...input.acceptsReviewCode ? { acceptsReviewCode: true } : {}
|
|
280
303
|
})).data;
|
|
281
304
|
};
|
|
282
305
|
}
|
|
@@ -295,9 +318,17 @@ function toAuthError(error) {
|
|
|
295
318
|
code: "OTP_UNAVAILABLE",
|
|
296
319
|
message: error.message
|
|
297
320
|
});
|
|
321
|
+
if (error.status === 403 && error.code === "PHONE_LOGIN_DISABLED") return new APIError("FORBIDDEN", {
|
|
322
|
+
code: "PHONE_LOGIN_DISABLED",
|
|
323
|
+
message: "Phone login is turned off for this app."
|
|
324
|
+
});
|
|
325
|
+
if (error.status === 400 && error.code === "PHONE_COUNTRY_NOT_ALLOWED") return new APIError("BAD_REQUEST", {
|
|
326
|
+
code: "PHONE_COUNTRY_NOT_ALLOWED",
|
|
327
|
+
message: "Phone login is not available for numbers from this country."
|
|
328
|
+
});
|
|
298
329
|
if (error.status === 400) return new APIError("BAD_REQUEST", {
|
|
299
330
|
code: "INVALID_PHONE_NUMBER",
|
|
300
|
-
message: "Enter a
|
|
331
|
+
message: "Enter a valid mobile number."
|
|
301
332
|
});
|
|
302
333
|
return error;
|
|
303
334
|
}
|
|
@@ -305,21 +336,6 @@ function assertBetterAuthVersion(version) {
|
|
|
305
336
|
const parts = typeof version === "string" ? version.split(/[.-]/).slice(0, 3).map((part) => Number.parseInt(part, 10)) : [];
|
|
306
337
|
if (!(parts.length === 3 && parts.every(Number.isFinite) && (parts[0] > MIN_BETTER_AUTH_VERSION[0] || parts[0] === MIN_BETTER_AUTH_VERSION[0] && (parts[1] > MIN_BETTER_AUTH_VERSION[1] || parts[1] === MIN_BETTER_AUTH_VERSION[1] && parts[2] >= MIN_BETTER_AUTH_VERSION[2])))) throw new Error(`[@reopt-ai/brandapp-sdk] Phone login needs better-auth >= ${MIN_BETTER_AUTH_VERSION.join(".")} (found ${String(version ?? "unknown")}). Older versions store unverified phone numbers on sign-up.`);
|
|
307
338
|
}
|
|
308
|
-
function resolveReviewAccounts(review, otpLength) {
|
|
309
|
-
if (!review) return null;
|
|
310
|
-
if (review.phoneNumbers.length === 0) throw new Error("[@reopt-ai/brandapp-sdk] reviewAccounts.phoneNumbers is empty — omit reviewAccounts to disable it.");
|
|
311
|
-
const numbers = /* @__PURE__ */ new Set();
|
|
312
|
-
for (const raw of review.phoneNumbers) {
|
|
313
|
-
const canonical = canonicalizeReoptPhoneNumber(raw);
|
|
314
|
-
if (!canonical) throw new Error(`[@reopt-ai/brandapp-sdk] reviewAccounts.phoneNumbers has a value that is not a Korean mobile number.`);
|
|
315
|
-
numbers.add(canonical);
|
|
316
|
-
}
|
|
317
|
-
if (!/^[0-9]+$/.test(review.code) || review.code.length !== otpLength) throw new Error(`[@reopt-ai/brandapp-sdk] reviewAccounts.code must be ${otpLength} digits (otpLength).`);
|
|
318
|
-
return {
|
|
319
|
-
numbers,
|
|
320
|
-
code: review.code
|
|
321
|
-
};
|
|
322
|
-
}
|
|
323
339
|
/**
|
|
324
340
|
* The plugin's verification row for a phone OTP. Mirrors `phoneNumberOTPIdentifier` in
|
|
325
341
|
* better-auth's phone-number plugin (not exported) — the review round-trip test runs the real plugin
|
|
@@ -330,7 +346,7 @@ function phoneOtpIdentifier(phone) {
|
|
|
330
346
|
}
|
|
331
347
|
async function pinReviewCode(ctx, phone, code, expiresIn) {
|
|
332
348
|
const adapter = ctx?.context?.internalAdapter;
|
|
333
|
-
if (!adapter) throw new Error("[@reopt-ai/brandapp-sdk]
|
|
349
|
+
if (!adapter) throw new Error("[@reopt-ai/brandapp-sdk] An app-review number needs the Better Auth endpoint context in sendOTP.");
|
|
334
350
|
const identifier = phoneOtpIdentifier(phone);
|
|
335
351
|
await adapter.deleteVerificationByIdentifier(identifier);
|
|
336
352
|
await adapter.createVerificationValue({
|
|
@@ -348,8 +364,13 @@ function assertRange(name, value, min, max) {
|
|
|
348
364
|
* Solapi account (or, for reopt's own system brands and test workspaces, through reopt's own
|
|
349
365
|
* number). If the workspace has no SMS connection the send fails with `SMS_NOT_CONNECTED`.
|
|
350
366
|
*
|
|
351
|
-
* -
|
|
352
|
-
*
|
|
367
|
+
* - Every `/phone-number/*` request is canonicalized to E.164 (`+821012345678`) before the plugin
|
|
368
|
+
* sees it (so formats never split one person into two accounts). reopt decides which countries it
|
|
369
|
+
* sends to (the brandapp's phone-login setting — today Korea only).
|
|
370
|
+
* - **App-review numbers** (Apple/Google reviewers cannot receive texts) are registered in the reopt
|
|
371
|
+
* console, not in your code. For those numbers reopt sends no SMS and returns the fixed code; the
|
|
372
|
+
* plugin stores it as the number's OTP, so verification, attempt limits, expiry and sign-up run
|
|
373
|
+
* exactly as for any other number. Changing or removing a number needs no redeploy.
|
|
353
374
|
* - The end user's IP (per your Better Auth `advanced.ipAddress` settings) is forwarded so reopt can
|
|
354
375
|
* rate-limit per user. Keep Better Auth's own rate limiter on with shared storage as well.
|
|
355
376
|
* - Requires better-auth >= 1.7.16.
|
|
@@ -361,9 +382,8 @@ function createReoptPhoneNumber(config, options = {}) {
|
|
|
361
382
|
const expiresIn = options.expiresIn ?? 300;
|
|
362
383
|
assertRange("otpLength", otpLength, 4, 8);
|
|
363
384
|
assertRange("expiresIn", expiresIn, 60, 1800);
|
|
364
|
-
const review = resolveReviewAccounts(options.reviewAccounts, otpLength);
|
|
365
385
|
const sendOtpSms = createReoptOtpSmsSender(config);
|
|
366
|
-
const getTempName = options.getTempName ?? ((phone) =>
|
|
386
|
+
const getTempName = options.getTempName ?? ((phone) => formatReoptPhoneNumber(phone));
|
|
367
387
|
const base = phoneNumber({
|
|
368
388
|
otpLength,
|
|
369
389
|
expiresIn,
|
|
@@ -371,21 +391,26 @@ function createReoptPhoneNumber(config, options = {}) {
|
|
|
371
391
|
requireVerification: options.requireVerification ?? true,
|
|
372
392
|
phoneNumberValidator: (phone) => isValidReoptPhoneNumber(phone),
|
|
373
393
|
sendOTP: async ({ phoneNumber: phone, code }, ctx) => {
|
|
374
|
-
if (review?.numbers.has(phone)) {
|
|
375
|
-
await pinReviewCode(ctx, phone, review.code, expiresIn);
|
|
376
|
-
return;
|
|
377
|
-
}
|
|
378
394
|
const clientIp = ctx?.request || ctx?.headers ? getIP(ctx.request ?? ctx.headers, ctx.context.options) : null;
|
|
395
|
+
let result;
|
|
379
396
|
try {
|
|
380
|
-
await sendOtpSms({
|
|
397
|
+
result = await sendOtpSms({
|
|
381
398
|
phoneNumber: phone,
|
|
382
399
|
code,
|
|
383
400
|
expiresInSeconds: expiresIn,
|
|
384
|
-
clientIp
|
|
401
|
+
clientIp,
|
|
402
|
+
acceptsReviewCode: true
|
|
385
403
|
});
|
|
386
404
|
} catch (error) {
|
|
387
405
|
throw toAuthError(error);
|
|
388
406
|
}
|
|
407
|
+
if (result.via === "review") {
|
|
408
|
+
if (result.code.length !== otpLength) throw new APIError("SERVICE_UNAVAILABLE", {
|
|
409
|
+
code: "REVIEW_CODE_LENGTH_MISMATCH",
|
|
410
|
+
message: `The review code registered in the reopt console must be ${otpLength} digits (otpLength).`
|
|
411
|
+
});
|
|
412
|
+
await pinReviewCode(ctx, phone, result.code, expiresIn);
|
|
413
|
+
}
|
|
389
414
|
},
|
|
390
415
|
...options.signUpOnVerification === false ? {} : { signUpOnVerification: {
|
|
391
416
|
getTempEmail: (phone) => buildReoptPhoneLoginTempEmail(phone),
|
|
@@ -401,7 +426,7 @@ function createReoptPhoneNumber(config, options = {}) {
|
|
|
401
426
|
const canonical = canonicalizeReoptPhoneNumber(body.phoneNumber);
|
|
402
427
|
if (!canonical) throw new APIError("BAD_REQUEST", {
|
|
403
428
|
code: "INVALID_PHONE_NUMBER",
|
|
404
|
-
message: "Enter a Korean
|
|
429
|
+
message: "Enter a mobile number — Korean (010-…) or international (+country code)."
|
|
405
430
|
});
|
|
406
431
|
return { context: { body: {
|
|
407
432
|
...body,
|
|
@@ -461,5 +486,5 @@ function createReoptBetterAuth(options) {
|
|
|
461
486
|
}
|
|
462
487
|
|
|
463
488
|
//#endregion
|
|
464
|
-
export { AuthError, DEFAULT_REOPT_PHONE_OTP_EXPIRES_IN, REOPT_BASE_URLS, REOPT_DEFAULT_SCOPES, REOPT_PHONE_LOGIN_TEMP_EMAIL_DOMAIN, REOPT_PROVIDER_ID, REOPT_PROVIDER_IDS, REOPT_STEP_UP_PROVIDER_ID, RateLimitError, ReoptSDKError, STEP_UP_MAX_AUTH_AGE_SECONDS, ServerError, buildReoptPhoneLoginTempEmail, canonicalizeReoptPhoneNumber, createReoptAdapter, createReoptBetterAuth, createReoptOAuth, createReoptOtpSmsSender, createReoptPhoneNumber, isReoptSDKError, isValidReoptPhoneNumber };
|
|
489
|
+
export { AuthError, DEFAULT_REOPT_PHONE_OTP_EXPIRES_IN, REOPT_BASE_URLS, REOPT_DEFAULT_SCOPES, REOPT_PHONE_LOGIN_TEMP_EMAIL_DOMAIN, REOPT_PROVIDER_ID, REOPT_PROVIDER_IDS, REOPT_STEP_UP_PROVIDER_ID, RateLimitError, ReoptSDKError, STEP_UP_MAX_AUTH_AGE_SECONDS, ServerError, buildReoptPhoneLoginTempEmail, canonicalizeReoptPhoneNumber, createReoptAdapter, createReoptBetterAuth, createReoptOAuth, createReoptOtpSmsSender, createReoptPhoneNumber, formatReoptPhoneNumber, isReoptSDKError, isValidReoptPhoneNumber };
|
|
465
490
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
2
|
-
import { t as buildQuery } from "./query-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-DQf8pVNw.js";
|
|
2
|
+
import { t as buildQuery } from "./query-ktdIV5kz.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-
|
|
55
|
+
//# sourceMappingURL=client-BAr_BNfz.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-DQf8pVNw.js";
|
|
2
2
|
|
|
3
3
|
//#region src/plans/client.ts
|
|
4
4
|
function unwrap(body) {
|
|
@@ -143,4 +143,4 @@ function createReoptPlansClient(config) {
|
|
|
143
143
|
|
|
144
144
|
//#endregion
|
|
145
145
|
export { createReoptPlansClient as n, ReoptPlansClient as t };
|
|
146
|
-
//# sourceMappingURL=client-
|
|
146
|
+
//# sourceMappingURL=client-BBx2uOT6.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-DQf8pVNw.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-
|
|
53
|
+
//# sourceMappingURL=client-BH7PYWbE.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as SDK_VERSION } from "./config-
|
|
1
|
+
import { n as SDK_VERSION } from "./config-DrtdQNzj.js";
|
|
2
2
|
import { o as readClientKeyRing } from "./keys-B_R_lsyF.js";
|
|
3
|
-
import { r as createMachineClient } from "./client-
|
|
3
|
+
import { r as createMachineClient } from "./client-OHAVqTBu.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
|
|
6
6
|
//#region src/workspace/schemas.ts
|
|
@@ -742,4 +742,4 @@ function createPlatformClient(config) {
|
|
|
742
742
|
|
|
743
743
|
//#endregion
|
|
744
744
|
export { platformWebhookUpsertInputSchema as $, platformEavSchemaOperationSchema as A, platformPipelineResourceSchema as B, platformBrandappResourceSchema as C, platformEavEntityResourceSchema as D, platformEavBrandappResourcesSchema as E, platformMeSchema as F, platformResourcesSchema as G, platformPipelineStageInputSchema as H, platformOAuthClientImportInputSchema as I, platformTaskStageInputSchema as J, platformResourcesV2Schema as K, platformOAuthClientResourceSchema as L, platformExternalIdSchema as M, platformLockAcquiredSchema as N, platformEavSchemaApplyInputSchema as O, platformLockReleasedSchema as P, platformWebhookSchema as Q, platformOAuthClientUpsertInputSchema as R, platformBrandUpsertInputSchema as S, platformCustomerUpsertInputSchema as T, platformPipelineUpsertInputSchema as U, platformPipelineSchema as V, platformResourceKeySchema as W, platformTaskUpsertInputSchema as X, platformTaskStageSchema as Y, platformWebhookResourceSchema as Z, PLATFORM_TASK_PRIORITIES as _, createPlatformClient as a, platformBrandImportInputSchema as b, PLATFORM_ADMIN_SCOPE as c, PLATFORM_MANAGED_BY_VALUES as d, platformWorkTaskStageChangedEventSchema as et, PLATFORM_OAUTH_APPLICATION_TYPES as f, PLATFORM_TASK_OUTCOMES as g, PLATFORM_STAGE_COLORS as h, REOPT_PLATFORM_URLS as i, platformErrorSchema as j, platformEavSchemaApplyResultSchema as k, PLATFORM_BRANDAPP_STATUSES as l, PLATFORM_OAUTH_GRANT_TYPES as m, PlatformApiError as n, createPlatformRequester as o, PLATFORM_OAUTH_CLIENT_PURPOSES as p, platformTaskSchema as q, REOPT_PLATFORM_ID_URLS as r, resolvePlatformUrls as s, DEFAULT_PLATFORM_SCOPES as t, platformWriteMetaSchema as tt, PLATFORM_DOMAIN_STATUSES as u, PLATFORM_TOKEN_ENDPOINT_AUTH_METHODS as v, platformBrandappUpsertInputSchema as w, platformBrandResourceSchema as x, PLATFORM_WEBHOOK_TRIGGERS as y, platformPipelineImportInputSchema as z };
|
|
745
|
-
//# sourceMappingURL=client-
|
|
745
|
+
//# sourceMappingURL=client-BLmIi1fg.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-DQf8pVNw.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-
|
|
20
|
+
//# sourceMappingURL=client-CU_ot3SS.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-DQf8pVNw.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-
|
|
28
|
+
//# sourceMappingURL=client-Ce0z7WTl.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BaseHttpClient } from "./http-client-
|
|
1
|
+
import { t as BaseHttpClient } from "./http-client-DQf8pVNw.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-
|
|
83
|
+
//# sourceMappingURL=client-CwfUFDWS.js.map
|