Compare commits

..

12 Commits

Author SHA1 Message Date
Vinícius Lourenço
4bbe752eac refactor(frontend): move PANEL_TYPES to its own module 2026-11-20 22:17:08 -03:00
Vinícius Lourenço
0b02685ca3 refactor(frontend): generate one file per api schema 2026-11-20 22:06:32 -03:00
Vinícius Lourenço
4213f41c53 refactor(frontend): import the query range payload as a type 2026-11-20 22:05:58 -03:00
Vinícius Lourenço
044de55d3f refactor(frontend): enforce type-only imports 2026-11-20 22:03:57 -03:00
Manika Malhotra
c47aadb714 feat(frontend): adopt reworked @signozhq/ui components across remaining areas (#13087)
Some checks are pending
build-staging / prepare (push) Waiting to run
build-staging / js-build (push) Blocked by required conditions
build-staging / go-build (push) Blocked by required conditions
build-staging / staging (push) Blocked by required conditions
cacheci / tests (push) Waiting to run
Release Drafter / update_release_draft (push) Waiting to run
#### Summary

> You can see the sbshot diff at:
https://pr-docs.viniciusl.com.br/signoz-v3-pr13087-1118

Closes https://github.com/SigNoz/uforge-pod/issues/6284

This PR moves the rest of the app onto the reworked SigNoz UI library
(0.4.0-rc.4) and the new design tokens. Inputs, selects, dialogs,
drawers, popovers, toasts and text now all come from the library, so a
later design change happens in one place instead of in overrides on each
page.

Pages should look and work as they do on main. If something looks
different and is not mentioned below, treat it as a bug.

#### What looks different

Text now uses Inter from the design tokens, so numbers and a few letters
look slightly different, and monospace text uses the system code font.
Truncated text shows its full value on hover. Error toasts stay on
screen until you dismiss them.

A few flows changed on purpose. Saving or renaming a view opens a dialog
instead of a small popover. The Kubernetes entity drawer has a
breadcrumb, so you can go back to the entity you came from.

#### How to review

The commits are grouped by area and named after the pod that owns it,
such as pulse-dashboards or events-traces, so each team can review only
its part. Shared components, the query builder and styles come first,
and the tests sit in the last three commits. Only the final commit
builds, because the library upgrade breaks every page at once.

On your pages, the things most likely to be off are field heights,
spacing, text that now wraps or truncates, and popups opened from inside
a drawer or dialog. Most pages have Storybook stories from #13493, which
this PR is stacked on.

#### What changed in the components

Each block below shows one component, with a before and after taken from
this PR.

<details>
<summary>Typography</summary>

Typography is now a single component. Instead of choosing between Text
and Title, you pick a variant (paragraph, label, uppercase or code), a
size and a weight. Capitals only come from the uppercase variant, and
"muted" is now "secondary". Text cut with an ellipsis shows the full
value in a tooltip.

```diff
- <Typography.Text className="total"> of {total}</Typography.Text>
+ <Typography variant="paragraph" size="base" weight="regular" color="inherit" as="span" textOverflow="wrap">
+   of {total}
+ </Typography>
```

</details>

<details>
<summary>Dialog and AlertDialog</summary>

Dialogs take a single close callback instead of an open-change handler,
and footers are split into a left and a right slot. Confirmations moved
from ConfirmDialog to AlertDialog. Library dialogs now sit above antd
modals.

```diff
- <ConfirmDialog
-   onOpenChange={(next): void => {
-     if (!next) {
-       handleDiscardCancel();
-     }
-   }}
-   confirmColor="danger"
+ <AlertDialog
+   color="danger"
```

</details>

<details>
<summary>Drawer</summary>

Drawers close the same way as dialogs. A drawer has to say whether it
blocks the page (a task) or sits beside it (an inspector), and how it
stacks over other drawers. A drawer can also show a breadcrumb trail,
which the Kubernetes entity drawer uses to step back.

```diff
- <DrawerWrapper
-   onOpenChange={(isOpen): void => {
-     if (!isOpen) {
-       onClose();
-     }
-   }}
+ <Drawer
+   type="task"
+   stack="overlay"
+   closePosition="start"
+   trail={trail}
+   onTrailSelect={handleTrailSelect}
+   onClose={onClose}
```

</details>

<details>
<summary>Popover</summary>

Popovers take their trigger as a prop instead of being assembled from
parts. The content unmounts when the popover closes.

```diff
- <Popover>
-   <PopoverTrigger asChild>{button}</PopoverTrigger>
-   <PopoverContent align="end">{content}</PopoverContent>
- </Popover>
+ <Popover nativeButton side="bottom" align="end" trigger={button}>
+   {content}
+ </Popover>
```

</details>

<details>
<summary>Input</summary>

Inputs no longer take a container class name. Wrap them, or use the
width and size props. The test id and data attributes now sit on the
outer frame, and the input element gets the same id with a "-field"
suffix. Number inputs use Input.Number, which hands back a number or
null, so the string parsing at call sites is gone.

```diff
- <Input
-   testId="panel-type-search"
-   containerClassName={styles.search}
- />
+ <div className={styles.search}>
+   <Input testId="panel-type-search" />
+ </div>
```

</details>

<details>
<summary>Select and Combobox</summary>

SelectSimple and ComboboxSimple are now Select and Combobox. They size
with a width prop instead of a class name, and take a placeholder. The
roles picker moved from antd Select to Combobox.

```diff
- <SelectSimple
-   className={styles.filtersBarSource}
+ <Select
+   width={160}
+   placeholder="Filter by source"
```

</details>

<details>
<summary>Toast</summary>

Toasts come from the library toast module. An error toast is now called
danger, and it needs an action because it stays until dismissed.

```diff
- toast.error('Failed to copy link');
+ toast.danger('Failed to copy link', { action: { label: 'Dismiss' } });
```

</details>

<details>
<summary>Callout</summary>

Callouts use color names (primary, danger, warning), take their text as
children and render links with Callout.Link.

```diff
- <Callout type="info" showIcon title="Store the key securely." />
+ <Callout color="primary" size="sm" icon={<SolidInfoCircle />}>
+   Store the key securely.
+ </Callout>
```

</details>

<details>
<summary>AlertStrip</summary>

The no-auth banner moved from our own persisted banner to the library
AlertStrip, which remembers when it was closed.

```diff
- <PersistedAnnouncementBanner type="warning" className={styles.banner}>
-   <a href={docsLink} rel="noreferrer">
+ <AlertStrip.CloseablePersisted color="warning" side={bottomSlot ? 'bottom' : 'top'}>
+   <AlertStrip.Link href={docsLink}>
```

</details>

<details>
<summary>Resizable</summary>

Resizable takes its panes as an items array instead of panel and handle
parts, and saves the layout under a storage key.

```diff
- <ResizablePanelGroup id="panel-editor-v2">
-   <ResizablePanel minSize="75%" maxSize="80%" defaultSize="80%">
+ <Resizable
+   orientation="horizontal"
+   storageKey="panel-editor-v2"
+   storage={layoutStorage}
+   items={[{ value: 'main', label: 'Preview and editor', minSize: '75%', maxSize: '80%' }]}
```

</details>

<details>
<summary>Breadcrumb</summary>

Breadcrumb takes an items array instead of list, item, link and
separator parts.

```diff
- <Breadcrumb>
-   <BreadcrumbList>
-     <BreadcrumbItem>
-       <BreadcrumbLink icon={<LayoutGrid size={14} />} href={dashboardPageLink}>
+ <Breadcrumb
+   testId="dashboard-page-breadcrumb"
+   items={[
+     { title: 'Dashboard', icon: <LayoutGrid size={14} />, href: dashboardPageLink },
+     { title },
+   ]}
+ />
```

</details>

<details>
<summary>Kbd</summary>

Kbd takes the key name as a value, and named keys render as glyphs
(Escape shows ⎋).

```diff
- <Kbd>Esc</Kbd>
+ <Kbd value="Escape" testId="pie-tooltip-escape-key" />
```

</details>

<details>
<summary>Smaller changes</summary>

Tabs and Toaster no longer accept a class name, so the styles moved to a
wrapper. Avatar needs a name, which it uses for the initials. List
headers show their count in a Badge, with a Skeleton while the count
loads.

</details>

#### Patterns in the code

<details>
<summary>Details</summary>

Most of the diff is text styling. About 2,500 font declarations left the
SCSS files. They were replaced by Typography props or, where a
stylesheet still needs them, by the new text-style tokens described in
the CSS modules guide. The old font size, weight and line height tokens
no longer exist in design tokens 2.7.0, and the legacy card background
is now surface-2.

```diff
- font-size: var(--font-size-sm);
- font-weight: var(--font-weight-normal);
+ font-size: var(--paragraph-base-400-font-size);
```

Tests find inputs through the "-field" id. They pick combobox options by
typing in the search box and pressing Enter, since jsdom cannot click
the new options. The e2e drivers have shared helpers for inputs,
comboboxes and toasts, described in tests/e2e/AGENTS.md.

```diff
- await user.click(await screen.findByLabelText('Roles'));
- await user.click(await screen.findByTitle('signoz-editor'));
+ await user.click(await screen.findByTestId('member-roles-select'));
+ await user.type(
+   await screen.findByTestId('member-roles-select-search'),
+   `${managedRoles[1].name}{Enter}`,
+ );
```

</details>

#### New lint rules

Text style now belongs to Typography, and two rules keep it there. Both
warn for now, because about 2,700 font declarations remain in SCSS.

- signoz/no-text-css (oxlint) flags font and text properties in style
props, CSSProperties objects and styled-components.
- Stylelint flags the same properties in SCSS.

You can disable either rule where Typography cannot render the text,
such as canvas or chart labels. The disable must say why after "--", or
it fails as an error.

<details>
<summary>Example</summary>

```tsx
// oxlint-disable-next-line signoz/no-text-css -- canvas text, not DOM
ctx.font = '12px Inter';
```

```scss
/* stylelint-disable-next-line property-disallowed-list -- antd table header, no Typography slot */
font-weight: 500;
```

</details>

---------

Co-authored-by: Vinícius Lourenço <vinicius@signoz.io>
2026-11-20 19:42:44 +05:30
Vinicius Lourenço
d317275b36 test(storybook): cover the states the component migration changes (#13493)
#### Description

This PR adds the stories we wrote while migrating to the new version of
`@signozhq/ui` (#13087), but running against the components we have on
main today.

I'm splitting them out so the screenshot diff of the migration has a
"before" for every story. Without this, the new stories only exist on
the migration branch and there is nothing to compare them with.

They cover the states the migration touches: open selects, dialogs,
drawers and popovers, more toast variants, the command palette, the
license and trial banners, the K8s drawer opened a few levels deep, SSO
attribute mapping and the query builder add-ons. A few existing plays
also moved into their `*.play.ts` files. No app code changes, only
stories and the mocks they need.

#### Screenshots / Screen Recordings

Every new story, in dark and light:
https://claude.ai/artifact/TeBTXRkB9puh7W6LnGXFQ8

#### Additional Information

#13087 sits on top of this one, so its diff only shows the migration.

---------

Co-authored-by: Manika Malhotra <manika@signoz.io>
2026-11-20 19:41:57 +05:30
Vikrant Gupta
61bc6698d1 feat(serviceaccount): paginate and filter the list endpoint (#13545)
#### Description

- `GET /api/v1/service_accounts` returns a page (`serviceAccounts`,
`total`, `reservedKeywords`) with `limit`, `offset`, `sort` and `order`.
- `query` is a SigNoz filter expression over `name`, `email`, `status`,
`created_at` and `updated_at`; a bare token matches name or email.

#### Issues Closed by this PR

Closes: https://github.com/SigNoz/keystone-pod/issues/221

---------

Co-authored-by: hardik-signoz <hardik.saini@signoz.io>
2026-11-20 11:59:55 +00:00
Ashwin Bhatkal
518def70e0 feat(infra-monitoring): keep filters when switching kubernetes resources (#13406)
#### Description

- Switching resources under "Viewing · Resource" no longer clears the
filter. Clauses the new resource can filter by are kept and the rest are
dropped, the same rule the drawer already uses, so the quick filter
checkboxes stay in step.
- The drawer's locked filter shows every clause instead of the last one
plus a `+N` count, so the scope reads without hovering. The existing
"Infra monitoring/Drawer overview tab" story already renders this state.
- Switching resources no longer changes what a filter means. A filter
with an OR, or a NOT over a group, is not carried at all, because no
subset of its clauses means the same thing. A clause with a leading NOT
is left out and the rest are carried. Before, `a = 1 OR b = 2` arrived
as `a = 1 AND b = 2`, and `NOT a = 1` arrived as `a = 1`.
- Stacked on #13405, which fixes the clause cutting this relies on.

#### Issues closed by this PR

Closes https://github.com/SigNoz/pulse-pod/issues/535
2026-11-20 11:44:40 +00:00
Aditya Singh
164ff1faec fix(messaging-queues): move the Kafka and Celery pages to query_range v5 (#13644)
#### Description

- The Kafka and Celery messaging queue pages load their graphs, tiles
and drawer tables with the v3 and v4 `query_range` APIs. The backend
plans to remove those APIs.
- The pages now load from v5 `query_range` and show the same data. The
Kafka group, topic and partition dropdowns read `/api/v1/fields/values`
instead of the v3 autocomplete.
- Chart clicks did nothing on the Kafka Consumer Lag graph, the Celery
state bars, the worker graphs and the Overview drawer graphs. The new
time series and bar panels dropped the page's own click handler. The
panels call it again when drilldown is off.
- The Drop Rate view is removed. It read the legacy `span/evaluation`
endpoint.

#### Issues closed by this PR

Closes https://github.com/SigNoz/events-pod/issues/157

#### Screenshots / Screen Recordings

Main vs this branch, diff view:
https://claude.ai/artifact/BpiYPvdSVXPAD7goQdfVhh

| Screen | On `main` | On this branch |
| --- | --- | --- |
| Kafka overview (3 stories) | Five view cards, including Drop Rate View
| Four view cards. Drop Rate View is gone. |
| Celery task (Default, Failing Tasks, Failed Tasks Only, No Flower
Metrics) | Error% by worker draws a single point on a 0–2000% axis |
Error% by worker draws one line per worker (30–80%) |
| Celery task, State Drawer (new story) | Not reachable. A chart click
does nothing on `main`. | A click on the All state graph opens the
drawer with the slowest tasks for that state |

- Each side is a static Storybook build, shot in dark and light. The
`main` side uses its own v3/v4 story mocks.
- 14 pairs changed and 20 are pixel-identical (Kafka Detail and the
queue Overview).
- The Error% difference comes partly from the mocks: on `main`, the
story's v4 mock answers the formula as a single point.

#### Additional Information

- Part of https://github.com/SigNoz/events-pod/issues/156.
- Stories serve v5. A new `StateDrawer` play opens the Celery drawer
from a chart click. The Kafka detail state is already covered by the
story's `selected` arg.

**FAQ (v4/v3 → v5)**

**Celery traces queries carry `aggregations: [{ expression }]`**
v5 builds a traces aggregation only from the expression. Without it,
`aggregateOperator` is ignored and the query becomes `count()`.

**Celery queries order by `p99(duration_nano)`, not `#SIGNOZ_VALUE`**
`#SIGNOZ_VALUE` was a v4 alias for the value column, and v5 rejects it.
The order key has to name the aggregation expression. This affects the
latency tabs and the drawer tables.

**Grouped Celery queries filter on `<key> exists`**
_Where:_ Messaging Queues › Celery › All state graph and Task Latency
v4 dropped spans that lack the group-by key. v5 returns them as an extra
group with an empty label, which shows as a blank bar on All and an
extra line on Task Latency. API Monitoring got the same fix (`http_url
exists`).

**Kafka metrics graphs send no step**
_Where:_ Messaging Queues › Kafka › Metric view, on ranges over 5 hours
v5 clamps a metrics step to at least range/300, with a 60s floor. A
fixed 60s on a 1-week range shows "requesting aggregation interval 60
seconds…". Sending no step lets v5 pick one. Service details (#13617)
does the same.

**Celery formulas moved to `queryFormulas`**
_Where:_ Messaging Queues › Celery › Error% by worker; Messaging Queues
› Overview › row drawer › Error %
v4 took them inside `builderQueries`. The v5 payload builder reads
formulas only from `queryFormulas`, so in the old place they went out as
metrics builder queries.

**State tiles show bigger numbers**
_Where:_ Messaging Queues › Celery › All Tasks / Failed / Retry /
Successful; Messaging Queues › Overview › row drawer tiles
v4 value panels showed one bucket of a time series (the last minute). v5
scalar requests aggregate the whole window. The numbers match ClickHouse
for the selected range.

**Graphs show the most recent data**
_Where:_ Messaging Queues › Celery › the last bar or point of each graph
v4 traces queries rounded the end down to a whole step, which dropped up
to one step of recent data. v5 keeps the partial bucket.

**Kafka group/topic/partition dropdowns call `/fields/values`**
_Where:_ Messaging Queues › Kafka › Consumer Lag view › group / topic /
partition selects
They used the v3 autocomplete endpoint. `/fields/values` takes the
metric name and filters `searchText` on the server.

**Chart clicks call the page's handler again**
_Where:_ Messaging Queues › Kafka › Consumer Lag graph; Messaging Queues
› Celery › state bars and worker graphs; Messaging Queues › Overview ›
row drawer graphs
When the panels moved to the new time series and bar panels, a page's
own `onClickHandler` stopped being called with drilldown off. The Kafka
lag graph, the Celery state bars and the Overview drawer graphs ignored
clicks. The handler is called again from `usePanelContextMenu`, so API
Monitoring endpoint graphs get their View Traces click back too. A click
outside a series no longer opens a Celery drawer.

**Drop Rate removed**
_Where:_ Messaging Queues › Kafka › view cards and the view selector
Agreed with Pandey to remove it rather than port it. It read the legacy
`span/evaluation` endpoint, which the backend serves only behind the
experimental `kafka_span_eval` flag. The flag is off by default, so the
view returned an error unless `KAFKA_SPAN_EVAL=true` was set. Old
`?mqServiceView=dropRate` links open Consumer Lag.

**Warning icon on empty metric graphs**
_Where:_ Messaging Queues › Kafka › Metric view
v5 reports a metric that was never ingested, and the graph shows that.

Issues found on `main` while testing are filed in
https://github.com/SigNoz/events-pod/issues/280. The ones this PR fixes
are ticked there.
2026-11-20 11:15:24 +00:00
Ashwin Bhatkal
f6f7144a80 fix(infra-monitoring): keep list filter clauses whole when carried into the drawer (#13405)
#### Description

- Opening a pod or container from a list filtered by a quick filter
broke the drawer's overview tab. A list filter like `k8s.cluster.name in
['cluster-a']` arrived in the drawer as `k8s.cluster.name in
['cluster-a'`, which does not parse.
- Each carried clause is now cut from its key to the end of its value,
which for `in [...]` is the closing bracket.
- The same cut also dropped the key from a `NOT IN` clause, and pulled
every dropped clause in front of a kept one into the result. Both are
fixed and covered in `relations.test.ts`.

#### Issues closed by this PR

Closes https://github.com/SigNoz/pulse-pod/issues/756
2026-11-20 10:28:30 +00:00
Naman Verma
73f02c25e7 feat(rules): report threshold names in the v3 list api (#13606)
<!--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

A rule's alerts carry the lowercased name of the threshold that fired as
their severity; the rule's own `severity` label is a plain label since
#13612. The v3 list row's new `thresholds` field reports exactly that:
each distinct threshold name, ranked critical, error, warning, info,
then the rest.

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

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

---------

Co-authored-by: Ashu Ghildiyal <ashu.ghildiyal@signoz.io>
2026-11-20 09:46:00 +00:00
Nityananda Gohain
a01cc1aef9 fix(llm-observability): mirror the collector's bounded prefix match for pricing patterns (#13334)
#### Description

- `ModelMatchesAnyRule` and pattern validation now call the collector's
`pkg/llmpricing` (SigNoz/signoz-otel-collector#973) instead of a copied
regex, so a pattern matches the model exactly or followed by snapshot
suffixes (`-20260921`, `-latest`, `-v2:0`, `@20260921`), and a trailing
`*` matches
  any suffix. Priced snapshots no longer show up as unmapped.
- Validation rejects a non-trailing `*`, surrounding whitespace and
control characters; other glob characters are literal in the collector
now, so rejecting them was wrong.
- `PatternEditor` shows the stored pattern instead of appending a
cosmetic `*`, and the help text describes the actual matching.
  - Companion to SigNoz/zeus#606 for nerve-pod#517.

  #### Issues closed by this PR

  Closes https://github.com/SigNoz/nerve-pod/issues/517

#### Screenshots
Before:
<img width="541" height="531" alt="image"
src="https://github.com/user-attachments/assets/2a0cde21-ab05-40c2-be25-2a759ac01426"
/>

After:

<img width="541" height="531" alt="image"
src="https://github.com/user-attachments/assets/a50d8a62-1096-4c89-9871-019d9f6cb26d"
/>




  #### Additional Information

- `signoz-otel-collector` is pinned to `v0.144.17-rc.1`, the first tag
with `pkg/llmpricing`; bump to `v0.144.17` once it's released.
- No story change: the `ModelCostDrawer` story already renders the
pattern chips.
- Rules saved with glob syntax keep working as literal patterns,
matching the collector.

---------

Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
2026-11-20 08:52:27 +00:00
5130 changed files with 66675 additions and 48905 deletions

View File

@@ -11882,7 +11882,7 @@ components:
- created_at
- name
- state
- severity
- thresholds
type: string
RuletypesListableRule:
properties:
@@ -11922,6 +11922,13 @@ components:
- $ref: '#/components/schemas/RuletypesAlertState'
description: 'The current evaluation state: inactive, pending, recovering,
firing, nodata or disabled.'
thresholds:
description: The rule's threshold names in lowercase, deduplicated and ordered
critical, error, warning, info, then other names. An alert carries the
name of the threshold that fired as its severity. Read-only.
items:
type: string
type: array
updatedAt:
format: date-time
type: string
@@ -11933,6 +11940,7 @@ components:
- alert
- alertType
- ruleType
- thresholds
type: object
RuletypesListableRuleViews:
properties:
@@ -12299,7 +12307,8 @@ components:
allOf:
- $ref: '#/components/schemas/RuletypesListSort'
description: 'The field to sort by: updated_at (the default), created_at,
name, state or severity.'
name, state or thresholds. Sorting by thresholds ranks each rule by its
first threshold name.'
states:
description: 'Only return rules in these states: firing, pending, recovering,
inactive, nodata or disabled. Empty means every state.'
@@ -12513,6 +12522,14 @@ components:
- schemaVersion
- spec
type: object
ServiceaccounttypesDSLKey:
enum:
- created_at
- email
- name
- status
- updated_at
type: string
ServiceaccounttypesGettableFactorAPIKey:
properties:
createdAt:
@@ -12549,6 +12566,28 @@ components:
- id
- key
type: object
ServiceaccounttypesListableServiceAccount:
properties:
reservedKeywords:
description: The filter keys the query accepts.
items:
$ref: '#/components/schemas/ServiceaccounttypesDSLKey'
type: array
serviceAccounts:
description: The service accounts on this page.
items:
$ref: '#/components/schemas/ServiceaccounttypesServiceAccount'
type: array
total:
description: The number of service accounts the filter matches across all
pages.
format: int64
type: integer
required:
- serviceAccounts
- total
- reservedKeywords
type: object
ServiceaccounttypesPostableFactorAPIKey:
properties:
expiresAt:
@@ -12591,17 +12630,30 @@ components:
orgId:
type: string
status:
type: string
$ref: '#/components/schemas/ServiceaccounttypesServiceAccountStatus'
updatedAt:
format: date-time
type: string
required:
- id
- createdAt
- updatedAt
- name
- email
- status
- orgId
type: object
ServiceaccounttypesServiceAccountListOrder:
enum:
- asc
- desc
type: string
ServiceaccounttypesServiceAccountListSort:
enum:
- created_at
- updated_at
- name
type: string
ServiceaccounttypesServiceAccountRole:
properties:
createdAt:
@@ -12624,6 +12676,11 @@ components:
- roleId
- role
type: object
ServiceaccounttypesServiceAccountStatus:
enum:
- active
- deleted
type: string
ServiceaccounttypesServiceAccountWithRoles:
properties:
createdAt:
@@ -12643,12 +12700,14 @@ components:
nullable: true
type: array
status:
type: string
$ref: '#/components/schemas/ServiceaccounttypesServiceAccountStatus'
updatedAt:
format: date-time
type: string
required:
- id
- createdAt
- updatedAt
- name
- email
- status
@@ -17744,8 +17803,56 @@ paths:
/api/v1/service_accounts:
get:
deprecated: false
description: This endpoint lists the service accounts for an organisation
description: Returns a page of the service accounts for an organisation. `query`
is a filter expression over name, email, status, created_at and updated_at,
for example `status = 'active'`; `sort`/`order` pick the ordering and `limit`/`offset`
the page.
operationId: ListServiceAccounts
parameters:
- description: 'A filter expression over the reserved keys name, email, status,
created_at and updated_at using the SigNoz filter grammar: comparisons such
as =, !=, CONTAINS, LIKE, IN, < and >, single-quoted strings, RFC3339 timestamps
in quotes for created_at and updated_at, combined with AND, OR and NOT,
for example name CONTAINS ''ci'' AND status = ''active''. A bare or quoted
token without a key matches name or email case-insensitively. At most 1024
characters. Empty matches every service account.'
in: query
name: query
schema:
description: 'A filter expression over the reserved keys name, email, status,
created_at and updated_at using the SigNoz filter grammar: comparisons
such as =, !=, CONTAINS, LIKE, IN, < and >, single-quoted strings, RFC3339
timestamps in quotes for created_at and updated_at, combined with AND,
OR and NOT, for example name CONTAINS ''ci'' AND status = ''active''.
A bare or quoted token without a key matches name or email case-insensitively.
At most 1024 characters. Empty matches every service account.'
type: string
- description: 'The sort column: created_at (default), updated_at or name.'
in: query
name: sort
schema:
allOf:
- $ref: '#/components/schemas/ServiceaccounttypesServiceAccountListSort'
description: 'The sort column: created_at (default), updated_at or name.'
- description: 'The sort order: asc or desc (default).'
in: query
name: order
schema:
allOf:
- $ref: '#/components/schemas/ServiceaccounttypesServiceAccountListOrder'
description: 'The sort order: asc or desc (default).'
- description: The page size; defaults to 20 and is capped at 200.
in: query
name: limit
schema:
description: The page size; defaults to 20 and is capped at 200.
type: integer
- description: The number of service accounts to skip; defaults to 0.
in: query
name: offset
schema:
description: The number of service accounts to skip; defaults to 0.
type: integer
responses:
"200":
content:
@@ -17753,9 +17860,7 @@ paths:
schema:
properties:
data:
items:
$ref: '#/components/schemas/ServiceaccounttypesServiceAccount'
type: array
$ref: '#/components/schemas/ServiceaccounttypesListableServiceAccount'
status:
type: string
required:
@@ -17763,6 +17868,12 @@ paths:
- data
type: object
description: OK
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/RenderErrorResponse'
description: Bad Request
"401":
content:
application/json:
@@ -32094,7 +32205,7 @@ paths:
deprecated: false
description: Returns a page of alert rules with their current evaluation state,
trimmed to the fields the list page renders. Supports a filter DSL (`query`),
a repeated `states` filter applied after the state overlay, sort (`updated_at`/`created_at`/`name`/`state`/`severity`),
a repeated `states` filter applied after the state overlay, sort (`updated_at`/`created_at`/`name`/`state`/`thresholds`),
order (`asc`/`desc`), and offset-based pagination (`limit`/`offset`). In the
filter DSL, a non-reserved key is matched as a rule label directly (`team
= infra`); a key that collides with a reserved keyword matches either interpretation
@@ -32122,14 +32233,16 @@ paths:
type: string
type: array
- description: 'The field to sort by: updated_at (the default), created_at,
name, state or severity.'
name, state or thresholds. Sorting by thresholds ranks each rule by its
first threshold name.'
in: query
name: sort
schema:
allOf:
- $ref: '#/components/schemas/RuletypesListSort'
description: 'The field to sort by: updated_at (the default), created_at,
name, state or severity.'
name, state or thresholds. Sorting by thresholds ranks each rule by its
first threshold name.'
- description: 'The sort direction: asc or desc (the default).'
in: query
name: order

View File

@@ -52,7 +52,7 @@ func (f *formatter) JSONIsArray(column, path string) []byte {
func (f *formatter) JSONArrayElements(column, path, alias string) ([]byte, []byte) {
var sql []byte
sql = append(sql, "jsonb_array_elements("...)
sql = f.bunf.AppendIdent(sql, column)
sql = append(sql, f.TextToJsonColumn(column)...)
sql = append(sql, f.convertJSONPathToPostgresWithMode(path, false)...)
sql = append(sql, ") AS "...)
sql = f.bunf.AppendIdent(sql, alias)

View File

@@ -213,28 +213,28 @@ func TestJSONArrayElements(t *testing.T) {
column: "data",
path: "$",
alias: "elem",
expected: `jsonb_array_elements("data") AS "elem"`,
expected: `jsonb_array_elements("data"::jsonb) AS "elem"`,
},
{
name: "root path empty",
column: "data",
path: "",
alias: "elem",
expected: `jsonb_array_elements("data") AS "elem"`,
expected: `jsonb_array_elements("data"::jsonb) AS "elem"`,
},
{
name: "nested path",
column: "metadata",
path: "$.items",
alias: "item",
expected: `jsonb_array_elements("metadata"->'items') AS "item"`,
expected: `jsonb_array_elements("metadata"::jsonb->'items') AS "item"`,
},
{
name: "deeply nested path",
column: "json_col",
path: "$.user.tags",
alias: "tag",
expected: `jsonb_array_elements("json_col"->'user'->'tags') AS "tag"`,
expected: `jsonb_array_elements("json_col"::jsonb->'user'->'tags') AS "tag"`,
},
}

View File

@@ -8,5 +8,5 @@
.title {
color: var(--l1-foreground);
font-size: var(--font-size-lg);
font-size: var(--label-large-400-font-size);
}

View File

@@ -140,6 +140,15 @@
"@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
@@ -312,6 +321,15 @@
"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."
@@ -497,7 +515,11 @@
// Requires final else in if-else-if chains (was disabled)
"signoz/no-conditional-text-nodes-with-siblings": "warn",
// Vendored from eslint-plugin-react-google-translate
"signoz/no-return-text-nodes": "warn"
"signoz/no-return-text-nodes": "warn",
"signoz/no-text-css": "warn",
// Font and text CSS in style props, CSSProperties objects and styled-components; text style goes through Typography props
"signoz/require-disable-reason": "error"
// A disable of signoz/no-text-css must say why Typography cannot render the text
},
"ignorePatterns": [
"src/parser/*.ts",

View File

@@ -40,8 +40,8 @@ const mockAliases = [
},
{
// jest: not replaced, a test asserts on the toast it fires.
find: /^@signozhq\/ui\/sonner$/,
replacement: `${srcPath}/storybook/mocks/sonner.mock.tsx`,
find: /^@signozhq\/ui\/toast$/,
replacement: `${srcPath}/storybook/mocks/toast.mock.tsx`,
},
];

View File

@@ -1,8 +1,6 @@
<!--
`index.html` links Inter from Google Fonts here. The link is parsed before the
msw worker has started, so that one request escapes the iframe while every
other font request the app makes is answered with an empty stylesheet; the
local faces stand in for both.
Every Google Fonts request the app makes is answered with an empty
stylesheet; the local faces stand in for them.
-->
<link rel="stylesheet" href="storybook-fonts.css" />

View File

@@ -1,22 +1,11 @@
/*
* The five families the app pulls from Google Fonts, served from the files in
* The three families the app pulls from Google Fonts, served from the files in
* `public/fonts` instead. `msw/appShellHandlers.ts` answers the CDN with an
* empty stylesheet so no request leaves the iframe, which without this left
* every story on a fallback for the four families `src/styles.scss` imports at
* runtime, and on whatever the Inter link in `index.html` happened to fetch
* before the worker had started.
* every story on a fallback for the three families `src/styles.scss` imports at
* runtime. Inter and Geist Mono come from `src/styles.scss` itself.
*/
@font-face {
font-family: 'Inter';
/* The comma is part of the filename and the dev server serves it raw, so it
stays literal inside the quoted url rather than percent-encoded. */
src: url('fonts/Inter-VariableFont_opsz,wght.ttf') format('truetype');
font-weight: 100 900;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Work Sans';
src: url('fonts/WorkSans-VariableFont_wght.ttf') format('truetype');
@@ -40,11 +29,3 @@
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Geist Mono';
src: url('fonts/GeistMonoVF.woff2') format('woff2');
font-weight: 100 900;
font-style: normal;
font-display: swap;
}

View File

@@ -14,9 +14,23 @@ module.exports = {
path.join(__dirname, 'stylelint-rules/css-modules/class-name-pattern.js'),
],
customSyntax: 'postcss-scss',
// Disables of property-disallowed-list must say why after "--"
reportDescriptionlessDisables: [
false,
{ except: ['property-disallowed-list'], severity: 'error' },
],
rules: {
// Applies to all SCSS files
'local/no-unsupported-asset-url': true,
// Text style goes through @signozhq/ui/typography props
'property-disallowed-list': [
['/^font/', '/^text-/', 'line-height', 'letter-spacing'],
{
severity: 'warning',
message: (property) =>
`Do not set "${property}" in CSS. Render the text with @signozhq/ui/typography and use its props, or disable this rule with a reason after "--" saying why Typography cannot.`,
},
],
},
overrides: [
{

View File

@@ -191,34 +191,30 @@ You can read the ./node_modules/@signozhq/design-tokens/dist/style.css to find c
### Typography
Text styles are tokens named `--{variant}-{size}-{weight}-{property}`:
- Variant: `label` (line height 1), `paragraph` (line height 18, 20 or 26px), `uppercase` (11 and 13px) or `code` (SF Mono, 11 and 13px).
- Size: `small` (11px), `base` (13px), `medium` (16px) or `large` (18px). Paragraph has no `large`; uppercase and code have only `small` and `base`.
- Weight: `400`, `500` or `600`.
- Property: `font-family`, `font-size`, `font-weight`, `line-height`, `letter-spacing` or `text-transform`.
```scss
// Font sizes (preferred)
.title {
font-size: var(--periscope-font-size-large); // 18px
font-size: var(--periscope-font-size-medium); // 16px
font-size: var(--periscope-font-size-base); // 13px
font-size: var(--periscope-font-size-small); // 11px
font-family: var(--label-large-500-font-family);
font-size: var(--label-large-500-font-size);
font-weight: var(--label-large-500-font-weight);
line-height: var(--label-large-500-line-height);
letter-spacing: var(--label-large-500-letter-spacing);
}
// Alternative scale (rem-based)
.heading {
font-size: var(--font-size-xl); // 1.25rem
font-size: var(--font-size-lg); // 1.125rem
font-size: var(--font-size-base); // 1rem
font-size: var(--font-size-sm); // 0.875rem
.hint {
font-size: var(--paragraph-small-400-font-size); // 11px
line-height: var(--paragraph-small-400-line-height); // 18px
}
// Font weights
.bold {
font-weight: var(--font-weight-semibold); // 600
font-weight: var(--font-weight-medium); // 500
font-weight: var(--font-weight-normal); // 400
}
// Line heights
.text {
line-height: var(--line-height-20); // 20px
line-height: var(--line-height-24); // 24px
.id {
font-family: var(--code-base-400-font-family);
font-size: var(--code-base-400-font-size); // 13px
}
```
@@ -312,7 +308,7 @@ Each component exposes `--<component>-<property>` variables:
--button-background: var(--success-background);
--button-border-radius: var(--radius-2);
--button-padding: var(--spacing-4) var(--spacing-8);
--button-font-size: var(--periscope-font-size-base);
--button-font-size: var(--label-base-400-font-size);
}
// Override Input
@@ -342,7 +338,7 @@ Components use data attributes for variants/states. Target them for state-specif
// Target size
.wrapper :global([data-size="sm"]) {
--button-font-size: var(--periscope-font-size-small);
--button-font-size: var(--label-small-400-font-size);
}
// Target color

View File

@@ -14,11 +14,6 @@
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link rel="preconnect" href="https://cdn.vercel.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap"
rel="stylesheet"
/>
<title data-react-helmet="true">
Open source Observability platform | SigNoz
</title>

View File

@@ -20,9 +20,11 @@ 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

@@ -54,9 +54,9 @@
"@monaco-editor/react": "^4.7.0",
"@sentry/react": "10.57.0",
"@sentry/vite-plugin": "5.3.0",
"@signozhq/design-tokens": "2.2.1",
"@signozhq/design-tokens": "2.8.0",
"@signozhq/icons": "0.4.0",
"@signozhq/ui": "0.2.0",
"@signozhq/ui": "0.4.0-rc.5",
"@tanstack/react-table": "8.21.3",
"@tanstack/react-virtual": "3.13.22",
"@uiw/codemirror-theme-copilot": "4.23.11",
@@ -200,7 +200,7 @@
"json-schema-to-typescript": "^15.0.4",
"lint-staged": "^17.0.4",
"msw": "1.3.2",
"orval": "8.22.0",
"orval": "8.28.1",
"oxfmt": "0.73.0",
"oxlint": "1.88.0",
"oxlint-tsgolint": "7.0.2004",

View File

@@ -0,0 +1,170 @@
import { ruleTester } from './rule-tester.mjs';
const message = (property) =>
`Do not set '${property}' in CSS. Render the text with @signozhq/ui/typography and use its props, or disable this rule with a reason after \`--\` saying why Typography cannot.`;
await ruleTester({
rule: 'no-text-css',
valid: [
{
name: 'layout properties in a style prop',
code: 'export const A = () => <div style={{ width: 10, color: "red" }} />;',
},
{
name: 'font properties in an object that is not a style',
code: 'export const options = { fontSize: 12, font: "12px Inter" };',
},
{
name: 'font properties in a prop that is not a style',
code: 'export const A = () => <Chart options={{ fontSize: 12 }} />;',
},
{
name: 'computed key',
code:
'const k = "fontSize";\nexport const A = () => <div style={{ [k]: 12 }} />;',
},
{
name: 'style identifier from a parameter',
code: 'export const A = ({ s }) => <div style={s} />;',
},
{
name: 'template without a styled tag',
code: 'export const s = html`font-size: 12px;`;',
},
{
name: 'styled template with layout only',
code:
"import styled from 'styled-components';\nexport const A = styled.div`\n\tdisplay: flex;\n\ttext: none;\n`;",
},
{
name: 'custom property that ends in a banned name',
code:
"import styled from 'styled-components';\nexport const A = styled.div`\n\t--my-font-size: 12px;\n`;",
},
],
invalid: [
{
name: 'inline style',
code: 'export const A = () => <div style={{ fontSize: 12, width: 1 }} />;',
errors: [{ message: message('fontSize'), line: 1, column: 38 }],
},
{
name: 'string key',
code: "export const A = () => <div style={{ 'line-height': 1 }} />;",
errors: [{ message: message('line-height') }],
},
{
name: 'every banned family',
code:
'export const A = () => (\n\t<div\n\t\tstyle={{\n\t\t\tfont: "x",\n\t\t\tfontWeight: 500,\n\t\t\tfontFamily: "x",\n\t\t\ttextAlign: "center",\n\t\t\ttextTransform: "none",\n\t\t\tlineHeight: 1,\n\t\t\tletterSpacing: 1,\n\t\t}}\n\t/>\n);',
errors: [
{ message: message('font') },
{ message: message('fontWeight') },
{ message: message('fontFamily') },
{ message: message('textAlign') },
{ message: message('textTransform') },
{ message: message('lineHeight') },
{ message: message('letterSpacing') },
],
},
{
name: 'conditional, logical and spread',
code:
'export const A = ({ a, b }) => (\n\t<div style={{ ...(a ? { fontSize: 1 } : {}), ...(b && { lineHeight: 1 }) }} />\n);',
errors: [
{ message: message('fontSize') },
{ message: message('lineHeight') },
],
},
{
name: 'style prop with a Style suffix',
code:
'export const A = () => <Card headStyle={{ fontWeight: 600 }} bodyStyle={{ padding: 0 }} />;',
errors: [{ message: message('fontWeight') }],
},
{
name: 'antd semantic styles',
code:
'export const A = () => <Modal styles={{ body: { fontSize: 12 }, header: { padding: 0 } }} />;',
errors: [{ message: message('fontSize') }],
},
{
name: 'identifier resolved to a local object',
code:
'const s = { fontSize: 12 };\nexport const A = () => (\n\t<>\n\t\t<div style={s} />\n\t\t<span style={s} />\n\t</>\n);',
errors: [{ message: message('fontSize'), line: 1, column: 13 }],
},
{
name: 'useMemo style',
code:
"import { useMemo } from 'react';\nexport const A = () => {\n\tconst s = useMemo(() => ({ textAlign: 'left' }), []);\n\treturn <div style={s} />;\n};",
errors: [{ message: message('textAlign') }],
},
{
name: 'object typed CSSProperties',
code:
"import type { CSSProperties } from 'react';\nexport const s: CSSProperties = { fontStyle: 'italic' };",
errors: [{ message: message('fontStyle') }],
},
{
name:
'object typed React.CSSProperties, reported once when also used as style',
code:
"import React from 'react';\nconst s: React.CSSProperties = { fontSize: 1 };\nexport const A = () => <div style={s} />;",
errors: [{ message: message('fontSize') }],
},
{
name: 'Record of CSSProperties',
code:
"import type { CSSProperties } from 'react';\nexport const s: Record<string, CSSProperties> = { a: { lineHeight: 1 } };",
errors: [{ message: message('lineHeight') }],
},
{
name: 'as and satisfies CSSProperties',
code:
"import type { CSSProperties } from 'react';\nexport const a = { fontSize: 1 } as CSSProperties;\nexport const b = { fontWeight: 1 } satisfies CSSProperties;",
errors: [
{ message: message('fontSize') },
{ message: message('fontWeight') },
],
},
{
name: 'styled-components template',
code:
"import styled from 'styled-components';\nexport const A = styled.div`\n\tdisplay: flex;\n\tfont-size: 12px;\n\tcolor: ${(p) => p.c};\n\ttext-transform: none;line-height: 1;\n`;",
errors: [
{ message: message('font-size'), line: 4, column: 2 },
{ message: message('text-transform'), line: 6, column: 2 },
{ message: message('line-height'), line: 6, column: 23 },
],
},
{
name: 'function returning CSSProperties',
code:
"import type { CSSProperties } from 'react';\nexport const a = (): CSSProperties => ({ fontSize: 1 });\nexport function b(): CSSProperties {\n\treturn { lineHeight: 1 };\n}",
errors: [
{ message: message('fontSize') },
{ message: message('lineHeight') },
],
},
{
name: 'strings in styled interpolations',
code:
"import styled, { css } from 'styled-components';\nexport const A = styled.div`\n\t${(p) => (p.s ? 'font-size: 11px;' : `line-height: 1;`)}\n\t${(p) => p.b && css`font-weight: 500;`}\n`;",
errors: [
{ message: message('font-size'), line: 3, column: 19 },
{ message: message('line-height'), line: 3, column: 40 },
{ message: message('font-weight'), line: 4, column: 22 },
],
},
{
name: 'styled(Component) and css helper',
code:
"import styled, { css } from 'styled-components';\nexport const A = styled(B)`letter-spacing: 1px;`;\nexport const c = css`\n\tfont-weight: 500;\n`;",
errors: [
{ message: message('letter-spacing'), line: 2, column: 28 },
{ message: message('font-weight'), line: 4, column: 2 },
],
},
],
});

View File

@@ -0,0 +1,49 @@
import { ruleTester } from './rule-tester.mjs';
const message = 'Disabling signoz/no-text-css needs a reason after `--`.';
await ruleTester({
rule: 'require-disable-reason',
valid: [
{
name: 'reason after --',
code:
'// oxlint-disable-next-line signoz/no-text-css -- canvas label\nexport const a = 1;',
},
{
name: 'block comment with a reason',
code:
'/* eslint-disable signoz/no-text-css -- email HTML */\nexport const a = 1;',
},
{
name: 'another rule without a reason',
code: '// oxlint-disable-next-line no-console\nexport const a = 1;',
},
{
name: 'disable of every rule',
code: '// eslint-disable-next-line\nexport const a = 1;',
},
{
name: 'plain comment naming the rule',
code: '// signoz/no-text-css flags font CSS\nexport const a = 1;',
},
],
invalid: [
{
name: 'next-line without a reason',
code: '// oxlint-disable-next-line signoz/no-text-css\nexport const a = 1;',
errors: [{ message, line: 1, column: 1 }],
},
{
name: 'empty reason',
code: '// eslint-disable-line signoz/no-text-css --\nexport const a = 1;',
errors: [{ message }],
},
{
name: 'among other rules',
code:
'/* oxlint-disable no-console, signoz/no-text-css */\nexport const a = 1;',
errors: [{ message }],
},
],
});

View File

@@ -0,0 +1,324 @@
/**
* Rule: no-text-css
*
* Text style (font, line height, letter spacing, case, alignment, overflow)
* belongs to Typography props, not to CSS written in a component.
*
* This rule catches font and text properties in:
* <div style={{ fontSize: 12 }} /> style and *Style props
* <Modal styles={{ body: { fontWeight: 500 } }} />
* const s: CSSProperties = { lineHeight: 1 } objects typed CSSProperties
* ({ ... }) as CSSProperties, satisfies CSSProperties
* (): CSSProperties => ({ ... }) functions returning CSSProperties
* styled.div`font-size: 12px;` styled-components templates,
* ${(p) => p.small && 'font-size: 11px;'} strings in their interpolations
*
* Identifiers passed to a style prop are followed to a local object literal.
* SCSS is covered by the stylelint config.
*/
const MESSAGE = (property) =>
`Do not set '${property}' in CSS. Render the text with @signozhq/ui/typography and use its props, or disable this rule with a reason after \`--\` saying why Typography cannot.`;
const BANNED_JS = /^(font([A-Z]\w*)?|text[A-Z]\w*|lineHeight|letterSpacing)$/;
const BANNED_CSS =
/(^|[\s;{])(font(-[a-z]+)*|text-[a-z-]+|line-height|letter-spacing)\s*:/g;
const STYLE_TAGS = new Set(['css', 'createGlobalStyle', 'keyframes']);
const FUNCTIONS = new Set([
'ArrowFunctionExpression',
'FunctionExpression',
'FunctionDeclaration',
]);
const camelCase = (name) =>
name.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
function propertyName(property) {
if (property.computed) {
return null;
}
if (property.key.type === 'Identifier') {
return property.key.name;
}
if (
property.key.type === 'Literal' &&
typeof property.key.value === 'string'
) {
return property.key.value;
}
return null;
}
function isCssPropertiesType(typeNode) {
if (!typeNode || typeNode.type !== 'TSTypeReference') {
return false;
}
const name = typeNode.typeName;
if (name.type === 'Identifier') {
return name.name === 'CSSProperties';
}
return name.type === 'TSQualifiedName' && name.right.name === 'CSSProperties';
}
// Record<K, CSSProperties> and { [key: string]: CSSProperties }
function isCssPropertiesMapType(typeNode) {
if (!typeNode) {
return false;
}
if (
typeNode.type === 'TSTypeReference' &&
typeNode.typeName.type === 'Identifier' &&
typeNode.typeName.name === 'Record'
) {
const params = (typeNode.typeArguments ?? typeNode.typeParameters)?.params;
return isCssPropertiesType(params?.[1]);
}
if (typeNode.type === 'TSTypeLiteral') {
return typeNode.members.some(
(member) =>
member.type === 'TSIndexSignature' &&
isCssPropertiesType(member.typeAnnotation?.typeAnnotation),
);
}
return false;
}
function rootIdentifier(node) {
let current = node;
while (current) {
if (current.type === 'Identifier') {
return current.name;
}
if (current.type === 'MemberExpression') {
current = current.object;
} else if (current.type === 'CallExpression') {
current = current.callee;
} else {
return null;
}
}
return null;
}
function isStyleTag(tag) {
if (tag.type === 'Identifier') {
return tag.name === 'styled' || STYLE_TAGS.has(tag.name);
}
return rootIdentifier(tag) === 'styled';
}
export default {
create(context) {
const reported = new Set();
const followed = new Set();
const reportedCss = new Set();
function report(property, name) {
if (reported.has(property)) {
return;
}
reported.add(property);
context.report({ node: property.key, message: MESSAGE(name) });
}
function resolveIdentifier(identifier) {
const scope = context.sourceCode.getScope(identifier);
let current = scope;
while (current) {
const variable = current.set.get(identifier.name);
if (variable) {
const definition = variable.defs[0];
if (
definition?.node?.type === 'VariableDeclarator' &&
definition.node.init
) {
return definition.node.init;
}
return null;
}
current = current.upper;
}
return null;
}
function checkObject(object) {
for (const property of object.properties) {
if (property.type === 'SpreadElement') {
checkStyle(property.argument);
continue;
}
const name = propertyName(property);
if (name && BANNED_JS.test(camelCase(name))) {
report(property, name);
}
}
}
function checkStyle(expression) {
if (!expression) {
return;
}
switch (expression.type) {
case 'ObjectExpression':
checkObject(expression);
return;
case 'ConditionalExpression':
checkStyle(expression.consequent);
checkStyle(expression.alternate);
return;
case 'LogicalExpression':
checkStyle(expression.left);
checkStyle(expression.right);
return;
case 'TSAsExpression':
case 'TSSatisfiesExpression':
case 'TSNonNullExpression':
case 'ParenthesizedExpression':
checkStyle(expression.expression);
return;
case 'CallExpression':
// useMemo(() => ({ ... }), deps)
if (
expression.callee.type === 'Identifier' &&
expression.callee.name === 'useMemo'
) {
checkReturned(expression.arguments[0]);
}
return;
case 'Identifier': {
const init = resolveIdentifier(expression);
if (!init || followed.has(init)) {
return;
}
followed.add(init);
checkStyle(init);
return;
}
default:
}
}
function checkReturned(fn) {
if (!fn || !FUNCTIONS.has(fn.type)) {
return;
}
if (fn.body.type !== 'BlockStatement') {
checkStyle(fn.body);
return;
}
for (const statement of fn.body.body) {
if (statement.type === 'ReturnStatement') {
checkStyle(statement.argument);
}
}
}
function checkStyleMap(expression) {
if (expression?.type !== 'ObjectExpression') {
return;
}
for (const property of expression.properties) {
if (property.type === 'Property') {
checkStyle(property.value);
}
}
}
// `start` is the index of the first character after the opening quote.
function checkCss(text, start) {
for (const match of text.matchAll(BANNED_CSS)) {
const index = start + match.index + match[1].length;
if (reportedCss.has(index)) {
continue;
}
reportedCss.add(index);
context.report({
loc: {
start: context.sourceCode.getLocFromIndex(index),
end: context.sourceCode.getLocFromIndex(index + match[2].length),
},
message: MESSAGE(match[2]),
});
}
}
// CSS returned from interpolations: ${(p) => p.small && 'font-size: 11px;'}
function checkCssStrings(node) {
if (!node || typeof node.type !== 'string') {
return;
}
if (node.type === 'TemplateLiteral') {
for (const quasi of node.quasis) {
checkCss(quasi.value.raw, quasi.range[0] + 1);
}
} else if (node.type === 'Literal' && typeof node.value === 'string') {
checkCss(node.raw.slice(1, -1), node.range[0] + 1);
return;
}
for (const [key, value] of Object.entries(node)) {
if (key === 'parent') {
continue;
}
if (Array.isArray(value)) {
value.forEach(checkCssStrings);
} else if (value && typeof value === 'object') {
checkCssStrings(value);
}
}
}
function checkFunction(node) {
if (isCssPropertiesType(node.returnType?.typeAnnotation)) {
checkReturned(node);
}
}
return {
JSXAttribute(node) {
if (
node.name.type !== 'JSXIdentifier' ||
node.value?.type !== 'JSXExpressionContainer'
) {
return;
}
const name = node.name.name;
if (name === 'styles') {
checkStyleMap(node.value.expression);
} else if (name === 'style' || name.endsWith('Style')) {
checkStyle(node.value.expression);
}
},
VariableDeclarator(node) {
const type = node.id.typeAnnotation?.typeAnnotation;
if (isCssPropertiesType(type)) {
checkStyle(node.init);
} else if (isCssPropertiesMapType(type)) {
checkStyleMap(node.init);
}
},
TSAsExpression(node) {
if (isCssPropertiesType(node.typeAnnotation)) {
checkStyle(node.expression);
}
},
TSSatisfiesExpression(node) {
if (isCssPropertiesType(node.typeAnnotation)) {
checkStyle(node.expression);
} else if (isCssPropertiesMapType(node.typeAnnotation)) {
checkStyleMap(node.expression);
}
},
TaggedTemplateExpression(node) {
if (!isStyleTag(node.tag)) {
return;
}
checkCssStrings(node.quasi);
},
ArrowFunctionExpression: checkFunction,
FunctionExpression: checkFunction,
FunctionDeclaration: checkFunction,
};
},
};

View File

@@ -0,0 +1,38 @@
/**
* Rule: require-disable-reason
*
* A disable directive that names one of RULES must say why after `--`:
* // oxlint-disable-next-line signoz/no-text-css -- canvas text, not DOM
*
* Directives that disable every rule are not checked.
*/
const RULES = new Set(['signoz/no-text-css']);
const DIRECTIVE = /^\s*(?:eslint|oxlint)-disable(?:-next-line|-line)?\s+(.*)$/s;
export default {
create(context) {
return {
Program() {
for (const comment of context.sourceCode.getAllComments()) {
const match = comment.value.match(DIRECTIVE);
if (!match) {
continue;
}
const [rules, reason] = match[1].split(/\s--\s?/);
const named = rules
.split(',')
.map((rule) => rule.trim())
.filter((rule) => RULES.has(rule));
if (named.length > 0 && !reason?.trim()) {
context.report({
node: comment,
message: `Disabling ${named.join(', ')} needs a reason after \`--\`.`,
});
}
}
},
};
},
};

View File

@@ -17,6 +17,8 @@ import noConditionalTextNodesWithSiblings from './rules/no-conditional-text-node
import noReturnTextNodes from './rules/no-return-text-nodes.mjs';
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';
export default {
meta: {
@@ -35,5 +37,7 @@ export default {
'no-return-text-nodes': noReturnTextNodes,
'no-msw-in-story-file': noMswInStoryFile,
'no-direct-react-router-import': noDirectReactRouterImport,
'no-text-css': noTextCss,
'require-disable-reason': requireDisableReason,
},
};

1354
frontend/pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -34,10 +34,6 @@
"title": "Partition Latency view",
"description": "Connect and Monitor Your Data Streams"
},
"dropRate": {
"title": "Drop Rate view",
"description": "Connect and Monitor Your Data Streams"
},
"metricPage": {
"title": "Metric View",
"description": "Connect and Monitor Your Data Streams"

View File

@@ -34,10 +34,6 @@
"title": "Partition Latency view",
"description": "Connect and Monitor Your Data Streams"
},
"dropRate": {
"title": "Drop Rate view",
"description": "Connect and Monitor Your Data Streams"
},
"metricPage": {
"title": "Metric View",
"description": "Connect and Monitor Your Data Streams"

View File

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

View File

@@ -1,11 +1,5 @@
import {
ReactNode,
Suspense,
useCallback,
useEffect,
useMemo,
useState,
} from 'react';
import type { ReactNode } from 'react';
import { 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';
@@ -32,16 +26,13 @@ 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 { IUser } from 'providers/App/types';
import type { IUser } from 'providers/App/types';
import { LicenseStatus } from 'types/api/licensesV3/getActive';
import { extractDomain } from 'utils/app';
import PrivateRoute from './Private';
import defaultRoutes, {
AppRoutes,
LIST_LICENSES,
SUPPORT_ROUTE,
} from './routes';
import type { AppRoutes } from './routes';
import defaultRoutes, { LIST_LICENSES, SUPPORT_ROUTE } from './routes';
import type { EnabledRouteKeys } from './RouteGate';
import {
isInjectedScriptError,

View File

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

View File

@@ -1,7 +1,8 @@
import { ENVIRONMENT } from 'constants/env';
import { server } from 'mocks-server/server';
import { rest, RestRequest } from 'msw';
import { MetricRangePayloadV5 } from 'types/api/v5/queryRange';
import type { RestRequest } from 'msw';
import { rest } from 'msw';
import type { MetricRangePayloadV5 } from 'types/api/v5/queryRange';
const QUERY_RANGE_URL = `${ENVIRONMENT.baseURL}/api/v5/query_range`;

View File

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

View File

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

View File

@@ -1,5 +1,5 @@
import { RenderErrorResponseDTO } from 'api/generated/services/sigNoz.schemas';
import { AxiosError } from 'axios';
import type { RenderErrorResponseDTO } from 'api/generated/services/sigNoz.schemas/renderErrorResponseDTO';
import type { 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 { AxiosError } from 'axios';
import { ErrorV2Resp } from 'types/api';
import type { AxiosError } from 'axios';
import type { 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 { AxiosResponse } from 'axios';
import { AllIntegrationsProps } from 'types/api/integrations/types';
import type { AxiosResponse } from 'axios';
import type { AllIntegrationsProps } from 'types/api/integrations/types';
export const getAllIntegrations = (): Promise<
AxiosResponse<AllIntegrationsProps>

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,6 @@
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import { AxiosError, CanceledError } from 'axios';
import type { AxiosError } from 'axios';
import { 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 { AxiosError } from 'axios';
import { ErrorV2Resp } from 'types/api';
import type { AxiosError } from 'axios';
import type { ErrorV2Resp } from 'types/api';
import APIError from 'types/api/error';
function asAxiosError(partial: Partial<AxiosError>): AxiosError<ErrorV2Resp> {

View File

@@ -1,9 +1,9 @@
import axios from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import { AxiosError } from 'axios';
import type { AxiosError } from 'axios';
import convertObjectIntoParams from 'lib/query/convertObjectIntoParams';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { PayloadProps, Props } from 'types/api/alerts/getTriggered';
import type { ErrorResponse, SuccessResponse } from 'types/api';
import type { 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';
import type { RuletypesPostableRuleDTO } from 'api/generated/services/sigNoz.schemas/ruletypesPostableRuleDTO';
// why: patchRuleByID's generated body type is the full RuletypesPostableRuleDTO
// because the backend OpenAPI spec currently advertises PostableRule. The

View File

@@ -1,10 +1,9 @@
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import axios, { AxiosError } from 'axios';
import { ErrorResponse, SuccessResponse } from 'types/api';
import {
ChangelogSchema,
DeploymentType,
} from 'types/api/changelog/getChangelogByVersion';
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';
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 { AxiosError } from 'axios';
import type { AxiosError } from 'axios';
import { LOCALSTORAGE } from 'constants/localStorage';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { EventSuccessPayloadProps } from 'types/api/events/types';
import type { ErrorResponse, SuccessResponse } from 'types/api';
import type { 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 { QueryRangePayloadV5 } from 'api/v5/v5';
import { AxiosError } from 'axios';
import { ErrorV2Resp, SuccessResponseV2 } from 'types/api';
import { ICompositeMetricQuery } from 'types/api/alerts/compositeQuery';
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';
interface ISubstituteVars {
compositeQuery: ICompositeMetricQuery;

View File

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

View File

@@ -1,8 +1,8 @@
import axios from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import { AxiosError } from 'axios';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { PayloadProps } from 'types/api/disks/getDisks';
import type { AxiosError } from 'axios';
import type { ErrorResponse, SuccessResponse } from 'types/api';
import type { 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 { AxiosError } from 'axios';
import { ErrorV2Resp, SuccessResponseV2 } from 'types/api';
import { FieldKeyResponse } from 'types/api/dynamicVariables/getFieldKeys';
import type { AxiosError } from 'axios';
import type { ErrorV2Resp, SuccessResponseV2 } from 'types/api';
import type { 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 { AxiosError } from 'axios';
import { ErrorV2Resp, SuccessResponseV2 } from 'types/api';
import { FieldValueResponse } from 'types/api/dynamicVariables/getFieldValues';
import type { AxiosError } from 'axios';
import type { ErrorV2Resp, SuccessResponseV2 } from 'types/api';
import type { 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 { AxiosError } from 'axios';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { PayloadProps, Props } from 'types/api/errors/getAll';
import type { AxiosError } from 'axios';
import type { ErrorResponse, SuccessResponse } from 'types/api';
import type { PayloadProps, Props } from 'types/api/errors/getAll';
const getAll = async (
props: Props,

View File

@@ -1,9 +1,12 @@
import axios from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import { AxiosError } from 'axios';
import type { AxiosError } from 'axios';
import createQueryParams from 'lib/createQueryParams';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { PayloadProps, Props } from 'types/api/errors/getByErrorTypeAndService';
import type { ErrorResponse, SuccessResponse } from 'types/api';
import type {
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 { AxiosError } from 'axios';
import type { AxiosError } from 'axios';
import createQueryParams from 'lib/createQueryParams';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { PayloadProps, Props } from 'types/api/errors/getByErrorId';
import type { ErrorResponse, SuccessResponse } from 'types/api';
import type { 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 { AxiosError } from 'axios';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { PayloadProps, Props } from 'types/api/errors/getErrorCounts';
import type { AxiosError } from 'axios';
import type { ErrorResponse, SuccessResponse } from 'types/api';
import type { 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 { AxiosError } from 'axios';
import type { AxiosError } from 'axios';
import createQueryParams from 'lib/createQueryParams';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { PayloadProps, Props } from 'types/api/errors/getNextPrevId';
import type { ErrorResponse, SuccessResponse } from 'types/api';
import type { PayloadProps, Props } from 'types/api/errors/getNextPrevId';
const getErrorCounts = async (
props: Props,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -17,46 +17,81 @@ import type {
UseQueryResult,
} from 'react-query';
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 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 { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
@@ -151,7 +186,7 @@ export function useListRuleViews<
}
/**
* @summary List rule saved views
* @summary Invalidates the {@link useListRuleViews} query
*/
export const invalidateListRuleViews = async (
queryClient: QueryClient,
@@ -182,6 +217,8 @@ export const createRuleView = (
});
};
export const getCreateRuleViewMutationKey = () => ['createRuleView'] as const;
export const getCreateRuleViewMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -189,16 +226,16 @@ export const getCreateRuleViewMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createRuleView>>,
TError,
{ data?: BodyType<RuletypesPostableRuleViewDTO> },
CreateRuleViewMutationVariables,
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createRuleView>>,
TError,
{ data?: BodyType<RuletypesPostableRuleViewDTO> },
CreateRuleViewMutationVariables,
TContext
> => {
const mutationKey = ['createRuleView'];
const mutationKey = getCreateRuleViewMutationKey();
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -209,7 +246,7 @@ export const getCreateRuleViewMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createRuleView>>,
{ data?: BodyType<RuletypesPostableRuleViewDTO> }
CreateRuleViewMutationVariables
> = (props) => {
const { data } = props ?? {};
@@ -226,6 +263,9 @@ export type CreateRuleViewMutationBody =
| BodyType<RuletypesPostableRuleViewDTO>
| undefined;
export type CreateRuleViewMutationError = ErrorType<RenderErrorResponseDTO>;
export type CreateRuleViewMutationVariables = {
data?: BodyType<RuletypesPostableRuleViewDTO>;
};
/**
* @summary Create rule saved view
@@ -237,13 +277,13 @@ export const useCreateRuleView = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createRuleView>>,
TError,
{ data?: BodyType<RuletypesPostableRuleViewDTO> },
CreateRuleViewMutationVariables,
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createRuleView>>,
TError,
{ data?: BodyType<RuletypesPostableRuleViewDTO> },
CreateRuleViewMutationVariables,
TContext
> => {
return useMutation(getCreateRuleViewMutationOptions(options));
@@ -263,6 +303,8 @@ export const deleteRuleView = (
});
};
export const getDeleteRuleViewMutationKey = () => ['deleteRuleView'] as const;
export const getDeleteRuleViewMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -270,16 +312,16 @@ export const getDeleteRuleViewMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteRuleView>>,
TError,
{ pathParams: DeleteRuleViewPathParameters },
DeleteRuleViewMutationVariables,
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof deleteRuleView>>,
TError,
{ pathParams: DeleteRuleViewPathParameters },
DeleteRuleViewMutationVariables,
TContext
> => {
const mutationKey = ['deleteRuleView'];
const mutationKey = getDeleteRuleViewMutationKey();
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -290,7 +332,7 @@ export const getDeleteRuleViewMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof deleteRuleView>>,
{ pathParams: DeleteRuleViewPathParameters }
DeleteRuleViewMutationVariables
> = (props) => {
const { pathParams } = props ?? {};
@@ -305,6 +347,9 @@ export type DeleteRuleViewMutationResult = NonNullable<
>;
export type DeleteRuleViewMutationError = ErrorType<RenderErrorResponseDTO>;
export type DeleteRuleViewMutationVariables = {
pathParams: DeleteRuleViewPathParameters;
};
/**
* @summary Delete rule saved view
@@ -316,13 +361,13 @@ export const useDeleteRuleView = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteRuleView>>,
TError,
{ pathParams: DeleteRuleViewPathParameters },
DeleteRuleViewMutationVariables,
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof deleteRuleView>>,
TError,
{ pathParams: DeleteRuleViewPathParameters },
DeleteRuleViewMutationVariables,
TContext
> => {
return useMutation(getDeleteRuleViewMutationOptions(options));
@@ -345,6 +390,8 @@ export const updateRuleView = (
});
};
export const getUpdateRuleViewMutationKey = () => ['updateRuleView'] as const;
export const getUpdateRuleViewMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -352,22 +399,16 @@ export const getUpdateRuleViewMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateRuleView>>,
TError,
{
pathParams: UpdateRuleViewPathParameters;
data?: BodyType<RuletypesPostableRuleViewDTO>;
},
UpdateRuleViewMutationVariables,
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateRuleView>>,
TError,
{
pathParams: UpdateRuleViewPathParameters;
data?: BodyType<RuletypesPostableRuleViewDTO>;
},
UpdateRuleViewMutationVariables,
TContext
> => {
const mutationKey = ['updateRuleView'];
const mutationKey = getUpdateRuleViewMutationKey();
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -378,10 +419,7 @@ export const getUpdateRuleViewMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateRuleView>>,
{
pathParams: UpdateRuleViewPathParameters;
data?: BodyType<RuletypesPostableRuleViewDTO>;
}
UpdateRuleViewMutationVariables
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -398,6 +436,10 @@ export type UpdateRuleViewMutationBody =
| BodyType<RuletypesPostableRuleViewDTO>
| undefined;
export type UpdateRuleViewMutationError = ErrorType<RenderErrorResponseDTO>;
export type UpdateRuleViewMutationVariables = {
pathParams: UpdateRuleViewPathParameters;
data?: BodyType<RuletypesPostableRuleViewDTO>;
};
/**
* @summary Update rule saved view
@@ -409,19 +451,13 @@ export const useUpdateRuleView = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateRuleView>>,
TError,
{
pathParams: UpdateRuleViewPathParameters;
data?: BodyType<RuletypesPostableRuleViewDTO>;
},
UpdateRuleViewMutationVariables,
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateRuleView>>,
TError,
{
pathParams: UpdateRuleViewPathParameters;
data?: BodyType<RuletypesPostableRuleViewDTO>;
},
UpdateRuleViewMutationVariables,
TContext
> => {
return useMutation(getUpdateRuleViewMutationOptions(options));
@@ -443,6 +479,8 @@ export const createRule = (
});
};
export const getCreateRuleMutationKey = () => ['createRule'] as const;
export const getCreateRuleMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -450,16 +488,16 @@ export const getCreateRuleMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createRule>>,
TError,
{ data?: BodyType<RuletypesPostableRuleDTO> },
CreateRuleMutationVariables,
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createRule>>,
TError,
{ data?: BodyType<RuletypesPostableRuleDTO> },
CreateRuleMutationVariables,
TContext
> => {
const mutationKey = ['createRule'];
const mutationKey = getCreateRuleMutationKey();
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -470,7 +508,7 @@ export const getCreateRuleMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createRule>>,
{ data?: BodyType<RuletypesPostableRuleDTO> }
CreateRuleMutationVariables
> = (props) => {
const { data } = props ?? {};
@@ -487,6 +525,9 @@ export type CreateRuleMutationBody =
| BodyType<RuletypesPostableRuleDTO>
| undefined;
export type CreateRuleMutationError = ErrorType<RenderErrorResponseDTO>;
export type CreateRuleMutationVariables = {
data?: BodyType<RuletypesPostableRuleDTO>;
};
/**
* @summary Create alert rule
@@ -498,13 +539,13 @@ export const useCreateRule = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createRule>>,
TError,
{ data?: BodyType<RuletypesPostableRuleDTO> },
CreateRuleMutationVariables,
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createRule>>,
TError,
{ data?: BodyType<RuletypesPostableRuleDTO> },
CreateRuleMutationVariables,
TContext
> => {
return useMutation(getCreateRuleMutationOptions(options));
@@ -524,6 +565,8 @@ export const deleteRuleByID = (
});
};
export const getDeleteRuleByIDMutationKey = () => ['deleteRuleByID'] as const;
export const getDeleteRuleByIDMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -531,16 +574,16 @@ export const getDeleteRuleByIDMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteRuleByID>>,
TError,
{ pathParams: DeleteRuleByIDPathParameters },
DeleteRuleByIDMutationVariables,
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof deleteRuleByID>>,
TError,
{ pathParams: DeleteRuleByIDPathParameters },
DeleteRuleByIDMutationVariables,
TContext
> => {
const mutationKey = ['deleteRuleByID'];
const mutationKey = getDeleteRuleByIDMutationKey();
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -551,7 +594,7 @@ export const getDeleteRuleByIDMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof deleteRuleByID>>,
{ pathParams: DeleteRuleByIDPathParameters }
DeleteRuleByIDMutationVariables
> = (props) => {
const { pathParams } = props ?? {};
@@ -566,6 +609,9 @@ export type DeleteRuleByIDMutationResult = NonNullable<
>;
export type DeleteRuleByIDMutationError = ErrorType<RenderErrorResponseDTO>;
export type DeleteRuleByIDMutationVariables = {
pathParams: DeleteRuleByIDPathParameters;
};
/**
* @summary Delete alert rule
@@ -577,13 +623,13 @@ export const useDeleteRuleByID = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteRuleByID>>,
TError,
{ pathParams: DeleteRuleByIDPathParameters },
DeleteRuleByIDMutationVariables,
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof deleteRuleByID>>,
TError,
{ pathParams: DeleteRuleByIDPathParameters },
DeleteRuleByIDMutationVariables,
TContext
> => {
return useMutation(getDeleteRuleByIDMutationOptions(options));
@@ -672,7 +718,7 @@ export function useGetRuleByID<
}
/**
* @summary Get alert rule by ID
* @summary Invalidates the {@link useGetRuleByID} query
*/
export const invalidateGetRuleByID = async (
queryClient: QueryClient,
@@ -705,6 +751,8 @@ export const patchRuleByID = (
});
};
export const getPatchRuleByIDMutationKey = () => ['patchRuleByID'] as const;
export const getPatchRuleByIDMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -712,22 +760,16 @@ export const getPatchRuleByIDMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof patchRuleByID>>,
TError,
{
pathParams: PatchRuleByIDPathParameters;
data?: BodyType<RuletypesPostableRuleDTO>;
},
PatchRuleByIDMutationVariables,
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof patchRuleByID>>,
TError,
{
pathParams: PatchRuleByIDPathParameters;
data?: BodyType<RuletypesPostableRuleDTO>;
},
PatchRuleByIDMutationVariables,
TContext
> => {
const mutationKey = ['patchRuleByID'];
const mutationKey = getPatchRuleByIDMutationKey();
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -738,10 +780,7 @@ export const getPatchRuleByIDMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof patchRuleByID>>,
{
pathParams: PatchRuleByIDPathParameters;
data?: BodyType<RuletypesPostableRuleDTO>;
}
PatchRuleByIDMutationVariables
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -758,6 +797,10 @@ export type PatchRuleByIDMutationBody =
| BodyType<RuletypesPostableRuleDTO>
| undefined;
export type PatchRuleByIDMutationError = ErrorType<RenderErrorResponseDTO>;
export type PatchRuleByIDMutationVariables = {
pathParams: PatchRuleByIDPathParameters;
data?: BodyType<RuletypesPostableRuleDTO>;
};
/**
* @summary Patch alert rule
@@ -769,19 +812,13 @@ export const usePatchRuleByID = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof patchRuleByID>>,
TError,
{
pathParams: PatchRuleByIDPathParameters;
data?: BodyType<RuletypesPostableRuleDTO>;
},
PatchRuleByIDMutationVariables,
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof patchRuleByID>>,
TError,
{
pathParams: PatchRuleByIDPathParameters;
data?: BodyType<RuletypesPostableRuleDTO>;
},
PatchRuleByIDMutationVariables,
TContext
> => {
return useMutation(getPatchRuleByIDMutationOptions(options));
@@ -804,6 +841,8 @@ export const updateRuleByID = (
});
};
export const getUpdateRuleByIDMutationKey = () => ['updateRuleByID'] as const;
export const getUpdateRuleByIDMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -811,22 +850,16 @@ export const getUpdateRuleByIDMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateRuleByID>>,
TError,
{
pathParams: UpdateRuleByIDPathParameters;
data?: BodyType<RuletypesPostableRuleDTO>;
},
UpdateRuleByIDMutationVariables,
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateRuleByID>>,
TError,
{
pathParams: UpdateRuleByIDPathParameters;
data?: BodyType<RuletypesPostableRuleDTO>;
},
UpdateRuleByIDMutationVariables,
TContext
> => {
const mutationKey = ['updateRuleByID'];
const mutationKey = getUpdateRuleByIDMutationKey();
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -837,10 +870,7 @@ export const getUpdateRuleByIDMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateRuleByID>>,
{
pathParams: UpdateRuleByIDPathParameters;
data?: BodyType<RuletypesPostableRuleDTO>;
}
UpdateRuleByIDMutationVariables
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -857,6 +887,10 @@ export type UpdateRuleByIDMutationBody =
| BodyType<RuletypesPostableRuleDTO>
| undefined;
export type UpdateRuleByIDMutationError = ErrorType<RenderErrorResponseDTO>;
export type UpdateRuleByIDMutationVariables = {
pathParams: UpdateRuleByIDPathParameters;
data?: BodyType<RuletypesPostableRuleDTO>;
};
/**
* @summary Update alert rule
@@ -868,19 +902,13 @@ export const useUpdateRuleByID = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateRuleByID>>,
TError,
{
pathParams: UpdateRuleByIDPathParameters;
data?: BodyType<RuletypesPostableRuleDTO>;
},
UpdateRuleByIDMutationVariables,
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateRuleByID>>,
TError,
{
pathParams: UpdateRuleByIDPathParameters;
data?: BodyType<RuletypesPostableRuleDTO>;
},
UpdateRuleByIDMutationVariables,
TContext
> => {
return useMutation(getUpdateRuleByIDMutationOptions(options));
@@ -900,6 +928,8 @@ export const cloneRuleByID = (
});
};
export const getCloneRuleByIDMutationKey = () => ['cloneRuleByID'] as const;
export const getCloneRuleByIDMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -907,16 +937,16 @@ export const getCloneRuleByIDMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof cloneRuleByID>>,
TError,
{ pathParams: CloneRuleByIDPathParameters },
CloneRuleByIDMutationVariables,
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof cloneRuleByID>>,
TError,
{ pathParams: CloneRuleByIDPathParameters },
CloneRuleByIDMutationVariables,
TContext
> => {
const mutationKey = ['cloneRuleByID'];
const mutationKey = getCloneRuleByIDMutationKey();
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -927,7 +957,7 @@ export const getCloneRuleByIDMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof cloneRuleByID>>,
{ pathParams: CloneRuleByIDPathParameters }
CloneRuleByIDMutationVariables
> = (props) => {
const { pathParams } = props ?? {};
@@ -942,6 +972,9 @@ export type CloneRuleByIDMutationResult = NonNullable<
>;
export type CloneRuleByIDMutationError = ErrorType<RenderErrorResponseDTO>;
export type CloneRuleByIDMutationVariables = {
pathParams: CloneRuleByIDPathParameters;
};
/**
* @summary Clone alert rule
@@ -953,13 +986,13 @@ export const useCloneRuleByID = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof cloneRuleByID>>,
TError,
{ pathParams: CloneRuleByIDPathParameters },
CloneRuleByIDMutationVariables,
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof cloneRuleByID>>,
TError,
{ pathParams: CloneRuleByIDPathParameters },
CloneRuleByIDMutationVariables,
TContext
> => {
return useMutation(getCloneRuleByIDMutationOptions(options));
@@ -1064,7 +1097,7 @@ export function useGetRuleHistoryFilterKeys<
}
/**
* @summary Get rule history filter keys
* @summary Invalidates the {@link useGetRuleHistoryFilterKeys} query
*/
export const invalidateGetRuleHistoryFilterKeys = async (
queryClient: QueryClient,
@@ -1181,7 +1214,7 @@ export function useGetRuleHistoryFilterValues<
}
/**
* @summary Get rule history filter values
* @summary Invalidates the {@link useGetRuleHistoryFilterValues} query
*/
export const invalidateGetRuleHistoryFilterValues = async (
queryClient: QueryClient,
@@ -1298,7 +1331,7 @@ export function useGetRuleHistoryOverallStatus<
}
/**
* @summary Get rule overall status timeline
* @summary Invalidates the {@link useGetRuleHistoryOverallStatus} query
*/
export const invalidateGetRuleHistoryOverallStatus = async (
queryClient: QueryClient,
@@ -1413,7 +1446,7 @@ export function useGetRuleHistoryStats<
}
/**
* @summary Get rule history stats
* @summary Invalidates the {@link useGetRuleHistoryStats} query
*/
export const invalidateGetRuleHistoryStats = async (
queryClient: QueryClient,
@@ -1529,7 +1562,7 @@ export function useGetRuleHistoryTimeline<
}
/**
* @summary Get rule history timeline
* @summary Invalidates the {@link useGetRuleHistoryTimeline} query
*/
export const invalidateGetRuleHistoryTimeline = async (
queryClient: QueryClient,
@@ -1646,7 +1679,7 @@ export function useGetRuleHistoryTopContributors<
}
/**
* @summary Get top contributors to rule firing
* @summary Invalidates the {@link useGetRuleHistoryTopContributors} query
*/
export const invalidateGetRuleHistoryTopContributors = async (
queryClient: QueryClient,
@@ -1679,6 +1712,8 @@ export const testRule = (
});
};
export const getTestRuleMutationKey = () => ['testRule'] as const;
export const getTestRuleMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -1686,16 +1721,16 @@ export const getTestRuleMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof testRule>>,
TError,
{ data?: BodyType<RuletypesPostableRuleDTO> },
TestRuleMutationVariables,
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof testRule>>,
TError,
{ data?: BodyType<RuletypesPostableRuleDTO> },
TestRuleMutationVariables,
TContext
> => {
const mutationKey = ['testRule'];
const mutationKey = getTestRuleMutationKey();
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -1706,7 +1741,7 @@ export const getTestRuleMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof testRule>>,
{ data?: BodyType<RuletypesPostableRuleDTO> }
TestRuleMutationVariables
> = (props) => {
const { data } = props ?? {};
@@ -1723,6 +1758,9 @@ export type TestRuleMutationBody =
| BodyType<RuletypesPostableRuleDTO>
| undefined;
export type TestRuleMutationError = ErrorType<RenderErrorResponseDTO>;
export type TestRuleMutationVariables = {
data?: BodyType<RuletypesPostableRuleDTO>;
};
/**
* @summary Test alert rule
@@ -1734,19 +1772,19 @@ export const useTestRule = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof testRule>>,
TError,
{ data?: BodyType<RuletypesPostableRuleDTO> },
TestRuleMutationVariables,
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof testRule>>,
TError,
{ data?: BodyType<RuletypesPostableRuleDTO> },
TestRuleMutationVariables,
TContext
> => {
return useMutation(getTestRuleMutationOptions(options));
};
/**
* Returns a page of alert rules with their current evaluation state, trimmed to the fields the list page renders. Supports a filter DSL (`query`), a repeated `states` filter applied after the state overlay, sort (`updated_at`/`created_at`/`name`/`state`/`severity`), order (`asc`/`desc`), and offset-based pagination (`limit`/`offset`). In the filter DSL, a non-reserved key is matched as a rule label directly (`team = infra`); a key that collides with a reserved keyword matches either interpretation (negative operators exclude both), and `labels.<key>` targets only the label. The response also carries the org's label pairs and the reserved filter keys for building filter suggestions.
* Returns a page of alert rules with their current evaluation state, trimmed to the fields the list page renders. Supports a filter DSL (`query`), a repeated `states` filter applied after the state overlay, sort (`updated_at`/`created_at`/`name`/`state`/`thresholds`), order (`asc`/`desc`), and offset-based pagination (`limit`/`offset`). In the filter DSL, a non-reserved key is matched as a rule label directly (`team = infra`); a key that collides with a reserved keyword matches either interpretation (negative operators exclude both), and `labels.<key>` targets only the label. The response also carries the org's label pairs and the reserved filter keys for building filter suggestions.
* @summary List alert rules (v3)
*/
export const listRulesV3 = (
@@ -1825,7 +1863,7 @@ export function useListRulesV3<
}
/**
* @summary List alert rules (v3)
* @summary Invalidates the {@link useListRulesV3} query
*/
export const invalidateListRulesV3 = async (
queryClient: QueryClient,

View File

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

View File

@@ -17,32 +17,55 @@ import type {
UseQueryResult,
} from 'react-query';
import type {
CreateServiceAccount201,
CreateServiceAccountKey201,
CreateServiceAccountKeyPathParameters,
CreateServiceAccountRole201,
DeleteServiceAccountPathParameters,
DeleteServiceAccountRolePathParameters,
GetMyServiceAccount200,
GetServiceAccount200,
GetServiceAccountPathParameters,
GetServiceAccountRole200,
GetServiceAccountRolePathParameters,
GetServiceAccountRoles200,
GetServiceAccountRolesPathParameters,
ListServiceAccountKeys200,
ListServiceAccountKeysPathParameters,
ListServiceAccounts200,
RenderErrorResponseDTO,
RevokeServiceAccountKeyPathParameters,
ServiceaccounttypesPostableFactorAPIKeyDTO,
ServiceaccounttypesPostableServiceAccountDTO,
ServiceaccounttypesPostableServiceAccountRoleDTO,
ServiceaccounttypesUpdatableFactorAPIKeyDTO,
UpdateServiceAccountKeyPathParameters,
UpdateServiceAccountPathParameters,
} from '../sigNoz.schemas';
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 { GeneratedAPIInstance } from '../../../generatedAPIInstance';
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
@@ -84,6 +107,9 @@ export const createServiceAccountRole = (
});
};
export const getCreateServiceAccountRoleMutationKey = () =>
['createServiceAccountRole'] as const;
export const getCreateServiceAccountRoleMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -91,16 +117,16 @@ export const getCreateServiceAccountRoleMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createServiceAccountRole>>,
TError,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountRoleDTO> },
CreateServiceAccountRoleMutationVariables,
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createServiceAccountRole>>,
TError,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountRoleDTO> },
CreateServiceAccountRoleMutationVariables,
TContext
> => {
const mutationKey = ['createServiceAccountRole'];
const mutationKey = getCreateServiceAccountRoleMutationKey();
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -111,7 +137,7 @@ export const getCreateServiceAccountRoleMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createServiceAccountRole>>,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountRoleDTO> }
CreateServiceAccountRoleMutationVariables
> = (props) => {
const { data } = props ?? {};
@@ -129,6 +155,9 @@ export type CreateServiceAccountRoleMutationBody =
| undefined;
export type CreateServiceAccountRoleMutationError =
ErrorType<RenderErrorResponseDTO>;
export type CreateServiceAccountRoleMutationVariables = {
data?: BodyType<ServiceaccounttypesPostableServiceAccountRoleDTO>;
};
/**
* @summary Create service account role
@@ -140,13 +169,13 @@ export const useCreateServiceAccountRole = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createServiceAccountRole>>,
TError,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountRoleDTO> },
CreateServiceAccountRoleMutationVariables,
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createServiceAccountRole>>,
TError,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountRoleDTO> },
CreateServiceAccountRoleMutationVariables,
TContext
> => {
return useMutation(getCreateServiceAccountRoleMutationOptions(options));
@@ -166,6 +195,9 @@ export const deleteServiceAccountRole = (
});
};
export const getDeleteServiceAccountRoleMutationKey = () =>
['deleteServiceAccountRole'] as const;
export const getDeleteServiceAccountRoleMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -173,16 +205,16 @@ export const getDeleteServiceAccountRoleMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteServiceAccountRole>>,
TError,
{ pathParams: DeleteServiceAccountRolePathParameters },
DeleteServiceAccountRoleMutationVariables,
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof deleteServiceAccountRole>>,
TError,
{ pathParams: DeleteServiceAccountRolePathParameters },
DeleteServiceAccountRoleMutationVariables,
TContext
> => {
const mutationKey = ['deleteServiceAccountRole'];
const mutationKey = getDeleteServiceAccountRoleMutationKey();
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -193,7 +225,7 @@ export const getDeleteServiceAccountRoleMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof deleteServiceAccountRole>>,
{ pathParams: DeleteServiceAccountRolePathParameters }
DeleteServiceAccountRoleMutationVariables
> = (props) => {
const { pathParams } = props ?? {};
@@ -209,6 +241,9 @@ export type DeleteServiceAccountRoleMutationResult = NonNullable<
export type DeleteServiceAccountRoleMutationError =
ErrorType<RenderErrorResponseDTO>;
export type DeleteServiceAccountRoleMutationVariables = {
pathParams: DeleteServiceAccountRolePathParameters;
};
/**
* @summary Delete service account role
@@ -220,13 +255,13 @@ export const useDeleteServiceAccountRole = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteServiceAccountRole>>,
TError,
{ pathParams: DeleteServiceAccountRolePathParameters },
DeleteServiceAccountRoleMutationVariables,
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof deleteServiceAccountRole>>,
TError,
{ pathParams: DeleteServiceAccountRolePathParameters },
DeleteServiceAccountRoleMutationVariables,
TContext
> => {
return useMutation(getDeleteServiceAccountRoleMutationOptions(options));
@@ -318,7 +353,7 @@ export function useGetServiceAccountRole<
}
/**
* @summary Get service account role
* @summary Invalidates the {@link useGetServiceAccountRole} query
*/
export const invalidateGetServiceAccountRole = async (
queryClient: QueryClient,
@@ -334,38 +369,48 @@ export const invalidateGetServiceAccountRole = async (
};
/**
* This endpoint lists the service accounts for an organisation
* Returns a page of the service accounts for an organisation. `query` is a filter expression over name, email, status, created_at and updated_at, for example `status = 'active'`; `sort`/`order` pick the ordering and `limit`/`offset` the page.
* @summary List service accounts
*/
export const listServiceAccounts = (signal?: AbortSignal) => {
export const listServiceAccounts = (
params?: ListServiceAccountsParams,
signal?: AbortSignal,
) => {
return GeneratedAPIInstance<ListServiceAccounts200>({
url: `/api/v1/service_accounts`,
method: 'GET',
params,
signal,
});
};
export const getListServiceAccountsQueryKey = () => {
return [`/api/v1/service_accounts`] as const;
export const getListServiceAccountsQueryKey = (
params?: ListServiceAccountsParams,
) => {
return [`/api/v1/service_accounts`, ...(params ? [params] : [])] as const;
};
export const getListServiceAccountsQueryOptions = <
TData = Awaited<ReturnType<typeof listServiceAccounts>>,
TError = ErrorType<RenderErrorResponseDTO>,
>(options?: {
query?: UseQueryOptions<
Awaited<ReturnType<typeof listServiceAccounts>>,
TError,
TData
>;
}) => {
>(
params?: ListServiceAccountsParams,
options?: {
query?: UseQueryOptions<
Awaited<ReturnType<typeof listServiceAccounts>>,
TError,
TData
>;
},
) => {
const { query: queryOptions } = options ?? {};
const queryKey = queryOptions?.queryKey ?? getListServiceAccountsQueryKey();
const queryKey =
queryOptions?.queryKey ?? getListServiceAccountsQueryKey(params);
const queryFn: QueryFunction<
Awaited<ReturnType<typeof listServiceAccounts>>
> = ({ signal }) => listServiceAccounts(signal);
> = ({ signal }) => listServiceAccounts(params, signal);
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
Awaited<ReturnType<typeof listServiceAccounts>>,
@@ -386,14 +431,17 @@ export type ListServiceAccountsQueryError = ErrorType<RenderErrorResponseDTO>;
export function useListServiceAccounts<
TData = Awaited<ReturnType<typeof listServiceAccounts>>,
TError = ErrorType<RenderErrorResponseDTO>,
>(options?: {
query?: UseQueryOptions<
Awaited<ReturnType<typeof listServiceAccounts>>,
TError,
TData
>;
}): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
const queryOptions = getListServiceAccountsQueryOptions(options);
>(
params?: ListServiceAccountsParams,
options?: {
query?: UseQueryOptions<
Awaited<ReturnType<typeof listServiceAccounts>>,
TError,
TData
>;
},
): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
const queryOptions = getListServiceAccountsQueryOptions(params, options);
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
queryKey: QueryKey;
@@ -403,14 +451,15 @@ export function useListServiceAccounts<
}
/**
* @summary List service accounts
* @summary Invalidates the {@link useListServiceAccounts} query
*/
export const invalidateListServiceAccounts = async (
queryClient: QueryClient,
params?: ListServiceAccountsParams,
options?: InvalidateOptions,
): Promise<QueryClient> => {
await queryClient.invalidateQueries(
{ queryKey: getListServiceAccountsQueryKey() },
{ queryKey: getListServiceAccountsQueryKey(params) },
options,
);
@@ -434,6 +483,9 @@ export const createServiceAccount = (
});
};
export const getCreateServiceAccountMutationKey = () =>
['createServiceAccount'] as const;
export const getCreateServiceAccountMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -441,16 +493,16 @@ export const getCreateServiceAccountMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createServiceAccount>>,
TError,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> },
CreateServiceAccountMutationVariables,
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createServiceAccount>>,
TError,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> },
CreateServiceAccountMutationVariables,
TContext
> => {
const mutationKey = ['createServiceAccount'];
const mutationKey = getCreateServiceAccountMutationKey();
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -461,7 +513,7 @@ export const getCreateServiceAccountMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createServiceAccount>>,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> }
CreateServiceAccountMutationVariables
> = (props) => {
const { data } = props ?? {};
@@ -479,6 +531,9 @@ export type CreateServiceAccountMutationBody =
| undefined;
export type CreateServiceAccountMutationError =
ErrorType<RenderErrorResponseDTO>;
export type CreateServiceAccountMutationVariables = {
data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO>;
};
/**
* @summary Create service account
@@ -490,13 +545,13 @@ export const useCreateServiceAccount = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createServiceAccount>>,
TError,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> },
CreateServiceAccountMutationVariables,
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createServiceAccount>>,
TError,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> },
CreateServiceAccountMutationVariables,
TContext
> => {
return useMutation(getCreateServiceAccountMutationOptions(options));
@@ -516,6 +571,9 @@ export const deleteServiceAccount = (
});
};
export const getDeleteServiceAccountMutationKey = () =>
['deleteServiceAccount'] as const;
export const getDeleteServiceAccountMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -523,16 +581,16 @@ export const getDeleteServiceAccountMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteServiceAccount>>,
TError,
{ pathParams: DeleteServiceAccountPathParameters },
DeleteServiceAccountMutationVariables,
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof deleteServiceAccount>>,
TError,
{ pathParams: DeleteServiceAccountPathParameters },
DeleteServiceAccountMutationVariables,
TContext
> => {
const mutationKey = ['deleteServiceAccount'];
const mutationKey = getDeleteServiceAccountMutationKey();
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -543,7 +601,7 @@ export const getDeleteServiceAccountMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof deleteServiceAccount>>,
{ pathParams: DeleteServiceAccountPathParameters }
DeleteServiceAccountMutationVariables
> = (props) => {
const { pathParams } = props ?? {};
@@ -559,6 +617,9 @@ export type DeleteServiceAccountMutationResult = NonNullable<
export type DeleteServiceAccountMutationError =
ErrorType<RenderErrorResponseDTO>;
export type DeleteServiceAccountMutationVariables = {
pathParams: DeleteServiceAccountPathParameters;
};
/**
* @summary Deletes a service account
@@ -570,13 +631,13 @@ export const useDeleteServiceAccount = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof deleteServiceAccount>>,
TError,
{ pathParams: DeleteServiceAccountPathParameters },
DeleteServiceAccountMutationVariables,
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof deleteServiceAccount>>,
TError,
{ pathParams: DeleteServiceAccountPathParameters },
DeleteServiceAccountMutationVariables,
TContext
> => {
return useMutation(getDeleteServiceAccountMutationOptions(options));
@@ -668,7 +729,7 @@ export function useGetServiceAccount<
}
/**
* @summary Gets a service account
* @summary Invalidates the {@link useGetServiceAccount} query
*/
export const invalidateGetServiceAccount = async (
queryClient: QueryClient,
@@ -701,6 +762,9 @@ export const updateServiceAccount = (
});
};
export const getUpdateServiceAccountMutationKey = () =>
['updateServiceAccount'] as const;
export const getUpdateServiceAccountMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -708,22 +772,16 @@ export const getUpdateServiceAccountMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateServiceAccount>>,
TError,
{
pathParams: UpdateServiceAccountPathParameters;
data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO>;
},
UpdateServiceAccountMutationVariables,
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateServiceAccount>>,
TError,
{
pathParams: UpdateServiceAccountPathParameters;
data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO>;
},
UpdateServiceAccountMutationVariables,
TContext
> => {
const mutationKey = ['updateServiceAccount'];
const mutationKey = getUpdateServiceAccountMutationKey();
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -734,10 +792,7 @@ export const getUpdateServiceAccountMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateServiceAccount>>,
{
pathParams: UpdateServiceAccountPathParameters;
data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO>;
}
UpdateServiceAccountMutationVariables
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -755,6 +810,10 @@ export type UpdateServiceAccountMutationBody =
| undefined;
export type UpdateServiceAccountMutationError =
ErrorType<RenderErrorResponseDTO>;
export type UpdateServiceAccountMutationVariables = {
pathParams: UpdateServiceAccountPathParameters;
data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO>;
};
/**
* @summary Updates a service account
@@ -766,19 +825,13 @@ export const useUpdateServiceAccount = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateServiceAccount>>,
TError,
{
pathParams: UpdateServiceAccountPathParameters;
data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO>;
},
UpdateServiceAccountMutationVariables,
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateServiceAccount>>,
TError,
{
pathParams: UpdateServiceAccountPathParameters;
data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO>;
},
UpdateServiceAccountMutationVariables,
TContext
> => {
return useMutation(getUpdateServiceAccountMutationOptions(options));
@@ -871,7 +924,7 @@ export function useListServiceAccountKeys<
}
/**
* @summary List service account keys
* @summary Invalidates the {@link useListServiceAccountKeys} query
*/
export const invalidateListServiceAccountKeys = async (
queryClient: QueryClient,
@@ -904,6 +957,9 @@ export const createServiceAccountKey = (
});
};
export const getCreateServiceAccountKeyMutationKey = () =>
['createServiceAccountKey'] as const;
export const getCreateServiceAccountKeyMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -911,22 +967,16 @@ export const getCreateServiceAccountKeyMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createServiceAccountKey>>,
TError,
{
pathParams: CreateServiceAccountKeyPathParameters;
data?: BodyType<ServiceaccounttypesPostableFactorAPIKeyDTO>;
},
CreateServiceAccountKeyMutationVariables,
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createServiceAccountKey>>,
TError,
{
pathParams: CreateServiceAccountKeyPathParameters;
data?: BodyType<ServiceaccounttypesPostableFactorAPIKeyDTO>;
},
CreateServiceAccountKeyMutationVariables,
TContext
> => {
const mutationKey = ['createServiceAccountKey'];
const mutationKey = getCreateServiceAccountKeyMutationKey();
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -937,10 +987,7 @@ export const getCreateServiceAccountKeyMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createServiceAccountKey>>,
{
pathParams: CreateServiceAccountKeyPathParameters;
data?: BodyType<ServiceaccounttypesPostableFactorAPIKeyDTO>;
}
CreateServiceAccountKeyMutationVariables
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -958,6 +1005,10 @@ export type CreateServiceAccountKeyMutationBody =
| undefined;
export type CreateServiceAccountKeyMutationError =
ErrorType<RenderErrorResponseDTO>;
export type CreateServiceAccountKeyMutationVariables = {
pathParams: CreateServiceAccountKeyPathParameters;
data?: BodyType<ServiceaccounttypesPostableFactorAPIKeyDTO>;
};
/**
* @summary Create a service account key
@@ -969,19 +1020,13 @@ export const useCreateServiceAccountKey = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createServiceAccountKey>>,
TError,
{
pathParams: CreateServiceAccountKeyPathParameters;
data?: BodyType<ServiceaccounttypesPostableFactorAPIKeyDTO>;
},
CreateServiceAccountKeyMutationVariables,
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createServiceAccountKey>>,
TError,
{
pathParams: CreateServiceAccountKeyPathParameters;
data?: BodyType<ServiceaccounttypesPostableFactorAPIKeyDTO>;
},
CreateServiceAccountKeyMutationVariables,
TContext
> => {
return useMutation(getCreateServiceAccountKeyMutationOptions(options));
@@ -1001,6 +1046,9 @@ export const revokeServiceAccountKey = (
});
};
export const getRevokeServiceAccountKeyMutationKey = () =>
['revokeServiceAccountKey'] as const;
export const getRevokeServiceAccountKeyMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -1008,16 +1056,16 @@ export const getRevokeServiceAccountKeyMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof revokeServiceAccountKey>>,
TError,
{ pathParams: RevokeServiceAccountKeyPathParameters },
RevokeServiceAccountKeyMutationVariables,
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof revokeServiceAccountKey>>,
TError,
{ pathParams: RevokeServiceAccountKeyPathParameters },
RevokeServiceAccountKeyMutationVariables,
TContext
> => {
const mutationKey = ['revokeServiceAccountKey'];
const mutationKey = getRevokeServiceAccountKeyMutationKey();
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -1028,7 +1076,7 @@ export const getRevokeServiceAccountKeyMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof revokeServiceAccountKey>>,
{ pathParams: RevokeServiceAccountKeyPathParameters }
RevokeServiceAccountKeyMutationVariables
> = (props) => {
const { pathParams } = props ?? {};
@@ -1044,6 +1092,9 @@ export type RevokeServiceAccountKeyMutationResult = NonNullable<
export type RevokeServiceAccountKeyMutationError =
ErrorType<RenderErrorResponseDTO>;
export type RevokeServiceAccountKeyMutationVariables = {
pathParams: RevokeServiceAccountKeyPathParameters;
};
/**
* @summary Revoke a service account key
@@ -1055,13 +1106,13 @@ export const useRevokeServiceAccountKey = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof revokeServiceAccountKey>>,
TError,
{ pathParams: RevokeServiceAccountKeyPathParameters },
RevokeServiceAccountKeyMutationVariables,
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof revokeServiceAccountKey>>,
TError,
{ pathParams: RevokeServiceAccountKeyPathParameters },
RevokeServiceAccountKeyMutationVariables,
TContext
> => {
return useMutation(getRevokeServiceAccountKeyMutationOptions(options));
@@ -1084,6 +1135,9 @@ export const updateServiceAccountKey = (
});
};
export const getUpdateServiceAccountKeyMutationKey = () =>
['updateServiceAccountKey'] as const;
export const getUpdateServiceAccountKeyMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -1091,22 +1145,16 @@ export const getUpdateServiceAccountKeyMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateServiceAccountKey>>,
TError,
{
pathParams: UpdateServiceAccountKeyPathParameters;
data?: BodyType<ServiceaccounttypesUpdatableFactorAPIKeyDTO>;
},
UpdateServiceAccountKeyMutationVariables,
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateServiceAccountKey>>,
TError,
{
pathParams: UpdateServiceAccountKeyPathParameters;
data?: BodyType<ServiceaccounttypesUpdatableFactorAPIKeyDTO>;
},
UpdateServiceAccountKeyMutationVariables,
TContext
> => {
const mutationKey = ['updateServiceAccountKey'];
const mutationKey = getUpdateServiceAccountKeyMutationKey();
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -1117,10 +1165,7 @@ export const getUpdateServiceAccountKeyMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateServiceAccountKey>>,
{
pathParams: UpdateServiceAccountKeyPathParameters;
data?: BodyType<ServiceaccounttypesUpdatableFactorAPIKeyDTO>;
}
UpdateServiceAccountKeyMutationVariables
> = (props) => {
const { pathParams, data } = props ?? {};
@@ -1138,6 +1183,10 @@ export type UpdateServiceAccountKeyMutationBody =
| undefined;
export type UpdateServiceAccountKeyMutationError =
ErrorType<RenderErrorResponseDTO>;
export type UpdateServiceAccountKeyMutationVariables = {
pathParams: UpdateServiceAccountKeyPathParameters;
data?: BodyType<ServiceaccounttypesUpdatableFactorAPIKeyDTO>;
};
/**
* @summary Updates a service account key
@@ -1149,19 +1198,13 @@ export const useUpdateServiceAccountKey = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateServiceAccountKey>>,
TError,
{
pathParams: UpdateServiceAccountKeyPathParameters;
data?: BodyType<ServiceaccounttypesUpdatableFactorAPIKeyDTO>;
},
UpdateServiceAccountKeyMutationVariables,
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateServiceAccountKey>>,
TError,
{
pathParams: UpdateServiceAccountKeyPathParameters;
data?: BodyType<ServiceaccounttypesUpdatableFactorAPIKeyDTO>;
},
UpdateServiceAccountKeyMutationVariables,
TContext
> => {
return useMutation(getUpdateServiceAccountKeyMutationOptions(options));
@@ -1254,7 +1297,7 @@ export function useGetServiceAccountRoles<
}
/**
* @summary Gets service account roles
* @summary Invalidates the {@link useGetServiceAccountRoles} query
*/
export const invalidateGetServiceAccountRoles = async (
queryClient: QueryClient,
@@ -1339,7 +1382,7 @@ export function useGetMyServiceAccount<
}
/**
* @summary Gets my service account
* @summary Invalidates the {@link useGetMyServiceAccount} query
*/
export const invalidateGetMyServiceAccount = async (
queryClient: QueryClient,
@@ -1370,6 +1413,9 @@ export const updateMyServiceAccount = (
});
};
export const getUpdateMyServiceAccountMutationKey = () =>
['updateMyServiceAccount'] as const;
export const getUpdateMyServiceAccountMutationOptions = <
TError = ErrorType<RenderErrorResponseDTO>,
TContext = unknown,
@@ -1377,16 +1423,16 @@ export const getUpdateMyServiceAccountMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateMyServiceAccount>>,
TError,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> },
UpdateMyServiceAccountMutationVariables,
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof updateMyServiceAccount>>,
TError,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> },
UpdateMyServiceAccountMutationVariables,
TContext
> => {
const mutationKey = ['updateMyServiceAccount'];
const mutationKey = getUpdateMyServiceAccountMutationKey();
const { mutation: mutationOptions } = options
? options.mutation &&
'mutationKey' in options.mutation &&
@@ -1397,7 +1443,7 @@ export const getUpdateMyServiceAccountMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof updateMyServiceAccount>>,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> }
UpdateMyServiceAccountMutationVariables
> = (props) => {
const { data } = props ?? {};
@@ -1415,6 +1461,9 @@ export type UpdateMyServiceAccountMutationBody =
| undefined;
export type UpdateMyServiceAccountMutationError =
ErrorType<RenderErrorResponseDTO>;
export type UpdateMyServiceAccountMutationVariables = {
data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO>;
};
/**
* @summary Updates my service account
@@ -1426,13 +1475,13 @@ export const useUpdateMyServiceAccount = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof updateMyServiceAccount>>,
TError,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> },
UpdateMyServiceAccountMutationVariables,
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof updateMyServiceAccount>>,
TError,
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> },
UpdateMyServiceAccountMutationVariables,
TContext
> => {
return useMutation(getUpdateMyServiceAccountMutationOptions(options));

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,15 @@
/**
* ! 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

@@ -0,0 +1,15 @@
/**
* ! 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

@@ -0,0 +1,15 @@
/**
* ! 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

@@ -0,0 +1,10 @@
/**
* ! 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;
};

View File

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

View File

@@ -0,0 +1,27 @@
/**
* ! Do not edit manually
* * The file has been auto-generated using Orval for SigNoz
* * regenerate with 'pnpm generate:api'
* SigNoz
*/
import type { AiobservabilitytypesBlobPartDTOType } from './aiobservabilitytypesBlobPartDTOType';
export interface AiobservabilitytypesBlobPartDTO {
/**
* @type string
*/
content: string;
/**
* @type string,null
*/
mime_type?: string | null;
/**
* @type string
*/
modality: string;
/**
* @type string
* @enum blob
*/
type: AiobservabilitytypesBlobPartDTOType;
}

View File

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

View File

@@ -0,0 +1,19 @@
/**
* ! Do not edit manually
* * The file has been auto-generated using Orval for SigNoz
* * regenerate with 'pnpm generate:api'
* SigNoz
*/
import type { AiobservabilitytypesPartsDTO } from './aiobservabilitytypesPartsDTO';
export interface AiobservabilitytypesChatMessageDTO {
/**
* @type string,null
*/
name?: string | null;
parts: AiobservabilitytypesPartsDTO;
/**
* @type string
*/
role: string;
}

View File

@@ -0,0 +1,23 @@
/**
* ! Do not edit manually
* * The file has been auto-generated using Orval for SigNoz
* * regenerate with 'pnpm generate:api'
* SigNoz
*/
import type { AiobservabilitytypesCompactionPartDTOType } from './aiobservabilitytypesCompactionPartDTOType';
export interface AiobservabilitytypesCompactionPartDTO {
/**
* @type string,null
*/
content?: string | null;
/**
* @type string,null
*/
id?: string | null;
/**
* @type string
* @enum compaction
*/
type: AiobservabilitytypesCompactionPartDTOType;
}

View File

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

View File

@@ -0,0 +1,27 @@
/**
* ! Do not edit manually
* * The file has been auto-generated using Orval for SigNoz
* * regenerate with 'pnpm generate:api'
* SigNoz
*/
import type { AiobservabilitytypesFilePartDTOType } from './aiobservabilitytypesFilePartDTOType';
export interface AiobservabilitytypesFilePartDTO {
/**
* @type string
*/
file_id: string;
/**
* @type string,null
*/
mime_type?: string | null;
/**
* @type string
*/
modality: string;
/**
* @type string
* @enum file
*/
type: AiobservabilitytypesFilePartDTOType;
}

View File

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

View File

@@ -0,0 +1,10 @@
/**
* ! Do not edit manually
* * The file has been auto-generated using Orval for SigNoz
* * regenerate with 'pnpm generate:api'
* SigNoz
*/
export interface AiobservabilitytypesGenericPartDTO {
[key: string]: unknown;
}

View File

@@ -0,0 +1,10 @@
/**
* ! Do not edit manually
* * The file has been auto-generated using Orval for SigNoz
* * regenerate with 'pnpm generate:api'
* SigNoz
*/
export interface AiobservabilitytypesGenericServerToolCallDTO {
[key: string]: unknown;
}

View File

@@ -0,0 +1,10 @@
/**
* ! Do not edit manually
* * The file has been auto-generated using Orval for SigNoz
* * regenerate with 'pnpm generate:api'
* SigNoz
*/
export interface AiobservabilitytypesGenericServerToolCallResponseDTO {
[key: string]: unknown;
}

View File

@@ -0,0 +1,10 @@
/**
* ! Do not edit manually
* * The file has been auto-generated using Orval for SigNoz
* * regenerate with 'pnpm generate:api'
* SigNoz
*/
import type { AiobservabilitytypesChatMessageDTO } from './aiobservabilitytypesChatMessageDTO';
export type AiobservabilitytypesInputMessagesDTO =
AiobservabilitytypesChatMessageDTO[];

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