palbase 0.11.2 → 0.13.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 (62) hide show
  1. package/dist/ai/index.js +2 -2
  2. package/dist/backend/engine.js +2 -2
  3. package/dist/backend/env.js +1 -1
  4. package/dist/backend/index.js +11 -11
  5. package/dist/backend/stack.js +1 -1
  6. package/dist/backend/test.js +2 -2
  7. package/dist/chunks/{PF3S7VGN.js → 22JG5QKQ.js} +1 -1
  8. package/dist/chunks/{W6LUHPMU.js → 2DBSGJ7Z.js} +2 -2
  9. package/dist/chunks/{MWKPDZHT.js → 53ZQBGJV.js} +2 -2
  10. package/dist/chunks/66QSZDXV.js +2 -0
  11. package/dist/chunks/{5FJNJOWL.js → 7ZSVOQFN.js} +2 -2
  12. package/dist/chunks/{XOPSQEWX.js → ABRUIWQ3.js} +1 -1
  13. package/dist/chunks/B33QXIR5.js +2 -0
  14. package/dist/chunks/{NZRVCF6B.js → B5XYZZDJ.js} +1 -1
  15. package/dist/chunks/{NT7K4S2X.js → DLQT5KPC.js} +1 -1
  16. package/dist/chunks/IYUDOOD7.js +2 -0
  17. package/dist/chunks/JEI4RW55.js +6 -0
  18. package/dist/chunks/{XQUWS373.js → JWLK6SLN.js} +2 -2
  19. package/dist/chunks/{E765DY7Q.js → LDZ7OKNS.js} +2 -2
  20. package/dist/chunks/{BPFIGT6G.js → MWTLLONV.js} +2 -2
  21. package/dist/chunks/{6FV2T52H.js → NRWY25JZ.js} +1 -1
  22. package/dist/chunks/{W7UOMPUA.js → QCZJK4GZ.js} +2 -2
  23. package/dist/chunks/UMCUTNWL.js +2 -0
  24. package/dist/chunks/{4NC6D3AY.js → WAMYRYDY.js} +2 -2
  25. package/dist/chunks/{4OASGT7Q.js → WUYO4O77.js} +7 -7
  26. package/dist/chunks/{SI2TXLYT.js → X2BWW2WC.js} +1 -1
  27. package/dist/chunks/YWEI45Q6.js +21 -0
  28. package/dist/chunks/{FIWWCA6S.js → ZOF56QTG.js} +2 -2
  29. package/dist/chunks/ZT4AKS6D.js +13 -0
  30. package/dist/cli.js +132 -131
  31. package/dist/refuse/ai.js +1 -1
  32. package/dist/refuse/backend.js +1 -1
  33. package/dist/refuse/server.js +1 -1
  34. package/dist/server/index.js +2 -2
  35. package/dist/server/testing.js +2 -2
  36. package/dist/web/index.js +2 -2
  37. package/dist/web/message.js +2 -2
  38. package/dist/web/palbe.js +2 -2
  39. package/dist/web/paywall.js +2 -2
  40. package/dist/web/push-sw.js +1 -1
  41. package/dist/web/ssr.js +2 -2
  42. package/dist/web/vite.js +2 -2
  43. package/package.json +2 -2
  44. package/types/ai/src/chats.d.ts +7 -0
  45. package/types/backend/src/index.d.ts +1 -0
  46. package/types/backend/src/transit.d.ts +39 -0
  47. package/types/internal/src/modules/ai.d.ts +8 -0
  48. package/types/internal/src/modules/purchases.d.ts +95 -11
  49. package/types/internal/src/modules/secrets.d.ts +148 -1
  50. package/types/internal/src/transit-marks.d.ts +51 -0
  51. package/types/internal/src/transit.d.ts +108 -0
  52. package/types/server/src/index.d.ts +1 -0
  53. package/types/server/src/server.d.ts +8 -0
  54. package/types/server/src/transit.d.ts +91 -0
  55. package/types/web/src/backend-transit.d.ts +23 -0
  56. package/types/web/src/backends.d.ts +8 -1
  57. package/types/web/src/index.d.ts +1 -0
  58. package/dist/chunks/6S6MUPJA.js +0 -2
  59. package/dist/chunks/D5A6USBN.js +0 -6
  60. package/dist/chunks/QNJK2UIR.js +0 -20
  61. package/dist/chunks/VPFDS7G7.js +0 -2
  62. package/dist/chunks/WUPBDP6G.js +0 -13
package/dist/refuse/ai.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! palbase 0.11.2 — Palbase SDK License (see LICENSE) */
1
+ /*! palbase 0.13.2 — Palbase SDK License (see LICENSE) */
2
2
  throw new Error("palbase/ai is for servers: it speaks with the project secret key, which never goes into a browser or a mobile app \u2014 call your backend, and let it ask the model");
@@ -1,2 +1,2 @@
1
- /*! palbase 0.11.2 — Palbase SDK License (see LICENSE) */
1
+ /*! palbase 0.13.2 — Palbase SDK License (see LICENSE) */
2
2
  throw new Error("palbase/backend is a server framework: it runs on your backend, never in a browser or a mobile app \u2014 apps use palbase/web (or the native SDKs)");
@@ -1,2 +1,2 @@
1
- /*! palbase 0.11.2 — Palbase SDK License (see LICENSE) */
1
+ /*! palbase 0.13.2 — Palbase SDK License (see LICENSE) */
2
2
  throw new Error("palbase/server is for servers: its secret key never goes into a browser or a mobile app \u2014 apps use palbase/web (or the native SDKs) with the publishable key");
