@burdenoff/microfe-healthybowl 2026.902.24 → 2026.902.25
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 +59 -0
- package/dist/healthybowl/hooks/useConsultationPayments.js.map +1 -0
- package/dist/healthybowl/hooks/useHealthyBowlData.js +15 -0
- package/dist/healthybowl/hooks/useHealthyBowlData.js.map +1 -1
- package/dist/healthybowl/offline/graphql.js.map +1 -1
- package/dist/healthybowl/offline/syncEngine.js +2 -1
- package/dist/healthybowl/offline/syncEngine.js.map +1 -1
- package/dist/healthybowl/offline/types.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js +228 -188
- package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/SchemeDetailsPage.js +261 -191
- package/dist/healthybowl/pages/government-schemes/SchemeDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/schemeApplicationTransitions.js +49 -0
- package/dist/healthybowl/pages/government-schemes/schemeApplicationTransitions.js.map +1 -0
- package/dist/healthybowl/pages/government-schemes/schemeDocumentSlots.js +48 -0
- package/dist/healthybowl/pages/government-schemes/schemeDocumentSlots.js.map +1 -0
- package/dist/healthybowl/pages/government-schemes/useSchemeApplicationTransition.js +54 -0
- package/dist/healthybowl/pages/government-schemes/useSchemeApplicationTransition.js.map +1 -0
- package/dist/healthybowl/pages/livestock/AnimalDepthFormModal.js +117 -97
- package/dist/healthybowl/pages/livestock/AnimalDepthFormModal.js.map +1 -1
- package/dist/healthybowl/pages/livestock/eidTagInput.js +39 -0
- package/dist/healthybowl/pages/livestock/eidTagInput.js.map +1 -0
- package/dist/healthybowl/pages/network/ExpertsPage.js +520 -419
- package/dist/healthybowl/pages/network/ExpertsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { loadRazorpayCheckout as e } from "./useOrderPayments.js";
|
|
2
|
+
import { useCallback as t, useMemo as n } from "react";
|
|
3
|
+
import { gql as r } from "@apollo/client";
|
|
4
|
+
import { useMutation as i } from "@apollo/client/react";
|
|
5
|
+
//#region src/healthybowl/hooks/useConsultationPayments.ts
|
|
6
|
+
var a = r`
|
|
7
|
+
mutation CheckoutHealthyBowlConsultation($consultationId: ID!, $context: ContextInput!) {
|
|
8
|
+
checkoutHealthyBowlConsultation(consultationId: $consultationId, context: $context) {
|
|
9
|
+
consultationId
|
|
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);
|
|
36
|
+
return {
|
|
37
|
+
checkoutConsultation: t(async (e) => {
|
|
38
|
+
let t = (await s({ variables: {
|
|
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]),
|
|
53
|
+
loadRazorpay: e
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
export { s as useConsultationPayments };
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=useConsultationPayments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useConsultationPayments.js","names":[],"sources":["../../../src/healthybowl/hooks/useConsultationPayments.ts"],"sourcesContent":["/**\n * Real expert-consultation payments (BOFF-6030, slice B).\n *\n * The client starts checkout and asks HealthyBowl to settle afterwards. HealthyBowl re-reads the\n * authoritative Payment from global-billing, so this MFE never decides that money arrived or handles\n * card data. The documents stay inline because the committed workspace SDL snapshot predates these\n * operations; adding them under `src/operations/wspace` would make codegen validate them too early.\n */\nimport { gql } from '@apollo/client';\nimport { useMutation } from '@apollo/client/react';\nimport { useCallback, useMemo } 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\nconst CHECKOUT_CONSULTATION = gql`\n mutation CheckoutHealthyBowlConsultation($consultationId: ID!, $context: ContextInput!) {\n checkoutHealthyBowlConsultation(consultationId: $consultationId, context: $context) {\n consultationId\n billingOrderId\n provider\n providerOrderId\n razorpayKeyId\n clientSecret\n subtotal\n taxAmount\n total\n currency\n }\n }\n`;\n\nconst SYNC_CONSULTATION_PAYMENT = gql`\n mutation SyncHealthyBowlConsultationPayment($consultationId: ID!, $context: ContextInput!) {\n syncHealthyBowlConsultationPayment(consultationId: $consultationId, context: $context) {\n id\n status\n paymentStatus\n paymentProvider\n paymentReference\n paidAmount\n paidAt\n }\n }\n`;\n\ninterface CheckoutConsultationData {\n checkoutHealthyBowlConsultation: ConsultationCheckout;\n}\n\ninterface SyncConsultationPaymentData {\n syncHealthyBowlConsultationPayment: ConsultationPayment;\n}\n\ninterface ConsultationCheckoutVariables {\n consultationId: string;\n context: Record<string, never>;\n}\n\ninterface SyncConsultationPaymentVariables {\n consultationId: string;\n context: Record<string, never>;\n}\n\n/**\n * Starts idempotent platform-billing checkout sessions and settles their authoritative result.\n * `loadRazorpay` deliberately delegates to the shared lazy script loader, so marketplace and\n * consultation checkout inject at most one provider script per page.\n */\nexport function useConsultationPayments() {\n // Wspace identity is gateway-authoritative; this required GraphQL input intentionally carries no\n // client-held workspace id.\n const context = useMemo<Record<string, never>>(() => ({}), []);\n const [checkoutMutation] = useMutation<CheckoutConsultationData, ConsultationCheckoutVariables>(\n CHECKOUT_CONSULTATION\n );\n const [syncMutation] = useMutation<SyncConsultationPaymentData, SyncConsultationPaymentVariables>(\n SYNC_CONSULTATION_PAYMENT\n );\n\n const checkoutConsultation = useCallback(\n async (consultationId: string): Promise<ConsultationCheckout> => {\n const result = await checkoutMutation({ variables: { consultationId, context } });\n const checkout = result.data?.checkoutHealthyBowlConsultation;\n if (!checkout) throw new Error('Checkout did not return a payment session');\n return checkout;\n },\n [checkoutMutation, context]\n );\n\n const syncConsultationPayment = useCallback(\n async (consultationId: string): Promise<ConsultationPayment> => {\n const result = await syncMutation({ variables: { consultationId, context } });\n const consultation = result.data?.syncHealthyBowlConsultationPayment;\n if (!consultation) throw new Error('Payment sync did not return the consultation');\n return consultation;\n },\n [context, syncMutation]\n );\n\n const loadRazorpay = loadRazorpayCheckout;\n\n return { checkoutConsultation, syncConsultationPayment, loadRazorpay };\n}\n"],"mappings":";;;;;AAsCA,IAAM,IAAwB,CAAG;;;;;;;;;;;;;;;GAiB3B,IAA4B,CAAG;;;;;;;;;;;;;AAqCrC,SAAgB,IAA0B;CAGxC,IAAM,IAAU,SAAsC,CAAC,IAAI,CAAC,CAAC,GACvD,CAAC,KAAoB,EACzB,CACF,GACM,CAAC,KAAgB,EACrB,CACF;CAwBA,OAAO;EAAE,sBAtBoB,EAC3B,OAAO,MAA0D;GAE/D,IAAM,KAAW,MADI,EAAiB,EAAE,WAAW;IAAE;IAAgB;GAAQ,EAAE,CAAC,GACxD,MAAM;GAC9B,IAAI,CAAC,GAAU,MAAU,MAAM,2CAA2C;GAC1E,OAAO;EACT,GACA,CAAC,GAAkB,CAAO,CAenB;EAAsB,yBAZC,EAC9B,OAAO,MAAyD;GAE9D,IAAM,KAAe,MADA,EAAa,EAAE,WAAW;IAAE;IAAgB;GAAQ,EAAE,CAAC,GAChD,MAAM;GAClC,IAAI,CAAC,GAAc,MAAU,MAAM,8CAA8C;GACjF,OAAO;EACT,GACA,CAAC,GAAS,CAAY,CAKO;EAAyB,cAAA;CAAa;AACvE"}
|
|
@@ -289,6 +289,11 @@ var Dt = a`
|
|
|
289
289
|
notes
|
|
290
290
|
fee
|
|
291
291
|
status
|
|
292
|
+
paymentStatus
|
|
293
|
+
paymentProvider
|
|
294
|
+
paymentReference
|
|
295
|
+
paidAmount
|
|
296
|
+
paidAt
|
|
292
297
|
createdAt
|
|
293
298
|
}
|
|
294
299
|
}
|
|
@@ -305,6 +310,11 @@ var Dt = a`
|
|
|
305
310
|
notes
|
|
306
311
|
fee
|
|
307
312
|
status
|
|
313
|
+
paymentStatus
|
|
314
|
+
paymentProvider
|
|
315
|
+
paymentReference
|
|
316
|
+
paidAmount
|
|
317
|
+
paidAt
|
|
308
318
|
createdAt
|
|
309
319
|
}
|
|
310
320
|
}
|
|
@@ -321,6 +331,11 @@ var Dt = a`
|
|
|
321
331
|
notes
|
|
322
332
|
fee
|
|
323
333
|
status
|
|
334
|
+
paymentStatus
|
|
335
|
+
paymentProvider
|
|
336
|
+
paymentReference
|
|
337
|
+
paidAmount
|
|
338
|
+
paidAt
|
|
324
339
|
createdAt
|
|
325
340
|
}
|
|
326
341
|
}
|