@burdenoff/microfe-healthybowl 2026.812.5 → 2026.812.7

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.
@@ -0,0 +1,32 @@
1
+ import { useHealthyBowl as e } from "../context/HealthyBowlContext.js";
2
+ import { gql as t } from "@apollo/client";
3
+ import { useQuery as n } from "@apollo/client/react";
4
+ //#region src/healthybowl/hooks/useHealthyBowlQuota.ts
5
+ var r = t`
6
+ query GetHealthyBowlQuotaStatus($context: ContextInput!) {
7
+ getHealthyBowlQuotaStatus(context: $context) {
8
+ quotaName
9
+ label
10
+ used
11
+ limit
12
+ remaining
13
+ noLimit
14
+ exhausted
15
+ }
16
+ }
17
+ `;
18
+ function i() {
19
+ let { workspaceId: t } = e(), i = n(r, {
20
+ variables: { context: { workspaceId: t } },
21
+ skip: !t,
22
+ fetchPolicy: "cache-and-network"
23
+ });
24
+ return {
25
+ ...i,
26
+ quotas: i.data?.getHealthyBowlQuotaStatus ?? []
27
+ };
28
+ }
29
+ //#endregion
30
+ export { i as useHealthyBowlQuota };
31
+
32
+ //# sourceMappingURL=useHealthyBowlQuota.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useHealthyBowlQuota.js","names":[],"sources":["../../../src/healthybowl/hooks/useHealthyBowlQuota.ts"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport { useHealthyBowl } from '../context/HealthyBowlContext';\n\nconst QUOTA_STATUS_QUERY = gql`\n query GetHealthyBowlQuotaStatus($context: ContextInput!) {\n getHealthyBowlQuotaStatus(context: $context) {\n quotaName\n label\n used\n limit\n remaining\n noLimit\n exhausted\n }\n }\n`;\n\nexport interface HealthyBowlQuotaStatus {\n quotaName: string;\n label: string;\n used: number;\n limit: number | null;\n remaining: number | null;\n noLimit: boolean;\n exhausted: boolean;\n}\n\ninterface QuotaData {\n getHealthyBowlQuotaStatus: HealthyBowlQuotaStatus[];\n}\n\nexport function useHealthyBowlQuota() {\n const { workspaceId } = useHealthyBowl();\n const query = useQuery<QuotaData>(QUOTA_STATUS_QUERY, {\n variables: { context: { workspaceId } },\n skip: !workspaceId,\n fetchPolicy: 'cache-and-network',\n });\n return { ...query, quotas: query.data?.getHealthyBowlQuotaStatus ?? [] };\n}\n"],"mappings":";;;;AAIA,IAAM,IAAqB,CAAG;;;;;;;;;;;;;AA4B9B,SAAgB,IAAsB;CACpC,IAAM,EAAE,mBAAgB,GAAgB,EAClC,IAAQ,EAAoB,GAAoB;EACpD,WAAW,EAAE,SAAS,EAAE,gBAAa,EAAE;EACvC,MAAM,CAAC;EACP,aAAa;EACd,CAAC;AACF,QAAO;EAAE,GAAG;EAAO,QAAQ,EAAM,MAAM,6BAA6B,EAAE;EAAE"}