@@ -1,2 +1,2 @@
1
- /*! palbase 0.11.2 — Palbase SDK License (see LICENSE) */
2
- import{a as e,b as f,c as g,d as h,e as i,f as j,g as k,h as l,i as m,j as n,k as o,l as p,m as q,n as r,o as s,p as t,q as u,r as v}from"../chunks/VPFDS7G7.js";import{a as c,b as d}from"../chunks/XOPSQEWX.js";import"../chunks/SI2TXLYT.js";import{m as b}from"../chunks/4NC6D3AY.js";import"../chunks/FIWWCA6S.js";import{b as a}from"../chunks/5FJNJOWL.js";import"../chunks/NT7K4S2X.js";import"../chunks/PF3S7VGN.js";export{l as AuthUnavailable,b as EVENT_TYPES,c as FieldError,d as Fields,a as PalbaseError,q as ReservationSettled,k as TokenError,n as TokenVerifier,f as WebhookSignatureError,e as createServer,p as isEntitled,v as loadSecrets,s as pages,u as platformOwn,t as processOwn,o as requestAddress,m as sessionStanding,i as signatureHeader,h as verifySignature,g as verifyWebhook,j as verifyWebhookRequest,r as withReservation};
1
+ /*! palbase 0.13.2 — Palbase SDK License (see LICENSE) */
2
+ import{a as e,b as f,c as g,d as h,e as i,f as j,g as k,h as l,i as m,j as n,k as o,l as p,m as q,n as r,o as s,p as t,q as u,r as v,s as w,t as x,u as y}from"../chunks/UMCUTNWL.js";import{a as c,b as d}from"../chunks/ABRUIWQ3.js";import"../chunks/B33QXIR5.js";import"../chunks/X2BWW2WC.js";import{m as b}from"../chunks/WAMYRYDY.js";import"../chunks/ZOF56QTG.js";import{b as a}from"../chunks/7ZSVOQFN.js";import"../chunks/DLQT5KPC.js";import"../chunks/22JG5QKQ.js";export{o as AuthUnavailable,b as EVENT_TYPES,c as FieldError,d as Fields,a as PalbaseError,t as ReservationSettled,n as TokenError,q as TokenVerifier,f as Transit,e as TransitRefusal,g as TransitRequest,i as WebhookSignatureError,h as createServer,s as isEntitled,y as loadSecrets,v as pages,x as platformOwn,w as processOwn,r as requestAddress,p as sessionStanding,l as signatureHeader,k as verifySignature,j as verifyWebhook,m as verifyWebhookRequest,u as withReservation};
@@ -1,2 +1,2 @@
1
- /*! palbase 0.11.2 — Palbase SDK License (see LICENSE) */
2
- import{a,b,c,d,e}from"../chunks/MWKPDZHT.js";import"../chunks/XOPSQEWX.js";import"../chunks/NT7K4S2X.js";import"../chunks/PF3S7VGN.js";export{b as TestApiError,e as api,c as createTestApi,a as testFields,d as testRun};
1
+ /*! palbase 0.13.2 — Palbase SDK License (see LICENSE) */
2
+ import{a,b,c,d,e}from"../chunks/53ZQBGJV.js";import"../chunks/ABRUIWQ3.js";import"../chunks/DLQT5KPC.js";import"../chunks/22JG5QKQ.js";export{b as TestApiError,e as api,c as createTestApi,a as testFields,d as testRun};
package/dist/web/index.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! palbase 0.11.2 — Palbase SDK License (see LICENSE) */
2
- import{a as h,b as g,c as C,d as w,e as v,f as b,g as E,h as T,i as P,j as S,k as x,l as k,m as R,n as I,o as L,p as M,q as G}from"../chunks/E765DY7Q.js";import{a as V,b as O,f as A}from"../chunks/WUPBDP6G.js";import"../chunks/W7UOMPUA.js";import"../chunks/XQUWS373.js";import"../chunks/6FV2T52H.js";import"../chunks/W6LUHPMU.js";import"../chunks/4NC6D3AY.js";import"../chunks/FIWWCA6S.js";import{b as u}from"../chunks/5FJNJOWL.js";import"../chunks/NT7K4S2X.js";import"../chunks/PF3S7VGN.js";var D="oai-events";async function N(e){if(typeof e?.start!="function")throw new TypeError("connectVoice: start(sdp) is the round trip to the app's backend, which starts the voice (chats.voice.start) and answers { id, sdp }");let o=e.rtc??B(),t=e.signal;t?.throwIfAborted();let s=e.audio??F(),c=e.microphone===void 0,a=e.microphone??await o.getUserMedia({audio:!0});if(t?.aborted){if(c)for(let r of a.getTracks())r.stop();throw t.reason}let n=new o.RTCPeerConnection,p=!1,d=()=>{if(!p){if(p=!0,f.close(),n.close(),c)for(let r of a.getTracks())r.stop();s.srcObject!==null&&(s.srcObject=null)}};n.addEventListener("track",r=>{s.srcObject=r.streams[0]??new MediaStream([r.track]),s.play?.()?.catch?.(()=>{})}),n.addEventListener("connectionstatechange",()=>e.onState?.(n.connectionState));for(let r of a.getAudioTracks())n.addTrack(r,a);let f=n.createDataChannel(D);f.addEventListener("message",r=>{let i=U(r.data);i!==void 0&&e.onError?.(i)});let y=()=>d();t?.addEventListener("abort",y,{once:!0});try{await n.setLocalDescription(await n.createOffer()),t?.throwIfAborted(),await H(n,e.iceTimeoutMs??1e4,t);let r=n.localDescription?.sdp;if(!r)throw new Error("connectVoice: the peer connection made no offer");let i=await e.start(r);if(t?.throwIfAborted(),typeof i?.id!="string"||i.id===""||typeof i.sdp!="string"||i.sdp==="")throw new TypeError("connectVoice: start answered no voice \u2014 it is { id, sdp }, chats.voice.start's answer as the backend got it");return await n.setRemoteDescription({type:"answer",sdp:i.sdp}),t?.removeEventListener("abort",y),{id:i.id,peer:n,audio:s,microphone:a,get muted(){return a.getAudioTracks().every(l=>!l.enabled)},mute(l){for(let m of a.getAudioTracks())m.enabled=!l},close:d}}catch(r){throw t?.removeEventListener("abort",y),d(),t?.aborted?t.reason:r}}function H(e,o,t){return e.iceGatheringState==="complete"?Promise.resolve():t?.aborted?Promise.reject(t.reason):new Promise((s,c)=>{let a=()=>{clearTimeout(d),e.removeEventListener("icegatheringstatechange",n),t?.removeEventListener("abort",p)},n=()=>{e.iceGatheringState==="complete"&&(a(),s())},p=()=>{a(),c(t?.reason)},d=setTimeout(()=>{a(),c(new Error(`connectVoice: the network candidates were not gathered in ${o} ms`))},o);e.addEventListener("icegatheringstatechange",n),t?.addEventListener("abort",p,{once:!0})})}function U(e){if(typeof e=="string")try{let o=JSON.parse(e);return o.type!=="error"?void 0:typeof o.error?.message=="string"?o.error.message:typeof o.error?.code=="string"?o.error.code:"the voice failed"}catch{return}}function B(){let e=globalThis;if(typeof e.RTCPeerConnection!="function"||typeof e.navigator?.mediaDevices?.getUserMedia!="function")throw new TypeError("connectVoice: this runtime has no WebRTC (RTCPeerConnection, navigator.mediaDevices): a chat's voice is a browser's");let o=e.navigator.mediaDevices;return{RTCPeerConnection:e.RTCPeerConnection,getUserMedia:t=>o.getUserMedia(t)}}function F(){let e=globalThis.document;if(!e)throw new TypeError("connectVoice: give audio \u2014 the element the voice plays in \u2014 where there is no document");let o=e.createElement("audio");return o.autoplay=!0,o}export{E as Analytics,V as BackendError,w as Channel,T as Consent,M as Flags,A as GatewayError,x as InApp,P as Inbox,b as Installation,R as Notify,u as PalbaseError,I as Purchases,v as RealtimeSocket,S as SESSION_START,h as SessionChangedError,k as WebPush,N as connectVoice,G as createClient,O as isBackendError,C as localStore,g as memoryStore,L as redemptionToken};
1
+ /*! palbase 0.13.2 — Palbase SDK License (see LICENSE) */
2
+ import{a as M,b as j,c as q,d as G,e as N,f as U,g as D,h as H,i as J,j as B,k as F,l as K,m as W,n as X,o as Y,p as Z,q as ee}from"../chunks/LDZ7OKNS.js";import{a as _,b as Q,f as z}from"../chunks/ZT4AKS6D.js";import"../chunks/QCZJK4GZ.js";import"../chunks/JWLK6SLN.js";import"../chunks/NRWY25JZ.js";import{b as E,c as T,d as x,f as O,g as A,j as R,k as $,l as V,m as v,o as S}from"../chunks/B33QXIR5.js";import"../chunks/2DBSGJ7Z.js";import"../chunks/WAMYRYDY.js";import"../chunks/ZOF56QTG.js";import{b as L}from"../chunks/7ZSVOQFN.js";import"../chunks/DLQT5KPC.js";import"../chunks/22JG5QKQ.js";var te="oai-events";async function ne(e){if(typeof e?.start!="function")throw new TypeError("connectVoice: start(sdp) is the round trip to the app's backend, which starts the voice (chats.voice.start) and answers { id, sdp }");let r=e.rtc??se(),t=e.signal;t?.throwIfAborted();let f=e.audio??ae(),l=e.microphone===void 0,c=e.microphone??await r.getUserMedia({audio:!0});if(t?.aborted){if(l)for(let n of c.getTracks())n.stop();throw t.reason}let o=new r.RTCPeerConnection,s=!1,u=()=>{if(!s){if(s=!0,m.close(),o.close(),l)for(let n of c.getTracks())n.stop();f.srcObject!==null&&(f.srcObject=null)}};o.addEventListener("track",n=>{f.srcObject=n.streams[0]??new MediaStream([n.track]),f.play?.()?.catch?.(()=>{})}),o.addEventListener("connectionstatechange",()=>e.onState?.(o.connectionState));for(let n of c.getAudioTracks())o.addTrack(n,c);let m=o.createDataChannel(te);m.addEventListener("message",n=>{let p=oe(n.data);p!==void 0&&e.onError?.(p)});let d=()=>u();t?.addEventListener("abort",d,{once:!0});try{await o.setLocalDescription(await o.createOffer()),t?.throwIfAborted(),await re(o,e.iceTimeoutMs??1e4,t);let n=o.localDescription?.sdp;if(!n)throw new Error("connectVoice: the peer connection made no offer");let p=await e.start(n);if(t?.throwIfAborted(),typeof p?.id!="string"||p.id===""||typeof p.sdp!="string"||p.sdp==="")throw new TypeError("connectVoice: start answered no voice \u2014 it is { id, sdp }, chats.voice.start's answer as the backend got it");return await o.setRemoteDescription({type:"answer",sdp:p.sdp}),t?.removeEventListener("abort",d),{id:p.id,peer:o,audio:f,microphone:c,get muted(){return c.getAudioTracks().every(h=>!h.enabled)},mute(h){for(let w of c.getAudioTracks())w.enabled=!h},close:u}}catch(n){throw t?.removeEventListener("abort",d),u(),t?.aborted?t.reason:n}}function re(e,r,t){return e.iceGatheringState==="complete"?Promise.resolve():t?.aborted?Promise.reject(t.reason):new Promise((f,l)=>{let c=()=>{clearTimeout(u),e.removeEventListener("icegatheringstatechange",o),t?.removeEventListener("abort",s)},o=()=>{e.iceGatheringState==="complete"&&(c(),f())},s=()=>{c(),l(t?.reason)},u=setTimeout(()=>{c(),l(new Error(`connectVoice: the network candidates were not gathered in ${r} ms`))},r);e.addEventListener("icegatheringstatechange",o),t?.addEventListener("abort",s,{once:!0})})}function oe(e){if(typeof e=="string")try{let r=JSON.parse(e);return r.type!=="error"?void 0:typeof r.error?.message=="string"?r.error.message:typeof r.error?.code=="string"?r.error.code:"the voice failed"}catch{return}}function se(){let e=globalThis;if(typeof e.RTCPeerConnection!="function"||typeof e.navigator?.mediaDevices?.getUserMedia!="function")throw new TypeError("connectVoice: this runtime has no WebRTC (RTCPeerConnection, navigator.mediaDevices): a chat's voice is a browser's");let r=e.navigator.mediaDevices;return{RTCPeerConnection:e.RTCPeerConnection,getUserMedia:t=>r.getUserMedia(t)}}function ae(){let e=globalThis.document;if(!e)throw new TypeError("connectVoice: give audio \u2014 the element the voice plays in \u2014 where there is no document");let r=e.createElement("audio");return r.autoplay=!0,r}var i=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:void 0;function ie(e,r,t){let f=i(i(i(e)?.components)?.schemas)??{},l=(d,n)=>{let p=new Set,h=(C,g,y)=>{let a=i(C);if(!a)return;if(typeof a.$ref=="string"){if(y.has(a.$ref)||!a.$ref.startsWith("#/components/schemas/"))return;h(f[a.$ref.slice(21)],g,new Set(y).add(a.$ref));return}if(a[E]===!0){p.add(g);return}for(let b of["anyOf","oneOf","allOf"]){let k=a[b];if(Array.isArray(k))for(let I of k)h(I,g,y)}let P=i(a.properties);if(P)for(let[b,k]of Object.entries(P))h(k,`${g}/${v(b)}`,y);i(a.items)&&h(a.items,`${g}/*`,y);for(let b of["additionalProperties","patternProperties","prefixItems"])if(a[b]!==void 0&&w(a[b],new Set(y)))throw new Error(`${t}: an encrypted field is a named property \u2014 not every key of a record, nor a tuple's place`)},w=(C,g)=>{if(Array.isArray(C))return C.some(a=>w(a,g));let y=i(C);return y?y[E]===!0?!0:typeof y.$ref=="string"&&!g.has(y.$ref)&&y.$ref.startsWith("#/components/schemas/")?(g.add(y.$ref),w(f[y.$ref.slice(21)],g)):Object.values(y).some(a=>typeof a=="object"&&a!==null&&w(a,g)):!1};return h(d,n,new Set),[...p]},c=d=>i(i(i(d)?.["application/json"])?.schema),o=[];o.push(...l(c(i(r.requestBody)?.content),"/body"));for(let d of Array.isArray(r.parameters)?r.parameters:[]){let n=i(d);if(!n)continue;let p=l(n.schema,`/query/${v(String(n.name))}`);if(p.length!==0){if(n.in!=="query")throw new Error(`${t}: ${String(n.in)} parameter ${String(n.name)} is marked encrypted \u2014 a body's or a query's field is`);if(p.some(h=>h.split("/").length!==3))throw new Error(`${t}: an encrypted query field is one of the query's own names`);o.push(...p)}}let s=i(r.responses)??{},u=Object.keys(s).filter(d=>/^2\d\d$/.test(d)).sort((d,n)=>d==="200"?-1:n==="200"?1:d.localeCompare(n)),m=u.length>0?l(c(i(s[u[0]])?.content),"/response"):[];if(o.length+m.length!==0){if(r["x-palbase-sse"]!==void 0&&m.length>0)throw new Error(`${t}: a streamed answer carries no encrypted field`);if(r["x-palbase-upload"]!==void 0)throw new Error(`${t}: an upload goes through storage, which seals nothing \u2014 it carries no encrypted field`);return{request:o,response:m}}}async function ce(e){let r=`${e.method.toUpperCase()} ${e.path}`,t=i(i(i(i(e.contract)?.paths)?.[e.path])?.[e.method.toLowerCase()]),f=t?ie(e.contract,t,r):void 0;if(!f)return{body:e.body,query:e.query,open:async s=>s};let{key:l,header:c}=await A(e.key.kid,x(e.key.publicKey),O(e.projectId,e.method,e.path,e.params??[])),o=(s,u)=>s==null?s:S(s,u,f.request,(m,d)=>R(l,m,d));return{header:c,body:await o(e.body,"/body"),query:await o(e.query,"/query"),open:s=>s===void 0?Promise.resolve(s):S(s,"/response",f.response,async(u,m)=>{if(!$(m))throw new T("unopenable",`${r}: ${u} came plain where the contract says it is encrypted`);return V(l,u,m)})}}export{D as Analytics,_ as BackendError,G as Channel,H as Consent,Z as Flags,z as GatewayError,F as InApp,J as Inbox,U as Installation,W as Notify,L as PalbaseError,X as Purchases,N as RealtimeSocket,B as SESSION_START,M as SessionChangedError,K as WebPush,ne as connectVoice,ee as createClient,ce as encryptedCall,Q as isBackendError,q as localStore,j as memoryStore,Y as redemptionToken};
@@ -1,2 +1,2 @@
1
- /*! palbase 0.11.2 — Palbase SDK License (see LICENSE) */
2
- import{a as i}from"../chunks/XQUWS373.js";import{a as e,b as s,c as t,d as p,e as o,f as a,h as r,j as n,k as y,p as M,q as l,t as g}from"../chunks/6FV2T52H.js";import"../chunks/PF3S7VGN.js";export{n as MESSAGE_COMPONENTS,a as MESSAGE_ICONS,r as MESSAGE_SCHEMA,s as assetId,y as countdownValues,e as fontFamily,o as htmlDocument,t as prepareAssets,i as presentMessage,g as renderMessage,M as resolveMessage,l as resolveMessageWithPaths,p as unzip};
1
+ /*! palbase 0.13.2 — Palbase SDK License (see LICENSE) */
2
+ import{a as i}from"../chunks/JWLK6SLN.js";import{a as e,b as s,c as t,d as p,e as o,f as a,h as r,j as n,k as y,p as M,q as l,t as g}from"../chunks/NRWY25JZ.js";import"../chunks/22JG5QKQ.js";export{n as MESSAGE_COMPONENTS,a as MESSAGE_ICONS,r as MESSAGE_SCHEMA,s as assetId,y as countdownValues,e as fontFamily,o as htmlDocument,t as prepareAssets,i as presentMessage,g as renderMessage,M as resolveMessage,l as resolveMessageWithPaths,p as unzip};
package/dist/web/palbe.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! palbase 0.11.2 — Palbase SDK License (see LICENSE) */
2
- import{c as e,d as r,i as t}from"../chunks/WUPBDP6G.js";import"../chunks/W6LUHPMU.js";import"../chunks/FIWWCA6S.js";import"../chunks/5FJNJOWL.js";import"../chunks/NT7K4S2X.js";import"../chunks/PF3S7VGN.js";export{e as RESERVED_CLIENT_NAMES,t as __registerBackend,r as isClientName};
1
+ /*! palbase 0.13.2 — Palbase SDK License (see LICENSE) */
2
+ import{c as e,d as r,i as t}from"../chunks/ZT4AKS6D.js";import"../chunks/B33QXIR5.js";import"../chunks/2DBSGJ7Z.js";import"../chunks/ZOF56QTG.js";import"../chunks/7ZSVOQFN.js";import"../chunks/DLQT5KPC.js";import"../chunks/22JG5QKQ.js";export{e as RESERVED_CLIENT_NAMES,t as __registerBackend,r as isClientName};
@@ -1,2 +1,2 @@
1
- /*! palbase 0.11.2 — Palbase SDK License (see LICENSE) */
2
- import{a as f,b as d,c as m,d as u,e as A,f as c,g as R}from"../chunks/W7UOMPUA.js";import{a as e,b as a,c as t,d as l,e as r,f as o,g as p,i as y,k as s,l as P,n,o as i,s as w}from"../chunks/6FV2T52H.js";import"../chunks/5FJNJOWL.js";import"../chunks/NT7K4S2X.js";import"../chunks/PF3S7VGN.js";export{y as PAYWALL_COMPONENTS,o as PAYWALL_ICONS,p as PAYWALL_SCHEMA,c as Paywall,a as assetId,f as attributesHeader,s as countdownValues,R as defaultPaywall,e as fontFamily,u as formatPeriod,m as formatPrice,r as htmlDocument,A as packageValues,P as packagesOf,d as parseDuration,t as prepareAssets,w as renderPaywall,n as resolvePaywall,i as resolvePaywallWithPaths,l as unzip};
1
+ /*! palbase 0.13.2 — Palbase SDK License (see LICENSE) */
2
+ import{a as f,b as d,c as m,d as u,e as A,f as c,g as R}from"../chunks/QCZJK4GZ.js";import{a as e,b as a,c as t,d as l,e as r,f as o,g as p,i as y,k as s,l as P,n,o as i,s as w}from"../chunks/NRWY25JZ.js";import"../chunks/7ZSVOQFN.js";import"../chunks/DLQT5KPC.js";import"../chunks/22JG5QKQ.js";export{y as PAYWALL_COMPONENTS,o as PAYWALL_ICONS,p as PAYWALL_SCHEMA,c as Paywall,a as assetId,f as attributesHeader,s as countdownValues,R as defaultPaywall,e as fontFamily,u as formatPeriod,m as formatPrice,r as htmlDocument,A as packageValues,P as packagesOf,d as parseDuration,t as prepareAssets,w as renderPaywall,n as resolvePaywall,i as resolvePaywallWithPaths,l as unzip};
@@ -1,2 +1,2 @@
1
- /*! palbase 0.11.2 — Palbase SDK License (see LICENSE) */
1
+ /*! palbase 0.13.2 — Palbase SDK License (see LICENSE) */
2
2
  "use strict";(()=>{function f(e,s){if(e)try{let i=new URL(e,s);if(i.protocol==="https:"||i.protocol==="http:"&&(i.hostname==="localhost"||i.hostname==="127.0.0.1"))return i.href}catch{}}function g(e){let s=new URL(e.location.href).searchParams,i=s.get("url")??"",l=s.get("key")??"",r=(n,t)=>!n||!i?Promise.resolve():e.fetch(`${i.replace(/\/$/,"")}/notify/receipts`,{method:"POST",headers:{"content-type":"application/json",apikey:l},body:JSON.stringify({receipts:[{receipt:n,status:t}]}),keepalive:!0}).catch(()=>{}),a=async(n,t)=>{for(let o of await e.clients.matchAll({type:"window",includeUncontrolled:!0}))o.postMessage({type:"palbase.push",event:n,url:t.url,data:t.data})};e.addEventListener("push",(n=>{let t={};try{t=n.data?.json()??{}}catch{}let o={url:t.url,receipt:t.receipt,data:t.data};n.waitUntil(e.registration.showNotification(t.title??"",{body:t.body,image:t.image,tag:t.tag,data:o}).then(()=>Promise.all([r(t.receipt,"delivered"),a("received",o)])))})),e.addEventListener("notificationclick",(n=>{n.notification.close();let t=n.notification.data??{},o=f(t.url,e.location.origin),c=async()=>{if(!o)return;let d=(await e.clients.matchAll({type:"window",includeUncontrolled:!0})).find(u=>u.url===o);d?await d.focus():await e.clients.openWindow(o)};n.waitUntil(Promise.all([r(t.receipt,"opened"),c(),a("opened",t)]))})),e.addEventListener("notificationclose",(n=>{n.waitUntil(r(n.notification.data?.receipt,"dismissed"))}))}typeof self<"u"&&typeof self.registration=="object"&&!("document"in self)&&g(self);})();
