Compare commits

..

29 Commits

Author SHA1 Message Date
Vinícius Lourenço
65eb2d3765 chore(lint): report Monaco features the production build strips 2026-11-25 13:04:46 -03:00
Vinícius Lourenço
b018fdf4a8 perf(web): load only the Monaco languages SigNoz uses 2026-11-25 13:04:46 -03:00
Vinicius Lourenço
d655a8998b perf(web): load Monaco on the first editor mount (#13686)
#### Description

Since #12515, `src/index.tsx` imports Monaco, so every page loads the
whole editor before it renders. Monaco and our setup (workers, themes,
`loader.config`) now load on the first editor mount. The entry chunk
goes from 10.94 MB to 7.19 MB (2.95 MB to 2.00 MB gzipped).

The hook sits on `@monaco-editor/react`'s loader, not on a wrapper
component, so every editor, including ones added later, gets the bundled
Monaco without changing its import. #12697 takes the wrapper route, and
the editors added or moved since it opened bypass it and can fall back
to the CDN.

Storybook's preview imported the setup directly, so it now imports the
loader as well.

#### Issues closed by this PR

Closes #12692

#### Screenshots / Screen Recordings

ClickHouse query editor, main on top and this branch below:

![ClickHouse query
editor](https://github.com/user-attachments/assets/16f807de-6c51-47f1-85a3-5d3cade864aa)

The 31 editor stories render the same in both themes. The differences
left are the role JSON view race that #13671 fixes and Monaco's overview
ruler drawn a moment later.
2026-11-25 15:42:47 +00:00
Vinicius Lourenço
70ab9c2321 perf(web): load each logs, traces and LLM observability tab when it opens (#13695)
#### Description

Logs, Traces and LLM Observability import all of their tabs up front, so
opening the logs explorer also downloads pipelines, and the traces
explorer downloads funnels. Each tab now loads when it opens, using the
per-tab loading state from #13691. Tab URLs and order stay as they are.

Opening each page's default tab, entry included: LLM Observability goes
from 12.45 MB to 11.80 MB, Logs from 11.63 MB to 11.50 MB and Traces
from 11.75 MB to 11.62 MB. The smaller tabs gain more: funnels drops to
10.97 MB. With the entry PRs in, the page shell alone is 2.55 MB.

Part of #10192

#### Screenshots / Screen Recordings

Switching from the traces explorer to funnels in Storybook, main on the
left, with the network slowed to 1.6 Mbps so the loading state is
visible:


https://github.com/user-attachments/assets/a910cbe8-2db8-431e-95a1-586ba6e0e50d

The 141 logs, traces and LLM observability stories render the same in
both themes; the differences left are live tail offsets, toasts and
loading spinners caught on different frames.
2026-11-25 14:20:48 +00:00
Gaurav Tewari
e085decc05 feat: add support for ai alerts (#13268)
#### Description

Frontend for `AI_TRACES_BASED_ALERT` (backend already supports it,
#12783).

- **Alert type:** "AI Trace-based Alert" card on `/alerts/new`, with its
defaults and alert-type map entries. No docs link until an AI docs page
exists.
- **Editor:** AI alerts open only the AI Query Builder tab (traces, no
trace operator), always in the new editor (classic page and its switch
hidden). Preview, condition query, "Group alerts by" and label-key
checks read the AI slot.
- **Query shape:** the editor keeps AI in its own slot
(`builder_ai_query`), like the dashboard panel editor. It converts to
the wire shape (`builder` + `builder_ai_query` envelopes) only on
preview/save, since a rule's `queryType` must be `builder | promql |
clickhouse_sql`. Saved rules are moved back into the AI slot on edit
(`toAISlotQuery`).
- **Dashboard:** Create Alerts is enabled for AI panels. The link keeps
the AI slot, and the alert page detects AI from the query's `queryType`.
- **History:** the alert popover / top contributors show "View AI
Traces" from `relatedAITracesLink`.

#### Issues closed by this PR


Closes
https://github.com/orgs/SigNoz/projects/59/views/18?pane=issue&itemId=283123867&issue=SigNoz%7Cnerve-pod%7C513


#### Screenshots / Screen Recordings



https://github.com/user-attachments/assets/6663a68a-5eea-4920-b30a-205eeba311d3



#### Additional Information

- was Stacked on #13486 (`refactor/ai-explorer-query-type`).
- Not in scope: Create alert from the AI explorer (its query is still in
the tagged shape; to discuss separately)
- SBSHOT -
https://claude.ai/artifact/X2JQRsNXJ8KCNFcmtgFLMd?sk=CHo7GMdRF6MGhUdbE0PkSg

---------

Co-authored-by: Gaurav Tewari <tewarig@users.noreply.github.com>
2026-11-25 13:06:39 +00:00
Abhi kumar
415a74938b feat(dashboard): add the distribution chart (#13536)
#### Description

- Adds the `Distribution` chart: bucket counts as bars over equal-width
bucket slots, groups stacked, side by side or as 100% shares; the
overflow bucket is hatched.
- `TooltipPlugin` / `ChartWrapper`: opt-in `pinOnClick`, so a chart can
pin its tooltip on a click instead of handling it.
- New reusable uPlot `variableWidthBars` path builder; hover focuses the
group under the cursor, as the bar panel does.
- Stacked and percent draw every group. Side by side draws as many as
fit (at most 10) and sums the rest into Other, with Pie's Other label
and colour; the legend keeps every group.
- Percentile markers computed client-side the way `histogram_quantile`
does, drawn as dashed lines with diamond badges; hovering one shows its
value on the x axis. Markers on the same spot share one badge (`p90+`).
- Tooltip in the time-series layout: bucket range and total, the hovered
group above the divider, then every group by count, named by its
group-by value. Over Other it lists the groups Other sums; clicking the
Other bar pins it, as on Pie, and a group can then be picked for
drilldown.
- `jest.config`: `modulePathIgnorePatterns` matched any path containing
`dist`, which silently skipped these tests; now only `<rootDir>/dist/`.

#### Additional Information

- Chart-only, on `main`. Stack: this PR → #13535 (spec) → #13537
(panel).
- The jest change may start running other suites under paths containing
`dist`.
2026-11-25 13:04:51 +00:00
hardik-signoz
af3fd93339 fix(authdomain): stack provider title above description and correct role mapping copy (#13747)
Some checks failed
build-staging / prepare (push) Has been cancelled
build-staging / js-build (push) Has been cancelled
build-staging / go-build (push) Has been cancelled
build-staging / staging (push) Has been cancelled
cacheci / tests (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
#### Description

- Stacks each provider's title above its description in the "Configure
Authentication Method" dialog. They sat inline, so the title ran into
the description, and the Configure buttons started at different x
positions. The text column now fills the row.
- Fixes the group mapping help text. A user in several mapped groups
gets every matching role, not the highest-privilege one.

Before
<img width="565" height="339" alt="image"
src="https://github.com/user-attachments/assets/46016493-ba29-44b5-8012-dd74eddc0a61"
/>

After
<img width="547" height="364" alt="image"
src="https://github.com/user-attachments/assets/59e21df8-0a20-4bc9-97f9-c8d3713173f8"
/>

Before
<img width="1000" height="578" alt="image"
src="https://github.com/user-attachments/assets/d814a2a2-a0aa-40bf-b1c8-e7f476e9e50f"
/>

After
<img width="1011" height="587" alt="image"
src="https://github.com/user-attachments/assets/2775cfca-bc63-4d20-8751-36d6b316e69e"
/>





#### Issues closed by this PR

Closes SigNoz/keystone-pod#233
2026-11-25 08:21:28 +00:00
Ashwin Bhatkal
22a65c4f74 test(frontend): replace DOM traversal in tests with Testing Library queries (#13731)
#### Description

Stacked on [#13729](https://github.com/SigNoz/signoz/pull/13729).

- The 520 DOM lookups left in 148 test files (`querySelector`,
`closest`, `parentElement` and the like) now go through Testing Library:
test IDs first, then role, label or text, scoped with `within`. App
components gain the test IDs this needs.
- A new lint rule, `signoz/no-dom-node-access`, flags these calls in
test files. A test that checks DOM structure on purpose disables it on
that line with a reason; 9 lines do.
- Some checks that could never fail now can: a multi-select filter test
that never typed, role table rows found by a class that matched nothing,
and a query section test whose async loop was never awaited.

#### Issues closed by this PR

Closes https://github.com/SigNoz/pulse-pod/issues/770

#### Additional Information

- antd `Skeleton` drops `data-*`, so a few loading states gain a wrapper
`div` that carries the test ID (AuthCard, ViewRolePage,
WidgetGraphComponent, TraceDetailsHeader). TraceDetailsHeader's skeleton
class moves to that wrapper, with `display: flex` to keep the layout.
2026-11-25 05:16:03 +00:00
Gaurav Tewari
fa1dbe25cb fix(noz): drop the reply bubble colour and add modal and panel stories (#13740)
Some checks failed
build-staging / prepare (push) Has been cancelled
build-staging / js-build (push) Has been cancelled
build-staging / go-build (push) Has been cancelled
build-staging / staging (push) Has been cancelled
cacheci / tests (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
<!--A few plain bullets saying what changed and why, for a reviewer
skimming it - not a wall of text, not a restatement of the diff, not
generated boilerplate.-->
#### Description

- Noz replies lose the grey bubble background in the modal and the side
panel. Width, padding and radius stay as they were; errors keep their
red callout.
- Approval and clarification cards use `border-box`. The modal and panel
portal outside the layout's border-box reset, so the cards ran 26px past
the reply column.
- Adds `Pages/Noz/Modal` and `Pages/Noz/Panel`: every state of the Noz
page story in the ⌘J modal and the floating panel, plus History for the
conversation list behind their headers.

<!--Reference issues using `Closes #issue-number` to enable automatic
closure on merge. -->
#### Issues closed by this PR

<!--If applicable, include screenshots or screen recordings that clearly
show the behavior before the change and the result after the change. -->
#### Screenshots / Screen Recordings

Visual diff (sbshot, both themes):
https://claude.ai/artifact/E1eFXkLUQ6UUvpQ7Mg5SyJ

- 182 pairs at a 0.005 threshold (the grey is below sbshot's default):
53 changed (40 modal, 13 panel), 120 pixel-identical, 9 noise.
- The Noz page and the bottom strip are unchanged.

<!--Anything reviewers should keep in mind while reviewing -->
#### Additional Information

---------

Co-authored-by: Gaurav Tewari <tewarig@users.noreply.github.com>
2026-11-24 23:05:13 +00:00
Vinicius Lourenço
a7d8245f69 perf(web): load the custom range calendar when it opens (#13690)
#### Description

The time picker's custom range calendar shipped in the entry chunk with
`react-day-picker` and part of `date-fns`, although most sessions never
open it. It now loads when the custom range opens. While it loads, a
placeholder sized to the month being shown holds its place, so the
popover does not change size when the calendar arrives. If the chunk is
gone after a deploy, the page reloads once, like the lazy pages do.

The entry chunk shrinks by 72 kB (18 kB gzipped). The calendar is a 72
kB chunk of its own (19 kB gzipped).

Part of #10192

#### Screenshots / Screen Recordings

Opening the custom range in Storybook, main on the left. The network is
slowed to 1.6 Mbps so the placeholder is visible; the popover stays 587
by 403 px on both sides:


https://github.com/user-attachments/assets/09c50af4-2eab-4996-9e40-6b9ea909aba4

The time picker stories, including a new one with the calendar open, are
pixel-identical in both themes.
2026-11-24 17:29:43 +00:00
Ashwin Bhatkal
a51f657ee0 test(frontend): keep library CSS out of jsdom (#13729)
#### Description

Stacked on [#13646](https://github.com/SigNoz/signoz/pull/13646).

- Library CSS (antd's runtime styles, CodeMirror's theme,
`@signozhq/ui`'s injected modules) no longer loads in jest. The app's
own stylesheets were already mocked out. jsdom matched about 2,000 rules
on every `getComputedStyle` call, so one role query could take half a
second.
- The `getComputedStyle` try/catch in `jest.setup.ts` is gone. It caught
a selector error that fired for every element with a React `useId` id
and reported all of them as visible, so tests never saw Base UI's inline
styles.
- The Floating UI and antd scroll-lookup mocks from
[#13645](https://github.com/SigNoz/signoz/pull/13645) are removed, along
with the per-file Floating UI mocks and raised timeouts in the GCP
tests. They only worked around slow `getComputedStyle` calls.
- Jest's default 5 s test timeout is back, undoing
[#13721](https://github.com/SigNoz/signoz/pull/13721), which raised it
to 10 s because multi-step tests ran past 5 s on busy CI runners. The
QuickFilters, InviteMembers and AttributeMappingsTab tests it named took
about 1 s locally on main and now take 140 to 320 ms. No test in the
full local run takes over 500 ms.
- Locally, on top of
[#13646](https://github.com/SigNoz/signoz/pull/13646), the full suite
went from 161 s to 131 s, and tests over 500 ms went from 45 to 5.

#### Issues closed by this PR

Closes https://github.com/SigNoz/pulse-pod/issues/769

#### Additional Information

- Nothing is hidden by CSS in tests anymore, so tests in 6 files
changed. Slider thumbs are found with `{ hidden: true }`, because Base
UI shows them only after measuring layout. The export popover now
unmounts on close (`destroyTooltipOnHide`), the only change outside
tests.
2026-11-24 17:28:07 +00:00
Gaurav Tewari
aaf3d4a20a feat(noz): polish the chat panel, links and approval cards (#13707)
#### Description

From the Nov 23 Noz UI review:

- Links in Noz replies render as `Typography.Link`, the standard product
link, instead of bordered pills.
- The floating panel's default size scales with the screen by one
factor, keeping its 420×601 shape. Up to 1440×900 it stays 420×601;
1920×1080 → 504×721, 2560×1440 → 672×962. Users can still resize it.
- The sidebar labels Noz **Beta** instead of Early Access. The Early
Access badge stays available for other features.
- The floating panel and ⌘J modal headers drop the Noz icon; the chat
title stays.
- Approval and clarification buttons are default size, equal width and
right-aligned (secondary left, primary right) instead of full width. An
approval without a diff puts its summary beside the buttons, wrapping
them under it when the card is narrow.
- Deletes the unused `AIAssistantDrawer` (nothing imported it since the
floating panel replaced it).
- Stories: new `Pages/Noz › Awaiting Delete Approval` and an "Approval
diff" control for the no-diff approval. Existing stories cover the rest:
`Pages/Noz` (links, `Awaiting Approval`, `Awaiting Clarification`),
`Foundations/Bottom Strip › Noz Panel` (panel and header),
`Foundations/App Layout` (sidebar).

#### Issues closed by this PR

#### Screenshots / Screen Recordings

[Visual diff](https://claude.ai/artifact/HevyMtVoVnhqhbE94XCoxA) of the
Noz, Bottom Strip and App Layout stories, dark and light, merge-base →
head: 80 pairs, 69 changed, 2 new, 9 identical. Every change is from
this PR or noted as capture noise.

#### Additional Information

- The 1440×900 reference is an assumption. Change `DESIGN_SCREEN` in
`AIAssistantPanel.tsx` if the Figma frame differs.

---------

Co-authored-by: Gaurav Tewari <tewarig@users.noreply.github.com>
2026-11-24 17:14:01 +00:00
Gaurav Tewari
54158d633d test(e2e): cover noz chat flows against a fake AI service (#13714)
#### Description

- Adds e2e coverage for Noz without an AI backend:
`tests/noz/chat.spec.ts` covers opening a chat from the side nav, send →
reply, reload, follow-up in the same thread, new chat + history, and
asking from Logs Explorer (page context sent).
- Noz is enabled per test via `page.route`: the global config gets
`ai_assistant_url` pointed at a fake AI service, so the shared stack
keeps Noz off.
- The fake is typed from `@signozhq/noz-client`, so an AI API change
fails `tsc`. The `SSEEvent` union moves to a types-only `sseEvent.ts`;
e2e can't import `chat.ts`, whose frontend-only imports don't resolve
there.
- Adds the testids the specs need: `conversation-view` and
`ai-conversation-item-<id>`.

#### Issues closed by this PR

Closes SigNoz/nerve-pod#662

#### Screenshots / Screen Recordings

#### Additional Information

- Stacked on #13526.
- `@signozhq/noz-client` is a type-only dev dependency in e2e; pnpm
auto-installs its peers (react, axios, react-query) into the e2e
lockfile. Turning that off would also drop eslint, which
`eslint-plugin-playwright` needs.
- With the CI budget, 6/6 pass, plus 18/18 over `--repeat-each=3`. Each
test fails when the behaviour it covers is broken.

---------

Co-authored-by: Gaurav Tewari <tewarig@users.noreply.github.com>
2026-11-24 17:04:28 +00:00
Ashwin Bhatkal
09d905edc4 test(frontend): rewrite slow and flaky jest tests to the test rules (#13646)
Some checks failed
build-staging / prepare (push) Has been cancelled
build-staging / js-build (push) Has been cancelled
build-staging / go-build (push) Has been cancelled
build-staging / staging (push) Has been cancelled
cacheci / tests (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
#### Description

Stacked on [#13645](https://github.com/SigNoz/signoz/pull/13645).

- 57 slow or flaky test files are rewritten to the test rules.
- These files find elements through Testing Library only (`screen`,
`within`), never `querySelector`, `closest` or `container`. Source files
gain the test IDs this needs, and the onboarding sliders and two selects
gain the accessible names they were missing.
- Locally the full suite went from 271 s to about 160 s, and tests over
1 s went from 75 to 5.

#### Issues closed by this PR

Closes https://github.com/SigNoz/pulse-pod/issues/768
2026-11-24 15:27:58 +00:00
Ashwin Bhatkal
d473d022b0 test(frontend): speed up the jest setup and add test rules that keep tests fast (#13645)
#### Description

- The test setup turns off three DOM walks that jsdom does slowly:
user-event's pointer-events check, Floating UI positioning, and antd's
scroll-container lookup.
- The test rule adds a 500 ms budget per test and bans `*ByRole` inside
`waitFor` and raised timeouts. The agent guide runs checks only at the
gate, and `no checks` skips them while iterating.
- Local jest runs use at most 4 workers and restart any worker that
grows past 1 GB. CI keeps its default worker count.

#### Issues closed by this PR

Closes https://github.com/SigNoz/pulse-pod/issues/767

#### Additional Information

These rules depart from Testing Library's defaults on purpose. Each one
gives up a check for speed:

- Tests find elements by test ID instead of by role. Testing Library
ranks `getByTestId` last, but `getByRole` walks the accessibility tree
on every call. That makes it the slowest query on large pages. A test no
longer fails when a control has no accessible name.
- Tests render the component that owns the behaviour instead of the
whole page, and click-through flows move to e2e. A bug in the wiring
between components needs a page-level test or e2e to catch it.
- user-event's pointer-events check is off in every test.
`jest.setup.ts` swaps the package for a wrapper, so a direct import of
`@testing-library/user-event` gets it too. A click on a button hidden
under an overlay now passes.
- `@floating-ui/dom` returns position 0,0 without measuring. jsdom has
no layout, so the real numbers were meaningless anyway.
- antd's scroll-container lookup is mocked through an internal path,
`@rc-component/trigger/lib/util`. If antd renames the function, the
speedup stops without an error. The mock goes when antd does.
2026-11-24 13:58:48 +00:00
Tushar Vats
1664c29cf4 fix(fields): resolve field value names like the query builder (#13423)
#### Description

Fixes how `/api/v1/fields/values` finds the key for `name`.

##### How `name` is read now

| Request | Keys looked up, in order |
|---|---|
| `name=log.level` | `log.level` in any context, then the log field
`level` |
| `name=resource.service.name` | `resource.service.name` in any context,
then the resource `service.name` |
| `name=attribute.resource.service.name` |
`attribute.resource.service.name` in any context, then the attribute
`resource.service.name` (only the first prefix is a context) |
| `name=attribute.key&fieldContext=attribute` | attribute
`attribute.key` only (context given, name used as is) |
| `name=service.name:string` | `service.name` with type `string` |
| `name=user.id:string&fieldDataType=string` | `user.id:string` (type
given, suffix stays in the name) |

When a name has two readings, values of the prefixed name come first and
win the limit.

##### Other fixes

- `searchText` is no longer read as a key. A search like `log.x` used to
change the context.
- Metric attributes are now found with `fieldContext=attribute`. They
are stored as `point`, not `tag`.
- A data type no longer hides metric attribute values. The filter
compared `string` with the stored `String`; metric attributes are all
strings, so it is dropped, as the keys lookup already does.
- Related values (`existingQuery`) skip rows that don't have the key.
Those rows used to come back as empty strings and fill the limit.
- Number search now works for `int64` and `float64` keys too.

#### Tests

- Unit tests in `field_test.go` and `metadata_query_test.go`.
- New integration tests in `quickfilter/` (`02`, `03`, `04`). They also
check that unknown keys return nothing, and that values cover every key
a name can mean.
- Field keys and values tests moved into `quickfilter/` from
`queriercommon` and `queriermetrics`.
#### Additional Information

Values cover every key a name can mean, so some can match nothing in a
filter on the same name. The filter reads one key; this is accepted:

- A name stored as both resource and attribute (`service.name`): the
filter reads the resource key and warns.
- `resource.x` and `attribute.x`: the filter never reads a key stored
under the prefixed name, and does not warn when the stripped key also
exists.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-11-24 12:04:27 +00:00
ashu8912
f4bc90da34 feat(alerts): add Enabled and Recently viewed rule views (#13626)
This PR also adds sort by status and run queries on blur

#### Description

- Renames the State dropdown to **Status** and moves it first in the
filters row, ahead of Created by and Updated. Filtering by status from
the DSL is on hold (SigNoz/pulse-pod#750).
- Adds two rail views: **Enabled** (every state except disabled) and
**Recently viewed** (rules opened from the list, in visit order, kept in
the browser like dashboards' Recently viewed).
- Sorts the alert rules table by status by default, firing first
(`sort=state&order=desc`). Saved views keep their own sort.
- Leaving the query box with an unrun draft (e.g. terms picked from
suggestions) now runs it. The fix is in the shared `SearchBar`, so it
applies to dashboards too. A blur from switching tabs or windows doesn't
run it.

#### Issues closed by this PR

Closes SigNoz/pulse-pod#749

#### Screenshots / Screen Recordings

[Visual diff](https://claude.ai/artifact/RhoUKk7x88kGQFBfsRkaxs):
`Pages/Alerts/Rules` and `Pages/Dashboards/List/Default`, merge-base vs
branch, dark and light. Taken before the Status filter was restored;
`StateFilterOpen` was since restored. Every rules story moves with the
rail and the firing-first sort. The dashboards list differs only by a
timestamp second (noise).

#### Additional Information

- Recently viewed fetches one 200-row page (the API max) and filters it
in the browser, since the API has no id filter.
- The default sort shows no arrow in the table header, as before.
- Stories: `EnabledView` and `RecentlyViewed` added. The story mock now
sorts by status like the backend.
2026-11-24 09:39:36 +00:00
Abhi kumar
02de020642 fix(dashboard): stop clipping query builder autocomplete in panel view modal (#13733)
Some checks failed
build-staging / prepare (push) Has been cancelled
build-staging / js-build (push) Has been cancelled
build-staging / go-build (push) Has been cancelled
build-staging / staging (push) Has been cancelled
cacheci / tests (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
#### Description

- In the panel View modal, the where-clause and aggregation autocomplete
was clipped at the query builder's edge and looked hidden behind the
chart.
- Two `overflow: auto` wrappers clipped it: the modal's `.queryBuilder`
and the shared editor pane's container. The modal already scrolls, so
both now let the dropdown overflow.
- The full-page editor keeps its own scroll area; the override applies
only when `stickyHeader` is off (View modal only).

Before:

<img width="2056" height="1329" alt="image"
src="https://github.com/user-attachments/assets/88477a6a-edcf-4c1b-b624-d0759bfe50e1"
/>

After: 

<img width="2056" height="1329" alt="image"
src="https://github.com/user-attachments/assets/7e8f028d-2e88-4881-8c2e-f670947087e8"
/>

#### Issues closed by this PR

Closes SigNoz/pulse-pod#773
2026-11-24 08:28:24 +00:00
ashu8912
570e622a46 fix(alerts): keep the list query bar visible when there is nothing to list (#13622)
#### Description

- The alert rules and dashboards lists hid their header (title, count,
DSL query bar, filters) when the workspace was empty, so the query
runner only appeared once there was data or a query.
- Both lists now render the header through a shared `ListHeaderZone`
(`components/ListViews`), always, with the empty state below it. The two
pages' duplicate header styles are gone.
- The alert empty state drops its own "Alert Rules" heading, which would
repeat the header's.

#### Issues closed by this PR

Closes SigNoz/pulse-pod#746

#### Screenshots / Screen Recordings

[Visual diff](https://claude.ai/artifact/EkmPBu3SGz61yB5hwww82W):
`Pages/Alerts/Rules/No Rules` and `Pages/Dashboards/List/Empty
Workspace`, merge-base vs branch, dark and light: 4 changed.

#### Additional Information

- Both stories already cover the empty state; no story edit needed.
- Touches `AlertsEmptyState.module.scss` next to #13619's change;
whichever merges second may need a small conflict fix.
2026-11-24 07:43:31 +00:00
Abhi kumar
381cda6821 feat(dashboard): heatmap panels for logs and traces (#13638)
#### Description

- Heatmap panels now take logs and traces queries. The aggregation is
the bare numeric field the querier buckets (e.g. `duration_nano`),
picked from a numeric-field select that searches the server.
- No default field: a logs or traces heatmap waits until a field is
picked.
- Switching panel kinds keeps the field: `avg(x)` / `pNN(x)` enters a
heatmap as `x` and leaves as `p90(x)`; an order-by on the aggregation
(or its alias) follows it.
- The tooltip names what the grid buckets, e.g. `Traces ·
duration_nano`.

Closes https://github.com/SigNoz/pulse-pod/issues/741


https://github.com/user-attachments/assets/a3edba7a-cd6b-499a-8894-89ddc5bfab51


https://github.com/user-attachments/assets/885e6950-be51-42cf-af57-f3ff3347e4b3
2026-11-24 06:47:53 +00:00
Tushar Vats
9dbe4db00e chore(claude): forbid copying structs through a pointer dereference (#13713)
#### Description

- Adds a Go rule: never copy a struct through a pointer dereference
(`copied := *original`).
- Such a copy is shallow. Pointer, slice and map fields stay shared, so
changing the copy can change the original.
- Use the type's `Copy()` when it has one; otherwise create a new struct
literal from the needed fields.
- `Copy()` methods themselves may dereference, as long as they then
replace every pointer, slice and map field.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-11-24 06:38:42 +00:00
Tushar Vats
da35d99714 test(frontend): raise jest test timeout to 10s (#13721)
#### Description

- Multi-step `userEvent` tests (open a drawer, click, save, wait for the
refetch) pass Jest's default 5s on busy CI runners and fail with
`Exceeded timeout of 5000 ms`, though nothing is wrong.
- `jsci` failed three times on SigNoz/signoz#13713, a rules-only change,
each time on different tests (`QuickFilters`, `InviteMembers`,
`PricedModelsTab`, `AttributeMappingsTab`).
- Raises the default `testTimeout` to 10s. Tests with their own timeout
keep it; a truly hung test now takes 10s to fail.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 05:58:08 +00:00
Vinicius Lourenço
f955bb952a perf(settings): load each settings and alert details tab when it opens (#13694)
#### Description

Settings and alert details import every tab up front, so opening
Settings downloads billing (chart.js, uPlot, `moment-timezone`), service
accounts (CodeMirror) and every other tab before the one you asked for
renders. Each tab now loads when it opens, using the per-tab loading
state from #13691. Tab URLs, order, permissions and license checks stay
as they are.

Opening Settings goes from 11.76 MB to 10.95 MB on main today (3.19 MB
to 2.95 MB gzipped), and to 2.55 MB (0.77 MB gzipped) once the entry PRs
are in. The first time a tab opens in a session it shows a short spinner
beside the settings menu.

The ingestion page relied on the `.learn-more` style that the MCP server
tab happened to load; it now imports it itself.

Part of #10192

#### Screenshots / Screen Recordings

Opening Settings pages in Storybook, main on the left. The network is
slowed to 1.6 Mbps so the loading state is visible; at 4 Mbps a page
shows in about 0.3 s:


https://github.com/user-attachments/assets/02da6227-5dac-43a2-b6fe-dfd4968a009b

Across the 188 Settings and alert stories, the tabs render the same in
both themes once loaded, apart from a focus ring left on the members
search and a 1px edge in the role JSON panel. The other differences are
toasts and play steps caught at different moments.
2026-11-24 03:57:36 +00:00
Gaurav Tewari
cb0adcc618 refactor(ai-assistant): import assistant types from @signozhq/noz-client (#13526)
Some checks failed
cacheci / tests (push) Has been cancelled
build-staging / prepare (push) Has been cancelled
build-staging / js-build (push) Has been cancelled
build-staging / go-build (push) Has been cancelled
build-staging / staging (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
#### Description

- AI Assistant DTOs and enums now come from the `@signozhq/noz-client`
package (pinned `1.12.2`) instead of a generated copy in
`src/api/ai-assistant/`. The API spec lives in the assistant repo, so
bumping a package version replaces hand-syncing the files on every
release.
- Deleted `sigNozAIAssistantAPI.schemas.ts` and the unused orval hooks
in `index.ts`. `chat.ts` (REST + SSE client) stays and keeps using
`AIAssistantInstance`.
- Only types and enums are imported, so the package's hooks and
`setGeneratedAPIInstance` are not wired.

#### Issues closed by this PR


https://github.com/orgs/SigNoz/projects/59/views/18?pane=issue&itemId=315100999&issue=SigNoz%7Cnerve-pod%7C677

#### Screenshots / Screen Recordings

#### Additional Information

- The package exports the same schemas as the deleted file, plus
`ReadinessChecksDTODrain`.

---------

Co-authored-by: Gaurav Tewari <tewarig@users.noreply.github.com>
2026-11-23 18:36:19 +00:00
Vinicius Lourenço
b14b634bce perf(web): keep the tab bar while a lazy tab loads (#13691)
#### Description

Pages with tabs (Settings, Logs, Traces, Metrics and others) render them
through `RouteTab`, which mounts only the active tab but receives every
tab's component already imported. To let a page load each tab when it
opens, a tab has to be able to suspend. Each tab pane now has its own
loading boundary, so a tab that is still loading shows a spinner under
the tab bar instead of the whole page turning into one.

Nothing changes on its own: no tab is lazy yet. The pages follow in
separate PRs per owner, and with them and the entry PRs in, opening
Settings goes from 11.76 MB to 2.55 MB (3.19 MB to 0.77 MB gzipped).

The jest setup's `getComputedStyle` fallback now returns a width and
height, since tables mounted inside a lazy pane crashed without them.

Part of #10192

#### Screenshots / Screen Recordings

Settings with its pages loading on demand through this change (the
follow-up PR), in Storybook with the network slowed to 1.6 Mbps, main on
the left:


https://github.com/user-attachments/assets/d22bf877-1ff8-4d25-a4eb-85a0a046998c
2026-11-23 17:48:51 +00:00
Vinicius Lourenço
7ea0d57417 fix(roles): keep the editor loading until the role's grants are in local state (#13671)
Some checks failed
build-staging / staging (push) Has been cancelled
build-staging / prepare (push) Has been cancelled
build-staging / js-build (push) Has been cancelled
build-staging / go-build (push) Has been cancelled
cacheci / tests (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
#### Description

Opening a role's JSON view from a link or after a reload
(`/settings/roles/:id/edit?viewMode=json`) could show `[]` instead of
the role's grants, and saving then replaced them with whatever was
typed. It happened whenever the permission check answered before the
role fetch.

The editor reads its value only once, when it mounts, so the page now
stays in its loading state until the fetched role is in local state.
2026-11-23 14:26:30 +00:00
Nikhil Soni
1e08a94ab8 fix: application support for clickhouse 26.8 (#13371)
#### Description

Part of SigNoz/platform-pod#3428.

- Run every integration suite against ClickHouse `26.8.34` (SQLite only,
non-blocking) to catch upgrade issues early.
- Bump the collector to `v0.144.17` for
SigNoz/signoz-otel-collector#990: 26.8 rejects the migrator's `CREATE`
of AggregatingMergeTree tables with plain columns outside the sorting
key.
- Pin `use_variant_as_common_type=0`: 26.8 turns mismatched types into
`Variant` instead of the no-common-type error. Handling `Variant`
results instead is tracked in SigNoz/events-pod#271.
- Drop `avg(timestamp)` from the pinned unsupported aggregations: 26.8
averages `DateTime64` into an instant.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01X3AdVnw3X4N8Knhw8Yghtv
2026-11-23 13:24:36 +00:00
Vinicius Lourenço
cbfbb103af fix(web): correct the CSS modules guide, forbid component overrides, replace undefined tokens (#13697)
## Description

The CSS modules guide told us to write `:local(@keyframes name)`, and
Greptile now flags plain `@keyframes` in review because of it. That form
doesn't compile (Sass fails with `expected selector`), and it isn't
needed: CSS Modules already scope `@keyframes` in a `.module.scss` file.

While checking the rest of the guide against `@signozhq/ui` and the
design tokens, I fixed two more things that don't exist or don't behave
as written. The `--periscope-font-size-*` and `--font-size-*` tokens
aren't defined anywhere, so the checklist now points at the text style
tokens. And a nested `.icon` inside `.button` compiles to `.button
.icon`, so it is scoped under `.button`, contrary to what the comment
said.

The app had the same problem: the AI assistant, the Top List panel and
the Geo Map tooltip used `--periscope-font-size-*`, `--font-size-*` and
`--font-weight-*` tokens that were never defined, so their text fell
back to whatever size and weight it inherited. They now use the
typography tokens, so small labels render at 11px and medium or semibold
text gets its weight back. Expect those surfaces to look slightly
different.

The guide also taught how to override `@signozhq/ui` components through
their CSS variables and `data-*` attributes, and several of the
variables it listed didn't exist. That section now says not to override
them at all: use the component's props, put layout on a wrapper you own,
and when the component can't do what the design needs, file a UI
suggestion in `SigNoz/uforge-pod` instead of restyling it locally.
`frontend/CLAUDE.md` says the same, so agents stop writing overrides.

## Screenshots

AI assistant thread list: group headers and timestamps drop to 11px,
headers get bolder.
![AI assistant thread list, before and
after](https://github.com/user-attachments/assets/97d85d76-95d1-4793-b968-049ba21b11d1)

AI assistant suggested actions: the label drops to 11px, the action
buttons grow to 13px.
![AI assistant suggested actions, before and
after](https://github.com/user-attachments/assets/bc115d6d-2a95-47c5-8aeb-8d8da62cbd7a)

Geo Map tooltip: the place name goes to 13px medium, the code, label and
value to 11px.
![Geo Map tooltip, before and
after](https://github.com/user-attachments/assets/12b54137-2310-4e0b-976b-ac94e7ad364c)

Top List: the value column goes from regular to medium weight.
![Top List values, before and
after](https://github.com/user-attachments/assets/f90222b0-d256-499d-90b7-03065676886d)
2026-11-23 13:17:32 +00:00
Swapnil Nakade
fbca5e7d80 feat(auditor): add tls to the kafka auditor (#13710)
<!--A few plain bullets saying what changed and why, for a reviewer
skimming it - not a wall of text, not a restatement of the diff, not
generated boilerplate.-->
#### Description
- Adds `auditor::kafka::tls` (`enabled`, `ca_file`, `cert_file`,
`key_file`) so the Kafka auditor can connect to brokers that require TLS
or mTLS, such as Redpanda's internal listener in TLS deployments.

<!--Reference issues using `Closes #issue-number` to enable automatic
closure on merge. -->
#### Issues closed by this PR
closes https://github.com/SigNoz/keystone-pod/issues/225
2026-11-23 10:57:46 +00:00
4520 changed files with 46072 additions and 49319 deletions

View File

@@ -9,12 +9,14 @@ paths:
Examples and the harness API live in [`frontend/src/tests/README.md`](../../frontend/src/tests/README.md).
- **Import from the harness.** `render`, `screen`, `userEvent`, `waitFor` and the rest come from `tests/test-utils`, never from `@testing-library/react`. The harness mounts the router, React Query, Redux, app context and preferences. When it can't do what a test needs, extend `tests/test-utils` instead of importing around it.
- **Find elements by test ID.** Query with `getByTestId`/`findByTestId` on the `data-testid` or `testId` the component exposes, and add one to the component when it has none. Fall back to role or text only for markup the app doesn't own. A test ID matches exactly one element and survives copy and markup changes; `getByRole` computes the accessibility tree on every call and is the slowest query.
- **Interact like a user.** `const user = userEvent.setup({ pointerEventsCheck: 0 })`, then an awaited `user.click`, `hover`, `keyboard` or `type`. `fireEvent` only for events `userEvent` has no equivalent for: scroll, resize, setting `scrollTop`.
- **Find elements by test ID.** Query with `getByTestId`/`findByTestId` on the `data-testid` or `testId` the component exposes, and add one to the component when it has none. Fall back to role or text only for markup the app doesn't own. A test ID matches exactly one element and survives copy and markup changes; `getByRole` checks the computed style of every element it visits and is the slowest query. Always go through Testing Library (`screen`, `within`), never the DOM: no `querySelector`, `closest`, `container` or `document.body`. `signoz/no-dom-node-access` flags the DOM calls in test files; a test that checks DOM structure on purpose disables it on that line with a reason. Never call a `*ByRole` query inside `waitFor` or a loop: `waitFor` re-runs its callback every 50 ms. Wait with `findByTestId`, then query.
- **Interact like a user.** `const user = userEvent.setup()`, then an awaited `user.click`, `hover`, `keyboard` or `type`. The harness turns off the pointer-events check: Base UI popups sit inside an element with an inline `pointer-events: none`, and the stylesheet that turns it back on for the popup never loads in jsdom, so the check would block every click on them. Never turn it back on. `fireEvent` only for events `userEvent` has no equivalent for: scroll, resize, setting `scrollTop`.
- **Fake timers per test only**, for debounce or throttle, with `userEvent.setup({ advanceTimers: (ms) => jest.advanceTimersByTime(ms) })`. Never global.
- **Network through MSW.** The global server runs for every test; override per test with `server.use(...)` from `mocks-server/server`. Large fixtures go in `mocks-server/__mockdata__`.
- **Router through the harness.** Pass `initialRoute`/`routePath` to `render` and assert with `getCurrentLocation()` from `lib/router/navigation`. Never mock `react-router`, `react-router-dom` or `lib/history`; when a test can't render at a route, use the `lib/router` spies in `tests/router-mocks`.
- **Mock only business boundaries.** Local `jest.mock` for API modules, custom hooks and domain components. Never re-mock what the harness provides or what `jest.config.ts` maps (`uplot`, `@signozhq/icons`, `useSafeNavigate`, `logEvent`).
- **Mock only business boundaries.** Local `jest.mock` for API modules, custom hooks and domain components. Never re-mock what the harness provides (`@testing-library/user-event` in `jest.setup.ts`) or what `jest.config.ts` maps (`uplot`, `@signozhq/icons`, `useSafeNavigate`, `logEvent`).
- **Type mocks and fixtures.** `jest.mocked(fn)` for module mocks, `jest.fn() as jest.MockedFunction<T>` for a standalone mock you configure or assert on. Fixtures carry their real type, from `src/api/generated` where it exists. No `any`, no `as unknown as`. An inline `onX={jest.fn()}` on a typed prop that is never asserted needs no annotation.
- **A test fails without its change.** Revert the change, or break the line under test, and run the test before you finish: it must fail. Assert the specific outcome (exact text, request payload, call arguments), never only that an element exists.
- **One behaviour per test, at the smallest render.** Render the component that owns the behaviour, not the page around it, unless the page wiring is the behaviour. A flow of steps (a wizard, a multi-step form) becomes one test per step that starts at that step through props, store or route. A full click-through belongs in the e2e suite (`tests/e2e`).
- **Each test under 500 ms.** `pnpm jest <file> --verbose` prints each test's time. CI runs about four times slower than a laptop, and the timeout is 5 s. Never raise a timeout (`jest.setTimeout`, a third argument to `it`) to make a slow test pass; slim the test instead.
- **A test fails without its change.** At the gate in [`frontend/AGENTS.md`](../../frontend/AGENTS.md), revert the change, or break the line under test, and run the test: it must fail, and each test must stay under 500 ms. Assert the specific outcome (exact text, request payload, call arguments), never only that an element exists.
- **No limit on tests per file.** Split a file when it mixes unrelated behaviour, not to hit a count.

View File

@@ -15,3 +15,4 @@ paths:
- When defining types, keep the structure of file to have any constants and variables first, then exported types and exported methods and then finally the unexported types and methods.
- Never import types or other modules in migration files, duplicate the required type or method to keep migration free from changes.
- Always run the gofmt tool for formating beforing commiting any changes.
- **Never copy through a pointer dereference** (`copied := *original`). It copies only the top level: pointer, slice and map fields stay shared, so changing the copy can change the original. Use the type's `Copy()` when it has one (`QueryBuilderFormula.Copy`); otherwise create a new struct literal from the fields you need. A `Copy()` itself may dereference, as long as it then replaces every pointer, slice and map field.

View File

@@ -94,7 +94,7 @@ jobs:
postgres:15 \
clickhouse/clickhouse-server:25.12.5 \
clickhouse/clickhouse-keeper:25.12.5 \
signoz/signoz-otel-collector:v0.144.16-rc.1 \
signoz/signoz-otel-collector:v0.144.17 \
wiremock/wiremock:2.35.1-1 \
| xargs -P 0 -n 1 docker pull -q
- name: python

View File

@@ -85,13 +85,18 @@ jobs:
- wal
clickhouse-version:
- 25.12.5
- 26.8.34
signoz-otel-collector-version:
- v0.144.16-rc.1
- v0.144.17
postgres-version:
- 15
exclude:
- sqlstore-provider: postgres
clickhouse-version: 26.8.34
if: |
((github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork && github.event.pull_request.user.login != 'dependabot[bot]' && ! contains(github.event.pull_request.labels.*.name, 'safe-to-test')) ||
(github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe-to-test'))) && contains(github.event.pull_request.labels.*.name, 'safe-to-integrate')
continue-on-error: ${{ matrix.clickhouse-version == '26.8.34' }}
runs-on: ubuntu-latest
steps:
- name: checkout

View File

@@ -474,6 +474,14 @@ auditor:
compression: lz4
# The maximum time to drain buffered events on shutdown. Undelivered events are dropped after it.
shutdown_timeout: 30s
tls:
# Whether to connect to the brokers over TLS.
enabled: false
# The PEM CA bundle that verifies broker certificates. Empty uses the system roots.
ca_file: ""
# The client certificate and key, for brokers that require client auth. Set both or neither.
cert_file: ""
key_file: ""
##################### Cloud Integration #####################
cloudintegration:

View File

@@ -16274,13 +16274,22 @@ paths:
where it is case-sensitive and % and _ act as wildcards. For keys, a context
prefix such as resource.service.name sets fieldContext when it is empty.'
type: string
- description: The key whose values to return, such as service.name. A context
prefix such as resource.service.name sets fieldContext when it is empty.
- description: 'The key whose values to return, such as service.name. With fieldContext
set, it is the stored name as is. Otherwise a context prefix such as resource.service.name
sets the context and a type suffix such as service.name:string sets fieldDataType
when that is empty; as in filter expressions, a prefixed name also matches
a key stored under the full name, whose values come first: log.level returns
values of a key named log.level, then of the log field level.'
in: query
name: name
schema:
description: The key whose values to return, such as service.name. A context
prefix such as resource.service.name sets fieldContext when it is empty.
description: 'The key whose values to return, such as service.name. With
fieldContext set, it is the stored name as is. Otherwise a context prefix
such as resource.service.name sets the context and a type suffix such
as service.name:string sets fieldDataType when that is empty; as in filter
expressions, a prefixed name also matches a key stored under the full
name, whose values come first: log.level returns values of a key named
log.level, then of the log field level.'
type: string
- description: Filter expression already applied in the explorer. When set,
relatedValues lists the values seen on data matching it.
@@ -28927,13 +28936,22 @@ paths:
where it is case-sensitive and % and _ act as wildcards. For keys, a context
prefix such as resource.service.name sets fieldContext when it is empty.'
type: string
- description: The key whose values to return, such as service.name. A context
prefix such as resource.service.name sets fieldContext when it is empty.
- description: 'The key whose values to return, such as service.name. With fieldContext
set, it is the stored name as is. Otherwise a context prefix such as resource.service.name
sets the context and a type suffix such as service.name:string sets fieldDataType
when that is empty; as in filter expressions, a prefixed name also matches
a key stored under the full name, whose values come first: log.level returns
values of a key named log.level, then of the log field level.'
in: query
name: name
schema:
description: The key whose values to return, such as service.name. A context
prefix such as resource.service.name sets fieldContext when it is empty.
description: 'The key whose values to return, such as service.name. With
fieldContext set, it is the stored name as is. Otherwise a context prefix
such as resource.service.name sets the context and a type suffix such
as service.name:string sets fieldDataType when that is empty; as in filter
expressions, a prefixed name also matches a key stored under the full
name, whose values come first: log.level returns values of a key named
log.level, then of the log field level.'
type: string
- description: Filter expression already applied in the explorer. When set,
relatedValues lists the values seen on data matching it.

View File

@@ -2,7 +2,10 @@ package kafkaauditor
import (
"context"
"crypto/tls"
"crypto/x509"
"log/slog"
"os"
"github.com/twmb/franz-go/pkg/kgo"
"github.com/twmb/franz-go/plugin/kslog"
@@ -10,6 +13,7 @@ import (
"github.com/SigNoz/signoz/pkg/auditor"
"github.com/SigNoz/signoz/pkg/auditor/auditorserver"
"github.com/SigNoz/signoz/pkg/errors"
"github.com/SigNoz/signoz/pkg/factory"
"github.com/SigNoz/signoz/pkg/licensing"
"github.com/SigNoz/signoz/pkg/types/audittypes"
@@ -39,13 +43,25 @@ func newProvider(_ context.Context, providerSettings factory.ProviderSettings, c
// Acks from all in-sync replicas, idempotent writes and unbounded record retries are franz-go defaults and are kept as is.
// A delivery timeout or retry limit lets franz-go < v1.22.2 ack a record that was never written (twmb/franz-go#1484).
client, err := kgo.NewClient(
opts := []kgo.Opt{
kgo.SeedBrokers(config.Kafka.Brokers...),
kgo.ClientID(config.Kafka.ClientID),
kgo.ProducerBatchCompression(compressionCodec(config.Kafka.Compression)),
kgo.ProducerLinger(0),
kgo.WithLogger(kslog.New(settings.Logger())),
)
}
if config.Kafka.TLS.Enabled {
tlsConfig, err := newTLSConfig(config.Kafka.TLS)
if err != nil {
return nil, err
}
// franz-go sets ServerName per broker from the dialed address.
opts = append(opts, kgo.DialTLSConfig(tlsConfig))
}
client, err := kgo.NewClient(opts...)
if err != nil {
return nil, err
}
@@ -130,3 +146,30 @@ func compressionCodec(name string) kgo.CompressionCodec {
return kgo.NoCompression()
}
}
func newTLSConfig(config auditor.TLSConfig) (*tls.Config, error) {
tlsConfig := &tls.Config{}
if config.CAFile != "" {
caPEM, err := os.ReadFile(config.CAFile)
if err != nil {
return nil, errors.WrapInvalidInputf(err, errors.CodeInvalidInput, "cannot read auditor::kafka::tls::ca_file")
}
tlsConfig.RootCAs = x509.NewCertPool()
if !tlsConfig.RootCAs.AppendCertsFromPEM(caPEM) {
return nil, errors.NewInvalidInputf(errors.CodeInvalidInput, "auditor::kafka::tls::ca_file %q holds no PEM certificate", config.CAFile)
}
}
if config.CertFile != "" {
cert, err := tls.LoadX509KeyPair(config.CertFile, config.KeyFile)
if err != nil {
return nil, errors.WrapInvalidInputf(err, errors.CodeInvalidInput, "cannot load auditor::kafka::tls::cert_file and auditor::kafka::tls::key_file")
}
tlsConfig.Certificates = []tls.Certificate{cert}
}
return tlsConfig, nil
}

View File

@@ -0,0 +1,269 @@
package kafkaauditor
import (
"context"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
"math/big"
"net"
"os"
"path/filepath"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/twmb/franz-go/pkg/kfake"
"github.com/twmb/franz-go/pkg/kgo"
"github.com/SigNoz/signoz/pkg/auditor"
"github.com/SigNoz/signoz/pkg/errors"
"github.com/SigNoz/signoz/pkg/instrumentation/instrumentationtest"
"github.com/SigNoz/signoz/pkg/types/audittypes"
"github.com/SigNoz/signoz/pkg/types/coretypes"
"github.com/SigNoz/signoz/pkg/version"
)
func TestExport_MutualTLS(t *testing.T) {
certificates := newTestCertificates(t)
cluster, err := kfake.NewCluster(
kfake.NumBrokers(1),
kfake.SeedTopics(1, "tls_audit"),
kfake.TLS(&tls.Config{
Certificates: []tls.Certificate{certificates.server},
ClientCAs: certificates.caPool,
ClientAuth: tls.RequireAndVerifyClientCert,
}),
)
require.NoError(t, err)
t.Cleanup(cluster.Close)
testCases := []struct {
name string
tls auditor.TLSConfig
err bool
}{
{
name: "CAAndClientCertificate_Delivers",
tls: certificates.client,
},
{
name: "TLSDisabled_Fails",
tls: auditor.TLSConfig{},
err: true,
},
{
name: "WithoutClientCertificate_Fails",
tls: auditor.TLSConfig{Enabled: true, CAFile: certificates.client.CAFile},
err: true,
},
{
name: "WithoutCA_Fails",
tls: auditor.TLSConfig{Enabled: true, CertFile: certificates.client.CertFile, KeyFile: certificates.client.KeyFile},
err: true,
},
}
for _, testCase := range testCases {
t.Run(testCase.name, func(t *testing.T) {
config := auditor.Config{
Provider: "kafka",
BufferSize: 10,
BatchSize: 5,
FlushInterval: 50 * time.Millisecond,
Kafka: auditor.KafkaConfig{
Brokers: cluster.ListenAddrs(),
Topic: "tls_audit",
ClientID: "signoz-tls-test",
Compression: "lz4",
ShutdownTimeout: 30 * time.Second,
TLS: testCase.tls,
},
}
auditor, err := newProvider(context.Background(), instrumentationtest.New().ToProviderSettings(), config, nil, version.Info)
require.NoError(t, err)
provider := auditor.(*provider)
defer provider.client.Close()
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()
err = provider.export(ctx, []audittypes.AuditEvent{newTestEvent(coretypes.ResourceUser, coretypes.VerbCreate, testCase.name)})
if testCase.err {
assert.True(t, errors.Is(err, context.DeadlineExceeded))
return
}
require.NoError(t, err)
})
}
consumerTLS, err := newTLSConfig(certificates.client)
require.NoError(t, err)
consumer, err := kgo.NewClient(
kgo.SeedBrokers(cluster.ListenAddrs()...),
kgo.DialTLSConfig(consumerTLS),
kgo.ConsumeTopics("tls_audit"),
kgo.ConsumeResetOffset(kgo.NewOffset().AtStart()),
)
require.NoError(t, err)
defer consumer.Close()
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
fetches := consumer.PollFetches(ctx)
require.Empty(t, fetches.Errors())
assert.Len(t, fetches.Records(), 1)
}
func TestNewTLSConfig(t *testing.T) {
certificates := newTestCertificates(t)
notPEMFile := filepath.Join(t.TempDir(), "not-pem.crt")
require.NoError(t, os.WriteFile(notPEMFile, []byte("not a pem"), 0o600))
testCases := []struct {
name string
config auditor.TLSConfig
err bool
wantRootCAs bool
wantCertificates int
}{
{
name: "NoFiles_UsesSystemRoots",
config: auditor.TLSConfig{Enabled: true},
},
{
name: "CAOnly",
config: auditor.TLSConfig{Enabled: true, CAFile: certificates.client.CAFile},
wantRootCAs: true,
},
{
name: "CAAndClientCertificate",
config: certificates.client,
wantRootCAs: true,
wantCertificates: 1,
},
{
name: "CAFileMissing",
config: auditor.TLSConfig{Enabled: true, CAFile: filepath.Join(t.TempDir(), "missing-ca.crt")},
err: true,
},
{
name: "CAFileNotPEM",
config: auditor.TLSConfig{Enabled: true, CAFile: notPEMFile},
err: true,
},
{
name: "KeyFileMissing",
config: auditor.TLSConfig{Enabled: true, CertFile: certificates.client.CertFile, KeyFile: filepath.Join(t.TempDir(), "missing.key")},
err: true,
},
{
name: "CertFileNotPEM",
config: auditor.TLSConfig{Enabled: true, CertFile: notPEMFile, KeyFile: certificates.client.KeyFile},
err: true,
},
}
for _, testCase := range testCases {
t.Run(testCase.name, func(t *testing.T) {
tlsConfig, err := newTLSConfig(testCase.config)
if testCase.err {
assert.True(t, errors.Ast(err, errors.TypeInvalidInput))
return
}
require.NoError(t, err)
assert.Equal(t, testCase.wantRootCAs, tlsConfig.RootCAs != nil)
assert.Len(t, tlsConfig.Certificates, testCase.wantCertificates)
})
}
}
type testCertificates struct {
caPool *x509.CertPool
server tls.Certificate
client auditor.TLSConfig
}
// Issues a CA, a broker certificate for 127.0.0.1 and a client certificate, writing the client side as ca.crt, tls.crt and tls.key.
func newTestCertificates(t *testing.T) testCertificates {
t.Helper()
caKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
require.NoError(t, err)
caTemplate := &x509.Certificate{
SerialNumber: big.NewInt(1),
Subject: pkix.Name{CommonName: "test-ca"},
NotBefore: time.Now().Add(-time.Hour),
NotAfter: time.Now().Add(time.Hour),
IsCA: true,
BasicConstraintsValid: true,
KeyUsage: x509.KeyUsageCertSign,
}
caDER, err := x509.CreateCertificate(rand.Reader, caTemplate, caTemplate, &caKey.PublicKey, caKey)
require.NoError(t, err)
ca, err := x509.ParseCertificate(caDER)
require.NoError(t, err)
serverCertPEM, serverKeyPEM := issueTestCertificate(t, ca, caKey, &x509.Certificate{
SerialNumber: big.NewInt(2),
Subject: pkix.Name{CommonName: "broker"},
IPAddresses: []net.IP{net.ParseIP("127.0.0.1")},
ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
})
server, err := tls.X509KeyPair(serverCertPEM, serverKeyPEM)
require.NoError(t, err)
clientCertPEM, clientKeyPEM := issueTestCertificate(t, ca, caKey, &x509.Certificate{
SerialNumber: big.NewInt(3),
Subject: pkix.Name{CommonName: "signoz"},
ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth},
})
dir := t.TempDir()
client := auditor.TLSConfig{
Enabled: true,
CAFile: filepath.Join(dir, "ca.crt"),
CertFile: filepath.Join(dir, "tls.crt"),
KeyFile: filepath.Join(dir, "tls.key"),
}
require.NoError(t, os.WriteFile(client.CAFile, pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE", Bytes: caDER}), 0o600))
require.NoError(t, os.WriteFile(client.CertFile, clientCertPEM, 0o600))
require.NoError(t, os.WriteFile(client.KeyFile, clientKeyPEM, 0o600))
caPool := x509.NewCertPool()
caPool.AddCert(ca)
return testCertificates{caPool: caPool, server: server, client: client}
}
func issueTestCertificate(t *testing.T, ca *x509.Certificate, caKey *ecdsa.PrivateKey, template *x509.Certificate) ([]byte, []byte) {
t.Helper()
key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
require.NoError(t, err)
template.NotBefore = time.Now().Add(-time.Hour)
template.NotAfter = time.Now().Add(time.Hour)
template.KeyUsage = x509.KeyUsageDigitalSignature
der, err := x509.CreateCertificate(rand.Reader, template, ca, &key.PublicKey, caKey)
require.NoError(t, err)
keyDER, err := x509.MarshalECPrivateKey(key)
require.NoError(t, err)
return pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE", Bytes: der}), pem.EncodeToMemory(&pem.Block{Type: "EC PRIVATE KEY", Bytes: keyDER})
}

View File

@@ -99,7 +99,7 @@ is still by hand. The generator never adds a SideNav item; do that in
CSS Modules (`docs/css-modules-guide.md`), React Query for server state (prefer
`api/generated` hooks), nuqs for URL state, Zustand for client state, `data-testid` on
every interactive element.
5. **Verify** before reporting done:
5. **Verify** at the gate in `AGENTS.md` (commit, push or PR), not after each edit; skip it while the user says `no checks`:
```bash
pnpm tsgo --noEmit
pnpm oxlint src/pages/<Feature>

View File

@@ -140,15 +140,6 @@
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/consistent-type-imports": [
"error",
{
"prefer": "type-imports",
"fixStyle": "separate-type-imports",
"disallowTypeAnnotations": false
}
],
"@typescript-eslint/no-import-type-side-effects": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "warn",
// TODO: Change to error after migration to oxlint
@@ -305,6 +296,10 @@
// Bans msw imports in *.stories.tsx; handlers/mock data belong in the sibling .stories.mocks.tsx
"signoz/no-direct-react-router-import": "error",
// Steers call sites to the src/lib/router facade (allowlisted in overrides below)
"signoz/no-builder-ai-query-access": "error",
// Steers AI slot access to lib/query/builderSlot (allowlisted in overrides below)
"signoz/no-monaco-stripped-features": "error",
// Bans Monaco features the production build strips, and monaco-editor value imports outside src/lib/monaco (allowlisted in overrides below)
"no-restricted-globals": [
"error",
{
@@ -321,15 +316,6 @@
"error",
{
"paths": [
{
"name": "constants/queryBuilder",
"importNames": ["PANEL_TYPES"],
"message": "Import PANEL_TYPES from constants/queryBuilderPanelTypes so a change to the query builder constants does not rerun every panel test."
},
{
"name": "api/generated/services/sigNoz.schemas",
"message": "Import each schema from its own file (api/generated/services/sigNoz.schemas/<name>) so a schema change only reruns the tests that use it."
},
{
"name": "redux",
"message": "[State mgmt] redux is deprecated. Migrate to Zustand, nuqs, or react-query."
@@ -570,6 +556,7 @@
],
"rules": {
"import/first": "off",
"signoz/no-dom-node-access": "error",
// Should ignore due to mocks
"signoz/no-navigator-clipboard": "off",
// Tests can use navigator.clipboard directly,
@@ -577,6 +564,8 @@
"no-restricted-globals": "off",
// Tests need raw localStorage/sessionStorage to seed DOM state for isolation
"signoz/no-zustand-getstate-in-hooks": "off",
"signoz/no-builder-ai-query-access": "off",
// Fixtures build and assert on the raw AI slot
"@typescript-eslint/no-explicit-any": "off", // Tests often need any for mocks/stubs
"@typescript-eslint/explicit-module-boundary-types": "off", // Return types not required in tests
"@typescript-eslint/explicit-function-return-type": "off" // Same as above rule, don't need to care about return type
@@ -633,6 +622,27 @@
"rules": {
"signoz/no-direct-react-router-import": "off"
}
},
{
// builderSlot owns the AI slot; the rest normalise its wire shape or test whether it exists, which the helpers hide
"files": [
"src/lib/query/builderSlot.ts",
"src/hooks/queryBuilder/normalizeCompositeQuery.ts",
"src/hooks/queryBuilder/useGetCompositeQueryParam.ts",
"src/providers/QueryBuilder.tsx",
"src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/usePanelKindChange.ts",
"src/pages/DashboardPage/DashboardContainer/Panels/utils/seedBuilderForMode.ts"
],
"rules": {
"signoz/no-builder-ai-query-access": "off"
}
},
{
// src/lib/monaco owns the monaco-editor imports that pick the languages and workers
"files": ["src/lib/monaco/**"],
"rules": {
"signoz/no-monaco-stripped-features": "off"
}
}
]
}

View File

@@ -21,7 +21,7 @@ import i18n from '../src/ReactI18';
// `src/index.tsx` does this at boot: without it `@monaco-editor/react` falls back
// to its loader default and pulls Monaco from cdn.jsdelivr.net, which msw does
// not report because the requests look like static assets.
import '../src/lib/monaco/setup';
import '../src/lib/monaco/loader';
import '../src/styles.scss';
@@ -176,6 +176,7 @@ const preview: Preview = {
'AI Observability',
['Overview', 'Explorer', 'Model Pricing', 'Attribute Mapping'],
'Noz',
['Overview', 'Modal', 'Panel'],
'Metering',
['Cost Meter', 'Usage Explorer'],
'Messaging Queues',

View File

@@ -28,20 +28,24 @@ You are operating within a constrained context window and strict system prompts.
- UI primitives come from `@signozhq/ui` (subpath imports) and icons from `@signozhq/icons`. No new `antd` component or direct icon library (`lucide-react`) where `@signozhq/ui` has an equivalent; `signoz/no-antd-components` enforces part of this list.
- Exception: a control added beside `antd` siblings of the same kind (a tab in an `antd` tab strip) matches them until that surface migrates. Say so in the PR.
- When `@signozhq/ui` or `@signozhq/icons` lacks what you need, say so in the PR before reaching for another library.
- Before styling a `@signozhq/ui` component, check its props in `node_modules/@signozhq/ui/dist/<component>/*.d.ts` for `className`/`style` support; some omit them. Avoid overriding the component's CSS vars unless explicitly needed.
- Never override a `@signozhq/ui` component's styles: no `--<component>-*` CSS variables, no `:global` class or `data-*` selectors, no restyling through `className`/`style`. Use its props, and put layout on a wrapper you own. When it can't do what the design needs, file a UI suggestion in `SigNoz/uforge-pod` (`ui-suggestion.yml` template) and link it in the PR.
- When writing code that could need authorization checks, read ./src/lib/authz/README.md
- A flow that gains a request also gates on that request's permission: a rename that now reads the view first needs `read` as well as `update`.
- Identity keys (legend groups, color groups, CSV headers, React keys) come from structured values, never from joined display text: `['us, east', 'prod']` and `['us', 'east, prod']` both join to `us, east, prod`.
- A payload saved under another kind or schema copies only the fields that schema accepts, and drops bindings to columns the user removed. The server rejects unknown or stale fields, so the preview works and the save fails.
3. FORCED VERIFICATION: Your internal tools mark file writes as successful even if the code does not compile. Run these checks once all changes of a task are done, never after each edit. You are FORBIDDEN from reporting a task as complete until you have:
3. CHECKS AT THE GATE: Your internal tools mark file writes as successful even if the code does not compile, so the checks below are required, but only at the gate. The gate is when the user says commit, push, raise or update the PR, mark it ready, or "run checks". Never run them after each edit or between the user's iterations.
- Between gates, after an edit, run at most the one test file that covers it.
- `no checks`: when the user says it (or "don't run tests", "just making changes"), run nothing: no tests, type check, lint, format or build. Make the change and stop. This holds until the user names a gate.
At the gate, you are FORBIDDEN from reporting a task as complete until you have:
- Run `pnpm tsgo --noEmit`
- Run `pnpm lint:js --quiet` to find critical errors
- Run `pnpm oxlint <file1> <file2>` and fix all warnings
- Run `pnpm build`
- Find if the file has tests for it, or if there's `__test__` folder or the parent folder has tests, and run. Run them before coding the change or after all changes, never in between.
- For e2e, run only the specs you added or changed: the stack is heavy. Leave the full jest and e2e suites to CI unless the user asks.
- For every test you added or changed, revert the change it covers and confirm the test fails
- For every test you added or changed, revert the change it covers and confirm the test fails, and that each test runs under 500 ms (`pnpm jest <file> --verbose`)
- On a stacked branch (`gh stack`), run `pnpm tsgo --noEmit` on every branch above it before pushing: a renamed prop or moved export breaks them
- Fixed ALL resulting errors

View File

@@ -9,12 +9,12 @@
- [ ] No deep class nesting (max 3 class levels; pseudo-classes/elements and parent-reference selectors like `&.active`, `&#bar` are not counted)
- [ ] No hardcoded colors - use `--l1/l2/l3-*` semantic tokens (not `--bg-*` primitives)
- [ ] No magic numbers - use `--spacing-*` tokens
- [ ] Typography uses `--periscope-font-size-*` or `--font-size-*` tokens
- [ ] @signozhq/ui overrides use CSS variables, not direct class overrides
- [ ] Global escapes only for third-party overrides
- [ ] Typography uses `--{variant}-{size}-{weight}-*` text style tokens (see Typography)
- [ ] No overrides of `@signozhq/ui` components (see below)
- [ ] Global escapes only for third-party overrides (`@signozhq/ui` is not third-party)
- [ ] No ID selectors
- [ ] No bare element selectors
- [ ] Keyframes use `:local(@keyframes name)` to avoid global collisions
- [ ] Keyframes are declared in the module with plain `@keyframes name` (already local)
## Config (vite.config.ts)
@@ -77,7 +77,7 @@ css: {
// BAD: Nesting creates separate classes you might not expect
.button {
.icon { } // -> styles.icon (separate class, not scoped under .button)
.icon { } // -> styles.icon, but the rule is `.button .icon`: it only matches inside .button
}
// GOOD: Flat structure
@@ -289,88 +289,32 @@ Use L1/L2/L3 semantic tokens - they handle light/dark theme automatically.
- L2 = elevated surfaces (cards, panels)
- L3 = nested/inset elements
## Overriding @signozhq/ui Components
## @signozhq/ui Components
Components expose CSS variables for customization.
Don't override them. That covers setting a component's `--<component>-*` CSS variables, targeting its classes or `data-*` attributes through `:global(...)`, and restyling it with `className` or `style`. An override keeps working until the component changes, then breaks with no type error or lint warning, and the screen drifts from every other one using that component.
You can ensure they exist by looking at ./node_modules/@signozhq/ui/dist.
Never write a override without confirm it exists.
Override via:
### Method 1: CSS Variables (Preferred)
Each component exposes `--<component>-<property>` variables:
- Use the component's props (`variant`, `color`, `size`, ...) for how it looks.
- Put layout (position, margin, width inside a flex or grid parent) on a wrapper element you own.
- If the component can't do what the design needs, file a [UI suggestion](https://github.com/SigNoz/uforge-pod/issues/new?template=ui-suggestion.yml) in `SigNoz/uforge-pod` and ship with the component as it renders until the suggestion is decided. Link the issue in the PR.
```scss
// Override Button
.customButton {
--button-background: var(--success-background);
--button-border-radius: var(--radius-2);
--button-padding: var(--spacing-4) var(--spacing-8);
--button-font-size: var(--label-base-400-font-size);
// BAD: Restyling the component
.saveButton {
--button-primary-background-color: var(--success-background);
}
// Override Input
.customInput {
--input-height: 2.5rem;
--input-border-color: var(--l2-border);
--input-padding: var(--spacing-2) var(--spacing-6);
--input-placeholder-color: var(--l3-foreground);
.toolbar :global([data-variant="outlined"]) {
--button-variant-outlined-border: 1px solid var(--accent-primary);
}
// Override nested parts
.customInput {
--input-prefix-padding: 0 var(--spacing-4) 0 var(--spacing-6);
--input-suffix-color: var(--accent-primary);
// GOOD: Layout on your own wrapper, looks from props
.toolbarActions {
display: flex;
gap: var(--spacing-4);
margin-left: auto;
}
```
### Method 2: Data Attributes
Components use data attributes for variants/states. Target them for state-specific overrides:
```scss
// Target variant
.wrapper :global([data-variant="outlined"]) {
--button-border-color: var(--accent-primary);
}
// Target size
.wrapper :global([data-size="sm"]) {
--button-font-size: var(--label-small-400-font-size);
}
// Target color
.wrapper :global([data-color="destructive"]) {
--button-background: var(--danger-background);
}
// Target state (Radix patterns)
.popover :global([data-state="open"]) {
opacity: 1;
}
.tooltip :global([data-side="top"]) {
margin-bottom: var(--spacing-2);
}
```
### Common Component CSS Variables
**Button:**
- `--button-background`, `--button-border-radius`, `--button-padding`
- `--button-font-size`, `--button-height`, `--button-gap`
- `--button-hover-background`, `--button-disabled-opacity`
**Input:**
- `--input-height`, `--input-border-color`, `--input-background`
- `--input-padding`, `--input-font-size`, `--input-placeholder-color`
- `--input-focus-outline-color`, `--input-hover-border-color`
- `--input-prefix-*`, `--input-suffix-*` for adornments
**General pattern:** `--<component>-<property>` or `--<component>-<state>-<property>`
## Good Patterns
### Structure
@@ -434,24 +378,21 @@ Components use data attributes for variants/states. Target them for state-specif
### Keyframes (Local Scoping)
Without `:local()`, keyframe names are global and can clash across modules:
CSS Modules scope `@keyframes` like classes: the build renames `fadeIn` to `_fadeIn_<hash>` and rewrites every `animation` in the same module that names it. Don't wrap it in `:local(...)`; Sass rejects `:local(@keyframes fadeIn)` with `expected selector`.
```scss
// BAD: Global keyframe - can conflict with other modules
// GOOD: Local to this module
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
// GOOD: Locally scoped keyframe
:local(@keyframes fadeIn) {
from { opacity: 0; }
to { opacity: 1; }
}
.modal {
animation: fadeIn 200ms ease;
}
// BAD: Doesn't compile
:local(@keyframes fadeIn) { }
```
## JS Import Patterns

View File

@@ -11,7 +11,7 @@ const config: Config.InitialOptions = {
coverageReporters: ['text', 'cobertura', 'html', 'json-summary'],
collectCoverageFrom: ['src/**/*.{ts,tsx}'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
modulePathIgnorePatterns: ['dist'],
modulePathIgnorePatterns: ['<rootDir>/dist/'],
moduleNameMapper: {
'\\.(png|jpg|jpeg|gif|svg|webp|avif|ico|bmp|tiff)$':
'<rootDir>/__mocks__/fileMock.ts',
@@ -67,6 +67,8 @@ const config: Config.InitialOptions = {
testPathIgnorePatterns: ['/node_modules/', '/public/'],
moduleDirectories: ['node_modules', 'src'],
testEnvironment: '<rootDir>/jest.environment.cjs',
// Local only: the default (cores - 1) workers exhaust RAM when several runs overlap.
...(process.env.CI ? {} : { maxWorkers: 4, workerIdleMemoryLimit: '1GB' }),
coverageThreshold: {
global: {
statements: 80,

View File

@@ -16,6 +16,24 @@ class JSDOMWithRequestEnvironment extends TestEnvironment {
Object.defineProperty(this, 'signal', { value: signal ?? super.signal });
}
};
// Library CSS (antd's runtime styles, CodeMirror's theme, @signozhq/ui's
// injected modules) stays out of the document, as the app's own stylesheets
// already do through moduleNameMapper. jsdom matches every rule on each
// getComputedStyle call, which made a role query take up to half a second.
// rc-util adds and removes an empty style tag to find its container, so a
// dropped tag must also be removable.
const { Node, HTMLStyleElement, document } = this.global;
for (const method of ['appendChild', 'insertBefore', 'removeChild']) {
const original = Node.prototype[method];
Node.prototype[method] = function (node, ...rest) {
const isDroppedStyle =
this === document.head &&
node instanceof HTMLStyleElement &&
node.parentNode !== this;
return isDroppedStyle ? node : original.call(this, node, ...rest);
};
}
}
}

View File

@@ -39,6 +39,19 @@ if (!HTMLElement.prototype.scrollIntoView) {
HTMLElement.prototype.scrollIntoView = function (): void {};
}
// jsdom has no elementFromPoint; CodeMirror calls it on mousedown to place the cursor.
if (!document.elementFromPoint) {
document.elementFromPoint = (): Element | null => null;
}
// jsdom Ranges have no layout; CodeMirror measures text through them on click.
if (!Range.prototype.getClientRects) {
Range.prototype.getClientRects = (): DOMRectList =>
document.body.getClientRects();
Range.prototype.getBoundingClientRect = (): DOMRect =>
document.body.getBoundingClientRect();
}
// jsdom doesn't implement the Pointer Capture API, which Radix UI primitives
// (e.g. @signozhq/ui Select) call when opening. Stub them so those components
// can be exercised in tests.
@@ -120,29 +133,9 @@ if (typeof globalThis.DOMRect === 'undefined') {
};
}
// Patch getComputedStyle to handle CSS parsing errors from @signozhq/* packages.
// These packages inject CSS at import time via style-inject / vite-plugin-css-injected-by-js.
// jsdom's nwsapi cannot parse some of the injected selectors (e.g. Tailwind's :animate-in),
// causing SyntaxErrors during getComputedStyle / getByRole calls.
const _origGetComputedStyle = window.getComputedStyle;
window.getComputedStyle = function (
elt: Element,
pseudoElt?: string | null,
): CSSStyleDeclaration {
try {
return _origGetComputedStyle.call(window, elt, pseudoElt);
} catch {
// Return a minimal CSSStyleDeclaration so callers (testing-library, Radix UI)
// see the element as visible and without animations.
return {
display: '',
visibility: '',
opacity: '1',
animationName: 'none',
getPropertyValue: () => '',
} as unknown as CSSStyleDeclaration;
}
};
jest.mock('@testing-library/user-event', () =>
jest.requireActual('tests/userEventWithDefaults'),
);
beforeAll(() => server.listen());

View File

@@ -20,11 +20,9 @@ export default defineConfig({
},
output: {
target: './src/api/generated/services',
schemas: './src/api/generated/services/sigNoz.schemas',
client: 'react-query',
httpClient: 'axios',
mode: 'tags-split',
indexFiles: false,
prettier: true,
headers: true,
clean: true,

View File

@@ -56,6 +56,7 @@
"@sentry/vite-plugin": "5.3.0",
"@signozhq/design-tokens": "2.8.0",
"@signozhq/icons": "0.4.0",
"@signozhq/noz-client": "1.13.0",
"@signozhq/ui": "0.4.0-rc.5",
"@tanstack/react-table": "8.21.3",
"@tanstack/react-virtual": "3.13.22",
@@ -200,7 +201,7 @@
"json-schema-to-typescript": "^15.0.4",
"lint-staged": "^17.0.4",
"msw": "1.3.2",
"orval": "8.28.1",
"orval": "8.22.0",
"oxfmt": "0.73.0",
"oxlint": "1.88.0",
"oxlint-tsgolint": "7.0.2004",

View File

@@ -0,0 +1,59 @@
import { ruleTester } from './rule-tester.mjs';
const message =
'from lib/query/builderSlot instead of accessing builder_ai_query';
await ruleTester({
rule: 'no-builder-ai-query-access',
valid: [
{
name: 'reading through the slot helper',
code: 'export const data = getActiveBuilder(query).queryData;',
},
{
name: 'reading the builder slot',
code: 'export const data = query.builder.queryData;',
},
{
name: 'building a query with the AI slot',
code: 'export const next = { ...query, builder_ai_query: builder };',
},
{
name: 'generated enum member',
code:
'export const type = Querybuildertypesv5QueryTypeDTO.builder_ai_query;',
},
{
name: 'type position',
code: "export type Slot = Query['builder_ai_query'];",
},
],
invalid: [
{
name: 'picking the slot by query type',
code:
'export const data =\n\tquery.queryType === EQueryType.AI_QUERY_BUILDER\n\t\t? query.builder_ai_query?.queryData\n\t\t: query.builder.queryData;',
errors: [{ message, line: 3 }],
},
{
name: 'optional chaining',
code: 'export const slot = query?.builder_ai_query;',
errors: [{ message, line: 1 }],
},
{
name: 'writing the slot',
code: 'query.builder_ai_query = builder;',
errors: [{ message, line: 1 }],
},
{
name: 'bracket access',
code: "export const slot = query['builder_ai_query'];",
errors: [{ message, line: 1 }],
},
{
name: 'destructuring',
code: 'export const { builder_ai_query: slot } = query;',
errors: [{ message, line: 1 }],
},
],
});

View File

@@ -0,0 +1,60 @@
import { ruleTester } from './rule-tester.mjs';
const message = (name) =>
`Find elements through Testing Library (\`screen\`, \`within\`) instead of \`${name}\`.`;
await ruleTester({
rule: 'no-dom-node-access',
valid: [
{
name: 'Testing Library queries',
code: "within(screen.getByTestId('row')).getByText('Name');",
},
{
name: 'a query method that is not called',
code:
'jest.spyOn(document, "querySelector");\nconst q = Element.prototype.closest;',
},
{
name: 'computed access',
code: "const name = 'closest';\nel[name]('tr');",
},
],
invalid: [
{
name: 'querySelector on the container',
code: "container.querySelector('.row');",
errors: [{ message: message('querySelector'), line: 1, column: 11 }],
},
{
name: 'closest after a screen query',
code: "screen.getByText('Name').closest('tr');",
errors: [{ message: message('closest'), line: 1, column: 26 }],
},
{
name: 'optional call',
code: "row?.querySelectorAll('td');",
errors: [{ message: message('querySelectorAll'), line: 1, column: 6 }],
},
{
name: 'traversal property',
code: 'expect(cell.parentElement).toBeVisible();',
errors: [{ message: message('parentElement'), line: 1, column: 13 }],
},
{
name: 'children of a DOM node',
code: "expect(screen.getByTestId('list').children).toHaveLength(2);",
errors: [{ message: message('children'), line: 1, column: 35 }],
},
{
name: 'children of a data tree',
code: 'expect(tree.children).toHaveLength(2);',
errors: [{ message: message('children'), line: 1, column: 13 }],
},
{
name: 'document lookup by id',
code: "document.getElementById('root');",
errors: [{ message: message('getElementById'), line: 1, column: 10 }],
},
],
});

View File

@@ -0,0 +1,123 @@
import { ruleTester } from './rule-tester.mjs';
const IMPORT = 'Import Monaco from lib/monaco/setup';
const STRIPPED = 'which the production build strips';
await ruleTester({
rule: 'no-monaco-stripped-features',
valid: [
{
name: 'setup import',
code: "import { monaco } from 'lib/monaco/setup';",
},
{
name: 'type-only import',
code: "import type { editor } from 'monaco-editor';",
},
{
name: 'inline type specifiers only',
code: "import { type editor, type languages } from 'monaco-editor';",
},
{
name: 'type-only re-export',
code: "export type { editor } from 'monaco-editor';",
},
{
name: 'react wrapper',
code: "import Editor from '@monaco-editor/react';",
},
{
name: 'kept provider',
code: "monaco.languages.registerCompletionItemProvider('json', {});",
},
{
name: 'stripped option turned off',
code:
"const o = { experimentalGpuAcceleration: 'off', minimap: { showMarkSectionHeaders: false } };",
},
],
invalid: [
{
name: 'package entry import',
code: "import * as monaco from 'monaco-editor';",
errors: [{ message: IMPORT, line: 1, column: 25 }],
},
{
name: 'deep import',
code:
"import 'monaco-editor/esm/vs/basic-languages/python/python.contribution.js';",
errors: [{ message: IMPORT }],
},
{
name: 'mixed value and type specifiers',
code: "import { editor, type languages } from 'monaco-editor';",
errors: [{ message: IMPORT }],
},
{
name: 'dynamic import',
code: "const m = await import('monaco-editor');",
errors: [{ message: IMPORT }],
},
{
name: 'require',
code: "const m = require('monaco-editor');",
errors: [{ message: IMPORT }],
},
{
name: 're-export',
code: "export { editor } from 'monaco-editor';",
errors: [{ message: IMPORT }],
},
{
name: 'export all',
code: "export * from 'monaco-editor';",
errors: [{ message: IMPORT }],
},
{
name: 'stripped provider on monaco.languages',
code: "monaco.languages.registerInlayHintsProvider('sql', {});",
errors: [
{
message: 'needs the Monaco `inlayHints` contribution',
line: 1,
column: 1,
},
],
},
{
name: 'stripped provider on a destructured languages',
code: "languages.registerSignatureHelpProvider('sql', {});",
errors: [{ message: '`parameterHints`' }],
},
{
name: 'stripped provider called bare',
code: "registerRenameProvider('json', {});",
errors: [{ message: '`rename`' }],
},
{
name: 'stripped provider through a string key',
code: "monaco.languages['registerRenameProvider']('json', {});",
errors: [{ message: '`rename`' }],
},
{
name: 'semantic tokens provider',
code: "monaco.languages.registerDocumentSemanticTokensProvider('json', {});",
errors: [{ message: '`semanticTokens`' }],
},
{
name: 'stripped option turned on',
code: "const o = { experimentalGpuAcceleration: 'on' };",
errors: [{ message: '`gpu`', line: 1, column: 13 }],
},
{
name: 'stripped option with a variable value',
code: 'const o = { minimap: { showRegionSectionHeaders: enabled } };',
errors: [{ message: STRIPPED }],
},
{
name: 'quoted option key',
code: "const o = { 'showMarkSectionHeaders': true };",
errors: [{ message: '`sectionHeaders`' }],
},
],
});

View File

@@ -0,0 +1,51 @@
const SLOT = 'builder_ai_query';
function isSlotKey(key, computed) {
if (key.type === 'Literal') {
return key.value === SLOT;
}
return !computed && key.type === 'Identifier' && key.name === SLOT;
}
// Generated enums like Querybuildertypesv5QueryTypeDTO.builder_ai_query are not queries
function isGeneratedEnum(object) {
return object.type === 'Identifier' && /^[A-Z]/.test(object.name);
}
export default {
meta: {
type: 'suggestion',
docs: {
description:
'Disallow direct builder_ai_query access; use the lib/query/builderSlot helpers',
category: 'Query Builder',
},
schema: [],
messages: {
useSlotHelper:
'Use getActiveBuilder, getBuilderBySlotKey or replaceBuilderBySlotKey from lib/query/builderSlot instead of accessing builder_ai_query directly.',
},
},
create(context) {
return {
MemberExpression(node) {
if (
isSlotKey(node.property, node.computed) &&
!isGeneratedEnum(node.object)
) {
context.report({ node, messageId: 'useSlotHelper' });
}
},
ObjectPattern(node) {
node.properties.forEach((property) => {
if (
property.type === 'Property' &&
isSlotKey(property.key, property.computed)
) {
context.report({ node: property, messageId: 'useSlotHelper' });
}
});
},
};
},
};

View File

@@ -0,0 +1,60 @@
/**
* Rule: no-dom-node-access
*
* Tests find elements through Testing Library (`screen`, `within`), not by
* walking the DOM. Flags calls to DOM query methods and reads of node
* traversal properties:
* container.querySelector('.row')
* screen.getByText('Name').closest('tr')
* cell.parentElement
* list.children
*
* A non-DOM `children` read (a data tree, React props) disables the rule on
* that line with a reason.
*/
const QUERY_METHODS = new Set([
'querySelector',
'querySelectorAll',
'closest',
'getElementById',
'getElementsByClassName',
'getElementsByTagName',
'getElementsByName',
]);
const TRAVERSAL_PROPERTIES = new Set([
'parentElement',
'parentNode',
'firstChild',
'lastChild',
'firstElementChild',
'lastElementChild',
'nextSibling',
'previousSibling',
'nextElementSibling',
'previousElementSibling',
'childNodes',
'children',
]);
export default {
create(context) {
return {
MemberExpression(node) {
if (node.computed || node.property.type !== 'Identifier') {
return;
}
const { name } = node.property;
const isCall =
node.parent?.type === 'CallExpression' && node.parent.callee === node;
if ((isCall && QUERY_METHODS.has(name)) || TRAVERSAL_PROPERTIES.has(name)) {
context.report({
node: node.property,
message: `Find elements through Testing Library (\`screen\`, \`within\`) instead of \`${name}\`.`,
});
}
},
};
},
};

View File

@@ -0,0 +1,138 @@
/**
* Rule: no-monaco-stripped-features
*
* The production build drops the Monaco contributions listed in
* plugins/rules/shared/monaco-stripped-features.mjs. Dev and Storybook still carry them,
* so a provider or option for one of them works there and silently does nothing
* in production. This rule reports them, plus value imports of `monaco-editor`
* outside src/lib/monaco: the package entry registers every language and worker.
*
* src/lib/monaco is allowlisted via overrides in .oxlintrc.json.
*/
import { MONACO_STRIPPED_FEATURES } from './shared/monaco-stripped-features.mjs';
const featureByApi = new Map();
const featureByOption = new Map();
for (const [feature, { providers = [], options = [] }] of Object.entries(
MONACO_STRIPPED_FEATURES,
)) {
providers.forEach((name) => featureByApi.set(name, feature));
options.forEach((name) => featureByOption.set(name, feature));
}
function isMonacoSource(value) {
return value === 'monaco-editor' || value.startsWith('monaco-editor/');
}
function isTypeOnlyImport(node) {
return (
node.importKind === 'type' ||
(node.specifiers.length > 0 &&
node.specifiers.every((s) => s.importKind === 'type'))
);
}
function propertyName(node) {
if (node.type === 'Identifier') {
return node.name;
}
if (node.type === 'Literal' && typeof node.value === 'string') {
return node.value;
}
return null;
}
function isDisabledValue(node) {
return (
node.type === 'Literal' && (node.value === false || node.value === 'off')
);
}
export default {
meta: {
type: 'problem',
docs: {
description:
'Disallow Monaco features the production build strips, and value imports of monaco-editor outside src/lib/monaco',
category: 'Monaco',
},
schema: [],
messages: {
provider:
'{{name}} needs the Monaco `{{feature}}` contribution, which the production build strips, so it works in dev and does nothing in production. Remove `{{feature}}` from plugins/rules/shared/monaco-stripped-features.mjs to use it.',
option:
'`{{name}}` needs the Monaco `{{feature}}` contribution, which the production build strips, so it works in dev and does nothing in production. Remove `{{feature}}` from plugins/rules/shared/monaco-stripped-features.mjs to use it.',
import:
'Import Monaco from lib/monaco/setup, not monaco-editor: the package entry registers every language and worker. Type-only imports are fine.',
},
},
create(context) {
const reportSource = (source) => {
if (
source?.type === 'Literal' &&
typeof source.value === 'string' &&
isMonacoSource(source.value)
) {
context.report({ node: source, messageId: 'import' });
}
};
return {
ImportDeclaration(node) {
if (!isTypeOnlyImport(node)) {
reportSource(node.source);
}
},
ImportExpression: (node) => reportSource(node.source),
ExportAllDeclaration(node) {
if (node.exportKind !== 'type') {
reportSource(node.source);
}
},
ExportNamedDeclaration(node) {
if (node.exportKind !== 'type') {
reportSource(node.source);
}
},
CallExpression(node) {
const { callee } = node;
if (callee.type === 'Identifier' && callee.name === 'require') {
reportSource(node.arguments[0]);
return;
}
const name =
callee.type === 'MemberExpression'
? propertyName(callee.property)
: callee.type === 'Identifier'
? callee.name
: null;
if (name !== null && featureByApi.has(name)) {
context.report({
node: callee,
messageId: 'provider',
data: { name, feature: featureByApi.get(name) },
});
}
},
Property(node) {
if (node.computed) {
return;
}
const name = propertyName(node.key);
if (
name !== null &&
featureByOption.has(name) &&
!isDisabledValue(node.value)
) {
context.report({
node: node.key,
messageId: 'option',
data: { name, feature: featureByOption.get(name) },
});
}
},
};
},
};

View File

@@ -0,0 +1,29 @@
/**
* Monaco editor contributions the production build drops (vite.config.ts marks
* them side-effect free), with the API that would need them at runtime.
* `signoz/no-monaco-stripped-features` reports those APIs, since the build
* leaves them without an error and without an effect.
*
* To use one, delete its entry here.
*/
export const MONACO_STRIPPED_FEATURES = {
codelens: { providers: ['registerCodeLensProvider'] },
dropOrPasteInto: {},
gpu: { options: ['experimentalGpuAcceleration'] },
inlayHints: { providers: ['registerInlayHintsProvider'] },
inlineCompletions: { providers: ['registerInlineCompletionsProvider'] },
linkedEditing: { providers: ['registerLinkedEditingRangeProvider'] },
parameterHints: { providers: ['registerSignatureHelpProvider'] },
rename: {
providers: ['registerRenameProvider', 'registerNewSymbolNameProvider'],
},
sectionHeaders: {
options: ['showRegionSectionHeaders', 'showMarkSectionHeaders'],
},
semanticTokens: {
providers: [
'registerDocumentSemanticTokensProvider',
'registerDocumentRangeSemanticTokensProvider',
],
},
};

View File

@@ -19,6 +19,9 @@ import noMswInStoryFile from './rules/no-msw-in-story-file.mjs';
import noDirectReactRouterImport from './rules/no-direct-react-router-import.mjs';
import noTextCss from './rules/no-text-css.mjs';
import requireDisableReason from './rules/require-disable-reason.mjs';
import noDomNodeAccess from './rules/no-dom-node-access.mjs';
import noBuilderAiQueryAccess from './rules/no-builder-ai-query-access.mjs';
import noMonacoStrippedFeatures from './rules/no-monaco-stripped-features.mjs';
export default {
meta: {
@@ -39,5 +42,8 @@ export default {
'no-direct-react-router-import': noDirectReactRouterImport,
'no-text-css': noTextCss,
'require-disable-reason': requireDisableReason,
'no-dom-node-access': noDomNodeAccess,
'no-builder-ai-query-access': noBuilderAiQueryAccess,
'no-monaco-stripped-features': noMonacoStrippedFeatures,
},
};

181
frontend/pnpm-lock.yaml generated
View File

@@ -82,6 +82,9 @@ importers:
'@signozhq/icons':
specifier: 0.4.0
version: 0.4.0
'@signozhq/noz-client':
specifier: 1.13.0
version: 1.13.0(axios@1.21.1)(react-query@3.39.3(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react@18.2.0)
'@signozhq/ui':
specifier: 0.4.0-rc.5
version: 0.4.0-rc.5(@date-fns/tz@1.4.1)(@signozhq/design-tokens@2.8.0)(@signozhq/icons@0.4.0)(@types/react@18.0.26)(date-fns@4.1.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
@@ -474,8 +477,8 @@ importers:
specifier: 1.3.2
version: 1.3.2(typescript@5.9.3)
orval:
specifier: 8.28.1
version: 8.28.1(prettier@3.8.3)(typescript@5.9.3)
specifier: 8.22.0
version: 8.22.0(prettier@3.8.3)(typescript@5.9.3)
oxfmt:
specifier: 0.73.0
version: 0.73.0
@@ -2266,51 +2269,51 @@ packages:
'@open-draft/until@1.0.3':
resolution: {integrity: sha512-Aq58f5HiWdyDlFffbbSjAlv596h/cOnt2DO1w3DOC7OJ5EHs0hd/nycJfiu9RJbT6Yk6F1knnRRXNSpxoIVZ9Q==}
'@orval/angular@8.28.1':
resolution: {integrity: sha512-8SLvDzsuI395Nn7uwMPMxW0soawi4tDeXjEoZZclG+n1ncJ/aiPiNUi9KiJOrQwmux2e4anNFilR47whPRfExA==}
'@orval/angular@8.22.0':
resolution: {integrity: sha512-lSvaNj+VHGIWBQOG104HfPNrk2xGjpArwy67u6ZBPzHo/OtDE5Tm1t+ARYseCOElFr4z3i3A62qjFLFy6zj00Q==}
'@orval/axios@8.28.1':
resolution: {integrity: sha512-XHx2/NnBhoEIlHcNBlYxXFlCOBorza3mu+xHyIiiCwMbHDL+ZBCnvAzM5qrKR0xPWIxU0MlmCkg1QkNhyAsomA==}
'@orval/axios@8.22.0':
resolution: {integrity: sha512-fFu0UgTbpI9a1ayM7qCs55MMy6MlVgOpE3BBXGukCTBSwNwFLN47WdzQev/x0mAcs58pNKYT0KL4R9MXGnmgfg==}
'@orval/core@8.28.1':
resolution: {integrity: sha512-rqtRn5SYMvoNOBELy1y8s3JSQDzU4N9rn8JBGNnpylqG3OcK+PQsL25sl2L8zBUo571L+6IWGGjg8cJwX+Kshw==}
'@orval/core@8.22.0':
resolution: {integrity: sha512-uKYi7+Smg6oQ2MxE0AS2FNI7bwssoxGLh391Uk0FU+DcTcSv9q2GmvoM8uwd827Hok29kD7AegHE8Mhmsa5uWg==}
peerDependencies:
'@faker-js/faker': '>=10'
peerDependenciesMeta:
'@faker-js/faker':
optional: true
'@orval/effect@8.28.1':
resolution: {integrity: sha512-75eYAKyGjLdfnVLl4Q32a5rHQvhHOlq/jCEY0q6UgjLHXOs/fD9L6lRobrdcsWKeUW5wU+oscfAjbT01gq8vNQ==}
'@orval/effect@8.22.0':
resolution: {integrity: sha512-DACiw2+0ZsPJPKQbYlb9qFFFppaCBaT/HgIq2S1asH9ZCOOTZKm9VrRXpeCWINHC2w1BpdSATpytv+61UT5Y/A==}
'@orval/fetch@8.28.1':
resolution: {integrity: sha512-vVj6ZNOf+XnWrlcE+24Kt42jwFEC+JZHqbhPRCG42pH8BXEWvA5RCc/hXfpFPinTL7RLOJk8Ab3mwIKBNzdBTA==}
'@orval/fetch@8.22.0':
resolution: {integrity: sha512-G0r6hOdZG963H/8S4Vk1kWfU/hkQC/cwpDZL+mzcXgzrdG9NDloshTqmge/jP5lPsFAwfcRUmmts10OmuIE4BQ==}
'@orval/hono@8.28.1':
resolution: {integrity: sha512-30dpAnCNqpb5wS2dQqlu/t2lvcQpWnocJJTA+JPkau+2RgYSaeud9+kNRUbXQtsoJWqsBPhi7MkymAmpbXon4Q==}
'@orval/hono@8.22.0':
resolution: {integrity: sha512-GMCpGZqCuGYSu10KTt2q3WYzCqEcTGxr18z3HgHv9dX22sv/V76dlLBh3SE72xp8Z7/jmoq3GKBdgU9k98ju0w==}
peerDependencies:
typescript: '>=5'
peerDependenciesMeta:
typescript:
optional: true
'@orval/mcp@8.28.1':
resolution: {integrity: sha512-cneKoiS1zkYg6Qhj9oGdMqmj5pOLE+4GgIiDATxLbDWksV4wDkxS3vvW5seLOIHnmo4TBxy6IV9s24Tn/4Gndw==}
'@orval/mcp@8.22.0':
resolution: {integrity: sha512-ySa4EenAF8YMCpbmddJGO3lItTPC8Uf/iT+P2ezaowVgxOCPX/fjG7dd0fnVmrr0vaphi53yWx5o5DlT17FzLg==}
'@orval/mock@8.28.1':
resolution: {integrity: sha512-zaKc4xdI9Ap3jaiLRqj0Zr1NMmz3/Yjz6ifiDVVHiW5VQXgpqO1qNR1m4ia/hK23VhDszWA3kA/Yvp13TLqjzw==}
'@orval/mock@8.22.0':
resolution: {integrity: sha512-ZCEFpdi4z+YOCg0Tsgz6DO/M1TSfYxE5urDWJgYNUKeD8XDEHFb2IgTiiaAwJunqWnRQuiMfGp9G81+u10Kx6w==}
'@orval/query@8.28.1':
resolution: {integrity: sha512-Qlz4E2XNA1yWP8C6ipDTKmR7khbqEf3zRlV+GE7fNs5pJk7Mv6sM75sBg6iYRui5D2i1E3ReeWLcWNGDzNwi9g==}
'@orval/query@8.22.0':
resolution: {integrity: sha512-IH9049z860CLUeGEezGv+yOvUvcAyDnd9doDe1Ryi0WxsDul2Vh3LjCRUEQf4JZiyZezadWYYGzs0lwnCn/afA==}
'@orval/solid-start@8.28.1':
resolution: {integrity: sha512-c+NUDGX6CGQe3ppQO0rWrDpA2eupC/FfvYr6vUGjRhNTaBxnIySTkvPJc+1hW14NKFRSkXb5WzsCgmAzGqFs6g==}
'@orval/solid-start@8.22.0':
resolution: {integrity: sha512-Q1ZCWOrA6/VJnyj62XpPxXti9NpAA4lDZVqPL2uQ5gbxv+T+azEaazKqYIpSBJXbl1aEezujdcyg/DVUakWKEw==}
'@orval/swr@8.28.1':
resolution: {integrity: sha512-zD9XHQPkBpcXMJ1/wOqiqT+x6HqZ4viNl6EgKSIRRcjdbHB29TvN+wtNKMRrRETbu8QThOtGUl6jctWB6XWcUw==}
'@orval/swr@8.22.0':
resolution: {integrity: sha512-OSeWX3Af8ESapKIo3XpbOaTMaG8oeEtuucFyOUauqg6NyC6/9Ikcf2csBdF0AuIKA0QTcjcXxra/ccj1f7KnRg==}
'@orval/zod@8.28.1':
resolution: {integrity: sha512-fQWgshUW3BNG3dBBldUuWLGi+7cXb5r7xat1/RQ0Uaum60Pj1VWQnM94Kzzaki/6hjFLH6ccTHcCV5JFR4Pguw==}
'@orval/zod@8.22.0':
resolution: {integrity: sha512-briHtUTz79fvCeIFfGW3IbmUIF9DOotUoWFa/sKUjRUG8PMGDWSjQzO8QdLzLoETVGo9g4TfGwp5Xjcs81GZTA==}
'@oxc-parser/binding-android-arm-eabi@0.127.0':
resolution: {integrity: sha512-0LC7ye4hvqbIKxAzThzvswgHLFu2AURKzYLeSVvLdu2TBOYWQDmHnTqPLeA597BcUCxiLqLsS4CJ5uoI5WYWCQ==}
@@ -3100,8 +3103,8 @@ packages:
resolution: {integrity: sha512-zHEQExXo58Nk7/Tju4y4HLVJ+B5nnDmR7vPhhHLVinL0z99aGrd6S/8HREupVpfAsim326pfzIbSM+UOvEbnOw==}
engines: {node: '>=22'}
'@scalar/openapi-types@0.9.4':
resolution: {integrity: sha512-eUSIjZEBLEF2i2pvcNdzXhzlKx6qt+hZsNklLmCyzPBoXWxHcQaEClgMFavXDRRvJDdi6LkyjqGUqqf0XgRgFg==}
'@scalar/openapi-types@0.8.0':
resolution: {integrity: sha512-WmaxVSfvY5K/TwcG2B2TU1WOe1As1uc2s7myswtP6dBlcjU3hM08SApxv/jmyGaCE8t4gO5BBhmHY4pDUfmr2g==}
engines: {node: '>=22'}
'@scalar/openapi-types@0.9.5':
@@ -3248,6 +3251,13 @@ packages:
'@signozhq/icons@0.4.0':
resolution: {integrity: sha512-QctNvNPlQlsefFdIVmSy/P/7a1IcQ3IryKP0KPMqtoqew3q89FGUmFa5IfEJ7Z3CHhtG1zaXwBKqP72QkLyA3g==}
'@signozhq/noz-client@1.13.0':
resolution: {integrity: sha512-130L2xomHnQZK8ZtAst34qFz9d2rSF/JYpg9gKvJkZVS9+46CPZeTW8Va9PNS9Oa5owezVHIXZStTEbsHIxnwg==}
peerDependencies:
axios: ^1.20.0
react: ^18.2.0
react-query: ^3.39.3
'@signozhq/ui@0.4.0-rc.5':
resolution: {integrity: sha512-WlJMfeDfvL2hjMpTpHhhND/tuK7X0sfXQlx6E1ZG+6E/DYHpuhYljfvW3E6/BohIlHFlTyCs/ZMl9wnV2k9Zcw==}
peerDependencies:
@@ -4741,6 +4751,10 @@ packages:
crelt@1.0.6:
resolution: {integrity: sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==}
cross-spawn@7.0.5:
resolution: {integrity: sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==}
engines: {node: '>= 8'}
cross-spawn@7.0.6:
resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==}
engines: {node: '>= 8'}
@@ -7202,8 +7216,8 @@ packages:
resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==}
engines: {node: '>=10'}
orval@8.28.1:
resolution: {integrity: sha512-1SfXGZsmVuBlMa6dC3njd/c0aOe+gbopAyXLEnuFI2UnEJoQFnDnbWgZJ9CfEe3vq4sVVJmvpV+qyekyCnvYDw==}
orval@8.22.0:
resolution: {integrity: sha512-N8UmB4DOhW+Z2SzVq4oS/pN3DsRPq+msrRU8NyRldP1i0yiqT6qo8mUxHPk2umqYjyY0FlR2mvPbi/Jf5CiP7A==}
engines: {node: '>=22.18.0'}
hasBin: true
peerDependencies:
@@ -11619,25 +11633,25 @@ snapshots:
'@open-draft/until@1.0.3': {}
'@orval/angular@8.28.1(typescript@5.9.3)':
'@orval/angular@8.22.0(typescript@5.9.3)':
dependencies:
'@orval/core': 8.28.1(typescript@5.9.3)
'@orval/core': 8.22.0(typescript@5.9.3)
transitivePeerDependencies:
- '@faker-js/faker'
- supports-color
- typescript
'@orval/axios@8.28.1(typescript@5.9.3)':
'@orval/axios@8.22.0(typescript@5.9.3)':
dependencies:
'@orval/core': 8.28.1(typescript@5.9.3)
'@orval/core': 8.22.0(typescript@5.9.3)
transitivePeerDependencies:
- '@faker-js/faker'
- supports-color
- typescript
'@orval/core@8.28.1(typescript@5.9.3)':
'@orval/core@8.22.0(typescript@5.9.3)':
dependencies:
'@scalar/openapi-types': 0.9.4
'@scalar/openapi-types': 0.8.0
acorn: 8.16.0
compare-versions: 6.1.1
debug: 4.4.3(supports-color@5.5.0)
@@ -11653,27 +11667,27 @@ snapshots:
- supports-color
- typescript
'@orval/effect@8.28.1(typescript@5.9.3)':
'@orval/effect@8.22.0(typescript@5.9.3)':
dependencies:
'@orval/core': 8.28.1(typescript@5.9.3)
'@orval/core': 8.22.0(typescript@5.9.3)
remeda: 2.34.0
transitivePeerDependencies:
- '@faker-js/faker'
- supports-color
- typescript
'@orval/fetch@8.28.1(typescript@5.9.3)':
'@orval/fetch@8.22.0(typescript@5.9.3)':
dependencies:
'@orval/core': 8.28.1(typescript@5.9.3)
'@orval/core': 8.22.0(typescript@5.9.3)
transitivePeerDependencies:
- '@faker-js/faker'
- supports-color
- typescript
'@orval/hono@8.28.1(typescript@5.9.3)':
'@orval/hono@8.22.0(typescript@5.9.3)':
dependencies:
'@orval/core': 8.28.1(typescript@5.9.3)
'@orval/zod': 8.28.1(typescript@5.9.3)
'@orval/core': 8.22.0(typescript@5.9.3)
'@orval/zod': 8.22.0(typescript@5.9.3)
fs-extra: 11.3.3
optionalDependencies:
typescript: 5.9.3
@@ -11681,55 +11695,55 @@ snapshots:
- '@faker-js/faker'
- supports-color
'@orval/mcp@8.28.1(typescript@5.9.3)':
'@orval/mcp@8.22.0(typescript@5.9.3)':
dependencies:
'@orval/core': 8.28.1(typescript@5.9.3)
'@orval/fetch': 8.28.1(typescript@5.9.3)
'@orval/zod': 8.28.1(typescript@5.9.3)
'@orval/core': 8.22.0(typescript@5.9.3)
'@orval/fetch': 8.22.0(typescript@5.9.3)
'@orval/zod': 8.22.0(typescript@5.9.3)
transitivePeerDependencies:
- '@faker-js/faker'
- supports-color
- typescript
'@orval/mock@8.28.1(typescript@5.9.3)':
'@orval/mock@8.22.0(typescript@5.9.3)':
dependencies:
'@orval/core': 8.28.1(typescript@5.9.3)
'@orval/core': 8.22.0(typescript@5.9.3)
remeda: 2.34.0
transitivePeerDependencies:
- '@faker-js/faker'
- supports-color
- typescript
'@orval/query@8.28.1(typescript@5.9.3)':
'@orval/query@8.22.0(typescript@5.9.3)':
dependencies:
'@orval/core': 8.28.1(typescript@5.9.3)
'@orval/fetch': 8.28.1(typescript@5.9.3)
'@orval/core': 8.22.0(typescript@5.9.3)
'@orval/fetch': 8.22.0(typescript@5.9.3)
remeda: 2.34.0
transitivePeerDependencies:
- '@faker-js/faker'
- supports-color
- typescript
'@orval/solid-start@8.28.1(typescript@5.9.3)':
'@orval/solid-start@8.22.0(typescript@5.9.3)':
dependencies:
'@orval/core': 8.28.1(typescript@5.9.3)
'@orval/core': 8.22.0(typescript@5.9.3)
transitivePeerDependencies:
- '@faker-js/faker'
- supports-color
- typescript
'@orval/swr@8.28.1(typescript@5.9.3)':
'@orval/swr@8.22.0(typescript@5.9.3)':
dependencies:
'@orval/core': 8.28.1(typescript@5.9.3)
'@orval/fetch': 8.28.1(typescript@5.9.3)
'@orval/core': 8.22.0(typescript@5.9.3)
'@orval/fetch': 8.22.0(typescript@5.9.3)
transitivePeerDependencies:
- '@faker-js/faker'
- supports-color
- typescript
'@orval/zod@8.28.1(typescript@5.9.3)':
'@orval/zod@8.22.0(typescript@5.9.3)':
dependencies:
'@orval/core': 8.28.1(typescript@5.9.3)
'@orval/core': 8.22.0(typescript@5.9.3)
jsesc: 3.1.0
remeda: 2.34.0
transitivePeerDependencies:
@@ -12217,7 +12231,7 @@ snapshots:
leven: 4.1.0
yaml: 2.9.1
'@scalar/openapi-types@0.9.4': {}
'@scalar/openapi-types@0.8.0': {}
'@scalar/openapi-types@0.9.5': {}
@@ -12369,6 +12383,12 @@ snapshots:
'@signozhq/icons@0.4.0': {}
'@signozhq/noz-client@1.13.0(axios@1.21.1)(react-query@3.39.3(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react@18.2.0)':
dependencies:
axios: 1.21.1
react: 18.2.0
react-query: 3.39.3(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
'@signozhq/ui@0.4.0-rc.5(@date-fns/tz@1.4.1)(@signozhq/design-tokens@2.8.0)(@signozhq/icons@0.4.0)(@types/react@18.0.26)(date-fns@4.1.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)':
dependencies:
'@base-ui/react': 1.8.0(@date-fns/tz@1.4.1)(@types/react@18.0.26)(date-fns@4.1.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
@@ -14017,6 +14037,12 @@ snapshots:
crelt@1.0.6: {}
cross-spawn@7.0.5:
dependencies:
path-key: 3.1.1
shebang-command: 2.0.0
which: 2.0.2
cross-spawn@7.0.6:
dependencies:
path-key: 3.1.1
@@ -14611,7 +14637,7 @@ snapshots:
execa@5.1.1:
dependencies:
cross-spawn: 7.0.6
cross-spawn: 7.0.5
get-stream: 6.0.1
human-signals: 2.1.0
is-stream: 2.0.1
@@ -17077,24 +17103,24 @@ snapshots:
strip-ansi: 6.0.1
wcwidth: 1.0.1
orval@8.28.1(prettier@3.8.3)(typescript@5.9.3):
orval@8.22.0(prettier@3.8.3)(typescript@5.9.3):
dependencies:
'@commander-js/extra-typings': 15.0.0(commander@15.0.0)
'@orval/angular': 8.28.1(typescript@5.9.3)
'@orval/axios': 8.28.1(typescript@5.9.3)
'@orval/core': 8.28.1(typescript@5.9.3)
'@orval/effect': 8.28.1(typescript@5.9.3)
'@orval/fetch': 8.28.1(typescript@5.9.3)
'@orval/hono': 8.28.1(typescript@5.9.3)
'@orval/mcp': 8.28.1(typescript@5.9.3)
'@orval/mock': 8.28.1(typescript@5.9.3)
'@orval/query': 8.28.1(typescript@5.9.3)
'@orval/solid-start': 8.28.1(typescript@5.9.3)
'@orval/swr': 8.28.1(typescript@5.9.3)
'@orval/zod': 8.28.1(typescript@5.9.3)
'@orval/angular': 8.22.0(typescript@5.9.3)
'@orval/axios': 8.22.0(typescript@5.9.3)
'@orval/core': 8.22.0(typescript@5.9.3)
'@orval/effect': 8.22.0(typescript@5.9.3)
'@orval/fetch': 8.22.0(typescript@5.9.3)
'@orval/hono': 8.22.0(typescript@5.9.3)
'@orval/mcp': 8.22.0(typescript@5.9.3)
'@orval/mock': 8.22.0(typescript@5.9.3)
'@orval/query': 8.22.0(typescript@5.9.3)
'@orval/solid-start': 8.22.0(typescript@5.9.3)
'@orval/swr': 8.22.0(typescript@5.9.3)
'@orval/zod': 8.22.0(typescript@5.9.3)
'@scalar/json-magic': 0.12.20
'@scalar/openapi-parser': 0.28.16
'@scalar/openapi-types': 0.9.4
'@scalar/openapi-types': 0.8.0
chokidar: 5.0.0
commander: 15.0.0
execa: 9.6.1
@@ -19151,7 +19177,7 @@ snapshots:
markdown-it: 14.3.3
minimatch: 10.2.5
typescript: 5.9.3
yaml: 2.9.1
yaml: 2.8.4
typescript-plugin-css-modules@5.3.0(ts-node@10.9.1(@swc/core@1.16.2)(@types/node@22.20.5)(typescript@5.9.3))(typescript@5.9.3):
dependencies:
@@ -19632,8 +19658,7 @@ snapshots:
yaml@1.10.3: {}
yaml@2.8.4:
optional: true
yaml@2.8.4: {}
yaml@2.9.1: {}

View File

@@ -117,6 +117,8 @@
"log_based_alert_desc": "Send a notification when a condition occurs in the logs data.",
"traces_based_alert": "Trace-based Alert",
"traces_based_alert_desc": "Send a notification when a condition occurs in the traces data.",
"ai_traces_based_alert": "AI Trace-based Alert",
"ai_traces_based_alert_desc": "Send a notification when a condition occurs in AI and LLM traces.",
"exceptions_based_alert": "Exceptions-based Alert",
"exceptions_based_alert_desc": "Send a notification when a condition occurs in the exceptions data.",
"field_unit": "Threshold unit",

View File

@@ -121,6 +121,8 @@
"log_based_alert_desc": "Send a notification when a condition occurs in the logs data.",
"traces_based_alert": "Trace-based Alert",
"traces_based_alert_desc": "Send a notification when a condition occurs in the traces data.",
"ai_traces_based_alert": "AI Trace-based Alert",
"ai_traces_based_alert_desc": "Send a notification when a condition occurs in AI and LLM traces.",
"exceptions_based_alert": "Exceptions-based Alert",
"exceptions_based_alert_desc": "Send a notification when a condition occurs in the exceptions data.",
"field_unit": "Threshold unit",

View File

@@ -1,5 +1,4 @@
import type { ReactChild } from 'react';
import { useCallback, useMemo } from 'react';
import { ReactChild, useCallback, useMemo } from 'react';
import getLocalStorageApi from 'api/browser/localstorage/get';
import setLocalStorageApi from 'api/browser/localstorage/set';
import { useListUsers } from 'api/generated/services/users';
@@ -14,7 +13,7 @@ import { Redirect } from 'lib/router/Redirect';
import { useAppLocation } from 'lib/router/useAppLocation';
import { useAppContext } from 'providers/App/App';
import { LicensePlatform, LicenseState } from 'types/api/licensesV3/getActive';
import type { OrgPreference } from 'types/api/preferences/preference';
import { OrgPreference } from 'types/api/preferences/preference';
import { USER_ROLES } from 'types/roles';
import { isSignozAdminEmail } from 'utils/app';
import {

View File

@@ -1,4 +1,4 @@
import type { ReactElement } from 'react';
import { ReactElement } from 'react';
import { QueryClient, QueryClientProvider } from 'react-query';
import {
MemoryRouter,
@@ -21,21 +21,18 @@ import {
} from 'lib/authz/utils/authz-test-utils';
import { rest, server } from 'mocks-server/server';
import { AppContext } from 'providers/App/App';
import type { IAppContext, IUser } from 'providers/App/types';
import type {
LicenseResModel,
TrialInfo,
} from 'types/api/licensesV3/getActive';
import { IAppContext, IUser } from 'providers/App/types';
import {
LicenseEvent,
LicensePlatform,
LicenseResModel,
LicenseState,
LicenseStatus,
TrialInfo,
} from 'types/api/licensesV3/getActive';
import type { OrgPreference } from 'types/api/preferences/preference';
import type { ROLES } from 'types/roles';
import { USER_ROLES } from 'types/roles';
import type { routeWithInitialAuthZSupport } from 'utils/permission';
import { OrgPreference } from 'types/api/preferences/preference';
import { ROLES, USER_ROLES } from 'types/roles';
import { routeWithInitialAuthZSupport } from 'utils/permission';
import PrivateRoute from '../Private';

View File

@@ -1,5 +1,11 @@
import type { ReactNode } from 'react';
import { Suspense, useCallback, useEffect, useMemo, useState } from 'react';
import {
ReactNode,
Suspense,
useCallback,
useEffect,
useMemo,
useState,
} from 'react';
import { Outlet } from 'react-router';
import * as Sentry from '@sentry/react';
import getLocalStorageApi from 'api/browser/localstorage/get';
@@ -26,13 +32,16 @@ import { getCurrentLocation, navigate, subscribe } from 'lib/router/navigation';
import ErrorBoundaryFallback from 'pages/ErrorBoundaryFallback/ErrorBoundaryFallback';
import posthog from 'posthog-js';
import { useAppContext } from 'providers/App/App';
import type { IUser } from 'providers/App/types';
import { IUser } from 'providers/App/types';
import { LicenseStatus } from 'types/api/licensesV3/getActive';
import { extractDomain } from 'utils/app';
import PrivateRoute from './Private';
import type { AppRoutes } from './routes';
import defaultRoutes, { LIST_LICENSES, SUPPORT_ROUTE } from './routes';
import defaultRoutes, {
AppRoutes,
LIST_LICENSES,
SUPPORT_ROUTE,
} from './routes';
import type { EnabledRouteKeys } from './RouteGate';
import {
isInjectedScriptError,

View File

@@ -5,8 +5,7 @@ import { RethrowRouteError } from 'lib/router/RethrowRouteError';
import { Home } from './pageComponents';
import { RouteGate } from './RouteGate';
import type { AppRoutes } from './routes';
import routes, { LIST_LICENSES, SUPPORT_ROUTE } from './routes';
import routes, { AppRoutes, LIST_LICENSES, SUPPORT_ROUTE } from './routes';
/**
* The gate is keyed by its route entry. The outlet renders the match unkeyed,

View File

@@ -1,8 +1,7 @@
import { ENVIRONMENT } from 'constants/env';
import { server } from 'mocks-server/server';
import type { RestRequest } from 'msw';
import { rest } from 'msw';
import type { MetricRangePayloadV5 } from 'types/api/v5/queryRange';
import { rest, RestRequest } from 'msw';
import { MetricRangePayloadV5 } from 'types/api/v5/queryRange';
const QUERY_RANGE_URL = `${ENVIRONMENT.baseURL}/api/v5/query_range`;
@@ -322,8 +321,8 @@ const createTracesResponse = ({
httpMethod: trace.httpMethod ?? httpMethods[index % httpMethods.length],
responseStatusCode:
trace.responseStatusCode ?? statusCodes[index % statusCodes.length],
traceID: `trace-id-${index}`,
spanID: `span-id-${index}`,
trace_id: `trace-id-${index}`,
span_id: `span-id-${index}`,
},
};
})
@@ -341,8 +340,8 @@ const createTracesResponse = ({
durationNano: 1000000 + cumulativeIndex * 100000,
httpMethod: httpMethods[cumulativeIndex % httpMethods.length],
responseStatusCode: statusCodes[cumulativeIndex % statusCodes.length],
traceID: `trace-id-${cumulativeIndex}`,
spanID: `span-id-${cumulativeIndex}`,
trace_id: `trace-id-${cumulativeIndex}`,
span_id: `span-id-${cumulativeIndex}`,
},
};
},

View File

@@ -1,5 +1,4 @@
import type { InternalAxiosRequestConfig } from 'axios';
import axios from 'axios';
import axios, { InternalAxiosRequestConfig } from 'axios';
import {
interceptorRejected,

View File

@@ -1,7 +1,6 @@
import type { AxiosError, AxiosResponse } from 'axios';
import { isCancel } from 'axios';
import type { ErrorResponse } from 'types/api';
import type { ErrorStatusCode } from 'types/common';
import { AxiosError, AxiosResponse, isCancel } from 'axios';
import { ErrorResponse } from 'types/api';
import { ErrorStatusCode } from 'types/common';
export function ErrorResponseHandler(error: AxiosError): ErrorResponse {
const { response, request } = error;

View File

@@ -1,5 +1,5 @@
import type { RenderErrorResponseDTO } from 'api/generated/services/sigNoz.schemas/renderErrorResponseDTO';
import type { AxiosError } from 'axios';
import { RenderErrorResponseDTO } from 'api/generated/services/sigNoz.schemas';
import { AxiosError } from 'axios';
import APIError from 'types/api/error';
// The wire shape these handlers can actually rely on. The generated

View File

@@ -1,5 +1,5 @@
import type { AxiosError } from 'axios';
import type { ErrorV2Resp } from 'types/api';
import { AxiosError } from 'axios';
import { ErrorV2Resp } from 'types/api';
import APIError from 'types/api/error';
function isErrorV2Resp(data: unknown): data is ErrorV2Resp {

View File

@@ -1,6 +1,6 @@
import axios from 'api';
import type { AxiosResponse } from 'axios';
import type { AllIntegrationsProps } from 'types/api/integrations/types';
import { AxiosResponse } from 'axios';
import { AllIntegrationsProps } from 'types/api/integrations/types';
export const getAllIntegrations = (): Promise<
AxiosResponse<AllIntegrationsProps>

View File

@@ -1,6 +1,6 @@
import axios from 'api';
import type { AxiosResponse } from 'axios';
import type {
import { AxiosResponse } from 'axios';
import {
GetIntegrationPayloadProps,
GetIntegrationProps,
} from 'types/api/integrations/types';

View File

@@ -1,6 +1,6 @@
import axios from 'api';
import type { AxiosResponse } from 'axios';
import type {
import { AxiosResponse } from 'axios';
import {
GetIntegrationPayloadProps,
GetIntegrationStatusProps,
} from 'types/api/integrations/types';

View File

@@ -1,8 +1,8 @@
import axios from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import type { AxiosError } from 'axios';
import type { ErrorResponse, SuccessResponse } from 'types/api';
import type {
import { AxiosError } from 'axios';
import { ErrorResponse, SuccessResponse } from 'types/api';
import {
InstalledIntegrationsSuccessResponse,
InstallIntegrationKeyProps,
} from 'types/api/integrations/types';

View File

@@ -1,8 +1,8 @@
import axios from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import type { AxiosError } from 'axios';
import type { ErrorResponse, SuccessResponse } from 'types/api';
import type {
import { AxiosError } from 'axios';
import { ErrorResponse, SuccessResponse } from 'types/api';
import {
UninstallIntegrationProps,
UninstallIntegrationSuccessResponse,
} from 'types/api/integrations/types';

View File

@@ -1,6 +1,5 @@
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import type { AxiosError } from 'axios';
import { CanceledError } from 'axios';
import { AxiosError, CanceledError } from 'axios';
describe('ErrorResponseHandler', () => {
// axios aborts a request whose signal fired before it was sent without ever

View File

@@ -1,6 +1,6 @@
import { ErrorResponseHandlerV2 } from 'api/ErrorResponseHandlerV2';
import type { AxiosError } from 'axios';
import type { ErrorV2Resp } from 'types/api';
import { AxiosError } from 'axios';
import { ErrorV2Resp } from 'types/api';
import APIError from 'types/api/error';
function asAxiosError(partial: Partial<AxiosError>): AxiosError<ErrorV2Resp> {

View File

@@ -11,7 +11,7 @@
* to resume, which each return a new executionId to open a fresh SSE stream.
*
* Types in this file re-use the OpenAPI-generated DTOs in
* `src/api/ai-assistant/sigNozAIAssistantAPI.schemas.ts`.
* `@signozhq/noz-client`.
* Local types are defined only when the UI needs a different shape — for
* example, the SSE event union adds a literal `type` discriminator that the
* generated event DTOs leave loose.
@@ -30,16 +30,11 @@ import rotateSession from 'api/v2/sessions/rotate/post';
import afterLogin from 'AppRoutes/utils';
import type {
ActionResultResponseDTO,
ApprovalEventDTO,
ApproveResponseDTO,
CancelResponseDTO,
ClarificationEventDTO,
ClarifyResponseDTO,
ConversationEventDTO,
CreateMessageResponseDTO,
CreateThreadResponseDTO,
DoneEventDTO,
ErrorEventDTO,
ExecutionStateDTO,
FeedbackRatingDTO,
ListThreadsApiV1AssistantThreadsGetArchived,
@@ -47,20 +42,15 @@ import type {
MessageContextDTO,
MessageContextDTOSource,
MessageContextDTOType,
MessageEventDTO,
MessageSummaryDTO,
RegenerateResponseDTO,
StatusEventDTO,
ThinkingEventDTO,
ThreadDetailResponseDTO,
ThreadListResponseDTO,
ThreadSummaryDTO,
ChipDTO,
ChipsResponseDTO,
PageTypeDTO,
ToolCallEventDTO,
ToolResultEventDTO,
} from './sigNozAIAssistantAPI.schemas';
} from '@signozhq/noz-client';
import { LOCALSTORAGE } from 'constants/localStorage';
import {
@@ -70,6 +60,10 @@ import {
} from '../AIAPIInstance';
import { getSigNozInstanceUrl } from 'utils/signozInstanceUrl';
import type { SSEEvent } from './sseEvent';
export type { SSEEvent };
// ---------------------------------------------------------------------------
// SSE-only auth wrapper.
//
@@ -183,26 +177,6 @@ async function fetchSSEWithAuth(
return res;
}
// ---------------------------------------------------------------------------
// SSE event types
//
// The generated event DTOs each declare `type?: string` (loose). The UI needs
// a discriminated union, so we intersect each variant with a string-literal
// `type` to enable narrowing via `event.type === 'status'`.
// ---------------------------------------------------------------------------
export type SSEEvent =
| (StatusEventDTO & { type: 'status' })
| (MessageEventDTO & { type: 'message' })
| (ThinkingEventDTO & { type: 'thinking' })
| (ToolCallEventDTO & { type: 'tool_call' })
| (ToolResultEventDTO & { type: 'tool_result' })
| (ApprovalEventDTO & { type: 'approval' })
| (ClarificationEventDTO & { type: 'clarification' })
| (ErrorEventDTO & { type: 'error' })
| (ConversationEventDTO & { type: 'conversation' })
| (DoneEventDTO & { type: 'done' });
/** String-literal view of `ExecutionStateDTO` for ergonomic comparisons. */
export type ExecutionState = `${ExecutionStateDTO}`;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,32 @@
import type {
ApprovalEventDTO,
ClarificationEventDTO,
ConversationEventDTO,
DoneEventDTO,
ErrorEventDTO,
MessageEventDTO,
StatusEventDTO,
ThinkingEventDTO,
ToolCallEventDTO,
ToolResultEventDTO,
} from '@signozhq/noz-client';
// ---------------------------------------------------------------------------
// SSE event types
//
// The generated event DTOs each declare `type?: string` (loose). The UI needs
// a discriminated union, so we intersect each variant with a string-literal
// `type` to enable narrowing via `event.type === 'status'`.
// ---------------------------------------------------------------------------
export type SSEEvent =
| (StatusEventDTO & { type: 'status' })
| (MessageEventDTO & { type: 'message' })
| (ThinkingEventDTO & { type: 'thinking' })
| (ToolCallEventDTO & { type: 'tool_call' })
| (ToolResultEventDTO & { type: 'tool_result' })
| (ApprovalEventDTO & { type: 'approval' })
| (ClarificationEventDTO & { type: 'clarification' })
| (ErrorEventDTO & { type: 'error' })
| (ConversationEventDTO & { type: 'conversation' })
| (DoneEventDTO & { type: 'done' });

View File

@@ -1,9 +1,9 @@
import axios from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import type { AxiosError } from 'axios';
import { AxiosError } from 'axios';
import convertObjectIntoParams from 'lib/query/convertObjectIntoParams';
import type { ErrorResponse, SuccessResponse } from 'types/api';
import type { PayloadProps, Props } from 'types/api/alerts/getTriggered';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { PayloadProps, Props } from 'types/api/alerts/getTriggered';
/**
* @deprecated Use the generated `useGetAlerts` hook (or `getAlerts` fetcher) from

View File

@@ -1,5 +1,5 @@
import { patchRuleByID } from 'api/generated/services/rules';
import type { RuletypesPostableRuleDTO } from 'api/generated/services/sigNoz.schemas/ruletypesPostableRuleDTO';
import type { RuletypesPostableRuleDTO } from 'api/generated/services/sigNoz.schemas';
// why: patchRuleByID's generated body type is the full RuletypesPostableRuleDTO
// because the backend OpenAPI spec currently advertises PostableRule. The

View File

@@ -17,13 +17,11 @@ function loadGetModule(href: string): GetModule {
// oxlint-disable-next-line typescript-eslint/no-require-imports, typescript-eslint/no-var-requires
mod = require('../get');
});
base.remove();
return mod;
}
afterEach(() => {
for (const el of document.head.querySelectorAll('base')) {
el.remove();
}
localStorage.clear();
});

View File

@@ -15,13 +15,11 @@ function loadGetModule(href: string): GetModule {
// oxlint-disable-next-line typescript-eslint/no-require-imports, typescript-eslint/no-var-requires
mod = require('../get');
});
base.remove();
return mod;
}
afterEach(() => {
for (const el of document.head.querySelectorAll('base')) {
el.remove();
}
sessionStorage.clear();
});

View File

@@ -1,9 +1,10 @@
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import type { AxiosError } from 'axios';
import axios from 'axios';
import type { ErrorResponse, SuccessResponse } from 'types/api';
import type { ChangelogSchema } from 'types/api/changelog/getChangelogByVersion';
import { DeploymentType } from 'types/api/changelog/getChangelogByVersion';
import axios, { AxiosError } from 'axios';
import { ErrorResponse, SuccessResponse } from 'types/api';
import {
ChangelogSchema,
DeploymentType,
} from 'types/api/changelog/getChangelogByVersion';
const getChangelogByVersion = async (
versionId: string,

View File

@@ -1,10 +1,10 @@
import { LogEventAxiosInstance as axios } from 'api';
import getLocalStorageApi from 'api/browser/localstorage/get';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import type { AxiosError } from 'axios';
import { AxiosError } from 'axios';
import { LOCALSTORAGE } from 'constants/localStorage';
import type { ErrorResponse, SuccessResponse } from 'types/api';
import type { EventSuccessPayloadProps } from 'types/api/events/types';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { EventSuccessPayloadProps } from 'types/api/events/types';
const logEvent = async (
eventName: string,

View File

@@ -1,9 +1,9 @@
import { ApiV5Instance } from 'api';
import { ErrorResponseHandlerV2 } from 'api/ErrorResponseHandlerV2';
import type { QueryRangePayloadV5 } from 'api/v5/v5';
import type { AxiosError } from 'axios';
import type { ErrorV2Resp, SuccessResponseV2 } from 'types/api';
import type { ICompositeMetricQuery } from 'types/api/alerts/compositeQuery';
import { QueryRangePayloadV5 } from 'api/v5/v5';
import { AxiosError } from 'axios';
import { ErrorV2Resp, SuccessResponseV2 } from 'types/api';
import { ICompositeMetricQuery } from 'types/api/alerts/compositeQuery';
interface ISubstituteVars {
compositeQuery: ICompositeMetricQuery;

View File

@@ -1,10 +1,10 @@
import { ApiV2Instance as axios } from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import type { AxiosError } from 'axios';
import { AxiosError } from 'axios';
import getStartEndRangeTime from 'lib/getStartEndRangeTime';
import store from 'store';
import type { ErrorResponse, SuccessResponse } from 'types/api';
import type {
import { ErrorResponse, SuccessResponse } from 'types/api';
import {
Props,
VariableResponseProps,
} from 'types/api/dashboard/variables/query';

View File

@@ -1,8 +1,8 @@
import axios from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import type { AxiosError } from 'axios';
import type { ErrorResponse, SuccessResponse } from 'types/api';
import type { PayloadProps } from 'types/api/disks/getDisks';
import { AxiosError } from 'axios';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { PayloadProps } from 'types/api/disks/getDisks';
const getDisks = async (): Promise<
SuccessResponse<PayloadProps> | ErrorResponse

View File

@@ -1,8 +1,8 @@
import axios from 'api';
import { ErrorResponseHandlerV2 } from 'api/ErrorResponseHandlerV2';
import type { AxiosError } from 'axios';
import type { ErrorV2Resp, SuccessResponseV2 } from 'types/api';
import type { FieldKeyResponse } from 'types/api/dynamicVariables/getFieldKeys';
import { AxiosError } from 'axios';
import { ErrorV2Resp, SuccessResponseV2 } from 'types/api';
import { FieldKeyResponse } from 'types/api/dynamicVariables/getFieldKeys';
/**
* Get field keys for a given signal type

View File

@@ -1,9 +1,9 @@
/* eslint-disable sonarjs/cognitive-complexity */
import axios from 'api';
import { ErrorResponseHandlerV2 } from 'api/ErrorResponseHandlerV2';
import type { AxiosError } from 'axios';
import type { ErrorV2Resp, SuccessResponseV2 } from 'types/api';
import type { FieldValueResponse } from 'types/api/dynamicVariables/getFieldValues';
import { AxiosError } from 'axios';
import { ErrorV2Resp, SuccessResponseV2 } from 'types/api';
import { FieldValueResponse } from 'types/api/dynamicVariables/getFieldValues';
/**
* Get field values for a given signal type and field name

View File

@@ -1,8 +1,8 @@
import axios from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import type { AxiosError } from 'axios';
import type { ErrorResponse, SuccessResponse } from 'types/api';
import type { PayloadProps, Props } from 'types/api/errors/getAll';
import { AxiosError } from 'axios';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { PayloadProps, Props } from 'types/api/errors/getAll';
const getAll = async (
props: Props,

View File

@@ -1,12 +1,9 @@
import axios from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import type { AxiosError } from 'axios';
import { AxiosError } from 'axios';
import createQueryParams from 'lib/createQueryParams';
import type { ErrorResponse, SuccessResponse } from 'types/api';
import type {
PayloadProps,
Props,
} from 'types/api/errors/getByErrorTypeAndService';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { PayloadProps, Props } from 'types/api/errors/getByErrorTypeAndService';
const getByErrorType = async (
props: Props,

View File

@@ -1,9 +1,9 @@
import axios from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import type { AxiosError } from 'axios';
import { AxiosError } from 'axios';
import createQueryParams from 'lib/createQueryParams';
import type { ErrorResponse, SuccessResponse } from 'types/api';
import type { PayloadProps, Props } from 'types/api/errors/getByErrorId';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { PayloadProps, Props } from 'types/api/errors/getByErrorId';
const getById = async (
props: Props,

View File

@@ -1,8 +1,8 @@
import axios from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import type { AxiosError } from 'axios';
import type { ErrorResponse, SuccessResponse } from 'types/api';
import type { PayloadProps, Props } from 'types/api/errors/getErrorCounts';
import { AxiosError } from 'axios';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { PayloadProps, Props } from 'types/api/errors/getErrorCounts';
const getErrorCounts = async (
props: Props,

View File

@@ -1,9 +1,9 @@
import axios from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import type { AxiosError } from 'axios';
import { AxiosError } from 'axios';
import createQueryParams from 'lib/createQueryParams';
import type { ErrorResponse, SuccessResponse } from 'types/api';
import type { PayloadProps, Props } from 'types/api/errors/getNextPrevId';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { PayloadProps, Props } from 'types/api/errors/getNextPrevId';
const getErrorCounts = async (
props: Props,

View File

@@ -14,15 +14,13 @@ import type {
UseQueryResult,
} from 'react-query';
import type { GetAIObservabilityFieldsKeys200 } from '../sigNoz.schemas/getAIObservabilityFieldsKeys200';
import type { GetAIObservabilityFieldsKeysParams } from '../sigNoz.schemas/getAIObservabilityFieldsKeysParams';
import type { GetAIObservabilityFieldsValues200 } from '../sigNoz.schemas/getAIObservabilityFieldsValues200';
import type { GetAIObservabilityFieldsValuesParams } from '../sigNoz.schemas/getAIObservabilityFieldsValuesParams';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type {
GetAIObservabilityFieldsKeys200,
GetAIObservabilityFieldsKeysParams,
GetAIObservabilityFieldsValues200,
GetAIObservabilityFieldsValuesParams,
RenderErrorResponseDTO,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType } from '../../../generatedAPIInstance';
@@ -137,7 +135,7 @@ export function useGetAIObservabilityFieldsKeys<
}
/**
* @summary Invalidates the {@link useGetAIObservabilityFieldsKeys} query
* @summary Get AI observability field keys
*/
export const invalidateGetAIObservabilityFieldsKeys = async (
queryClient: QueryClient,
@@ -242,7 +240,7 @@ export function useGetAIObservabilityFieldsValues<
}
/**
* @summary Invalidates the {@link useGetAIObservabilityFieldsValues} query
* @summary Get AI observability field values
*/
export const invalidateGetAIObservabilityFieldsValues = async (
queryClient: QueryClient,

View File

@@ -14,9 +14,7 @@ import type {
UseQueryResult,
} from 'react-query';
import type { GetAlerts200 } from '../sigNoz.schemas/getAlerts200';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type { GetAlerts200, RenderErrorResponseDTO } from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType } from '../../../generatedAPIInstance';
@@ -103,7 +101,7 @@ export function useGetAlerts<
}
/**
* @summary Invalidates the {@link useGetAlerts} query
* @summary Get alerts
*/
export const invalidateGetAlerts = async (
queryClient: QueryClient,

View File

@@ -17,23 +17,17 @@ import type {
UseQueryResult,
} from 'react-query';
import type { AuthtypesPostableAuthDomainDTO } from '../sigNoz.schemas/authtypesPostableAuthDomainDTO';
import type { AuthtypesUpdatableAuthDomainDTO } from '../sigNoz.schemas/authtypesUpdatableAuthDomainDTO';
import type { CreateAuthDomain201 } from '../sigNoz.schemas/createAuthDomain201';
import type { DeleteAuthDomainPathParameters } from '../sigNoz.schemas/deleteAuthDomainPathParameters';
import type { GetAuthDomain200 } from '../sigNoz.schemas/getAuthDomain200';
import type { GetAuthDomainPathParameters } from '../sigNoz.schemas/getAuthDomainPathParameters';
import type { ListAuthDomains200 } from '../sigNoz.schemas/listAuthDomains200';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type { UpdateAuthDomainPathParameters } from '../sigNoz.schemas/updateAuthDomainPathParameters';
import type {
AuthtypesPostableAuthDomainDTO,
AuthtypesUpdatableAuthDomainDTO,
CreateAuthDomain201,
DeleteAuthDomainPathParameters,
GetAuthDomain200,
GetAuthDomainPathParameters,
ListAuthDomains200,
RenderErrorResponseDTO,
UpdateAuthDomainPathParameters,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
@@ -128,7 +122,7 @@ export function useListAuthDomains<
}
/**
* @summary Invalidates the {@link useListAuthDomains} query
* @summary List all auth domains
*/
export const invalidateListAuthDomains = async (
queryClient: QueryClient,
@@ -159,9 +153,6 @@ export const createAuthDomain = (
});
};
export const getCreateAuthDomainMutationKey = () =>
['createAuthDomain'] as const;
export const getCreateAuthDomainMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -169,16 +160,16 @@ export const getCreateAuthDomainMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createAuthDomain>>,
TError,
CreateAuthDomainMutationVariables,
{ data?: BodyType<AuthtypesPostableAuthDomainDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createAuthDomain>>,
TError,
CreateAuthDomainMutationVariables,
{ data?: BodyType<AuthtypesPostableAuthDomainDTO> },
TContext
> => {
const mutationKey = getCreateAuthDomainMutationKey();
const mutationKey = ['createAuthDomain'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -189,7 +180,7 @@ export const getCreateAuthDomainMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createAuthDomain>>,
CreateAuthDomainMutationVariables
{ data?: BodyType<AuthtypesPostableAuthDomainDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -206,9 +197,6 @@ export type CreateAuthDomainMutationBody =
| BodyType<AuthtypesPostableAuthDomainDTO>
| undefined;
export type CreateAuthDomainMutationError = ErrorType<RenderErrorResponseDTO>;
export type CreateAuthDomainMutationVariables = {
data?: BodyType<AuthtypesPostableAuthDomainDTO>;
};
/**
* @summary Create auth domain
@@ -220,13 +208,13 @@ export const useCreateAuthDomain = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createAuthDomain>>,
TError,
CreateAuthDomainMutationVariables,
{ data?: BodyType<AuthtypesPostableAuthDomainDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createAuthDomain>>,
TError,
CreateAuthDomainMutationVariables,
{ data?: BodyType<AuthtypesPostableAuthDomainDTO> },
TContext
> => {
return useMutation(getCreateAuthDomainMutationOptions(options));
@@ -246,9 +234,6 @@ export const deleteAuthDomain = (
});
};
export const getDeleteAuthDomainMutationKey = () =>
['deleteAuthDomain'] as const;
export const getDeleteAuthDomainMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -256,16 +241,16 @@ export const getDeleteAuthDomainMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteAuthDomain>>,
TError,
DeleteAuthDomainMutationVariables,
{ pathParams: DeleteAuthDomainPathParameters },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof deleteAuthDomain>>,
TError,
DeleteAuthDomainMutationVariables,
{ pathParams: DeleteAuthDomainPathParameters },
TContext
> => {
const mutationKey = getDeleteAuthDomainMutationKey();
const mutationKey = ['deleteAuthDomain'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -276,7 +261,7 @@ export const getDeleteAuthDomainMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof deleteAuthDomain>>,
DeleteAuthDomainMutationVariables
{ pathParams: DeleteAuthDomainPathParameters }
> = (props) => {
const { pathParams } = props ?? {};
@@ -291,9 +276,6 @@ export type DeleteAuthDomainMutationResult = NonNullable<
>;
export type DeleteAuthDomainMutationError = ErrorType<RenderErrorResponseDTO>;
export type DeleteAuthDomainMutationVariables = {
pathParams: DeleteAuthDomainPathParameters;
};
/**
* @summary Delete auth domain
@@ -305,13 +287,13 @@ export const useDeleteAuthDomain = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteAuthDomain>>,
TError,
DeleteAuthDomainMutationVariables,
{ pathParams: DeleteAuthDomainPathParameters },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof deleteAuthDomain>>,
TError,
DeleteAuthDomainMutationVariables,
{ pathParams: DeleteAuthDomainPathParameters },
TContext
> => {
return useMutation(getDeleteAuthDomainMutationOptions(options));
@@ -402,7 +384,7 @@ export function useGetAuthDomain<
}
/**
* @summary Invalidates the {@link useGetAuthDomain} query
* @summary Get auth domain by ID
*/
export const invalidateGetAuthDomain = async (
queryClient: QueryClient,
@@ -435,9 +417,6 @@ export const updateAuthDomain = (
});
};
export const getUpdateAuthDomainMutationKey = () =>
['updateAuthDomain'] as const;
export const getUpdateAuthDomainMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -445,16 +424,22 @@ export const getUpdateAuthDomainMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateAuthDomain>>,
TError,
UpdateAuthDomainMutationVariables,
{
pathParams: UpdateAuthDomainPathParameters;
data?: BodyType<AuthtypesUpdatableAuthDomainDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateAuthDomain>>,
TError,
UpdateAuthDomainMutationVariables,
{
pathParams: UpdateAuthDomainPathParameters;
data?: BodyType<AuthtypesUpdatableAuthDomainDTO>;
},
TContext
> => {
const mutationKey = getUpdateAuthDomainMutationKey();
const mutationKey = ['updateAuthDomain'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -465,7 +450,10 @@ export const getUpdateAuthDomainMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateAuthDomain>>,
UpdateAuthDomainMutationVariables
{
pathParams: UpdateAuthDomainPathParameters;
data?: BodyType<AuthtypesUpdatableAuthDomainDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -482,10 +470,6 @@ export type UpdateAuthDomainMutationBody =
| BodyType<AuthtypesUpdatableAuthDomainDTO>
| undefined;
export type UpdateAuthDomainMutationError = ErrorType<RenderErrorResponseDTO>;
export type UpdateAuthDomainMutationVariables = {
pathParams: UpdateAuthDomainPathParameters;
data?: BodyType<AuthtypesUpdatableAuthDomainDTO>;
};
/**
* @summary Update auth domain
@@ -497,13 +481,19 @@ export const useUpdateAuthDomain = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateAuthDomain>>,
TError,
UpdateAuthDomainMutationVariables,
{
pathParams: UpdateAuthDomainPathParameters;
data?: BodyType<AuthtypesUpdatableAuthDomainDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateAuthDomain>>,
TError,
UpdateAuthDomainMutationVariables,
{
pathParams: UpdateAuthDomainPathParameters;
data?: BodyType<AuthtypesUpdatableAuthDomainDTO>;
},
TContext
> => {
return useMutation(getUpdateAuthDomainMutationOptions(options));

View File

@@ -11,11 +11,11 @@ import type {
UseMutationResult,
} from 'react-query';
import type { AuthtypesTransactionDTO } from '../sigNoz.schemas/authtypesTransactionDTO';
import type { AuthzCheck200 } from '../sigNoz.schemas/authzCheck200';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type {
AuthtypesTransactionDTO,
AuthzCheck200,
RenderErrorResponseDTO,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
@@ -37,8 +37,6 @@ export const authzCheck = (
});
};
export const getAuthzCheckMutationKey = () => ['authzCheck'] as const;
export const getAuthzCheckMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -46,16 +44,16 @@ export const getAuthzCheckMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof authzCheck>>,
TError,
AuthzCheckMutationVariables,
{ data?: BodyType<AuthtypesTransactionDTO[]> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof authzCheck>>,
TError,
AuthzCheckMutationVariables,
{ data?: BodyType<AuthtypesTransactionDTO[]> },
TContext
> => {
const mutationKey = getAuthzCheckMutationKey();
const mutationKey = ['authzCheck'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -66,7 +64,7 @@ export const getAuthzCheckMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof authzCheck>>,
AuthzCheckMutationVariables
{ data?: BodyType<AuthtypesTransactionDTO[]> }
> = (props) => {
const { data } = props ?? {};
@@ -83,9 +81,6 @@ export type AuthzCheckMutationBody =
| BodyType<AuthtypesTransactionDTO[]>
| undefined;
export type AuthzCheckMutationError = ErrorType<RenderErrorResponseDTO>;
export type AuthzCheckMutationVariables = {
data?: BodyType<AuthtypesTransactionDTO[]>;
};
/**
* @summary Check permissions
@@ -97,13 +92,13 @@ export const useAuthzCheck = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof authzCheck>>,
TError,
AuthzCheckMutationVariables,
{ data?: BodyType<AuthtypesTransactionDTO[]> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof authzCheck>>,
TError,
AuthzCheckMutationVariables,
{ data?: BodyType<AuthtypesTransactionDTO[]> },
TContext
> => {
return useMutation(getAuthzCheckMutationOptions(options));

View File

@@ -17,53 +17,32 @@ import type {
UseQueryResult,
} from 'react-query';
import type { AlertmanagertypesPostableChannelDTO } from '../sigNoz.schemas/alertmanagertypesPostableChannelDTO';
import type { AlertmanagertypesPostableNotificationChannelDTO } from '../sigNoz.schemas/alertmanagertypesPostableNotificationChannelDTO';
import type { AlertmanagertypesReceiverDTO } from '../sigNoz.schemas/alertmanagertypesReceiverDTO';
import type { AlertmanagertypesRepairChannelParamsDTO } from '../sigNoz.schemas/alertmanagertypesRepairChannelParamsDTO';
import type { AlertmanagertypesTestableNotificationChannelDTO } from '../sigNoz.schemas/alertmanagertypesTestableNotificationChannelDTO';
import type { AlertmanagertypesUpdatableNotificationChannelDTO } from '../sigNoz.schemas/alertmanagertypesUpdatableNotificationChannelDTO';
import type { CreateChannel201 } from '../sigNoz.schemas/createChannel201';
import type { CreateNotificationChannel201 } from '../sigNoz.schemas/createNotificationChannel201';
import type { DeleteChannelByIDPathParameters } from '../sigNoz.schemas/deleteChannelByIDPathParameters';
import type { DeleteNotificationChannelPathParameters } from '../sigNoz.schemas/deleteNotificationChannelPathParameters';
import type { GetChannelByID200 } from '../sigNoz.schemas/getChannelByID200';
import type { GetChannelByIDPathParameters } from '../sigNoz.schemas/getChannelByIDPathParameters';
import type { GetNotificationChannel200 } from '../sigNoz.schemas/getNotificationChannel200';
import type { GetNotificationChannelPathParameters } from '../sigNoz.schemas/getNotificationChannelPathParameters';
import type { ListChannels200 } from '../sigNoz.schemas/listChannels200';
import type { ListNotificationChannels200 } from '../sigNoz.schemas/listNotificationChannels200';
import type { ListNotificationChannelsParams } from '../sigNoz.schemas/listNotificationChannelsParams';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type { RepairNotificationChannel200 } from '../sigNoz.schemas/repairNotificationChannel200';
import type { RepairNotificationChannelParams } from '../sigNoz.schemas/repairNotificationChannelParams';
import type { RepairNotificationChannelPathParameters } from '../sigNoz.schemas/repairNotificationChannelPathParameters';
import type { UpdateChannelByIDPathParameters } from '../sigNoz.schemas/updateChannelByIDPathParameters';
import type { UpdateNotificationChannel200 } from '../sigNoz.schemas/updateNotificationChannel200';
import type { UpdateNotificationChannelPathParameters } from '../sigNoz.schemas/updateNotificationChannelPathParameters';
import type {
AlertmanagertypesPostableChannelDTO,
AlertmanagertypesPostableNotificationChannelDTO,
AlertmanagertypesReceiverDTO,
AlertmanagertypesRepairChannelParamsDTO,
AlertmanagertypesTestableNotificationChannelDTO,
AlertmanagertypesUpdatableNotificationChannelDTO,
CreateChannel201,
CreateNotificationChannel201,
DeleteChannelByIDPathParameters,
DeleteNotificationChannelPathParameters,
GetChannelByID200,
GetChannelByIDPathParameters,
GetNotificationChannel200,
GetNotificationChannelPathParameters,
ListChannels200,
ListNotificationChannels200,
ListNotificationChannelsParams,
RenderErrorResponseDTO,
RepairNotificationChannel200,
RepairNotificationChannelParams,
RepairNotificationChannelPathParameters,
UpdateChannelByIDPathParameters,
UpdateNotificationChannel200,
UpdateNotificationChannelPathParameters,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
@@ -158,7 +137,7 @@ export function useListChannels<
}
/**
* @summary Invalidates the {@link useListChannels} query
* @summary List notification channels
*/
export const invalidateListChannels = async (
queryClient: QueryClient,
@@ -189,8 +168,6 @@ export const createChannel = (
});
};
export const getCreateChannelMutationKey = () => ['createChannel'] as const;
export const getCreateChannelMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -198,16 +175,16 @@ export const getCreateChannelMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createChannel>>,
TError,
CreateChannelMutationVariables,
{ data?: BodyType<AlertmanagertypesPostableChannelDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createChannel>>,
TError,
CreateChannelMutationVariables,
{ data?: BodyType<AlertmanagertypesPostableChannelDTO> },
TContext
> => {
const mutationKey = getCreateChannelMutationKey();
const mutationKey = ['createChannel'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -218,7 +195,7 @@ export const getCreateChannelMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createChannel>>,
CreateChannelMutationVariables
{ data?: BodyType<AlertmanagertypesPostableChannelDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -235,9 +212,6 @@ export type CreateChannelMutationBody =
| BodyType<AlertmanagertypesPostableChannelDTO>
| undefined;
export type CreateChannelMutationError = ErrorType<RenderErrorResponseDTO>;
export type CreateChannelMutationVariables = {
data?: BodyType<AlertmanagertypesPostableChannelDTO>;
};
/**
* @summary Create notification channel
@@ -249,13 +223,13 @@ export const useCreateChannel = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createChannel>>,
TError,
CreateChannelMutationVariables,
{ data?: BodyType<AlertmanagertypesPostableChannelDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createChannel>>,
TError,
CreateChannelMutationVariables,
{ data?: BodyType<AlertmanagertypesPostableChannelDTO> },
TContext
> => {
return useMutation(getCreateChannelMutationOptions(options));
@@ -275,9 +249,6 @@ export const deleteChannelByID = (
});
};
export const getDeleteChannelByIDMutationKey = () =>
['deleteChannelByID'] as const;
export const getDeleteChannelByIDMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -285,16 +256,16 @@ export const getDeleteChannelByIDMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteChannelByID>>,
TError,
DeleteChannelByIDMutationVariables,
{ pathParams: DeleteChannelByIDPathParameters },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof deleteChannelByID>>,
TError,
DeleteChannelByIDMutationVariables,
{ pathParams: DeleteChannelByIDPathParameters },
TContext
> => {
const mutationKey = getDeleteChannelByIDMutationKey();
const mutationKey = ['deleteChannelByID'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -305,7 +276,7 @@ export const getDeleteChannelByIDMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof deleteChannelByID>>,
DeleteChannelByIDMutationVariables
{ pathParams: DeleteChannelByIDPathParameters }
> = (props) => {
const { pathParams } = props ?? {};
@@ -320,9 +291,6 @@ export type DeleteChannelByIDMutationResult = NonNullable<
>;
export type DeleteChannelByIDMutationError = ErrorType<RenderErrorResponseDTO>;
export type DeleteChannelByIDMutationVariables = {
pathParams: DeleteChannelByIDPathParameters;
};
/**
* @summary Delete notification channel
@@ -334,13 +302,13 @@ export const useDeleteChannelByID = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteChannelByID>>,
TError,
DeleteChannelByIDMutationVariables,
{ pathParams: DeleteChannelByIDPathParameters },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof deleteChannelByID>>,
TError,
DeleteChannelByIDMutationVariables,
{ pathParams: DeleteChannelByIDPathParameters },
TContext
> => {
return useMutation(getDeleteChannelByIDMutationOptions(options));
@@ -431,7 +399,7 @@ export function useGetChannelByID<
}
/**
* @summary Invalidates the {@link useGetChannelByID} query
* @summary Get notification channel by ID
*/
export const invalidateGetChannelByID = async (
queryClient: QueryClient,
@@ -464,9 +432,6 @@ export const updateChannelByID = (
});
};
export const getUpdateChannelByIDMutationKey = () =>
['updateChannelByID'] as const;
export const getUpdateChannelByIDMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -474,16 +439,22 @@ export const getUpdateChannelByIDMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateChannelByID>>,
TError,
UpdateChannelByIDMutationVariables,
{
pathParams: UpdateChannelByIDPathParameters;
data?: BodyType<AlertmanagertypesReceiverDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateChannelByID>>,
TError,
UpdateChannelByIDMutationVariables,
{
pathParams: UpdateChannelByIDPathParameters;
data?: BodyType<AlertmanagertypesReceiverDTO>;
},
TContext
> => {
const mutationKey = getUpdateChannelByIDMutationKey();
const mutationKey = ['updateChannelByID'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -494,7 +465,10 @@ export const getUpdateChannelByIDMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateChannelByID>>,
UpdateChannelByIDMutationVariables
{
pathParams: UpdateChannelByIDPathParameters;
data?: BodyType<AlertmanagertypesReceiverDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -511,10 +485,6 @@ export type UpdateChannelByIDMutationBody =
| BodyType<AlertmanagertypesReceiverDTO>
| undefined;
export type UpdateChannelByIDMutationError = ErrorType<RenderErrorResponseDTO>;
export type UpdateChannelByIDMutationVariables = {
pathParams: UpdateChannelByIDPathParameters;
data?: BodyType<AlertmanagertypesReceiverDTO>;
};
/**
* @summary Update notification channel
@@ -526,13 +496,19 @@ export const useUpdateChannelByID = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateChannelByID>>,
TError,
UpdateChannelByIDMutationVariables,
{
pathParams: UpdateChannelByIDPathParameters;
data?: BodyType<AlertmanagertypesReceiverDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateChannelByID>>,
TError,
UpdateChannelByIDMutationVariables,
{
pathParams: UpdateChannelByIDPathParameters;
data?: BodyType<AlertmanagertypesReceiverDTO>;
},
TContext
> => {
return useMutation(getUpdateChannelByIDMutationOptions(options));
@@ -554,8 +530,6 @@ export const testChannel = (
});
};
export const getTestChannelMutationKey = () => ['testChannel'] as const;
export const getTestChannelMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -563,16 +537,16 @@ export const getTestChannelMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof testChannel>>,
TError,
TestChannelMutationVariables,
{ data?: BodyType<AlertmanagertypesReceiverDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof testChannel>>,
TError,
TestChannelMutationVariables,
{ data?: BodyType<AlertmanagertypesReceiverDTO> },
TContext
> => {
const mutationKey = getTestChannelMutationKey();
const mutationKey = ['testChannel'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -583,7 +557,7 @@ export const getTestChannelMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof testChannel>>,
TestChannelMutationVariables
{ data?: BodyType<AlertmanagertypesReceiverDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -600,9 +574,6 @@ export type TestChannelMutationBody =
| BodyType<AlertmanagertypesReceiverDTO>
| undefined;
export type TestChannelMutationError = ErrorType<RenderErrorResponseDTO>;
export type TestChannelMutationVariables = {
data?: BodyType<AlertmanagertypesReceiverDTO>;
};
/**
* @summary Test notification channel
@@ -614,13 +585,13 @@ export const useTestChannel = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof testChannel>>,
TError,
TestChannelMutationVariables,
{ data?: BodyType<AlertmanagertypesReceiverDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof testChannel>>,
TError,
TestChannelMutationVariables,
{ data?: BodyType<AlertmanagertypesReceiverDTO> },
TContext
> => {
return useMutation(getTestChannelMutationOptions(options));
@@ -643,9 +614,6 @@ export const testChannelDeprecated = (
});
};
export const getTestChannelDeprecatedMutationKey = () =>
['testChannelDeprecated'] as const;
export const getTestChannelDeprecatedMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -653,16 +621,16 @@ export const getTestChannelDeprecatedMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof testChannelDeprecated>>,
TError,
TestChannelDeprecatedMutationVariables,
{ data?: BodyType<AlertmanagertypesReceiverDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof testChannelDeprecated>>,
TError,
TestChannelDeprecatedMutationVariables,
{ data?: BodyType<AlertmanagertypesReceiverDTO> },
TContext
> => {
const mutationKey = getTestChannelDeprecatedMutationKey();
const mutationKey = ['testChannelDeprecated'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -673,7 +641,7 @@ export const getTestChannelDeprecatedMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof testChannelDeprecated>>,
TestChannelDeprecatedMutationVariables
{ data?: BodyType<AlertmanagertypesReceiverDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -691,9 +659,6 @@ export type TestChannelDeprecatedMutationBody =
| undefined;
export type TestChannelDeprecatedMutationError =
ErrorType<RenderErrorResponseDTO>;
export type TestChannelDeprecatedMutationVariables = {
data?: BodyType<AlertmanagertypesReceiverDTO>;
};
/**
* @deprecated
@@ -706,13 +671,13 @@ export const useTestChannelDeprecated = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof testChannelDeprecated>>,
TError,
TestChannelDeprecatedMutationVariables,
{ data?: BodyType<AlertmanagertypesReceiverDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof testChannelDeprecated>>,
TError,
TestChannelDeprecatedMutationVariables,
{ data?: BodyType<AlertmanagertypesReceiverDTO> },
TContext
> => {
return useMutation(getTestChannelDeprecatedMutationOptions(options));
@@ -801,7 +766,7 @@ export function useListNotificationChannels<
}
/**
* @summary Invalidates the {@link useListNotificationChannels} query
* @summary List notification channels
*/
export const invalidateListNotificationChannels = async (
queryClient: QueryClient,
@@ -833,9 +798,6 @@ export const createNotificationChannel = (
});
};
export const getCreateNotificationChannelMutationKey = () =>
['createNotificationChannel'] as const;
export const getCreateNotificationChannelMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -843,16 +805,16 @@ export const getCreateNotificationChannelMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createNotificationChannel>>,
TError,
CreateNotificationChannelMutationVariables,
{ data?: BodyType<AlertmanagertypesPostableNotificationChannelDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createNotificationChannel>>,
TError,
CreateNotificationChannelMutationVariables,
{ data?: BodyType<AlertmanagertypesPostableNotificationChannelDTO> },
TContext
> => {
const mutationKey = getCreateNotificationChannelMutationKey();
const mutationKey = ['createNotificationChannel'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -863,7 +825,7 @@ export const getCreateNotificationChannelMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createNotificationChannel>>,
CreateNotificationChannelMutationVariables
{ data?: BodyType<AlertmanagertypesPostableNotificationChannelDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -881,9 +843,6 @@ export type CreateNotificationChannelMutationBody =
| undefined;
export type CreateNotificationChannelMutationError =
ErrorType<RenderErrorResponseDTO>;
export type CreateNotificationChannelMutationVariables = {
data?: BodyType<AlertmanagertypesPostableNotificationChannelDTO>;
};
/**
* @summary Create notification channel
@@ -895,13 +854,13 @@ export const useCreateNotificationChannel = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createNotificationChannel>>,
TError,
CreateNotificationChannelMutationVariables,
{ data?: BodyType<AlertmanagertypesPostableNotificationChannelDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createNotificationChannel>>,
TError,
CreateNotificationChannelMutationVariables,
{ data?: BodyType<AlertmanagertypesPostableNotificationChannelDTO> },
TContext
> => {
return useMutation(getCreateNotificationChannelMutationOptions(options));
@@ -921,9 +880,6 @@ export const deleteNotificationChannel = (
});
};
export const getDeleteNotificationChannelMutationKey = () =>
['deleteNotificationChannel'] as const;
export const getDeleteNotificationChannelMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -931,16 +887,16 @@ export const getDeleteNotificationChannelMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteNotificationChannel>>,
TError,
DeleteNotificationChannelMutationVariables,
{ pathParams: DeleteNotificationChannelPathParameters },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof deleteNotificationChannel>>,
TError,
DeleteNotificationChannelMutationVariables,
{ pathParams: DeleteNotificationChannelPathParameters },
TContext
> => {
const mutationKey = getDeleteNotificationChannelMutationKey();
const mutationKey = ['deleteNotificationChannel'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -951,7 +907,7 @@ export const getDeleteNotificationChannelMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof deleteNotificationChannel>>,
DeleteNotificationChannelMutationVariables
{ pathParams: DeleteNotificationChannelPathParameters }
> = (props) => {
const { pathParams } = props ?? {};
@@ -967,9 +923,6 @@ export type DeleteNotificationChannelMutationResult = NonNullable<
export type DeleteNotificationChannelMutationError =
ErrorType<RenderErrorResponseDTO>;
export type DeleteNotificationChannelMutationVariables = {
pathParams: DeleteNotificationChannelPathParameters;
};
/**
* @summary Delete notification channel
@@ -981,13 +934,13 @@ export const useDeleteNotificationChannel = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteNotificationChannel>>,
TError,
DeleteNotificationChannelMutationVariables,
{ pathParams: DeleteNotificationChannelPathParameters },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof deleteNotificationChannel>>,
TError,
DeleteNotificationChannelMutationVariables,
{ pathParams: DeleteNotificationChannelPathParameters },
TContext
> => {
return useMutation(getDeleteNotificationChannelMutationOptions(options));
@@ -1080,7 +1033,7 @@ export function useGetNotificationChannel<
}
/**
* @summary Invalidates the {@link useGetNotificationChannel} query
* @summary Get notification channel by ID
*/
export const invalidateGetNotificationChannel = async (
queryClient: QueryClient,
@@ -1113,9 +1066,6 @@ export const updateNotificationChannel = (
});
};
export const getUpdateNotificationChannelMutationKey = () =>
['updateNotificationChannel'] as const;
export const getUpdateNotificationChannelMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -1123,16 +1073,22 @@ export const getUpdateNotificationChannelMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateNotificationChannel>>,
TError,
UpdateNotificationChannelMutationVariables,
{
pathParams: UpdateNotificationChannelPathParameters;
data?: BodyType<AlertmanagertypesUpdatableNotificationChannelDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateNotificationChannel>>,
TError,
UpdateNotificationChannelMutationVariables,
{
pathParams: UpdateNotificationChannelPathParameters;
data?: BodyType<AlertmanagertypesUpdatableNotificationChannelDTO>;
},
TContext
> => {
const mutationKey = getUpdateNotificationChannelMutationKey();
const mutationKey = ['updateNotificationChannel'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -1143,7 +1099,10 @@ export const getUpdateNotificationChannelMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateNotificationChannel>>,
UpdateNotificationChannelMutationVariables
{
pathParams: UpdateNotificationChannelPathParameters;
data?: BodyType<AlertmanagertypesUpdatableNotificationChannelDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -1161,10 +1120,6 @@ export type UpdateNotificationChannelMutationBody =
| undefined;
export type UpdateNotificationChannelMutationError =
ErrorType<RenderErrorResponseDTO>;
export type UpdateNotificationChannelMutationVariables = {
pathParams: UpdateNotificationChannelPathParameters;
data?: BodyType<AlertmanagertypesUpdatableNotificationChannelDTO>;
};
/**
* @summary Update notification channel
@@ -1176,13 +1131,19 @@ export const useUpdateNotificationChannel = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateNotificationChannel>>,
TError,
UpdateNotificationChannelMutationVariables,
{
pathParams: UpdateNotificationChannelPathParameters;
data?: BodyType<AlertmanagertypesUpdatableNotificationChannelDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateNotificationChannel>>,
TError,
UpdateNotificationChannelMutationVariables,
{
pathParams: UpdateNotificationChannelPathParameters;
data?: BodyType<AlertmanagertypesUpdatableNotificationChannelDTO>;
},
TContext
> => {
return useMutation(getUpdateNotificationChannelMutationOptions(options));
@@ -1207,9 +1168,6 @@ export const repairNotificationChannel = (
});
};
export const getRepairNotificationChannelMutationKey = () =>
['repairNotificationChannel'] as const;
export const getRepairNotificationChannelMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -1217,16 +1175,24 @@ export const getRepairNotificationChannelMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof repairNotificationChannel>>,
TError,
RepairNotificationChannelMutationVariables,
{
pathParams: RepairNotificationChannelPathParameters;
data?: BodyType<AlertmanagertypesRepairChannelParamsDTO>;
params?: RepairNotificationChannelParams;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof repairNotificationChannel>>,
TError,
RepairNotificationChannelMutationVariables,
{
pathParams: RepairNotificationChannelPathParameters;
data?: BodyType<AlertmanagertypesRepairChannelParamsDTO>;
params?: RepairNotificationChannelParams;
},
TContext
> => {
const mutationKey = getRepairNotificationChannelMutationKey();
const mutationKey = ['repairNotificationChannel'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -1237,7 +1203,11 @@ export const getRepairNotificationChannelMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof repairNotificationChannel>>,
RepairNotificationChannelMutationVariables
{
pathParams: RepairNotificationChannelPathParameters;
data?: BodyType<AlertmanagertypesRepairChannelParamsDTO>;
params?: RepairNotificationChannelParams;
}
> = (props) => {
const { pathParams, data, params } = props ?? {};
@@ -1255,11 +1225,6 @@ export type RepairNotificationChannelMutationBody =
| undefined;
export type RepairNotificationChannelMutationError =
ErrorType<RenderErrorResponseDTO>;
export type RepairNotificationChannelMutationVariables = {
pathParams: RepairNotificationChannelPathParameters;
data?: BodyType<AlertmanagertypesRepairChannelParamsDTO>;
params?: RepairNotificationChannelParams;
};
/**
* @summary Repair notification channel
@@ -1271,13 +1236,21 @@ export const useRepairNotificationChannel = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof repairNotificationChannel>>,
TError,
RepairNotificationChannelMutationVariables,
{
pathParams: RepairNotificationChannelPathParameters;
data?: BodyType<AlertmanagertypesRepairChannelParamsDTO>;
params?: RepairNotificationChannelParams;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof repairNotificationChannel>>,
TError,
RepairNotificationChannelMutationVariables,
{
pathParams: RepairNotificationChannelPathParameters;
data?: BodyType<AlertmanagertypesRepairChannelParamsDTO>;
params?: RepairNotificationChannelParams;
},
TContext
> => {
return useMutation(getRepairNotificationChannelMutationOptions(options));
@@ -1299,9 +1272,6 @@ export const testNotificationChannel = (
});
};
export const getTestNotificationChannelMutationKey = () =>
['testNotificationChannel'] as const;
export const getTestNotificationChannelMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -1309,16 +1279,16 @@ export const getTestNotificationChannelMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof testNotificationChannel>>,
TError,
TestNotificationChannelMutationVariables,
{ data?: BodyType<AlertmanagertypesTestableNotificationChannelDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof testNotificationChannel>>,
TError,
TestNotificationChannelMutationVariables,
{ data?: BodyType<AlertmanagertypesTestableNotificationChannelDTO> },
TContext
> => {
const mutationKey = getTestNotificationChannelMutationKey();
const mutationKey = ['testNotificationChannel'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -1329,7 +1299,7 @@ export const getTestNotificationChannelMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof testNotificationChannel>>,
TestNotificationChannelMutationVariables
{ data?: BodyType<AlertmanagertypesTestableNotificationChannelDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -1347,9 +1317,6 @@ export type TestNotificationChannelMutationBody =
| undefined;
export type TestNotificationChannelMutationError =
ErrorType<RenderErrorResponseDTO>;
export type TestNotificationChannelMutationVariables = {
data?: BodyType<AlertmanagertypesTestableNotificationChannelDTO>;
};
/**
* @summary Test notification channel
@@ -1361,13 +1328,13 @@ export const useTestNotificationChannel = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof testNotificationChannel>>,
TError,
TestNotificationChannelMutationVariables,
{ data?: BodyType<AlertmanagertypesTestableNotificationChannelDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof testNotificationChannel>>,
TError,
TestNotificationChannelMutationVariables,
{ data?: BodyType<AlertmanagertypesTestableNotificationChannelDTO> },
TContext
> => {
return useMutation(getTestNotificationChannelMutationOptions(options));

View File

@@ -17,61 +17,36 @@ import type {
UseQueryResult,
} from 'react-query';
import type { AgentCheckIn200 } from '../sigNoz.schemas/agentCheckIn200';
import type { AgentCheckInDeprecated200 } from '../sigNoz.schemas/agentCheckInDeprecated200';
import type { AgentCheckInDeprecatedPathParameters } from '../sigNoz.schemas/agentCheckInDeprecatedPathParameters';
import type { AgentCheckInPathParameters } from '../sigNoz.schemas/agentCheckInPathParameters';
import type { CloudintegrationtypesPostableAccountDTO } from '../sigNoz.schemas/cloudintegrationtypesPostableAccountDTO';
import type { CloudintegrationtypesPostableAgentCheckInDTO } from '../sigNoz.schemas/cloudintegrationtypesPostableAgentCheckInDTO';
import type { CloudintegrationtypesUpdatableAccountDTO } from '../sigNoz.schemas/cloudintegrationtypesUpdatableAccountDTO';
import type { CloudintegrationtypesUpdatableServiceDTO } from '../sigNoz.schemas/cloudintegrationtypesUpdatableServiceDTO';
import type { CreateAccount201 } from '../sigNoz.schemas/createAccount201';
import type { CreateAccountPathParameters } from '../sigNoz.schemas/createAccountPathParameters';
import type { DisconnectAccountPathParameters } from '../sigNoz.schemas/disconnectAccountPathParameters';
import type { GetAccount200 } from '../sigNoz.schemas/getAccount200';
import type { GetAccountPathParameters } from '../sigNoz.schemas/getAccountPathParameters';
import type { GetAccountService200 } from '../sigNoz.schemas/getAccountService200';
import type { GetAccountServicePathParameters } from '../sigNoz.schemas/getAccountServicePathParameters';
import type { GetConnectionCredentials200 } from '../sigNoz.schemas/getConnectionCredentials200';
import type { GetConnectionCredentialsPathParameters } from '../sigNoz.schemas/getConnectionCredentialsPathParameters';
import type { GetService200 } from '../sigNoz.schemas/getService200';
import type { GetServicePathParameters } from '../sigNoz.schemas/getServicePathParameters';
import type { ListAccountServicesMetadata200 } from '../sigNoz.schemas/listAccountServicesMetadata200';
import type { ListAccountServicesMetadataPathParameters } from '../sigNoz.schemas/listAccountServicesMetadataPathParameters';
import type { ListAccounts200 } from '../sigNoz.schemas/listAccounts200';
import type { ListAccountsPathParameters } from '../sigNoz.schemas/listAccountsPathParameters';
import type { ListServicesMetadata200 } from '../sigNoz.schemas/listServicesMetadata200';
import type { ListServicesMetadataPathParameters } from '../sigNoz.schemas/listServicesMetadataPathParameters';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type { UpdateAccountPathParameters } from '../sigNoz.schemas/updateAccountPathParameters';
import type { UpdateServicePathParameters } from '../sigNoz.schemas/updateServicePathParameters';
import type {
AgentCheckIn200,
AgentCheckInDeprecated200,
AgentCheckInDeprecatedPathParameters,
AgentCheckInPathParameters,
CloudintegrationtypesPostableAccountDTO,
CloudintegrationtypesPostableAgentCheckInDTO,
CloudintegrationtypesUpdatableAccountDTO,
CloudintegrationtypesUpdatableServiceDTO,
CreateAccount201,
CreateAccountPathParameters,
DisconnectAccountPathParameters,
GetAccount200,
GetAccountPathParameters,
GetAccountService200,
GetAccountServicePathParameters,
GetConnectionCredentials200,
GetConnectionCredentialsPathParameters,
GetService200,
GetServicePathParameters,
ListAccountServicesMetadata200,
ListAccountServicesMetadataPathParameters,
ListAccounts200,
ListAccountsPathParameters,
ListServicesMetadata200,
ListServicesMetadataPathParameters,
RenderErrorResponseDTO,
UpdateAccountPathParameters,
UpdateServicePathParameters,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
@@ -115,9 +90,6 @@ export const agentCheckInDeprecated = (
});
};
export const getAgentCheckInDeprecatedMutationKey = () =>
['agentCheckInDeprecated'] as const;
export const getAgentCheckInDeprecatedMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -125,16 +97,22 @@ export const getAgentCheckInDeprecatedMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof agentCheckInDeprecated>>,
TError,
AgentCheckInDeprecatedMutationVariables,
{
pathParams: AgentCheckInDeprecatedPathParameters;
data?: BodyType<CloudintegrationtypesPostableAgentCheckInDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof agentCheckInDeprecated>>,
TError,
AgentCheckInDeprecatedMutationVariables,
{
pathParams: AgentCheckInDeprecatedPathParameters;
data?: BodyType<CloudintegrationtypesPostableAgentCheckInDTO>;
},
TContext
> => {
const mutationKey = getAgentCheckInDeprecatedMutationKey();
const mutationKey = ['agentCheckInDeprecated'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -145,7 +123,10 @@ export const getAgentCheckInDeprecatedMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof agentCheckInDeprecated>>,
AgentCheckInDeprecatedMutationVariables
{
pathParams: AgentCheckInDeprecatedPathParameters;
data?: BodyType<CloudintegrationtypesPostableAgentCheckInDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -163,10 +144,6 @@ export type AgentCheckInDeprecatedMutationBody =
| undefined;
export type AgentCheckInDeprecatedMutationError =
ErrorType<RenderErrorResponseDTO>;
export type AgentCheckInDeprecatedMutationVariables = {
pathParams: AgentCheckInDeprecatedPathParameters;
data?: BodyType<CloudintegrationtypesPostableAgentCheckInDTO>;
};
/**
* @deprecated
@@ -179,13 +156,19 @@ export const useAgentCheckInDeprecated = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof agentCheckInDeprecated>>,
TError,
AgentCheckInDeprecatedMutationVariables,
{
pathParams: AgentCheckInDeprecatedPathParameters;
data?: BodyType<CloudintegrationtypesPostableAgentCheckInDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof agentCheckInDeprecated>>,
TError,
AgentCheckInDeprecatedMutationVariables,
{
pathParams: AgentCheckInDeprecatedPathParameters;
data?: BodyType<CloudintegrationtypesPostableAgentCheckInDTO>;
},
TContext
> => {
return useMutation(getAgentCheckInDeprecatedMutationOptions(options));
@@ -277,7 +260,7 @@ export function useListAccounts<
}
/**
* @summary Invalidates the {@link useListAccounts} query
* @summary List accounts
*/
export const invalidateListAccounts = async (
queryClient: QueryClient,
@@ -310,8 +293,6 @@ export const createAccount = (
});
};
export const getCreateAccountMutationKey = () => ['createAccount'] as const;
export const getCreateAccountMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -319,16 +300,22 @@ export const getCreateAccountMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createAccount>>,
TError,
CreateAccountMutationVariables,
{
pathParams: CreateAccountPathParameters;
data?: BodyType<CloudintegrationtypesPostableAccountDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createAccount>>,
TError,
CreateAccountMutationVariables,
{
pathParams: CreateAccountPathParameters;
data?: BodyType<CloudintegrationtypesPostableAccountDTO>;
},
TContext
> => {
const mutationKey = getCreateAccountMutationKey();
const mutationKey = ['createAccount'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -339,7 +326,10 @@ export const getCreateAccountMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createAccount>>,
CreateAccountMutationVariables
{
pathParams: CreateAccountPathParameters;
data?: BodyType<CloudintegrationtypesPostableAccountDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -356,10 +346,6 @@ export type CreateAccountMutationBody =
| BodyType<CloudintegrationtypesPostableAccountDTO>
| undefined;
export type CreateAccountMutationError = ErrorType<RenderErrorResponseDTO>;
export type CreateAccountMutationVariables = {
pathParams: CreateAccountPathParameters;
data?: BodyType<CloudintegrationtypesPostableAccountDTO>;
};
/**
* @summary Create account
@@ -371,13 +357,19 @@ export const useCreateAccount = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createAccount>>,
TError,
CreateAccountMutationVariables,
{
pathParams: CreateAccountPathParameters;
data?: BodyType<CloudintegrationtypesPostableAccountDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createAccount>>,
TError,
CreateAccountMutationVariables,
{
pathParams: CreateAccountPathParameters;
data?: BodyType<CloudintegrationtypesPostableAccountDTO>;
},
TContext
> => {
return useMutation(getCreateAccountMutationOptions(options));
@@ -397,9 +389,6 @@ export const disconnectAccount = (
});
};
export const getDisconnectAccountMutationKey = () =>
['disconnectAccount'] as const;
export const getDisconnectAccountMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -407,16 +396,16 @@ export const getDisconnectAccountMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof disconnectAccount>>,
TError,
DisconnectAccountMutationVariables,
{ pathParams: DisconnectAccountPathParameters },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof disconnectAccount>>,
TError,
DisconnectAccountMutationVariables,
{ pathParams: DisconnectAccountPathParameters },
TContext
> => {
const mutationKey = getDisconnectAccountMutationKey();
const mutationKey = ['disconnectAccount'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -427,7 +416,7 @@ export const getDisconnectAccountMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof disconnectAccount>>,
DisconnectAccountMutationVariables
{ pathParams: DisconnectAccountPathParameters }
> = (props) => {
const { pathParams } = props ?? {};
@@ -442,9 +431,6 @@ export type DisconnectAccountMutationResult = NonNullable<
>;
export type DisconnectAccountMutationError = ErrorType<RenderErrorResponseDTO>;
export type DisconnectAccountMutationVariables = {
pathParams: DisconnectAccountPathParameters;
};
/**
* @summary Disconnect account
@@ -456,13 +442,13 @@ export const useDisconnectAccount = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof disconnectAccount>>,
TError,
DisconnectAccountMutationVariables,
{ pathParams: DisconnectAccountPathParameters },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof disconnectAccount>>,
TError,
DisconnectAccountMutationVariables,
{ pathParams: DisconnectAccountPathParameters },
TContext
> => {
return useMutation(getDisconnectAccountMutationOptions(options));
@@ -557,7 +543,7 @@ export function useGetAccount<
}
/**
* @summary Invalidates the {@link useGetAccount} query
* @summary Get account
*/
export const invalidateGetAccount = async (
queryClient: QueryClient,
@@ -590,8 +576,6 @@ export const updateAccount = (
});
};
export const getUpdateAccountMutationKey = () => ['updateAccount'] as const;
export const getUpdateAccountMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -599,16 +583,22 @@ export const getUpdateAccountMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateAccount>>,
TError,
UpdateAccountMutationVariables,
{
pathParams: UpdateAccountPathParameters;
data?: BodyType<CloudintegrationtypesUpdatableAccountDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateAccount>>,
TError,
UpdateAccountMutationVariables,
{
pathParams: UpdateAccountPathParameters;
data?: BodyType<CloudintegrationtypesUpdatableAccountDTO>;
},
TContext
> => {
const mutationKey = getUpdateAccountMutationKey();
const mutationKey = ['updateAccount'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -619,7 +609,10 @@ export const getUpdateAccountMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateAccount>>,
UpdateAccountMutationVariables
{
pathParams: UpdateAccountPathParameters;
data?: BodyType<CloudintegrationtypesUpdatableAccountDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -636,10 +629,6 @@ export type UpdateAccountMutationBody =
| BodyType<CloudintegrationtypesUpdatableAccountDTO>
| undefined;
export type UpdateAccountMutationError = ErrorType<RenderErrorResponseDTO>;
export type UpdateAccountMutationVariables = {
pathParams: UpdateAccountPathParameters;
data?: BodyType<CloudintegrationtypesUpdatableAccountDTO>;
};
/**
* @summary Update account
@@ -651,13 +640,19 @@ export const useUpdateAccount = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateAccount>>,
TError,
UpdateAccountMutationVariables,
{
pathParams: UpdateAccountPathParameters;
data?: BodyType<CloudintegrationtypesUpdatableAccountDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateAccount>>,
TError,
UpdateAccountMutationVariables,
{
pathParams: UpdateAccountPathParameters;
data?: BodyType<CloudintegrationtypesUpdatableAccountDTO>;
},
TContext
> => {
return useMutation(getUpdateAccountMutationOptions(options));
@@ -761,7 +756,7 @@ export function useListAccountServicesMetadata<
}
/**
* @summary Invalidates the {@link useListAccountServicesMetadata} query
* @summary List account services metadata
*/
export const invalidateListAccountServicesMetadata = async (
queryClient: QueryClient,
@@ -878,7 +873,7 @@ export function useGetAccountService<
}
/**
* @summary Invalidates the {@link useGetAccountService} query
* @summary Get service for account
*/
export const invalidateGetAccountService = async (
queryClient: QueryClient,
@@ -911,8 +906,6 @@ export const updateService = (
});
};
export const getUpdateServiceMutationKey = () => ['updateService'] as const;
export const getUpdateServiceMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -920,16 +913,22 @@ export const getUpdateServiceMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateService>>,
TError,
UpdateServiceMutationVariables,
{
pathParams: UpdateServicePathParameters;
data?: BodyType<CloudintegrationtypesUpdatableServiceDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateService>>,
TError,
UpdateServiceMutationVariables,
{
pathParams: UpdateServicePathParameters;
data?: BodyType<CloudintegrationtypesUpdatableServiceDTO>;
},
TContext
> => {
const mutationKey = getUpdateServiceMutationKey();
const mutationKey = ['updateService'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -940,7 +939,10 @@ export const getUpdateServiceMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateService>>,
UpdateServiceMutationVariables
{
pathParams: UpdateServicePathParameters;
data?: BodyType<CloudintegrationtypesUpdatableServiceDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -957,10 +959,6 @@ export type UpdateServiceMutationBody =
| BodyType<CloudintegrationtypesUpdatableServiceDTO>
| undefined;
export type UpdateServiceMutationError = ErrorType<RenderErrorResponseDTO>;
export type UpdateServiceMutationVariables = {
pathParams: UpdateServicePathParameters;
data?: BodyType<CloudintegrationtypesUpdatableServiceDTO>;
};
/**
* @summary Update service
@@ -972,13 +970,19 @@ export const useUpdateService = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateService>>,
TError,
UpdateServiceMutationVariables,
{
pathParams: UpdateServicePathParameters;
data?: BodyType<CloudintegrationtypesUpdatableServiceDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateService>>,
TError,
UpdateServiceMutationVariables,
{
pathParams: UpdateServicePathParameters;
data?: BodyType<CloudintegrationtypesUpdatableServiceDTO>;
},
TContext
> => {
return useMutation(getUpdateServiceMutationOptions(options));
@@ -1001,8 +1005,6 @@ export const agentCheckIn = (
});
};
export const getAgentCheckInMutationKey = () => ['agentCheckIn'] as const;
export const getAgentCheckInMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -1010,16 +1012,22 @@ export const getAgentCheckInMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof agentCheckIn>>,
TError,
AgentCheckInMutationVariables,
{
pathParams: AgentCheckInPathParameters;
data?: BodyType<CloudintegrationtypesPostableAgentCheckInDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof agentCheckIn>>,
TError,
AgentCheckInMutationVariables,
{
pathParams: AgentCheckInPathParameters;
data?: BodyType<CloudintegrationtypesPostableAgentCheckInDTO>;
},
TContext
> => {
const mutationKey = getAgentCheckInMutationKey();
const mutationKey = ['agentCheckIn'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -1030,7 +1038,10 @@ export const getAgentCheckInMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof agentCheckIn>>,
AgentCheckInMutationVariables
{
pathParams: AgentCheckInPathParameters;
data?: BodyType<CloudintegrationtypesPostableAgentCheckInDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -1047,10 +1058,6 @@ export type AgentCheckInMutationBody =
| BodyType<CloudintegrationtypesPostableAgentCheckInDTO>
| undefined;
export type AgentCheckInMutationError = ErrorType<RenderErrorResponseDTO>;
export type AgentCheckInMutationVariables = {
pathParams: AgentCheckInPathParameters;
data?: BodyType<CloudintegrationtypesPostableAgentCheckInDTO>;
};
/**
* @summary Agent check-in
@@ -1062,13 +1069,19 @@ export const useAgentCheckIn = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof agentCheckIn>>,
TError,
AgentCheckInMutationVariables,
{
pathParams: AgentCheckInPathParameters;
data?: BodyType<CloudintegrationtypesPostableAgentCheckInDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof agentCheckIn>>,
TError,
AgentCheckInMutationVariables,
{
pathParams: AgentCheckInPathParameters;
data?: BodyType<CloudintegrationtypesPostableAgentCheckInDTO>;
},
TContext
> => {
return useMutation(getAgentCheckInMutationOptions(options));
@@ -1165,7 +1178,7 @@ export function useGetConnectionCredentials<
}
/**
* @summary Invalidates the {@link useGetConnectionCredentials} query
* @summary Get connection credentials
*/
export const invalidateGetConnectionCredentials = async (
queryClient: QueryClient,
@@ -1270,7 +1283,7 @@ export function useListServicesMetadata<
}
/**
* @summary Invalidates the {@link useListServicesMetadata} query
* @summary List services metadata
*/
export const invalidateListServicesMetadata = async (
queryClient: QueryClient,
@@ -1380,7 +1393,7 @@ export function useGetService<
}
/**
* @summary Invalidates the {@link useGetService} query
* @summary Get service
*/
export const invalidateGetService = async (
queryClient: QueryClient,

File diff suppressed because it is too large Load Diff

View File

@@ -17,23 +17,17 @@ import type {
UseQueryResult,
} from 'react-query';
import type { AlertmanagertypesPostablePlannedMaintenanceDTO } from '../sigNoz.schemas/alertmanagertypesPostablePlannedMaintenanceDTO';
import type { CreateDowntimeSchedule201 } from '../sigNoz.schemas/createDowntimeSchedule201';
import type { DeleteDowntimeScheduleByIDPathParameters } from '../sigNoz.schemas/deleteDowntimeScheduleByIDPathParameters';
import type { GetDowntimeScheduleByID200 } from '../sigNoz.schemas/getDowntimeScheduleByID200';
import type { GetDowntimeScheduleByIDPathParameters } from '../sigNoz.schemas/getDowntimeScheduleByIDPathParameters';
import type { ListDowntimeSchedules200 } from '../sigNoz.schemas/listDowntimeSchedules200';
import type { ListDowntimeSchedulesParams } from '../sigNoz.schemas/listDowntimeSchedulesParams';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type { UpdateDowntimeScheduleByIDPathParameters } from '../sigNoz.schemas/updateDowntimeScheduleByIDPathParameters';
import type {
AlertmanagertypesPostablePlannedMaintenanceDTO,
CreateDowntimeSchedule201,
DeleteDowntimeScheduleByIDPathParameters,
GetDowntimeScheduleByID200,
GetDowntimeScheduleByIDPathParameters,
ListDowntimeSchedules200,
ListDowntimeSchedulesParams,
RenderErrorResponseDTO,
UpdateDowntimeScheduleByIDPathParameters,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
@@ -141,7 +135,7 @@ export function useListDowntimeSchedules<
}
/**
* @summary Invalidates the {@link useListDowntimeSchedules} query
* @summary List downtime schedules
*/
export const invalidateListDowntimeSchedules = async (
queryClient: QueryClient,
@@ -173,9 +167,6 @@ export const createDowntimeSchedule = (
});
};
export const getCreateDowntimeScheduleMutationKey = () =>
['createDowntimeSchedule'] as const;
export const getCreateDowntimeScheduleMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -183,16 +174,16 @@ export const getCreateDowntimeScheduleMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createDowntimeSchedule>>,
TError,
CreateDowntimeScheduleMutationVariables,
{ data?: BodyType<AlertmanagertypesPostablePlannedMaintenanceDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createDowntimeSchedule>>,
TError,
CreateDowntimeScheduleMutationVariables,
{ data?: BodyType<AlertmanagertypesPostablePlannedMaintenanceDTO> },
TContext
> => {
const mutationKey = getCreateDowntimeScheduleMutationKey();
const mutationKey = ['createDowntimeSchedule'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -203,7 +194,7 @@ export const getCreateDowntimeScheduleMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createDowntimeSchedule>>,
CreateDowntimeScheduleMutationVariables
{ data?: BodyType<AlertmanagertypesPostablePlannedMaintenanceDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -221,9 +212,6 @@ export type CreateDowntimeScheduleMutationBody =
| undefined;
export type CreateDowntimeScheduleMutationError =
ErrorType<RenderErrorResponseDTO>;
export type CreateDowntimeScheduleMutationVariables = {
data?: BodyType<AlertmanagertypesPostablePlannedMaintenanceDTO>;
};
/**
* @summary Create downtime schedule
@@ -235,13 +223,13 @@ export const useCreateDowntimeSchedule = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createDowntimeSchedule>>,
TError,
CreateDowntimeScheduleMutationVariables,
{ data?: BodyType<AlertmanagertypesPostablePlannedMaintenanceDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createDowntimeSchedule>>,
TError,
CreateDowntimeScheduleMutationVariables,
{ data?: BodyType<AlertmanagertypesPostablePlannedMaintenanceDTO> },
TContext
> => {
return useMutation(getCreateDowntimeScheduleMutationOptions(options));
@@ -261,9 +249,6 @@ export const deleteDowntimeScheduleByID = (
});
};
export const getDeleteDowntimeScheduleByIDMutationKey = () =>
['deleteDowntimeScheduleByID'] as const;
export const getDeleteDowntimeScheduleByIDMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -271,16 +256,16 @@ export const getDeleteDowntimeScheduleByIDMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteDowntimeScheduleByID>>,
TError,
DeleteDowntimeScheduleByIDMutationVariables,
{ pathParams: DeleteDowntimeScheduleByIDPathParameters },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof deleteDowntimeScheduleByID>>,
TError,
DeleteDowntimeScheduleByIDMutationVariables,
{ pathParams: DeleteDowntimeScheduleByIDPathParameters },
TContext
> => {
const mutationKey = getDeleteDowntimeScheduleByIDMutationKey();
const mutationKey = ['deleteDowntimeScheduleByID'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -291,7 +276,7 @@ export const getDeleteDowntimeScheduleByIDMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof deleteDowntimeScheduleByID>>,
DeleteDowntimeScheduleByIDMutationVariables
{ pathParams: DeleteDowntimeScheduleByIDPathParameters }
> = (props) => {
const { pathParams } = props ?? {};
@@ -307,9 +292,6 @@ export type DeleteDowntimeScheduleByIDMutationResult = NonNullable<
export type DeleteDowntimeScheduleByIDMutationError =
ErrorType<RenderErrorResponseDTO>;
export type DeleteDowntimeScheduleByIDMutationVariables = {
pathParams: DeleteDowntimeScheduleByIDPathParameters;
};
/**
* @summary Delete downtime schedule
@@ -321,13 +303,13 @@ export const useDeleteDowntimeScheduleByID = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteDowntimeScheduleByID>>,
TError,
DeleteDowntimeScheduleByIDMutationVariables,
{ pathParams: DeleteDowntimeScheduleByIDPathParameters },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof deleteDowntimeScheduleByID>>,
TError,
DeleteDowntimeScheduleByIDMutationVariables,
{ pathParams: DeleteDowntimeScheduleByIDPathParameters },
TContext
> => {
return useMutation(getDeleteDowntimeScheduleByIDMutationOptions(options));
@@ -420,7 +402,7 @@ export function useGetDowntimeScheduleByID<
}
/**
* @summary Invalidates the {@link useGetDowntimeScheduleByID} query
* @summary Get downtime schedule by ID
*/
export const invalidateGetDowntimeScheduleByID = async (
queryClient: QueryClient,
@@ -453,9 +435,6 @@ export const updateDowntimeScheduleByID = (
});
};
export const getUpdateDowntimeScheduleByIDMutationKey = () =>
['updateDowntimeScheduleByID'] as const;
export const getUpdateDowntimeScheduleByIDMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -463,16 +442,22 @@ export const getUpdateDowntimeScheduleByIDMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateDowntimeScheduleByID>>,
TError,
UpdateDowntimeScheduleByIDMutationVariables,
{
pathParams: UpdateDowntimeScheduleByIDPathParameters;
data?: BodyType<AlertmanagertypesPostablePlannedMaintenanceDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateDowntimeScheduleByID>>,
TError,
UpdateDowntimeScheduleByIDMutationVariables,
{
pathParams: UpdateDowntimeScheduleByIDPathParameters;
data?: BodyType<AlertmanagertypesPostablePlannedMaintenanceDTO>;
},
TContext
> => {
const mutationKey = getUpdateDowntimeScheduleByIDMutationKey();
const mutationKey = ['updateDowntimeScheduleByID'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -483,7 +468,10 @@ export const getUpdateDowntimeScheduleByIDMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateDowntimeScheduleByID>>,
UpdateDowntimeScheduleByIDMutationVariables
{
pathParams: UpdateDowntimeScheduleByIDPathParameters;
data?: BodyType<AlertmanagertypesPostablePlannedMaintenanceDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -501,10 +489,6 @@ export type UpdateDowntimeScheduleByIDMutationBody =
| undefined;
export type UpdateDowntimeScheduleByIDMutationError =
ErrorType<RenderErrorResponseDTO>;
export type UpdateDowntimeScheduleByIDMutationVariables = {
pathParams: UpdateDowntimeScheduleByIDPathParameters;
data?: BodyType<AlertmanagertypesPostablePlannedMaintenanceDTO>;
};
/**
* @summary Update downtime schedule
@@ -516,13 +500,19 @@ export const useUpdateDowntimeScheduleByID = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateDowntimeScheduleByID>>,
TError,
UpdateDowntimeScheduleByIDMutationVariables,
{
pathParams: UpdateDowntimeScheduleByIDPathParameters;
data?: BodyType<AlertmanagertypesPostablePlannedMaintenanceDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateDowntimeScheduleByID>>,
TError,
UpdateDowntimeScheduleByIDMutationVariables,
{
pathParams: UpdateDowntimeScheduleByIDPathParameters;
data?: BodyType<AlertmanagertypesPostablePlannedMaintenanceDTO>;
},
TContext
> => {
return useMutation(getUpdateDowntimeScheduleByIDMutationOptions(options));

View File

@@ -14,9 +14,7 @@ import type {
UseQueryResult,
} from 'react-query';
import type { GetFeatures200 } from '../sigNoz.schemas/getFeatures200';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type { GetFeatures200, RenderErrorResponseDTO } from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType } from '../../../generatedAPIInstance';
@@ -111,7 +109,7 @@ export function useGetFeatures<
}
/**
* @summary Invalidates the {@link useGetFeatures} query
* @summary Get features
*/
export const invalidateGetFeatures = async (
queryClient: QueryClient,

View File

@@ -14,15 +14,13 @@ import type {
UseQueryResult,
} from 'react-query';
import type { GetFieldsKeys200 } from '../sigNoz.schemas/getFieldsKeys200';
import type { GetFieldsKeysParams } from '../sigNoz.schemas/getFieldsKeysParams';
import type { GetFieldsValues200 } from '../sigNoz.schemas/getFieldsValues200';
import type { GetFieldsValuesParams } from '../sigNoz.schemas/getFieldsValuesParams';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type {
GetFieldsKeys200,
GetFieldsKeysParams,
GetFieldsValues200,
GetFieldsValuesParams,
RenderErrorResponseDTO,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType } from '../../../generatedAPIInstance';
@@ -127,7 +125,7 @@ export function useGetFieldsKeys<
}
/**
* @summary Invalidates the {@link useGetFieldsKeys} query
* @summary Get field keys
*/
export const invalidateGetFieldsKeys = async (
queryClient: QueryClient,
@@ -222,7 +220,7 @@ export function useGetFieldsValues<
}
/**
* @summary Invalidates the {@link useGetFieldsValues} query
* @summary Get field values
*/
export const invalidateGetFieldsValues = async (
queryClient: QueryClient,

View File

@@ -17,55 +17,33 @@ import type {
UseQueryResult,
} from 'react-query';
import type { CreateIngestionKey201 } from '../sigNoz.schemas/createIngestionKey201';
import type { CreateIngestionKeyLimit201 } from '../sigNoz.schemas/createIngestionKeyLimit201';
import type { CreateIngestionKeyLimitPathParameters } from '../sigNoz.schemas/createIngestionKeyLimitPathParameters';
import type { CreateIngestionLimit201 } from '../sigNoz.schemas/createIngestionLimit201';
import type { DeleteIngestionKeyLimitPathParameters } from '../sigNoz.schemas/deleteIngestionKeyLimitPathParameters';
import type { DeleteIngestionKeyPathParameters } from '../sigNoz.schemas/deleteIngestionKeyPathParameters';
import type { DeleteIngestionLimitPathParameters } from '../sigNoz.schemas/deleteIngestionLimitPathParameters';
import type { GatewaytypesDeprecatedPostableIngestionKeyLimitDTO } from '../sigNoz.schemas/gatewaytypesDeprecatedPostableIngestionKeyLimitDTO';
import type { GatewaytypesPostableIngestionKeyDTO } from '../sigNoz.schemas/gatewaytypesPostableIngestionKeyDTO';
import type { GatewaytypesPostableIngestionKeyLimitDTO } from '../sigNoz.schemas/gatewaytypesPostableIngestionKeyLimitDTO';
import type { GatewaytypesUpdatableIngestionKeyLimitDTO } from '../sigNoz.schemas/gatewaytypesUpdatableIngestionKeyLimitDTO';
import type { GetIngestionKey200 } from '../sigNoz.schemas/getIngestionKey200';
import type { GetIngestionKeyLimits200 } from '../sigNoz.schemas/getIngestionKeyLimits200';
import type { GetIngestionKeyLimitsPathParameters } from '../sigNoz.schemas/getIngestionKeyLimitsPathParameters';
import type { GetIngestionKeyPathParameters } from '../sigNoz.schemas/getIngestionKeyPathParameters';
import type { GetIngestionKeys200 } from '../sigNoz.schemas/getIngestionKeys200';
import type { GetIngestionKeysParams } from '../sigNoz.schemas/getIngestionKeysParams';
import type { GetIngestionLimit200 } from '../sigNoz.schemas/getIngestionLimit200';
import type { GetIngestionLimitPathParameters } from '../sigNoz.schemas/getIngestionLimitPathParameters';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type { SearchIngestionKeys200 } from '../sigNoz.schemas/searchIngestionKeys200';
import type { SearchIngestionKeysParams } from '../sigNoz.schemas/searchIngestionKeysParams';
import type { UpdateIngestionKeyLimitPathParameters } from '../sigNoz.schemas/updateIngestionKeyLimitPathParameters';
import type { UpdateIngestionKeyPathParameters } from '../sigNoz.schemas/updateIngestionKeyPathParameters';
import type { UpdateIngestionLimitPathParameters } from '../sigNoz.schemas/updateIngestionLimitPathParameters';
import type {
CreateIngestionKey201,
CreateIngestionKeyLimit201,
CreateIngestionKeyLimitPathParameters,
CreateIngestionLimit201,
DeleteIngestionKeyLimitPathParameters,
DeleteIngestionKeyPathParameters,
DeleteIngestionLimitPathParameters,
GatewaytypesDeprecatedPostableIngestionKeyLimitDTO,
GatewaytypesPostableIngestionKeyDTO,
GatewaytypesPostableIngestionKeyLimitDTO,
GatewaytypesUpdatableIngestionKeyLimitDTO,
GetIngestionKey200,
GetIngestionKeyLimits200,
GetIngestionKeyLimitsPathParameters,
GetIngestionKeyPathParameters,
GetIngestionKeys200,
GetIngestionKeysParams,
GetIngestionLimit200,
GetIngestionLimitPathParameters,
RenderErrorResponseDTO,
SearchIngestionKeys200,
SearchIngestionKeysParams,
UpdateIngestionKeyLimitPathParameters,
UpdateIngestionKeyPathParameters,
UpdateIngestionLimitPathParameters,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
@@ -175,7 +153,7 @@ export function useGetIngestionKeys<
}
/**
* @summary Invalidates the {@link useGetIngestionKeys} query
* @summary Get ingestion keys for workspace
*/
export const invalidateGetIngestionKeys = async (
queryClient: QueryClient,
@@ -207,9 +185,6 @@ export const createIngestionKey = (
});
};
export const getCreateIngestionKeyMutationKey = () =>
['createIngestionKey'] as const;
export const getCreateIngestionKeyMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -217,16 +192,16 @@ export const getCreateIngestionKeyMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createIngestionKey>>,
TError,
CreateIngestionKeyMutationVariables,
{ data?: BodyType<GatewaytypesPostableIngestionKeyDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createIngestionKey>>,
TError,
CreateIngestionKeyMutationVariables,
{ data?: BodyType<GatewaytypesPostableIngestionKeyDTO> },
TContext
> => {
const mutationKey = getCreateIngestionKeyMutationKey();
const mutationKey = ['createIngestionKey'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -237,7 +212,7 @@ export const getCreateIngestionKeyMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createIngestionKey>>,
CreateIngestionKeyMutationVariables
{ data?: BodyType<GatewaytypesPostableIngestionKeyDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -254,9 +229,6 @@ export type CreateIngestionKeyMutationBody =
| BodyType<GatewaytypesPostableIngestionKeyDTO>
| undefined;
export type CreateIngestionKeyMutationError = ErrorType<RenderErrorResponseDTO>;
export type CreateIngestionKeyMutationVariables = {
data?: BodyType<GatewaytypesPostableIngestionKeyDTO>;
};
/**
* @summary Create ingestion key for workspace
@@ -268,13 +240,13 @@ export const useCreateIngestionKey = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createIngestionKey>>,
TError,
CreateIngestionKeyMutationVariables,
{ data?: BodyType<GatewaytypesPostableIngestionKeyDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createIngestionKey>>,
TError,
CreateIngestionKeyMutationVariables,
{ data?: BodyType<GatewaytypesPostableIngestionKeyDTO> },
TContext
> => {
return useMutation(getCreateIngestionKeyMutationOptions(options));
@@ -294,9 +266,6 @@ export const deleteIngestionKey = (
});
};
export const getDeleteIngestionKeyMutationKey = () =>
['deleteIngestionKey'] as const;
export const getDeleteIngestionKeyMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -304,16 +273,16 @@ export const getDeleteIngestionKeyMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteIngestionKey>>,
TError,
DeleteIngestionKeyMutationVariables,
{ pathParams: DeleteIngestionKeyPathParameters },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof deleteIngestionKey>>,
TError,
DeleteIngestionKeyMutationVariables,
{ pathParams: DeleteIngestionKeyPathParameters },
TContext
> => {
const mutationKey = getDeleteIngestionKeyMutationKey();
const mutationKey = ['deleteIngestionKey'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -324,7 +293,7 @@ export const getDeleteIngestionKeyMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof deleteIngestionKey>>,
DeleteIngestionKeyMutationVariables
{ pathParams: DeleteIngestionKeyPathParameters }
> = (props) => {
const { pathParams } = props ?? {};
@@ -339,9 +308,6 @@ export type DeleteIngestionKeyMutationResult = NonNullable<
>;
export type DeleteIngestionKeyMutationError = ErrorType<RenderErrorResponseDTO>;
export type DeleteIngestionKeyMutationVariables = {
pathParams: DeleteIngestionKeyPathParameters;
};
/**
* @summary Delete ingestion key for workspace
@@ -353,13 +319,13 @@ export const useDeleteIngestionKey = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteIngestionKey>>,
TError,
DeleteIngestionKeyMutationVariables,
{ pathParams: DeleteIngestionKeyPathParameters },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof deleteIngestionKey>>,
TError,
DeleteIngestionKeyMutationVariables,
{ pathParams: DeleteIngestionKeyPathParameters },
TContext
> => {
return useMutation(getDeleteIngestionKeyMutationOptions(options));
@@ -451,7 +417,7 @@ export function useGetIngestionKey<
}
/**
* @summary Invalidates the {@link useGetIngestionKey} query
* @summary Get ingestion key for workspace
*/
export const invalidateGetIngestionKey = async (
queryClient: QueryClient,
@@ -484,9 +450,6 @@ export const updateIngestionKey = (
});
};
export const getUpdateIngestionKeyMutationKey = () =>
['updateIngestionKey'] as const;
export const getUpdateIngestionKeyMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -494,16 +457,22 @@ export const getUpdateIngestionKeyMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateIngestionKey>>,
TError,
UpdateIngestionKeyMutationVariables,
{
pathParams: UpdateIngestionKeyPathParameters;
data?: BodyType<GatewaytypesPostableIngestionKeyDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateIngestionKey>>,
TError,
UpdateIngestionKeyMutationVariables,
{
pathParams: UpdateIngestionKeyPathParameters;
data?: BodyType<GatewaytypesPostableIngestionKeyDTO>;
},
TContext
> => {
const mutationKey = getUpdateIngestionKeyMutationKey();
const mutationKey = ['updateIngestionKey'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -514,7 +483,10 @@ export const getUpdateIngestionKeyMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateIngestionKey>>,
UpdateIngestionKeyMutationVariables
{
pathParams: UpdateIngestionKeyPathParameters;
data?: BodyType<GatewaytypesPostableIngestionKeyDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -531,10 +503,6 @@ export type UpdateIngestionKeyMutationBody =
| BodyType<GatewaytypesPostableIngestionKeyDTO>
| undefined;
export type UpdateIngestionKeyMutationError = ErrorType<RenderErrorResponseDTO>;
export type UpdateIngestionKeyMutationVariables = {
pathParams: UpdateIngestionKeyPathParameters;
data?: BodyType<GatewaytypesPostableIngestionKeyDTO>;
};
/**
* @summary Update ingestion key for workspace
@@ -546,13 +514,19 @@ export const useUpdateIngestionKey = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateIngestionKey>>,
TError,
UpdateIngestionKeyMutationVariables,
{
pathParams: UpdateIngestionKeyPathParameters;
data?: BodyType<GatewaytypesPostableIngestionKeyDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateIngestionKey>>,
TError,
UpdateIngestionKeyMutationVariables,
{
pathParams: UpdateIngestionKeyPathParameters;
data?: BodyType<GatewaytypesPostableIngestionKeyDTO>;
},
TContext
> => {
return useMutation(getUpdateIngestionKeyMutationOptions(options));
@@ -644,7 +618,7 @@ export function useGetIngestionKeyLimits<
}
/**
* @summary Invalidates the {@link useGetIngestionKeyLimits} query
* @summary Get limits for the ingestion key
*/
export const invalidateGetIngestionKeyLimits = async (
queryClient: QueryClient,
@@ -678,9 +652,6 @@ export const createIngestionKeyLimit = (
});
};
export const getCreateIngestionKeyLimitMutationKey = () =>
['createIngestionKeyLimit'] as const;
export const getCreateIngestionKeyLimitMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -688,16 +659,22 @@ export const getCreateIngestionKeyLimitMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createIngestionKeyLimit>>,
TError,
CreateIngestionKeyLimitMutationVariables,
{
pathParams: CreateIngestionKeyLimitPathParameters;
data?: BodyType<GatewaytypesDeprecatedPostableIngestionKeyLimitDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createIngestionKeyLimit>>,
TError,
CreateIngestionKeyLimitMutationVariables,
{
pathParams: CreateIngestionKeyLimitPathParameters;
data?: BodyType<GatewaytypesDeprecatedPostableIngestionKeyLimitDTO>;
},
TContext
> => {
const mutationKey = getCreateIngestionKeyLimitMutationKey();
const mutationKey = ['createIngestionKeyLimit'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -708,7 +685,10 @@ export const getCreateIngestionKeyLimitMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createIngestionKeyLimit>>,
CreateIngestionKeyLimitMutationVariables
{
pathParams: CreateIngestionKeyLimitPathParameters;
data?: BodyType<GatewaytypesDeprecatedPostableIngestionKeyLimitDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -726,10 +706,6 @@ export type CreateIngestionKeyLimitMutationBody =
| undefined;
export type CreateIngestionKeyLimitMutationError =
ErrorType<RenderErrorResponseDTO>;
export type CreateIngestionKeyLimitMutationVariables = {
pathParams: CreateIngestionKeyLimitPathParameters;
data?: BodyType<GatewaytypesDeprecatedPostableIngestionKeyLimitDTO>;
};
/**
* @deprecated
@@ -742,13 +718,19 @@ export const useCreateIngestionKeyLimit = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createIngestionKeyLimit>>,
TError,
CreateIngestionKeyLimitMutationVariables,
{
pathParams: CreateIngestionKeyLimitPathParameters;
data?: BodyType<GatewaytypesDeprecatedPostableIngestionKeyLimitDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createIngestionKeyLimit>>,
TError,
CreateIngestionKeyLimitMutationVariables,
{
pathParams: CreateIngestionKeyLimitPathParameters;
data?: BodyType<GatewaytypesDeprecatedPostableIngestionKeyLimitDTO>;
},
TContext
> => {
return useMutation(getCreateIngestionKeyLimitMutationOptions(options));
@@ -769,9 +751,6 @@ export const deleteIngestionKeyLimit = (
});
};
export const getDeleteIngestionKeyLimitMutationKey = () =>
['deleteIngestionKeyLimit'] as const;
export const getDeleteIngestionKeyLimitMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -779,16 +758,16 @@ export const getDeleteIngestionKeyLimitMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteIngestionKeyLimit>>,
TError,
DeleteIngestionKeyLimitMutationVariables,
{ pathParams: DeleteIngestionKeyLimitPathParameters },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof deleteIngestionKeyLimit>>,
TError,
DeleteIngestionKeyLimitMutationVariables,
{ pathParams: DeleteIngestionKeyLimitPathParameters },
TContext
> => {
const mutationKey = getDeleteIngestionKeyLimitMutationKey();
const mutationKey = ['deleteIngestionKeyLimit'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -799,7 +778,7 @@ export const getDeleteIngestionKeyLimitMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof deleteIngestionKeyLimit>>,
DeleteIngestionKeyLimitMutationVariables
{ pathParams: DeleteIngestionKeyLimitPathParameters }
> = (props) => {
const { pathParams } = props ?? {};
@@ -815,9 +794,6 @@ export type DeleteIngestionKeyLimitMutationResult = NonNullable<
export type DeleteIngestionKeyLimitMutationError =
ErrorType<RenderErrorResponseDTO>;
export type DeleteIngestionKeyLimitMutationVariables = {
pathParams: DeleteIngestionKeyLimitPathParameters;
};
/**
* @deprecated
@@ -830,13 +806,13 @@ export const useDeleteIngestionKeyLimit = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteIngestionKeyLimit>>,
TError,
DeleteIngestionKeyLimitMutationVariables,
{ pathParams: DeleteIngestionKeyLimitPathParameters },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof deleteIngestionKeyLimit>>,
TError,
DeleteIngestionKeyLimitMutationVariables,
{ pathParams: DeleteIngestionKeyLimitPathParameters },
TContext
> => {
return useMutation(getDeleteIngestionKeyLimitMutationOptions(options));
@@ -860,9 +836,6 @@ export const updateIngestionKeyLimit = (
});
};
export const getUpdateIngestionKeyLimitMutationKey = () =>
['updateIngestionKeyLimit'] as const;
export const getUpdateIngestionKeyLimitMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -870,16 +843,22 @@ export const getUpdateIngestionKeyLimitMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateIngestionKeyLimit>>,
TError,
UpdateIngestionKeyLimitMutationVariables,
{
pathParams: UpdateIngestionKeyLimitPathParameters;
data?: BodyType<GatewaytypesUpdatableIngestionKeyLimitDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateIngestionKeyLimit>>,
TError,
UpdateIngestionKeyLimitMutationVariables,
{
pathParams: UpdateIngestionKeyLimitPathParameters;
data?: BodyType<GatewaytypesUpdatableIngestionKeyLimitDTO>;
},
TContext
> => {
const mutationKey = getUpdateIngestionKeyLimitMutationKey();
const mutationKey = ['updateIngestionKeyLimit'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -890,7 +869,10 @@ export const getUpdateIngestionKeyLimitMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateIngestionKeyLimit>>,
UpdateIngestionKeyLimitMutationVariables
{
pathParams: UpdateIngestionKeyLimitPathParameters;
data?: BodyType<GatewaytypesUpdatableIngestionKeyLimitDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -908,10 +890,6 @@ export type UpdateIngestionKeyLimitMutationBody =
| undefined;
export type UpdateIngestionKeyLimitMutationError =
ErrorType<RenderErrorResponseDTO>;
export type UpdateIngestionKeyLimitMutationVariables = {
pathParams: UpdateIngestionKeyLimitPathParameters;
data?: BodyType<GatewaytypesUpdatableIngestionKeyLimitDTO>;
};
/**
* @deprecated
@@ -924,13 +902,19 @@ export const useUpdateIngestionKeyLimit = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateIngestionKeyLimit>>,
TError,
UpdateIngestionKeyLimitMutationVariables,
{
pathParams: UpdateIngestionKeyLimitPathParameters;
data?: BodyType<GatewaytypesUpdatableIngestionKeyLimitDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateIngestionKeyLimit>>,
TError,
UpdateIngestionKeyLimitMutationVariables,
{
pathParams: UpdateIngestionKeyLimitPathParameters;
data?: BodyType<GatewaytypesUpdatableIngestionKeyLimitDTO>;
},
TContext
> => {
return useMutation(getUpdateIngestionKeyLimitMutationOptions(options));
@@ -1021,7 +1005,7 @@ export function useSearchIngestionKeys<
}
/**
* @summary Invalidates the {@link useSearchIngestionKeys} query
* @summary Search ingestion keys for workspace
*/
export const invalidateSearchIngestionKeys = async (
queryClient: QueryClient,
@@ -1053,9 +1037,6 @@ export const createIngestionLimit = (
});
};
export const getCreateIngestionLimitMutationKey = () =>
['createIngestionLimit'] as const;
export const getCreateIngestionLimitMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -1063,16 +1044,16 @@ export const getCreateIngestionLimitMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createIngestionLimit>>,
TError,
CreateIngestionLimitMutationVariables,
{ data?: BodyType<GatewaytypesPostableIngestionKeyLimitDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createIngestionLimit>>,
TError,
CreateIngestionLimitMutationVariables,
{ data?: BodyType<GatewaytypesPostableIngestionKeyLimitDTO> },
TContext
> => {
const mutationKey = getCreateIngestionLimitMutationKey();
const mutationKey = ['createIngestionLimit'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -1083,7 +1064,7 @@ export const getCreateIngestionLimitMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createIngestionLimit>>,
CreateIngestionLimitMutationVariables
{ data?: BodyType<GatewaytypesPostableIngestionKeyLimitDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -1101,9 +1082,6 @@ export type CreateIngestionLimitMutationBody =
| undefined;
export type CreateIngestionLimitMutationError =
ErrorType<RenderErrorResponseDTO>;
export type CreateIngestionLimitMutationVariables = {
data?: BodyType<GatewaytypesPostableIngestionKeyLimitDTO>;
};
/**
* @summary Create ingestion limit
@@ -1115,13 +1093,13 @@ export const useCreateIngestionLimit = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createIngestionLimit>>,
TError,
CreateIngestionLimitMutationVariables,
{ data?: BodyType<GatewaytypesPostableIngestionKeyLimitDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createIngestionLimit>>,
TError,
CreateIngestionLimitMutationVariables,
{ data?: BodyType<GatewaytypesPostableIngestionKeyLimitDTO> },
TContext
> => {
return useMutation(getCreateIngestionLimitMutationOptions(options));
@@ -1141,9 +1119,6 @@ export const deleteIngestionLimit = (
});
};
export const getDeleteIngestionLimitMutationKey = () =>
['deleteIngestionLimit'] as const;
export const getDeleteIngestionLimitMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -1151,16 +1126,16 @@ export const getDeleteIngestionLimitMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteIngestionLimit>>,
TError,
DeleteIngestionLimitMutationVariables,
{ pathParams: DeleteIngestionLimitPathParameters },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof deleteIngestionLimit>>,
TError,
DeleteIngestionLimitMutationVariables,
{ pathParams: DeleteIngestionLimitPathParameters },
TContext
> => {
const mutationKey = getDeleteIngestionLimitMutationKey();
const mutationKey = ['deleteIngestionLimit'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -1171,7 +1146,7 @@ export const getDeleteIngestionLimitMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof deleteIngestionLimit>>,
DeleteIngestionLimitMutationVariables
{ pathParams: DeleteIngestionLimitPathParameters }
> = (props) => {
const { pathParams } = props ?? {};
@@ -1187,9 +1162,6 @@ export type DeleteIngestionLimitMutationResult = NonNullable<
export type DeleteIngestionLimitMutationError =
ErrorType<RenderErrorResponseDTO>;
export type DeleteIngestionLimitMutationVariables = {
pathParams: DeleteIngestionLimitPathParameters;
};
/**
* @summary Delete ingestion limit
@@ -1201,13 +1173,13 @@ export const useDeleteIngestionLimit = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteIngestionLimit>>,
TError,
DeleteIngestionLimitMutationVariables,
{ pathParams: DeleteIngestionLimitPathParameters },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof deleteIngestionLimit>>,
TError,
DeleteIngestionLimitMutationVariables,
{ pathParams: DeleteIngestionLimitPathParameters },
TContext
> => {
return useMutation(getDeleteIngestionLimitMutationOptions(options));
@@ -1299,7 +1271,7 @@ export function useGetIngestionLimit<
}
/**
* @summary Invalidates the {@link useGetIngestionLimit} query
* @summary Get ingestion limit
*/
export const invalidateGetIngestionLimit = async (
queryClient: QueryClient,
@@ -1332,9 +1304,6 @@ export const updateIngestionLimit = (
});
};
export const getUpdateIngestionLimitMutationKey = () =>
['updateIngestionLimit'] as const;
export const getUpdateIngestionLimitMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -1342,16 +1311,22 @@ export const getUpdateIngestionLimitMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateIngestionLimit>>,
TError,
UpdateIngestionLimitMutationVariables,
{
pathParams: UpdateIngestionLimitPathParameters;
data?: BodyType<GatewaytypesUpdatableIngestionKeyLimitDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateIngestionLimit>>,
TError,
UpdateIngestionLimitMutationVariables,
{
pathParams: UpdateIngestionLimitPathParameters;
data?: BodyType<GatewaytypesUpdatableIngestionKeyLimitDTO>;
},
TContext
> => {
const mutationKey = getUpdateIngestionLimitMutationKey();
const mutationKey = ['updateIngestionLimit'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -1362,7 +1337,10 @@ export const getUpdateIngestionLimitMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateIngestionLimit>>,
UpdateIngestionLimitMutationVariables
{
pathParams: UpdateIngestionLimitPathParameters;
data?: BodyType<GatewaytypesUpdatableIngestionKeyLimitDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -1380,10 +1358,6 @@ export type UpdateIngestionLimitMutationBody =
| undefined;
export type UpdateIngestionLimitMutationError =
ErrorType<RenderErrorResponseDTO>;
export type UpdateIngestionLimitMutationVariables = {
pathParams: UpdateIngestionLimitPathParameters;
data?: BodyType<GatewaytypesUpdatableIngestionKeyLimitDTO>;
};
/**
* @summary Update ingestion limit
@@ -1395,13 +1369,19 @@ export const useUpdateIngestionLimit = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateIngestionLimit>>,
TError,
UpdateIngestionLimitMutationVariables,
{
pathParams: UpdateIngestionLimitPathParameters;
data?: BodyType<GatewaytypesUpdatableIngestionKeyLimitDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateIngestionLimit>>,
TError,
UpdateIngestionLimitMutationVariables,
{
pathParams: UpdateIngestionLimitPathParameters;
data?: BodyType<GatewaytypesUpdatableIngestionKeyLimitDTO>;
},
TContext
> => {
return useMutation(getUpdateIngestionLimitMutationOptions(options));

View File

@@ -14,9 +14,10 @@ import type {
UseQueryResult,
} from 'react-query';
import type { GetGlobalConfig200 } from '../sigNoz.schemas/getGlobalConfig200';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type {
GetGlobalConfig200,
RenderErrorResponseDTO,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType } from '../../../generatedAPIInstance';
@@ -111,7 +112,7 @@ export function useGetGlobalConfig<
}
/**
* @summary Invalidates the {@link useGetGlobalConfig} query
* @summary Get global config
*/
export const invalidateGetGlobalConfig = async (
queryClient: QueryClient,

View File

@@ -14,17 +14,14 @@ import type {
UseQueryResult,
} from 'react-query';
import type { Healthz200 } from '../sigNoz.schemas/healthz200';
import type { Healthz503 } from '../sigNoz.schemas/healthz503';
import type { Livez200 } from '../sigNoz.schemas/livez200';
import type { Readyz200 } from '../sigNoz.schemas/readyz200';
import type { Readyz503 } from '../sigNoz.schemas/readyz503';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type {
Healthz200,
Healthz503,
Livez200,
Readyz200,
Readyz503,
RenderErrorResponseDTO,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType } from '../../../generatedAPIInstance';
@@ -110,7 +107,7 @@ export function useHealthz<
}
/**
* @summary Invalidates the {@link useHealthz} query
* @summary Health check
*/
export const invalidateHealthz = async (
queryClient: QueryClient,
@@ -183,7 +180,7 @@ export function useLivez<
}
/**
* @summary Invalidates the {@link useLivez} query
* @summary Liveness check
*/
export const invalidateLivez = async (
queryClient: QueryClient,
@@ -253,7 +250,7 @@ export function useReadyz<
}
/**
* @summary Invalidates the {@link useReadyz} query
* @summary Readiness check
*/
export const invalidateReadyz = async (
queryClient: QueryClient,

View File

@@ -17,55 +17,33 @@ import type {
UseQueryResult,
} from 'react-query';
import type { GetChecks200 } from '../sigNoz.schemas/getChecks200';
import type { GetChecksParams } from '../sigNoz.schemas/getChecksParams';
import type { InframonitoringtypesPostableClustersDTO } from '../sigNoz.schemas/inframonitoringtypesPostableClustersDTO';
import type { InframonitoringtypesPostableContainersDTO } from '../sigNoz.schemas/inframonitoringtypesPostableContainersDTO';
import type { InframonitoringtypesPostableDaemonSetsDTO } from '../sigNoz.schemas/inframonitoringtypesPostableDaemonSetsDTO';
import type { InframonitoringtypesPostableDeploymentsDTO } from '../sigNoz.schemas/inframonitoringtypesPostableDeploymentsDTO';
import type { InframonitoringtypesPostableHostsDTO } from '../sigNoz.schemas/inframonitoringtypesPostableHostsDTO';
import type { InframonitoringtypesPostableJobsDTO } from '../sigNoz.schemas/inframonitoringtypesPostableJobsDTO';
import type { InframonitoringtypesPostableNamespacesDTO } from '../sigNoz.schemas/inframonitoringtypesPostableNamespacesDTO';
import type { InframonitoringtypesPostableNodesDTO } from '../sigNoz.schemas/inframonitoringtypesPostableNodesDTO';
import type { InframonitoringtypesPostablePodsDTO } from '../sigNoz.schemas/inframonitoringtypesPostablePodsDTO';
import type { InframonitoringtypesPostableStatefulSetsDTO } from '../sigNoz.schemas/inframonitoringtypesPostableStatefulSetsDTO';
import type { InframonitoringtypesPostableVolumesDTO } from '../sigNoz.schemas/inframonitoringtypesPostableVolumesDTO';
import type { ListClusters200 } from '../sigNoz.schemas/listClusters200';
import type { ListContainers200 } from '../sigNoz.schemas/listContainers200';
import type { ListDaemonSets200 } from '../sigNoz.schemas/listDaemonSets200';
import type { ListDeployments200 } from '../sigNoz.schemas/listDeployments200';
import type { ListHosts200 } from '../sigNoz.schemas/listHosts200';
import type { ListJobs200 } from '../sigNoz.schemas/listJobs200';
import type { ListNamespaces200 } from '../sigNoz.schemas/listNamespaces200';
import type { ListNodes200 } from '../sigNoz.schemas/listNodes200';
import type { ListPods200 } from '../sigNoz.schemas/listPods200';
import type { ListStatefulSets200 } from '../sigNoz.schemas/listStatefulSets200';
import type { ListVolumes200 } from '../sigNoz.schemas/listVolumes200';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type {
GetChecks200,
GetChecksParams,
InframonitoringtypesPostableClustersDTO,
InframonitoringtypesPostableContainersDTO,
InframonitoringtypesPostableDaemonSetsDTO,
InframonitoringtypesPostableDeploymentsDTO,
InframonitoringtypesPostableHostsDTO,
InframonitoringtypesPostableJobsDTO,
InframonitoringtypesPostableNamespacesDTO,
InframonitoringtypesPostableNodesDTO,
InframonitoringtypesPostablePodsDTO,
InframonitoringtypesPostableStatefulSetsDTO,
InframonitoringtypesPostableVolumesDTO,
ListClusters200,
ListContainers200,
ListDaemonSets200,
ListDeployments200,
ListHosts200,
ListJobs200,
ListNamespaces200,
ListNodes200,
ListPods200,
ListStatefulSets200,
ListVolumes200,
RenderErrorResponseDTO,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
@@ -162,7 +140,7 @@ export function useGetChecks<
}
/**
* @summary Invalidates the {@link useGetChecks} query
* @summary Run Infra Monitoring Setup Checks
*/
export const invalidateGetChecks = async (
queryClient: QueryClient,
@@ -194,8 +172,6 @@ export const listClusters = (
});
};
export const getListClustersMutationKey = () => ['listClusters'] as const;
export const getListClustersMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -203,16 +179,16 @@ export const getListClustersMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof listClusters>>,
TError,
ListClustersMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableClustersDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof listClusters>>,
TError,
ListClustersMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableClustersDTO> },
TContext
> => {
const mutationKey = getListClustersMutationKey();
const mutationKey = ['listClusters'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -223,7 +199,7 @@ export const getListClustersMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof listClusters>>,
ListClustersMutationVariables
{ data?: BodyType<InframonitoringtypesPostableClustersDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -240,9 +216,6 @@ export type ListClustersMutationBody =
| BodyType<InframonitoringtypesPostableClustersDTO>
| undefined;
export type ListClustersMutationError = ErrorType<RenderErrorResponseDTO>;
export type ListClustersMutationVariables = {
data?: BodyType<InframonitoringtypesPostableClustersDTO>;
};
/**
* @summary List Clusters for Infra Monitoring
@@ -254,13 +227,13 @@ export const useListClusters = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof listClusters>>,
TError,
ListClustersMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableClustersDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof listClusters>>,
TError,
ListClustersMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableClustersDTO> },
TContext
> => {
return useMutation(getListClustersMutationOptions(options));
@@ -282,8 +255,6 @@ export const listDaemonSets = (
});
};
export const getListDaemonSetsMutationKey = () => ['listDaemonSets'] as const;
export const getListDaemonSetsMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -291,16 +262,16 @@ export const getListDaemonSetsMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof listDaemonSets>>,
TError,
ListDaemonSetsMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableDaemonSetsDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof listDaemonSets>>,
TError,
ListDaemonSetsMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableDaemonSetsDTO> },
TContext
> => {
const mutationKey = getListDaemonSetsMutationKey();
const mutationKey = ['listDaemonSets'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -311,7 +282,7 @@ export const getListDaemonSetsMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof listDaemonSets>>,
ListDaemonSetsMutationVariables
{ data?: BodyType<InframonitoringtypesPostableDaemonSetsDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -328,9 +299,6 @@ export type ListDaemonSetsMutationBody =
| BodyType<InframonitoringtypesPostableDaemonSetsDTO>
| undefined;
export type ListDaemonSetsMutationError = ErrorType<RenderErrorResponseDTO>;
export type ListDaemonSetsMutationVariables = {
data?: BodyType<InframonitoringtypesPostableDaemonSetsDTO>;
};
/**
* @summary List DaemonSets for Infra Monitoring
@@ -342,13 +310,13 @@ export const useListDaemonSets = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof listDaemonSets>>,
TError,
ListDaemonSetsMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableDaemonSetsDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof listDaemonSets>>,
TError,
ListDaemonSetsMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableDaemonSetsDTO> },
TContext
> => {
return useMutation(getListDaemonSetsMutationOptions(options));
@@ -370,8 +338,6 @@ export const listDeployments = (
});
};
export const getListDeploymentsMutationKey = () => ['listDeployments'] as const;
export const getListDeploymentsMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -379,16 +345,16 @@ export const getListDeploymentsMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof listDeployments>>,
TError,
ListDeploymentsMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableDeploymentsDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof listDeployments>>,
TError,
ListDeploymentsMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableDeploymentsDTO> },
TContext
> => {
const mutationKey = getListDeploymentsMutationKey();
const mutationKey = ['listDeployments'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -399,7 +365,7 @@ export const getListDeploymentsMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof listDeployments>>,
ListDeploymentsMutationVariables
{ data?: BodyType<InframonitoringtypesPostableDeploymentsDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -416,9 +382,6 @@ export type ListDeploymentsMutationBody =
| BodyType<InframonitoringtypesPostableDeploymentsDTO>
| undefined;
export type ListDeploymentsMutationError = ErrorType<RenderErrorResponseDTO>;
export type ListDeploymentsMutationVariables = {
data?: BodyType<InframonitoringtypesPostableDeploymentsDTO>;
};
/**
* @summary List Deployments for Infra Monitoring
@@ -430,13 +393,13 @@ export const useListDeployments = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof listDeployments>>,
TError,
ListDeploymentsMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableDeploymentsDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof listDeployments>>,
TError,
ListDeploymentsMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableDeploymentsDTO> },
TContext
> => {
return useMutation(getListDeploymentsMutationOptions(options));
@@ -458,8 +421,6 @@ export const listHosts = (
});
};
export const getListHostsMutationKey = () => ['listHosts'] as const;
export const getListHostsMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -467,16 +428,16 @@ export const getListHostsMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof listHosts>>,
TError,
ListHostsMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableHostsDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof listHosts>>,
TError,
ListHostsMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableHostsDTO> },
TContext
> => {
const mutationKey = getListHostsMutationKey();
const mutationKey = ['listHosts'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -487,7 +448,7 @@ export const getListHostsMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof listHosts>>,
ListHostsMutationVariables
{ data?: BodyType<InframonitoringtypesPostableHostsDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -504,9 +465,6 @@ export type ListHostsMutationBody =
| BodyType<InframonitoringtypesPostableHostsDTO>
| undefined;
export type ListHostsMutationError = ErrorType<RenderErrorResponseDTO>;
export type ListHostsMutationVariables = {
data?: BodyType<InframonitoringtypesPostableHostsDTO>;
};
/**
* @summary List Hosts for Infra Monitoring
@@ -518,13 +476,13 @@ export const useListHosts = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof listHosts>>,
TError,
ListHostsMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableHostsDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof listHosts>>,
TError,
ListHostsMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableHostsDTO> },
TContext
> => {
return useMutation(getListHostsMutationOptions(options));
@@ -546,8 +504,6 @@ export const listJobs = (
});
};
export const getListJobsMutationKey = () => ['listJobs'] as const;
export const getListJobsMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -555,16 +511,16 @@ export const getListJobsMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof listJobs>>,
TError,
ListJobsMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableJobsDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof listJobs>>,
TError,
ListJobsMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableJobsDTO> },
TContext
> => {
const mutationKey = getListJobsMutationKey();
const mutationKey = ['listJobs'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -575,7 +531,7 @@ export const getListJobsMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof listJobs>>,
ListJobsMutationVariables
{ data?: BodyType<InframonitoringtypesPostableJobsDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -592,9 +548,6 @@ export type ListJobsMutationBody =
| BodyType<InframonitoringtypesPostableJobsDTO>
| undefined;
export type ListJobsMutationError = ErrorType<RenderErrorResponseDTO>;
export type ListJobsMutationVariables = {
data?: BodyType<InframonitoringtypesPostableJobsDTO>;
};
/**
* @summary List Jobs for Infra Monitoring
@@ -606,13 +559,13 @@ export const useListJobs = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof listJobs>>,
TError,
ListJobsMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableJobsDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof listJobs>>,
TError,
ListJobsMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableJobsDTO> },
TContext
> => {
return useMutation(getListJobsMutationOptions(options));
@@ -634,8 +587,6 @@ export const listContainers = (
});
};
export const getListContainersMutationKey = () => ['listContainers'] as const;
export const getListContainersMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -643,16 +594,16 @@ export const getListContainersMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof listContainers>>,
TError,
ListContainersMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableContainersDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof listContainers>>,
TError,
ListContainersMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableContainersDTO> },
TContext
> => {
const mutationKey = getListContainersMutationKey();
const mutationKey = ['listContainers'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -663,7 +614,7 @@ export const getListContainersMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof listContainers>>,
ListContainersMutationVariables
{ data?: BodyType<InframonitoringtypesPostableContainersDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -680,9 +631,6 @@ export type ListContainersMutationBody =
| BodyType<InframonitoringtypesPostableContainersDTO>
| undefined;
export type ListContainersMutationError = ErrorType<RenderErrorResponseDTO>;
export type ListContainersMutationVariables = {
data?: BodyType<InframonitoringtypesPostableContainersDTO>;
};
/**
* @summary List Kubernetes Containers for Infra Monitoring
@@ -694,13 +642,13 @@ export const useListContainers = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof listContainers>>,
TError,
ListContainersMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableContainersDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof listContainers>>,
TError,
ListContainersMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableContainersDTO> },
TContext
> => {
return useMutation(getListContainersMutationOptions(options));
@@ -722,8 +670,6 @@ export const listNamespaces = (
});
};
export const getListNamespacesMutationKey = () => ['listNamespaces'] as const;
export const getListNamespacesMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -731,16 +677,16 @@ export const getListNamespacesMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof listNamespaces>>,
TError,
ListNamespacesMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableNamespacesDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof listNamespaces>>,
TError,
ListNamespacesMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableNamespacesDTO> },
TContext
> => {
const mutationKey = getListNamespacesMutationKey();
const mutationKey = ['listNamespaces'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -751,7 +697,7 @@ export const getListNamespacesMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof listNamespaces>>,
ListNamespacesMutationVariables
{ data?: BodyType<InframonitoringtypesPostableNamespacesDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -768,9 +714,6 @@ export type ListNamespacesMutationBody =
| BodyType<InframonitoringtypesPostableNamespacesDTO>
| undefined;
export type ListNamespacesMutationError = ErrorType<RenderErrorResponseDTO>;
export type ListNamespacesMutationVariables = {
data?: BodyType<InframonitoringtypesPostableNamespacesDTO>;
};
/**
* @summary List Namespaces for Infra Monitoring
@@ -782,13 +725,13 @@ export const useListNamespaces = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof listNamespaces>>,
TError,
ListNamespacesMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableNamespacesDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof listNamespaces>>,
TError,
ListNamespacesMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableNamespacesDTO> },
TContext
> => {
return useMutation(getListNamespacesMutationOptions(options));
@@ -810,8 +753,6 @@ export const listNodes = (
});
};
export const getListNodesMutationKey = () => ['listNodes'] as const;
export const getListNodesMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -819,16 +760,16 @@ export const getListNodesMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof listNodes>>,
TError,
ListNodesMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableNodesDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof listNodes>>,
TError,
ListNodesMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableNodesDTO> },
TContext
> => {
const mutationKey = getListNodesMutationKey();
const mutationKey = ['listNodes'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -839,7 +780,7 @@ export const getListNodesMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof listNodes>>,
ListNodesMutationVariables
{ data?: BodyType<InframonitoringtypesPostableNodesDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -856,9 +797,6 @@ export type ListNodesMutationBody =
| BodyType<InframonitoringtypesPostableNodesDTO>
| undefined;
export type ListNodesMutationError = ErrorType<RenderErrorResponseDTO>;
export type ListNodesMutationVariables = {
data?: BodyType<InframonitoringtypesPostableNodesDTO>;
};
/**
* @summary List Nodes for Infra Monitoring
@@ -870,13 +808,13 @@ export const useListNodes = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof listNodes>>,
TError,
ListNodesMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableNodesDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof listNodes>>,
TError,
ListNodesMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableNodesDTO> },
TContext
> => {
return useMutation(getListNodesMutationOptions(options));
@@ -898,8 +836,6 @@ export const listPods = (
});
};
export const getListPodsMutationKey = () => ['listPods'] as const;
export const getListPodsMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -907,16 +843,16 @@ export const getListPodsMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof listPods>>,
TError,
ListPodsMutationVariables,
{ data?: BodyType<InframonitoringtypesPostablePodsDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof listPods>>,
TError,
ListPodsMutationVariables,
{ data?: BodyType<InframonitoringtypesPostablePodsDTO> },
TContext
> => {
const mutationKey = getListPodsMutationKey();
const mutationKey = ['listPods'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -927,7 +863,7 @@ export const getListPodsMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof listPods>>,
ListPodsMutationVariables
{ data?: BodyType<InframonitoringtypesPostablePodsDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -944,9 +880,6 @@ export type ListPodsMutationBody =
| BodyType<InframonitoringtypesPostablePodsDTO>
| undefined;
export type ListPodsMutationError = ErrorType<RenderErrorResponseDTO>;
export type ListPodsMutationVariables = {
data?: BodyType<InframonitoringtypesPostablePodsDTO>;
};
/**
* @summary List Pods for Infra Monitoring
@@ -958,13 +891,13 @@ export const useListPods = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof listPods>>,
TError,
ListPodsMutationVariables,
{ data?: BodyType<InframonitoringtypesPostablePodsDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof listPods>>,
TError,
ListPodsMutationVariables,
{ data?: BodyType<InframonitoringtypesPostablePodsDTO> },
TContext
> => {
return useMutation(getListPodsMutationOptions(options));
@@ -986,8 +919,6 @@ export const listVolumes = (
});
};
export const getListVolumesMutationKey = () => ['listVolumes'] as const;
export const getListVolumesMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -995,16 +926,16 @@ export const getListVolumesMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof listVolumes>>,
TError,
ListVolumesMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableVolumesDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof listVolumes>>,
TError,
ListVolumesMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableVolumesDTO> },
TContext
> => {
const mutationKey = getListVolumesMutationKey();
const mutationKey = ['listVolumes'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -1015,7 +946,7 @@ export const getListVolumesMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof listVolumes>>,
ListVolumesMutationVariables
{ data?: BodyType<InframonitoringtypesPostableVolumesDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -1032,9 +963,6 @@ export type ListVolumesMutationBody =
| BodyType<InframonitoringtypesPostableVolumesDTO>
| undefined;
export type ListVolumesMutationError = ErrorType<RenderErrorResponseDTO>;
export type ListVolumesMutationVariables = {
data?: BodyType<InframonitoringtypesPostableVolumesDTO>;
};
/**
* @summary List Volumes for Infra Monitoring
@@ -1046,13 +974,13 @@ export const useListVolumes = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof listVolumes>>,
TError,
ListVolumesMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableVolumesDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof listVolumes>>,
TError,
ListVolumesMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableVolumesDTO> },
TContext
> => {
return useMutation(getListVolumesMutationOptions(options));
@@ -1074,9 +1002,6 @@ export const listStatefulSets = (
});
};
export const getListStatefulSetsMutationKey = () =>
['listStatefulSets'] as const;
export const getListStatefulSetsMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -1084,16 +1009,16 @@ export const getListStatefulSetsMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof listStatefulSets>>,
TError,
ListStatefulSetsMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableStatefulSetsDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof listStatefulSets>>,
TError,
ListStatefulSetsMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableStatefulSetsDTO> },
TContext
> => {
const mutationKey = getListStatefulSetsMutationKey();
const mutationKey = ['listStatefulSets'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -1104,7 +1029,7 @@ export const getListStatefulSetsMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof listStatefulSets>>,
ListStatefulSetsMutationVariables
{ data?: BodyType<InframonitoringtypesPostableStatefulSetsDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -1121,9 +1046,6 @@ export type ListStatefulSetsMutationBody =
| BodyType<InframonitoringtypesPostableStatefulSetsDTO>
| undefined;
export type ListStatefulSetsMutationError = ErrorType<RenderErrorResponseDTO>;
export type ListStatefulSetsMutationVariables = {
data?: BodyType<InframonitoringtypesPostableStatefulSetsDTO>;
};
/**
* @summary List StatefulSets for Infra Monitoring
@@ -1135,13 +1057,13 @@ export const useListStatefulSets = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof listStatefulSets>>,
TError,
ListStatefulSetsMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableStatefulSetsDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof listStatefulSets>>,
TError,
ListStatefulSetsMutationVariables,
{ data?: BodyType<InframonitoringtypesPostableStatefulSetsDTO> },
TContext
> => {
return useMutation(getListStatefulSetsMutationOptions(options));

View File

@@ -17,23 +17,17 @@ import type {
UseQueryResult,
} from 'react-query';
import type { ActivateLicense201 } from '../sigNoz.schemas/activateLicense201';
import type { DeleteLicensePathParameters } from '../sigNoz.schemas/deleteLicensePathParameters';
import type { GetActiveLicense200 } from '../sigNoz.schemas/getActiveLicense200';
import type { GetLicense200 } from '../sigNoz.schemas/getLicense200';
import type { GetLicensePathParameters } from '../sigNoz.schemas/getLicensePathParameters';
import type { LicensetypesPostableLicenseDTO } from '../sigNoz.schemas/licensetypesPostableLicenseDTO';
import type { ListLicenses200 } from '../sigNoz.schemas/listLicenses200';
import type { RefreshLicensePathParameters } from '../sigNoz.schemas/refreshLicensePathParameters';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type {
ActivateLicense201,
DeleteLicensePathParameters,
GetActiveLicense200,
GetLicense200,
GetLicensePathParameters,
LicensetypesPostableLicenseDTO,
ListLicenses200,
RefreshLicensePathParameters,
RenderErrorResponseDTO,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
@@ -76,9 +70,6 @@ export const activateLicenseDeprecated = (
});
};
export const getActivateLicenseDeprecatedMutationKey = () =>
['activateLicenseDeprecated'] as const;
export const getActivateLicenseDeprecatedMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -86,16 +77,16 @@ export const getActivateLicenseDeprecatedMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof activateLicenseDeprecated>>,
TError,
ActivateLicenseDeprecatedMutationVariables,
{ data?: BodyType<LicensetypesPostableLicenseDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof activateLicenseDeprecated>>,
TError,
ActivateLicenseDeprecatedMutationVariables,
{ data?: BodyType<LicensetypesPostableLicenseDTO> },
TContext
> => {
const mutationKey = getActivateLicenseDeprecatedMutationKey();
const mutationKey = ['activateLicenseDeprecated'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -106,7 +97,7 @@ export const getActivateLicenseDeprecatedMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof activateLicenseDeprecated>>,
ActivateLicenseDeprecatedMutationVariables
{ data?: BodyType<LicensetypesPostableLicenseDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -124,9 +115,6 @@ export type ActivateLicenseDeprecatedMutationBody =
| undefined;
export type ActivateLicenseDeprecatedMutationError =
ErrorType<RenderErrorResponseDTO>;
export type ActivateLicenseDeprecatedMutationVariables = {
data?: BodyType<LicensetypesPostableLicenseDTO>;
};
/**
* @deprecated
@@ -139,13 +127,13 @@ export const useActivateLicenseDeprecated = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof activateLicenseDeprecated>>,
TError,
ActivateLicenseDeprecatedMutationVariables,
{ data?: BodyType<LicensetypesPostableLicenseDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof activateLicenseDeprecated>>,
TError,
ActivateLicenseDeprecatedMutationVariables,
{ data?: BodyType<LicensetypesPostableLicenseDTO> },
TContext
> => {
return useMutation(getActivateLicenseDeprecatedMutationOptions(options));
@@ -163,9 +151,6 @@ export const refreshLicenseDeprecated = (signal?: AbortSignal) => {
});
};
export const getRefreshLicenseDeprecatedMutationKey = () =>
['refreshLicenseDeprecated'] as const;
export const getRefreshLicenseDeprecatedMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -182,7 +167,7 @@ export const getRefreshLicenseDeprecatedMutationOptions = <
void,
TContext
> => {
const mutationKey = getRefreshLicenseDeprecatedMutationKey();
const mutationKey = ['refreshLicenseDeprecated'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -300,7 +285,7 @@ export function useListLicenses<
}
/**
* @summary Invalidates the {@link useListLicenses} query
* @summary List licenses.
*/
export const invalidateListLicenses = async (
queryClient: QueryClient,
@@ -331,8 +316,6 @@ export const activateLicense = (
});
};
export const getActivateLicenseMutationKey = () => ['activateLicense'] as const;
export const getActivateLicenseMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -340,16 +323,16 @@ export const getActivateLicenseMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof activateLicense>>,
TError,
ActivateLicenseMutationVariables,
{ data?: BodyType<LicensetypesPostableLicenseDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof activateLicense>>,
TError,
ActivateLicenseMutationVariables,
{ data?: BodyType<LicensetypesPostableLicenseDTO> },
TContext
> => {
const mutationKey = getActivateLicenseMutationKey();
const mutationKey = ['activateLicense'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -360,7 +343,7 @@ export const getActivateLicenseMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof activateLicense>>,
ActivateLicenseMutationVariables
{ data?: BodyType<LicensetypesPostableLicenseDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -377,9 +360,6 @@ export type ActivateLicenseMutationBody =
| BodyType<LicensetypesPostableLicenseDTO>
| undefined;
export type ActivateLicenseMutationError = ErrorType<RenderErrorResponseDTO>;
export type ActivateLicenseMutationVariables = {
data?: BodyType<LicensetypesPostableLicenseDTO>;
};
/**
* @summary Activate a license.
@@ -391,13 +371,13 @@ export const useActivateLicense = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof activateLicense>>,
TError,
ActivateLicenseMutationVariables,
{ data?: BodyType<LicensetypesPostableLicenseDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof activateLicense>>,
TError,
ActivateLicenseMutationVariables,
{ data?: BodyType<LicensetypesPostableLicenseDTO> },
TContext
> => {
return useMutation(getActivateLicenseMutationOptions(options));
@@ -417,8 +397,6 @@ export const deleteLicense = (
});
};
export const getDeleteLicenseMutationKey = () => ['deleteLicense'] as const;
export const getDeleteLicenseMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -426,16 +404,16 @@ export const getDeleteLicenseMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteLicense>>,
TError,
DeleteLicenseMutationVariables,
{ pathParams: DeleteLicensePathParameters },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof deleteLicense>>,
TError,
DeleteLicenseMutationVariables,
{ pathParams: DeleteLicensePathParameters },
TContext
> => {
const mutationKey = getDeleteLicenseMutationKey();
const mutationKey = ['deleteLicense'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -446,7 +424,7 @@ export const getDeleteLicenseMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof deleteLicense>>,
DeleteLicenseMutationVariables
{ pathParams: DeleteLicensePathParameters }
> = (props) => {
const { pathParams } = props ?? {};
@@ -461,9 +439,6 @@ export type DeleteLicenseMutationResult = NonNullable<
>;
export type DeleteLicenseMutationError = ErrorType<RenderErrorResponseDTO>;
export type DeleteLicenseMutationVariables = {
pathParams: DeleteLicensePathParameters;
};
/**
* @summary Delete a license.
@@ -475,13 +450,13 @@ export const useDeleteLicense = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteLicense>>,
TError,
DeleteLicenseMutationVariables,
{ pathParams: DeleteLicensePathParameters },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof deleteLicense>>,
TError,
DeleteLicenseMutationVariables,
{ pathParams: DeleteLicensePathParameters },
TContext
> => {
return useMutation(getDeleteLicenseMutationOptions(options));
@@ -568,7 +543,7 @@ export function useGetLicense<
}
/**
* @summary Invalidates the {@link useGetLicense} query
* @summary Get a license.
*/
export const invalidateGetLicense = async (
queryClient: QueryClient,
@@ -598,8 +573,6 @@ export const refreshLicense = (
});
};
export const getRefreshLicenseMutationKey = () => ['refreshLicense'] as const;
export const getRefreshLicenseMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -607,16 +580,16 @@ export const getRefreshLicenseMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof refreshLicense>>,
TError,
RefreshLicenseMutationVariables,
{ pathParams: RefreshLicensePathParameters },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof refreshLicense>>,
TError,
RefreshLicenseMutationVariables,
{ pathParams: RefreshLicensePathParameters },
TContext
> => {
const mutationKey = getRefreshLicenseMutationKey();
const mutationKey = ['refreshLicense'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -627,7 +600,7 @@ export const getRefreshLicenseMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof refreshLicense>>,
RefreshLicenseMutationVariables
{ pathParams: RefreshLicensePathParameters }
> = (props) => {
const { pathParams } = props ?? {};
@@ -642,9 +615,6 @@ export type RefreshLicenseMutationResult = NonNullable<
>;
export type RefreshLicenseMutationError = ErrorType<RenderErrorResponseDTO>;
export type RefreshLicenseMutationVariables = {
pathParams: RefreshLicensePathParameters;
};
/**
* @summary Refresh a license.
@@ -656,13 +626,13 @@ export const useRefreshLicense = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof refreshLicense>>,
TError,
RefreshLicenseMutationVariables,
{ pathParams: RefreshLicensePathParameters },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof refreshLicense>>,
TError,
RefreshLicenseMutationVariables,
{ pathParams: RefreshLicensePathParameters },
TContext
> => {
return useMutation(getRefreshLicenseMutationOptions(options));
@@ -737,7 +707,7 @@ export function useGetActiveLicense<
}
/**
* @summary Invalidates the {@link useGetActiveLicense} query
* @summary Get the active license.
*/
export const invalidateGetActiveLicense = async (
queryClient: QueryClient,

View File

@@ -17,21 +17,16 @@ import type {
UseQueryResult,
} from 'react-query';
import type { DeleteLLMPricingRulePathParameters } from '../sigNoz.schemas/deleteLLMPricingRulePathParameters';
import type { GetLLMPricingRule200 } from '../sigNoz.schemas/getLLMPricingRule200';
import type { GetLLMPricingRulePathParameters } from '../sigNoz.schemas/getLLMPricingRulePathParameters';
import type { ListLLMPricingRules200 } from '../sigNoz.schemas/listLLMPricingRules200';
import type { ListLLMPricingRulesParams } from '../sigNoz.schemas/listLLMPricingRulesParams';
import type { ListUnmappedLLMModels200 } from '../sigNoz.schemas/listUnmappedLLMModels200';
import type { LlmpricingruletypesUpdatableLLMPricingRulesDTO } from '../sigNoz.schemas/llmpricingruletypesUpdatableLLMPricingRulesDTO';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type {
DeleteLLMPricingRulePathParameters,
GetLLMPricingRule200,
GetLLMPricingRulePathParameters,
ListLLMPricingRules200,
ListLLMPricingRulesParams,
ListUnmappedLLMModels200,
LlmpricingruletypesUpdatableLLMPricingRulesDTO,
RenderErrorResponseDTO,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
@@ -139,7 +134,7 @@ export function useListLLMPricingRules<
}
/**
* @summary Invalidates the {@link useListLLMPricingRules} query
* @summary List pricing rules
*/
export const invalidateListLLMPricingRules = async (
queryClient: QueryClient,
@@ -171,9 +166,6 @@ export const createOrUpdateLLMPricingRules = (
});
};
export const getCreateOrUpdateLLMPricingRulesMutationKey = () =>
['createOrUpdateLLMPricingRules'] as const;
export const getCreateOrUpdateLLMPricingRulesMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -181,16 +173,16 @@ export const getCreateOrUpdateLLMPricingRulesMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createOrUpdateLLMPricingRules>>,
TError,
CreateOrUpdateLLMPricingRulesMutationVariables,
{ data?: BodyType<LlmpricingruletypesUpdatableLLMPricingRulesDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createOrUpdateLLMPricingRules>>,
TError,
CreateOrUpdateLLMPricingRulesMutationVariables,
{ data?: BodyType<LlmpricingruletypesUpdatableLLMPricingRulesDTO> },
TContext
> => {
const mutationKey = getCreateOrUpdateLLMPricingRulesMutationKey();
const mutationKey = ['createOrUpdateLLMPricingRules'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -201,7 +193,7 @@ export const getCreateOrUpdateLLMPricingRulesMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createOrUpdateLLMPricingRules>>,
CreateOrUpdateLLMPricingRulesMutationVariables
{ data?: BodyType<LlmpricingruletypesUpdatableLLMPricingRulesDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -219,9 +211,6 @@ export type CreateOrUpdateLLMPricingRulesMutationBody =
| undefined;
export type CreateOrUpdateLLMPricingRulesMutationError =
ErrorType<RenderErrorResponseDTO>;
export type CreateOrUpdateLLMPricingRulesMutationVariables = {
data?: BodyType<LlmpricingruletypesUpdatableLLMPricingRulesDTO>;
};
/**
* @summary Create or update pricing rules
@@ -233,13 +222,13 @@ export const useCreateOrUpdateLLMPricingRules = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createOrUpdateLLMPricingRules>>,
TError,
CreateOrUpdateLLMPricingRulesMutationVariables,
{ data?: BodyType<LlmpricingruletypesUpdatableLLMPricingRulesDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createOrUpdateLLMPricingRules>>,
TError,
CreateOrUpdateLLMPricingRulesMutationVariables,
{ data?: BodyType<LlmpricingruletypesUpdatableLLMPricingRulesDTO> },
TContext
> => {
return useMutation(getCreateOrUpdateLLMPricingRulesMutationOptions(options));
@@ -259,9 +248,6 @@ export const deleteLLMPricingRule = (
});
};
export const getDeleteLLMPricingRuleMutationKey = () =>
['deleteLLMPricingRule'] as const;
export const getDeleteLLMPricingRuleMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -269,16 +255,16 @@ export const getDeleteLLMPricingRuleMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteLLMPricingRule>>,
TError,
DeleteLLMPricingRuleMutationVariables,
{ pathParams: DeleteLLMPricingRulePathParameters },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof deleteLLMPricingRule>>,
TError,
DeleteLLMPricingRuleMutationVariables,
{ pathParams: DeleteLLMPricingRulePathParameters },
TContext
> => {
const mutationKey = getDeleteLLMPricingRuleMutationKey();
const mutationKey = ['deleteLLMPricingRule'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -289,7 +275,7 @@ export const getDeleteLLMPricingRuleMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof deleteLLMPricingRule>>,
DeleteLLMPricingRuleMutationVariables
{ pathParams: DeleteLLMPricingRulePathParameters }
> = (props) => {
const { pathParams } = props ?? {};
@@ -305,9 +291,6 @@ export type DeleteLLMPricingRuleMutationResult = NonNullable<
export type DeleteLLMPricingRuleMutationError =
ErrorType<RenderErrorResponseDTO>;
export type DeleteLLMPricingRuleMutationVariables = {
pathParams: DeleteLLMPricingRulePathParameters;
};
/**
* @summary Delete a pricing rule
@@ -319,13 +302,13 @@ export const useDeleteLLMPricingRule = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteLLMPricingRule>>,
TError,
DeleteLLMPricingRuleMutationVariables,
{ pathParams: DeleteLLMPricingRulePathParameters },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof deleteLLMPricingRule>>,
TError,
DeleteLLMPricingRuleMutationVariables,
{ pathParams: DeleteLLMPricingRulePathParameters },
TContext
> => {
return useMutation(getDeleteLLMPricingRuleMutationOptions(options));
@@ -417,7 +400,7 @@ export function useGetLLMPricingRule<
}
/**
* @summary Invalidates the {@link useGetLLMPricingRule} query
* @summary Get a pricing rule
*/
export const invalidateGetLLMPricingRule = async (
queryClient: QueryClient,
@@ -502,7 +485,7 @@ export function useListUnmappedLLMModels<
}
/**
* @summary Invalidates the {@link useListUnmappedLLMModels} query
* @summary List unmapped models
*/
export const invalidateListUnmappedLLMModels = async (
queryClient: QueryClient,

View File

@@ -11,11 +11,11 @@ import type {
UseMutationResult,
} from 'react-query';
import type { HandleExportRawDataPOSTParams } from '../sigNoz.schemas/handleExportRawDataPOSTParams';
import type { Querybuildertypesv5QueryRangeRequestDTO } from '../sigNoz.schemas/querybuildertypesv5QueryRangeRequestDTO';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type {
HandleExportRawDataPOSTParams,
Querybuildertypesv5QueryRangeRequestDTO,
RenderErrorResponseDTO,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
@@ -39,9 +39,6 @@ export const handleExportRawDataPOST = (
});
};
export const getHandleExportRawDataPOSTMutationKey = () =>
['handleExportRawDataPOST'] as const;
export const getHandleExportRawDataPOSTMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -49,16 +46,22 @@ export const getHandleExportRawDataPOSTMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof handleExportRawDataPOST>>,
TError,
HandleExportRawDataPOSTMutationVariables,
{
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
params?: HandleExportRawDataPOSTParams;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof handleExportRawDataPOST>>,
TError,
HandleExportRawDataPOSTMutationVariables,
{
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
params?: HandleExportRawDataPOSTParams;
},
TContext
> => {
const mutationKey = getHandleExportRawDataPOSTMutationKey();
const mutationKey = ['handleExportRawDataPOST'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -69,7 +72,10 @@ export const getHandleExportRawDataPOSTMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof handleExportRawDataPOST>>,
HandleExportRawDataPOSTMutationVariables
{
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
params?: HandleExportRawDataPOSTParams;
}
> = (props) => {
const { data, params } = props ?? {};
@@ -87,10 +93,6 @@ export type HandleExportRawDataPOSTMutationBody =
| undefined;
export type HandleExportRawDataPOSTMutationError =
ErrorType<RenderErrorResponseDTO>;
export type HandleExportRawDataPOSTMutationVariables = {
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
params?: HandleExportRawDataPOSTParams;
};
/**
* @summary Export raw data
@@ -102,13 +104,19 @@ export const useHandleExportRawDataPOST = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof handleExportRawDataPOST>>,
TError,
HandleExportRawDataPOSTMutationVariables,
{
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
params?: HandleExportRawDataPOSTParams;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof handleExportRawDataPOST>>,
TError,
HandleExportRawDataPOSTMutationVariables,
{
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
params?: HandleExportRawDataPOSTParams;
},
TContext
> => {
return useMutation(getHandleExportRawDataPOSTMutationOptions(options));

View File

@@ -17,75 +17,43 @@ import type {
UseQueryResult,
} from 'react-query';
import type { CreateMetricReductionRule201 } from '../sigNoz.schemas/createMetricReductionRule201';
import type { DeleteMetricReductionRuleByIDPathParameters } from '../sigNoz.schemas/deleteMetricReductionRuleByIDPathParameters';
import type { GetMetricAlerts200 } from '../sigNoz.schemas/getMetricAlerts200';
import type { GetMetricAlertsParams } from '../sigNoz.schemas/getMetricAlertsParams';
import type { GetMetricAttributes200 } from '../sigNoz.schemas/getMetricAttributes200';
import type { GetMetricAttributesParams } from '../sigNoz.schemas/getMetricAttributesParams';
import type { GetMetricDashboardsV2200 } from '../sigNoz.schemas/getMetricDashboardsV2200';
import type { GetMetricDashboardsV2Params } from '../sigNoz.schemas/getMetricDashboardsV2Params';
import type { GetMetricHighlights200 } from '../sigNoz.schemas/getMetricHighlights200';
import type { GetMetricHighlightsParams } from '../sigNoz.schemas/getMetricHighlightsParams';
import type { GetMetricMetadata200 } from '../sigNoz.schemas/getMetricMetadata200';
import type { GetMetricMetadataParams } from '../sigNoz.schemas/getMetricMetadataParams';
import type { GetMetricReductionRuleByID200 } from '../sigNoz.schemas/getMetricReductionRuleByID200';
import type { GetMetricReductionRuleByIDPathParameters } from '../sigNoz.schemas/getMetricReductionRuleByIDPathParameters';
import type { GetMetricReductionRuleStats200 } from '../sigNoz.schemas/getMetricReductionRuleStats200';
import type { GetMetricReductionRuleTimeseries200 } from '../sigNoz.schemas/getMetricReductionRuleTimeseries200';
import type { GetMetricsOnboardingStatus200 } from '../sigNoz.schemas/getMetricsOnboardingStatus200';
import type { GetMetricsStats200 } from '../sigNoz.schemas/getMetricsStats200';
import type { GetMetricsTreemap200 } from '../sigNoz.schemas/getMetricsTreemap200';
import type { InspectMetrics200 } from '../sigNoz.schemas/inspectMetrics200';
import type { ListMetricReductionRules200 } from '../sigNoz.schemas/listMetricReductionRules200';
import type { ListMetricReductionRulesParams } from '../sigNoz.schemas/listMetricReductionRulesParams';
import type { ListMetrics200 } from '../sigNoz.schemas/listMetrics200';
import type { ListMetricsParams } from '../sigNoz.schemas/listMetricsParams';
import type { MetricreductionruletypesPostableReductionRuleDTO } from '../sigNoz.schemas/metricreductionruletypesPostableReductionRuleDTO';
import type { MetricreductionruletypesPostableReductionRulePreviewDTO } from '../sigNoz.schemas/metricreductionruletypesPostableReductionRulePreviewDTO';
import type { MetricreductionruletypesUpdatableReductionRuleDTO } from '../sigNoz.schemas/metricreductionruletypesUpdatableReductionRuleDTO';
import type { MetricsexplorertypesInspectMetricsRequestDTO } from '../sigNoz.schemas/metricsexplorertypesInspectMetricsRequestDTO';
import type { MetricsexplorertypesStatsRequestDTO } from '../sigNoz.schemas/metricsexplorertypesStatsRequestDTO';
import type { MetricsexplorertypesTreemapRequestDTO } from '../sigNoz.schemas/metricsexplorertypesTreemapRequestDTO';
import type { MetricsexplorertypesUpdateMetricMetadataRequestDTO } from '../sigNoz.schemas/metricsexplorertypesUpdateMetricMetadataRequestDTO';
import type { PreviewMetricReductionRule200 } from '../sigNoz.schemas/previewMetricReductionRule200';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type { UpdateMetricReductionRuleByID200 } from '../sigNoz.schemas/updateMetricReductionRuleByID200';
import type { UpdateMetricReductionRuleByIDPathParameters } from '../sigNoz.schemas/updateMetricReductionRuleByIDPathParameters';
import type {
CreateMetricReductionRule201,
DeleteMetricReductionRuleByIDPathParameters,
GetMetricAlerts200,
GetMetricAlertsParams,
GetMetricAttributes200,
GetMetricAttributesParams,
GetMetricDashboardsV2200,
GetMetricDashboardsV2Params,
GetMetricHighlights200,
GetMetricHighlightsParams,
GetMetricMetadata200,
GetMetricMetadataParams,
GetMetricReductionRuleByID200,
GetMetricReductionRuleByIDPathParameters,
GetMetricReductionRuleStats200,
GetMetricReductionRuleTimeseries200,
GetMetricsOnboardingStatus200,
GetMetricsStats200,
GetMetricsTreemap200,
InspectMetrics200,
ListMetricReductionRules200,
ListMetricReductionRulesParams,
ListMetrics200,
ListMetricsParams,
MetricreductionruletypesPostableReductionRuleDTO,
MetricreductionruletypesPostableReductionRulePreviewDTO,
MetricreductionruletypesUpdatableReductionRuleDTO,
MetricsexplorertypesInspectMetricsRequestDTO,
MetricsexplorertypesStatsRequestDTO,
MetricsexplorertypesTreemapRequestDTO,
MetricsexplorertypesUpdateMetricMetadataRequestDTO,
PreviewMetricReductionRule200,
RenderErrorResponseDTO,
UpdateMetricReductionRuleByID200,
UpdateMetricReductionRuleByIDPathParameters,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
@@ -197,7 +165,7 @@ export function useListMetricReductionRules<
}
/**
* @summary Invalidates the {@link useListMetricReductionRules} query
* @summary List metric reduction rules
*/
export const invalidateListMetricReductionRules = async (
queryClient: QueryClient,
@@ -229,9 +197,6 @@ export const createMetricReductionRule = (
});
};
export const getCreateMetricReductionRuleMutationKey = () =>
['createMetricReductionRule'] as const;
export const getCreateMetricReductionRuleMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -239,16 +204,16 @@ export const getCreateMetricReductionRuleMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createMetricReductionRule>>,
TError,
CreateMetricReductionRuleMutationVariables,
{ data?: BodyType<MetricreductionruletypesPostableReductionRuleDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createMetricReductionRule>>,
TError,
CreateMetricReductionRuleMutationVariables,
{ data?: BodyType<MetricreductionruletypesPostableReductionRuleDTO> },
TContext
> => {
const mutationKey = getCreateMetricReductionRuleMutationKey();
const mutationKey = ['createMetricReductionRule'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -259,7 +224,7 @@ export const getCreateMetricReductionRuleMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createMetricReductionRule>>,
CreateMetricReductionRuleMutationVariables
{ data?: BodyType<MetricreductionruletypesPostableReductionRuleDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -277,9 +242,6 @@ export type CreateMetricReductionRuleMutationBody =
| undefined;
export type CreateMetricReductionRuleMutationError =
ErrorType<RenderErrorResponseDTO>;
export type CreateMetricReductionRuleMutationVariables = {
data?: BodyType<MetricreductionruletypesPostableReductionRuleDTO>;
};
/**
* @summary Create a metric reduction rule
@@ -291,13 +253,13 @@ export const useCreateMetricReductionRule = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createMetricReductionRule>>,
TError,
CreateMetricReductionRuleMutationVariables,
{ data?: BodyType<MetricreductionruletypesPostableReductionRuleDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createMetricReductionRule>>,
TError,
CreateMetricReductionRuleMutationVariables,
{ data?: BodyType<MetricreductionruletypesPostableReductionRuleDTO> },
TContext
> => {
return useMutation(getCreateMetricReductionRuleMutationOptions(options));
@@ -317,9 +279,6 @@ export const deleteMetricReductionRuleByID = (
});
};
export const getDeleteMetricReductionRuleByIDMutationKey = () =>
['deleteMetricReductionRuleByID'] as const;
export const getDeleteMetricReductionRuleByIDMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -327,16 +286,16 @@ export const getDeleteMetricReductionRuleByIDMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteMetricReductionRuleByID>>,
TError,
DeleteMetricReductionRuleByIDMutationVariables,
{ pathParams: DeleteMetricReductionRuleByIDPathParameters },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof deleteMetricReductionRuleByID>>,
TError,
DeleteMetricReductionRuleByIDMutationVariables,
{ pathParams: DeleteMetricReductionRuleByIDPathParameters },
TContext
> => {
const mutationKey = getDeleteMetricReductionRuleByIDMutationKey();
const mutationKey = ['deleteMetricReductionRuleByID'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -347,7 +306,7 @@ export const getDeleteMetricReductionRuleByIDMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof deleteMetricReductionRuleByID>>,
DeleteMetricReductionRuleByIDMutationVariables
{ pathParams: DeleteMetricReductionRuleByIDPathParameters }
> = (props) => {
const { pathParams } = props ?? {};
@@ -363,9 +322,6 @@ export type DeleteMetricReductionRuleByIDMutationResult = NonNullable<
export type DeleteMetricReductionRuleByIDMutationError =
ErrorType<RenderErrorResponseDTO>;
export type DeleteMetricReductionRuleByIDMutationVariables = {
pathParams: DeleteMetricReductionRuleByIDPathParameters;
};
/**
* @summary Delete a metric reduction rule by id
@@ -377,13 +333,13 @@ export const useDeleteMetricReductionRuleByID = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteMetricReductionRuleByID>>,
TError,
DeleteMetricReductionRuleByIDMutationVariables,
{ pathParams: DeleteMetricReductionRuleByIDPathParameters },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof deleteMetricReductionRuleByID>>,
TError,
DeleteMetricReductionRuleByIDMutationVariables,
{ pathParams: DeleteMetricReductionRuleByIDPathParameters },
TContext
> => {
return useMutation(getDeleteMetricReductionRuleByIDMutationOptions(options));
@@ -479,7 +435,7 @@ export function useGetMetricReductionRuleByID<
}
/**
* @summary Invalidates the {@link useGetMetricReductionRuleByID} query
* @summary Get a metric reduction rule by id
*/
export const invalidateGetMetricReductionRuleByID = async (
queryClient: QueryClient,
@@ -512,9 +468,6 @@ export const updateMetricReductionRuleByID = (
});
};
export const getUpdateMetricReductionRuleByIDMutationKey = () =>
['updateMetricReductionRuleByID'] as const;
export const getUpdateMetricReductionRuleByIDMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -522,16 +475,22 @@ export const getUpdateMetricReductionRuleByIDMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateMetricReductionRuleByID>>,
TError,
UpdateMetricReductionRuleByIDMutationVariables,
{
pathParams: UpdateMetricReductionRuleByIDPathParameters;
data?: BodyType<MetricreductionruletypesUpdatableReductionRuleDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateMetricReductionRuleByID>>,
TError,
UpdateMetricReductionRuleByIDMutationVariables,
{
pathParams: UpdateMetricReductionRuleByIDPathParameters;
data?: BodyType<MetricreductionruletypesUpdatableReductionRuleDTO>;
},
TContext
> => {
const mutationKey = getUpdateMetricReductionRuleByIDMutationKey();
const mutationKey = ['updateMetricReductionRuleByID'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -542,7 +501,10 @@ export const getUpdateMetricReductionRuleByIDMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateMetricReductionRuleByID>>,
UpdateMetricReductionRuleByIDMutationVariables
{
pathParams: UpdateMetricReductionRuleByIDPathParameters;
data?: BodyType<MetricreductionruletypesUpdatableReductionRuleDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -560,10 +522,6 @@ export type UpdateMetricReductionRuleByIDMutationBody =
| undefined;
export type UpdateMetricReductionRuleByIDMutationError =
ErrorType<RenderErrorResponseDTO>;
export type UpdateMetricReductionRuleByIDMutationVariables = {
pathParams: UpdateMetricReductionRuleByIDPathParameters;
data?: BodyType<MetricreductionruletypesUpdatableReductionRuleDTO>;
};
/**
* @summary Update a metric reduction rule by id
@@ -575,13 +533,19 @@ export const useUpdateMetricReductionRuleByID = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateMetricReductionRuleByID>>,
TError,
UpdateMetricReductionRuleByIDMutationVariables,
{
pathParams: UpdateMetricReductionRuleByIDPathParameters;
data?: BodyType<MetricreductionruletypesUpdatableReductionRuleDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateMetricReductionRuleByID>>,
TError,
UpdateMetricReductionRuleByIDMutationVariables,
{
pathParams: UpdateMetricReductionRuleByIDPathParameters;
data?: BodyType<MetricreductionruletypesUpdatableReductionRuleDTO>;
},
TContext
> => {
return useMutation(getUpdateMetricReductionRuleByIDMutationOptions(options));
@@ -603,9 +567,6 @@ export const previewMetricReductionRule = (
});
};
export const getPreviewMetricReductionRuleMutationKey = () =>
['previewMetricReductionRule'] as const;
export const getPreviewMetricReductionRuleMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -613,16 +574,16 @@ export const getPreviewMetricReductionRuleMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof previewMetricReductionRule>>,
TError,
PreviewMetricReductionRuleMutationVariables,
{ data?: BodyType<MetricreductionruletypesPostableReductionRulePreviewDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof previewMetricReductionRule>>,
TError,
PreviewMetricReductionRuleMutationVariables,
{ data?: BodyType<MetricreductionruletypesPostableReductionRulePreviewDTO> },
TContext
> => {
const mutationKey = getPreviewMetricReductionRuleMutationKey();
const mutationKey = ['previewMetricReductionRule'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -633,7 +594,7 @@ export const getPreviewMetricReductionRuleMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof previewMetricReductionRule>>,
PreviewMetricReductionRuleMutationVariables
{ data?: BodyType<MetricreductionruletypesPostableReductionRulePreviewDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -651,9 +612,6 @@ export type PreviewMetricReductionRuleMutationBody =
| undefined;
export type PreviewMetricReductionRuleMutationError =
ErrorType<RenderErrorResponseDTO>;
export type PreviewMetricReductionRuleMutationVariables = {
data?: BodyType<MetricreductionruletypesPostableReductionRulePreviewDTO>;
};
/**
* @summary Preview a metric reduction rule
@@ -665,13 +623,13 @@ export const usePreviewMetricReductionRule = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof previewMetricReductionRule>>,
TError,
PreviewMetricReductionRuleMutationVariables,
{ data?: BodyType<MetricreductionruletypesPostableReductionRulePreviewDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof previewMetricReductionRule>>,
TError,
PreviewMetricReductionRuleMutationVariables,
{ data?: BodyType<MetricreductionruletypesPostableReductionRulePreviewDTO> },
TContext
> => {
return useMutation(getPreviewMetricReductionRuleMutationOptions(options));
@@ -748,7 +706,7 @@ export function useGetMetricReductionRuleStats<
}
/**
* @summary Invalidates the {@link useGetMetricReductionRuleStats} query
* @summary Metric reduction stats
*/
export const invalidateGetMetricReductionRuleStats = async (
queryClient: QueryClient,
@@ -834,7 +792,7 @@ export function useGetMetricReductionRuleTimeseries<
}
/**
* @summary Invalidates the {@link useGetMetricReductionRuleTimeseries} query
* @summary Metric reduction volume over time
*/
export const invalidateGetMetricReductionRuleTimeseries = async (
queryClient: QueryClient,
@@ -928,7 +886,7 @@ export function useListMetrics<
}
/**
* @summary Invalidates the {@link useListMetrics} query
* @summary List metric names
*/
export const invalidateListMetrics = async (
queryClient: QueryClient,
@@ -1023,7 +981,7 @@ export function useGetMetricAlerts<
}
/**
* @summary Invalidates the {@link useGetMetricAlerts} query
* @summary Get metric alerts
*/
export const invalidateGetMetricAlerts = async (
queryClient: QueryClient,
@@ -1121,7 +1079,7 @@ export function useGetMetricAttributes<
}
/**
* @summary Invalidates the {@link useGetMetricAttributes} query
* @summary Get metric attributes
*/
export const invalidateGetMetricAttributes = async (
queryClient: QueryClient,
@@ -1219,7 +1177,7 @@ export function useGetMetricHighlights<
}
/**
* @summary Invalidates the {@link useGetMetricHighlights} query
* @summary Get metric highlights
*/
export const invalidateGetMetricHighlights = async (
queryClient: QueryClient,
@@ -1251,8 +1209,6 @@ export const inspectMetrics = (
});
};
export const getInspectMetricsMutationKey = () => ['inspectMetrics'] as const;
export const getInspectMetricsMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -1260,16 +1216,16 @@ export const getInspectMetricsMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof inspectMetrics>>,
TError,
InspectMetricsMutationVariables,
{ data?: BodyType<MetricsexplorertypesInspectMetricsRequestDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof inspectMetrics>>,
TError,
InspectMetricsMutationVariables,
{ data?: BodyType<MetricsexplorertypesInspectMetricsRequestDTO> },
TContext
> => {
const mutationKey = getInspectMetricsMutationKey();
const mutationKey = ['inspectMetrics'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -1280,7 +1236,7 @@ export const getInspectMetricsMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof inspectMetrics>>,
InspectMetricsMutationVariables
{ data?: BodyType<MetricsexplorertypesInspectMetricsRequestDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -1297,9 +1253,6 @@ export type InspectMetricsMutationBody =
| BodyType<MetricsexplorertypesInspectMetricsRequestDTO>
| undefined;
export type InspectMetricsMutationError = ErrorType<RenderErrorResponseDTO>;
export type InspectMetricsMutationVariables = {
data?: BodyType<MetricsexplorertypesInspectMetricsRequestDTO>;
};
/**
* @summary Inspect raw metric data points
@@ -1311,13 +1264,13 @@ export const useInspectMetrics = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof inspectMetrics>>,
TError,
InspectMetricsMutationVariables,
{ data?: BodyType<MetricsexplorertypesInspectMetricsRequestDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof inspectMetrics>>,
TError,
InspectMetricsMutationVariables,
{ data?: BodyType<MetricsexplorertypesInspectMetricsRequestDTO> },
TContext
> => {
return useMutation(getInspectMetricsMutationOptions(options));
@@ -1405,7 +1358,7 @@ export function useGetMetricMetadata<
}
/**
* @summary Invalidates the {@link useGetMetricMetadata} query
* @summary Get metric metadata
*/
export const invalidateGetMetricMetadata = async (
queryClient: QueryClient,
@@ -1437,9 +1390,6 @@ export const updateMetricMetadata = (
});
};
export const getUpdateMetricMetadataMutationKey = () =>
['updateMetricMetadata'] as const;
export const getUpdateMetricMetadataMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -1447,16 +1397,16 @@ export const getUpdateMetricMetadataMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateMetricMetadata>>,
TError,
UpdateMetricMetadataMutationVariables,
{ data?: BodyType<MetricsexplorertypesUpdateMetricMetadataRequestDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateMetricMetadata>>,
TError,
UpdateMetricMetadataMutationVariables,
{ data?: BodyType<MetricsexplorertypesUpdateMetricMetadataRequestDTO> },
TContext
> => {
const mutationKey = getUpdateMetricMetadataMutationKey();
const mutationKey = ['updateMetricMetadata'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -1467,7 +1417,7 @@ export const getUpdateMetricMetadataMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateMetricMetadata>>,
UpdateMetricMetadataMutationVariables
{ data?: BodyType<MetricsexplorertypesUpdateMetricMetadataRequestDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -1485,9 +1435,6 @@ export type UpdateMetricMetadataMutationBody =
| undefined;
export type UpdateMetricMetadataMutationError =
ErrorType<RenderErrorResponseDTO>;
export type UpdateMetricMetadataMutationVariables = {
data?: BodyType<MetricsexplorertypesUpdateMetricMetadataRequestDTO>;
};
/**
* @summary Update metric metadata
@@ -1499,13 +1446,13 @@ export const useUpdateMetricMetadata = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateMetricMetadata>>,
TError,
UpdateMetricMetadataMutationVariables,
{ data?: BodyType<MetricsexplorertypesUpdateMetricMetadataRequestDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateMetricMetadata>>,
TError,
UpdateMetricMetadataMutationVariables,
{ data?: BodyType<MetricsexplorertypesUpdateMetricMetadataRequestDTO> },
TContext
> => {
return useMutation(getUpdateMetricMetadataMutationOptions(options));
@@ -1582,7 +1529,7 @@ export function useGetMetricsOnboardingStatus<
}
/**
* @summary Invalidates the {@link useGetMetricsOnboardingStatus} query
* @summary Check if non-SigNoz metrics have been received
*/
export const invalidateGetMetricsOnboardingStatus = async (
queryClient: QueryClient,
@@ -1613,8 +1560,6 @@ export const getMetricsStats = (
});
};
export const getGetMetricsStatsMutationKey = () => ['getMetricsStats'] as const;
export const getGetMetricsStatsMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -1622,16 +1567,16 @@ export const getGetMetricsStatsMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof getMetricsStats>>,
TError,
GetMetricsStatsMutationVariables,
{ data?: BodyType<MetricsexplorertypesStatsRequestDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof getMetricsStats>>,
TError,
GetMetricsStatsMutationVariables,
{ data?: BodyType<MetricsexplorertypesStatsRequestDTO> },
TContext
> => {
const mutationKey = getGetMetricsStatsMutationKey();
const mutationKey = ['getMetricsStats'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -1642,7 +1587,7 @@ export const getGetMetricsStatsMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof getMetricsStats>>,
GetMetricsStatsMutationVariables
{ data?: BodyType<MetricsexplorertypesStatsRequestDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -1659,9 +1604,6 @@ export type GetMetricsStatsMutationBody =
| BodyType<MetricsexplorertypesStatsRequestDTO>
| undefined;
export type GetMetricsStatsMutationError = ErrorType<RenderErrorResponseDTO>;
export type GetMetricsStatsMutationVariables = {
data?: BodyType<MetricsexplorertypesStatsRequestDTO>;
};
/**
* @summary Get metrics statistics
@@ -1673,13 +1615,13 @@ export const useGetMetricsStats = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof getMetricsStats>>,
TError,
GetMetricsStatsMutationVariables,
{ data?: BodyType<MetricsexplorertypesStatsRequestDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof getMetricsStats>>,
TError,
GetMetricsStatsMutationVariables,
{ data?: BodyType<MetricsexplorertypesStatsRequestDTO> },
TContext
> => {
return useMutation(getGetMetricsStatsMutationOptions(options));
@@ -1701,9 +1643,6 @@ export const getMetricsTreemap = (
});
};
export const getGetMetricsTreemapMutationKey = () =>
['getMetricsTreemap'] as const;
export const getGetMetricsTreemapMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -1711,16 +1650,16 @@ export const getGetMetricsTreemapMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof getMetricsTreemap>>,
TError,
GetMetricsTreemapMutationVariables,
{ data?: BodyType<MetricsexplorertypesTreemapRequestDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof getMetricsTreemap>>,
TError,
GetMetricsTreemapMutationVariables,
{ data?: BodyType<MetricsexplorertypesTreemapRequestDTO> },
TContext
> => {
const mutationKey = getGetMetricsTreemapMutationKey();
const mutationKey = ['getMetricsTreemap'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -1731,7 +1670,7 @@ export const getGetMetricsTreemapMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof getMetricsTreemap>>,
GetMetricsTreemapMutationVariables
{ data?: BodyType<MetricsexplorertypesTreemapRequestDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -1748,9 +1687,6 @@ export type GetMetricsTreemapMutationBody =
| BodyType<MetricsexplorertypesTreemapRequestDTO>
| undefined;
export type GetMetricsTreemapMutationError = ErrorType<RenderErrorResponseDTO>;
export type GetMetricsTreemapMutationVariables = {
data?: BodyType<MetricsexplorertypesTreemapRequestDTO>;
};
/**
* @summary Get metrics treemap
@@ -1762,13 +1698,13 @@ export const useGetMetricsTreemap = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof getMetricsTreemap>>,
TError,
GetMetricsTreemapMutationVariables,
{ data?: BodyType<MetricsexplorertypesTreemapRequestDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof getMetricsTreemap>>,
TError,
GetMetricsTreemapMutationVariables,
{ data?: BodyType<MetricsexplorertypesTreemapRequestDTO> },
TContext
> => {
return useMutation(getGetMetricsTreemapMutationOptions(options));
@@ -1856,7 +1792,7 @@ export function useGetMetricDashboardsV2<
}
/**
* @summary Invalidates the {@link useGetMetricDashboardsV2} query
* @summary Get metric dashboards (v2)
*/
export const invalidateGetMetricDashboardsV2 = async (
queryClient: QueryClient,

View File

@@ -17,11 +17,11 @@ import type {
UseQueryResult,
} from 'react-query';
import type { GetMyOrganization200 } from '../sigNoz.schemas/getMyOrganization200';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type { TypesOrganizationDTO } from '../sigNoz.schemas/typesOrganizationDTO';
import type {
GetMyOrganization200,
RenderErrorResponseDTO,
TypesOrganizationDTO,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
@@ -116,7 +116,7 @@ export function useGetMyOrganization<
}
/**
* @summary Invalidates the {@link useGetMyOrganization} query
* @summary Get my organization
*/
export const invalidateGetMyOrganization = async (
queryClient: QueryClient,
@@ -147,9 +147,6 @@ export const updateMyOrganization = (
});
};
export const getUpdateMyOrganizationMutationKey = () =>
['updateMyOrganization'] as const;
export const getUpdateMyOrganizationMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -157,16 +154,16 @@ export const getUpdateMyOrganizationMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateMyOrganization>>,
TError,
UpdateMyOrganizationMutationVariables,
{ data?: BodyType<TypesOrganizationDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateMyOrganization>>,
TError,
UpdateMyOrganizationMutationVariables,
{ data?: BodyType<TypesOrganizationDTO> },
TContext
> => {
const mutationKey = getUpdateMyOrganizationMutationKey();
const mutationKey = ['updateMyOrganization'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -177,7 +174,7 @@ export const getUpdateMyOrganizationMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateMyOrganization>>,
UpdateMyOrganizationMutationVariables
{ data?: BodyType<TypesOrganizationDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -195,9 +192,6 @@ export type UpdateMyOrganizationMutationBody =
| undefined;
export type UpdateMyOrganizationMutationError =
ErrorType<RenderErrorResponseDTO>;
export type UpdateMyOrganizationMutationVariables = {
data?: BodyType<TypesOrganizationDTO>;
};
/**
* @summary Update my organization
@@ -209,13 +203,13 @@ export const useUpdateMyOrganization = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateMyOrganization>>,
TError,
UpdateMyOrganizationMutationVariables,
{ data?: BodyType<TypesOrganizationDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateMyOrganization>>,
TError,
UpdateMyOrganizationMutationVariables,
{ data?: BodyType<TypesOrganizationDTO> },
TContext
> => {
return useMutation(getUpdateMyOrganizationMutationOptions(options));

View File

@@ -17,25 +17,18 @@ import type {
UseQueryResult,
} from 'react-query';
import type { GetOrgPreference200 } from '../sigNoz.schemas/getOrgPreference200';
import type { GetOrgPreferencePathParameters } from '../sigNoz.schemas/getOrgPreferencePathParameters';
import type { GetUserPreference200 } from '../sigNoz.schemas/getUserPreference200';
import type { GetUserPreferencePathParameters } from '../sigNoz.schemas/getUserPreferencePathParameters';
import type { ListOrgPreferences200 } from '../sigNoz.schemas/listOrgPreferences200';
import type { ListUserPreferences200 } from '../sigNoz.schemas/listUserPreferences200';
import type { PreferencetypesUpdatablePreferenceDTO } from '../sigNoz.schemas/preferencetypesUpdatablePreferenceDTO';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type { UpdateOrgPreferencePathParameters } from '../sigNoz.schemas/updateOrgPreferencePathParameters';
import type { UpdateUserPreferencePathParameters } from '../sigNoz.schemas/updateUserPreferencePathParameters';
import type {
GetOrgPreference200,
GetOrgPreferencePathParameters,
GetUserPreference200,
GetUserPreferencePathParameters,
ListOrgPreferences200,
ListUserPreferences200,
PreferencetypesUpdatablePreferenceDTO,
RenderErrorResponseDTO,
UpdateOrgPreferencePathParameters,
UpdateUserPreferencePathParameters,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
@@ -130,7 +123,7 @@ export function useListOrgPreferences<
}
/**
* @summary Invalidates the {@link useListOrgPreferences} query
* @summary List org preferences
*/
export const invalidateListOrgPreferences = async (
queryClient: QueryClient,
@@ -231,7 +224,7 @@ export function useGetOrgPreference<
}
/**
* @summary Invalidates the {@link useGetOrgPreference} query
* @summary Get org preference
*/
export const invalidateGetOrgPreference = async (
queryClient: QueryClient,
@@ -264,9 +257,6 @@ export const updateOrgPreference = (
});
};
export const getUpdateOrgPreferenceMutationKey = () =>
['updateOrgPreference'] as const;
export const getUpdateOrgPreferenceMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -274,16 +264,22 @@ export const getUpdateOrgPreferenceMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateOrgPreference>>,
TError,
UpdateOrgPreferenceMutationVariables,
{
pathParams: UpdateOrgPreferencePathParameters;
data?: BodyType<PreferencetypesUpdatablePreferenceDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateOrgPreference>>,
TError,
UpdateOrgPreferenceMutationVariables,
{
pathParams: UpdateOrgPreferencePathParameters;
data?: BodyType<PreferencetypesUpdatablePreferenceDTO>;
},
TContext
> => {
const mutationKey = getUpdateOrgPreferenceMutationKey();
const mutationKey = ['updateOrgPreference'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -294,7 +290,10 @@ export const getUpdateOrgPreferenceMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateOrgPreference>>,
UpdateOrgPreferenceMutationVariables
{
pathParams: UpdateOrgPreferencePathParameters;
data?: BodyType<PreferencetypesUpdatablePreferenceDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -312,10 +311,6 @@ export type UpdateOrgPreferenceMutationBody =
| undefined;
export type UpdateOrgPreferenceMutationError =
ErrorType<RenderErrorResponseDTO>;
export type UpdateOrgPreferenceMutationVariables = {
pathParams: UpdateOrgPreferencePathParameters;
data?: BodyType<PreferencetypesUpdatablePreferenceDTO>;
};
/**
* @summary Update org preference
@@ -327,13 +322,19 @@ export const useUpdateOrgPreference = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateOrgPreference>>,
TError,
UpdateOrgPreferenceMutationVariables,
{
pathParams: UpdateOrgPreferencePathParameters;
data?: BodyType<PreferencetypesUpdatablePreferenceDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateOrgPreference>>,
TError,
UpdateOrgPreferenceMutationVariables,
{
pathParams: UpdateOrgPreferencePathParameters;
data?: BodyType<PreferencetypesUpdatablePreferenceDTO>;
},
TContext
> => {
return useMutation(getUpdateOrgPreferenceMutationOptions(options));
@@ -408,7 +409,7 @@ export function useListUserPreferences<
}
/**
* @summary Invalidates the {@link useListUserPreferences} query
* @summary List user preferences
*/
export const invalidateListUserPreferences = async (
queryClient: QueryClient,
@@ -509,7 +510,7 @@ export function useGetUserPreference<
}
/**
* @summary Invalidates the {@link useGetUserPreference} query
* @summary Get user preference
*/
export const invalidateGetUserPreference = async (
queryClient: QueryClient,
@@ -542,9 +543,6 @@ export const updateUserPreference = (
});
};
export const getUpdateUserPreferenceMutationKey = () =>
['updateUserPreference'] as const;
export const getUpdateUserPreferenceMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -552,16 +550,22 @@ export const getUpdateUserPreferenceMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateUserPreference>>,
TError,
UpdateUserPreferenceMutationVariables,
{
pathParams: UpdateUserPreferencePathParameters;
data?: BodyType<PreferencetypesUpdatablePreferenceDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateUserPreference>>,
TError,
UpdateUserPreferenceMutationVariables,
{
pathParams: UpdateUserPreferencePathParameters;
data?: BodyType<PreferencetypesUpdatablePreferenceDTO>;
},
TContext
> => {
const mutationKey = getUpdateUserPreferenceMutationKey();
const mutationKey = ['updateUserPreference'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -572,7 +576,10 @@ export const getUpdateUserPreferenceMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateUserPreference>>,
UpdateUserPreferenceMutationVariables
{
pathParams: UpdateUserPreferencePathParameters;
data?: BodyType<PreferencetypesUpdatablePreferenceDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -590,10 +597,6 @@ export type UpdateUserPreferenceMutationBody =
| undefined;
export type UpdateUserPreferenceMutationError =
ErrorType<RenderErrorResponseDTO>;
export type UpdateUserPreferenceMutationVariables = {
pathParams: UpdateUserPreferencePathParameters;
data?: BodyType<PreferencetypesUpdatablePreferenceDTO>;
};
/**
* @summary Update user preference
@@ -605,13 +608,19 @@ export const useUpdateUserPreference = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateUserPreference>>,
TError,
UpdateUserPreferenceMutationVariables,
{
pathParams: UpdateUserPreferencePathParameters;
data?: BodyType<PreferencetypesUpdatablePreferenceDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateUserPreference>>,
TError,
UpdateUserPreferenceMutationVariables,
{
pathParams: UpdateUserPreferencePathParameters;
data?: BodyType<PreferencetypesUpdatablePreferenceDTO>;
},
TContext
> => {
return useMutation(getUpdateUserPreferenceMutationOptions(options));

View File

@@ -17,19 +17,15 @@ import type {
UseQueryResult,
} from 'react-query';
import type { PrometheusErrorResponseSchemaDTO } from '../sigNoz.schemas/prometheusErrorResponseSchemaDTO';
import type { PrometheusQueryParams } from '../sigNoz.schemas/prometheusQueryParams';
import type { PrometheusQueryPostParams } from '../sigNoz.schemas/prometheusQueryPostParams';
import type { PrometheusQueryRangeParams } from '../sigNoz.schemas/prometheusQueryRangeParams';
import type { PrometheusQueryRangePostParams } from '../sigNoz.schemas/prometheusQueryRangePostParams';
import type { PrometheusSuccessResponseSchemaDTO } from '../sigNoz.schemas/prometheusSuccessResponseSchemaDTO';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type {
PrometheusErrorResponseSchemaDTO,
PrometheusQueryParams,
PrometheusQueryPostParams,
PrometheusQueryRangeParams,
PrometheusQueryRangePostParams,
PrometheusSuccessResponseSchemaDTO,
RenderErrorResponseDTO,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType } from '../../../generatedAPIInstance';
@@ -136,7 +132,7 @@ export function usePrometheusQuery<
}
/**
* @summary Invalidates the {@link usePrometheusQuery} query
* @summary Prometheus instant query
*/
export const invalidatePrometheusQuery = async (
queryClient: QueryClient,
@@ -167,9 +163,6 @@ export const prometheusQueryPost = (
});
};
export const getPrometheusQueryPostMutationKey = () =>
['prometheusQueryPost'] as const;
export const getPrometheusQueryPostMutationOptions = <
TError = ErrorType<PrometheusErrorResponseSchemaDTO | RenderErrorResponseDTO>,
TContext = unknown,
@@ -177,16 +170,16 @@ export const getPrometheusQueryPostMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof prometheusQueryPost>>,
TError,
PrometheusQueryPostMutationVariables,
{ params: PrometheusQueryPostParams },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof prometheusQueryPost>>,
TError,
PrometheusQueryPostMutationVariables,
{ params: PrometheusQueryPostParams },
TContext
> => {
const mutationKey = getPrometheusQueryPostMutationKey();
const mutationKey = ['prometheusQueryPost'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -197,7 +190,7 @@ export const getPrometheusQueryPostMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof prometheusQueryPost>>,
PrometheusQueryPostMutationVariables
{ params: PrometheusQueryPostParams }
> = (props) => {
const { params } = props ?? {};
@@ -214,9 +207,6 @@ export type PrometheusQueryPostMutationResult = NonNullable<
export type PrometheusQueryPostMutationError = ErrorType<
PrometheusErrorResponseSchemaDTO | RenderErrorResponseDTO
>;
export type PrometheusQueryPostMutationVariables = {
params: PrometheusQueryPostParams;
};
/**
* @summary Prometheus instant query
@@ -228,13 +218,13 @@ export const usePrometheusQueryPost = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof prometheusQueryPost>>,
TError,
PrometheusQueryPostMutationVariables,
{ params: PrometheusQueryPostParams },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof prometheusQueryPost>>,
TError,
PrometheusQueryPostMutationVariables,
{ params: PrometheusQueryPostParams },
TContext
> => {
return useMutation(getPrometheusQueryPostMutationOptions(options));
@@ -327,7 +317,7 @@ export function usePrometheusQueryRange<
}
/**
* @summary Invalidates the {@link usePrometheusQueryRange} query
* @summary Prometheus range query
*/
export const invalidatePrometheusQueryRange = async (
queryClient: QueryClient,
@@ -358,9 +348,6 @@ export const prometheusQueryRangePost = (
});
};
export const getPrometheusQueryRangePostMutationKey = () =>
['prometheusQueryRangePost'] as const;
export const getPrometheusQueryRangePostMutationOptions = <
TError = ErrorType<PrometheusErrorResponseSchemaDTO | RenderErrorResponseDTO>,
TContext = unknown,
@@ -368,16 +355,16 @@ export const getPrometheusQueryRangePostMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof prometheusQueryRangePost>>,
TError,
PrometheusQueryRangePostMutationVariables,
{ params: PrometheusQueryRangePostParams },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof prometheusQueryRangePost>>,
TError,
PrometheusQueryRangePostMutationVariables,
{ params: PrometheusQueryRangePostParams },
TContext
> => {
const mutationKey = getPrometheusQueryRangePostMutationKey();
const mutationKey = ['prometheusQueryRangePost'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -388,7 +375,7 @@ export const getPrometheusQueryRangePostMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof prometheusQueryRangePost>>,
PrometheusQueryRangePostMutationVariables
{ params: PrometheusQueryRangePostParams }
> = (props) => {
const { params } = props ?? {};
@@ -405,9 +392,6 @@ export type PrometheusQueryRangePostMutationResult = NonNullable<
export type PrometheusQueryRangePostMutationError = ErrorType<
PrometheusErrorResponseSchemaDTO | RenderErrorResponseDTO
>;
export type PrometheusQueryRangePostMutationVariables = {
params: PrometheusQueryRangePostParams;
};
/**
* @summary Prometheus range query
@@ -419,13 +403,13 @@ export const usePrometheusQueryRangePost = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof prometheusQueryRangePost>>,
TError,
PrometheusQueryRangePostMutationVariables,
{ params: PrometheusQueryRangePostParams },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof prometheusQueryRangePost>>,
TError,
PrometheusQueryRangePostMutationVariables,
{ params: PrometheusQueryRangePostParams },
TContext
> => {
return useMutation(getPrometheusQueryRangePostMutationOptions(options));

View File

@@ -17,17 +17,14 @@ import type {
UseQueryResult,
} from 'react-query';
import type { IndexMaterializedPaths200 } from '../sigNoz.schemas/indexMaterializedPaths200';
import type { ListPromotedPaths200 } from '../sigNoz.schemas/listPromotedPaths200';
import type { ListPromotedPathsParams } from '../sigNoz.schemas/listPromotedPathsParams';
import type { PromotetypesPostableIndexMaterializedPathsDTO } from '../sigNoz.schemas/promotetypesPostableIndexMaterializedPathsDTO';
import type { PromotetypesPromotePathDTO } from '../sigNoz.schemas/promotetypesPromotePathDTO';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type {
IndexMaterializedPaths200,
ListPromotedPaths200,
ListPromotedPathsParams,
PromotetypesPostableIndexMaterializedPathsDTO,
PromotetypesPromotePathDTO,
RenderErrorResponseDTO,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
@@ -135,7 +132,7 @@ export function useListPromotedPaths<
}
/**
* @summary Invalidates the {@link useListPromotedPaths} query
* @summary List promoted paths
*/
export const invalidateListPromotedPaths = async (
queryClient: QueryClient,
@@ -169,8 +166,6 @@ export const promotePaths = (
});
};
export const getPromotePathsMutationKey = () => ['promotePaths'] as const;
export const getPromotePathsMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -178,16 +173,16 @@ export const getPromotePathsMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof promotePaths>>,
TError,
PromotePathsMutationVariables,
{ data?: BodyType<PromotetypesPromotePathDTO[] | null> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof promotePaths>>,
TError,
PromotePathsMutationVariables,
{ data?: BodyType<PromotetypesPromotePathDTO[] | null> },
TContext
> => {
const mutationKey = getPromotePathsMutationKey();
const mutationKey = ['promotePaths'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -198,7 +193,7 @@ export const getPromotePathsMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof promotePaths>>,
PromotePathsMutationVariables
{ data?: BodyType<PromotetypesPromotePathDTO[] | null> }
> = (props) => {
const { data } = props ?? {};
@@ -215,9 +210,6 @@ export type PromotePathsMutationBody =
| BodyType<PromotetypesPromotePathDTO[] | null>
| undefined;
export type PromotePathsMutationError = ErrorType<RenderErrorResponseDTO>;
export type PromotePathsMutationVariables = {
data?: BodyType<PromotetypesPromotePathDTO[] | null>;
};
/**
* @summary Promote paths
@@ -229,13 +221,13 @@ export const usePromotePaths = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof promotePaths>>,
TError,
PromotePathsMutationVariables,
{ data?: BodyType<PromotetypesPromotePathDTO[] | null> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof promotePaths>>,
TError,
PromotePathsMutationVariables,
{ data?: BodyType<PromotetypesPromotePathDTO[] | null> },
TContext
> => {
return useMutation(getPromotePathsMutationOptions(options));
@@ -257,9 +249,6 @@ export const indexMaterializedPaths = (
});
};
export const getIndexMaterializedPathsMutationKey = () =>
['indexMaterializedPaths'] as const;
export const getIndexMaterializedPathsMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -267,16 +256,16 @@ export const getIndexMaterializedPathsMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof indexMaterializedPaths>>,
TError,
IndexMaterializedPathsMutationVariables,
{ data?: BodyType<PromotetypesPostableIndexMaterializedPathsDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof indexMaterializedPaths>>,
TError,
IndexMaterializedPathsMutationVariables,
{ data?: BodyType<PromotetypesPostableIndexMaterializedPathsDTO> },
TContext
> => {
const mutationKey = getIndexMaterializedPathsMutationKey();
const mutationKey = ['indexMaterializedPaths'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -287,7 +276,7 @@ export const getIndexMaterializedPathsMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof indexMaterializedPaths>>,
IndexMaterializedPathsMutationVariables
{ data?: BodyType<PromotetypesPostableIndexMaterializedPathsDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -305,9 +294,6 @@ export type IndexMaterializedPathsMutationBody =
| undefined;
export type IndexMaterializedPathsMutationError =
ErrorType<RenderErrorResponseDTO>;
export type IndexMaterializedPathsMutationVariables = {
data?: BodyType<PromotetypesPostableIndexMaterializedPathsDTO>;
};
/**
* @summary Index materialized paths
@@ -319,13 +305,13 @@ export const useIndexMaterializedPaths = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof indexMaterializedPaths>>,
TError,
IndexMaterializedPathsMutationVariables,
{ data?: BodyType<PromotetypesPostableIndexMaterializedPathsDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof indexMaterializedPaths>>,
TError,
IndexMaterializedPathsMutationVariables,
{ data?: BodyType<PromotetypesPostableIndexMaterializedPathsDTO> },
TContext
> => {
return useMutation(getIndexMaterializedPathsMutationOptions(options));

View File

@@ -11,17 +11,14 @@ import type {
UseMutationResult,
} from 'react-query';
import type { QueryRangePreviewV5200 } from '../sigNoz.schemas/queryRangePreviewV5200';
import type { QueryRangePreviewV5Params } from '../sigNoz.schemas/queryRangePreviewV5Params';
import type { QueryRangeV5200 } from '../sigNoz.schemas/queryRangeV5200';
import type { Querybuildertypesv5QueryRangeRequestDTO } from '../sigNoz.schemas/querybuildertypesv5QueryRangeRequestDTO';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type { ReplaceVariables200 } from '../sigNoz.schemas/replaceVariables200';
import type {
QueryRangePreviewV5200,
QueryRangePreviewV5Params,
QueryRangeV5200,
Querybuildertypesv5QueryRangeRequestDTO,
RenderErrorResponseDTO,
ReplaceVariables200,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
@@ -43,8 +40,6 @@ export const queryRangeV5 = (
});
};
export const getQueryRangeV5MutationKey = () => ['queryRangeV5'] as const;
export const getQueryRangeV5MutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -52,16 +47,16 @@ export const getQueryRangeV5MutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof queryRangeV5>>,
TError,
QueryRangeV5MutationVariables,
{ data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof queryRangeV5>>,
TError,
QueryRangeV5MutationVariables,
{ data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO> },
TContext
> => {
const mutationKey = getQueryRangeV5MutationKey();
const mutationKey = ['queryRangeV5'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -72,7 +67,7 @@ export const getQueryRangeV5MutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof queryRangeV5>>,
QueryRangeV5MutationVariables
{ data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -89,9 +84,6 @@ export type QueryRangeV5MutationBody =
| BodyType<Querybuildertypesv5QueryRangeRequestDTO>
| undefined;
export type QueryRangeV5MutationError = ErrorType<RenderErrorResponseDTO>;
export type QueryRangeV5MutationVariables = {
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
};
/**
* @summary Query range
@@ -103,13 +95,13 @@ export const useQueryRangeV5 = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof queryRangeV5>>,
TError,
QueryRangeV5MutationVariables,
{ data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof queryRangeV5>>,
TError,
QueryRangeV5MutationVariables,
{ data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO> },
TContext
> => {
return useMutation(getQueryRangeV5MutationOptions(options));
@@ -133,9 +125,6 @@ export const queryRangePreviewV5 = (
});
};
export const getQueryRangePreviewV5MutationKey = () =>
['queryRangePreviewV5'] as const;
export const getQueryRangePreviewV5MutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -143,16 +132,22 @@ export const getQueryRangePreviewV5MutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof queryRangePreviewV5>>,
TError,
QueryRangePreviewV5MutationVariables,
{
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
params?: QueryRangePreviewV5Params;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof queryRangePreviewV5>>,
TError,
QueryRangePreviewV5MutationVariables,
{
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
params?: QueryRangePreviewV5Params;
},
TContext
> => {
const mutationKey = getQueryRangePreviewV5MutationKey();
const mutationKey = ['queryRangePreviewV5'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -163,7 +158,10 @@ export const getQueryRangePreviewV5MutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof queryRangePreviewV5>>,
QueryRangePreviewV5MutationVariables
{
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
params?: QueryRangePreviewV5Params;
}
> = (props) => {
const { data, params } = props ?? {};
@@ -181,10 +179,6 @@ export type QueryRangePreviewV5MutationBody =
| undefined;
export type QueryRangePreviewV5MutationError =
ErrorType<RenderErrorResponseDTO>;
export type QueryRangePreviewV5MutationVariables = {
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
params?: QueryRangePreviewV5Params;
};
/**
* @summary Query range preview
@@ -196,13 +190,19 @@ export const useQueryRangePreviewV5 = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof queryRangePreviewV5>>,
TError,
QueryRangePreviewV5MutationVariables,
{
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
params?: QueryRangePreviewV5Params;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof queryRangePreviewV5>>,
TError,
QueryRangePreviewV5MutationVariables,
{
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
params?: QueryRangePreviewV5Params;
},
TContext
> => {
return useMutation(getQueryRangePreviewV5MutationOptions(options));
@@ -224,9 +224,6 @@ export const replaceVariables = (
});
};
export const getReplaceVariablesMutationKey = () =>
['replaceVariables'] as const;
export const getReplaceVariablesMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -234,16 +231,16 @@ export const getReplaceVariablesMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof replaceVariables>>,
TError,
ReplaceVariablesMutationVariables,
{ data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof replaceVariables>>,
TError,
ReplaceVariablesMutationVariables,
{ data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO> },
TContext
> => {
const mutationKey = getReplaceVariablesMutationKey();
const mutationKey = ['replaceVariables'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -254,7 +251,7 @@ export const getReplaceVariablesMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof replaceVariables>>,
ReplaceVariablesMutationVariables
{ data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -271,9 +268,6 @@ export type ReplaceVariablesMutationBody =
| BodyType<Querybuildertypesv5QueryRangeRequestDTO>
| undefined;
export type ReplaceVariablesMutationError = ErrorType<RenderErrorResponseDTO>;
export type ReplaceVariablesMutationVariables = {
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
};
/**
* @summary Replace variables
@@ -285,13 +279,13 @@ export const useReplaceVariables = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof replaceVariables>>,
TError,
ReplaceVariablesMutationVariables,
{ data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof replaceVariables>>,
TError,
ReplaceVariablesMutationVariables,
{ data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO> },
TContext
> => {
return useMutation(getReplaceVariablesMutationOptions(options));

View File

@@ -17,17 +17,14 @@ import type {
UseQueryResult,
} from 'react-query';
import type { GetQuickFilters200 } from '../sigNoz.schemas/getQuickFilters200';
import type { GetQuickFiltersPathParameters } from '../sigNoz.schemas/getQuickFiltersPathParameters';
import type { ListQuickFilters200 } from '../sigNoz.schemas/listQuickFilters200';
import type { QuickfiltertypesUpdatableQuickFiltersDTO } from '../sigNoz.schemas/quickfiltertypesUpdatableQuickFiltersDTO';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type { UpdateQuickFiltersPathParameters } from '../sigNoz.schemas/updateQuickFiltersPathParameters';
import type {
GetQuickFilters200,
GetQuickFiltersPathParameters,
ListQuickFilters200,
QuickfiltertypesUpdatableQuickFiltersDTO,
RenderErrorResponseDTO,
UpdateQuickFiltersPathParameters,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
@@ -122,7 +119,7 @@ export function useListQuickFilters<
}
/**
* @summary Invalidates the {@link useListQuickFilters} query
* @summary List quick filters
*/
export const invalidateListQuickFilters = async (
queryClient: QueryClient,
@@ -223,7 +220,7 @@ export function useGetQuickFilters<
}
/**
* @summary Invalidates the {@link useGetQuickFilters} query
* @summary Get a source's quick filters
*/
export const invalidateGetQuickFilters = async (
queryClient: QueryClient,
@@ -256,9 +253,6 @@ export const updateQuickFilters = (
});
};
export const getUpdateQuickFiltersMutationKey = () =>
['updateQuickFilters'] as const;
export const getUpdateQuickFiltersMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -266,16 +260,22 @@ export const getUpdateQuickFiltersMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateQuickFilters>>,
TError,
UpdateQuickFiltersMutationVariables,
{
pathParams: UpdateQuickFiltersPathParameters;
data?: BodyType<QuickfiltertypesUpdatableQuickFiltersDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateQuickFilters>>,
TError,
UpdateQuickFiltersMutationVariables,
{
pathParams: UpdateQuickFiltersPathParameters;
data?: BodyType<QuickfiltertypesUpdatableQuickFiltersDTO>;
},
TContext
> => {
const mutationKey = getUpdateQuickFiltersMutationKey();
const mutationKey = ['updateQuickFilters'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -286,7 +286,10 @@ export const getUpdateQuickFiltersMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateQuickFilters>>,
UpdateQuickFiltersMutationVariables
{
pathParams: UpdateQuickFiltersPathParameters;
data?: BodyType<QuickfiltertypesUpdatableQuickFiltersDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -303,10 +306,6 @@ export type UpdateQuickFiltersMutationBody =
| BodyType<QuickfiltertypesUpdatableQuickFiltersDTO>
| undefined;
export type UpdateQuickFiltersMutationError = ErrorType<RenderErrorResponseDTO>;
export type UpdateQuickFiltersMutationVariables = {
pathParams: UpdateQuickFiltersPathParameters;
data?: BodyType<QuickfiltertypesUpdatableQuickFiltersDTO>;
};
/**
* @summary Update quick filters
@@ -318,13 +317,19 @@ export const useUpdateQuickFilters = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateQuickFilters>>,
TError,
UpdateQuickFiltersMutationVariables,
{
pathParams: UpdateQuickFiltersPathParameters;
data?: BodyType<QuickfiltertypesUpdatableQuickFiltersDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateQuickFilters>>,
TError,
UpdateQuickFiltersMutationVariables,
{
pathParams: UpdateQuickFiltersPathParameters;
data?: BodyType<QuickfiltertypesUpdatableQuickFiltersDTO>;
},
TContext
> => {
return useMutation(getUpdateQuickFiltersMutationOptions(options));

View File

@@ -17,23 +17,17 @@ import type {
UseQueryResult,
} from 'react-query';
import type { AuthtypesPostableRoleDTO } from '../sigNoz.schemas/authtypesPostableRoleDTO';
import type { AuthtypesUpdatableRoleDTO } from '../sigNoz.schemas/authtypesUpdatableRoleDTO';
import type { CreateRole201 } from '../sigNoz.schemas/createRole201';
import type { DeleteRolePathParameters } from '../sigNoz.schemas/deleteRolePathParameters';
import type { GetRole200 } from '../sigNoz.schemas/getRole200';
import type { GetRolePathParameters } from '../sigNoz.schemas/getRolePathParameters';
import type { ListRoles200 } from '../sigNoz.schemas/listRoles200';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type { UpdateRolePathParameters } from '../sigNoz.schemas/updateRolePathParameters';
import type {
AuthtypesPostableRoleDTO,
AuthtypesUpdatableRoleDTO,
CreateRole201,
DeleteRolePathParameters,
GetRole200,
GetRolePathParameters,
ListRoles200,
RenderErrorResponseDTO,
UpdateRolePathParameters,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
@@ -120,7 +114,7 @@ export function useListRoles<
}
/**
* @summary Invalidates the {@link useListRoles} query
* @summary List roles
*/
export const invalidateListRoles = async (
queryClient: QueryClient,
@@ -151,8 +145,6 @@ export const createRole = (
});
};
export const getCreateRoleMutationKey = () => ['createRole'] as const;
export const getCreateRoleMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -160,16 +152,16 @@ export const getCreateRoleMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createRole>>,
TError,
CreateRoleMutationVariables,
{ data?: BodyType<AuthtypesPostableRoleDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createRole>>,
TError,
CreateRoleMutationVariables,
{ data?: BodyType<AuthtypesPostableRoleDTO> },
TContext
> => {
const mutationKey = getCreateRoleMutationKey();
const mutationKey = ['createRole'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -180,7 +172,7 @@ export const getCreateRoleMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createRole>>,
CreateRoleMutationVariables
{ data?: BodyType<AuthtypesPostableRoleDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -197,9 +189,6 @@ export type CreateRoleMutationBody =
| BodyType<AuthtypesPostableRoleDTO>
| undefined;
export type CreateRoleMutationError = ErrorType<RenderErrorResponseDTO>;
export type CreateRoleMutationVariables = {
data?: BodyType<AuthtypesPostableRoleDTO>;
};
/**
* @summary Create role
@@ -211,13 +200,13 @@ export const useCreateRole = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createRole>>,
TError,
CreateRoleMutationVariables,
{ data?: BodyType<AuthtypesPostableRoleDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createRole>>,
TError,
CreateRoleMutationVariables,
{ data?: BodyType<AuthtypesPostableRoleDTO> },
TContext
> => {
return useMutation(getCreateRoleMutationOptions(options));
@@ -237,8 +226,6 @@ export const deleteRole = (
});
};
export const getDeleteRoleMutationKey = () => ['deleteRole'] as const;
export const getDeleteRoleMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -246,16 +233,16 @@ export const getDeleteRoleMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteRole>>,
TError,
DeleteRoleMutationVariables,
{ pathParams: DeleteRolePathParameters },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof deleteRole>>,
TError,
DeleteRoleMutationVariables,
{ pathParams: DeleteRolePathParameters },
TContext
> => {
const mutationKey = getDeleteRoleMutationKey();
const mutationKey = ['deleteRole'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -266,7 +253,7 @@ export const getDeleteRoleMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof deleteRole>>,
DeleteRoleMutationVariables
{ pathParams: DeleteRolePathParameters }
> = (props) => {
const { pathParams } = props ?? {};
@@ -281,9 +268,6 @@ export type DeleteRoleMutationResult = NonNullable<
>;
export type DeleteRoleMutationError = ErrorType<RenderErrorResponseDTO>;
export type DeleteRoleMutationVariables = {
pathParams: DeleteRolePathParameters;
};
/**
* @summary Delete role
@@ -295,13 +279,13 @@ export const useDeleteRole = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteRole>>,
TError,
DeleteRoleMutationVariables,
{ pathParams: DeleteRolePathParameters },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof deleteRole>>,
TError,
DeleteRoleMutationVariables,
{ pathParams: DeleteRolePathParameters },
TContext
> => {
return useMutation(getDeleteRoleMutationOptions(options));
@@ -380,7 +364,7 @@ export function useGetRole<
}
/**
* @summary Invalidates the {@link useGetRole} query
* @summary Get role
*/
export const invalidateGetRole = async (
queryClient: QueryClient,
@@ -413,8 +397,6 @@ export const updateRole = (
});
};
export const getUpdateRoleMutationKey = () => ['updateRole'] as const;
export const getUpdateRoleMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -422,16 +404,22 @@ export const getUpdateRoleMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateRole>>,
TError,
UpdateRoleMutationVariables,
{
pathParams: UpdateRolePathParameters;
data?: BodyType<AuthtypesUpdatableRoleDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateRole>>,
TError,
UpdateRoleMutationVariables,
{
pathParams: UpdateRolePathParameters;
data?: BodyType<AuthtypesUpdatableRoleDTO>;
},
TContext
> => {
const mutationKey = getUpdateRoleMutationKey();
const mutationKey = ['updateRole'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -442,7 +430,10 @@ export const getUpdateRoleMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateRole>>,
UpdateRoleMutationVariables
{
pathParams: UpdateRolePathParameters;
data?: BodyType<AuthtypesUpdatableRoleDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -459,10 +450,6 @@ export type UpdateRoleMutationBody =
| BodyType<AuthtypesUpdatableRoleDTO>
| undefined;
export type UpdateRoleMutationError = ErrorType<RenderErrorResponseDTO>;
export type UpdateRoleMutationVariables = {
pathParams: UpdateRolePathParameters;
data?: BodyType<AuthtypesUpdatableRoleDTO>;
};
/**
* @summary Update role
@@ -474,13 +461,19 @@ export const useUpdateRole = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateRole>>,
TError,
UpdateRoleMutationVariables,
{
pathParams: UpdateRolePathParameters;
data?: BodyType<AuthtypesUpdatableRoleDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateRole>>,
TError,
UpdateRoleMutationVariables,
{
pathParams: UpdateRolePathParameters;
data?: BodyType<AuthtypesUpdatableRoleDTO>;
},
TContext
> => {
return useMutation(getUpdateRoleMutationOptions(options));

View File

@@ -17,23 +17,17 @@ import type {
UseQueryResult,
} from 'react-query';
import type { AlertmanagertypesPostableRoutePolicyDTO } from '../sigNoz.schemas/alertmanagertypesPostableRoutePolicyDTO';
import type { CreateRoutePolicy201 } from '../sigNoz.schemas/createRoutePolicy201';
import type { DeleteRoutePolicyByIDPathParameters } from '../sigNoz.schemas/deleteRoutePolicyByIDPathParameters';
import type { GetAllRoutePolicies200 } from '../sigNoz.schemas/getAllRoutePolicies200';
import type { GetRoutePolicyByID200 } from '../sigNoz.schemas/getRoutePolicyByID200';
import type { GetRoutePolicyByIDPathParameters } from '../sigNoz.schemas/getRoutePolicyByIDPathParameters';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type { UpdateRoutePolicy200 } from '../sigNoz.schemas/updateRoutePolicy200';
import type { UpdateRoutePolicyPathParameters } from '../sigNoz.schemas/updateRoutePolicyPathParameters';
import type {
AlertmanagertypesPostableRoutePolicyDTO,
CreateRoutePolicy201,
DeleteRoutePolicyByIDPathParameters,
GetAllRoutePolicies200,
GetRoutePolicyByID200,
GetRoutePolicyByIDPathParameters,
RenderErrorResponseDTO,
UpdateRoutePolicy200,
UpdateRoutePolicyPathParameters,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
@@ -128,7 +122,7 @@ export function useGetAllRoutePolicies<
}
/**
* @summary Invalidates the {@link useGetAllRoutePolicies} query
* @summary List route policies
*/
export const invalidateGetAllRoutePolicies = async (
queryClient: QueryClient,
@@ -159,9 +153,6 @@ export const createRoutePolicy = (
});
};
export const getCreateRoutePolicyMutationKey = () =>
['createRoutePolicy'] as const;
export const getCreateRoutePolicyMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -169,16 +160,16 @@ export const getCreateRoutePolicyMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createRoutePolicy>>,
TError,
CreateRoutePolicyMutationVariables,
{ data?: BodyType<AlertmanagertypesPostableRoutePolicyDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createRoutePolicy>>,
TError,
CreateRoutePolicyMutationVariables,
{ data?: BodyType<AlertmanagertypesPostableRoutePolicyDTO> },
TContext
> => {
const mutationKey = getCreateRoutePolicyMutationKey();
const mutationKey = ['createRoutePolicy'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -189,7 +180,7 @@ export const getCreateRoutePolicyMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createRoutePolicy>>,
CreateRoutePolicyMutationVariables
{ data?: BodyType<AlertmanagertypesPostableRoutePolicyDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -206,9 +197,6 @@ export type CreateRoutePolicyMutationBody =
| BodyType<AlertmanagertypesPostableRoutePolicyDTO>
| undefined;
export type CreateRoutePolicyMutationError = ErrorType<RenderErrorResponseDTO>;
export type CreateRoutePolicyMutationVariables = {
data?: BodyType<AlertmanagertypesPostableRoutePolicyDTO>;
};
/**
* @summary Create route policy
@@ -220,13 +208,13 @@ export const useCreateRoutePolicy = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createRoutePolicy>>,
TError,
CreateRoutePolicyMutationVariables,
{ data?: BodyType<AlertmanagertypesPostableRoutePolicyDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createRoutePolicy>>,
TError,
CreateRoutePolicyMutationVariables,
{ data?: BodyType<AlertmanagertypesPostableRoutePolicyDTO> },
TContext
> => {
return useMutation(getCreateRoutePolicyMutationOptions(options));
@@ -246,9 +234,6 @@ export const deleteRoutePolicyByID = (
});
};
export const getDeleteRoutePolicyByIDMutationKey = () =>
['deleteRoutePolicyByID'] as const;
export const getDeleteRoutePolicyByIDMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -256,16 +241,16 @@ export const getDeleteRoutePolicyByIDMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteRoutePolicyByID>>,
TError,
DeleteRoutePolicyByIDMutationVariables,
{ pathParams: DeleteRoutePolicyByIDPathParameters },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof deleteRoutePolicyByID>>,
TError,
DeleteRoutePolicyByIDMutationVariables,
{ pathParams: DeleteRoutePolicyByIDPathParameters },
TContext
> => {
const mutationKey = getDeleteRoutePolicyByIDMutationKey();
const mutationKey = ['deleteRoutePolicyByID'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -276,7 +261,7 @@ export const getDeleteRoutePolicyByIDMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof deleteRoutePolicyByID>>,
DeleteRoutePolicyByIDMutationVariables
{ pathParams: DeleteRoutePolicyByIDPathParameters }
> = (props) => {
const { pathParams } = props ?? {};
@@ -292,9 +277,6 @@ export type DeleteRoutePolicyByIDMutationResult = NonNullable<
export type DeleteRoutePolicyByIDMutationError =
ErrorType<RenderErrorResponseDTO>;
export type DeleteRoutePolicyByIDMutationVariables = {
pathParams: DeleteRoutePolicyByIDPathParameters;
};
/**
* @summary Delete route policy
@@ -306,13 +288,13 @@ export const useDeleteRoutePolicyByID = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteRoutePolicyByID>>,
TError,
DeleteRoutePolicyByIDMutationVariables,
{ pathParams: DeleteRoutePolicyByIDPathParameters },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof deleteRoutePolicyByID>>,
TError,
DeleteRoutePolicyByIDMutationVariables,
{ pathParams: DeleteRoutePolicyByIDPathParameters },
TContext
> => {
return useMutation(getDeleteRoutePolicyByIDMutationOptions(options));
@@ -404,7 +386,7 @@ export function useGetRoutePolicyByID<
}
/**
* @summary Invalidates the {@link useGetRoutePolicyByID} query
* @summary Get route policy by ID
*/
export const invalidateGetRoutePolicyByID = async (
queryClient: QueryClient,
@@ -437,9 +419,6 @@ export const updateRoutePolicy = (
});
};
export const getUpdateRoutePolicyMutationKey = () =>
['updateRoutePolicy'] as const;
export const getUpdateRoutePolicyMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -447,16 +426,22 @@ export const getUpdateRoutePolicyMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateRoutePolicy>>,
TError,
UpdateRoutePolicyMutationVariables,
{
pathParams: UpdateRoutePolicyPathParameters;
data?: BodyType<AlertmanagertypesPostableRoutePolicyDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateRoutePolicy>>,
TError,
UpdateRoutePolicyMutationVariables,
{
pathParams: UpdateRoutePolicyPathParameters;
data?: BodyType<AlertmanagertypesPostableRoutePolicyDTO>;
},
TContext
> => {
const mutationKey = getUpdateRoutePolicyMutationKey();
const mutationKey = ['updateRoutePolicy'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -467,7 +452,10 @@ export const getUpdateRoutePolicyMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateRoutePolicy>>,
UpdateRoutePolicyMutationVariables
{
pathParams: UpdateRoutePolicyPathParameters;
data?: BodyType<AlertmanagertypesPostableRoutePolicyDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -484,10 +472,6 @@ export type UpdateRoutePolicyMutationBody =
| BodyType<AlertmanagertypesPostableRoutePolicyDTO>
| undefined;
export type UpdateRoutePolicyMutationError = ErrorType<RenderErrorResponseDTO>;
export type UpdateRoutePolicyMutationVariables = {
pathParams: UpdateRoutePolicyPathParameters;
data?: BodyType<AlertmanagertypesPostableRoutePolicyDTO>;
};
/**
* @summary Update route policy
@@ -499,13 +483,19 @@ export const useUpdateRoutePolicy = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateRoutePolicy>>,
TError,
UpdateRoutePolicyMutationVariables,
{
pathParams: UpdateRoutePolicyPathParameters;
data?: BodyType<AlertmanagertypesPostableRoutePolicyDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateRoutePolicy>>,
TError,
UpdateRoutePolicyMutationVariables,
{
pathParams: UpdateRoutePolicyPathParameters;
data?: BodyType<AlertmanagertypesPostableRoutePolicyDTO>;
},
TContext
> => {
return useMutation(getUpdateRoutePolicyMutationOptions(options));

View File

@@ -17,81 +17,46 @@ import type {
UseQueryResult,
} from 'react-query';
import type { CloneRuleByID201 } from '../sigNoz.schemas/cloneRuleByID201';
import type { CloneRuleByIDPathParameters } from '../sigNoz.schemas/cloneRuleByIDPathParameters';
import type { CreateRule201 } from '../sigNoz.schemas/createRule201';
import type { CreateRuleView201 } from '../sigNoz.schemas/createRuleView201';
import type { DeleteRuleByIDPathParameters } from '../sigNoz.schemas/deleteRuleByIDPathParameters';
import type { DeleteRuleViewPathParameters } from '../sigNoz.schemas/deleteRuleViewPathParameters';
import type { GetRuleByID200 } from '../sigNoz.schemas/getRuleByID200';
import type { GetRuleByIDPathParameters } from '../sigNoz.schemas/getRuleByIDPathParameters';
import type { GetRuleHistoryFilterKeys200 } from '../sigNoz.schemas/getRuleHistoryFilterKeys200';
import type { GetRuleHistoryFilterKeysParams } from '../sigNoz.schemas/getRuleHistoryFilterKeysParams';
import type { GetRuleHistoryFilterKeysPathParameters } from '../sigNoz.schemas/getRuleHistoryFilterKeysPathParameters';
import type { GetRuleHistoryFilterValues200 } from '../sigNoz.schemas/getRuleHistoryFilterValues200';
import type { GetRuleHistoryFilterValuesParams } from '../sigNoz.schemas/getRuleHistoryFilterValuesParams';
import type { GetRuleHistoryFilterValuesPathParameters } from '../sigNoz.schemas/getRuleHistoryFilterValuesPathParameters';
import type { GetRuleHistoryOverallStatus200 } from '../sigNoz.schemas/getRuleHistoryOverallStatus200';
import type { GetRuleHistoryOverallStatusParams } from '../sigNoz.schemas/getRuleHistoryOverallStatusParams';
import type { GetRuleHistoryOverallStatusPathParameters } from '../sigNoz.schemas/getRuleHistoryOverallStatusPathParameters';
import type { GetRuleHistoryStats200 } from '../sigNoz.schemas/getRuleHistoryStats200';
import type { GetRuleHistoryStatsParams } from '../sigNoz.schemas/getRuleHistoryStatsParams';
import type { GetRuleHistoryStatsPathParameters } from '../sigNoz.schemas/getRuleHistoryStatsPathParameters';
import type { GetRuleHistoryTimeline200 } from '../sigNoz.schemas/getRuleHistoryTimeline200';
import type { GetRuleHistoryTimelineParams } from '../sigNoz.schemas/getRuleHistoryTimelineParams';
import type { GetRuleHistoryTimelinePathParameters } from '../sigNoz.schemas/getRuleHistoryTimelinePathParameters';
import type { GetRuleHistoryTopContributors200 } from '../sigNoz.schemas/getRuleHistoryTopContributors200';
import type { GetRuleHistoryTopContributorsParams } from '../sigNoz.schemas/getRuleHistoryTopContributorsParams';
import type { GetRuleHistoryTopContributorsPathParameters } from '../sigNoz.schemas/getRuleHistoryTopContributorsPathParameters';
import type { ListRuleViews200 } from '../sigNoz.schemas/listRuleViews200';
import type { ListRulesV3200 } from '../sigNoz.schemas/listRulesV3200';
import type { ListRulesV3Params } from '../sigNoz.schemas/listRulesV3Params';
import type { PatchRuleByID200 } from '../sigNoz.schemas/patchRuleByID200';
import type { PatchRuleByIDPathParameters } from '../sigNoz.schemas/patchRuleByIDPathParameters';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type { RuletypesPostableRuleDTO } from '../sigNoz.schemas/ruletypesPostableRuleDTO';
import type { RuletypesPostableRuleViewDTO } from '../sigNoz.schemas/ruletypesPostableRuleViewDTO';
import type { TestRule200 } from '../sigNoz.schemas/testRule200';
import type { UpdateRuleByIDPathParameters } from '../sigNoz.schemas/updateRuleByIDPathParameters';
import type { UpdateRuleView200 } from '../sigNoz.schemas/updateRuleView200';
import type { UpdateRuleViewPathParameters } from '../sigNoz.schemas/updateRuleViewPathParameters';
import type {
CloneRuleByID201,
CloneRuleByIDPathParameters,
CreateRule201,
CreateRuleView201,
DeleteRuleByIDPathParameters,
DeleteRuleViewPathParameters,
GetRuleByID200,
GetRuleByIDPathParameters,
GetRuleHistoryFilterKeys200,
GetRuleHistoryFilterKeysParams,
GetRuleHistoryFilterKeysPathParameters,
GetRuleHistoryFilterValues200,
GetRuleHistoryFilterValuesParams,
GetRuleHistoryFilterValuesPathParameters,
GetRuleHistoryOverallStatus200,
GetRuleHistoryOverallStatusParams,
GetRuleHistoryOverallStatusPathParameters,
GetRuleHistoryStats200,
GetRuleHistoryStatsParams,
GetRuleHistoryStatsPathParameters,
GetRuleHistoryTimeline200,
GetRuleHistoryTimelineParams,
GetRuleHistoryTimelinePathParameters,
GetRuleHistoryTopContributors200,
GetRuleHistoryTopContributorsParams,
GetRuleHistoryTopContributorsPathParameters,
ListRuleViews200,
ListRulesV3200,
ListRulesV3Params,
PatchRuleByID200,
PatchRuleByIDPathParameters,
RenderErrorResponseDTO,
RuletypesPostableRuleDTO,
RuletypesPostableRuleViewDTO,
TestRule200,
UpdateRuleByIDPathParameters,
UpdateRuleView200,
UpdateRuleViewPathParameters,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
@@ -186,7 +151,7 @@ export function useListRuleViews<
}
/**
* @summary Invalidates the {@link useListRuleViews} query
* @summary List rule saved views
*/
export const invalidateListRuleViews = async (
queryClient: QueryClient,
@@ -217,8 +182,6 @@ export const createRuleView = (
});
};
export const getCreateRuleViewMutationKey = () => ['createRuleView'] as const;
export const getCreateRuleViewMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -226,16 +189,16 @@ export const getCreateRuleViewMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createRuleView>>,
TError,
CreateRuleViewMutationVariables,
{ data?: BodyType<RuletypesPostableRuleViewDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createRuleView>>,
TError,
CreateRuleViewMutationVariables,
{ data?: BodyType<RuletypesPostableRuleViewDTO> },
TContext
> => {
const mutationKey = getCreateRuleViewMutationKey();
const mutationKey = ['createRuleView'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -246,7 +209,7 @@ export const getCreateRuleViewMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createRuleView>>,
CreateRuleViewMutationVariables
{ data?: BodyType<RuletypesPostableRuleViewDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -263,9 +226,6 @@ export type CreateRuleViewMutationBody =
| BodyType<RuletypesPostableRuleViewDTO>
| undefined;
export type CreateRuleViewMutationError = ErrorType<RenderErrorResponseDTO>;
export type CreateRuleViewMutationVariables = {
data?: BodyType<RuletypesPostableRuleViewDTO>;
};
/**
* @summary Create rule saved view
@@ -277,13 +237,13 @@ export const useCreateRuleView = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createRuleView>>,
TError,
CreateRuleViewMutationVariables,
{ data?: BodyType<RuletypesPostableRuleViewDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createRuleView>>,
TError,
CreateRuleViewMutationVariables,
{ data?: BodyType<RuletypesPostableRuleViewDTO> },
TContext
> => {
return useMutation(getCreateRuleViewMutationOptions(options));
@@ -303,8 +263,6 @@ export const deleteRuleView = (
});
};
export const getDeleteRuleViewMutationKey = () => ['deleteRuleView'] as const;
export const getDeleteRuleViewMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -312,16 +270,16 @@ export const getDeleteRuleViewMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteRuleView>>,
TError,
DeleteRuleViewMutationVariables,
{ pathParams: DeleteRuleViewPathParameters },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof deleteRuleView>>,
TError,
DeleteRuleViewMutationVariables,
{ pathParams: DeleteRuleViewPathParameters },
TContext
> => {
const mutationKey = getDeleteRuleViewMutationKey();
const mutationKey = ['deleteRuleView'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -332,7 +290,7 @@ export const getDeleteRuleViewMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof deleteRuleView>>,
DeleteRuleViewMutationVariables
{ pathParams: DeleteRuleViewPathParameters }
> = (props) => {
const { pathParams } = props ?? {};
@@ -347,9 +305,6 @@ export type DeleteRuleViewMutationResult = NonNullable<
>;
export type DeleteRuleViewMutationError = ErrorType<RenderErrorResponseDTO>;
export type DeleteRuleViewMutationVariables = {
pathParams: DeleteRuleViewPathParameters;
};
/**
* @summary Delete rule saved view
@@ -361,13 +316,13 @@ export const useDeleteRuleView = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteRuleView>>,
TError,
DeleteRuleViewMutationVariables,
{ pathParams: DeleteRuleViewPathParameters },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof deleteRuleView>>,
TError,
DeleteRuleViewMutationVariables,
{ pathParams: DeleteRuleViewPathParameters },
TContext
> => {
return useMutation(getDeleteRuleViewMutationOptions(options));
@@ -390,8 +345,6 @@ export const updateRuleView = (
});
};
export const getUpdateRuleViewMutationKey = () => ['updateRuleView'] as const;
export const getUpdateRuleViewMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -399,16 +352,22 @@ export const getUpdateRuleViewMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateRuleView>>,
TError,
UpdateRuleViewMutationVariables,
{
pathParams: UpdateRuleViewPathParameters;
data?: BodyType<RuletypesPostableRuleViewDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateRuleView>>,
TError,
UpdateRuleViewMutationVariables,
{
pathParams: UpdateRuleViewPathParameters;
data?: BodyType<RuletypesPostableRuleViewDTO>;
},
TContext
> => {
const mutationKey = getUpdateRuleViewMutationKey();
const mutationKey = ['updateRuleView'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -419,7 +378,10 @@ export const getUpdateRuleViewMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateRuleView>>,
UpdateRuleViewMutationVariables
{
pathParams: UpdateRuleViewPathParameters;
data?: BodyType<RuletypesPostableRuleViewDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -436,10 +398,6 @@ export type UpdateRuleViewMutationBody =
| BodyType<RuletypesPostableRuleViewDTO>
| undefined;
export type UpdateRuleViewMutationError = ErrorType<RenderErrorResponseDTO>;
export type UpdateRuleViewMutationVariables = {
pathParams: UpdateRuleViewPathParameters;
data?: BodyType<RuletypesPostableRuleViewDTO>;
};
/**
* @summary Update rule saved view
@@ -451,13 +409,19 @@ export const useUpdateRuleView = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateRuleView>>,
TError,
UpdateRuleViewMutationVariables,
{
pathParams: UpdateRuleViewPathParameters;
data?: BodyType<RuletypesPostableRuleViewDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateRuleView>>,
TError,
UpdateRuleViewMutationVariables,
{
pathParams: UpdateRuleViewPathParameters;
data?: BodyType<RuletypesPostableRuleViewDTO>;
},
TContext
> => {
return useMutation(getUpdateRuleViewMutationOptions(options));
@@ -479,8 +443,6 @@ export const createRule = (
});
};
export const getCreateRuleMutationKey = () => ['createRule'] as const;
export const getCreateRuleMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -488,16 +450,16 @@ export const getCreateRuleMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createRule>>,
TError,
CreateRuleMutationVariables,
{ data?: BodyType<RuletypesPostableRuleDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createRule>>,
TError,
CreateRuleMutationVariables,
{ data?: BodyType<RuletypesPostableRuleDTO> },
TContext
> => {
const mutationKey = getCreateRuleMutationKey();
const mutationKey = ['createRule'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -508,7 +470,7 @@ export const getCreateRuleMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createRule>>,
CreateRuleMutationVariables
{ data?: BodyType<RuletypesPostableRuleDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -525,9 +487,6 @@ export type CreateRuleMutationBody =
| BodyType<RuletypesPostableRuleDTO>
| undefined;
export type CreateRuleMutationError = ErrorType<RenderErrorResponseDTO>;
export type CreateRuleMutationVariables = {
data?: BodyType<RuletypesPostableRuleDTO>;
};
/**
* @summary Create alert rule
@@ -539,13 +498,13 @@ export const useCreateRule = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createRule>>,
TError,
CreateRuleMutationVariables,
{ data?: BodyType<RuletypesPostableRuleDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createRule>>,
TError,
CreateRuleMutationVariables,
{ data?: BodyType<RuletypesPostableRuleDTO> },
TContext
> => {
return useMutation(getCreateRuleMutationOptions(options));
@@ -565,8 +524,6 @@ export const deleteRuleByID = (
});
};
export const getDeleteRuleByIDMutationKey = () => ['deleteRuleByID'] as const;
export const getDeleteRuleByIDMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -574,16 +531,16 @@ export const getDeleteRuleByIDMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteRuleByID>>,
TError,
DeleteRuleByIDMutationVariables,
{ pathParams: DeleteRuleByIDPathParameters },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof deleteRuleByID>>,
TError,
DeleteRuleByIDMutationVariables,
{ pathParams: DeleteRuleByIDPathParameters },
TContext
> => {
const mutationKey = getDeleteRuleByIDMutationKey();
const mutationKey = ['deleteRuleByID'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -594,7 +551,7 @@ export const getDeleteRuleByIDMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof deleteRuleByID>>,
DeleteRuleByIDMutationVariables
{ pathParams: DeleteRuleByIDPathParameters }
> = (props) => {
const { pathParams } = props ?? {};
@@ -609,9 +566,6 @@ export type DeleteRuleByIDMutationResult = NonNullable<
>;
export type DeleteRuleByIDMutationError = ErrorType<RenderErrorResponseDTO>;
export type DeleteRuleByIDMutationVariables = {
pathParams: DeleteRuleByIDPathParameters;
};
/**
* @summary Delete alert rule
@@ -623,13 +577,13 @@ export const useDeleteRuleByID = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteRuleByID>>,
TError,
DeleteRuleByIDMutationVariables,
{ pathParams: DeleteRuleByIDPathParameters },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof deleteRuleByID>>,
TError,
DeleteRuleByIDMutationVariables,
{ pathParams: DeleteRuleByIDPathParameters },
TContext
> => {
return useMutation(getDeleteRuleByIDMutationOptions(options));
@@ -718,7 +672,7 @@ export function useGetRuleByID<
}
/**
* @summary Invalidates the {@link useGetRuleByID} query
* @summary Get alert rule by ID
*/
export const invalidateGetRuleByID = async (
queryClient: QueryClient,
@@ -751,8 +705,6 @@ export const patchRuleByID = (
});
};
export const getPatchRuleByIDMutationKey = () => ['patchRuleByID'] as const;
export const getPatchRuleByIDMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -760,16 +712,22 @@ export const getPatchRuleByIDMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof patchRuleByID>>,
TError,
PatchRuleByIDMutationVariables,
{
pathParams: PatchRuleByIDPathParameters;
data?: BodyType<RuletypesPostableRuleDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof patchRuleByID>>,
TError,
PatchRuleByIDMutationVariables,
{
pathParams: PatchRuleByIDPathParameters;
data?: BodyType<RuletypesPostableRuleDTO>;
},
TContext
> => {
const mutationKey = getPatchRuleByIDMutationKey();
const mutationKey = ['patchRuleByID'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -780,7 +738,10 @@ export const getPatchRuleByIDMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof patchRuleByID>>,
PatchRuleByIDMutationVariables
{
pathParams: PatchRuleByIDPathParameters;
data?: BodyType<RuletypesPostableRuleDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -797,10 +758,6 @@ export type PatchRuleByIDMutationBody =
| BodyType<RuletypesPostableRuleDTO>
| undefined;
export type PatchRuleByIDMutationError = ErrorType<RenderErrorResponseDTO>;
export type PatchRuleByIDMutationVariables = {
pathParams: PatchRuleByIDPathParameters;
data?: BodyType<RuletypesPostableRuleDTO>;
};
/**
* @summary Patch alert rule
@@ -812,13 +769,19 @@ export const usePatchRuleByID = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof patchRuleByID>>,
TError,
PatchRuleByIDMutationVariables,
{
pathParams: PatchRuleByIDPathParameters;
data?: BodyType<RuletypesPostableRuleDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof patchRuleByID>>,
TError,
PatchRuleByIDMutationVariables,
{
pathParams: PatchRuleByIDPathParameters;
data?: BodyType<RuletypesPostableRuleDTO>;
},
TContext
> => {
return useMutation(getPatchRuleByIDMutationOptions(options));
@@ -841,8 +804,6 @@ export const updateRuleByID = (
});
};
export const getUpdateRuleByIDMutationKey = () => ['updateRuleByID'] as const;
export const getUpdateRuleByIDMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -850,16 +811,22 @@ export const getUpdateRuleByIDMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateRuleByID>>,
TError,
UpdateRuleByIDMutationVariables,
{
pathParams: UpdateRuleByIDPathParameters;
data?: BodyType<RuletypesPostableRuleDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateRuleByID>>,
TError,
UpdateRuleByIDMutationVariables,
{
pathParams: UpdateRuleByIDPathParameters;
data?: BodyType<RuletypesPostableRuleDTO>;
},
TContext
> => {
const mutationKey = getUpdateRuleByIDMutationKey();
const mutationKey = ['updateRuleByID'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -870,7 +837,10 @@ export const getUpdateRuleByIDMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateRuleByID>>,
UpdateRuleByIDMutationVariables
{
pathParams: UpdateRuleByIDPathParameters;
data?: BodyType<RuletypesPostableRuleDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -887,10 +857,6 @@ export type UpdateRuleByIDMutationBody =
| BodyType<RuletypesPostableRuleDTO>
| undefined;
export type UpdateRuleByIDMutationError = ErrorType<RenderErrorResponseDTO>;
export type UpdateRuleByIDMutationVariables = {
pathParams: UpdateRuleByIDPathParameters;
data?: BodyType<RuletypesPostableRuleDTO>;
};
/**
* @summary Update alert rule
@@ -902,13 +868,19 @@ export const useUpdateRuleByID = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateRuleByID>>,
TError,
UpdateRuleByIDMutationVariables,
{
pathParams: UpdateRuleByIDPathParameters;
data?: BodyType<RuletypesPostableRuleDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateRuleByID>>,
TError,
UpdateRuleByIDMutationVariables,
{
pathParams: UpdateRuleByIDPathParameters;
data?: BodyType<RuletypesPostableRuleDTO>;
},
TContext
> => {
return useMutation(getUpdateRuleByIDMutationOptions(options));
@@ -928,8 +900,6 @@ export const cloneRuleByID = (
});
};
export const getCloneRuleByIDMutationKey = () => ['cloneRuleByID'] as const;
export const getCloneRuleByIDMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -937,16 +907,16 @@ export const getCloneRuleByIDMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof cloneRuleByID>>,
TError,
CloneRuleByIDMutationVariables,
{ pathParams: CloneRuleByIDPathParameters },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof cloneRuleByID>>,
TError,
CloneRuleByIDMutationVariables,
{ pathParams: CloneRuleByIDPathParameters },
TContext
> => {
const mutationKey = getCloneRuleByIDMutationKey();
const mutationKey = ['cloneRuleByID'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -957,7 +927,7 @@ export const getCloneRuleByIDMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof cloneRuleByID>>,
CloneRuleByIDMutationVariables
{ pathParams: CloneRuleByIDPathParameters }
> = (props) => {
const { pathParams } = props ?? {};
@@ -972,9 +942,6 @@ export type CloneRuleByIDMutationResult = NonNullable<
>;
export type CloneRuleByIDMutationError = ErrorType<RenderErrorResponseDTO>;
export type CloneRuleByIDMutationVariables = {
pathParams: CloneRuleByIDPathParameters;
};
/**
* @summary Clone alert rule
@@ -986,13 +953,13 @@ export const useCloneRuleByID = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof cloneRuleByID>>,
TError,
CloneRuleByIDMutationVariables,
{ pathParams: CloneRuleByIDPathParameters },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof cloneRuleByID>>,
TError,
CloneRuleByIDMutationVariables,
{ pathParams: CloneRuleByIDPathParameters },
TContext
> => {
return useMutation(getCloneRuleByIDMutationOptions(options));
@@ -1097,7 +1064,7 @@ export function useGetRuleHistoryFilterKeys<
}
/**
* @summary Invalidates the {@link useGetRuleHistoryFilterKeys} query
* @summary Get rule history filter keys
*/
export const invalidateGetRuleHistoryFilterKeys = async (
queryClient: QueryClient,
@@ -1214,7 +1181,7 @@ export function useGetRuleHistoryFilterValues<
}
/**
* @summary Invalidates the {@link useGetRuleHistoryFilterValues} query
* @summary Get rule history filter values
*/
export const invalidateGetRuleHistoryFilterValues = async (
queryClient: QueryClient,
@@ -1331,7 +1298,7 @@ export function useGetRuleHistoryOverallStatus<
}
/**
* @summary Invalidates the {@link useGetRuleHistoryOverallStatus} query
* @summary Get rule overall status timeline
*/
export const invalidateGetRuleHistoryOverallStatus = async (
queryClient: QueryClient,
@@ -1446,7 +1413,7 @@ export function useGetRuleHistoryStats<
}
/**
* @summary Invalidates the {@link useGetRuleHistoryStats} query
* @summary Get rule history stats
*/
export const invalidateGetRuleHistoryStats = async (
queryClient: QueryClient,
@@ -1562,7 +1529,7 @@ export function useGetRuleHistoryTimeline<
}
/**
* @summary Invalidates the {@link useGetRuleHistoryTimeline} query
* @summary Get rule history timeline
*/
export const invalidateGetRuleHistoryTimeline = async (
queryClient: QueryClient,
@@ -1679,7 +1646,7 @@ export function useGetRuleHistoryTopContributors<
}
/**
* @summary Invalidates the {@link useGetRuleHistoryTopContributors} query
* @summary Get top contributors to rule firing
*/
export const invalidateGetRuleHistoryTopContributors = async (
queryClient: QueryClient,
@@ -1712,8 +1679,6 @@ export const testRule = (
});
};
export const getTestRuleMutationKey = () => ['testRule'] as const;
export const getTestRuleMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -1721,16 +1686,16 @@ export const getTestRuleMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof testRule>>,
TError,
TestRuleMutationVariables,
{ data?: BodyType<RuletypesPostableRuleDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof testRule>>,
TError,
TestRuleMutationVariables,
{ data?: BodyType<RuletypesPostableRuleDTO> },
TContext
> => {
const mutationKey = getTestRuleMutationKey();
const mutationKey = ['testRule'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -1741,7 +1706,7 @@ export const getTestRuleMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof testRule>>,
TestRuleMutationVariables
{ data?: BodyType<RuletypesPostableRuleDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -1758,9 +1723,6 @@ export type TestRuleMutationBody =
| BodyType<RuletypesPostableRuleDTO>
| undefined;
export type TestRuleMutationError = ErrorType<RenderErrorResponseDTO>;
export type TestRuleMutationVariables = {
data?: BodyType<RuletypesPostableRuleDTO>;
};
/**
* @summary Test alert rule
@@ -1772,13 +1734,13 @@ export const useTestRule = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof testRule>>,
TError,
TestRuleMutationVariables,
{ data?: BodyType<RuletypesPostableRuleDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof testRule>>,
TError,
TestRuleMutationVariables,
{ data?: BodyType<RuletypesPostableRuleDTO> },
TContext
> => {
return useMutation(getTestRuleMutationOptions(options));
@@ -1863,7 +1825,7 @@ export function useListRulesV3<
}
/**
* @summary Invalidates the {@link useListRulesV3} query
* @summary List alert rules (v3)
*/
export const invalidateListRulesV3 = async (
queryClient: QueryClient,

View File

@@ -17,25 +17,18 @@ import type {
UseQueryResult,
} from 'react-query';
import type { CreateSavedView201 } from '../sigNoz.schemas/createSavedView201';
import type { DeleteSavedViewPathParameters } from '../sigNoz.schemas/deleteSavedViewPathParameters';
import type { GetSavedView200 } from '../sigNoz.schemas/getSavedView200';
import type { GetSavedViewPathParameters } from '../sigNoz.schemas/getSavedViewPathParameters';
import type { ListSavedViews200 } from '../sigNoz.schemas/listSavedViews200';
import type { ListSavedViewsParams } from '../sigNoz.schemas/listSavedViewsParams';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type { SavedviewtypesPostableSavedViewDTO } from '../sigNoz.schemas/savedviewtypesPostableSavedViewDTO';
import type { SavedviewtypesUpdatableSavedViewDTO } from '../sigNoz.schemas/savedviewtypesUpdatableSavedViewDTO';
import type { UpdateSavedViewPathParameters } from '../sigNoz.schemas/updateSavedViewPathParameters';
import type {
CreateSavedView201,
DeleteSavedViewPathParameters,
GetSavedView200,
GetSavedViewPathParameters,
ListSavedViews200,
ListSavedViewsParams,
RenderErrorResponseDTO,
SavedviewtypesPostableSavedViewDTO,
SavedviewtypesUpdatableSavedViewDTO,
UpdateSavedViewPathParameters,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
@@ -140,7 +133,7 @@ export function useListSavedViews<
}
/**
* @summary Invalidates the {@link useListSavedViews} query
* @summary List saved views
*/
export const invalidateListSavedViews = async (
queryClient: QueryClient,
@@ -172,8 +165,6 @@ export const createSavedView = (
});
};
export const getCreateSavedViewMutationKey = () => ['createSavedView'] as const;
export const getCreateSavedViewMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -181,16 +172,16 @@ export const getCreateSavedViewMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createSavedView>>,
TError,
CreateSavedViewMutationVariables,
{ data?: BodyType<SavedviewtypesPostableSavedViewDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createSavedView>>,
TError,
CreateSavedViewMutationVariables,
{ data?: BodyType<SavedviewtypesPostableSavedViewDTO> },
TContext
> => {
const mutationKey = getCreateSavedViewMutationKey();
const mutationKey = ['createSavedView'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -201,7 +192,7 @@ export const getCreateSavedViewMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createSavedView>>,
CreateSavedViewMutationVariables
{ data?: BodyType<SavedviewtypesPostableSavedViewDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -218,9 +209,6 @@ export type CreateSavedViewMutationBody =
| BodyType<SavedviewtypesPostableSavedViewDTO>
| undefined;
export type CreateSavedViewMutationError = ErrorType<RenderErrorResponseDTO>;
export type CreateSavedViewMutationVariables = {
data?: BodyType<SavedviewtypesPostableSavedViewDTO>;
};
/**
* @summary Create saved view
@@ -232,13 +220,13 @@ export const useCreateSavedView = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createSavedView>>,
TError,
CreateSavedViewMutationVariables,
{ data?: BodyType<SavedviewtypesPostableSavedViewDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createSavedView>>,
TError,
CreateSavedViewMutationVariables,
{ data?: BodyType<SavedviewtypesPostableSavedViewDTO> },
TContext
> => {
return useMutation(getCreateSavedViewMutationOptions(options));
@@ -258,8 +246,6 @@ export const deleteSavedView = (
});
};
export const getDeleteSavedViewMutationKey = () => ['deleteSavedView'] as const;
export const getDeleteSavedViewMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -267,16 +253,16 @@ export const getDeleteSavedViewMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteSavedView>>,
TError,
DeleteSavedViewMutationVariables,
{ pathParams: DeleteSavedViewPathParameters },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof deleteSavedView>>,
TError,
DeleteSavedViewMutationVariables,
{ pathParams: DeleteSavedViewPathParameters },
TContext
> => {
const mutationKey = getDeleteSavedViewMutationKey();
const mutationKey = ['deleteSavedView'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -287,7 +273,7 @@ export const getDeleteSavedViewMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof deleteSavedView>>,
DeleteSavedViewMutationVariables
{ pathParams: DeleteSavedViewPathParameters }
> = (props) => {
const { pathParams } = props ?? {};
@@ -302,9 +288,6 @@ export type DeleteSavedViewMutationResult = NonNullable<
>;
export type DeleteSavedViewMutationError = ErrorType<RenderErrorResponseDTO>;
export type DeleteSavedViewMutationVariables = {
pathParams: DeleteSavedViewPathParameters;
};
/**
* @summary Delete saved view
@@ -316,13 +299,13 @@ export const useDeleteSavedView = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteSavedView>>,
TError,
DeleteSavedViewMutationVariables,
{ pathParams: DeleteSavedViewPathParameters },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof deleteSavedView>>,
TError,
DeleteSavedViewMutationVariables,
{ pathParams: DeleteSavedViewPathParameters },
TContext
> => {
return useMutation(getDeleteSavedViewMutationOptions(options));
@@ -411,7 +394,7 @@ export function useGetSavedView<
}
/**
* @summary Invalidates the {@link useGetSavedView} query
* @summary Get saved view
*/
export const invalidateGetSavedView = async (
queryClient: QueryClient,
@@ -444,8 +427,6 @@ export const updateSavedView = (
});
};
export const getUpdateSavedViewMutationKey = () => ['updateSavedView'] as const;
export const getUpdateSavedViewMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -453,16 +434,22 @@ export const getUpdateSavedViewMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateSavedView>>,
TError,
UpdateSavedViewMutationVariables,
{
pathParams: UpdateSavedViewPathParameters;
data?: BodyType<SavedviewtypesUpdatableSavedViewDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateSavedView>>,
TError,
UpdateSavedViewMutationVariables,
{
pathParams: UpdateSavedViewPathParameters;
data?: BodyType<SavedviewtypesUpdatableSavedViewDTO>;
},
TContext
> => {
const mutationKey = getUpdateSavedViewMutationKey();
const mutationKey = ['updateSavedView'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -473,7 +460,10 @@ export const getUpdateSavedViewMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateSavedView>>,
UpdateSavedViewMutationVariables
{
pathParams: UpdateSavedViewPathParameters;
data?: BodyType<SavedviewtypesUpdatableSavedViewDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -490,10 +480,6 @@ export type UpdateSavedViewMutationBody =
| BodyType<SavedviewtypesUpdatableSavedViewDTO>
| undefined;
export type UpdateSavedViewMutationError = ErrorType<RenderErrorResponseDTO>;
export type UpdateSavedViewMutationVariables = {
pathParams: UpdateSavedViewPathParameters;
data?: BodyType<SavedviewtypesUpdatableSavedViewDTO>;
};
/**
* @summary Update saved view
@@ -505,13 +491,19 @@ export const useUpdateSavedView = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateSavedView>>,
TError,
UpdateSavedViewMutationVariables,
{
pathParams: UpdateSavedViewPathParameters;
data?: BodyType<SavedviewtypesUpdatableSavedViewDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateSavedView>>,
TError,
UpdateSavedViewMutationVariables,
{
pathParams: UpdateSavedViewPathParameters;
data?: BodyType<SavedviewtypesUpdatableSavedViewDTO>;
},
TContext
> => {
return useMutation(getUpdateSavedViewMutationOptions(options));

View File

@@ -17,55 +17,33 @@ import type {
UseQueryResult,
} from 'react-query';
import type { CreateServiceAccount201 } from '../sigNoz.schemas/createServiceAccount201';
import type { CreateServiceAccountKey201 } from '../sigNoz.schemas/createServiceAccountKey201';
import type { CreateServiceAccountKeyPathParameters } from '../sigNoz.schemas/createServiceAccountKeyPathParameters';
import type { CreateServiceAccountRole201 } from '../sigNoz.schemas/createServiceAccountRole201';
import type { DeleteServiceAccountPathParameters } from '../sigNoz.schemas/deleteServiceAccountPathParameters';
import type { DeleteServiceAccountRolePathParameters } from '../sigNoz.schemas/deleteServiceAccountRolePathParameters';
import type { GetMyServiceAccount200 } from '../sigNoz.schemas/getMyServiceAccount200';
import type { GetServiceAccount200 } from '../sigNoz.schemas/getServiceAccount200';
import type { GetServiceAccountPathParameters } from '../sigNoz.schemas/getServiceAccountPathParameters';
import type { GetServiceAccountRole200 } from '../sigNoz.schemas/getServiceAccountRole200';
import type { GetServiceAccountRolePathParameters } from '../sigNoz.schemas/getServiceAccountRolePathParameters';
import type { GetServiceAccountRoles200 } from '../sigNoz.schemas/getServiceAccountRoles200';
import type { GetServiceAccountRolesPathParameters } from '../sigNoz.schemas/getServiceAccountRolesPathParameters';
import type { ListServiceAccountKeys200 } from '../sigNoz.schemas/listServiceAccountKeys200';
import type { ListServiceAccountKeysPathParameters } from '../sigNoz.schemas/listServiceAccountKeysPathParameters';
import type { ListServiceAccounts200 } from '../sigNoz.schemas/listServiceAccounts200';
import type { ListServiceAccountsParams } from '../sigNoz.schemas/listServiceAccountsParams';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type { RevokeServiceAccountKeyPathParameters } from '../sigNoz.schemas/revokeServiceAccountKeyPathParameters';
import type { ServiceaccounttypesPostableFactorAPIKeyDTO } from '../sigNoz.schemas/serviceaccounttypesPostableFactorAPIKeyDTO';
import type { ServiceaccounttypesPostableServiceAccountDTO } from '../sigNoz.schemas/serviceaccounttypesPostableServiceAccountDTO';
import type { ServiceaccounttypesPostableServiceAccountRoleDTO } from '../sigNoz.schemas/serviceaccounttypesPostableServiceAccountRoleDTO';
import type { ServiceaccounttypesUpdatableFactorAPIKeyDTO } from '../sigNoz.schemas/serviceaccounttypesUpdatableFactorAPIKeyDTO';
import type { UpdateServiceAccountKeyPathParameters } from '../sigNoz.schemas/updateServiceAccountKeyPathParameters';
import type { UpdateServiceAccountPathParameters } from '../sigNoz.schemas/updateServiceAccountPathParameters';
import type {
CreateServiceAccount201,
CreateServiceAccountKey201,
CreateServiceAccountKeyPathParameters,
CreateServiceAccountRole201,
DeleteServiceAccountPathParameters,
DeleteServiceAccountRolePathParameters,
GetMyServiceAccount200,
GetServiceAccount200,
GetServiceAccountPathParameters,
GetServiceAccountRole200,
GetServiceAccountRolePathParameters,
GetServiceAccountRoles200,
GetServiceAccountRolesPathParameters,
ListServiceAccountKeys200,
ListServiceAccountKeysPathParameters,
ListServiceAccounts200,
ListServiceAccountsParams,
RenderErrorResponseDTO,
RevokeServiceAccountKeyPathParameters,
ServiceaccounttypesPostableFactorAPIKeyDTO,
ServiceaccounttypesPostableServiceAccountDTO,
ServiceaccounttypesPostableServiceAccountRoleDTO,
ServiceaccounttypesUpdatableFactorAPIKeyDTO,
UpdateServiceAccountKeyPathParameters,
UpdateServiceAccountPathParameters,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
@@ -107,9 +85,6 @@ export const createServiceAccountRole = (
});
};
export const getCreateServiceAccountRoleMutationKey = () =>
['createServiceAccountRole'] as const;
export const getCreateServiceAccountRoleMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -117,16 +92,16 @@ export const getCreateServiceAccountRoleMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createServiceAccountRole>>,
TError,
CreateServiceAccountRoleMutationVariables,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountRoleDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createServiceAccountRole>>,
TError,
CreateServiceAccountRoleMutationVariables,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountRoleDTO> },
TContext
> => {
const mutationKey = getCreateServiceAccountRoleMutationKey();
const mutationKey = ['createServiceAccountRole'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -137,7 +112,7 @@ export const getCreateServiceAccountRoleMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createServiceAccountRole>>,
CreateServiceAccountRoleMutationVariables
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountRoleDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -155,9 +130,6 @@ export type CreateServiceAccountRoleMutationBody =
| undefined;
export type CreateServiceAccountRoleMutationError =
ErrorType<RenderErrorResponseDTO>;
export type CreateServiceAccountRoleMutationVariables = {
data?: BodyType<ServiceaccounttypesPostableServiceAccountRoleDTO>;
};
/**
* @summary Create service account role
@@ -169,13 +141,13 @@ export const useCreateServiceAccountRole = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createServiceAccountRole>>,
TError,
CreateServiceAccountRoleMutationVariables,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountRoleDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createServiceAccountRole>>,
TError,
CreateServiceAccountRoleMutationVariables,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountRoleDTO> },
TContext
> => {
return useMutation(getCreateServiceAccountRoleMutationOptions(options));
@@ -195,9 +167,6 @@ export const deleteServiceAccountRole = (
});
};
export const getDeleteServiceAccountRoleMutationKey = () =>
['deleteServiceAccountRole'] as const;
export const getDeleteServiceAccountRoleMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -205,16 +174,16 @@ export const getDeleteServiceAccountRoleMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteServiceAccountRole>>,
TError,
DeleteServiceAccountRoleMutationVariables,
{ pathParams: DeleteServiceAccountRolePathParameters },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof deleteServiceAccountRole>>,
TError,
DeleteServiceAccountRoleMutationVariables,
{ pathParams: DeleteServiceAccountRolePathParameters },
TContext
> => {
const mutationKey = getDeleteServiceAccountRoleMutationKey();
const mutationKey = ['deleteServiceAccountRole'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -225,7 +194,7 @@ export const getDeleteServiceAccountRoleMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof deleteServiceAccountRole>>,
DeleteServiceAccountRoleMutationVariables
{ pathParams: DeleteServiceAccountRolePathParameters }
> = (props) => {
const { pathParams } = props ?? {};
@@ -241,9 +210,6 @@ export type DeleteServiceAccountRoleMutationResult = NonNullable<
export type DeleteServiceAccountRoleMutationError =
ErrorType<RenderErrorResponseDTO>;
export type DeleteServiceAccountRoleMutationVariables = {
pathParams: DeleteServiceAccountRolePathParameters;
};
/**
* @summary Delete service account role
@@ -255,13 +221,13 @@ export const useDeleteServiceAccountRole = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteServiceAccountRole>>,
TError,
DeleteServiceAccountRoleMutationVariables,
{ pathParams: DeleteServiceAccountRolePathParameters },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof deleteServiceAccountRole>>,
TError,
DeleteServiceAccountRoleMutationVariables,
{ pathParams: DeleteServiceAccountRolePathParameters },
TContext
> => {
return useMutation(getDeleteServiceAccountRoleMutationOptions(options));
@@ -353,7 +319,7 @@ export function useGetServiceAccountRole<
}
/**
* @summary Invalidates the {@link useGetServiceAccountRole} query
* @summary Get service account role
*/
export const invalidateGetServiceAccountRole = async (
queryClient: QueryClient,
@@ -451,7 +417,7 @@ export function useListServiceAccounts<
}
/**
* @summary Invalidates the {@link useListServiceAccounts} query
* @summary List service accounts
*/
export const invalidateListServiceAccounts = async (
queryClient: QueryClient,
@@ -483,9 +449,6 @@ export const createServiceAccount = (
});
};
export const getCreateServiceAccountMutationKey = () =>
['createServiceAccount'] as const;
export const getCreateServiceAccountMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -493,16 +456,16 @@ export const getCreateServiceAccountMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createServiceAccount>>,
TError,
CreateServiceAccountMutationVariables,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createServiceAccount>>,
TError,
CreateServiceAccountMutationVariables,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> },
TContext
> => {
const mutationKey = getCreateServiceAccountMutationKey();
const mutationKey = ['createServiceAccount'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -513,7 +476,7 @@ export const getCreateServiceAccountMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createServiceAccount>>,
CreateServiceAccountMutationVariables
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -531,9 +494,6 @@ export type CreateServiceAccountMutationBody =
| undefined;
export type CreateServiceAccountMutationError =
ErrorType<RenderErrorResponseDTO>;
export type CreateServiceAccountMutationVariables = {
data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO>;
};
/**
* @summary Create service account
@@ -545,13 +505,13 @@ export const useCreateServiceAccount = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createServiceAccount>>,
TError,
CreateServiceAccountMutationVariables,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createServiceAccount>>,
TError,
CreateServiceAccountMutationVariables,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> },
TContext
> => {
return useMutation(getCreateServiceAccountMutationOptions(options));
@@ -571,9 +531,6 @@ export const deleteServiceAccount = (
});
};
export const getDeleteServiceAccountMutationKey = () =>
['deleteServiceAccount'] as const;
export const getDeleteServiceAccountMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -581,16 +538,16 @@ export const getDeleteServiceAccountMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteServiceAccount>>,
TError,
DeleteServiceAccountMutationVariables,
{ pathParams: DeleteServiceAccountPathParameters },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof deleteServiceAccount>>,
TError,
DeleteServiceAccountMutationVariables,
{ pathParams: DeleteServiceAccountPathParameters },
TContext
> => {
const mutationKey = getDeleteServiceAccountMutationKey();
const mutationKey = ['deleteServiceAccount'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -601,7 +558,7 @@ export const getDeleteServiceAccountMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof deleteServiceAccount>>,
DeleteServiceAccountMutationVariables
{ pathParams: DeleteServiceAccountPathParameters }
> = (props) => {
const { pathParams } = props ?? {};
@@ -617,9 +574,6 @@ export type DeleteServiceAccountMutationResult = NonNullable<
export type DeleteServiceAccountMutationError =
ErrorType<RenderErrorResponseDTO>;
export type DeleteServiceAccountMutationVariables = {
pathParams: DeleteServiceAccountPathParameters;
};
/**
* @summary Deletes a service account
@@ -631,13 +585,13 @@ export const useDeleteServiceAccount = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteServiceAccount>>,
TError,
DeleteServiceAccountMutationVariables,
{ pathParams: DeleteServiceAccountPathParameters },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof deleteServiceAccount>>,
TError,
DeleteServiceAccountMutationVariables,
{ pathParams: DeleteServiceAccountPathParameters },
TContext
> => {
return useMutation(getDeleteServiceAccountMutationOptions(options));
@@ -729,7 +683,7 @@ export function useGetServiceAccount<
}
/**
* @summary Invalidates the {@link useGetServiceAccount} query
* @summary Gets a service account
*/
export const invalidateGetServiceAccount = async (
queryClient: QueryClient,
@@ -762,9 +716,6 @@ export const updateServiceAccount = (
});
};
export const getUpdateServiceAccountMutationKey = () =>
['updateServiceAccount'] as const;
export const getUpdateServiceAccountMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -772,16 +723,22 @@ export const getUpdateServiceAccountMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateServiceAccount>>,
TError,
UpdateServiceAccountMutationVariables,
{
pathParams: UpdateServiceAccountPathParameters;
data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateServiceAccount>>,
TError,
UpdateServiceAccountMutationVariables,
{
pathParams: UpdateServiceAccountPathParameters;
data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO>;
},
TContext
> => {
const mutationKey = getUpdateServiceAccountMutationKey();
const mutationKey = ['updateServiceAccount'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -792,7 +749,10 @@ export const getUpdateServiceAccountMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateServiceAccount>>,
UpdateServiceAccountMutationVariables
{
pathParams: UpdateServiceAccountPathParameters;
data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -810,10 +770,6 @@ export type UpdateServiceAccountMutationBody =
| undefined;
export type UpdateServiceAccountMutationError =
ErrorType<RenderErrorResponseDTO>;
export type UpdateServiceAccountMutationVariables = {
pathParams: UpdateServiceAccountPathParameters;
data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO>;
};
/**
* @summary Updates a service account
@@ -825,13 +781,19 @@ export const useUpdateServiceAccount = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateServiceAccount>>,
TError,
UpdateServiceAccountMutationVariables,
{
pathParams: UpdateServiceAccountPathParameters;
data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateServiceAccount>>,
TError,
UpdateServiceAccountMutationVariables,
{
pathParams: UpdateServiceAccountPathParameters;
data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO>;
},
TContext
> => {
return useMutation(getUpdateServiceAccountMutationOptions(options));
@@ -924,7 +886,7 @@ export function useListServiceAccountKeys<
}
/**
* @summary Invalidates the {@link useListServiceAccountKeys} query
* @summary List service account keys
*/
export const invalidateListServiceAccountKeys = async (
queryClient: QueryClient,
@@ -957,9 +919,6 @@ export const createServiceAccountKey = (
});
};
export const getCreateServiceAccountKeyMutationKey = () =>
['createServiceAccountKey'] as const;
export const getCreateServiceAccountKeyMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -967,16 +926,22 @@ export const getCreateServiceAccountKeyMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createServiceAccountKey>>,
TError,
CreateServiceAccountKeyMutationVariables,
{
pathParams: CreateServiceAccountKeyPathParameters;
data?: BodyType<ServiceaccounttypesPostableFactorAPIKeyDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createServiceAccountKey>>,
TError,
CreateServiceAccountKeyMutationVariables,
{
pathParams: CreateServiceAccountKeyPathParameters;
data?: BodyType<ServiceaccounttypesPostableFactorAPIKeyDTO>;
},
TContext
> => {
const mutationKey = getCreateServiceAccountKeyMutationKey();
const mutationKey = ['createServiceAccountKey'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -987,7 +952,10 @@ export const getCreateServiceAccountKeyMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createServiceAccountKey>>,
CreateServiceAccountKeyMutationVariables
{
pathParams: CreateServiceAccountKeyPathParameters;
data?: BodyType<ServiceaccounttypesPostableFactorAPIKeyDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -1005,10 +973,6 @@ export type CreateServiceAccountKeyMutationBody =
| undefined;
export type CreateServiceAccountKeyMutationError =
ErrorType<RenderErrorResponseDTO>;
export type CreateServiceAccountKeyMutationVariables = {
pathParams: CreateServiceAccountKeyPathParameters;
data?: BodyType<ServiceaccounttypesPostableFactorAPIKeyDTO>;
};
/**
* @summary Create a service account key
@@ -1020,13 +984,19 @@ export const useCreateServiceAccountKey = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createServiceAccountKey>>,
TError,
CreateServiceAccountKeyMutationVariables,
{
pathParams: CreateServiceAccountKeyPathParameters;
data?: BodyType<ServiceaccounttypesPostableFactorAPIKeyDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createServiceAccountKey>>,
TError,
CreateServiceAccountKeyMutationVariables,
{
pathParams: CreateServiceAccountKeyPathParameters;
data?: BodyType<ServiceaccounttypesPostableFactorAPIKeyDTO>;
},
TContext
> => {
return useMutation(getCreateServiceAccountKeyMutationOptions(options));
@@ -1046,9 +1016,6 @@ export const revokeServiceAccountKey = (
});
};
export const getRevokeServiceAccountKeyMutationKey = () =>
['revokeServiceAccountKey'] as const;
export const getRevokeServiceAccountKeyMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -1056,16 +1023,16 @@ export const getRevokeServiceAccountKeyMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof revokeServiceAccountKey>>,
TError,
RevokeServiceAccountKeyMutationVariables,
{ pathParams: RevokeServiceAccountKeyPathParameters },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof revokeServiceAccountKey>>,
TError,
RevokeServiceAccountKeyMutationVariables,
{ pathParams: RevokeServiceAccountKeyPathParameters },
TContext
> => {
const mutationKey = getRevokeServiceAccountKeyMutationKey();
const mutationKey = ['revokeServiceAccountKey'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -1076,7 +1043,7 @@ export const getRevokeServiceAccountKeyMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof revokeServiceAccountKey>>,
RevokeServiceAccountKeyMutationVariables
{ pathParams: RevokeServiceAccountKeyPathParameters }
> = (props) => {
const { pathParams } = props ?? {};
@@ -1092,9 +1059,6 @@ export type RevokeServiceAccountKeyMutationResult = NonNullable<
export type RevokeServiceAccountKeyMutationError =
ErrorType<RenderErrorResponseDTO>;
export type RevokeServiceAccountKeyMutationVariables = {
pathParams: RevokeServiceAccountKeyPathParameters;
};
/**
* @summary Revoke a service account key
@@ -1106,13 +1070,13 @@ export const useRevokeServiceAccountKey = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof revokeServiceAccountKey>>,
TError,
RevokeServiceAccountKeyMutationVariables,
{ pathParams: RevokeServiceAccountKeyPathParameters },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof revokeServiceAccountKey>>,
TError,
RevokeServiceAccountKeyMutationVariables,
{ pathParams: RevokeServiceAccountKeyPathParameters },
TContext
> => {
return useMutation(getRevokeServiceAccountKeyMutationOptions(options));
@@ -1135,9 +1099,6 @@ export const updateServiceAccountKey = (
});
};
export const getUpdateServiceAccountKeyMutationKey = () =>
['updateServiceAccountKey'] as const;
export const getUpdateServiceAccountKeyMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -1145,16 +1106,22 @@ export const getUpdateServiceAccountKeyMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateServiceAccountKey>>,
TError,
UpdateServiceAccountKeyMutationVariables,
{
pathParams: UpdateServiceAccountKeyPathParameters;
data?: BodyType<ServiceaccounttypesUpdatableFactorAPIKeyDTO>;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateServiceAccountKey>>,
TError,
UpdateServiceAccountKeyMutationVariables,
{
pathParams: UpdateServiceAccountKeyPathParameters;
data?: BodyType<ServiceaccounttypesUpdatableFactorAPIKeyDTO>;
},
TContext
> => {
const mutationKey = getUpdateServiceAccountKeyMutationKey();
const mutationKey = ['updateServiceAccountKey'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -1165,7 +1132,10 @@ export const getUpdateServiceAccountKeyMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateServiceAccountKey>>,
UpdateServiceAccountKeyMutationVariables
{
pathParams: UpdateServiceAccountKeyPathParameters;
data?: BodyType<ServiceaccounttypesUpdatableFactorAPIKeyDTO>;
}
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -1183,10 +1153,6 @@ export type UpdateServiceAccountKeyMutationBody =
| undefined;
export type UpdateServiceAccountKeyMutationError =
ErrorType<RenderErrorResponseDTO>;
export type UpdateServiceAccountKeyMutationVariables = {
pathParams: UpdateServiceAccountKeyPathParameters;
data?: BodyType<ServiceaccounttypesUpdatableFactorAPIKeyDTO>;
};
/**
* @summary Updates a service account key
@@ -1198,13 +1164,19 @@ export const useUpdateServiceAccountKey = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateServiceAccountKey>>,
TError,
UpdateServiceAccountKeyMutationVariables,
{
pathParams: UpdateServiceAccountKeyPathParameters;
data?: BodyType<ServiceaccounttypesUpdatableFactorAPIKeyDTO>;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateServiceAccountKey>>,
TError,
UpdateServiceAccountKeyMutationVariables,
{
pathParams: UpdateServiceAccountKeyPathParameters;
data?: BodyType<ServiceaccounttypesUpdatableFactorAPIKeyDTO>;
},
TContext
> => {
return useMutation(getUpdateServiceAccountKeyMutationOptions(options));
@@ -1297,7 +1269,7 @@ export function useGetServiceAccountRoles<
}
/**
* @summary Invalidates the {@link useGetServiceAccountRoles} query
* @summary Gets service account roles
*/
export const invalidateGetServiceAccountRoles = async (
queryClient: QueryClient,
@@ -1382,7 +1354,7 @@ export function useGetMyServiceAccount<
}
/**
* @summary Invalidates the {@link useGetMyServiceAccount} query
* @summary Gets my service account
*/
export const invalidateGetMyServiceAccount = async (
queryClient: QueryClient,
@@ -1413,9 +1385,6 @@ export const updateMyServiceAccount = (
});
};
export const getUpdateMyServiceAccountMutationKey = () =>
['updateMyServiceAccount'] as const;
export const getUpdateMyServiceAccountMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -1423,16 +1392,16 @@ export const getUpdateMyServiceAccountMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateMyServiceAccount>>,
TError,
UpdateMyServiceAccountMutationVariables,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateMyServiceAccount>>,
TError,
UpdateMyServiceAccountMutationVariables,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> },
TContext
> => {
const mutationKey = getUpdateMyServiceAccountMutationKey();
const mutationKey = ['updateMyServiceAccount'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -1443,7 +1412,7 @@ export const getUpdateMyServiceAccountMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateMyServiceAccount>>,
UpdateMyServiceAccountMutationVariables
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -1461,9 +1430,6 @@ export type UpdateMyServiceAccountMutationBody =
| undefined;
export type UpdateMyServiceAccountMutationError =
ErrorType<RenderErrorResponseDTO>;
export type UpdateMyServiceAccountMutationVariables = {
data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO>;
};
/**
* @summary Updates my service account
@@ -1475,13 +1441,13 @@ export const useUpdateMyServiceAccount = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateMyServiceAccount>>,
TError,
UpdateMyServiceAccountMutationVariables,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateMyServiceAccount>>,
TError,
UpdateMyServiceAccountMutationVariables,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> },
TContext
> => {
return useMutation(getUpdateMyServiceAccountMutationOptions(options));

View File

@@ -17,27 +17,19 @@ import type {
UseQueryResult,
} from 'react-query';
import type { AuthtypesPostableEmailPasswordSessionDTO } from '../sigNoz.schemas/authtypesPostableEmailPasswordSessionDTO';
import type { AuthtypesPostableRotateTokenDTO } from '../sigNoz.schemas/authtypesPostableRotateTokenDTO';
import type { CreateSessionByEmailPassword200 } from '../sigNoz.schemas/createSessionByEmailPassword200';
import type { CreateSessionByGoogleCallback303 } from '../sigNoz.schemas/createSessionByGoogleCallback303';
import type { CreateSessionByOIDCCallback303 } from '../sigNoz.schemas/createSessionByOIDCCallback303';
import type { CreateSessionBySAMLCallback303 } from '../sigNoz.schemas/createSessionBySAMLCallback303';
import type { CreateSessionBySAMLCallbackBody } from '../sigNoz.schemas/createSessionBySAMLCallbackBody';
import type { CreateSessionBySAMLCallbackParams } from '../sigNoz.schemas/createSessionBySAMLCallbackParams';
import type { GetSessionContext200 } from '../sigNoz.schemas/getSessionContext200';
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
import type { RotateSession200 } from '../sigNoz.schemas/rotateSession200';
import type {
AuthtypesPostableEmailPasswordSessionDTO,
AuthtypesPostableRotateTokenDTO,
CreateSessionByEmailPassword200,
CreateSessionByGoogleCallback303,
CreateSessionByOIDCCallback303,
CreateSessionBySAMLCallback303,
CreateSessionBySAMLCallbackBody,
CreateSessionBySAMLCallbackParams,
GetSessionContext200,
RenderErrorResponseDTO,
RotateSession200,
} from '../sigNoz.schemas';
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
@@ -135,7 +127,7 @@ export function useCreateSessionByGoogleCallback<
}
/**
* @summary Invalidates the {@link useCreateSessionByGoogleCallback} query
* @summary Create session by google callback
*/
export const invalidateCreateSessionByGoogleCallback = async (
queryClient: QueryClient,
@@ -222,7 +214,7 @@ export function useCreateSessionByOIDCCallback<
}
/**
* @summary Invalidates the {@link useCreateSessionByOIDCCallback} query
* @summary Create session by oidc callback
*/
export const invalidateCreateSessionByOIDCCallback = async (
queryClient: QueryClient,
@@ -269,9 +261,6 @@ export const createSessionBySAMLCallback = (
});
};
export const getCreateSessionBySAMLCallbackMutationKey = () =>
['createSessionBySAMLCallback'] as const;
export const getCreateSessionBySAMLCallbackMutationOptions = <
TError = ErrorType<CreateSessionBySAMLCallback303 | RenderErrorResponseDTO>,
TContext = unknown,
@@ -279,16 +268,22 @@ export const getCreateSessionBySAMLCallbackMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createSessionBySAMLCallback>>,
TError,
CreateSessionBySAMLCallbackMutationVariables,
{
data?: BodyType<CreateSessionBySAMLCallbackBody>;
params?: CreateSessionBySAMLCallbackParams;
},
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createSessionBySAMLCallback>>,
TError,
CreateSessionBySAMLCallbackMutationVariables,
{
data?: BodyType<CreateSessionBySAMLCallbackBody>;
params?: CreateSessionBySAMLCallbackParams;
},
TContext
> => {
const mutationKey = getCreateSessionBySAMLCallbackMutationKey();
const mutationKey = ['createSessionBySAMLCallback'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -299,7 +294,10 @@ export const getCreateSessionBySAMLCallbackMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createSessionBySAMLCallback>>,
CreateSessionBySAMLCallbackMutationVariables
{
data?: BodyType<CreateSessionBySAMLCallbackBody>;
params?: CreateSessionBySAMLCallbackParams;
}
> = (props) => {
const { data, params } = props ?? {};
@@ -318,10 +316,6 @@ export type CreateSessionBySAMLCallbackMutationBody =
export type CreateSessionBySAMLCallbackMutationError = ErrorType<
CreateSessionBySAMLCallback303 | RenderErrorResponseDTO
>;
export type CreateSessionBySAMLCallbackMutationVariables = {
data?: BodyType<CreateSessionBySAMLCallbackBody>;
params?: CreateSessionBySAMLCallbackParams;
};
/**
* @summary Create session by saml callback
@@ -333,13 +327,19 @@ export const useCreateSessionBySAMLCallback = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createSessionBySAMLCallback>>,
TError,
CreateSessionBySAMLCallbackMutationVariables,
{
data?: BodyType<CreateSessionBySAMLCallbackBody>;
params?: CreateSessionBySAMLCallbackParams;
},
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createSessionBySAMLCallback>>,
TError,
CreateSessionBySAMLCallbackMutationVariables,
{
data?: BodyType<CreateSessionBySAMLCallbackBody>;
params?: CreateSessionBySAMLCallbackParams;
},
TContext
> => {
return useMutation(getCreateSessionBySAMLCallbackMutationOptions(options));
@@ -356,8 +356,6 @@ export const deleteSession = (signal?: AbortSignal) => {
});
};
export const getDeleteSessionMutationKey = () => ['deleteSession'] as const;
export const getDeleteSessionMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -374,7 +372,7 @@ export const getDeleteSessionMutationOptions = <
void,
TContext
> => {
const mutationKey = getDeleteSessionMutationKey();
const mutationKey = ['deleteSession'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -490,7 +488,7 @@ export function useGetSessionContext<
}
/**
* @summary Invalidates the {@link useGetSessionContext} query
* @summary Get session context
*/
export const invalidateGetSessionContext = async (
queryClient: QueryClient,
@@ -521,9 +519,6 @@ export const createSessionByEmailPassword = (
});
};
export const getCreateSessionByEmailPasswordMutationKey = () =>
['createSessionByEmailPassword'] as const;
export const getCreateSessionByEmailPasswordMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -531,16 +526,16 @@ export const getCreateSessionByEmailPasswordMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createSessionByEmailPassword>>,
TError,
CreateSessionByEmailPasswordMutationVariables,
{ data?: BodyType<AuthtypesPostableEmailPasswordSessionDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createSessionByEmailPassword>>,
TError,
CreateSessionByEmailPasswordMutationVariables,
{ data?: BodyType<AuthtypesPostableEmailPasswordSessionDTO> },
TContext
> => {
const mutationKey = getCreateSessionByEmailPasswordMutationKey();
const mutationKey = ['createSessionByEmailPassword'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -551,7 +546,7 @@ export const getCreateSessionByEmailPasswordMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createSessionByEmailPassword>>,
CreateSessionByEmailPasswordMutationVariables
{ data?: BodyType<AuthtypesPostableEmailPasswordSessionDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -569,9 +564,6 @@ export type CreateSessionByEmailPasswordMutationBody =
| undefined;
export type CreateSessionByEmailPasswordMutationError =
ErrorType<RenderErrorResponseDTO>;
export type CreateSessionByEmailPasswordMutationVariables = {
data?: BodyType<AuthtypesPostableEmailPasswordSessionDTO>;
};
/**
* @summary Create session by email and password
@@ -583,13 +575,13 @@ export const useCreateSessionByEmailPassword = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createSessionByEmailPassword>>,
TError,
CreateSessionByEmailPasswordMutationVariables,
{ data?: BodyType<AuthtypesPostableEmailPasswordSessionDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createSessionByEmailPassword>>,
TError,
CreateSessionByEmailPasswordMutationVariables,
{ data?: BodyType<AuthtypesPostableEmailPasswordSessionDTO> },
TContext
> => {
return useMutation(getCreateSessionByEmailPasswordMutationOptions(options));
@@ -611,8 +603,6 @@ export const rotateSession = (
});
};
export const getRotateSessionMutationKey = () => ['rotateSession'] as const;
export const getRotateSessionMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -620,16 +610,16 @@ export const getRotateSessionMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof rotateSession>>,
TError,
RotateSessionMutationVariables,
{ data?: BodyType<AuthtypesPostableRotateTokenDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof rotateSession>>,
TError,
RotateSessionMutationVariables,
{ data?: BodyType<AuthtypesPostableRotateTokenDTO> },
TContext
> => {
const mutationKey = getRotateSessionMutationKey();
const mutationKey = ['rotateSession'];
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -640,7 +630,7 @@ export const getRotateSessionMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof rotateSession>>,
RotateSessionMutationVariables
{ data?: BodyType<AuthtypesPostableRotateTokenDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -657,9 +647,6 @@ export type RotateSessionMutationBody =
| BodyType<AuthtypesPostableRotateTokenDTO>
| undefined;
export type RotateSessionMutationError = ErrorType<RenderErrorResponseDTO>;
export type RotateSessionMutationVariables = {
data?: BodyType<AuthtypesPostableRotateTokenDTO>;
};
/**
* @summary Rotate session
@@ -671,13 +658,13 @@ export const useRotateSession = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof rotateSession>>,
TError,
RotateSessionMutationVariables,
{ data?: BodyType<AuthtypesPostableRotateTokenDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof rotateSession>>,
TError,
RotateSessionMutationVariables,
{ data?: BodyType<AuthtypesPostableRotateTokenDTO> },
TContext
> => {
return useMutation(getRotateSessionMutationOptions(options));

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +0,0 @@
/**
* ! Do not edit manually
* * The file has been auto-generated using Orval for SigNoz
* * regenerate with 'pnpm generate:api'
* SigNoz
*/
import type { TypesIdentifiableDTO } from './typesIdentifiableDTO';
export type ActivateLicense201 = {
data: TypesIdentifiableDTO;
/**
* @type string
*/
status: string;
};

View File

@@ -1,15 +0,0 @@
/**
* ! Do not edit manually
* * The file has been auto-generated using Orval for SigNoz
* * regenerate with 'pnpm generate:api'
* SigNoz
*/
import type { CloudintegrationtypesGettableAgentCheckInDTO } from './cloudintegrationtypesGettableAgentCheckInDTO';
export type AgentCheckIn200 = {
data: CloudintegrationtypesGettableAgentCheckInDTO;
/**
* @type string
*/
status: string;
};

View File

@@ -1,15 +0,0 @@
/**
* ! Do not edit manually
* * The file has been auto-generated using Orval for SigNoz
* * regenerate with 'pnpm generate:api'
* SigNoz
*/
import type { CloudintegrationtypesGettableAgentCheckInDTO } from './cloudintegrationtypesGettableAgentCheckInDTO';
export type AgentCheckInDeprecated200 = {
data: CloudintegrationtypesGettableAgentCheckInDTO;
/**
* @type string
*/
status: string;
};

View File

@@ -1,10 +0,0 @@
/**
* ! Do not edit manually
* * The file has been auto-generated using Orval for SigNoz
* * regenerate with 'pnpm generate:api'
* SigNoz
*/
export type AgentCheckInDeprecatedPathParameters = {
cloudProvider: string;
};

Some files were not shown because too many files have changed in this diff Show More