palbase 0.65.0 → 0.68.0

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 (111) hide show
  1. package/README.md +3 -2
  2. package/dist/ai/index.js +2 -2
  3. package/dist/ai-sdk/index.js +4 -0
  4. package/dist/backend/engine.js +2 -2
  5. package/dist/backend/env.js +1 -1
  6. package/dist/backend/index.js +8 -8
  7. package/dist/backend/stack.js +1 -1
  8. package/dist/backend/test.js +2 -2
  9. package/dist/chunks/{YP3QTS4L.js → 22GRHCVI.js} +1 -1
  10. package/dist/chunks/{CZGZTOK7.js → 2ZHSNWVZ.js} +2 -2
  11. package/dist/chunks/3OP3YJ63.js +22 -0
  12. package/dist/chunks/{5HMDOBEH.js → 4YV35XDP.js} +2 -2
  13. package/dist/chunks/5ZXXBM6L.js +18 -0
  14. package/dist/chunks/{KZZ3Y3DC.js → 622BI7EV.js} +1 -1
  15. package/dist/chunks/65QZXK2S.js +2 -0
  16. package/dist/chunks/{ZF3WKPVM.js → 7SGTDHXJ.js} +2 -2
  17. package/dist/chunks/D6EUPFUR.js +2 -0
  18. package/dist/chunks/EGWQ3EJE.js +21 -0
  19. package/dist/chunks/{ARRJICH3.js → EJAGO6ZV.js} +2 -2
  20. package/dist/chunks/{6GRY63N6.js → F4B6ELAN.js} +2 -2
  21. package/dist/chunks/IZWB7FGX.js +6 -0
  22. package/dist/chunks/{G2JBUBZO.js → J7WJF7F4.js} +2 -2
  23. package/dist/chunks/{DFX37NU3.js → LUUXXMXH.js} +1 -1
  24. package/dist/chunks/MVY4K43S.js +13 -0
  25. package/dist/chunks/{JHM7GTPD.js → OWLXCD3D.js} +1 -1
  26. package/dist/chunks/PP7MW4OT.js +2 -0
  27. package/dist/chunks/{DLMWZYLL.js → QFZ4GCJH.js} +2 -2
  28. package/dist/chunks/QQUIM4VK.js +2 -0
  29. package/dist/chunks/UJLFALKX.js +2 -0
  30. package/dist/chunks/{TEF7WS37.js → XJLAH42O.js} +1 -1
  31. package/dist/chunks/{XSOQNHZ5.js → XU4G5W72.js} +1 -1
  32. package/dist/chunks/YCDAV3WO.js +2 -0
  33. package/dist/cli.js +351 -364
  34. package/dist/cloud/index.js +2 -2
  35. package/dist/refuse/ai-sdk.js +2 -0
  36. package/dist/refuse/ai.js +1 -1
  37. package/dist/refuse/backend.js +1 -1
  38. package/dist/refuse/cloud.js +1 -1
  39. package/dist/refuse/server.js +1 -1
  40. package/dist/server/index.js +2 -2
  41. package/dist/server/testing.js +2 -2
  42. package/dist/web/index.js +2 -2
  43. package/dist/web/message.js +2 -2
  44. package/dist/web/palbe.js +2 -2
  45. package/dist/web/payments-ui.js +264 -0
  46. package/dist/web/paywall.js +2 -2
  47. package/dist/web/push-sw.js +1 -1
  48. package/dist/web/ssr.js +2 -2
  49. package/dist/web/vite.js +4 -3
  50. package/package.json +19 -2
  51. package/types/ai/src/ai.d.ts +55 -29
  52. package/types/ai/src/chats.d.ts +163 -171
  53. package/types/ai/src/index.d.ts +5 -5
  54. package/types/ai/src/pools.d.ts +17 -7
  55. package/types/ai/src/tools.d.ts +6 -64
  56. package/types/ai-sdk/src/index.d.ts +166 -0
  57. package/types/backend/src/decorators.d.ts +3 -9
  58. package/types/backend/src/idempotency.d.ts +18 -0
  59. package/types/backend/src/index.d.ts +1 -1
  60. package/types/backend/src/services.d.ts +2 -2
  61. package/types/backend/src/stack.d.ts +2 -4
  62. package/types/backend/src/strings-files.d.ts +5 -6
  63. package/types/backend/src/upload.d.ts +2 -1
  64. package/types/cloud/src/generated/project.d.ts +3 -2
  65. package/types/cloud/src/generated/studio.d.ts +3 -3
  66. package/types/internal/src/chat.d.ts +56 -2
  67. package/types/internal/src/event.d.ts +1 -1
  68. package/types/internal/src/modules/ai.d.ts +939 -1133
  69. package/types/internal/src/modules/analytics.d.ts +1 -1
  70. package/types/internal/src/modules/events.d.ts +5 -4
  71. package/types/internal/src/modules/{purchases.d.ts → iap.d.ts} +2183 -2438
  72. package/types/internal/src/modules/index.d.ts +2 -1
  73. package/types/internal/src/modules/journeys.d.ts +1 -1
  74. package/types/internal/src/modules/notify.d.ts +3 -3
  75. package/types/internal/src/modules/payments.d.ts +3286 -0
  76. package/types/internal/src/modules/stores.d.ts +7 -7
  77. package/types/internal/src/modules/workspaces.d.ts +22 -0
  78. package/types/server/src/{purchases.d.ts → iap.d.ts} +7 -7
  79. package/types/server/src/index.d.ts +2 -1
  80. package/types/server/src/payments.d.ts +65 -0
  81. package/types/server/src/server.d.ts +4 -1
  82. package/types/web/src/chat.d.ts +30 -4
  83. package/types/web/src/client.d.ts +13 -10
  84. package/types/web/src/{purchases.d.ts → iap.d.ts} +46 -56
  85. package/types/web/src/inapp.d.ts +5 -5
  86. package/types/web/src/index.d.ts +4 -2
  87. package/types/web/src/messaging.d.ts +1 -0
  88. package/types/web/src/notify.d.ts +2 -2
  89. package/types/web/src/payments-ui/index.d.ts +7 -0
  90. package/types/web/src/payments-ui/payment-sheet.d.ts +13 -0
  91. package/types/web/src/payments-ui/qr.d.ts +9 -0
  92. package/types/web/src/payments-ui/saved-cards-view.d.ts +7 -0
  93. package/types/web/src/payments-ui/spend-qr-view.d.ts +8 -0
  94. package/types/web/src/payments-ui/theme.d.ts +16 -0
  95. package/types/web/src/payments-ui/types.d.ts +149 -0
  96. package/types/web/src/payments-ui/wallet-topup-sheet.d.ts +7 -0
  97. package/types/web/src/payments.d.ts +281 -0
  98. package/types/web/src/paywall/placement.d.ts +6 -8
  99. package/types/web/src/screen/assets.d.ts +1 -1
  100. package/types/web/src/screen/resolve.d.ts +3 -3
  101. package/types/web/src/vite.d.ts +8 -0
  102. package/dist/chunks/2HJQSGOO.js +0 -13
  103. package/dist/chunks/3TXOVBZP.js +0 -22
  104. package/dist/chunks/4NHRUBEF.js +0 -2
  105. package/dist/chunks/63TUW6P7.js +0 -18
  106. package/dist/chunks/BYXX373R.js +0 -21
  107. package/dist/chunks/CTWUVLVE.js +0 -2
  108. package/dist/chunks/GFG7WVN2.js +0 -2
  109. package/dist/chunks/KU6B2OXP.js +0 -2
  110. package/dist/chunks/X6JMSZBD.js +0 -6
  111. package/dist/chunks/ZZRRJOEP.js +0 -2
