@fluid-app/portal-sdk 0.1.142 → 0.1.144

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/dist/{AppDownloadScreen-CO-wctCB.cjs → AppDownloadScreen-CxkoYLT6.cjs} +2 -2
  2. package/dist/{AppDownloadScreen-CO-wctCB.cjs.map → AppDownloadScreen-CxkoYLT6.cjs.map} +1 -1
  3. package/dist/{AppDownloadScreen-nz3fgOVF.cjs → AppDownloadScreen-DXZpoE5A.cjs} +2 -2
  4. package/dist/{AppDownloadScreen-Df1OPjkx.mjs → AppDownloadScreen-ga-5O4jr.mjs} +2 -2
  5. package/dist/{AppDownloadScreen-Df1OPjkx.mjs.map → AppDownloadScreen-ga-5O4jr.mjs.map} +1 -1
  6. package/dist/{ContactsScreen-cWDFP8e-.mjs → ContactsScreen-C-xJcR5X.mjs} +6 -6
  7. package/dist/{ContactsScreen-cWDFP8e-.mjs.map → ContactsScreen-C-xJcR5X.mjs.map} +1 -1
  8. package/dist/{ContactsScreen-gJB99SIY.cjs → ContactsScreen-DYkGu477.cjs} +7 -7
  9. package/dist/{ContactsScreen-BPeQemgG.cjs → ContactsScreen-RQ1IENFl.cjs} +6 -6
  10. package/dist/{ContactsScreen-BPeQemgG.cjs.map → ContactsScreen-RQ1IENFl.cjs.map} +1 -1
  11. package/dist/{FluidProvider-BIoYteOA.mjs → FluidProvider-Bs9eWShT.mjs} +279 -9
  12. package/dist/FluidProvider-Bs9eWShT.mjs.map +1 -0
  13. package/dist/{FluidProvider-DAe8xcAD.cjs → FluidProvider-DzCUwDPA.cjs} +290 -20
  14. package/dist/FluidProvider-DzCUwDPA.cjs.map +1 -0
  15. package/dist/{MessagingScreen-BsABB4tn.cjs → MessagingScreen-BmAICPkY.cjs} +4 -4
  16. package/dist/{MessagingScreen-BgY-m0Pm.cjs → MessagingScreen-D7hAjWaG.cjs} +5 -5
  17. package/dist/{MessagingScreen-BgY-m0Pm.cjs.map → MessagingScreen-D7hAjWaG.cjs.map} +1 -1
  18. package/dist/{MessagingScreen-DKXOCrBj.mjs → MessagingScreen-DOcgxDbR.mjs} +4 -4
  19. package/dist/{MessagingScreen-DKXOCrBj.mjs.map → MessagingScreen-DOcgxDbR.mjs.map} +1 -1
  20. package/dist/{MySiteScreen-DVjRy-nI.cjs → MySiteScreen-BMFJLAwJ.cjs} +2 -2
  21. package/dist/{MySiteScreen-DVjRy-nI.cjs.map → MySiteScreen-BMFJLAwJ.cjs.map} +1 -1
  22. package/dist/{MySiteScreen-D8lFT21T.mjs → MySiteScreen-BwCQLYBT.mjs} +2 -2
  23. package/dist/{MySiteScreen-D8lFT21T.mjs.map → MySiteScreen-BwCQLYBT.mjs.map} +1 -1
  24. package/dist/{MySiteScreen-BTF8MZCU.cjs → MySiteScreen-C_-EPLsj.cjs} +2 -2
  25. package/dist/{OrdersScreen-CbCus7pT.cjs → OrdersScreen-DHoIUinY.cjs} +3 -3
  26. package/dist/{OrdersScreen-CbCus7pT.cjs.map → OrdersScreen-DHoIUinY.cjs.map} +1 -1
  27. package/dist/{OrdersScreen-BB_n4hgl.cjs → OrdersScreen-DgBe0kl9.cjs} +3 -3
  28. package/dist/{OrdersScreen-BHtq-tvn.mjs → OrdersScreen-ihhKswAb.mjs} +3 -3
  29. package/dist/{OrdersScreen-BHtq-tvn.mjs.map → OrdersScreen-ihhKswAb.mjs.map} +1 -1
  30. package/dist/{ProductsScreen-CU8nGFN5.mjs → ProductsScreen-BbgYlCfQ.mjs} +6 -6
  31. package/dist/{ProductsScreen-CU8nGFN5.mjs.map → ProductsScreen-BbgYlCfQ.mjs.map} +1 -1
  32. package/dist/{ProductsScreen-CP29k8Z3.cjs → ProductsScreen-BulxEN71.cjs} +7 -7
  33. package/dist/{ProductsScreen-DSgwSnVj.mjs → ProductsScreen-OPY76KpG.mjs} +6 -6
  34. package/dist/{ProductsScreen-CuMgdka9.cjs → ProductsScreen-snrXLhuy.cjs} +6 -6
  35. package/dist/{ProductsScreen-CuMgdka9.cjs.map → ProductsScreen-snrXLhuy.cjs.map} +1 -1
  36. package/dist/{ProfileScreen-CjrhOuY3.cjs → ProfileScreen-CES4uRpE.cjs} +2 -2
  37. package/dist/{ProfileScreen-CDZ632ue.cjs → ProfileScreen-CPCkXse4.cjs} +5 -6
  38. package/dist/{ProfileScreen-CDZ632ue.cjs.map → ProfileScreen-CPCkXse4.cjs.map} +1 -1
  39. package/dist/{ProfileScreen-BajH0_kR.mjs → ProfileScreen-doxUb6Ud.mjs} +3 -4
  40. package/dist/{ProfileScreen-BajH0_kR.mjs.map → ProfileScreen-doxUb6Ud.mjs.map} +1 -1
  41. package/dist/{SearchSort-CyeeUmwC.cjs → SearchSort-DOLoubGE.cjs} +1 -1
  42. package/dist/{SearchSort-CyeeUmwC.cjs.map → SearchSort-DOLoubGE.cjs.map} +1 -1
  43. package/dist/{SearchSort-BXklP8Pq.mjs → SearchSort-LZm-VfF7.mjs} +1 -1
  44. package/dist/{SearchSort-BXklP8Pq.mjs.map → SearchSort-LZm-VfF7.mjs.map} +1 -1
  45. package/dist/{ShareablesScreen-acj-gCLe.cjs → ShareablesScreen-B6-BcjEt.cjs} +7 -7
  46. package/dist/{ShareablesScreen-F3ockfKE.mjs → ShareablesScreen-CJk0udFG.mjs} +7 -7
  47. package/dist/{ShareablesScreen-F3ockfKE.mjs.map → ShareablesScreen-CJk0udFG.mjs.map} +1 -1
  48. package/dist/{ShareablesScreen-ITLkfDHV.cjs → ShareablesScreen-DaQAxGCr.cjs} +7 -7
  49. package/dist/{ShareablesScreen-ITLkfDHV.cjs.map → ShareablesScreen-DaQAxGCr.cjs.map} +1 -1
  50. package/dist/{ShareablesScreen-B63fbgRJ.mjs → ShareablesScreen-yC7UrhhU.mjs} +6 -6
  51. package/dist/{ShopScreen-DdIlnLcB.mjs → ShopScreen-B3kyH-AP.mjs} +5 -5
  52. package/dist/{ShopScreen-DdIlnLcB.mjs.map → ShopScreen-B3kyH-AP.mjs.map} +1 -1
  53. package/dist/{ShopScreen-3Z-9TKeI.cjs → ShopScreen-D6JAjTai.cjs} +5 -5
  54. package/dist/{ShopScreen-3Z-9TKeI.cjs.map → ShopScreen-D6JAjTai.cjs.map} +1 -1
  55. package/dist/{ShopScreen-Bit0Fdgr.cjs → ShopScreen-DUpCS4va.cjs} +3 -3
  56. package/dist/{SubscriptionsScreen-DV5RUV66.cjs → SubscriptionsScreen-CEkKX-O9.cjs} +5 -5
  57. package/dist/{SubscriptionsScreen-DV5RUV66.cjs.map → SubscriptionsScreen-CEkKX-O9.cjs.map} +1 -1
  58. package/dist/{SubscriptionsScreen-B2-iZojm.mjs → SubscriptionsScreen-DlRbMhFz.mjs} +5 -5
  59. package/dist/{SubscriptionsScreen-B2-iZojm.mjs.map → SubscriptionsScreen-DlRbMhFz.mjs.map} +1 -1
  60. package/dist/{SubscriptionsScreen-01RuJl73.cjs → SubscriptionsScreen-jpRkUvPY.cjs} +5 -5
  61. package/dist/{dist-Cl4FsM3V.mjs → dist-B8padP0r.mjs} +2 -2
  62. package/dist/{dist-Cl4FsM3V.mjs.map → dist-B8padP0r.mjs.map} +1 -1
  63. package/dist/{dist-CbeLS2R5.cjs → dist-BoyKnTdv.cjs} +2 -2
  64. package/dist/{dist-CbeLS2R5.cjs.map → dist-BoyKnTdv.cjs.map} +1 -1
  65. package/dist/{dist-BbS_7TvS.cjs → dist-DRVtlgQ1.cjs} +1 -1
  66. package/dist/{dist-BbS_7TvS.cjs.map → dist-DRVtlgQ1.cjs.map} +1 -1
  67. package/dist/{dist-CMGXkSgZ.mjs → dist-NMbUD0qE.mjs} +1 -1
  68. package/dist/{dist-CMGXkSgZ.mjs.map → dist-NMbUD0qE.mjs.map} +1 -1
  69. package/dist/{es-BSkb3AZk.cjs → es-DlWO6buB.cjs} +1 -1
  70. package/dist/{es-BSkb3AZk.cjs.map → es-DlWO6buB.cjs.map} +1 -1
  71. package/dist/index.cjs +41 -41
  72. package/dist/index.d.cts.map +1 -1
  73. package/dist/index.d.mts.map +1 -1
  74. package/dist/index.mjs +40 -40
  75. package/dist/{order-status-badge-DsbuULAc.cjs → order-status-badge-BqoNJ8XK.cjs} +1 -1
  76. package/dist/{order-status-badge-DsbuULAc.cjs.map → order-status-badge-BqoNJ8XK.cjs.map} +1 -1
  77. package/dist/{order-status-badge-B-iGmxDO.mjs → order-status-badge-CkvYyjT7.mjs} +1 -1
  78. package/dist/{order-status-badge-B-iGmxDO.mjs.map → order-status-badge-CkvYyjT7.mjs.map} +1 -1
  79. package/dist/{portal-tenant-product-media-adapter-y_yCswfv.mjs → portal-tenant-product-media-adapter-BHtx3DdM.mjs} +4 -4
  80. package/dist/{portal-tenant-product-media-adapter-y_yCswfv.mjs.map → portal-tenant-product-media-adapter-BHtx3DdM.mjs.map} +1 -1
  81. package/dist/{portal-tenant-product-media-adapter-DmH2iJvp.cjs → portal-tenant-product-media-adapter-qXW0vGG8.cjs} +5 -5
  82. package/dist/{portal-tenant-product-media-adapter-DmH2iJvp.cjs.map → portal-tenant-product-media-adapter-qXW0vGG8.cjs.map} +1 -1
  83. package/dist/use-account-clients-GUakuhX-.cjs +212 -0
  84. package/dist/use-account-clients-GUakuhX-.cjs.map +1 -0
  85. package/dist/use-account-clients-d3FMT7rH.mjs +194 -0
  86. package/dist/use-account-clients-d3FMT7rH.mjs.map +1 -0
  87. package/dist/{use-current-user-DAxsYRk-.mjs → use-current-user-Cjd0lFyc.mjs} +3 -3
  88. package/dist/{use-current-user-DAxsYRk-.mjs.map → use-current-user-Cjd0lFyc.mjs.map} +1 -1
  89. package/dist/{use-current-user-5Kr_1nZZ.cjs → use-current-user-idj1wuKD.cjs} +3 -3
  90. package/dist/{use-current-user-5Kr_1nZZ.cjs.map → use-current-user-idj1wuKD.cjs.map} +1 -1
  91. package/dist/{use-fluid-api-BJ-PZ0Zx.mjs → use-fluid-api-DdMmBE5K.mjs} +2 -2
  92. package/dist/{use-fluid-api-BJ-PZ0Zx.mjs.map → use-fluid-api-DdMmBE5K.mjs.map} +1 -1
  93. package/dist/{use-fluid-api-uEqwymly.cjs → use-fluid-api-DnDH2bby.cjs} +2 -2
  94. package/dist/{use-fluid-api-uEqwymly.cjs.map → use-fluid-api-DnDH2bby.cjs.map} +1 -1
  95. package/dist/{use-fluid-auth-DXDtI7Ep.cjs → use-fluid-auth-CcxpIYkI.cjs} +2 -2
  96. package/dist/{use-fluid-auth-DXDtI7Ep.cjs.map → use-fluid-auth-CcxpIYkI.cjs.map} +1 -1
  97. package/dist/{use-fluid-auth-DrtkGGwT.mjs → use-fluid-auth-_LboeZI9.mjs} +2 -2
  98. package/dist/{use-fluid-auth-DrtkGGwT.mjs.map → use-fluid-auth-_LboeZI9.mjs.map} +1 -1
  99. package/dist/{use-portal-products-client-zvmWMf8p.mjs → use-portal-products-client-DA7Vop2s.mjs} +2 -2
  100. package/dist/{use-portal-products-client-zvmWMf8p.mjs.map → use-portal-products-client-DA7Vop2s.mjs.map} +1 -1
  101. package/dist/{use-portal-products-client-CXZj-fKI.cjs → use-portal-products-client-DAXn2JSf.cjs} +2 -2
  102. package/dist/{use-portal-products-client-CXZj-fKI.cjs.map → use-portal-products-client-DAXn2JSf.cjs.map} +1 -1
  103. package/package.json +13 -13
  104. package/dist/FluidProvider-BIoYteOA.mjs.map +0 -1
  105. package/dist/FluidProvider-DAe8xcAD.cjs.map +0 -1
  106. package/dist/use-account-clients-CNDyBxm7.mjs +0 -446
  107. package/dist/use-account-clients-CNDyBxm7.mjs.map +0 -1
  108. package/dist/use-account-clients-nmrVvm98.cjs +0 -476
  109. package/dist/use-account-clients-nmrVvm98.cjs.map +0 -1
  110. /package/dist/{src-zEMEV1KP.mjs → src-6SxtfYk9.mjs} +0 -0
  111. /package/dist/{src-CzwiFO_J.cjs → src-ClULVolb.cjs} +0 -0
