@fluid-app/portal-sdk 0.1.157 → 0.1.159
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-WwHX3yXD.mjs → AppDownloadScreen-1e6AaZ4X.mjs} +1 -1
- package/dist/{AppDownloadScreen-WwHX3yXD.mjs.map → AppDownloadScreen-1e6AaZ4X.mjs.map} +1 -1
- package/dist/{AppDownloadScreen-36KhhLiw.cjs → AppDownloadScreen-BSkt2tYd.cjs} +1 -1
- package/dist/{AppDownloadScreen-36KhhLiw.cjs.map → AppDownloadScreen-BSkt2tYd.cjs.map} +1 -1
- package/dist/{AppNavigationContext-r22AeKGk.cjs → AppNavigationContext-BiYNDj_X.cjs} +1 -1
- package/dist/{AppNavigationContext-r22AeKGk.cjs.map → AppNavigationContext-BiYNDj_X.cjs.map} +1 -1
- package/dist/{AppNavigationContext-DTdo1dEH.mjs → AppNavigationContext-D29xW9Ua.mjs} +1 -1
- package/dist/{AppNavigationContext-DTdo1dEH.mjs.map → AppNavigationContext-D29xW9Ua.mjs.map} +1 -1
- package/dist/{ContactsScreen-CmnKU--w.mjs → ContactsScreen-BOp7_5HV.mjs} +5 -5
- package/dist/{ContactsScreen-CmnKU--w.mjs.map → ContactsScreen-BOp7_5HV.mjs.map} +1 -1
- package/dist/{ContactsScreen-Ck5NCh9d.cjs → ContactsScreen-BUjE0Idb.cjs} +5 -5
- package/dist/{ContactsScreen-Ck5NCh9d.cjs.map → ContactsScreen-BUjE0Idb.cjs.map} +1 -1
- package/dist/{ContactsScreen-BKQk5wU5.cjs → ContactsScreen-BiQdoJnm.cjs} +6 -6
- package/dist/{CustomersScreen-CeIiZKrq.cjs → CustomersScreen-CSLbl2As.cjs} +1 -1
- package/dist/{CustomersScreen-CeIiZKrq.cjs.map → CustomersScreen-CSLbl2As.cjs.map} +1 -1
- package/dist/{CustomersScreen-CLJY12Zr.mjs → CustomersScreen-DbaqP6jd.mjs} +1 -1
- package/dist/{CustomersScreen-CLJY12Zr.mjs.map → CustomersScreen-DbaqP6jd.mjs.map} +1 -1
- package/dist/{MessagingScreen-s9HaMQGR.cjs → MessagingScreen-BGqIn-c2.cjs} +3 -3
- package/dist/{MessagingScreen-lAO4PVqi.cjs → MessagingScreen-CBPjP4du.cjs} +3 -3
- package/dist/{MessagingScreen-lAO4PVqi.cjs.map → MessagingScreen-CBPjP4du.cjs.map} +1 -1
- package/dist/{MessagingScreen-B1MbKdSO.mjs → MessagingScreen-CbmuvlH6.mjs} +2 -2
- package/dist/{MessagingScreen-B1MbKdSO.mjs.map → MessagingScreen-CbmuvlH6.mjs.map} +1 -1
- package/dist/{MySiteScreen-BEbj9K8U.mjs → MySiteScreen-BT1PBPsH.mjs} +3 -3
- package/dist/{MySiteScreen-BEbj9K8U.mjs.map → MySiteScreen-BT1PBPsH.mjs.map} +1 -1
- package/dist/{MySiteScreen-D8YvEYwH.cjs → MySiteScreen-Cl6nuU99.cjs} +3 -3
- package/dist/{MySiteScreen-D8YvEYwH.cjs.map → MySiteScreen-Cl6nuU99.cjs.map} +1 -1
- package/dist/{MySiteScreen-DIbwHNbV.cjs → MySiteScreen-DSDLDnCN.cjs} +2 -2
- package/dist/{OrdersScreen-Dxv6ZQlu.cjs → OrdersScreen-B7puF8He.cjs} +3 -3
- package/dist/{OrdersScreen-CSbbQw2L.mjs → OrdersScreen-CaNiwSih.mjs} +5 -16
- package/dist/OrdersScreen-CaNiwSih.mjs.map +1 -0
- package/dist/{OrdersScreen-DLjDPnqI.cjs → OrdersScreen-tSpfcNlK.cjs} +5 -16
- package/dist/OrdersScreen-tSpfcNlK.cjs.map +1 -0
- package/dist/{ProductsScreen-CcRQhx0c.mjs → ProductsScreen-4WRrJcvw.mjs} +4 -4
- package/dist/{ProductsScreen-CcRQhx0c.mjs.map → ProductsScreen-4WRrJcvw.mjs.map} +1 -1
- package/dist/{ProductsScreen-DTBg7Bm3.cjs → ProductsScreen-BCs3YKVk.cjs} +4 -4
- package/dist/{ProductsScreen-DTBg7Bm3.cjs.map → ProductsScreen-BCs3YKVk.cjs.map} +1 -1
- package/dist/{ProductsScreen-NmOdT82w.cjs → ProductsScreen-BR9TN4So.cjs} +7 -7
- package/dist/{ProductsScreen-MADYD0MH.mjs → ProductsScreen-Da6eWJ_c.mjs} +6 -6
- package/dist/{ProfileScreen-C01vRpm3.cjs → ProfileScreen-B0KNWXpV.cjs} +1 -1
- package/dist/{ProfileScreen-BcCYQt5U.mjs → ProfileScreen-BgyrIQdL.mjs} +4 -9
- package/dist/{ProfileScreen-BcCYQt5U.mjs.map → ProfileScreen-BgyrIQdL.mjs.map} +1 -1
- package/dist/{ProfileScreen-fmUckcMP.cjs → ProfileScreen-DLLLRNB2.cjs} +14 -19
- package/dist/ProfileScreen-DLLLRNB2.cjs.map +1 -0
- package/dist/{SearchSort-CZvjMXhS.cjs → SearchSort--3bVTMB4.cjs} +1 -1
- package/dist/{SearchSort-CZvjMXhS.cjs.map → SearchSort--3bVTMB4.cjs.map} +1 -1
- package/dist/{SearchSort-BSUeC9WT.mjs → SearchSort-Bsnis-kb.mjs} +1 -1
- package/dist/{SearchSort-BSUeC9WT.mjs.map → SearchSort-Bsnis-kb.mjs.map} +1 -1
- package/dist/{ShareablesScreen-WW2uw8wV.mjs → ShareablesScreen-B8cmh8JC.mjs} +4 -4
- package/dist/{ShareablesScreen-WW2uw8wV.mjs.map → ShareablesScreen-B8cmh8JC.mjs.map} +1 -1
- package/dist/{ShareablesScreen-BkVWntLq.mjs → ShareablesScreen-DW0wCYOj.mjs} +6 -6
- package/dist/{ShareablesScreen-BMxugV_y.cjs → ShareablesScreen-DbPJOtCF.cjs} +7 -7
- package/dist/{ShareablesScreen-DmtFkpDO.cjs → ShareablesScreen-ySSwCVSI.cjs} +4 -4
- package/dist/{ShareablesScreen-DmtFkpDO.cjs.map → ShareablesScreen-ySSwCVSI.cjs.map} +1 -1
- package/dist/{ShopScreen-DQDOi7Xn.mjs → ShopScreen-BFFGYwdV.mjs} +4 -4
- package/dist/{ShopScreen-DQDOi7Xn.mjs.map → ShopScreen-BFFGYwdV.mjs.map} +1 -1
- package/dist/{ShopScreen-D2DmHW7P.cjs → ShopScreen-BkvyW0pE.cjs} +2 -2
- package/dist/{ShopScreen-BeBh8oUd.cjs → ShopScreen-DhMo8bvP.cjs} +4 -4
- package/dist/{ShopScreen-BeBh8oUd.cjs.map → ShopScreen-DhMo8bvP.cjs.map} +1 -1
- package/dist/{SubscriptionsScreen-Bh6hyLOm.mjs → SubscriptionsScreen-CiNR7JUC.mjs} +5 -5
- package/dist/{SubscriptionsScreen-Bh6hyLOm.mjs.map → SubscriptionsScreen-CiNR7JUC.mjs.map} +1 -1
- package/dist/{SubscriptionsScreen-BBKc60-g.cjs → SubscriptionsScreen-DMh-GE6n.cjs} +4 -4
- package/dist/{SubscriptionsScreen-CwglxGt2.cjs → SubscriptionsScreen-RScBCcY0.cjs} +5 -5
- package/dist/{SubscriptionsScreen-CwglxGt2.cjs.map → SubscriptionsScreen-RScBCcY0.cjs.map} +1 -1
- package/dist/{UpgradeScreen-C_CmZez0.cjs → UpgradeScreen-Bk35epg9.cjs} +1 -1
- package/dist/{UpgradeScreen-Cizm99Om.cjs → UpgradeScreen-BlztCeo5.cjs} +1 -1
- package/dist/{UpgradeScreen-Cizm99Om.cjs.map → UpgradeScreen-BlztCeo5.cjs.map} +1 -1
- package/dist/{UpgradeScreen-BwI6oi93.mjs → UpgradeScreen-D9WpmFa1.mjs} +1 -1
- package/dist/{UpgradeScreen-BwI6oi93.mjs.map → UpgradeScreen-D9WpmFa1.mjs.map} +1 -1
- package/dist/{dist-Dh18LTcb.cjs → dist-BSKQ_GoC.cjs} +2 -2
- package/dist/{dist-Dh18LTcb.cjs.map → dist-BSKQ_GoC.cjs.map} +1 -1
- package/dist/{dist-Mf7Sx86H.cjs → dist-Bg8UyHyM.cjs} +1 -1
- package/dist/{dist-Mf7Sx86H.cjs.map → dist-Bg8UyHyM.cjs.map} +1 -1
- package/dist/{dist-Cl8j9OpJ.mjs → dist-C9vpl_rR.mjs} +2 -2
- package/dist/{dist-Cl8j9OpJ.mjs.map → dist-C9vpl_rR.mjs.map} +1 -1
- package/dist/{dist-C5_jRw34.mjs → dist-CkIGP8my.mjs} +1 -1
- package/dist/{dist-C5_jRw34.mjs.map → dist-CkIGP8my.mjs.map} +1 -1
- package/dist/{dist-DBTvrTYG.cjs → dist-thaj08s5.cjs} +1 -1
- package/dist/{dist-DBTvrTYG.cjs.map → dist-thaj08s5.cjs.map} +1 -1
- package/dist/{es-D2KjfxgY.cjs → es-xQF-WIMq.cjs} +1 -1
- package/dist/{es-D2KjfxgY.cjs.map → es-xQF-WIMq.cjs.map} +1 -1
- package/dist/index.cjs +46 -46
- package/dist/index.mjs +45 -45
- package/dist/{order-status-badge-d0x55A3d.mjs → order-status-badge-DEuMgKkP.mjs} +2 -2
- package/dist/{order-status-badge-d0x55A3d.mjs.map → order-status-badge-DEuMgKkP.mjs.map} +1 -1
- package/dist/{order-status-badge-CwyoXs_m.cjs → order-status-badge-DeAGe2Ur.cjs} +2 -2
- package/dist/{order-status-badge-CwyoXs_m.cjs.map → order-status-badge-DeAGe2Ur.cjs.map} +1 -1
- package/dist/{sortable.esm-CzzU6kIR.mjs → sortable.esm-Cz-CP2N8.mjs} +1 -1
- package/dist/{sortable.esm-CzzU6kIR.mjs.map → sortable.esm-Cz-CP2N8.mjs.map} +1 -1
- package/dist/use-account-BJhzTl2j.mjs +41 -0
- package/dist/use-account-BJhzTl2j.mjs.map +1 -0
- package/dist/use-account-CrgtI83z.cjs +59 -0
- package/dist/use-account-CrgtI83z.cjs.map +1 -0
- package/dist/{use-portal-products-client-mpdZuZyu.cjs → use-portal-products-client-BmlUixy4.cjs} +1 -1
- package/dist/{use-portal-products-client-mpdZuZyu.cjs.map → use-portal-products-client-BmlUixy4.cjs.map} +1 -1
- package/dist/{use-portal-products-client-CChGsvZI.mjs → use-portal-products-client-DQK9nFxT.mjs} +1 -1
- package/dist/{use-portal-products-client-CChGsvZI.mjs.map → use-portal-products-client-DQK9nFxT.mjs.map} +1 -1
- package/dist/{use-portal-shareables-api-CZ4ELYei.cjs → use-portal-shareables-api-D5D6uIJy.cjs} +7 -7
- package/dist/{use-portal-shareables-api-CZ4ELYei.cjs.map → use-portal-shareables-api-D5D6uIJy.cjs.map} +1 -1
- package/dist/{use-portal-shareables-api-DXuaX66a.mjs → use-portal-shareables-api-KVPj0Jfr.mjs} +6 -6
- package/dist/{use-portal-shareables-api-DXuaX66a.mjs.map → use-portal-shareables-api-KVPj0Jfr.mjs.map} +1 -1
- package/package.json +12 -13
- package/dist/OrdersScreen-CSbbQw2L.mjs.map +0 -1
- package/dist/OrdersScreen-DLjDPnqI.cjs.map +0 -1
- package/dist/ProfileScreen-fmUckcMP.cjs.map +0 -1
- package/dist/query-keys-DQbGdmFe.mjs +0 -23
- package/dist/query-keys-DQbGdmFe.mjs.map +0 -1
- package/dist/query-keys-nFLtgmnS.cjs +0 -34
- package/dist/query-keys-nFLtgmnS.cjs.map +0 -1
- package/dist/use-account-C8jzbwMS.mjs +0 -22
- package/dist/use-account-C8jzbwMS.mjs.map +0 -1
- package/dist/use-account-D_23WtBc.cjs +0 -28
- package/dist/use-account-D_23WtBc.cjs.map +0 -1
- /package/dist/{src-CxI7zckp.cjs → src-B47XcHTS.cjs} +0 -0
- /package/dist/{src-BOIW-KES.mjs → src-DAC9DwXZ.mjs} +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { n as useAccountApi } from "./account-api-context-R4VVlZdv.mjs";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
//#region src/account/query-keys.ts
|
|
4
|
+
const accountKeys = {
|
|
5
|
+
all: ["portalTenant", "account"],
|
|
6
|
+
detail: (userId) => [...accountKeys.all, userId]
|
|
7
|
+
};
|
|
8
|
+
const payKeys = {
|
|
9
|
+
addresses: {
|
|
10
|
+
all: ["portalTenant", "addresses"],
|
|
11
|
+
list: (userId) => [...payKeys.addresses.all, userId]
|
|
12
|
+
},
|
|
13
|
+
paymentMethods: {
|
|
14
|
+
all: ["portalTenant", "paymentMethods"],
|
|
15
|
+
list: (userId) => [...payKeys.paymentMethods.all, userId]
|
|
16
|
+
},
|
|
17
|
+
pointsLedgers: {
|
|
18
|
+
all: ["portalTenant", "pointsLedgers"],
|
|
19
|
+
list: (userId) => [...payKeys.pointsLedgers.all, userId]
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/hooks/use-account.ts
|
|
24
|
+
/**
|
|
25
|
+
* Fetches the current user's account from GET /api/account.
|
|
26
|
+
* Replaces the old useCurrentUser (which called non-existent /api/me).
|
|
27
|
+
*/
|
|
28
|
+
function useAccount() {
|
|
29
|
+
const api = useAccountApi();
|
|
30
|
+
return useQuery({
|
|
31
|
+
queryKey: accountKeys.detail(),
|
|
32
|
+
queryFn: async () => {
|
|
33
|
+
return (await api.fetchAccount()).account;
|
|
34
|
+
},
|
|
35
|
+
staleTime: 300 * 1e3
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { accountKeys as n, payKeys as r, useAccount as t };
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=use-account-BJhzTl2j.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-account-BJhzTl2j.mjs","names":[],"sources":["../src/account/query-keys.ts","../src/hooks/use-account.ts"],"sourcesContent":["export const accountKeys = {\n all: [\"portalTenant\", \"account\"] as const,\n detail: (userId?: number) => [...accountKeys.all, userId] as const,\n} as const;\n\nexport const payKeys = {\n addresses: {\n all: [\"portalTenant\", \"addresses\"] as const,\n list: (userId?: number) => [...payKeys.addresses.all, userId] as const,\n },\n paymentMethods: {\n all: [\"portalTenant\", \"paymentMethods\"] as const,\n list: (userId?: number) => [...payKeys.paymentMethods.all, userId] as const,\n },\n pointsLedgers: {\n all: [\"portalTenant\", \"pointsLedgers\"] as const,\n list: (userId?: number) => [...payKeys.pointsLedgers.all, userId] as const,\n },\n} as const;\n","import { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { useAccountApi } from \"@fluid-app/portal-core/account-api-context\";\nimport type { AccountRep } from \"@fluid-app/portal-core/account-types\";\nimport { accountKeys } from \"../account/query-keys\";\n\n/**\n * Fetches the current user's account from GET /api/account.\n * Replaces the old useCurrentUser (which called non-existent /api/me).\n */\nexport function useAccount(): UseQueryResult<AccountRep> {\n const api = useAccountApi();\n\n return useQuery({\n queryKey: accountKeys.detail(),\n queryFn: async () => {\n const response = await api.fetchAccount();\n return response.account;\n },\n staleTime: 5 * 60 * 1000,\n });\n}\n"],"mappings":";;;AAAA,MAAa,cAAc;CACzB,KAAK,CAAC,gBAAgB,UAAU;CAChC,SAAS,WAAoB,CAAC,GAAG,YAAY,KAAK,OAAO;CAC1D;AAED,MAAa,UAAU;CACrB,WAAW;EACT,KAAK,CAAC,gBAAgB,YAAY;EAClC,OAAO,WAAoB,CAAC,GAAG,QAAQ,UAAU,KAAK,OAAO;EAC9D;CACD,gBAAgB;EACd,KAAK,CAAC,gBAAgB,iBAAiB;EACvC,OAAO,WAAoB,CAAC,GAAG,QAAQ,eAAe,KAAK,OAAO;EACnE;CACD,eAAe;EACb,KAAK,CAAC,gBAAgB,gBAAgB;EACtC,OAAO,WAAoB,CAAC,GAAG,QAAQ,cAAc,KAAK,OAAO;EAClE;CACF;;;;;;;ACTD,SAAgB,aAAyC;CACvD,MAAM,MAAM,eAAe;AAE3B,QAAO,SAAS;EACd,UAAU,YAAY,QAAQ;EAC9B,SAAS,YAAY;AAEnB,WADiB,MAAM,IAAI,cAAc,EACzB;;EAElB,WAAW,MAAS;EACrB,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
require("./chunk-9hOWP6kD.cjs");
|
|
2
|
+
const require_account_api_context = require("./account-api-context-pr_NLnGy.cjs");
|
|
3
|
+
let _tanstack_react_query = require("@tanstack/react-query");
|
|
4
|
+
//#region src/account/query-keys.ts
|
|
5
|
+
const accountKeys = {
|
|
6
|
+
all: ["portalTenant", "account"],
|
|
7
|
+
detail: (userId) => [...accountKeys.all, userId]
|
|
8
|
+
};
|
|
9
|
+
const payKeys = {
|
|
10
|
+
addresses: {
|
|
11
|
+
all: ["portalTenant", "addresses"],
|
|
12
|
+
list: (userId) => [...payKeys.addresses.all, userId]
|
|
13
|
+
},
|
|
14
|
+
paymentMethods: {
|
|
15
|
+
all: ["portalTenant", "paymentMethods"],
|
|
16
|
+
list: (userId) => [...payKeys.paymentMethods.all, userId]
|
|
17
|
+
},
|
|
18
|
+
pointsLedgers: {
|
|
19
|
+
all: ["portalTenant", "pointsLedgers"],
|
|
20
|
+
list: (userId) => [...payKeys.pointsLedgers.all, userId]
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/hooks/use-account.ts
|
|
25
|
+
/**
|
|
26
|
+
* Fetches the current user's account from GET /api/account.
|
|
27
|
+
* Replaces the old useCurrentUser (which called non-existent /api/me).
|
|
28
|
+
*/
|
|
29
|
+
function useAccount() {
|
|
30
|
+
const api = require_account_api_context.useAccountApi();
|
|
31
|
+
return (0, _tanstack_react_query.useQuery)({
|
|
32
|
+
queryKey: accountKeys.detail(),
|
|
33
|
+
queryFn: async () => {
|
|
34
|
+
return (await api.fetchAccount()).account;
|
|
35
|
+
},
|
|
36
|
+
staleTime: 300 * 1e3
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
Object.defineProperty(exports, "accountKeys", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function() {
|
|
43
|
+
return accountKeys;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(exports, "payKeys", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function() {
|
|
49
|
+
return payKeys;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(exports, "useAccount", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function() {
|
|
55
|
+
return useAccount;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=use-account-CrgtI83z.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-account-CrgtI83z.cjs","names":["useAccountApi"],"sources":["../src/account/query-keys.ts","../src/hooks/use-account.ts"],"sourcesContent":["export const accountKeys = {\n all: [\"portalTenant\", \"account\"] as const,\n detail: (userId?: number) => [...accountKeys.all, userId] as const,\n} as const;\n\nexport const payKeys = {\n addresses: {\n all: [\"portalTenant\", \"addresses\"] as const,\n list: (userId?: number) => [...payKeys.addresses.all, userId] as const,\n },\n paymentMethods: {\n all: [\"portalTenant\", \"paymentMethods\"] as const,\n list: (userId?: number) => [...payKeys.paymentMethods.all, userId] as const,\n },\n pointsLedgers: {\n all: [\"portalTenant\", \"pointsLedgers\"] as const,\n list: (userId?: number) => [...payKeys.pointsLedgers.all, userId] as const,\n },\n} as const;\n","import { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { useAccountApi } from \"@fluid-app/portal-core/account-api-context\";\nimport type { AccountRep } from \"@fluid-app/portal-core/account-types\";\nimport { accountKeys } from \"../account/query-keys\";\n\n/**\n * Fetches the current user's account from GET /api/account.\n * Replaces the old useCurrentUser (which called non-existent /api/me).\n */\nexport function useAccount(): UseQueryResult<AccountRep> {\n const api = useAccountApi();\n\n return useQuery({\n queryKey: accountKeys.detail(),\n queryFn: async () => {\n const response = await api.fetchAccount();\n return response.account;\n },\n staleTime: 5 * 60 * 1000,\n });\n}\n"],"mappings":";;;;AAAA,MAAa,cAAc;CACzB,KAAK,CAAC,gBAAgB,UAAU;CAChC,SAAS,WAAoB,CAAC,GAAG,YAAY,KAAK,OAAO;CAC1D;AAED,MAAa,UAAU;CACrB,WAAW;EACT,KAAK,CAAC,gBAAgB,YAAY;EAClC,OAAO,WAAoB,CAAC,GAAG,QAAQ,UAAU,KAAK,OAAO;EAC9D;CACD,gBAAgB;EACd,KAAK,CAAC,gBAAgB,iBAAiB;EACvC,OAAO,WAAoB,CAAC,GAAG,QAAQ,eAAe,KAAK,OAAO;EACnE;CACD,eAAe;EACb,KAAK,CAAC,gBAAgB,gBAAgB;EACtC,OAAO,WAAoB,CAAC,GAAG,QAAQ,cAAc,KAAK,OAAO;EAClE;CACF;;;;;;;ACTD,SAAgB,aAAyC;CACvD,MAAM,MAAMA,4BAAAA,eAAe;AAE3B,SAAA,GAAA,sBAAA,UAAgB;EACd,UAAU,YAAY,QAAQ;EAC9B,SAAS,YAAY;AAEnB,WADiB,MAAM,IAAI,cAAc,EACzB;;EAElB,WAAW,MAAS;EACrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-portal-products-client-
|
|
1
|
+
{"version":3,"file":"use-portal-products-client-BmlUixy4.cjs","names":["usePortalTenantClient"],"sources":["../../../products/api-client/src/portal-tenant-adapter.ts","../src/products/use-portal-products-client.ts"],"sourcesContent":["import type {\n PortalProductsApi,\n portalProducts,\n} from \"@fluid-app/products-core\";\nimport type { FetchClient } from \"./lib/fetch-client\";\nimport { portalTenant } from \"@fluid-app/portal-tenant-api-client\";\n\n/**\n * Creates a PortalProductsApi-compatible adapter from a portal-tenant FetchClient.\n *\n * This bridges the auto-generated portal-tenant API client to the abstract\n * PortalProductsApi interface defined in @fluid-app/products-core, closing\n * over the FetchClient so consumers don't need to pass it per-call.\n *\n * Each method maps the BFF response to the port type at runtime rather than\n * using type assertions, so TypeScript catches schema drift between the\n * generated client and the hand-authored port types at compile time.\n */\nexport function createPortalProductsApiAdapter(\n client: FetchClient,\n): PortalProductsApi {\n return {\n listProducts: async (params) => {\n const response = await portalTenant.products_list(client, {\n \"page[cursor]\": params?.cursor,\n });\n return {\n products: response.products ?? [],\n meta: response.meta,\n } satisfies portalProducts.PortalProductsResponse;\n },\n\n getProduct: async (id) => {\n const response = await portalTenant.products_show(client, id);\n return {\n product: response.product ?? {},\n meta: response.meta,\n } satisfies portalProducts.PortalProductResponse;\n },\n\n searchProducts: async (query, params) => {\n const response = await portalTenant.products_search(client, {\n q: query,\n \"page[cursor]\": params?.cursor,\n });\n return {\n products: response.products ?? [],\n meta: response.meta,\n } satisfies portalProducts.PortalProductsResponse;\n },\n\n getProductMedia: async (productId) => {\n const response = await portalTenant.products_media_list(\n client,\n productId,\n );\n return {\n media: response.media ?? [],\n meta: response.meta,\n } satisfies portalProducts.PortalProductMediaResponse;\n },\n };\n}\n","import { useMemo } from \"react\";\nimport type { PortalProductsApi } from \"@fluid-app/products-core\";\nimport { createPortalProductsApiAdapter } from \"@fluid-app/products-api-client\";\nimport { usePortalTenantClient } from \"../providers/PortalTenantClientProvider\";\n\nexport function usePortalProductsClient(): PortalProductsApi {\n const client = usePortalTenantClient();\n\n return useMemo(() => createPortalProductsApiAdapter(client), [client]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAkBA,SAAgB,+BACd,QACmB;AACnB,QAAO;EACL,cAAc,OAAO,WAAW;GAC9B,MAAM,WAAW,MAAA,sBAAA,cAAiC,QAAQ,EACxD,gBAAgB,QAAQ,QACzB,CAAC;AACF,UAAO;IACL,UAAU,SAAS,YAAY,EAAE;IACjC,MAAM,SAAS;IAChB;;EAGH,YAAY,OAAO,OAAO;GACxB,MAAM,WAAW,MAAA,sBAAA,cAAiC,QAAQ,GAAG;AAC7D,UAAO;IACL,SAAS,SAAS,WAAW,EAAE;IAC/B,MAAM,SAAS;IAChB;;EAGH,gBAAgB,OAAO,OAAO,WAAW;GACvC,MAAM,WAAW,MAAA,sBAAA,gBAAmC,QAAQ;IAC1D,GAAG;IACH,gBAAgB,QAAQ;IACzB,CAAC;AACF,UAAO;IACL,UAAU,SAAS,YAAY,EAAE;IACjC,MAAM,SAAS;IAChB;;EAGH,iBAAiB,OAAO,cAAc;GACpC,MAAM,WAAW,MAAA,sBAAA,oBACf,QACA,UACD;AACD,UAAO;IACL,OAAO,SAAS,SAAS,EAAE;IAC3B,MAAM,SAAS;IAChB;;EAEJ;;;;ACxDH,SAAgB,0BAA6C;CAC3D,MAAM,SAASA,mCAAAA,uBAAuB;AAEtC,SAAA,GAAA,MAAA,eAAqB,+BAA+B,OAAO,EAAE,CAAC,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-portal-products-client-
|
|
1
|
+
{"version":3,"file":"use-portal-products-client-DQK9nFxT.mjs","names":["portalTenant.products_list","portalTenant.products_show","portalTenant.products_search","portalTenant.products_media_list"],"sources":["../../../products/api-client/src/portal-tenant-adapter.ts","../src/products/use-portal-products-client.ts"],"sourcesContent":["import type {\n PortalProductsApi,\n portalProducts,\n} from \"@fluid-app/products-core\";\nimport type { FetchClient } from \"./lib/fetch-client\";\nimport { portalTenant } from \"@fluid-app/portal-tenant-api-client\";\n\n/**\n * Creates a PortalProductsApi-compatible adapter from a portal-tenant FetchClient.\n *\n * This bridges the auto-generated portal-tenant API client to the abstract\n * PortalProductsApi interface defined in @fluid-app/products-core, closing\n * over the FetchClient so consumers don't need to pass it per-call.\n *\n * Each method maps the BFF response to the port type at runtime rather than\n * using type assertions, so TypeScript catches schema drift between the\n * generated client and the hand-authored port types at compile time.\n */\nexport function createPortalProductsApiAdapter(\n client: FetchClient,\n): PortalProductsApi {\n return {\n listProducts: async (params) => {\n const response = await portalTenant.products_list(client, {\n \"page[cursor]\": params?.cursor,\n });\n return {\n products: response.products ?? [],\n meta: response.meta,\n } satisfies portalProducts.PortalProductsResponse;\n },\n\n getProduct: async (id) => {\n const response = await portalTenant.products_show(client, id);\n return {\n product: response.product ?? {},\n meta: response.meta,\n } satisfies portalProducts.PortalProductResponse;\n },\n\n searchProducts: async (query, params) => {\n const response = await portalTenant.products_search(client, {\n q: query,\n \"page[cursor]\": params?.cursor,\n });\n return {\n products: response.products ?? [],\n meta: response.meta,\n } satisfies portalProducts.PortalProductsResponse;\n },\n\n getProductMedia: async (productId) => {\n const response = await portalTenant.products_media_list(\n client,\n productId,\n );\n return {\n media: response.media ?? [],\n meta: response.meta,\n } satisfies portalProducts.PortalProductMediaResponse;\n },\n };\n}\n","import { useMemo } from \"react\";\nimport type { PortalProductsApi } from \"@fluid-app/products-core\";\nimport { createPortalProductsApiAdapter } from \"@fluid-app/products-api-client\";\nimport { usePortalTenantClient } from \"../providers/PortalTenantClientProvider\";\n\nexport function usePortalProductsClient(): PortalProductsApi {\n const client = usePortalTenantClient();\n\n return useMemo(() => createPortalProductsApiAdapter(client), [client]);\n}\n"],"mappings":";;;;;;;;;;;;;;;AAkBA,SAAgB,+BACd,QACmB;AACnB,QAAO;EACL,cAAc,OAAO,WAAW;GAC9B,MAAM,WAAW,MAAMA,cAA2B,QAAQ,EACxD,gBAAgB,QAAQ,QACzB,CAAC;AACF,UAAO;IACL,UAAU,SAAS,YAAY,EAAE;IACjC,MAAM,SAAS;IAChB;;EAGH,YAAY,OAAO,OAAO;GACxB,MAAM,WAAW,MAAMC,cAA2B,QAAQ,GAAG;AAC7D,UAAO;IACL,SAAS,SAAS,WAAW,EAAE;IAC/B,MAAM,SAAS;IAChB;;EAGH,gBAAgB,OAAO,OAAO,WAAW;GACvC,MAAM,WAAW,MAAMC,gBAA6B,QAAQ;IAC1D,GAAG;IACH,gBAAgB,QAAQ;IACzB,CAAC;AACF,UAAO;IACL,UAAU,SAAS,YAAY,EAAE;IACjC,MAAM,SAAS;IAChB;;EAGH,iBAAiB,OAAO,cAAc;GACpC,MAAM,WAAW,MAAMC,oBACrB,QACA,UACD;AACD,UAAO;IACL,OAAO,SAAS,SAAS,EAAE;IAC3B,MAAM,SAAS;IAChB;;EAEJ;;;;ACxDH,SAAgB,0BAA6C;CAC3D,MAAM,SAAS,uBAAuB;AAEtC,QAAO,cAAc,+BAA+B,OAAO,EAAE,CAAC,OAAO,CAAC"}
|
package/dist/{use-portal-shareables-api-CZ4ELYei.cjs → use-portal-shareables-api-D5D6uIJy.cjs}
RENAMED
|
@@ -3,12 +3,12 @@ const require_FluidProvider = require("./FluidProvider-Bc-3uN7M.cjs");
|
|
|
3
3
|
const require_PortalTenantClientProvider = require("./PortalTenantClientProvider-C4Gnq5tJ.cjs");
|
|
4
4
|
const require_src = require("./src-Bm9zqmV3.cjs");
|
|
5
5
|
const require_ScreenHeaderContext = require("./ScreenHeaderContext-DRIKmM2G.cjs");
|
|
6
|
-
const require_dist$3 = require("./dist-
|
|
7
|
-
const require_es = require("./es-
|
|
8
|
-
const require_SearchSort = require("./SearchSort
|
|
9
|
-
const require_dist$4 = require("./dist-
|
|
10
|
-
const require_use_portal_products_client = require("./use-portal-products-client-
|
|
11
|
-
const require_dist$5 = require("./dist-
|
|
6
|
+
const require_dist$3 = require("./dist-thaj08s5.cjs");
|
|
7
|
+
const require_es = require("./es-xQF-WIMq.cjs");
|
|
8
|
+
const require_SearchSort = require("./SearchSort--3bVTMB4.cjs");
|
|
9
|
+
const require_dist$4 = require("./dist-BSKQ_GoC.cjs");
|
|
10
|
+
const require_use_portal_products_client = require("./use-portal-products-client-BmlUixy4.cjs");
|
|
11
|
+
const require_dist$5 = require("./dist-Bg8UyHyM.cjs");
|
|
12
12
|
let react = require("react");
|
|
13
13
|
react = require_chunk.__toESM(react);
|
|
14
14
|
let _tanstack_react_query = require("@tanstack/react-query");
|
|
@@ -9961,4 +9961,4 @@ Object.defineProperty(exports, "useSdkClient", {
|
|
|
9961
9961
|
}
|
|
9962
9962
|
});
|
|
9963
9963
|
|
|
9964
|
-
//# sourceMappingURL=use-portal-shareables-api-
|
|
9964
|
+
//# sourceMappingURL=use-portal-shareables-api-D5D6uIJy.cjs.map
|