@fluid-app/portal-sdk 0.1.143 → 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.
- package/dist/{AppDownloadScreen-BgG2WT8g.cjs → AppDownloadScreen-CxkoYLT6.cjs} +2 -2
- package/dist/{AppDownloadScreen-BgG2WT8g.cjs.map → AppDownloadScreen-CxkoYLT6.cjs.map} +1 -1
- package/dist/{AppDownloadScreen-CfyCY70_.cjs → AppDownloadScreen-DXZpoE5A.cjs} +2 -2
- package/dist/{AppDownloadScreen-CFBcywVF.mjs → AppDownloadScreen-ga-5O4jr.mjs} +2 -2
- package/dist/{AppDownloadScreen-CFBcywVF.mjs.map → AppDownloadScreen-ga-5O4jr.mjs.map} +1 -1
- package/dist/{ContactsScreen-B0CcTg4i.mjs → ContactsScreen-C-xJcR5X.mjs} +6 -6
- package/dist/{ContactsScreen-B0CcTg4i.mjs.map → ContactsScreen-C-xJcR5X.mjs.map} +1 -1
- package/dist/{ContactsScreen-cq-zMYwU.cjs → ContactsScreen-DYkGu477.cjs} +7 -7
- package/dist/{ContactsScreen-C2SykfSe.cjs → ContactsScreen-RQ1IENFl.cjs} +6 -6
- package/dist/{ContactsScreen-C2SykfSe.cjs.map → ContactsScreen-RQ1IENFl.cjs.map} +1 -1
- package/dist/{FluidProvider-D8lmeIsK.mjs → FluidProvider-Bs9eWShT.mjs} +226 -9
- package/dist/FluidProvider-Bs9eWShT.mjs.map +1 -0
- package/dist/{FluidProvider-9laphShJ.cjs → FluidProvider-DzCUwDPA.cjs} +231 -8
- package/dist/FluidProvider-DzCUwDPA.cjs.map +1 -0
- package/dist/{MessagingScreen-CQGyTGz7.cjs → MessagingScreen-BmAICPkY.cjs} +4 -4
- package/dist/{MessagingScreen-DY8FhtNu.cjs → MessagingScreen-D7hAjWaG.cjs} +5 -5
- package/dist/{MessagingScreen-DY8FhtNu.cjs.map → MessagingScreen-D7hAjWaG.cjs.map} +1 -1
- package/dist/{MessagingScreen-DmwSYXYa.mjs → MessagingScreen-DOcgxDbR.mjs} +4 -4
- package/dist/{MessagingScreen-DmwSYXYa.mjs.map → MessagingScreen-DOcgxDbR.mjs.map} +1 -1
- package/dist/{MySiteScreen-CZf06WvK.cjs → MySiteScreen-BMFJLAwJ.cjs} +2 -2
- package/dist/{MySiteScreen-CZf06WvK.cjs.map → MySiteScreen-BMFJLAwJ.cjs.map} +1 -1
- package/dist/{MySiteScreen-CP4ePv25.mjs → MySiteScreen-BwCQLYBT.mjs} +2 -2
- package/dist/{MySiteScreen-CP4ePv25.mjs.map → MySiteScreen-BwCQLYBT.mjs.map} +1 -1
- package/dist/{MySiteScreen-3uoP4Nro.cjs → MySiteScreen-C_-EPLsj.cjs} +2 -2
- package/dist/{OrdersScreen-B4s3yqWO.cjs → OrdersScreen-DHoIUinY.cjs} +3 -3
- package/dist/{OrdersScreen-B4s3yqWO.cjs.map → OrdersScreen-DHoIUinY.cjs.map} +1 -1
- package/dist/{OrdersScreen-qnOfswUT.cjs → OrdersScreen-DgBe0kl9.cjs} +3 -3
- package/dist/{OrdersScreen-DE1lIZKm.mjs → OrdersScreen-ihhKswAb.mjs} +3 -3
- package/dist/{OrdersScreen-DE1lIZKm.mjs.map → OrdersScreen-ihhKswAb.mjs.map} +1 -1
- package/dist/{ProductsScreen-chLWiA1J.mjs → ProductsScreen-BbgYlCfQ.mjs} +6 -6
- package/dist/{ProductsScreen-chLWiA1J.mjs.map → ProductsScreen-BbgYlCfQ.mjs.map} +1 -1
- package/dist/{ProductsScreen-Bq1Q_T06.cjs → ProductsScreen-BulxEN71.cjs} +7 -7
- package/dist/{ProductsScreen-DA0yNpXn.mjs → ProductsScreen-OPY76KpG.mjs} +6 -7
- package/dist/{ProductsScreen-CC1BM7Ye.cjs → ProductsScreen-snrXLhuy.cjs} +6 -6
- package/dist/{ProductsScreen-CC1BM7Ye.cjs.map → ProductsScreen-snrXLhuy.cjs.map} +1 -1
- package/dist/{ProfileScreen-CxvAKgdU.cjs → ProfileScreen-CES4uRpE.cjs} +2 -2
- package/dist/{ProfileScreen-Dm8EcLVL.cjs → ProfileScreen-CPCkXse4.cjs} +4 -5
- package/dist/{ProfileScreen-Dm8EcLVL.cjs.map → ProfileScreen-CPCkXse4.cjs.map} +1 -1
- package/dist/{ProfileScreen-DmV9jRth.mjs → ProfileScreen-doxUb6Ud.mjs} +3 -4
- package/dist/{ProfileScreen-DmV9jRth.mjs.map → ProfileScreen-doxUb6Ud.mjs.map} +1 -1
- package/dist/{SearchSort-CyeeUmwC.cjs → SearchSort-DOLoubGE.cjs} +1 -1
- package/dist/{SearchSort-CyeeUmwC.cjs.map → SearchSort-DOLoubGE.cjs.map} +1 -1
- package/dist/{SearchSort-BXklP8Pq.mjs → SearchSort-LZm-VfF7.mjs} +1 -1
- package/dist/{SearchSort-BXklP8Pq.mjs.map → SearchSort-LZm-VfF7.mjs.map} +1 -1
- package/dist/{ShareablesScreen-CNmjazDa.cjs → ShareablesScreen-B6-BcjEt.cjs} +7 -7
- package/dist/{ShareablesScreen-B9iGTVVk.mjs → ShareablesScreen-CJk0udFG.mjs} +7 -7
- package/dist/{ShareablesScreen-B9iGTVVk.mjs.map → ShareablesScreen-CJk0udFG.mjs.map} +1 -1
- package/dist/{ShareablesScreen-CVkk0Lpn.cjs → ShareablesScreen-DaQAxGCr.cjs} +7 -7
- package/dist/{ShareablesScreen-CVkk0Lpn.cjs.map → ShareablesScreen-DaQAxGCr.cjs.map} +1 -1
- package/dist/{ShareablesScreen-D7cFD7Sn.mjs → ShareablesScreen-yC7UrhhU.mjs} +6 -7
- package/dist/{ShopScreen-BdyMXm0s.mjs → ShopScreen-B3kyH-AP.mjs} +5 -5
- package/dist/{ShopScreen-BdyMXm0s.mjs.map → ShopScreen-B3kyH-AP.mjs.map} +1 -1
- package/dist/{ShopScreen-B5GJr-kG.cjs → ShopScreen-D6JAjTai.cjs} +5 -5
- package/dist/{ShopScreen-B5GJr-kG.cjs.map → ShopScreen-D6JAjTai.cjs.map} +1 -1
- package/dist/{ShopScreen-Che0Axn9.cjs → ShopScreen-DUpCS4va.cjs} +3 -3
- package/dist/{SubscriptionsScreen-xNd35SPG.cjs → SubscriptionsScreen-CEkKX-O9.cjs} +5 -5
- package/dist/{SubscriptionsScreen-xNd35SPG.cjs.map → SubscriptionsScreen-CEkKX-O9.cjs.map} +1 -1
- package/dist/{SubscriptionsScreen-BqiGuMsz.mjs → SubscriptionsScreen-DlRbMhFz.mjs} +5 -5
- package/dist/{SubscriptionsScreen-BqiGuMsz.mjs.map → SubscriptionsScreen-DlRbMhFz.mjs.map} +1 -1
- package/dist/{SubscriptionsScreen-DHYHBWVD.cjs → SubscriptionsScreen-jpRkUvPY.cjs} +5 -5
- package/dist/{dist-Cl4FsM3V.mjs → dist-B8padP0r.mjs} +2 -2
- package/dist/{dist-Cl4FsM3V.mjs.map → dist-B8padP0r.mjs.map} +1 -1
- package/dist/{dist-CbeLS2R5.cjs → dist-BoyKnTdv.cjs} +2 -2
- package/dist/{dist-CbeLS2R5.cjs.map → dist-BoyKnTdv.cjs.map} +1 -1
- package/dist/{dist-BbS_7TvS.cjs → dist-DRVtlgQ1.cjs} +1 -1
- package/dist/{dist-BbS_7TvS.cjs.map → dist-DRVtlgQ1.cjs.map} +1 -1
- package/dist/{dist-CMGXkSgZ.mjs → dist-NMbUD0qE.mjs} +1 -1
- package/dist/{dist-CMGXkSgZ.mjs.map → dist-NMbUD0qE.mjs.map} +1 -1
- package/dist/{es-BSkb3AZk.cjs → es-DlWO6buB.cjs} +1 -1
- package/dist/{es-BSkb3AZk.cjs.map → es-DlWO6buB.cjs.map} +1 -1
- package/dist/index.cjs +41 -41
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +40 -40
- package/dist/{order-status-badge-DsbuULAc.cjs → order-status-badge-BqoNJ8XK.cjs} +1 -1
- package/dist/{order-status-badge-DsbuULAc.cjs.map → order-status-badge-BqoNJ8XK.cjs.map} +1 -1
- package/dist/{order-status-badge-B-iGmxDO.mjs → order-status-badge-CkvYyjT7.mjs} +1 -1
- package/dist/{order-status-badge-B-iGmxDO.mjs.map → order-status-badge-CkvYyjT7.mjs.map} +1 -1
- package/dist/{portal-tenant-product-media-adapter-y_yCswfv.mjs → portal-tenant-product-media-adapter-BHtx3DdM.mjs} +4 -4
- package/dist/{portal-tenant-product-media-adapter-y_yCswfv.mjs.map → portal-tenant-product-media-adapter-BHtx3DdM.mjs.map} +1 -1
- package/dist/{portal-tenant-product-media-adapter-DmH2iJvp.cjs → portal-tenant-product-media-adapter-qXW0vGG8.cjs} +5 -5
- package/dist/{portal-tenant-product-media-adapter-DmH2iJvp.cjs.map → portal-tenant-product-media-adapter-qXW0vGG8.cjs.map} +1 -1
- package/dist/{use-account-clients-CrfXjWkZ.cjs → use-account-clients-GUakuhX-.cjs} +2 -216
- package/dist/use-account-clients-GUakuhX-.cjs.map +1 -0
- package/dist/{use-account-clients-B6QsWPOL.mjs → use-account-clients-d3FMT7rH.mjs} +3 -211
- package/dist/use-account-clients-d3FMT7rH.mjs.map +1 -0
- package/dist/{use-current-user-tKZEo3eh.mjs → use-current-user-Cjd0lFyc.mjs} +3 -3
- package/dist/{use-current-user-tKZEo3eh.mjs.map → use-current-user-Cjd0lFyc.mjs.map} +1 -1
- package/dist/{use-current-user-BcmQRCRx.cjs → use-current-user-idj1wuKD.cjs} +3 -3
- package/dist/{use-current-user-BcmQRCRx.cjs.map → use-current-user-idj1wuKD.cjs.map} +1 -1
- package/dist/{use-fluid-api-9llkapbM.mjs → use-fluid-api-DdMmBE5K.mjs} +2 -2
- package/dist/{use-fluid-api-9llkapbM.mjs.map → use-fluid-api-DdMmBE5K.mjs.map} +1 -1
- package/dist/{use-fluid-api-Cj5Bow8S.cjs → use-fluid-api-DnDH2bby.cjs} +2 -2
- package/dist/{use-fluid-api-Cj5Bow8S.cjs.map → use-fluid-api-DnDH2bby.cjs.map} +1 -1
- package/dist/{use-fluid-auth-D4NGGBW0.cjs → use-fluid-auth-CcxpIYkI.cjs} +2 -2
- package/dist/{use-fluid-auth-D4NGGBW0.cjs.map → use-fluid-auth-CcxpIYkI.cjs.map} +1 -1
- package/dist/{use-fluid-auth-vb2QMUi4.mjs → use-fluid-auth-_LboeZI9.mjs} +2 -2
- package/dist/{use-fluid-auth-vb2QMUi4.mjs.map → use-fluid-auth-_LboeZI9.mjs.map} +1 -1
- package/dist/{use-portal-products-client-CJjec9vb.mjs → use-portal-products-client-DA7Vop2s.mjs} +2 -2
- package/dist/{use-portal-products-client-CJjec9vb.mjs.map → use-portal-products-client-DA7Vop2s.mjs.map} +1 -1
- package/dist/{use-portal-products-client-3JPetPQU.cjs → use-portal-products-client-DAXn2JSf.cjs} +2 -2
- package/dist/{use-portal-products-client-3JPetPQU.cjs.map → use-portal-products-client-DAXn2JSf.cjs.map} +1 -1
- package/package.json +19 -19
- package/dist/FluidProvider-9laphShJ.cjs.map +0 -1
- package/dist/FluidProvider-D8lmeIsK.mjs.map +0 -1
- package/dist/use-account-clients-B6QsWPOL.mjs.map +0 -1
- package/dist/use-account-clients-CrfXjWkZ.cjs.map +0 -1
- /package/dist/{src-zEMEV1KP.mjs → src-6SxtfYk9.mjs} +0 -0
- /package/dist/{src-CzwiFO_J.cjs → src-ClULVolb.cjs} +0 -0
|
@@ -500,6 +500,15 @@ function useAccountApi() {
|
|
|
500
500
|
return api;
|
|
501
501
|
}
|
|
502
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
|
|
503
512
|
//#region ../../platform/api-client-core/src/fetch-client.ts
|
|
504
513
|
/**
|
|
505
514
|
* API Error class compatible with fluid-admin's ApiError
|
|
@@ -2333,6 +2342,210 @@ function createAccountApiAdapter(client) {
|
|
|
2333
2342
|
};
|
|
2334
2343
|
}
|
|
2335
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
|
|
2336
2549
|
//#region src/providers/FluidThemeProvider.tsx
|
|
2337
2550
|
/**
|
|
2338
2551
|
* Theme Provider for Fluid SDK
|
|
@@ -2695,6 +2908,7 @@ function FluidProvider({ config, children, queryClient, initialTheme, themeConta
|
|
|
2695
2908
|
}), [config.baseUrl, csrfToken]);
|
|
2696
2909
|
const appDefinitionApi = useMemo(() => createAppDefinitionApiAdapter(portalTenantClient), [portalTenantClient]);
|
|
2697
2910
|
const accountApi = useMemo(() => createAccountApiAdapter(portalTenantClient), [portalTenantClient]);
|
|
2911
|
+
const payApi = useMemo(() => createPortalTenantPayAdapter(portalTenantClient), [portalTenantClient]);
|
|
2698
2912
|
const contextValue = useMemo(() => ({
|
|
2699
2913
|
client,
|
|
2700
2914
|
config: configRef.current
|
|
@@ -2731,13 +2945,16 @@ function FluidProvider({ config, children, queryClient, initialTheme, themeConta
|
|
|
2731
2945
|
value: appDefinitionApi,
|
|
2732
2946
|
children: /* @__PURE__ */ jsx(AccountApiProvider, {
|
|
2733
2947
|
value: accountApi,
|
|
2734
|
-
children: /* @__PURE__ */ jsx(
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
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
|
+
})
|
|
2741
2958
|
})
|
|
2742
2959
|
})
|
|
2743
2960
|
})
|
|
@@ -2774,6 +2991,6 @@ function useFluidContext() {
|
|
|
2774
2991
|
return context;
|
|
2775
2992
|
}
|
|
2776
2993
|
//#endregion
|
|
2777
|
-
export { AUTH_CONSTANTS as $, DEFAULT_FONT_FAMILIES as A, getForegroundColor as B, removeTheme as C, 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,
|
|
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 };
|
|
2778
2995
|
|
|
2779
|
-
//# sourceMappingURL=FluidProvider-
|
|
2996
|
+
//# sourceMappingURL=FluidProvider-Bs9eWShT.mjs.map
|