@@ -491,6 +491,24 @@ function useAppDefinitionApi() {
491
491
  return api;
492
492
  }
493
493
  //#endregion
494
+ //#region ../core/src/account-api-context.ts
495
+ const AccountApiContext = createContext(null);
496
+ const AccountApiProvider = AccountApiContext.Provider;
497
+ function useAccountApi() {
498
+ const api = useContext(AccountApiContext);
499
+ if (!api) throw new Error("useAccountApi must be used within an AccountApiProvider");
500
+ return api;
501
+ }
502
+ //#endregion
503
+ //#region ../core/src/pay-api-context.ts
504
+ const PayApiContext = createContext(null);
505
+ const PayApiProvider = PayApiContext.Provider;
506
+ function usePayApi() {
507
+ const api = useContext(PayApiContext);
508
+ if (!api) throw new Error("usePayApi must be used within a PayApiProvider");
509
+ return api;
510
+ }
511
+ //#endregion
494
512
  //#region ../../platform/api-client-core/src/fetch-client.ts
495
513
  /**
496
514
  * API Error class compatible with fluid-admin's ApiError
@@ -2284,6 +2302,250 @@ function createAppDefinitionApiAdapter(client) {
2284
2302
  } };
2285
2303
  }
2286
2304
  //#endregion
2305
+ //#region src/adapters/account-api-adapter.ts
2306
+ function mapAccount(raw) {
2307
+ return {
2308
+ id: raw.id ?? 0,
2309
+ member_type: raw.member_type ?? "rep",
2310
+ first_name: raw.first_name ?? "",
2311
+ last_name: raw.last_name ?? "",
2312
+ email: raw.email ?? "",
2313
+ phone: raw.phone ?? null,
2314
+ bio: raw.bio ?? null,
2315
+ avatar_url: raw.avatar_url ?? null,
2316
+ slug: raw.slug ?? "",
2317
+ social_links: raw.social_links ?? null
2318
+ };
2319
+ }
2320
+ function createAccountApiAdapter(client) {
2321
+ return {
2322
+ fetchAccount: async () => {
2323
+ const response = await account_show(client);
2324
+ return {
2325
+ account: mapAccount(response.account ?? {}),
2326
+ meta: {
2327
+ request_id: response.meta?.request_id ?? "",
2328
+ timestamp: response.meta?.timestamp ?? ""
2329
+ }
2330
+ };
2331
+ },
2332
+ updateAccount: async (body) => {
2333
+ const response = await account_update(client, body);
2334
+ return {
2335
+ account: mapAccount(response.account ?? {}),
2336
+ meta: {
2337
+ request_id: response.meta?.request_id ?? "",
2338
+ timestamp: response.meta?.timestamp ?? ""
2339
+ }
2340
+ };
2341
+ }
2342
+ };
2343
+ }
2344
+ //#endregion
2345
+ //#region ../../api-clients/portal-tenant-pay/src/namespaces/portal_tenant_pay.ts
2346
+ /**
2347
+ * List addresses
2348
+ * Returns addresses associated with the member's customer record in this tenant.
2349
+ *
2350
+ * @param client - Fetch client instance
2351
+ * @param [params] - params
2352
+ */
2353
+ async function addresses_list(client, params) {
2354
+ return client.get(`/api/pay/addresses`, params);
2355
+ }
2356
+ /**
2357
+ * Create an address
2358
+ * Adds a new address to the member's customer record. If an identical address already exists it is returned instead of creating a duplicate.
2359
+ *
2360
+ * @param client - Fetch client instance
2361
+ * @param body - body
2362
+ */
2363
+ async function addresses_create(client, body) {
2364
+ return client.post(`/api/pay/addresses`, body);
2365
+ }
2366
+ /**
2367
+ * Update an address
2368
+ * Creates a new address with the merged attributes and discards the old one, preserving references from existing orders.
2369
+ *
2370
+ * @param client - Fetch client instance
2371
+ * @param id - id
2372
+ * @param body - body
2373
+ */
2374
+ async function addresses_update(client, id, body) {
2375
+ return client.patch(`/api/pay/addresses/${id}`, body);
2376
+ }
2377
+ /**
2378
+ * Delete an address
2379
+ * Removes an address from the member's customer record. The default address cannot be removed.
2380
+ *
2381
+ * @param client - Fetch client instance
2382
+ * @param id - id
2383
+ */
2384
+ async function addresses_destroy(client, id) {
2385
+ return client.delete(`/api/pay/addresses/${id}`);
2386
+ }
2387
+ /**
2388
+ * List payment methods
2389
+ * Returns displayable payment methods on the member's customer record, excluding Apple Pay sources.
2390
+ *
2391
+ * @param client - Fetch client instance
2392
+ * @param [params] - params
2393
+ */
2394
+ async function payment_methods_list(client, params) {
2395
+ return client.get(`/api/pay/payment_methods`, params);
2396
+ }
2397
+ /**
2398
+ * Create a payment method
2399
+ * Tokenizes and stores a new payment method via the vault provider. Requires a vault token obtained from the vault credentials endpoint.
2400
+ *
2401
+ * @param client - Fetch client instance
2402
+ * @param body - body
2403
+ */
2404
+ async function payment_methods_create(client, body) {
2405
+ return client.post(`/api/pay/payment_methods`, body);
2406
+ }
2407
+ /**
2408
+ * Update a payment method
2409
+ * Updates a payment method's attributes. Currently supports setting a payment method as the default.
2410
+ *
2411
+ * @param client - Fetch client instance
2412
+ * @param id - id
2413
+ * @param body - body
2414
+ */
2415
+ async function payment_methods_update(client, id, body) {
2416
+ return client.patch(`/api/pay/payment_methods/${id}`, body);
2417
+ }
2418
+ /**
2419
+ * Delete a payment method
2420
+ * Removes a payment method from the member's customer record. If the removed method was the default, the default is cleared.
2421
+ *
2422
+ * @param client - Fetch client instance
2423
+ * @param id - id
2424
+ */
2425
+ async function payment_methods_destroy(client, id) {
2426
+ return client.delete(`/api/pay/payment_methods/${id}`);
2427
+ }
2428
+ /**
2429
+ * Get vault credentials
2430
+ * Returns a short-lived vault token and environment identifier for initializing the client-side payment vault SDK.
2431
+ *
2432
+ * @param client - Fetch client instance
2433
+
2434
+ */
2435
+ async function payment_methods_vault_show(client) {
2436
+ return client.get(`/api/pay/payment_methods/vault`);
2437
+ }
2438
+ /**
2439
+ * List points ledger entries
2440
+ * Returns loyalty points ledger entries for the member's customer record in this tenant, ordered by most recent first.
2441
+ *
2442
+ * @param client - Fetch client instance
2443
+ * @param [params] - params
2444
+ */
2445
+ async function points_ledgers_list(client, params) {
2446
+ return client.get(`/api/pay/points_ledgers`, params);
2447
+ }
2448
+ //#endregion
2449
+ //#region src/adapters/pay-api-adapter.ts
2450
+ function mapAddress(raw) {
2451
+ return {
2452
+ id: raw.id ?? 0,
2453
+ street1: raw.street1 ?? "",
2454
+ street2: raw.street2 ?? null,
2455
+ city: raw.city ?? "",
2456
+ state: raw.state ?? "",
2457
+ zip: raw.zip ?? "",
2458
+ country: raw.country ?? "",
2459
+ default: raw.default ?? false,
2460
+ created_at: raw.created_at ?? null,
2461
+ updated_at: raw.updated_at ?? null
2462
+ };
2463
+ }
2464
+ function mapPaymentMethod(raw) {
2465
+ return {
2466
+ id: raw.id ?? 0,
2467
+ type: raw.type ?? "card",
2468
+ brand: raw.brand ?? null,
2469
+ last_four: raw.last_four ?? "",
2470
+ exp_month: raw.exp_month ?? null,
2471
+ exp_year: raw.exp_year ?? null,
2472
+ default: raw.default ?? false,
2473
+ created_at: raw.created_at ?? null,
2474
+ updated_at: raw.updated_at ?? null
2475
+ };
2476
+ }
2477
+ function createPortalTenantPayAdapter(client) {
2478
+ return {
2479
+ fetchAddresses: async () => {
2480
+ const response = await addresses_list(client);
2481
+ return {
2482
+ addresses: (response.addresses ?? []).map(mapAddress),
2483
+ meta: {
2484
+ request_id: response.meta?.request_id ?? "",
2485
+ timestamp: response.meta?.timestamp ?? ""
2486
+ }
2487
+ };
2488
+ },
2489
+ createAddress: async (body) => {
2490
+ await addresses_create(client, body);
2491
+ },
2492
+ updateAddress: async (addressId, body) => {
2493
+ await addresses_update(client, addressId, body);
2494
+ },
2495
+ deleteAddress: async (addressId) => {
2496
+ await addresses_destroy(client, addressId);
2497
+ },
2498
+ fetchPaymentMethods: async () => {
2499
+ const response = await payment_methods_list(client);
2500
+ return {
2501
+ payment_methods: (response.payment_methods ?? []).map(mapPaymentMethod),
2502
+ meta: {
2503
+ request_id: response.meta?.request_id ?? "",
2504
+ timestamp: response.meta?.timestamp ?? ""
2505
+ }
2506
+ };
2507
+ },
2508
+ createPaymentMethod: async (body) => {
2509
+ await payment_methods_create(client, body);
2510
+ },
2511
+ updatePaymentMethod: async (paymentMethodId, body) => {
2512
+ await payment_methods_update(client, paymentMethodId, body);
2513
+ },
2514
+ deletePaymentMethod: async (paymentMethodId) => {
2515
+ await payment_methods_destroy(client, paymentMethodId);
2516
+ },
2517
+ fetchVaultCredentials: async () => {
2518
+ const response = await payment_methods_vault_show(client);
2519
+ return {
2520
+ vault: {
2521
+ token: response.vault?.token ?? null,
2522
+ environment: response.vault?.environment ?? "production"
2523
+ },
2524
+ meta: {
2525
+ request_id: response.meta?.request_id ?? "",
2526
+ timestamp: response.meta?.timestamp ?? ""
2527
+ }
2528
+ };
2529
+ },
2530
+ fetchPointsLedgers: async () => {
2531
+ const response = await points_ledgers_list(client);
2532
+ return {
2533
+ points_ledgers: (response.points_ledgers ?? []).map((entry) => ({
2534
+ id: entry.id ?? 0,
2535
+ amount: entry.amount ?? 0,
2536
+ total_balance: entry.total_balance ?? 0,
2537
+ metadata: entry.metadata ?? null,
2538
+ created_at: entry.created_at ?? ""
2539
+ })),
2540
+ meta: {
2541
+ request_id: response.meta?.request_id ?? "",
2542
+ timestamp: response.meta?.timestamp ?? ""
2543
+ }
2544
+ };
2545
+ }
2546
+ };
2547
+ }
2548
+ //#endregion
2287
2549
  //#region src/providers/FluidThemeProvider.tsx
