@burdenoff/microfe-subscriberbot 2026.1103.2 → 2026.1105.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/index.js +3 -3
- package/dist/stories/Accessibility.stories.d.ts +13 -0
- package/dist/stories/Accessibility.stories.d.ts.map +1 -0
- package/dist/stories/pages/AgentNewPage.stories.d.ts.map +1 -1
- package/dist/stories/pages/BankConnectionsPage.stories.d.ts +1 -0
- package/dist/stories/pages/BankConnectionsPage.stories.d.ts.map +1 -1
- package/dist/stories/pages/DashboardPage.stories.d.ts.map +1 -1
- package/dist/stories/pages/EnterpriseSpendPage.stories.d.ts.map +1 -1
- package/dist/stories/pages/InboxPage.stories.d.ts.map +1 -1
- package/dist/subscriberbot/admin/AdminDashboardPage.d.ts.map +1 -1
- package/dist/subscriberbot/admin/AdminDashboardPage.js +168 -168
- package/dist/subscriberbot/admin/AdminDashboardPage.js.map +1 -1
- package/dist/subscriberbot/admin/NegotiationDeskPanel.d.ts.map +1 -1
- package/dist/subscriberbot/admin/NegotiationDeskPanel.js +116 -116
- package/dist/subscriberbot/admin/NegotiationDeskPanel.js.map +1 -1
- package/dist/subscriberbot/admin/ProcurementDeskPanel.d.ts.map +1 -1
- package/dist/subscriberbot/admin/ProcurementDeskPanel.js +211 -211
- package/dist/subscriberbot/admin/ProcurementDeskPanel.js.map +1 -1
- package/dist/subscriberbot/components/Modal.d.ts.map +1 -1
- package/dist/subscriberbot/components/Modal.js +43 -33
- package/dist/subscriberbot/components/Modal.js.map +1 -1
- package/dist/subscriberbot/components/PageLayout.d.ts +6 -0
- package/dist/subscriberbot/components/PageLayout.d.ts.map +1 -1
- package/dist/subscriberbot/components/PageLayout.js +2 -1
- package/dist/subscriberbot/components/PageLayout.js.map +1 -1
- package/dist/subscriberbot/components/PostureOptions.d.ts.map +1 -1
- package/dist/subscriberbot/components/PostureOptions.js +10 -10
- package/dist/subscriberbot/components/PostureOptions.js.map +1 -1
- package/dist/subscriberbot/components/StateViews.d.ts +2 -0
- package/dist/subscriberbot/components/StateViews.d.ts.map +1 -1
- package/dist/subscriberbot/components/StateViews.js +46 -37
- package/dist/subscriberbot/components/StateViews.js.map +1 -1
- package/dist/subscriberbot/components/StatusBadge.d.ts.map +1 -1
- package/dist/subscriberbot/components/StatusBadge.js +6 -6
- package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
- package/dist/subscriberbot/components/decisions/DecisionBanners.js +6 -6
- package/dist/subscriberbot/components/decisions/DecisionCard.d.ts.map +1 -1
- package/dist/subscriberbot/components/decisions/DecisionCard.js +149 -147
- package/dist/subscriberbot/components/decisions/DecisionCard.js.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileDashboard.d.ts.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileDashboard.js +143 -135
- package/dist/subscriberbot/components/mobile/MobileDashboard.js.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileRelationshipList.d.ts.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileRelationshipList.js +114 -114
- package/dist/subscriberbot/components/mobile/MobileRelationshipList.js.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileScreen.d.ts +3 -0
- package/dist/subscriberbot/components/mobile/MobileScreen.d.ts.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileScreen.js +5 -3
- package/dist/subscriberbot/components/mobile/MobileScreen.js.map +1 -1
- package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js +4 -4
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.d.ts.map +1 -1
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js +11 -11
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js.map +1 -1
- package/dist/subscriberbot/components/negotiations/OutcomeForm.d.ts.map +1 -1
- package/dist/subscriberbot/components/negotiations/OutcomeForm.js +29 -29
- package/dist/subscriberbot/components/negotiations/OutcomeForm.js.map +1 -1
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.d.ts.map +1 -1
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js +43 -43
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js.map +1 -1
- package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js +4 -4
- package/dist/subscriberbot/components/procurement/ProcurementThread.d.ts.map +1 -1
- package/dist/subscriberbot/components/procurement/ProcurementThread.js +14 -14
- package/dist/subscriberbot/components/procurement/ProcurementThread.js.map +1 -1
- package/dist/subscriberbot/components/savings/SavingsCards.d.ts.map +1 -1
- package/dist/subscriberbot/components/savings/SavingsCards.js +242 -237
- package/dist/subscriberbot/components/savings/SavingsCards.js.map +1 -1
- package/dist/subscriberbot/components/viz.d.ts +1 -0
- package/dist/subscriberbot/components/viz.d.ts.map +1 -1
- package/dist/subscriberbot/components/viz.js +100 -101
- package/dist/subscriberbot/components/viz.js.map +1 -1
- package/dist/subscriberbot/hooks/index.js +1 -1
- package/dist/subscriberbot/hooks/useFormError.d.ts +7 -0
- package/dist/subscriberbot/hooks/useFormError.d.ts.map +1 -0
- package/dist/subscriberbot/hooks/useFormError.js +28 -0
- package/dist/subscriberbot/hooks/useFormError.js.map +1 -0
- package/dist/subscriberbot/hooks/useFormatters.d.ts +11 -0
- package/dist/subscriberbot/hooks/useFormatters.d.ts.map +1 -0
- package/dist/subscriberbot/hooks/useFormatters.js +13 -0
- package/dist/subscriberbot/hooks/useFormatters.js.map +1 -0
- package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts.map +1 -1
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js +371 -370
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
- package/dist/subscriberbot/hooks/useTr.d.ts.map +1 -1
- package/dist/subscriberbot/hooks/useTr.js +1 -1
- package/dist/subscriberbot/hooks/useTr.js.map +1 -1
- package/dist/subscriberbot/index.js +1 -1
- package/dist/subscriberbot/pages/AssetVaultPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/AssetVaultPage.js +124 -124
- package/dist/subscriberbot/pages/AssetVaultPage.js.map +1 -1
- package/dist/subscriberbot/pages/DashboardPage.d.ts +0 -10
- package/dist/subscriberbot/pages/DashboardPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/DashboardPage.js +115 -98
- package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
- package/dist/subscriberbot/pages/InboxPage.d.ts +0 -10
- package/dist/subscriberbot/pages/InboxPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/InboxPage.js +421 -402
- package/dist/subscriberbot/pages/InboxPage.js.map +1 -1
- package/dist/subscriberbot/pages/InsightsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/InsightsPage.js +130 -121
- package/dist/subscriberbot/pages/InsightsPage.js.map +1 -1
- package/dist/subscriberbot/pages/InvoicesPage.d.ts +0 -12
- package/dist/subscriberbot/pages/InvoicesPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/InvoicesPage.js +237 -215
- package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -1
- package/dist/subscriberbot/pages/RenewalsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/RenewalsPage.js +303 -295
- package/dist/subscriberbot/pages/RenewalsPage.js.map +1 -1
- package/dist/subscriberbot/pages/SavingsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/SavingsPage.js +57 -57
- package/dist/subscriberbot/pages/SavingsPage.js.map +1 -1
- package/dist/subscriberbot/pages/WorkflowsPage.d.ts +0 -13
- package/dist/subscriberbot/pages/WorkflowsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/WorkflowsPage.js +202 -196
- package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts +0 -18
- package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentDetailPage.js +283 -275
- package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts +0 -6
- package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentNewPage.js +85 -77
- package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts +0 -9
- package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentsListPage.js +136 -136
- package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -1
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts +0 -9
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.js +272 -260
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.js.map +1 -1
- package/dist/subscriberbot/pages/decisions/DecisionDetailPage.d.ts +0 -10
- package/dist/subscriberbot/pages/decisions/DecisionDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js +96 -96
- package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/decisions/DecisionsPage.d.ts +0 -11
- package/dist/subscriberbot/pages/decisions/DecisionsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/decisions/DecisionsPage.js +46 -46
- package/dist/subscriberbot/pages/decisions/DecisionsPage.js.map +1 -1
- package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.d.ts +0 -11
- package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js +181 -171
- package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts +0 -9
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js +164 -164
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts +0 -9
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js +197 -181
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts +0 -8
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js +79 -79
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts +0 -9
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js +147 -147
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts +0 -10
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js +204 -188
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts +0 -9
- package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementPage.js +80 -80
- package/dist/subscriberbot/pages/procurement/ProcurementPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts +0 -10
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +484 -458
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts +0 -8
- package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js +146 -136
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts +0 -10
- package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js +88 -87
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts +0 -11
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +520 -490
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts +0 -8
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +112 -91
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts +0 -8
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +97 -96
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -1
- package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js +76 -74
- package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js.map +1 -1
- package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.d.ts +5 -3
- package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.d.ts.map +1 -1
- package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js +26 -25
- package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js.map +1 -1
- package/dist/subscriberbot/utils/formatters.d.ts +16 -5
- package/dist/subscriberbot/utils/formatters.d.ts.map +1 -1
- package/dist/subscriberbot/utils/formatters.js +57 -25
- package/dist/subscriberbot/utils/formatters.js.map +1 -1
- package/dist/subscriberbot/utils/plaidLink.d.ts +2 -1
- package/dist/subscriberbot/utils/plaidLink.d.ts.map +1 -1
- package/dist/subscriberbot/utils/plaidLink.js +21 -21
- package/dist/subscriberbot/utils/plaidLink.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { useSubscriberBot as e } from "../context/SubscriberBotContext.js";
|
|
2
|
+
import { useTr as t } from "./useTr.js";
|
|
2
3
|
import "../context/index.js";
|
|
3
|
-
import { useCallback as
|
|
4
|
-
import { useMutation as
|
|
5
|
-
import { graphqlFetch as
|
|
6
|
-
import { clearGraphqlFetchResponseCache as
|
|
4
|
+
import { useCallback as n, useState as r } from "react";
|
|
5
|
+
import { useMutation as i, useQuery as a, useQueryClient as o } from "@tanstack/react-query";
|
|
6
|
+
import { graphqlFetch as s } from "@burdenoff/fe-libs/shared/graphql";
|
|
7
|
+
import { clearGraphqlFetchResponseCache as c } from "@burdenoff/fe-libs/shared/graphql/fetch";
|
|
7
8
|
//#region src/subscriberbot/hooks/useSubscriberBotApi.ts
|
|
8
|
-
var
|
|
9
|
-
let r = await
|
|
9
|
+
var l = async (e, t, n) => {
|
|
10
|
+
let r = await s({
|
|
10
11
|
gateway: "workspace",
|
|
11
12
|
baseUrl: n,
|
|
12
13
|
query: e,
|
|
@@ -15,8 +16,8 @@ var c = async (e, t, n) => {
|
|
|
15
16
|
});
|
|
16
17
|
if (r.errors?.length) throw Error(r.errors[0]?.message ?? "GraphQL request failed");
|
|
17
18
|
if (!r.data) throw Error("GraphQL response did not include data");
|
|
18
|
-
return /^\s*mutation\b/.test(e) &&
|
|
19
|
-
},
|
|
19
|
+
return /^\s*mutation\b/.test(e) && c(), r.data;
|
|
20
|
+
}, u = {
|
|
20
21
|
relationships: ["subscriberbot", "relationships"],
|
|
21
22
|
relationship: (e) => [
|
|
22
23
|
"subscriberbot",
|
|
@@ -91,11 +92,11 @@ var c = async (e, t, n) => {
|
|
|
91
92
|
"enterprise",
|
|
92
93
|
"budgets"
|
|
93
94
|
]
|
|
94
|
-
},
|
|
95
|
+
}, d = "\n id name slug category status description industry region language websiteUrl\n logoFileId tags churnRiskScore vendorHealthScore workspaceId createdAt updatedAt\n", f = "\n id name description providerId amount currency interval features isActive\n workspaceId createdAt updatedAt\n", p = "\n id label kind status amount currency interval autoRenew discoverySource notes\n tags healthScore ownerId providerId planId startedAt renewsAt trialEndsAt\n cancelledAt department workspaceId createdAt updatedAt\n", m = "\n id subject preview category categoryConfidence channelId relationshipId\n externalId actionRequired isRead receivedAt workspaceId createdAt updatedAt\n", h = "\n id number relationshipId status currency subtotal taxAmount total issueDate\n dueDate paidAt paymentInstrumentId workspaceId createdAt updatedAt\n", g = "\n id name description kind status ownerId lastRunAt workspaceId createdAt updatedAt\n", _ = "\n id agentId runId relationshipId kind recommendation status rationale confidence\n estimatedSavings currency evidence proposedChange validationErrors invocationRef\n applyInvocationRef appliedAt appliedBy dismissedAt dismissedReason workspaceId\n createdAt updatedAt\n agent { id name kind status }\n relationship { id label status amount currency interval providerId planId }\n", v = "\n id name description triggerEvent status runCount lastRunAt workspaceId\n createdAt updatedAt\n", y = "\n workflowId valid\n nodes { id workflowId kind label config positionX positionY }\n edges { id workflowId sourceNodeId targetNodeId sourceHandle label }\n issues { code message nodeId edgeId }\n", ee = "\n id name description type relationshipId quota used unit isActive\n workspaceId createdAt updatedAt\n", b = "\n id name type relationshipId secretRef expiresAt workspaceId createdAt\n updatedAt file { id }\n", te = "\n id label type status brand last4 expiryMonth expiryYear isDefault ownerId\n workspaceId createdAt updatedAt\n", x = "\n id label type status address ingestEnabled ownerId verifiedAt workspaceId\n createdAt updatedAt\n", S = "\n id name description action agentId condition isEnabled triggerCount\n lastTriggeredAt workspaceId createdAt updatedAt\n", ne = "\n id providerSlug providerName planName region currency interval amount\n contractSizeSeats sourceKind sourceLabel notes observedAt createdAt\n", C = "\n id workspaceId adapterId submitterWorkspaceId status notes createdAt updatedAt\n", w = "\n id workspaceId listingId reporterWorkspaceId reason status resolutionReason\n createdAt updatedAt\n", re = (t = {}) => {
|
|
95
96
|
let { apiGatewayUrl: n } = e();
|
|
96
|
-
return
|
|
97
|
-
queryKey: [...
|
|
98
|
-
queryFn: async () => (await
|
|
97
|
+
return a({
|
|
98
|
+
queryKey: [...u.relationships, t],
|
|
99
|
+
queryFn: async () => (await l(`query SubRelationships(
|
|
99
100
|
$kind: SubRelationshipKind
|
|
100
101
|
$status: SubRelationshipStatus
|
|
101
102
|
$providerId: ID
|
|
@@ -112,7 +113,7 @@ var c = async (e, t, n) => {
|
|
|
112
113
|
pagination: $pagination
|
|
113
114
|
) {
|
|
114
115
|
items {
|
|
115
|
-
${
|
|
116
|
+
${p}
|
|
116
117
|
provider { id name category status logoFileId }
|
|
117
118
|
plan { id name amount currency interval }
|
|
118
119
|
}
|
|
@@ -130,16 +131,16 @@ var c = async (e, t, n) => {
|
|
|
130
131
|
}
|
|
131
132
|
}, n)).subListRelationships
|
|
132
133
|
});
|
|
133
|
-
},
|
|
134
|
+
}, T = (t) => {
|
|
134
135
|
let { apiGatewayUrl: n } = e();
|
|
135
|
-
return
|
|
136
|
-
queryKey:
|
|
136
|
+
return a({
|
|
137
|
+
queryKey: u.relationship(t ?? ""),
|
|
137
138
|
enabled: !!t,
|
|
138
|
-
queryFn: async () => (await
|
|
139
|
+
queryFn: async () => (await l(`query SubRelationship($id: ID!) {
|
|
139
140
|
subRelationship(id: $id) {
|
|
140
|
-
${
|
|
141
|
-
provider { ${
|
|
142
|
-
plan { ${
|
|
141
|
+
${p}
|
|
142
|
+
provider { ${d} }
|
|
143
|
+
plan { ${f} }
|
|
143
144
|
entitlements {
|
|
144
145
|
id name description type relationshipId quota used unit isActive
|
|
145
146
|
workspaceId createdAt updatedAt
|
|
@@ -155,141 +156,141 @@ var c = async (e, t, n) => {
|
|
|
155
156
|
}
|
|
156
157
|
}`, { id: t }, n)).subRelationship
|
|
157
158
|
});
|
|
158
|
-
},
|
|
159
|
-
let t =
|
|
160
|
-
return
|
|
161
|
-
mutationFn: async (e) => (await
|
|
162
|
-
subCreateRelationship(input: $input) { ${
|
|
159
|
+
}, E = () => {
|
|
160
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
161
|
+
return i({
|
|
162
|
+
mutationFn: async (e) => (await l(`mutation SubCreateRelationship($input: SubCreateRelationshipInput!) {
|
|
163
|
+
subCreateRelationship(input: $input) { ${p} }
|
|
163
164
|
}`, { input: e }, n)).subCreateRelationship,
|
|
164
165
|
onSuccess: () => {
|
|
165
|
-
t.invalidateQueries({ queryKey:
|
|
166
|
+
t.invalidateQueries({ queryKey: u.relationships }), t.invalidateQueries({ queryKey: u.renewals });
|
|
166
167
|
}
|
|
167
168
|
});
|
|
168
|
-
},
|
|
169
|
-
let t =
|
|
170
|
-
return
|
|
171
|
-
mutationFn: async ({ id: e, status: t }) => (await
|
|
172
|
-
subTransitionRelationship(id: $id, status: $status) { ${
|
|
169
|
+
}, D = () => {
|
|
170
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
171
|
+
return i({
|
|
172
|
+
mutationFn: async ({ id: e, status: t }) => (await l(`mutation SubTransitionRelationship($id: ID!, $status: SubRelationshipStatus!) {
|
|
173
|
+
subTransitionRelationship(id: $id, status: $status) { ${p} }
|
|
173
174
|
}`, {
|
|
174
175
|
id: e,
|
|
175
176
|
status: t
|
|
176
177
|
}, n)).subTransitionRelationship,
|
|
177
178
|
onSuccess: (e) => {
|
|
178
|
-
t.invalidateQueries({ queryKey:
|
|
179
|
+
t.invalidateQueries({ queryKey: u.relationships }), t.invalidateQueries({ queryKey: u.relationship(e.id) }), t.invalidateQueries({ queryKey: u.renewals });
|
|
179
180
|
}
|
|
180
181
|
});
|
|
181
|
-
},
|
|
182
|
-
let t =
|
|
183
|
-
return
|
|
184
|
-
mutationFn: async (e) => (await
|
|
185
|
-
subCancelRelationship(id: $id) { ${
|
|
182
|
+
}, O = () => {
|
|
183
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
184
|
+
return i({
|
|
185
|
+
mutationFn: async (e) => (await l(`mutation SubCancelRelationship($id: ID!) {
|
|
186
|
+
subCancelRelationship(id: $id) { ${p} }
|
|
186
187
|
}`, { id: e }, n)).subCancelRelationship,
|
|
187
188
|
onSuccess: (e) => {
|
|
188
|
-
t.invalidateQueries({ queryKey:
|
|
189
|
+
t.invalidateQueries({ queryKey: u.relationships }), t.invalidateQueries({ queryKey: u.relationship(e.id) }), t.invalidateQueries({ queryKey: u.renewals });
|
|
189
190
|
}
|
|
190
191
|
});
|
|
191
|
-
},
|
|
192
|
-
let t =
|
|
193
|
-
return
|
|
194
|
-
mutationFn: async ({ id: e, input: t }) => (await
|
|
195
|
-
subUpdateRelationship(id: $id, input: $input) { ${
|
|
192
|
+
}, k = () => {
|
|
193
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
194
|
+
return i({
|
|
195
|
+
mutationFn: async ({ id: e, input: t }) => (await l(`mutation SubUpdateRelationship($id: ID!, $input: SubUpdateRelationshipInput!) {
|
|
196
|
+
subUpdateRelationship(id: $id, input: $input) { ${p} }
|
|
196
197
|
}`, {
|
|
197
198
|
id: e,
|
|
198
199
|
input: t
|
|
199
200
|
}, n)).subUpdateRelationship,
|
|
200
201
|
onSuccess: (e) => {
|
|
201
|
-
t.invalidateQueries({ queryKey:
|
|
202
|
+
t.invalidateQueries({ queryKey: u.relationships }), t.invalidateQueries({ queryKey: u.relationship(e.id) }), t.invalidateQueries({ queryKey: u.renewals });
|
|
202
203
|
}
|
|
203
204
|
});
|
|
204
|
-
},
|
|
205
|
+
}, A = (t = {}) => {
|
|
205
206
|
let { apiGatewayUrl: n } = e();
|
|
206
|
-
return
|
|
207
|
-
queryKey: [...
|
|
208
|
-
queryFn: async () => (await
|
|
207
|
+
return a({
|
|
208
|
+
queryKey: [...u.renewals, t],
|
|
209
|
+
queryFn: async () => (await l("query SubRenewalEvents($relationshipId: ID, $upcomingOnly: Boolean) {\n subListRenewalEvents(relationshipId: $relationshipId, upcomingOnly: $upcomingOnly) {\n items {\n id relationshipId eventType occursAt amount currency detail notified\n workspaceId createdAt updatedAt\n }\n pageInfo { cursor hasMore }\n }\n }", {
|
|
209
210
|
relationshipId: t.relationshipId,
|
|
210
211
|
upcomingOnly: t.upcomingOnly
|
|
211
212
|
}, n)).subListRenewalEvents.items
|
|
212
213
|
});
|
|
213
|
-
},
|
|
214
|
-
let t =
|
|
215
|
-
return
|
|
216
|
-
mutationFn: async (e) => (await
|
|
214
|
+
}, j = () => {
|
|
215
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
216
|
+
return i({
|
|
217
|
+
mutationFn: async (e) => (await l(`mutation SubCreateEntitlement($input: SubCreateEntitlementInput!) {
|
|
217
218
|
subCreateEntitlement(input: $input) { ${ee} }
|
|
218
219
|
}`, { input: e }, n)).subCreateEntitlement,
|
|
219
220
|
onSuccess: (e) => {
|
|
220
|
-
t.invalidateQueries({ queryKey:
|
|
221
|
+
t.invalidateQueries({ queryKey: u.entitlements }), t.invalidateQueries({ queryKey: u.relationship(e.relationshipId) });
|
|
221
222
|
}
|
|
222
223
|
});
|
|
223
|
-
},
|
|
224
|
+
}, M = () => {
|
|
224
225
|
let { apiGatewayUrl: t } = e();
|
|
225
|
-
return
|
|
226
|
-
queryKey: [...
|
|
227
|
-
queryFn: async () => (await
|
|
228
|
-
subListAssets { items { ${
|
|
226
|
+
return a({
|
|
227
|
+
queryKey: [...u.assets, "all"],
|
|
228
|
+
queryFn: async () => (await l(`query SubAllAssets {
|
|
229
|
+
subListAssets { items { ${b} } pageInfo { cursor hasMore } }
|
|
229
230
|
}`, {}, t)).subListAssets.items
|
|
230
231
|
});
|
|
231
|
-
},
|
|
232
|
-
let t =
|
|
233
|
-
return
|
|
234
|
-
mutationFn: async (e) => (await
|
|
235
|
-
subCreateAsset(input: $input) { ${
|
|
232
|
+
}, N = () => {
|
|
233
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
234
|
+
return i({
|
|
235
|
+
mutationFn: async (e) => (await l(`mutation SubCreateAsset($input: SubCreateAssetInput!) {
|
|
236
|
+
subCreateAsset(input: $input) { ${b} }
|
|
236
237
|
}`, { input: e }, n)).subCreateAsset,
|
|
237
238
|
onSuccess: (e) => {
|
|
238
|
-
t.invalidateQueries({ queryKey:
|
|
239
|
+
t.invalidateQueries({ queryKey: u.assets }), t.invalidateQueries({ queryKey: u.relationship(e.relationshipId) });
|
|
239
240
|
}
|
|
240
241
|
});
|
|
241
|
-
},
|
|
242
|
-
let { apiGatewayUrl:
|
|
242
|
+
}, P = "/SubscriberBot/Assets", F = () => {
|
|
243
|
+
let i = t(), { apiGatewayUrl: a } = e(), [o, s] = r(0), [c, u] = r(!1);
|
|
243
244
|
return {
|
|
244
|
-
uploadFile:
|
|
245
|
-
|
|
245
|
+
uploadFile: n(async (e) => {
|
|
246
|
+
u(!0), s(0);
|
|
246
247
|
try {
|
|
247
|
-
let t = (await
|
|
248
|
-
if (!t) throw Error("Could not resolve the upload folder.");
|
|
249
|
-
let n = e.type || "application/octet-stream",
|
|
248
|
+
let t = (await l("mutation SubEnsureFolder($path: String!) {\n ensureFolderByPath(path: $path) { id }\n }", { path: P }, a)).ensureFolderByPath?.id;
|
|
249
|
+
if (!t) throw Error(i("assets.upload.error.folder", "Could not resolve the upload folder."));
|
|
250
|
+
let n = e.type || "application/octet-stream", r = e.name.lastIndexOf("."), o = r > -1 ? e.name.slice(r + 1) : "bin", c = await l("mutation SubInitiateUpload($input: InitiateUploadInput!) {\n initiateUpload(input: $input) {\n uploadUrl\n session { id }\n }\n }", { input: {
|
|
250
251
|
fileName: e.name,
|
|
251
252
|
extension: o,
|
|
252
253
|
mimeType: n,
|
|
253
254
|
fileSize: String(e.size),
|
|
254
255
|
folderId: t
|
|
255
|
-
} },
|
|
256
|
-
if (!
|
|
256
|
+
} }, a), u = c.initiateUpload?.uploadUrl, d = c.initiateUpload?.session.id;
|
|
257
|
+
if (!u || !d) throw Error(i("assets.upload.error.url", "The files service did not return an upload URL."));
|
|
257
258
|
await new Promise((t, r) => {
|
|
258
|
-
let
|
|
259
|
-
|
|
260
|
-
e.lengthComputable &&
|
|
261
|
-
},
|
|
262
|
-
|
|
263
|
-
},
|
|
259
|
+
let a = new XMLHttpRequest();
|
|
260
|
+
a.open("PUT", u), a.setRequestHeader("Content-Type", n), a.upload.onprogress = (e) => {
|
|
261
|
+
e.lengthComputable && s(Math.round(e.loaded / e.total * 100));
|
|
262
|
+
}, a.onload = () => {
|
|
263
|
+
a.status >= 200 && a.status < 300 ? t() : r(Error(i("assets.upload.error.status", "Upload to storage failed ({{status}}).", { status: a.status })));
|
|
264
|
+
}, a.onerror = () => r(Error(i("assets.upload.error.storage", "Upload to storage failed."))), a.send(e);
|
|
264
265
|
});
|
|
265
|
-
let
|
|
266
|
-
sessionId:
|
|
266
|
+
let f = await l("mutation SubCompleteUpload($input: CompleteUploadInput!) {\n completeUpload(input: $input) {\n fileId\n file { id name }\n }\n }", { input: {
|
|
267
|
+
sessionId: d,
|
|
267
268
|
fileSize: String(e.size),
|
|
268
269
|
folderId: t
|
|
269
|
-
} },
|
|
270
|
-
if (!
|
|
270
|
+
} }, a), p = f.completeUpload?.file?.id ?? f.completeUpload?.fileId;
|
|
271
|
+
if (!p) throw Error(i("assets.upload.error.finalize", "The upload could not be finalized."));
|
|
271
272
|
return {
|
|
272
|
-
fileId:
|
|
273
|
-
fileName:
|
|
273
|
+
fileId: p,
|
|
274
|
+
fileName: f.completeUpload?.file?.name ?? e.name
|
|
274
275
|
};
|
|
275
276
|
} finally {
|
|
276
|
-
|
|
277
|
+
u(!1);
|
|
277
278
|
}
|
|
278
|
-
}, [
|
|
279
|
-
progress:
|
|
280
|
-
isUploading:
|
|
279
|
+
}, [a, i]),
|
|
280
|
+
progress: o,
|
|
281
|
+
isUploading: c
|
|
281
282
|
};
|
|
282
|
-
},
|
|
283
|
-
let { apiGatewayUrl:
|
|
284
|
-
return
|
|
283
|
+
}, I = () => {
|
|
284
|
+
let { apiGatewayUrl: t } = e();
|
|
285
|
+
return n(async (e) => (await l("query SubFileDownloadUrl($id: ID!, $expiresIn: Int) {\n getFileDownloadUrl(id: $id, expiresIn: $expiresIn)\n }", {
|
|
285
286
|
id: e,
|
|
286
287
|
expiresIn: 21600
|
|
287
|
-
},
|
|
288
|
-
},
|
|
288
|
+
}, t)).getFileDownloadUrl, [t]);
|
|
289
|
+
}, L = (t = {}) => {
|
|
289
290
|
let { apiGatewayUrl: n } = e();
|
|
290
|
-
return
|
|
291
|
-
queryKey: [...
|
|
292
|
-
queryFn: async () => (await
|
|
291
|
+
return a({
|
|
292
|
+
queryKey: [...u.providers, t],
|
|
293
|
+
queryFn: async () => (await l(`query SubProviders(
|
|
293
294
|
$category: SubProviderCategory
|
|
294
295
|
$status: SubProviderStatus
|
|
295
296
|
$search: String
|
|
@@ -301,7 +302,7 @@ var c = async (e, t, n) => {
|
|
|
301
302
|
search: $search
|
|
302
303
|
pagination: $pagination
|
|
303
304
|
) {
|
|
304
|
-
items { ${
|
|
305
|
+
items { ${d} }
|
|
305
306
|
pageInfo { cursor hasMore }
|
|
306
307
|
}
|
|
307
308
|
}`, {
|
|
@@ -314,76 +315,76 @@ var c = async (e, t, n) => {
|
|
|
314
315
|
}
|
|
315
316
|
}, n)).subListProviders
|
|
316
317
|
});
|
|
317
|
-
},
|
|
318
|
+
}, R = (t) => {
|
|
318
319
|
let { apiGatewayUrl: n } = e();
|
|
319
|
-
return
|
|
320
|
-
queryKey:
|
|
320
|
+
return a({
|
|
321
|
+
queryKey: u.provider(t ?? ""),
|
|
321
322
|
enabled: !!t,
|
|
322
|
-
queryFn: async () => (await
|
|
323
|
+
queryFn: async () => (await l(`query SubProvider($id: ID!) {
|
|
323
324
|
subProvider(id: $id) {
|
|
324
|
-
${
|
|
325
|
-
plans { ${
|
|
325
|
+
${d}
|
|
326
|
+
plans { ${f} }
|
|
326
327
|
}
|
|
327
328
|
}`, { id: t }, n)).subProvider
|
|
328
329
|
});
|
|
329
|
-
},
|
|
330
|
-
let t =
|
|
331
|
-
return
|
|
332
|
-
mutationFn: async (e) => (await
|
|
333
|
-
subCreateProvider(input: $input) { ${
|
|
330
|
+
}, z = () => {
|
|
331
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
332
|
+
return i({
|
|
333
|
+
mutationFn: async (e) => (await l(`mutation SubCreateProvider($input: SubCreateProviderInput!) {
|
|
334
|
+
subCreateProvider(input: $input) { ${d} }
|
|
334
335
|
}`, { input: e }, n)).subCreateProvider,
|
|
335
336
|
onSuccess: () => {
|
|
336
|
-
t.invalidateQueries({ queryKey:
|
|
337
|
+
t.invalidateQueries({ queryKey: u.providers });
|
|
337
338
|
}
|
|
338
339
|
});
|
|
339
|
-
},
|
|
340
|
-
let t =
|
|
341
|
-
return
|
|
342
|
-
mutationFn: async ({ id: e, input: t }) => (await
|
|
343
|
-
subUpdateProvider(id: $id, input: $input) { ${
|
|
340
|
+
}, B = () => {
|
|
341
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
342
|
+
return i({
|
|
343
|
+
mutationFn: async ({ id: e, input: t }) => (await l(`mutation SubUpdateProvider($id: ID!, $input: SubUpdateProviderInput!) {
|
|
344
|
+
subUpdateProvider(id: $id, input: $input) { ${d} }
|
|
344
345
|
}`, {
|
|
345
346
|
id: e,
|
|
346
347
|
input: t
|
|
347
348
|
}, n)).subUpdateProvider,
|
|
348
349
|
onSuccess: (e) => {
|
|
349
|
-
t.invalidateQueries({ queryKey:
|
|
350
|
+
t.invalidateQueries({ queryKey: u.providers }), t.invalidateQueries({ queryKey: u.provider(e.id) });
|
|
350
351
|
}
|
|
351
352
|
});
|
|
352
|
-
},
|
|
353
|
-
let t =
|
|
354
|
-
return
|
|
355
|
-
mutationFn: async (e) => (await
|
|
353
|
+
}, V = () => {
|
|
354
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
355
|
+
return i({
|
|
356
|
+
mutationFn: async (e) => (await l("mutation SubArchiveProvider($id: ID!) {\n subArchiveProvider(id: $id)\n }", { id: e }, n)).subArchiveProvider,
|
|
356
357
|
onSuccess: () => {
|
|
357
|
-
t.invalidateQueries({ queryKey:
|
|
358
|
+
t.invalidateQueries({ queryKey: u.providers });
|
|
358
359
|
}
|
|
359
360
|
});
|
|
360
|
-
},
|
|
361
|
+
}, H = (t) => {
|
|
361
362
|
let { apiGatewayUrl: n } = e();
|
|
362
|
-
return
|
|
363
|
-
queryKey: [...
|
|
363
|
+
return a({
|
|
364
|
+
queryKey: [...u.plans, t],
|
|
364
365
|
enabled: !!t,
|
|
365
|
-
queryFn: async () => (await
|
|
366
|
-
subListPlans(providerId: $providerId) { items { ${
|
|
366
|
+
queryFn: async () => (await l(`query SubPlans($providerId: ID) {
|
|
367
|
+
subListPlans(providerId: $providerId) { items { ${f} } pageInfo { cursor hasMore } }
|
|
367
368
|
}`, { providerId: t }, n)).subListPlans.items
|
|
368
369
|
});
|
|
369
|
-
},
|
|
370
|
-
let t =
|
|
371
|
-
return
|
|
372
|
-
mutationFn: async (e) => (await
|
|
373
|
-
subCreatePlan(input: $input) { ${
|
|
370
|
+
}, U = () => {
|
|
371
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
372
|
+
return i({
|
|
373
|
+
mutationFn: async (e) => (await l(`mutation SubCreatePlan($input: SubCreatePlanInput!) {
|
|
374
|
+
subCreatePlan(input: $input) { ${f} }
|
|
374
375
|
}`, { input: e }, n)).subCreatePlan,
|
|
375
376
|
onSuccess: (e) => {
|
|
376
|
-
t.invalidateQueries({ queryKey:
|
|
377
|
+
t.invalidateQueries({ queryKey: u.plans }), t.invalidateQueries({ queryKey: u.provider(e.providerId) });
|
|
377
378
|
}
|
|
378
379
|
});
|
|
379
|
-
},
|
|
380
|
+
}, W = (t) => {
|
|
380
381
|
let { apiGatewayUrl: n } = e();
|
|
381
|
-
return
|
|
382
|
-
queryKey:
|
|
382
|
+
return a({
|
|
383
|
+
queryKey: u.benchmarks(t ?? ""),
|
|
383
384
|
enabled: !!t,
|
|
384
385
|
queryFn: async () => {
|
|
385
386
|
let e = { providerSlug: t ?? void 0 };
|
|
386
|
-
return (await
|
|
387
|
+
return (await l(`query SubBenchmarkDataPoints(
|
|
387
388
|
$filter: SubBenchmarkFilterInput
|
|
388
389
|
$pagination: PaginationInput
|
|
389
390
|
) {
|
|
@@ -400,11 +401,11 @@ var c = async (e, t, n) => {
|
|
|
400
401
|
}, n)).subListBenchmarkDataPoints.items;
|
|
401
402
|
}
|
|
402
403
|
});
|
|
403
|
-
},
|
|
404
|
+
}, G = (t = {}) => {
|
|
404
405
|
let { apiGatewayUrl: n } = e();
|
|
405
|
-
return
|
|
406
|
-
queryKey: [...
|
|
407
|
-
queryFn: async () => (await
|
|
406
|
+
return a({
|
|
407
|
+
queryKey: [...u.inbox, t],
|
|
408
|
+
queryFn: async () => (await l(`query SubInboxMessages(
|
|
408
409
|
$category: SubMessageCategory
|
|
409
410
|
$channelId: ID
|
|
410
411
|
$relationshipId: ID
|
|
@@ -418,7 +419,7 @@ var c = async (e, t, n) => {
|
|
|
418
419
|
unreadOnly: $unreadOnly
|
|
419
420
|
pagination: $pagination
|
|
420
421
|
) {
|
|
421
|
-
items { ${
|
|
422
|
+
items { ${m} }
|
|
422
423
|
pageInfo { cursor hasMore }
|
|
423
424
|
}
|
|
424
425
|
}`, {
|
|
@@ -432,38 +433,38 @@ var c = async (e, t, n) => {
|
|
|
432
433
|
}
|
|
433
434
|
}, n)).subListInboxMessages
|
|
434
435
|
});
|
|
435
|
-
},
|
|
436
|
-
let t =
|
|
437
|
-
return
|
|
438
|
-
mutationFn: async (e) => (await
|
|
439
|
-
subMarkMessageRead(id: $id) { ${
|
|
436
|
+
}, K = () => {
|
|
437
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
438
|
+
return i({
|
|
439
|
+
mutationFn: async (e) => (await l(`mutation SubMarkMessageRead($id: ID!) {
|
|
440
|
+
subMarkMessageRead(id: $id) { ${m} }
|
|
440
441
|
}`, { id: e }, n)).subMarkMessageRead,
|
|
441
|
-
onSuccess: () => t.invalidateQueries({ queryKey:
|
|
442
|
+
onSuccess: () => t.invalidateQueries({ queryKey: u.inbox })
|
|
442
443
|
});
|
|
443
|
-
},
|
|
444
|
-
let t =
|
|
445
|
-
return
|
|
446
|
-
mutationFn: async (e) => (await
|
|
447
|
-
subMarkMessageUnread(id: $id) { ${
|
|
444
|
+
}, q = () => {
|
|
445
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
446
|
+
return i({
|
|
447
|
+
mutationFn: async (e) => (await l(`mutation SubMarkMessageUnread($id: ID!) {
|
|
448
|
+
subMarkMessageUnread(id: $id) { ${m} }
|
|
448
449
|
}`, { id: e }, n)).subMarkMessageUnread,
|
|
449
|
-
onSuccess: () => t.invalidateQueries({ queryKey:
|
|
450
|
+
onSuccess: () => t.invalidateQueries({ queryKey: u.inbox })
|
|
450
451
|
});
|
|
451
|
-
},
|
|
452
|
-
let t =
|
|
453
|
-
return
|
|
454
|
-
mutationFn: async (e) => (await
|
|
455
|
-
subIngestMessage(input: $input) { ${
|
|
452
|
+
}, J = () => {
|
|
453
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
454
|
+
return i({
|
|
455
|
+
mutationFn: async (e) => (await l(`mutation SubIngestMessage($input: SubIngestMessageInput!) {
|
|
456
|
+
subIngestMessage(input: $input) { ${m} }
|
|
456
457
|
}`, { input: e }, n)).subIngestMessage,
|
|
457
458
|
onSuccess: () => {
|
|
458
|
-
t.invalidateQueries({ queryKey:
|
|
459
|
+
t.invalidateQueries({ queryKey: u.inbox });
|
|
459
460
|
}
|
|
460
461
|
});
|
|
461
|
-
},
|
|
462
|
+
}, Y = (t = {}, n = {}) => {
|
|
462
463
|
let { apiGatewayUrl: r } = e();
|
|
463
|
-
return
|
|
464
|
-
queryKey: [...
|
|
464
|
+
return a({
|
|
465
|
+
queryKey: [...u.invoices, t],
|
|
465
466
|
enabled: n.enabled ?? !0,
|
|
466
|
-
queryFn: async () => (await
|
|
467
|
+
queryFn: async () => (await l(`query SubInvoices(
|
|
467
468
|
$status: SubInvoiceStatus
|
|
468
469
|
$relationshipId: ID
|
|
469
470
|
$pagination: PaginationInput
|
|
@@ -473,7 +474,7 @@ var c = async (e, t, n) => {
|
|
|
473
474
|
relationshipId: $relationshipId
|
|
474
475
|
pagination: $pagination
|
|
475
476
|
) {
|
|
476
|
-
items { ${
|
|
477
|
+
items { ${h} }
|
|
477
478
|
pageInfo { cursor hasMore }
|
|
478
479
|
}
|
|
479
480
|
}`, {
|
|
@@ -485,83 +486,83 @@ var c = async (e, t, n) => {
|
|
|
485
486
|
}
|
|
486
487
|
}, r)).subListInvoices
|
|
487
488
|
});
|
|
488
|
-
},
|
|
489
|
-
let t =
|
|
490
|
-
return
|
|
491
|
-
mutationFn: async (e) => (await
|
|
492
|
-
subMarkInvoicePaid(id: $id) { ${
|
|
489
|
+
}, X = () => {
|
|
490
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
491
|
+
return i({
|
|
492
|
+
mutationFn: async (e) => (await l(`mutation SubMarkInvoicePaid($id: ID!) {
|
|
493
|
+
subMarkInvoicePaid(id: $id) { ${h} }
|
|
493
494
|
}`, { id: e }, n)).subMarkInvoicePaid,
|
|
494
495
|
onSuccess: () => {
|
|
495
|
-
t.invalidateQueries({ queryKey:
|
|
496
|
+
t.invalidateQueries({ queryKey: u.invoices });
|
|
496
497
|
}
|
|
497
498
|
});
|
|
498
|
-
},
|
|
499
|
-
let t =
|
|
500
|
-
return
|
|
501
|
-
mutationFn: async (e) => (await
|
|
502
|
-
subCreateInvoice(input: $input) { ${
|
|
499
|
+
}, ie = () => {
|
|
500
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
501
|
+
return i({
|
|
502
|
+
mutationFn: async (e) => (await l(`mutation SubCreateInvoice($input: SubCreateInvoiceInput!) {
|
|
503
|
+
subCreateInvoice(input: $input) { ${h} }
|
|
503
504
|
}`, { input: e }, n)).subCreateInvoice,
|
|
504
505
|
onSuccess: () => {
|
|
505
|
-
t.invalidateQueries({ queryKey:
|
|
506
|
+
t.invalidateQueries({ queryKey: u.invoices });
|
|
506
507
|
}
|
|
507
508
|
});
|
|
508
|
-
},
|
|
509
|
+
}, ae = (t) => {
|
|
509
510
|
let { apiGatewayUrl: n } = e();
|
|
510
|
-
return
|
|
511
|
-
queryKey: [...
|
|
512
|
-
queryFn: async () => (await
|
|
511
|
+
return a({
|
|
512
|
+
queryKey: [...u.paymentInstruments, t],
|
|
513
|
+
queryFn: async () => (await l("query SubPaymentInstruments($ownerId: ID) {\n subListPaymentInstruments(ownerId: $ownerId) {\n items {\n id label type status brand last4 expiryMonth expiryYear isDefault\n ownerId workspaceId createdAt updatedAt\n }\n pageInfo { cursor hasMore }\n }\n }", { ownerId: t }, n)).subListPaymentInstruments.items
|
|
513
514
|
});
|
|
514
|
-
},
|
|
515
|
-
let t =
|
|
516
|
-
return
|
|
517
|
-
mutationFn: async (e) => (await
|
|
515
|
+
}, oe = () => {
|
|
516
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
517
|
+
return i({
|
|
518
|
+
mutationFn: async (e) => (await l(`mutation SubCreatePaymentInstrument($input: SubCreatePaymentInstrumentInput!) {
|
|
518
519
|
subCreatePaymentInstrument(input: $input) { ${te} }
|
|
519
520
|
}`, { input: e }, n)).subCreatePaymentInstrument,
|
|
520
521
|
onSuccess: () => {
|
|
521
|
-
t.invalidateQueries({ queryKey:
|
|
522
|
+
t.invalidateQueries({ queryKey: u.paymentInstruments });
|
|
522
523
|
}
|
|
523
524
|
});
|
|
524
|
-
},
|
|
525
|
-
let t =
|
|
526
|
-
return
|
|
527
|
-
mutationFn: async (e) => (await
|
|
525
|
+
}, se = () => {
|
|
526
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
527
|
+
return i({
|
|
528
|
+
mutationFn: async (e) => (await l("mutation SubRemovePaymentInstrument($id: ID!) {\n subRemovePaymentInstrument(id: $id)\n }", { id: e }, n)).subRemovePaymentInstrument,
|
|
528
529
|
onSuccess: () => {
|
|
529
|
-
t.invalidateQueries({ queryKey:
|
|
530
|
+
t.invalidateQueries({ queryKey: u.paymentInstruments });
|
|
530
531
|
}
|
|
531
532
|
});
|
|
532
|
-
},
|
|
533
|
+
}, ce = (t) => {
|
|
533
534
|
let { apiGatewayUrl: n } = e();
|
|
534
|
-
return
|
|
535
|
-
queryKey: [...
|
|
536
|
-
queryFn: async () => (await
|
|
535
|
+
return a({
|
|
536
|
+
queryKey: [...u.channels, t],
|
|
537
|
+
queryFn: async () => (await l("query SubChannels($ownerId: ID) {\n subListChannels(ownerId: $ownerId) {\n items {\n id label type status address ingestEnabled ownerId verifiedAt\n workspaceId createdAt updatedAt\n }\n pageInfo { cursor hasMore }\n }\n }", { ownerId: t }, n)).subListChannels.items
|
|
537
538
|
});
|
|
538
|
-
},
|
|
539
|
-
let t =
|
|
540
|
-
return
|
|
541
|
-
mutationFn: async (e) => (await
|
|
542
|
-
subCreateChannel(input: $input) { ${
|
|
539
|
+
}, le = () => {
|
|
540
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
541
|
+
return i({
|
|
542
|
+
mutationFn: async (e) => (await l(`mutation SubCreateChannel($input: SubCreateChannelInput!) {
|
|
543
|
+
subCreateChannel(input: $input) { ${x} }
|
|
543
544
|
}`, { input: e }, n)).subCreateChannel,
|
|
544
545
|
onSuccess: () => {
|
|
545
|
-
t.invalidateQueries({ queryKey:
|
|
546
|
+
t.invalidateQueries({ queryKey: u.channels });
|
|
546
547
|
}
|
|
547
548
|
});
|
|
548
|
-
},
|
|
549
|
-
let t =
|
|
550
|
-
return
|
|
551
|
-
mutationFn: async (e) => (await
|
|
552
|
-
subVerifyChannel(id: $id) { ${
|
|
549
|
+
}, ue = () => {
|
|
550
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
551
|
+
return i({
|
|
552
|
+
mutationFn: async (e) => (await l(`mutation SubVerifyChannel($id: ID!) {
|
|
553
|
+
subVerifyChannel(id: $id) { ${x} }
|
|
553
554
|
}`, { id: e }, n)).subVerifyChannel,
|
|
554
555
|
onSuccess: () => {
|
|
555
|
-
t.invalidateQueries({ queryKey:
|
|
556
|
+
t.invalidateQueries({ queryKey: u.channels });
|
|
556
557
|
}
|
|
557
558
|
});
|
|
558
|
-
},
|
|
559
|
+
}, de = (t = {}) => {
|
|
559
560
|
let { apiGatewayUrl: n } = e();
|
|
560
|
-
return
|
|
561
|
-
queryKey: [...
|
|
562
|
-
queryFn: async () => (await
|
|
561
|
+
return a({
|
|
562
|
+
queryKey: [...u.agents, t],
|
|
563
|
+
queryFn: async () => (await l(`query SubAgents($kind: SubAgentKind, $status: SubAgentStatus, $ownerId: ID) {
|
|
563
564
|
subListAgents(kind: $kind, status: $status, ownerId: $ownerId) {
|
|
564
|
-
items { ${
|
|
565
|
+
items { ${g} }
|
|
565
566
|
pageInfo { cursor hasMore }
|
|
566
567
|
}
|
|
567
568
|
}`, {
|
|
@@ -570,94 +571,94 @@ var c = async (e, t, n) => {
|
|
|
570
571
|
ownerId: t.ownerId
|
|
571
572
|
}, n)).subListAgents.items
|
|
572
573
|
});
|
|
573
|
-
},
|
|
574
|
+
}, fe = (t) => {
|
|
574
575
|
let { apiGatewayUrl: n } = e();
|
|
575
|
-
return
|
|
576
|
-
queryKey:
|
|
576
|
+
return a({
|
|
577
|
+
queryKey: u.agent(t ?? ""),
|
|
577
578
|
enabled: !!t,
|
|
578
|
-
queryFn: async () => (await
|
|
579
|
+
queryFn: async () => (await l(`query SubAgent($id: ID!) {
|
|
579
580
|
subAgent(id: $id) {
|
|
580
|
-
${
|
|
581
|
-
policies { ${
|
|
581
|
+
${g}
|
|
582
|
+
policies { ${S} }
|
|
582
583
|
}
|
|
583
584
|
}`, { id: t }, n)).subAgent
|
|
584
585
|
});
|
|
585
|
-
},
|
|
586
|
-
let t =
|
|
587
|
-
return
|
|
588
|
-
mutationFn: async (e) => (await
|
|
589
|
-
subCreateAgent(input: $input) { ${
|
|
586
|
+
}, pe = () => {
|
|
587
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
588
|
+
return i({
|
|
589
|
+
mutationFn: async (e) => (await l(`mutation SubCreateAgent($input: SubCreateAgentInput!) {
|
|
590
|
+
subCreateAgent(input: $input) { ${g} }
|
|
590
591
|
}`, { input: e }, n)).subCreateAgent,
|
|
591
592
|
onSuccess: () => {
|
|
592
|
-
t.invalidateQueries({ queryKey:
|
|
593
|
+
t.invalidateQueries({ queryKey: u.agents });
|
|
593
594
|
}
|
|
594
595
|
});
|
|
595
|
-
},
|
|
596
|
-
let t =
|
|
597
|
-
return
|
|
598
|
-
mutationFn: async ({ id: e, status: t }) => (await
|
|
599
|
-
subSetAgentStatus(id: $id, status: $status) { ${
|
|
596
|
+
}, me = () => {
|
|
597
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
598
|
+
return i({
|
|
599
|
+
mutationFn: async ({ id: e, status: t }) => (await l(`mutation SubSetAgentStatus($id: ID!, $status: SubAgentStatus!) {
|
|
600
|
+
subSetAgentStatus(id: $id, status: $status) { ${g} }
|
|
600
601
|
}`, {
|
|
601
602
|
id: e,
|
|
602
603
|
status: t
|
|
603
604
|
}, n)).subSetAgentStatus,
|
|
604
605
|
onSuccess: (e) => {
|
|
605
|
-
t.invalidateQueries({ queryKey:
|
|
606
|
+
t.invalidateQueries({ queryKey: u.agents }), t.invalidateQueries({ queryKey: u.agent(e.id) });
|
|
606
607
|
}
|
|
607
608
|
});
|
|
608
|
-
},
|
|
609
|
-
let t =
|
|
610
|
-
return
|
|
611
|
-
mutationFn: async (e) => (await
|
|
612
|
-
subCreatePolicy(input: $input) { ${
|
|
609
|
+
}, he = () => {
|
|
610
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
611
|
+
return i({
|
|
612
|
+
mutationFn: async (e) => (await l(`mutation SubCreatePolicy($input: SubCreatePolicyInput!) {
|
|
613
|
+
subCreatePolicy(input: $input) { ${S} }
|
|
613
614
|
}`, { input: e }, n)).subCreatePolicy,
|
|
614
615
|
onSuccess: (e) => {
|
|
615
|
-
t.invalidateQueries({ queryKey:
|
|
616
|
+
t.invalidateQueries({ queryKey: u.agents }), t.invalidateQueries({ queryKey: u.agent(e.agentId) });
|
|
616
617
|
}
|
|
617
618
|
});
|
|
618
|
-
},
|
|
619
|
+
}, ge = 100, _e = (t = {}, n = {}) => {
|
|
619
620
|
let { apiGatewayUrl: r } = e();
|
|
620
|
-
return
|
|
621
|
-
queryKey: [...
|
|
621
|
+
return a({
|
|
622
|
+
queryKey: [...u.decisions, t],
|
|
622
623
|
enabled: n.enabled ?? !0,
|
|
623
624
|
retry: 1,
|
|
624
|
-
queryFn: async () => (await
|
|
625
|
+
queryFn: async () => (await l(`query SubDecisions($filter: SubDecisionFilter, $pagination: PaginationInput) {
|
|
625
626
|
subListDecisions(filter: $filter, pagination: $pagination) {
|
|
626
|
-
items { ${
|
|
627
|
+
items { ${_} }
|
|
627
628
|
pageInfo { cursor hasMore }
|
|
628
629
|
}
|
|
629
630
|
}`, {
|
|
630
631
|
filter: t,
|
|
631
|
-
pagination: { limit:
|
|
632
|
+
pagination: { limit: ge }
|
|
632
633
|
}, r)).subListDecisions
|
|
633
634
|
});
|
|
634
|
-
},
|
|
635
|
+
}, ve = (t) => {
|
|
635
636
|
let { apiGatewayUrl: n } = e();
|
|
636
|
-
return
|
|
637
|
-
queryKey:
|
|
637
|
+
return a({
|
|
638
|
+
queryKey: u.decision(t ?? ""),
|
|
638
639
|
enabled: !!t,
|
|
639
640
|
retry: 1,
|
|
640
|
-
queryFn: async () => (await
|
|
641
|
-
subDecision(id: $id) { ${
|
|
641
|
+
queryFn: async () => (await l(`query SubDecision($id: ID!) {
|
|
642
|
+
subDecision(id: $id) { ${_} }
|
|
642
643
|
}`, { id: t }, n)).subDecision
|
|
643
644
|
});
|
|
644
645
|
}, Z = (e, t) => {
|
|
645
|
-
e.invalidateQueries({ queryKey:
|
|
646
|
-
},
|
|
647
|
-
let t =
|
|
648
|
-
return
|
|
649
|
-
mutationFn: async (e) => (await
|
|
646
|
+
e.invalidateQueries({ queryKey: u.decisions }), e.invalidateQueries({ queryKey: u.renewals }), t.decisionId && e.invalidateQueries({ queryKey: u.decision(t.decisionId) }), t.agentId && (e.invalidateQueries({ queryKey: u.agent(t.agentId) }), e.invalidateQueries({ queryKey: u.agents })), t.relationshipId && (e.invalidateQueries({ queryKey: u.relationship(t.relationshipId) }), e.invalidateQueries({ queryKey: u.relationships }));
|
|
647
|
+
}, ye = () => {
|
|
648
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
649
|
+
return i({
|
|
650
|
+
mutationFn: async (e) => (await l("mutation SubRunAgent($id: ID!, $dryRun: Boolean) {\n subRunAgent(id: $id, dryRun: $dryRun) {\n runId agentId kind dryRun evaluated proposed flagged applied truncated\n invocationRef ranAt\n }\n }", {
|
|
650
651
|
id: e,
|
|
651
652
|
dryRun: !0
|
|
652
653
|
}, n)).subRunAgent,
|
|
653
654
|
onSuccess: (e) => Z(t, { agentId: e.agentId })
|
|
654
655
|
});
|
|
655
|
-
},
|
|
656
|
-
let t =
|
|
657
|
-
return
|
|
658
|
-
mutationFn: async (e) => (await
|
|
656
|
+
}, be = () => {
|
|
657
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
658
|
+
return i({
|
|
659
|
+
mutationFn: async (e) => (await l(`mutation SubApplyDecision($id: ID!) {
|
|
659
660
|
subApplyDecision(id: $id) {
|
|
660
|
-
decision { ${
|
|
661
|
+
decision { ${_} }
|
|
661
662
|
relationship { id label status }
|
|
662
663
|
}
|
|
663
664
|
}`, { id: e }, n)).subApplyDecision,
|
|
@@ -666,13 +667,13 @@ var c = async (e, t, n) => {
|
|
|
666
667
|
agentId: e.decision.agentId,
|
|
667
668
|
relationshipId: e.decision.relationshipId
|
|
668
669
|
}),
|
|
669
|
-
onError: () => void t.invalidateQueries({ queryKey:
|
|
670
|
+
onError: () => void t.invalidateQueries({ queryKey: u.decisions })
|
|
670
671
|
});
|
|
671
|
-
},
|
|
672
|
-
let t =
|
|
673
|
-
return
|
|
674
|
-
mutationFn: async ({ id: e, reason: t }) => (await
|
|
675
|
-
subDismissDecision(id: $id, reason: $reason) { ${
|
|
672
|
+
}, xe = () => {
|
|
673
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
674
|
+
return i({
|
|
675
|
+
mutationFn: async ({ id: e, reason: t }) => (await l(`mutation SubDismissDecision($id: ID!, $reason: String) {
|
|
676
|
+
subDismissDecision(id: $id, reason: $reason) { ${_} }
|
|
676
677
|
}`, {
|
|
677
678
|
id: e,
|
|
678
679
|
reason: t?.trim() ? t.trim() : void 0
|
|
@@ -682,94 +683,94 @@ var c = async (e, t, n) => {
|
|
|
682
683
|
agentId: e.agentId
|
|
683
684
|
})
|
|
684
685
|
});
|
|
685
|
-
},
|
|
686
|
+
}, Se = "\n generatedAt openDecisions truncated\n totals { currency annualSavings fromDecisions fromBundles }\n groups { recommendation currency count annualSavings }\n bundles {\n id type key title currency keepRelationshipId dropRelationshipIds\n annualSpend annualSavings confidence rationale\n members {\n relationshipId label providerId providerName amount currency interval\n annualCost capabilities\n }\n }\n", Ce = () => {
|
|
686
687
|
let { apiGatewayUrl: t } = e();
|
|
687
|
-
return
|
|
688
|
-
queryKey:
|
|
688
|
+
return a({
|
|
689
|
+
queryKey: u.savings,
|
|
689
690
|
retry: 1,
|
|
690
|
-
queryFn: async () => (await
|
|
691
|
+
queryFn: async () => (await l(`query SubSavingsOverview { subSavingsOverview { ${Se} } }`, {}, t)).subSavingsOverview
|
|
691
692
|
});
|
|
692
|
-
},
|
|
693
|
-
let t =
|
|
694
|
-
return
|
|
695
|
-
mutationFn: async (e) => (await
|
|
693
|
+
}, we = () => {
|
|
694
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
695
|
+
return i({
|
|
696
|
+
mutationFn: async (e) => (await l("mutation SubConsolidateRelationships($input: SubConsolidateRelationshipsInput!) {\n subConsolidateRelationships(input: $input) {\n kept { id label status amount currency interval }\n cancelled { id label status }\n failed { relationshipId message }\n estimatedSavings currency\n }\n }", { input: e }, n)).subConsolidateRelationships,
|
|
696
697
|
onSettled: (e, n, r) => {
|
|
697
|
-
t.invalidateQueries({ queryKey:
|
|
698
|
-
for (let e of [r.keepRelationshipId, ...r.cancelRelationshipIds]) t.invalidateQueries({ queryKey:
|
|
698
|
+
t.invalidateQueries({ queryKey: u.decisions }), t.invalidateQueries({ queryKey: u.relationships }), t.invalidateQueries({ queryKey: u.renewals });
|
|
699
|
+
for (let e of [r.keepRelationshipId, ...r.cancelRelationshipIds]) t.invalidateQueries({ queryKey: u.relationship(e) });
|
|
699
700
|
}
|
|
700
701
|
});
|
|
701
|
-
},
|
|
702
|
-
let t =
|
|
703
|
-
return
|
|
704
|
-
mutationFn: async ({ id: e, reason: t }) => (await
|
|
702
|
+
}, Te = () => {
|
|
703
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
704
|
+
return i({
|
|
705
|
+
mutationFn: async ({ id: e, reason: t }) => (await l("mutation SubDismissBundle($id: ID!, $reason: String) {\n subDismissBundle(id: $id, reason: $reason)\n }", {
|
|
705
706
|
id: e,
|
|
706
707
|
reason: t?.trim() ? t.trim() : void 0
|
|
707
708
|
}, n)).subDismissBundle,
|
|
708
|
-
onSuccess: () => void t.invalidateQueries({ queryKey:
|
|
709
|
+
onSuccess: () => void t.invalidateQueries({ queryKey: u.savings })
|
|
709
710
|
});
|
|
710
|
-
},
|
|
711
|
+
}, Ee = (t) => {
|
|
711
712
|
let { apiGatewayUrl: n } = e();
|
|
712
|
-
return
|
|
713
|
-
queryKey: [...
|
|
714
|
-
queryFn: async () => (await
|
|
715
|
-
subListWorkflows(status: $status) { items { ${
|
|
713
|
+
return a({
|
|
714
|
+
queryKey: [...u.workflows, t],
|
|
715
|
+
queryFn: async () => (await l(`query SubWorkflows($status: SubWorkflowStatus) {
|
|
716
|
+
subListWorkflows(status: $status) { items { ${v} } pageInfo { cursor hasMore } }
|
|
716
717
|
}`, { status: t }, n)).subListWorkflows.items
|
|
717
718
|
});
|
|
718
|
-
},
|
|
719
|
-
let t =
|
|
720
|
-
return
|
|
721
|
-
mutationFn: async (e) => (await
|
|
722
|
-
subCreateWorkflow(input: $input) { ${
|
|
719
|
+
}, De = () => {
|
|
720
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
721
|
+
return i({
|
|
722
|
+
mutationFn: async (e) => (await l(`mutation SubCreateWorkflow($input: SubCreateWorkflowInput!) {
|
|
723
|
+
subCreateWorkflow(input: $input) { ${v} }
|
|
723
724
|
}`, { input: e }, n)).subCreateWorkflow,
|
|
724
725
|
onSuccess: () => {
|
|
725
|
-
t.invalidateQueries({ queryKey:
|
|
726
|
+
t.invalidateQueries({ queryKey: u.workflows });
|
|
726
727
|
}
|
|
727
728
|
});
|
|
728
|
-
},
|
|
729
|
-
let t =
|
|
730
|
-
return
|
|
731
|
-
mutationFn: async (e) => (await
|
|
732
|
-
subActivateWorkflow(id: $id) { ${
|
|
729
|
+
}, Oe = () => {
|
|
730
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
731
|
+
return i({
|
|
732
|
+
mutationFn: async (e) => (await l(`mutation SubActivateWorkflow($id: ID!) {
|
|
733
|
+
subActivateWorkflow(id: $id) { ${v} }
|
|
733
734
|
}`, { id: e }, n)).subActivateWorkflow,
|
|
734
735
|
onSuccess: () => {
|
|
735
|
-
t.invalidateQueries({ queryKey:
|
|
736
|
+
t.invalidateQueries({ queryKey: u.workflows });
|
|
736
737
|
}
|
|
737
738
|
});
|
|
738
|
-
},
|
|
739
|
+
}, ke = (t) => {
|
|
739
740
|
let { apiGatewayUrl: n } = e();
|
|
740
|
-
return
|
|
741
|
-
queryKey:
|
|
741
|
+
return a({
|
|
742
|
+
queryKey: u.workflow(t ?? ""),
|
|
742
743
|
enabled: !!t,
|
|
743
|
-
queryFn: async () => (await
|
|
744
|
-
subWorkflow(id: $id) { ${
|
|
744
|
+
queryFn: async () => (await l(`query SubWorkflow($id: ID!) {
|
|
745
|
+
subWorkflow(id: $id) { ${v} graph { ${y} } }
|
|
745
746
|
}`, { id: t }, n)).subWorkflow
|
|
746
747
|
});
|
|
747
|
-
},
|
|
748
|
-
let t =
|
|
749
|
-
return
|
|
750
|
-
mutationFn: async ({ workflowId: e, input: t }) => (await
|
|
751
|
-
subSaveWorkflowGraph(workflowId: $workflowId, input: $input) { ${
|
|
748
|
+
}, Ae = () => {
|
|
749
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
750
|
+
return i({
|
|
751
|
+
mutationFn: async ({ workflowId: e, input: t }) => (await l(`mutation SubSaveWorkflowGraph($workflowId: ID!, $input: SubSaveWorkflowGraphInput!) {
|
|
752
|
+
subSaveWorkflowGraph(workflowId: $workflowId, input: $input) { ${y} }
|
|
752
753
|
}`, {
|
|
753
754
|
workflowId: e,
|
|
754
755
|
input: t
|
|
755
756
|
}, n)).subSaveWorkflowGraph,
|
|
756
|
-
onSuccess: () => void t.invalidateQueries({ queryKey:
|
|
757
|
+
onSuccess: () => void t.invalidateQueries({ queryKey: u.workflows })
|
|
757
758
|
});
|
|
758
|
-
},
|
|
759
|
-
let t =
|
|
760
|
-
return
|
|
761
|
-
mutationFn: async (e) => (await
|
|
762
|
-
subPauseWorkflow(id: $id) { ${
|
|
759
|
+
}, je = () => {
|
|
760
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
761
|
+
return i({
|
|
762
|
+
mutationFn: async (e) => (await l(`mutation SubPauseWorkflow($id: ID!) {
|
|
763
|
+
subPauseWorkflow(id: $id) { ${v} }
|
|
763
764
|
}`, { id: e }, n)).subPauseWorkflow,
|
|
764
|
-
onSuccess: () => void t.invalidateQueries({ queryKey:
|
|
765
|
+
onSuccess: () => void t.invalidateQueries({ queryKey: u.workflows })
|
|
765
766
|
});
|
|
766
|
-
},
|
|
767
|
+
}, Me = (t = {}) => {
|
|
767
768
|
let { apiGatewayUrl: n } = e();
|
|
768
|
-
return
|
|
769
|
-
queryKey: [...
|
|
770
|
-
queryFn: async () => (await
|
|
769
|
+
return a({
|
|
770
|
+
queryKey: [...u.adapterSubmissions, t],
|
|
771
|
+
queryFn: async () => (await l(`query SubAdapterSubmissions($status: SubSubmissionStatus, $pagination: PaginationInput) {
|
|
771
772
|
subListAdapterSubmissions(status: $status, pagination: $pagination) {
|
|
772
|
-
items { ${
|
|
773
|
+
items { ${C} }
|
|
773
774
|
pageInfo { cursor hasMore }
|
|
774
775
|
}
|
|
775
776
|
}`, {
|
|
@@ -780,39 +781,39 @@ var c = async (e, t, n) => {
|
|
|
780
781
|
}
|
|
781
782
|
}, n)).subListAdapterSubmissions
|
|
782
783
|
});
|
|
783
|
-
},
|
|
784
|
-
let t =
|
|
785
|
-
return
|
|
786
|
-
mutationFn: async ({ id: e, notes: t }) => (await
|
|
787
|
-
subApproveAdapter(id: $id, notes: $notes) { ${
|
|
784
|
+
}, Ne = () => {
|
|
785
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
786
|
+
return i({
|
|
787
|
+
mutationFn: async ({ id: e, notes: t }) => (await l(`mutation SubApproveAdapter($id: ID!, $notes: String) {
|
|
788
|
+
subApproveAdapter(id: $id, notes: $notes) { ${C} }
|
|
788
789
|
}`, {
|
|
789
790
|
id: e,
|
|
790
791
|
notes: t
|
|
791
792
|
}, n)).subApproveAdapter,
|
|
792
793
|
onSuccess: () => {
|
|
793
|
-
t.invalidateQueries({ queryKey:
|
|
794
|
+
t.invalidateQueries({ queryKey: u.adapterSubmissions });
|
|
794
795
|
}
|
|
795
796
|
});
|
|
796
|
-
},
|
|
797
|
-
let t =
|
|
798
|
-
return
|
|
799
|
-
mutationFn: async ({ id: e, reason: t }) => (await
|
|
800
|
-
subRejectAdapter(id: $id, reason: $reason) { ${
|
|
797
|
+
}, Pe = () => {
|
|
798
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
799
|
+
return i({
|
|
800
|
+
mutationFn: async ({ id: e, reason: t }) => (await l(`mutation SubRejectAdapter($id: ID!, $reason: String!) {
|
|
801
|
+
subRejectAdapter(id: $id, reason: $reason) { ${C} }
|
|
801
802
|
}`, {
|
|
802
803
|
id: e,
|
|
803
804
|
reason: t
|
|
804
805
|
}, n)).subRejectAdapter,
|
|
805
806
|
onSuccess: () => {
|
|
806
|
-
t.invalidateQueries({ queryKey:
|
|
807
|
+
t.invalidateQueries({ queryKey: u.adapterSubmissions });
|
|
807
808
|
}
|
|
808
809
|
});
|
|
809
|
-
},
|
|
810
|
+
}, Fe = (t = {}) => {
|
|
810
811
|
let { apiGatewayUrl: n } = e();
|
|
811
|
-
return
|
|
812
|
-
queryKey: [...
|
|
813
|
-
queryFn: async () => (await
|
|
812
|
+
return a({
|
|
813
|
+
queryKey: [...u.marketplaceReports, t],
|
|
814
|
+
queryFn: async () => (await l(`query SubMarketplaceReports($status: SubReportStatus, $pagination: PaginationInput) {
|
|
814
815
|
subListMarketplaceReports(status: $status, pagination: $pagination) {
|
|
815
|
-
items { ${
|
|
816
|
+
items { ${w} }
|
|
816
817
|
pageInfo { cursor hasMore }
|
|
817
818
|
}
|
|
818
819
|
}`, {
|
|
@@ -823,28 +824,28 @@ var c = async (e, t, n) => {
|
|
|
823
824
|
}
|
|
824
825
|
}, n)).subListMarketplaceReports
|
|
825
826
|
});
|
|
826
|
-
},
|
|
827
|
-
let t =
|
|
828
|
-
return
|
|
829
|
-
mutationFn: async ({ id: e, action: t, reason: r }) => (await
|
|
830
|
-
subModerateListing(id: $id, action: $action, reason: $reason) { ${
|
|
827
|
+
}, Q = () => {
|
|
828
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
829
|
+
return i({
|
|
830
|
+
mutationFn: async ({ id: e, action: t, reason: r }) => (await l(`mutation SubModerateListing($id: ID!, $action: SubModerationAction!, $reason: String!) {
|
|
831
|
+
subModerateListing(id: $id, action: $action, reason: $reason) { ${w} }
|
|
831
832
|
}`, {
|
|
832
833
|
id: e,
|
|
833
834
|
action: t,
|
|
834
835
|
reason: r
|
|
835
836
|
}, n)).subModerateListing,
|
|
836
837
|
onSuccess: () => {
|
|
837
|
-
t.invalidateQueries({ queryKey:
|
|
838
|
+
t.invalidateQueries({ queryKey: u.marketplaceReports });
|
|
838
839
|
}
|
|
839
840
|
});
|
|
840
|
-
},
|
|
841
|
+
}, $ = "monthlyBudget monthlySpend variance utilizationPct overBudget", Ie = `
|
|
841
842
|
currency generatedAt monthlySpend annualSpend activeRelationshipCount
|
|
842
843
|
previousMonthlySpend monthlySpendChangePct
|
|
843
844
|
trend { at monthlySpend }
|
|
844
|
-
budget { ${
|
|
845
|
+
budget { ${$} }
|
|
845
846
|
departments {
|
|
846
847
|
department monthlySpend annualSpend relationshipCount sharePct
|
|
847
|
-
budget { ${
|
|
848
|
+
budget { ${$} }
|
|
848
849
|
}
|
|
849
850
|
shadowIt {
|
|
850
851
|
relationshipId label providerId providerName department discoverySource
|
|
@@ -872,31 +873,31 @@ var c = async (e, t, n) => {
|
|
|
872
873
|
truncated
|
|
873
874
|
`, Le = (t) => {
|
|
874
875
|
let { apiGatewayUrl: n } = e();
|
|
875
|
-
return
|
|
876
|
-
queryKey: [...
|
|
877
|
-
queryFn: async () => (await
|
|
876
|
+
return a({
|
|
877
|
+
queryKey: [...u.enterpriseSpend, t ?? null],
|
|
878
|
+
queryFn: async () => (await l(`query SubEnterpriseSpendDashboard($currency: String) {
|
|
878
879
|
subEnterpriseSpendDashboard(currency: $currency) { ${Ie} }
|
|
879
880
|
}`, { currency: t || null }, n)).subEnterpriseSpendDashboard
|
|
880
881
|
});
|
|
881
|
-
},
|
|
882
|
+
}, Re = () => {
|
|
882
883
|
let { apiGatewayUrl: t } = e();
|
|
883
|
-
return
|
|
884
|
-
queryKey:
|
|
885
|
-
queryFn: async () => (await
|
|
884
|
+
return a({
|
|
885
|
+
queryKey: u.spendBudgets,
|
|
886
|
+
queryFn: async () => (await l("query SubListSpendBudgets {\n subListSpendBudgets { id department currency monthlyAmount updatedAt }\n }", {}, t)).subListSpendBudgets
|
|
886
887
|
});
|
|
887
|
-
},
|
|
888
|
-
let t =
|
|
889
|
-
return
|
|
890
|
-
mutationFn: async (e) => (await
|
|
888
|
+
}, ze = () => {
|
|
889
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
890
|
+
return i({
|
|
891
|
+
mutationFn: async (e) => (await l("mutation SubSetSpendBudget($input: SubSetSpendBudgetInput!) {\n subSetSpendBudget(input: $input) { id department currency monthlyAmount updatedAt }\n }", { input: e }, n)).subSetSpendBudget,
|
|
891
892
|
onSuccess: () => {
|
|
892
|
-
t.invalidateQueries({ queryKey:
|
|
893
|
+
t.invalidateQueries({ queryKey: u.spendBudgets }), t.invalidateQueries({ queryKey: u.enterpriseSpend });
|
|
893
894
|
}
|
|
894
895
|
});
|
|
895
|
-
},
|
|
896
|
+
}, Be = "\n currency generatedAt from to trialWindowDays statuses totalAmount renewalCount\n relationshipCount truncated\n otherCurrencyTotals { currency amount renewalCount }\n months {\n key year month startsAt endsAt amount renewalCount\n otherCurrencyTotals { currency amount renewalCount }\n items {\n relationshipId label providerId providerName kind status interval currency\n renewsAt daysRemaining amount occurrenceCount autoRenew healthScore\n reminderId reminderAt openDecisionId openDecisionKind needsReview\n }\n }\n trialsEndingSoon {\n relationshipId label providerId providerName trialEndsAt daysRemaining amount\n currency interval autoRenew reminderId reminderAt openDecisionId openDecisionKind\n }\n", Ve = (t = {}) => {
|
|
896
897
|
let { apiGatewayUrl: n } = e();
|
|
897
|
-
return
|
|
898
|
-
queryKey: [...
|
|
899
|
-
queryFn: async () => (await
|
|
898
|
+
return a({
|
|
899
|
+
queryKey: [...u.renewalForecast, t],
|
|
900
|
+
queryFn: async () => (await l(`query SubRenewalForecast(
|
|
900
901
|
$from: DateTime
|
|
901
902
|
$to: DateTime
|
|
902
903
|
$statuses: [SubRelationshipStatus!]
|
|
@@ -909,7 +910,7 @@ var c = async (e, t, n) => {
|
|
|
909
910
|
statuses: $statuses
|
|
910
911
|
trialWindowDays: $trialWindowDays
|
|
911
912
|
currency: $currency
|
|
912
|
-
) { ${
|
|
913
|
+
) { ${Be} }
|
|
913
914
|
}`, {
|
|
914
915
|
from: t.from ?? null,
|
|
915
916
|
to: t.to ?? null,
|
|
@@ -918,28 +919,28 @@ var c = async (e, t, n) => {
|
|
|
918
919
|
currency: t.currency || null
|
|
919
920
|
}, n)).subRenewalForecast
|
|
920
921
|
});
|
|
921
|
-
},
|
|
922
|
-
let t =
|
|
923
|
-
return
|
|
924
|
-
mutationFn: async (e) => (await
|
|
922
|
+
}, He = () => {
|
|
923
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
924
|
+
return i({
|
|
925
|
+
mutationFn: async (e) => (await l("mutation SubSetRenewalReminder($relationshipId: ID!, $remindAt: DateTime, $note: String) {\n subSetRenewalReminder(relationshipId: $relationshipId, remindAt: $remindAt, note: $note) {\n id relationshipId eventType occursAt amount currency detail notified\n workspaceId createdAt updatedAt\n }\n }", {
|
|
925
926
|
relationshipId: e.relationshipId,
|
|
926
927
|
remindAt: e.remindAt || null,
|
|
927
928
|
note: e.note || null
|
|
928
929
|
}, n)).subSetRenewalReminder,
|
|
929
930
|
onSuccess: () => {
|
|
930
|
-
t.invalidateQueries({ queryKey:
|
|
931
|
+
t.invalidateQueries({ queryKey: u.renewals });
|
|
931
932
|
}
|
|
932
933
|
});
|
|
933
|
-
},
|
|
934
|
-
let t =
|
|
935
|
-
return
|
|
936
|
-
mutationFn: async (e) => (await
|
|
934
|
+
}, Ue = () => {
|
|
935
|
+
let t = o(), { apiGatewayUrl: n } = e();
|
|
936
|
+
return i({
|
|
937
|
+
mutationFn: async (e) => (await l("mutation SubCancelRenewalReminder($id: ID!) {\n subCancelRenewalReminder(id: $id)\n }", { id: e }, n)).subCancelRenewalReminder,
|
|
937
938
|
onSuccess: () => {
|
|
938
|
-
t.invalidateQueries({ queryKey:
|
|
939
|
+
t.invalidateQueries({ queryKey: u.renewals });
|
|
939
940
|
}
|
|
940
941
|
});
|
|
941
942
|
};
|
|
942
943
|
//#endregion
|
|
943
|
-
export {
|
|
944
|
+
export { l as subQuery, Oe as useActivateWorkflow, Me as useAdapterSubmissions, fe as useAgent, de as useAgents, M as useAllAssets, be as useApplyDecision, Ne as useApproveAdapter, V as useArchiveProvider, W as useBenchmarkDataPoints, O as useCancelRelationship, Ue as useCancelRenewalReminder, ce as useChannels, we as useConsolidateRelationships, pe as useCreateAgent, N as useCreateAsset, le as useCreateChannel, j as useCreateEntitlement, ie as useCreateInvoice, oe as useCreatePaymentInstrument, U as useCreatePlan, he as useCreatePolicy, z as useCreateProvider, E as useCreateRelationship, De as useCreateWorkflow, ve as useDecision, _e as useDecisions, Te as useDismissBundle, xe as useDismissDecision, Le as useEnterpriseSpendDashboard, I as useFileDownloadUrl, G as useInboxMessages, J as useIngestMessage, Y as useInvoices, X as useMarkInvoicePaid, K as useMarkMessageRead, q as useMarkMessageUnread, Fe as useMarketplaceReports, Q as useModerateListing, je as usePauseWorkflow, ae as usePaymentInstruments, H as usePlans, R as useProvider, L as useProviders, Pe as useRejectAdapter, T as useRelationship, re as useRelationships, se as useRemovePaymentInstrument, A as useRenewalEvents, Ve as useRenewalForecast, ye as useRunAgent, Ae as useSaveWorkflowGraph, Ce as useSavingsOverview, me as useSetAgentStatus, He as useSetRenewalReminder, ze as useSetSpendBudget, Re as useSpendBudgets, D as useTransitionRelationship, B as useUpdateProvider, k as useUpdateRelationship, F as useUploadFile, ue as useVerifyChannel, ke as useWorkflow, Ee as useWorkflows };
|
|
944
945
|
|
|
945
946
|
//# sourceMappingURL=useSubscriberBotApi.js.map
|