@burdenoff/microfe-ecoimpacthub 2026.1110.2 → 2026.1110.4
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/ecoimpacthub/EcoImpactHubRoot.js +53 -45
- package/dist/ecoimpacthub/EcoImpactHubRoot.js.map +1 -1
- package/dist/ecoimpacthub/EcoImpactHubRoutes.js +30 -26
- package/dist/ecoimpacthub/EcoImpactHubRoutes.js.map +1 -1
- package/dist/ecoimpacthub/hooks/index.js +10 -10
- package/dist/ecoimpacthub/hooks/useEcoImpactHubApi.d.ts +13 -1
- package/dist/ecoimpacthub/hooks/useEcoImpactHubApi.js +110 -47
- package/dist/ecoimpacthub/hooks/useEcoImpactHubApi.js.map +1 -1
- package/dist/ecoimpacthub/pages/metrics/MetricDetailDialog.d.ts +12 -0
- package/dist/ecoimpacthub/pages/metrics/MetricDetailDialog.js +84 -0
- package/dist/ecoimpacthub/pages/metrics/MetricDetailDialog.js.map +1 -0
- package/dist/ecoimpacthub/pages/metrics/MetricsPage.d.ts +15 -0
- package/dist/ecoimpacthub/pages/metrics/MetricsPage.js +312 -0
- package/dist/ecoimpacthub/pages/metrics/MetricsPage.js.map +1 -0
- package/dist/ecoimpacthub/types/index.d.ts +36 -0
- package/package.json +3 -1
|
@@ -35,11 +35,18 @@ var a = {
|
|
|
35
35
|
"ecoimpacthub",
|
|
36
36
|
"report",
|
|
37
37
|
e
|
|
38
|
-
]
|
|
38
|
+
],
|
|
39
|
+
metrics: ["ecoimpacthub", "metrics"],
|
|
40
|
+
metric: (e) => [
|
|
41
|
+
"ecoimpacthub",
|
|
42
|
+
"metric",
|
|
43
|
+
e
|
|
44
|
+
],
|
|
45
|
+
metricRollups: ["ecoimpacthub", "metric-rollups"]
|
|
39
46
|
}, o = {
|
|
40
47
|
limit: 50,
|
|
41
48
|
offset: 0
|
|
42
|
-
}, s = "\n id workspaceId name code type status description latitude longitude\n areaHectares country region createdAt updatedAt\n", c = "\n id workspaceId siteId name kind status hardwareId unit lastReadingAt installedAt\n createdAt updatedAt\n", l = "\n id workspaceId siteId sensorId parameter value unit source recordedAt isBreach notes\n createdAt updatedAt\n", u = "\n id workspaceId siteId parameter direction severity limitValue minValue maxValue unit\n isActive createdAt updatedAt\n", d = "\n id workspaceId commonName scientificName taxonGroup conservationStatus isPriority\n description createdAt updatedAt\n", f = "\n id workspaceId speciesId siteId method count observedAt latitude longitude observerId\n notes evidence { id } createdAt updatedAt\n", p = "\n id workspaceId name status description siteId targetHectares budgetAmount currency\n managerId startDate endDate completedAt createdAt updatedAt\n", m = "\n id workspaceId projectId type summary details quantity unit performedAt createdAt updatedAt\n", h = "\n id workspaceId name scope activityUnit factorKgco2e source validYear isActive\n createdAt updatedAt\n", g = "\n id workspaceId siteId factorId scope status category activityValue activityUnit co2eKg\n periodStart notes agentRunId aiRationale aiProvenance createdAt updatedAt\n", _ = "\n id workspaceId name status metric baselineYear baselineValue targetYear targetValue unit\n description createdAt updatedAt\n", v = "\n id workspaceId title framework status periodStart periodEnd summary publishedAt\n workflowRunId approvedBy approvedAt rejectedAt rejectionReason\n file { id } createdAt updatedAt\n", y = "\n id workspaceId reportId carbonEntryId label value unit category createdAt updatedAt\n", ee = (n = {}) => {
|
|
49
|
+
}, s = "\n id workspaceId name code type status description latitude longitude\n areaHectares country region createdAt updatedAt\n", c = "\n id workspaceId siteId name kind status hardwareId unit lastReadingAt installedAt\n createdAt updatedAt\n", l = "\n id workspaceId siteId sensorId parameter value unit source recordedAt isBreach notes\n createdAt updatedAt\n", u = "\n id workspaceId siteId parameter direction severity limitValue minValue maxValue unit\n isActive createdAt updatedAt\n", d = "\n id workspaceId commonName scientificName taxonGroup conservationStatus isPriority\n description createdAt updatedAt\n", f = "\n id workspaceId speciesId siteId method count observedAt latitude longitude observerId\n notes evidence { id } createdAt updatedAt\n", p = "\n id workspaceId name status description siteId targetHectares budgetAmount currency\n managerId startDate endDate completedAt createdAt updatedAt\n", m = "\n id workspaceId projectId type summary details quantity unit performedAt createdAt updatedAt\n", h = "\n id workspaceId name scope activityUnit factorKgco2e source validYear isActive\n createdAt updatedAt\n", g = "\n id workspaceId siteId factorId scope status category activityValue activityUnit co2eKg\n periodStart notes agentRunId aiRationale aiProvenance createdAt updatedAt\n", _ = "\n id workspaceId name status metric baselineYear baselineValue targetYear targetValue unit\n description createdAt updatedAt\n", v = "\n id workspaceId title framework status periodStart periodEnd summary publishedAt\n workflowRunId approvedBy approvedAt rejectedAt rejectionReason\n file { id } createdAt updatedAt\n", y = "\n id workspaceId reportId carbonEntryId label value unit category createdAt updatedAt\n", b = "\n id workspaceId metricKey metricName category unit periodStart periodEnd\n value target trend sourceProduct sourceRefId notes createdAt updatedAt\n", ee = "\n metricKey metricName category unit periodStart periodEnd\n totalValue target trend entryCount sourceCount sourceProducts\n", x = (n = {}) => {
|
|
43
50
|
let { apiGatewayUrl: i } = e();
|
|
44
51
|
return r({
|
|
45
52
|
queryKey: [...a.sites, n],
|
|
@@ -54,7 +61,7 @@ var a = {
|
|
|
54
61
|
pagination: n.pagination ?? o
|
|
55
62
|
}, i)).ecoListSites
|
|
56
63
|
});
|
|
57
|
-
},
|
|
64
|
+
}, S = (n) => {
|
|
58
65
|
let { apiGatewayUrl: i } = e();
|
|
59
66
|
return r({
|
|
60
67
|
queryKey: a.site(n ?? ""),
|
|
@@ -67,7 +74,7 @@ var a = {
|
|
|
67
74
|
}
|
|
68
75
|
}`, { id: n }, i)).ecoSite
|
|
69
76
|
});
|
|
70
|
-
},
|
|
77
|
+
}, C = () => {
|
|
71
78
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
72
79
|
return n({
|
|
73
80
|
mutationFn: async (e) => (await t(`mutation EcoCreateSite($input: EcoCreateSiteInput!) {
|
|
@@ -75,13 +82,13 @@ var a = {
|
|
|
75
82
|
}`, { input: e }, r)).ecoCreateSite,
|
|
76
83
|
onSuccess: () => o.invalidateQueries({ queryKey: a.sites })
|
|
77
84
|
});
|
|
78
|
-
},
|
|
85
|
+
}, w = () => {
|
|
79
86
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
80
87
|
return n({
|
|
81
88
|
mutationFn: async (e) => (await t("mutation EcoArchiveSite($id: ID!) { ecoArchiveSite(id: $id) }", { id: e }, r)).ecoArchiveSite,
|
|
82
89
|
onSuccess: () => o.invalidateQueries({ queryKey: a.sites })
|
|
83
90
|
});
|
|
84
|
-
},
|
|
91
|
+
}, T = (n = {}) => {
|
|
85
92
|
let { apiGatewayUrl: i } = e();
|
|
86
93
|
return r({
|
|
87
94
|
queryKey: [...a.sensors, n],
|
|
@@ -96,7 +103,7 @@ var a = {
|
|
|
96
103
|
status: n.status
|
|
97
104
|
}, i)).ecoListSensors
|
|
98
105
|
});
|
|
99
|
-
},
|
|
106
|
+
}, E = () => {
|
|
100
107
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
101
108
|
return n({
|
|
102
109
|
mutationFn: async (e) => (await t(`mutation EcoCreateSensor($input: EcoCreateSensorInput!) {
|
|
@@ -106,7 +113,7 @@ var a = {
|
|
|
106
113
|
o.invalidateQueries({ queryKey: a.sensors }), o.invalidateQueries({ queryKey: a.site(e.siteId) });
|
|
107
114
|
}
|
|
108
115
|
});
|
|
109
|
-
},
|
|
116
|
+
}, D = () => {
|
|
110
117
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
111
118
|
return n({
|
|
112
119
|
mutationFn: async (e) => (await t(`mutation EcoSetSensorStatus($id: ID!, $status: EcoSensorStatus!) {
|
|
@@ -116,7 +123,7 @@ var a = {
|
|
|
116
123
|
o.invalidateQueries({ queryKey: a.sensors }), o.invalidateQueries({ queryKey: a.site(e.siteId) });
|
|
117
124
|
}
|
|
118
125
|
});
|
|
119
|
-
},
|
|
126
|
+
}, O = (n = {}) => {
|
|
120
127
|
let { apiGatewayUrl: i } = e();
|
|
121
128
|
return r({
|
|
122
129
|
queryKey: [...a.measurements, n],
|
|
@@ -133,7 +140,7 @@ var a = {
|
|
|
133
140
|
pagination: n.pagination ?? o
|
|
134
141
|
}, i)).ecoListMeasurements
|
|
135
142
|
});
|
|
136
|
-
},
|
|
143
|
+
}, k = () => {
|
|
137
144
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
138
145
|
return n({
|
|
139
146
|
mutationFn: async (e) => (await t(`mutation EcoRecordMeasurement($input: EcoRecordMeasurementInput!) {
|
|
@@ -141,7 +148,7 @@ var a = {
|
|
|
141
148
|
}`, { input: e }, r)).ecoRecordMeasurement,
|
|
142
149
|
onSuccess: () => o.invalidateQueries({ queryKey: a.measurements })
|
|
143
150
|
});
|
|
144
|
-
},
|
|
151
|
+
}, A = (n) => {
|
|
145
152
|
let { apiGatewayUrl: i } = e();
|
|
146
153
|
return r({
|
|
147
154
|
queryKey: [...a.thresholds, n ?? "all"],
|
|
@@ -152,7 +159,7 @@ var a = {
|
|
|
152
159
|
}
|
|
153
160
|
}`, { siteId: n }, i)).ecoListThresholds
|
|
154
161
|
});
|
|
155
|
-
},
|
|
162
|
+
}, j = () => {
|
|
156
163
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
157
164
|
return n({
|
|
158
165
|
mutationFn: async (e) => (await t(`mutation EcoCreateThreshold($input: EcoCreateThresholdInput!) {
|
|
@@ -162,7 +169,7 @@ var a = {
|
|
|
162
169
|
o.invalidateQueries({ queryKey: a.thresholds }), o.invalidateQueries({ queryKey: a.site(e.siteId) });
|
|
163
170
|
}
|
|
164
171
|
});
|
|
165
|
-
},
|
|
172
|
+
}, M = () => {
|
|
166
173
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
167
174
|
return n({
|
|
168
175
|
mutationFn: async (e) => (await t(`mutation EcoSetThresholdActive($id: ID!, $isActive: Boolean!) {
|
|
@@ -170,7 +177,7 @@ var a = {
|
|
|
170
177
|
}`, e, r)).ecoSetThresholdActive,
|
|
171
178
|
onSuccess: () => o.invalidateQueries({ queryKey: a.thresholds })
|
|
172
179
|
});
|
|
173
|
-
},
|
|
180
|
+
}, N = (n = {}) => {
|
|
174
181
|
let { apiGatewayUrl: i } = e();
|
|
175
182
|
return r({
|
|
176
183
|
queryKey: [...a.species, n],
|
|
@@ -186,7 +193,7 @@ var a = {
|
|
|
186
193
|
pagination: n.pagination ?? o
|
|
187
194
|
}, i)).ecoListSpecies
|
|
188
195
|
});
|
|
189
|
-
},
|
|
196
|
+
}, P = (n) => {
|
|
190
197
|
let { apiGatewayUrl: i } = e();
|
|
191
198
|
return r({
|
|
192
199
|
queryKey: a.speciesOne(n ?? ""),
|
|
@@ -198,7 +205,7 @@ var a = {
|
|
|
198
205
|
}
|
|
199
206
|
}`, { id: n }, i)).ecoSpecies
|
|
200
207
|
});
|
|
201
|
-
},
|
|
208
|
+
}, F = () => {
|
|
202
209
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
203
210
|
return n({
|
|
204
211
|
mutationFn: async (e) => (await t(`mutation EcoCreateSpecies($input: EcoCreateSpeciesInput!) {
|
|
@@ -206,7 +213,7 @@ var a = {
|
|
|
206
213
|
}`, { input: e }, r)).ecoCreateSpecies,
|
|
207
214
|
onSuccess: () => o.invalidateQueries({ queryKey: a.species })
|
|
208
215
|
});
|
|
209
|
-
},
|
|
216
|
+
}, I = () => {
|
|
210
217
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
211
218
|
return n({
|
|
212
219
|
mutationFn: async (e) => (await t(`mutation EcoUpdateSpecies($id: ID!, $input: EcoUpdateSpeciesInput!) {
|
|
@@ -216,13 +223,13 @@ var a = {
|
|
|
216
223
|
o.invalidateQueries({ queryKey: a.species }), o.invalidateQueries({ queryKey: a.speciesOne(e.id) });
|
|
217
224
|
}
|
|
218
225
|
});
|
|
219
|
-
},
|
|
226
|
+
}, L = () => {
|
|
220
227
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
221
228
|
return n({
|
|
222
229
|
mutationFn: async (e) => (await t("mutation EcoArchiveSpecies($id: ID!) { ecoArchiveSpecies(id: $id) }", { id: e }, r)).ecoArchiveSpecies,
|
|
223
230
|
onSuccess: () => o.invalidateQueries({ queryKey: a.species })
|
|
224
231
|
});
|
|
225
|
-
},
|
|
232
|
+
}, R = (n = {}) => {
|
|
226
233
|
let { apiGatewayUrl: i } = e();
|
|
227
234
|
return r({
|
|
228
235
|
queryKey: [...a.observations, n],
|
|
@@ -237,7 +244,7 @@ var a = {
|
|
|
237
244
|
pagination: n.pagination ?? o
|
|
238
245
|
}, i)).ecoListObservations
|
|
239
246
|
});
|
|
240
|
-
},
|
|
247
|
+
}, z = () => {
|
|
241
248
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
242
249
|
return n({
|
|
243
250
|
mutationFn: async (e) => (await t(`mutation EcoRecordObservation($input: EcoRecordObservationInput!) {
|
|
@@ -247,7 +254,7 @@ var a = {
|
|
|
247
254
|
o.invalidateQueries({ queryKey: a.observations }), o.invalidateQueries({ queryKey: a.speciesOne(e.speciesId) });
|
|
248
255
|
}
|
|
249
256
|
});
|
|
250
|
-
},
|
|
257
|
+
}, B = (n) => {
|
|
251
258
|
let { apiGatewayUrl: i } = e();
|
|
252
259
|
return r({
|
|
253
260
|
queryKey: [...a.habitatProjects, n ?? "all"],
|
|
@@ -258,7 +265,7 @@ var a = {
|
|
|
258
265
|
}
|
|
259
266
|
}`, { status: n }, i)).ecoListHabitatProjects
|
|
260
267
|
});
|
|
261
|
-
},
|
|
268
|
+
}, V = (n) => {
|
|
262
269
|
let { apiGatewayUrl: i } = e();
|
|
263
270
|
return r({
|
|
264
271
|
queryKey: a.habitatProject(n ?? ""),
|
|
@@ -270,7 +277,7 @@ var a = {
|
|
|
270
277
|
}
|
|
271
278
|
}`, { id: n }, i)).ecoHabitatProject
|
|
272
279
|
});
|
|
273
|
-
},
|
|
280
|
+
}, H = () => {
|
|
274
281
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
275
282
|
return n({
|
|
276
283
|
mutationFn: async (e) => (await t(`mutation EcoCreateHabitatProject($input: EcoCreateHabitatProjectInput!) {
|
|
@@ -278,7 +285,7 @@ var a = {
|
|
|
278
285
|
}`, { input: e }, r)).ecoCreateHabitatProject,
|
|
279
286
|
onSuccess: () => o.invalidateQueries({ queryKey: a.habitatProjects })
|
|
280
287
|
});
|
|
281
|
-
},
|
|
288
|
+
}, U = () => {
|
|
282
289
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
283
290
|
return n({
|
|
284
291
|
mutationFn: async (e) => (await t(`mutation EcoTransitionHabitatProject($id: ID!, $status: EcoHabitatProjectStatus!) {
|
|
@@ -288,7 +295,7 @@ var a = {
|
|
|
288
295
|
o.invalidateQueries({ queryKey: a.habitatProjects }), o.invalidateQueries({ queryKey: a.habitatProject(e.id) });
|
|
289
296
|
}
|
|
290
297
|
});
|
|
291
|
-
},
|
|
298
|
+
}, W = () => {
|
|
292
299
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
293
300
|
return n({
|
|
294
301
|
mutationFn: async (e) => (await t(`mutation EcoLogRestorationActivity($input: EcoLogRestorationActivityInput!) {
|
|
@@ -296,7 +303,7 @@ var a = {
|
|
|
296
303
|
}`, { input: e }, r)).ecoLogRestorationActivity,
|
|
297
304
|
onSuccess: (e) => o.invalidateQueries({ queryKey: a.habitatProject(e.projectId) })
|
|
298
305
|
});
|
|
299
|
-
},
|
|
306
|
+
}, te = (n, i) => {
|
|
300
307
|
let { apiGatewayUrl: o } = e();
|
|
301
308
|
return r({
|
|
302
309
|
queryKey: [
|
|
@@ -314,7 +321,7 @@ var a = {
|
|
|
314
321
|
activeOnly: i
|
|
315
322
|
}, o)).ecoListEmissionFactors
|
|
316
323
|
});
|
|
317
|
-
},
|
|
324
|
+
}, G = () => {
|
|
318
325
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
319
326
|
return n({
|
|
320
327
|
mutationFn: async (e) => (await t(`mutation EcoCreateEmissionFactor($input: EcoCreateEmissionFactorInput!) {
|
|
@@ -322,7 +329,7 @@ var a = {
|
|
|
322
329
|
}`, { input: e }, r)).ecoCreateEmissionFactor,
|
|
323
330
|
onSuccess: () => o.invalidateQueries({ queryKey: a.emissionFactors })
|
|
324
331
|
});
|
|
325
|
-
},
|
|
332
|
+
}, K = (n = {}) => {
|
|
326
333
|
let { apiGatewayUrl: i } = e();
|
|
327
334
|
return r({
|
|
328
335
|
queryKey: [...a.carbonEntries, n],
|
|
@@ -338,13 +345,13 @@ var a = {
|
|
|
338
345
|
pagination: n.pagination ?? o
|
|
339
346
|
}, i)).ecoListCarbonEntries
|
|
340
347
|
});
|
|
341
|
-
},
|
|
348
|
+
}, q = (n) => {
|
|
342
349
|
let { apiGatewayUrl: i } = e();
|
|
343
350
|
return r({
|
|
344
351
|
queryKey: [...a.carbonTotals, n ?? "all"],
|
|
345
352
|
queryFn: async () => await t("query EcoCarbonTotals($siteId: ID) {\n total: ecoCarbonTotalKg(siteId: $siteId)\n scope1: ecoCarbonTotalKg(scope: SCOPE_1, siteId: $siteId)\n scope2: ecoCarbonTotalKg(scope: SCOPE_2, siteId: $siteId)\n scope3: ecoCarbonTotalKg(scope: SCOPE_3, siteId: $siteId)\n }", { siteId: n }, i)
|
|
346
353
|
});
|
|
347
|
-
},
|
|
354
|
+
}, J = () => {
|
|
348
355
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
349
356
|
return n({
|
|
350
357
|
mutationFn: async (e) => (await t(`mutation EcoRecordCarbonEntry($input: EcoRecordCarbonEntryInput!) {
|
|
@@ -354,7 +361,7 @@ var a = {
|
|
|
354
361
|
o.invalidateQueries({ queryKey: a.carbonEntries }), o.invalidateQueries({ queryKey: a.carbonTotals });
|
|
355
362
|
}
|
|
356
363
|
});
|
|
357
|
-
},
|
|
364
|
+
}, Y = () => {
|
|
358
365
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
359
366
|
return n({
|
|
360
367
|
mutationFn: async (e) => (await t(`mutation EcoVerifyCarbonEntry($id: ID!) {
|
|
@@ -362,7 +369,7 @@ var a = {
|
|
|
362
369
|
}`, { id: e }, r)).ecoVerifyCarbonEntry,
|
|
363
370
|
onSuccess: () => o.invalidateQueries({ queryKey: a.carbonEntries })
|
|
364
371
|
});
|
|
365
|
-
},
|
|
372
|
+
}, X = () => {
|
|
366
373
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
367
374
|
return n({
|
|
368
375
|
mutationFn: async (e) => (await t(`mutation EcoAiDraftCarbonEntries($input: EcoAiDraftCarbonEntriesInput!) {
|
|
@@ -374,7 +381,7 @@ var a = {
|
|
|
374
381
|
}`, { input: e }, r)).ecoAiDraftCarbonEntries,
|
|
375
382
|
onSuccess: () => o.invalidateQueries({ queryKey: a.carbonEntries })
|
|
376
383
|
});
|
|
377
|
-
},
|
|
384
|
+
}, Z = () => {
|
|
378
385
|
let { apiGatewayUrl: r } = e();
|
|
379
386
|
return n({ mutationFn: async (e) => (await t(`mutation EcoAiSuggestEmissionFactor($input: EcoAiSuggestEmissionFactorInput!) {
|
|
380
387
|
ecoAiSuggestEmissionFactor(input: $input) {
|
|
@@ -384,7 +391,7 @@ var a = {
|
|
|
384
391
|
candidates { rank confidence conversionMultiplier rationale reasonCodes factor { ${h} } }
|
|
385
392
|
}
|
|
386
393
|
}`, { input: e }, r)).ecoAiSuggestEmissionFactor });
|
|
387
|
-
},
|
|
394
|
+
}, Q = () => {
|
|
388
395
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
389
396
|
return n({
|
|
390
397
|
mutationFn: async (e) => (await t(`mutation EcoAcceptCarbonEntryDraft($id: ID!) {
|
|
@@ -394,7 +401,7 @@ var a = {
|
|
|
394
401
|
o.invalidateQueries({ queryKey: a.carbonEntries }), o.invalidateQueries({ queryKey: a.carbonTotals });
|
|
395
402
|
}
|
|
396
403
|
});
|
|
397
|
-
},
|
|
404
|
+
}, ne = () => {
|
|
398
405
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
399
406
|
return n({
|
|
400
407
|
mutationFn: async ({ id: e, reason: n }) => (await t("mutation EcoRejectCarbonEntryDraft($id: ID!, $reason: String!) {\n ecoRejectCarbonEntryDraft(id: $id, reason: $reason)\n }", {
|
|
@@ -405,7 +412,7 @@ var a = {
|
|
|
405
412
|
o.invalidateQueries({ queryKey: a.carbonEntries }), o.invalidateQueries({ queryKey: a.carbonTotals });
|
|
406
413
|
}
|
|
407
414
|
});
|
|
408
|
-
},
|
|
415
|
+
}, re = (n) => {
|
|
409
416
|
let { apiGatewayUrl: i } = e();
|
|
410
417
|
return r({
|
|
411
418
|
queryKey: [...a.reductionTargets, n ?? "all"],
|
|
@@ -416,7 +423,7 @@ var a = {
|
|
|
416
423
|
}
|
|
417
424
|
}`, { status: n }, i)).ecoListReductionTargets
|
|
418
425
|
});
|
|
419
|
-
},
|
|
426
|
+
}, ie = () => {
|
|
420
427
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
421
428
|
return n({
|
|
422
429
|
mutationFn: async (e) => (await t(`mutation EcoCreateReductionTarget($input: EcoCreateReductionTargetInput!) {
|
|
@@ -424,7 +431,7 @@ var a = {
|
|
|
424
431
|
}`, { input: e }, r)).ecoCreateReductionTarget,
|
|
425
432
|
onSuccess: () => o.invalidateQueries({ queryKey: a.reductionTargets })
|
|
426
433
|
});
|
|
427
|
-
},
|
|
434
|
+
}, ae = () => {
|
|
428
435
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
429
436
|
return n({
|
|
430
437
|
mutationFn: async (e) => (await t(`mutation EcoSetReductionTargetStatus($id: ID!, $status: EcoReductionTargetStatus!) {
|
|
@@ -432,7 +439,7 @@ var a = {
|
|
|
432
439
|
}`, e, r)).ecoSetReductionTargetStatus,
|
|
433
440
|
onSuccess: () => o.invalidateQueries({ queryKey: a.reductionTargets })
|
|
434
441
|
});
|
|
435
|
-
},
|
|
442
|
+
}, oe = (n, i) => {
|
|
436
443
|
let { apiGatewayUrl: s } = e();
|
|
437
444
|
return r({
|
|
438
445
|
queryKey: [
|
|
@@ -450,7 +457,7 @@ var a = {
|
|
|
450
457
|
pagination: i ?? o
|
|
451
458
|
}, s)).ecoListReports
|
|
452
459
|
});
|
|
453
|
-
},
|
|
460
|
+
}, $ = (n) => {
|
|
454
461
|
let { apiGatewayUrl: i } = e();
|
|
455
462
|
return r({
|
|
456
463
|
queryKey: a.report(n ?? ""),
|
|
@@ -462,7 +469,7 @@ var a = {
|
|
|
462
469
|
}
|
|
463
470
|
}`, { id: n }, i)).ecoReport
|
|
464
471
|
});
|
|
465
|
-
},
|
|
472
|
+
}, se = () => {
|
|
466
473
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
467
474
|
return n({
|
|
468
475
|
mutationFn: async (e) => (await t(`mutation EcoCreateReport($input: EcoCreateReportInput!) {
|
|
@@ -470,7 +477,7 @@ var a = {
|
|
|
470
477
|
}`, { input: e }, r)).ecoCreateReport,
|
|
471
478
|
onSuccess: () => o.invalidateQueries({ queryKey: a.reports })
|
|
472
479
|
});
|
|
473
|
-
},
|
|
480
|
+
}, ce = () => {
|
|
474
481
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
475
482
|
return n({
|
|
476
483
|
mutationFn: async (e) => (await t(`mutation EcoAddReportLineItem($input: EcoAddReportLineItemInput!) {
|
|
@@ -480,7 +487,7 @@ var a = {
|
|
|
480
487
|
o.invalidateQueries({ queryKey: a.reports }), o.invalidateQueries({ queryKey: a.report(e.reportId) });
|
|
481
488
|
}
|
|
482
489
|
});
|
|
483
|
-
},
|
|
490
|
+
}, le = () => {
|
|
484
491
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
485
492
|
return n({
|
|
486
493
|
mutationFn: async (e) => (await t(`mutation EcoPublishReport($id: ID!, $fileId: ID) {
|
|
@@ -490,7 +497,7 @@ var a = {
|
|
|
490
497
|
o.invalidateQueries({ queryKey: a.reports }), o.invalidateQueries({ queryKey: a.report(e.id) });
|
|
491
498
|
}
|
|
492
499
|
});
|
|
493
|
-
},
|
|
500
|
+
}, ue = () => {
|
|
494
501
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
495
502
|
return n({
|
|
496
503
|
mutationFn: async (e) => (await t(`mutation EcoSubmitReportForApproval($id: ID!) {
|
|
@@ -500,7 +507,7 @@ var a = {
|
|
|
500
507
|
o.invalidateQueries({ queryKey: a.reports }), o.invalidateQueries({ queryKey: a.report(e.id) });
|
|
501
508
|
}
|
|
502
509
|
});
|
|
503
|
-
},
|
|
510
|
+
}, de = () => {
|
|
504
511
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
505
512
|
return n({
|
|
506
513
|
mutationFn: async (e) => (await t(`mutation EcoApproveReport($id: ID!) {
|
|
@@ -510,7 +517,7 @@ var a = {
|
|
|
510
517
|
o.invalidateQueries({ queryKey: a.reports }), o.invalidateQueries({ queryKey: a.report(e.id) });
|
|
511
518
|
}
|
|
512
519
|
});
|
|
513
|
-
},
|
|
520
|
+
}, fe = () => {
|
|
514
521
|
let { apiGatewayUrl: r } = e(), o = i();
|
|
515
522
|
return n({
|
|
516
523
|
mutationFn: async (e) => (await t(`mutation EcoRejectReport($input: EcoRejectReportInput!) {
|
|
@@ -520,7 +527,63 @@ var a = {
|
|
|
520
527
|
o.invalidateQueries({ queryKey: a.reports }), o.invalidateQueries({ queryKey: a.report(e.id) });
|
|
521
528
|
}
|
|
522
529
|
});
|
|
530
|
+
}, pe = (n = {}) => {
|
|
531
|
+
let { apiGatewayUrl: i } = e(), { category: s, metricKey: c, sourceProduct: l, periodStart: u, periodEnd: d, pagination: f } = n;
|
|
532
|
+
return r({
|
|
533
|
+
queryKey: [
|
|
534
|
+
...a.metrics,
|
|
535
|
+
s ?? "",
|
|
536
|
+
c ?? "",
|
|
537
|
+
l ?? "",
|
|
538
|
+
u ?? "",
|
|
539
|
+
d ?? "",
|
|
540
|
+
f ?? o
|
|
541
|
+
],
|
|
542
|
+
queryFn: async () => (await t(`query EcoListMetrics($category: String, $metricKey: String, $sourceProduct: String, $periodStart: DateTime, $periodEnd: DateTime, $pagination: PaginationInput) {
|
|
543
|
+
ecoListMetrics(category: $category, metricKey: $metricKey, sourceProduct: $sourceProduct, periodStart: $periodStart, periodEnd: $periodEnd, pagination: $pagination) {
|
|
544
|
+
items { ${b} }
|
|
545
|
+
pageInfo { cursor hasMore }
|
|
546
|
+
}
|
|
547
|
+
}`, {
|
|
548
|
+
category: s || null,
|
|
549
|
+
metricKey: c || null,
|
|
550
|
+
sourceProduct: l || null,
|
|
551
|
+
periodStart: u || null,
|
|
552
|
+
periodEnd: d || null,
|
|
553
|
+
pagination: f ?? o
|
|
554
|
+
}, i)).ecoListMetrics
|
|
555
|
+
});
|
|
556
|
+
}, me = (n) => {
|
|
557
|
+
let { apiGatewayUrl: i } = e();
|
|
558
|
+
return r({
|
|
559
|
+
queryKey: a.metric(n ?? ""),
|
|
560
|
+
enabled: !!n,
|
|
561
|
+
queryFn: async () => (await t(`query EcoMetric($id: ID!) {
|
|
562
|
+
ecoMetric(id: $id) { ${b} }
|
|
563
|
+
}`, { id: n }, i)).ecoMetric
|
|
564
|
+
});
|
|
565
|
+
}, he = (n = {}) => {
|
|
566
|
+
let { apiGatewayUrl: i } = e(), { category: o, metricKey: s, sourceProduct: c, periodStart: l, periodEnd: u } = n;
|
|
567
|
+
return r({
|
|
568
|
+
queryKey: [
|
|
569
|
+
...a.metricRollups,
|
|
570
|
+
o ?? "",
|
|
571
|
+
s ?? "",
|
|
572
|
+
c ?? "",
|
|
573
|
+
l ?? "",
|
|
574
|
+
u ?? ""
|
|
575
|
+
],
|
|
576
|
+
queryFn: async () => (await t(`query EcoListMetricRollups($category: String, $metricKey: String, $sourceProduct: String, $periodStart: DateTime, $periodEnd: DateTime) {
|
|
577
|
+
ecoListMetricRollups(category: $category, metricKey: $metricKey, sourceProduct: $sourceProduct, periodStart: $periodStart, periodEnd: $periodEnd) { ${ee} }
|
|
578
|
+
}`, {
|
|
579
|
+
category: o || null,
|
|
580
|
+
metricKey: s || null,
|
|
581
|
+
sourceProduct: c || null,
|
|
582
|
+
periodStart: l || null,
|
|
583
|
+
periodEnd: u || null
|
|
584
|
+
}, i)).ecoListMetricRollups
|
|
585
|
+
});
|
|
523
586
|
};
|
|
524
|
-
export {
|
|
587
|
+
export { Q as useEcoAcceptCarbonEntryDraft, ce as useEcoAddReportLineItem, X as useEcoAiDraftCarbonEntries, Z as useEcoAiSuggestEmissionFactor, de as useEcoApproveReport, w as useEcoArchiveSite, L as useEcoArchiveSpecies, K as useEcoCarbonEntries, q as useEcoCarbonTotals, G as useEcoCreateEmissionFactor, H as useEcoCreateHabitatProject, ie as useEcoCreateReductionTarget, se as useEcoCreateReport, E as useEcoCreateSensor, C as useEcoCreateSite, F as useEcoCreateSpecies, j as useEcoCreateThreshold, te as useEcoEmissionFactors, V as useEcoHabitatProject, B as useEcoHabitatProjects, W as useEcoLogRestorationActivity, O as useEcoMeasurements, me as useEcoMetric, he as useEcoMetricRollups, pe as useEcoMetrics, R as useEcoObservations, le as useEcoPublishReport, J as useEcoRecordCarbonEntry, k as useEcoRecordMeasurement, z as useEcoRecordObservation, re as useEcoReductionTargets, ne as useEcoRejectCarbonEntryDraft, fe as useEcoRejectReport, $ as useEcoReport, oe as useEcoReports, T as useEcoSensors, ae as useEcoSetReductionTargetStatus, D as useEcoSetSensorStatus, M as useEcoSetThresholdActive, S as useEcoSite, x as useEcoSites, N as useEcoSpecies, P as useEcoSpeciesDetail, ue as useEcoSubmitReportForApproval, A as useEcoThresholds, U as useEcoTransitionHabitatProject, I as useEcoUpdateSpecies, Y as useEcoVerifyCarbonEntry };
|
|
525
588
|
|
|
526
589
|
//# sourceMappingURL=useEcoImpactHubApi.js.map
|