@burdenoff/microfe-healthybowl 2026.919.1 → 2026.919.3
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/healthybowl/hooks/useConsultationPayments.js +8 -50
- package/dist/healthybowl/hooks/useConsultationPayments.js.map +1 -1
- package/dist/healthybowl/hooks/useHealthyBowlData.js +3 -15
- package/dist/healthybowl/hooks/useHealthyBowlData.js.map +1 -1
- package/dist/healthybowl/hooks/useSharedMarket.js +1 -14
- package/dist/healthybowl/hooks/useSharedMarket.js.map +1 -1
- package/dist/healthybowl/pages/network/ExpertsPage.js +1 -1
- package/dist/healthybowl/pages/network/ExpertsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,59 +1,17 @@
|
|
|
1
1
|
import { loadRazorpayCheckout as e } from "./useOrderPayments.js";
|
|
2
|
-
import { useCallback as t
|
|
3
|
-
import { gql as r } from "@apollo/client";
|
|
4
|
-
import { useMutation as i } from "@apollo/client/react";
|
|
2
|
+
import { useCallback as t } from "react";
|
|
5
3
|
//#region src/healthybowl/hooks/useConsultationPayments.ts
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
billingOrderId
|
|
11
|
-
provider
|
|
12
|
-
providerOrderId
|
|
13
|
-
razorpayKeyId
|
|
14
|
-
clientSecret
|
|
15
|
-
subtotal
|
|
16
|
-
taxAmount
|
|
17
|
-
total
|
|
18
|
-
currency
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
`, o = r`
|
|
22
|
-
mutation SyncHealthyBowlConsultationPayment($consultationId: ID!, $context: ContextInput!) {
|
|
23
|
-
syncHealthyBowlConsultationPayment(consultationId: $consultationId, context: $context) {
|
|
24
|
-
id
|
|
25
|
-
status
|
|
26
|
-
paymentStatus
|
|
27
|
-
paymentProvider
|
|
28
|
-
paymentReference
|
|
29
|
-
paidAmount
|
|
30
|
-
paidAt
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
`;
|
|
34
|
-
function s() {
|
|
35
|
-
let r = n(() => ({}), []), [s] = i(a), [c] = i(o);
|
|
4
|
+
function n() {
|
|
5
|
+
let n = t((e) => {
|
|
6
|
+
throw Error(`${e} is unavailable: BOFF-6030's consultation-payment backend is not deployed. Land that slice and restore the operations before calling this.`);
|
|
7
|
+
}, []);
|
|
36
8
|
return {
|
|
37
|
-
checkoutConsultation: t(async (e) =>
|
|
38
|
-
|
|
39
|
-
consultationId: e,
|
|
40
|
-
context: r
|
|
41
|
-
} })).data?.checkoutHealthyBowlConsultation;
|
|
42
|
-
if (!t) throw Error("Checkout did not return a payment session");
|
|
43
|
-
return t;
|
|
44
|
-
}, [s, r]),
|
|
45
|
-
syncConsultationPayment: t(async (e) => {
|
|
46
|
-
let t = (await c({ variables: {
|
|
47
|
-
consultationId: e,
|
|
48
|
-
context: r
|
|
49
|
-
} })).data?.syncHealthyBowlConsultationPayment;
|
|
50
|
-
if (!t) throw Error("Payment sync did not return the consultation");
|
|
51
|
-
return t;
|
|
52
|
-
}, [r, c]),
|
|
9
|
+
checkoutConsultation: t(async (e) => n("checkoutConsultation"), [n]),
|
|
10
|
+
syncConsultationPayment: t(async (e) => n("syncConsultationPayment"), [n]),
|
|
53
11
|
loadRazorpay: e
|
|
54
12
|
};
|
|
55
13
|
}
|
|
56
14
|
//#endregion
|
|
57
|
-
export {
|
|
15
|
+
export { n as useConsultationPayments };
|
|
58
16
|
|
|
59
17
|
//# sourceMappingURL=useConsultationPayments.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConsultationPayments.js","names":[],"sources":["../../../src/healthybowl/hooks/useConsultationPayments.ts"],"sourcesContent":["/**\n *
|
|
1
|
+
{"version":3,"file":"useConsultationPayments.js","names":[],"sources":["../../../src/healthybowl/hooks/useConsultationPayments.ts"],"sourcesContent":["/**\n * Expert-consultation payments (BOFF-6030, slice B) — ★ DISABLED, BACKEND NOT SHIPPED.\n *\n * The design is unchanged and correct: the client starts checkout and asks HealthyBowl to settle\n * afterwards, HealthyBowl re-reads the authoritative Payment from global-billing, and this MFE never\n * decides that money arrived or touches card data.\n *\n * ★★ WHAT IS WRONG IS THAT THE BACKEND HALF NEVER MERGED. `checkoutHealthyBowlConsultation` and\n * `syncHealthyBowlConsultationPayment` do not exist on the composed supergraph, on any subgraph, or\n * on `wspace-healthybowl-svc` main; PRs #248 and #249 are closed unmerged. This UI nonetheless\n * landed on this repo's main on 2026-09-02 (#328), so main has been unshippable ever since — proven\n * on 2026-09-18 when the BOFF-7341 repin took six prod pages down for 38 minutes and was rolled back.\n *\n * ★★★ AND THE ORIGINAL HEADER EXPLAINED HOW IT GOT PAST THE GUARD. It read: \"The documents stay\n * inline because the committed workspace SDL snapshot predates these operations; adding them under\n * `src/operations/wspace` would make codegen validate them too early.\" That is a description of\n * routing around the one check that would have caught this. Codegen was not validating too early —\n * it was validating correctly, against a schema that genuinely lacked the fields. Keeping the\n * documents where codegen could not see them is why a query against a nonexistent backend reached\n * main and then production.\n *\n * The two mutation DOCUMENTS are therefore deleted rather than left inline: an invalid operation in\n * the bundle is a loaded gun, and `scripts/schema-preflight.md` should be able to report zero\n * blockers before a publish. The hook keeps its shape so its caller still compiles, and both entry\n * points now reject with an explicit reason instead of sending an operation the gateway will refuse.\n *\n * TO RESTORE: land BOFF-6030's backend slice (migration, deploy, Hive production publish, wait out\n * the supergraph CDN lag), then revert the commit that added this comment and put the operations\n * under `src/operations/wspace` so CODEGEN VALIDATES THEM. Re-run the pre-flight before publishing.\n */\nimport { useCallback } from 'react';\nimport type { Consultation } from '../types';\nimport { loadRazorpayCheckout } from './useOrderPayments';\n\n/** Everything the client needs to open the payment provider's checkout for one consultation. */\nexport interface ConsultationCheckout {\n consultationId: string;\n billingOrderId: string;\n /** RAZORPAY / STRIPE — selected by platform billing. */\n provider: string;\n /** Razorpay `order_xxx`; absent when billing routes to another provider. */\n providerOrderId?: string | null;\n /** Publishable Razorpay key returned at runtime by billing, never hard-coded. */\n razorpayKeyId?: string | null;\n /** Stripe client secret; this MFE does not implement the Stripe checkout path yet. */\n clientSecret?: string | null;\n subtotal: number;\n taxAmount: number;\n total: number;\n currency: string;\n}\n\n/** Payment details mirrored by HealthyBowl only after it settles against platform billing. */\nexport type ConsultationPayment = Pick<\n Consultation,\n 'id' | 'status' | 'paymentStatus' | 'paymentProvider' | 'paymentReference' | 'paidAmount' | 'paidAt'\n>;\n\n/**\n * Keeps the call shape its caller expects while the backend is absent.\n *\n * `loadRazorpay` still delegates to the shared lazy script loader (so marketplace and consultation\n * checkout would inject at most one provider script per page) — it is harmless and left intact,\n * because the loader is what a restored checkout needs and it touches no missing schema.\n */\nexport function useConsultationPayments() {\n const unavailable = useCallback((operation: string): never => {\n // Explicit and loud. The UI does not offer these paths while the fields are unselected (the\n // Pay-now button is gated on `paymentStatus === 'PENDING'`, which is now always undefined), so\n // reaching here means a new caller was added without the backend — exactly the mistake that\n // produced the 2026-09-18 rollback. Better a clear throw at the call site than a\n // GRAPHQL_VALIDATION_FAILED toast in front of a farmer.\n throw new Error(\n `${operation} is unavailable: BOFF-6030's consultation-payment backend is not deployed. ` +\n 'Land that slice and restore the operations before calling this.'\n );\n }, []);\n\n const checkoutConsultation = useCallback(\n async (_consultationId: string): Promise<ConsultationCheckout> => unavailable('checkoutConsultation'),\n [unavailable]\n );\n\n const syncConsultationPayment = useCallback(\n async (_consultationId: string): Promise<ConsultationPayment> => unavailable('syncConsultationPayment'),\n [unavailable]\n );\n\n const loadRazorpay = loadRazorpayCheckout;\n\n return { checkoutConsultation, syncConsultationPayment, loadRazorpay };\n}\n"],"mappings":";;;AAiEA,SAAgB,IAA0B;CACxC,IAAM,IAAc,GAAa,MAA6B;EAM5D,MAAU,MACR,GAAG,EAAU,2IAEf;CACF,GAAG,CAAC,CAAC;CAcL,OAAO;EAAE,sBAZoB,EAC3B,OAAO,MAA2D,EAAY,sBAAsB,GACpG,CAAC,CAAW,CAUL;EAAsB,yBAPC,EAC9B,OAAO,MAA0D,EAAY,yBAAyB,GACtG,CAAC,CAAW,CAKiB;EAAyB,cAAA;CAAa;AACvE"}
|
|
@@ -292,11 +292,7 @@ var Dt = a`
|
|
|
292
292
|
notes
|
|
293
293
|
fee
|
|
294
294
|
status
|
|
295
|
-
|
|
296
|
-
paymentProvider
|
|
297
|
-
paymentReference
|
|
298
|
-
paidAmount
|
|
299
|
-
paidAt
|
|
295
|
+
# No payment fields until BOFF-6030's backend lands — see the note above this document.
|
|
300
296
|
createdAt
|
|
301
297
|
}
|
|
302
298
|
}
|
|
@@ -313,11 +309,7 @@ var Dt = a`
|
|
|
313
309
|
notes
|
|
314
310
|
fee
|
|
315
311
|
status
|
|
316
|
-
|
|
317
|
-
paymentProvider
|
|
318
|
-
paymentReference
|
|
319
|
-
paidAmount
|
|
320
|
-
paidAt
|
|
312
|
+
# No payment fields until BOFF-6030's backend lands — see the note above this document.
|
|
321
313
|
createdAt
|
|
322
314
|
}
|
|
323
315
|
}
|
|
@@ -334,11 +326,7 @@ var Dt = a`
|
|
|
334
326
|
notes
|
|
335
327
|
fee
|
|
336
328
|
status
|
|
337
|
-
|
|
338
|
-
paymentProvider
|
|
339
|
-
paymentReference
|
|
340
|
-
paidAmount
|
|
341
|
-
paidAt
|
|
329
|
+
# No payment fields until BOFF-6030's backend lands — see the note above this document.
|
|
342
330
|
createdAt
|
|
343
331
|
}
|
|
344
332
|
}
|