2288
2550
  /**
2289
2551
  * Theme Provider for Fluid SDK
@@ -2645,6 +2907,8 @@ function FluidProvider({ config, children, queryClient, initialTheme, themeConta
2645
2907
  defaultHeaders: { ...csrfToken ? { "X-CSRF-Token": csrfToken } : {} }
2646
2908
  }), [config.baseUrl, csrfToken]);
2647
2909
  const appDefinitionApi = useMemo(() => createAppDefinitionApiAdapter(portalTenantClient), [portalTenantClient]);
2910
+ const accountApi = useMemo(() => createAccountApiAdapter(portalTenantClient), [portalTenantClient]);
2911
+ const payApi = useMemo(() => createPortalTenantPayAdapter(portalTenantClient), [portalTenantClient]);
2648
2912
  const contextValue = useMemo(() => ({
2649
2913
  client,
2650
2914
  config: configRef.current
@@ -2679,13 +2943,19 @@ function FluidProvider({ config, children, queryClient, initialTheme, themeConta
2679
2943
  value: fluidOsApi,
2680
2944
  children: /* @__PURE__ */ jsx(AppDefinitionApiProvider, {
2681
2945
  value: appDefinitionApi,
2682
- children: /* @__PURE__ */ jsx(ProviderStack, {
2683
- baseUrl: dataSourceBaseUrl,
2684
- getApiHeaders,
2685
- variables: effectiveVariables,
2686
- registry,
2687
- themeProviderProps,
2688
- children
2946
+ children: /* @__PURE__ */ jsx(AccountApiProvider, {
2947
+ value: accountApi,
2948
+ children: /* @__PURE__ */ jsx(PayApiProvider, {
2949
+ value: payApi,
2950
+ children: /* @__PURE__ */ jsx(ProviderStack, {
2951
+ baseUrl: dataSourceBaseUrl,
2952
+ getApiHeaders,
2953
+ variables: effectiveVariables,
2954
+ registry,
2955
+ themeProviderProps,
2956
+ children
2957
+ })
2958
+ })
2689
2959
  })
2690
2960
  })
2691
2961
  })
