@burdenoff/microfe-subscriberbot 2026.1102.2 → 2026.1102.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/stories/pages/InsightsPage.stories.d.ts +1 -0
- package/dist/stories/pages/InsightsPage.stories.d.ts.map +1 -1
- package/dist/stories/pages/RenewalsPage.stories.d.ts +18 -0
- package/dist/stories/pages/RenewalsPage.stories.d.ts.map +1 -0
- package/dist/stories/support/fixtures.d.ts +2 -1
- package/dist/stories/support/fixtures.d.ts.map +1 -1
- package/dist/stories/support/handlers.d.ts.map +1 -1
- package/dist/subscriberbot/SubscriberBotRoot.d.ts.map +1 -1
- package/dist/subscriberbot/SubscriberBotRoot.js +57 -49
- package/dist/subscriberbot/SubscriberBotRoot.js.map +1 -1
- package/dist/subscriberbot/SubscriberBotRoutes.d.ts.map +1 -1
- package/dist/subscriberbot/SubscriberBotRoutes.js +17 -13
- package/dist/subscriberbot/SubscriberBotRoutes.js.map +1 -1
- package/dist/subscriberbot/hooks/index.d.ts +1 -1
- package/dist/subscriberbot/hooks/index.d.ts.map +1 -1
- package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts +8 -1
- package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts.map +1 -1
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js +87 -36
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
- package/dist/subscriberbot/pages/InsightsPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/InsightsPage.js +12 -3
- package/dist/subscriberbot/pages/InsightsPage.js.map +1 -1
- package/dist/subscriberbot/pages/RenewalsPage.d.ts +4 -0
- package/dist/subscriberbot/pages/RenewalsPage.d.ts.map +1 -0
- package/dist/subscriberbot/pages/RenewalsPage.js +582 -0
- package/dist/subscriberbot/pages/RenewalsPage.js.map +1 -0
- package/dist/subscriberbot/types/index.d.ts +79 -0
- package/dist/subscriberbot/types/index.d.ts.map +1 -1
- package/dist/subscriberbot/utils/renewals.d.ts +19 -0
- package/dist/subscriberbot/utils/renewals.d.ts.map +1 -0
- package/dist/subscriberbot/utils/renewals.js +26 -0
- package/dist/subscriberbot/utils/renewals.js.map +1 -0
- package/package.json +1 -1
|
@@ -58,6 +58,11 @@ var c = async (e, t, n) => {
|
|
|
58
58
|
],
|
|
59
59
|
workflows: ["subscriberbot", "workflows"],
|
|
60
60
|
renewals: ["subscriberbot", "renewals"],
|
|
61
|
+
renewalForecast: [
|
|
62
|
+
"subscriberbot",
|
|
63
|
+
"renewals",
|
|
64
|
+
"forecast"
|
|
65
|
+
],
|
|
61
66
|
assets: ["subscriberbot", "assets"],
|
|
62
67
|
entitlements: ["subscriberbot", "entitlements"],
|
|
63
68
|
adapterSubmissions: [
|
|
@@ -80,7 +85,7 @@ var c = async (e, t, n) => {
|
|
|
80
85
|
"enterprise",
|
|
81
86
|
"budgets"
|
|
82
87
|
]
|
|
83
|
-
}, u = "\n id name slug category status description industry region language websiteUrl\n logoFileId tags churnRiskScore vendorHealthScore workspaceId createdAt updatedAt\n", d = "\n id name description providerId amount currency interval features isActive\n workspaceId createdAt updatedAt\n", f = "\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", p = "\n id subject preview category categoryConfidence channelId relationshipId\n externalId actionRequired isRead receivedAt workspaceId createdAt updatedAt\n", m = "\n id number relationshipId status currency subtotal taxAmount total issueDate\n dueDate paidAt paymentInstrumentId workspaceId createdAt updatedAt\n", h = "\n id name description kind status ownerId lastRunAt workspaceId createdAt updatedAt\n", g = "\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", _ = "\n id name description triggerEvent status runCount lastRunAt workspaceId\n createdAt updatedAt\n", ee = "\n id name description type relationshipId quota used unit isActive\n workspaceId createdAt updatedAt\n", v = "\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", y = "\n id label type status address ingestEnabled ownerId verifiedAt workspaceId\n createdAt updatedAt\n", b = "\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", x = "\n id workspaceId adapterId submitterWorkspaceId status notes createdAt updatedAt\n", S = "\n id workspaceId listingId reporterWorkspaceId reason status resolutionReason\n createdAt updatedAt\n",
|
|
88
|
+
}, u = "\n id name slug category status description industry region language websiteUrl\n logoFileId tags churnRiskScore vendorHealthScore workspaceId createdAt updatedAt\n", d = "\n id name description providerId amount currency interval features isActive\n workspaceId createdAt updatedAt\n", f = "\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", p = "\n id subject preview category categoryConfidence channelId relationshipId\n externalId actionRequired isRead receivedAt workspaceId createdAt updatedAt\n", m = "\n id number relationshipId status currency subtotal taxAmount total issueDate\n dueDate paidAt paymentInstrumentId workspaceId createdAt updatedAt\n", h = "\n id name description kind status ownerId lastRunAt workspaceId createdAt updatedAt\n", g = "\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", _ = "\n id name description triggerEvent status runCount lastRunAt workspaceId\n createdAt updatedAt\n", ee = "\n id name description type relationshipId quota used unit isActive\n workspaceId createdAt updatedAt\n", v = "\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", y = "\n id label type status address ingestEnabled ownerId verifiedAt workspaceId\n createdAt updatedAt\n", b = "\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", x = "\n id workspaceId adapterId submitterWorkspaceId status notes createdAt updatedAt\n", S = "\n id workspaceId listingId reporterWorkspaceId reason status resolutionReason\n createdAt updatedAt\n", re = (t = {}) => {
|
|
84
89
|
let { apiGatewayUrl: n } = e();
|
|
85
90
|
return i({
|
|
86
91
|
queryKey: [...l.relationships, t],
|
|
@@ -119,7 +124,7 @@ var c = async (e, t, n) => {
|
|
|
119
124
|
}
|
|
120
125
|
}, n)).subListRelationships
|
|
121
126
|
});
|
|
122
|
-
},
|
|
127
|
+
}, C = (t) => {
|
|
123
128
|
let { apiGatewayUrl: n } = e();
|
|
124
129
|
return i({
|
|
125
130
|
queryKey: l.relationship(t ?? ""),
|
|
@@ -144,17 +149,17 @@ var c = async (e, t, n) => {
|
|
|
144
149
|
}
|
|
145
150
|
}`, { id: t }, n)).subRelationship
|
|
146
151
|
});
|
|
147
|
-
},
|
|
152
|
+
}, w = () => {
|
|
148
153
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
149
154
|
return r({
|
|
150
155
|
mutationFn: async (e) => (await c(`mutation SubCreateRelationship($input: SubCreateRelationshipInput!) {
|
|
151
156
|
subCreateRelationship(input: $input) { ${f} }
|
|
152
157
|
}`, { input: e }, n)).subCreateRelationship,
|
|
153
158
|
onSuccess: () => {
|
|
154
|
-
t.invalidateQueries({ queryKey: l.relationships });
|
|
159
|
+
t.invalidateQueries({ queryKey: l.relationships }), t.invalidateQueries({ queryKey: l.renewals });
|
|
155
160
|
}
|
|
156
161
|
});
|
|
157
|
-
},
|
|
162
|
+
}, T = () => {
|
|
158
163
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
159
164
|
return r({
|
|
160
165
|
mutationFn: async ({ id: e, status: t }) => (await c(`mutation SubTransitionRelationship($id: ID!, $status: SubRelationshipStatus!) {
|
|
@@ -164,20 +169,20 @@ var c = async (e, t, n) => {
|
|
|
164
169
|
status: t
|
|
165
170
|
}, n)).subTransitionRelationship,
|
|
166
171
|
onSuccess: (e) => {
|
|
167
|
-
t.invalidateQueries({ queryKey: l.relationships }), t.invalidateQueries({ queryKey: l.relationship(e.id) });
|
|
172
|
+
t.invalidateQueries({ queryKey: l.relationships }), t.invalidateQueries({ queryKey: l.relationship(e.id) }), t.invalidateQueries({ queryKey: l.renewals });
|
|
168
173
|
}
|
|
169
174
|
});
|
|
170
|
-
},
|
|
175
|
+
}, E = () => {
|
|
171
176
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
172
177
|
return r({
|
|
173
178
|
mutationFn: async (e) => (await c(`mutation SubCancelRelationship($id: ID!) {
|
|
174
179
|
subCancelRelationship(id: $id) { ${f} }
|
|
175
180
|
}`, { id: e }, n)).subCancelRelationship,
|
|
176
181
|
onSuccess: (e) => {
|
|
177
|
-
t.invalidateQueries({ queryKey: l.relationships }), t.invalidateQueries({ queryKey: l.relationship(e.id) });
|
|
182
|
+
t.invalidateQueries({ queryKey: l.relationships }), t.invalidateQueries({ queryKey: l.relationship(e.id) }), t.invalidateQueries({ queryKey: l.renewals });
|
|
178
183
|
}
|
|
179
184
|
});
|
|
180
|
-
},
|
|
185
|
+
}, D = () => {
|
|
181
186
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
182
187
|
return r({
|
|
183
188
|
mutationFn: async ({ id: e, input: t }) => (await c(`mutation SubUpdateRelationship($id: ID!, $input: SubUpdateRelationshipInput!) {
|
|
@@ -187,10 +192,10 @@ var c = async (e, t, n) => {
|
|
|
187
192
|
input: t
|
|
188
193
|
}, n)).subUpdateRelationship,
|
|
189
194
|
onSuccess: (e) => {
|
|
190
|
-
t.invalidateQueries({ queryKey: l.relationships }), t.invalidateQueries({ queryKey: l.relationship(e.id) });
|
|
195
|
+
t.invalidateQueries({ queryKey: l.relationships }), t.invalidateQueries({ queryKey: l.relationship(e.id) }), t.invalidateQueries({ queryKey: l.renewals });
|
|
191
196
|
}
|
|
192
197
|
});
|
|
193
|
-
},
|
|
198
|
+
}, O = (t = {}) => {
|
|
194
199
|
let { apiGatewayUrl: n } = e();
|
|
195
200
|
return i({
|
|
196
201
|
queryKey: [...l.renewals, t],
|
|
@@ -199,7 +204,7 @@ var c = async (e, t, n) => {
|
|
|
199
204
|
upcomingOnly: t.upcomingOnly
|
|
200
205
|
}, n)).subListRenewalEvents.items
|
|
201
206
|
});
|
|
202
|
-
},
|
|
207
|
+
}, k = () => {
|
|
203
208
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
204
209
|
return r({
|
|
205
210
|
mutationFn: async (e) => (await c(`mutation SubCreateEntitlement($input: SubCreateEntitlementInput!) {
|
|
@@ -209,7 +214,7 @@ var c = async (e, t, n) => {
|
|
|
209
214
|
t.invalidateQueries({ queryKey: l.entitlements }), t.invalidateQueries({ queryKey: l.relationship(e.relationshipId) });
|
|
210
215
|
}
|
|
211
216
|
});
|
|
212
|
-
},
|
|
217
|
+
}, A = () => {
|
|
213
218
|
let { apiGatewayUrl: t } = e();
|
|
214
219
|
return i({
|
|
215
220
|
queryKey: [...l.assets, "all"],
|
|
@@ -217,7 +222,7 @@ var c = async (e, t, n) => {
|
|
|
217
222
|
subListAssets { items { ${v} } pageInfo { cursor hasMore } }
|
|
218
223
|
}`, {}, t)).subListAssets.items
|
|
219
224
|
});
|
|
220
|
-
},
|
|
225
|
+
}, j = () => {
|
|
221
226
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
222
227
|
return r({
|
|
223
228
|
mutationFn: async (e) => (await c(`mutation SubCreateAsset($input: SubCreateAssetInput!) {
|
|
@@ -227,13 +232,13 @@ var c = async (e, t, n) => {
|
|
|
227
232
|
t.invalidateQueries({ queryKey: l.assets }), t.invalidateQueries({ queryKey: l.relationship(e.relationshipId) });
|
|
228
233
|
}
|
|
229
234
|
});
|
|
230
|
-
},
|
|
235
|
+
}, M = "/SubscriberBot/Assets", N = () => {
|
|
231
236
|
let { apiGatewayUrl: r } = e(), [i, a] = n(0), [o, s] = n(!1);
|
|
232
237
|
return {
|
|
233
238
|
uploadFile: t(async (e) => {
|
|
234
239
|
s(!0), a(0);
|
|
235
240
|
try {
|
|
236
|
-
let t = (await c("mutation SubEnsureFolder($path: String!) {\n ensureFolderByPath(path: $path) { id }\n }", { path:
|
|
241
|
+
let t = (await c("mutation SubEnsureFolder($path: String!) {\n ensureFolderByPath(path: $path) { id }\n }", { path: M }, r)).ensureFolderByPath?.id;
|
|
237
242
|
if (!t) throw Error("Could not resolve the upload folder.");
|
|
238
243
|
let n = e.type || "application/octet-stream", i = e.name.lastIndexOf("."), o = i > -1 ? e.name.slice(i + 1) : "bin", s = await c("mutation SubInitiateUpload($input: InitiateUploadInput!) {\n initiateUpload(input: $input) {\n uploadUrl\n session { id }\n }\n }", { input: {
|
|
239
244
|
fileName: e.name,
|
|
@@ -268,13 +273,13 @@ var c = async (e, t, n) => {
|
|
|
268
273
|
progress: i,
|
|
269
274
|
isUploading: o
|
|
270
275
|
};
|
|
271
|
-
},
|
|
276
|
+
}, P = () => {
|
|
272
277
|
let { apiGatewayUrl: n } = e();
|
|
273
278
|
return t(async (e) => (await c("query SubFileDownloadUrl($id: ID!, $expiresIn: Int) {\n getFileDownloadUrl(id: $id, expiresIn: $expiresIn)\n }", {
|
|
274
279
|
id: e,
|
|
275
280
|
expiresIn: 21600
|
|
276
281
|
}, n)).getFileDownloadUrl, [n]);
|
|
277
|
-
},
|
|
282
|
+
}, F = (t = {}) => {
|
|
278
283
|
let { apiGatewayUrl: n } = e();
|
|
279
284
|
return i({
|
|
280
285
|
queryKey: [...l.providers, t],
|
|
@@ -303,7 +308,7 @@ var c = async (e, t, n) => {
|
|
|
303
308
|
}
|
|
304
309
|
}, n)).subListProviders
|
|
305
310
|
});
|
|
306
|
-
},
|
|
311
|
+
}, I = (t) => {
|
|
307
312
|
let { apiGatewayUrl: n } = e();
|
|
308
313
|
return i({
|
|
309
314
|
queryKey: l.provider(t ?? ""),
|
|
@@ -315,7 +320,7 @@ var c = async (e, t, n) => {
|
|
|
315
320
|
}
|
|
316
321
|
}`, { id: t }, n)).subProvider
|
|
317
322
|
});
|
|
318
|
-
},
|
|
323
|
+
}, L = () => {
|
|
319
324
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
320
325
|
return r({
|
|
321
326
|
mutationFn: async (e) => (await c(`mutation SubCreateProvider($input: SubCreateProviderInput!) {
|
|
@@ -325,7 +330,7 @@ var c = async (e, t, n) => {
|
|
|
325
330
|
t.invalidateQueries({ queryKey: l.providers });
|
|
326
331
|
}
|
|
327
332
|
});
|
|
328
|
-
},
|
|
333
|
+
}, R = () => {
|
|
329
334
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
330
335
|
return r({
|
|
331
336
|
mutationFn: async ({ id: e, input: t }) => (await c(`mutation SubUpdateProvider($id: ID!, $input: SubUpdateProviderInput!) {
|
|
@@ -338,7 +343,7 @@ var c = async (e, t, n) => {
|
|
|
338
343
|
t.invalidateQueries({ queryKey: l.providers }), t.invalidateQueries({ queryKey: l.provider(e.id) });
|
|
339
344
|
}
|
|
340
345
|
});
|
|
341
|
-
},
|
|
346
|
+
}, z = () => {
|
|
342
347
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
343
348
|
return r({
|
|
344
349
|
mutationFn: async (e) => (await c("mutation SubArchiveProvider($id: ID!) {\n subArchiveProvider(id: $id)\n }", { id: e }, n)).subArchiveProvider,
|
|
@@ -346,7 +351,7 @@ var c = async (e, t, n) => {
|
|
|
346
351
|
t.invalidateQueries({ queryKey: l.providers });
|
|
347
352
|
}
|
|
348
353
|
});
|
|
349
|
-
},
|
|
354
|
+
}, B = (t) => {
|
|
350
355
|
let { apiGatewayUrl: n } = e();
|
|
351
356
|
return i({
|
|
352
357
|
queryKey: [...l.plans, t],
|
|
@@ -355,7 +360,7 @@ var c = async (e, t, n) => {
|
|
|
355
360
|
subListPlans(providerId: $providerId) { items { ${d} } pageInfo { cursor hasMore } }
|
|
356
361
|
}`, { providerId: t }, n)).subListPlans.items
|
|
357
362
|
});
|
|
358
|
-
},
|
|
363
|
+
}, V = () => {
|
|
359
364
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
360
365
|
return r({
|
|
361
366
|
mutationFn: async (e) => (await c(`mutation SubCreatePlan($input: SubCreatePlanInput!) {
|
|
@@ -365,7 +370,7 @@ var c = async (e, t, n) => {
|
|
|
365
370
|
t.invalidateQueries({ queryKey: l.plans }), t.invalidateQueries({ queryKey: l.provider(e.providerId) });
|
|
366
371
|
}
|
|
367
372
|
});
|
|
368
|
-
},
|
|
373
|
+
}, H = (t) => {
|
|
369
374
|
let { apiGatewayUrl: n } = e();
|
|
370
375
|
return i({
|
|
371
376
|
queryKey: l.benchmarks(t ?? ""),
|
|
@@ -389,7 +394,7 @@ var c = async (e, t, n) => {
|
|
|
389
394
|
}, n)).subListBenchmarkDataPoints.items;
|
|
390
395
|
}
|
|
391
396
|
});
|
|
392
|
-
},
|
|
397
|
+
}, U = (t = {}) => {
|
|
393
398
|
let { apiGatewayUrl: n } = e();
|
|
394
399
|
return i({
|
|
395
400
|
queryKey: [...l.inbox, t],
|
|
@@ -421,7 +426,7 @@ var c = async (e, t, n) => {
|
|
|
421
426
|
}
|
|
422
427
|
}, n)).subListInboxMessages
|
|
423
428
|
});
|
|
424
|
-
},
|
|
429
|
+
}, W = () => {
|
|
425
430
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
426
431
|
return r({
|
|
427
432
|
mutationFn: async (e) => (await c(`mutation SubMarkMessageRead($id: ID!) {
|
|
@@ -431,7 +436,7 @@ var c = async (e, t, n) => {
|
|
|
431
436
|
t.invalidateQueries({ queryKey: l.inbox });
|
|
432
437
|
}
|
|
433
438
|
});
|
|
434
|
-
},
|
|
439
|
+
}, G = () => {
|
|
435
440
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
436
441
|
return r({
|
|
437
442
|
mutationFn: async (e) => (await c(`mutation SubIngestMessage($input: SubIngestMessageInput!) {
|
|
@@ -441,7 +446,7 @@ var c = async (e, t, n) => {
|
|
|
441
446
|
t.invalidateQueries({ queryKey: l.inbox });
|
|
442
447
|
}
|
|
443
448
|
});
|
|
444
|
-
},
|
|
449
|
+
}, K = (t = {}, n = {}) => {
|
|
445
450
|
let { apiGatewayUrl: r } = e();
|
|
446
451
|
return i({
|
|
447
452
|
queryKey: [...l.invoices, t],
|
|
@@ -468,7 +473,7 @@ var c = async (e, t, n) => {
|
|
|
468
473
|
}
|
|
469
474
|
}, r)).subListInvoices
|
|
470
475
|
});
|
|
471
|
-
},
|
|
476
|
+
}, q = () => {
|
|
472
477
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
473
478
|
return r({
|
|
474
479
|
mutationFn: async (e) => (await c(`mutation SubMarkInvoicePaid($id: ID!) {
|
|
@@ -478,7 +483,7 @@ var c = async (e, t, n) => {
|
|
|
478
483
|
t.invalidateQueries({ queryKey: l.invoices });
|
|
479
484
|
}
|
|
480
485
|
});
|
|
481
|
-
},
|
|
486
|
+
}, J = () => {
|
|
482
487
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
483
488
|
return r({
|
|
484
489
|
mutationFn: async (e) => (await c(`mutation SubCreateInvoice($input: SubCreateInvoiceInput!) {
|
|
@@ -488,13 +493,13 @@ var c = async (e, t, n) => {
|
|
|
488
493
|
t.invalidateQueries({ queryKey: l.invoices });
|
|
489
494
|
}
|
|
490
495
|
});
|
|
491
|
-
},
|
|
496
|
+
}, Y = (t) => {
|
|
492
497
|
let { apiGatewayUrl: n } = e();
|
|
493
498
|
return i({
|
|
494
499
|
queryKey: [...l.paymentInstruments, t],
|
|
495
500
|
queryFn: async () => (await c("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
|
|
496
501
|
});
|
|
497
|
-
},
|
|
502
|
+
}, X = () => {
|
|
498
503
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
499
504
|
return r({
|
|
500
505
|
mutationFn: async (e) => (await c(`mutation SubCreatePaymentInstrument($input: SubCreatePaymentInstrumentInput!) {
|
|
@@ -625,7 +630,7 @@ var c = async (e, t, n) => {
|
|
|
625
630
|
}`, { id: t }, n)).subDecision
|
|
626
631
|
});
|
|
627
632
|
}, Z = (e, t) => {
|
|
628
|
-
e.invalidateQueries({ queryKey: l.decisions }), t.decisionId && e.invalidateQueries({ queryKey: l.decision(t.decisionId) }), t.agentId && (e.invalidateQueries({ queryKey: l.agent(t.agentId) }), e.invalidateQueries({ queryKey: l.agents })), t.relationshipId && (e.invalidateQueries({ queryKey: l.relationship(t.relationshipId) }), e.invalidateQueries({ queryKey: l.relationships }));
|
|
633
|
+
e.invalidateQueries({ queryKey: l.decisions }), e.invalidateQueries({ queryKey: l.renewals }), t.decisionId && e.invalidateQueries({ queryKey: l.decision(t.decisionId) }), t.agentId && (e.invalidateQueries({ queryKey: l.agent(t.agentId) }), e.invalidateQueries({ queryKey: l.agents })), t.relationshipId && (e.invalidateQueries({ queryKey: l.relationship(t.relationshipId) }), e.invalidateQueries({ queryKey: l.relationships }));
|
|
629
634
|
}, ge = () => {
|
|
630
635
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
631
636
|
return r({
|
|
@@ -677,7 +682,7 @@ var c = async (e, t, n) => {
|
|
|
677
682
|
return r({
|
|
678
683
|
mutationFn: async (e) => (await c("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,
|
|
679
684
|
onSettled: (e, n, r) => {
|
|
680
|
-
t.invalidateQueries({ queryKey: l.decisions }), t.invalidateQueries({ queryKey: l.relationships });
|
|
685
|
+
t.invalidateQueries({ queryKey: l.decisions }), t.invalidateQueries({ queryKey: l.relationships }), t.invalidateQueries({ queryKey: l.renewals });
|
|
681
686
|
for (let e of [r.keepRelationshipId, ...r.cancelRelationshipIds]) t.invalidateQueries({ queryKey: l.relationship(e) });
|
|
682
687
|
}
|
|
683
688
|
});
|
|
@@ -847,8 +852,54 @@ var c = async (e, t, n) => {
|
|
|
847
852
|
t.invalidateQueries({ queryKey: l.spendBudgets }), t.invalidateQueries({ queryKey: l.enterpriseSpend });
|
|
848
853
|
}
|
|
849
854
|
});
|
|
855
|
+
}, Pe = "\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", Fe = (t = {}) => {
|
|
856
|
+
let { apiGatewayUrl: n } = e();
|
|
857
|
+
return i({
|
|
858
|
+
queryKey: [...l.renewalForecast, t],
|
|
859
|
+
queryFn: async () => (await c(`query SubRenewalForecast(
|
|
860
|
+
$from: DateTime
|
|
861
|
+
$to: DateTime
|
|
862
|
+
$statuses: [SubRelationshipStatus!]
|
|
863
|
+
$trialWindowDays: Int
|
|
864
|
+
$currency: String
|
|
865
|
+
) {
|
|
866
|
+
subRenewalForecast(
|
|
867
|
+
from: $from
|
|
868
|
+
to: $to
|
|
869
|
+
statuses: $statuses
|
|
870
|
+
trialWindowDays: $trialWindowDays
|
|
871
|
+
currency: $currency
|
|
872
|
+
) { ${Pe} }
|
|
873
|
+
}`, {
|
|
874
|
+
from: t.from ?? null,
|
|
875
|
+
to: t.to ?? null,
|
|
876
|
+
statuses: t.statuses?.length ? t.statuses : null,
|
|
877
|
+
trialWindowDays: t.trialWindowDays ?? null,
|
|
878
|
+
currency: t.currency || null
|
|
879
|
+
}, n)).subRenewalForecast
|
|
880
|
+
});
|
|
881
|
+
}, Ie = () => {
|
|
882
|
+
let t = a(), { apiGatewayUrl: n } = e();
|
|
883
|
+
return r({
|
|
884
|
+
mutationFn: async (e) => (await c("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 }", {
|
|
885
|
+
relationshipId: e.relationshipId,
|
|
886
|
+
remindAt: e.remindAt || null,
|
|
887
|
+
note: e.note || null
|
|
888
|
+
}, n)).subSetRenewalReminder,
|
|
889
|
+
onSuccess: () => {
|
|
890
|
+
t.invalidateQueries({ queryKey: l.renewals });
|
|
891
|
+
}
|
|
892
|
+
});
|
|
893
|
+
}, Le = () => {
|
|
894
|
+
let t = a(), { apiGatewayUrl: n } = e();
|
|
895
|
+
return r({
|
|
896
|
+
mutationFn: async (e) => (await c("mutation SubCancelRenewalReminder($id: ID!) {\n subCancelRenewalReminder(id: $id)\n }", { id: e }, n)).subCancelRenewalReminder,
|
|
897
|
+
onSuccess: () => {
|
|
898
|
+
t.invalidateQueries({ queryKey: l.renewals });
|
|
899
|
+
}
|
|
900
|
+
});
|
|
850
901
|
};
|
|
851
902
|
//#endregion
|
|
852
|
-
export { c as subQuery, Te as useActivateWorkflow, Ee as useAdapterSubmissions, le as useAgent, ce as useAgents,
|
|
903
|
+
export { c as subQuery, Te as useActivateWorkflow, Ee as useAdapterSubmissions, le as useAgent, ce as useAgents, A as useAllAssets, _e as useApplyDecision, De as useApproveAdapter, z as useArchiveProvider, H as useBenchmarkDataPoints, E as useCancelRelationship, Le as useCancelRenewalReminder, ae as useChannels, xe as useConsolidateRelationships, ue as useCreateAgent, j as useCreateAsset, oe as useCreateChannel, k as useCreateEntitlement, J as useCreateInvoice, X as useCreatePaymentInstrument, V as useCreatePlan, fe as useCreatePolicy, L as useCreateProvider, w as useCreateRelationship, we as useCreateWorkflow, he as useDecision, me as useDecisions, Se as useDismissBundle, ve as useDismissDecision, je as useEnterpriseSpendDashboard, P as useFileDownloadUrl, U as useInboxMessages, G as useIngestMessage, K as useInvoices, q as useMarkInvoicePaid, W as useMarkMessageRead, Q as useMarketplaceReports, ke as useModerateListing, Y as usePaymentInstruments, B as usePlans, I as useProvider, F as useProviders, Oe as useRejectAdapter, C as useRelationship, re as useRelationships, ie as useRemovePaymentInstrument, O as useRenewalEvents, Fe as useRenewalForecast, ge as useRunAgent, be as useSavingsOverview, de as useSetAgentStatus, Ie as useSetRenewalReminder, Ne as useSetSpendBudget, Me as useSpendBudgets, T as useTransitionRelationship, R as useUpdateProvider, D as useUpdateRelationship, N as useUploadFile, se as useVerifyChannel, Ce as useWorkflows };
|
|
853
904
|
|
|
854
905
|
//# sourceMappingURL=useSubscriberBotApi.js.map
|