@@ -2947,9 +2947,9 @@ export type MadeKey = {
2947
2947
  */
2948
2948
  made_by: string;
2949
2949
  /**
2950
- * The module it is for: notify (APNs), purchases (In-App Purchase).
2950
+ * The module it is for: notify (APNs), iap (In-App Purchase).
2951
2951
  */
2952
- module?: "notify" | "purchases";
2952
+ module?: "notify" | "iap";
2953
2953
  /**
2954
2954
  * What became of it, when it was not simply taken.
2955
2955
  */
@@ -3000,7 +3000,7 @@ export type SharedEnvironment = {
3000
3000
  ref?: string;
3001
3001
  };
3002
3002
  /**
3003
- * stores.apple.key.made: keys were made at Apple for another module of the environment (notify's APNs keys, purchases' In-App Purchase key), which takes them. Never a key.
3003
+ * stores.apple.key.made: keys were made at Apple for another module of the environment (notify's APNs keys, iap's In-App Purchase key), which takes them. Never a key.
3004
3004
  */
3005
3005
  export type AppleKeyMadeEvent = {
3006
3006
  /**
@@ -3018,7 +3018,7 @@ export type AppleKeyMadeEvent = {
3018
3018
  /**
3019
3019
  * The module the keys are for.
3020
3020
  */
3021
- module: "notify" | "purchases";
3021
+ module: "notify" | "iap";
3022
3022
  };
3023
3023
  /**
3024
3024
  * stores.apple.key.revoked: a key Palbase made at Apple for the environment was revoked there. Never the key.
@@ -3611,7 +3611,7 @@ export interface Events {
3611
3611
  */
3612
3612
  "stores.apple.session.ended": AppleSessionEndedEvent;
3613
3613
  /**
3614
- * stores.apple.key.made: keys were made at Apple for another module of the environment (notify's APNs keys, purchases' In-App Purchase key), which takes them. Never a key.
3614
+ * stores.apple.key.made: keys were made at Apple for another module of the environment (notify's APNs keys, iap's In-App Purchase key), which takes them. Never a key.
3615
3615
  */
3616
3616
  "stores.apple.key.made": AppleKeyMadeEvent;
3617
3617
  /**
@@ -4572,7 +4572,7 @@ export declare function client(t: Transport): {
4572
4572
  /**
4573
4573
  * Keys made at Apple
4574
4574
  *
4575
- * The keys Palbase made at Apple for the environment with its Apple ID session (`POST /stores/apple/keys`), the newest first — never a key itself: its App Store Connect API key, its APNs keys (notify's) and its In-App Purchase key (purchases'), and where each stands.
4575
+ * The keys Palbase made at Apple for the environment with its Apple ID session (`POST /stores/apple/keys`), the newest first — never a key itself: its App Store Connect API key, its APNs keys (notify's) and its In-App Purchase key (iap's), and where each stands.
4576
4576
  */
4577
4577
  listMadeAppleKeys(input?: {
4578
4578
  signal?: AbortSignal;
@@ -4580,7 +4580,7 @@ export declare function client(t: Transport): {
4580
4580
  /**
4581
4581
  * Make a key at Apple
4582
4582
  *
4583
- * Makes one key at Apple with the Apple ID session the environment uses, and connects it: no one downloads a .p8. `asc` — the environment's App Store Connect API key (Admin, every app), connected as `POST /stores/connect` connects one (409 `key_connected` when one is). `apns` — two APNs keys, one for each APNs environment (Apple makes a key scoped to apps for one environment), scoped to the environment's iOS apps, which the notify module takes as its APNs provider. `iap` — an In-App Purchase key for one of its iOS apps (`bundle`, required with more than one), which the purchases module connects. A module that keeps a key the environment connected itself refuses the one made, and it is revoked at Apple. One a request (each well inside the edge's time); 409 `key_made` for a kind Palbase made already. The Apple ID must be an Admin or the Account Holder (409 `apple_role_insufficient`). An owner's or an admin's, or the project's secret key's (403 `admin_required` for a member); never an environment's token's (403 `token_out_of_scope`): a key outlives it. Emits `stores.apple.changed` (asc) or `stores.apple.key.made` (apns, iap).
4583
+ * Makes one key at Apple with the Apple ID session the environment uses, and connects it: no one downloads a .p8. `asc` — the environment's App Store Connect API key (Admin, every app), connected as `POST /stores/connect` connects one (409 `key_connected` when one is). `apns` — two APNs keys, one for each APNs environment (Apple makes a key scoped to apps for one environment), scoped to the environment's iOS apps, which the notify module takes as its APNs provider. `iap` — an In-App Purchase key for one of its iOS apps (`bundle`, required with more than one), which the iap module connects. A module that keeps a key the environment connected itself refuses the one made, and it is revoked at Apple. One a request (each well inside the edge's time); 409 `key_made` for a kind Palbase made already. The Apple ID must be an Admin or the Account Holder (409 `apple_role_insufficient`). An owner's or an admin's, or the project's secret key's (403 `admin_required` for a member); never an environment's token's (403 `token_out_of_scope`): a key outlives it. Emits `stores.apple.changed` (asc) or `stores.apple.key.made` (apns, iap).
4584
4584
  */
4585
4585
  makeAppleKey(input: {
4586
4586
  headers?: {
@@ -592,6 +592,28 @@ export declare function client(t: Transport): {
592
592
  body: DownloadGrantRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
593
593
  signal?: AbortSignal;
594
594
  }): Promise<Reply<200, GrantResponse>>;
595
+ /**
596
+ * Download a decrypted blob via a short-lived signed grant URL
597
+ *
598
+ * Reads PBWS1 ciphertext from managed R2 or BYOS S3, authenticates and decrypts it with the workspace's WDEK, and streams verified plaintext.
599
+ */
600
+ downloadSignedSyncBlob(input: {
601
+ path: {
602
+ digest: string;
603
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
604
+ signal?: AbortSignal;
605
+ }): Promise<Reply<200, undefined>>;
606
+ /**
607
+ * Upload a blob via a short-lived signed grant URL for transparent PBWS1 encryption
608
+ *
609
+ * Accepts plaintext bytes matching the HMAC-signed grant URL, encrypts them with the workspace's per-workspace WDEK (PBWS1), and writes 100% ciphertext to managed R2 or BYOS S3.
610
+ */
611
+ uploadSignedSyncBlob(input: {
612
+ path: {
613
+ digest: string;
614
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
615
+ signal?: AbortSignal;
616
+ }): Promise<Reply<200, undefined>>;
595
617
  /**
596
618
  * Stream real-time workspace sync events
597
619
  *
@@ -1,10 +1,10 @@
1
- import type { purchases } from '../../internal/src/modules/index.js';
2
- export type CustomerInfo = purchases.CustomerInfo;
3
- export type SpendReceipt = purchases.SpendReceipt;
1
+ import type { iap } from '../../internal/src/modules/index.js';
2
+ export type CustomerInfo = iap.CustomerInfo;
3
+ export type SpendReceipt = iap.SpendReceipt;
4
4
  /**
5
5
  * Whether the customer has the entitlement at `now` (this moment unless
6
6
  * given): it is active and, unless it is for life (expires_at null), ends
7
- * after now. Read from the CustomerInfo alone — it is as of when the module
7
+ * after now. Read from CustomerInfo alone — it is as of when the module
8
8
  * computed it (requested_at), so one held a while ends when its entitlement
9
9
  * does. An entitlement it does not name, or an end it cannot read, is none.
10
10
  */
@@ -17,7 +17,7 @@ export type Reservation = ({
17
17
  limit: string;
18
18
  credits?: never;
19
19
  }) & {
20
- /** How many it holds: all of it is taken once the job ran. */
20
+ /** How many it holds: all of it is taken once the job runs. */
21
21
  amount: number;
22
22
  /**
23
23
  * Names the reservation for good (1 to 255 characters): sent again — a
@@ -35,7 +35,7 @@ export declare class ReservationSettled extends Error {
35
35
  readonly receipt: SpendReceipt;
36
36
  constructor(receipt: SpendReceipt);
37
37
  }
38
- type Spends = Pick<purchases.Client, 'holdSpend' | 'commitSpend' | 'releaseSpend'>;
38
+ type Spends = Pick<iap.Client, 'holdSpend' | 'commitSpend' | 'releaseSpend'>;
39
39
  /**
40
40
  * Runs `fn` paid by what it holds: the customer's credits (or a limit's
41
41
  * units) are held first — refused there (409 credits_insufficient,
@@ -46,6 +46,6 @@ type Spends = Pick<purchases.Client, 'holdSpend' | 'commitSpend' | 'releaseSpend
46
46
  * is over, ReservationSettled.
47
47
  */
48
48
  export declare function withReservation<T>(server: {
49
- purchases: Spends;
49
+ iap: Spends;
50
50
  }, customerId: string, reservation: Reservation, fn: (hold: SpendReceipt) => T | Promise<T>): Promise<T>;
51
51
  export {};
@@ -3,7 +3,8 @@ export { FieldError, Fields, type FieldKeySet } from './fields.js';
3
3
  export { Transit, TransitRefusal, TransitRequest, type TransitKeySet } from './transit.js';
4
4
  export { EVENT_TYPES, signatureHeader, verifySignature, verifyWebhook, verifyWebhookRequest, WebhookSignatureError, type EventType, type PalbaseEvent, type PlatformEvent, type PlatformEvents, type SignatureOptions, type VerifyOptions, type WebhookEvent, type WebhookRefusal, } from './webhooks.js';
5
5
  export { AuthUnavailable, requestAddress, sessionStanding, TokenError, TokenVerifier, type ProofContext, type RequestLike, type SessionStanding, type TokenRefusal, type TokenUser, type VerifierOptions, } from './auth/jwt.js';
6
- export { isEntitled, ReservationSettled, withReservation, type CustomerInfo, type Reservation, type SpendReceipt } from './purchases.js';
6
+ export { isEntitled, ReservationSettled, withReservation, type CustomerInfo, type Reservation, type SpendReceipt } from './iap.js';
7
+ export { isPaymentsEvent, isRetryableDecline, settleWalletHold, WalletHoldSettled, withWalletHold, type DeclineCode, type PaymentChannel, type PaymentIntent, type PaymentSubscription, type PaymentsWebhookEvent, type SavedPaymentMethod, type WalletBalance, type WalletHold, type WalletHoldReservation, type WalletHoldSettlement, } from './payments.js';
7
8
  export { pages } from './pages.js';
8
9
  export { PalbaseError } from '../../internal/src/transport.js';
9
10
  export type { RetryPolicy } from '../../internal/src/retry.js';
@@ -0,0 +1,65 @@
1
+ import type { payments } from '../../internal/src/modules/index.js';
2
+ import type { PalbaseEvent } from './webhooks.js';
3
+ export type WalletHold = payments.WalletHold;
4
+ export type PaymentIntent = payments.IntentView;
5
+ export type PaymentChannel = payments.ChannelView;
6
+ export type WalletBalance = payments.WalletBalance;
7
+ export type SavedPaymentMethod = payments.SavedMethodView;
8
+ export type PaymentSubscription = payments.SubscriptionView;
9
+ /** Canonical provider-agnostic decline codes emitted across Stripe, iyzico, Masterpass, and wallet payments. */
10
+ export type DeclineCode = 'insufficient_funds' | 'expired_card' | 'invalid_cvc' | 'three_ds_failed' | 'fraud_suspected' | 'issuer_declined' | 'do_not_honor' | 'limit_exceeded' | 'card_not_supported' | 'authentication_required' | 'provider_unavailable' | 'invalid_request' | 'unknown_decline';
11
+ /** Reports whether a canonical decline code can safely be retried with another attempt or user verification. */
12
+ export declare function isRetryableDecline(code: string | undefined): boolean;
13
+ /** What a server reserves in a customer's closed-loop wallet before running work (e.g. a ride, order, or AI run). */
14
+ export type WalletHoldReservation = ({
15
+ customerId: string;
16
+ spendToken?: never;
17
+ } | {
18
+ spendToken: string;
19
+ customerId?: never;
20
+ }) & {
21
+ /** Closed-loop wallet key (e.g. "try_wallet"). */
22
+ walletKey: string;
23
+ /** Amount to reserve in minor units (e.g. 15000 = 150.00 TRY). */
24
+ amount: number;
25
+ /** Required idempotency key (1-255 chars): retrying with the same key returns the same hold, never a duplicate. */
26
+ idempotencyKey: string;
27
+ /** Hold lifetime in seconds (default 900). */
28
+ ttlSeconds?: number;
29
+ /** Optional merchant order or job reference. */
30
+ reference?: string;
31
+ /** Optional JSON metadata stored alongside the hold. */
32
+ metadata?: Record<string, unknown>;
33
+ };
34
+ /** Optional settlement override returned by a withWalletHold callback when committing less than the full held amount. */
35
+ export interface WalletHoldSettlement<T> {
36
+ /** Actual minor-unit amount to commit (0 releases the hold; omitting commits the full reserved amount). */
37
+ commitAmount: number;
38
+ /** Value returned by withWalletHold. */
39
+ value: T;
40
+ }
41
+ /** Wraps a return value with a partial commit amount inside withWalletHold. */
42
+ export declare function settleWalletHold<T>(commitAmount: number, value: T): WalletHoldSettlement<T>;
43
+ /** Thrown when a retried Idempotency-Key points at a wallet hold that is already committed, released, or expired. */
44
+ export declare class WalletHoldSettled extends Error {
45
+ readonly hold: WalletHold;
46
+ constructor(hold: WalletHold);
47
+ }
48
+ type WalletHoldsClient = Pick<payments.Client, 'createWalletHold' | 'commitWalletHold' | 'releaseWalletHold'>;
49
+ /**
50
+ * Reserves funds in a customer's closed-loop wallet (by customerId or single-use QR spendToken),
51
+ * runs `fn(hold)`, and commits the hold once `fn` succeeds — or releases the hold automatically if `fn` throws.
52
+ *
53
+ * To capture a smaller actual amount (for example metered usage or partial fulfillment) and refund the unused
54
+ * remainder instantly back to available balance, return `settleWalletHold(actualAmount, result)` from `fn`.
55
+ */
56
+ export declare function withWalletHold<T>(server: {
57
+ payments: WalletHoldsClient;
58
+ }, reservation: WalletHoldReservation, fn: (hold: WalletHold) => T | WalletHoldSettlement<T> | Promise<T | WalletHoldSettlement<T>>): Promise<T>;
59
+ /** Every platform webhook event emitted by the payments module. */
60
+ export type PaymentsWebhookEvent = Extract<PalbaseEvent, {
61
+ type: keyof payments.Events;
62
+ }>;
63
+ /** Narrows a verified PalbaseEvent to a payments.* event for clean webhook handlers. */
64
+ export declare function isPaymentsEvent(event: PalbaseEvent): event is PaymentsWebhookEvent;
65
+ export {};
@@ -41,6 +41,8 @@ export interface PalbaseServer {
41
41
  */
42
42
  fields: Fields;
43
43
  flags: ReturnType<typeof modules.flags.client>;
44
+ /** In-App Purchases: StoreKit/Google Play catalog, paywalls, coupons, entitlements, and customer info. */
45
+ iap: ReturnType<typeof modules.iap.client>;
44
46
  machines: ReturnType<typeof modules.machines.client>;
45
47
  /**
46
48
  * The messaging module's calls as its contract states them. The project's server makes its admin ones with the
@@ -51,7 +53,8 @@ export interface PalbaseServer {
51
53
  */
52
54
  messaging: ReturnType<typeof modules.messaging.client>;
53
55
  notify: ReturnType<typeof modules.notify.client>;
54
- purchases: ReturnType<typeof modules.purchases.client>;
56
+ /** Provider-agnostic payments, saved methods, subscriptions, closed-loop double-entry wallets, spend QR tokens, and zero-drift audit. */
57
+ payments: ReturnType<typeof modules.payments.client>;
55
58
  realtime: ReturnType<typeof modules.realtime.client>;
56
59
  secrets: ReturnType<typeof modules.secrets.client>;
57
60
  storage: ReturnType<typeof modules.storage.client>;
@@ -1,6 +1,8 @@
1
- import { type AgentEvent, type ChatEvent, type GoalEvent, type ToolEvent, type TurnEnd, type TurnEvent, type VoiceEvent } from '../../internal/src/chat.js';
1
+ import { sessionSummary, type AgentEvent, type ChatEvent, type ContextCompactedEvent, type ContextOffloadedEvent, type GoalEvent, type SessionHandedOffEvent, type ToolEvent, type TurnEnd, type TurnEvent, type VoiceEvent } from '../../internal/src/chat.js';
2
+ import type { ai as aiModule } from '../../internal/src/modules/index.js';
2
3
  import { type Transport } from '../../internal/src/transport.js';
3
- export type { AgentEvent, ChatEvent, GoalEvent, HistoryEvent, HistoryItem, Publication, ThinkingEvent, ToolEvent, TranscriptEvent, TurnEnd, TurnEvent, VoiceEvent } from '../../internal/src/chat.js';
4
+ export { sessionSummary };
5
+ export type { AgentEvent, ChatEvent, ContextCompactedEvent, ContextOffloadedEvent, GoalEvent, HistoryEvent, HistoryItem, Publication, SessionHandedOffEvent, SessionMachineStatusEvent, SessionSummaryEvent, ThinkingEvent, ToolEvent, TranscriptEvent, TurnEnd, TurnEvent, VoiceEvent } from '../../internal/src/chat.js';
4
6
  /** A picture or a file a message carries: an image the model was shown, or a file put in the chat's workspace. */
5
7
  export interface ChatAttachment {
6
8
  kind: 'image' | 'file' | (string & {});
@@ -190,9 +192,21 @@ export interface ChatVoice {
190
192
  seconds: number | null;
191
193
  closeReason: string;
192
194
  }
195
+ /** Portable session execution state folded from `session.handed_off`, `session.machine_status`, `context.offloaded`, and `context.compacted` parts. */
196
+ export interface ChatExecutionState {
197
+ target: aiModule.ExecutionTarget | null;
198
+ generation: number;
199
+ workspaceSeq: number;
200
+ machineId: string | null;
201
+ machineStatus: 'online' | 'offline' | 'waking' | (string & {}) | null;
202
+ failoverAt: string | null;
203
+ lastHandoff: SessionHandedOffEvent | null;
204
+ compactions: ContextCompactedEvent[];
205
+ offloads: ContextOffloadedEvent[];
206
+ }
193
207
  /**
194
208
  * One thing of the conversation, in order: a message (a line said in the chat's voice too: kind voice), an answer, a
195
- * word of the chat's goal, or the chat's voice beginning or ending.
209
+ * word of the chat's goal, the chat's voice beginning or ending, a session handoff, or a context compaction.
196
210
  */
197
211
  export type ChatItem = {
198
212
  type: 'message';
@@ -206,6 +220,12 @@ export type ChatItem = {
206
220
  } | {
207
221
  type: 'voice';
208
222
  voice: VoiceEvent;
223
+ } | {
224
+ type: 'handoff';
225
+ handoff: SessionHandedOffEvent;
226
+ } | {
227
+ type: 'compaction';
228
+ compaction: ContextCompactedEvent;
209
229
  };
210
230
  export interface ChatState {
211
231
  /** The conversation in order: the members' messages and the agent's answers (a subagent's is in its parent's parts). */
@@ -234,6 +254,8 @@ export interface ChatState {
234
254
  } | null;
235
255
  /** The chat's voice — the last that began in it, live or ended; null: none yet. */
236
256
  voice: ChatVoice | null;
257
+ /** Live execution target, generation, machine health, handoffs, and compaction history folded from stream parts. */
258
+ execution: ChatExecutionState;
237
259
  }
238
260
  /** A gateway's chat: its state now, and told each time it changes. */
239
261
  export interface GatewayChat extends AsyncIterable<ChatState> {
@@ -288,6 +310,11 @@ export declare class ChatLog implements GatewayChat {
288
310
  private readonly voiceWords;
289
311
  /** The chat's voice: the last that began in it, live or ended. */
290
312
  private voice;
313
+ /** Portable execution state folded from handoff, machine_status, offload, and compaction parts. */
314
+ private execution;
315
+ private readonly handoffGens;
316
+ private readonly compactionSeqs;
317
+ private readonly offloadKeys;
291
318
  /** A fork's history, by its part's place: whenever a part comes, what it holds goes before the rest of the chat. */
292
319
  private readonly history;
293
320
  private forkedFrom;
@@ -383,6 +410,5 @@ export declare class ChatLog implements GatewayChat {
383
410
  */
384
411
  export interface ChatReads extends ChatHistoryReader {
385
412
  toolCall(chatId: string, callId: string, signal?: AbortSignal): Promise<ChatToolCall>;
386
- workspaceFile(chatId: string, path: string, manifest?: string, signal?: AbortSignal): Promise<Blob>;
387
413
  }
388
414
  export declare function chatReader(transport: Transport): ChatReads;
@@ -7,8 +7,9 @@ import { Analytics, type AnalyticsOptions } from './analytics.js';
7
7
  import { Consent, type ConsentOptions } from './consent.js';
8
8
  import { Installation } from './installation.js';
9
9
  import { Notify } from './notify.js';
10
- import { Purchases } from './purchases.js';
11
- import { type ChatToolCall } from './chat.js';
10
+ import { Iap } from './iap.js';
11
+ import { Payments } from './payments.js';
12
+ import { type ChatToolCall, type SessionSummaryEvent } from './chat.js';
12
13
  import { Flags } from './flags.js';
13
14
  import { Messaging, type MessagingOptions } from './messaging.js';
14
15
  import { Calls, type CallsOptions } from './calls.js';
@@ -93,8 +94,10 @@ export interface PalbaseClient {
93
94
  consent: Consent;
94
95
  /** This browser's install of the app, as the project knows it: its installation id. */
95
96
  installation: Installation;
96
- /** What the signed-in customer has (live, onCustomerInfo), the paywall's catalog, and buying on the web. */
97
- purchases: Purchases;
97
+ /** What the signed-in customer has (live, onCustomerInfo), the paywall's catalog, and buying catalog products on the web. */
98
+ iap: Iap;
99
+ /** Core payments client: capabilities, installments, PaymentIntents, saved cards, closed-loop wallets, QR spend tokens, subscriptions, and portal. */
100
+ payments: Payments;
98
101
  /** The project's notifications as this app takes them: this browser's pushes (Web Push). */
99
102
  notify: Notify;
100
103
  /** The project's feature flags and remote configuration, resolved for this app and its reader, kept current as they change. */
@@ -115,12 +118,12 @@ export interface PalbaseClient {
115
118
  signal?: AbortSignal;
116
119
  }): Promise<ChatToolCall>;
117
120
  /**
118
- * A file of a chat's workspace, its bytes: from the tree the workspace is at now, or from the one a publish named
119
- * (manifest: an ai.workspace.published event's manifest_id) — a build's product as that publish left it. Up to
120
- * 64 MiB (file_too_large past it); a path its tree does not name is file_not_found.
121
+ * Subscribes to live `session.summary.v1` sidebar broadcasts on `ai:sessions:<userId>` (or `ai:sessions` when
122
+ * `all: true` or signed out) with zero polling. Returns an unsubscribe function.
121
123
  */
122
- chatWorkspaceFile(chatId: string, path: string, manifest?: string, options?: {
123
- signal?: AbortSignal;
124
- }): Promise<Blob>;
124
+ watchSessions(listener: (summary: SessionSummaryEvent) => void, options?: {
125
+ userId?: string;
126
+ all?: boolean;
127
+ }): () => void;
125
128
  }
126
129
  export declare function createClient(opts: ClientOptions): PalbaseClient;
@@ -1,28 +1,30 @@
1
- import { purchases as purchasesModule } from '../../internal/src/modules/index.js';
1
+ import { iap as iapModule } from '../../internal/src/modules/index.js';
2
2
  import { type Fetch, type Transport } from '../../internal/src/transport.js';
3
3
  import type { SessionManager } from './session.js';
4
4
  import type { RealtimeSocket } from './socket.js';
5
+ import type { Installation } from './installation.js';
5
6
  import type { PaywallAttribute } from './paywall/attributes.js';
6
7
  import { type Paywall } from './paywall/placement.js';
7
- type P = typeof purchasesModule;
8
- export type CustomerInfo = purchasesModule.CustomerInfo;
9
- export type Offerings = purchasesModule.Offerings;
10
- export type MergeGrant = purchasesModule.MergeGrant;
11
- export type OfferView = purchasesModule.OfferView;
12
- export type GrantInfo = purchasesModule.GrantInfo;
13
- export type Redeemed = purchasesModule.Redeemed;
14
- export type RedemptionLink = purchasesModule.RedemptionLink;
15
- export type RefundDataConsent = purchasesModule.RefundDataConsent;
8
+ type I = typeof iapModule;
9
+ export type CustomerInfo = iapModule.CustomerInfo;
10
+ export type Offerings = iapModule.Offerings;
11
+ export type MergeGrant = iapModule.MergeGrant;
12
+ export type OfferView = iapModule.OfferView;
13
+ export type GrantInfo = iapModule.GrantInfo;
14
+ export type Redeemed = iapModule.Redeemed;
15
+ export type RedemptionLink = iapModule.RedemptionLink;
16
+ export type RefundDataConsent = iapModule.RefundDataConsent;
16
17
  /** Where a checkout is opened: an app linking out to buy on the web says its platform and its store's storefront (ISO 3166-1 alpha-3: `USA`). */
17
- export type CheckoutSource = purchasesModule.CheckoutSource;
18
+ export type CheckoutSource = iapModule.CheckoutSource;
18
19
  /** Told what the customer has: on the first read, then each time it changes; null while no one is signed in. */
19
20
  export type CustomerInfoListener = (info: CustomerInfo | null) => void;
20
- export declare class Purchases {
21
- /** Every client operation of the purchases contract, through the session's transport. */
22
- readonly api: ReturnType<P['client']>;
21
+ export declare class Iap {
22
+ /** Every client operation of the iap contract, through the session's transport. */
23
+ readonly api: ReturnType<I['client']>;
23
24
  private session;
24
25
  private socket;
25
26
  private ref;
27
+ private installation;
26
28
  /** What a paywall's assets are downloaded with: the app's fetch, when it gave one. */
27
29
  private fetch;
28
30
  /** The app's version, when it gave one: a paywall's request says it. */
@@ -34,7 +36,7 @@ export declare class Purchases {
34
36
  private following;
35
37
  /** What listeners were last told: undefined until the first read (or sign-out) is known. */
36
38
  private last;
37
- constructor(transport: Transport, session: SessionManager, socket: RealtimeSocket, ref: string, fetch?: Fetch, appVersion?: string, app?: string);
39
+ constructor(transport: Transport, session: SessionManager, socket: RealtimeSocket, ref: string, installation: Installation, fetch?: Fetch, appVersion?: string, app?: string);
38
40
  /** Everything the signed-in customer has, read now (the first read makes the user a customer). */
39
41
  me(): Promise<CustomerInfo>;
40
42
  /** The paywall's catalog: each product's text and price on a channel — the web's unless another is named. */
@@ -43,22 +45,19 @@ export declare class Purchases {
43
45
  * The paywall the project shows at a placement — the place in the app it
44
46
  * names (`onboarding`, `settings`) — to draw with render(), its assets
45
47
  * downloaded and checked first. Its version is the newest published in a
46
- * schema this SDK draws (an experiment's
47
- * variant while one runs there, the same for this person every time); the
48
- * browser keeps it, to ask again with its ETag and to show offline. With
49
- * nothing published there it is the SDK's own, of every plan the web
50
- * sells; null when the web sells nothing.
48
+ * schema this SDK draws (an experiment's variant while one runs there, the
49
+ * same for this person every time); the browser keeps it, to ask again with
50
+ * its ETag and to show offline. With nothing published there it is the SDK's
51
+ * own, of every plan the web sells; null when the web sells nothing.
51
52
  *
52
53
  * Which paywall a placement shows may depend on its targeting rules: they
53
54
  * read what the request says of the app (the web, the SDK, the version the
54
55
  * client was made with, where it is asked from), its language — the
55
56
  * browser's, or `locale` when the app shows another — and `attributes`,
56
- * what the app says of the person
57
- * (`{ plan: 'free', sessions: 12 }`: texts, numbers, yes/no). An attribute
58
- * the module would refuse throws `invalid_attributes` before anything is
59
- * asked. Targeting picks what to show; it is not access control: the
60
- * country, the attributes and the versions are what the app says of
61
- * itself, so no price or region entitlement may hang on them.
57
+ * what the app says of the person (`{ plan: 'free', sessions: 12 }`: texts,
58
+ * numbers, yes/no). An attribute the module would refuse throws
59
+ * `invalid_attributes` before anything is asked. Targeting picks what to
60
+ * show; it is not access control.
62
61
  */
63
62
  paywall(placement: string, opts?: {
64
63
  attributes?: Readonly<Record<string, PaywallAttribute>>;
@@ -66,23 +65,16 @@ export declare class Purchases {
66
65
  signal?: AbortSignal;
67
66
  }): Promise<Paywall | null>;
68
67
  /**
69
- * Opens Stripe Checkout to buy a product's plan sold on the web: the URL to
70
- * send the buyer to. Stripe sends them back to successUrl or cancelUrl —
71
- * one of the project's registered apps. Signed in — a guest too — the
72
- * purchase is the customer's once Stripe reports it: onCustomerInfo hears
73
- * it. With no one signed in the buyer is no one yet: Checkout asks their
74
- * email, no free trial is given, and what they buy waits for the app user
75
- * who redeems it — its link is on the success page (redemptionLink: put
76
- * `{CHECKOUT_SESSION_ID}` in successUrl, Stripe writes the session's id
77
- * there) and in their email. The key the success page asks it with is
78
- * kept in this tab's sessionStorage, which the redirect to Stripe and back
79
- * keeps. `source` says where the checkout was opened, when an app links
80
- * out.
68
+ * Opens a web checkout session (routed through the payments module across
69
+ * Stripe, iyzico, or the configured default channel) to buy a catalog
70
+ * product's web plan: returns the URL to send the buyer to. The provider
71
+ * sends them back to successUrl or cancelUrl — one of the project's
72
+ * registered apps. Signed in — a guest too — the purchase is the customer's
73
+ * once confirmed: onCustomerInfo hears it. With no one signed in, what they
74
+ * buy waits for the app user who redeems it via redemptionLink() and redeem().
81
75
  *
82
- * `offer` buys it with one of the signed-in customer's offers on that plan
83
- * (offers()): its discount — the coupon code that opened it, when one did,
84
- * shown on Stripe's page — or its free trial. One that is not theirs to take
85
- * there, or asked with no one signed in, is refused (403 offer_not_open).
76
+ * `offer` buys it with one of the signed-in customer's offers on that plan.
77
+ * `channel` and `currency` optionally override the payment channel or web price currency.
86
78
  */
87
79
  checkout(opts: {
88
80
  product: string;
@@ -91,17 +83,16 @@ export declare class Purchases {
91
83
  cancelUrl: string;
92
84
  source?: CheckoutSource;
93
85
  offer?: string;
86
+ channel?: string;
87
+ currency?: string;
94
88
  }): Promise<string>;
95
89
  /**
96
90
  * On a checkout's success page, for a buyer with no account: the one-time
97
91
  * link — good for an hour — that hands what they bought to the app user
98
92
  * who opens it on their phone (show it, and its QR code on a computer).
99
- * sessionId is Stripe's (`{CHECKOUT_SESSION_ID}` in successUrl); the key
100
- * is the one checkout() kept in this tab, or `key` when the app kept it
101
- * itself — without it the page has none to show (`redemption_key_missing`:
102
- * the buyer's email has it). Stripe may not have told of the payment yet:
103
- * it is asked again for up to waitSeconds (20). Each call makes a new
104
- * link — ten at most, within an hour of the payment.
93
+ * sessionId is the checkout session id; the key is the one checkout() kept
94
+ * in this tab, or `key` when the app kept it itself — without it the page
95
+ * has none to show (`redemption_key_missing`: the buyer's email has it).
105
96
  */
106
97
  redemptionLink(sessionId: string, opts?: {
107
98
  key?: string;
@@ -113,7 +104,7 @@ export declare class Purchases {
113
104
  * purchases go with it to the account it signs in to: what it bought is
114
105
  * theirs; what they have now. Takes the link the app was opened with
115
106
  * (`<scheme>://palbase/redeem?token=…`, or its page's
116
- * `https://…/purchases/redeem?token=…`) or its token. A link works once (409
107
+ * `https://…/iap/redeem?token=…`) or its token. A link works once (409
117
108
  * `already_redeemed`); one past its hour is refused (410
118
109
  * `redemption_expired`) and sends a new one to the buyer's email — the
119
110
  * error's `body.resent` says so.
@@ -142,8 +133,10 @@ export declare class Purchases {
142
133
  * offer code, redeemed in the App Store); too_many_attempts (429: too many codes tried — after retryAfter).
143
134
  */
144
135
  redeemCoupon(code: string): Promise<Redeemed>;
145
- /** Stripe's customer portal for what the customer bought on the web: the URL to send them to, and back to returnUrl. */
146
- portal(returnUrl: string): Promise<string>;
136
+ /** Self-service customer billing portal for what the customer bought on the web: the URL to send them to, and back to returnUrl. */
137
+ portal(returnUrl: string, opts?: {
138
+ channel?: string;
139
+ }): Promise<string>;
147
140
  /**
148
141
  * Asked with a guest's session, before it signs in to an existing account:
149
142
  * the proof — good for 5 minutes — that whoever signs in held the guest.
@@ -161,10 +154,7 @@ export declare class Purchases {
161
154
  * What the signed-in customer said, as the app asked them: whether, when
162
155
  * they ask the App Store for a refund, Apple is told what they had of the
163
156
  * purchase — whether it was given, whether a free trial came first, how
164
- * much of a pack of credits was spent. With it, Palbase answers Apple's
165
- * question within its 12 hours and states no preference of its own;
166
- * without it — never asked, or false — Apple is told nothing. The latest
167
- * word counts.
157
+ * much of a pack of credits was spent.
168
158
  */
169
159
  setRefundDataConsent(consented: boolean): Promise<RefundDataConsent>;
170
160
  /** Where this tab keeps a checkout's redemption key. */
@@ -188,6 +178,6 @@ export declare class Purchases {
188
178
  private offer;
189
179
  private tell;
190
180
  }
191
- /** A redemption link's token: of `<scheme>://palbase/redeem?token=…`, of its page `…/purchases/redeem?token=…`, or the token itself. */
181
+ /** A redemption link's token: of `<scheme>://palbase/redeem?token=…`, of its page `…/iap/redeem?token=…`, or the token itself. */
192
182
  export declare function redemptionToken(link: string): string | undefined;
193
183
  export {};
@@ -1,12 +1,12 @@
1
1
  import { type Transport } from '../../internal/src/transport.js';
2
2
  import { type Installation } from './installation.js';
3
3
  import type { SessionManager } from './session.js';
4
- import type { Purchases } from './purchases.js';
4
+ import type { Iap } from './iap.js';
5
5
  import { type MessageCloseReason } from './message/present.js';
6
6
  import type { MessageHandlers } from './screen/render.js';
7
7
  import type { Appearance } from './screen/resolve.js';
8
- /** What an offer's button is taken with when the app does not take it: the customer's purchases (pb.purchases). */
9
- type OfferTaker = Pick<Purchases, 'offers' | 'claimOffer' | 'checkout'>;
8
+ /** What an offer's button is taken with when the app does not take it: the customer's iap module (pb.iap). */
9
+ type OfferTaker = Pick<Iap, 'offers' | 'claimOffer' | 'checkout'>;
10
10
  /** The event a session's start is, as a campaign's trigger names it. */
11
11
  export declare const SESSION_START = "session_start";
12
12
  export interface InAppOptions {
@@ -59,7 +59,7 @@ export declare class InApp {
59
59
  private now;
60
60
  private requestPush;
61
61
  private analyticsAllowed;
62
- private purchases;
62
+ private iap;
63
63
  /** Each load's turn: an answer for whoever was here before is not kept. */
64
64
  private asked;
65
65
  /** Whose the page's campaigns are: one more as someone else comes. */
@@ -79,7 +79,7 @@ export declare class InApp {
79
79
  private stopWatching;
80
80
  /** Events are taken one after another: an event's show is asked before the next one is looked at. */
81
81
  private queue;
82
- constructor(transport: Transport, session: SessionManager, installation: Installation, origin: string, requestPush: () => Promise<unknown>, analyticsAllowed: () => boolean, purchases: OfferTaker, g?: Globals, now?: () => number);
82
+ constructor(transport: Transport, session: SessionManager, installation: Installation, origin: string, requestPush: () => Promise<unknown>, analyticsAllowed: () => boolean, iap: OfferTaker, g?: Globals, now?: () => number);
83
83
  /** Whether it was started: campaigns are shown only then. */
84
84
  get started(): boolean;
85
85
  /**
@@ -5,9 +5,11 @@ export { Channel, RealtimeSocket, type ChannelOptions, type PushReply, type Sock
5
5
  export { Analytics, type AnalyticsOptions, type People } from './analytics.js';
6
6
  export { Consent, type ConsentKeyInfo, type ConsentListener, type ConsentOptions, type ConsentRegion, type ConsentState } from './consent.js';
7
7
  export { Installation } from './installation.js';
8
- export type { AgentEvent, ChatAttachment, ChatEvent, ChatGoal, ChatItem, ChatMessageView, ChatPart, ChatPartsPage, ChatPartsQuery, ChatResponse, ChatState, ChatStreamPart, ChatThinking, ChatToolCall, ChatVoice, GatewayChat, GoalEvent, HistoryEvent, HistoryItem, Publication, ThinkingEvent, ToolEvent, TranscriptEvent, TurnEnd, TurnEvent, VoiceEvent, } from './chat.js';
8
+ export { sessionSummary } from './chat.js';
9
+ export type { AgentEvent, ChatAttachment, ChatEvent, ChatExecutionState, ChatGoal, ChatItem, ChatMessageView, ChatPart, ChatPartsPage, ChatPartsQuery, ChatResponse, ChatState, ChatStreamPart, ChatThinking, ChatToolCall, ChatVoice, ContextCompactedEvent, ContextOffloadedEvent, GatewayChat, GoalEvent, HistoryEvent, HistoryItem, Publication, SessionHandedOffEvent, SessionMachineStatusEvent, SessionSummaryEvent, ThinkingEvent, ToolEvent, TranscriptEvent, TurnEnd, TurnEvent, VoiceEvent, } from './chat.js';
9
10
  export { connectVoice, type StartedVoice, type VoiceConnection, type VoiceOptions } from './voice.js';
10
- export { Purchases, redemptionToken, type CheckoutSource, type CustomerInfo, type CustomerInfoListener, type GrantInfo, type MergeGrant, type OfferView, type Offerings, type Redeemed, type RedemptionLink, } from './purchases.js';
11
+ export { Iap, redemptionToken, type CheckoutSource, type CustomerInfo, type CustomerInfoListener, type GrantInfo, type MergeGrant, type OfferView, type Offerings, type Redeemed, type RedemptionLink, type RefundDataConsent, } from './iap.js';
12
+ export { Payments, TERMINAL_INTENT_STATUSES, declineMessage, isTerminalIntentStatus, mountEmbedFrame, parseCallbackMessage, type Address, type Buyer, type CancelSubscriptionResponse, type Capabilities, type CapabilitiesResponse, type ConfirmIntentOptions, type InstallmentConfig, type InstallmentOption, type InstallmentTable, type IntentView, type MasterpassAction, type NextAction, type OtpPromptContext, type PaymentCallbackMessage, type PaymentRealtimeEvent, type PaymentRealtimeListener, type PresentIntentOptions, type PresentableIntent, type ProviderOptions, type SavedMethodView, type SpendToken, type SubmitOtpOptions, type SubscriptionListResponse, type SubscriptionSummary, type TopUpWalletOptions, type WaitForIntentOptions, type WalletBalance, type WalletBalancesListener, } from './payments.js';
11
13
  export { Notify, WebPush, type PushPermission, type PushSubscribeOptions } from './notify.js';
12
14
  export { Flags, type FlagSource, type FlagsListener } from './flags.js';
13
15
  export { ConversationList, ConversationView, DeletedGroupList, indexedDBKeyValue, Messaging, ScheduledList, ThreadView, type Conversation, type ConversationMatch, type ConversationViewState, type ConversationListState, type DeletedGroup, type DeletedGroupListState, type Entry, type Hit, type Member, type Message, type MessagingOptions, type MyProfile, type Observed, type OpenedFile, type OutboxItem, type OutgoingFile, type Profile, type ScheduledMessage, type SearchHit, type SearchMatch, type SearchOptions, type SearchResults, type SendOptions, type ThreadState, type ThreadViewState, } from './messaging.js';
@@ -196,6 +196,7 @@ export declare class Messaging {
196
196
  private timers;
197
197
  private readonly delivered;
198
198
  private readonly expiring;
199
+ private readonly typingTimers;
199
200
  private readonly typingBy;
200
201
  private readonly typedAt;
201
202
  private readonly loaded;
@@ -2,7 +2,7 @@ import type { Transport } from '../../internal/src/transport.js';
2
2
  import { type Installation } from './installation.js';
3
3
  import type { SessionManager } from './session.js';
4
4
  import type { Consent } from './consent.js';
5
- import type { Purchases } from './purchases.js';
5
+ import type { Iap } from './iap.js';
6
6
  import { Inbox } from './inbox.js';
7
7
  import { InApp } from './inapp.js';
8
8
  /** Where the browser is with pushes: allowed, refused, not asked yet, or a browser without them. */
@@ -104,6 +104,6 @@ export declare class Notify {
104
104
  readonly inbox: Inbox;
105
105
  /** The project's in-app campaigns, shown in this page once started. */
106
106
  readonly inApp: InApp;
107
- constructor(transport: Transport, session: SessionManager, installation: Installation, consent: Consent, purchases: Purchases, baseUrl: string, publishableKey: string);
107
+ constructor(transport: Transport, session: SessionManager, installation: Installation, consent: Consent, iap: Iap, baseUrl: string, publishableKey: string);
108
108
  }
109
109
  export {};
@@ -0,0 +1,7 @@
1
+ export { mountPaymentSheet, openPaymentSheet } from './payment-sheet.js';
2
+ export { mountWalletTopUpSheet } from './wallet-topup-sheet.js';
3
+ export { mountSavedCardsView } from './saved-cards-view.js';
4
+ export { mountSpendQRView } from './spend-qr-view.js';
5
+ export { encodeQrMatrix, renderQrSvg } from './qr.js';
6
+ export { currencyMinorDigits, formatMinorAmount } from './theme.js';
7
+ export type { PaymentsAppearance, PaymentsClient, PaymentSheetLabels, PaymentSheetOptions, PaymentViewHandle, SavedCardsViewOptions, SpendQRViewOptions, WalletTopUpSheetOptions, } from './types.js';