package/dist/web/ssr.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! palbase 0.11.2 — Palbase SDK License (see LICENSE) */
2
- import{q as f}from"../chunks/E765DY7Q.js";import"../chunks/WUPBDP6G.js";import"../chunks/W7UOMPUA.js";import"../chunks/XQUWS373.js";import"../chunks/6FV2T52H.js";import"../chunks/W6LUHPMU.js";import"../chunks/4NC6D3AY.js";import"../chunks/FIWWCA6S.js";import"../chunks/5FJNJOWL.js";import"../chunks/NT7K4S2X.js";import"../chunks/PF3S7VGN.js";var C=Object.freeze({"Cache-Control":"private, no-cache, no-store, must-revalidate, max-age=0",Expires:"0",Pragma:"no-cache"}),x={path:"/",sameSite:"lax",secure:!0,httpOnly:!1,maxAge:400*24*60*60},u=3180,k=5*6e4;function d(t){let e=/^pb_([a-z0-9]+)_c/.exec(t)?.[1];if(e===void 0)throw new TypeError("publishableKey is the project publishable key (pb_<ref>_c\u2026)");return`pb-${e}-session`}var y=t=>{let e=new TextEncoder().encode(JSON.stringify(t)),o="";for(let s of e)o+=String.fromCharCode(s);return btoa(o).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},b=t=>{try{let e=atob(t.replace(/-/g,"+").replace(/_/g,"/")),o=JSON.parse(new TextDecoder().decode(Uint8Array.from(e,s=>s.charCodeAt(0))));return typeof o.accessToken!="string"||typeof o.refreshToken!="string"||typeof o.expiresAt!="number"||typeof o.userId!="string"?null:o}catch{return null}};function m(t,e,o={},s=!1){let c={...x,...o},g=async()=>new Map((await e.getAll()).map(n=>[n.name,n.value])),S=n=>n===t||n.startsWith(`${t}.`)&&/^\d+$/.test(n.slice(t.length+1)),h=async n=>{if(!e.setAll)return;let i=n===null?[]:n.length<=u?[[t,n]]:Array.from({length:Math.ceil(n.length/u)},(r,l)=>[`${t}.${l}`,n.slice(l*u,(l+1)*u)]),p=new Set(i.map(([r])=>r)),a=i.map(([r,l])=>({name:r,value:l,options:c}));for(let r of(await g()).keys())S(r)&&!p.has(r)&&a.push({name:r,value:"",options:{...c,maxAge:0}});a.length>0&&await e.setAll(a,{...C})};return{async load(){let n=await g(),i=n.get(t);if(i===void 0){let p="";for(let a=0;n.has(`${t}.${a}`);a++)p+=n.get(`${t}.${a}`);i=p}return i?b(i):null},save:n=>h(y(n)),clear:()=>h(null),shared:s}}function A(t){let{cookies:e,cookieOptions:o,...s}=t,c=t.refresh??(e.setAll?"before":"never");return f({...s,refresh:c,storage:m(d(t.publishableKey),e,o)})}function O(){let t=()=>{let e=globalThis.document;if(!e)throw new Error("documentCookies: there is no document here \u2014 a server gives its request's cookies to createServerClient");return e};return{getAll:()=>t().cookie.split(";").map(e=>e.trim()).filter(e=>e.includes("=")).map(e=>{let o=e.indexOf("=");return{name:e.slice(0,o),value:e.slice(o+1)}}),setAll(e){for(let o of e){let s=o.options,c=[`Path=${s.path??"/"}`,s.domain?`Domain=${s.domain}`:"",s.maxAge!==void 0?`Max-Age=${s.maxAge}`:"",s.expires?`Expires=${s.expires.toUTCString()}`:"",s.sameSite?`SameSite=${s.sameSite.charAt(0).toUpperCase()}${s.sameSite.slice(1)}`:"",s.secure?"Secure":""].filter(Boolean);t().cookie=[`${o.name}=${o.value}`,...c].join("; ")}}}}function $(t){let{cookieOptions:e,...o}=t,s=globalThis.location?.protocol==="https:";return f({...o,storage:m(d(t.publishableKey),O(),{secure:s,...e},!0)})}async function v(t){let e=await t.auth.currentSession();if(!e||(e.expiresAt-Date.now()<=k&&await t.auth.refreshSession().catch(()=>{}),!await t.auth.currentSession()))return null;try{return(await t.auth.api.verifyTokenUser()).data}catch(o){if(o.status===401)return null;throw o}}export{C as NO_STORE_HEADERS,x as SESSION_COOKIE_OPTIONS,m as cookieSessionStore,$ as createBrowserClient,A as createServerClient,O as documentCookies,v as keepSession,d as sessionCookieName};
1
+ /*! palbase 0.13.2 — Palbase SDK License (see LICENSE) */
2
+ import{q as f}from"../chunks/LDZ7OKNS.js";import"../chunks/ZT4AKS6D.js";import"../chunks/QCZJK4GZ.js";import"../chunks/JWLK6SLN.js";import"../chunks/NRWY25JZ.js";import"../chunks/B33QXIR5.js";import"../chunks/2DBSGJ7Z.js";import"../chunks/WAMYRYDY.js";import"../chunks/ZOF56QTG.js";import"../chunks/7ZSVOQFN.js";import"../chunks/DLQT5KPC.js";import"../chunks/22JG5QKQ.js";var C=Object.freeze({"Cache-Control":"private, no-cache, no-store, must-revalidate, max-age=0",Expires:"0",Pragma:"no-cache"}),x={path:"/",sameSite:"lax",secure:!0,httpOnly:!1,maxAge:400*24*60*60},u=3180,k=5*6e4;function d(t){let e=/^pb_([a-z0-9]+)_c/.exec(t)?.[1];if(e===void 0)throw new TypeError("publishableKey is the project publishable key (pb_<ref>_c\u2026)");return`pb-${e}-session`}var y=t=>{let e=new TextEncoder().encode(JSON.stringify(t)),o="";for(let s of e)o+=String.fromCharCode(s);return btoa(o).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},b=t=>{try{let e=atob(t.replace(/-/g,"+").replace(/_/g,"/")),o=JSON.parse(new TextDecoder().decode(Uint8Array.from(e,s=>s.charCodeAt(0))));return typeof o.accessToken!="string"||typeof o.refreshToken!="string"||typeof o.expiresAt!="number"||typeof o.userId!="string"?null:o}catch{return null}};function m(t,e,o={},s=!1){let c={...x,...o},g=async()=>new Map((await e.getAll()).map(n=>[n.name,n.value])),S=n=>n===t||n.startsWith(`${t}.`)&&/^\d+$/.test(n.slice(t.length+1)),h=async n=>{if(!e.setAll)return;let i=n===null?[]:n.length<=u?[[t,n]]:Array.from({length:Math.ceil(n.length/u)},(r,l)=>[`${t}.${l}`,n.slice(l*u,(l+1)*u)]),p=new Set(i.map(([r])=>r)),a=i.map(([r,l])=>({name:r,value:l,options:c}));for(let r of(await g()).keys())S(r)&&!p.has(r)&&a.push({name:r,value:"",options:{...c,maxAge:0}});a.length>0&&await e.setAll(a,{...C})};return{async load(){let n=await g(),i=n.get(t);if(i===void 0){let p="";for(let a=0;n.has(`${t}.${a}`);a++)p+=n.get(`${t}.${a}`);i=p}return i?b(i):null},save:n=>h(y(n)),clear:()=>h(null),shared:s}}function A(t){let{cookies:e,cookieOptions:o,...s}=t,c=t.refresh??(e.setAll?"before":"never");return f({...s,refresh:c,storage:m(d(t.publishableKey),e,o)})}function O(){let t=()=>{let e=globalThis.document;if(!e)throw new Error("documentCookies: there is no document here \u2014 a server gives its request's cookies to createServerClient");return e};return{getAll:()=>t().cookie.split(";").map(e=>e.trim()).filter(e=>e.includes("=")).map(e=>{let o=e.indexOf("=");return{name:e.slice(0,o),value:e.slice(o+1)}}),setAll(e){for(let o of e){let s=o.options,c=[`Path=${s.path??"/"}`,s.domain?`Domain=${s.domain}`:"",s.maxAge!==void 0?`Max-Age=${s.maxAge}`:"",s.expires?`Expires=${s.expires.toUTCString()}`:"",s.sameSite?`SameSite=${s.sameSite.charAt(0).toUpperCase()}${s.sameSite.slice(1)}`:"",s.secure?"Secure":""].filter(Boolean);t().cookie=[`${o.name}=${o.value}`,...c].join("; ")}}}}function $(t){let{cookieOptions:e,...o}=t,s=globalThis.location?.protocol==="https:";return f({...o,storage:m(d(t.publishableKey),O(),{secure:s,...e},!0)})}async function v(t){let e=await t.auth.currentSession();if(!e||(e.expiresAt-Date.now()<=k&&await t.auth.refreshSession().catch(()=>{}),!await t.auth.currentSession()))return null;try{return(await t.auth.api.verifyTokenUser()).data}catch(o){if(o.status===401)return null;throw o}}export{C as NO_STORE_HEADERS,x as SESSION_COOKIE_OPTIONS,m as cookieSessionStore,$ as createBrowserClient,A as createServerClient,O as documentCookies,v as keepSession,d as sessionCookieName};
package/dist/web/vite.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! palbase 0.11.2 — Palbase SDK License (see LICENSE) */
2
- import"../chunks/PF3S7VGN.js";import{execFile as $}from"node:child_process";import{existsSync as y,mkdtempSync as k,readFileSync as S,rmSync as x,writeFileSync as P}from"node:fs";import{createRequire as O}from"node:module";import{tmpdir as W}from"node:os";import{dirname as g,join as o,relative as u,resolve as v,sep as d}from"node:path";var E=/\.(?:ts|js|mts|mjs)$/;function F(n){if(!/^[a-z][a-z0-9-]*$/.test(n.app))throw new TypeError(`palbase({ app }): ${JSON.stringify(n.app)} is an app's slug (palbase apps:list)`);let c=process.cwd(),p="",i="",f=()=>v(c,n.dir??"palbase"),m=()=>{let e=n.environments[p];if(!e)throw new Error(`palbase: the mode "${p}" is not built against any environment \u2014 say which in vite.config: palbase({ environments: { ${JSON.stringify(p)}: '<environment slug>' } })`);return e};return{name:"palbase",enforce:"pre",config(e,s){p=s.mode,i=s.command??"";let r=e.build?.rollupOptions?.onwarn;return{build:{rollupOptions:{onwarn(t,a){let l=String(t.exporter??t.id??"");if(t.code==="MISSING_EXPORT"&&l.includes(`${d}environments${d}`))throw new Error(`palbase: ${t.message} \u2014 ${m()}'s backend has no such route (palbase apps:sync brings what it has)`);r?r(t,a):a(t)}}}}},configResolved(e){c=e.root,p=e.mode,i=e.command??i},async buildStart(){i!=="build"||n.typecheck===!1||await j(c,m(),n.tsconfig)},resolveId(e,s){if(!s)return null;let r=f();if(e==="palbase"||e.startsWith("palbase/")){let w=u(r,s);return w.startsWith("..")||w===""?null:this.resolve(e,o(c,"index.html"),{skipSelf:!0})}if(!(e.startsWith(".")||e.startsWith("/")))return null;let t=v(g(s),e);if(E.test(t)||(t+=".ts"),g(t)!==r&&g(t)!==o(r,"palbe"))return null;let a=u(r,t),l=`${n.app}.ts`;if(a!==l&&!a.startsWith(`palbe${d}`))return null;let h=m(),b=o(r,"environments",h,a===l?l:o("palbe",a.slice(`palbe${d}`.length)));if(!y(b))throw new Error(`palbase: ${u(c,b)} is not there \u2014 palbase apps:sync writes it (is ${n.app} set in ${h}, and has ${h} that machine?)`);return b}}}async function j(n,c,p){let i=p?v(n,p):["tsconfig.app.json","tsconfig.json"].map(e=>o(n,e)).find(y);if(!i)return;if(!y(i))throw new Error(`palbase({ tsconfig }): ${u(n,i)} is not there`);let f;try{let e=O(o(n,"package.json")).resolve("typescript/package.json"),s=JSON.parse(S(e,"utf8")).bin?.tsc;if(!s)throw new Error("no tsc");f=o(g(e),s)}catch{throw new Error("palbase: the build type-checks the app against its environment with the app's TypeScript, and the app has none (npm i -D typescript) \u2014 or say palbase({ typecheck: false })")}let m=k(o(W(),"palbase-typecheck-"));try{let e=o(m,"tsconfig.json");P(e,JSON.stringify({extends:i,compilerOptions:{noEmit:!0,composite:!1,incremental:!1,moduleSuffixes:[`.${c}`,""]}}));let s=await new Promise(r=>$(process.execPath,[f,"-p",e,"--pretty","false"],{cwd:n,maxBuffer:16<<20},(t,a,l)=>r({code:t?typeof t.code=="number"?t.code:1:0,text:`${a}${l}`.trim()})));if(s.code!==0)throw new Error(`palbase: the app does not type-check against ${c}, the environment this build is made for \u2014 a route its backend does not have, or a call that does not fit it:
1
+ /*! palbase 0.13.2 — Palbase SDK License (see LICENSE) */
2
+ import"../chunks/22JG5QKQ.js";import{execFile as $}from"node:child_process";import{existsSync as y,mkdtempSync as k,readFileSync as S,rmSync as x,writeFileSync as P}from"node:fs";import{createRequire as O}from"node:module";import{tmpdir as W}from"node:os";import{dirname as g,join as o,relative as u,resolve as v,sep as d}from"node:path";var E=/\.(?:ts|js|mts|mjs)$/;function F(n){if(!/^[a-z][a-z0-9-]*$/.test(n.app))throw new TypeError(`palbase({ app }): ${JSON.stringify(n.app)} is an app's slug (palbase apps:list)`);let c=process.cwd(),p="",i="",f=()=>v(c,n.dir??"palbase"),m=()=>{let e=n.environments[p];if(!e)throw new Error(`palbase: the mode "${p}" is not built against any environment \u2014 say which in vite.config: palbase({ environments: { ${JSON.stringify(p)}: '<environment slug>' } })`);return e};return{name:"palbase",enforce:"pre",config(e,s){p=s.mode,i=s.command??"";let r=e.build?.rollupOptions?.onwarn;return{build:{rollupOptions:{onwarn(t,a){let l=String(t.exporter??t.id??"");if(t.code==="MISSING_EXPORT"&&l.includes(`${d}environments${d}`))throw new Error(`palbase: ${t.message} \u2014 ${m()}'s backend has no such route (palbase apps:sync brings what it has)`);r?r(t,a):a(t)}}}}},configResolved(e){c=e.root,p=e.mode,i=e.command??i},async buildStart(){i!=="build"||n.typecheck===!1||await j(c,m(),n.tsconfig)},resolveId(e,s){if(!s)return null;let r=f();if(e==="palbase"||e.startsWith("palbase/")){let w=u(r,s);return w.startsWith("..")||w===""?null:this.resolve(e,o(c,"index.html"),{skipSelf:!0})}if(!(e.startsWith(".")||e.startsWith("/")))return null;let t=v(g(s),e);if(E.test(t)||(t+=".ts"),g(t)!==r&&g(t)!==o(r,"palbe"))return null;let a=u(r,t),l=`${n.app}.ts`;if(a!==l&&!a.startsWith(`palbe${d}`))return null;let h=m(),b=o(r,"environments",h,a===l?l:o("palbe",a.slice(`palbe${d}`.length)));if(!y(b))throw new Error(`palbase: ${u(c,b)} is not there \u2014 palbase apps:sync writes it (is ${n.app} set in ${h}, and has ${h} that machine?)`);return b}}}async function j(n,c,p){let i=p?v(n,p):["tsconfig.app.json","tsconfig.json"].map(e=>o(n,e)).find(y);if(!i)return;if(!y(i))throw new Error(`palbase({ tsconfig }): ${u(n,i)} is not there`);let f;try{let e=O(o(n,"package.json")).resolve("typescript/package.json"),s=JSON.parse(S(e,"utf8")).bin?.tsc;if(!s)throw new Error("no tsc");f=o(g(e),s)}catch{throw new Error("palbase: the build type-checks the app against its environment with the app's TypeScript, and the app has none (npm i -D typescript) \u2014 or say palbase({ typecheck: false })")}let m=k(o(W(),"palbase-typecheck-"));try{let e=o(m,"tsconfig.json");P(e,JSON.stringify({extends:i,compilerOptions:{noEmit:!0,composite:!1,incremental:!1,moduleSuffixes:[`.${c}`,""]}}));let s=await new Promise(r=>$(process.execPath,[f,"-p",e,"--pretty","false"],{cwd:n,maxBuffer:16<<20},(t,a,l)=>r({code:t?typeof t.code=="number"?t.code:1:0,text:`${a}${l}`.trim()})));if(s.code!==0)throw new Error(`palbase: the app does not type-check against ${c}, the environment this build is made for \u2014 a route its backend does not have, or a call that does not fit it:
3
3
  ${s.text}`)}finally{x(m,{recursive:!0,force:!0})}}export{F as palbase};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "palbase",
3
- "version": "0.11.2",
3
+ "version": "0.13.2",
4
4
  "description": "Palbase for JavaScript: the web client (palbase/web), the server SDK (palbase/server), the backend framework (palbase/backend), AI (palbase/ai) and the CLI (npx palbase).",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "homepage": "https://palbase.studio",
@@ -135,7 +135,7 @@
135
135
  "dependencies": {
136
136
  "@types/node": "26.6.4",
137
137
  "bun-types": "1.4.2",
138
- "palgres": "0.11.2",
138
+ "palgres": "0.13.2",
139
139
  "reflect-metadata": "^0.2.2",
140
140
  "typescript": "~6.0.3",
141
141
  "zod": "^4.6.5"
@@ -406,6 +406,13 @@ export interface StartVoice {
406
406
  delegation?: 'chat' | 'events';
407
407
  /** The member the server starts it for: the voice is theirs (they read, tell and close it), and counts toward their starts (5 an hour). */
408
408
  as?: string;
409
+ /**
410
+ * How the voice speaks, after the chat's agent's own instructions; the server's alone. Given here, the voice speaks so
411
+ * from its first second — told after the start (command instruct), it talks without them until they are in.
412
+ */
413
+ instructions?: string;
414
+ /** What the voice knows as the talk opens, after the instructions; the server's alone. With instructions, at most 48 KiB. */
415
+ context?: string;
409
416
  signal?: AbortSignal;
410
417
  }
411
418
  export interface VoiceCommand {
@@ -25,3 +25,4 @@ export { t, type StringsTable } from './i18n.js';
25
25
  export { AuthUnavailable, TokenError, TokenVerifier, type SessionStanding, type TokenRefusal, type TokenUser } from '../../server/src/index.js';
26
26
  export { EVENT_TYPES, PalbaseError, type EventType, type PalbaseEvent, type PlatformEvent, type PlatformEvents, type WebhookEvent } from '../../server/src/index.js';
27
27
  export { z } from 'zod';
28
+ export { encrypt, encrypted, type Encrypted } from './transit.js';
@@ -0,0 +1,39 @@
1
+ import type { StandardSchemaV1 } from './decorators.js';
2
+ /**
3
+ * schema, marked: the field it validates comes encrypted, opened before it is
4
+ * validated — the handler reads the plain value. A zod schema: z.string(),
5
+ * z.number(), z.object(…). The contract says so (x-palbase-encrypted), and the
6
+ * app's generated clients seal it.
7
+ */
8
+ export declare function encrypted<S extends StandardSchemaV1>(schema: S): S;
9
+ declare const encryptedValue: unique symbol;
10
+ /** A value a handler answers encrypted: encrypt(value). Its clients read the value. */
11
+ export interface Encrypted<T> {
12
+ readonly [encryptedValue]: T;
13
+ }
14
+ /**
15
+ * value, answered encrypted: sealed with the request's key in the answer a
16
+ * route sends, opened by the app's generated client. The contract marks it.
17
+ */
18
+ export declare function encrypt<T>(value: T): Encrypted<T>;
19
+ /** How many encrypt() values were made in this process: an answer made while none was has none. */
20
+ export declare function encryptValuesMade(): number;
21
+ /**
22
+ * An answer's encrypt() values: the answer with each one's value in its place,
23
+ * and their pointers ("/response/patient/tc", an array's item by its index).
24
+ */
25
+ export declare function answerFields(value: unknown): {
26
+ value: unknown;
27
+ pointers: string[];
28
+ };
29
+ /**
30
+ * The places a JSON schema marks encrypted below root ("/body", "/query"):
31
+ * "/body/patient/tc", "/body/items/*\/tc" for every item of an array. A field
32
+ * is marked by name: a mark under a record's any key is refused.
33
+ */
34
+ export declare function marksOf(schema: unknown, root: string, where: string): string[];
35
+ /** A schema's JSON Schema, as the contract converts it (openapi.ts): what its marks are read from. */
36
+ export declare function jsonSchemaOfSchema(schema: StandardSchemaV1): unknown;
37
+ /** Whether a JSON value holds a mark anywhere: what a schema that may not carry one is checked for. */
38
+ export declare function holdsMark(jsonSchema: unknown): boolean;
39
+ export {};
@@ -2186,10 +2186,18 @@ export type VoiceRequest = {
2186
2186
  * The member the server starts it for (the server's alone): the voice is theirs, and counts toward their starts.
2187
2187
  */
2188
2188
  as?: string;
2189
+ /**
2190
+ * What the voice knows as the talk opens (the server's alone), after the instructions. Given with the start, it is in the voice's instructions from its first second. Instructions and context are at most 48 KiB together.
2191
+ */
2192
+ context?: string;
2189
2193
  /**
2190
2194
  * What becomes of what the person asks for out loud: chat (the default) — a message of the voice's member to the chat's agent, a turn of the chat, whose answer the voice says back; events — the event ai.voice.delegated, for the project's backend to have done and answer with speak (its delegation_id).
2191
2195
  */
2192
2196
  delegation?: "chat" | "events";
2197
+ /**
2198
+ * How the voice speaks (the server's alone), after the chat's agent's own instructions. Given with the start, the voice speaks so from its first second — told after it (instruct), it talks without them until they are in. Instructions and context are at most 48 KiB together.
2199
+ */
2200
+ instructions?: string;
2193
2201
  /**
2194
2202
  * The app's WebRTC offer (an SDP).
2195
2203
  */
@@ -327,7 +327,7 @@ export type AppleTransactionReport = {
327
327
  */
328
328
  device_verification_id?: string;
329
329
  /**
330
- * The customer asked to restore their purchases: each purchase moves to them from the customer that has it — only with a transaction StoreKit signed for this device (`device_verification_id`), never an account's by a guest's restore, and one purchase 3 times in 30 days at most; one that stays is answered (403, 409) once the rest is applied. Without it (false, the default), a purchase another customer has stays theirs.
330
+ * The customer asked to restore their purchases: each purchase moves to them from the customer that has it — only with a transaction StoreKit signed for this device (`device_verification_id`), never an account's by a guest's restore, and one purchase 3 times in 30 days at most, with the new purchases that moved it; one that stays is answered (403, 409) once the rest is applied. Without it (false, the default), a purchase another customer has stays theirs — unless a new purchase on it carries another customer's appAccountToken, which moves it to its buyer.
331
331
  */
332
332
  restore?: boolean;
333
333
  /**
@@ -344,7 +344,7 @@ export type GooglePurchaseReport = {
344
344
  */
345
345
  purchases: GoogleReported[];
346
346
  /**
347
- * The customer asked to restore their purchases: each moves to them from the customer that has it — never an account's by a guest's restore, and one purchase 3 times in 30 days at most; one that stays is answered (403, 409) once the rest is applied. Without it, a purchase another customer has stays theirs.
347
+ * The customer asked to restore their purchases: each moves to them from the customer that has it — never an account's by a guest's restore, and one purchase 3 times in 30 days at most, with the new purchases that moved it; one that stays is answered (403, 409) once the rest is applied. Without it, a purchase another customer has stays theirs — unless a new purchase on it names another customer in its obfuscated account id, which moves it to its buyer.
348
348
  */
349
349
  restore?: boolean;
350
350
  };
@@ -1510,6 +1510,53 @@ export type CustomerInfo = {
1510
1510
  */
1511
1511
  subscriptions: SubscriptionInfo[];
1512
1512
  };
1513
+ /**
1514
+ * What the project's backend reads of a customer: what they have, as GET /purchases/me answers it to them, and the moves of their purchases to and from other customers — which the customer never reads.
1515
+ */
1516
+ export type CustomerRecord = {
1517
+ /**
1518
+ * Their balance in every credit they have one in.
1519
+ */
1520
+ credits: CreditBalance[];
1521
+ /**
1522
+ * The customer: the user's id.
1523
+ */
1524
+ customer_id: string;
1525
+ /**
1526
+ * Every entitlement the customer has or had, by key.
1527
+ */
1528
+ entitlements: {
1529
+ [key: string]: EntitlementInfo;
1530
+ };
1531
+ /**
1532
+ * Whether the user is a guest (anonymous): what a guest buys moves to the account it signs in to.
1533
+ */
1534
+ guest: boolean;
1535
+ /**
1536
+ * Their use of every limit of the catalog.
1537
+ */
1538
+ limits: LimitUse[];
1539
+ /**
1540
+ * Their one-time purchases, oldest first.
1541
+ */
1542
+ purchases: PurchaseInfo[];
1543
+ /**
1544
+ * The time it was computed at: what was active is as of then.
1545
+ */
1546
+ requested_at: string;
1547
+ /**
1548
+ * Rises with every change of what the customer has (0: nothing yet). The customer's apps join the realtime channel `purchases:<project ref>:<user id>` — theirs alone, read-only — whose state and `changed` broadcast carry `{"revision": N}`: a revision above the one read means reading GET /purchases/me again. `purchases.customer.changed` carries it to the project's webhooks.
1549
+ */
1550
+ revision: number;
1551
+ /**
1552
+ * Their subscriptions and non-renewing periods, oldest first.
1553
+ */
1554
+ subscriptions: SubscriptionInfo[];
1555
+ /**
1556
+ * The moves of their purchases to and from other customers, newest first (the latest 100): a restore, a new purchase made on a store account they share, a guest's merge into its account — as purchases.ownership.transferred told each.
1557
+ */
1558
+ transfers: OwnershipTransfer[];
1559
+ };
1513
1560
  /**
1514
1561
  * purchases.customer.merged: a guest's purchases, grants, credits and quota use went to the account it signed in to; the guest's id points to the account from then on.
1515
1562
  */
@@ -2150,7 +2197,40 @@ export type OverflowReceipt = {
2150
2197
  units: number;
2151
2198
  };
2152
2199
  /**
2153
- * purchases.ownership.transferred: a purchase moved from one customer to another: the second restored the App Store purchases of the Apple ID it was made with.
2200
+ * One move of a purchase between two customers.
2201
+ */
2202
+ export type OwnershipTransfer = {
2203
+ /**
2204
+ * When it moved.
2205
+ */
2206
+ at: string;
2207
+ /**
2208
+ * The purchase's id in the ledger (a subscription's every renewal is one).
2209
+ */
2210
+ chain_id: string;
2211
+ /**
2212
+ * Who had it.
2213
+ */
2214
+ from_customer_id: string | null;
2215
+ /**
2216
+ * The catalog's product; empty when unmapped.
2217
+ */
2218
+ product: string;
2219
+ /**
2220
+ * Where it was bought.
2221
+ */
2222
+ store: "app_store" | "play_store" | "stripe";
2223
+ /**
2224
+ * Who has it since.
2225
+ */
2226
+ to_customer_id: string;
2227
+ /**
2228
+ * How: restore — the second restored it; purchase — the second bought on it anew, on a store account the two share; merge — a guest's purchases went to the account it signed in to; assign — set by hand.
2229
+ */
2230
+ via: "restore" | "purchase" | "merge" | "assign";
2231
+ };
2232
+ /**
2233
+ * purchases.ownership.transferred: a purchase moved from one customer to another: the second restored the store purchases of the account it was made with, or bought on it anew — its token naming them — on a store account the two share.
2154
2234
  */
2155
2235
  export type OwnershipTransferredEvent = {
2156
2236
  /**
@@ -2174,9 +2254,9 @@ export type OwnershipTransferredEvent = {
2174
2254
  */
2175
2255
  to_customer_id: string;
2176
2256
  /**
2177
- * How.
2257
+ * How: restore — the second restored it; purchase — the second bought on it anew.
2178
2258
  */
2179
- via: "restore";
2259
+ via: "restore" | "purchase";
2180
2260
  };
2181
2261
  /**
2182
2262
  * A paywall as Studio edits it: its draft, and what was published of it.
@@ -5492,7 +5572,7 @@ export type Offers = {
5492
5572
  offers: OfferView[];
5493
5573
  };
5494
5574
  /**
5495
- * Which subscription the signature is for, in which app, where StoreKit runs.
5575
+ * Which subscription the signature is for, in which app, where StoreKit runs, for which Apple account.
5496
5576
  */
5497
5577
  export type AppleOfferRequest = {
5498
5578
  /**
@@ -5507,6 +5587,10 @@ export type AppleOfferRequest = {
5507
5587
  * xcode for a StoreKit configuration on a developer's Mac (signed with its Subscription Offers Key); otherwise the App Store's.
5508
5588
  */
5509
5589
  environment?: string;
5590
+ /**
5591
+ * A transaction of the subscription's group as StoreKit signed it on the device (jwsRepresentation; the SDKs send the newest): the Apple account the offer is sold to — whoever Palbase has its subscription as, another of the app's accounts on a shared Apple ID too. Without it, the customer's own newest App Store subscription names it.
5592
+ */
5593
+ transaction?: string;
5510
5594
  };
5511
5595
  /**
5512
5596
  * What StoreKit buys the promotional offer with, for this customer's purchases and their Apple account: Apple's subscription offer signature.
@@ -5888,7 +5972,7 @@ export interface Events {
5888
5972
  */
5889
5973
  "purchases.entitlement.changed": EntitlementChangedEvent;
5890
5974
  /**
5891
- * purchases.ownership.transferred: a purchase moved from one customer to another: the second restored the App Store purchases of the Apple ID it was made with.
5975
+ * purchases.ownership.transferred: a purchase moved from one customer to another: the second restored the store purchases of the account it was made with, or bought on it anew — its token naming them — on a store account the two share.
5892
5976
  */
5893
5977
  "purchases.ownership.transferred": OwnershipTransferredEvent;
5894
5978
  /**
@@ -5996,7 +6080,7 @@ export declare function client(t: Transport): {
5996
6080
  /**
5997
6081
  * Report what StoreKit gave the app
5998
6082
  *
5999
- * The signed-in customer's app — a guest's too: a guest buys in the app — reports the transactions StoreKit gave it: a purchase just made, Transaction.updates, or on a restore every one of currentEntitlements. Each is verified as the App Store signed it for the connected app, of the sandbox or production; with an Xcode certificate set, one Xcode signed with it on the developer's Mac (StoreKit Testing, environment Xcode, for one of the environment's iOS apps) is taken too — a test purchase, the sandbox's, gated by `sandbox_access` as the sandbox's are, of which nothing is asked of Apple — key connected or not. One that is neither refuses the report, naming it. A subscription's state is not taken from the device: it is read from Apple with the project's own key (Get All Subscription Statuses). Whose a purchase is: one nobody has becomes the customer's its appAccountToken names, or the reporter's; one another customer has stays theirs — unless `restore` from the device StoreKit signed its transaction for (`device_verification_id`), which moves it to the reporter (an account's is never taken by a guest's restore, and one purchase moves 3 times in 30 days at most). A restore that leaves a purchase where it was answers why once the rest of the report is applied (403 `restore_not_this_device`, 403 `restore_account_owned`, 409 `restore_limit`). Apple is asked of a subscription once however many copies of it the report holds. A guest that signed in to an account reports for the account: what StoreKit gave it is the account's, and the answer is the account's. Sent again, a report applies nothing twice. Answers what the customer has now, as GET /purchases/me. Emits what a purchase changed — `purchases.purchase.completed`, `purchases.subscription.changed`, `purchases.entitlement.changed`, `purchases.ownership.transferred` on a move, credits' events — and `purchases.customer.changed`.
6083
+ * The signed-in customer's app — a guest's too: a guest buys in the app — reports the transactions StoreKit gave it: a purchase just made, Transaction.updates, or on a restore every one of currentEntitlements. Each is verified as the App Store signed it for the connected app, of the sandbox or production; with an Xcode certificate set, one Xcode signed with it on the developer's Mac (StoreKit Testing, environment Xcode, for one of the environment's iOS apps) is taken too — a test purchase, the sandbox's, gated by `sandbox_access` as the sandbox's are, of which nothing is asked of Apple — key connected or not. One that is neither refuses the report, naming it. A subscription's state is not taken from the device: it is read from Apple with the project's own key (Get All Subscription Statuses). Whose a purchase is: one nobody has becomes the customer's its appAccountToken names, or the reporter's; one another customer has stays theirs — unless a new purchase on it (a switch of plan, a resubscription, an offer bought: a transaction new to Palbase that is no renewal, the newest bought of it) carries another customer's appAccountToken, which moves it to that customer, who paid, whoever reports it (an Apple ID shared among the app's accounts); or `restore` from the device StoreKit signed its transaction for (`device_verification_id`), which moves it to the reporter (an account's is never taken by a guest's restore). One purchase moves 3 times in 30 days at most, restores and new purchases counted together. A restore, or the reporter's own new purchase, that leaves a purchase where it was answers why once the rest of the report is applied (403 `restore_not_this_device`, 403 `restore_account_owned`, 409 `restore_limit`). Apple is asked of a subscription once however many copies of it the report holds. A guest that signed in to an account reports for the account: what StoreKit gave it is the account's, and the answer is the account's. Sent again, a report applies nothing twice. Answers what the customer has now, as GET /purchases/me. Emits what a purchase changed — `purchases.purchase.completed`, `purchases.subscription.changed`, `purchases.entitlement.changed`, `purchases.ownership.transferred` on a move, credits' events — and `purchases.customer.changed`.
6000
6084
  */
6001
6085
  reportAppleTransactions(input: {
6002
6086
  body: AppleTransactionReport; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
@@ -6013,7 +6097,7 @@ export declare function client(t: Transport): {
6013
6097
  /**
6014
6098
  * Report Play Billing's purchases
6015
6099
  *
6016
- * The signed-in customer's app — a guest's too: a guest buys in the app — reports the purchases Play Billing gave it: one just made, or on a restore every one queryPurchasesAsync returns. Nothing of the device's word is taken: each is read from Play by its token, as the project's Play connection account, and applied to the ledger. Whose a purchase is: one nobody has becomes the customer's its obfuscated account id names, or the reporter's; one another customer has stays theirs — unless `restore`, which moves it to the reporter (an account's is never taken by a guest's restore, and one purchase moves 3 times in 30 days at most); one that stays is answered once the rest is applied (403 `restore_account_owned`, 409 `restore_limit`). A purchase the catalog maps is acknowledged — a consumable's consumed — once the ledger has it (Play refunds one not acknowledged in three days); one it does not map gives nothing and is not acknowledged.
6100
+ * The signed-in customer's app — a guest's too: a guest buys in the app — reports the purchases Play Billing gave it: one just made, or on a restore every one queryPurchasesAsync returns. Nothing of the device's word is taken: each is read from Play by its token, as the project's Play connection account, and applied to the ledger. Whose a purchase is: one nobody has becomes the customer's its obfuscated account id names, or the reporter's; one another customer has stays theirs — unless a new purchase on it (no renewal) names another customer in its obfuscated account id, which moves it to them, who paid; or `restore`, which moves it to the reporter (an account's is never taken by a guest's restore). One purchase moves 3 times in 30 days at most, restores and new purchases counted together; one that stays is answered once the rest is applied (403 `restore_account_owned`, 409 `restore_limit`). A purchase the catalog maps is acknowledged — a consumable's consumed — once the ledger has it (Play refunds one not acknowledged in three days); one it does not map gives nothing and is not acknowledged.
6017
6101
  */
6018
6102
  reportGooglePurchases(input: {
6019
6103
  body: GooglePurchaseReport; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
@@ -6253,14 +6337,14 @@ export declare function client(t: Transport): {
6253
6337
  /**
6254
6338
  * Read a customer
6255
6339
  *
6256
- * What a customer has, as GET /purchases/me answers it to them, for the project's backend. A guest merged into an account answers the account's. A user never seen here has nothing yet but the free tier of every quota; the read writes nothing — they become a customer when something is theirs.
6340
+ * What a customer has, as GET /purchases/me answers it to them, for the project's backend — and the moves of their purchases to and from other customers (`transfers`), which the customer never reads. A guest merged into an account answers the account's. A user never seen here has nothing yet but the free tier of every quota; the read writes nothing — they become a customer when something is theirs.
6257
6341
  */
6258
6342
  getCustomer(input: {
6259
6343
  path: {
6260
6344
  customer_id: string;
6261
6345
  }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
6262
6346
  signal?: AbortSignal;
6263
- }): Promise<Reply<200, CustomerInfo>>;
6347
+ }): Promise<Reply<200, CustomerRecord>>;
6264
6348
  /**
6265
6349
  * Grant credits
6266
6350
  *
@@ -146,7 +146,7 @@ export type Secret = {
146
146
  * One read or write of the project's secrets.
147
147
  */
148
148
  export type SecretAuditEntry = {
149
- action: "list" | "read" | "read_all" | "write" | "rollback" | "delete" | "versions" | "field_keys_list" | "field_keys_read" | "field_keys_rotate" | "field_open" | "field_placeholder";
149
+ action: "list" | "read" | "read_all" | "write" | "rollback" | "delete" | "versions" | "field_keys_list" | "field_keys_read" | "field_keys_rotate" | "field_open" | "field_placeholder" | "transit_keys_list" | "transit_keys_read" | "transit_keys_rotate" | "transit_key_retire";
150
150
  /**
151
151
  * When it happened.
152
152
  */
@@ -244,6 +244,100 @@ export type SecretWrite = {
244
244
  */
245
245
  value: string;
246
246
  };
247
+ /**
248
+ * A transit key with its private half.
249
+ */
250
+ export type TransitKey = {
251
+ /**
252
+ * The key's id (t1, t2, …).
253
+ */
254
+ id: string;
255
+ /**
256
+ * The 32-byte X25519 private key, base64url without padding.
257
+ */
258
+ key: string;
259
+ };
260
+ /**
261
+ * One of the project's transit keys, without its private half.
262
+ */
263
+ export type TransitKeyInfo = {
264
+ created_at: string;
265
+ /**
266
+ * Who made it: a key's id, a developer's, or the first read's.
267
+ */
268
+ created_by: string;
269
+ /**
270
+ * The key's id (t1, t2, …).
271
+ */
272
+ id: string;
273
+ /**
274
+ * Its 32-byte X25519 public key, base64url without padding: what a developer's tool (palbase machines:call, Studio's Try it) seals a request's fields to. An app reads them signed (GET /secrets/transit/public).
275
+ */
276
+ public_key: string;
277
+ /**
278
+ * When it was retired: no request sealed to it opens from then on, and no app is told to seal to it.
279
+ */
280
+ retired_at?: string;
281
+ /**
282
+ * Who retired it.
283
+ */
284
+ retired_by?: string;
285
+ };
286
+ /**
287
+ * The project's transit keys, oldest first, the one its apps seal to now, and the public half of the key the list they fetch is signed with — what palbase apps:sync puts in an app's generated client.
288
+ */
289
+ export type TransitKeyList = {
290
+ /**
291
+ * The key apps seal to now: the newest not retired.
292
+ */
293
+ current: string;
294
+ keys: TransitKeyInfo[];
295
+ /**
296
+ * The Ed25519 public key the list of public keys is signed with, base64url without padding.
297
+ */
298
+ signer: string;
299
+ /**
300
+ * Its id (s1).
301
+ */
302
+ signer_id: string;
303
+ };
304
+ /**
305
+ * What the project's backend opens its requests with: every key not retired, newest first, the retired ones by id — a request sealed to one is told to fetch the list again — and the project's id, which a request's key is sealed for.
306
+ */
307
+ export type TransitKeys = {
308
+ keys: TransitKey[];
309
+ /**
310
+ * The project's id: what a request's key is sealed for, with the method and the route.
311
+ */
312
+ project: string;
313
+ retired: string[];
314
+ };
315
+ /**
316
+ * The public halves of the project's keys not retired, newest first, signed: an app verifies the signature with the key its generated client holds, that the list is its project's and that it carries the nonce it asked with, before it seals to the first key. The list's JSON: {v: 1, project, issued_at, nonce, keys: [{kid, key}]}, each key an X25519 public key, base64url without padding.
317
+ */
318
+ export type TransitPublicKeys = {
319
+ /**
320
+ * The list's JSON, base64url without padding: what the signature covers, byte for byte.
321
+ */
322
+ payload: string;
323
+ /**
324
+ * Ed25519 over the payload's bytes, base64url without padding.
325
+ */
326
+ signature: string;
327
+ /**
328
+ * The id of the key that signed it (s1).
329
+ */
330
+ signer: string;
331
+ };
332
+ /**
333
+ * A rotation of the transit keys.
334
+ */
335
+ export type TransitRotate = {
336
+ /**
337
+ * Retires every older key at once — when one may have been taken: the apps that sealed to one are told so, fetch the list again and seal to the new key.
338
+ */
339
+ retire_previous?: boolean;
340
+ };
247
341
  /** Palbase Secrets */
248
342
  export declare function client(t: Transport): {
249
343
  /**
@@ -305,6 +399,59 @@ export declare function client(t: Transport): {
305
399
  }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
306
400
  signal?: AbortSignal;
307
401
  }): Promise<Reply<200, FieldKeyList>>;
402
+ /**
403
+ * List the transit keys
404
+ *
405
+ * The project's transit keys, never a key, and the public half of the key that signs the list its apps fetch — what palbase apps:sync puts in an app's generated client. The first key is made on the first read. Recorded in the audit trail.
406
+ */
407
+ listTransitKeys(input?: {
408
+ signal?: AbortSignal;
409
+ }): Promise<Reply<200, TransitKeyList>>;
410
+ /**
411
+ * Read the transit keys
412
+ *
413
+ * The private halves of the project's keys not retired, and the retired ones by id: what its backend reads at startup, every minute after, and when a request names a key it does not hold (palbase/server's `transit`). A developer reads them only as the project's owner. A backend's reads are recorded in the audit trail once an hour, a developer's each time.
414
+ */
415
+ getTransitKeys(input?: {
416
+ signal?: AbortSignal;
417
+ }): Promise<Reply<200, TransitKeys>>;
418
+ /**
419
+ * Read the public transit keys
420
+ *
421
+ * The public halves of the project's keys not retired, newest first, signed with the project's signing key: what an app seals the fields of a request to its backend to. Any of the project's keys reads it — an app with its publishable key. Nothing in it is secret.
422
+ */
423
+ getTransitPublicKeys(input: {
424
+ query: {
425
+ nonce: string;
426
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
427
+ signal?: AbortSignal;
428
+ }): Promise<Reply<200, TransitPublicKeys>>;
429
+ /**
430
+ * Rotate the transit keys
431
+ *
432
+ * Makes a new transit key, sealed to at once: a backend that meets a key it does not hold fetches the keys again, and an app fetches the list again when told its key is retired. With retire_previous every older key is retired with it — when one may have been taken. A developer rotates as the project's owner or an admin. Recorded in the audit trail.
433
+ */
434
+ rotateTransitKeys(input?: {
435
+ headers?: {
436
+ "Idempotency-Key"?: string;
437
+ };
438
+ body?: TransitRotate; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
439
+ signal?: AbortSignal;
440
+ }): Promise<Reply<200, TransitKeyList>>;
441
+ /**
442
+ * Retire a transit key
443
+ *
444
+ * Retires a key that is not the one apps seal to now: no request sealed to it opens from then on, and the apps that sealed to it fetch the list again. The key in use is retired by a rotation with retire_previous (409 key_in_use). A developer retires as the project's owner or an admin. Recorded in the audit trail.
445
+ */
446
+ retireTransitKey(input: {
447
+ path: {
448
+ kid: string;
449
+ };
450
+ headers?: {
451
+ "Idempotency-Key"?: string;
452
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
453
+ signal?: AbortSignal;
454
+ }): Promise<Reply<200, TransitKeyList>>;
308
455
  /**
309
456
  * List an environment's secrets
310
457
  *