@tinkerlandai/longplay-sdk 0.10.59 → 0.10.61
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 +9 -0
- package/README.md +3 -2
- package/README.zh-CN.md +3 -2
- package/dist/{ai-usage-DBcYB8ix.d.ts → ai-usage-DM3jAubK.d.ts} +1 -1
- package/dist/{api-1Tplv-7M.d.ts → api-KIp0I50M.d.ts} +21 -21
- package/dist/{chunk-LUDTXNMH.js → chunk-24EPEF3N.js} +1 -1
- package/dist/{chunk-FBNEQ2K5.js → chunk-2KM537QH.js} +1 -1
- package/dist/{chunk-U2NEVISJ.js → chunk-4VCPJSRS.js} +1 -1
- package/dist/{chunk-725CAWOK.js → chunk-DCZUPVAI.js} +1 -1
- package/dist/{chunk-J7VGTAJ7.js → chunk-FEBXEBDK.js} +1 -1
- package/dist/{chunk-J3RW4GMO.js → chunk-HNNJ2RVS.js} +1 -1
- package/dist/chunk-IHA7BSU3.js +1 -0
- package/dist/{chunk-J5K4PNII.js → chunk-IM5OXTEH.js} +1 -1
- package/dist/chunk-KCLHX3Y5.js +1 -0
- package/dist/{chunk-66W37FEV.js → chunk-LH67TSR2.js} +1 -1
- package/dist/chunk-QXDLOPZK.js +1 -0
- package/dist/{chunk-YB3PQ75M.js → chunk-SQRNYT2W.js} +2 -2
- package/dist/{chunk-WUPNZGE2.js → chunk-WBBP25Q2.js} +1 -1
- package/dist/{chunk-6426YKPK.js → chunk-X6VBLJHA.js} +1 -1
- package/dist/chunk-X7V7AAWG.js +1 -0
- package/dist/{chunk-MZ6NEOOQ.js → chunk-XZLGDFZ4.js} +1 -1
- package/dist/{configuration-sync-DeWWW5za.d.ts → configuration-sync-Dad8B5Pv.d.ts} +3 -3
- package/dist/{content-5OMLKBPP.js → content-CXXLVFDH.js} +1 -1
- package/dist/{funnel-host-purchase-53LYWG4V.js → funnel-host-purchase-RFDAZBS6.js} +1 -1
- package/dist/{funnel-host-recovery-paywall-FC3XQU2U.js → funnel-host-recovery-paywall-HQI6ZBRL.js} +1 -1
- package/dist/{funnel-local-client-Fxsyl7rh.d.ts → funnel-local-client-Cb9jJGpo.d.ts} +53 -53
- package/dist/{funnel-paywall-prerender-YCATKDAY.js → funnel-paywall-prerender-RMSOP32P.js} +1 -1
- package/dist/{funnel-process-client-D9saqPse.d.ts → funnel-process-client-DE650LzB.d.ts} +28 -28
- package/dist/{funnel-runtime-host-LQ6X5B6R.js → funnel-runtime-host-FI4TYAXG.js} +1 -1
- package/dist/index.d.ts +23 -15
- package/dist/index.js +1 -1
- package/dist/native-shell.js +1 -1
- package/dist/openrouter.d.ts +3 -3
- package/dist/openrouter.js +1 -1
- package/dist/page.d.ts +2 -2
- package/dist/page.js +1 -1
- package/dist/{paywall-KQIBPACY.js → paywall-VMEEMKO4.js} +1 -1
- package/dist/{paywall-content-NQXU3O4D.js → paywall-content-JGK22QA7.js} +1 -1
- package/dist/{paywall-session-W42F6DIF.js → paywall-session-UTQVXDY4.js} +1 -1
- package/dist/popup.d.ts +23 -3
- package/dist/popup.js +1 -1
- package/dist/{presentation-loading-CjljfuJq.d.ts → presentation-loading-B8W6a9WB.d.ts} +10 -46
- package/dist/react-native.d.ts +7 -7
- package/dist/react-native.js +1 -1
- package/dist/{screen-renderer-2ZDV2WYD.js → screen-renderer-3YO6EUWD.js} +1 -1
- package/dist/server.d.ts +10 -10
- package/dist/server.js +1 -1
- package/dist/visual.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-IMFPRZUY.js +0 -1
- package/dist/chunk-O2V4MTM6.js +0 -1
- package/dist/chunk-PTNMDAND.js +0 -1
- package/dist/chunk-XY2X6YJF.js +0 -1
- package/dist/{chunk-YB3PQ75M.js.LEGAL.txt → chunk-SQRNYT2W.js.LEGAL.txt} +0 -0
- package/dist/{funnel-node-evaluation-CRRTh1je.d.ts → funnel-node-evaluation-COIh1hKs.d.ts} +3 -3
- package/dist/{screen-D2bUmJ4M.d.ts → screen-Pv_pViF6.d.ts} +21 -21
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.61
|
|
4
|
+
|
|
5
|
+
- `prerenderFunnelPurchase` with a named Paywall and `configuration` checks the Paywall against the Funnel's route for the final Start: a Start routed to another Paywall, a screen or an end makes the copy unavailable and forgets the kept copy. The preview then follows the same rule as the click
|
|
6
|
+
- `PreparedFunnelPurchase.local` says whether the copy renders from the Paywall this device kept, so an app shows a loading state by that instead of a timer
|
|
7
|
+
|
|
8
|
+
## 0.10.60
|
|
9
|
+
|
|
10
|
+
- The loading state for a Paywall with a `loadingDocument` is plain DOM in the Paywall's dialog geometry and colors; it no longer starts a skeleton frame, so the Paywall's own frame is the only one a presentation starts
|
|
11
|
+
|
|
3
12
|
## 0.10.59
|
|
4
13
|
|
|
5
14
|
- `prerenderFunnelPurchase` keeps on the device the Paywall it last read for each entry and Customer, and the next pre-render paints it without a request: ready once painted, before the merchant's checks, Longplay's original-purchase lookup and a fresh read answer, so a click shows the complete Paywall without waiting for the network. A revealed copy is left to the click's own checks and Run; a fresh read updates plans in place
|
package/README.md
CHANGED
|
@@ -97,7 +97,7 @@ For an independent **Page, Popup or Banner resource**, import `createLongplay` a
|
|
|
97
97
|
|
|
98
98
|
The Web SDK displays a local placeholder while a Paywall, Funnel screen, Page, Popup or Banner prepares its first render. To supply a merchant placeholder, pass `loading: "host"` and use `onPresentationState`. The `loading` event provides `dismiss()`. Remove the placeholder on `ready`, `dismissed`, `skipped` or `error`. Use `ready` for the visual handoff even when the mount promise has already returned. Pass an `AbortSignal` as `signal` when the host can unmount or change Customers. Content resolved separately begins this lifecycle at `mountContent`. Preparation through `prepareContent` or `preparePopup` stays hidden until `show()`. Purchase progress and original-operation recovery continue through their existing APIs.
|
|
99
99
|
|
|
100
|
-
To
|
|
100
|
+
To size the loading state like a published Paywall, load the layout ahead of time with `configuration.paywall(paywallId)` and pass its `document` as `loadingDocument` to `showPaywall` or `showFunnelPurchase`. The SDK waits 120 ms before showing its loading UI, then draws a light status in plain DOM within that Paywall's dialog geometry and colors, with one Close button; it starts no frame of its own, so the Paywall's frame is the only one a presentation starts. Fast content appears directly; unknown layouts use a compact loading status. The bundled live renderer respects reduced motion. The live Paywall supplies the actionable content. If the original purchase outlives its Funnel Run, recovery takes over the open loading or Paywall dialog; Check status updates it in place and Continue checkout resumes the same operation. When its current page has a usable Close button, that button takes over from the SDK's Close control.
|
|
101
101
|
|
|
102
102
|
The separate [Python server SDK](../python/README.md) provides synchronous and asynchronous Customer, holdings, entitlement-check and usage clients against the same current HTTP protocol. It is distributed from `https://cdn.longplayai.com/sdk/python` (not PyPI) and is not part of this npm package.
|
|
103
103
|
|
|
@@ -360,8 +360,9 @@ button.onclick = () => {
|
|
|
360
360
|
|
|
361
361
|
- `paywallVersionId` (one exact Version) or `paywallId` (its current published Version) names the Paywall the Funnel presents first. The copy is read with `purchase.readPaywall()` as a standalone Paywall would be, for the Start's `parameters.commerce` and `locale`.
|
|
362
362
|
- Or pass `configuration` (the page's `createConfigurationSync`) and name no Paywall: the SDK predicts this Customer's first screen from the Funnel's published route (see below) once the Start is final, and renders that Paywall. `prepared.prediction` holds the prediction. A first screen that is not a Paywall leaves the copy `unavailable` with reason `first_screen_popup`, `first_screen_page`, `first_screen_external_page`, `route_end_<outcome>` (for example `route_end_ineligible`) or `route_unknown_<reason>`; a route that is not published reads `route_unavailable`. Until a click takes it, a ready copy becomes `unavailable` (`route_changed`) when a configuration refresh routes the Start to another first screen.
|
|
363
|
+
- Name a Paywall and pass `configuration` too, and the SDK checks the named Paywall against the same route once the Start is final: a Start the route sends to another Paywall, a screen or an end makes the copy `unavailable` with the same reasons (`route_changed` for another Paywall) and forgets the kept copy, so that Customer is never shown it first. A step only the server decides, or a configuration read that failed for now, leaves the decision to the click's Run. The preview and the click then follow one rule: the Funnel's route for the click's Start.
|
|
363
364
|
- `start` can be a promise while the merchant's own checks run: rendering starts at once and the copy becomes ready only with the Start. Pass provisional `commerce` and `locale` then. If admission changes only `commerce.intent`, the SDK rereads the same Paywall's server availability for the final intent before revealing it; an unavailable provisional purchase screen cannot decide upgrade eligibility. A provider, currency or locale change, `null` or a rejection leaves it `unavailable`.
|
|
364
|
-
- The SDK keeps on the device the Paywall a pre-render last read for this Customer, Paywall, commerce and locale (up to 24 hours; nothing commercial). The next pre-render of that entry paints it without any request and is ready once painted, before your checks, Longplay's original-purchase lookup or a fresh read answer, so the click needs no request to show the complete Paywall. Until the Start is final a click matches it by Funnel and locale; the Run's takeover still compares the final Start exactly. The checks and the fresh read still run: until a click takes the copy they withdraw it as usual; a revealed copy is left to the click, whose own checks and Run replace it (for example with an original purchase's recovery). A fresh read updates changed plans in place; one that names another Paywall withdraws an unclaimed copy. A refused Start or an original purchase forgets the kept copy.
|
|
365
|
+
- The SDK keeps on the device the Paywall a pre-render last read for this Customer, Paywall, commerce and locale (up to 24 hours; nothing commercial). The next pre-render of that entry paints it without any request and is ready once painted, before your checks, Longplay's original-purchase lookup or a fresh read answer, so the click needs no request to show the complete Paywall. Until the Start is final a click matches it by Funnel and locale; the Run's takeover still compares the final Start exactly. The checks and the fresh read still run: until a click takes the copy they withdraw it as usual; a revealed copy is left to the click, whose own checks and Run replace it (for example with an original purchase's recovery). A fresh read updates changed plans in place; one that names another Paywall withdraws an unclaimed copy. A refused Start or an original purchase forgets the kept copy. `prepared.local` resolves true when the copy renders from that kept Paywall: show no loading state then, and show one at once when it resolves false or `ready` resolves false.
|
|
365
366
|
- For `commerce.intent: "subscription_change"`, a purchase screen can be prepared when at least one plan is available; the current membership and other unavailable choices keep their server availability. With no available upgrade choice the copy remains unavailable. Ordinary purchase screens still require every plan to be available, and commercial actions always wait for the Run's own session.
|
|
366
367
|
|
|
367
368
|
- `state` is `preparing`, `ready`, `unavailable` (see `reason`), `shown`, `adopted`, `released` or `closed`; `ready` resolves `true` once it can be revealed and `false` when it never will be; `onState` reports each change.
|
package/README.zh-CN.md
CHANGED
|
@@ -107,7 +107,7 @@ JavaScript 与 TypeScript 共用本包,声明文件随包提供。内部 `@ind
|
|
|
107
107
|
|
|
108
108
|
Web SDK 在 Paywall、Funnel Screen、Page、Popup 或 Banner 准备首屏时展示本地骨架。宿主可传入 `loading: "host"`,通过 `onPresentationState` 接管占位。收到 `loading` 时可保存 `dismiss()` 用于关闭,收到 `ready`、`dismissed`、`skipped` 或 `error` 时撤下占位。挂载 Promise 返回后仍应等 `ready` 再交接。宿主卸载或切换 Customer 时,可通过传入的 `signal` 取消展示。单独解析的 Content 从 `mountContent` 开始加载。通过 `prepareContent` 或 `preparePopup` 预渲染的内容会保持隐藏,直到调用 `show()`。购买进度和原单恢复继续使用各自的现有 API。
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
要让加载状态与已发布 Paywall 的弹窗尺寸一致,可提前用 `configuration.paywall(paywallId)` 取布局,将返回的 `document` 作为 `loadingDocument` 传给 `showPaywall` 或 `showFunnelPurchase`。SDK 等待 120 ms 后才展示占位:在该 Paywall 的弹窗尺寸和配色里用普通 DOM 画轻量加载状态,保留一个关闭按钮,不另起 iframe,一次展示只启动 Paywall 自己的那个 iframe。快网直接展示正式内容,未知布局则使用紧凑加载提示。本地打包的正式渲染器遵循减少动效设置。可操作内容以正式 Paywall 为准。原购买仍有效而 Funnel Run 已结束时,恢复流程接管已打开的加载或 Paywall 弹窗;查询状态在原弹窗内更新,继续付款沿用同一 operation。正式页有可用的关闭按钮时,由它接管关闭操作。
|
|
111
111
|
|
|
112
112
|
独立的 [Python 服务端 SDK](../python/README.md) 使用同一当前 HTTP 协议,提供同步、异步 Customer、持仓/权益检查和用量上报。它从 `https://cdn.longplayai.com/sdk/python` 分发(不在 PyPI),不属于这个 npm 包。
|
|
113
113
|
|
|
@@ -240,7 +240,8 @@ SDK 在首次派发前保存原 Start 请求 ID 和完整输入;同一未决
|
|
|
240
240
|
|
|
241
241
|
- 公开入口的 `prerenderFunnelPurchase` 返回 Promise,需在点击前 await 得到 `PreparedFunnelPurchase`。`paywallVersionId` 指定一个确切版本,`paywallId` 指定其当前发布版本;内容通过 `purchase.readPaywall()` 按 Start 的 `parameters.commerce` 和 `locale` 读取。
|
|
242
242
|
- 商户自己的校验尚未完成时,`start` 可以传 Promise:渲染立即开始,拿到 Start 后才变为 ready。此时传入初始 `commerce` 和 `locale`;若最终只改变 commerce.intent,SDK 会按最终意图正常重新读取同一 Paywall 可用性,读取完成前不展示,不能用新购灰态判定升级资格。provider、currency 或 locale 改变、Start 为 `null` 或被拒绝时,仍为 `unavailable`。
|
|
243
|
-
- SDK 会在设备上保存预渲染最近一次为该 Customer、该 Paywall、币种渠道和语言读到的 Paywall(最长 24 小时,不含任何交易数据)。下次预渲染同一入口时不发请求直接画出它,画好即 ready,不等你的校验、Longplay 原订单查询和最新读取返回,点击时无需任何请求即可显示完整 Paywall。Start 确定前点击按 Funnel 和语言匹配,Run 接管时仍严格比较最终 Start。校验和最新读取照常进行:点击前照常撤回副本;已显示的副本交给这次点击,由它自己的校验和 Run 替换(例如原订单的恢复)。最新读取只改变套餐时原地更新;指向另一个 Paywall 时,未被认领的副本撤回。Start
|
|
243
|
+
- SDK 会在设备上保存预渲染最近一次为该 Customer、该 Paywall、币种渠道和语言读到的 Paywall(最长 24 小时,不含任何交易数据)。下次预渲染同一入口时不发请求直接画出它,画好即 ready,不等你的校验、Longplay 原订单查询和最新读取返回,点击时无需任何请求即可显示完整 Paywall。Start 确定前点击按 Funnel 和语言匹配,Run 接管时仍严格比较最终 Start。校验和最新读取照常进行:点击前照常撤回副本;已显示的副本交给这次点击,由它自己的校验和 Run 替换(例如原订单的恢复)。最新读取只改变套餐时原地更新;指向另一个 Paywall 时,未被认领的副本撤回。Start 被拒绝或发现原订单时会删除保存的副本。`prepared.local` 为 true 表示这次从本机保存的 Paywall 画出:此时不要显示加载状态;为 false 或 `ready` 为 false 时立即显示加载状态。
|
|
244
|
+
- 指定 Paywall 的同时传入 `configuration`,SDK 会在 Start 确定后用同一份 Funnel 路由核对它:路由把这个 Start 送到别的 Paywall、页面或结束时,副本变为不可用(另一个 Paywall 为 `route_changed`),并删除保存的副本,这位 Customer 不会先看到它。只有服务端能决定的步骤或暂时读不到配置时,交给点击时的 Run 决定。这样预渲染和点击走同一条规则:点击 Start 对应的 Funnel 路由。
|
|
244
245
|
- `state` 依次为 `preparing`、`ready`、`unavailable`(原因见 `reason`)、`shown`、`adopted`、`released`、`closed`;`ready` 在可显示时解析为 `true`,永远不能显示时为 `false`;`onState` 报告每次变化。
|
|
245
246
|
- 必须在点击处理函数里同步调用 `open()`(任何 await 之前):`"shown"` 表示本帧已显示;`"pending"` 表示仍在渲染,照样传给 `showFunnelPurchase`,只有在 Run 展示任何内容之前准备好才会显示,点击不会等它;`false` 表示按普通方式打开。传给 `showFunnelPurchase` 的 Start 必须与预渲染时相同(请求 ID 可以不同),`matches(start)` 可用于判断。
|
|
246
247
|
- 把 `prepared` 传给 `showFunnelPurchase`(或 `showFunnelRun`)即交给 SDK 管理。SDK 用不上时(该 client 已有展示、Start 不同或缺失、没有 Run、仅恢复 Operation 或受阻、失败、Run 先展示指令或其他内容)会释放它,已显示的副本不会留在屏幕上。已显示的展示在没有 Run 的情况下结束时,商户收到 `onDismiss(null)`,失败时收到 `onError`;接管前 Funnel 被暂停时,已显示的对话框与 Run 自己展示的一样被永久关闭。传出后不要再复用,需要时重新预渲染。
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LanguageModelV4Usage, LanguageModelV4Middleware } from '@ai-sdk/provider';
|
|
2
|
-
import { F as FoundationApi, A as ApiInput } from './api-
|
|
2
|
+
import { F as FoundationApi, A as ApiInput } from './api-KIp0I50M.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
declare const tokenCounts: z.ZodObject<{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as StackNode } from './screen-
|
|
1
|
+
import { S as StackNode } from './screen-Pv_pViF6.js';
|
|
2
2
|
import { z } from 'zod/v4';
|
|
3
3
|
import { z as z$1 } from 'zod';
|
|
4
4
|
|
|
@@ -2197,12 +2197,12 @@ declare const apiOperations: {
|
|
|
2197
2197
|
orderId: z$1.ZodUUID;
|
|
2198
2198
|
purchaseIntentId: z$1.ZodUUID;
|
|
2199
2199
|
status: z$1.ZodEnum<{
|
|
2200
|
-
cancelled: "cancelled";
|
|
2201
2200
|
failed: "failed";
|
|
2202
2201
|
paid: "paid";
|
|
2203
2202
|
created: "created";
|
|
2204
2203
|
pending: "pending";
|
|
2205
2204
|
trialing: "trialing";
|
|
2205
|
+
cancelled: "cancelled";
|
|
2206
2206
|
}>;
|
|
2207
2207
|
currency: z$1.ZodEnum<{
|
|
2208
2208
|
USD: "USD";
|
|
@@ -2488,8 +2488,8 @@ declare const apiOperations: {
|
|
|
2488
2488
|
batchId: z$1.ZodUUID;
|
|
2489
2489
|
ready: z$1.ZodBoolean;
|
|
2490
2490
|
status: z$1.ZodEnum<{
|
|
2491
|
-
cancelled: "cancelled";
|
|
2492
2491
|
pending: "pending";
|
|
2492
|
+
cancelled: "cancelled";
|
|
2493
2493
|
prepared: "prepared";
|
|
2494
2494
|
expired: "expired";
|
|
2495
2495
|
partial: "partial";
|
|
@@ -2515,9 +2515,9 @@ declare const apiOperations: {
|
|
|
2515
2515
|
renewal: "renewal";
|
|
2516
2516
|
}>;
|
|
2517
2517
|
status: z$1.ZodEnum<{
|
|
2518
|
-
cancelled: "cancelled";
|
|
2519
2518
|
failed: "failed";
|
|
2520
2519
|
pending: "pending";
|
|
2520
|
+
cancelled: "cancelled";
|
|
2521
2521
|
prepared: "prepared";
|
|
2522
2522
|
effective: "effective";
|
|
2523
2523
|
confirmed: "confirmed";
|
|
@@ -3058,8 +3058,8 @@ declare const apiOperations: {
|
|
|
3058
3058
|
batchId: z$1.ZodUUID;
|
|
3059
3059
|
ready: z$1.ZodBoolean;
|
|
3060
3060
|
status: z$1.ZodEnum<{
|
|
3061
|
-
cancelled: "cancelled";
|
|
3062
3061
|
pending: "pending";
|
|
3062
|
+
cancelled: "cancelled";
|
|
3063
3063
|
prepared: "prepared";
|
|
3064
3064
|
expired: "expired";
|
|
3065
3065
|
partial: "partial";
|
|
@@ -3085,9 +3085,9 @@ declare const apiOperations: {
|
|
|
3085
3085
|
renewal: "renewal";
|
|
3086
3086
|
}>;
|
|
3087
3087
|
status: z$1.ZodEnum<{
|
|
3088
|
-
cancelled: "cancelled";
|
|
3089
3088
|
failed: "failed";
|
|
3090
3089
|
pending: "pending";
|
|
3090
|
+
cancelled: "cancelled";
|
|
3091
3091
|
prepared: "prepared";
|
|
3092
3092
|
effective: "effective";
|
|
3093
3093
|
confirmed: "confirmed";
|
|
@@ -3628,8 +3628,8 @@ declare const apiOperations: {
|
|
|
3628
3628
|
batchId: z$1.ZodUUID;
|
|
3629
3629
|
ready: z$1.ZodBoolean;
|
|
3630
3630
|
status: z$1.ZodEnum<{
|
|
3631
|
-
cancelled: "cancelled";
|
|
3632
3631
|
pending: "pending";
|
|
3632
|
+
cancelled: "cancelled";
|
|
3633
3633
|
prepared: "prepared";
|
|
3634
3634
|
expired: "expired";
|
|
3635
3635
|
partial: "partial";
|
|
@@ -3655,9 +3655,9 @@ declare const apiOperations: {
|
|
|
3655
3655
|
renewal: "renewal";
|
|
3656
3656
|
}>;
|
|
3657
3657
|
status: z$1.ZodEnum<{
|
|
3658
|
-
cancelled: "cancelled";
|
|
3659
3658
|
failed: "failed";
|
|
3660
3659
|
pending: "pending";
|
|
3660
|
+
cancelled: "cancelled";
|
|
3661
3661
|
prepared: "prepared";
|
|
3662
3662
|
effective: "effective";
|
|
3663
3663
|
confirmed: "confirmed";
|
|
@@ -4198,8 +4198,8 @@ declare const apiOperations: {
|
|
|
4198
4198
|
batchId: z$1.ZodUUID;
|
|
4199
4199
|
ready: z$1.ZodBoolean;
|
|
4200
4200
|
status: z$1.ZodEnum<{
|
|
4201
|
-
cancelled: "cancelled";
|
|
4202
4201
|
pending: "pending";
|
|
4202
|
+
cancelled: "cancelled";
|
|
4203
4203
|
prepared: "prepared";
|
|
4204
4204
|
expired: "expired";
|
|
4205
4205
|
partial: "partial";
|
|
@@ -4225,9 +4225,9 @@ declare const apiOperations: {
|
|
|
4225
4225
|
renewal: "renewal";
|
|
4226
4226
|
}>;
|
|
4227
4227
|
status: z$1.ZodEnum<{
|
|
4228
|
-
cancelled: "cancelled";
|
|
4229
4228
|
failed: "failed";
|
|
4230
4229
|
pending: "pending";
|
|
4230
|
+
cancelled: "cancelled";
|
|
4231
4231
|
prepared: "prepared";
|
|
4232
4232
|
effective: "effective";
|
|
4233
4233
|
confirmed: "confirmed";
|
|
@@ -5950,8 +5950,8 @@ declare const apiOperations: {
|
|
|
5950
5950
|
merchantSubscriptionId: z$1.ZodString;
|
|
5951
5951
|
revision: z$1.ZodNumber;
|
|
5952
5952
|
status: z$1.ZodEnum<{
|
|
5953
|
-
active: "active";
|
|
5954
5953
|
canceled: "canceled";
|
|
5954
|
+
active: "active";
|
|
5955
5955
|
trialing: "trialing";
|
|
5956
5956
|
past_due: "past_due";
|
|
5957
5957
|
incomplete: "incomplete";
|
|
@@ -6011,8 +6011,8 @@ declare const apiOperations: {
|
|
|
6011
6011
|
merchantSubscriptionId: z$1.ZodString;
|
|
6012
6012
|
revision: z$1.ZodNumber;
|
|
6013
6013
|
status: z$1.ZodEnum<{
|
|
6014
|
-
active: "active";
|
|
6015
6014
|
canceled: "canceled";
|
|
6015
|
+
active: "active";
|
|
6016
6016
|
trialing: "trialing";
|
|
6017
6017
|
past_due: "past_due";
|
|
6018
6018
|
incomplete: "incomplete";
|
|
@@ -6066,8 +6066,8 @@ declare const apiOperations: {
|
|
|
6066
6066
|
merchantSubscriptionId: z$1.ZodString;
|
|
6067
6067
|
revision: z$1.ZodNumber;
|
|
6068
6068
|
status: z$1.ZodEnum<{
|
|
6069
|
-
active: "active";
|
|
6070
6069
|
canceled: "canceled";
|
|
6070
|
+
active: "active";
|
|
6071
6071
|
trialing: "trialing";
|
|
6072
6072
|
past_due: "past_due";
|
|
6073
6073
|
incomplete: "incomplete";
|
|
@@ -6415,10 +6415,10 @@ declare const apiOperations: {
|
|
|
6415
6415
|
append: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
6416
6416
|
invoiceMode: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
6417
6417
|
status: z$1.ZodEnum<{
|
|
6418
|
-
cancelled: "cancelled";
|
|
6419
6418
|
failed: "failed";
|
|
6420
6419
|
complete: "complete";
|
|
6421
6420
|
pending: "pending";
|
|
6421
|
+
cancelled: "cancelled";
|
|
6422
6422
|
}>;
|
|
6423
6423
|
executor: z$1.ZodEnum<{
|
|
6424
6424
|
merchant: "merchant";
|
|
@@ -8141,10 +8141,10 @@ declare const apiOperations: {
|
|
|
8141
8141
|
append: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
8142
8142
|
invoiceMode: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
8143
8143
|
status: z$1.ZodEnum<{
|
|
8144
|
-
cancelled: "cancelled";
|
|
8145
8144
|
failed: "failed";
|
|
8146
8145
|
complete: "complete";
|
|
8147
8146
|
pending: "pending";
|
|
8147
|
+
cancelled: "cancelled";
|
|
8148
8148
|
}>;
|
|
8149
8149
|
executor: z$1.ZodEnum<{
|
|
8150
8150
|
merchant: "merchant";
|
|
@@ -10502,9 +10502,9 @@ declare const apiOperations: {
|
|
|
10502
10502
|
productVersionId: z$1.ZodUUID;
|
|
10503
10503
|
featureQuantities: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodUUID, z$1.ZodNumber>>;
|
|
10504
10504
|
status: z$1.ZodEnum<{
|
|
10505
|
-
cancelled: "cancelled";
|
|
10506
10505
|
failed: "failed";
|
|
10507
10506
|
pending: "pending";
|
|
10507
|
+
cancelled: "cancelled";
|
|
10508
10508
|
prepared: "prepared";
|
|
10509
10509
|
effective: "effective";
|
|
10510
10510
|
confirmed: "confirmed";
|
|
@@ -12040,9 +12040,9 @@ declare const apiOperations: {
|
|
|
12040
12040
|
membershipId: z$1.ZodUUID;
|
|
12041
12041
|
productVersionId: z$1.ZodUUID;
|
|
12042
12042
|
status: z$1.ZodEnum<{
|
|
12043
|
-
cancelled: "cancelled";
|
|
12044
12043
|
failed: "failed";
|
|
12045
12044
|
pending: "pending";
|
|
12045
|
+
cancelled: "cancelled";
|
|
12046
12046
|
prepared: "prepared";
|
|
12047
12047
|
effective: "effective";
|
|
12048
12048
|
}>;
|
|
@@ -12162,9 +12162,9 @@ declare const apiOperations: {
|
|
|
12162
12162
|
productVersionId: z$1.ZodUUID;
|
|
12163
12163
|
featureQuantities: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodUUID, z$1.ZodNumber>>;
|
|
12164
12164
|
status: z$1.ZodEnum<{
|
|
12165
|
-
cancelled: "cancelled";
|
|
12166
12165
|
failed: "failed";
|
|
12167
12166
|
pending: "pending";
|
|
12167
|
+
cancelled: "cancelled";
|
|
12168
12168
|
prepared: "prepared";
|
|
12169
12169
|
effective: "effective";
|
|
12170
12170
|
confirmed: "confirmed";
|
|
@@ -13700,9 +13700,9 @@ declare const apiOperations: {
|
|
|
13700
13700
|
membershipId: z$1.ZodUUID;
|
|
13701
13701
|
productVersionId: z$1.ZodUUID;
|
|
13702
13702
|
status: z$1.ZodEnum<{
|
|
13703
|
-
cancelled: "cancelled";
|
|
13704
13703
|
failed: "failed";
|
|
13705
13704
|
pending: "pending";
|
|
13705
|
+
cancelled: "cancelled";
|
|
13706
13706
|
prepared: "prepared";
|
|
13707
13707
|
effective: "effective";
|
|
13708
13708
|
}>;
|
|
@@ -21589,12 +21589,12 @@ declare const apiOperations: {
|
|
|
21589
21589
|
}, z$1.core.$strict>], "type">;
|
|
21590
21590
|
renewalAmountMinor: z$1.ZodNumber;
|
|
21591
21591
|
status: z$1.ZodEnum<{
|
|
21592
|
-
cancelled: "cancelled";
|
|
21593
21592
|
failed: "failed";
|
|
21594
21593
|
paid: "paid";
|
|
21595
21594
|
created: "created";
|
|
21596
21595
|
pending: "pending";
|
|
21597
21596
|
trialing: "trialing";
|
|
21597
|
+
cancelled: "cancelled";
|
|
21598
21598
|
}>;
|
|
21599
21599
|
url: z$1.ZodNullable<z$1.ZodURL>;
|
|
21600
21600
|
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
@@ -21925,8 +21925,8 @@ declare const apiOperations: {
|
|
|
21925
21925
|
holdingStatus: z$1.ZodDefault<z$1.ZodEnum<{
|
|
21926
21926
|
"": "";
|
|
21927
21927
|
unavailable: "unavailable";
|
|
21928
|
-
active: "active";
|
|
21929
21928
|
none: "none";
|
|
21929
|
+
active: "active";
|
|
21930
21930
|
expired: "expired";
|
|
21931
21931
|
scheduled: "scheduled";
|
|
21932
21932
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as w,f as b}from"./chunk-BJW4AXFL.js";import{n as h,s as u}from"./chunk-32AEJKJW.js";import{a as y}from"./chunk-
|
|
1
|
+
import{e as w,f as b}from"./chunk-BJW4AXFL.js";import{n as h,s as u}from"./chunk-32AEJKJW.js";import{a as y}from"./chunk-FEBXEBDK.js";import{a as n}from"./chunk-TK3WOD2O.js";import{a as g}from"./chunk-3VUPVXAV.js";import{a as f}from"./chunk-5MRSFLQA.js";function p(r,s){let a=typeof r=="string"?new TextEncoder().encode(r):r;return a.byteLength===s.byteLength&&u(a)===s.sha256}async function _(r,s){let a=w.parse(s),{artifact:i,environmentId:P}=a.content,m=new y(r.baseUrl??f).origin,e=new y(i.url,m);if(e.origin!==m||e.username||e.password||e.search||e.hash||e.pathname!==`/api/v1/configuration/${P}/artifacts/${i.sha256}`)throw new n("INVALID_RESPONSE","Public Paywall locator is not trusted");let o=new AbortController,d,I=new Promise((t,l)=>{d=setTimeout(()=>{let c=new n("TIMEOUT","Public Paywall read timed out");o.abort(c),l(c)},h.initializationMs)}),E=(async()=>{let t=await(r.fetch??globalThis.fetch)(e,{method:"GET",credentials:"omit",redirect:"error",cache:"default",signal:o.signal});if(o.signal.aborted&&(t.body?.cancel().catch(()=>{}),o.signal.throwIfAborted()),!t.ok||!t.headers.get("content-type")?.toLowerCase().startsWith("application/json")||Number(t.headers.get("content-length"))>i.byteLength)throw t.body?.cancel().catch(()=>{}),new n("INVALID_RESPONSE","Public Paywall is unavailable");let l=await g(t,i.byteLength,{signal:o.signal,error:c=>new n("INVALID_RESPONSE",c==="missing"?"Public Paywall body is missing":"Public Paywall exceeds its byte limit")});if(!p(l,i))throw new n("INVALID_RESPONSE","Public Paywall digest or size changed");return b(a,JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(l)))})();try{return await Promise.race([E,I])}finally{clearTimeout(d)}}export{p as a,_ as b};
|