@burdenoff/microfe-subscriberbot 2026.1031.1 → 2026.1102.2
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/stories/pages/NegotiationDetailPage.stories.d.ts +11 -0
- package/dist/stories/pages/NegotiationDetailPage.stories.d.ts.map +1 -0
- package/dist/stories/pages/NegotiationNewPage.stories.d.ts +9 -0
- package/dist/stories/pages/NegotiationNewPage.stories.d.ts.map +1 -0
- package/dist/stories/pages/NegotiationsPage.stories.d.ts +11 -0
- package/dist/stories/pages/NegotiationsPage.stories.d.ts.map +1 -0
- package/dist/stories/pages/ProcurementDetailPage.stories.d.ts +10 -0
- package/dist/stories/pages/ProcurementDetailPage.stories.d.ts.map +1 -0
- package/dist/stories/pages/ProcurementNewPage.stories.d.ts +9 -0
- package/dist/stories/pages/ProcurementNewPage.stories.d.ts.map +1 -0
- package/dist/stories/pages/ProcurementPage.stories.d.ts +11 -0
- package/dist/stories/pages/ProcurementPage.stories.d.ts.map +1 -0
- package/dist/stories/support/negotiationFixtures.d.ts +14 -0
- package/dist/stories/support/negotiationFixtures.d.ts.map +1 -0
- package/dist/stories/support/procurementFixtures.d.ts +14 -0
- package/dist/stories/support/procurementFixtures.d.ts.map +1 -0
- package/dist/subscriberbot/SubscriberBotRoutes.d.ts.map +1 -1
- package/dist/subscriberbot/SubscriberBotRoutes.js +30 -6
- package/dist/subscriberbot/SubscriberBotRoutes.js.map +1 -1
- package/dist/subscriberbot/admin/AdminDashboardPage.d.ts.map +1 -1
- package/dist/subscriberbot/admin/AdminDashboardPage.js +166 -146
- package/dist/subscriberbot/admin/AdminDashboardPage.js.map +1 -1
- package/dist/subscriberbot/admin/NegotiationDeskPanel.d.ts +4 -0
- package/dist/subscriberbot/admin/NegotiationDeskPanel.d.ts.map +1 -0
- package/dist/subscriberbot/admin/NegotiationDeskPanel.js +210 -0
- package/dist/subscriberbot/admin/NegotiationDeskPanel.js.map +1 -0
- package/dist/subscriberbot/admin/ProcurementDeskPanel.d.ts +4 -0
- package/dist/subscriberbot/admin/ProcurementDeskPanel.d.ts.map +1 -0
- package/dist/subscriberbot/admin/ProcurementDeskPanel.js +450 -0
- package/dist/subscriberbot/admin/ProcurementDeskPanel.js.map +1 -0
- package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.d.ts +8 -0
- package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.d.ts.map +1 -0
- package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js +18 -0
- package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js.map +1 -0
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.d.ts +8 -0
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.d.ts.map +1 -0
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js +49 -0
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js.map +1 -0
- package/dist/subscriberbot/components/negotiations/OutcomeForm.d.ts +13 -0
- package/dist/subscriberbot/components/negotiations/OutcomeForm.d.ts.map +1 -0
- package/dist/subscriberbot/components/negotiations/OutcomeForm.js +112 -0
- package/dist/subscriberbot/components/negotiations/OutcomeForm.js.map +1 -0
- package/dist/subscriberbot/components/negotiations/index.d.ts +5 -0
- package/dist/subscriberbot/components/negotiations/index.d.ts.map +1 -0
- package/dist/subscriberbot/components/negotiations/index.js +4 -0
- package/dist/subscriberbot/components/negotiations/labels.d.ts +16 -0
- package/dist/subscriberbot/components/negotiations/labels.d.ts.map +1 -0
- package/dist/subscriberbot/components/negotiations/labels.js +179 -0
- package/dist/subscriberbot/components/negotiations/labels.js.map +1 -0
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.d.ts +12 -0
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.d.ts.map +1 -0
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js +155 -0
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js.map +1 -0
- package/dist/subscriberbot/components/procurement/ProcurementStatusPill.d.ts +8 -0
- package/dist/subscriberbot/components/procurement/ProcurementStatusPill.d.ts.map +1 -0
- package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js +18 -0
- package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js.map +1 -0
- package/dist/subscriberbot/components/procurement/ProcurementThread.d.ts +13 -0
- package/dist/subscriberbot/components/procurement/ProcurementThread.d.ts.map +1 -0
- package/dist/subscriberbot/components/procurement/ProcurementThread.js +51 -0
- package/dist/subscriberbot/components/procurement/ProcurementThread.js.map +1 -0
- package/dist/subscriberbot/components/procurement/index.d.ts +5 -0
- package/dist/subscriberbot/components/procurement/index.d.ts.map +1 -0
- package/dist/subscriberbot/components/procurement/index.js +4 -0
- package/dist/subscriberbot/components/procurement/labels.d.ts +16 -0
- package/dist/subscriberbot/components/procurement/labels.d.ts.map +1 -0
- package/dist/subscriberbot/components/procurement/labels.js +154 -0
- package/dist/subscriberbot/components/procurement/labels.js.map +1 -0
- package/dist/subscriberbot/hooks/useNegotiationApi.d.ts +51 -0
- package/dist/subscriberbot/hooks/useNegotiationApi.d.ts.map +1 -0
- package/dist/subscriberbot/hooks/useNegotiationApi.js +106 -0
- package/dist/subscriberbot/hooks/useNegotiationApi.js.map +1 -0
- package/dist/subscriberbot/hooks/useProcurementApi.d.ts +58 -0
- package/dist/subscriberbot/hooks/useProcurementApi.d.ts.map +1 -0
- package/dist/subscriberbot/hooks/useProcurementApi.js +128 -0
- package/dist/subscriberbot/hooks/useProcurementApi.js.map +1 -0
- package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts +1 -0
- package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts.map +1 -1
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js +1 -1
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts +11 -0
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts.map +1 -0
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js +312 -0
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js.map +1 -0
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts +11 -0
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts.map +1 -0
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js +375 -0
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js.map +1 -0
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts +10 -0
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts.map +1 -0
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js +155 -0
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js.map +1 -0
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts +11 -0
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts.map +1 -0
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js +276 -0
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js.map +1 -0
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts +12 -0
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts.map +1 -0
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js +362 -0
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js.map +1 -0
- package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts +11 -0
- package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts.map +1 -0
- package/dist/subscriberbot/pages/procurement/ProcurementPage.js +156 -0
- package/dist/subscriberbot/pages/procurement/ProcurementPage.js.map +1 -0
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +149 -124
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
- package/dist/subscriberbot/types/negotiation.d.ts +101 -0
- package/dist/subscriberbot/types/negotiation.d.ts.map +1 -0
- package/dist/subscriberbot/types/procurement.d.ts +127 -0
- package/dist/subscriberbot/types/procurement.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { cn as e } from "../../utils/cn.js";
|
|
2
|
+
import { formatDateTime as t } from "../../utils/formatters.js";
|
|
3
|
+
import { useTr as n } from "../../hooks/useTr.js";
|
|
4
|
+
import { EVENT_LABEL as r, STATUS_LABEL as i } from "./labels.js";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
//#region src/subscriberbot/components/procurement/ProcurementThread.tsx
|
|
7
|
+
var s = {
|
|
8
|
+
customer: {
|
|
9
|
+
key: "procurement.role.customer",
|
|
10
|
+
fallback: "You"
|
|
11
|
+
},
|
|
12
|
+
expert: {
|
|
13
|
+
key: "procurement.role.expert",
|
|
14
|
+
fallback: "Procurement expert"
|
|
15
|
+
},
|
|
16
|
+
system: {
|
|
17
|
+
key: "procurement.role.system",
|
|
18
|
+
fallback: "Subscriber Bot"
|
|
19
|
+
}
|
|
20
|
+
}, c = ({ events: c, customerLabel: l }) => {
|
|
21
|
+
let u = n();
|
|
22
|
+
return c.length === 0 ? null : /* @__PURE__ */ a("ol", {
|
|
23
|
+
className: "space-y-3",
|
|
24
|
+
"data-testid": "procurement-thread",
|
|
25
|
+
children: c.map((n) => {
|
|
26
|
+
let c = s[n.actorRole] ?? s.system, d = n.actorRole === "customer" && l ? l : u(c.key, c.fallback), f = r[n.kind], p = n.toStatus ? i[n.toStatus] : null;
|
|
27
|
+
return /* @__PURE__ */ o("li", {
|
|
28
|
+
"data-kind": n.kind,
|
|
29
|
+
className: e("rounded-lg border p-3", n.internal ? "border-status-warning-text/30 bg-status-warning-bg-subtle" : "border-border-subtle bg-bg-surface"),
|
|
30
|
+
children: [/* @__PURE__ */ o("div", {
|
|
31
|
+
className: "flex flex-wrap items-center justify-between gap-2 text-xs text-text-secondary",
|
|
32
|
+
children: [/* @__PURE__ */ o("span", {
|
|
33
|
+
className: "font-medium text-text-primary",
|
|
34
|
+
children: [u(f.key, f.fallback), p && n.kind !== "CREATED" && n.fromStatus !== n.toStatus ? ` → ${u(p.key, p.fallback)}` : ""]
|
|
35
|
+
}), /* @__PURE__ */ o("span", { children: [
|
|
36
|
+
d,
|
|
37
|
+
" · ",
|
|
38
|
+
t(n.createdAt)
|
|
39
|
+
] })]
|
|
40
|
+
}), n.message && /* @__PURE__ */ a("p", {
|
|
41
|
+
className: "mt-1.5 whitespace-pre-wrap text-sm text-text-primary",
|
|
42
|
+
children: n.message
|
|
43
|
+
})]
|
|
44
|
+
}, n.id);
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
//#endregion
|
|
49
|
+
export { c as ProcurementThread };
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=ProcurementThread.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProcurementThread.js","names":[],"sources":["../../../../src/subscriberbot/components/procurement/ProcurementThread.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useTr } from '../../hooks/useTr';\nimport { cn } from '../../utils/cn';\nimport { formatDateTime } from '../../utils/formatters';\nimport type { SubProcurementEvent } from '../../types/procurement';\nimport { EVENT_LABEL, STATUS_LABEL } from './labels';\n\nconst ROLE_LABEL: Record<string, { key: string; fallback: string }> = {\n customer: { key: 'procurement.role.customer', fallback: 'You' },\n expert: { key: 'procurement.role.expert', fallback: 'Procurement expert' },\n system: { key: 'procurement.role.system', fallback: 'Subscriber Bot' },\n};\n\n/**\n * The request's message thread and timeline, oldest first. Internal desk notes\n * only ever reach the desk (the API filters them for customers); they are\n * highlighted so an expert never mistakes one for a customer-visible message.\n */\nexport const ProcurementThread: FC<{ events: SubProcurementEvent[]; customerLabel?: string }> = ({\n events,\n customerLabel,\n}) => {\n const tr = useTr();\n if (events.length === 0) return null;\n return (\n <ol className=\"space-y-3\" data-testid=\"procurement-thread\">\n {events.map((event) => {\n const role = ROLE_LABEL[event.actorRole] ?? ROLE_LABEL.system!;\n const who =\n event.actorRole === 'customer' && customerLabel\n ? customerLabel\n : tr(role.key, role.fallback);\n const label = EVENT_LABEL[event.kind];\n const to = event.toStatus ? STATUS_LABEL[event.toStatus] : null;\n return (\n <li\n key={event.id}\n data-kind={event.kind}\n className={cn(\n 'rounded-lg border p-3',\n event.internal\n ? 'border-status-warning-text/30 bg-status-warning-bg-subtle'\n : 'border-border-subtle bg-bg-surface'\n )}\n >\n <div className=\"flex flex-wrap items-center justify-between gap-2 text-xs text-text-secondary\">\n <span className=\"font-medium text-text-primary\">\n {tr(label.key, label.fallback)}\n {to && event.kind !== 'CREATED' && event.fromStatus !== event.toStatus\n ? ` → ${tr(to.key, to.fallback)}`\n : ''}\n </span>\n <span>\n {who} · {formatDateTime(event.createdAt)}\n </span>\n </div>\n {event.message && (\n <p className=\"mt-1.5 whitespace-pre-wrap text-sm text-text-primary\">\n {event.message}\n </p>\n )}\n </li>\n );\n })}\n </ol>\n );\n};\n"],"mappings":";;;;;;AAOA,IAAM,IAAgE;CACpE,UAAU;EAAE,KAAK;EAA6B,UAAU;CAAM;CAC9D,QAAQ;EAAE,KAAK;EAA2B,UAAU;CAAqB;CACzE,QAAQ;EAAE,KAAK;EAA2B,UAAU;CAAiB;AACvE,GAOa,KAAoF,EAC/F,WACA,uBACI;CACJ,IAAM,IAAK,EAAM;CAEjB,OADI,EAAO,WAAW,IAAU,OAE9B,kBAAC,MAAD;EAAI,WAAU;EAAY,eAAY;YACnC,EAAO,KAAK,MAAU;GACrB,IAAM,IAAO,EAAW,EAAM,cAAc,EAAW,QACjD,IACJ,EAAM,cAAc,cAAc,IAC9B,IACA,EAAG,EAAK,KAAK,EAAK,QAAQ,GAC1B,IAAQ,EAAY,EAAM,OAC1B,IAAK,EAAM,WAAW,EAAa,EAAM,YAAY;GAC3D,OACE,kBAAC,MAAD;IAEE,aAAW,EAAM;IACjB,WAAW,EACT,yBACA,EAAM,WACF,8DACA,oCACN;cARF,CAUE,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,QAAD;MAAM,WAAU;gBAAhB,CACG,EAAG,EAAM,KAAK,EAAM,QAAQ,GAC5B,KAAM,EAAM,SAAS,aAAa,EAAM,eAAe,EAAM,WAC1D,MAAM,EAAG,EAAG,KAAK,EAAG,QAAQ,MAC5B,EACA;SACN,kBAAC,QAAD,EAAA,UAAA;MACG;MAAI;MAAI,EAAe,EAAM,SAAS;KACnC,EAAA,CAAA,CACH;QACJ,EAAM,WACL,kBAAC,KAAD;KAAG,WAAU;eACV,EAAM;IACN,CAAA,CAEH;MAzBG,EAAM,EAyBT;EAER,CAAC;CACC,CAAA;AAER"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/subscriberbot/components/procurement/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SubProcurementEventKind, SubProcurementFeeStatus, SubProcurementRequestType, SubProcurementStatus } from '../../types/procurement';
|
|
2
|
+
|
|
3
|
+
export type Label = {
|
|
4
|
+
key: string;
|
|
5
|
+
fallback: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const REQUEST_TYPES: SubProcurementRequestType[];
|
|
8
|
+
export declare const REQUEST_TYPE_LABEL: Record<SubProcurementRequestType, Label>;
|
|
9
|
+
export declare const STATUS_LABEL: Record<SubProcurementStatus, Label>;
|
|
10
|
+
export declare const FEE_STATUS_LABEL: Record<SubProcurementFeeStatus, Label>;
|
|
11
|
+
export declare const EVENT_LABEL: Record<SubProcurementEventKind, Label>;
|
|
12
|
+
export declare function procurementStatusTone(status: SubProcurementStatus): string;
|
|
13
|
+
export declare const OPEN_STATUSES: SubProcurementStatus[];
|
|
14
|
+
/** Statuses an expert is actively working (outcome can be recorded). */
|
|
15
|
+
export declare const WORKING_STATUSES: SubProcurementStatus[];
|
|
16
|
+
//# sourceMappingURL=labels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../../../src/subscriberbot/components/procurement/labels.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EACV,uBAAuB,EACvB,uBAAuB,EACvB,yBAAyB,EACzB,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,KAAK,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtD,eAAO,MAAM,aAAa,EAAE,yBAAyB,EAKpD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,yBAAyB,EAAE,KAAK,CAKvE,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,oBAAoB,EAAE,KAAK,CAS5D,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,uBAAuB,EAAE,KAAK,CAMnE,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,uBAAuB,EAAE,KAAK,CAgB9D,CAAC;AAaF,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,oBAAoB,GAAG,MAAM,CAE1E;AAED,eAAO,MAAM,aAAa,EAAE,oBAAoB,EAM/C,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,gBAAgB,EAAE,oBAAoB,EAIlD,CAAC"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
//#region src/subscriberbot/components/procurement/labels.ts
|
|
2
|
+
var e = [
|
|
3
|
+
"RENEWAL",
|
|
4
|
+
"NEW_PURCHASE",
|
|
5
|
+
"EXPANSION",
|
|
6
|
+
"CONSOLIDATION"
|
|
7
|
+
], t = {
|
|
8
|
+
RENEWAL: {
|
|
9
|
+
key: "procurement.type.renewal",
|
|
10
|
+
fallback: "Renewal"
|
|
11
|
+
},
|
|
12
|
+
NEW_PURCHASE: {
|
|
13
|
+
key: "procurement.type.newPurchase",
|
|
14
|
+
fallback: "New purchase"
|
|
15
|
+
},
|
|
16
|
+
EXPANSION: {
|
|
17
|
+
key: "procurement.type.expansion",
|
|
18
|
+
fallback: "Expansion (more seats or modules)"
|
|
19
|
+
},
|
|
20
|
+
CONSOLIDATION: {
|
|
21
|
+
key: "procurement.type.consolidation",
|
|
22
|
+
fallback: "Consolidation"
|
|
23
|
+
}
|
|
24
|
+
}, n = {
|
|
25
|
+
DRAFT: {
|
|
26
|
+
key: "procurement.status.draft",
|
|
27
|
+
fallback: "Draft"
|
|
28
|
+
},
|
|
29
|
+
SUBMITTED: {
|
|
30
|
+
key: "procurement.status.submitted",
|
|
31
|
+
fallback: "Waiting for an expert"
|
|
32
|
+
},
|
|
33
|
+
ASSIGNED: {
|
|
34
|
+
key: "procurement.status.assigned",
|
|
35
|
+
fallback: "Expert assigned"
|
|
36
|
+
},
|
|
37
|
+
IN_PROGRESS: {
|
|
38
|
+
key: "procurement.status.inProgress",
|
|
39
|
+
fallback: "Negotiating"
|
|
40
|
+
},
|
|
41
|
+
AWAITING_CUSTOMER: {
|
|
42
|
+
key: "procurement.status.awaitingCustomer",
|
|
43
|
+
fallback: "Needs your reply"
|
|
44
|
+
},
|
|
45
|
+
SUCCEEDED: {
|
|
46
|
+
key: "procurement.status.succeeded",
|
|
47
|
+
fallback: "Savings secured"
|
|
48
|
+
},
|
|
49
|
+
NO_SAVINGS: {
|
|
50
|
+
key: "procurement.status.noSavings",
|
|
51
|
+
fallback: "No savings"
|
|
52
|
+
},
|
|
53
|
+
CANCELLED: {
|
|
54
|
+
key: "procurement.status.cancelled",
|
|
55
|
+
fallback: "Cancelled"
|
|
56
|
+
}
|
|
57
|
+
}, r = {
|
|
58
|
+
NONE: {
|
|
59
|
+
key: "procurement.fee.none",
|
|
60
|
+
fallback: "No fee"
|
|
61
|
+
},
|
|
62
|
+
PENDING_BILLING: {
|
|
63
|
+
key: "procurement.fee.pending",
|
|
64
|
+
fallback: "Fee pending"
|
|
65
|
+
},
|
|
66
|
+
BILLING: {
|
|
67
|
+
key: "procurement.fee.billing",
|
|
68
|
+
fallback: "Billing in progress"
|
|
69
|
+
},
|
|
70
|
+
BILLED: {
|
|
71
|
+
key: "procurement.fee.billed",
|
|
72
|
+
fallback: "Fee billed"
|
|
73
|
+
},
|
|
74
|
+
WAIVED: {
|
|
75
|
+
key: "procurement.fee.waived",
|
|
76
|
+
fallback: "Fee waived"
|
|
77
|
+
}
|
|
78
|
+
}, i = {
|
|
79
|
+
CREATED: {
|
|
80
|
+
key: "procurement.event.created",
|
|
81
|
+
fallback: "Request created"
|
|
82
|
+
},
|
|
83
|
+
UPDATED: {
|
|
84
|
+
key: "procurement.event.updated",
|
|
85
|
+
fallback: "Details updated"
|
|
86
|
+
},
|
|
87
|
+
SUBMITTED: {
|
|
88
|
+
key: "procurement.event.submitted",
|
|
89
|
+
fallback: "Submitted to the desk"
|
|
90
|
+
},
|
|
91
|
+
ASSIGNED: {
|
|
92
|
+
key: "procurement.event.assigned",
|
|
93
|
+
fallback: "Expert assigned"
|
|
94
|
+
},
|
|
95
|
+
STATUS_CHANGED: {
|
|
96
|
+
key: "procurement.event.statusChanged",
|
|
97
|
+
fallback: "Status changed"
|
|
98
|
+
},
|
|
99
|
+
MESSAGE: {
|
|
100
|
+
key: "procurement.event.message",
|
|
101
|
+
fallback: "Message"
|
|
102
|
+
},
|
|
103
|
+
INTERNAL_NOTE: {
|
|
104
|
+
key: "procurement.event.internalNote",
|
|
105
|
+
fallback: "Internal note"
|
|
106
|
+
},
|
|
107
|
+
OUTCOME_RECORDED: {
|
|
108
|
+
key: "procurement.event.outcome",
|
|
109
|
+
fallback: "Outcome recorded"
|
|
110
|
+
},
|
|
111
|
+
FEE_BILLED: {
|
|
112
|
+
key: "procurement.event.feeBilled",
|
|
113
|
+
fallback: "Success fee billed"
|
|
114
|
+
},
|
|
115
|
+
FEE_BILLING_FAILED: {
|
|
116
|
+
key: "procurement.event.feeBillingFailed",
|
|
117
|
+
fallback: "Fee billing failed (will be retried)"
|
|
118
|
+
},
|
|
119
|
+
FEE_WAIVED: {
|
|
120
|
+
key: "procurement.event.feeWaived",
|
|
121
|
+
fallback: "Success fee waived"
|
|
122
|
+
},
|
|
123
|
+
CANCELLED: {
|
|
124
|
+
key: "procurement.event.cancelled",
|
|
125
|
+
fallback: "Cancelled"
|
|
126
|
+
}
|
|
127
|
+
}, a = {
|
|
128
|
+
DRAFT: "bg-bg-sunken text-text-secondary",
|
|
129
|
+
SUBMITTED: "bg-[var(--color-accent-soft)] text-text-primary",
|
|
130
|
+
ASSIGNED: "bg-[var(--color-accent-soft)] text-text-primary",
|
|
131
|
+
IN_PROGRESS: "bg-[var(--color-accent-soft)] text-text-primary",
|
|
132
|
+
AWAITING_CUSTOMER: "bg-status-warning-bg-subtle text-status-warning-text",
|
|
133
|
+
SUCCEEDED: "bg-status-success-bg-subtle text-status-success-text",
|
|
134
|
+
NO_SAVINGS: "bg-bg-sunken text-text-secondary",
|
|
135
|
+
CANCELLED: "bg-bg-sunken text-text-secondary"
|
|
136
|
+
};
|
|
137
|
+
function o(e) {
|
|
138
|
+
return a[e];
|
|
139
|
+
}
|
|
140
|
+
var s = [
|
|
141
|
+
"DRAFT",
|
|
142
|
+
"SUBMITTED",
|
|
143
|
+
"ASSIGNED",
|
|
144
|
+
"IN_PROGRESS",
|
|
145
|
+
"AWAITING_CUSTOMER"
|
|
146
|
+
], c = [
|
|
147
|
+
"ASSIGNED",
|
|
148
|
+
"IN_PROGRESS",
|
|
149
|
+
"AWAITING_CUSTOMER"
|
|
150
|
+
];
|
|
151
|
+
//#endregion
|
|
152
|
+
export { i as EVENT_LABEL, r as FEE_STATUS_LABEL, s as OPEN_STATUSES, e as REQUEST_TYPES, t as REQUEST_TYPE_LABEL, n as STATUS_LABEL, c as WORKING_STATUSES, o as procurementStatusTone };
|
|
153
|
+
|
|
154
|
+
//# sourceMappingURL=labels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labels.js","names":[],"sources":["../../../../src/subscriberbot/components/procurement/labels.ts"],"sourcesContent":["/**\n * Human procurement labels (BOFF-4158): i18n keys with English fallbacks.\n */\nimport type {\n SubProcurementEventKind,\n SubProcurementFeeStatus,\n SubProcurementRequestType,\n SubProcurementStatus,\n} from '../../types/procurement';\n\nexport type Label = { key: string; fallback: string };\n\nexport const REQUEST_TYPES: SubProcurementRequestType[] = [\n 'RENEWAL',\n 'NEW_PURCHASE',\n 'EXPANSION',\n 'CONSOLIDATION',\n];\n\nexport const REQUEST_TYPE_LABEL: Record<SubProcurementRequestType, Label> = {\n RENEWAL: { key: 'procurement.type.renewal', fallback: 'Renewal' },\n NEW_PURCHASE: { key: 'procurement.type.newPurchase', fallback: 'New purchase' },\n EXPANSION: { key: 'procurement.type.expansion', fallback: 'Expansion (more seats or modules)' },\n CONSOLIDATION: { key: 'procurement.type.consolidation', fallback: 'Consolidation' },\n};\n\nexport const STATUS_LABEL: Record<SubProcurementStatus, Label> = {\n DRAFT: { key: 'procurement.status.draft', fallback: 'Draft' },\n SUBMITTED: { key: 'procurement.status.submitted', fallback: 'Waiting for an expert' },\n ASSIGNED: { key: 'procurement.status.assigned', fallback: 'Expert assigned' },\n IN_PROGRESS: { key: 'procurement.status.inProgress', fallback: 'Negotiating' },\n AWAITING_CUSTOMER: { key: 'procurement.status.awaitingCustomer', fallback: 'Needs your reply' },\n SUCCEEDED: { key: 'procurement.status.succeeded', fallback: 'Savings secured' },\n NO_SAVINGS: { key: 'procurement.status.noSavings', fallback: 'No savings' },\n CANCELLED: { key: 'procurement.status.cancelled', fallback: 'Cancelled' },\n};\n\nexport const FEE_STATUS_LABEL: Record<SubProcurementFeeStatus, Label> = {\n NONE: { key: 'procurement.fee.none', fallback: 'No fee' },\n PENDING_BILLING: { key: 'procurement.fee.pending', fallback: 'Fee pending' },\n BILLING: { key: 'procurement.fee.billing', fallback: 'Billing in progress' },\n BILLED: { key: 'procurement.fee.billed', fallback: 'Fee billed' },\n WAIVED: { key: 'procurement.fee.waived', fallback: 'Fee waived' },\n};\n\nexport const EVENT_LABEL: Record<SubProcurementEventKind, Label> = {\n CREATED: { key: 'procurement.event.created', fallback: 'Request created' },\n UPDATED: { key: 'procurement.event.updated', fallback: 'Details updated' },\n SUBMITTED: { key: 'procurement.event.submitted', fallback: 'Submitted to the desk' },\n ASSIGNED: { key: 'procurement.event.assigned', fallback: 'Expert assigned' },\n STATUS_CHANGED: { key: 'procurement.event.statusChanged', fallback: 'Status changed' },\n MESSAGE: { key: 'procurement.event.message', fallback: 'Message' },\n INTERNAL_NOTE: { key: 'procurement.event.internalNote', fallback: 'Internal note' },\n OUTCOME_RECORDED: { key: 'procurement.event.outcome', fallback: 'Outcome recorded' },\n FEE_BILLED: { key: 'procurement.event.feeBilled', fallback: 'Success fee billed' },\n FEE_BILLING_FAILED: {\n key: 'procurement.event.feeBillingFailed',\n fallback: 'Fee billing failed (will be retried)',\n },\n FEE_WAIVED: { key: 'procurement.event.feeWaived', fallback: 'Success fee waived' },\n CANCELLED: { key: 'procurement.event.cancelled', fallback: 'Cancelled' },\n};\n\nconst STATUS_TONE: Record<SubProcurementStatus, string> = {\n DRAFT: 'bg-bg-sunken text-text-secondary',\n SUBMITTED: 'bg-[var(--color-accent-soft)] text-text-primary',\n ASSIGNED: 'bg-[var(--color-accent-soft)] text-text-primary',\n IN_PROGRESS: 'bg-[var(--color-accent-soft)] text-text-primary',\n AWAITING_CUSTOMER: 'bg-status-warning-bg-subtle text-status-warning-text',\n SUCCEEDED: 'bg-status-success-bg-subtle text-status-success-text',\n NO_SAVINGS: 'bg-bg-sunken text-text-secondary',\n CANCELLED: 'bg-bg-sunken text-text-secondary',\n};\n\nexport function procurementStatusTone(status: SubProcurementStatus): string {\n return STATUS_TONE[status];\n}\n\nexport const OPEN_STATUSES: SubProcurementStatus[] = [\n 'DRAFT',\n 'SUBMITTED',\n 'ASSIGNED',\n 'IN_PROGRESS',\n 'AWAITING_CUSTOMER',\n];\n\n/** Statuses an expert is actively working (outcome can be recorded). */\nexport const WORKING_STATUSES: SubProcurementStatus[] = [\n 'ASSIGNED',\n 'IN_PROGRESS',\n 'AWAITING_CUSTOMER',\n];\n"],"mappings":";AAYA,IAAa,IAA6C;CACxD;CACA;CACA;CACA;AACF,GAEa,IAA+D;CAC1E,SAAS;EAAE,KAAK;EAA4B,UAAU;CAAU;CAChE,cAAc;EAAE,KAAK;EAAgC,UAAU;CAAe;CAC9E,WAAW;EAAE,KAAK;EAA8B,UAAU;CAAoC;CAC9F,eAAe;EAAE,KAAK;EAAkC,UAAU;CAAgB;AACpF,GAEa,IAAoD;CAC/D,OAAO;EAAE,KAAK;EAA4B,UAAU;CAAQ;CAC5D,WAAW;EAAE,KAAK;EAAgC,UAAU;CAAwB;CACpF,UAAU;EAAE,KAAK;EAA+B,UAAU;CAAkB;CAC5E,aAAa;EAAE,KAAK;EAAiC,UAAU;CAAc;CAC7E,mBAAmB;EAAE,KAAK;EAAuC,UAAU;CAAmB;CAC9F,WAAW;EAAE,KAAK;EAAgC,UAAU;CAAkB;CAC9E,YAAY;EAAE,KAAK;EAAgC,UAAU;CAAa;CAC1E,WAAW;EAAE,KAAK;EAAgC,UAAU;CAAY;AAC1E,GAEa,IAA2D;CACtE,MAAM;EAAE,KAAK;EAAwB,UAAU;CAAS;CACxD,iBAAiB;EAAE,KAAK;EAA2B,UAAU;CAAc;CAC3E,SAAS;EAAE,KAAK;EAA2B,UAAU;CAAsB;CAC3E,QAAQ;EAAE,KAAK;EAA0B,UAAU;CAAa;CAChE,QAAQ;EAAE,KAAK;EAA0B,UAAU;CAAa;AAClE,GAEa,IAAsD;CACjE,SAAS;EAAE,KAAK;EAA6B,UAAU;CAAkB;CACzE,SAAS;EAAE,KAAK;EAA6B,UAAU;CAAkB;CACzE,WAAW;EAAE,KAAK;EAA+B,UAAU;CAAwB;CACnF,UAAU;EAAE,KAAK;EAA8B,UAAU;CAAkB;CAC3E,gBAAgB;EAAE,KAAK;EAAmC,UAAU;CAAiB;CACrF,SAAS;EAAE,KAAK;EAA6B,UAAU;CAAU;CACjE,eAAe;EAAE,KAAK;EAAkC,UAAU;CAAgB;CAClF,kBAAkB;EAAE,KAAK;EAA6B,UAAU;CAAmB;CACnF,YAAY;EAAE,KAAK;EAA+B,UAAU;CAAqB;CACjF,oBAAoB;EAClB,KAAK;EACL,UAAU;CACZ;CACA,YAAY;EAAE,KAAK;EAA+B,UAAU;CAAqB;CACjF,WAAW;EAAE,KAAK;EAA+B,UAAU;CAAY;AACzE,GAEM,IAAoD;CACxD,OAAO;CACP,WAAW;CACX,UAAU;CACV,aAAa;CACb,mBAAmB;CACnB,WAAW;CACX,YAAY;CACZ,WAAW;AACb;AAEA,SAAgB,EAAsB,GAAsC;CAC1E,OAAO,EAAY;AACrB;AAEA,IAAa,IAAwC;CACnD;CACA;CACA;CACA;CACA;AACF,GAGa,IAA2C;CACtD;CACA;CACA;AACF"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { SubConnection, PaginationInput } from '../types';
|
|
2
|
+
import { SubCreateNegotiationInput, SubNegotiation, SubNegotiationStatus, SubNegotiationSummary, SubNegotiationTerms, SubRecordNegotiationOutcomeInput } from '../types/negotiation';
|
|
3
|
+
|
|
4
|
+
export declare const useNegotiationTerms: () => import('@tanstack/react-query').UseQueryResult<SubNegotiationTerms, Error>;
|
|
5
|
+
export declare const useNegotiations: (status?: SubNegotiationStatus | null, relationshipId?: string | null, pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<SubConnection<SubNegotiation>, Error>;
|
|
6
|
+
export declare const useNegotiation: (id: string | undefined) => import('@tanstack/react-query').UseQueryResult<SubNegotiation | null, Error>;
|
|
7
|
+
export declare const useNegotiationSummary: () => import('@tanstack/react-query').UseQueryResult<SubNegotiationSummary, Error>;
|
|
8
|
+
export declare const useCreateNegotiation: () => import('@tanstack/react-query').UseMutationResult<SubNegotiation, Error, {
|
|
9
|
+
input: SubCreateNegotiationInput;
|
|
10
|
+
}, unknown>;
|
|
11
|
+
export declare const useUpdateNegotiation: () => import('@tanstack/react-query').UseMutationResult<SubNegotiation, Error, {
|
|
12
|
+
id: string;
|
|
13
|
+
input: Omit<SubCreateNegotiationInput, "relationshipId">;
|
|
14
|
+
}, unknown>;
|
|
15
|
+
export declare const useSubmitNegotiation: () => import('@tanstack/react-query').UseMutationResult<SubNegotiation, Error, {
|
|
16
|
+
id: string;
|
|
17
|
+
input?: {
|
|
18
|
+
acceptAuthorization?: boolean;
|
|
19
|
+
authorizationVersion?: string;
|
|
20
|
+
};
|
|
21
|
+
}, unknown>;
|
|
22
|
+
export declare const useCancelNegotiation: () => import('@tanstack/react-query').UseMutationResult<SubNegotiation, Error, {
|
|
23
|
+
id: string;
|
|
24
|
+
reason?: string | null;
|
|
25
|
+
}, unknown>;
|
|
26
|
+
export declare const useAddNegotiationNote: () => import('@tanstack/react-query').UseMutationResult<SubNegotiation, Error, {
|
|
27
|
+
id: string;
|
|
28
|
+
message: string;
|
|
29
|
+
}, unknown>;
|
|
30
|
+
export declare const useRecordNegotiationOutcome: () => import('@tanstack/react-query').UseMutationResult<SubNegotiation, Error, {
|
|
31
|
+
id: string;
|
|
32
|
+
input: SubRecordNegotiationOutcomeInput;
|
|
33
|
+
}, unknown>;
|
|
34
|
+
export declare const useDeskNegotiations: (status?: SubNegotiationStatus | null) => import('@tanstack/react-query').UseQueryResult<SubConnection<SubNegotiation>, Error>;
|
|
35
|
+
export declare const useDeskSetStatus: () => import('@tanstack/react-query').UseMutationResult<SubNegotiation, Error, {
|
|
36
|
+
id: string;
|
|
37
|
+
status: SubNegotiationStatus;
|
|
38
|
+
message?: string | null;
|
|
39
|
+
}, unknown>;
|
|
40
|
+
export declare const useDeskRecordOutcome: () => import('@tanstack/react-query').UseMutationResult<SubNegotiation, Error, {
|
|
41
|
+
id: string;
|
|
42
|
+
input: SubRecordNegotiationOutcomeInput;
|
|
43
|
+
}, unknown>;
|
|
44
|
+
export declare const useDeskRetryFeeBilling: () => import('@tanstack/react-query').UseMutationResult<SubNegotiation, Error, {
|
|
45
|
+
id: string;
|
|
46
|
+
}, unknown>;
|
|
47
|
+
export declare const useDeskWaiveFee: () => import('@tanstack/react-query').UseMutationResult<SubNegotiation, Error, {
|
|
48
|
+
id: string;
|
|
49
|
+
reason: string;
|
|
50
|
+
}, unknown>;
|
|
51
|
+
//# sourceMappingURL=useNegotiationApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNegotiationApi.d.ts","sourceRoot":"","sources":["../../../src/subscriberbot/hooks/useNegotiationApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,gCAAgC,EACjC,MAAM,sBAAsB,CAAC;AAwB9B,eAAO,MAAM,mBAAmB,kFAgB/B,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,SAAQ,oBAAoB,GAAG,IAAW,EAC1C,iBAAgB,MAAM,GAAG,IAAW,EACpC,aAAY,eAA+B,yFAmB5C,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,IAAI,MAAM,GAAG,SAAS,iFAgBpD,CAAC;AAEF,eAAO,MAAM,qBAAqB,oFAkBjC,CAAC;AAyBF,eAAO,MAAM,oBAAoB;WACC,yBAAyB;WAGxD,CAAC;AAEJ,eAAO,MAAM,oBAAoB;QACF,MAAM;WAAS,IAAI,CAAC,yBAAyB,EAAE,gBAAgB,CAAC;WAG5F,CAAC;AAEJ,eAAO,MAAM,oBAAoB;QAEzB,MAAM;YACF;QAAE,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAAC,oBAAoB,CAAC,EAAE,MAAM,CAAA;KAAE;WAIzE,CAAC;AAEJ,eAAO,MAAM,oBAAoB;QACF,MAAM;aAAW,MAAM,GAAG,IAAI;WAG1D,CAAC;AAEJ,eAAO,MAAM,qBAAqB;QACH,MAAM;aAAW,MAAM;WAGnD,CAAC;AAEJ,eAAO,MAAM,2BAA2B;QACT,MAAM;WAAS,gCAAgC;WAG3E,CAAC;AAMJ,eAAO,MAAM,mBAAmB,GAAI,SAAQ,oBAAoB,GAAG,IAAW,yFAkB7E,CAAC;AAEF,eAAO,MAAM,gBAAgB;QACE,MAAM;YAAU,oBAAoB;cAAY,MAAM,GAAG,IAAI;WAGzF,CAAC;AAEJ,eAAO,MAAM,oBAAoB;QACF,MAAM;WAAS,gCAAgC;WAG3E,CAAC;AAEJ,eAAO,MAAM,sBAAsB;QACJ,MAAM;WAGlC,CAAC;AAEJ,eAAO,MAAM,eAAe;QACG,MAAM;YAAU,MAAM;WAGlD,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { useSubscriberBot as e } from "../context/SubscriberBotContext.js";
|
|
2
|
+
import "../context/index.js";
|
|
3
|
+
import { subQuery as t } from "./useSubscriberBotApi.js";
|
|
4
|
+
import { useMutation as n, useQuery as r, useQueryClient as i } from "@tanstack/react-query";
|
|
5
|
+
//#region src/subscriberbot/hooks/useNegotiationApi.ts
|
|
6
|
+
var a = {
|
|
7
|
+
all: ["subscriberbot", "negotiations"],
|
|
8
|
+
list: (e, t) => [
|
|
9
|
+
"subscriberbot",
|
|
10
|
+
"negotiations",
|
|
11
|
+
"list",
|
|
12
|
+
e,
|
|
13
|
+
t
|
|
14
|
+
],
|
|
15
|
+
one: (e) => [
|
|
16
|
+
"subscriberbot",
|
|
17
|
+
"negotiations",
|
|
18
|
+
"one",
|
|
19
|
+
e
|
|
20
|
+
],
|
|
21
|
+
summary: [
|
|
22
|
+
"subscriberbot",
|
|
23
|
+
"negotiations",
|
|
24
|
+
"summary"
|
|
25
|
+
],
|
|
26
|
+
terms: [
|
|
27
|
+
"subscriberbot",
|
|
28
|
+
"negotiations",
|
|
29
|
+
"terms"
|
|
30
|
+
],
|
|
31
|
+
desk: (e) => [
|
|
32
|
+
"subscriberbot",
|
|
33
|
+
"negotiations",
|
|
34
|
+
"desk",
|
|
35
|
+
e
|
|
36
|
+
]
|
|
37
|
+
}, o = "\n id workspaceId ownerId relationshipId providerName billType mode status targetOutcome\n currentAmount currency interval targetAmount tenureMonths competitorOffer accountHolderName\n accountHint notes playbook authorizationVersion authorizedAt submittedAt startedAt completedAt\n newAmount oneTimeCredit recurringSavings firstYearSavings outcomeSummary appliedToRelationship\n feeRate feeAmount feeStatus feeBilledAt feeWaivedReason createdAt updatedAt\n", s = "events { id kind fromStatus toStatus message actorRole createdAt }", c = () => {
|
|
38
|
+
let { apiGatewayUrl: n } = e();
|
|
39
|
+
return r({
|
|
40
|
+
queryKey: a.terms,
|
|
41
|
+
queryFn: async () => (await t("query SubNegotiationTerms {\n subNegotiationTerms { authorizationVersion authorizationText managedFeeRate selfServeFeeRate maxAcceptedTermMonths }\n }", {}, n)).subNegotiationTerms,
|
|
42
|
+
staleTime: 300 * 1e3
|
|
43
|
+
});
|
|
44
|
+
}, l = (n = null, i = null, s = { limit: 50 }) => {
|
|
45
|
+
let { apiGatewayUrl: c } = e();
|
|
46
|
+
return r({
|
|
47
|
+
queryKey: a.list(n, i),
|
|
48
|
+
queryFn: async () => (await t(`query SubListNegotiations($pagination: PaginationInput, $status: SubNegotiationStatus, $relationshipId: ID) {
|
|
49
|
+
subListNegotiations(pagination: $pagination, status: $status, relationshipId: $relationshipId) {
|
|
50
|
+
items { ${o} }
|
|
51
|
+
pageInfo { hasMore cursor }
|
|
52
|
+
}
|
|
53
|
+
}`, {
|
|
54
|
+
pagination: s,
|
|
55
|
+
status: n,
|
|
56
|
+
relationshipId: i
|
|
57
|
+
}, c)).subListNegotiations
|
|
58
|
+
});
|
|
59
|
+
}, u = (n) => {
|
|
60
|
+
let { apiGatewayUrl: i } = e();
|
|
61
|
+
return r({
|
|
62
|
+
queryKey: a.one(n ?? ""),
|
|
63
|
+
enabled: !!n,
|
|
64
|
+
queryFn: async () => (await t(`query SubNegotiation($id: ID!) {
|
|
65
|
+
subNegotiation(id: $id) { ${o} ${s} }
|
|
66
|
+
}`, { id: n }, i)).subNegotiation
|
|
67
|
+
});
|
|
68
|
+
}, d = () => {
|
|
69
|
+
let { apiGatewayUrl: n } = e();
|
|
70
|
+
return r({
|
|
71
|
+
queryKey: a.summary,
|
|
72
|
+
queryFn: async () => (await t("query SubNegotiationSummary {\n subNegotiationSummary {\n totalCount openCount succeededCount noSavingsCount\n totals { currency firstYearSavings feesCharged succeededCount }\n }\n }", {}, n)).subNegotiationSummary
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
function f(r, o) {
|
|
76
|
+
let s = i(), { apiGatewayUrl: c } = e();
|
|
77
|
+
return n({
|
|
78
|
+
mutationFn: async (e) => {
|
|
79
|
+
let n = (await t(o, e, c))[r];
|
|
80
|
+
if (!n) throw Error(`${r} returned no data`);
|
|
81
|
+
return n;
|
|
82
|
+
},
|
|
83
|
+
onSuccess: () => {
|
|
84
|
+
s.invalidateQueries({ queryKey: a.all });
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
var p = `{ ${o} ${s} }`, m = () => f("subCreateNegotiation", `mutation SubCreateNegotiation($input: SubCreateNegotiationInput!) { subCreateNegotiation(input: $input) ${p} }`), h = () => f("subSubmitNegotiation", `mutation SubSubmitNegotiation($id: ID!, $input: SubSubmitNegotiationInput) { subSubmitNegotiation(id: $id, input: $input) ${p} }`), g = () => f("subCancelNegotiation", `mutation SubCancelNegotiation($id: ID!, $reason: String) { subCancelNegotiation(id: $id, reason: $reason) ${p} }`), _ = () => f("subAddNegotiationNote", `mutation SubAddNegotiationNote($id: ID!, $message: String!) { subAddNegotiationNote(id: $id, message: $message) ${p} }`), v = () => f("subRecordNegotiationOutcome", `mutation SubRecordNegotiationOutcome($id: ID!, $input: SubRecordNegotiationOutcomeInput!) { subRecordNegotiationOutcome(id: $id, input: $input) ${p} }`), y = (n = null) => {
|
|
89
|
+
let { apiGatewayUrl: i } = e();
|
|
90
|
+
return r({
|
|
91
|
+
queryKey: a.desk(n),
|
|
92
|
+
queryFn: async () => (await t(`query SubAdminListNegotiations($pagination: PaginationInput, $status: SubNegotiationStatus) {
|
|
93
|
+
subAdminListNegotiations(pagination: $pagination, status: $status) {
|
|
94
|
+
items { ${o} ${s} }
|
|
95
|
+
pageInfo { hasMore cursor }
|
|
96
|
+
}
|
|
97
|
+
}`, {
|
|
98
|
+
pagination: { limit: 50 },
|
|
99
|
+
status: n
|
|
100
|
+
}, i)).subAdminListNegotiations
|
|
101
|
+
});
|
|
102
|
+
}, b = () => f("subAdminSetNegotiationStatus", `mutation SubAdminSetNegotiationStatus($id: ID!, $status: SubNegotiationStatus!, $message: String) { subAdminSetNegotiationStatus(id: $id, status: $status, message: $message) ${p} }`), x = () => f("subAdminRecordNegotiationOutcome", `mutation SubAdminRecordNegotiationOutcome($id: ID!, $input: SubRecordNegotiationOutcomeInput!) { subAdminRecordNegotiationOutcome(id: $id, input: $input) ${p} }`), S = () => f("subAdminRetryNegotiationFeeBilling", `mutation SubAdminRetryNegotiationFeeBilling($id: ID!) { subAdminRetryNegotiationFeeBilling(id: $id) ${p} }`), C = () => f("subAdminWaiveNegotiationFee", `mutation SubAdminWaiveNegotiationFee($id: ID!, $reason: String!) { subAdminWaiveNegotiationFee(id: $id, reason: $reason) ${p} }`);
|
|
103
|
+
//#endregion
|
|
104
|
+
export { _ as useAddNegotiationNote, g as useCancelNegotiation, m as useCreateNegotiation, y as useDeskNegotiations, x as useDeskRecordOutcome, S as useDeskRetryFeeBilling, b as useDeskSetStatus, C as useDeskWaiveFee, u as useNegotiation, d as useNegotiationSummary, c as useNegotiationTerms, l as useNegotiations, v as useRecordNegotiationOutcome, h as useSubmitNegotiation };
|
|
105
|
+
|
|
106
|
+
//# sourceMappingURL=useNegotiationApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNegotiationApi.js","names":[],"sources":["../../../src/subscriberbot/hooks/useNegotiationApi.ts"],"sourcesContent":["/**\n * Bill negotiation hooks (BOFF-4154)\n * @module subscriberbot/hooks\n *\n * React-Query hooks for the `SubNegotiation*` contract of\n * wspace-subscriberbot-svc: the customer's requests, the service terms, the\n * summary and the negotiation desk queue (super admins, in admin-app). Same\n * transport as every other Subscriber Bot hook (`subQuery`).\n */\n\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\n\nimport { useSubscriberBot } from '../context';\nimport type { SubConnection, PaginationInput } from '../types';\nimport type {\n SubCreateNegotiationInput,\n SubNegotiation,\n SubNegotiationStatus,\n SubNegotiationSummary,\n SubNegotiationTerms,\n SubRecordNegotiationOutcomeInput,\n} from '../types/negotiation';\nimport { subQuery } from './useSubscriberBotApi';\n\nconst KEY = {\n all: ['subscriberbot', 'negotiations'] as const,\n list: (status: SubNegotiationStatus | null, relationshipId: string | null) =>\n ['subscriberbot', 'negotiations', 'list', status, relationshipId] as const,\n one: (id: string) => ['subscriberbot', 'negotiations', 'one', id] as const,\n summary: ['subscriberbot', 'negotiations', 'summary'] as const,\n terms: ['subscriberbot', 'negotiations', 'terms'] as const,\n desk: (status: SubNegotiationStatus | null) =>\n ['subscriberbot', 'negotiations', 'desk', status] as const,\n};\n\nconst NEGOTIATION_FIELDS = `\n id workspaceId ownerId relationshipId providerName billType mode status targetOutcome\n currentAmount currency interval targetAmount tenureMonths competitorOffer accountHolderName\n accountHint notes playbook authorizationVersion authorizedAt submittedAt startedAt completedAt\n newAmount oneTimeCredit recurringSavings firstYearSavings outcomeSummary appliedToRelationship\n feeRate feeAmount feeStatus feeBilledAt feeWaivedReason createdAt updatedAt\n`;\n\nconst EVENT_FIELDS = `events { id kind fromStatus toStatus message actorRole createdAt }`;\n\nexport const useNegotiationTerms = () => {\n const { apiGatewayUrl } = useSubscriberBot();\n return useQuery({\n queryKey: KEY.terms,\n queryFn: async () => {\n const result = await subQuery<{ subNegotiationTerms: SubNegotiationTerms }>(\n `query SubNegotiationTerms {\n subNegotiationTerms { authorizationVersion authorizationText managedFeeRate selfServeFeeRate maxAcceptedTermMonths }\n }`,\n {},\n apiGatewayUrl\n );\n return result.subNegotiationTerms;\n },\n staleTime: 5 * 60 * 1000,\n });\n};\n\nexport const useNegotiations = (\n status: SubNegotiationStatus | null = null,\n relationshipId: string | null = null,\n pagination: PaginationInput = { limit: 50 }\n) => {\n const { apiGatewayUrl } = useSubscriberBot();\n return useQuery({\n queryKey: KEY.list(status, relationshipId),\n queryFn: async () => {\n const result = await subQuery<{ subListNegotiations: SubConnection<SubNegotiation> }>(\n `query SubListNegotiations($pagination: PaginationInput, $status: SubNegotiationStatus, $relationshipId: ID) {\n subListNegotiations(pagination: $pagination, status: $status, relationshipId: $relationshipId) {\n items { ${NEGOTIATION_FIELDS} }\n pageInfo { hasMore cursor }\n }\n }`,\n { pagination, status, relationshipId },\n apiGatewayUrl\n );\n return result.subListNegotiations;\n },\n });\n};\n\nexport const useNegotiation = (id: string | undefined) => {\n const { apiGatewayUrl } = useSubscriberBot();\n return useQuery({\n queryKey: KEY.one(id ?? ''),\n enabled: Boolean(id),\n queryFn: async () => {\n const result = await subQuery<{ subNegotiation: SubNegotiation | null }>(\n `query SubNegotiation($id: ID!) {\n subNegotiation(id: $id) { ${NEGOTIATION_FIELDS} ${EVENT_FIELDS} }\n }`,\n { id },\n apiGatewayUrl\n );\n return result.subNegotiation;\n },\n });\n};\n\nexport const useNegotiationSummary = () => {\n const { apiGatewayUrl } = useSubscriberBot();\n return useQuery({\n queryKey: KEY.summary,\n queryFn: async () => {\n const result = await subQuery<{ subNegotiationSummary: SubNegotiationSummary }>(\n `query SubNegotiationSummary {\n subNegotiationSummary {\n totalCount openCount succeededCount noSavingsCount\n totals { currency firstYearSavings feesCharged succeededCount }\n }\n }`,\n {},\n apiGatewayUrl\n );\n return result.subNegotiationSummary;\n },\n });\n};\n\n/** Shared mutation plumbing: every write refreshes every negotiation query. */\nfunction useNegotiationMutation<TVars>(operation: string, document: string) {\n const queryClient = useQueryClient();\n const { apiGatewayUrl } = useSubscriberBot();\n return useMutation({\n mutationFn: async (variables: TVars) => {\n const result = await subQuery<Record<string, SubNegotiation>>(\n document,\n variables as Record<string, unknown>,\n apiGatewayUrl\n );\n const value = result[operation];\n if (!value) throw new Error(`${operation} returned no data`);\n return value;\n },\n onSuccess: () => {\n void queryClient.invalidateQueries({ queryKey: KEY.all });\n },\n });\n}\n\nconst RETURNING = `{ ${NEGOTIATION_FIELDS} ${EVENT_FIELDS} }`;\n\nexport const useCreateNegotiation = () =>\n useNegotiationMutation<{ input: SubCreateNegotiationInput }>(\n 'subCreateNegotiation',\n `mutation SubCreateNegotiation($input: SubCreateNegotiationInput!) { subCreateNegotiation(input: $input) ${RETURNING} }`\n );\n\nexport const useUpdateNegotiation = () =>\n useNegotiationMutation<{ id: string; input: Omit<SubCreateNegotiationInput, 'relationshipId'> }>(\n 'subUpdateNegotiation',\n `mutation SubUpdateNegotiation($id: ID!, $input: SubUpdateNegotiationInput!) { subUpdateNegotiation(id: $id, input: $input) ${RETURNING} }`\n );\n\nexport const useSubmitNegotiation = () =>\n useNegotiationMutation<{\n id: string;\n input?: { acceptAuthorization?: boolean; authorizationVersion?: string };\n }>(\n 'subSubmitNegotiation',\n `mutation SubSubmitNegotiation($id: ID!, $input: SubSubmitNegotiationInput) { subSubmitNegotiation(id: $id, input: $input) ${RETURNING} }`\n );\n\nexport const useCancelNegotiation = () =>\n useNegotiationMutation<{ id: string; reason?: string | null }>(\n 'subCancelNegotiation',\n `mutation SubCancelNegotiation($id: ID!, $reason: String) { subCancelNegotiation(id: $id, reason: $reason) ${RETURNING} }`\n );\n\nexport const useAddNegotiationNote = () =>\n useNegotiationMutation<{ id: string; message: string }>(\n 'subAddNegotiationNote',\n `mutation SubAddNegotiationNote($id: ID!, $message: String!) { subAddNegotiationNote(id: $id, message: $message) ${RETURNING} }`\n );\n\nexport const useRecordNegotiationOutcome = () =>\n useNegotiationMutation<{ id: string; input: SubRecordNegotiationOutcomeInput }>(\n 'subRecordNegotiationOutcome',\n `mutation SubRecordNegotiationOutcome($id: ID!, $input: SubRecordNegotiationOutcomeInput!) { subRecordNegotiationOutcome(id: $id, input: $input) ${RETURNING} }`\n );\n\n// ---------------------------------------------------------------------------\n// Negotiation desk (super admin, admin-app)\n// ---------------------------------------------------------------------------\n\nexport const useDeskNegotiations = (status: SubNegotiationStatus | null = null) => {\n const { apiGatewayUrl } = useSubscriberBot();\n return useQuery({\n queryKey: KEY.desk(status),\n queryFn: async () => {\n const result = await subQuery<{ subAdminListNegotiations: SubConnection<SubNegotiation> }>(\n `query SubAdminListNegotiations($pagination: PaginationInput, $status: SubNegotiationStatus) {\n subAdminListNegotiations(pagination: $pagination, status: $status) {\n items { ${NEGOTIATION_FIELDS} ${EVENT_FIELDS} }\n pageInfo { hasMore cursor }\n }\n }`,\n { pagination: { limit: 50 }, status },\n apiGatewayUrl\n );\n return result.subAdminListNegotiations;\n },\n });\n};\n\nexport const useDeskSetStatus = () =>\n useNegotiationMutation<{ id: string; status: SubNegotiationStatus; message?: string | null }>(\n 'subAdminSetNegotiationStatus',\n `mutation SubAdminSetNegotiationStatus($id: ID!, $status: SubNegotiationStatus!, $message: String) { subAdminSetNegotiationStatus(id: $id, status: $status, message: $message) ${RETURNING} }`\n );\n\nexport const useDeskRecordOutcome = () =>\n useNegotiationMutation<{ id: string; input: SubRecordNegotiationOutcomeInput }>(\n 'subAdminRecordNegotiationOutcome',\n `mutation SubAdminRecordNegotiationOutcome($id: ID!, $input: SubRecordNegotiationOutcomeInput!) { subAdminRecordNegotiationOutcome(id: $id, input: $input) ${RETURNING} }`\n );\n\nexport const useDeskRetryFeeBilling = () =>\n useNegotiationMutation<{ id: string }>(\n 'subAdminRetryNegotiationFeeBilling',\n `mutation SubAdminRetryNegotiationFeeBilling($id: ID!) { subAdminRetryNegotiationFeeBilling(id: $id) ${RETURNING} }`\n );\n\nexport const useDeskWaiveFee = () =>\n useNegotiationMutation<{ id: string; reason: string }>(\n 'subAdminWaiveNegotiationFee',\n `mutation SubAdminWaiveNegotiationFee($id: ID!, $reason: String!) { subAdminWaiveNegotiationFee(id: $id, reason: $reason) ${RETURNING} }`\n );\n"],"mappings":";;;;;AAwBA,IAAM,IAAM;CACV,KAAK,CAAC,iBAAiB,cAAc;CACrC,OAAO,GAAqC,MAC1C;EAAC;EAAiB;EAAgB;EAAQ;EAAQ;CAAc;CAClE,MAAM,MAAe;EAAC;EAAiB;EAAgB;EAAO;CAAE;CAChE,SAAS;EAAC;EAAiB;EAAgB;CAAS;CACpD,OAAO;EAAC;EAAiB;EAAgB;CAAO;CAChD,OAAO,MACL;EAAC;EAAiB;EAAgB;EAAQ;CAAM;AACpD,GAEM,IAAqB,idAQrB,IAAe,sEAER,UAA4B;CACvC,IAAM,EAAE,qBAAkB,EAAiB;CAC3C,OAAO,EAAS;EACd,UAAU,EAAI;EACd,SAAS,aAQA,MAPc,EACnB,0KAGA,CAAC,GACD,CACF,GACc;EAEhB,WAAW,MAAS;CACtB,CAAC;AACH,GAEa,KACX,IAAsC,MACtC,IAAgC,MAChC,IAA8B,EAAE,OAAO,GAAG,MACvC;CACH,IAAM,EAAE,qBAAkB,EAAiB;CAC3C,OAAO,EAAS;EACd,UAAU,EAAI,KAAK,GAAQ,CAAc;EACzC,SAAS,aAWA,MAVc,EACnB;;sBAEc,EAAmB;;;YAIjC;GAAE;GAAY;GAAQ;EAAe,GACrC,CACF,GACc;CAElB,CAAC;AACH,GAEa,KAAkB,MAA2B;CACxD,IAAM,EAAE,qBAAkB,EAAiB;CAC3C,OAAO,EAAS;EACd,UAAU,EAAI,IAAI,KAAM,EAAE;EAC1B,SAAS,EAAQ;EACjB,SAAS,aAQA,MAPc,EACnB;sCAC8B,EAAmB,GAAG,EAAa;YAEjE,EAAE,MAAG,GACL,CACF,GACc;CAElB,CAAC;AACH,GAEa,UAA8B;CACzC,IAAM,EAAE,qBAAkB,EAAiB;CAC3C,OAAO,EAAS;EACd,UAAU,EAAI;EACd,SAAS,aAWA,MAVc,EACnB,yOAMA,CAAC,GACD,CACF,GACc;CAElB,CAAC;AACH;AAGA,SAAS,EAA8B,GAAmB,GAAkB;CAC1E,IAAM,IAAc,EAAe,GAC7B,EAAE,qBAAkB,EAAiB;CAC3C,OAAO,EAAY;EACjB,YAAY,OAAO,MAAqB;GAMtC,IAAM,KAAQ,MALO,EACnB,GACA,GACA,CACF,GACqB;GACrB,IAAI,CAAC,GAAO,MAAU,MAAM,GAAG,EAAU,kBAAkB;GAC3D,OAAO;EACT;EACA,iBAAiB;GACf,EAAiB,kBAAkB,EAAE,UAAU,EAAI,IAAI,CAAC;EAC1D;CACF,CAAC;AACH;AAEA,IAAM,IAAY,KAAK,EAAmB,GAAG,EAAa,KAE7C,UACX,EACE,wBACA,2GAA2G,EAAU,GACvH,GAQW,UACX,EAIE,wBACA,6HAA6H,EAAU,GACzI,GAEW,UACX,EACE,wBACA,6GAA6G,EAAU,GACzH,GAEW,UACX,EACE,yBACA,mHAAmH,EAAU,GAC/H,GAEW,UACX,EACE,+BACA,mJAAmJ,EAAU,GAC/J,GAMW,KAAuB,IAAsC,SAAS;CACjF,IAAM,EAAE,qBAAkB,EAAiB;CAC3C,OAAO,EAAS;EACd,UAAU,EAAI,KAAK,CAAM;EACzB,SAAS,aAWA,MAVc,EACnB;;sBAEc,EAAmB,GAAG,EAAa;;;YAIjD;GAAE,YAAY,EAAE,OAAO,GAAG;GAAG;EAAO,GACpC,CACF,GACc;CAElB,CAAC;AACH,GAEa,UACX,EACE,gCACA,iLAAiL,EAAU,GAC7L,GAEW,UACX,EACE,oCACA,6JAA6J,EAAU,GACzK,GAEW,UACX,EACE,sCACA,uGAAuG,EAAU,GACnH,GAEW,UACX,EACE,+BACA,4HAA4H,EAAU,GACxI"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { SubConnection } from '../types';
|
|
2
|
+
import { SubCreateProcurementRequestInput, SubProcurementExpert, SubProcurementRequest, SubProcurementStatus, SubProcurementSummary, SubProcurementTerms, SubRecordProcurementOutcomeInput, SubUpsertProcurementExpertInput } from '../types/procurement';
|
|
3
|
+
|
|
4
|
+
export type ProcurementDeskView = 'ALL' | 'UNASSIGNED' | 'MINE';
|
|
5
|
+
export declare const useProcurementTerms: () => import('@tanstack/react-query').UseQueryResult<SubProcurementTerms, Error>;
|
|
6
|
+
/** Cursor-paged list of the workspace's requests; `fetchNextPage` loads more. */
|
|
7
|
+
export declare const useProcurementRequests: (status?: SubProcurementStatus | null) => import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/query-core').InfiniteData<SubConnection<SubProcurementRequest>, unknown>, Error>;
|
|
8
|
+
export declare const useProcurementRequest: (id: string | undefined) => import('@tanstack/react-query').UseQueryResult<SubProcurementRequest | null, Error>;
|
|
9
|
+
export declare const useProcurementSummary: () => import('@tanstack/react-query').UseQueryResult<SubProcurementSummary, Error>;
|
|
10
|
+
export declare const useCreateProcurementRequest: () => import('@tanstack/react-query').UseMutationResult<SubProcurementRequest, Error, {
|
|
11
|
+
input: SubCreateProcurementRequestInput;
|
|
12
|
+
}, unknown>;
|
|
13
|
+
export declare const useSubmitProcurementRequest: () => import('@tanstack/react-query').UseMutationResult<SubProcurementRequest, Error, {
|
|
14
|
+
id: string;
|
|
15
|
+
input: {
|
|
16
|
+
acceptAuthorization: boolean;
|
|
17
|
+
authorizationVersion: string;
|
|
18
|
+
};
|
|
19
|
+
}, unknown>;
|
|
20
|
+
export declare const useCancelProcurementRequest: () => import('@tanstack/react-query').UseMutationResult<SubProcurementRequest, Error, {
|
|
21
|
+
id: string;
|
|
22
|
+
reason?: string | null;
|
|
23
|
+
}, unknown>;
|
|
24
|
+
export declare const useSendProcurementMessage: () => import('@tanstack/react-query').UseMutationResult<SubProcurementRequest, Error, {
|
|
25
|
+
id: string;
|
|
26
|
+
message: string;
|
|
27
|
+
}, unknown>;
|
|
28
|
+
export declare const useDeskProcurementRequests: (status?: SubProcurementStatus | null, view?: ProcurementDeskView) => import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/query-core').InfiniteData<SubConnection<SubProcurementRequest>, unknown>, Error>;
|
|
29
|
+
export declare const useProcurementExperts: () => import('@tanstack/react-query').UseQueryResult<SubProcurementExpert[], Error>;
|
|
30
|
+
export declare const useUpsertProcurementExpert: () => import('@tanstack/react-query').UseMutationResult<SubProcurementExpert, Error, {
|
|
31
|
+
input: SubUpsertProcurementExpertInput;
|
|
32
|
+
}, unknown>;
|
|
33
|
+
export declare const useDeskAssignProcurement: () => import('@tanstack/react-query').UseMutationResult<SubProcurementRequest, Error, {
|
|
34
|
+
id: string;
|
|
35
|
+
expertId?: string | null;
|
|
36
|
+
}, unknown>;
|
|
37
|
+
export declare const useDeskSetProcurementStatus: () => import('@tanstack/react-query').UseMutationResult<SubProcurementRequest, Error, {
|
|
38
|
+
id: string;
|
|
39
|
+
status: SubProcurementStatus;
|
|
40
|
+
message?: string | null;
|
|
41
|
+
}, unknown>;
|
|
42
|
+
export declare const useDeskSendProcurementMessage: () => import('@tanstack/react-query').UseMutationResult<SubProcurementRequest, Error, {
|
|
43
|
+
id: string;
|
|
44
|
+
message: string;
|
|
45
|
+
internal?: boolean;
|
|
46
|
+
}, unknown>;
|
|
47
|
+
export declare const useDeskRecordProcurementOutcome: () => import('@tanstack/react-query').UseMutationResult<SubProcurementRequest, Error, {
|
|
48
|
+
id: string;
|
|
49
|
+
input: SubRecordProcurementOutcomeInput;
|
|
50
|
+
}, unknown>;
|
|
51
|
+
export declare const useDeskRetryProcurementFee: () => import('@tanstack/react-query').UseMutationResult<SubProcurementRequest, Error, {
|
|
52
|
+
id: string;
|
|
53
|
+
}, unknown>;
|
|
54
|
+
export declare const useDeskWaiveProcurementFee: () => import('@tanstack/react-query').UseMutationResult<SubProcurementRequest, Error, {
|
|
55
|
+
id: string;
|
|
56
|
+
reason: string;
|
|
57
|
+
}, unknown>;
|
|
58
|
+
//# sourceMappingURL=useProcurementApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useProcurementApi.d.ts","sourceRoot":"","sources":["../../../src/subscriberbot/hooks/useProcurementApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EACV,gCAAgC,EAChC,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,gCAAgC,EAChC,+BAA+B,EAChC,MAAM,sBAAsB,CAAC;AAG9B,MAAM,MAAM,mBAAmB,GAAG,KAAK,GAAG,YAAY,GAAG,MAAM,CAAC;AA2BhE,eAAO,MAAM,mBAAmB,kFAgB/B,CAAC;AAQF,iFAAiF;AACjF,eAAO,MAAM,sBAAsB,GAAI,SAAQ,oBAAoB,GAAG,IAAW,8JAsBhF,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,IAAI,MAAM,GAAG,SAAS,wFAgB3D,CAAC;AAEF,eAAO,MAAM,qBAAqB,oFAkBjC,CAAC;AA4BF,eAAO,MAAM,2BAA2B;WACN,gCAAgC;WAG/D,CAAC;AAEJ,eAAO,MAAM,2BAA2B;QAEhC,MAAM;WACH;QAAE,mBAAmB,EAAE,OAAO,CAAC;QAAC,oBAAoB,EAAE,MAAM,CAAA;KAAE;WAItE,CAAC;AAEJ,eAAO,MAAM,2BAA2B;QACT,MAAM;aAAW,MAAM,GAAG,IAAI;WAG1D,CAAC;AAEJ,eAAO,MAAM,yBAAyB;QACP,MAAM;aAAW,MAAM;WAGnD,CAAC;AAMJ,eAAO,MAAM,0BAA0B,GACrC,SAAQ,oBAAoB,GAAG,IAAW,EAC1C,OAAM,mBAA2B,8JA4BlC,CAAC;AAEF,eAAO,MAAM,qBAAqB,qFAajC,CAAC;AAEF,eAAO,MAAM,0BAA0B;WACL,+BAA+B;WAG9D,CAAC;AAEJ,eAAO,MAAM,wBAAwB;QACN,MAAM;eAAa,MAAM,GAAG,IAAI;WAG5D,CAAC;AAEJ,eAAO,MAAM,2BAA2B;QACT,MAAM;YAAU,oBAAoB;cAAY,MAAM,GAAG,IAAI;WAGzF,CAAC;AAEJ,eAAO,MAAM,6BAA6B;QACX,MAAM;aAAW,MAAM;eAAa,OAAO;WAGvE,CAAC;AAEJ,eAAO,MAAM,+BAA+B;QACb,MAAM;WAAS,gCAAgC;WAG3E,CAAC;AAEJ,eAAO,MAAM,0BAA0B;QACR,MAAM;WAGlC,CAAC;AAEJ,eAAO,MAAM,0BAA0B;QACR,MAAM;YAAU,MAAM;WAGlD,CAAC"}
|