@burdenoff/microfe-subscriberbot 2026.1117.1 → 2026.1123.1
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/subscriberbot/components/InfiniteScrollSentinel.d.ts +24 -0
- package/dist/subscriberbot/components/InfiniteScrollSentinel.js +44 -0
- package/dist/subscriberbot/components/InfiniteScrollSentinel.js.map +1 -0
- package/dist/subscriberbot/components/index.d.ts +4 -0
- package/dist/subscriberbot/components/index.js +5 -2
- package/dist/subscriberbot/components/tags/EntityTagPicker.d.ts +25 -0
- package/dist/subscriberbot/components/tags/EntityTagPicker.js +205 -0
- package/dist/subscriberbot/components/tags/EntityTagPicker.js.map +1 -0
- package/dist/subscriberbot/components/tags/index.d.ts +2 -0
- package/dist/subscriberbot/components/tags/index.js +1 -0
- package/dist/subscriberbot/hooks/index.d.ts +2 -2
- package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts +53 -1
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js +664 -373
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
- package/dist/subscriberbot/pages/AssetVaultPage.js +192 -147
- package/dist/subscriberbot/pages/AssetVaultPage.js.map +1 -1
- package/dist/subscriberbot/pages/DashboardPage.js +9 -9
- package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
- package/dist/subscriberbot/pages/InboxPage.js +264 -281
- package/dist/subscriberbot/pages/InboxPage.js.map +1 -1
- package/dist/subscriberbot/pages/InsightsPage.js +8 -8
- package/dist/subscriberbot/pages/InvoicesPage.js +62 -78
- package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentDetailPage.js +1 -1
- package/dist/subscriberbot/pages/agents/AgentsListPage.js +5 -5
- package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js +81 -81
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +326 -314
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderInsights.js +17 -17
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js +153 -140
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js +135 -146
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +482 -437
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +59 -46
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +104 -111
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -1
- package/dist/subscriberbot/types/index.d.ts +40 -1
- package/package.json +1 -1
|
@@ -2,12 +2,12 @@ import { useSubscriberBot as e } from "../context/SubscriberBotContext.js";
|
|
|
2
2
|
import { useTr as t } from "./useTr.js";
|
|
3
3
|
import "../context/index.js";
|
|
4
4
|
import { useCallback as n, useState as r } from "react";
|
|
5
|
-
import {
|
|
6
|
-
import { graphqlFetch as
|
|
7
|
-
import { clearGraphqlFetchResponseCache as
|
|
5
|
+
import { useInfiniteQuery as i, useMutation as a, useQuery as o, useQueryClient as s } from "@tanstack/react-query";
|
|
6
|
+
import { graphqlFetch as c } from "@burdenoff/fe-libs/shared/graphql";
|
|
7
|
+
import { clearGraphqlFetchResponseCache as l } from "@burdenoff/fe-libs/shared/graphql/fetch";
|
|
8
8
|
// src/subscriberbot/hooks/useSubscriberBotApi.ts
|
|
9
|
-
var
|
|
10
|
-
let r = await
|
|
9
|
+
var u = async (e, t, n) => {
|
|
10
|
+
let r = await c({
|
|
11
11
|
gateway: "workspace",
|
|
12
12
|
baseUrl: n,
|
|
13
13
|
query: e,
|
|
@@ -16,8 +16,8 @@ var l = async (e, t, n) => {
|
|
|
16
16
|
});
|
|
17
17
|
if (r.errors?.length) throw Error(r.errors[0]?.message ?? "GraphQL request failed");
|
|
18
18
|
if (!r.data) throw Error("GraphQL response did not include data");
|
|
19
|
-
return /^\s*mutation\b/.test(e) &&
|
|
20
|
-
},
|
|
19
|
+
return /^\s*mutation\b/.test(e) && l(), r.data;
|
|
20
|
+
}, d = {
|
|
21
21
|
relationships: ["subscriberbot", "relationships"],
|
|
22
22
|
relationship: (e) => [
|
|
23
23
|
"subscriberbot",
|
|
@@ -104,17 +104,40 @@ var l = async (e, t, n) => {
|
|
|
104
104
|
"subscriberbot",
|
|
105
105
|
"enterprise",
|
|
106
106
|
"budgets"
|
|
107
|
+
],
|
|
108
|
+
tags: ["subscriberbot", "tags"],
|
|
109
|
+
entityTags: (e, t) => [
|
|
110
|
+
"subscriberbot",
|
|
111
|
+
"tags",
|
|
112
|
+
"entity",
|
|
113
|
+
e,
|
|
114
|
+
t
|
|
115
|
+
],
|
|
116
|
+
availableTags: [
|
|
117
|
+
"subscriberbot",
|
|
118
|
+
"tags",
|
|
119
|
+
"available"
|
|
120
|
+
],
|
|
121
|
+
tagSearch: (e) => [
|
|
122
|
+
"subscriberbot",
|
|
123
|
+
"tags",
|
|
124
|
+
"search",
|
|
125
|
+
e
|
|
107
126
|
]
|
|
108
|
-
},
|
|
127
|
+
}, f = "\n cursor hasMore hasNextPage hasPreviousPage startCursor endCursor\n", p = "\n id tagId entityType entityId source assignedBy assignedAt\n tagInfo { id key label color }\n", m = (e) => {
|
|
128
|
+
if (e.hasNextPage ?? e.hasMore) return e.endCursor ?? e.cursor ?? void 0;
|
|
129
|
+
}, h = "\n id name slug category status description industry region language websiteUrl\n logoFileId tags churnRiskScore vendorHealthScore workspaceId createdAt updatedAt\n", g = "\n id name description providerId amount currency interval features isActive\n workspaceId createdAt updatedAt\n", _ = "\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", v = "\n id subject preview category categoryConfidence channelId relationshipId\n externalId actionRequired isRead receivedAt workspaceId createdAt updatedAt\n", y = "\n id number relationshipId status currency subtotal taxAmount total issueDate\n dueDate paidAt paymentInstrumentId workspaceId createdAt updatedAt\n", b = "\n id name description kind status ownerId lastRunAt workspaceId createdAt updatedAt\n", x = "\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", S = "\n id name description triggerEvent status runCount lastRunAt workspaceId\n createdAt updatedAt\n", C = "\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", w = "\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", T = "\n id label type status address ingestEnabled ownerId verifiedAt workspaceId\n createdAt updatedAt\n", E = "\n id name description action agentId condition isEnabled triggerCount\n lastTriggeredAt workspaceId createdAt updatedAt\n", D = "\n id providerSlug providerName planName region currency interval amount\n contractSizeSeats sourceKind sourceLabel notes observedAt createdAt\n", O = "\n id workspaceId adapterId submitterWorkspaceId status notes createdAt updatedAt\n", k = "\n id workspaceId listingId reporterWorkspaceId reason status resolutionReason\n createdAt updatedAt\n", ne = (t = {}) => {
|
|
109
130
|
let { apiGatewayUrl: n } = e();
|
|
110
|
-
return
|
|
111
|
-
queryKey: [...
|
|
112
|
-
queryFn: async () => (await
|
|
131
|
+
return o({
|
|
132
|
+
queryKey: [...d.relationships, t],
|
|
133
|
+
queryFn: async () => (await u(`query SubRelationships(
|
|
113
134
|
$kind: SubRelationshipKind
|
|
114
135
|
$status: SubRelationshipStatus
|
|
115
136
|
$providerId: ID
|
|
116
137
|
$ownerId: ID
|
|
117
138
|
$search: String
|
|
139
|
+
$tagId: ID
|
|
140
|
+
$tagIds: [ID!]
|
|
118
141
|
$pagination: PaginationInput
|
|
119
142
|
) {
|
|
120
143
|
subListRelationships(
|
|
@@ -123,14 +146,16 @@ var l = async (e, t, n) => {
|
|
|
123
146
|
providerId: $providerId
|
|
124
147
|
ownerId: $ownerId
|
|
125
148
|
search: $search
|
|
149
|
+
tagId: $tagId
|
|
150
|
+
tagIds: $tagIds
|
|
126
151
|
pagination: $pagination
|
|
127
152
|
) {
|
|
128
153
|
items {
|
|
129
|
-
${
|
|
154
|
+
${_}
|
|
130
155
|
provider { id name category status logoFileId }
|
|
131
156
|
plan { id name amount currency interval }
|
|
132
157
|
}
|
|
133
|
-
pageInfo {
|
|
158
|
+
pageInfo { ${f} }
|
|
134
159
|
}
|
|
135
160
|
}`, {
|
|
136
161
|
kind: t.kind,
|
|
@@ -138,22 +163,75 @@ var l = async (e, t, n) => {
|
|
|
138
163
|
providerId: t.providerId,
|
|
139
164
|
ownerId: t.ownerId,
|
|
140
165
|
search: t.search,
|
|
166
|
+
tagId: t.tagId,
|
|
167
|
+
tagIds: t.tagIds,
|
|
141
168
|
pagination: t.pagination ?? {
|
|
142
169
|
limit: 50,
|
|
143
170
|
offset: 0
|
|
144
171
|
}
|
|
145
172
|
}, n)).subListRelationships
|
|
146
173
|
});
|
|
147
|
-
}, re = (t) => {
|
|
174
|
+
}, re = (t = {}) => {
|
|
175
|
+
let { apiGatewayUrl: n } = e(), r = t.first ?? 20;
|
|
176
|
+
return i({
|
|
177
|
+
queryKey: [
|
|
178
|
+
...d.relationships,
|
|
179
|
+
"infinite",
|
|
180
|
+
t
|
|
181
|
+
],
|
|
182
|
+
initialPageParam: void 0,
|
|
183
|
+
queryFn: async ({ pageParam: e }) => (await u(`query SubRelationshipsInfinite(
|
|
184
|
+
$kind: SubRelationshipKind
|
|
185
|
+
$status: SubRelationshipStatus
|
|
186
|
+
$providerId: ID
|
|
187
|
+
$ownerId: ID
|
|
188
|
+
$search: String
|
|
189
|
+
$tagId: ID
|
|
190
|
+
$tagIds: [ID!]
|
|
191
|
+
$first: Int
|
|
192
|
+
$after: String
|
|
193
|
+
) {
|
|
194
|
+
subListRelationships(
|
|
195
|
+
kind: $kind
|
|
196
|
+
status: $status
|
|
197
|
+
providerId: $providerId
|
|
198
|
+
ownerId: $ownerId
|
|
199
|
+
search: $search
|
|
200
|
+
tagId: $tagId
|
|
201
|
+
tagIds: $tagIds
|
|
202
|
+
first: $first
|
|
203
|
+
after: $after
|
|
204
|
+
) {
|
|
205
|
+
items {
|
|
206
|
+
${_}
|
|
207
|
+
provider { id name category status logoFileId }
|
|
208
|
+
plan { id name amount currency interval }
|
|
209
|
+
}
|
|
210
|
+
pageInfo { ${f} }
|
|
211
|
+
}
|
|
212
|
+
}`, {
|
|
213
|
+
kind: t.kind,
|
|
214
|
+
status: t.status,
|
|
215
|
+
providerId: t.providerId,
|
|
216
|
+
ownerId: t.ownerId,
|
|
217
|
+
search: t.search,
|
|
218
|
+
tagId: t.tagId,
|
|
219
|
+
tagIds: t.tagIds,
|
|
220
|
+
first: r,
|
|
221
|
+
after: e
|
|
222
|
+
}, n)).subListRelationships,
|
|
223
|
+
getNextPageParam: (e) => m(e.pageInfo)
|
|
224
|
+
});
|
|
225
|
+
}, ie = (t) => {
|
|
148
226
|
let { apiGatewayUrl: n } = e();
|
|
149
|
-
return
|
|
150
|
-
queryKey:
|
|
227
|
+
return o({
|
|
228
|
+
queryKey: d.relationship(t ?? ""),
|
|
151
229
|
enabled: !!t,
|
|
152
|
-
queryFn: async () => (await
|
|
230
|
+
queryFn: async () => (await u(`query SubRelationship($id: ID!) {
|
|
153
231
|
subRelationship(id: $id) {
|
|
154
|
-
${
|
|
155
|
-
provider { ${
|
|
156
|
-
plan { ${
|
|
232
|
+
${_}
|
|
233
|
+
provider { ${h} }
|
|
234
|
+
plan { ${g} }
|
|
157
235
|
entitlements {
|
|
158
236
|
id name description type relationshipId quota used unit isActive
|
|
159
237
|
workspaceId createdAt updatedAt
|
|
@@ -169,114 +247,141 @@ var l = async (e, t, n) => {
|
|
|
169
247
|
}
|
|
170
248
|
}`, { id: t }, n)).subRelationship
|
|
171
249
|
});
|
|
172
|
-
},
|
|
173
|
-
let t =
|
|
174
|
-
return
|
|
175
|
-
mutationFn: async (e) => (await
|
|
176
|
-
subCreateRelationship(input: $input) { ${
|
|
250
|
+
}, A = () => {
|
|
251
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
252
|
+
return a({
|
|
253
|
+
mutationFn: async (e) => (await u(`mutation SubCreateRelationship($input: SubCreateRelationshipInput!) {
|
|
254
|
+
subCreateRelationship(input: $input) { ${_} }
|
|
177
255
|
}`, { input: e }, n)).subCreateRelationship,
|
|
178
256
|
onSuccess: () => {
|
|
179
|
-
t.invalidateQueries({ queryKey:
|
|
257
|
+
t.invalidateQueries({ queryKey: d.relationships }), t.invalidateQueries({ queryKey: d.providerInsights }), t.invalidateQueries({ queryKey: d.renewals });
|
|
180
258
|
}
|
|
181
259
|
});
|
|
182
|
-
},
|
|
183
|
-
let t =
|
|
184
|
-
return
|
|
185
|
-
mutationFn: async ({ id: e, status: t }) => (await
|
|
186
|
-
subTransitionRelationship(id: $id, status: $status) { ${
|
|
260
|
+
}, j = () => {
|
|
261
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
262
|
+
return a({
|
|
263
|
+
mutationFn: async ({ id: e, status: t }) => (await u(`mutation SubTransitionRelationship($id: ID!, $status: SubRelationshipStatus!) {
|
|
264
|
+
subTransitionRelationship(id: $id, status: $status) { ${_} }
|
|
187
265
|
}`, {
|
|
188
266
|
id: e,
|
|
189
267
|
status: t
|
|
190
268
|
}, n)).subTransitionRelationship,
|
|
191
269
|
onSuccess: (e) => {
|
|
192
|
-
t.invalidateQueries({ queryKey:
|
|
270
|
+
t.invalidateQueries({ queryKey: d.relationships }), t.invalidateQueries({ queryKey: d.relationship(e.id) }), t.invalidateQueries({ queryKey: d.providerInsights }), t.invalidateQueries({ queryKey: d.renewals });
|
|
193
271
|
}
|
|
194
272
|
});
|
|
195
|
-
},
|
|
196
|
-
let t =
|
|
197
|
-
return
|
|
198
|
-
mutationFn: async (e) => (await
|
|
199
|
-
subCancelRelationship(id: $id) { ${
|
|
273
|
+
}, M = () => {
|
|
274
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
275
|
+
return a({
|
|
276
|
+
mutationFn: async (e) => (await u(`mutation SubCancelRelationship($id: ID!) {
|
|
277
|
+
subCancelRelationship(id: $id) { ${_} }
|
|
200
278
|
}`, { id: e }, n)).subCancelRelationship,
|
|
201
279
|
onSuccess: (e) => {
|
|
202
|
-
t.invalidateQueries({ queryKey:
|
|
280
|
+
t.invalidateQueries({ queryKey: d.relationships }), t.invalidateQueries({ queryKey: d.providerInsights }), t.invalidateQueries({ queryKey: d.relationship(e.id) }), t.invalidateQueries({ queryKey: d.renewals });
|
|
203
281
|
}
|
|
204
282
|
});
|
|
205
|
-
},
|
|
206
|
-
let t =
|
|
207
|
-
return
|
|
208
|
-
mutationFn: async ({ id: e, input: t }) => (await
|
|
209
|
-
subUpdateRelationship(id: $id, input: $input) { ${
|
|
283
|
+
}, N = () => {
|
|
284
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
285
|
+
return a({
|
|
286
|
+
mutationFn: async ({ id: e, input: t }) => (await u(`mutation SubUpdateRelationship($id: ID!, $input: SubUpdateRelationshipInput!) {
|
|
287
|
+
subUpdateRelationship(id: $id, input: $input) { ${_} }
|
|
210
288
|
}`, {
|
|
211
289
|
id: e,
|
|
212
290
|
input: t
|
|
213
291
|
}, n)).subUpdateRelationship,
|
|
214
292
|
onSuccess: (e) => {
|
|
215
|
-
t.invalidateQueries({ queryKey:
|
|
293
|
+
t.invalidateQueries({ queryKey: d.relationships }), t.invalidateQueries({ queryKey: d.providerInsights }), t.invalidateQueries({ queryKey: d.relationship(e.id) }), t.invalidateQueries({ queryKey: d.renewals });
|
|
216
294
|
}
|
|
217
295
|
});
|
|
218
|
-
},
|
|
296
|
+
}, P = (t = {}) => {
|
|
219
297
|
let { apiGatewayUrl: n } = e();
|
|
220
|
-
return
|
|
221
|
-
queryKey: [...
|
|
222
|
-
queryFn: async () => (await
|
|
298
|
+
return o({
|
|
299
|
+
queryKey: [...d.renewals, t],
|
|
300
|
+
queryFn: async () => (await u("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 }", {
|
|
223
301
|
relationshipId: t.relationshipId,
|
|
224
302
|
upcomingOnly: t.upcomingOnly
|
|
225
303
|
}, n)).subListRenewalEvents.items
|
|
226
304
|
});
|
|
227
|
-
},
|
|
228
|
-
let t =
|
|
229
|
-
return
|
|
230
|
-
mutationFn: async (e) => (await
|
|
305
|
+
}, F = () => {
|
|
306
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
307
|
+
return a({
|
|
308
|
+
mutationFn: async (e) => (await u(`mutation SubCreateEntitlement($input: SubCreateEntitlementInput!) {
|
|
231
309
|
subCreateEntitlement(input: $input) { ${ee} }
|
|
232
310
|
}`, { input: e }, n)).subCreateEntitlement,
|
|
233
311
|
onSuccess: (e) => {
|
|
234
|
-
t.invalidateQueries({ queryKey:
|
|
312
|
+
t.invalidateQueries({ queryKey: d.entitlements }), t.invalidateQueries({ queryKey: d.relationship(e.relationshipId) });
|
|
235
313
|
}
|
|
236
314
|
});
|
|
237
|
-
},
|
|
238
|
-
let { apiGatewayUrl:
|
|
239
|
-
return a({
|
|
240
|
-
queryKey: [...u.assets, "all"],
|
|
241
|
-
queryFn: async () => (await l(`query SubAllAssets {
|
|
242
|
-
subListAssets { items { ${b} } pageInfo { cursor hasMore } }
|
|
243
|
-
}`, {}, t)).subListAssets.items
|
|
244
|
-
});
|
|
245
|
-
}, N = () => {
|
|
246
|
-
let t = o(), { apiGatewayUrl: n } = e();
|
|
315
|
+
}, I = (t = {}) => {
|
|
316
|
+
let { apiGatewayUrl: n } = e(), r = t.first ?? 24;
|
|
247
317
|
return i({
|
|
248
|
-
|
|
249
|
-
|
|
318
|
+
queryKey: [
|
|
319
|
+
...d.assets,
|
|
320
|
+
"infinite",
|
|
321
|
+
t
|
|
322
|
+
],
|
|
323
|
+
initialPageParam: void 0,
|
|
324
|
+
queryFn: async ({ pageParam: e }) => (await u(`query SubAssetsInfinite(
|
|
325
|
+
$relationshipId: ID
|
|
326
|
+
$tagId: ID
|
|
327
|
+
$tagIds: [ID!]
|
|
328
|
+
$first: Int
|
|
329
|
+
$after: String
|
|
330
|
+
) {
|
|
331
|
+
subListAssets(
|
|
332
|
+
relationshipId: $relationshipId
|
|
333
|
+
tagId: $tagId
|
|
334
|
+
tagIds: $tagIds
|
|
335
|
+
first: $first
|
|
336
|
+
after: $after
|
|
337
|
+
) {
|
|
338
|
+
items { ${w} }
|
|
339
|
+
pageInfo { ${f} }
|
|
340
|
+
}
|
|
341
|
+
}`, {
|
|
342
|
+
relationshipId: t.relationshipId,
|
|
343
|
+
tagId: t.tagId,
|
|
344
|
+
tagIds: t.tagIds,
|
|
345
|
+
first: r,
|
|
346
|
+
after: e
|
|
347
|
+
}, n)).subListAssets,
|
|
348
|
+
getNextPageParam: (e) => m(e.pageInfo)
|
|
349
|
+
});
|
|
350
|
+
}, L = () => {
|
|
351
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
352
|
+
return a({
|
|
353
|
+
mutationFn: async (e) => (await u(`mutation SubCreateAsset($input: SubCreateAssetInput!) {
|
|
354
|
+
subCreateAsset(input: $input) { ${w} }
|
|
250
355
|
}`, { input: e }, n)).subCreateAsset,
|
|
251
356
|
onSuccess: (e) => {
|
|
252
|
-
t.invalidateQueries({ queryKey:
|
|
357
|
+
t.invalidateQueries({ queryKey: d.assets }), t.invalidateQueries({ queryKey: d.relationship(e.relationshipId) });
|
|
253
358
|
}
|
|
254
359
|
});
|
|
255
|
-
},
|
|
256
|
-
let i = t(), { apiGatewayUrl: a } = e(), [o, s] = r(0), [c,
|
|
360
|
+
}, R = "/SubscriberBot/Assets", z = () => {
|
|
361
|
+
let i = t(), { apiGatewayUrl: a } = e(), [o, s] = r(0), [c, l] = r(!1);
|
|
257
362
|
return {
|
|
258
363
|
uploadFile: n(async (e) => {
|
|
259
|
-
|
|
364
|
+
l(!0), s(0);
|
|
260
365
|
try {
|
|
261
|
-
let t = (await
|
|
366
|
+
let t = (await u("mutation SubEnsureFolder($path: String!) {\n ensureFolderByPath(path: $path) { id }\n }", { path: R }, a)).ensureFolderByPath?.id;
|
|
262
367
|
if (!t) throw Error(i("assets.upload.error.folder", "Could not resolve the upload folder."));
|
|
263
|
-
let n = e.type || "application/octet-stream", r = e.name.lastIndexOf("."), o = r > -1 ? e.name.slice(r + 1) : "bin", c = await
|
|
368
|
+
let n = e.type || "application/octet-stream", r = e.name.lastIndexOf("."), o = r > -1 ? e.name.slice(r + 1) : "bin", c = await u("mutation SubInitiateUpload($input: InitiateUploadInput!) {\n initiateUpload(input: $input) {\n uploadUrl\n session { id }\n }\n }", { input: {
|
|
264
369
|
fileName: e.name,
|
|
265
370
|
extension: o,
|
|
266
371
|
mimeType: n,
|
|
267
372
|
fileSize: String(e.size),
|
|
268
373
|
folderId: t
|
|
269
|
-
} }, a),
|
|
270
|
-
if (!
|
|
374
|
+
} }, a), l = c.initiateUpload?.uploadUrl, d = c.initiateUpload?.session.id;
|
|
375
|
+
if (!l || !d) throw Error(i("assets.upload.error.url", "The files service did not return an upload URL."));
|
|
271
376
|
await new Promise((t, r) => {
|
|
272
377
|
let a = new XMLHttpRequest();
|
|
273
|
-
a.open("PUT",
|
|
378
|
+
a.open("PUT", l), a.setRequestHeader("Content-Type", n), a.upload.onprogress = (e) => {
|
|
274
379
|
e.lengthComputable && s(Math.round(e.loaded / e.total * 100));
|
|
275
380
|
}, a.onload = () => {
|
|
276
381
|
a.status >= 200 && a.status < 300 ? t() : r(Error(i("assets.upload.error.status", "Upload to storage failed ({{status}}).", { status: a.status })));
|
|
277
382
|
}, a.onerror = () => r(Error(i("assets.upload.error.storage", "Upload to storage failed."))), a.send(e);
|
|
278
383
|
});
|
|
279
|
-
let f = await
|
|
384
|
+
let f = await u("mutation SubCompleteUpload($input: CompleteUploadInput!) {\n completeUpload(input: $input) {\n fileId\n file { id name }\n }\n }", { input: {
|
|
280
385
|
sessionId: d,
|
|
281
386
|
fileSize: String(e.size),
|
|
282
387
|
folderId: t
|
|
@@ -287,122 +392,169 @@ var l = async (e, t, n) => {
|
|
|
287
392
|
fileName: f.completeUpload?.file?.name ?? e.name
|
|
288
393
|
};
|
|
289
394
|
} finally {
|
|
290
|
-
|
|
395
|
+
l(!1);
|
|
291
396
|
}
|
|
292
397
|
}, [a, i]),
|
|
293
398
|
progress: o,
|
|
294
399
|
isUploading: c
|
|
295
400
|
};
|
|
296
|
-
},
|
|
401
|
+
}, B = () => {
|
|
297
402
|
let { apiGatewayUrl: t } = e();
|
|
298
|
-
return n(async (e) => (await
|
|
403
|
+
return n(async (e) => (await u("query SubFileDownloadUrl($id: ID!, $expiresIn: Int) {\n getFileDownloadUrl(id: $id, expiresIn: $expiresIn)\n }", {
|
|
299
404
|
id: e,
|
|
300
405
|
expiresIn: 21600
|
|
301
406
|
}, t)).getFileDownloadUrl, [t]);
|
|
302
|
-
},
|
|
407
|
+
}, V = (t = {}) => {
|
|
303
408
|
let { apiGatewayUrl: n } = e();
|
|
304
|
-
return
|
|
305
|
-
queryKey: [...
|
|
306
|
-
queryFn: async () => (await
|
|
409
|
+
return o({
|
|
410
|
+
queryKey: [...d.providers, t],
|
|
411
|
+
queryFn: async () => (await u(`query SubProviders(
|
|
307
412
|
$category: SubProviderCategory
|
|
308
413
|
$status: SubProviderStatus
|
|
309
414
|
$search: String
|
|
415
|
+
$tagId: ID
|
|
416
|
+
$tagIds: [ID!]
|
|
310
417
|
$pagination: PaginationInput
|
|
311
418
|
) {
|
|
312
419
|
subListProviders(
|
|
313
420
|
category: $category
|
|
314
421
|
status: $status
|
|
315
422
|
search: $search
|
|
423
|
+
tagId: $tagId
|
|
424
|
+
tagIds: $tagIds
|
|
316
425
|
pagination: $pagination
|
|
317
426
|
) {
|
|
318
|
-
items { ${
|
|
319
|
-
pageInfo {
|
|
427
|
+
items { ${h} }
|
|
428
|
+
pageInfo { ${f} }
|
|
320
429
|
}
|
|
321
430
|
}`, {
|
|
322
431
|
category: t.category,
|
|
323
432
|
status: t.status,
|
|
324
433
|
search: t.search,
|
|
434
|
+
tagId: t.tagId,
|
|
435
|
+
tagIds: t.tagIds,
|
|
325
436
|
pagination: t.pagination ?? {
|
|
326
437
|
limit: 50,
|
|
327
438
|
offset: 0
|
|
328
439
|
}
|
|
329
440
|
}, n)).subListProviders
|
|
330
441
|
});
|
|
331
|
-
},
|
|
442
|
+
}, H = (t = {}) => {
|
|
443
|
+
let { apiGatewayUrl: n } = e(), r = t.first ?? 24;
|
|
444
|
+
return i({
|
|
445
|
+
queryKey: [
|
|
446
|
+
...d.providers,
|
|
447
|
+
"infinite",
|
|
448
|
+
t
|
|
449
|
+
],
|
|
450
|
+
initialPageParam: void 0,
|
|
451
|
+
queryFn: async ({ pageParam: e }) => (await u(`query SubProvidersInfinite(
|
|
452
|
+
$category: SubProviderCategory
|
|
453
|
+
$status: SubProviderStatus
|
|
454
|
+
$search: String
|
|
455
|
+
$tagId: ID
|
|
456
|
+
$tagIds: [ID!]
|
|
457
|
+
$first: Int
|
|
458
|
+
$after: String
|
|
459
|
+
) {
|
|
460
|
+
subListProviders(
|
|
461
|
+
category: $category
|
|
462
|
+
status: $status
|
|
463
|
+
search: $search
|
|
464
|
+
tagId: $tagId
|
|
465
|
+
tagIds: $tagIds
|
|
466
|
+
first: $first
|
|
467
|
+
after: $after
|
|
468
|
+
) {
|
|
469
|
+
items { ${h} }
|
|
470
|
+
pageInfo { ${f} }
|
|
471
|
+
}
|
|
472
|
+
}`, {
|
|
473
|
+
category: t.category,
|
|
474
|
+
status: t.status,
|
|
475
|
+
search: t.search,
|
|
476
|
+
tagId: t.tagId,
|
|
477
|
+
tagIds: t.tagIds,
|
|
478
|
+
first: r,
|
|
479
|
+
after: e
|
|
480
|
+
}, n)).subListProviders,
|
|
481
|
+
getNextPageParam: (e) => m(e.pageInfo)
|
|
482
|
+
});
|
|
483
|
+
}, U = (t) => {
|
|
332
484
|
let { apiGatewayUrl: n } = e();
|
|
333
|
-
return
|
|
334
|
-
queryKey:
|
|
485
|
+
return o({
|
|
486
|
+
queryKey: d.provider(t ?? ""),
|
|
335
487
|
enabled: !!t,
|
|
336
|
-
queryFn: async () => (await
|
|
488
|
+
queryFn: async () => (await u(`query SubProvider($id: ID!) {
|
|
337
489
|
subProvider(id: $id) {
|
|
338
|
-
${
|
|
339
|
-
plans { ${
|
|
490
|
+
${h}
|
|
491
|
+
plans { ${g} }
|
|
340
492
|
}
|
|
341
493
|
}`, { id: t }, n)).subProvider
|
|
342
494
|
});
|
|
343
|
-
},
|
|
344
|
-
let t =
|
|
345
|
-
return
|
|
346
|
-
mutationFn: async (e) => (await
|
|
347
|
-
subCreateProvider(input: $input) { ${
|
|
495
|
+
}, W = () => {
|
|
496
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
497
|
+
return a({
|
|
498
|
+
mutationFn: async (e) => (await u(`mutation SubCreateProvider($input: SubCreateProviderInput!) {
|
|
499
|
+
subCreateProvider(input: $input) { ${h} }
|
|
348
500
|
}`, { input: e }, n)).subCreateProvider,
|
|
349
501
|
onSuccess: () => {
|
|
350
|
-
t.invalidateQueries({ queryKey:
|
|
502
|
+
t.invalidateQueries({ queryKey: d.providers }), t.invalidateQueries({ queryKey: d.providerInsights });
|
|
351
503
|
}
|
|
352
504
|
});
|
|
353
|
-
},
|
|
354
|
-
let t =
|
|
355
|
-
return
|
|
356
|
-
mutationFn: async ({ id: e, input: t }) => (await
|
|
357
|
-
subUpdateProvider(id: $id, input: $input) { ${
|
|
505
|
+
}, G = () => {
|
|
506
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
507
|
+
return a({
|
|
508
|
+
mutationFn: async ({ id: e, input: t }) => (await u(`mutation SubUpdateProvider($id: ID!, $input: SubUpdateProviderInput!) {
|
|
509
|
+
subUpdateProvider(id: $id, input: $input) { ${h} }
|
|
358
510
|
}`, {
|
|
359
511
|
id: e,
|
|
360
512
|
input: t
|
|
361
513
|
}, n)).subUpdateProvider,
|
|
362
514
|
onSuccess: (e) => {
|
|
363
|
-
t.invalidateQueries({ queryKey:
|
|
515
|
+
t.invalidateQueries({ queryKey: d.providers }), t.invalidateQueries({ queryKey: d.providerInsights }), t.invalidateQueries({ queryKey: d.provider(e.id) });
|
|
364
516
|
}
|
|
365
517
|
});
|
|
366
|
-
},
|
|
367
|
-
let t =
|
|
368
|
-
return
|
|
369
|
-
mutationFn: async (e) => (await
|
|
518
|
+
}, K = () => {
|
|
519
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
520
|
+
return a({
|
|
521
|
+
mutationFn: async (e) => (await u("mutation SubArchiveProvider($id: ID!) {\n subArchiveProvider(id: $id)\n }", { id: e }, n)).subArchiveProvider,
|
|
370
522
|
onSuccess: () => {
|
|
371
|
-
t.invalidateQueries({ queryKey:
|
|
523
|
+
t.invalidateQueries({ queryKey: d.providers }), t.invalidateQueries({ queryKey: d.providerInsights });
|
|
372
524
|
}
|
|
373
525
|
});
|
|
374
|
-
},
|
|
526
|
+
}, q = (t) => {
|
|
375
527
|
let { apiGatewayUrl: n } = e();
|
|
376
|
-
return
|
|
377
|
-
queryKey: [...
|
|
528
|
+
return o({
|
|
529
|
+
queryKey: [...d.plans, t],
|
|
378
530
|
enabled: !!t,
|
|
379
|
-
queryFn: async () => (await
|
|
380
|
-
subListPlans(providerId: $providerId) { items { ${
|
|
531
|
+
queryFn: async () => (await u(`query SubPlans($providerId: ID) {
|
|
532
|
+
subListPlans(providerId: $providerId) { items { ${g} } pageInfo { cursor hasMore } }
|
|
381
533
|
}`, { providerId: t }, n)).subListPlans.items
|
|
382
534
|
});
|
|
383
|
-
},
|
|
384
|
-
let t =
|
|
385
|
-
return
|
|
386
|
-
mutationFn: async (e) => (await
|
|
387
|
-
subCreatePlan(input: $input) { ${
|
|
535
|
+
}, J = () => {
|
|
536
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
537
|
+
return a({
|
|
538
|
+
mutationFn: async (e) => (await u(`mutation SubCreatePlan($input: SubCreatePlanInput!) {
|
|
539
|
+
subCreatePlan(input: $input) { ${g} }
|
|
388
540
|
}`, { input: e }, n)).subCreatePlan,
|
|
389
541
|
onSuccess: (e) => {
|
|
390
|
-
t.invalidateQueries({ queryKey:
|
|
542
|
+
t.invalidateQueries({ queryKey: d.plans }), t.invalidateQueries({ queryKey: d.providerInsights }), t.invalidateQueries({ queryKey: d.provider(e.providerId) });
|
|
391
543
|
}
|
|
392
544
|
});
|
|
393
|
-
},
|
|
545
|
+
}, Y = "\n id source observedAt amount currency interval monthlyAmount relationshipId label\n", ae = (t) => {
|
|
394
546
|
let { apiGatewayUrl: n } = e();
|
|
395
|
-
return
|
|
396
|
-
queryKey:
|
|
547
|
+
return o({
|
|
548
|
+
queryKey: d.providerPriceHistory(t ?? ""),
|
|
397
549
|
enabled: !!t,
|
|
398
|
-
queryFn: async () => (await
|
|
550
|
+
queryFn: async () => (await u(`query SubProviderPriceHistory($providerId: ID!) {
|
|
399
551
|
subProviderPriceHistory(providerId: $providerId) {
|
|
400
552
|
providerId
|
|
401
|
-
points { ${
|
|
553
|
+
points { ${Y} }
|
|
402
554
|
series {
|
|
403
555
|
key label source currency interval relationshipId
|
|
404
556
|
firstMonthlyAmount latestMonthlyAmount changePercent
|
|
405
|
-
points { ${
|
|
557
|
+
points { ${Y} }
|
|
406
558
|
}
|
|
407
559
|
summary {
|
|
408
560
|
currency pointCount minMonthlyAmount maxMonthlyAmount
|
|
@@ -411,29 +563,29 @@ var l = async (e, t, n) => {
|
|
|
411
563
|
}
|
|
412
564
|
}`, { providerId: t }, n)).subProviderPriceHistory
|
|
413
565
|
});
|
|
414
|
-
},
|
|
566
|
+
}, oe = (t, n = 5) => {
|
|
415
567
|
let { apiGatewayUrl: r } = e();
|
|
416
|
-
return
|
|
417
|
-
queryKey: [...
|
|
568
|
+
return o({
|
|
569
|
+
queryKey: [...d.providerAlternatives(t ?? ""), n],
|
|
418
570
|
enabled: !!t,
|
|
419
|
-
queryFn: async () => (await
|
|
571
|
+
queryFn: async () => (await u("query SubProviderAlternatives($providerId: ID!, $limit: Int) {\n subProviderAlternatives(providerId: $providerId, limit: $limit) {\n providerId name matchReason sharedCapabilities capabilities\n priceRanges { currency minMonthlyAmount maxMonthlyAmount count basis }\n activeRelationshipCount trackedRelationshipCount\n relationships { id label status amount currency interval }\n provider { id name category status }\n }\n }", {
|
|
420
572
|
providerId: t,
|
|
421
573
|
limit: n
|
|
422
574
|
}, r)).subProviderAlternatives
|
|
423
575
|
});
|
|
424
|
-
},
|
|
576
|
+
}, se = (t) => {
|
|
425
577
|
let { apiGatewayUrl: n } = e();
|
|
426
|
-
return
|
|
427
|
-
queryKey:
|
|
578
|
+
return o({
|
|
579
|
+
queryKey: d.benchmarks(t ?? ""),
|
|
428
580
|
enabled: !!t,
|
|
429
581
|
queryFn: async () => {
|
|
430
582
|
let e = { providerSlug: t ?? void 0 };
|
|
431
|
-
return (await
|
|
583
|
+
return (await u(`query SubBenchmarkDataPoints(
|
|
432
584
|
$filter: SubBenchmarkFilterInput
|
|
433
585
|
$pagination: PaginationInput
|
|
434
586
|
) {
|
|
435
587
|
subListBenchmarkDataPoints(filter: $filter, pagination: $pagination) {
|
|
436
|
-
items { ${
|
|
588
|
+
items { ${D} }
|
|
437
589
|
pageInfo { cursor hasMore }
|
|
438
590
|
}
|
|
439
591
|
}`, {
|
|
@@ -445,11 +597,11 @@ var l = async (e, t, n) => {
|
|
|
445
597
|
}, n)).subListBenchmarkDataPoints.items;
|
|
446
598
|
}
|
|
447
599
|
});
|
|
448
|
-
},
|
|
600
|
+
}, ce = (t = {}) => {
|
|
449
601
|
let { apiGatewayUrl: n } = e();
|
|
450
|
-
return
|
|
451
|
-
queryKey: [...
|
|
452
|
-
queryFn: async () => (await
|
|
602
|
+
return o({
|
|
603
|
+
queryKey: [...d.inbox, t],
|
|
604
|
+
queryFn: async () => (await u(`query SubInboxMessages(
|
|
453
605
|
$category: SubMessageCategory
|
|
454
606
|
$channelId: ID
|
|
455
607
|
$relationshipId: ID
|
|
@@ -463,8 +615,8 @@ var l = async (e, t, n) => {
|
|
|
463
615
|
unreadOnly: $unreadOnly
|
|
464
616
|
pagination: $pagination
|
|
465
617
|
) {
|
|
466
|
-
items { ${
|
|
467
|
-
pageInfo {
|
|
618
|
+
items { ${v} }
|
|
619
|
+
pageInfo { ${f} }
|
|
468
620
|
}
|
|
469
621
|
}`, {
|
|
470
622
|
category: t.category,
|
|
@@ -477,38 +629,76 @@ var l = async (e, t, n) => {
|
|
|
477
629
|
}
|
|
478
630
|
}, n)).subListInboxMessages
|
|
479
631
|
});
|
|
480
|
-
},
|
|
481
|
-
let
|
|
632
|
+
}, le = (t = {}) => {
|
|
633
|
+
let { apiGatewayUrl: n } = e(), r = t.first ?? 25;
|
|
482
634
|
return i({
|
|
483
|
-
|
|
484
|
-
|
|
635
|
+
queryKey: [
|
|
636
|
+
...d.inbox,
|
|
637
|
+
"infinite",
|
|
638
|
+
t
|
|
639
|
+
],
|
|
640
|
+
initialPageParam: void 0,
|
|
641
|
+
queryFn: async ({ pageParam: e }) => (await u(`query SubInboxMessagesInfinite(
|
|
642
|
+
$category: SubMessageCategory
|
|
643
|
+
$channelId: ID
|
|
644
|
+
$relationshipId: ID
|
|
645
|
+
$unreadOnly: Boolean
|
|
646
|
+
$first: Int
|
|
647
|
+
$after: String
|
|
648
|
+
) {
|
|
649
|
+
subListInboxMessages(
|
|
650
|
+
category: $category
|
|
651
|
+
channelId: $channelId
|
|
652
|
+
relationshipId: $relationshipId
|
|
653
|
+
unreadOnly: $unreadOnly
|
|
654
|
+
first: $first
|
|
655
|
+
after: $after
|
|
656
|
+
) {
|
|
657
|
+
items { ${v} }
|
|
658
|
+
pageInfo { ${f} }
|
|
659
|
+
}
|
|
660
|
+
}`, {
|
|
661
|
+
category: t.category,
|
|
662
|
+
channelId: t.channelId,
|
|
663
|
+
relationshipId: t.relationshipId,
|
|
664
|
+
unreadOnly: t.unreadOnly,
|
|
665
|
+
first: r,
|
|
666
|
+
after: e
|
|
667
|
+
}, n)).subListInboxMessages,
|
|
668
|
+
getNextPageParam: (e) => m(e.pageInfo)
|
|
669
|
+
});
|
|
670
|
+
}, ue = () => {
|
|
671
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
672
|
+
return a({
|
|
673
|
+
mutationFn: async (e) => (await u(`mutation SubMarkMessageRead($id: ID!) {
|
|
674
|
+
subMarkMessageRead(id: $id) { ${v} }
|
|
485
675
|
}`, { id: e }, n)).subMarkMessageRead,
|
|
486
|
-
onSuccess: () => t.invalidateQueries({ queryKey:
|
|
676
|
+
onSuccess: () => t.invalidateQueries({ queryKey: d.inbox })
|
|
487
677
|
});
|
|
488
|
-
},
|
|
489
|
-
let t =
|
|
490
|
-
return
|
|
491
|
-
mutationFn: async (e) => (await
|
|
492
|
-
subMarkMessageUnread(id: $id) { ${
|
|
678
|
+
}, de = () => {
|
|
679
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
680
|
+
return a({
|
|
681
|
+
mutationFn: async (e) => (await u(`mutation SubMarkMessageUnread($id: ID!) {
|
|
682
|
+
subMarkMessageUnread(id: $id) { ${v} }
|
|
493
683
|
}`, { id: e }, n)).subMarkMessageUnread,
|
|
494
|
-
onSuccess: () => t.invalidateQueries({ queryKey:
|
|
684
|
+
onSuccess: () => t.invalidateQueries({ queryKey: d.inbox })
|
|
495
685
|
});
|
|
496
|
-
},
|
|
497
|
-
let t =
|
|
498
|
-
return
|
|
499
|
-
mutationFn: async (e) => (await
|
|
500
|
-
subIngestMessage(input: $input) { ${
|
|
686
|
+
}, fe = () => {
|
|
687
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
688
|
+
return a({
|
|
689
|
+
mutationFn: async (e) => (await u(`mutation SubIngestMessage($input: SubIngestMessageInput!) {
|
|
690
|
+
subIngestMessage(input: $input) { ${v} }
|
|
501
691
|
}`, { input: e }, n)).subIngestMessage,
|
|
502
692
|
onSuccess: () => {
|
|
503
|
-
t.invalidateQueries({ queryKey:
|
|
693
|
+
t.invalidateQueries({ queryKey: d.inbox });
|
|
504
694
|
}
|
|
505
695
|
});
|
|
506
|
-
},
|
|
696
|
+
}, pe = (t = {}, n = {}) => {
|
|
507
697
|
let { apiGatewayUrl: r } = e();
|
|
508
|
-
return
|
|
509
|
-
queryKey: [...
|
|
698
|
+
return o({
|
|
699
|
+
queryKey: [...d.invoices, t],
|
|
510
700
|
enabled: n.enabled ?? !0,
|
|
511
|
-
queryFn: async () => (await
|
|
701
|
+
queryFn: async () => (await u(`query SubInvoices(
|
|
512
702
|
$status: SubInvoiceStatus
|
|
513
703
|
$relationshipId: ID
|
|
514
704
|
$pagination: PaginationInput
|
|
@@ -518,8 +708,8 @@ var l = async (e, t, n) => {
|
|
|
518
708
|
relationshipId: $relationshipId
|
|
519
709
|
pagination: $pagination
|
|
520
710
|
) {
|
|
521
|
-
items { ${
|
|
522
|
-
pageInfo {
|
|
711
|
+
items { ${y} }
|
|
712
|
+
pageInfo { ${f} }
|
|
523
713
|
}
|
|
524
714
|
}`, {
|
|
525
715
|
status: t.status,
|
|
@@ -530,83 +720,116 @@ var l = async (e, t, n) => {
|
|
|
530
720
|
}
|
|
531
721
|
}, r)).subListInvoices
|
|
532
722
|
});
|
|
533
|
-
},
|
|
534
|
-
let
|
|
723
|
+
}, me = (t = {}, n = {}) => {
|
|
724
|
+
let { apiGatewayUrl: r } = e(), a = t.first ?? 25;
|
|
535
725
|
return i({
|
|
536
|
-
|
|
537
|
-
|
|
726
|
+
queryKey: [
|
|
727
|
+
...d.invoices,
|
|
728
|
+
"infinite",
|
|
729
|
+
t
|
|
730
|
+
],
|
|
731
|
+
enabled: n.enabled ?? !0,
|
|
732
|
+
initialPageParam: void 0,
|
|
733
|
+
queryFn: async ({ pageParam: e }) => (await u(`query SubInvoicesInfinite(
|
|
734
|
+
$status: SubInvoiceStatus
|
|
735
|
+
$relationshipId: ID
|
|
736
|
+
$first: Int
|
|
737
|
+
$after: String
|
|
738
|
+
) {
|
|
739
|
+
subListInvoices(
|
|
740
|
+
status: $status
|
|
741
|
+
relationshipId: $relationshipId
|
|
742
|
+
first: $first
|
|
743
|
+
after: $after
|
|
744
|
+
) {
|
|
745
|
+
items { ${y} }
|
|
746
|
+
pageInfo { ${f} }
|
|
747
|
+
}
|
|
748
|
+
}`, {
|
|
749
|
+
status: t.status,
|
|
750
|
+
relationshipId: t.relationshipId,
|
|
751
|
+
first: a,
|
|
752
|
+
after: e
|
|
753
|
+
}, r)).subListInvoices,
|
|
754
|
+
getNextPageParam: (e) => m(e.pageInfo)
|
|
755
|
+
});
|
|
756
|
+
}, he = () => {
|
|
757
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
758
|
+
return a({
|
|
759
|
+
mutationFn: async (e) => (await u(`mutation SubMarkInvoicePaid($id: ID!) {
|
|
760
|
+
subMarkInvoicePaid(id: $id) { ${y} }
|
|
538
761
|
}`, { id: e }, n)).subMarkInvoicePaid,
|
|
539
762
|
onSuccess: () => {
|
|
540
|
-
t.invalidateQueries({ queryKey:
|
|
763
|
+
t.invalidateQueries({ queryKey: d.invoices }), t.invalidateQueries({ queryKey: d.providerInsights });
|
|
541
764
|
}
|
|
542
765
|
});
|
|
543
|
-
},
|
|
544
|
-
let t =
|
|
545
|
-
return
|
|
546
|
-
mutationFn: async (e) => (await
|
|
547
|
-
subCreateInvoice(input: $input) { ${
|
|
766
|
+
}, ge = () => {
|
|
767
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
768
|
+
return a({
|
|
769
|
+
mutationFn: async (e) => (await u(`mutation SubCreateInvoice($input: SubCreateInvoiceInput!) {
|
|
770
|
+
subCreateInvoice(input: $input) { ${y} }
|
|
548
771
|
}`, { input: e }, n)).subCreateInvoice,
|
|
549
772
|
onSuccess: () => {
|
|
550
|
-
t.invalidateQueries({ queryKey:
|
|
773
|
+
t.invalidateQueries({ queryKey: d.invoices }), t.invalidateQueries({ queryKey: d.providerInsights });
|
|
551
774
|
}
|
|
552
775
|
});
|
|
553
|
-
},
|
|
776
|
+
}, _e = (t) => {
|
|
554
777
|
let { apiGatewayUrl: n } = e();
|
|
555
|
-
return
|
|
556
|
-
queryKey: [...
|
|
557
|
-
queryFn: async () => (await
|
|
778
|
+
return o({
|
|
779
|
+
queryKey: [...d.paymentInstruments, t],
|
|
780
|
+
queryFn: async () => (await u("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
|
|
558
781
|
});
|
|
559
|
-
},
|
|
560
|
-
let t =
|
|
561
|
-
return
|
|
562
|
-
mutationFn: async (e) => (await
|
|
782
|
+
}, ve = () => {
|
|
783
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
784
|
+
return a({
|
|
785
|
+
mutationFn: async (e) => (await u(`mutation SubCreatePaymentInstrument($input: SubCreatePaymentInstrumentInput!) {
|
|
563
786
|
subCreatePaymentInstrument(input: $input) { ${te} }
|
|
564
787
|
}`, { input: e }, n)).subCreatePaymentInstrument,
|
|
565
788
|
onSuccess: () => {
|
|
566
|
-
t.invalidateQueries({ queryKey:
|
|
789
|
+
t.invalidateQueries({ queryKey: d.paymentInstruments });
|
|
567
790
|
}
|
|
568
791
|
});
|
|
569
|
-
},
|
|
570
|
-
let t =
|
|
571
|
-
return
|
|
572
|
-
mutationFn: async (e) => (await
|
|
792
|
+
}, ye = () => {
|
|
793
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
794
|
+
return a({
|
|
795
|
+
mutationFn: async (e) => (await u("mutation SubRemovePaymentInstrument($id: ID!) {\n subRemovePaymentInstrument(id: $id)\n }", { id: e }, n)).subRemovePaymentInstrument,
|
|
573
796
|
onSuccess: () => {
|
|
574
|
-
t.invalidateQueries({ queryKey:
|
|
797
|
+
t.invalidateQueries({ queryKey: d.paymentInstruments });
|
|
575
798
|
}
|
|
576
799
|
});
|
|
577
|
-
},
|
|
800
|
+
}, be = (t) => {
|
|
578
801
|
let { apiGatewayUrl: n } = e();
|
|
579
|
-
return
|
|
580
|
-
queryKey: [...
|
|
581
|
-
queryFn: async () => (await
|
|
802
|
+
return o({
|
|
803
|
+
queryKey: [...d.channels, t],
|
|
804
|
+
queryFn: async () => (await u("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
|
|
582
805
|
});
|
|
583
|
-
},
|
|
584
|
-
let t =
|
|
585
|
-
return
|
|
586
|
-
mutationFn: async (e) => (await
|
|
587
|
-
subCreateChannel(input: $input) { ${
|
|
806
|
+
}, xe = () => {
|
|
807
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
808
|
+
return a({
|
|
809
|
+
mutationFn: async (e) => (await u(`mutation SubCreateChannel($input: SubCreateChannelInput!) {
|
|
810
|
+
subCreateChannel(input: $input) { ${T} }
|
|
588
811
|
}`, { input: e }, n)).subCreateChannel,
|
|
589
812
|
onSuccess: () => {
|
|
590
|
-
t.invalidateQueries({ queryKey:
|
|
813
|
+
t.invalidateQueries({ queryKey: d.channels });
|
|
591
814
|
}
|
|
592
815
|
});
|
|
593
|
-
},
|
|
594
|
-
let t =
|
|
595
|
-
return
|
|
596
|
-
mutationFn: async (e) => (await
|
|
597
|
-
subVerifyChannel(id: $id) { ${
|
|
816
|
+
}, Se = () => {
|
|
817
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
818
|
+
return a({
|
|
819
|
+
mutationFn: async (e) => (await u(`mutation SubVerifyChannel($id: ID!) {
|
|
820
|
+
subVerifyChannel(id: $id) { ${T} }
|
|
598
821
|
}`, { id: e }, n)).subVerifyChannel,
|
|
599
822
|
onSuccess: () => {
|
|
600
|
-
t.invalidateQueries({ queryKey:
|
|
823
|
+
t.invalidateQueries({ queryKey: d.channels });
|
|
601
824
|
}
|
|
602
825
|
});
|
|
603
|
-
},
|
|
826
|
+
}, Ce = (t = {}) => {
|
|
604
827
|
let { apiGatewayUrl: n } = e();
|
|
605
|
-
return
|
|
606
|
-
queryKey: [...
|
|
607
|
-
queryFn: async () => (await
|
|
828
|
+
return o({
|
|
829
|
+
queryKey: [...d.agents, t],
|
|
830
|
+
queryFn: async () => (await u(`query SubAgents($kind: SubAgentKind, $status: SubAgentStatus, $ownerId: ID) {
|
|
608
831
|
subListAgents(kind: $kind, status: $status, ownerId: $ownerId) {
|
|
609
|
-
items { ${
|
|
832
|
+
items { ${b} }
|
|
610
833
|
pageInfo { cursor hasMore }
|
|
611
834
|
}
|
|
612
835
|
}`, {
|
|
@@ -615,206 +838,206 @@ var l = async (e, t, n) => {
|
|
|
615
838
|
ownerId: t.ownerId
|
|
616
839
|
}, n)).subListAgents.items
|
|
617
840
|
});
|
|
618
|
-
},
|
|
841
|
+
}, we = (t) => {
|
|
619
842
|
let { apiGatewayUrl: n } = e();
|
|
620
|
-
return
|
|
621
|
-
queryKey:
|
|
843
|
+
return o({
|
|
844
|
+
queryKey: d.agent(t ?? ""),
|
|
622
845
|
enabled: !!t,
|
|
623
|
-
queryFn: async () => (await
|
|
846
|
+
queryFn: async () => (await u(`query SubAgent($id: ID!) {
|
|
624
847
|
subAgent(id: $id) {
|
|
625
|
-
${
|
|
626
|
-
policies { ${
|
|
848
|
+
${b}
|
|
849
|
+
policies { ${E} }
|
|
627
850
|
}
|
|
628
851
|
}`, { id: t }, n)).subAgent
|
|
629
852
|
});
|
|
630
|
-
},
|
|
631
|
-
let t =
|
|
632
|
-
return
|
|
633
|
-
mutationFn: async (e) => (await
|
|
634
|
-
subCreateAgent(input: $input) { ${
|
|
853
|
+
}, Te = () => {
|
|
854
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
855
|
+
return a({
|
|
856
|
+
mutationFn: async (e) => (await u(`mutation SubCreateAgent($input: SubCreateAgentInput!) {
|
|
857
|
+
subCreateAgent(input: $input) { ${b} }
|
|
635
858
|
}`, { input: e }, n)).subCreateAgent,
|
|
636
859
|
onSuccess: () => {
|
|
637
|
-
t.invalidateQueries({ queryKey:
|
|
860
|
+
t.invalidateQueries({ queryKey: d.agents });
|
|
638
861
|
}
|
|
639
862
|
});
|
|
640
|
-
},
|
|
641
|
-
let t =
|
|
642
|
-
return
|
|
643
|
-
mutationFn: async ({ id: e, status: t }) => (await
|
|
644
|
-
subSetAgentStatus(id: $id, status: $status) { ${
|
|
863
|
+
}, Ee = () => {
|
|
864
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
865
|
+
return a({
|
|
866
|
+
mutationFn: async ({ id: e, status: t }) => (await u(`mutation SubSetAgentStatus($id: ID!, $status: SubAgentStatus!) {
|
|
867
|
+
subSetAgentStatus(id: $id, status: $status) { ${b} }
|
|
645
868
|
}`, {
|
|
646
869
|
id: e,
|
|
647
870
|
status: t
|
|
648
871
|
}, n)).subSetAgentStatus,
|
|
649
872
|
onSuccess: (e) => {
|
|
650
|
-
t.invalidateQueries({ queryKey:
|
|
873
|
+
t.invalidateQueries({ queryKey: d.agents }), t.invalidateQueries({ queryKey: d.agent(e.id) });
|
|
651
874
|
}
|
|
652
875
|
});
|
|
653
|
-
},
|
|
654
|
-
let t =
|
|
655
|
-
return
|
|
656
|
-
mutationFn: async (e) => (await
|
|
657
|
-
subCreatePolicy(input: $input) { ${
|
|
876
|
+
}, De = () => {
|
|
877
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
878
|
+
return a({
|
|
879
|
+
mutationFn: async (e) => (await u(`mutation SubCreatePolicy($input: SubCreatePolicyInput!) {
|
|
880
|
+
subCreatePolicy(input: $input) { ${E} }
|
|
658
881
|
}`, { input: e }, n)).subCreatePolicy,
|
|
659
882
|
onSuccess: (e) => {
|
|
660
|
-
t.invalidateQueries({ queryKey:
|
|
883
|
+
t.invalidateQueries({ queryKey: d.agents }), t.invalidateQueries({ queryKey: d.agent(e.agentId) });
|
|
661
884
|
}
|
|
662
885
|
});
|
|
663
|
-
},
|
|
886
|
+
}, Oe = 100, ke = (t = {}, n = {}) => {
|
|
664
887
|
let { apiGatewayUrl: r } = e();
|
|
665
|
-
return
|
|
666
|
-
queryKey: [...
|
|
888
|
+
return o({
|
|
889
|
+
queryKey: [...d.decisions, t],
|
|
667
890
|
enabled: n.enabled ?? !0,
|
|
668
891
|
retry: 1,
|
|
669
|
-
queryFn: async () => (await
|
|
892
|
+
queryFn: async () => (await u(`query SubDecisions($filter: SubDecisionFilter, $pagination: PaginationInput) {
|
|
670
893
|
subListDecisions(filter: $filter, pagination: $pagination) {
|
|
671
|
-
items { ${
|
|
894
|
+
items { ${x} }
|
|
672
895
|
pageInfo { cursor hasMore }
|
|
673
896
|
}
|
|
674
897
|
}`, {
|
|
675
898
|
filter: t,
|
|
676
|
-
pagination: { limit:
|
|
899
|
+
pagination: { limit: Oe }
|
|
677
900
|
}, r)).subListDecisions
|
|
678
901
|
});
|
|
679
|
-
},
|
|
902
|
+
}, Ae = (t) => {
|
|
680
903
|
let { apiGatewayUrl: n } = e();
|
|
681
|
-
return
|
|
682
|
-
queryKey:
|
|
904
|
+
return o({
|
|
905
|
+
queryKey: d.decision(t ?? ""),
|
|
683
906
|
enabled: !!t,
|
|
684
907
|
retry: 1,
|
|
685
|
-
queryFn: async () => (await
|
|
686
|
-
subDecision(id: $id) { ${
|
|
908
|
+
queryFn: async () => (await u(`query SubDecision($id: ID!) {
|
|
909
|
+
subDecision(id: $id) { ${x} }
|
|
687
910
|
}`, { id: t }, n)).subDecision
|
|
688
911
|
});
|
|
689
|
-
},
|
|
690
|
-
e.invalidateQueries({ queryKey:
|
|
691
|
-
},
|
|
692
|
-
let t =
|
|
693
|
-
return
|
|
694
|
-
mutationFn: async (e) => (await
|
|
912
|
+
}, X = (e, t) => {
|
|
913
|
+
e.invalidateQueries({ queryKey: d.decisions }), e.invalidateQueries({ queryKey: d.renewals }), t.decisionId && e.invalidateQueries({ queryKey: d.decision(t.decisionId) }), t.agentId && (e.invalidateQueries({ queryKey: d.agent(t.agentId) }), e.invalidateQueries({ queryKey: d.agents })), t.relationshipId && (e.invalidateQueries({ queryKey: d.relationship(t.relationshipId) }), e.invalidateQueries({ queryKey: d.relationships }), e.invalidateQueries({ queryKey: d.providerInsights }));
|
|
914
|
+
}, je = () => {
|
|
915
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
916
|
+
return a({
|
|
917
|
+
mutationFn: async (e) => (await u("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 }", {
|
|
695
918
|
id: e,
|
|
696
919
|
dryRun: !0
|
|
697
920
|
}, n)).subRunAgent,
|
|
698
|
-
onSuccess: (e) =>
|
|
921
|
+
onSuccess: (e) => X(t, { agentId: e.agentId })
|
|
699
922
|
});
|
|
700
|
-
},
|
|
701
|
-
let t =
|
|
702
|
-
return
|
|
703
|
-
mutationFn: async (e) => (await
|
|
923
|
+
}, Me = () => {
|
|
924
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
925
|
+
return a({
|
|
926
|
+
mutationFn: async (e) => (await u(`mutation SubApplyDecision($id: ID!) {
|
|
704
927
|
subApplyDecision(id: $id) {
|
|
705
|
-
decision { ${
|
|
928
|
+
decision { ${x} }
|
|
706
929
|
relationship { id label status }
|
|
707
930
|
}
|
|
708
931
|
}`, { id: e }, n)).subApplyDecision,
|
|
709
|
-
onSuccess: (e) =>
|
|
932
|
+
onSuccess: (e) => X(t, {
|
|
710
933
|
decisionId: e.decision.id,
|
|
711
934
|
agentId: e.decision.agentId,
|
|
712
935
|
relationshipId: e.decision.relationshipId
|
|
713
936
|
}),
|
|
714
|
-
onError: () => void t.invalidateQueries({ queryKey:
|
|
937
|
+
onError: () => void t.invalidateQueries({ queryKey: d.decisions })
|
|
715
938
|
});
|
|
716
|
-
},
|
|
717
|
-
let t =
|
|
718
|
-
return
|
|
719
|
-
mutationFn: async ({ id: e, reason: t }) => (await
|
|
720
|
-
subDismissDecision(id: $id, reason: $reason) { ${
|
|
939
|
+
}, Ne = () => {
|
|
940
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
941
|
+
return a({
|
|
942
|
+
mutationFn: async ({ id: e, reason: t }) => (await u(`mutation SubDismissDecision($id: ID!, $reason: String) {
|
|
943
|
+
subDismissDecision(id: $id, reason: $reason) { ${x} }
|
|
721
944
|
}`, {
|
|
722
945
|
id: e,
|
|
723
946
|
reason: t?.trim() ? t.trim() : void 0
|
|
724
947
|
}, n)).subDismissDecision,
|
|
725
|
-
onSuccess: (e) =>
|
|
948
|
+
onSuccess: (e) => X(t, {
|
|
726
949
|
decisionId: e.id,
|
|
727
950
|
agentId: e.agentId
|
|
728
951
|
})
|
|
729
952
|
});
|
|
730
|
-
},
|
|
953
|
+
}, Pe = "\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", Fe = () => {
|
|
731
954
|
let { apiGatewayUrl: t } = e();
|
|
732
|
-
return
|
|
733
|
-
queryKey:
|
|
955
|
+
return o({
|
|
956
|
+
queryKey: d.savings,
|
|
734
957
|
retry: 1,
|
|
735
|
-
queryFn: async () => (await
|
|
958
|
+
queryFn: async () => (await u(`query SubSavingsOverview { subSavingsOverview { ${Pe} } }`, {}, t)).subSavingsOverview
|
|
736
959
|
});
|
|
737
|
-
},
|
|
738
|
-
let t =
|
|
739
|
-
return
|
|
740
|
-
mutationFn: async (e) => (await
|
|
960
|
+
}, Ie = () => {
|
|
961
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
962
|
+
return a({
|
|
963
|
+
mutationFn: async (e) => (await u("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,
|
|
741
964
|
onSettled: (e, n, r) => {
|
|
742
|
-
t.invalidateQueries({ queryKey:
|
|
743
|
-
for (let e of [r.keepRelationshipId, ...r.cancelRelationshipIds]) t.invalidateQueries({ queryKey:
|
|
965
|
+
t.invalidateQueries({ queryKey: d.decisions }), t.invalidateQueries({ queryKey: d.relationships }), t.invalidateQueries({ queryKey: d.providerInsights }), t.invalidateQueries({ queryKey: d.renewals });
|
|
966
|
+
for (let e of [r.keepRelationshipId, ...r.cancelRelationshipIds]) t.invalidateQueries({ queryKey: d.relationship(e) });
|
|
744
967
|
}
|
|
745
968
|
});
|
|
746
|
-
},
|
|
747
|
-
let t =
|
|
748
|
-
return
|
|
749
|
-
mutationFn: async ({ id: e, reason: t }) => (await
|
|
969
|
+
}, Le = () => {
|
|
970
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
971
|
+
return a({
|
|
972
|
+
mutationFn: async ({ id: e, reason: t }) => (await u("mutation SubDismissBundle($id: ID!, $reason: String) {\n subDismissBundle(id: $id, reason: $reason)\n }", {
|
|
750
973
|
id: e,
|
|
751
974
|
reason: t?.trim() ? t.trim() : void 0
|
|
752
975
|
}, n)).subDismissBundle,
|
|
753
|
-
onSuccess: () => void t.invalidateQueries({ queryKey:
|
|
976
|
+
onSuccess: () => void t.invalidateQueries({ queryKey: d.savings })
|
|
754
977
|
});
|
|
755
|
-
},
|
|
978
|
+
}, Re = (t) => {
|
|
756
979
|
let { apiGatewayUrl: n } = e();
|
|
757
|
-
return
|
|
758
|
-
queryKey: [...
|
|
759
|
-
queryFn: async () => (await
|
|
760
|
-
subListWorkflows(status: $status) { items { ${
|
|
980
|
+
return o({
|
|
981
|
+
queryKey: [...d.workflows, t],
|
|
982
|
+
queryFn: async () => (await u(`query SubWorkflows($status: SubWorkflowStatus) {
|
|
983
|
+
subListWorkflows(status: $status) { items { ${S} } pageInfo { cursor hasMore } }
|
|
761
984
|
}`, { status: t }, n)).subListWorkflows.items
|
|
762
985
|
});
|
|
763
|
-
},
|
|
764
|
-
let t =
|
|
765
|
-
return
|
|
766
|
-
mutationFn: async (e) => (await
|
|
767
|
-
subCreateWorkflow(input: $input) { ${
|
|
986
|
+
}, ze = () => {
|
|
987
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
988
|
+
return a({
|
|
989
|
+
mutationFn: async (e) => (await u(`mutation SubCreateWorkflow($input: SubCreateWorkflowInput!) {
|
|
990
|
+
subCreateWorkflow(input: $input) { ${S} }
|
|
768
991
|
}`, { input: e }, n)).subCreateWorkflow,
|
|
769
992
|
onSuccess: () => {
|
|
770
|
-
t.invalidateQueries({ queryKey:
|
|
993
|
+
t.invalidateQueries({ queryKey: d.workflows });
|
|
771
994
|
}
|
|
772
995
|
});
|
|
773
|
-
},
|
|
774
|
-
let t =
|
|
775
|
-
return
|
|
776
|
-
mutationFn: async (e) => (await
|
|
777
|
-
subActivateWorkflow(id: $id) { ${
|
|
996
|
+
}, Be = () => {
|
|
997
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
998
|
+
return a({
|
|
999
|
+
mutationFn: async (e) => (await u(`mutation SubActivateWorkflow($id: ID!) {
|
|
1000
|
+
subActivateWorkflow(id: $id) { ${S} }
|
|
778
1001
|
}`, { id: e }, n)).subActivateWorkflow,
|
|
779
1002
|
onSuccess: () => {
|
|
780
|
-
t.invalidateQueries({ queryKey:
|
|
1003
|
+
t.invalidateQueries({ queryKey: d.workflows });
|
|
781
1004
|
}
|
|
782
1005
|
});
|
|
783
|
-
},
|
|
1006
|
+
}, Ve = (t) => {
|
|
784
1007
|
let { apiGatewayUrl: n } = e();
|
|
785
|
-
return
|
|
786
|
-
queryKey:
|
|
1008
|
+
return o({
|
|
1009
|
+
queryKey: d.workflow(t ?? ""),
|
|
787
1010
|
enabled: !!t,
|
|
788
|
-
queryFn: async () => (await
|
|
789
|
-
subWorkflow(id: $id) { ${
|
|
1011
|
+
queryFn: async () => (await u(`query SubWorkflow($id: ID!) {
|
|
1012
|
+
subWorkflow(id: $id) { ${S} graph { ${C} } }
|
|
790
1013
|
}`, { id: t }, n)).subWorkflow
|
|
791
1014
|
});
|
|
792
|
-
},
|
|
793
|
-
let t =
|
|
794
|
-
return
|
|
795
|
-
mutationFn: async ({ workflowId: e, input: t }) => (await
|
|
796
|
-
subSaveWorkflowGraph(workflowId: $workflowId, input: $input) { ${
|
|
1015
|
+
}, He = () => {
|
|
1016
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
1017
|
+
return a({
|
|
1018
|
+
mutationFn: async ({ workflowId: e, input: t }) => (await u(`mutation SubSaveWorkflowGraph($workflowId: ID!, $input: SubSaveWorkflowGraphInput!) {
|
|
1019
|
+
subSaveWorkflowGraph(workflowId: $workflowId, input: $input) { ${C} }
|
|
797
1020
|
}`, {
|
|
798
1021
|
workflowId: e,
|
|
799
1022
|
input: t
|
|
800
1023
|
}, n)).subSaveWorkflowGraph,
|
|
801
|
-
onSuccess: () => void t.invalidateQueries({ queryKey:
|
|
1024
|
+
onSuccess: () => void t.invalidateQueries({ queryKey: d.workflows })
|
|
802
1025
|
});
|
|
803
|
-
},
|
|
804
|
-
let t =
|
|
805
|
-
return
|
|
806
|
-
mutationFn: async (e) => (await
|
|
807
|
-
subPauseWorkflow(id: $id) { ${
|
|
1026
|
+
}, Ue = () => {
|
|
1027
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
1028
|
+
return a({
|
|
1029
|
+
mutationFn: async (e) => (await u(`mutation SubPauseWorkflow($id: ID!) {
|
|
1030
|
+
subPauseWorkflow(id: $id) { ${S} }
|
|
808
1031
|
}`, { id: e }, n)).subPauseWorkflow,
|
|
809
|
-
onSuccess: () => void t.invalidateQueries({ queryKey:
|
|
1032
|
+
onSuccess: () => void t.invalidateQueries({ queryKey: d.workflows })
|
|
810
1033
|
});
|
|
811
|
-
},
|
|
1034
|
+
}, We = (t = {}) => {
|
|
812
1035
|
let { apiGatewayUrl: n } = e();
|
|
813
|
-
return
|
|
814
|
-
queryKey: [...
|
|
815
|
-
queryFn: async () => (await
|
|
1036
|
+
return o({
|
|
1037
|
+
queryKey: [...d.adapterSubmissions, t],
|
|
1038
|
+
queryFn: async () => (await u(`query SubAdapterSubmissions($status: SubSubmissionStatus, $pagination: PaginationInput) {
|
|
816
1039
|
subListAdapterSubmissions(status: $status, pagination: $pagination) {
|
|
817
|
-
items { ${
|
|
1040
|
+
items { ${O} }
|
|
818
1041
|
pageInfo { cursor hasMore }
|
|
819
1042
|
}
|
|
820
1043
|
}`, {
|
|
@@ -825,39 +1048,39 @@ var l = async (e, t, n) => {
|
|
|
825
1048
|
}
|
|
826
1049
|
}, n)).subListAdapterSubmissions
|
|
827
1050
|
});
|
|
828
|
-
},
|
|
829
|
-
let t =
|
|
830
|
-
return
|
|
831
|
-
mutationFn: async ({ id: e, notes: t }) => (await
|
|
832
|
-
subApproveAdapter(id: $id, notes: $notes) { ${
|
|
1051
|
+
}, Ge = () => {
|
|
1052
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
1053
|
+
return a({
|
|
1054
|
+
mutationFn: async ({ id: e, notes: t }) => (await u(`mutation SubApproveAdapter($id: ID!, $notes: String) {
|
|
1055
|
+
subApproveAdapter(id: $id, notes: $notes) { ${O} }
|
|
833
1056
|
}`, {
|
|
834
1057
|
id: e,
|
|
835
1058
|
notes: t
|
|
836
1059
|
}, n)).subApproveAdapter,
|
|
837
1060
|
onSuccess: () => {
|
|
838
|
-
t.invalidateQueries({ queryKey:
|
|
1061
|
+
t.invalidateQueries({ queryKey: d.adapterSubmissions });
|
|
839
1062
|
}
|
|
840
1063
|
});
|
|
841
|
-
},
|
|
842
|
-
let t =
|
|
843
|
-
return
|
|
844
|
-
mutationFn: async ({ id: e, reason: t }) => (await
|
|
845
|
-
subRejectAdapter(id: $id, reason: $reason) { ${
|
|
1064
|
+
}, Ke = () => {
|
|
1065
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
1066
|
+
return a({
|
|
1067
|
+
mutationFn: async ({ id: e, reason: t }) => (await u(`mutation SubRejectAdapter($id: ID!, $reason: String!) {
|
|
1068
|
+
subRejectAdapter(id: $id, reason: $reason) { ${O} }
|
|
846
1069
|
}`, {
|
|
847
1070
|
id: e,
|
|
848
1071
|
reason: t
|
|
849
1072
|
}, n)).subRejectAdapter,
|
|
850
1073
|
onSuccess: () => {
|
|
851
|
-
t.invalidateQueries({ queryKey:
|
|
1074
|
+
t.invalidateQueries({ queryKey: d.adapterSubmissions });
|
|
852
1075
|
}
|
|
853
1076
|
});
|
|
854
|
-
},
|
|
1077
|
+
}, qe = (t = {}) => {
|
|
855
1078
|
let { apiGatewayUrl: n } = e();
|
|
856
|
-
return
|
|
857
|
-
queryKey: [...
|
|
858
|
-
queryFn: async () => (await
|
|
1079
|
+
return o({
|
|
1080
|
+
queryKey: [...d.marketplaceReports, t],
|
|
1081
|
+
queryFn: async () => (await u(`query SubMarketplaceReports($status: SubReportStatus, $pagination: PaginationInput) {
|
|
859
1082
|
subListMarketplaceReports(status: $status, pagination: $pagination) {
|
|
860
|
-
items { ${
|
|
1083
|
+
items { ${k} }
|
|
861
1084
|
pageInfo { cursor hasMore }
|
|
862
1085
|
}
|
|
863
1086
|
}`, {
|
|
@@ -868,28 +1091,28 @@ var l = async (e, t, n) => {
|
|
|
868
1091
|
}
|
|
869
1092
|
}, n)).subListMarketplaceReports
|
|
870
1093
|
});
|
|
871
|
-
},
|
|
872
|
-
let t =
|
|
873
|
-
return
|
|
874
|
-
mutationFn: async ({ id: e, action: t, reason: r }) => (await
|
|
875
|
-
subModerateListing(id: $id, action: $action, reason: $reason) { ${
|
|
1094
|
+
}, Je = () => {
|
|
1095
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
1096
|
+
return a({
|
|
1097
|
+
mutationFn: async ({ id: e, action: t, reason: r }) => (await u(`mutation SubModerateListing($id: ID!, $action: SubModerationAction!, $reason: String!) {
|
|
1098
|
+
subModerateListing(id: $id, action: $action, reason: $reason) { ${k} }
|
|
876
1099
|
}`, {
|
|
877
1100
|
id: e,
|
|
878
1101
|
action: t,
|
|
879
1102
|
reason: r
|
|
880
1103
|
}, n)).subModerateListing,
|
|
881
1104
|
onSuccess: () => {
|
|
882
|
-
t.invalidateQueries({ queryKey:
|
|
1105
|
+
t.invalidateQueries({ queryKey: d.marketplaceReports });
|
|
883
1106
|
}
|
|
884
1107
|
});
|
|
885
|
-
},
|
|
1108
|
+
}, Z = "monthlyBudget monthlySpend variance utilizationPct overBudget", Ye = `
|
|
886
1109
|
currency generatedAt monthlySpend annualSpend activeRelationshipCount
|
|
887
1110
|
previousMonthlySpend monthlySpendChangePct
|
|
888
1111
|
trend { at monthlySpend }
|
|
889
|
-
budget { ${
|
|
1112
|
+
budget { ${Z} }
|
|
890
1113
|
departments {
|
|
891
1114
|
department monthlySpend annualSpend relationshipCount sharePct
|
|
892
|
-
budget { ${
|
|
1115
|
+
budget { ${Z} }
|
|
893
1116
|
}
|
|
894
1117
|
shadowIt {
|
|
895
1118
|
relationshipId label providerId providerName department discoverySource
|
|
@@ -915,33 +1138,33 @@ var l = async (e, t, n) => {
|
|
|
915
1138
|
utilizationPct monthlySpend annualCost renewsAt
|
|
916
1139
|
}
|
|
917
1140
|
truncated
|
|
918
|
-
`,
|
|
1141
|
+
`, Q = (t) => {
|
|
919
1142
|
let { apiGatewayUrl: n } = e();
|
|
920
|
-
return
|
|
921
|
-
queryKey: [...
|
|
922
|
-
queryFn: async () => (await
|
|
923
|
-
subEnterpriseSpendDashboard(currency: $currency) { ${
|
|
1143
|
+
return o({
|
|
1144
|
+
queryKey: [...d.enterpriseSpend, t ?? null],
|
|
1145
|
+
queryFn: async () => (await u(`query SubEnterpriseSpendDashboard($currency: String) {
|
|
1146
|
+
subEnterpriseSpendDashboard(currency: $currency) { ${Ye} }
|
|
924
1147
|
}`, { currency: t || null }, n)).subEnterpriseSpendDashboard
|
|
925
1148
|
});
|
|
926
|
-
},
|
|
1149
|
+
}, Xe = () => {
|
|
927
1150
|
let { apiGatewayUrl: t } = e();
|
|
928
|
-
return
|
|
929
|
-
queryKey:
|
|
930
|
-
queryFn: async () => (await
|
|
1151
|
+
return o({
|
|
1152
|
+
queryKey: d.spendBudgets,
|
|
1153
|
+
queryFn: async () => (await u("query SubListSpendBudgets {\n subListSpendBudgets { id department currency monthlyAmount updatedAt }\n }", {}, t)).subListSpendBudgets
|
|
931
1154
|
});
|
|
932
|
-
},
|
|
933
|
-
let t =
|
|
934
|
-
return
|
|
935
|
-
mutationFn: async (e) => (await
|
|
1155
|
+
}, Ze = () => {
|
|
1156
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
1157
|
+
return a({
|
|
1158
|
+
mutationFn: async (e) => (await u("mutation SubSetSpendBudget($input: SubSetSpendBudgetInput!) {\n subSetSpendBudget(input: $input) { id department currency monthlyAmount updatedAt }\n }", { input: e }, n)).subSetSpendBudget,
|
|
936
1159
|
onSuccess: () => {
|
|
937
|
-
t.invalidateQueries({ queryKey:
|
|
1160
|
+
t.invalidateQueries({ queryKey: d.spendBudgets }), t.invalidateQueries({ queryKey: d.enterpriseSpend });
|
|
938
1161
|
}
|
|
939
1162
|
});
|
|
940
|
-
},
|
|
1163
|
+
}, Qe = "\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", $e = (t = {}) => {
|
|
941
1164
|
let { apiGatewayUrl: n } = e();
|
|
942
|
-
return
|
|
943
|
-
queryKey: [...
|
|
944
|
-
queryFn: async () => (await
|
|
1165
|
+
return o({
|
|
1166
|
+
queryKey: [...d.renewalForecast, t],
|
|
1167
|
+
queryFn: async () => (await u(`query SubRenewalForecast(
|
|
945
1168
|
$from: DateTime
|
|
946
1169
|
$to: DateTime
|
|
947
1170
|
$statuses: [SubRelationshipStatus!]
|
|
@@ -954,7 +1177,7 @@ var l = async (e, t, n) => {
|
|
|
954
1177
|
statuses: $statuses
|
|
955
1178
|
trialWindowDays: $trialWindowDays
|
|
956
1179
|
currency: $currency
|
|
957
|
-
) { ${
|
|
1180
|
+
) { ${Qe} }
|
|
958
1181
|
}`, {
|
|
959
1182
|
from: t.from ?? null,
|
|
960
1183
|
to: t.to ?? null,
|
|
@@ -963,27 +1186,95 @@ var l = async (e, t, n) => {
|
|
|
963
1186
|
currency: t.currency || null
|
|
964
1187
|
}, n)).subRenewalForecast
|
|
965
1188
|
});
|
|
966
|
-
},
|
|
967
|
-
let t =
|
|
968
|
-
return
|
|
969
|
-
mutationFn: async (e) => (await
|
|
1189
|
+
}, et = () => {
|
|
1190
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
1191
|
+
return a({
|
|
1192
|
+
mutationFn: async (e) => (await u("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 }", {
|
|
970
1193
|
relationshipId: e.relationshipId,
|
|
971
1194
|
remindAt: e.remindAt || null,
|
|
972
1195
|
note: e.note || null
|
|
973
1196
|
}, n)).subSetRenewalReminder,
|
|
974
1197
|
onSuccess: () => {
|
|
975
|
-
t.invalidateQueries({ queryKey:
|
|
1198
|
+
t.invalidateQueries({ queryKey: d.renewals });
|
|
976
1199
|
}
|
|
977
1200
|
});
|
|
978
|
-
},
|
|
979
|
-
let t =
|
|
980
|
-
return
|
|
981
|
-
mutationFn: async (e) => (await
|
|
1201
|
+
}, tt = () => {
|
|
1202
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
1203
|
+
return a({
|
|
1204
|
+
mutationFn: async (e) => (await u("mutation SubCancelRenewalReminder($id: ID!) {\n subCancelRenewalReminder(id: $id)\n }", { id: e }, n)).subCancelRenewalReminder,
|
|
1205
|
+
onSuccess: () => {
|
|
1206
|
+
t.invalidateQueries({ queryKey: d.renewals });
|
|
1207
|
+
}
|
|
1208
|
+
});
|
|
1209
|
+
}, $ = (e, t, n) => {
|
|
1210
|
+
e.invalidateQueries({ queryKey: d.entityTags(t, n) }), t === "SUBSCRIBERBOT_PROVIDER" ? (e.invalidateQueries({ queryKey: d.providers }), e.invalidateQueries({ queryKey: d.provider(n) })) : t === "SUBSCRIBERBOT_RELATIONSHIP" ? (e.invalidateQueries({ queryKey: d.relationships }), e.invalidateQueries({ queryKey: d.relationship(n) })) : t === "SUBSCRIBERBOT_ASSET" && e.invalidateQueries({ queryKey: d.assets });
|
|
1211
|
+
}, nt = (t, n, r = !0) => {
|
|
1212
|
+
let { apiGatewayUrl: i } = e();
|
|
1213
|
+
return o({
|
|
1214
|
+
queryKey: d.entityTags(t, n ?? ""),
|
|
1215
|
+
enabled: !!n && r,
|
|
1216
|
+
queryFn: async () => (await u(`query SubEntityTags($input: SubGetEntityTagsInput!) {
|
|
1217
|
+
subEntityTags(input: $input) { ${p} }
|
|
1218
|
+
}`, { input: {
|
|
1219
|
+
entityType: t,
|
|
1220
|
+
entityId: n
|
|
1221
|
+
} }, i)).subEntityTags
|
|
1222
|
+
});
|
|
1223
|
+
}, rt = (t = 50, n = !0) => {
|
|
1224
|
+
let { apiGatewayUrl: r } = e();
|
|
1225
|
+
return o({
|
|
1226
|
+
queryKey: [...d.availableTags, t],
|
|
1227
|
+
enabled: n,
|
|
1228
|
+
staleTime: 3e4,
|
|
1229
|
+
queryFn: async () => (await u("query SubAvailableTags($limit: Int) {\n subAvailableTags(limit: $limit) { id key label color vocabularyId }\n }", { limit: t }, r)).subAvailableTags
|
|
1230
|
+
});
|
|
1231
|
+
}, it = (t, n = 20, r = !0) => {
|
|
1232
|
+
let { apiGatewayUrl: i } = e(), a = t.trim();
|
|
1233
|
+
return o({
|
|
1234
|
+
queryKey: [...d.tagSearch(a), n],
|
|
1235
|
+
enabled: r && a.length > 0,
|
|
1236
|
+
queryFn: async () => (await u("query SubSearchTags($query: String!, $limit: Int) {\n subSearchTags(query: $query, limit: $limit) { id key label color vocabularyId }\n }", {
|
|
1237
|
+
query: a,
|
|
1238
|
+
limit: n
|
|
1239
|
+
}, i)).subSearchTags
|
|
1240
|
+
});
|
|
1241
|
+
}, at = () => {
|
|
1242
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
1243
|
+
return a({
|
|
1244
|
+
mutationFn: async (e) => (await u(`mutation SubTagEntity($input: SubTagEntityInput!) {
|
|
1245
|
+
subTagEntity(input: $input) { ${p} }
|
|
1246
|
+
}`, { input: e }, n)).subTagEntity,
|
|
1247
|
+
onSuccess: (e, n) => {
|
|
1248
|
+
$(t, n.entityType, n.entityId);
|
|
1249
|
+
}
|
|
1250
|
+
});
|
|
1251
|
+
}, ot = () => {
|
|
1252
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
1253
|
+
return a({
|
|
1254
|
+
mutationFn: async (e) => (await u("mutation SubUntagEntity($input: SubUntagEntityInput!) {\n subUntagEntity(input: $input)\n }", { input: e }, n)).subUntagEntity,
|
|
1255
|
+
onSuccess: (e, n) => {
|
|
1256
|
+
$(t, n.entityType, n.entityId);
|
|
1257
|
+
}
|
|
1258
|
+
});
|
|
1259
|
+
}, st = () => {
|
|
1260
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
1261
|
+
return a({
|
|
1262
|
+
mutationFn: async (e) => (await u(`mutation SubReplaceEntityTags($input: SubReplaceEntityTagsInput!) {
|
|
1263
|
+
subReplaceEntityTags(input: $input) { ${p} }
|
|
1264
|
+
}`, { input: e }, n)).subReplaceEntityTags,
|
|
1265
|
+
onSuccess: (e, n) => {
|
|
1266
|
+
$(t, n.entityType, n.entityId);
|
|
1267
|
+
}
|
|
1268
|
+
});
|
|
1269
|
+
}, ct = () => {
|
|
1270
|
+
let t = s(), { apiGatewayUrl: n } = e();
|
|
1271
|
+
return a({
|
|
1272
|
+
mutationFn: async (e) => (await u("mutation SubCreateTag($input: SubCreateTagInput!) {\n subCreateTag(input: $input) { id key label color vocabularyId }\n }", { input: e }, n)).subCreateTag,
|
|
982
1273
|
onSuccess: () => {
|
|
983
|
-
t.invalidateQueries({ queryKey:
|
|
1274
|
+
t.invalidateQueries({ queryKey: d.availableTags }), t.invalidateQueries({ queryKey: d.tags });
|
|
984
1275
|
}
|
|
985
1276
|
});
|
|
986
1277
|
};
|
|
987
|
-
export {
|
|
1278
|
+
export { u as subQuery, Be as useActivateWorkflow, We as useAdapterSubmissions, we as useAgent, Ce as useAgents, Me as useApplyDecision, Ge as useApproveAdapter, K as useArchiveProvider, rt as useAvailableTags, se as useBenchmarkDataPoints, M as useCancelRelationship, tt as useCancelRenewalReminder, be as useChannels, Ie as useConsolidateRelationships, Te as useCreateAgent, L as useCreateAsset, xe as useCreateChannel, F as useCreateEntitlement, ge as useCreateInvoice, ve as useCreatePaymentInstrument, J as useCreatePlan, De as useCreatePolicy, W as useCreateProvider, A as useCreateRelationship, ct as useCreateTag, ze as useCreateWorkflow, Ae as useDecision, ke as useDecisions, Le as useDismissBundle, Ne as useDismissDecision, Q as useEnterpriseSpendDashboard, nt as useEntityTags, B as useFileDownloadUrl, ce as useInboxMessages, I as useInfiniteAssets, le as useInfiniteInboxMessages, me as useInfiniteInvoices, H as useInfiniteProviders, re as useInfiniteRelationships, fe as useIngestMessage, pe as useInvoices, he as useMarkInvoicePaid, ue as useMarkMessageRead, de as useMarkMessageUnread, qe as useMarketplaceReports, Je as useModerateListing, Ue as usePauseWorkflow, _e as usePaymentInstruments, q as usePlans, U as useProvider, oe as useProviderAlternatives, ae as useProviderPriceHistory, V as useProviders, Ke as useRejectAdapter, ie as useRelationship, ne as useRelationships, ye as useRemovePaymentInstrument, P as useRenewalEvents, $e as useRenewalForecast, st as useReplaceEntityTags, je as useRunAgent, He as useSaveWorkflowGraph, Fe as useSavingsOverview, it as useSearchTags, Ee as useSetAgentStatus, et as useSetRenewalReminder, Ze as useSetSpendBudget, Xe as useSpendBudgets, at as useTagEntity, j as useTransitionRelationship, ot as useUntagEntity, G as useUpdateProvider, N as useUpdateRelationship, z as useUploadFile, Se as useVerifyChannel, Ve as useWorkflow, Re as useWorkflows };
|
|
988
1279
|
|
|
989
1280
|
//# sourceMappingURL=useSubscriberBotApi.js.map
|