@@ -2721,6 +2991,6 @@ function useFluidContext() {
2721
2991
  return context;
2722
2992
  }
2723
2993
  //#endregion
2724
- export { AUTH_CONSTANTS as $, DEFAULT_FONT_FAMILIES as A, getForegroundColor as B, removeTheme as C, deleteDatabase as Ct, deserialiseTheme as D, transformThemes as E, DEFAULT_THEME_NAME as F, FONT_SIZE_KEYS as G, parseColor as H, getDefaultThemeDefinition as I, SHADE_STEPS as J, RADIUS_KEYS as K, generateThemeCSS as L, DEFAULT_RADII as M, DEFAULT_SPACING as N, serialiseTheme as O, DEFAULT_THEME_ID as P, clearTokens as Q, deriveDarkVariant as R, removeAllThemes as S, createPersister as St, getActiveThemeId as T, resolveTheme as U, mergeDarkOverrides as V, FONT_FAMILY_KEYS as W, createDefaultAuthRedirect as X, DEFAULT_AUTH_URL as Y, cleanTokenFromUrl as Z, transformManifestToRepAppData as _, subscriptions_update as _t, createScreen as a, orders_show as at, toScreenDefinition as b, useAppDefinitionApi as bt, FluidAuthProvider as c, products_search as ct, FluidThemeProvider as d, subscriptions_list as dt, USER_TYPES as et, useThemeContext as f, subscriptions_pause as ft, toRawManifest as g, subscriptions_skip as gt, isApiError as h, subscriptions_show as ht, widgetPropertySchemas as i, orders_list as it, DEFAULT_FONT_SIZES as j, DEFAULT_COLORS as k, useFluidAuthContext as l, products_show as lt, createFluidClient as m, subscriptions_resume as mt, useFluidContext as n, account_show as nt, createWidgetFromShareable as o, products_list as ot, ApiError as p, subscriptions_reactivate as pt, SEMANTIC_COLOR_NAMES as q, DEFAULT_SDK_WIDGET_REGISTRY as r, account_update as rt, createWidgetRegistry as s, products_media_list as st, FluidProvider as t, isUserType as tt, usePortalTenantClient as u, subscriptions_cancel as ut, toNavigationItem as v, ApiError$1 as vt, buildThemeDefinition as w, applyTheme as x, useFluidOsApiOptional as xt, normalizeComponentTree as y, createFetchClient as yt, generateShades as z };
2994
+ export { AUTH_CONSTANTS as $, DEFAULT_FONT_FAMILIES as A, getForegroundColor as B, removeTheme as C, deleteDatabase as Ct, deserialiseTheme as D, transformThemes as E, DEFAULT_THEME_NAME as F, FONT_SIZE_KEYS as G, parseColor as H, getDefaultThemeDefinition as I, SHADE_STEPS as J, RADIUS_KEYS as K, generateThemeCSS as L, DEFAULT_RADII as M, DEFAULT_SPACING as N, serialiseTheme as O, DEFAULT_THEME_ID as P, clearTokens as Q, deriveDarkVariant as R, removeAllThemes as S, createPersister as St, getActiveThemeId as T, resolveTheme as U, mergeDarkOverrides as V, FONT_FAMILY_KEYS as W, createDefaultAuthRedirect as X, DEFAULT_AUTH_URL as Y, cleanTokenFromUrl as Z, transformManifestToRepAppData as _, createFetchClient as _t, createScreen as a, products_media_list as at, toScreenDefinition as b, useAppDefinitionApi as bt, FluidAuthProvider as c, subscriptions_cancel as ct, FluidThemeProvider as d, subscriptions_reactivate as dt, USER_TYPES as et, useThemeContext as f, subscriptions_resume as ft, toRawManifest as g, ApiError$1 as gt, isApiError as h, subscriptions_update as ht, widgetPropertySchemas as i, products_list as it, DEFAULT_FONT_SIZES as j, DEFAULT_COLORS as k, useFluidAuthContext as l, subscriptions_list as lt, createFluidClient as m, subscriptions_skip as mt, useFluidContext as n, orders_list as nt, createWidgetFromShareable as o, products_search as ot, ApiError as p, subscriptions_show as pt, SEMANTIC_COLOR_NAMES as q, DEFAULT_SDK_WIDGET_REGISTRY as r, orders_show as rt, createWidgetRegistry as s, products_show as st, FluidProvider as t, isUserType as tt, usePortalTenantClient as u, subscriptions_pause as ut, toNavigationItem as v, usePayApi as vt, buildThemeDefinition as w, applyTheme as x, useFluidOsApiOptional as xt, normalizeComponentTree as y, useAccountApi as yt, generateShades as z };
2725
2995
 
2726
- //# sourceMappingURL=FluidProvider-BIoYteOA.mjs.map
2996
+ //# sourceMappingURL=FluidProvider-Bs9eWShT.mjs.map