mirror of
https://github.com/SigNoz/signoz.git
synced 2026-11-21 15:50:42 +00:00
Compare commits
1 Commits
refactor/s
...
fix/alert-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd91657857 |
@@ -18,9 +18,7 @@ tag <diff> <tag> <story-id>... # what the reviewer should look at
|
||||
export <diff> --out <dir> # a static site, hostable
|
||||
```
|
||||
|
||||
`<storybook>` is a running dev server (`http://localhost:6006`), a build directory holding `index.json`, or a project directory with `.storybook/`. **Capture from a build**: `pnpm storybook:build` in `frontend` (about 2 minutes) writes `storybook-static/`. A dev server serves the preview module by module, which adds 5 to 10 seconds to every story and, with several stories at once, ends in `page.goto: Timeout 30000ms exceeded` retries.
|
||||
|
||||
Pass `--globals 'a11y.manual:!true'` to every `capture`. The a11y addon otherwise runs axe after every story, about 2 seconds each, and nothing it does shows in a shot.
|
||||
`<storybook>` is a running dev server (`http://localhost:6006`), a build directory holding `index.json`, or a project directory with `.storybook/`. The frontend has **no `build-storybook` script**, only `storybook dev -p 6006`, so point `capture` at a dev server.
|
||||
|
||||
## Cover the change with stories first
|
||||
|
||||
@@ -32,7 +30,7 @@ Then confirm it worked: the two runs' story counts should differ by exactly the
|
||||
|
||||
## Rules that are not optional
|
||||
|
||||
**One freshly started Storybook per ref.** Never start one server and switch git branches under it. Vite's HMR reloads the page, but some modules do not re-initialise, so the shot differs silently from a clean boot and the difference looks like a real change. Settle time does not fix this and is not the variable. Use one worktree and one port per ref, and stop each server before the next. A build made in each ref's worktree has none of this.
|
||||
**One freshly started Storybook per ref.** Never start one server and switch git branches under it. Vite's HMR reloads the page, but some modules do not re-initialise, so the shot differs silently from a clean boot and the difference looks like a real change. Settle time does not fix this and is not the variable. Use one worktree and one port per ref, and stop each server before the next.
|
||||
|
||||
**Capture both themes: `--theme dark,light`.** Without it sbshot shoots the story's own default and everything lands in a single `default/` folder, so every regression in the other theme is invisible. Themes double the shot count, so scope with `--stories` or `--title`, never by dropping a theme.
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ func runServer(ctx context.Context, config signoz.Config, logger *slog.Logger) e
|
||||
zeus.Config{},
|
||||
noopzeus.NewProviderFactory(),
|
||||
licensing.Config{},
|
||||
func(_ sqlstore.SQLStore, _ zeus.Zeus, _ organization.Getter, _ analytics.Analytics, _ cache.Cache) factory.ProviderFactory[licensing.Licensing, licensing.Config] {
|
||||
func(_ sqlstore.SQLStore, _ zeus.Zeus, _ organization.Getter, _ analytics.Analytics) factory.ProviderFactory[licensing.Licensing, licensing.Config] {
|
||||
return nooplicensing.NewFactory()
|
||||
},
|
||||
func(_ zeus.Zeus, _ licensing.Licensing) subscription.Subscription {
|
||||
|
||||
@@ -103,8 +103,8 @@ func runServer(ctx context.Context, config signoz.Config, logger *slog.Logger) e
|
||||
enterprisezeus.Config(),
|
||||
httpzeus.NewProviderFactory(),
|
||||
enterpriselicensing.Config(24*time.Hour, 3),
|
||||
func(sqlstore sqlstore.SQLStore, zeus zeus.Zeus, orgGetter organization.Getter, analytics analytics.Analytics, cache cache.Cache) factory.ProviderFactory[licensing.Licensing, licensing.Config] {
|
||||
return httplicensing.NewProviderFactory(sqlstore, zeus, orgGetter, analytics, cache)
|
||||
func(sqlstore sqlstore.SQLStore, zeus zeus.Zeus, orgGetter organization.Getter, analytics analytics.Analytics) factory.ProviderFactory[licensing.Licensing, licensing.Config] {
|
||||
return httplicensing.NewProviderFactory(sqlstore, zeus, orgGetter, analytics)
|
||||
},
|
||||
func(zeus zeus.Zeus, licensing licensing.Licensing) subscription.Subscription {
|
||||
return httpsubscription.New(zeus, licensing)
|
||||
|
||||
@@ -261,8 +261,8 @@ alertmanager:
|
||||
nflog:
|
||||
# Interval between garbage collection and snapshotting of the notification logs. The snapshot will be stored in the state store.
|
||||
maintenance_interval: 15m
|
||||
# Retention of the notification logs. Must be at least twice the longest repeat interval, which is 8760h for rules with re-notify off.
|
||||
retention: 17520h
|
||||
# Retention of the notification logs.
|
||||
retention: 120h
|
||||
|
||||
##################### Emailing #####################
|
||||
emailing:
|
||||
@@ -364,7 +364,7 @@ tokenizer:
|
||||
interval: 1h
|
||||
token:
|
||||
# The maximum number of tokens a user can have. This limits the number of concurrent sessions a user can have.
|
||||
max_per_user: 20
|
||||
max_per_user: 5
|
||||
|
||||
##################### Flagger #####################
|
||||
flagger:
|
||||
|
||||
@@ -4420,8 +4420,7 @@ components:
|
||||
description: The dashboard title and description.
|
||||
duration:
|
||||
description: The default time range, as a Prometheus duration such as 1h
|
||||
or 7d. The UI opens the dashboard on it, rounded up to whole minutes,
|
||||
when neither the URL nor the viewer's last pick sets a time range.
|
||||
or 7d. Stored, but not applied by the UI.
|
||||
type: string
|
||||
layouts:
|
||||
description: The Grid layouts that place panels, at most 500. Each panel
|
||||
@@ -5528,7 +5527,6 @@ components:
|
||||
signoz/TablePanel: '#/components/schemas/DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesTablePanelSpec'
|
||||
signoz/TextPanel: '#/components/schemas/DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesTextPanelSpec'
|
||||
signoz/TimeSeriesPanel: '#/components/schemas/DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesTimeSeriesPanelSpec'
|
||||
signoz/TopListPanel: '#/components/schemas/DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesTopListPanelSpec'
|
||||
propertyName: kind
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesTimeSeriesPanelSpec'
|
||||
@@ -5543,7 +5541,6 @@ components:
|
||||
- $ref: '#/components/schemas/DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesHeatmapPanelSpec'
|
||||
- $ref: '#/components/schemas/DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesScatterPlotPanelSpec'
|
||||
- $ref: '#/components/schemas/DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesGeoMapPanelSpec'
|
||||
- $ref: '#/components/schemas/DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesTopListPanelSpec'
|
||||
type: object
|
||||
DashboardtypesPanelPluginKind:
|
||||
enum:
|
||||
@@ -5559,7 +5556,6 @@ components:
|
||||
- signoz/HeatmapPanel
|
||||
- signoz/ScatterPlotPanel
|
||||
- signoz/GeoMapPanel
|
||||
- signoz/TopListPanel
|
||||
type: string
|
||||
DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesAreaChartPanelSpec:
|
||||
properties:
|
||||
@@ -5741,21 +5737,6 @@ components:
|
||||
- kind
|
||||
- spec
|
||||
type: object
|
||||
DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesTopListPanelSpec:
|
||||
properties:
|
||||
kind:
|
||||
description: The panel kind.
|
||||
enum:
|
||||
- signoz/TopListPanel
|
||||
type: string
|
||||
spec:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/DashboardtypesTopListPanelSpec'
|
||||
description: The options for this panel kind. {} accepts every default.
|
||||
required:
|
||||
- kind
|
||||
- spec
|
||||
type: object
|
||||
DashboardtypesPanelSpec:
|
||||
properties:
|
||||
display:
|
||||
@@ -6518,43 +6499,6 @@ components:
|
||||
last_6_hr, last_1_day, last_3_days, last_1_week or last_1_month pin a
|
||||
fixed window.'
|
||||
type: object
|
||||
DashboardtypesTopListAppearance:
|
||||
properties:
|
||||
barColor:
|
||||
description: Hex color of every bar; a matching background threshold overrides
|
||||
it.
|
||||
type: string
|
||||
showRank:
|
||||
description: Numbers each row by its position in the list.
|
||||
type: boolean
|
||||
showShare:
|
||||
description: Shows each row's share of the listed rows' total.
|
||||
type: boolean
|
||||
required:
|
||||
- barColor
|
||||
type: object
|
||||
DashboardtypesTopListPanelSpec:
|
||||
properties:
|
||||
appearance:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/DashboardtypesTopListAppearance'
|
||||
description: Rank, share and bar color options.
|
||||
formatting:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/DashboardtypesPanelFormatting'
|
||||
description: Unit and decimal precision of the values.
|
||||
thresholds:
|
||||
description: Rules that recolor a row when its value compares to a threshold
|
||||
as specified.
|
||||
items:
|
||||
$ref: '#/components/schemas/DashboardtypesComparisonThreshold'
|
||||
nullable: true
|
||||
type: array
|
||||
visualization:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/DashboardtypesBasicVisualization'
|
||||
description: The time range the rows are computed over.
|
||||
type: object
|
||||
DashboardtypesUpdatableDashboardV2:
|
||||
properties:
|
||||
image:
|
||||
@@ -11882,7 +11826,7 @@ components:
|
||||
- created_at
|
||||
- name
|
||||
- state
|
||||
- thresholds
|
||||
- severity
|
||||
type: string
|
||||
RuletypesListableRule:
|
||||
properties:
|
||||
@@ -11922,13 +11866,6 @@ 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
|
||||
@@ -11940,7 +11877,6 @@ components:
|
||||
- alert
|
||||
- alertType
|
||||
- ruleType
|
||||
- thresholds
|
||||
type: object
|
||||
RuletypesListableRuleViews:
|
||||
properties:
|
||||
@@ -12307,8 +12243,7 @@ components:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/RuletypesListSort'
|
||||
description: 'The field to sort by: updated_at (the default), created_at,
|
||||
name, state or thresholds. Sorting by thresholds ranks each rule by its
|
||||
first threshold name.'
|
||||
name, state or severity.'
|
||||
states:
|
||||
description: 'Only return rules in these states: firing, pending, recovering,
|
||||
inactive, nodata or disabled. Empty means every state.'
|
||||
@@ -12522,14 +12457,6 @@ components:
|
||||
- schemaVersion
|
||||
- spec
|
||||
type: object
|
||||
ServiceaccounttypesDSLKey:
|
||||
enum:
|
||||
- created_at
|
||||
- email
|
||||
- name
|
||||
- status
|
||||
- updated_at
|
||||
type: string
|
||||
ServiceaccounttypesGettableFactorAPIKey:
|
||||
properties:
|
||||
createdAt:
|
||||
@@ -12566,28 +12493,6 @@ 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:
|
||||
@@ -12630,30 +12535,17 @@ components:
|
||||
orgId:
|
||||
type: string
|
||||
status:
|
||||
$ref: '#/components/schemas/ServiceaccounttypesServiceAccountStatus'
|
||||
type: string
|
||||
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:
|
||||
@@ -12676,11 +12568,6 @@ components:
|
||||
- roleId
|
||||
- role
|
||||
type: object
|
||||
ServiceaccounttypesServiceAccountStatus:
|
||||
enum:
|
||||
- active
|
||||
- deleted
|
||||
type: string
|
||||
ServiceaccounttypesServiceAccountWithRoles:
|
||||
properties:
|
||||
createdAt:
|
||||
@@ -12700,14 +12587,12 @@ components:
|
||||
nullable: true
|
||||
type: array
|
||||
status:
|
||||
$ref: '#/components/schemas/ServiceaccounttypesServiceAccountStatus'
|
||||
type: string
|
||||
updatedAt:
|
||||
format: date-time
|
||||
type: string
|
||||
required:
|
||||
- id
|
||||
- createdAt
|
||||
- updatedAt
|
||||
- name
|
||||
- email
|
||||
- status
|
||||
@@ -13714,7 +13599,6 @@ components:
|
||||
type: string
|
||||
TelemetrytypesSource:
|
||||
enum:
|
||||
- audit
|
||||
- meter
|
||||
- ""
|
||||
type: string
|
||||
@@ -17803,56 +17687,8 @@ paths:
|
||||
/api/v1/service_accounts:
|
||||
get:
|
||||
deprecated: false
|
||||
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.
|
||||
description: This endpoint lists the service accounts for an organisation
|
||||
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:
|
||||
@@ -17860,7 +17696,9 @@ paths:
|
||||
schema:
|
||||
properties:
|
||||
data:
|
||||
$ref: '#/components/schemas/ServiceaccounttypesListableServiceAccount'
|
||||
items:
|
||||
$ref: '#/components/schemas/ServiceaccounttypesServiceAccount'
|
||||
type: array
|
||||
status:
|
||||
type: string
|
||||
required:
|
||||
@@ -17868,12 +17706,6 @@ paths:
|
||||
- data
|
||||
type: object
|
||||
description: OK
|
||||
"400":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/RenderErrorResponse'
|
||||
description: Bad Request
|
||||
"401":
|
||||
content:
|
||||
application/json:
|
||||
@@ -32205,7 +32037,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`/`thresholds`),
|
||||
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
|
||||
@@ -32233,16 +32065,14 @@ paths:
|
||||
type: string
|
||||
type: array
|
||||
- description: 'The field to sort by: updated_at (the default), created_at,
|
||||
name, state or thresholds. Sorting by thresholds ranks each rule by its
|
||||
first threshold name.'
|
||||
name, state or severity.'
|
||||
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 thresholds. Sorting by thresholds ranks each rule by its
|
||||
first threshold name.'
|
||||
name, state or severity.'
|
||||
- description: 'The sort direction: asc or desc (the default).'
|
||||
in: query
|
||||
name: order
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
package httplicensing
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
|
||||
"github.com/SigNoz/signoz/pkg/types/licensetypes"
|
||||
)
|
||||
|
||||
const (
|
||||
activeLicenseCacheKey string = "active_license"
|
||||
activeLicenseCacheTTL time.Duration = 5 * time.Minute
|
||||
)
|
||||
|
||||
// A nil License means the organization has no active license.
|
||||
type cachedActiveLicense struct {
|
||||
License *licensetypes.License
|
||||
}
|
||||
|
||||
func (typ cachedActiveLicense) MarshalBinary() ([]byte, error) {
|
||||
return json.Marshal(typ)
|
||||
}
|
||||
|
||||
func (typ *cachedActiveLicense) UnmarshalBinary(data []byte) error {
|
||||
return json.Unmarshal(data, typ)
|
||||
}
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
|
||||
"github.com/SigNoz/signoz/ee/licensing/licensingstore/sqllicensingstore"
|
||||
"github.com/SigNoz/signoz/pkg/analytics"
|
||||
"github.com/SigNoz/signoz/pkg/cache"
|
||||
"github.com/SigNoz/signoz/pkg/errors"
|
||||
"github.com/SigNoz/signoz/pkg/factory"
|
||||
"github.com/SigNoz/signoz/pkg/licensing"
|
||||
@@ -26,17 +25,16 @@ type provider struct {
|
||||
settings factory.ScopedProviderSettings
|
||||
orgGetter organization.Getter
|
||||
analytics analytics.Analytics
|
||||
cache cache.Cache
|
||||
stopChan chan struct{}
|
||||
}
|
||||
|
||||
func NewProviderFactory(store sqlstore.SQLStore, zeus zeus.Zeus, orgGetter organization.Getter, analytics analytics.Analytics, cache cache.Cache) factory.ProviderFactory[licensing.Licensing, licensing.Config] {
|
||||
func NewProviderFactory(store sqlstore.SQLStore, zeus zeus.Zeus, orgGetter organization.Getter, analytics analytics.Analytics) factory.ProviderFactory[licensing.Licensing, licensing.Config] {
|
||||
return factory.NewProviderFactory(factory.MustNewName("http"), func(ctx context.Context, providerSettings factory.ProviderSettings, config licensing.Config) (licensing.Licensing, error) {
|
||||
return New(ctx, providerSettings, config, store, zeus, orgGetter, analytics, cache)
|
||||
return New(ctx, providerSettings, config, store, zeus, orgGetter, analytics)
|
||||
})
|
||||
}
|
||||
|
||||
func New(ctx context.Context, ps factory.ProviderSettings, config licensing.Config, sqlstore sqlstore.SQLStore, zeus zeus.Zeus, orgGetter organization.Getter, analytics analytics.Analytics, cache cache.Cache) (licensing.Licensing, error) {
|
||||
func New(ctx context.Context, ps factory.ProviderSettings, config licensing.Config, sqlstore sqlstore.SQLStore, zeus zeus.Zeus, orgGetter organization.Getter, analytics analytics.Analytics) (licensing.Licensing, error) {
|
||||
settings := factory.NewScopedProviderSettings(ps, "github.com/SigNoz/signoz/ee/licensing/httplicensing")
|
||||
licensestore := sqllicensingstore.New(sqlstore)
|
||||
return &provider{
|
||||
@@ -47,7 +45,6 @@ func New(ctx context.Context, ps factory.ProviderSettings, config licensing.Conf
|
||||
orgGetter: orgGetter,
|
||||
stopChan: make(chan struct{}),
|
||||
analytics: analytics,
|
||||
cache: cache,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -112,7 +109,6 @@ func (provider *provider) Activate(ctx context.Context, organizationID valuer.UU
|
||||
return nil, err
|
||||
}
|
||||
|
||||
provider.cache.Delete(ctx, organizationID, activeLicenseCacheKey)
|
||||
return license, nil
|
||||
}
|
||||
|
||||
@@ -154,38 +150,25 @@ func (provider *provider) Delete(ctx context.Context, organizationID valuer.UUID
|
||||
return errors.WithAdditionalf(err, "license %s cannot be deleted", licenseID.StringValue())
|
||||
}
|
||||
|
||||
if err := provider.store.Delete(ctx, organizationID, licenseID); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
provider.cache.Delete(ctx, organizationID, activeLicenseCacheKey)
|
||||
return nil
|
||||
return provider.store.Delete(ctx, organizationID, licenseID)
|
||||
}
|
||||
|
||||
// Caches both an active license and no active license, but never a store error.
|
||||
func (provider *provider) GetActive(ctx context.Context, organizationID valuer.UUID) (*licensetypes.License, error) {
|
||||
if cached, ok := provider.getActiveFromCache(ctx, organizationID); ok {
|
||||
if cached.License == nil {
|
||||
return nil, licensetypes.ErrActiveLicenseNotFound(organizationID)
|
||||
}
|
||||
|
||||
return cached.License, nil
|
||||
}
|
||||
|
||||
activeLicense, err := provider.getActiveFromStore(ctx, organizationID)
|
||||
if err != nil && !errors.Ast(err, errors.TypeNotFound) {
|
||||
storableLicenses, err := provider.store.GetAll(ctx, organizationID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if cacheErr := provider.cache.Set(ctx, organizationID, activeLicenseCacheKey, &cachedActiveLicense{License: activeLicense}, activeLicenseCacheTTL); cacheErr != nil {
|
||||
provider.settings.Logger().WarnContext(ctx, "failed to write active license to cache", errors.Attr(cacheErr), slog.String("org_id", organizationID.StringValue()))
|
||||
activeLicense, err := licensetypes.GetActiveLicenseFromStorableLicenses(storableLicenses, organizationID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return activeLicense, err
|
||||
return activeLicense, nil
|
||||
}
|
||||
|
||||
func (provider *provider) Refresh(ctx context.Context, organizationID valuer.UUID) error {
|
||||
activeLicense, err := provider.getActiveFromStore(ctx, organizationID)
|
||||
activeLicense, err := provider.GetActive(ctx, organizationID)
|
||||
if err != nil {
|
||||
if errors.Ast(err, errors.TypeNotFound) {
|
||||
return nil
|
||||
@@ -204,7 +187,6 @@ func (provider *provider) Refresh(ctx context.Context, organizationID valuer.UUI
|
||||
return err
|
||||
}
|
||||
|
||||
provider.cache.Delete(ctx, organizationID, activeLicenseCacheKey)
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
@@ -221,8 +203,6 @@ func (provider *provider) Refresh(ctx context.Context, organizationID valuer.UUI
|
||||
return err
|
||||
}
|
||||
|
||||
provider.cache.Delete(ctx, organizationID, activeLicenseCacheKey)
|
||||
|
||||
stats := licensetypes.NewStatsFromLicense(activeLicense)
|
||||
provider.analytics.Send(ctx,
|
||||
analyticstypes.Track{
|
||||
@@ -269,30 +249,3 @@ func (provider *provider) Collect(ctx context.Context, orgID valuer.UUID) (map[s
|
||||
|
||||
return licensetypes.NewStatsFromLicense(activeLicense), nil
|
||||
}
|
||||
|
||||
func (provider *provider) getActiveFromCache(ctx context.Context, organizationID valuer.UUID) (*cachedActiveLicense, bool) {
|
||||
cached := new(cachedActiveLicense)
|
||||
err := provider.cache.Get(ctx, organizationID, activeLicenseCacheKey, cached)
|
||||
if err != nil {
|
||||
if !errors.Ast(err, errors.TypeNotFound) {
|
||||
provider.settings.Logger().WarnContext(ctx, "failed to read active license from cache", errors.Attr(err), slog.String("org_id", organizationID.StringValue()))
|
||||
}
|
||||
|
||||
return nil, false
|
||||
}
|
||||
|
||||
if cached.License != nil && cached.License.IsExpired() {
|
||||
return nil, false
|
||||
}
|
||||
|
||||
return cached, true
|
||||
}
|
||||
|
||||
func (provider *provider) getActiveFromStore(ctx context.Context, organizationID valuer.UUID) (*licensetypes.License, error) {
|
||||
storableLicenses, err := provider.store.GetAll(ctx, organizationID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return licensetypes.GetActiveLicenseFromStorableLicenses(storableLicenses, organizationID)
|
||||
}
|
||||
|
||||
@@ -1,214 +0,0 @@
|
||||
package httplicensing
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/DATA-DOG/go-sqlmock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/SigNoz/signoz/pkg/analytics/analyticstest"
|
||||
"github.com/SigNoz/signoz/pkg/cache"
|
||||
"github.com/SigNoz/signoz/pkg/cache/cachetest"
|
||||
"github.com/SigNoz/signoz/pkg/errors"
|
||||
"github.com/SigNoz/signoz/pkg/instrumentation/instrumentationtest"
|
||||
"github.com/SigNoz/signoz/pkg/licensing"
|
||||
"github.com/SigNoz/signoz/pkg/sqlstore"
|
||||
"github.com/SigNoz/signoz/pkg/sqlstore/sqlstoretest"
|
||||
"github.com/SigNoz/signoz/pkg/types/licensetypes"
|
||||
"github.com/SigNoz/signoz/pkg/valuer"
|
||||
"github.com/SigNoz/signoz/pkg/zeus"
|
||||
"github.com/SigNoz/signoz/pkg/zeus/noopzeus"
|
||||
)
|
||||
|
||||
var (
|
||||
testOrganizationID = valuer.MustNewUUID("0196f794-ff30-7bee-a5f4-ef5ad315715e")
|
||||
testLicenseID = valuer.MustNewUUID("0196360e-90cd-7a74-8313-1aa815ce2a67")
|
||||
licenseColumns = []string{"id", "created_at", "updated_at", "key", "data", "last_validated_at", "org_id"}
|
||||
)
|
||||
|
||||
const (
|
||||
selectLicensesQuery = `SELECT (.+) FROM "license"`
|
||||
updateLicenseQuery = `UPDATE "license"`
|
||||
deleteLicenseQuery = `DELETE FROM "license"`
|
||||
)
|
||||
|
||||
func newTestLicensing(t *testing.T) (licensing.Licensing, sqlmock.Sqlmock, cache.Cache) {
|
||||
t.Helper()
|
||||
|
||||
sqlStore := sqlstoretest.New(sqlstore.Config{Provider: "sqlite"}, sqlmock.QueryMatcherRegexp)
|
||||
|
||||
licenseCache, err := cachetest.New(cache.Config{Provider: "memory", Memory: cache.Memory{NumCounters: 1000, MaxCost: 1 << 20}})
|
||||
require.NoError(t, err)
|
||||
|
||||
providerSettings := instrumentationtest.New().ToProviderSettings()
|
||||
|
||||
noopZeus, err := noopzeus.New(context.Background(), providerSettings, zeus.Config{})
|
||||
require.NoError(t, err)
|
||||
|
||||
licensing, err := New(context.Background(), providerSettings, licensing.Config{PollInterval: time.Hour, FailureThreshold: 3}, sqlStore, noopZeus, nil, analyticstest.New(), licenseCache)
|
||||
require.NoError(t, err)
|
||||
|
||||
return licensing, sqlStore.Mock(), licenseCache
|
||||
}
|
||||
|
||||
func newLicenseRows(lastValidatedAt time.Time) *sqlmock.Rows {
|
||||
createdAt := time.Date(2026, 1, 1, 0, 0, 0, 0, time.UTC)
|
||||
data := `{"status":"VALID","state":"EVALUATING","platform":"SELF_HOSTED","plan":{"name":"ENTERPRISE"},"valid_from":1732146923,"valid_until":-1,"features":[],"event_queue":{}}`
|
||||
return sqlmock.
|
||||
NewRows(licenseColumns).
|
||||
AddRow(testLicenseID.StringValue(), createdAt, createdAt, "test-license-key", data, lastValidatedAt, testOrganizationID.StringValue())
|
||||
}
|
||||
|
||||
func TestGetActiveServesRepeatReadsFromCache(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
licensing, mock, _ := newTestLicensing(t)
|
||||
|
||||
mock.ExpectQuery(selectLicensesQuery).WillReturnRows(newLicenseRows(time.Now().UTC()))
|
||||
|
||||
fromStore, err := licensing.GetActive(ctx, testOrganizationID)
|
||||
require.NoError(t, err)
|
||||
|
||||
fromCache, err := licensing.GetActive(ctx, testOrganizationID)
|
||||
require.NoError(t, err)
|
||||
|
||||
assert.Equal(t, licensetypes.NewGettableLicenseWithKey(fromStore), licensetypes.NewGettableLicenseWithKey(fromCache))
|
||||
assert.Equal(t, fromStore.OrganizationID, fromCache.OrganizationID)
|
||||
assert.True(t, fromStore.LastValidatedAt.Equal(fromCache.LastValidatedAt))
|
||||
|
||||
fromStoreData, err := json.Marshal(fromStore.Data)
|
||||
require.NoError(t, err)
|
||||
fromCacheData, err := json.Marshal(fromCache.Data)
|
||||
require.NoError(t, err)
|
||||
assert.JSONEq(t, string(fromStoreData), string(fromCacheData))
|
||||
|
||||
require.NoError(t, mock.ExpectationsWereMet())
|
||||
}
|
||||
|
||||
func TestGetActiveCachesNoActiveLicense(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
licensing, mock, _ := newTestLicensing(t)
|
||||
|
||||
mock.ExpectQuery(selectLicensesQuery).WillReturnRows(sqlmock.NewRows(licenseColumns))
|
||||
|
||||
for range 2 {
|
||||
license, err := licensing.GetActive(ctx, testOrganizationID)
|
||||
require.Error(t, err)
|
||||
assert.True(t, errors.Ast(err, errors.TypeNotFound))
|
||||
assert.Nil(t, license)
|
||||
}
|
||||
|
||||
require.NoError(t, mock.ExpectationsWereMet())
|
||||
}
|
||||
|
||||
func TestGetActiveDoesNotCacheErrors(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
licensing, mock, _ := newTestLicensing(t)
|
||||
|
||||
createdAt := time.Date(2026, 1, 1, 0, 0, 0, 0, time.UTC)
|
||||
licenseRowWithoutStatus := sqlmock.
|
||||
NewRows(licenseColumns).
|
||||
AddRow(testLicenseID.StringValue(), createdAt, createdAt, "test-license-key", `{"plan":{"name":"ENTERPRISE"}}`, createdAt, testOrganizationID.StringValue())
|
||||
|
||||
mock.ExpectQuery(selectLicensesQuery).WillReturnRows(licenseRowWithoutStatus)
|
||||
mock.ExpectQuery(selectLicensesQuery).WillReturnRows(newLicenseRows(time.Now().UTC()))
|
||||
|
||||
_, err := licensing.GetActive(ctx, testOrganizationID)
|
||||
require.Error(t, err)
|
||||
assert.ErrorContains(t, err, "license status is missing")
|
||||
|
||||
license, err := licensing.GetActive(ctx, testOrganizationID)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, testLicenseID, license.ID)
|
||||
|
||||
require.NoError(t, mock.ExpectationsWereMet())
|
||||
}
|
||||
|
||||
func TestGetActiveReloadsExpiredCachedLicense(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
licensing, mock, licenseCache := newTestLicensing(t)
|
||||
|
||||
expiredLicense := &licensetypes.License{
|
||||
ID: valuer.GenerateUUID(),
|
||||
ValidFrom: time.Now().Add(-2 * time.Hour).Unix(),
|
||||
ValidUntil: time.Now().Add(-time.Hour).Unix(),
|
||||
OrganizationID: testOrganizationID,
|
||||
}
|
||||
require.NoError(t, licenseCache.Set(ctx, testOrganizationID, activeLicenseCacheKey, &cachedActiveLicense{License: expiredLicense}, activeLicenseCacheTTL))
|
||||
|
||||
mock.ExpectQuery(selectLicensesQuery).WillReturnRows(newLicenseRows(time.Now().UTC()))
|
||||
|
||||
license, err := licensing.GetActive(ctx, testOrganizationID)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, testLicenseID, license.ID)
|
||||
|
||||
require.NoError(t, mock.ExpectationsWereMet())
|
||||
}
|
||||
|
||||
func TestDeleteClearsCachedActiveLicense(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
licensing, mock, _ := newTestLicensing(t)
|
||||
|
||||
mock.ExpectQuery(selectLicensesQuery).WillReturnRows(newLicenseRows(time.Now().UTC()))
|
||||
mock.ExpectQuery(selectLicensesQuery).WillReturnRows(newLicenseRows(time.Now().UTC()))
|
||||
mock.ExpectExec(deleteLicenseQuery).WillReturnResult(sqlmock.NewResult(0, 1))
|
||||
mock.ExpectQuery(selectLicensesQuery).WillReturnRows(sqlmock.NewRows(licenseColumns))
|
||||
|
||||
_, err := licensing.GetActive(ctx, testOrganizationID)
|
||||
require.NoError(t, err)
|
||||
|
||||
require.NoError(t, licensing.Delete(ctx, testOrganizationID, testLicenseID))
|
||||
|
||||
_, err = licensing.GetActive(ctx, testOrganizationID)
|
||||
require.Error(t, err)
|
||||
assert.True(t, errors.Ast(err, errors.TypeNotFound))
|
||||
|
||||
require.NoError(t, mock.ExpectationsWereMet())
|
||||
}
|
||||
|
||||
func TestRefreshClearsCachedActiveLicenseOnDowngrade(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
licensing, mock, _ := newTestLicensing(t)
|
||||
|
||||
staleLastValidatedAt := time.Now().Add(-4 * time.Hour).UTC()
|
||||
mock.ExpectQuery(selectLicensesQuery).WillReturnRows(newLicenseRows(staleLastValidatedAt))
|
||||
mock.ExpectQuery(selectLicensesQuery).WillReturnRows(newLicenseRows(staleLastValidatedAt))
|
||||
mock.ExpectExec(updateLicenseQuery).WillReturnResult(sqlmock.NewResult(0, 1))
|
||||
mock.ExpectQuery(selectLicensesQuery).WillReturnRows(newLicenseRows(staleLastValidatedAt))
|
||||
|
||||
_, err := licensing.GetActive(ctx, testOrganizationID)
|
||||
require.NoError(t, err)
|
||||
|
||||
require.NoError(t, licensing.Refresh(ctx, testOrganizationID))
|
||||
|
||||
_, err = licensing.GetActive(ctx, testOrganizationID)
|
||||
require.NoError(t, err)
|
||||
|
||||
require.NoError(t, mock.ExpectationsWereMet())
|
||||
}
|
||||
|
||||
func TestRefreshWritesActiveLicenseFromStoreNotCache(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
licensing, mock, licenseCache := newTestLicensing(t)
|
||||
|
||||
staleLastValidatedAt := time.Now().Add(-4 * time.Hour).UTC()
|
||||
staleCachedLicense := &licensetypes.License{
|
||||
ID: testLicenseID,
|
||||
Key: "stale-cached-license-key",
|
||||
ValidFrom: 1732146923,
|
||||
ValidUntil: -1,
|
||||
LastValidatedAt: staleLastValidatedAt,
|
||||
OrganizationID: testOrganizationID,
|
||||
}
|
||||
require.NoError(t, licenseCache.Set(ctx, testOrganizationID, activeLicenseCacheKey, &cachedActiveLicense{License: staleCachedLicense}, activeLicenseCacheTTL))
|
||||
|
||||
mock.ExpectQuery(selectLicensesQuery).WillReturnRows(newLicenseRows(staleLastValidatedAt))
|
||||
mock.ExpectExec(`UPDATE "license" .*'test-license-key'`).WillReturnResult(sqlmock.NewResult(0, 1))
|
||||
|
||||
require.NoError(t, licensing.Refresh(ctx, testOrganizationID))
|
||||
|
||||
require.NoError(t, mock.ExpectationsWereMet())
|
||||
}
|
||||
@@ -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 = append(sql, f.TextToJsonColumn(column)...)
|
||||
sql = f.bunf.AppendIdent(sql, column)
|
||||
sql = append(sql, f.convertJSONPathToPostgresWithMode(path, false)...)
|
||||
sql = append(sql, ") AS "...)
|
||||
sql = f.bunf.AppendIdent(sql, alias)
|
||||
|
||||
@@ -213,28 +213,28 @@ func TestJSONArrayElements(t *testing.T) {
|
||||
column: "data",
|
||||
path: "$",
|
||||
alias: "elem",
|
||||
expected: `jsonb_array_elements("data"::jsonb) AS "elem"`,
|
||||
expected: `jsonb_array_elements("data") AS "elem"`,
|
||||
},
|
||||
{
|
||||
name: "root path empty",
|
||||
column: "data",
|
||||
path: "",
|
||||
alias: "elem",
|
||||
expected: `jsonb_array_elements("data"::jsonb) AS "elem"`,
|
||||
expected: `jsonb_array_elements("data") AS "elem"`,
|
||||
},
|
||||
{
|
||||
name: "nested path",
|
||||
column: "metadata",
|
||||
path: "$.items",
|
||||
alias: "item",
|
||||
expected: `jsonb_array_elements("metadata"::jsonb->'items') AS "item"`,
|
||||
expected: `jsonb_array_elements("metadata"->'items') AS "item"`,
|
||||
},
|
||||
{
|
||||
name: "deeply nested path",
|
||||
column: "json_col",
|
||||
path: "$.user.tags",
|
||||
alias: "tag",
|
||||
expected: `jsonb_array_elements("json_col"::jsonb->'user'->'tags') AS "tag"`,
|
||||
expected: `jsonb_array_elements("json_col"->'user'->'tags') AS "tag"`,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -8,5 +8,5 @@
|
||||
|
||||
.title {
|
||||
color: var(--l1-foreground);
|
||||
font-size: var(--label-large-400-font-size);
|
||||
font-size: var(--font-size-lg);
|
||||
}
|
||||
|
||||
@@ -140,15 +140,6 @@
|
||||
"@typescript-eslint/no-namespace": "error",
|
||||
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
|
||||
"@typescript-eslint/no-require-imports": "error",
|
||||
"@typescript-eslint/consistent-type-imports": [
|
||||
"error",
|
||||
{
|
||||
"prefer": "type-imports",
|
||||
"fixStyle": "separate-type-imports",
|
||||
"disallowTypeAnnotations": false
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-import-type-side-effects": "error",
|
||||
"@typescript-eslint/no-this-alias": "error",
|
||||
"@typescript-eslint/no-unnecessary-type-constraint": "warn",
|
||||
// TODO: Change to error after migration to oxlint
|
||||
@@ -321,15 +312,6 @@
|
||||
"error",
|
||||
{
|
||||
"paths": [
|
||||
{
|
||||
"name": "constants/queryBuilder",
|
||||
"importNames": ["PANEL_TYPES"],
|
||||
"message": "Import PANEL_TYPES from constants/queryBuilderPanelTypes so a change to the query builder constants does not rerun every panel test."
|
||||
},
|
||||
{
|
||||
"name": "api/generated/services/sigNoz.schemas",
|
||||
"message": "Import each schema from its own file (api/generated/services/sigNoz.schemas/<name>) so a schema change only reruns the tests that use it."
|
||||
},
|
||||
{
|
||||
"name": "redux",
|
||||
"message": "[State mgmt] redux is deprecated. Migrate to Zustand, nuqs, or react-query."
|
||||
@@ -515,11 +497,7 @@
|
||||
// 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-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
|
||||
"signoz/no-return-text-nodes": "warn"
|
||||
},
|
||||
"ignorePatterns": [
|
||||
"src/parser/*.ts",
|
||||
|
||||
@@ -40,8 +40,8 @@ const mockAliases = [
|
||||
},
|
||||
{
|
||||
// jest: not replaced, a test asserts on the toast it fires.
|
||||
find: /^@signozhq\/ui\/toast$/,
|
||||
replacement: `${srcPath}/storybook/mocks/toast.mock.tsx`,
|
||||
find: /^@signozhq\/ui\/sonner$/,
|
||||
replacement: `${srcPath}/storybook/mocks/sonner.mock.tsx`,
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<!--
|
||||
Every Google Fonts request the app makes is answered with an empty
|
||||
stylesheet; the local faces stand in for them.
|
||||
`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.
|
||||
-->
|
||||
<link rel="stylesheet" href="storybook-fonts.css" />
|
||||
|
||||
@@ -32,12 +34,6 @@
|
||||
pylon: { enabled: false, appId: '', identitySecret: '' },
|
||||
},
|
||||
};
|
||||
|
||||
// OverlayScrollbars drives its handles with scroll-driven animations when the
|
||||
// browser has `ScrollTimeline`. Those never finish, and Storybook waits up to
|
||||
// 5s for running animations after every `play`, so each story with a scroller
|
||||
// would pay the full 5s. Without it the handles are positioned from script.
|
||||
delete window.ScrollTimeline;
|
||||
</script>
|
||||
|
||||
<script>
|
||||
@@ -74,3 +70,49 @@
|
||||
Object.defineProperty(window, 'Date', { value: FrozenDate, writable: true });
|
||||
})();
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// Storybook has no microphone. Chromium's recognizer asks for one and for
|
||||
// Google's speech service, and the `not-allowed` or `network` it reports makes
|
||||
// the assistant hide its mic for the rest of the tab. This one starts
|
||||
// listening at once and hears only what a story passes to `hear`.
|
||||
(() => {
|
||||
class StorySpeechRecognition extends EventTarget {
|
||||
static listening = null;
|
||||
lang = 'en-US';
|
||||
continuous = false;
|
||||
interimResults = false;
|
||||
onstart = null;
|
||||
onresult = null;
|
||||
onerror = null;
|
||||
onend = null;
|
||||
|
||||
start() {
|
||||
StorySpeechRecognition.listening = this;
|
||||
setTimeout(() => this.onstart?.());
|
||||
}
|
||||
|
||||
stop() {
|
||||
if (StorySpeechRecognition.listening === this) {
|
||||
StorySpeechRecognition.listening = null;
|
||||
}
|
||||
setTimeout(() => this.onend?.());
|
||||
}
|
||||
|
||||
abort() {
|
||||
this.stop();
|
||||
}
|
||||
|
||||
/** An interim result: the words so far, still listening. */
|
||||
hear(transcript) {
|
||||
const result = Object.assign([{ transcript, confidence: 1 }], {
|
||||
isFinal: false,
|
||||
});
|
||||
this.onresult?.({ resultIndex: 0, results: [result] });
|
||||
}
|
||||
}
|
||||
|
||||
window.SpeechRecognition = StorySpeechRecognition;
|
||||
window.webkitSpeechRecognition = StorySpeechRecognition;
|
||||
})();
|
||||
</script>
|
||||
|
||||
@@ -147,7 +147,6 @@ const preview: Preview = {
|
||||
'Explorer',
|
||||
['Overview', 'Span Drawer'],
|
||||
'Trace Details',
|
||||
['Overview', 'Thread'],
|
||||
'Funnel Details',
|
||||
],
|
||||
'Metrics',
|
||||
|
||||
@@ -1,11 +1,22 @@
|
||||
/*
|
||||
* The three families the app pulls from Google Fonts, served from the files in
|
||||
* The five 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 three families `src/styles.scss` imports at
|
||||
* runtime. Inter and Geist Mono come from `src/styles.scss` itself.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
@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');
|
||||
@@ -29,3 +40,11 @@
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -14,23 +14,9 @@ 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: [
|
||||
{
|
||||
|
||||
@@ -191,30 +191,34 @@ 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-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);
|
||||
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
|
||||
}
|
||||
|
||||
.hint {
|
||||
font-size: var(--paragraph-small-400-font-size); // 11px
|
||||
line-height: var(--paragraph-small-400-line-height); // 18px
|
||||
// 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
|
||||
}
|
||||
|
||||
.id {
|
||||
font-family: var(--code-base-400-font-family);
|
||||
font-size: var(--code-base-400-font-size); // 13px
|
||||
// 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
|
||||
}
|
||||
```
|
||||
|
||||
@@ -308,7 +312,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(--label-base-400-font-size);
|
||||
--button-font-size: var(--periscope-font-size-base);
|
||||
}
|
||||
|
||||
// Override Input
|
||||
@@ -338,7 +342,7 @@ Components use data attributes for variants/states. Target them for state-specif
|
||||
|
||||
// Target size
|
||||
.wrapper :global([data-size="sm"]) {
|
||||
--button-font-size: var(--label-small-400-font-size);
|
||||
--button-font-size: var(--periscope-font-size-small);
|
||||
}
|
||||
|
||||
// Target color
|
||||
|
||||
@@ -14,6 +14,11 @@
|
||||
<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>
|
||||
|
||||
@@ -36,8 +36,6 @@ const config: Config.InitialOptions = {
|
||||
'^test-mocks/(.*)$': '<rootDir>/__mocks__/$1',
|
||||
'^react-syntax-highlighter/dist/esm/(.*)$':
|
||||
'<rootDir>/node_modules/react-syntax-highlighter/dist/cjs/$1',
|
||||
// `antd` resolves to lib/ here; es/ deep imports must share its module instances (contexts).
|
||||
'^antd/es/(.*)$': '<rootDir>/node_modules/antd/lib/$1',
|
||||
'^@signozhq/(?!ui(?:/|$))([^/]+)$':
|
||||
'<rootDir>/node_modules/@signozhq/$1/dist/$1.js',
|
||||
},
|
||||
|
||||
@@ -20,11 +20,9 @@ export default defineConfig({
|
||||
},
|
||||
output: {
|
||||
target: './src/api/generated/services',
|
||||
schemas: './src/api/generated/services/sigNoz.schemas',
|
||||
client: 'react-query',
|
||||
httpClient: 'axios',
|
||||
mode: 'tags-split',
|
||||
indexFiles: false,
|
||||
prettier: true,
|
||||
headers: true,
|
||||
clean: true,
|
||||
|
||||
@@ -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.8.0",
|
||||
"@signozhq/design-tokens": "2.2.1",
|
||||
"@signozhq/icons": "0.4.0",
|
||||
"@signozhq/ui": "0.4.0-rc.5",
|
||||
"@signozhq/ui": "0.2.0",
|
||||
"@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.28.1",
|
||||
"orval": "8.22.0",
|
||||
"oxfmt": "0.73.0",
|
||||
"oxlint": "1.88.0",
|
||||
"oxlint-tsgolint": "7.0.2004",
|
||||
|
||||
@@ -1,170 +0,0 @@
|
||||
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 },
|
||||
],
|
||||
},
|
||||
],
|
||||
});
|
||||
@@ -1,49 +0,0 @@
|
||||
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 }],
|
||||
},
|
||||
],
|
||||
});
|
||||
@@ -1,324 +0,0 @@
|
||||
/**
|
||||
* 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,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -1,38 +0,0 @@
|
||||
/**
|
||||
* 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 \`--\`.`,
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -17,8 +17,6 @@ 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: {
|
||||
@@ -37,7 +35,5 @@ 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,
|
||||
},
|
||||
};
|
||||
|
||||
1352
frontend/pnpm-lock.yaml
generated
1352
frontend/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
BIN
frontend/public/fonts/GeistMonoVF.woff2
Normal file
BIN
frontend/public/fonts/GeistMonoVF.woff2
Normal file
Binary file not shown.
BIN
frontend/public/fonts/Inter-VariableFont_opsz,wght.ttf
Normal file
BIN
frontend/public/fonts/Inter-VariableFont_opsz,wght.ttf
Normal file
Binary file not shown.
@@ -34,6 +34,10 @@
|
||||
"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"
|
||||
|
||||
@@ -34,6 +34,10 @@
|
||||
"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"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import type { ReactChild } from 'react';
|
||||
import { useCallback, useMemo } from 'react';
|
||||
import { ReactChild, useCallback, useMemo } from 'react';
|
||||
import getLocalStorageApi from 'api/browser/localstorage/get';
|
||||
import setLocalStorageApi from 'api/browser/localstorage/set';
|
||||
import { useListUsers } from 'api/generated/services/users';
|
||||
@@ -14,7 +13,7 @@ import { Redirect } from 'lib/router/Redirect';
|
||||
import { useAppLocation } from 'lib/router/useAppLocation';
|
||||
import { useAppContext } from 'providers/App/App';
|
||||
import { LicensePlatform, LicenseState } from 'types/api/licensesV3/getActive';
|
||||
import type { OrgPreference } from 'types/api/preferences/preference';
|
||||
import { OrgPreference } from 'types/api/preferences/preference';
|
||||
import { USER_ROLES } from 'types/roles';
|
||||
import { isSignozAdminEmail } from 'utils/app';
|
||||
import {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ReactElement } from 'react';
|
||||
import { ReactElement } from 'react';
|
||||
import { QueryClient, QueryClientProvider } from 'react-query';
|
||||
import {
|
||||
MemoryRouter,
|
||||
@@ -21,21 +21,18 @@ import {
|
||||
} from 'lib/authz/utils/authz-test-utils';
|
||||
import { rest, server } from 'mocks-server/server';
|
||||
import { AppContext } from 'providers/App/App';
|
||||
import type { IAppContext, IUser } from 'providers/App/types';
|
||||
import type {
|
||||
LicenseResModel,
|
||||
TrialInfo,
|
||||
} from 'types/api/licensesV3/getActive';
|
||||
import { IAppContext, IUser } from 'providers/App/types';
|
||||
import {
|
||||
LicenseEvent,
|
||||
LicensePlatform,
|
||||
LicenseResModel,
|
||||
LicenseState,
|
||||
LicenseStatus,
|
||||
TrialInfo,
|
||||
} from 'types/api/licensesV3/getActive';
|
||||
import type { OrgPreference } from 'types/api/preferences/preference';
|
||||
import type { ROLES } from 'types/roles';
|
||||
import { USER_ROLES } from 'types/roles';
|
||||
import type { routeWithInitialAuthZSupport } from 'utils/permission';
|
||||
import { OrgPreference } from 'types/api/preferences/preference';
|
||||
import { ROLES, USER_ROLES } from 'types/roles';
|
||||
import { routeWithInitialAuthZSupport } from 'utils/permission';
|
||||
|
||||
import PrivateRoute from '../Private';
|
||||
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
import type { ReactNode } from 'react';
|
||||
import { Suspense, useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import {
|
||||
ReactNode,
|
||||
Suspense,
|
||||
useCallback,
|
||||
useEffect,
|
||||
useMemo,
|
||||
useState,
|
||||
} from 'react';
|
||||
import { Outlet } from 'react-router';
|
||||
import * as Sentry from '@sentry/react';
|
||||
import getLocalStorageApi from 'api/browser/localstorage/get';
|
||||
@@ -26,13 +32,16 @@ import { getCurrentLocation, navigate, subscribe } from 'lib/router/navigation';
|
||||
import ErrorBoundaryFallback from 'pages/ErrorBoundaryFallback/ErrorBoundaryFallback';
|
||||
import posthog from 'posthog-js';
|
||||
import { useAppContext } from 'providers/App/App';
|
||||
import type { IUser } from 'providers/App/types';
|
||||
import { IUser } from 'providers/App/types';
|
||||
import { LicenseStatus } from 'types/api/licensesV3/getActive';
|
||||
import { extractDomain } from 'utils/app';
|
||||
|
||||
import PrivateRoute from './Private';
|
||||
import type { AppRoutes } from './routes';
|
||||
import defaultRoutes, { LIST_LICENSES, SUPPORT_ROUTE } from './routes';
|
||||
import defaultRoutes, {
|
||||
AppRoutes,
|
||||
LIST_LICENSES,
|
||||
SUPPORT_ROUTE,
|
||||
} from './routes';
|
||||
import type { EnabledRouteKeys } from './RouteGate';
|
||||
import {
|
||||
isInjectedScriptError,
|
||||
|
||||
@@ -5,8 +5,7 @@ import { RethrowRouteError } from 'lib/router/RethrowRouteError';
|
||||
|
||||
import { Home } from './pageComponents';
|
||||
import { RouteGate } from './RouteGate';
|
||||
import type { AppRoutes } from './routes';
|
||||
import routes, { LIST_LICENSES, SUPPORT_ROUTE } from './routes';
|
||||
import routes, { AppRoutes, LIST_LICENSES, SUPPORT_ROUTE } from './routes';
|
||||
|
||||
/**
|
||||
* The gate is keyed by its route entry. The outlet renders the match unkeyed,
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { ENVIRONMENT } from 'constants/env';
|
||||
import { server } from 'mocks-server/server';
|
||||
import type { RestRequest } from 'msw';
|
||||
import { rest } from 'msw';
|
||||
import type { MetricRangePayloadV5 } from 'types/api/v5/queryRange';
|
||||
import { rest, RestRequest } from 'msw';
|
||||
import { MetricRangePayloadV5 } from 'types/api/v5/queryRange';
|
||||
|
||||
const QUERY_RANGE_URL = `${ENVIRONMENT.baseURL}/api/v5/query_range`;
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import type { InternalAxiosRequestConfig } from 'axios';
|
||||
import axios from 'axios';
|
||||
import axios, { InternalAxiosRequestConfig } from 'axios';
|
||||
|
||||
import {
|
||||
interceptorRejected,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import type { AxiosError, AxiosResponse } from 'axios';
|
||||
import { isCancel } from 'axios';
|
||||
import type { ErrorResponse } from 'types/api';
|
||||
import type { ErrorStatusCode } from 'types/common';
|
||||
import { AxiosError, AxiosResponse, isCancel } from 'axios';
|
||||
import { ErrorResponse } from 'types/api';
|
||||
import { ErrorStatusCode } from 'types/common';
|
||||
|
||||
export function ErrorResponseHandler(error: AxiosError): ErrorResponse {
|
||||
const { response, request } = error;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { RenderErrorResponseDTO } from 'api/generated/services/sigNoz.schemas/renderErrorResponseDTO';
|
||||
import type { AxiosError } from 'axios';
|
||||
import { RenderErrorResponseDTO } from 'api/generated/services/sigNoz.schemas';
|
||||
import { AxiosError } from 'axios';
|
||||
import APIError from 'types/api/error';
|
||||
|
||||
// The wire shape these handlers can actually rely on. The generated
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { AxiosError } from 'axios';
|
||||
import type { ErrorV2Resp } from 'types/api';
|
||||
import { AxiosError } from 'axios';
|
||||
import { ErrorV2Resp } from 'types/api';
|
||||
import APIError from 'types/api/error';
|
||||
|
||||
function isErrorV2Resp(data: unknown): data is ErrorV2Resp {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import axios from 'api';
|
||||
import type { AxiosResponse } from 'axios';
|
||||
import type { AllIntegrationsProps } from 'types/api/integrations/types';
|
||||
import { AxiosResponse } from 'axios';
|
||||
import { AllIntegrationsProps } from 'types/api/integrations/types';
|
||||
|
||||
export const getAllIntegrations = (): Promise<
|
||||
AxiosResponse<AllIntegrationsProps>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import axios from 'api';
|
||||
import type { AxiosResponse } from 'axios';
|
||||
import type {
|
||||
import { AxiosResponse } from 'axios';
|
||||
import {
|
||||
GetIntegrationPayloadProps,
|
||||
GetIntegrationProps,
|
||||
} from 'types/api/integrations/types';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import axios from 'api';
|
||||
import type { AxiosResponse } from 'axios';
|
||||
import type {
|
||||
import { AxiosResponse } from 'axios';
|
||||
import {
|
||||
GetIntegrationPayloadProps,
|
||||
GetIntegrationStatusProps,
|
||||
} from 'types/api/integrations/types';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import axios from 'api';
|
||||
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
|
||||
import type { AxiosError } from 'axios';
|
||||
import type { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import type {
|
||||
import { AxiosError } from 'axios';
|
||||
import { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import {
|
||||
InstalledIntegrationsSuccessResponse,
|
||||
InstallIntegrationKeyProps,
|
||||
} from 'types/api/integrations/types';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import axios from 'api';
|
||||
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
|
||||
import type { AxiosError } from 'axios';
|
||||
import type { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import type {
|
||||
import { AxiosError } from 'axios';
|
||||
import { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import {
|
||||
UninstallIntegrationProps,
|
||||
UninstallIntegrationSuccessResponse,
|
||||
} from 'types/api/integrations/types';
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
|
||||
import type { AxiosError } from 'axios';
|
||||
import { CanceledError } from 'axios';
|
||||
import { AxiosError, CanceledError } from 'axios';
|
||||
|
||||
describe('ErrorResponseHandler', () => {
|
||||
// axios aborts a request whose signal fired before it was sent without ever
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ErrorResponseHandlerV2 } from 'api/ErrorResponseHandlerV2';
|
||||
import type { AxiosError } from 'axios';
|
||||
import type { ErrorV2Resp } from 'types/api';
|
||||
import { AxiosError } from 'axios';
|
||||
import { ErrorV2Resp } from 'types/api';
|
||||
import APIError from 'types/api/error';
|
||||
|
||||
function asAxiosError(partial: Partial<AxiosError>): AxiosError<ErrorV2Resp> {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import axios from 'api';
|
||||
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
|
||||
import type { AxiosError } from 'axios';
|
||||
import { AxiosError } from 'axios';
|
||||
import convertObjectIntoParams from 'lib/query/convertObjectIntoParams';
|
||||
import type { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import type { PayloadProps, Props } from 'types/api/alerts/getTriggered';
|
||||
import { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import { PayloadProps, Props } from 'types/api/alerts/getTriggered';
|
||||
|
||||
/**
|
||||
* @deprecated Use the generated `useGetAlerts` hook (or `getAlerts` fetcher) from
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { patchRuleByID } from 'api/generated/services/rules';
|
||||
import type { RuletypesPostableRuleDTO } from 'api/generated/services/sigNoz.schemas/ruletypesPostableRuleDTO';
|
||||
import type { RuletypesPostableRuleDTO } from 'api/generated/services/sigNoz.schemas';
|
||||
|
||||
// why: patchRuleByID's generated body type is the full RuletypesPostableRuleDTO
|
||||
// because the backend OpenAPI spec currently advertises PostableRule. The
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
|
||||
import type { AxiosError } from 'axios';
|
||||
import axios from 'axios';
|
||||
import type { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import type { ChangelogSchema } from 'types/api/changelog/getChangelogByVersion';
|
||||
import { DeploymentType } from 'types/api/changelog/getChangelogByVersion';
|
||||
import axios, { AxiosError } from 'axios';
|
||||
import { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import {
|
||||
ChangelogSchema,
|
||||
DeploymentType,
|
||||
} from 'types/api/changelog/getChangelogByVersion';
|
||||
|
||||
const getChangelogByVersion = async (
|
||||
versionId: string,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { LogEventAxiosInstance as axios } from 'api';
|
||||
import getLocalStorageApi from 'api/browser/localstorage/get';
|
||||
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
|
||||
import type { AxiosError } from 'axios';
|
||||
import { AxiosError } from 'axios';
|
||||
import { LOCALSTORAGE } from 'constants/localStorage';
|
||||
import type { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import type { EventSuccessPayloadProps } from 'types/api/events/types';
|
||||
import { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import { EventSuccessPayloadProps } from 'types/api/events/types';
|
||||
|
||||
const logEvent = async (
|
||||
eventName: string,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { ApiV5Instance } from 'api';
|
||||
import { ErrorResponseHandlerV2 } from 'api/ErrorResponseHandlerV2';
|
||||
import type { QueryRangePayloadV5 } from 'api/v5/v5';
|
||||
import type { AxiosError } from 'axios';
|
||||
import type { ErrorV2Resp, SuccessResponseV2 } from 'types/api';
|
||||
import type { ICompositeMetricQuery } from 'types/api/alerts/compositeQuery';
|
||||
import { QueryRangePayloadV5 } from 'api/v5/v5';
|
||||
import { AxiosError } from 'axios';
|
||||
import { ErrorV2Resp, SuccessResponseV2 } from 'types/api';
|
||||
import { ICompositeMetricQuery } from 'types/api/alerts/compositeQuery';
|
||||
|
||||
interface ISubstituteVars {
|
||||
compositeQuery: ICompositeMetricQuery;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { ApiV2Instance as axios } from 'api';
|
||||
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
|
||||
import type { AxiosError } from 'axios';
|
||||
import { AxiosError } from 'axios';
|
||||
import getStartEndRangeTime from 'lib/getStartEndRangeTime';
|
||||
import store from 'store';
|
||||
import type { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import type {
|
||||
import { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import {
|
||||
Props,
|
||||
VariableResponseProps,
|
||||
} from 'types/api/dashboard/variables/query';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import axios from 'api';
|
||||
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
|
||||
import type { AxiosError } from 'axios';
|
||||
import type { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import type { PayloadProps } from 'types/api/disks/getDisks';
|
||||
import { AxiosError } from 'axios';
|
||||
import { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import { PayloadProps } from 'types/api/disks/getDisks';
|
||||
|
||||
const getDisks = async (): Promise<
|
||||
SuccessResponse<PayloadProps> | ErrorResponse
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import axios from 'api';
|
||||
import { ErrorResponseHandlerV2 } from 'api/ErrorResponseHandlerV2';
|
||||
import type { AxiosError } from 'axios';
|
||||
import type { ErrorV2Resp, SuccessResponseV2 } from 'types/api';
|
||||
import type { FieldKeyResponse } from 'types/api/dynamicVariables/getFieldKeys';
|
||||
import { AxiosError } from 'axios';
|
||||
import { ErrorV2Resp, SuccessResponseV2 } from 'types/api';
|
||||
import { FieldKeyResponse } from 'types/api/dynamicVariables/getFieldKeys';
|
||||
|
||||
/**
|
||||
* Get field keys for a given signal type
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/* eslint-disable sonarjs/cognitive-complexity */
|
||||
import axios from 'api';
|
||||
import { ErrorResponseHandlerV2 } from 'api/ErrorResponseHandlerV2';
|
||||
import type { AxiosError } from 'axios';
|
||||
import type { ErrorV2Resp, SuccessResponseV2 } from 'types/api';
|
||||
import type { FieldValueResponse } from 'types/api/dynamicVariables/getFieldValues';
|
||||
import { AxiosError } from 'axios';
|
||||
import { ErrorV2Resp, SuccessResponseV2 } from 'types/api';
|
||||
import { FieldValueResponse } from 'types/api/dynamicVariables/getFieldValues';
|
||||
|
||||
/**
|
||||
* Get field values for a given signal type and field name
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import axios from 'api';
|
||||
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
|
||||
import type { AxiosError } from 'axios';
|
||||
import type { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import type { PayloadProps, Props } from 'types/api/errors/getAll';
|
||||
import { AxiosError } from 'axios';
|
||||
import { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import { PayloadProps, Props } from 'types/api/errors/getAll';
|
||||
|
||||
const getAll = async (
|
||||
props: Props,
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
import axios from 'api';
|
||||
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
|
||||
import type { AxiosError } from 'axios';
|
||||
import { AxiosError } from 'axios';
|
||||
import createQueryParams from 'lib/createQueryParams';
|
||||
import type { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import type {
|
||||
PayloadProps,
|
||||
Props,
|
||||
} from 'types/api/errors/getByErrorTypeAndService';
|
||||
import { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import { PayloadProps, Props } from 'types/api/errors/getByErrorTypeAndService';
|
||||
|
||||
const getByErrorType = async (
|
||||
props: Props,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import axios from 'api';
|
||||
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
|
||||
import type { AxiosError } from 'axios';
|
||||
import { AxiosError } from 'axios';
|
||||
import createQueryParams from 'lib/createQueryParams';
|
||||
import type { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import type { PayloadProps, Props } from 'types/api/errors/getByErrorId';
|
||||
import { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import { PayloadProps, Props } from 'types/api/errors/getByErrorId';
|
||||
|
||||
const getById = async (
|
||||
props: Props,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import axios from 'api';
|
||||
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
|
||||
import type { AxiosError } from 'axios';
|
||||
import type { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import type { PayloadProps, Props } from 'types/api/errors/getErrorCounts';
|
||||
import { AxiosError } from 'axios';
|
||||
import { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import { PayloadProps, Props } from 'types/api/errors/getErrorCounts';
|
||||
|
||||
const getErrorCounts = async (
|
||||
props: Props,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import axios from 'api';
|
||||
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
|
||||
import type { AxiosError } from 'axios';
|
||||
import { AxiosError } from 'axios';
|
||||
import createQueryParams from 'lib/createQueryParams';
|
||||
import type { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import type { PayloadProps, Props } from 'types/api/errors/getNextPrevId';
|
||||
import { ErrorResponse, SuccessResponse } from 'types/api';
|
||||
import { PayloadProps, Props } from 'types/api/errors/getNextPrevId';
|
||||
|
||||
const getErrorCounts = async (
|
||||
props: Props,
|
||||
|
||||
@@ -14,15 +14,13 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { GetAIObservabilityFieldsKeys200 } from '../sigNoz.schemas/getAIObservabilityFieldsKeys200';
|
||||
|
||||
import type { GetAIObservabilityFieldsKeysParams } from '../sigNoz.schemas/getAIObservabilityFieldsKeysParams';
|
||||
|
||||
import type { GetAIObservabilityFieldsValues200 } from '../sigNoz.schemas/getAIObservabilityFieldsValues200';
|
||||
|
||||
import type { GetAIObservabilityFieldsValuesParams } from '../sigNoz.schemas/getAIObservabilityFieldsValuesParams';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
import type {
|
||||
GetAIObservabilityFieldsKeys200,
|
||||
GetAIObservabilityFieldsKeysParams,
|
||||
GetAIObservabilityFieldsValues200,
|
||||
GetAIObservabilityFieldsValuesParams,
|
||||
RenderErrorResponseDTO,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType } from '../../../generatedAPIInstance';
|
||||
@@ -137,7 +135,7 @@ export function useGetAIObservabilityFieldsKeys<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetAIObservabilityFieldsKeys} query
|
||||
* @summary Get AI observability field keys
|
||||
*/
|
||||
export const invalidateGetAIObservabilityFieldsKeys = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -242,7 +240,7 @@ export function useGetAIObservabilityFieldsValues<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetAIObservabilityFieldsValues} query
|
||||
* @summary Get AI observability field values
|
||||
*/
|
||||
export const invalidateGetAIObservabilityFieldsValues = async (
|
||||
queryClient: QueryClient,
|
||||
|
||||
@@ -14,9 +14,7 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { GetAlerts200 } from '../sigNoz.schemas/getAlerts200';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
import type { GetAlerts200, RenderErrorResponseDTO } from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType } from '../../../generatedAPIInstance';
|
||||
@@ -103,7 +101,7 @@ export function useGetAlerts<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetAlerts} query
|
||||
* @summary Get alerts
|
||||
*/
|
||||
export const invalidateGetAlerts = async (
|
||||
queryClient: QueryClient,
|
||||
|
||||
@@ -17,23 +17,17 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { AuthtypesPostableAuthDomainDTO } from '../sigNoz.schemas/authtypesPostableAuthDomainDTO';
|
||||
|
||||
import type { AuthtypesUpdatableAuthDomainDTO } from '../sigNoz.schemas/authtypesUpdatableAuthDomainDTO';
|
||||
|
||||
import type { CreateAuthDomain201 } from '../sigNoz.schemas/createAuthDomain201';
|
||||
|
||||
import type { DeleteAuthDomainPathParameters } from '../sigNoz.schemas/deleteAuthDomainPathParameters';
|
||||
|
||||
import type { GetAuthDomain200 } from '../sigNoz.schemas/getAuthDomain200';
|
||||
|
||||
import type { GetAuthDomainPathParameters } from '../sigNoz.schemas/getAuthDomainPathParameters';
|
||||
|
||||
import type { ListAuthDomains200 } from '../sigNoz.schemas/listAuthDomains200';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
|
||||
import type { UpdateAuthDomainPathParameters } from '../sigNoz.schemas/updateAuthDomainPathParameters';
|
||||
import type {
|
||||
AuthtypesPostableAuthDomainDTO,
|
||||
AuthtypesUpdatableAuthDomainDTO,
|
||||
CreateAuthDomain201,
|
||||
DeleteAuthDomainPathParameters,
|
||||
GetAuthDomain200,
|
||||
GetAuthDomainPathParameters,
|
||||
ListAuthDomains200,
|
||||
RenderErrorResponseDTO,
|
||||
UpdateAuthDomainPathParameters,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
|
||||
@@ -128,7 +122,7 @@ export function useListAuthDomains<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useListAuthDomains} query
|
||||
* @summary List all auth domains
|
||||
*/
|
||||
export const invalidateListAuthDomains = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -159,9 +153,6 @@ export const createAuthDomain = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getCreateAuthDomainMutationKey = () =>
|
||||
['createAuthDomain'] as const;
|
||||
|
||||
export const getCreateAuthDomainMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -169,16 +160,16 @@ export const getCreateAuthDomainMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createAuthDomain>>,
|
||||
TError,
|
||||
CreateAuthDomainMutationVariables,
|
||||
{ data?: BodyType<AuthtypesPostableAuthDomainDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createAuthDomain>>,
|
||||
TError,
|
||||
CreateAuthDomainMutationVariables,
|
||||
{ data?: BodyType<AuthtypesPostableAuthDomainDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getCreateAuthDomainMutationKey();
|
||||
const mutationKey = ['createAuthDomain'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -189,7 +180,7 @@ export const getCreateAuthDomainMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof createAuthDomain>>,
|
||||
CreateAuthDomainMutationVariables
|
||||
{ data?: BodyType<AuthtypesPostableAuthDomainDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -206,9 +197,6 @@ export type CreateAuthDomainMutationBody =
|
||||
| BodyType<AuthtypesPostableAuthDomainDTO>
|
||||
| undefined;
|
||||
export type CreateAuthDomainMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type CreateAuthDomainMutationVariables = {
|
||||
data?: BodyType<AuthtypesPostableAuthDomainDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Create auth domain
|
||||
@@ -220,13 +208,13 @@ export const useCreateAuthDomain = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createAuthDomain>>,
|
||||
TError,
|
||||
CreateAuthDomainMutationVariables,
|
||||
{ data?: BodyType<AuthtypesPostableAuthDomainDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createAuthDomain>>,
|
||||
TError,
|
||||
CreateAuthDomainMutationVariables,
|
||||
{ data?: BodyType<AuthtypesPostableAuthDomainDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getCreateAuthDomainMutationOptions(options));
|
||||
@@ -246,9 +234,6 @@ export const deleteAuthDomain = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getDeleteAuthDomainMutationKey = () =>
|
||||
['deleteAuthDomain'] as const;
|
||||
|
||||
export const getDeleteAuthDomainMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -256,16 +241,16 @@ export const getDeleteAuthDomainMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteAuthDomain>>,
|
||||
TError,
|
||||
DeleteAuthDomainMutationVariables,
|
||||
{ pathParams: DeleteAuthDomainPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteAuthDomain>>,
|
||||
TError,
|
||||
DeleteAuthDomainMutationVariables,
|
||||
{ pathParams: DeleteAuthDomainPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getDeleteAuthDomainMutationKey();
|
||||
const mutationKey = ['deleteAuthDomain'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -276,7 +261,7 @@ export const getDeleteAuthDomainMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof deleteAuthDomain>>,
|
||||
DeleteAuthDomainMutationVariables
|
||||
{ pathParams: DeleteAuthDomainPathParameters }
|
||||
> = (props) => {
|
||||
const { pathParams } = props ?? {};
|
||||
|
||||
@@ -291,9 +276,6 @@ export type DeleteAuthDomainMutationResult = NonNullable<
|
||||
>;
|
||||
|
||||
export type DeleteAuthDomainMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type DeleteAuthDomainMutationVariables = {
|
||||
pathParams: DeleteAuthDomainPathParameters;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Delete auth domain
|
||||
@@ -305,13 +287,13 @@ export const useDeleteAuthDomain = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteAuthDomain>>,
|
||||
TError,
|
||||
DeleteAuthDomainMutationVariables,
|
||||
{ pathParams: DeleteAuthDomainPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteAuthDomain>>,
|
||||
TError,
|
||||
DeleteAuthDomainMutationVariables,
|
||||
{ pathParams: DeleteAuthDomainPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getDeleteAuthDomainMutationOptions(options));
|
||||
@@ -402,7 +384,7 @@ export function useGetAuthDomain<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetAuthDomain} query
|
||||
* @summary Get auth domain by ID
|
||||
*/
|
||||
export const invalidateGetAuthDomain = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -435,9 +417,6 @@ export const updateAuthDomain = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getUpdateAuthDomainMutationKey = () =>
|
||||
['updateAuthDomain'] as const;
|
||||
|
||||
export const getUpdateAuthDomainMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -445,16 +424,22 @@ export const getUpdateAuthDomainMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateAuthDomain>>,
|
||||
TError,
|
||||
UpdateAuthDomainMutationVariables,
|
||||
{
|
||||
pathParams: UpdateAuthDomainPathParameters;
|
||||
data?: BodyType<AuthtypesUpdatableAuthDomainDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateAuthDomain>>,
|
||||
TError,
|
||||
UpdateAuthDomainMutationVariables,
|
||||
{
|
||||
pathParams: UpdateAuthDomainPathParameters;
|
||||
data?: BodyType<AuthtypesUpdatableAuthDomainDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getUpdateAuthDomainMutationKey();
|
||||
const mutationKey = ['updateAuthDomain'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -465,7 +450,10 @@ export const getUpdateAuthDomainMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateAuthDomain>>,
|
||||
UpdateAuthDomainMutationVariables
|
||||
{
|
||||
pathParams: UpdateAuthDomainPathParameters;
|
||||
data?: BodyType<AuthtypesUpdatableAuthDomainDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -482,10 +470,6 @@ export type UpdateAuthDomainMutationBody =
|
||||
| BodyType<AuthtypesUpdatableAuthDomainDTO>
|
||||
| undefined;
|
||||
export type UpdateAuthDomainMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type UpdateAuthDomainMutationVariables = {
|
||||
pathParams: UpdateAuthDomainPathParameters;
|
||||
data?: BodyType<AuthtypesUpdatableAuthDomainDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Update auth domain
|
||||
@@ -497,13 +481,19 @@ export const useUpdateAuthDomain = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateAuthDomain>>,
|
||||
TError,
|
||||
UpdateAuthDomainMutationVariables,
|
||||
{
|
||||
pathParams: UpdateAuthDomainPathParameters;
|
||||
data?: BodyType<AuthtypesUpdatableAuthDomainDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateAuthDomain>>,
|
||||
TError,
|
||||
UpdateAuthDomainMutationVariables,
|
||||
{
|
||||
pathParams: UpdateAuthDomainPathParameters;
|
||||
data?: BodyType<AuthtypesUpdatableAuthDomainDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getUpdateAuthDomainMutationOptions(options));
|
||||
|
||||
@@ -11,11 +11,11 @@ import type {
|
||||
UseMutationResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { AuthtypesTransactionDTO } from '../sigNoz.schemas/authtypesTransactionDTO';
|
||||
|
||||
import type { AuthzCheck200 } from '../sigNoz.schemas/authzCheck200';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
import type {
|
||||
AuthtypesTransactionDTO,
|
||||
AuthzCheck200,
|
||||
RenderErrorResponseDTO,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
|
||||
@@ -37,8 +37,6 @@ export const authzCheck = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getAuthzCheckMutationKey = () => ['authzCheck'] as const;
|
||||
|
||||
export const getAuthzCheckMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -46,16 +44,16 @@ export const getAuthzCheckMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof authzCheck>>,
|
||||
TError,
|
||||
AuthzCheckMutationVariables,
|
||||
{ data?: BodyType<AuthtypesTransactionDTO[]> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof authzCheck>>,
|
||||
TError,
|
||||
AuthzCheckMutationVariables,
|
||||
{ data?: BodyType<AuthtypesTransactionDTO[]> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getAuthzCheckMutationKey();
|
||||
const mutationKey = ['authzCheck'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -66,7 +64,7 @@ export const getAuthzCheckMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof authzCheck>>,
|
||||
AuthzCheckMutationVariables
|
||||
{ data?: BodyType<AuthtypesTransactionDTO[]> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -83,9 +81,6 @@ export type AuthzCheckMutationBody =
|
||||
| BodyType<AuthtypesTransactionDTO[]>
|
||||
| undefined;
|
||||
export type AuthzCheckMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type AuthzCheckMutationVariables = {
|
||||
data?: BodyType<AuthtypesTransactionDTO[]>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Check permissions
|
||||
@@ -97,13 +92,13 @@ export const useAuthzCheck = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof authzCheck>>,
|
||||
TError,
|
||||
AuthzCheckMutationVariables,
|
||||
{ data?: BodyType<AuthtypesTransactionDTO[]> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof authzCheck>>,
|
||||
TError,
|
||||
AuthzCheckMutationVariables,
|
||||
{ data?: BodyType<AuthtypesTransactionDTO[]> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getAuthzCheckMutationOptions(options));
|
||||
|
||||
@@ -17,53 +17,32 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { AlertmanagertypesPostableChannelDTO } from '../sigNoz.schemas/alertmanagertypesPostableChannelDTO';
|
||||
|
||||
import type { AlertmanagertypesPostableNotificationChannelDTO } from '../sigNoz.schemas/alertmanagertypesPostableNotificationChannelDTO';
|
||||
|
||||
import type { AlertmanagertypesReceiverDTO } from '../sigNoz.schemas/alertmanagertypesReceiverDTO';
|
||||
|
||||
import type { AlertmanagertypesRepairChannelParamsDTO } from '../sigNoz.schemas/alertmanagertypesRepairChannelParamsDTO';
|
||||
|
||||
import type { AlertmanagertypesTestableNotificationChannelDTO } from '../sigNoz.schemas/alertmanagertypesTestableNotificationChannelDTO';
|
||||
|
||||
import type { AlertmanagertypesUpdatableNotificationChannelDTO } from '../sigNoz.schemas/alertmanagertypesUpdatableNotificationChannelDTO';
|
||||
|
||||
import type { CreateChannel201 } from '../sigNoz.schemas/createChannel201';
|
||||
|
||||
import type { CreateNotificationChannel201 } from '../sigNoz.schemas/createNotificationChannel201';
|
||||
|
||||
import type { DeleteChannelByIDPathParameters } from '../sigNoz.schemas/deleteChannelByIDPathParameters';
|
||||
|
||||
import type { DeleteNotificationChannelPathParameters } from '../sigNoz.schemas/deleteNotificationChannelPathParameters';
|
||||
|
||||
import type { GetChannelByID200 } from '../sigNoz.schemas/getChannelByID200';
|
||||
|
||||
import type { GetChannelByIDPathParameters } from '../sigNoz.schemas/getChannelByIDPathParameters';
|
||||
|
||||
import type { GetNotificationChannel200 } from '../sigNoz.schemas/getNotificationChannel200';
|
||||
|
||||
import type { GetNotificationChannelPathParameters } from '../sigNoz.schemas/getNotificationChannelPathParameters';
|
||||
|
||||
import type { ListChannels200 } from '../sigNoz.schemas/listChannels200';
|
||||
|
||||
import type { ListNotificationChannels200 } from '../sigNoz.schemas/listNotificationChannels200';
|
||||
|
||||
import type { ListNotificationChannelsParams } from '../sigNoz.schemas/listNotificationChannelsParams';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
|
||||
import type { RepairNotificationChannel200 } from '../sigNoz.schemas/repairNotificationChannel200';
|
||||
|
||||
import type { RepairNotificationChannelParams } from '../sigNoz.schemas/repairNotificationChannelParams';
|
||||
|
||||
import type { RepairNotificationChannelPathParameters } from '../sigNoz.schemas/repairNotificationChannelPathParameters';
|
||||
|
||||
import type { UpdateChannelByIDPathParameters } from '../sigNoz.schemas/updateChannelByIDPathParameters';
|
||||
|
||||
import type { UpdateNotificationChannel200 } from '../sigNoz.schemas/updateNotificationChannel200';
|
||||
|
||||
import type { UpdateNotificationChannelPathParameters } from '../sigNoz.schemas/updateNotificationChannelPathParameters';
|
||||
import type {
|
||||
AlertmanagertypesPostableChannelDTO,
|
||||
AlertmanagertypesPostableNotificationChannelDTO,
|
||||
AlertmanagertypesReceiverDTO,
|
||||
AlertmanagertypesRepairChannelParamsDTO,
|
||||
AlertmanagertypesTestableNotificationChannelDTO,
|
||||
AlertmanagertypesUpdatableNotificationChannelDTO,
|
||||
CreateChannel201,
|
||||
CreateNotificationChannel201,
|
||||
DeleteChannelByIDPathParameters,
|
||||
DeleteNotificationChannelPathParameters,
|
||||
GetChannelByID200,
|
||||
GetChannelByIDPathParameters,
|
||||
GetNotificationChannel200,
|
||||
GetNotificationChannelPathParameters,
|
||||
ListChannels200,
|
||||
ListNotificationChannels200,
|
||||
ListNotificationChannelsParams,
|
||||
RenderErrorResponseDTO,
|
||||
RepairNotificationChannel200,
|
||||
RepairNotificationChannelParams,
|
||||
RepairNotificationChannelPathParameters,
|
||||
UpdateChannelByIDPathParameters,
|
||||
UpdateNotificationChannel200,
|
||||
UpdateNotificationChannelPathParameters,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
|
||||
@@ -158,7 +137,7 @@ export function useListChannels<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useListChannels} query
|
||||
* @summary List notification channels
|
||||
*/
|
||||
export const invalidateListChannels = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -189,8 +168,6 @@ export const createChannel = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getCreateChannelMutationKey = () => ['createChannel'] as const;
|
||||
|
||||
export const getCreateChannelMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -198,16 +175,16 @@ export const getCreateChannelMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createChannel>>,
|
||||
TError,
|
||||
CreateChannelMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesPostableChannelDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createChannel>>,
|
||||
TError,
|
||||
CreateChannelMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesPostableChannelDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getCreateChannelMutationKey();
|
||||
const mutationKey = ['createChannel'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -218,7 +195,7 @@ export const getCreateChannelMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof createChannel>>,
|
||||
CreateChannelMutationVariables
|
||||
{ data?: BodyType<AlertmanagertypesPostableChannelDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -235,9 +212,6 @@ export type CreateChannelMutationBody =
|
||||
| BodyType<AlertmanagertypesPostableChannelDTO>
|
||||
| undefined;
|
||||
export type CreateChannelMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type CreateChannelMutationVariables = {
|
||||
data?: BodyType<AlertmanagertypesPostableChannelDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Create notification channel
|
||||
@@ -249,13 +223,13 @@ export const useCreateChannel = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createChannel>>,
|
||||
TError,
|
||||
CreateChannelMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesPostableChannelDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createChannel>>,
|
||||
TError,
|
||||
CreateChannelMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesPostableChannelDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getCreateChannelMutationOptions(options));
|
||||
@@ -275,9 +249,6 @@ export const deleteChannelByID = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getDeleteChannelByIDMutationKey = () =>
|
||||
['deleteChannelByID'] as const;
|
||||
|
||||
export const getDeleteChannelByIDMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -285,16 +256,16 @@ export const getDeleteChannelByIDMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteChannelByID>>,
|
||||
TError,
|
||||
DeleteChannelByIDMutationVariables,
|
||||
{ pathParams: DeleteChannelByIDPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteChannelByID>>,
|
||||
TError,
|
||||
DeleteChannelByIDMutationVariables,
|
||||
{ pathParams: DeleteChannelByIDPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getDeleteChannelByIDMutationKey();
|
||||
const mutationKey = ['deleteChannelByID'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -305,7 +276,7 @@ export const getDeleteChannelByIDMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof deleteChannelByID>>,
|
||||
DeleteChannelByIDMutationVariables
|
||||
{ pathParams: DeleteChannelByIDPathParameters }
|
||||
> = (props) => {
|
||||
const { pathParams } = props ?? {};
|
||||
|
||||
@@ -320,9 +291,6 @@ export type DeleteChannelByIDMutationResult = NonNullable<
|
||||
>;
|
||||
|
||||
export type DeleteChannelByIDMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type DeleteChannelByIDMutationVariables = {
|
||||
pathParams: DeleteChannelByIDPathParameters;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Delete notification channel
|
||||
@@ -334,13 +302,13 @@ export const useDeleteChannelByID = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteChannelByID>>,
|
||||
TError,
|
||||
DeleteChannelByIDMutationVariables,
|
||||
{ pathParams: DeleteChannelByIDPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteChannelByID>>,
|
||||
TError,
|
||||
DeleteChannelByIDMutationVariables,
|
||||
{ pathParams: DeleteChannelByIDPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getDeleteChannelByIDMutationOptions(options));
|
||||
@@ -431,7 +399,7 @@ export function useGetChannelByID<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetChannelByID} query
|
||||
* @summary Get notification channel by ID
|
||||
*/
|
||||
export const invalidateGetChannelByID = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -464,9 +432,6 @@ export const updateChannelByID = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getUpdateChannelByIDMutationKey = () =>
|
||||
['updateChannelByID'] as const;
|
||||
|
||||
export const getUpdateChannelByIDMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -474,16 +439,22 @@ export const getUpdateChannelByIDMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateChannelByID>>,
|
||||
TError,
|
||||
UpdateChannelByIDMutationVariables,
|
||||
{
|
||||
pathParams: UpdateChannelByIDPathParameters;
|
||||
data?: BodyType<AlertmanagertypesReceiverDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateChannelByID>>,
|
||||
TError,
|
||||
UpdateChannelByIDMutationVariables,
|
||||
{
|
||||
pathParams: UpdateChannelByIDPathParameters;
|
||||
data?: BodyType<AlertmanagertypesReceiverDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getUpdateChannelByIDMutationKey();
|
||||
const mutationKey = ['updateChannelByID'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -494,7 +465,10 @@ export const getUpdateChannelByIDMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateChannelByID>>,
|
||||
UpdateChannelByIDMutationVariables
|
||||
{
|
||||
pathParams: UpdateChannelByIDPathParameters;
|
||||
data?: BodyType<AlertmanagertypesReceiverDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -511,10 +485,6 @@ export type UpdateChannelByIDMutationBody =
|
||||
| BodyType<AlertmanagertypesReceiverDTO>
|
||||
| undefined;
|
||||
export type UpdateChannelByIDMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type UpdateChannelByIDMutationVariables = {
|
||||
pathParams: UpdateChannelByIDPathParameters;
|
||||
data?: BodyType<AlertmanagertypesReceiverDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Update notification channel
|
||||
@@ -526,13 +496,19 @@ export const useUpdateChannelByID = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateChannelByID>>,
|
||||
TError,
|
||||
UpdateChannelByIDMutationVariables,
|
||||
{
|
||||
pathParams: UpdateChannelByIDPathParameters;
|
||||
data?: BodyType<AlertmanagertypesReceiverDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateChannelByID>>,
|
||||
TError,
|
||||
UpdateChannelByIDMutationVariables,
|
||||
{
|
||||
pathParams: UpdateChannelByIDPathParameters;
|
||||
data?: BodyType<AlertmanagertypesReceiverDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getUpdateChannelByIDMutationOptions(options));
|
||||
@@ -554,8 +530,6 @@ export const testChannel = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getTestChannelMutationKey = () => ['testChannel'] as const;
|
||||
|
||||
export const getTestChannelMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -563,16 +537,16 @@ export const getTestChannelMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof testChannel>>,
|
||||
TError,
|
||||
TestChannelMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesReceiverDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof testChannel>>,
|
||||
TError,
|
||||
TestChannelMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesReceiverDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getTestChannelMutationKey();
|
||||
const mutationKey = ['testChannel'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -583,7 +557,7 @@ export const getTestChannelMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof testChannel>>,
|
||||
TestChannelMutationVariables
|
||||
{ data?: BodyType<AlertmanagertypesReceiverDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -600,9 +574,6 @@ export type TestChannelMutationBody =
|
||||
| BodyType<AlertmanagertypesReceiverDTO>
|
||||
| undefined;
|
||||
export type TestChannelMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type TestChannelMutationVariables = {
|
||||
data?: BodyType<AlertmanagertypesReceiverDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Test notification channel
|
||||
@@ -614,13 +585,13 @@ export const useTestChannel = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof testChannel>>,
|
||||
TError,
|
||||
TestChannelMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesReceiverDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof testChannel>>,
|
||||
TError,
|
||||
TestChannelMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesReceiverDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getTestChannelMutationOptions(options));
|
||||
@@ -643,9 +614,6 @@ export const testChannelDeprecated = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getTestChannelDeprecatedMutationKey = () =>
|
||||
['testChannelDeprecated'] as const;
|
||||
|
||||
export const getTestChannelDeprecatedMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -653,16 +621,16 @@ export const getTestChannelDeprecatedMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof testChannelDeprecated>>,
|
||||
TError,
|
||||
TestChannelDeprecatedMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesReceiverDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof testChannelDeprecated>>,
|
||||
TError,
|
||||
TestChannelDeprecatedMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesReceiverDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getTestChannelDeprecatedMutationKey();
|
||||
const mutationKey = ['testChannelDeprecated'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -673,7 +641,7 @@ export const getTestChannelDeprecatedMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof testChannelDeprecated>>,
|
||||
TestChannelDeprecatedMutationVariables
|
||||
{ data?: BodyType<AlertmanagertypesReceiverDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -691,9 +659,6 @@ export type TestChannelDeprecatedMutationBody =
|
||||
| undefined;
|
||||
export type TestChannelDeprecatedMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type TestChannelDeprecatedMutationVariables = {
|
||||
data?: BodyType<AlertmanagertypesReceiverDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
@@ -706,13 +671,13 @@ export const useTestChannelDeprecated = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof testChannelDeprecated>>,
|
||||
TError,
|
||||
TestChannelDeprecatedMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesReceiverDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof testChannelDeprecated>>,
|
||||
TError,
|
||||
TestChannelDeprecatedMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesReceiverDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getTestChannelDeprecatedMutationOptions(options));
|
||||
@@ -801,7 +766,7 @@ export function useListNotificationChannels<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useListNotificationChannels} query
|
||||
* @summary List notification channels
|
||||
*/
|
||||
export const invalidateListNotificationChannels = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -833,9 +798,6 @@ export const createNotificationChannel = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getCreateNotificationChannelMutationKey = () =>
|
||||
['createNotificationChannel'] as const;
|
||||
|
||||
export const getCreateNotificationChannelMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -843,16 +805,16 @@ export const getCreateNotificationChannelMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createNotificationChannel>>,
|
||||
TError,
|
||||
CreateNotificationChannelMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesPostableNotificationChannelDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createNotificationChannel>>,
|
||||
TError,
|
||||
CreateNotificationChannelMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesPostableNotificationChannelDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getCreateNotificationChannelMutationKey();
|
||||
const mutationKey = ['createNotificationChannel'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -863,7 +825,7 @@ export const getCreateNotificationChannelMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof createNotificationChannel>>,
|
||||
CreateNotificationChannelMutationVariables
|
||||
{ data?: BodyType<AlertmanagertypesPostableNotificationChannelDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -881,9 +843,6 @@ export type CreateNotificationChannelMutationBody =
|
||||
| undefined;
|
||||
export type CreateNotificationChannelMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type CreateNotificationChannelMutationVariables = {
|
||||
data?: BodyType<AlertmanagertypesPostableNotificationChannelDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Create notification channel
|
||||
@@ -895,13 +854,13 @@ export const useCreateNotificationChannel = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createNotificationChannel>>,
|
||||
TError,
|
||||
CreateNotificationChannelMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesPostableNotificationChannelDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createNotificationChannel>>,
|
||||
TError,
|
||||
CreateNotificationChannelMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesPostableNotificationChannelDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getCreateNotificationChannelMutationOptions(options));
|
||||
@@ -921,9 +880,6 @@ export const deleteNotificationChannel = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getDeleteNotificationChannelMutationKey = () =>
|
||||
['deleteNotificationChannel'] as const;
|
||||
|
||||
export const getDeleteNotificationChannelMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -931,16 +887,16 @@ export const getDeleteNotificationChannelMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteNotificationChannel>>,
|
||||
TError,
|
||||
DeleteNotificationChannelMutationVariables,
|
||||
{ pathParams: DeleteNotificationChannelPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteNotificationChannel>>,
|
||||
TError,
|
||||
DeleteNotificationChannelMutationVariables,
|
||||
{ pathParams: DeleteNotificationChannelPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getDeleteNotificationChannelMutationKey();
|
||||
const mutationKey = ['deleteNotificationChannel'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -951,7 +907,7 @@ export const getDeleteNotificationChannelMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof deleteNotificationChannel>>,
|
||||
DeleteNotificationChannelMutationVariables
|
||||
{ pathParams: DeleteNotificationChannelPathParameters }
|
||||
> = (props) => {
|
||||
const { pathParams } = props ?? {};
|
||||
|
||||
@@ -967,9 +923,6 @@ export type DeleteNotificationChannelMutationResult = NonNullable<
|
||||
|
||||
export type DeleteNotificationChannelMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type DeleteNotificationChannelMutationVariables = {
|
||||
pathParams: DeleteNotificationChannelPathParameters;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Delete notification channel
|
||||
@@ -981,13 +934,13 @@ export const useDeleteNotificationChannel = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteNotificationChannel>>,
|
||||
TError,
|
||||
DeleteNotificationChannelMutationVariables,
|
||||
{ pathParams: DeleteNotificationChannelPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteNotificationChannel>>,
|
||||
TError,
|
||||
DeleteNotificationChannelMutationVariables,
|
||||
{ pathParams: DeleteNotificationChannelPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getDeleteNotificationChannelMutationOptions(options));
|
||||
@@ -1080,7 +1033,7 @@ export function useGetNotificationChannel<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetNotificationChannel} query
|
||||
* @summary Get notification channel by ID
|
||||
*/
|
||||
export const invalidateGetNotificationChannel = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -1113,9 +1066,6 @@ export const updateNotificationChannel = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getUpdateNotificationChannelMutationKey = () =>
|
||||
['updateNotificationChannel'] as const;
|
||||
|
||||
export const getUpdateNotificationChannelMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -1123,16 +1073,22 @@ export const getUpdateNotificationChannelMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateNotificationChannel>>,
|
||||
TError,
|
||||
UpdateNotificationChannelMutationVariables,
|
||||
{
|
||||
pathParams: UpdateNotificationChannelPathParameters;
|
||||
data?: BodyType<AlertmanagertypesUpdatableNotificationChannelDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateNotificationChannel>>,
|
||||
TError,
|
||||
UpdateNotificationChannelMutationVariables,
|
||||
{
|
||||
pathParams: UpdateNotificationChannelPathParameters;
|
||||
data?: BodyType<AlertmanagertypesUpdatableNotificationChannelDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getUpdateNotificationChannelMutationKey();
|
||||
const mutationKey = ['updateNotificationChannel'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -1143,7 +1099,10 @@ export const getUpdateNotificationChannelMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateNotificationChannel>>,
|
||||
UpdateNotificationChannelMutationVariables
|
||||
{
|
||||
pathParams: UpdateNotificationChannelPathParameters;
|
||||
data?: BodyType<AlertmanagertypesUpdatableNotificationChannelDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -1161,10 +1120,6 @@ export type UpdateNotificationChannelMutationBody =
|
||||
| undefined;
|
||||
export type UpdateNotificationChannelMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type UpdateNotificationChannelMutationVariables = {
|
||||
pathParams: UpdateNotificationChannelPathParameters;
|
||||
data?: BodyType<AlertmanagertypesUpdatableNotificationChannelDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Update notification channel
|
||||
@@ -1176,13 +1131,19 @@ export const useUpdateNotificationChannel = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateNotificationChannel>>,
|
||||
TError,
|
||||
UpdateNotificationChannelMutationVariables,
|
||||
{
|
||||
pathParams: UpdateNotificationChannelPathParameters;
|
||||
data?: BodyType<AlertmanagertypesUpdatableNotificationChannelDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateNotificationChannel>>,
|
||||
TError,
|
||||
UpdateNotificationChannelMutationVariables,
|
||||
{
|
||||
pathParams: UpdateNotificationChannelPathParameters;
|
||||
data?: BodyType<AlertmanagertypesUpdatableNotificationChannelDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getUpdateNotificationChannelMutationOptions(options));
|
||||
@@ -1207,9 +1168,6 @@ export const repairNotificationChannel = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getRepairNotificationChannelMutationKey = () =>
|
||||
['repairNotificationChannel'] as const;
|
||||
|
||||
export const getRepairNotificationChannelMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -1217,16 +1175,24 @@ export const getRepairNotificationChannelMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof repairNotificationChannel>>,
|
||||
TError,
|
||||
RepairNotificationChannelMutationVariables,
|
||||
{
|
||||
pathParams: RepairNotificationChannelPathParameters;
|
||||
data?: BodyType<AlertmanagertypesRepairChannelParamsDTO>;
|
||||
params?: RepairNotificationChannelParams;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof repairNotificationChannel>>,
|
||||
TError,
|
||||
RepairNotificationChannelMutationVariables,
|
||||
{
|
||||
pathParams: RepairNotificationChannelPathParameters;
|
||||
data?: BodyType<AlertmanagertypesRepairChannelParamsDTO>;
|
||||
params?: RepairNotificationChannelParams;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getRepairNotificationChannelMutationKey();
|
||||
const mutationKey = ['repairNotificationChannel'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -1237,7 +1203,11 @@ export const getRepairNotificationChannelMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof repairNotificationChannel>>,
|
||||
RepairNotificationChannelMutationVariables
|
||||
{
|
||||
pathParams: RepairNotificationChannelPathParameters;
|
||||
data?: BodyType<AlertmanagertypesRepairChannelParamsDTO>;
|
||||
params?: RepairNotificationChannelParams;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data, params } = props ?? {};
|
||||
|
||||
@@ -1255,11 +1225,6 @@ export type RepairNotificationChannelMutationBody =
|
||||
| undefined;
|
||||
export type RepairNotificationChannelMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type RepairNotificationChannelMutationVariables = {
|
||||
pathParams: RepairNotificationChannelPathParameters;
|
||||
data?: BodyType<AlertmanagertypesRepairChannelParamsDTO>;
|
||||
params?: RepairNotificationChannelParams;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Repair notification channel
|
||||
@@ -1271,13 +1236,21 @@ export const useRepairNotificationChannel = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof repairNotificationChannel>>,
|
||||
TError,
|
||||
RepairNotificationChannelMutationVariables,
|
||||
{
|
||||
pathParams: RepairNotificationChannelPathParameters;
|
||||
data?: BodyType<AlertmanagertypesRepairChannelParamsDTO>;
|
||||
params?: RepairNotificationChannelParams;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof repairNotificationChannel>>,
|
||||
TError,
|
||||
RepairNotificationChannelMutationVariables,
|
||||
{
|
||||
pathParams: RepairNotificationChannelPathParameters;
|
||||
data?: BodyType<AlertmanagertypesRepairChannelParamsDTO>;
|
||||
params?: RepairNotificationChannelParams;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getRepairNotificationChannelMutationOptions(options));
|
||||
@@ -1299,9 +1272,6 @@ export const testNotificationChannel = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getTestNotificationChannelMutationKey = () =>
|
||||
['testNotificationChannel'] as const;
|
||||
|
||||
export const getTestNotificationChannelMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -1309,16 +1279,16 @@ export const getTestNotificationChannelMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof testNotificationChannel>>,
|
||||
TError,
|
||||
TestNotificationChannelMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesTestableNotificationChannelDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof testNotificationChannel>>,
|
||||
TError,
|
||||
TestNotificationChannelMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesTestableNotificationChannelDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getTestNotificationChannelMutationKey();
|
||||
const mutationKey = ['testNotificationChannel'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -1329,7 +1299,7 @@ export const getTestNotificationChannelMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof testNotificationChannel>>,
|
||||
TestNotificationChannelMutationVariables
|
||||
{ data?: BodyType<AlertmanagertypesTestableNotificationChannelDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -1347,9 +1317,6 @@ export type TestNotificationChannelMutationBody =
|
||||
| undefined;
|
||||
export type TestNotificationChannelMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type TestNotificationChannelMutationVariables = {
|
||||
data?: BodyType<AlertmanagertypesTestableNotificationChannelDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Test notification channel
|
||||
@@ -1361,13 +1328,13 @@ export const useTestNotificationChannel = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof testNotificationChannel>>,
|
||||
TError,
|
||||
TestNotificationChannelMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesTestableNotificationChannelDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof testNotificationChannel>>,
|
||||
TError,
|
||||
TestNotificationChannelMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesTestableNotificationChannelDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getTestNotificationChannelMutationOptions(options));
|
||||
|
||||
@@ -17,61 +17,36 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { AgentCheckIn200 } from '../sigNoz.schemas/agentCheckIn200';
|
||||
|
||||
import type { AgentCheckInDeprecated200 } from '../sigNoz.schemas/agentCheckInDeprecated200';
|
||||
|
||||
import type { AgentCheckInDeprecatedPathParameters } from '../sigNoz.schemas/agentCheckInDeprecatedPathParameters';
|
||||
|
||||
import type { AgentCheckInPathParameters } from '../sigNoz.schemas/agentCheckInPathParameters';
|
||||
|
||||
import type { CloudintegrationtypesPostableAccountDTO } from '../sigNoz.schemas/cloudintegrationtypesPostableAccountDTO';
|
||||
|
||||
import type { CloudintegrationtypesPostableAgentCheckInDTO } from '../sigNoz.schemas/cloudintegrationtypesPostableAgentCheckInDTO';
|
||||
|
||||
import type { CloudintegrationtypesUpdatableAccountDTO } from '../sigNoz.schemas/cloudintegrationtypesUpdatableAccountDTO';
|
||||
|
||||
import type { CloudintegrationtypesUpdatableServiceDTO } from '../sigNoz.schemas/cloudintegrationtypesUpdatableServiceDTO';
|
||||
|
||||
import type { CreateAccount201 } from '../sigNoz.schemas/createAccount201';
|
||||
|
||||
import type { CreateAccountPathParameters } from '../sigNoz.schemas/createAccountPathParameters';
|
||||
|
||||
import type { DisconnectAccountPathParameters } from '../sigNoz.schemas/disconnectAccountPathParameters';
|
||||
|
||||
import type { GetAccount200 } from '../sigNoz.schemas/getAccount200';
|
||||
|
||||
import type { GetAccountPathParameters } from '../sigNoz.schemas/getAccountPathParameters';
|
||||
|
||||
import type { GetAccountService200 } from '../sigNoz.schemas/getAccountService200';
|
||||
|
||||
import type { GetAccountServicePathParameters } from '../sigNoz.schemas/getAccountServicePathParameters';
|
||||
|
||||
import type { GetConnectionCredentials200 } from '../sigNoz.schemas/getConnectionCredentials200';
|
||||
|
||||
import type { GetConnectionCredentialsPathParameters } from '../sigNoz.schemas/getConnectionCredentialsPathParameters';
|
||||
|
||||
import type { GetService200 } from '../sigNoz.schemas/getService200';
|
||||
|
||||
import type { GetServicePathParameters } from '../sigNoz.schemas/getServicePathParameters';
|
||||
|
||||
import type { ListAccountServicesMetadata200 } from '../sigNoz.schemas/listAccountServicesMetadata200';
|
||||
|
||||
import type { ListAccountServicesMetadataPathParameters } from '../sigNoz.schemas/listAccountServicesMetadataPathParameters';
|
||||
|
||||
import type { ListAccounts200 } from '../sigNoz.schemas/listAccounts200';
|
||||
|
||||
import type { ListAccountsPathParameters } from '../sigNoz.schemas/listAccountsPathParameters';
|
||||
|
||||
import type { ListServicesMetadata200 } from '../sigNoz.schemas/listServicesMetadata200';
|
||||
|
||||
import type { ListServicesMetadataPathParameters } from '../sigNoz.schemas/listServicesMetadataPathParameters';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
|
||||
import type { UpdateAccountPathParameters } from '../sigNoz.schemas/updateAccountPathParameters';
|
||||
|
||||
import type { UpdateServicePathParameters } from '../sigNoz.schemas/updateServicePathParameters';
|
||||
import type {
|
||||
AgentCheckIn200,
|
||||
AgentCheckInDeprecated200,
|
||||
AgentCheckInDeprecatedPathParameters,
|
||||
AgentCheckInPathParameters,
|
||||
CloudintegrationtypesPostableAccountDTO,
|
||||
CloudintegrationtypesPostableAgentCheckInDTO,
|
||||
CloudintegrationtypesUpdatableAccountDTO,
|
||||
CloudintegrationtypesUpdatableServiceDTO,
|
||||
CreateAccount201,
|
||||
CreateAccountPathParameters,
|
||||
DisconnectAccountPathParameters,
|
||||
GetAccount200,
|
||||
GetAccountPathParameters,
|
||||
GetAccountService200,
|
||||
GetAccountServicePathParameters,
|
||||
GetConnectionCredentials200,
|
||||
GetConnectionCredentialsPathParameters,
|
||||
GetService200,
|
||||
GetServicePathParameters,
|
||||
ListAccountServicesMetadata200,
|
||||
ListAccountServicesMetadataPathParameters,
|
||||
ListAccounts200,
|
||||
ListAccountsPathParameters,
|
||||
ListServicesMetadata200,
|
||||
ListServicesMetadataPathParameters,
|
||||
RenderErrorResponseDTO,
|
||||
UpdateAccountPathParameters,
|
||||
UpdateServicePathParameters,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
|
||||
@@ -115,9 +90,6 @@ export const agentCheckInDeprecated = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getAgentCheckInDeprecatedMutationKey = () =>
|
||||
['agentCheckInDeprecated'] as const;
|
||||
|
||||
export const getAgentCheckInDeprecatedMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -125,16 +97,22 @@ export const getAgentCheckInDeprecatedMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof agentCheckInDeprecated>>,
|
||||
TError,
|
||||
AgentCheckInDeprecatedMutationVariables,
|
||||
{
|
||||
pathParams: AgentCheckInDeprecatedPathParameters;
|
||||
data?: BodyType<CloudintegrationtypesPostableAgentCheckInDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof agentCheckInDeprecated>>,
|
||||
TError,
|
||||
AgentCheckInDeprecatedMutationVariables,
|
||||
{
|
||||
pathParams: AgentCheckInDeprecatedPathParameters;
|
||||
data?: BodyType<CloudintegrationtypesPostableAgentCheckInDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getAgentCheckInDeprecatedMutationKey();
|
||||
const mutationKey = ['agentCheckInDeprecated'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -145,7 +123,10 @@ export const getAgentCheckInDeprecatedMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof agentCheckInDeprecated>>,
|
||||
AgentCheckInDeprecatedMutationVariables
|
||||
{
|
||||
pathParams: AgentCheckInDeprecatedPathParameters;
|
||||
data?: BodyType<CloudintegrationtypesPostableAgentCheckInDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -163,10 +144,6 @@ export type AgentCheckInDeprecatedMutationBody =
|
||||
| undefined;
|
||||
export type AgentCheckInDeprecatedMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type AgentCheckInDeprecatedMutationVariables = {
|
||||
pathParams: AgentCheckInDeprecatedPathParameters;
|
||||
data?: BodyType<CloudintegrationtypesPostableAgentCheckInDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
@@ -179,13 +156,19 @@ export const useAgentCheckInDeprecated = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof agentCheckInDeprecated>>,
|
||||
TError,
|
||||
AgentCheckInDeprecatedMutationVariables,
|
||||
{
|
||||
pathParams: AgentCheckInDeprecatedPathParameters;
|
||||
data?: BodyType<CloudintegrationtypesPostableAgentCheckInDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof agentCheckInDeprecated>>,
|
||||
TError,
|
||||
AgentCheckInDeprecatedMutationVariables,
|
||||
{
|
||||
pathParams: AgentCheckInDeprecatedPathParameters;
|
||||
data?: BodyType<CloudintegrationtypesPostableAgentCheckInDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getAgentCheckInDeprecatedMutationOptions(options));
|
||||
@@ -277,7 +260,7 @@ export function useListAccounts<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useListAccounts} query
|
||||
* @summary List accounts
|
||||
*/
|
||||
export const invalidateListAccounts = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -310,8 +293,6 @@ export const createAccount = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getCreateAccountMutationKey = () => ['createAccount'] as const;
|
||||
|
||||
export const getCreateAccountMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -319,16 +300,22 @@ export const getCreateAccountMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createAccount>>,
|
||||
TError,
|
||||
CreateAccountMutationVariables,
|
||||
{
|
||||
pathParams: CreateAccountPathParameters;
|
||||
data?: BodyType<CloudintegrationtypesPostableAccountDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createAccount>>,
|
||||
TError,
|
||||
CreateAccountMutationVariables,
|
||||
{
|
||||
pathParams: CreateAccountPathParameters;
|
||||
data?: BodyType<CloudintegrationtypesPostableAccountDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getCreateAccountMutationKey();
|
||||
const mutationKey = ['createAccount'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -339,7 +326,10 @@ export const getCreateAccountMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof createAccount>>,
|
||||
CreateAccountMutationVariables
|
||||
{
|
||||
pathParams: CreateAccountPathParameters;
|
||||
data?: BodyType<CloudintegrationtypesPostableAccountDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -356,10 +346,6 @@ export type CreateAccountMutationBody =
|
||||
| BodyType<CloudintegrationtypesPostableAccountDTO>
|
||||
| undefined;
|
||||
export type CreateAccountMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type CreateAccountMutationVariables = {
|
||||
pathParams: CreateAccountPathParameters;
|
||||
data?: BodyType<CloudintegrationtypesPostableAccountDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Create account
|
||||
@@ -371,13 +357,19 @@ export const useCreateAccount = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createAccount>>,
|
||||
TError,
|
||||
CreateAccountMutationVariables,
|
||||
{
|
||||
pathParams: CreateAccountPathParameters;
|
||||
data?: BodyType<CloudintegrationtypesPostableAccountDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createAccount>>,
|
||||
TError,
|
||||
CreateAccountMutationVariables,
|
||||
{
|
||||
pathParams: CreateAccountPathParameters;
|
||||
data?: BodyType<CloudintegrationtypesPostableAccountDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getCreateAccountMutationOptions(options));
|
||||
@@ -397,9 +389,6 @@ export const disconnectAccount = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getDisconnectAccountMutationKey = () =>
|
||||
['disconnectAccount'] as const;
|
||||
|
||||
export const getDisconnectAccountMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -407,16 +396,16 @@ export const getDisconnectAccountMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof disconnectAccount>>,
|
||||
TError,
|
||||
DisconnectAccountMutationVariables,
|
||||
{ pathParams: DisconnectAccountPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof disconnectAccount>>,
|
||||
TError,
|
||||
DisconnectAccountMutationVariables,
|
||||
{ pathParams: DisconnectAccountPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getDisconnectAccountMutationKey();
|
||||
const mutationKey = ['disconnectAccount'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -427,7 +416,7 @@ export const getDisconnectAccountMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof disconnectAccount>>,
|
||||
DisconnectAccountMutationVariables
|
||||
{ pathParams: DisconnectAccountPathParameters }
|
||||
> = (props) => {
|
||||
const { pathParams } = props ?? {};
|
||||
|
||||
@@ -442,9 +431,6 @@ export type DisconnectAccountMutationResult = NonNullable<
|
||||
>;
|
||||
|
||||
export type DisconnectAccountMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type DisconnectAccountMutationVariables = {
|
||||
pathParams: DisconnectAccountPathParameters;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Disconnect account
|
||||
@@ -456,13 +442,13 @@ export const useDisconnectAccount = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof disconnectAccount>>,
|
||||
TError,
|
||||
DisconnectAccountMutationVariables,
|
||||
{ pathParams: DisconnectAccountPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof disconnectAccount>>,
|
||||
TError,
|
||||
DisconnectAccountMutationVariables,
|
||||
{ pathParams: DisconnectAccountPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getDisconnectAccountMutationOptions(options));
|
||||
@@ -557,7 +543,7 @@ export function useGetAccount<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetAccount} query
|
||||
* @summary Get account
|
||||
*/
|
||||
export const invalidateGetAccount = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -590,8 +576,6 @@ export const updateAccount = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getUpdateAccountMutationKey = () => ['updateAccount'] as const;
|
||||
|
||||
export const getUpdateAccountMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -599,16 +583,22 @@ export const getUpdateAccountMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateAccount>>,
|
||||
TError,
|
||||
UpdateAccountMutationVariables,
|
||||
{
|
||||
pathParams: UpdateAccountPathParameters;
|
||||
data?: BodyType<CloudintegrationtypesUpdatableAccountDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateAccount>>,
|
||||
TError,
|
||||
UpdateAccountMutationVariables,
|
||||
{
|
||||
pathParams: UpdateAccountPathParameters;
|
||||
data?: BodyType<CloudintegrationtypesUpdatableAccountDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getUpdateAccountMutationKey();
|
||||
const mutationKey = ['updateAccount'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -619,7 +609,10 @@ export const getUpdateAccountMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateAccount>>,
|
||||
UpdateAccountMutationVariables
|
||||
{
|
||||
pathParams: UpdateAccountPathParameters;
|
||||
data?: BodyType<CloudintegrationtypesUpdatableAccountDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -636,10 +629,6 @@ export type UpdateAccountMutationBody =
|
||||
| BodyType<CloudintegrationtypesUpdatableAccountDTO>
|
||||
| undefined;
|
||||
export type UpdateAccountMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type UpdateAccountMutationVariables = {
|
||||
pathParams: UpdateAccountPathParameters;
|
||||
data?: BodyType<CloudintegrationtypesUpdatableAccountDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Update account
|
||||
@@ -651,13 +640,19 @@ export const useUpdateAccount = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateAccount>>,
|
||||
TError,
|
||||
UpdateAccountMutationVariables,
|
||||
{
|
||||
pathParams: UpdateAccountPathParameters;
|
||||
data?: BodyType<CloudintegrationtypesUpdatableAccountDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateAccount>>,
|
||||
TError,
|
||||
UpdateAccountMutationVariables,
|
||||
{
|
||||
pathParams: UpdateAccountPathParameters;
|
||||
data?: BodyType<CloudintegrationtypesUpdatableAccountDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getUpdateAccountMutationOptions(options));
|
||||
@@ -761,7 +756,7 @@ export function useListAccountServicesMetadata<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useListAccountServicesMetadata} query
|
||||
* @summary List account services metadata
|
||||
*/
|
||||
export const invalidateListAccountServicesMetadata = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -878,7 +873,7 @@ export function useGetAccountService<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetAccountService} query
|
||||
* @summary Get service for account
|
||||
*/
|
||||
export const invalidateGetAccountService = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -911,8 +906,6 @@ export const updateService = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getUpdateServiceMutationKey = () => ['updateService'] as const;
|
||||
|
||||
export const getUpdateServiceMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -920,16 +913,22 @@ export const getUpdateServiceMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateService>>,
|
||||
TError,
|
||||
UpdateServiceMutationVariables,
|
||||
{
|
||||
pathParams: UpdateServicePathParameters;
|
||||
data?: BodyType<CloudintegrationtypesUpdatableServiceDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateService>>,
|
||||
TError,
|
||||
UpdateServiceMutationVariables,
|
||||
{
|
||||
pathParams: UpdateServicePathParameters;
|
||||
data?: BodyType<CloudintegrationtypesUpdatableServiceDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getUpdateServiceMutationKey();
|
||||
const mutationKey = ['updateService'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -940,7 +939,10 @@ export const getUpdateServiceMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateService>>,
|
||||
UpdateServiceMutationVariables
|
||||
{
|
||||
pathParams: UpdateServicePathParameters;
|
||||
data?: BodyType<CloudintegrationtypesUpdatableServiceDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -957,10 +959,6 @@ export type UpdateServiceMutationBody =
|
||||
| BodyType<CloudintegrationtypesUpdatableServiceDTO>
|
||||
| undefined;
|
||||
export type UpdateServiceMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type UpdateServiceMutationVariables = {
|
||||
pathParams: UpdateServicePathParameters;
|
||||
data?: BodyType<CloudintegrationtypesUpdatableServiceDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Update service
|
||||
@@ -972,13 +970,19 @@ export const useUpdateService = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateService>>,
|
||||
TError,
|
||||
UpdateServiceMutationVariables,
|
||||
{
|
||||
pathParams: UpdateServicePathParameters;
|
||||
data?: BodyType<CloudintegrationtypesUpdatableServiceDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateService>>,
|
||||
TError,
|
||||
UpdateServiceMutationVariables,
|
||||
{
|
||||
pathParams: UpdateServicePathParameters;
|
||||
data?: BodyType<CloudintegrationtypesUpdatableServiceDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getUpdateServiceMutationOptions(options));
|
||||
@@ -1001,8 +1005,6 @@ export const agentCheckIn = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getAgentCheckInMutationKey = () => ['agentCheckIn'] as const;
|
||||
|
||||
export const getAgentCheckInMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -1010,16 +1012,22 @@ export const getAgentCheckInMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof agentCheckIn>>,
|
||||
TError,
|
||||
AgentCheckInMutationVariables,
|
||||
{
|
||||
pathParams: AgentCheckInPathParameters;
|
||||
data?: BodyType<CloudintegrationtypesPostableAgentCheckInDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof agentCheckIn>>,
|
||||
TError,
|
||||
AgentCheckInMutationVariables,
|
||||
{
|
||||
pathParams: AgentCheckInPathParameters;
|
||||
data?: BodyType<CloudintegrationtypesPostableAgentCheckInDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getAgentCheckInMutationKey();
|
||||
const mutationKey = ['agentCheckIn'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -1030,7 +1038,10 @@ export const getAgentCheckInMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof agentCheckIn>>,
|
||||
AgentCheckInMutationVariables
|
||||
{
|
||||
pathParams: AgentCheckInPathParameters;
|
||||
data?: BodyType<CloudintegrationtypesPostableAgentCheckInDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -1047,10 +1058,6 @@ export type AgentCheckInMutationBody =
|
||||
| BodyType<CloudintegrationtypesPostableAgentCheckInDTO>
|
||||
| undefined;
|
||||
export type AgentCheckInMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type AgentCheckInMutationVariables = {
|
||||
pathParams: AgentCheckInPathParameters;
|
||||
data?: BodyType<CloudintegrationtypesPostableAgentCheckInDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Agent check-in
|
||||
@@ -1062,13 +1069,19 @@ export const useAgentCheckIn = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof agentCheckIn>>,
|
||||
TError,
|
||||
AgentCheckInMutationVariables,
|
||||
{
|
||||
pathParams: AgentCheckInPathParameters;
|
||||
data?: BodyType<CloudintegrationtypesPostableAgentCheckInDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof agentCheckIn>>,
|
||||
TError,
|
||||
AgentCheckInMutationVariables,
|
||||
{
|
||||
pathParams: AgentCheckInPathParameters;
|
||||
data?: BodyType<CloudintegrationtypesPostableAgentCheckInDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getAgentCheckInMutationOptions(options));
|
||||
@@ -1165,7 +1178,7 @@ export function useGetConnectionCredentials<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetConnectionCredentials} query
|
||||
* @summary Get connection credentials
|
||||
*/
|
||||
export const invalidateGetConnectionCredentials = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -1270,7 +1283,7 @@ export function useListServicesMetadata<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useListServicesMetadata} query
|
||||
* @summary List services metadata
|
||||
*/
|
||||
export const invalidateListServicesMetadata = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -1380,7 +1393,7 @@ export function useGetService<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetService} query
|
||||
* @summary Get service
|
||||
*/
|
||||
export const invalidateGetService = async (
|
||||
queryClient: QueryClient,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -17,23 +17,17 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { AlertmanagertypesPostablePlannedMaintenanceDTO } from '../sigNoz.schemas/alertmanagertypesPostablePlannedMaintenanceDTO';
|
||||
|
||||
import type { CreateDowntimeSchedule201 } from '../sigNoz.schemas/createDowntimeSchedule201';
|
||||
|
||||
import type { DeleteDowntimeScheduleByIDPathParameters } from '../sigNoz.schemas/deleteDowntimeScheduleByIDPathParameters';
|
||||
|
||||
import type { GetDowntimeScheduleByID200 } from '../sigNoz.schemas/getDowntimeScheduleByID200';
|
||||
|
||||
import type { GetDowntimeScheduleByIDPathParameters } from '../sigNoz.schemas/getDowntimeScheduleByIDPathParameters';
|
||||
|
||||
import type { ListDowntimeSchedules200 } from '../sigNoz.schemas/listDowntimeSchedules200';
|
||||
|
||||
import type { ListDowntimeSchedulesParams } from '../sigNoz.schemas/listDowntimeSchedulesParams';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
|
||||
import type { UpdateDowntimeScheduleByIDPathParameters } from '../sigNoz.schemas/updateDowntimeScheduleByIDPathParameters';
|
||||
import type {
|
||||
AlertmanagertypesPostablePlannedMaintenanceDTO,
|
||||
CreateDowntimeSchedule201,
|
||||
DeleteDowntimeScheduleByIDPathParameters,
|
||||
GetDowntimeScheduleByID200,
|
||||
GetDowntimeScheduleByIDPathParameters,
|
||||
ListDowntimeSchedules200,
|
||||
ListDowntimeSchedulesParams,
|
||||
RenderErrorResponseDTO,
|
||||
UpdateDowntimeScheduleByIDPathParameters,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
|
||||
@@ -141,7 +135,7 @@ export function useListDowntimeSchedules<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useListDowntimeSchedules} query
|
||||
* @summary List downtime schedules
|
||||
*/
|
||||
export const invalidateListDowntimeSchedules = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -173,9 +167,6 @@ export const createDowntimeSchedule = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getCreateDowntimeScheduleMutationKey = () =>
|
||||
['createDowntimeSchedule'] as const;
|
||||
|
||||
export const getCreateDowntimeScheduleMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -183,16 +174,16 @@ export const getCreateDowntimeScheduleMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createDowntimeSchedule>>,
|
||||
TError,
|
||||
CreateDowntimeScheduleMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesPostablePlannedMaintenanceDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createDowntimeSchedule>>,
|
||||
TError,
|
||||
CreateDowntimeScheduleMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesPostablePlannedMaintenanceDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getCreateDowntimeScheduleMutationKey();
|
||||
const mutationKey = ['createDowntimeSchedule'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -203,7 +194,7 @@ export const getCreateDowntimeScheduleMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof createDowntimeSchedule>>,
|
||||
CreateDowntimeScheduleMutationVariables
|
||||
{ data?: BodyType<AlertmanagertypesPostablePlannedMaintenanceDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -221,9 +212,6 @@ export type CreateDowntimeScheduleMutationBody =
|
||||
| undefined;
|
||||
export type CreateDowntimeScheduleMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type CreateDowntimeScheduleMutationVariables = {
|
||||
data?: BodyType<AlertmanagertypesPostablePlannedMaintenanceDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Create downtime schedule
|
||||
@@ -235,13 +223,13 @@ export const useCreateDowntimeSchedule = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createDowntimeSchedule>>,
|
||||
TError,
|
||||
CreateDowntimeScheduleMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesPostablePlannedMaintenanceDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createDowntimeSchedule>>,
|
||||
TError,
|
||||
CreateDowntimeScheduleMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesPostablePlannedMaintenanceDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getCreateDowntimeScheduleMutationOptions(options));
|
||||
@@ -261,9 +249,6 @@ export const deleteDowntimeScheduleByID = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getDeleteDowntimeScheduleByIDMutationKey = () =>
|
||||
['deleteDowntimeScheduleByID'] as const;
|
||||
|
||||
export const getDeleteDowntimeScheduleByIDMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -271,16 +256,16 @@ export const getDeleteDowntimeScheduleByIDMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteDowntimeScheduleByID>>,
|
||||
TError,
|
||||
DeleteDowntimeScheduleByIDMutationVariables,
|
||||
{ pathParams: DeleteDowntimeScheduleByIDPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteDowntimeScheduleByID>>,
|
||||
TError,
|
||||
DeleteDowntimeScheduleByIDMutationVariables,
|
||||
{ pathParams: DeleteDowntimeScheduleByIDPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getDeleteDowntimeScheduleByIDMutationKey();
|
||||
const mutationKey = ['deleteDowntimeScheduleByID'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -291,7 +276,7 @@ export const getDeleteDowntimeScheduleByIDMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof deleteDowntimeScheduleByID>>,
|
||||
DeleteDowntimeScheduleByIDMutationVariables
|
||||
{ pathParams: DeleteDowntimeScheduleByIDPathParameters }
|
||||
> = (props) => {
|
||||
const { pathParams } = props ?? {};
|
||||
|
||||
@@ -307,9 +292,6 @@ export type DeleteDowntimeScheduleByIDMutationResult = NonNullable<
|
||||
|
||||
export type DeleteDowntimeScheduleByIDMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type DeleteDowntimeScheduleByIDMutationVariables = {
|
||||
pathParams: DeleteDowntimeScheduleByIDPathParameters;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Delete downtime schedule
|
||||
@@ -321,13 +303,13 @@ export const useDeleteDowntimeScheduleByID = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteDowntimeScheduleByID>>,
|
||||
TError,
|
||||
DeleteDowntimeScheduleByIDMutationVariables,
|
||||
{ pathParams: DeleteDowntimeScheduleByIDPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteDowntimeScheduleByID>>,
|
||||
TError,
|
||||
DeleteDowntimeScheduleByIDMutationVariables,
|
||||
{ pathParams: DeleteDowntimeScheduleByIDPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getDeleteDowntimeScheduleByIDMutationOptions(options));
|
||||
@@ -420,7 +402,7 @@ export function useGetDowntimeScheduleByID<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetDowntimeScheduleByID} query
|
||||
* @summary Get downtime schedule by ID
|
||||
*/
|
||||
export const invalidateGetDowntimeScheduleByID = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -453,9 +435,6 @@ export const updateDowntimeScheduleByID = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getUpdateDowntimeScheduleByIDMutationKey = () =>
|
||||
['updateDowntimeScheduleByID'] as const;
|
||||
|
||||
export const getUpdateDowntimeScheduleByIDMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -463,16 +442,22 @@ export const getUpdateDowntimeScheduleByIDMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateDowntimeScheduleByID>>,
|
||||
TError,
|
||||
UpdateDowntimeScheduleByIDMutationVariables,
|
||||
{
|
||||
pathParams: UpdateDowntimeScheduleByIDPathParameters;
|
||||
data?: BodyType<AlertmanagertypesPostablePlannedMaintenanceDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateDowntimeScheduleByID>>,
|
||||
TError,
|
||||
UpdateDowntimeScheduleByIDMutationVariables,
|
||||
{
|
||||
pathParams: UpdateDowntimeScheduleByIDPathParameters;
|
||||
data?: BodyType<AlertmanagertypesPostablePlannedMaintenanceDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getUpdateDowntimeScheduleByIDMutationKey();
|
||||
const mutationKey = ['updateDowntimeScheduleByID'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -483,7 +468,10 @@ export const getUpdateDowntimeScheduleByIDMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateDowntimeScheduleByID>>,
|
||||
UpdateDowntimeScheduleByIDMutationVariables
|
||||
{
|
||||
pathParams: UpdateDowntimeScheduleByIDPathParameters;
|
||||
data?: BodyType<AlertmanagertypesPostablePlannedMaintenanceDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -501,10 +489,6 @@ export type UpdateDowntimeScheduleByIDMutationBody =
|
||||
| undefined;
|
||||
export type UpdateDowntimeScheduleByIDMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type UpdateDowntimeScheduleByIDMutationVariables = {
|
||||
pathParams: UpdateDowntimeScheduleByIDPathParameters;
|
||||
data?: BodyType<AlertmanagertypesPostablePlannedMaintenanceDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Update downtime schedule
|
||||
@@ -516,13 +500,19 @@ export const useUpdateDowntimeScheduleByID = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateDowntimeScheduleByID>>,
|
||||
TError,
|
||||
UpdateDowntimeScheduleByIDMutationVariables,
|
||||
{
|
||||
pathParams: UpdateDowntimeScheduleByIDPathParameters;
|
||||
data?: BodyType<AlertmanagertypesPostablePlannedMaintenanceDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateDowntimeScheduleByID>>,
|
||||
TError,
|
||||
UpdateDowntimeScheduleByIDMutationVariables,
|
||||
{
|
||||
pathParams: UpdateDowntimeScheduleByIDPathParameters;
|
||||
data?: BodyType<AlertmanagertypesPostablePlannedMaintenanceDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getUpdateDowntimeScheduleByIDMutationOptions(options));
|
||||
|
||||
@@ -14,9 +14,7 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { GetFeatures200 } from '../sigNoz.schemas/getFeatures200';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
import type { GetFeatures200, RenderErrorResponseDTO } from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType } from '../../../generatedAPIInstance';
|
||||
@@ -111,7 +109,7 @@ export function useGetFeatures<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetFeatures} query
|
||||
* @summary Get features
|
||||
*/
|
||||
export const invalidateGetFeatures = async (
|
||||
queryClient: QueryClient,
|
||||
|
||||
@@ -14,15 +14,13 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { GetFieldsKeys200 } from '../sigNoz.schemas/getFieldsKeys200';
|
||||
|
||||
import type { GetFieldsKeysParams } from '../sigNoz.schemas/getFieldsKeysParams';
|
||||
|
||||
import type { GetFieldsValues200 } from '../sigNoz.schemas/getFieldsValues200';
|
||||
|
||||
import type { GetFieldsValuesParams } from '../sigNoz.schemas/getFieldsValuesParams';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
import type {
|
||||
GetFieldsKeys200,
|
||||
GetFieldsKeysParams,
|
||||
GetFieldsValues200,
|
||||
GetFieldsValuesParams,
|
||||
RenderErrorResponseDTO,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType } from '../../../generatedAPIInstance';
|
||||
@@ -127,7 +125,7 @@ export function useGetFieldsKeys<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetFieldsKeys} query
|
||||
* @summary Get field keys
|
||||
*/
|
||||
export const invalidateGetFieldsKeys = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -222,7 +220,7 @@ export function useGetFieldsValues<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetFieldsValues} query
|
||||
* @summary Get field values
|
||||
*/
|
||||
export const invalidateGetFieldsValues = async (
|
||||
queryClient: QueryClient,
|
||||
|
||||
@@ -17,55 +17,33 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { CreateIngestionKey201 } from '../sigNoz.schemas/createIngestionKey201';
|
||||
|
||||
import type { CreateIngestionKeyLimit201 } from '../sigNoz.schemas/createIngestionKeyLimit201';
|
||||
|
||||
import type { CreateIngestionKeyLimitPathParameters } from '../sigNoz.schemas/createIngestionKeyLimitPathParameters';
|
||||
|
||||
import type { CreateIngestionLimit201 } from '../sigNoz.schemas/createIngestionLimit201';
|
||||
|
||||
import type { DeleteIngestionKeyLimitPathParameters } from '../sigNoz.schemas/deleteIngestionKeyLimitPathParameters';
|
||||
|
||||
import type { DeleteIngestionKeyPathParameters } from '../sigNoz.schemas/deleteIngestionKeyPathParameters';
|
||||
|
||||
import type { DeleteIngestionLimitPathParameters } from '../sigNoz.schemas/deleteIngestionLimitPathParameters';
|
||||
|
||||
import type { GatewaytypesDeprecatedPostableIngestionKeyLimitDTO } from '../sigNoz.schemas/gatewaytypesDeprecatedPostableIngestionKeyLimitDTO';
|
||||
|
||||
import type { GatewaytypesPostableIngestionKeyDTO } from '../sigNoz.schemas/gatewaytypesPostableIngestionKeyDTO';
|
||||
|
||||
import type { GatewaytypesPostableIngestionKeyLimitDTO } from '../sigNoz.schemas/gatewaytypesPostableIngestionKeyLimitDTO';
|
||||
|
||||
import type { GatewaytypesUpdatableIngestionKeyLimitDTO } from '../sigNoz.schemas/gatewaytypesUpdatableIngestionKeyLimitDTO';
|
||||
|
||||
import type { GetIngestionKey200 } from '../sigNoz.schemas/getIngestionKey200';
|
||||
|
||||
import type { GetIngestionKeyLimits200 } from '../sigNoz.schemas/getIngestionKeyLimits200';
|
||||
|
||||
import type { GetIngestionKeyLimitsPathParameters } from '../sigNoz.schemas/getIngestionKeyLimitsPathParameters';
|
||||
|
||||
import type { GetIngestionKeyPathParameters } from '../sigNoz.schemas/getIngestionKeyPathParameters';
|
||||
|
||||
import type { GetIngestionKeys200 } from '../sigNoz.schemas/getIngestionKeys200';
|
||||
|
||||
import type { GetIngestionKeysParams } from '../sigNoz.schemas/getIngestionKeysParams';
|
||||
|
||||
import type { GetIngestionLimit200 } from '../sigNoz.schemas/getIngestionLimit200';
|
||||
|
||||
import type { GetIngestionLimitPathParameters } from '../sigNoz.schemas/getIngestionLimitPathParameters';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
|
||||
import type { SearchIngestionKeys200 } from '../sigNoz.schemas/searchIngestionKeys200';
|
||||
|
||||
import type { SearchIngestionKeysParams } from '../sigNoz.schemas/searchIngestionKeysParams';
|
||||
|
||||
import type { UpdateIngestionKeyLimitPathParameters } from '../sigNoz.schemas/updateIngestionKeyLimitPathParameters';
|
||||
|
||||
import type { UpdateIngestionKeyPathParameters } from '../sigNoz.schemas/updateIngestionKeyPathParameters';
|
||||
|
||||
import type { UpdateIngestionLimitPathParameters } from '../sigNoz.schemas/updateIngestionLimitPathParameters';
|
||||
import type {
|
||||
CreateIngestionKey201,
|
||||
CreateIngestionKeyLimit201,
|
||||
CreateIngestionKeyLimitPathParameters,
|
||||
CreateIngestionLimit201,
|
||||
DeleteIngestionKeyLimitPathParameters,
|
||||
DeleteIngestionKeyPathParameters,
|
||||
DeleteIngestionLimitPathParameters,
|
||||
GatewaytypesDeprecatedPostableIngestionKeyLimitDTO,
|
||||
GatewaytypesPostableIngestionKeyDTO,
|
||||
GatewaytypesPostableIngestionKeyLimitDTO,
|
||||
GatewaytypesUpdatableIngestionKeyLimitDTO,
|
||||
GetIngestionKey200,
|
||||
GetIngestionKeyLimits200,
|
||||
GetIngestionKeyLimitsPathParameters,
|
||||
GetIngestionKeyPathParameters,
|
||||
GetIngestionKeys200,
|
||||
GetIngestionKeysParams,
|
||||
GetIngestionLimit200,
|
||||
GetIngestionLimitPathParameters,
|
||||
RenderErrorResponseDTO,
|
||||
SearchIngestionKeys200,
|
||||
SearchIngestionKeysParams,
|
||||
UpdateIngestionKeyLimitPathParameters,
|
||||
UpdateIngestionKeyPathParameters,
|
||||
UpdateIngestionLimitPathParameters,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
|
||||
@@ -175,7 +153,7 @@ export function useGetIngestionKeys<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetIngestionKeys} query
|
||||
* @summary Get ingestion keys for workspace
|
||||
*/
|
||||
export const invalidateGetIngestionKeys = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -207,9 +185,6 @@ export const createIngestionKey = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getCreateIngestionKeyMutationKey = () =>
|
||||
['createIngestionKey'] as const;
|
||||
|
||||
export const getCreateIngestionKeyMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -217,16 +192,16 @@ export const getCreateIngestionKeyMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createIngestionKey>>,
|
||||
TError,
|
||||
CreateIngestionKeyMutationVariables,
|
||||
{ data?: BodyType<GatewaytypesPostableIngestionKeyDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createIngestionKey>>,
|
||||
TError,
|
||||
CreateIngestionKeyMutationVariables,
|
||||
{ data?: BodyType<GatewaytypesPostableIngestionKeyDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getCreateIngestionKeyMutationKey();
|
||||
const mutationKey = ['createIngestionKey'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -237,7 +212,7 @@ export const getCreateIngestionKeyMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof createIngestionKey>>,
|
||||
CreateIngestionKeyMutationVariables
|
||||
{ data?: BodyType<GatewaytypesPostableIngestionKeyDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -254,9 +229,6 @@ export type CreateIngestionKeyMutationBody =
|
||||
| BodyType<GatewaytypesPostableIngestionKeyDTO>
|
||||
| undefined;
|
||||
export type CreateIngestionKeyMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type CreateIngestionKeyMutationVariables = {
|
||||
data?: BodyType<GatewaytypesPostableIngestionKeyDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Create ingestion key for workspace
|
||||
@@ -268,13 +240,13 @@ export const useCreateIngestionKey = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createIngestionKey>>,
|
||||
TError,
|
||||
CreateIngestionKeyMutationVariables,
|
||||
{ data?: BodyType<GatewaytypesPostableIngestionKeyDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createIngestionKey>>,
|
||||
TError,
|
||||
CreateIngestionKeyMutationVariables,
|
||||
{ data?: BodyType<GatewaytypesPostableIngestionKeyDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getCreateIngestionKeyMutationOptions(options));
|
||||
@@ -294,9 +266,6 @@ export const deleteIngestionKey = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getDeleteIngestionKeyMutationKey = () =>
|
||||
['deleteIngestionKey'] as const;
|
||||
|
||||
export const getDeleteIngestionKeyMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -304,16 +273,16 @@ export const getDeleteIngestionKeyMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteIngestionKey>>,
|
||||
TError,
|
||||
DeleteIngestionKeyMutationVariables,
|
||||
{ pathParams: DeleteIngestionKeyPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteIngestionKey>>,
|
||||
TError,
|
||||
DeleteIngestionKeyMutationVariables,
|
||||
{ pathParams: DeleteIngestionKeyPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getDeleteIngestionKeyMutationKey();
|
||||
const mutationKey = ['deleteIngestionKey'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -324,7 +293,7 @@ export const getDeleteIngestionKeyMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof deleteIngestionKey>>,
|
||||
DeleteIngestionKeyMutationVariables
|
||||
{ pathParams: DeleteIngestionKeyPathParameters }
|
||||
> = (props) => {
|
||||
const { pathParams } = props ?? {};
|
||||
|
||||
@@ -339,9 +308,6 @@ export type DeleteIngestionKeyMutationResult = NonNullable<
|
||||
>;
|
||||
|
||||
export type DeleteIngestionKeyMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type DeleteIngestionKeyMutationVariables = {
|
||||
pathParams: DeleteIngestionKeyPathParameters;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Delete ingestion key for workspace
|
||||
@@ -353,13 +319,13 @@ export const useDeleteIngestionKey = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteIngestionKey>>,
|
||||
TError,
|
||||
DeleteIngestionKeyMutationVariables,
|
||||
{ pathParams: DeleteIngestionKeyPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteIngestionKey>>,
|
||||
TError,
|
||||
DeleteIngestionKeyMutationVariables,
|
||||
{ pathParams: DeleteIngestionKeyPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getDeleteIngestionKeyMutationOptions(options));
|
||||
@@ -451,7 +417,7 @@ export function useGetIngestionKey<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetIngestionKey} query
|
||||
* @summary Get ingestion key for workspace
|
||||
*/
|
||||
export const invalidateGetIngestionKey = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -484,9 +450,6 @@ export const updateIngestionKey = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getUpdateIngestionKeyMutationKey = () =>
|
||||
['updateIngestionKey'] as const;
|
||||
|
||||
export const getUpdateIngestionKeyMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -494,16 +457,22 @@ export const getUpdateIngestionKeyMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateIngestionKey>>,
|
||||
TError,
|
||||
UpdateIngestionKeyMutationVariables,
|
||||
{
|
||||
pathParams: UpdateIngestionKeyPathParameters;
|
||||
data?: BodyType<GatewaytypesPostableIngestionKeyDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateIngestionKey>>,
|
||||
TError,
|
||||
UpdateIngestionKeyMutationVariables,
|
||||
{
|
||||
pathParams: UpdateIngestionKeyPathParameters;
|
||||
data?: BodyType<GatewaytypesPostableIngestionKeyDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getUpdateIngestionKeyMutationKey();
|
||||
const mutationKey = ['updateIngestionKey'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -514,7 +483,10 @@ export const getUpdateIngestionKeyMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateIngestionKey>>,
|
||||
UpdateIngestionKeyMutationVariables
|
||||
{
|
||||
pathParams: UpdateIngestionKeyPathParameters;
|
||||
data?: BodyType<GatewaytypesPostableIngestionKeyDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -531,10 +503,6 @@ export type UpdateIngestionKeyMutationBody =
|
||||
| BodyType<GatewaytypesPostableIngestionKeyDTO>
|
||||
| undefined;
|
||||
export type UpdateIngestionKeyMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type UpdateIngestionKeyMutationVariables = {
|
||||
pathParams: UpdateIngestionKeyPathParameters;
|
||||
data?: BodyType<GatewaytypesPostableIngestionKeyDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Update ingestion key for workspace
|
||||
@@ -546,13 +514,19 @@ export const useUpdateIngestionKey = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateIngestionKey>>,
|
||||
TError,
|
||||
UpdateIngestionKeyMutationVariables,
|
||||
{
|
||||
pathParams: UpdateIngestionKeyPathParameters;
|
||||
data?: BodyType<GatewaytypesPostableIngestionKeyDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateIngestionKey>>,
|
||||
TError,
|
||||
UpdateIngestionKeyMutationVariables,
|
||||
{
|
||||
pathParams: UpdateIngestionKeyPathParameters;
|
||||
data?: BodyType<GatewaytypesPostableIngestionKeyDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getUpdateIngestionKeyMutationOptions(options));
|
||||
@@ -644,7 +618,7 @@ export function useGetIngestionKeyLimits<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetIngestionKeyLimits} query
|
||||
* @summary Get limits for the ingestion key
|
||||
*/
|
||||
export const invalidateGetIngestionKeyLimits = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -678,9 +652,6 @@ export const createIngestionKeyLimit = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getCreateIngestionKeyLimitMutationKey = () =>
|
||||
['createIngestionKeyLimit'] as const;
|
||||
|
||||
export const getCreateIngestionKeyLimitMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -688,16 +659,22 @@ export const getCreateIngestionKeyLimitMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createIngestionKeyLimit>>,
|
||||
TError,
|
||||
CreateIngestionKeyLimitMutationVariables,
|
||||
{
|
||||
pathParams: CreateIngestionKeyLimitPathParameters;
|
||||
data?: BodyType<GatewaytypesDeprecatedPostableIngestionKeyLimitDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createIngestionKeyLimit>>,
|
||||
TError,
|
||||
CreateIngestionKeyLimitMutationVariables,
|
||||
{
|
||||
pathParams: CreateIngestionKeyLimitPathParameters;
|
||||
data?: BodyType<GatewaytypesDeprecatedPostableIngestionKeyLimitDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getCreateIngestionKeyLimitMutationKey();
|
||||
const mutationKey = ['createIngestionKeyLimit'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -708,7 +685,10 @@ export const getCreateIngestionKeyLimitMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof createIngestionKeyLimit>>,
|
||||
CreateIngestionKeyLimitMutationVariables
|
||||
{
|
||||
pathParams: CreateIngestionKeyLimitPathParameters;
|
||||
data?: BodyType<GatewaytypesDeprecatedPostableIngestionKeyLimitDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -726,10 +706,6 @@ export type CreateIngestionKeyLimitMutationBody =
|
||||
| undefined;
|
||||
export type CreateIngestionKeyLimitMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type CreateIngestionKeyLimitMutationVariables = {
|
||||
pathParams: CreateIngestionKeyLimitPathParameters;
|
||||
data?: BodyType<GatewaytypesDeprecatedPostableIngestionKeyLimitDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
@@ -742,13 +718,19 @@ export const useCreateIngestionKeyLimit = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createIngestionKeyLimit>>,
|
||||
TError,
|
||||
CreateIngestionKeyLimitMutationVariables,
|
||||
{
|
||||
pathParams: CreateIngestionKeyLimitPathParameters;
|
||||
data?: BodyType<GatewaytypesDeprecatedPostableIngestionKeyLimitDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createIngestionKeyLimit>>,
|
||||
TError,
|
||||
CreateIngestionKeyLimitMutationVariables,
|
||||
{
|
||||
pathParams: CreateIngestionKeyLimitPathParameters;
|
||||
data?: BodyType<GatewaytypesDeprecatedPostableIngestionKeyLimitDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getCreateIngestionKeyLimitMutationOptions(options));
|
||||
@@ -769,9 +751,6 @@ export const deleteIngestionKeyLimit = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getDeleteIngestionKeyLimitMutationKey = () =>
|
||||
['deleteIngestionKeyLimit'] as const;
|
||||
|
||||
export const getDeleteIngestionKeyLimitMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -779,16 +758,16 @@ export const getDeleteIngestionKeyLimitMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteIngestionKeyLimit>>,
|
||||
TError,
|
||||
DeleteIngestionKeyLimitMutationVariables,
|
||||
{ pathParams: DeleteIngestionKeyLimitPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteIngestionKeyLimit>>,
|
||||
TError,
|
||||
DeleteIngestionKeyLimitMutationVariables,
|
||||
{ pathParams: DeleteIngestionKeyLimitPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getDeleteIngestionKeyLimitMutationKey();
|
||||
const mutationKey = ['deleteIngestionKeyLimit'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -799,7 +778,7 @@ export const getDeleteIngestionKeyLimitMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof deleteIngestionKeyLimit>>,
|
||||
DeleteIngestionKeyLimitMutationVariables
|
||||
{ pathParams: DeleteIngestionKeyLimitPathParameters }
|
||||
> = (props) => {
|
||||
const { pathParams } = props ?? {};
|
||||
|
||||
@@ -815,9 +794,6 @@ export type DeleteIngestionKeyLimitMutationResult = NonNullable<
|
||||
|
||||
export type DeleteIngestionKeyLimitMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type DeleteIngestionKeyLimitMutationVariables = {
|
||||
pathParams: DeleteIngestionKeyLimitPathParameters;
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
@@ -830,13 +806,13 @@ export const useDeleteIngestionKeyLimit = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteIngestionKeyLimit>>,
|
||||
TError,
|
||||
DeleteIngestionKeyLimitMutationVariables,
|
||||
{ pathParams: DeleteIngestionKeyLimitPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteIngestionKeyLimit>>,
|
||||
TError,
|
||||
DeleteIngestionKeyLimitMutationVariables,
|
||||
{ pathParams: DeleteIngestionKeyLimitPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getDeleteIngestionKeyLimitMutationOptions(options));
|
||||
@@ -860,9 +836,6 @@ export const updateIngestionKeyLimit = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getUpdateIngestionKeyLimitMutationKey = () =>
|
||||
['updateIngestionKeyLimit'] as const;
|
||||
|
||||
export const getUpdateIngestionKeyLimitMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -870,16 +843,22 @@ export const getUpdateIngestionKeyLimitMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateIngestionKeyLimit>>,
|
||||
TError,
|
||||
UpdateIngestionKeyLimitMutationVariables,
|
||||
{
|
||||
pathParams: UpdateIngestionKeyLimitPathParameters;
|
||||
data?: BodyType<GatewaytypesUpdatableIngestionKeyLimitDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateIngestionKeyLimit>>,
|
||||
TError,
|
||||
UpdateIngestionKeyLimitMutationVariables,
|
||||
{
|
||||
pathParams: UpdateIngestionKeyLimitPathParameters;
|
||||
data?: BodyType<GatewaytypesUpdatableIngestionKeyLimitDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getUpdateIngestionKeyLimitMutationKey();
|
||||
const mutationKey = ['updateIngestionKeyLimit'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -890,7 +869,10 @@ export const getUpdateIngestionKeyLimitMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateIngestionKeyLimit>>,
|
||||
UpdateIngestionKeyLimitMutationVariables
|
||||
{
|
||||
pathParams: UpdateIngestionKeyLimitPathParameters;
|
||||
data?: BodyType<GatewaytypesUpdatableIngestionKeyLimitDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -908,10 +890,6 @@ export type UpdateIngestionKeyLimitMutationBody =
|
||||
| undefined;
|
||||
export type UpdateIngestionKeyLimitMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type UpdateIngestionKeyLimitMutationVariables = {
|
||||
pathParams: UpdateIngestionKeyLimitPathParameters;
|
||||
data?: BodyType<GatewaytypesUpdatableIngestionKeyLimitDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
@@ -924,13 +902,19 @@ export const useUpdateIngestionKeyLimit = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateIngestionKeyLimit>>,
|
||||
TError,
|
||||
UpdateIngestionKeyLimitMutationVariables,
|
||||
{
|
||||
pathParams: UpdateIngestionKeyLimitPathParameters;
|
||||
data?: BodyType<GatewaytypesUpdatableIngestionKeyLimitDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateIngestionKeyLimit>>,
|
||||
TError,
|
||||
UpdateIngestionKeyLimitMutationVariables,
|
||||
{
|
||||
pathParams: UpdateIngestionKeyLimitPathParameters;
|
||||
data?: BodyType<GatewaytypesUpdatableIngestionKeyLimitDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getUpdateIngestionKeyLimitMutationOptions(options));
|
||||
@@ -1021,7 +1005,7 @@ export function useSearchIngestionKeys<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useSearchIngestionKeys} query
|
||||
* @summary Search ingestion keys for workspace
|
||||
*/
|
||||
export const invalidateSearchIngestionKeys = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -1053,9 +1037,6 @@ export const createIngestionLimit = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getCreateIngestionLimitMutationKey = () =>
|
||||
['createIngestionLimit'] as const;
|
||||
|
||||
export const getCreateIngestionLimitMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -1063,16 +1044,16 @@ export const getCreateIngestionLimitMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createIngestionLimit>>,
|
||||
TError,
|
||||
CreateIngestionLimitMutationVariables,
|
||||
{ data?: BodyType<GatewaytypesPostableIngestionKeyLimitDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createIngestionLimit>>,
|
||||
TError,
|
||||
CreateIngestionLimitMutationVariables,
|
||||
{ data?: BodyType<GatewaytypesPostableIngestionKeyLimitDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getCreateIngestionLimitMutationKey();
|
||||
const mutationKey = ['createIngestionLimit'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -1083,7 +1064,7 @@ export const getCreateIngestionLimitMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof createIngestionLimit>>,
|
||||
CreateIngestionLimitMutationVariables
|
||||
{ data?: BodyType<GatewaytypesPostableIngestionKeyLimitDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -1101,9 +1082,6 @@ export type CreateIngestionLimitMutationBody =
|
||||
| undefined;
|
||||
export type CreateIngestionLimitMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type CreateIngestionLimitMutationVariables = {
|
||||
data?: BodyType<GatewaytypesPostableIngestionKeyLimitDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Create ingestion limit
|
||||
@@ -1115,13 +1093,13 @@ export const useCreateIngestionLimit = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createIngestionLimit>>,
|
||||
TError,
|
||||
CreateIngestionLimitMutationVariables,
|
||||
{ data?: BodyType<GatewaytypesPostableIngestionKeyLimitDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createIngestionLimit>>,
|
||||
TError,
|
||||
CreateIngestionLimitMutationVariables,
|
||||
{ data?: BodyType<GatewaytypesPostableIngestionKeyLimitDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getCreateIngestionLimitMutationOptions(options));
|
||||
@@ -1141,9 +1119,6 @@ export const deleteIngestionLimit = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getDeleteIngestionLimitMutationKey = () =>
|
||||
['deleteIngestionLimit'] as const;
|
||||
|
||||
export const getDeleteIngestionLimitMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -1151,16 +1126,16 @@ export const getDeleteIngestionLimitMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteIngestionLimit>>,
|
||||
TError,
|
||||
DeleteIngestionLimitMutationVariables,
|
||||
{ pathParams: DeleteIngestionLimitPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteIngestionLimit>>,
|
||||
TError,
|
||||
DeleteIngestionLimitMutationVariables,
|
||||
{ pathParams: DeleteIngestionLimitPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getDeleteIngestionLimitMutationKey();
|
||||
const mutationKey = ['deleteIngestionLimit'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -1171,7 +1146,7 @@ export const getDeleteIngestionLimitMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof deleteIngestionLimit>>,
|
||||
DeleteIngestionLimitMutationVariables
|
||||
{ pathParams: DeleteIngestionLimitPathParameters }
|
||||
> = (props) => {
|
||||
const { pathParams } = props ?? {};
|
||||
|
||||
@@ -1187,9 +1162,6 @@ export type DeleteIngestionLimitMutationResult = NonNullable<
|
||||
|
||||
export type DeleteIngestionLimitMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type DeleteIngestionLimitMutationVariables = {
|
||||
pathParams: DeleteIngestionLimitPathParameters;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Delete ingestion limit
|
||||
@@ -1201,13 +1173,13 @@ export const useDeleteIngestionLimit = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteIngestionLimit>>,
|
||||
TError,
|
||||
DeleteIngestionLimitMutationVariables,
|
||||
{ pathParams: DeleteIngestionLimitPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteIngestionLimit>>,
|
||||
TError,
|
||||
DeleteIngestionLimitMutationVariables,
|
||||
{ pathParams: DeleteIngestionLimitPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getDeleteIngestionLimitMutationOptions(options));
|
||||
@@ -1299,7 +1271,7 @@ export function useGetIngestionLimit<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetIngestionLimit} query
|
||||
* @summary Get ingestion limit
|
||||
*/
|
||||
export const invalidateGetIngestionLimit = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -1332,9 +1304,6 @@ export const updateIngestionLimit = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getUpdateIngestionLimitMutationKey = () =>
|
||||
['updateIngestionLimit'] as const;
|
||||
|
||||
export const getUpdateIngestionLimitMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -1342,16 +1311,22 @@ export const getUpdateIngestionLimitMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateIngestionLimit>>,
|
||||
TError,
|
||||
UpdateIngestionLimitMutationVariables,
|
||||
{
|
||||
pathParams: UpdateIngestionLimitPathParameters;
|
||||
data?: BodyType<GatewaytypesUpdatableIngestionKeyLimitDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateIngestionLimit>>,
|
||||
TError,
|
||||
UpdateIngestionLimitMutationVariables,
|
||||
{
|
||||
pathParams: UpdateIngestionLimitPathParameters;
|
||||
data?: BodyType<GatewaytypesUpdatableIngestionKeyLimitDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getUpdateIngestionLimitMutationKey();
|
||||
const mutationKey = ['updateIngestionLimit'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -1362,7 +1337,10 @@ export const getUpdateIngestionLimitMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateIngestionLimit>>,
|
||||
UpdateIngestionLimitMutationVariables
|
||||
{
|
||||
pathParams: UpdateIngestionLimitPathParameters;
|
||||
data?: BodyType<GatewaytypesUpdatableIngestionKeyLimitDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -1380,10 +1358,6 @@ export type UpdateIngestionLimitMutationBody =
|
||||
| undefined;
|
||||
export type UpdateIngestionLimitMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type UpdateIngestionLimitMutationVariables = {
|
||||
pathParams: UpdateIngestionLimitPathParameters;
|
||||
data?: BodyType<GatewaytypesUpdatableIngestionKeyLimitDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Update ingestion limit
|
||||
@@ -1395,13 +1369,19 @@ export const useUpdateIngestionLimit = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateIngestionLimit>>,
|
||||
TError,
|
||||
UpdateIngestionLimitMutationVariables,
|
||||
{
|
||||
pathParams: UpdateIngestionLimitPathParameters;
|
||||
data?: BodyType<GatewaytypesUpdatableIngestionKeyLimitDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateIngestionLimit>>,
|
||||
TError,
|
||||
UpdateIngestionLimitMutationVariables,
|
||||
{
|
||||
pathParams: UpdateIngestionLimitPathParameters;
|
||||
data?: BodyType<GatewaytypesUpdatableIngestionKeyLimitDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getUpdateIngestionLimitMutationOptions(options));
|
||||
|
||||
@@ -14,9 +14,10 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { GetGlobalConfig200 } from '../sigNoz.schemas/getGlobalConfig200';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
import type {
|
||||
GetGlobalConfig200,
|
||||
RenderErrorResponseDTO,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType } from '../../../generatedAPIInstance';
|
||||
@@ -111,7 +112,7 @@ export function useGetGlobalConfig<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetGlobalConfig} query
|
||||
* @summary Get global config
|
||||
*/
|
||||
export const invalidateGetGlobalConfig = async (
|
||||
queryClient: QueryClient,
|
||||
|
||||
@@ -14,17 +14,14 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { Healthz200 } from '../sigNoz.schemas/healthz200';
|
||||
|
||||
import type { Healthz503 } from '../sigNoz.schemas/healthz503';
|
||||
|
||||
import type { Livez200 } from '../sigNoz.schemas/livez200';
|
||||
|
||||
import type { Readyz200 } from '../sigNoz.schemas/readyz200';
|
||||
|
||||
import type { Readyz503 } from '../sigNoz.schemas/readyz503';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
import type {
|
||||
Healthz200,
|
||||
Healthz503,
|
||||
Livez200,
|
||||
Readyz200,
|
||||
Readyz503,
|
||||
RenderErrorResponseDTO,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType } from '../../../generatedAPIInstance';
|
||||
@@ -110,7 +107,7 @@ export function useHealthz<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useHealthz} query
|
||||
* @summary Health check
|
||||
*/
|
||||
export const invalidateHealthz = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -183,7 +180,7 @@ export function useLivez<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useLivez} query
|
||||
* @summary Liveness check
|
||||
*/
|
||||
export const invalidateLivez = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -253,7 +250,7 @@ export function useReadyz<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useReadyz} query
|
||||
* @summary Readiness check
|
||||
*/
|
||||
export const invalidateReadyz = async (
|
||||
queryClient: QueryClient,
|
||||
|
||||
@@ -17,55 +17,33 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { GetChecks200 } from '../sigNoz.schemas/getChecks200';
|
||||
|
||||
import type { GetChecksParams } from '../sigNoz.schemas/getChecksParams';
|
||||
|
||||
import type { InframonitoringtypesPostableClustersDTO } from '../sigNoz.schemas/inframonitoringtypesPostableClustersDTO';
|
||||
|
||||
import type { InframonitoringtypesPostableContainersDTO } from '../sigNoz.schemas/inframonitoringtypesPostableContainersDTO';
|
||||
|
||||
import type { InframonitoringtypesPostableDaemonSetsDTO } from '../sigNoz.schemas/inframonitoringtypesPostableDaemonSetsDTO';
|
||||
|
||||
import type { InframonitoringtypesPostableDeploymentsDTO } from '../sigNoz.schemas/inframonitoringtypesPostableDeploymentsDTO';
|
||||
|
||||
import type { InframonitoringtypesPostableHostsDTO } from '../sigNoz.schemas/inframonitoringtypesPostableHostsDTO';
|
||||
|
||||
import type { InframonitoringtypesPostableJobsDTO } from '../sigNoz.schemas/inframonitoringtypesPostableJobsDTO';
|
||||
|
||||
import type { InframonitoringtypesPostableNamespacesDTO } from '../sigNoz.schemas/inframonitoringtypesPostableNamespacesDTO';
|
||||
|
||||
import type { InframonitoringtypesPostableNodesDTO } from '../sigNoz.schemas/inframonitoringtypesPostableNodesDTO';
|
||||
|
||||
import type { InframonitoringtypesPostablePodsDTO } from '../sigNoz.schemas/inframonitoringtypesPostablePodsDTO';
|
||||
|
||||
import type { InframonitoringtypesPostableStatefulSetsDTO } from '../sigNoz.schemas/inframonitoringtypesPostableStatefulSetsDTO';
|
||||
|
||||
import type { InframonitoringtypesPostableVolumesDTO } from '../sigNoz.schemas/inframonitoringtypesPostableVolumesDTO';
|
||||
|
||||
import type { ListClusters200 } from '../sigNoz.schemas/listClusters200';
|
||||
|
||||
import type { ListContainers200 } from '../sigNoz.schemas/listContainers200';
|
||||
|
||||
import type { ListDaemonSets200 } from '../sigNoz.schemas/listDaemonSets200';
|
||||
|
||||
import type { ListDeployments200 } from '../sigNoz.schemas/listDeployments200';
|
||||
|
||||
import type { ListHosts200 } from '../sigNoz.schemas/listHosts200';
|
||||
|
||||
import type { ListJobs200 } from '../sigNoz.schemas/listJobs200';
|
||||
|
||||
import type { ListNamespaces200 } from '../sigNoz.schemas/listNamespaces200';
|
||||
|
||||
import type { ListNodes200 } from '../sigNoz.schemas/listNodes200';
|
||||
|
||||
import type { ListPods200 } from '../sigNoz.schemas/listPods200';
|
||||
|
||||
import type { ListStatefulSets200 } from '../sigNoz.schemas/listStatefulSets200';
|
||||
|
||||
import type { ListVolumes200 } from '../sigNoz.schemas/listVolumes200';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
import type {
|
||||
GetChecks200,
|
||||
GetChecksParams,
|
||||
InframonitoringtypesPostableClustersDTO,
|
||||
InframonitoringtypesPostableContainersDTO,
|
||||
InframonitoringtypesPostableDaemonSetsDTO,
|
||||
InframonitoringtypesPostableDeploymentsDTO,
|
||||
InframonitoringtypesPostableHostsDTO,
|
||||
InframonitoringtypesPostableJobsDTO,
|
||||
InframonitoringtypesPostableNamespacesDTO,
|
||||
InframonitoringtypesPostableNodesDTO,
|
||||
InframonitoringtypesPostablePodsDTO,
|
||||
InframonitoringtypesPostableStatefulSetsDTO,
|
||||
InframonitoringtypesPostableVolumesDTO,
|
||||
ListClusters200,
|
||||
ListContainers200,
|
||||
ListDaemonSets200,
|
||||
ListDeployments200,
|
||||
ListHosts200,
|
||||
ListJobs200,
|
||||
ListNamespaces200,
|
||||
ListNodes200,
|
||||
ListPods200,
|
||||
ListStatefulSets200,
|
||||
ListVolumes200,
|
||||
RenderErrorResponseDTO,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
|
||||
@@ -162,7 +140,7 @@ export function useGetChecks<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetChecks} query
|
||||
* @summary Run Infra Monitoring Setup Checks
|
||||
*/
|
||||
export const invalidateGetChecks = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -194,8 +172,6 @@ export const listClusters = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getListClustersMutationKey = () => ['listClusters'] as const;
|
||||
|
||||
export const getListClustersMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -203,16 +179,16 @@ export const getListClustersMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listClusters>>,
|
||||
TError,
|
||||
ListClustersMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableClustersDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listClusters>>,
|
||||
TError,
|
||||
ListClustersMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableClustersDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getListClustersMutationKey();
|
||||
const mutationKey = ['listClusters'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -223,7 +199,7 @@ export const getListClustersMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof listClusters>>,
|
||||
ListClustersMutationVariables
|
||||
{ data?: BodyType<InframonitoringtypesPostableClustersDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -240,9 +216,6 @@ export type ListClustersMutationBody =
|
||||
| BodyType<InframonitoringtypesPostableClustersDTO>
|
||||
| undefined;
|
||||
export type ListClustersMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type ListClustersMutationVariables = {
|
||||
data?: BodyType<InframonitoringtypesPostableClustersDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary List Clusters for Infra Monitoring
|
||||
@@ -254,13 +227,13 @@ export const useListClusters = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listClusters>>,
|
||||
TError,
|
||||
ListClustersMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableClustersDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof listClusters>>,
|
||||
TError,
|
||||
ListClustersMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableClustersDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getListClustersMutationOptions(options));
|
||||
@@ -282,8 +255,6 @@ export const listDaemonSets = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getListDaemonSetsMutationKey = () => ['listDaemonSets'] as const;
|
||||
|
||||
export const getListDaemonSetsMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -291,16 +262,16 @@ export const getListDaemonSetsMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listDaemonSets>>,
|
||||
TError,
|
||||
ListDaemonSetsMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableDaemonSetsDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listDaemonSets>>,
|
||||
TError,
|
||||
ListDaemonSetsMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableDaemonSetsDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getListDaemonSetsMutationKey();
|
||||
const mutationKey = ['listDaemonSets'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -311,7 +282,7 @@ export const getListDaemonSetsMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof listDaemonSets>>,
|
||||
ListDaemonSetsMutationVariables
|
||||
{ data?: BodyType<InframonitoringtypesPostableDaemonSetsDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -328,9 +299,6 @@ export type ListDaemonSetsMutationBody =
|
||||
| BodyType<InframonitoringtypesPostableDaemonSetsDTO>
|
||||
| undefined;
|
||||
export type ListDaemonSetsMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type ListDaemonSetsMutationVariables = {
|
||||
data?: BodyType<InframonitoringtypesPostableDaemonSetsDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary List DaemonSets for Infra Monitoring
|
||||
@@ -342,13 +310,13 @@ export const useListDaemonSets = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listDaemonSets>>,
|
||||
TError,
|
||||
ListDaemonSetsMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableDaemonSetsDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof listDaemonSets>>,
|
||||
TError,
|
||||
ListDaemonSetsMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableDaemonSetsDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getListDaemonSetsMutationOptions(options));
|
||||
@@ -370,8 +338,6 @@ export const listDeployments = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getListDeploymentsMutationKey = () => ['listDeployments'] as const;
|
||||
|
||||
export const getListDeploymentsMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -379,16 +345,16 @@ export const getListDeploymentsMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listDeployments>>,
|
||||
TError,
|
||||
ListDeploymentsMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableDeploymentsDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listDeployments>>,
|
||||
TError,
|
||||
ListDeploymentsMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableDeploymentsDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getListDeploymentsMutationKey();
|
||||
const mutationKey = ['listDeployments'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -399,7 +365,7 @@ export const getListDeploymentsMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof listDeployments>>,
|
||||
ListDeploymentsMutationVariables
|
||||
{ data?: BodyType<InframonitoringtypesPostableDeploymentsDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -416,9 +382,6 @@ export type ListDeploymentsMutationBody =
|
||||
| BodyType<InframonitoringtypesPostableDeploymentsDTO>
|
||||
| undefined;
|
||||
export type ListDeploymentsMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type ListDeploymentsMutationVariables = {
|
||||
data?: BodyType<InframonitoringtypesPostableDeploymentsDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary List Deployments for Infra Monitoring
|
||||
@@ -430,13 +393,13 @@ export const useListDeployments = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listDeployments>>,
|
||||
TError,
|
||||
ListDeploymentsMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableDeploymentsDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof listDeployments>>,
|
||||
TError,
|
||||
ListDeploymentsMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableDeploymentsDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getListDeploymentsMutationOptions(options));
|
||||
@@ -458,8 +421,6 @@ export const listHosts = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getListHostsMutationKey = () => ['listHosts'] as const;
|
||||
|
||||
export const getListHostsMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -467,16 +428,16 @@ export const getListHostsMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listHosts>>,
|
||||
TError,
|
||||
ListHostsMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableHostsDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listHosts>>,
|
||||
TError,
|
||||
ListHostsMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableHostsDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getListHostsMutationKey();
|
||||
const mutationKey = ['listHosts'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -487,7 +448,7 @@ export const getListHostsMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof listHosts>>,
|
||||
ListHostsMutationVariables
|
||||
{ data?: BodyType<InframonitoringtypesPostableHostsDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -504,9 +465,6 @@ export type ListHostsMutationBody =
|
||||
| BodyType<InframonitoringtypesPostableHostsDTO>
|
||||
| undefined;
|
||||
export type ListHostsMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type ListHostsMutationVariables = {
|
||||
data?: BodyType<InframonitoringtypesPostableHostsDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary List Hosts for Infra Monitoring
|
||||
@@ -518,13 +476,13 @@ export const useListHosts = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listHosts>>,
|
||||
TError,
|
||||
ListHostsMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableHostsDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof listHosts>>,
|
||||
TError,
|
||||
ListHostsMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableHostsDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getListHostsMutationOptions(options));
|
||||
@@ -546,8 +504,6 @@ export const listJobs = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getListJobsMutationKey = () => ['listJobs'] as const;
|
||||
|
||||
export const getListJobsMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -555,16 +511,16 @@ export const getListJobsMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listJobs>>,
|
||||
TError,
|
||||
ListJobsMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableJobsDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listJobs>>,
|
||||
TError,
|
||||
ListJobsMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableJobsDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getListJobsMutationKey();
|
||||
const mutationKey = ['listJobs'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -575,7 +531,7 @@ export const getListJobsMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof listJobs>>,
|
||||
ListJobsMutationVariables
|
||||
{ data?: BodyType<InframonitoringtypesPostableJobsDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -592,9 +548,6 @@ export type ListJobsMutationBody =
|
||||
| BodyType<InframonitoringtypesPostableJobsDTO>
|
||||
| undefined;
|
||||
export type ListJobsMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type ListJobsMutationVariables = {
|
||||
data?: BodyType<InframonitoringtypesPostableJobsDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary List Jobs for Infra Monitoring
|
||||
@@ -606,13 +559,13 @@ export const useListJobs = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listJobs>>,
|
||||
TError,
|
||||
ListJobsMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableJobsDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof listJobs>>,
|
||||
TError,
|
||||
ListJobsMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableJobsDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getListJobsMutationOptions(options));
|
||||
@@ -634,8 +587,6 @@ export const listContainers = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getListContainersMutationKey = () => ['listContainers'] as const;
|
||||
|
||||
export const getListContainersMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -643,16 +594,16 @@ export const getListContainersMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listContainers>>,
|
||||
TError,
|
||||
ListContainersMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableContainersDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listContainers>>,
|
||||
TError,
|
||||
ListContainersMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableContainersDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getListContainersMutationKey();
|
||||
const mutationKey = ['listContainers'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -663,7 +614,7 @@ export const getListContainersMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof listContainers>>,
|
||||
ListContainersMutationVariables
|
||||
{ data?: BodyType<InframonitoringtypesPostableContainersDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -680,9 +631,6 @@ export type ListContainersMutationBody =
|
||||
| BodyType<InframonitoringtypesPostableContainersDTO>
|
||||
| undefined;
|
||||
export type ListContainersMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type ListContainersMutationVariables = {
|
||||
data?: BodyType<InframonitoringtypesPostableContainersDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary List Kubernetes Containers for Infra Monitoring
|
||||
@@ -694,13 +642,13 @@ export const useListContainers = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listContainers>>,
|
||||
TError,
|
||||
ListContainersMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableContainersDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof listContainers>>,
|
||||
TError,
|
||||
ListContainersMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableContainersDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getListContainersMutationOptions(options));
|
||||
@@ -722,8 +670,6 @@ export const listNamespaces = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getListNamespacesMutationKey = () => ['listNamespaces'] as const;
|
||||
|
||||
export const getListNamespacesMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -731,16 +677,16 @@ export const getListNamespacesMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listNamespaces>>,
|
||||
TError,
|
||||
ListNamespacesMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableNamespacesDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listNamespaces>>,
|
||||
TError,
|
||||
ListNamespacesMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableNamespacesDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getListNamespacesMutationKey();
|
||||
const mutationKey = ['listNamespaces'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -751,7 +697,7 @@ export const getListNamespacesMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof listNamespaces>>,
|
||||
ListNamespacesMutationVariables
|
||||
{ data?: BodyType<InframonitoringtypesPostableNamespacesDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -768,9 +714,6 @@ export type ListNamespacesMutationBody =
|
||||
| BodyType<InframonitoringtypesPostableNamespacesDTO>
|
||||
| undefined;
|
||||
export type ListNamespacesMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type ListNamespacesMutationVariables = {
|
||||
data?: BodyType<InframonitoringtypesPostableNamespacesDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary List Namespaces for Infra Monitoring
|
||||
@@ -782,13 +725,13 @@ export const useListNamespaces = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listNamespaces>>,
|
||||
TError,
|
||||
ListNamespacesMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableNamespacesDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof listNamespaces>>,
|
||||
TError,
|
||||
ListNamespacesMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableNamespacesDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getListNamespacesMutationOptions(options));
|
||||
@@ -810,8 +753,6 @@ export const listNodes = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getListNodesMutationKey = () => ['listNodes'] as const;
|
||||
|
||||
export const getListNodesMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -819,16 +760,16 @@ export const getListNodesMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listNodes>>,
|
||||
TError,
|
||||
ListNodesMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableNodesDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listNodes>>,
|
||||
TError,
|
||||
ListNodesMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableNodesDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getListNodesMutationKey();
|
||||
const mutationKey = ['listNodes'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -839,7 +780,7 @@ export const getListNodesMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof listNodes>>,
|
||||
ListNodesMutationVariables
|
||||
{ data?: BodyType<InframonitoringtypesPostableNodesDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -856,9 +797,6 @@ export type ListNodesMutationBody =
|
||||
| BodyType<InframonitoringtypesPostableNodesDTO>
|
||||
| undefined;
|
||||
export type ListNodesMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type ListNodesMutationVariables = {
|
||||
data?: BodyType<InframonitoringtypesPostableNodesDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary List Nodes for Infra Monitoring
|
||||
@@ -870,13 +808,13 @@ export const useListNodes = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listNodes>>,
|
||||
TError,
|
||||
ListNodesMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableNodesDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof listNodes>>,
|
||||
TError,
|
||||
ListNodesMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableNodesDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getListNodesMutationOptions(options));
|
||||
@@ -898,8 +836,6 @@ export const listPods = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getListPodsMutationKey = () => ['listPods'] as const;
|
||||
|
||||
export const getListPodsMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -907,16 +843,16 @@ export const getListPodsMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listPods>>,
|
||||
TError,
|
||||
ListPodsMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostablePodsDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listPods>>,
|
||||
TError,
|
||||
ListPodsMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostablePodsDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getListPodsMutationKey();
|
||||
const mutationKey = ['listPods'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -927,7 +863,7 @@ export const getListPodsMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof listPods>>,
|
||||
ListPodsMutationVariables
|
||||
{ data?: BodyType<InframonitoringtypesPostablePodsDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -944,9 +880,6 @@ export type ListPodsMutationBody =
|
||||
| BodyType<InframonitoringtypesPostablePodsDTO>
|
||||
| undefined;
|
||||
export type ListPodsMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type ListPodsMutationVariables = {
|
||||
data?: BodyType<InframonitoringtypesPostablePodsDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary List Pods for Infra Monitoring
|
||||
@@ -958,13 +891,13 @@ export const useListPods = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listPods>>,
|
||||
TError,
|
||||
ListPodsMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostablePodsDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof listPods>>,
|
||||
TError,
|
||||
ListPodsMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostablePodsDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getListPodsMutationOptions(options));
|
||||
@@ -986,8 +919,6 @@ export const listVolumes = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getListVolumesMutationKey = () => ['listVolumes'] as const;
|
||||
|
||||
export const getListVolumesMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -995,16 +926,16 @@ export const getListVolumesMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listVolumes>>,
|
||||
TError,
|
||||
ListVolumesMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableVolumesDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listVolumes>>,
|
||||
TError,
|
||||
ListVolumesMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableVolumesDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getListVolumesMutationKey();
|
||||
const mutationKey = ['listVolumes'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -1015,7 +946,7 @@ export const getListVolumesMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof listVolumes>>,
|
||||
ListVolumesMutationVariables
|
||||
{ data?: BodyType<InframonitoringtypesPostableVolumesDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -1032,9 +963,6 @@ export type ListVolumesMutationBody =
|
||||
| BodyType<InframonitoringtypesPostableVolumesDTO>
|
||||
| undefined;
|
||||
export type ListVolumesMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type ListVolumesMutationVariables = {
|
||||
data?: BodyType<InframonitoringtypesPostableVolumesDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary List Volumes for Infra Monitoring
|
||||
@@ -1046,13 +974,13 @@ export const useListVolumes = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listVolumes>>,
|
||||
TError,
|
||||
ListVolumesMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableVolumesDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof listVolumes>>,
|
||||
TError,
|
||||
ListVolumesMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableVolumesDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getListVolumesMutationOptions(options));
|
||||
@@ -1074,9 +1002,6 @@ export const listStatefulSets = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getListStatefulSetsMutationKey = () =>
|
||||
['listStatefulSets'] as const;
|
||||
|
||||
export const getListStatefulSetsMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -1084,16 +1009,16 @@ export const getListStatefulSetsMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listStatefulSets>>,
|
||||
TError,
|
||||
ListStatefulSetsMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableStatefulSetsDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listStatefulSets>>,
|
||||
TError,
|
||||
ListStatefulSetsMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableStatefulSetsDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getListStatefulSetsMutationKey();
|
||||
const mutationKey = ['listStatefulSets'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -1104,7 +1029,7 @@ export const getListStatefulSetsMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof listStatefulSets>>,
|
||||
ListStatefulSetsMutationVariables
|
||||
{ data?: BodyType<InframonitoringtypesPostableStatefulSetsDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -1121,9 +1046,6 @@ export type ListStatefulSetsMutationBody =
|
||||
| BodyType<InframonitoringtypesPostableStatefulSetsDTO>
|
||||
| undefined;
|
||||
export type ListStatefulSetsMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type ListStatefulSetsMutationVariables = {
|
||||
data?: BodyType<InframonitoringtypesPostableStatefulSetsDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary List StatefulSets for Infra Monitoring
|
||||
@@ -1135,13 +1057,13 @@ export const useListStatefulSets = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof listStatefulSets>>,
|
||||
TError,
|
||||
ListStatefulSetsMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableStatefulSetsDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof listStatefulSets>>,
|
||||
TError,
|
||||
ListStatefulSetsMutationVariables,
|
||||
{ data?: BodyType<InframonitoringtypesPostableStatefulSetsDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getListStatefulSetsMutationOptions(options));
|
||||
|
||||
@@ -17,23 +17,17 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { ActivateLicense201 } from '../sigNoz.schemas/activateLicense201';
|
||||
|
||||
import type { DeleteLicensePathParameters } from '../sigNoz.schemas/deleteLicensePathParameters';
|
||||
|
||||
import type { GetActiveLicense200 } from '../sigNoz.schemas/getActiveLicense200';
|
||||
|
||||
import type { GetLicense200 } from '../sigNoz.schemas/getLicense200';
|
||||
|
||||
import type { GetLicensePathParameters } from '../sigNoz.schemas/getLicensePathParameters';
|
||||
|
||||
import type { LicensetypesPostableLicenseDTO } from '../sigNoz.schemas/licensetypesPostableLicenseDTO';
|
||||
|
||||
import type { ListLicenses200 } from '../sigNoz.schemas/listLicenses200';
|
||||
|
||||
import type { RefreshLicensePathParameters } from '../sigNoz.schemas/refreshLicensePathParameters';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
import type {
|
||||
ActivateLicense201,
|
||||
DeleteLicensePathParameters,
|
||||
GetActiveLicense200,
|
||||
GetLicense200,
|
||||
GetLicensePathParameters,
|
||||
LicensetypesPostableLicenseDTO,
|
||||
ListLicenses200,
|
||||
RefreshLicensePathParameters,
|
||||
RenderErrorResponseDTO,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
|
||||
@@ -76,9 +70,6 @@ export const activateLicenseDeprecated = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getActivateLicenseDeprecatedMutationKey = () =>
|
||||
['activateLicenseDeprecated'] as const;
|
||||
|
||||
export const getActivateLicenseDeprecatedMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -86,16 +77,16 @@ export const getActivateLicenseDeprecatedMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof activateLicenseDeprecated>>,
|
||||
TError,
|
||||
ActivateLicenseDeprecatedMutationVariables,
|
||||
{ data?: BodyType<LicensetypesPostableLicenseDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof activateLicenseDeprecated>>,
|
||||
TError,
|
||||
ActivateLicenseDeprecatedMutationVariables,
|
||||
{ data?: BodyType<LicensetypesPostableLicenseDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getActivateLicenseDeprecatedMutationKey();
|
||||
const mutationKey = ['activateLicenseDeprecated'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -106,7 +97,7 @@ export const getActivateLicenseDeprecatedMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof activateLicenseDeprecated>>,
|
||||
ActivateLicenseDeprecatedMutationVariables
|
||||
{ data?: BodyType<LicensetypesPostableLicenseDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -124,9 +115,6 @@ export type ActivateLicenseDeprecatedMutationBody =
|
||||
| undefined;
|
||||
export type ActivateLicenseDeprecatedMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type ActivateLicenseDeprecatedMutationVariables = {
|
||||
data?: BodyType<LicensetypesPostableLicenseDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
@@ -139,13 +127,13 @@ export const useActivateLicenseDeprecated = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof activateLicenseDeprecated>>,
|
||||
TError,
|
||||
ActivateLicenseDeprecatedMutationVariables,
|
||||
{ data?: BodyType<LicensetypesPostableLicenseDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof activateLicenseDeprecated>>,
|
||||
TError,
|
||||
ActivateLicenseDeprecatedMutationVariables,
|
||||
{ data?: BodyType<LicensetypesPostableLicenseDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getActivateLicenseDeprecatedMutationOptions(options));
|
||||
@@ -163,9 +151,6 @@ export const refreshLicenseDeprecated = (signal?: AbortSignal) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const getRefreshLicenseDeprecatedMutationKey = () =>
|
||||
['refreshLicenseDeprecated'] as const;
|
||||
|
||||
export const getRefreshLicenseDeprecatedMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -182,7 +167,7 @@ export const getRefreshLicenseDeprecatedMutationOptions = <
|
||||
void,
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getRefreshLicenseDeprecatedMutationKey();
|
||||
const mutationKey = ['refreshLicenseDeprecated'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -300,7 +285,7 @@ export function useListLicenses<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useListLicenses} query
|
||||
* @summary List licenses.
|
||||
*/
|
||||
export const invalidateListLicenses = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -331,8 +316,6 @@ export const activateLicense = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getActivateLicenseMutationKey = () => ['activateLicense'] as const;
|
||||
|
||||
export const getActivateLicenseMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -340,16 +323,16 @@ export const getActivateLicenseMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof activateLicense>>,
|
||||
TError,
|
||||
ActivateLicenseMutationVariables,
|
||||
{ data?: BodyType<LicensetypesPostableLicenseDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof activateLicense>>,
|
||||
TError,
|
||||
ActivateLicenseMutationVariables,
|
||||
{ data?: BodyType<LicensetypesPostableLicenseDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getActivateLicenseMutationKey();
|
||||
const mutationKey = ['activateLicense'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -360,7 +343,7 @@ export const getActivateLicenseMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof activateLicense>>,
|
||||
ActivateLicenseMutationVariables
|
||||
{ data?: BodyType<LicensetypesPostableLicenseDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -377,9 +360,6 @@ export type ActivateLicenseMutationBody =
|
||||
| BodyType<LicensetypesPostableLicenseDTO>
|
||||
| undefined;
|
||||
export type ActivateLicenseMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type ActivateLicenseMutationVariables = {
|
||||
data?: BodyType<LicensetypesPostableLicenseDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Activate a license.
|
||||
@@ -391,13 +371,13 @@ export const useActivateLicense = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof activateLicense>>,
|
||||
TError,
|
||||
ActivateLicenseMutationVariables,
|
||||
{ data?: BodyType<LicensetypesPostableLicenseDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof activateLicense>>,
|
||||
TError,
|
||||
ActivateLicenseMutationVariables,
|
||||
{ data?: BodyType<LicensetypesPostableLicenseDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getActivateLicenseMutationOptions(options));
|
||||
@@ -417,8 +397,6 @@ export const deleteLicense = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getDeleteLicenseMutationKey = () => ['deleteLicense'] as const;
|
||||
|
||||
export const getDeleteLicenseMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -426,16 +404,16 @@ export const getDeleteLicenseMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteLicense>>,
|
||||
TError,
|
||||
DeleteLicenseMutationVariables,
|
||||
{ pathParams: DeleteLicensePathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteLicense>>,
|
||||
TError,
|
||||
DeleteLicenseMutationVariables,
|
||||
{ pathParams: DeleteLicensePathParameters },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getDeleteLicenseMutationKey();
|
||||
const mutationKey = ['deleteLicense'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -446,7 +424,7 @@ export const getDeleteLicenseMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof deleteLicense>>,
|
||||
DeleteLicenseMutationVariables
|
||||
{ pathParams: DeleteLicensePathParameters }
|
||||
> = (props) => {
|
||||
const { pathParams } = props ?? {};
|
||||
|
||||
@@ -461,9 +439,6 @@ export type DeleteLicenseMutationResult = NonNullable<
|
||||
>;
|
||||
|
||||
export type DeleteLicenseMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type DeleteLicenseMutationVariables = {
|
||||
pathParams: DeleteLicensePathParameters;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Delete a license.
|
||||
@@ -475,13 +450,13 @@ export const useDeleteLicense = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteLicense>>,
|
||||
TError,
|
||||
DeleteLicenseMutationVariables,
|
||||
{ pathParams: DeleteLicensePathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteLicense>>,
|
||||
TError,
|
||||
DeleteLicenseMutationVariables,
|
||||
{ pathParams: DeleteLicensePathParameters },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getDeleteLicenseMutationOptions(options));
|
||||
@@ -568,7 +543,7 @@ export function useGetLicense<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetLicense} query
|
||||
* @summary Get a license.
|
||||
*/
|
||||
export const invalidateGetLicense = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -598,8 +573,6 @@ export const refreshLicense = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getRefreshLicenseMutationKey = () => ['refreshLicense'] as const;
|
||||
|
||||
export const getRefreshLicenseMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -607,16 +580,16 @@ export const getRefreshLicenseMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof refreshLicense>>,
|
||||
TError,
|
||||
RefreshLicenseMutationVariables,
|
||||
{ pathParams: RefreshLicensePathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof refreshLicense>>,
|
||||
TError,
|
||||
RefreshLicenseMutationVariables,
|
||||
{ pathParams: RefreshLicensePathParameters },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getRefreshLicenseMutationKey();
|
||||
const mutationKey = ['refreshLicense'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -627,7 +600,7 @@ export const getRefreshLicenseMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof refreshLicense>>,
|
||||
RefreshLicenseMutationVariables
|
||||
{ pathParams: RefreshLicensePathParameters }
|
||||
> = (props) => {
|
||||
const { pathParams } = props ?? {};
|
||||
|
||||
@@ -642,9 +615,6 @@ export type RefreshLicenseMutationResult = NonNullable<
|
||||
>;
|
||||
|
||||
export type RefreshLicenseMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type RefreshLicenseMutationVariables = {
|
||||
pathParams: RefreshLicensePathParameters;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Refresh a license.
|
||||
@@ -656,13 +626,13 @@ export const useRefreshLicense = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof refreshLicense>>,
|
||||
TError,
|
||||
RefreshLicenseMutationVariables,
|
||||
{ pathParams: RefreshLicensePathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof refreshLicense>>,
|
||||
TError,
|
||||
RefreshLicenseMutationVariables,
|
||||
{ pathParams: RefreshLicensePathParameters },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getRefreshLicenseMutationOptions(options));
|
||||
@@ -737,7 +707,7 @@ export function useGetActiveLicense<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetActiveLicense} query
|
||||
* @summary Get the active license.
|
||||
*/
|
||||
export const invalidateGetActiveLicense = async (
|
||||
queryClient: QueryClient,
|
||||
|
||||
@@ -17,21 +17,16 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { DeleteLLMPricingRulePathParameters } from '../sigNoz.schemas/deleteLLMPricingRulePathParameters';
|
||||
|
||||
import type { GetLLMPricingRule200 } from '../sigNoz.schemas/getLLMPricingRule200';
|
||||
|
||||
import type { GetLLMPricingRulePathParameters } from '../sigNoz.schemas/getLLMPricingRulePathParameters';
|
||||
|
||||
import type { ListLLMPricingRules200 } from '../sigNoz.schemas/listLLMPricingRules200';
|
||||
|
||||
import type { ListLLMPricingRulesParams } from '../sigNoz.schemas/listLLMPricingRulesParams';
|
||||
|
||||
import type { ListUnmappedLLMModels200 } from '../sigNoz.schemas/listUnmappedLLMModels200';
|
||||
|
||||
import type { LlmpricingruletypesUpdatableLLMPricingRulesDTO } from '../sigNoz.schemas/llmpricingruletypesUpdatableLLMPricingRulesDTO';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
import type {
|
||||
DeleteLLMPricingRulePathParameters,
|
||||
GetLLMPricingRule200,
|
||||
GetLLMPricingRulePathParameters,
|
||||
ListLLMPricingRules200,
|
||||
ListLLMPricingRulesParams,
|
||||
ListUnmappedLLMModels200,
|
||||
LlmpricingruletypesUpdatableLLMPricingRulesDTO,
|
||||
RenderErrorResponseDTO,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
|
||||
@@ -139,7 +134,7 @@ export function useListLLMPricingRules<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useListLLMPricingRules} query
|
||||
* @summary List pricing rules
|
||||
*/
|
||||
export const invalidateListLLMPricingRules = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -171,9 +166,6 @@ export const createOrUpdateLLMPricingRules = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getCreateOrUpdateLLMPricingRulesMutationKey = () =>
|
||||
['createOrUpdateLLMPricingRules'] as const;
|
||||
|
||||
export const getCreateOrUpdateLLMPricingRulesMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -181,16 +173,16 @@ export const getCreateOrUpdateLLMPricingRulesMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createOrUpdateLLMPricingRules>>,
|
||||
TError,
|
||||
CreateOrUpdateLLMPricingRulesMutationVariables,
|
||||
{ data?: BodyType<LlmpricingruletypesUpdatableLLMPricingRulesDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createOrUpdateLLMPricingRules>>,
|
||||
TError,
|
||||
CreateOrUpdateLLMPricingRulesMutationVariables,
|
||||
{ data?: BodyType<LlmpricingruletypesUpdatableLLMPricingRulesDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getCreateOrUpdateLLMPricingRulesMutationKey();
|
||||
const mutationKey = ['createOrUpdateLLMPricingRules'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -201,7 +193,7 @@ export const getCreateOrUpdateLLMPricingRulesMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof createOrUpdateLLMPricingRules>>,
|
||||
CreateOrUpdateLLMPricingRulesMutationVariables
|
||||
{ data?: BodyType<LlmpricingruletypesUpdatableLLMPricingRulesDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -219,9 +211,6 @@ export type CreateOrUpdateLLMPricingRulesMutationBody =
|
||||
| undefined;
|
||||
export type CreateOrUpdateLLMPricingRulesMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type CreateOrUpdateLLMPricingRulesMutationVariables = {
|
||||
data?: BodyType<LlmpricingruletypesUpdatableLLMPricingRulesDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Create or update pricing rules
|
||||
@@ -233,13 +222,13 @@ export const useCreateOrUpdateLLMPricingRules = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createOrUpdateLLMPricingRules>>,
|
||||
TError,
|
||||
CreateOrUpdateLLMPricingRulesMutationVariables,
|
||||
{ data?: BodyType<LlmpricingruletypesUpdatableLLMPricingRulesDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createOrUpdateLLMPricingRules>>,
|
||||
TError,
|
||||
CreateOrUpdateLLMPricingRulesMutationVariables,
|
||||
{ data?: BodyType<LlmpricingruletypesUpdatableLLMPricingRulesDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getCreateOrUpdateLLMPricingRulesMutationOptions(options));
|
||||
@@ -259,9 +248,6 @@ export const deleteLLMPricingRule = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getDeleteLLMPricingRuleMutationKey = () =>
|
||||
['deleteLLMPricingRule'] as const;
|
||||
|
||||
export const getDeleteLLMPricingRuleMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -269,16 +255,16 @@ export const getDeleteLLMPricingRuleMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteLLMPricingRule>>,
|
||||
TError,
|
||||
DeleteLLMPricingRuleMutationVariables,
|
||||
{ pathParams: DeleteLLMPricingRulePathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteLLMPricingRule>>,
|
||||
TError,
|
||||
DeleteLLMPricingRuleMutationVariables,
|
||||
{ pathParams: DeleteLLMPricingRulePathParameters },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getDeleteLLMPricingRuleMutationKey();
|
||||
const mutationKey = ['deleteLLMPricingRule'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -289,7 +275,7 @@ export const getDeleteLLMPricingRuleMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof deleteLLMPricingRule>>,
|
||||
DeleteLLMPricingRuleMutationVariables
|
||||
{ pathParams: DeleteLLMPricingRulePathParameters }
|
||||
> = (props) => {
|
||||
const { pathParams } = props ?? {};
|
||||
|
||||
@@ -305,9 +291,6 @@ export type DeleteLLMPricingRuleMutationResult = NonNullable<
|
||||
|
||||
export type DeleteLLMPricingRuleMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type DeleteLLMPricingRuleMutationVariables = {
|
||||
pathParams: DeleteLLMPricingRulePathParameters;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Delete a pricing rule
|
||||
@@ -319,13 +302,13 @@ export const useDeleteLLMPricingRule = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteLLMPricingRule>>,
|
||||
TError,
|
||||
DeleteLLMPricingRuleMutationVariables,
|
||||
{ pathParams: DeleteLLMPricingRulePathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteLLMPricingRule>>,
|
||||
TError,
|
||||
DeleteLLMPricingRuleMutationVariables,
|
||||
{ pathParams: DeleteLLMPricingRulePathParameters },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getDeleteLLMPricingRuleMutationOptions(options));
|
||||
@@ -417,7 +400,7 @@ export function useGetLLMPricingRule<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetLLMPricingRule} query
|
||||
* @summary Get a pricing rule
|
||||
*/
|
||||
export const invalidateGetLLMPricingRule = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -502,7 +485,7 @@ export function useListUnmappedLLMModels<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useListUnmappedLLMModels} query
|
||||
* @summary List unmapped models
|
||||
*/
|
||||
export const invalidateListUnmappedLLMModels = async (
|
||||
queryClient: QueryClient,
|
||||
|
||||
@@ -11,11 +11,11 @@ import type {
|
||||
UseMutationResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { HandleExportRawDataPOSTParams } from '../sigNoz.schemas/handleExportRawDataPOSTParams';
|
||||
|
||||
import type { Querybuildertypesv5QueryRangeRequestDTO } from '../sigNoz.schemas/querybuildertypesv5QueryRangeRequestDTO';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
import type {
|
||||
HandleExportRawDataPOSTParams,
|
||||
Querybuildertypesv5QueryRangeRequestDTO,
|
||||
RenderErrorResponseDTO,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
|
||||
@@ -39,9 +39,6 @@ export const handleExportRawDataPOST = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getHandleExportRawDataPOSTMutationKey = () =>
|
||||
['handleExportRawDataPOST'] as const;
|
||||
|
||||
export const getHandleExportRawDataPOSTMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -49,16 +46,22 @@ export const getHandleExportRawDataPOSTMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof handleExportRawDataPOST>>,
|
||||
TError,
|
||||
HandleExportRawDataPOSTMutationVariables,
|
||||
{
|
||||
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
|
||||
params?: HandleExportRawDataPOSTParams;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof handleExportRawDataPOST>>,
|
||||
TError,
|
||||
HandleExportRawDataPOSTMutationVariables,
|
||||
{
|
||||
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
|
||||
params?: HandleExportRawDataPOSTParams;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getHandleExportRawDataPOSTMutationKey();
|
||||
const mutationKey = ['handleExportRawDataPOST'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -69,7 +72,10 @@ export const getHandleExportRawDataPOSTMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof handleExportRawDataPOST>>,
|
||||
HandleExportRawDataPOSTMutationVariables
|
||||
{
|
||||
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
|
||||
params?: HandleExportRawDataPOSTParams;
|
||||
}
|
||||
> = (props) => {
|
||||
const { data, params } = props ?? {};
|
||||
|
||||
@@ -87,10 +93,6 @@ export type HandleExportRawDataPOSTMutationBody =
|
||||
| undefined;
|
||||
export type HandleExportRawDataPOSTMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type HandleExportRawDataPOSTMutationVariables = {
|
||||
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
|
||||
params?: HandleExportRawDataPOSTParams;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Export raw data
|
||||
@@ -102,13 +104,19 @@ export const useHandleExportRawDataPOST = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof handleExportRawDataPOST>>,
|
||||
TError,
|
||||
HandleExportRawDataPOSTMutationVariables,
|
||||
{
|
||||
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
|
||||
params?: HandleExportRawDataPOSTParams;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof handleExportRawDataPOST>>,
|
||||
TError,
|
||||
HandleExportRawDataPOSTMutationVariables,
|
||||
{
|
||||
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
|
||||
params?: HandleExportRawDataPOSTParams;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getHandleExportRawDataPOSTMutationOptions(options));
|
||||
|
||||
@@ -17,75 +17,43 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { CreateMetricReductionRule201 } from '../sigNoz.schemas/createMetricReductionRule201';
|
||||
|
||||
import type { DeleteMetricReductionRuleByIDPathParameters } from '../sigNoz.schemas/deleteMetricReductionRuleByIDPathParameters';
|
||||
|
||||
import type { GetMetricAlerts200 } from '../sigNoz.schemas/getMetricAlerts200';
|
||||
|
||||
import type { GetMetricAlertsParams } from '../sigNoz.schemas/getMetricAlertsParams';
|
||||
|
||||
import type { GetMetricAttributes200 } from '../sigNoz.schemas/getMetricAttributes200';
|
||||
|
||||
import type { GetMetricAttributesParams } from '../sigNoz.schemas/getMetricAttributesParams';
|
||||
|
||||
import type { GetMetricDashboardsV2200 } from '../sigNoz.schemas/getMetricDashboardsV2200';
|
||||
|
||||
import type { GetMetricDashboardsV2Params } from '../sigNoz.schemas/getMetricDashboardsV2Params';
|
||||
|
||||
import type { GetMetricHighlights200 } from '../sigNoz.schemas/getMetricHighlights200';
|
||||
|
||||
import type { GetMetricHighlightsParams } from '../sigNoz.schemas/getMetricHighlightsParams';
|
||||
|
||||
import type { GetMetricMetadata200 } from '../sigNoz.schemas/getMetricMetadata200';
|
||||
|
||||
import type { GetMetricMetadataParams } from '../sigNoz.schemas/getMetricMetadataParams';
|
||||
|
||||
import type { GetMetricReductionRuleByID200 } from '../sigNoz.schemas/getMetricReductionRuleByID200';
|
||||
|
||||
import type { GetMetricReductionRuleByIDPathParameters } from '../sigNoz.schemas/getMetricReductionRuleByIDPathParameters';
|
||||
|
||||
import type { GetMetricReductionRuleStats200 } from '../sigNoz.schemas/getMetricReductionRuleStats200';
|
||||
|
||||
import type { GetMetricReductionRuleTimeseries200 } from '../sigNoz.schemas/getMetricReductionRuleTimeseries200';
|
||||
|
||||
import type { GetMetricsOnboardingStatus200 } from '../sigNoz.schemas/getMetricsOnboardingStatus200';
|
||||
|
||||
import type { GetMetricsStats200 } from '../sigNoz.schemas/getMetricsStats200';
|
||||
|
||||
import type { GetMetricsTreemap200 } from '../sigNoz.schemas/getMetricsTreemap200';
|
||||
|
||||
import type { InspectMetrics200 } from '../sigNoz.schemas/inspectMetrics200';
|
||||
|
||||
import type { ListMetricReductionRules200 } from '../sigNoz.schemas/listMetricReductionRules200';
|
||||
|
||||
import type { ListMetricReductionRulesParams } from '../sigNoz.schemas/listMetricReductionRulesParams';
|
||||
|
||||
import type { ListMetrics200 } from '../sigNoz.schemas/listMetrics200';
|
||||
|
||||
import type { ListMetricsParams } from '../sigNoz.schemas/listMetricsParams';
|
||||
|
||||
import type { MetricreductionruletypesPostableReductionRuleDTO } from '../sigNoz.schemas/metricreductionruletypesPostableReductionRuleDTO';
|
||||
|
||||
import type { MetricreductionruletypesPostableReductionRulePreviewDTO } from '../sigNoz.schemas/metricreductionruletypesPostableReductionRulePreviewDTO';
|
||||
|
||||
import type { MetricreductionruletypesUpdatableReductionRuleDTO } from '../sigNoz.schemas/metricreductionruletypesUpdatableReductionRuleDTO';
|
||||
|
||||
import type { MetricsexplorertypesInspectMetricsRequestDTO } from '../sigNoz.schemas/metricsexplorertypesInspectMetricsRequestDTO';
|
||||
|
||||
import type { MetricsexplorertypesStatsRequestDTO } from '../sigNoz.schemas/metricsexplorertypesStatsRequestDTO';
|
||||
|
||||
import type { MetricsexplorertypesTreemapRequestDTO } from '../sigNoz.schemas/metricsexplorertypesTreemapRequestDTO';
|
||||
|
||||
import type { MetricsexplorertypesUpdateMetricMetadataRequestDTO } from '../sigNoz.schemas/metricsexplorertypesUpdateMetricMetadataRequestDTO';
|
||||
|
||||
import type { PreviewMetricReductionRule200 } from '../sigNoz.schemas/previewMetricReductionRule200';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
|
||||
import type { UpdateMetricReductionRuleByID200 } from '../sigNoz.schemas/updateMetricReductionRuleByID200';
|
||||
|
||||
import type { UpdateMetricReductionRuleByIDPathParameters } from '../sigNoz.schemas/updateMetricReductionRuleByIDPathParameters';
|
||||
import type {
|
||||
CreateMetricReductionRule201,
|
||||
DeleteMetricReductionRuleByIDPathParameters,
|
||||
GetMetricAlerts200,
|
||||
GetMetricAlertsParams,
|
||||
GetMetricAttributes200,
|
||||
GetMetricAttributesParams,
|
||||
GetMetricDashboardsV2200,
|
||||
GetMetricDashboardsV2Params,
|
||||
GetMetricHighlights200,
|
||||
GetMetricHighlightsParams,
|
||||
GetMetricMetadata200,
|
||||
GetMetricMetadataParams,
|
||||
GetMetricReductionRuleByID200,
|
||||
GetMetricReductionRuleByIDPathParameters,
|
||||
GetMetricReductionRuleStats200,
|
||||
GetMetricReductionRuleTimeseries200,
|
||||
GetMetricsOnboardingStatus200,
|
||||
GetMetricsStats200,
|
||||
GetMetricsTreemap200,
|
||||
InspectMetrics200,
|
||||
ListMetricReductionRules200,
|
||||
ListMetricReductionRulesParams,
|
||||
ListMetrics200,
|
||||
ListMetricsParams,
|
||||
MetricreductionruletypesPostableReductionRuleDTO,
|
||||
MetricreductionruletypesPostableReductionRulePreviewDTO,
|
||||
MetricreductionruletypesUpdatableReductionRuleDTO,
|
||||
MetricsexplorertypesInspectMetricsRequestDTO,
|
||||
MetricsexplorertypesStatsRequestDTO,
|
||||
MetricsexplorertypesTreemapRequestDTO,
|
||||
MetricsexplorertypesUpdateMetricMetadataRequestDTO,
|
||||
PreviewMetricReductionRule200,
|
||||
RenderErrorResponseDTO,
|
||||
UpdateMetricReductionRuleByID200,
|
||||
UpdateMetricReductionRuleByIDPathParameters,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
|
||||
@@ -197,7 +165,7 @@ export function useListMetricReductionRules<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useListMetricReductionRules} query
|
||||
* @summary List metric reduction rules
|
||||
*/
|
||||
export const invalidateListMetricReductionRules = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -229,9 +197,6 @@ export const createMetricReductionRule = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getCreateMetricReductionRuleMutationKey = () =>
|
||||
['createMetricReductionRule'] as const;
|
||||
|
||||
export const getCreateMetricReductionRuleMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -239,16 +204,16 @@ export const getCreateMetricReductionRuleMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createMetricReductionRule>>,
|
||||
TError,
|
||||
CreateMetricReductionRuleMutationVariables,
|
||||
{ data?: BodyType<MetricreductionruletypesPostableReductionRuleDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createMetricReductionRule>>,
|
||||
TError,
|
||||
CreateMetricReductionRuleMutationVariables,
|
||||
{ data?: BodyType<MetricreductionruletypesPostableReductionRuleDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getCreateMetricReductionRuleMutationKey();
|
||||
const mutationKey = ['createMetricReductionRule'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -259,7 +224,7 @@ export const getCreateMetricReductionRuleMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof createMetricReductionRule>>,
|
||||
CreateMetricReductionRuleMutationVariables
|
||||
{ data?: BodyType<MetricreductionruletypesPostableReductionRuleDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -277,9 +242,6 @@ export type CreateMetricReductionRuleMutationBody =
|
||||
| undefined;
|
||||
export type CreateMetricReductionRuleMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type CreateMetricReductionRuleMutationVariables = {
|
||||
data?: BodyType<MetricreductionruletypesPostableReductionRuleDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Create a metric reduction rule
|
||||
@@ -291,13 +253,13 @@ export const useCreateMetricReductionRule = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createMetricReductionRule>>,
|
||||
TError,
|
||||
CreateMetricReductionRuleMutationVariables,
|
||||
{ data?: BodyType<MetricreductionruletypesPostableReductionRuleDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createMetricReductionRule>>,
|
||||
TError,
|
||||
CreateMetricReductionRuleMutationVariables,
|
||||
{ data?: BodyType<MetricreductionruletypesPostableReductionRuleDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getCreateMetricReductionRuleMutationOptions(options));
|
||||
@@ -317,9 +279,6 @@ export const deleteMetricReductionRuleByID = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getDeleteMetricReductionRuleByIDMutationKey = () =>
|
||||
['deleteMetricReductionRuleByID'] as const;
|
||||
|
||||
export const getDeleteMetricReductionRuleByIDMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -327,16 +286,16 @@ export const getDeleteMetricReductionRuleByIDMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteMetricReductionRuleByID>>,
|
||||
TError,
|
||||
DeleteMetricReductionRuleByIDMutationVariables,
|
||||
{ pathParams: DeleteMetricReductionRuleByIDPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteMetricReductionRuleByID>>,
|
||||
TError,
|
||||
DeleteMetricReductionRuleByIDMutationVariables,
|
||||
{ pathParams: DeleteMetricReductionRuleByIDPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getDeleteMetricReductionRuleByIDMutationKey();
|
||||
const mutationKey = ['deleteMetricReductionRuleByID'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -347,7 +306,7 @@ export const getDeleteMetricReductionRuleByIDMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof deleteMetricReductionRuleByID>>,
|
||||
DeleteMetricReductionRuleByIDMutationVariables
|
||||
{ pathParams: DeleteMetricReductionRuleByIDPathParameters }
|
||||
> = (props) => {
|
||||
const { pathParams } = props ?? {};
|
||||
|
||||
@@ -363,9 +322,6 @@ export type DeleteMetricReductionRuleByIDMutationResult = NonNullable<
|
||||
|
||||
export type DeleteMetricReductionRuleByIDMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type DeleteMetricReductionRuleByIDMutationVariables = {
|
||||
pathParams: DeleteMetricReductionRuleByIDPathParameters;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Delete a metric reduction rule by id
|
||||
@@ -377,13 +333,13 @@ export const useDeleteMetricReductionRuleByID = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteMetricReductionRuleByID>>,
|
||||
TError,
|
||||
DeleteMetricReductionRuleByIDMutationVariables,
|
||||
{ pathParams: DeleteMetricReductionRuleByIDPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteMetricReductionRuleByID>>,
|
||||
TError,
|
||||
DeleteMetricReductionRuleByIDMutationVariables,
|
||||
{ pathParams: DeleteMetricReductionRuleByIDPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getDeleteMetricReductionRuleByIDMutationOptions(options));
|
||||
@@ -479,7 +435,7 @@ export function useGetMetricReductionRuleByID<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetMetricReductionRuleByID} query
|
||||
* @summary Get a metric reduction rule by id
|
||||
*/
|
||||
export const invalidateGetMetricReductionRuleByID = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -512,9 +468,6 @@ export const updateMetricReductionRuleByID = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getUpdateMetricReductionRuleByIDMutationKey = () =>
|
||||
['updateMetricReductionRuleByID'] as const;
|
||||
|
||||
export const getUpdateMetricReductionRuleByIDMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -522,16 +475,22 @@ export const getUpdateMetricReductionRuleByIDMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateMetricReductionRuleByID>>,
|
||||
TError,
|
||||
UpdateMetricReductionRuleByIDMutationVariables,
|
||||
{
|
||||
pathParams: UpdateMetricReductionRuleByIDPathParameters;
|
||||
data?: BodyType<MetricreductionruletypesUpdatableReductionRuleDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateMetricReductionRuleByID>>,
|
||||
TError,
|
||||
UpdateMetricReductionRuleByIDMutationVariables,
|
||||
{
|
||||
pathParams: UpdateMetricReductionRuleByIDPathParameters;
|
||||
data?: BodyType<MetricreductionruletypesUpdatableReductionRuleDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getUpdateMetricReductionRuleByIDMutationKey();
|
||||
const mutationKey = ['updateMetricReductionRuleByID'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -542,7 +501,10 @@ export const getUpdateMetricReductionRuleByIDMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateMetricReductionRuleByID>>,
|
||||
UpdateMetricReductionRuleByIDMutationVariables
|
||||
{
|
||||
pathParams: UpdateMetricReductionRuleByIDPathParameters;
|
||||
data?: BodyType<MetricreductionruletypesUpdatableReductionRuleDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -560,10 +522,6 @@ export type UpdateMetricReductionRuleByIDMutationBody =
|
||||
| undefined;
|
||||
export type UpdateMetricReductionRuleByIDMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type UpdateMetricReductionRuleByIDMutationVariables = {
|
||||
pathParams: UpdateMetricReductionRuleByIDPathParameters;
|
||||
data?: BodyType<MetricreductionruletypesUpdatableReductionRuleDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Update a metric reduction rule by id
|
||||
@@ -575,13 +533,19 @@ export const useUpdateMetricReductionRuleByID = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateMetricReductionRuleByID>>,
|
||||
TError,
|
||||
UpdateMetricReductionRuleByIDMutationVariables,
|
||||
{
|
||||
pathParams: UpdateMetricReductionRuleByIDPathParameters;
|
||||
data?: BodyType<MetricreductionruletypesUpdatableReductionRuleDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateMetricReductionRuleByID>>,
|
||||
TError,
|
||||
UpdateMetricReductionRuleByIDMutationVariables,
|
||||
{
|
||||
pathParams: UpdateMetricReductionRuleByIDPathParameters;
|
||||
data?: BodyType<MetricreductionruletypesUpdatableReductionRuleDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getUpdateMetricReductionRuleByIDMutationOptions(options));
|
||||
@@ -603,9 +567,6 @@ export const previewMetricReductionRule = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getPreviewMetricReductionRuleMutationKey = () =>
|
||||
['previewMetricReductionRule'] as const;
|
||||
|
||||
export const getPreviewMetricReductionRuleMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -613,16 +574,16 @@ export const getPreviewMetricReductionRuleMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof previewMetricReductionRule>>,
|
||||
TError,
|
||||
PreviewMetricReductionRuleMutationVariables,
|
||||
{ data?: BodyType<MetricreductionruletypesPostableReductionRulePreviewDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof previewMetricReductionRule>>,
|
||||
TError,
|
||||
PreviewMetricReductionRuleMutationVariables,
|
||||
{ data?: BodyType<MetricreductionruletypesPostableReductionRulePreviewDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getPreviewMetricReductionRuleMutationKey();
|
||||
const mutationKey = ['previewMetricReductionRule'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -633,7 +594,7 @@ export const getPreviewMetricReductionRuleMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof previewMetricReductionRule>>,
|
||||
PreviewMetricReductionRuleMutationVariables
|
||||
{ data?: BodyType<MetricreductionruletypesPostableReductionRulePreviewDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -651,9 +612,6 @@ export type PreviewMetricReductionRuleMutationBody =
|
||||
| undefined;
|
||||
export type PreviewMetricReductionRuleMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type PreviewMetricReductionRuleMutationVariables = {
|
||||
data?: BodyType<MetricreductionruletypesPostableReductionRulePreviewDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Preview a metric reduction rule
|
||||
@@ -665,13 +623,13 @@ export const usePreviewMetricReductionRule = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof previewMetricReductionRule>>,
|
||||
TError,
|
||||
PreviewMetricReductionRuleMutationVariables,
|
||||
{ data?: BodyType<MetricreductionruletypesPostableReductionRulePreviewDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof previewMetricReductionRule>>,
|
||||
TError,
|
||||
PreviewMetricReductionRuleMutationVariables,
|
||||
{ data?: BodyType<MetricreductionruletypesPostableReductionRulePreviewDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getPreviewMetricReductionRuleMutationOptions(options));
|
||||
@@ -748,7 +706,7 @@ export function useGetMetricReductionRuleStats<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetMetricReductionRuleStats} query
|
||||
* @summary Metric reduction stats
|
||||
*/
|
||||
export const invalidateGetMetricReductionRuleStats = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -834,7 +792,7 @@ export function useGetMetricReductionRuleTimeseries<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetMetricReductionRuleTimeseries} query
|
||||
* @summary Metric reduction volume over time
|
||||
*/
|
||||
export const invalidateGetMetricReductionRuleTimeseries = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -928,7 +886,7 @@ export function useListMetrics<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useListMetrics} query
|
||||
* @summary List metric names
|
||||
*/
|
||||
export const invalidateListMetrics = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -1023,7 +981,7 @@ export function useGetMetricAlerts<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetMetricAlerts} query
|
||||
* @summary Get metric alerts
|
||||
*/
|
||||
export const invalidateGetMetricAlerts = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -1121,7 +1079,7 @@ export function useGetMetricAttributes<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetMetricAttributes} query
|
||||
* @summary Get metric attributes
|
||||
*/
|
||||
export const invalidateGetMetricAttributes = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -1219,7 +1177,7 @@ export function useGetMetricHighlights<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetMetricHighlights} query
|
||||
* @summary Get metric highlights
|
||||
*/
|
||||
export const invalidateGetMetricHighlights = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -1251,8 +1209,6 @@ export const inspectMetrics = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getInspectMetricsMutationKey = () => ['inspectMetrics'] as const;
|
||||
|
||||
export const getInspectMetricsMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -1260,16 +1216,16 @@ export const getInspectMetricsMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof inspectMetrics>>,
|
||||
TError,
|
||||
InspectMetricsMutationVariables,
|
||||
{ data?: BodyType<MetricsexplorertypesInspectMetricsRequestDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof inspectMetrics>>,
|
||||
TError,
|
||||
InspectMetricsMutationVariables,
|
||||
{ data?: BodyType<MetricsexplorertypesInspectMetricsRequestDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getInspectMetricsMutationKey();
|
||||
const mutationKey = ['inspectMetrics'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -1280,7 +1236,7 @@ export const getInspectMetricsMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof inspectMetrics>>,
|
||||
InspectMetricsMutationVariables
|
||||
{ data?: BodyType<MetricsexplorertypesInspectMetricsRequestDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -1297,9 +1253,6 @@ export type InspectMetricsMutationBody =
|
||||
| BodyType<MetricsexplorertypesInspectMetricsRequestDTO>
|
||||
| undefined;
|
||||
export type InspectMetricsMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type InspectMetricsMutationVariables = {
|
||||
data?: BodyType<MetricsexplorertypesInspectMetricsRequestDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Inspect raw metric data points
|
||||
@@ -1311,13 +1264,13 @@ export const useInspectMetrics = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof inspectMetrics>>,
|
||||
TError,
|
||||
InspectMetricsMutationVariables,
|
||||
{ data?: BodyType<MetricsexplorertypesInspectMetricsRequestDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof inspectMetrics>>,
|
||||
TError,
|
||||
InspectMetricsMutationVariables,
|
||||
{ data?: BodyType<MetricsexplorertypesInspectMetricsRequestDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getInspectMetricsMutationOptions(options));
|
||||
@@ -1405,7 +1358,7 @@ export function useGetMetricMetadata<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetMetricMetadata} query
|
||||
* @summary Get metric metadata
|
||||
*/
|
||||
export const invalidateGetMetricMetadata = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -1437,9 +1390,6 @@ export const updateMetricMetadata = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getUpdateMetricMetadataMutationKey = () =>
|
||||
['updateMetricMetadata'] as const;
|
||||
|
||||
export const getUpdateMetricMetadataMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -1447,16 +1397,16 @@ export const getUpdateMetricMetadataMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateMetricMetadata>>,
|
||||
TError,
|
||||
UpdateMetricMetadataMutationVariables,
|
||||
{ data?: BodyType<MetricsexplorertypesUpdateMetricMetadataRequestDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateMetricMetadata>>,
|
||||
TError,
|
||||
UpdateMetricMetadataMutationVariables,
|
||||
{ data?: BodyType<MetricsexplorertypesUpdateMetricMetadataRequestDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getUpdateMetricMetadataMutationKey();
|
||||
const mutationKey = ['updateMetricMetadata'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -1467,7 +1417,7 @@ export const getUpdateMetricMetadataMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateMetricMetadata>>,
|
||||
UpdateMetricMetadataMutationVariables
|
||||
{ data?: BodyType<MetricsexplorertypesUpdateMetricMetadataRequestDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -1485,9 +1435,6 @@ export type UpdateMetricMetadataMutationBody =
|
||||
| undefined;
|
||||
export type UpdateMetricMetadataMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type UpdateMetricMetadataMutationVariables = {
|
||||
data?: BodyType<MetricsexplorertypesUpdateMetricMetadataRequestDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Update metric metadata
|
||||
@@ -1499,13 +1446,13 @@ export const useUpdateMetricMetadata = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateMetricMetadata>>,
|
||||
TError,
|
||||
UpdateMetricMetadataMutationVariables,
|
||||
{ data?: BodyType<MetricsexplorertypesUpdateMetricMetadataRequestDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateMetricMetadata>>,
|
||||
TError,
|
||||
UpdateMetricMetadataMutationVariables,
|
||||
{ data?: BodyType<MetricsexplorertypesUpdateMetricMetadataRequestDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getUpdateMetricMetadataMutationOptions(options));
|
||||
@@ -1582,7 +1529,7 @@ export function useGetMetricsOnboardingStatus<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetMetricsOnboardingStatus} query
|
||||
* @summary Check if non-SigNoz metrics have been received
|
||||
*/
|
||||
export const invalidateGetMetricsOnboardingStatus = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -1613,8 +1560,6 @@ export const getMetricsStats = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getGetMetricsStatsMutationKey = () => ['getMetricsStats'] as const;
|
||||
|
||||
export const getGetMetricsStatsMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -1622,16 +1567,16 @@ export const getGetMetricsStatsMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof getMetricsStats>>,
|
||||
TError,
|
||||
GetMetricsStatsMutationVariables,
|
||||
{ data?: BodyType<MetricsexplorertypesStatsRequestDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof getMetricsStats>>,
|
||||
TError,
|
||||
GetMetricsStatsMutationVariables,
|
||||
{ data?: BodyType<MetricsexplorertypesStatsRequestDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getGetMetricsStatsMutationKey();
|
||||
const mutationKey = ['getMetricsStats'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -1642,7 +1587,7 @@ export const getGetMetricsStatsMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof getMetricsStats>>,
|
||||
GetMetricsStatsMutationVariables
|
||||
{ data?: BodyType<MetricsexplorertypesStatsRequestDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -1659,9 +1604,6 @@ export type GetMetricsStatsMutationBody =
|
||||
| BodyType<MetricsexplorertypesStatsRequestDTO>
|
||||
| undefined;
|
||||
export type GetMetricsStatsMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type GetMetricsStatsMutationVariables = {
|
||||
data?: BodyType<MetricsexplorertypesStatsRequestDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Get metrics statistics
|
||||
@@ -1673,13 +1615,13 @@ export const useGetMetricsStats = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof getMetricsStats>>,
|
||||
TError,
|
||||
GetMetricsStatsMutationVariables,
|
||||
{ data?: BodyType<MetricsexplorertypesStatsRequestDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof getMetricsStats>>,
|
||||
TError,
|
||||
GetMetricsStatsMutationVariables,
|
||||
{ data?: BodyType<MetricsexplorertypesStatsRequestDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getGetMetricsStatsMutationOptions(options));
|
||||
@@ -1701,9 +1643,6 @@ export const getMetricsTreemap = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getGetMetricsTreemapMutationKey = () =>
|
||||
['getMetricsTreemap'] as const;
|
||||
|
||||
export const getGetMetricsTreemapMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -1711,16 +1650,16 @@ export const getGetMetricsTreemapMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof getMetricsTreemap>>,
|
||||
TError,
|
||||
GetMetricsTreemapMutationVariables,
|
||||
{ data?: BodyType<MetricsexplorertypesTreemapRequestDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof getMetricsTreemap>>,
|
||||
TError,
|
||||
GetMetricsTreemapMutationVariables,
|
||||
{ data?: BodyType<MetricsexplorertypesTreemapRequestDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getGetMetricsTreemapMutationKey();
|
||||
const mutationKey = ['getMetricsTreemap'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -1731,7 +1670,7 @@ export const getGetMetricsTreemapMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof getMetricsTreemap>>,
|
||||
GetMetricsTreemapMutationVariables
|
||||
{ data?: BodyType<MetricsexplorertypesTreemapRequestDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -1748,9 +1687,6 @@ export type GetMetricsTreemapMutationBody =
|
||||
| BodyType<MetricsexplorertypesTreemapRequestDTO>
|
||||
| undefined;
|
||||
export type GetMetricsTreemapMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type GetMetricsTreemapMutationVariables = {
|
||||
data?: BodyType<MetricsexplorertypesTreemapRequestDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Get metrics treemap
|
||||
@@ -1762,13 +1698,13 @@ export const useGetMetricsTreemap = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof getMetricsTreemap>>,
|
||||
TError,
|
||||
GetMetricsTreemapMutationVariables,
|
||||
{ data?: BodyType<MetricsexplorertypesTreemapRequestDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof getMetricsTreemap>>,
|
||||
TError,
|
||||
GetMetricsTreemapMutationVariables,
|
||||
{ data?: BodyType<MetricsexplorertypesTreemapRequestDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getGetMetricsTreemapMutationOptions(options));
|
||||
@@ -1856,7 +1792,7 @@ export function useGetMetricDashboardsV2<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetMetricDashboardsV2} query
|
||||
* @summary Get metric dashboards (v2)
|
||||
*/
|
||||
export const invalidateGetMetricDashboardsV2 = async (
|
||||
queryClient: QueryClient,
|
||||
|
||||
@@ -17,11 +17,11 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { GetMyOrganization200 } from '../sigNoz.schemas/getMyOrganization200';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
|
||||
import type { TypesOrganizationDTO } from '../sigNoz.schemas/typesOrganizationDTO';
|
||||
import type {
|
||||
GetMyOrganization200,
|
||||
RenderErrorResponseDTO,
|
||||
TypesOrganizationDTO,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
|
||||
@@ -116,7 +116,7 @@ export function useGetMyOrganization<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetMyOrganization} query
|
||||
* @summary Get my organization
|
||||
*/
|
||||
export const invalidateGetMyOrganization = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -147,9 +147,6 @@ export const updateMyOrganization = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getUpdateMyOrganizationMutationKey = () =>
|
||||
['updateMyOrganization'] as const;
|
||||
|
||||
export const getUpdateMyOrganizationMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -157,16 +154,16 @@ export const getUpdateMyOrganizationMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateMyOrganization>>,
|
||||
TError,
|
||||
UpdateMyOrganizationMutationVariables,
|
||||
{ data?: BodyType<TypesOrganizationDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateMyOrganization>>,
|
||||
TError,
|
||||
UpdateMyOrganizationMutationVariables,
|
||||
{ data?: BodyType<TypesOrganizationDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getUpdateMyOrganizationMutationKey();
|
||||
const mutationKey = ['updateMyOrganization'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -177,7 +174,7 @@ export const getUpdateMyOrganizationMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateMyOrganization>>,
|
||||
UpdateMyOrganizationMutationVariables
|
||||
{ data?: BodyType<TypesOrganizationDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -195,9 +192,6 @@ export type UpdateMyOrganizationMutationBody =
|
||||
| undefined;
|
||||
export type UpdateMyOrganizationMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type UpdateMyOrganizationMutationVariables = {
|
||||
data?: BodyType<TypesOrganizationDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Update my organization
|
||||
@@ -209,13 +203,13 @@ export const useUpdateMyOrganization = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateMyOrganization>>,
|
||||
TError,
|
||||
UpdateMyOrganizationMutationVariables,
|
||||
{ data?: BodyType<TypesOrganizationDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateMyOrganization>>,
|
||||
TError,
|
||||
UpdateMyOrganizationMutationVariables,
|
||||
{ data?: BodyType<TypesOrganizationDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getUpdateMyOrganizationMutationOptions(options));
|
||||
|
||||
@@ -17,25 +17,18 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { GetOrgPreference200 } from '../sigNoz.schemas/getOrgPreference200';
|
||||
|
||||
import type { GetOrgPreferencePathParameters } from '../sigNoz.schemas/getOrgPreferencePathParameters';
|
||||
|
||||
import type { GetUserPreference200 } from '../sigNoz.schemas/getUserPreference200';
|
||||
|
||||
import type { GetUserPreferencePathParameters } from '../sigNoz.schemas/getUserPreferencePathParameters';
|
||||
|
||||
import type { ListOrgPreferences200 } from '../sigNoz.schemas/listOrgPreferences200';
|
||||
|
||||
import type { ListUserPreferences200 } from '../sigNoz.schemas/listUserPreferences200';
|
||||
|
||||
import type { PreferencetypesUpdatablePreferenceDTO } from '../sigNoz.schemas/preferencetypesUpdatablePreferenceDTO';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
|
||||
import type { UpdateOrgPreferencePathParameters } from '../sigNoz.schemas/updateOrgPreferencePathParameters';
|
||||
|
||||
import type { UpdateUserPreferencePathParameters } from '../sigNoz.schemas/updateUserPreferencePathParameters';
|
||||
import type {
|
||||
GetOrgPreference200,
|
||||
GetOrgPreferencePathParameters,
|
||||
GetUserPreference200,
|
||||
GetUserPreferencePathParameters,
|
||||
ListOrgPreferences200,
|
||||
ListUserPreferences200,
|
||||
PreferencetypesUpdatablePreferenceDTO,
|
||||
RenderErrorResponseDTO,
|
||||
UpdateOrgPreferencePathParameters,
|
||||
UpdateUserPreferencePathParameters,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
|
||||
@@ -130,7 +123,7 @@ export function useListOrgPreferences<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useListOrgPreferences} query
|
||||
* @summary List org preferences
|
||||
*/
|
||||
export const invalidateListOrgPreferences = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -231,7 +224,7 @@ export function useGetOrgPreference<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetOrgPreference} query
|
||||
* @summary Get org preference
|
||||
*/
|
||||
export const invalidateGetOrgPreference = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -264,9 +257,6 @@ export const updateOrgPreference = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getUpdateOrgPreferenceMutationKey = () =>
|
||||
['updateOrgPreference'] as const;
|
||||
|
||||
export const getUpdateOrgPreferenceMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -274,16 +264,22 @@ export const getUpdateOrgPreferenceMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateOrgPreference>>,
|
||||
TError,
|
||||
UpdateOrgPreferenceMutationVariables,
|
||||
{
|
||||
pathParams: UpdateOrgPreferencePathParameters;
|
||||
data?: BodyType<PreferencetypesUpdatablePreferenceDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateOrgPreference>>,
|
||||
TError,
|
||||
UpdateOrgPreferenceMutationVariables,
|
||||
{
|
||||
pathParams: UpdateOrgPreferencePathParameters;
|
||||
data?: BodyType<PreferencetypesUpdatablePreferenceDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getUpdateOrgPreferenceMutationKey();
|
||||
const mutationKey = ['updateOrgPreference'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -294,7 +290,10 @@ export const getUpdateOrgPreferenceMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateOrgPreference>>,
|
||||
UpdateOrgPreferenceMutationVariables
|
||||
{
|
||||
pathParams: UpdateOrgPreferencePathParameters;
|
||||
data?: BodyType<PreferencetypesUpdatablePreferenceDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -312,10 +311,6 @@ export type UpdateOrgPreferenceMutationBody =
|
||||
| undefined;
|
||||
export type UpdateOrgPreferenceMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type UpdateOrgPreferenceMutationVariables = {
|
||||
pathParams: UpdateOrgPreferencePathParameters;
|
||||
data?: BodyType<PreferencetypesUpdatablePreferenceDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Update org preference
|
||||
@@ -327,13 +322,19 @@ export const useUpdateOrgPreference = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateOrgPreference>>,
|
||||
TError,
|
||||
UpdateOrgPreferenceMutationVariables,
|
||||
{
|
||||
pathParams: UpdateOrgPreferencePathParameters;
|
||||
data?: BodyType<PreferencetypesUpdatablePreferenceDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateOrgPreference>>,
|
||||
TError,
|
||||
UpdateOrgPreferenceMutationVariables,
|
||||
{
|
||||
pathParams: UpdateOrgPreferencePathParameters;
|
||||
data?: BodyType<PreferencetypesUpdatablePreferenceDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getUpdateOrgPreferenceMutationOptions(options));
|
||||
@@ -408,7 +409,7 @@ export function useListUserPreferences<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useListUserPreferences} query
|
||||
* @summary List user preferences
|
||||
*/
|
||||
export const invalidateListUserPreferences = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -509,7 +510,7 @@ export function useGetUserPreference<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetUserPreference} query
|
||||
* @summary Get user preference
|
||||
*/
|
||||
export const invalidateGetUserPreference = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -542,9 +543,6 @@ export const updateUserPreference = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getUpdateUserPreferenceMutationKey = () =>
|
||||
['updateUserPreference'] as const;
|
||||
|
||||
export const getUpdateUserPreferenceMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -552,16 +550,22 @@ export const getUpdateUserPreferenceMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateUserPreference>>,
|
||||
TError,
|
||||
UpdateUserPreferenceMutationVariables,
|
||||
{
|
||||
pathParams: UpdateUserPreferencePathParameters;
|
||||
data?: BodyType<PreferencetypesUpdatablePreferenceDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateUserPreference>>,
|
||||
TError,
|
||||
UpdateUserPreferenceMutationVariables,
|
||||
{
|
||||
pathParams: UpdateUserPreferencePathParameters;
|
||||
data?: BodyType<PreferencetypesUpdatablePreferenceDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getUpdateUserPreferenceMutationKey();
|
||||
const mutationKey = ['updateUserPreference'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -572,7 +576,10 @@ export const getUpdateUserPreferenceMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateUserPreference>>,
|
||||
UpdateUserPreferenceMutationVariables
|
||||
{
|
||||
pathParams: UpdateUserPreferencePathParameters;
|
||||
data?: BodyType<PreferencetypesUpdatablePreferenceDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -590,10 +597,6 @@ export type UpdateUserPreferenceMutationBody =
|
||||
| undefined;
|
||||
export type UpdateUserPreferenceMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type UpdateUserPreferenceMutationVariables = {
|
||||
pathParams: UpdateUserPreferencePathParameters;
|
||||
data?: BodyType<PreferencetypesUpdatablePreferenceDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Update user preference
|
||||
@@ -605,13 +608,19 @@ export const useUpdateUserPreference = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateUserPreference>>,
|
||||
TError,
|
||||
UpdateUserPreferenceMutationVariables,
|
||||
{
|
||||
pathParams: UpdateUserPreferencePathParameters;
|
||||
data?: BodyType<PreferencetypesUpdatablePreferenceDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateUserPreference>>,
|
||||
TError,
|
||||
UpdateUserPreferenceMutationVariables,
|
||||
{
|
||||
pathParams: UpdateUserPreferencePathParameters;
|
||||
data?: BodyType<PreferencetypesUpdatablePreferenceDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getUpdateUserPreferenceMutationOptions(options));
|
||||
|
||||
@@ -17,19 +17,15 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { PrometheusErrorResponseSchemaDTO } from '../sigNoz.schemas/prometheusErrorResponseSchemaDTO';
|
||||
|
||||
import type { PrometheusQueryParams } from '../sigNoz.schemas/prometheusQueryParams';
|
||||
|
||||
import type { PrometheusQueryPostParams } from '../sigNoz.schemas/prometheusQueryPostParams';
|
||||
|
||||
import type { PrometheusQueryRangeParams } from '../sigNoz.schemas/prometheusQueryRangeParams';
|
||||
|
||||
import type { PrometheusQueryRangePostParams } from '../sigNoz.schemas/prometheusQueryRangePostParams';
|
||||
|
||||
import type { PrometheusSuccessResponseSchemaDTO } from '../sigNoz.schemas/prometheusSuccessResponseSchemaDTO';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
import type {
|
||||
PrometheusErrorResponseSchemaDTO,
|
||||
PrometheusQueryParams,
|
||||
PrometheusQueryPostParams,
|
||||
PrometheusQueryRangeParams,
|
||||
PrometheusQueryRangePostParams,
|
||||
PrometheusSuccessResponseSchemaDTO,
|
||||
RenderErrorResponseDTO,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType } from '../../../generatedAPIInstance';
|
||||
@@ -136,7 +132,7 @@ export function usePrometheusQuery<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link usePrometheusQuery} query
|
||||
* @summary Prometheus instant query
|
||||
*/
|
||||
export const invalidatePrometheusQuery = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -167,9 +163,6 @@ export const prometheusQueryPost = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getPrometheusQueryPostMutationKey = () =>
|
||||
['prometheusQueryPost'] as const;
|
||||
|
||||
export const getPrometheusQueryPostMutationOptions = <
|
||||
TError = ErrorType<PrometheusErrorResponseSchemaDTO | RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -177,16 +170,16 @@ export const getPrometheusQueryPostMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof prometheusQueryPost>>,
|
||||
TError,
|
||||
PrometheusQueryPostMutationVariables,
|
||||
{ params: PrometheusQueryPostParams },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof prometheusQueryPost>>,
|
||||
TError,
|
||||
PrometheusQueryPostMutationVariables,
|
||||
{ params: PrometheusQueryPostParams },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getPrometheusQueryPostMutationKey();
|
||||
const mutationKey = ['prometheusQueryPost'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -197,7 +190,7 @@ export const getPrometheusQueryPostMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof prometheusQueryPost>>,
|
||||
PrometheusQueryPostMutationVariables
|
||||
{ params: PrometheusQueryPostParams }
|
||||
> = (props) => {
|
||||
const { params } = props ?? {};
|
||||
|
||||
@@ -214,9 +207,6 @@ export type PrometheusQueryPostMutationResult = NonNullable<
|
||||
export type PrometheusQueryPostMutationError = ErrorType<
|
||||
PrometheusErrorResponseSchemaDTO | RenderErrorResponseDTO
|
||||
>;
|
||||
export type PrometheusQueryPostMutationVariables = {
|
||||
params: PrometheusQueryPostParams;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Prometheus instant query
|
||||
@@ -228,13 +218,13 @@ export const usePrometheusQueryPost = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof prometheusQueryPost>>,
|
||||
TError,
|
||||
PrometheusQueryPostMutationVariables,
|
||||
{ params: PrometheusQueryPostParams },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof prometheusQueryPost>>,
|
||||
TError,
|
||||
PrometheusQueryPostMutationVariables,
|
||||
{ params: PrometheusQueryPostParams },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getPrometheusQueryPostMutationOptions(options));
|
||||
@@ -327,7 +317,7 @@ export function usePrometheusQueryRange<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link usePrometheusQueryRange} query
|
||||
* @summary Prometheus range query
|
||||
*/
|
||||
export const invalidatePrometheusQueryRange = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -358,9 +348,6 @@ export const prometheusQueryRangePost = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getPrometheusQueryRangePostMutationKey = () =>
|
||||
['prometheusQueryRangePost'] as const;
|
||||
|
||||
export const getPrometheusQueryRangePostMutationOptions = <
|
||||
TError = ErrorType<PrometheusErrorResponseSchemaDTO | RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -368,16 +355,16 @@ export const getPrometheusQueryRangePostMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof prometheusQueryRangePost>>,
|
||||
TError,
|
||||
PrometheusQueryRangePostMutationVariables,
|
||||
{ params: PrometheusQueryRangePostParams },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof prometheusQueryRangePost>>,
|
||||
TError,
|
||||
PrometheusQueryRangePostMutationVariables,
|
||||
{ params: PrometheusQueryRangePostParams },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getPrometheusQueryRangePostMutationKey();
|
||||
const mutationKey = ['prometheusQueryRangePost'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -388,7 +375,7 @@ export const getPrometheusQueryRangePostMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof prometheusQueryRangePost>>,
|
||||
PrometheusQueryRangePostMutationVariables
|
||||
{ params: PrometheusQueryRangePostParams }
|
||||
> = (props) => {
|
||||
const { params } = props ?? {};
|
||||
|
||||
@@ -405,9 +392,6 @@ export type PrometheusQueryRangePostMutationResult = NonNullable<
|
||||
export type PrometheusQueryRangePostMutationError = ErrorType<
|
||||
PrometheusErrorResponseSchemaDTO | RenderErrorResponseDTO
|
||||
>;
|
||||
export type PrometheusQueryRangePostMutationVariables = {
|
||||
params: PrometheusQueryRangePostParams;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Prometheus range query
|
||||
@@ -419,13 +403,13 @@ export const usePrometheusQueryRangePost = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof prometheusQueryRangePost>>,
|
||||
TError,
|
||||
PrometheusQueryRangePostMutationVariables,
|
||||
{ params: PrometheusQueryRangePostParams },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof prometheusQueryRangePost>>,
|
||||
TError,
|
||||
PrometheusQueryRangePostMutationVariables,
|
||||
{ params: PrometheusQueryRangePostParams },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getPrometheusQueryRangePostMutationOptions(options));
|
||||
|
||||
@@ -17,17 +17,14 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { IndexMaterializedPaths200 } from '../sigNoz.schemas/indexMaterializedPaths200';
|
||||
|
||||
import type { ListPromotedPaths200 } from '../sigNoz.schemas/listPromotedPaths200';
|
||||
|
||||
import type { ListPromotedPathsParams } from '../sigNoz.schemas/listPromotedPathsParams';
|
||||
|
||||
import type { PromotetypesPostableIndexMaterializedPathsDTO } from '../sigNoz.schemas/promotetypesPostableIndexMaterializedPathsDTO';
|
||||
|
||||
import type { PromotetypesPromotePathDTO } from '../sigNoz.schemas/promotetypesPromotePathDTO';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
import type {
|
||||
IndexMaterializedPaths200,
|
||||
ListPromotedPaths200,
|
||||
ListPromotedPathsParams,
|
||||
PromotetypesPostableIndexMaterializedPathsDTO,
|
||||
PromotetypesPromotePathDTO,
|
||||
RenderErrorResponseDTO,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
|
||||
@@ -135,7 +132,7 @@ export function useListPromotedPaths<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useListPromotedPaths} query
|
||||
* @summary List promoted paths
|
||||
*/
|
||||
export const invalidateListPromotedPaths = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -169,8 +166,6 @@ export const promotePaths = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getPromotePathsMutationKey = () => ['promotePaths'] as const;
|
||||
|
||||
export const getPromotePathsMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -178,16 +173,16 @@ export const getPromotePathsMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof promotePaths>>,
|
||||
TError,
|
||||
PromotePathsMutationVariables,
|
||||
{ data?: BodyType<PromotetypesPromotePathDTO[] | null> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof promotePaths>>,
|
||||
TError,
|
||||
PromotePathsMutationVariables,
|
||||
{ data?: BodyType<PromotetypesPromotePathDTO[] | null> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getPromotePathsMutationKey();
|
||||
const mutationKey = ['promotePaths'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -198,7 +193,7 @@ export const getPromotePathsMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof promotePaths>>,
|
||||
PromotePathsMutationVariables
|
||||
{ data?: BodyType<PromotetypesPromotePathDTO[] | null> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -215,9 +210,6 @@ export type PromotePathsMutationBody =
|
||||
| BodyType<PromotetypesPromotePathDTO[] | null>
|
||||
| undefined;
|
||||
export type PromotePathsMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type PromotePathsMutationVariables = {
|
||||
data?: BodyType<PromotetypesPromotePathDTO[] | null>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Promote paths
|
||||
@@ -229,13 +221,13 @@ export const usePromotePaths = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof promotePaths>>,
|
||||
TError,
|
||||
PromotePathsMutationVariables,
|
||||
{ data?: BodyType<PromotetypesPromotePathDTO[] | null> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof promotePaths>>,
|
||||
TError,
|
||||
PromotePathsMutationVariables,
|
||||
{ data?: BodyType<PromotetypesPromotePathDTO[] | null> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getPromotePathsMutationOptions(options));
|
||||
@@ -257,9 +249,6 @@ export const indexMaterializedPaths = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getIndexMaterializedPathsMutationKey = () =>
|
||||
['indexMaterializedPaths'] as const;
|
||||
|
||||
export const getIndexMaterializedPathsMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -267,16 +256,16 @@ export const getIndexMaterializedPathsMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof indexMaterializedPaths>>,
|
||||
TError,
|
||||
IndexMaterializedPathsMutationVariables,
|
||||
{ data?: BodyType<PromotetypesPostableIndexMaterializedPathsDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof indexMaterializedPaths>>,
|
||||
TError,
|
||||
IndexMaterializedPathsMutationVariables,
|
||||
{ data?: BodyType<PromotetypesPostableIndexMaterializedPathsDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getIndexMaterializedPathsMutationKey();
|
||||
const mutationKey = ['indexMaterializedPaths'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -287,7 +276,7 @@ export const getIndexMaterializedPathsMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof indexMaterializedPaths>>,
|
||||
IndexMaterializedPathsMutationVariables
|
||||
{ data?: BodyType<PromotetypesPostableIndexMaterializedPathsDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -305,9 +294,6 @@ export type IndexMaterializedPathsMutationBody =
|
||||
| undefined;
|
||||
export type IndexMaterializedPathsMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type IndexMaterializedPathsMutationVariables = {
|
||||
data?: BodyType<PromotetypesPostableIndexMaterializedPathsDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Index materialized paths
|
||||
@@ -319,13 +305,13 @@ export const useIndexMaterializedPaths = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof indexMaterializedPaths>>,
|
||||
TError,
|
||||
IndexMaterializedPathsMutationVariables,
|
||||
{ data?: BodyType<PromotetypesPostableIndexMaterializedPathsDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof indexMaterializedPaths>>,
|
||||
TError,
|
||||
IndexMaterializedPathsMutationVariables,
|
||||
{ data?: BodyType<PromotetypesPostableIndexMaterializedPathsDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getIndexMaterializedPathsMutationOptions(options));
|
||||
|
||||
@@ -11,17 +11,14 @@ import type {
|
||||
UseMutationResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { QueryRangePreviewV5200 } from '../sigNoz.schemas/queryRangePreviewV5200';
|
||||
|
||||
import type { QueryRangePreviewV5Params } from '../sigNoz.schemas/queryRangePreviewV5Params';
|
||||
|
||||
import type { QueryRangeV5200 } from '../sigNoz.schemas/queryRangeV5200';
|
||||
|
||||
import type { Querybuildertypesv5QueryRangeRequestDTO } from '../sigNoz.schemas/querybuildertypesv5QueryRangeRequestDTO';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
|
||||
import type { ReplaceVariables200 } from '../sigNoz.schemas/replaceVariables200';
|
||||
import type {
|
||||
QueryRangePreviewV5200,
|
||||
QueryRangePreviewV5Params,
|
||||
QueryRangeV5200,
|
||||
Querybuildertypesv5QueryRangeRequestDTO,
|
||||
RenderErrorResponseDTO,
|
||||
ReplaceVariables200,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
|
||||
@@ -43,8 +40,6 @@ export const queryRangeV5 = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getQueryRangeV5MutationKey = () => ['queryRangeV5'] as const;
|
||||
|
||||
export const getQueryRangeV5MutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -52,16 +47,16 @@ export const getQueryRangeV5MutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof queryRangeV5>>,
|
||||
TError,
|
||||
QueryRangeV5MutationVariables,
|
||||
{ data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof queryRangeV5>>,
|
||||
TError,
|
||||
QueryRangeV5MutationVariables,
|
||||
{ data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getQueryRangeV5MutationKey();
|
||||
const mutationKey = ['queryRangeV5'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -72,7 +67,7 @@ export const getQueryRangeV5MutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof queryRangeV5>>,
|
||||
QueryRangeV5MutationVariables
|
||||
{ data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -89,9 +84,6 @@ export type QueryRangeV5MutationBody =
|
||||
| BodyType<Querybuildertypesv5QueryRangeRequestDTO>
|
||||
| undefined;
|
||||
export type QueryRangeV5MutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type QueryRangeV5MutationVariables = {
|
||||
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Query range
|
||||
@@ -103,13 +95,13 @@ export const useQueryRangeV5 = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof queryRangeV5>>,
|
||||
TError,
|
||||
QueryRangeV5MutationVariables,
|
||||
{ data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof queryRangeV5>>,
|
||||
TError,
|
||||
QueryRangeV5MutationVariables,
|
||||
{ data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getQueryRangeV5MutationOptions(options));
|
||||
@@ -133,9 +125,6 @@ export const queryRangePreviewV5 = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getQueryRangePreviewV5MutationKey = () =>
|
||||
['queryRangePreviewV5'] as const;
|
||||
|
||||
export const getQueryRangePreviewV5MutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -143,16 +132,22 @@ export const getQueryRangePreviewV5MutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof queryRangePreviewV5>>,
|
||||
TError,
|
||||
QueryRangePreviewV5MutationVariables,
|
||||
{
|
||||
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
|
||||
params?: QueryRangePreviewV5Params;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof queryRangePreviewV5>>,
|
||||
TError,
|
||||
QueryRangePreviewV5MutationVariables,
|
||||
{
|
||||
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
|
||||
params?: QueryRangePreviewV5Params;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getQueryRangePreviewV5MutationKey();
|
||||
const mutationKey = ['queryRangePreviewV5'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -163,7 +158,10 @@ export const getQueryRangePreviewV5MutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof queryRangePreviewV5>>,
|
||||
QueryRangePreviewV5MutationVariables
|
||||
{
|
||||
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
|
||||
params?: QueryRangePreviewV5Params;
|
||||
}
|
||||
> = (props) => {
|
||||
const { data, params } = props ?? {};
|
||||
|
||||
@@ -181,10 +179,6 @@ export type QueryRangePreviewV5MutationBody =
|
||||
| undefined;
|
||||
export type QueryRangePreviewV5MutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type QueryRangePreviewV5MutationVariables = {
|
||||
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
|
||||
params?: QueryRangePreviewV5Params;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Query range preview
|
||||
@@ -196,13 +190,19 @@ export const useQueryRangePreviewV5 = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof queryRangePreviewV5>>,
|
||||
TError,
|
||||
QueryRangePreviewV5MutationVariables,
|
||||
{
|
||||
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
|
||||
params?: QueryRangePreviewV5Params;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof queryRangePreviewV5>>,
|
||||
TError,
|
||||
QueryRangePreviewV5MutationVariables,
|
||||
{
|
||||
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
|
||||
params?: QueryRangePreviewV5Params;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getQueryRangePreviewV5MutationOptions(options));
|
||||
@@ -224,9 +224,6 @@ export const replaceVariables = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getReplaceVariablesMutationKey = () =>
|
||||
['replaceVariables'] as const;
|
||||
|
||||
export const getReplaceVariablesMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -234,16 +231,16 @@ export const getReplaceVariablesMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof replaceVariables>>,
|
||||
TError,
|
||||
ReplaceVariablesMutationVariables,
|
||||
{ data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof replaceVariables>>,
|
||||
TError,
|
||||
ReplaceVariablesMutationVariables,
|
||||
{ data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getReplaceVariablesMutationKey();
|
||||
const mutationKey = ['replaceVariables'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -254,7 +251,7 @@ export const getReplaceVariablesMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof replaceVariables>>,
|
||||
ReplaceVariablesMutationVariables
|
||||
{ data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -271,9 +268,6 @@ export type ReplaceVariablesMutationBody =
|
||||
| BodyType<Querybuildertypesv5QueryRangeRequestDTO>
|
||||
| undefined;
|
||||
export type ReplaceVariablesMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type ReplaceVariablesMutationVariables = {
|
||||
data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Replace variables
|
||||
@@ -285,13 +279,13 @@ export const useReplaceVariables = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof replaceVariables>>,
|
||||
TError,
|
||||
ReplaceVariablesMutationVariables,
|
||||
{ data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof replaceVariables>>,
|
||||
TError,
|
||||
ReplaceVariablesMutationVariables,
|
||||
{ data?: BodyType<Querybuildertypesv5QueryRangeRequestDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getReplaceVariablesMutationOptions(options));
|
||||
|
||||
@@ -17,17 +17,14 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { GetQuickFilters200 } from '../sigNoz.schemas/getQuickFilters200';
|
||||
|
||||
import type { GetQuickFiltersPathParameters } from '../sigNoz.schemas/getQuickFiltersPathParameters';
|
||||
|
||||
import type { ListQuickFilters200 } from '../sigNoz.schemas/listQuickFilters200';
|
||||
|
||||
import type { QuickfiltertypesUpdatableQuickFiltersDTO } from '../sigNoz.schemas/quickfiltertypesUpdatableQuickFiltersDTO';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
|
||||
import type { UpdateQuickFiltersPathParameters } from '../sigNoz.schemas/updateQuickFiltersPathParameters';
|
||||
import type {
|
||||
GetQuickFilters200,
|
||||
GetQuickFiltersPathParameters,
|
||||
ListQuickFilters200,
|
||||
QuickfiltertypesUpdatableQuickFiltersDTO,
|
||||
RenderErrorResponseDTO,
|
||||
UpdateQuickFiltersPathParameters,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
|
||||
@@ -122,7 +119,7 @@ export function useListQuickFilters<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useListQuickFilters} query
|
||||
* @summary List quick filters
|
||||
*/
|
||||
export const invalidateListQuickFilters = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -223,7 +220,7 @@ export function useGetQuickFilters<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetQuickFilters} query
|
||||
* @summary Get a source's quick filters
|
||||
*/
|
||||
export const invalidateGetQuickFilters = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -256,9 +253,6 @@ export const updateQuickFilters = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getUpdateQuickFiltersMutationKey = () =>
|
||||
['updateQuickFilters'] as const;
|
||||
|
||||
export const getUpdateQuickFiltersMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -266,16 +260,22 @@ export const getUpdateQuickFiltersMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateQuickFilters>>,
|
||||
TError,
|
||||
UpdateQuickFiltersMutationVariables,
|
||||
{
|
||||
pathParams: UpdateQuickFiltersPathParameters;
|
||||
data?: BodyType<QuickfiltertypesUpdatableQuickFiltersDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateQuickFilters>>,
|
||||
TError,
|
||||
UpdateQuickFiltersMutationVariables,
|
||||
{
|
||||
pathParams: UpdateQuickFiltersPathParameters;
|
||||
data?: BodyType<QuickfiltertypesUpdatableQuickFiltersDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getUpdateQuickFiltersMutationKey();
|
||||
const mutationKey = ['updateQuickFilters'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -286,7 +286,10 @@ export const getUpdateQuickFiltersMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateQuickFilters>>,
|
||||
UpdateQuickFiltersMutationVariables
|
||||
{
|
||||
pathParams: UpdateQuickFiltersPathParameters;
|
||||
data?: BodyType<QuickfiltertypesUpdatableQuickFiltersDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -303,10 +306,6 @@ export type UpdateQuickFiltersMutationBody =
|
||||
| BodyType<QuickfiltertypesUpdatableQuickFiltersDTO>
|
||||
| undefined;
|
||||
export type UpdateQuickFiltersMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type UpdateQuickFiltersMutationVariables = {
|
||||
pathParams: UpdateQuickFiltersPathParameters;
|
||||
data?: BodyType<QuickfiltertypesUpdatableQuickFiltersDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Update quick filters
|
||||
@@ -318,13 +317,19 @@ export const useUpdateQuickFilters = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateQuickFilters>>,
|
||||
TError,
|
||||
UpdateQuickFiltersMutationVariables,
|
||||
{
|
||||
pathParams: UpdateQuickFiltersPathParameters;
|
||||
data?: BodyType<QuickfiltertypesUpdatableQuickFiltersDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateQuickFilters>>,
|
||||
TError,
|
||||
UpdateQuickFiltersMutationVariables,
|
||||
{
|
||||
pathParams: UpdateQuickFiltersPathParameters;
|
||||
data?: BodyType<QuickfiltertypesUpdatableQuickFiltersDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getUpdateQuickFiltersMutationOptions(options));
|
||||
|
||||
@@ -17,23 +17,17 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { AuthtypesPostableRoleDTO } from '../sigNoz.schemas/authtypesPostableRoleDTO';
|
||||
|
||||
import type { AuthtypesUpdatableRoleDTO } from '../sigNoz.schemas/authtypesUpdatableRoleDTO';
|
||||
|
||||
import type { CreateRole201 } from '../sigNoz.schemas/createRole201';
|
||||
|
||||
import type { DeleteRolePathParameters } from '../sigNoz.schemas/deleteRolePathParameters';
|
||||
|
||||
import type { GetRole200 } from '../sigNoz.schemas/getRole200';
|
||||
|
||||
import type { GetRolePathParameters } from '../sigNoz.schemas/getRolePathParameters';
|
||||
|
||||
import type { ListRoles200 } from '../sigNoz.schemas/listRoles200';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
|
||||
import type { UpdateRolePathParameters } from '../sigNoz.schemas/updateRolePathParameters';
|
||||
import type {
|
||||
AuthtypesPostableRoleDTO,
|
||||
AuthtypesUpdatableRoleDTO,
|
||||
CreateRole201,
|
||||
DeleteRolePathParameters,
|
||||
GetRole200,
|
||||
GetRolePathParameters,
|
||||
ListRoles200,
|
||||
RenderErrorResponseDTO,
|
||||
UpdateRolePathParameters,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
|
||||
@@ -120,7 +114,7 @@ export function useListRoles<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useListRoles} query
|
||||
* @summary List roles
|
||||
*/
|
||||
export const invalidateListRoles = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -151,8 +145,6 @@ export const createRole = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getCreateRoleMutationKey = () => ['createRole'] as const;
|
||||
|
||||
export const getCreateRoleMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -160,16 +152,16 @@ export const getCreateRoleMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createRole>>,
|
||||
TError,
|
||||
CreateRoleMutationVariables,
|
||||
{ data?: BodyType<AuthtypesPostableRoleDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createRole>>,
|
||||
TError,
|
||||
CreateRoleMutationVariables,
|
||||
{ data?: BodyType<AuthtypesPostableRoleDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getCreateRoleMutationKey();
|
||||
const mutationKey = ['createRole'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -180,7 +172,7 @@ export const getCreateRoleMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof createRole>>,
|
||||
CreateRoleMutationVariables
|
||||
{ data?: BodyType<AuthtypesPostableRoleDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -197,9 +189,6 @@ export type CreateRoleMutationBody =
|
||||
| BodyType<AuthtypesPostableRoleDTO>
|
||||
| undefined;
|
||||
export type CreateRoleMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type CreateRoleMutationVariables = {
|
||||
data?: BodyType<AuthtypesPostableRoleDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Create role
|
||||
@@ -211,13 +200,13 @@ export const useCreateRole = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createRole>>,
|
||||
TError,
|
||||
CreateRoleMutationVariables,
|
||||
{ data?: BodyType<AuthtypesPostableRoleDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createRole>>,
|
||||
TError,
|
||||
CreateRoleMutationVariables,
|
||||
{ data?: BodyType<AuthtypesPostableRoleDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getCreateRoleMutationOptions(options));
|
||||
@@ -237,8 +226,6 @@ export const deleteRole = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getDeleteRoleMutationKey = () => ['deleteRole'] as const;
|
||||
|
||||
export const getDeleteRoleMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -246,16 +233,16 @@ export const getDeleteRoleMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteRole>>,
|
||||
TError,
|
||||
DeleteRoleMutationVariables,
|
||||
{ pathParams: DeleteRolePathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteRole>>,
|
||||
TError,
|
||||
DeleteRoleMutationVariables,
|
||||
{ pathParams: DeleteRolePathParameters },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getDeleteRoleMutationKey();
|
||||
const mutationKey = ['deleteRole'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -266,7 +253,7 @@ export const getDeleteRoleMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof deleteRole>>,
|
||||
DeleteRoleMutationVariables
|
||||
{ pathParams: DeleteRolePathParameters }
|
||||
> = (props) => {
|
||||
const { pathParams } = props ?? {};
|
||||
|
||||
@@ -281,9 +268,6 @@ export type DeleteRoleMutationResult = NonNullable<
|
||||
>;
|
||||
|
||||
export type DeleteRoleMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type DeleteRoleMutationVariables = {
|
||||
pathParams: DeleteRolePathParameters;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Delete role
|
||||
@@ -295,13 +279,13 @@ export const useDeleteRole = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteRole>>,
|
||||
TError,
|
||||
DeleteRoleMutationVariables,
|
||||
{ pathParams: DeleteRolePathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteRole>>,
|
||||
TError,
|
||||
DeleteRoleMutationVariables,
|
||||
{ pathParams: DeleteRolePathParameters },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getDeleteRoleMutationOptions(options));
|
||||
@@ -380,7 +364,7 @@ export function useGetRole<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetRole} query
|
||||
* @summary Get role
|
||||
*/
|
||||
export const invalidateGetRole = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -413,8 +397,6 @@ export const updateRole = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getUpdateRoleMutationKey = () => ['updateRole'] as const;
|
||||
|
||||
export const getUpdateRoleMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -422,16 +404,22 @@ export const getUpdateRoleMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateRole>>,
|
||||
TError,
|
||||
UpdateRoleMutationVariables,
|
||||
{
|
||||
pathParams: UpdateRolePathParameters;
|
||||
data?: BodyType<AuthtypesUpdatableRoleDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateRole>>,
|
||||
TError,
|
||||
UpdateRoleMutationVariables,
|
||||
{
|
||||
pathParams: UpdateRolePathParameters;
|
||||
data?: BodyType<AuthtypesUpdatableRoleDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getUpdateRoleMutationKey();
|
||||
const mutationKey = ['updateRole'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -442,7 +430,10 @@ export const getUpdateRoleMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateRole>>,
|
||||
UpdateRoleMutationVariables
|
||||
{
|
||||
pathParams: UpdateRolePathParameters;
|
||||
data?: BodyType<AuthtypesUpdatableRoleDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -459,10 +450,6 @@ export type UpdateRoleMutationBody =
|
||||
| BodyType<AuthtypesUpdatableRoleDTO>
|
||||
| undefined;
|
||||
export type UpdateRoleMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type UpdateRoleMutationVariables = {
|
||||
pathParams: UpdateRolePathParameters;
|
||||
data?: BodyType<AuthtypesUpdatableRoleDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Update role
|
||||
@@ -474,13 +461,19 @@ export const useUpdateRole = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateRole>>,
|
||||
TError,
|
||||
UpdateRoleMutationVariables,
|
||||
{
|
||||
pathParams: UpdateRolePathParameters;
|
||||
data?: BodyType<AuthtypesUpdatableRoleDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateRole>>,
|
||||
TError,
|
||||
UpdateRoleMutationVariables,
|
||||
{
|
||||
pathParams: UpdateRolePathParameters;
|
||||
data?: BodyType<AuthtypesUpdatableRoleDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getUpdateRoleMutationOptions(options));
|
||||
|
||||
@@ -17,23 +17,17 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { AlertmanagertypesPostableRoutePolicyDTO } from '../sigNoz.schemas/alertmanagertypesPostableRoutePolicyDTO';
|
||||
|
||||
import type { CreateRoutePolicy201 } from '../sigNoz.schemas/createRoutePolicy201';
|
||||
|
||||
import type { DeleteRoutePolicyByIDPathParameters } from '../sigNoz.schemas/deleteRoutePolicyByIDPathParameters';
|
||||
|
||||
import type { GetAllRoutePolicies200 } from '../sigNoz.schemas/getAllRoutePolicies200';
|
||||
|
||||
import type { GetRoutePolicyByID200 } from '../sigNoz.schemas/getRoutePolicyByID200';
|
||||
|
||||
import type { GetRoutePolicyByIDPathParameters } from '../sigNoz.schemas/getRoutePolicyByIDPathParameters';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
|
||||
import type { UpdateRoutePolicy200 } from '../sigNoz.schemas/updateRoutePolicy200';
|
||||
|
||||
import type { UpdateRoutePolicyPathParameters } from '../sigNoz.schemas/updateRoutePolicyPathParameters';
|
||||
import type {
|
||||
AlertmanagertypesPostableRoutePolicyDTO,
|
||||
CreateRoutePolicy201,
|
||||
DeleteRoutePolicyByIDPathParameters,
|
||||
GetAllRoutePolicies200,
|
||||
GetRoutePolicyByID200,
|
||||
GetRoutePolicyByIDPathParameters,
|
||||
RenderErrorResponseDTO,
|
||||
UpdateRoutePolicy200,
|
||||
UpdateRoutePolicyPathParameters,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
|
||||
@@ -128,7 +122,7 @@ export function useGetAllRoutePolicies<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetAllRoutePolicies} query
|
||||
* @summary List route policies
|
||||
*/
|
||||
export const invalidateGetAllRoutePolicies = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -159,9 +153,6 @@ export const createRoutePolicy = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getCreateRoutePolicyMutationKey = () =>
|
||||
['createRoutePolicy'] as const;
|
||||
|
||||
export const getCreateRoutePolicyMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -169,16 +160,16 @@ export const getCreateRoutePolicyMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createRoutePolicy>>,
|
||||
TError,
|
||||
CreateRoutePolicyMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesPostableRoutePolicyDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createRoutePolicy>>,
|
||||
TError,
|
||||
CreateRoutePolicyMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesPostableRoutePolicyDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getCreateRoutePolicyMutationKey();
|
||||
const mutationKey = ['createRoutePolicy'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -189,7 +180,7 @@ export const getCreateRoutePolicyMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof createRoutePolicy>>,
|
||||
CreateRoutePolicyMutationVariables
|
||||
{ data?: BodyType<AlertmanagertypesPostableRoutePolicyDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -206,9 +197,6 @@ export type CreateRoutePolicyMutationBody =
|
||||
| BodyType<AlertmanagertypesPostableRoutePolicyDTO>
|
||||
| undefined;
|
||||
export type CreateRoutePolicyMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type CreateRoutePolicyMutationVariables = {
|
||||
data?: BodyType<AlertmanagertypesPostableRoutePolicyDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Create route policy
|
||||
@@ -220,13 +208,13 @@ export const useCreateRoutePolicy = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createRoutePolicy>>,
|
||||
TError,
|
||||
CreateRoutePolicyMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesPostableRoutePolicyDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createRoutePolicy>>,
|
||||
TError,
|
||||
CreateRoutePolicyMutationVariables,
|
||||
{ data?: BodyType<AlertmanagertypesPostableRoutePolicyDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getCreateRoutePolicyMutationOptions(options));
|
||||
@@ -246,9 +234,6 @@ export const deleteRoutePolicyByID = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getDeleteRoutePolicyByIDMutationKey = () =>
|
||||
['deleteRoutePolicyByID'] as const;
|
||||
|
||||
export const getDeleteRoutePolicyByIDMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -256,16 +241,16 @@ export const getDeleteRoutePolicyByIDMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteRoutePolicyByID>>,
|
||||
TError,
|
||||
DeleteRoutePolicyByIDMutationVariables,
|
||||
{ pathParams: DeleteRoutePolicyByIDPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteRoutePolicyByID>>,
|
||||
TError,
|
||||
DeleteRoutePolicyByIDMutationVariables,
|
||||
{ pathParams: DeleteRoutePolicyByIDPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getDeleteRoutePolicyByIDMutationKey();
|
||||
const mutationKey = ['deleteRoutePolicyByID'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -276,7 +261,7 @@ export const getDeleteRoutePolicyByIDMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof deleteRoutePolicyByID>>,
|
||||
DeleteRoutePolicyByIDMutationVariables
|
||||
{ pathParams: DeleteRoutePolicyByIDPathParameters }
|
||||
> = (props) => {
|
||||
const { pathParams } = props ?? {};
|
||||
|
||||
@@ -292,9 +277,6 @@ export type DeleteRoutePolicyByIDMutationResult = NonNullable<
|
||||
|
||||
export type DeleteRoutePolicyByIDMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type DeleteRoutePolicyByIDMutationVariables = {
|
||||
pathParams: DeleteRoutePolicyByIDPathParameters;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Delete route policy
|
||||
@@ -306,13 +288,13 @@ export const useDeleteRoutePolicyByID = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteRoutePolicyByID>>,
|
||||
TError,
|
||||
DeleteRoutePolicyByIDMutationVariables,
|
||||
{ pathParams: DeleteRoutePolicyByIDPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteRoutePolicyByID>>,
|
||||
TError,
|
||||
DeleteRoutePolicyByIDMutationVariables,
|
||||
{ pathParams: DeleteRoutePolicyByIDPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getDeleteRoutePolicyByIDMutationOptions(options));
|
||||
@@ -404,7 +386,7 @@ export function useGetRoutePolicyByID<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetRoutePolicyByID} query
|
||||
* @summary Get route policy by ID
|
||||
*/
|
||||
export const invalidateGetRoutePolicyByID = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -437,9 +419,6 @@ export const updateRoutePolicy = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getUpdateRoutePolicyMutationKey = () =>
|
||||
['updateRoutePolicy'] as const;
|
||||
|
||||
export const getUpdateRoutePolicyMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -447,16 +426,22 @@ export const getUpdateRoutePolicyMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateRoutePolicy>>,
|
||||
TError,
|
||||
UpdateRoutePolicyMutationVariables,
|
||||
{
|
||||
pathParams: UpdateRoutePolicyPathParameters;
|
||||
data?: BodyType<AlertmanagertypesPostableRoutePolicyDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateRoutePolicy>>,
|
||||
TError,
|
||||
UpdateRoutePolicyMutationVariables,
|
||||
{
|
||||
pathParams: UpdateRoutePolicyPathParameters;
|
||||
data?: BodyType<AlertmanagertypesPostableRoutePolicyDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getUpdateRoutePolicyMutationKey();
|
||||
const mutationKey = ['updateRoutePolicy'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -467,7 +452,10 @@ export const getUpdateRoutePolicyMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateRoutePolicy>>,
|
||||
UpdateRoutePolicyMutationVariables
|
||||
{
|
||||
pathParams: UpdateRoutePolicyPathParameters;
|
||||
data?: BodyType<AlertmanagertypesPostableRoutePolicyDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -484,10 +472,6 @@ export type UpdateRoutePolicyMutationBody =
|
||||
| BodyType<AlertmanagertypesPostableRoutePolicyDTO>
|
||||
| undefined;
|
||||
export type UpdateRoutePolicyMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type UpdateRoutePolicyMutationVariables = {
|
||||
pathParams: UpdateRoutePolicyPathParameters;
|
||||
data?: BodyType<AlertmanagertypesPostableRoutePolicyDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Update route policy
|
||||
@@ -499,13 +483,19 @@ export const useUpdateRoutePolicy = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateRoutePolicy>>,
|
||||
TError,
|
||||
UpdateRoutePolicyMutationVariables,
|
||||
{
|
||||
pathParams: UpdateRoutePolicyPathParameters;
|
||||
data?: BodyType<AlertmanagertypesPostableRoutePolicyDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateRoutePolicy>>,
|
||||
TError,
|
||||
UpdateRoutePolicyMutationVariables,
|
||||
{
|
||||
pathParams: UpdateRoutePolicyPathParameters;
|
||||
data?: BodyType<AlertmanagertypesPostableRoutePolicyDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getUpdateRoutePolicyMutationOptions(options));
|
||||
|
||||
@@ -17,81 +17,46 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { CloneRuleByID201 } from '../sigNoz.schemas/cloneRuleByID201';
|
||||
|
||||
import type { CloneRuleByIDPathParameters } from '../sigNoz.schemas/cloneRuleByIDPathParameters';
|
||||
|
||||
import type { CreateRule201 } from '../sigNoz.schemas/createRule201';
|
||||
|
||||
import type { CreateRuleView201 } from '../sigNoz.schemas/createRuleView201';
|
||||
|
||||
import type { DeleteRuleByIDPathParameters } from '../sigNoz.schemas/deleteRuleByIDPathParameters';
|
||||
|
||||
import type { DeleteRuleViewPathParameters } from '../sigNoz.schemas/deleteRuleViewPathParameters';
|
||||
|
||||
import type { GetRuleByID200 } from '../sigNoz.schemas/getRuleByID200';
|
||||
|
||||
import type { GetRuleByIDPathParameters } from '../sigNoz.schemas/getRuleByIDPathParameters';
|
||||
|
||||
import type { GetRuleHistoryFilterKeys200 } from '../sigNoz.schemas/getRuleHistoryFilterKeys200';
|
||||
|
||||
import type { GetRuleHistoryFilterKeysParams } from '../sigNoz.schemas/getRuleHistoryFilterKeysParams';
|
||||
|
||||
import type { GetRuleHistoryFilterKeysPathParameters } from '../sigNoz.schemas/getRuleHistoryFilterKeysPathParameters';
|
||||
|
||||
import type { GetRuleHistoryFilterValues200 } from '../sigNoz.schemas/getRuleHistoryFilterValues200';
|
||||
|
||||
import type { GetRuleHistoryFilterValuesParams } from '../sigNoz.schemas/getRuleHistoryFilterValuesParams';
|
||||
|
||||
import type { GetRuleHistoryFilterValuesPathParameters } from '../sigNoz.schemas/getRuleHistoryFilterValuesPathParameters';
|
||||
|
||||
import type { GetRuleHistoryOverallStatus200 } from '../sigNoz.schemas/getRuleHistoryOverallStatus200';
|
||||
|
||||
import type { GetRuleHistoryOverallStatusParams } from '../sigNoz.schemas/getRuleHistoryOverallStatusParams';
|
||||
|
||||
import type { GetRuleHistoryOverallStatusPathParameters } from '../sigNoz.schemas/getRuleHistoryOverallStatusPathParameters';
|
||||
|
||||
import type { GetRuleHistoryStats200 } from '../sigNoz.schemas/getRuleHistoryStats200';
|
||||
|
||||
import type { GetRuleHistoryStatsParams } from '../sigNoz.schemas/getRuleHistoryStatsParams';
|
||||
|
||||
import type { GetRuleHistoryStatsPathParameters } from '../sigNoz.schemas/getRuleHistoryStatsPathParameters';
|
||||
|
||||
import type { GetRuleHistoryTimeline200 } from '../sigNoz.schemas/getRuleHistoryTimeline200';
|
||||
|
||||
import type { GetRuleHistoryTimelineParams } from '../sigNoz.schemas/getRuleHistoryTimelineParams';
|
||||
|
||||
import type { GetRuleHistoryTimelinePathParameters } from '../sigNoz.schemas/getRuleHistoryTimelinePathParameters';
|
||||
|
||||
import type { GetRuleHistoryTopContributors200 } from '../sigNoz.schemas/getRuleHistoryTopContributors200';
|
||||
|
||||
import type { GetRuleHistoryTopContributorsParams } from '../sigNoz.schemas/getRuleHistoryTopContributorsParams';
|
||||
|
||||
import type { GetRuleHistoryTopContributorsPathParameters } from '../sigNoz.schemas/getRuleHistoryTopContributorsPathParameters';
|
||||
|
||||
import type { ListRuleViews200 } from '../sigNoz.schemas/listRuleViews200';
|
||||
|
||||
import type { ListRulesV3200 } from '../sigNoz.schemas/listRulesV3200';
|
||||
|
||||
import type { ListRulesV3Params } from '../sigNoz.schemas/listRulesV3Params';
|
||||
|
||||
import type { PatchRuleByID200 } from '../sigNoz.schemas/patchRuleByID200';
|
||||
|
||||
import type { PatchRuleByIDPathParameters } from '../sigNoz.schemas/patchRuleByIDPathParameters';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
|
||||
import type { RuletypesPostableRuleDTO } from '../sigNoz.schemas/ruletypesPostableRuleDTO';
|
||||
|
||||
import type { RuletypesPostableRuleViewDTO } from '../sigNoz.schemas/ruletypesPostableRuleViewDTO';
|
||||
|
||||
import type { TestRule200 } from '../sigNoz.schemas/testRule200';
|
||||
|
||||
import type { UpdateRuleByIDPathParameters } from '../sigNoz.schemas/updateRuleByIDPathParameters';
|
||||
|
||||
import type { UpdateRuleView200 } from '../sigNoz.schemas/updateRuleView200';
|
||||
|
||||
import type { UpdateRuleViewPathParameters } from '../sigNoz.schemas/updateRuleViewPathParameters';
|
||||
import type {
|
||||
CloneRuleByID201,
|
||||
CloneRuleByIDPathParameters,
|
||||
CreateRule201,
|
||||
CreateRuleView201,
|
||||
DeleteRuleByIDPathParameters,
|
||||
DeleteRuleViewPathParameters,
|
||||
GetRuleByID200,
|
||||
GetRuleByIDPathParameters,
|
||||
GetRuleHistoryFilterKeys200,
|
||||
GetRuleHistoryFilterKeysParams,
|
||||
GetRuleHistoryFilterKeysPathParameters,
|
||||
GetRuleHistoryFilterValues200,
|
||||
GetRuleHistoryFilterValuesParams,
|
||||
GetRuleHistoryFilterValuesPathParameters,
|
||||
GetRuleHistoryOverallStatus200,
|
||||
GetRuleHistoryOverallStatusParams,
|
||||
GetRuleHistoryOverallStatusPathParameters,
|
||||
GetRuleHistoryStats200,
|
||||
GetRuleHistoryStatsParams,
|
||||
GetRuleHistoryStatsPathParameters,
|
||||
GetRuleHistoryTimeline200,
|
||||
GetRuleHistoryTimelineParams,
|
||||
GetRuleHistoryTimelinePathParameters,
|
||||
GetRuleHistoryTopContributors200,
|
||||
GetRuleHistoryTopContributorsParams,
|
||||
GetRuleHistoryTopContributorsPathParameters,
|
||||
ListRuleViews200,
|
||||
ListRulesV3200,
|
||||
ListRulesV3Params,
|
||||
PatchRuleByID200,
|
||||
PatchRuleByIDPathParameters,
|
||||
RenderErrorResponseDTO,
|
||||
RuletypesPostableRuleDTO,
|
||||
RuletypesPostableRuleViewDTO,
|
||||
TestRule200,
|
||||
UpdateRuleByIDPathParameters,
|
||||
UpdateRuleView200,
|
||||
UpdateRuleViewPathParameters,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
|
||||
@@ -186,7 +151,7 @@ export function useListRuleViews<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useListRuleViews} query
|
||||
* @summary List rule saved views
|
||||
*/
|
||||
export const invalidateListRuleViews = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -217,8 +182,6 @@ export const createRuleView = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getCreateRuleViewMutationKey = () => ['createRuleView'] as const;
|
||||
|
||||
export const getCreateRuleViewMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -226,16 +189,16 @@ export const getCreateRuleViewMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createRuleView>>,
|
||||
TError,
|
||||
CreateRuleViewMutationVariables,
|
||||
{ data?: BodyType<RuletypesPostableRuleViewDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createRuleView>>,
|
||||
TError,
|
||||
CreateRuleViewMutationVariables,
|
||||
{ data?: BodyType<RuletypesPostableRuleViewDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getCreateRuleViewMutationKey();
|
||||
const mutationKey = ['createRuleView'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -246,7 +209,7 @@ export const getCreateRuleViewMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof createRuleView>>,
|
||||
CreateRuleViewMutationVariables
|
||||
{ data?: BodyType<RuletypesPostableRuleViewDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -263,9 +226,6 @@ export type CreateRuleViewMutationBody =
|
||||
| BodyType<RuletypesPostableRuleViewDTO>
|
||||
| undefined;
|
||||
export type CreateRuleViewMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type CreateRuleViewMutationVariables = {
|
||||
data?: BodyType<RuletypesPostableRuleViewDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Create rule saved view
|
||||
@@ -277,13 +237,13 @@ export const useCreateRuleView = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createRuleView>>,
|
||||
TError,
|
||||
CreateRuleViewMutationVariables,
|
||||
{ data?: BodyType<RuletypesPostableRuleViewDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createRuleView>>,
|
||||
TError,
|
||||
CreateRuleViewMutationVariables,
|
||||
{ data?: BodyType<RuletypesPostableRuleViewDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getCreateRuleViewMutationOptions(options));
|
||||
@@ -303,8 +263,6 @@ export const deleteRuleView = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getDeleteRuleViewMutationKey = () => ['deleteRuleView'] as const;
|
||||
|
||||
export const getDeleteRuleViewMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -312,16 +270,16 @@ export const getDeleteRuleViewMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteRuleView>>,
|
||||
TError,
|
||||
DeleteRuleViewMutationVariables,
|
||||
{ pathParams: DeleteRuleViewPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteRuleView>>,
|
||||
TError,
|
||||
DeleteRuleViewMutationVariables,
|
||||
{ pathParams: DeleteRuleViewPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getDeleteRuleViewMutationKey();
|
||||
const mutationKey = ['deleteRuleView'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -332,7 +290,7 @@ export const getDeleteRuleViewMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof deleteRuleView>>,
|
||||
DeleteRuleViewMutationVariables
|
||||
{ pathParams: DeleteRuleViewPathParameters }
|
||||
> = (props) => {
|
||||
const { pathParams } = props ?? {};
|
||||
|
||||
@@ -347,9 +305,6 @@ export type DeleteRuleViewMutationResult = NonNullable<
|
||||
>;
|
||||
|
||||
export type DeleteRuleViewMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type DeleteRuleViewMutationVariables = {
|
||||
pathParams: DeleteRuleViewPathParameters;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Delete rule saved view
|
||||
@@ -361,13 +316,13 @@ export const useDeleteRuleView = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteRuleView>>,
|
||||
TError,
|
||||
DeleteRuleViewMutationVariables,
|
||||
{ pathParams: DeleteRuleViewPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteRuleView>>,
|
||||
TError,
|
||||
DeleteRuleViewMutationVariables,
|
||||
{ pathParams: DeleteRuleViewPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getDeleteRuleViewMutationOptions(options));
|
||||
@@ -390,8 +345,6 @@ export const updateRuleView = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getUpdateRuleViewMutationKey = () => ['updateRuleView'] as const;
|
||||
|
||||
export const getUpdateRuleViewMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -399,16 +352,22 @@ export const getUpdateRuleViewMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateRuleView>>,
|
||||
TError,
|
||||
UpdateRuleViewMutationVariables,
|
||||
{
|
||||
pathParams: UpdateRuleViewPathParameters;
|
||||
data?: BodyType<RuletypesPostableRuleViewDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateRuleView>>,
|
||||
TError,
|
||||
UpdateRuleViewMutationVariables,
|
||||
{
|
||||
pathParams: UpdateRuleViewPathParameters;
|
||||
data?: BodyType<RuletypesPostableRuleViewDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getUpdateRuleViewMutationKey();
|
||||
const mutationKey = ['updateRuleView'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -419,7 +378,10 @@ export const getUpdateRuleViewMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateRuleView>>,
|
||||
UpdateRuleViewMutationVariables
|
||||
{
|
||||
pathParams: UpdateRuleViewPathParameters;
|
||||
data?: BodyType<RuletypesPostableRuleViewDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -436,10 +398,6 @@ export type UpdateRuleViewMutationBody =
|
||||
| BodyType<RuletypesPostableRuleViewDTO>
|
||||
| undefined;
|
||||
export type UpdateRuleViewMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type UpdateRuleViewMutationVariables = {
|
||||
pathParams: UpdateRuleViewPathParameters;
|
||||
data?: BodyType<RuletypesPostableRuleViewDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Update rule saved view
|
||||
@@ -451,13 +409,19 @@ export const useUpdateRuleView = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateRuleView>>,
|
||||
TError,
|
||||
UpdateRuleViewMutationVariables,
|
||||
{
|
||||
pathParams: UpdateRuleViewPathParameters;
|
||||
data?: BodyType<RuletypesPostableRuleViewDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateRuleView>>,
|
||||
TError,
|
||||
UpdateRuleViewMutationVariables,
|
||||
{
|
||||
pathParams: UpdateRuleViewPathParameters;
|
||||
data?: BodyType<RuletypesPostableRuleViewDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getUpdateRuleViewMutationOptions(options));
|
||||
@@ -479,8 +443,6 @@ export const createRule = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getCreateRuleMutationKey = () => ['createRule'] as const;
|
||||
|
||||
export const getCreateRuleMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -488,16 +450,16 @@ export const getCreateRuleMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createRule>>,
|
||||
TError,
|
||||
CreateRuleMutationVariables,
|
||||
{ data?: BodyType<RuletypesPostableRuleDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createRule>>,
|
||||
TError,
|
||||
CreateRuleMutationVariables,
|
||||
{ data?: BodyType<RuletypesPostableRuleDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getCreateRuleMutationKey();
|
||||
const mutationKey = ['createRule'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -508,7 +470,7 @@ export const getCreateRuleMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof createRule>>,
|
||||
CreateRuleMutationVariables
|
||||
{ data?: BodyType<RuletypesPostableRuleDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -525,9 +487,6 @@ export type CreateRuleMutationBody =
|
||||
| BodyType<RuletypesPostableRuleDTO>
|
||||
| undefined;
|
||||
export type CreateRuleMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type CreateRuleMutationVariables = {
|
||||
data?: BodyType<RuletypesPostableRuleDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Create alert rule
|
||||
@@ -539,13 +498,13 @@ export const useCreateRule = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createRule>>,
|
||||
TError,
|
||||
CreateRuleMutationVariables,
|
||||
{ data?: BodyType<RuletypesPostableRuleDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createRule>>,
|
||||
TError,
|
||||
CreateRuleMutationVariables,
|
||||
{ data?: BodyType<RuletypesPostableRuleDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getCreateRuleMutationOptions(options));
|
||||
@@ -565,8 +524,6 @@ export const deleteRuleByID = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getDeleteRuleByIDMutationKey = () => ['deleteRuleByID'] as const;
|
||||
|
||||
export const getDeleteRuleByIDMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -574,16 +531,16 @@ export const getDeleteRuleByIDMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteRuleByID>>,
|
||||
TError,
|
||||
DeleteRuleByIDMutationVariables,
|
||||
{ pathParams: DeleteRuleByIDPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteRuleByID>>,
|
||||
TError,
|
||||
DeleteRuleByIDMutationVariables,
|
||||
{ pathParams: DeleteRuleByIDPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getDeleteRuleByIDMutationKey();
|
||||
const mutationKey = ['deleteRuleByID'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -594,7 +551,7 @@ export const getDeleteRuleByIDMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof deleteRuleByID>>,
|
||||
DeleteRuleByIDMutationVariables
|
||||
{ pathParams: DeleteRuleByIDPathParameters }
|
||||
> = (props) => {
|
||||
const { pathParams } = props ?? {};
|
||||
|
||||
@@ -609,9 +566,6 @@ export type DeleteRuleByIDMutationResult = NonNullable<
|
||||
>;
|
||||
|
||||
export type DeleteRuleByIDMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type DeleteRuleByIDMutationVariables = {
|
||||
pathParams: DeleteRuleByIDPathParameters;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Delete alert rule
|
||||
@@ -623,13 +577,13 @@ export const useDeleteRuleByID = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteRuleByID>>,
|
||||
TError,
|
||||
DeleteRuleByIDMutationVariables,
|
||||
{ pathParams: DeleteRuleByIDPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteRuleByID>>,
|
||||
TError,
|
||||
DeleteRuleByIDMutationVariables,
|
||||
{ pathParams: DeleteRuleByIDPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getDeleteRuleByIDMutationOptions(options));
|
||||
@@ -718,7 +672,7 @@ export function useGetRuleByID<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetRuleByID} query
|
||||
* @summary Get alert rule by ID
|
||||
*/
|
||||
export const invalidateGetRuleByID = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -751,8 +705,6 @@ export const patchRuleByID = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getPatchRuleByIDMutationKey = () => ['patchRuleByID'] as const;
|
||||
|
||||
export const getPatchRuleByIDMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -760,16 +712,22 @@ export const getPatchRuleByIDMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof patchRuleByID>>,
|
||||
TError,
|
||||
PatchRuleByIDMutationVariables,
|
||||
{
|
||||
pathParams: PatchRuleByIDPathParameters;
|
||||
data?: BodyType<RuletypesPostableRuleDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof patchRuleByID>>,
|
||||
TError,
|
||||
PatchRuleByIDMutationVariables,
|
||||
{
|
||||
pathParams: PatchRuleByIDPathParameters;
|
||||
data?: BodyType<RuletypesPostableRuleDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getPatchRuleByIDMutationKey();
|
||||
const mutationKey = ['patchRuleByID'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -780,7 +738,10 @@ export const getPatchRuleByIDMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof patchRuleByID>>,
|
||||
PatchRuleByIDMutationVariables
|
||||
{
|
||||
pathParams: PatchRuleByIDPathParameters;
|
||||
data?: BodyType<RuletypesPostableRuleDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -797,10 +758,6 @@ export type PatchRuleByIDMutationBody =
|
||||
| BodyType<RuletypesPostableRuleDTO>
|
||||
| undefined;
|
||||
export type PatchRuleByIDMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type PatchRuleByIDMutationVariables = {
|
||||
pathParams: PatchRuleByIDPathParameters;
|
||||
data?: BodyType<RuletypesPostableRuleDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Patch alert rule
|
||||
@@ -812,13 +769,19 @@ export const usePatchRuleByID = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof patchRuleByID>>,
|
||||
TError,
|
||||
PatchRuleByIDMutationVariables,
|
||||
{
|
||||
pathParams: PatchRuleByIDPathParameters;
|
||||
data?: BodyType<RuletypesPostableRuleDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof patchRuleByID>>,
|
||||
TError,
|
||||
PatchRuleByIDMutationVariables,
|
||||
{
|
||||
pathParams: PatchRuleByIDPathParameters;
|
||||
data?: BodyType<RuletypesPostableRuleDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getPatchRuleByIDMutationOptions(options));
|
||||
@@ -841,8 +804,6 @@ export const updateRuleByID = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getUpdateRuleByIDMutationKey = () => ['updateRuleByID'] as const;
|
||||
|
||||
export const getUpdateRuleByIDMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -850,16 +811,22 @@ export const getUpdateRuleByIDMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateRuleByID>>,
|
||||
TError,
|
||||
UpdateRuleByIDMutationVariables,
|
||||
{
|
||||
pathParams: UpdateRuleByIDPathParameters;
|
||||
data?: BodyType<RuletypesPostableRuleDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateRuleByID>>,
|
||||
TError,
|
||||
UpdateRuleByIDMutationVariables,
|
||||
{
|
||||
pathParams: UpdateRuleByIDPathParameters;
|
||||
data?: BodyType<RuletypesPostableRuleDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getUpdateRuleByIDMutationKey();
|
||||
const mutationKey = ['updateRuleByID'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -870,7 +837,10 @@ export const getUpdateRuleByIDMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateRuleByID>>,
|
||||
UpdateRuleByIDMutationVariables
|
||||
{
|
||||
pathParams: UpdateRuleByIDPathParameters;
|
||||
data?: BodyType<RuletypesPostableRuleDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -887,10 +857,6 @@ export type UpdateRuleByIDMutationBody =
|
||||
| BodyType<RuletypesPostableRuleDTO>
|
||||
| undefined;
|
||||
export type UpdateRuleByIDMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type UpdateRuleByIDMutationVariables = {
|
||||
pathParams: UpdateRuleByIDPathParameters;
|
||||
data?: BodyType<RuletypesPostableRuleDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Update alert rule
|
||||
@@ -902,13 +868,19 @@ export const useUpdateRuleByID = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateRuleByID>>,
|
||||
TError,
|
||||
UpdateRuleByIDMutationVariables,
|
||||
{
|
||||
pathParams: UpdateRuleByIDPathParameters;
|
||||
data?: BodyType<RuletypesPostableRuleDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateRuleByID>>,
|
||||
TError,
|
||||
UpdateRuleByIDMutationVariables,
|
||||
{
|
||||
pathParams: UpdateRuleByIDPathParameters;
|
||||
data?: BodyType<RuletypesPostableRuleDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getUpdateRuleByIDMutationOptions(options));
|
||||
@@ -928,8 +900,6 @@ export const cloneRuleByID = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getCloneRuleByIDMutationKey = () => ['cloneRuleByID'] as const;
|
||||
|
||||
export const getCloneRuleByIDMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -937,16 +907,16 @@ export const getCloneRuleByIDMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof cloneRuleByID>>,
|
||||
TError,
|
||||
CloneRuleByIDMutationVariables,
|
||||
{ pathParams: CloneRuleByIDPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof cloneRuleByID>>,
|
||||
TError,
|
||||
CloneRuleByIDMutationVariables,
|
||||
{ pathParams: CloneRuleByIDPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getCloneRuleByIDMutationKey();
|
||||
const mutationKey = ['cloneRuleByID'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -957,7 +927,7 @@ export const getCloneRuleByIDMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof cloneRuleByID>>,
|
||||
CloneRuleByIDMutationVariables
|
||||
{ pathParams: CloneRuleByIDPathParameters }
|
||||
> = (props) => {
|
||||
const { pathParams } = props ?? {};
|
||||
|
||||
@@ -972,9 +942,6 @@ export type CloneRuleByIDMutationResult = NonNullable<
|
||||
>;
|
||||
|
||||
export type CloneRuleByIDMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type CloneRuleByIDMutationVariables = {
|
||||
pathParams: CloneRuleByIDPathParameters;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Clone alert rule
|
||||
@@ -986,13 +953,13 @@ export const useCloneRuleByID = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof cloneRuleByID>>,
|
||||
TError,
|
||||
CloneRuleByIDMutationVariables,
|
||||
{ pathParams: CloneRuleByIDPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof cloneRuleByID>>,
|
||||
TError,
|
||||
CloneRuleByIDMutationVariables,
|
||||
{ pathParams: CloneRuleByIDPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getCloneRuleByIDMutationOptions(options));
|
||||
@@ -1097,7 +1064,7 @@ export function useGetRuleHistoryFilterKeys<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetRuleHistoryFilterKeys} query
|
||||
* @summary Get rule history filter keys
|
||||
*/
|
||||
export const invalidateGetRuleHistoryFilterKeys = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -1214,7 +1181,7 @@ export function useGetRuleHistoryFilterValues<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetRuleHistoryFilterValues} query
|
||||
* @summary Get rule history filter values
|
||||
*/
|
||||
export const invalidateGetRuleHistoryFilterValues = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -1331,7 +1298,7 @@ export function useGetRuleHistoryOverallStatus<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetRuleHistoryOverallStatus} query
|
||||
* @summary Get rule overall status timeline
|
||||
*/
|
||||
export const invalidateGetRuleHistoryOverallStatus = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -1446,7 +1413,7 @@ export function useGetRuleHistoryStats<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetRuleHistoryStats} query
|
||||
* @summary Get rule history stats
|
||||
*/
|
||||
export const invalidateGetRuleHistoryStats = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -1562,7 +1529,7 @@ export function useGetRuleHistoryTimeline<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetRuleHistoryTimeline} query
|
||||
* @summary Get rule history timeline
|
||||
*/
|
||||
export const invalidateGetRuleHistoryTimeline = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -1679,7 +1646,7 @@ export function useGetRuleHistoryTopContributors<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetRuleHistoryTopContributors} query
|
||||
* @summary Get top contributors to rule firing
|
||||
*/
|
||||
export const invalidateGetRuleHistoryTopContributors = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -1712,8 +1679,6 @@ export const testRule = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getTestRuleMutationKey = () => ['testRule'] as const;
|
||||
|
||||
export const getTestRuleMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -1721,16 +1686,16 @@ export const getTestRuleMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof testRule>>,
|
||||
TError,
|
||||
TestRuleMutationVariables,
|
||||
{ data?: BodyType<RuletypesPostableRuleDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof testRule>>,
|
||||
TError,
|
||||
TestRuleMutationVariables,
|
||||
{ data?: BodyType<RuletypesPostableRuleDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getTestRuleMutationKey();
|
||||
const mutationKey = ['testRule'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -1741,7 +1706,7 @@ export const getTestRuleMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof testRule>>,
|
||||
TestRuleMutationVariables
|
||||
{ data?: BodyType<RuletypesPostableRuleDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -1758,9 +1723,6 @@ export type TestRuleMutationBody =
|
||||
| BodyType<RuletypesPostableRuleDTO>
|
||||
| undefined;
|
||||
export type TestRuleMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type TestRuleMutationVariables = {
|
||||
data?: BodyType<RuletypesPostableRuleDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Test alert rule
|
||||
@@ -1772,19 +1734,19 @@ export const useTestRule = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof testRule>>,
|
||||
TError,
|
||||
TestRuleMutationVariables,
|
||||
{ data?: BodyType<RuletypesPostableRuleDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof testRule>>,
|
||||
TError,
|
||||
TestRuleMutationVariables,
|
||||
{ data?: BodyType<RuletypesPostableRuleDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getTestRuleMutationOptions(options));
|
||||
};
|
||||
/**
|
||||
* 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.
|
||||
* 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.
|
||||
* @summary List alert rules (v3)
|
||||
*/
|
||||
export const listRulesV3 = (
|
||||
@@ -1863,7 +1825,7 @@ export function useListRulesV3<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useListRulesV3} query
|
||||
* @summary List alert rules (v3)
|
||||
*/
|
||||
export const invalidateListRulesV3 = async (
|
||||
queryClient: QueryClient,
|
||||
|
||||
@@ -17,25 +17,18 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { CreateSavedView201 } from '../sigNoz.schemas/createSavedView201';
|
||||
|
||||
import type { DeleteSavedViewPathParameters } from '../sigNoz.schemas/deleteSavedViewPathParameters';
|
||||
|
||||
import type { GetSavedView200 } from '../sigNoz.schemas/getSavedView200';
|
||||
|
||||
import type { GetSavedViewPathParameters } from '../sigNoz.schemas/getSavedViewPathParameters';
|
||||
|
||||
import type { ListSavedViews200 } from '../sigNoz.schemas/listSavedViews200';
|
||||
|
||||
import type { ListSavedViewsParams } from '../sigNoz.schemas/listSavedViewsParams';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
|
||||
import type { SavedviewtypesPostableSavedViewDTO } from '../sigNoz.schemas/savedviewtypesPostableSavedViewDTO';
|
||||
|
||||
import type { SavedviewtypesUpdatableSavedViewDTO } from '../sigNoz.schemas/savedviewtypesUpdatableSavedViewDTO';
|
||||
|
||||
import type { UpdateSavedViewPathParameters } from '../sigNoz.schemas/updateSavedViewPathParameters';
|
||||
import type {
|
||||
CreateSavedView201,
|
||||
DeleteSavedViewPathParameters,
|
||||
GetSavedView200,
|
||||
GetSavedViewPathParameters,
|
||||
ListSavedViews200,
|
||||
ListSavedViewsParams,
|
||||
RenderErrorResponseDTO,
|
||||
SavedviewtypesPostableSavedViewDTO,
|
||||
SavedviewtypesUpdatableSavedViewDTO,
|
||||
UpdateSavedViewPathParameters,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
|
||||
@@ -140,7 +133,7 @@ export function useListSavedViews<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useListSavedViews} query
|
||||
* @summary List saved views
|
||||
*/
|
||||
export const invalidateListSavedViews = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -172,8 +165,6 @@ export const createSavedView = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getCreateSavedViewMutationKey = () => ['createSavedView'] as const;
|
||||
|
||||
export const getCreateSavedViewMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -181,16 +172,16 @@ export const getCreateSavedViewMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createSavedView>>,
|
||||
TError,
|
||||
CreateSavedViewMutationVariables,
|
||||
{ data?: BodyType<SavedviewtypesPostableSavedViewDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createSavedView>>,
|
||||
TError,
|
||||
CreateSavedViewMutationVariables,
|
||||
{ data?: BodyType<SavedviewtypesPostableSavedViewDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getCreateSavedViewMutationKey();
|
||||
const mutationKey = ['createSavedView'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -201,7 +192,7 @@ export const getCreateSavedViewMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof createSavedView>>,
|
||||
CreateSavedViewMutationVariables
|
||||
{ data?: BodyType<SavedviewtypesPostableSavedViewDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -218,9 +209,6 @@ export type CreateSavedViewMutationBody =
|
||||
| BodyType<SavedviewtypesPostableSavedViewDTO>
|
||||
| undefined;
|
||||
export type CreateSavedViewMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type CreateSavedViewMutationVariables = {
|
||||
data?: BodyType<SavedviewtypesPostableSavedViewDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Create saved view
|
||||
@@ -232,13 +220,13 @@ export const useCreateSavedView = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createSavedView>>,
|
||||
TError,
|
||||
CreateSavedViewMutationVariables,
|
||||
{ data?: BodyType<SavedviewtypesPostableSavedViewDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createSavedView>>,
|
||||
TError,
|
||||
CreateSavedViewMutationVariables,
|
||||
{ data?: BodyType<SavedviewtypesPostableSavedViewDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getCreateSavedViewMutationOptions(options));
|
||||
@@ -258,8 +246,6 @@ export const deleteSavedView = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getDeleteSavedViewMutationKey = () => ['deleteSavedView'] as const;
|
||||
|
||||
export const getDeleteSavedViewMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -267,16 +253,16 @@ export const getDeleteSavedViewMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteSavedView>>,
|
||||
TError,
|
||||
DeleteSavedViewMutationVariables,
|
||||
{ pathParams: DeleteSavedViewPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteSavedView>>,
|
||||
TError,
|
||||
DeleteSavedViewMutationVariables,
|
||||
{ pathParams: DeleteSavedViewPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getDeleteSavedViewMutationKey();
|
||||
const mutationKey = ['deleteSavedView'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -287,7 +273,7 @@ export const getDeleteSavedViewMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof deleteSavedView>>,
|
||||
DeleteSavedViewMutationVariables
|
||||
{ pathParams: DeleteSavedViewPathParameters }
|
||||
> = (props) => {
|
||||
const { pathParams } = props ?? {};
|
||||
|
||||
@@ -302,9 +288,6 @@ export type DeleteSavedViewMutationResult = NonNullable<
|
||||
>;
|
||||
|
||||
export type DeleteSavedViewMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type DeleteSavedViewMutationVariables = {
|
||||
pathParams: DeleteSavedViewPathParameters;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Delete saved view
|
||||
@@ -316,13 +299,13 @@ export const useDeleteSavedView = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteSavedView>>,
|
||||
TError,
|
||||
DeleteSavedViewMutationVariables,
|
||||
{ pathParams: DeleteSavedViewPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteSavedView>>,
|
||||
TError,
|
||||
DeleteSavedViewMutationVariables,
|
||||
{ pathParams: DeleteSavedViewPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getDeleteSavedViewMutationOptions(options));
|
||||
@@ -411,7 +394,7 @@ export function useGetSavedView<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetSavedView} query
|
||||
* @summary Get saved view
|
||||
*/
|
||||
export const invalidateGetSavedView = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -444,8 +427,6 @@ export const updateSavedView = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getUpdateSavedViewMutationKey = () => ['updateSavedView'] as const;
|
||||
|
||||
export const getUpdateSavedViewMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -453,16 +434,22 @@ export const getUpdateSavedViewMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateSavedView>>,
|
||||
TError,
|
||||
UpdateSavedViewMutationVariables,
|
||||
{
|
||||
pathParams: UpdateSavedViewPathParameters;
|
||||
data?: BodyType<SavedviewtypesUpdatableSavedViewDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateSavedView>>,
|
||||
TError,
|
||||
UpdateSavedViewMutationVariables,
|
||||
{
|
||||
pathParams: UpdateSavedViewPathParameters;
|
||||
data?: BodyType<SavedviewtypesUpdatableSavedViewDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getUpdateSavedViewMutationKey();
|
||||
const mutationKey = ['updateSavedView'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -473,7 +460,10 @@ export const getUpdateSavedViewMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateSavedView>>,
|
||||
UpdateSavedViewMutationVariables
|
||||
{
|
||||
pathParams: UpdateSavedViewPathParameters;
|
||||
data?: BodyType<SavedviewtypesUpdatableSavedViewDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -490,10 +480,6 @@ export type UpdateSavedViewMutationBody =
|
||||
| BodyType<SavedviewtypesUpdatableSavedViewDTO>
|
||||
| undefined;
|
||||
export type UpdateSavedViewMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type UpdateSavedViewMutationVariables = {
|
||||
pathParams: UpdateSavedViewPathParameters;
|
||||
data?: BodyType<SavedviewtypesUpdatableSavedViewDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Update saved view
|
||||
@@ -505,13 +491,19 @@ export const useUpdateSavedView = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateSavedView>>,
|
||||
TError,
|
||||
UpdateSavedViewMutationVariables,
|
||||
{
|
||||
pathParams: UpdateSavedViewPathParameters;
|
||||
data?: BodyType<SavedviewtypesUpdatableSavedViewDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateSavedView>>,
|
||||
TError,
|
||||
UpdateSavedViewMutationVariables,
|
||||
{
|
||||
pathParams: UpdateSavedViewPathParameters;
|
||||
data?: BodyType<SavedviewtypesUpdatableSavedViewDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getUpdateSavedViewMutationOptions(options));
|
||||
|
||||
@@ -17,55 +17,32 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { CreateServiceAccount201 } from '../sigNoz.schemas/createServiceAccount201';
|
||||
|
||||
import type { CreateServiceAccountKey201 } from '../sigNoz.schemas/createServiceAccountKey201';
|
||||
|
||||
import type { CreateServiceAccountKeyPathParameters } from '../sigNoz.schemas/createServiceAccountKeyPathParameters';
|
||||
|
||||
import type { CreateServiceAccountRole201 } from '../sigNoz.schemas/createServiceAccountRole201';
|
||||
|
||||
import type { DeleteServiceAccountPathParameters } from '../sigNoz.schemas/deleteServiceAccountPathParameters';
|
||||
|
||||
import type { DeleteServiceAccountRolePathParameters } from '../sigNoz.schemas/deleteServiceAccountRolePathParameters';
|
||||
|
||||
import type { GetMyServiceAccount200 } from '../sigNoz.schemas/getMyServiceAccount200';
|
||||
|
||||
import type { GetServiceAccount200 } from '../sigNoz.schemas/getServiceAccount200';
|
||||
|
||||
import type { GetServiceAccountPathParameters } from '../sigNoz.schemas/getServiceAccountPathParameters';
|
||||
|
||||
import type { GetServiceAccountRole200 } from '../sigNoz.schemas/getServiceAccountRole200';
|
||||
|
||||
import type { GetServiceAccountRolePathParameters } from '../sigNoz.schemas/getServiceAccountRolePathParameters';
|
||||
|
||||
import type { GetServiceAccountRoles200 } from '../sigNoz.schemas/getServiceAccountRoles200';
|
||||
|
||||
import type { GetServiceAccountRolesPathParameters } from '../sigNoz.schemas/getServiceAccountRolesPathParameters';
|
||||
|
||||
import type { ListServiceAccountKeys200 } from '../sigNoz.schemas/listServiceAccountKeys200';
|
||||
|
||||
import type { ListServiceAccountKeysPathParameters } from '../sigNoz.schemas/listServiceAccountKeysPathParameters';
|
||||
|
||||
import type { ListServiceAccounts200 } from '../sigNoz.schemas/listServiceAccounts200';
|
||||
|
||||
import type { ListServiceAccountsParams } from '../sigNoz.schemas/listServiceAccountsParams';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
|
||||
import type { RevokeServiceAccountKeyPathParameters } from '../sigNoz.schemas/revokeServiceAccountKeyPathParameters';
|
||||
|
||||
import type { ServiceaccounttypesPostableFactorAPIKeyDTO } from '../sigNoz.schemas/serviceaccounttypesPostableFactorAPIKeyDTO';
|
||||
|
||||
import type { ServiceaccounttypesPostableServiceAccountDTO } from '../sigNoz.schemas/serviceaccounttypesPostableServiceAccountDTO';
|
||||
|
||||
import type { ServiceaccounttypesPostableServiceAccountRoleDTO } from '../sigNoz.schemas/serviceaccounttypesPostableServiceAccountRoleDTO';
|
||||
|
||||
import type { ServiceaccounttypesUpdatableFactorAPIKeyDTO } from '../sigNoz.schemas/serviceaccounttypesUpdatableFactorAPIKeyDTO';
|
||||
|
||||
import type { UpdateServiceAccountKeyPathParameters } from '../sigNoz.schemas/updateServiceAccountKeyPathParameters';
|
||||
|
||||
import type { UpdateServiceAccountPathParameters } from '../sigNoz.schemas/updateServiceAccountPathParameters';
|
||||
import type {
|
||||
CreateServiceAccount201,
|
||||
CreateServiceAccountKey201,
|
||||
CreateServiceAccountKeyPathParameters,
|
||||
CreateServiceAccountRole201,
|
||||
DeleteServiceAccountPathParameters,
|
||||
DeleteServiceAccountRolePathParameters,
|
||||
GetMyServiceAccount200,
|
||||
GetServiceAccount200,
|
||||
GetServiceAccountPathParameters,
|
||||
GetServiceAccountRole200,
|
||||
GetServiceAccountRolePathParameters,
|
||||
GetServiceAccountRoles200,
|
||||
GetServiceAccountRolesPathParameters,
|
||||
ListServiceAccountKeys200,
|
||||
ListServiceAccountKeysPathParameters,
|
||||
ListServiceAccounts200,
|
||||
RenderErrorResponseDTO,
|
||||
RevokeServiceAccountKeyPathParameters,
|
||||
ServiceaccounttypesPostableFactorAPIKeyDTO,
|
||||
ServiceaccounttypesPostableServiceAccountDTO,
|
||||
ServiceaccounttypesPostableServiceAccountRoleDTO,
|
||||
ServiceaccounttypesUpdatableFactorAPIKeyDTO,
|
||||
UpdateServiceAccountKeyPathParameters,
|
||||
UpdateServiceAccountPathParameters,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
|
||||
@@ -107,9 +84,6 @@ export const createServiceAccountRole = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getCreateServiceAccountRoleMutationKey = () =>
|
||||
['createServiceAccountRole'] as const;
|
||||
|
||||
export const getCreateServiceAccountRoleMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -117,16 +91,16 @@ export const getCreateServiceAccountRoleMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createServiceAccountRole>>,
|
||||
TError,
|
||||
CreateServiceAccountRoleMutationVariables,
|
||||
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountRoleDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createServiceAccountRole>>,
|
||||
TError,
|
||||
CreateServiceAccountRoleMutationVariables,
|
||||
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountRoleDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getCreateServiceAccountRoleMutationKey();
|
||||
const mutationKey = ['createServiceAccountRole'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -137,7 +111,7 @@ export const getCreateServiceAccountRoleMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof createServiceAccountRole>>,
|
||||
CreateServiceAccountRoleMutationVariables
|
||||
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountRoleDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -155,9 +129,6 @@ export type CreateServiceAccountRoleMutationBody =
|
||||
| undefined;
|
||||
export type CreateServiceAccountRoleMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type CreateServiceAccountRoleMutationVariables = {
|
||||
data?: BodyType<ServiceaccounttypesPostableServiceAccountRoleDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Create service account role
|
||||
@@ -169,13 +140,13 @@ export const useCreateServiceAccountRole = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createServiceAccountRole>>,
|
||||
TError,
|
||||
CreateServiceAccountRoleMutationVariables,
|
||||
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountRoleDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createServiceAccountRole>>,
|
||||
TError,
|
||||
CreateServiceAccountRoleMutationVariables,
|
||||
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountRoleDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getCreateServiceAccountRoleMutationOptions(options));
|
||||
@@ -195,9 +166,6 @@ export const deleteServiceAccountRole = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getDeleteServiceAccountRoleMutationKey = () =>
|
||||
['deleteServiceAccountRole'] as const;
|
||||
|
||||
export const getDeleteServiceAccountRoleMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -205,16 +173,16 @@ export const getDeleteServiceAccountRoleMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteServiceAccountRole>>,
|
||||
TError,
|
||||
DeleteServiceAccountRoleMutationVariables,
|
||||
{ pathParams: DeleteServiceAccountRolePathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteServiceAccountRole>>,
|
||||
TError,
|
||||
DeleteServiceAccountRoleMutationVariables,
|
||||
{ pathParams: DeleteServiceAccountRolePathParameters },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getDeleteServiceAccountRoleMutationKey();
|
||||
const mutationKey = ['deleteServiceAccountRole'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -225,7 +193,7 @@ export const getDeleteServiceAccountRoleMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof deleteServiceAccountRole>>,
|
||||
DeleteServiceAccountRoleMutationVariables
|
||||
{ pathParams: DeleteServiceAccountRolePathParameters }
|
||||
> = (props) => {
|
||||
const { pathParams } = props ?? {};
|
||||
|
||||
@@ -241,9 +209,6 @@ export type DeleteServiceAccountRoleMutationResult = NonNullable<
|
||||
|
||||
export type DeleteServiceAccountRoleMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type DeleteServiceAccountRoleMutationVariables = {
|
||||
pathParams: DeleteServiceAccountRolePathParameters;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Delete service account role
|
||||
@@ -255,13 +220,13 @@ export const useDeleteServiceAccountRole = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteServiceAccountRole>>,
|
||||
TError,
|
||||
DeleteServiceAccountRoleMutationVariables,
|
||||
{ pathParams: DeleteServiceAccountRolePathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteServiceAccountRole>>,
|
||||
TError,
|
||||
DeleteServiceAccountRoleMutationVariables,
|
||||
{ pathParams: DeleteServiceAccountRolePathParameters },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getDeleteServiceAccountRoleMutationOptions(options));
|
||||
@@ -353,7 +318,7 @@ export function useGetServiceAccountRole<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetServiceAccountRole} query
|
||||
* @summary Get service account role
|
||||
*/
|
||||
export const invalidateGetServiceAccountRole = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -369,48 +334,38 @@ export const invalidateGetServiceAccountRole = async (
|
||||
};
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* This endpoint lists the service accounts for an organisation
|
||||
* @summary List service accounts
|
||||
*/
|
||||
export const listServiceAccounts = (
|
||||
params?: ListServiceAccountsParams,
|
||||
signal?: AbortSignal,
|
||||
) => {
|
||||
export const listServiceAccounts = (signal?: AbortSignal) => {
|
||||
return GeneratedAPIInstance<ListServiceAccounts200>({
|
||||
url: `/api/v1/service_accounts`,
|
||||
method: 'GET',
|
||||
params,
|
||||
signal,
|
||||
});
|
||||
};
|
||||
|
||||
export const getListServiceAccountsQueryKey = (
|
||||
params?: ListServiceAccountsParams,
|
||||
) => {
|
||||
return [`/api/v1/service_accounts`, ...(params ? [params] : [])] as const;
|
||||
export const getListServiceAccountsQueryKey = () => {
|
||||
return [`/api/v1/service_accounts`] as const;
|
||||
};
|
||||
|
||||
export const getListServiceAccountsQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof listServiceAccounts>>,
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
>(
|
||||
params?: ListServiceAccountsParams,
|
||||
options?: {
|
||||
query?: UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listServiceAccounts>>,
|
||||
TError,
|
||||
TData
|
||||
>;
|
||||
},
|
||||
) => {
|
||||
>(options?: {
|
||||
query?: UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listServiceAccounts>>,
|
||||
TError,
|
||||
TData
|
||||
>;
|
||||
}) => {
|
||||
const { query: queryOptions } = options ?? {};
|
||||
|
||||
const queryKey =
|
||||
queryOptions?.queryKey ?? getListServiceAccountsQueryKey(params);
|
||||
const queryKey = queryOptions?.queryKey ?? getListServiceAccountsQueryKey();
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<ReturnType<typeof listServiceAccounts>>
|
||||
> = ({ signal }) => listServiceAccounts(params, signal);
|
||||
> = ({ signal }) => listServiceAccounts(signal);
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listServiceAccounts>>,
|
||||
@@ -431,17 +386,14 @@ export type ListServiceAccountsQueryError = ErrorType<RenderErrorResponseDTO>;
|
||||
export function useListServiceAccounts<
|
||||
TData = Awaited<ReturnType<typeof listServiceAccounts>>,
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
>(
|
||||
params?: ListServiceAccountsParams,
|
||||
options?: {
|
||||
query?: UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listServiceAccounts>>,
|
||||
TError,
|
||||
TData
|
||||
>;
|
||||
},
|
||||
): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
||||
const queryOptions = getListServiceAccountsQueryOptions(params, options);
|
||||
>(options?: {
|
||||
query?: UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listServiceAccounts>>,
|
||||
TError,
|
||||
TData
|
||||
>;
|
||||
}): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
||||
const queryOptions = getListServiceAccountsQueryOptions(options);
|
||||
|
||||
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
|
||||
queryKey: QueryKey;
|
||||
@@ -451,15 +403,14 @@ export function useListServiceAccounts<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useListServiceAccounts} query
|
||||
* @summary List service accounts
|
||||
*/
|
||||
export const invalidateListServiceAccounts = async (
|
||||
queryClient: QueryClient,
|
||||
params?: ListServiceAccountsParams,
|
||||
options?: InvalidateOptions,
|
||||
): Promise<QueryClient> => {
|
||||
await queryClient.invalidateQueries(
|
||||
{ queryKey: getListServiceAccountsQueryKey(params) },
|
||||
{ queryKey: getListServiceAccountsQueryKey() },
|
||||
options,
|
||||
);
|
||||
|
||||
@@ -483,9 +434,6 @@ export const createServiceAccount = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getCreateServiceAccountMutationKey = () =>
|
||||
['createServiceAccount'] as const;
|
||||
|
||||
export const getCreateServiceAccountMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -493,16 +441,16 @@ export const getCreateServiceAccountMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createServiceAccount>>,
|
||||
TError,
|
||||
CreateServiceAccountMutationVariables,
|
||||
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createServiceAccount>>,
|
||||
TError,
|
||||
CreateServiceAccountMutationVariables,
|
||||
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getCreateServiceAccountMutationKey();
|
||||
const mutationKey = ['createServiceAccount'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -513,7 +461,7 @@ export const getCreateServiceAccountMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof createServiceAccount>>,
|
||||
CreateServiceAccountMutationVariables
|
||||
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -531,9 +479,6 @@ export type CreateServiceAccountMutationBody =
|
||||
| undefined;
|
||||
export type CreateServiceAccountMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type CreateServiceAccountMutationVariables = {
|
||||
data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Create service account
|
||||
@@ -545,13 +490,13 @@ export const useCreateServiceAccount = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createServiceAccount>>,
|
||||
TError,
|
||||
CreateServiceAccountMutationVariables,
|
||||
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createServiceAccount>>,
|
||||
TError,
|
||||
CreateServiceAccountMutationVariables,
|
||||
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getCreateServiceAccountMutationOptions(options));
|
||||
@@ -571,9 +516,6 @@ export const deleteServiceAccount = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getDeleteServiceAccountMutationKey = () =>
|
||||
['deleteServiceAccount'] as const;
|
||||
|
||||
export const getDeleteServiceAccountMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -581,16 +523,16 @@ export const getDeleteServiceAccountMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteServiceAccount>>,
|
||||
TError,
|
||||
DeleteServiceAccountMutationVariables,
|
||||
{ pathParams: DeleteServiceAccountPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteServiceAccount>>,
|
||||
TError,
|
||||
DeleteServiceAccountMutationVariables,
|
||||
{ pathParams: DeleteServiceAccountPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getDeleteServiceAccountMutationKey();
|
||||
const mutationKey = ['deleteServiceAccount'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -601,7 +543,7 @@ export const getDeleteServiceAccountMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof deleteServiceAccount>>,
|
||||
DeleteServiceAccountMutationVariables
|
||||
{ pathParams: DeleteServiceAccountPathParameters }
|
||||
> = (props) => {
|
||||
const { pathParams } = props ?? {};
|
||||
|
||||
@@ -617,9 +559,6 @@ export type DeleteServiceAccountMutationResult = NonNullable<
|
||||
|
||||
export type DeleteServiceAccountMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type DeleteServiceAccountMutationVariables = {
|
||||
pathParams: DeleteServiceAccountPathParameters;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Deletes a service account
|
||||
@@ -631,13 +570,13 @@ export const useDeleteServiceAccount = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteServiceAccount>>,
|
||||
TError,
|
||||
DeleteServiceAccountMutationVariables,
|
||||
{ pathParams: DeleteServiceAccountPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteServiceAccount>>,
|
||||
TError,
|
||||
DeleteServiceAccountMutationVariables,
|
||||
{ pathParams: DeleteServiceAccountPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getDeleteServiceAccountMutationOptions(options));
|
||||
@@ -729,7 +668,7 @@ export function useGetServiceAccount<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetServiceAccount} query
|
||||
* @summary Gets a service account
|
||||
*/
|
||||
export const invalidateGetServiceAccount = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -762,9 +701,6 @@ export const updateServiceAccount = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getUpdateServiceAccountMutationKey = () =>
|
||||
['updateServiceAccount'] as const;
|
||||
|
||||
export const getUpdateServiceAccountMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -772,16 +708,22 @@ export const getUpdateServiceAccountMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateServiceAccount>>,
|
||||
TError,
|
||||
UpdateServiceAccountMutationVariables,
|
||||
{
|
||||
pathParams: UpdateServiceAccountPathParameters;
|
||||
data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateServiceAccount>>,
|
||||
TError,
|
||||
UpdateServiceAccountMutationVariables,
|
||||
{
|
||||
pathParams: UpdateServiceAccountPathParameters;
|
||||
data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getUpdateServiceAccountMutationKey();
|
||||
const mutationKey = ['updateServiceAccount'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -792,7 +734,10 @@ export const getUpdateServiceAccountMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateServiceAccount>>,
|
||||
UpdateServiceAccountMutationVariables
|
||||
{
|
||||
pathParams: UpdateServiceAccountPathParameters;
|
||||
data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -810,10 +755,6 @@ export type UpdateServiceAccountMutationBody =
|
||||
| undefined;
|
||||
export type UpdateServiceAccountMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type UpdateServiceAccountMutationVariables = {
|
||||
pathParams: UpdateServiceAccountPathParameters;
|
||||
data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Updates a service account
|
||||
@@ -825,13 +766,19 @@ export const useUpdateServiceAccount = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateServiceAccount>>,
|
||||
TError,
|
||||
UpdateServiceAccountMutationVariables,
|
||||
{
|
||||
pathParams: UpdateServiceAccountPathParameters;
|
||||
data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateServiceAccount>>,
|
||||
TError,
|
||||
UpdateServiceAccountMutationVariables,
|
||||
{
|
||||
pathParams: UpdateServiceAccountPathParameters;
|
||||
data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getUpdateServiceAccountMutationOptions(options));
|
||||
@@ -924,7 +871,7 @@ export function useListServiceAccountKeys<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useListServiceAccountKeys} query
|
||||
* @summary List service account keys
|
||||
*/
|
||||
export const invalidateListServiceAccountKeys = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -957,9 +904,6 @@ export const createServiceAccountKey = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getCreateServiceAccountKeyMutationKey = () =>
|
||||
['createServiceAccountKey'] as const;
|
||||
|
||||
export const getCreateServiceAccountKeyMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -967,16 +911,22 @@ export const getCreateServiceAccountKeyMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createServiceAccountKey>>,
|
||||
TError,
|
||||
CreateServiceAccountKeyMutationVariables,
|
||||
{
|
||||
pathParams: CreateServiceAccountKeyPathParameters;
|
||||
data?: BodyType<ServiceaccounttypesPostableFactorAPIKeyDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createServiceAccountKey>>,
|
||||
TError,
|
||||
CreateServiceAccountKeyMutationVariables,
|
||||
{
|
||||
pathParams: CreateServiceAccountKeyPathParameters;
|
||||
data?: BodyType<ServiceaccounttypesPostableFactorAPIKeyDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getCreateServiceAccountKeyMutationKey();
|
||||
const mutationKey = ['createServiceAccountKey'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -987,7 +937,10 @@ export const getCreateServiceAccountKeyMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof createServiceAccountKey>>,
|
||||
CreateServiceAccountKeyMutationVariables
|
||||
{
|
||||
pathParams: CreateServiceAccountKeyPathParameters;
|
||||
data?: BodyType<ServiceaccounttypesPostableFactorAPIKeyDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -1005,10 +958,6 @@ export type CreateServiceAccountKeyMutationBody =
|
||||
| undefined;
|
||||
export type CreateServiceAccountKeyMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type CreateServiceAccountKeyMutationVariables = {
|
||||
pathParams: CreateServiceAccountKeyPathParameters;
|
||||
data?: BodyType<ServiceaccounttypesPostableFactorAPIKeyDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Create a service account key
|
||||
@@ -1020,13 +969,19 @@ export const useCreateServiceAccountKey = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createServiceAccountKey>>,
|
||||
TError,
|
||||
CreateServiceAccountKeyMutationVariables,
|
||||
{
|
||||
pathParams: CreateServiceAccountKeyPathParameters;
|
||||
data?: BodyType<ServiceaccounttypesPostableFactorAPIKeyDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createServiceAccountKey>>,
|
||||
TError,
|
||||
CreateServiceAccountKeyMutationVariables,
|
||||
{
|
||||
pathParams: CreateServiceAccountKeyPathParameters;
|
||||
data?: BodyType<ServiceaccounttypesPostableFactorAPIKeyDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getCreateServiceAccountKeyMutationOptions(options));
|
||||
@@ -1046,9 +1001,6 @@ export const revokeServiceAccountKey = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getRevokeServiceAccountKeyMutationKey = () =>
|
||||
['revokeServiceAccountKey'] as const;
|
||||
|
||||
export const getRevokeServiceAccountKeyMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -1056,16 +1008,16 @@ export const getRevokeServiceAccountKeyMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof revokeServiceAccountKey>>,
|
||||
TError,
|
||||
RevokeServiceAccountKeyMutationVariables,
|
||||
{ pathParams: RevokeServiceAccountKeyPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof revokeServiceAccountKey>>,
|
||||
TError,
|
||||
RevokeServiceAccountKeyMutationVariables,
|
||||
{ pathParams: RevokeServiceAccountKeyPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getRevokeServiceAccountKeyMutationKey();
|
||||
const mutationKey = ['revokeServiceAccountKey'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -1076,7 +1028,7 @@ export const getRevokeServiceAccountKeyMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof revokeServiceAccountKey>>,
|
||||
RevokeServiceAccountKeyMutationVariables
|
||||
{ pathParams: RevokeServiceAccountKeyPathParameters }
|
||||
> = (props) => {
|
||||
const { pathParams } = props ?? {};
|
||||
|
||||
@@ -1092,9 +1044,6 @@ export type RevokeServiceAccountKeyMutationResult = NonNullable<
|
||||
|
||||
export type RevokeServiceAccountKeyMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type RevokeServiceAccountKeyMutationVariables = {
|
||||
pathParams: RevokeServiceAccountKeyPathParameters;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Revoke a service account key
|
||||
@@ -1106,13 +1055,13 @@ export const useRevokeServiceAccountKey = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof revokeServiceAccountKey>>,
|
||||
TError,
|
||||
RevokeServiceAccountKeyMutationVariables,
|
||||
{ pathParams: RevokeServiceAccountKeyPathParameters },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof revokeServiceAccountKey>>,
|
||||
TError,
|
||||
RevokeServiceAccountKeyMutationVariables,
|
||||
{ pathParams: RevokeServiceAccountKeyPathParameters },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getRevokeServiceAccountKeyMutationOptions(options));
|
||||
@@ -1135,9 +1084,6 @@ export const updateServiceAccountKey = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getUpdateServiceAccountKeyMutationKey = () =>
|
||||
['updateServiceAccountKey'] as const;
|
||||
|
||||
export const getUpdateServiceAccountKeyMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -1145,16 +1091,22 @@ export const getUpdateServiceAccountKeyMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateServiceAccountKey>>,
|
||||
TError,
|
||||
UpdateServiceAccountKeyMutationVariables,
|
||||
{
|
||||
pathParams: UpdateServiceAccountKeyPathParameters;
|
||||
data?: BodyType<ServiceaccounttypesUpdatableFactorAPIKeyDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateServiceAccountKey>>,
|
||||
TError,
|
||||
UpdateServiceAccountKeyMutationVariables,
|
||||
{
|
||||
pathParams: UpdateServiceAccountKeyPathParameters;
|
||||
data?: BodyType<ServiceaccounttypesUpdatableFactorAPIKeyDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getUpdateServiceAccountKeyMutationKey();
|
||||
const mutationKey = ['updateServiceAccountKey'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -1165,7 +1117,10 @@ export const getUpdateServiceAccountKeyMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateServiceAccountKey>>,
|
||||
UpdateServiceAccountKeyMutationVariables
|
||||
{
|
||||
pathParams: UpdateServiceAccountKeyPathParameters;
|
||||
data?: BodyType<ServiceaccounttypesUpdatableFactorAPIKeyDTO>;
|
||||
}
|
||||
> = (props) => {
|
||||
const { pathParams, data } = props ?? {};
|
||||
|
||||
@@ -1183,10 +1138,6 @@ export type UpdateServiceAccountKeyMutationBody =
|
||||
| undefined;
|
||||
export type UpdateServiceAccountKeyMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type UpdateServiceAccountKeyMutationVariables = {
|
||||
pathParams: UpdateServiceAccountKeyPathParameters;
|
||||
data?: BodyType<ServiceaccounttypesUpdatableFactorAPIKeyDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Updates a service account key
|
||||
@@ -1198,13 +1149,19 @@ export const useUpdateServiceAccountKey = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateServiceAccountKey>>,
|
||||
TError,
|
||||
UpdateServiceAccountKeyMutationVariables,
|
||||
{
|
||||
pathParams: UpdateServiceAccountKeyPathParameters;
|
||||
data?: BodyType<ServiceaccounttypesUpdatableFactorAPIKeyDTO>;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateServiceAccountKey>>,
|
||||
TError,
|
||||
UpdateServiceAccountKeyMutationVariables,
|
||||
{
|
||||
pathParams: UpdateServiceAccountKeyPathParameters;
|
||||
data?: BodyType<ServiceaccounttypesUpdatableFactorAPIKeyDTO>;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getUpdateServiceAccountKeyMutationOptions(options));
|
||||
@@ -1297,7 +1254,7 @@ export function useGetServiceAccountRoles<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetServiceAccountRoles} query
|
||||
* @summary Gets service account roles
|
||||
*/
|
||||
export const invalidateGetServiceAccountRoles = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -1382,7 +1339,7 @@ export function useGetMyServiceAccount<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetMyServiceAccount} query
|
||||
* @summary Gets my service account
|
||||
*/
|
||||
export const invalidateGetMyServiceAccount = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -1413,9 +1370,6 @@ export const updateMyServiceAccount = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getUpdateMyServiceAccountMutationKey = () =>
|
||||
['updateMyServiceAccount'] as const;
|
||||
|
||||
export const getUpdateMyServiceAccountMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -1423,16 +1377,16 @@ export const getUpdateMyServiceAccountMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateMyServiceAccount>>,
|
||||
TError,
|
||||
UpdateMyServiceAccountMutationVariables,
|
||||
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateMyServiceAccount>>,
|
||||
TError,
|
||||
UpdateMyServiceAccountMutationVariables,
|
||||
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getUpdateMyServiceAccountMutationKey();
|
||||
const mutationKey = ['updateMyServiceAccount'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -1443,7 +1397,7 @@ export const getUpdateMyServiceAccountMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateMyServiceAccount>>,
|
||||
UpdateMyServiceAccountMutationVariables
|
||||
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -1461,9 +1415,6 @@ export type UpdateMyServiceAccountMutationBody =
|
||||
| undefined;
|
||||
export type UpdateMyServiceAccountMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type UpdateMyServiceAccountMutationVariables = {
|
||||
data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Updates my service account
|
||||
@@ -1475,13 +1426,13 @@ export const useUpdateMyServiceAccount = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateMyServiceAccount>>,
|
||||
TError,
|
||||
UpdateMyServiceAccountMutationVariables,
|
||||
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateMyServiceAccount>>,
|
||||
TError,
|
||||
UpdateMyServiceAccountMutationVariables,
|
||||
{ data?: BodyType<ServiceaccounttypesPostableServiceAccountDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getUpdateMyServiceAccountMutationOptions(options));
|
||||
|
||||
@@ -17,27 +17,19 @@ import type {
|
||||
UseQueryResult,
|
||||
} from 'react-query';
|
||||
|
||||
import type { AuthtypesPostableEmailPasswordSessionDTO } from '../sigNoz.schemas/authtypesPostableEmailPasswordSessionDTO';
|
||||
|
||||
import type { AuthtypesPostableRotateTokenDTO } from '../sigNoz.schemas/authtypesPostableRotateTokenDTO';
|
||||
|
||||
import type { CreateSessionByEmailPassword200 } from '../sigNoz.schemas/createSessionByEmailPassword200';
|
||||
|
||||
import type { CreateSessionByGoogleCallback303 } from '../sigNoz.schemas/createSessionByGoogleCallback303';
|
||||
|
||||
import type { CreateSessionByOIDCCallback303 } from '../sigNoz.schemas/createSessionByOIDCCallback303';
|
||||
|
||||
import type { CreateSessionBySAMLCallback303 } from '../sigNoz.schemas/createSessionBySAMLCallback303';
|
||||
|
||||
import type { CreateSessionBySAMLCallbackBody } from '../sigNoz.schemas/createSessionBySAMLCallbackBody';
|
||||
|
||||
import type { CreateSessionBySAMLCallbackParams } from '../sigNoz.schemas/createSessionBySAMLCallbackParams';
|
||||
|
||||
import type { GetSessionContext200 } from '../sigNoz.schemas/getSessionContext200';
|
||||
|
||||
import type { RenderErrorResponseDTO } from '../sigNoz.schemas/renderErrorResponseDTO';
|
||||
|
||||
import type { RotateSession200 } from '../sigNoz.schemas/rotateSession200';
|
||||
import type {
|
||||
AuthtypesPostableEmailPasswordSessionDTO,
|
||||
AuthtypesPostableRotateTokenDTO,
|
||||
CreateSessionByEmailPassword200,
|
||||
CreateSessionByGoogleCallback303,
|
||||
CreateSessionByOIDCCallback303,
|
||||
CreateSessionBySAMLCallback303,
|
||||
CreateSessionBySAMLCallbackBody,
|
||||
CreateSessionBySAMLCallbackParams,
|
||||
GetSessionContext200,
|
||||
RenderErrorResponseDTO,
|
||||
RotateSession200,
|
||||
} from '../sigNoz.schemas';
|
||||
|
||||
import { GeneratedAPIInstance } from '../../../generatedAPIInstance';
|
||||
import type { ErrorType, BodyType } from '../../../generatedAPIInstance';
|
||||
@@ -135,7 +127,7 @@ export function useCreateSessionByGoogleCallback<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useCreateSessionByGoogleCallback} query
|
||||
* @summary Create session by google callback
|
||||
*/
|
||||
export const invalidateCreateSessionByGoogleCallback = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -222,7 +214,7 @@ export function useCreateSessionByOIDCCallback<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useCreateSessionByOIDCCallback} query
|
||||
* @summary Create session by oidc callback
|
||||
*/
|
||||
export const invalidateCreateSessionByOIDCCallback = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -269,9 +261,6 @@ export const createSessionBySAMLCallback = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getCreateSessionBySAMLCallbackMutationKey = () =>
|
||||
['createSessionBySAMLCallback'] as const;
|
||||
|
||||
export const getCreateSessionBySAMLCallbackMutationOptions = <
|
||||
TError = ErrorType<CreateSessionBySAMLCallback303 | RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -279,16 +268,22 @@ export const getCreateSessionBySAMLCallbackMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createSessionBySAMLCallback>>,
|
||||
TError,
|
||||
CreateSessionBySAMLCallbackMutationVariables,
|
||||
{
|
||||
data?: BodyType<CreateSessionBySAMLCallbackBody>;
|
||||
params?: CreateSessionBySAMLCallbackParams;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createSessionBySAMLCallback>>,
|
||||
TError,
|
||||
CreateSessionBySAMLCallbackMutationVariables,
|
||||
{
|
||||
data?: BodyType<CreateSessionBySAMLCallbackBody>;
|
||||
params?: CreateSessionBySAMLCallbackParams;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getCreateSessionBySAMLCallbackMutationKey();
|
||||
const mutationKey = ['createSessionBySAMLCallback'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -299,7 +294,10 @@ export const getCreateSessionBySAMLCallbackMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof createSessionBySAMLCallback>>,
|
||||
CreateSessionBySAMLCallbackMutationVariables
|
||||
{
|
||||
data?: BodyType<CreateSessionBySAMLCallbackBody>;
|
||||
params?: CreateSessionBySAMLCallbackParams;
|
||||
}
|
||||
> = (props) => {
|
||||
const { data, params } = props ?? {};
|
||||
|
||||
@@ -318,10 +316,6 @@ export type CreateSessionBySAMLCallbackMutationBody =
|
||||
export type CreateSessionBySAMLCallbackMutationError = ErrorType<
|
||||
CreateSessionBySAMLCallback303 | RenderErrorResponseDTO
|
||||
>;
|
||||
export type CreateSessionBySAMLCallbackMutationVariables = {
|
||||
data?: BodyType<CreateSessionBySAMLCallbackBody>;
|
||||
params?: CreateSessionBySAMLCallbackParams;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Create session by saml callback
|
||||
@@ -333,13 +327,19 @@ export const useCreateSessionBySAMLCallback = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createSessionBySAMLCallback>>,
|
||||
TError,
|
||||
CreateSessionBySAMLCallbackMutationVariables,
|
||||
{
|
||||
data?: BodyType<CreateSessionBySAMLCallbackBody>;
|
||||
params?: CreateSessionBySAMLCallbackParams;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createSessionBySAMLCallback>>,
|
||||
TError,
|
||||
CreateSessionBySAMLCallbackMutationVariables,
|
||||
{
|
||||
data?: BodyType<CreateSessionBySAMLCallbackBody>;
|
||||
params?: CreateSessionBySAMLCallbackParams;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getCreateSessionBySAMLCallbackMutationOptions(options));
|
||||
@@ -356,8 +356,6 @@ export const deleteSession = (signal?: AbortSignal) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const getDeleteSessionMutationKey = () => ['deleteSession'] as const;
|
||||
|
||||
export const getDeleteSessionMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -374,7 +372,7 @@ export const getDeleteSessionMutationOptions = <
|
||||
void,
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getDeleteSessionMutationKey();
|
||||
const mutationKey = ['deleteSession'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -490,7 +488,7 @@ export function useGetSessionContext<
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Invalidates the {@link useGetSessionContext} query
|
||||
* @summary Get session context
|
||||
*/
|
||||
export const invalidateGetSessionContext = async (
|
||||
queryClient: QueryClient,
|
||||
@@ -521,9 +519,6 @@ export const createSessionByEmailPassword = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getCreateSessionByEmailPasswordMutationKey = () =>
|
||||
['createSessionByEmailPassword'] as const;
|
||||
|
||||
export const getCreateSessionByEmailPasswordMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -531,16 +526,16 @@ export const getCreateSessionByEmailPasswordMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createSessionByEmailPassword>>,
|
||||
TError,
|
||||
CreateSessionByEmailPasswordMutationVariables,
|
||||
{ data?: BodyType<AuthtypesPostableEmailPasswordSessionDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createSessionByEmailPassword>>,
|
||||
TError,
|
||||
CreateSessionByEmailPasswordMutationVariables,
|
||||
{ data?: BodyType<AuthtypesPostableEmailPasswordSessionDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getCreateSessionByEmailPasswordMutationKey();
|
||||
const mutationKey = ['createSessionByEmailPassword'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -551,7 +546,7 @@ export const getCreateSessionByEmailPasswordMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof createSessionByEmailPassword>>,
|
||||
CreateSessionByEmailPasswordMutationVariables
|
||||
{ data?: BodyType<AuthtypesPostableEmailPasswordSessionDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -569,9 +564,6 @@ export type CreateSessionByEmailPasswordMutationBody =
|
||||
| undefined;
|
||||
export type CreateSessionByEmailPasswordMutationError =
|
||||
ErrorType<RenderErrorResponseDTO>;
|
||||
export type CreateSessionByEmailPasswordMutationVariables = {
|
||||
data?: BodyType<AuthtypesPostableEmailPasswordSessionDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Create session by email and password
|
||||
@@ -583,13 +575,13 @@ export const useCreateSessionByEmailPassword = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createSessionByEmailPassword>>,
|
||||
TError,
|
||||
CreateSessionByEmailPasswordMutationVariables,
|
||||
{ data?: BodyType<AuthtypesPostableEmailPasswordSessionDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createSessionByEmailPassword>>,
|
||||
TError,
|
||||
CreateSessionByEmailPasswordMutationVariables,
|
||||
{ data?: BodyType<AuthtypesPostableEmailPasswordSessionDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getCreateSessionByEmailPasswordMutationOptions(options));
|
||||
@@ -611,8 +603,6 @@ export const rotateSession = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getRotateSessionMutationKey = () => ['rotateSession'] as const;
|
||||
|
||||
export const getRotateSessionMutationOptions = <
|
||||
TError = ErrorType<RenderErrorResponseDTO>,
|
||||
TContext = unknown,
|
||||
@@ -620,16 +610,16 @@ export const getRotateSessionMutationOptions = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof rotateSession>>,
|
||||
TError,
|
||||
RotateSessionMutationVariables,
|
||||
{ data?: BodyType<AuthtypesPostableRotateTokenDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof rotateSession>>,
|
||||
TError,
|
||||
RotateSessionMutationVariables,
|
||||
{ data?: BodyType<AuthtypesPostableRotateTokenDTO> },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = getRotateSessionMutationKey();
|
||||
const mutationKey = ['rotateSession'];
|
||||
const { mutation: mutationOptions } = options
|
||||
? options.mutation &&
|
||||
'mutationKey' in options.mutation &&
|
||||
@@ -640,7 +630,7 @@ export const getRotateSessionMutationOptions = <
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof rotateSession>>,
|
||||
RotateSessionMutationVariables
|
||||
{ data?: BodyType<AuthtypesPostableRotateTokenDTO> }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
@@ -657,9 +647,6 @@ export type RotateSessionMutationBody =
|
||||
| BodyType<AuthtypesPostableRotateTokenDTO>
|
||||
| undefined;
|
||||
export type RotateSessionMutationError = ErrorType<RenderErrorResponseDTO>;
|
||||
export type RotateSessionMutationVariables = {
|
||||
data?: BodyType<AuthtypesPostableRotateTokenDTO>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Rotate session
|
||||
@@ -671,13 +658,13 @@ export const useRotateSession = <
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof rotateSession>>,
|
||||
TError,
|
||||
RotateSessionMutationVariables,
|
||||
{ data?: BodyType<AuthtypesPostableRotateTokenDTO> },
|
||||
TContext
|
||||
>;
|
||||
}): UseMutationResult<
|
||||
Awaited<ReturnType<typeof rotateSession>>,
|
||||
TError,
|
||||
RotateSessionMutationVariables,
|
||||
{ data?: BodyType<AuthtypesPostableRotateTokenDTO> },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getRotateSessionMutationOptions(options));
|
||||
|
||||
17763
frontend/src/api/generated/services/sigNoz.schemas.ts
Normal file
17763
frontend/src/api/generated/services/sigNoz.schemas.ts
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,15 +0,0 @@
|
||||
/**
|
||||
* ! Do not edit manually
|
||||
* * The file has been auto-generated using Orval for SigNoz
|
||||
* * regenerate with 'pnpm generate:api'
|
||||
* SigNoz
|
||||
*/
|
||||
import type { TypesIdentifiableDTO } from './typesIdentifiableDTO';
|
||||
|
||||
export type ActivateLicense201 = {
|
||||
data: TypesIdentifiableDTO;
|
||||
/**
|
||||
* @type string
|
||||
*/
|
||||
status: string;
|
||||
};
|
||||
@@ -1,15 +0,0 @@
|
||||
/**
|
||||
* ! Do not edit manually
|
||||
* * The file has been auto-generated using Orval for SigNoz
|
||||
* * regenerate with 'pnpm generate:api'
|
||||
* SigNoz
|
||||
*/
|
||||
import type { CloudintegrationtypesGettableAgentCheckInDTO } from './cloudintegrationtypesGettableAgentCheckInDTO';
|
||||
|
||||
export type AgentCheckIn200 = {
|
||||
data: CloudintegrationtypesGettableAgentCheckInDTO;
|
||||
/**
|
||||
* @type string
|
||||
*/
|
||||
status: string;
|
||||
};
|
||||
@@ -1,15 +0,0 @@
|
||||
/**
|
||||
* ! Do not edit manually
|
||||
* * The file has been auto-generated using Orval for SigNoz
|
||||
* * regenerate with 'pnpm generate:api'
|
||||
* SigNoz
|
||||
*/
|
||||
import type { CloudintegrationtypesGettableAgentCheckInDTO } from './cloudintegrationtypesGettableAgentCheckInDTO';
|
||||
|
||||
export type AgentCheckInDeprecated200 = {
|
||||
data: CloudintegrationtypesGettableAgentCheckInDTO;
|
||||
/**
|
||||
* @type string
|
||||
*/
|
||||
status: string;
|
||||
};
|
||||
@@ -1,10 +0,0 @@
|
||||
/**
|
||||
* ! Do not edit manually
|
||||
* * The file has been auto-generated using Orval for SigNoz
|
||||
* * regenerate with 'pnpm generate:api'
|
||||
* SigNoz
|
||||
*/
|
||||
|
||||
export type AgentCheckInDeprecatedPathParameters = {
|
||||
cloudProvider: string;
|
||||
};
|
||||
@@ -1,10 +0,0 @@
|
||||
/**
|
||||
* ! Do not edit manually
|
||||
* * The file has been auto-generated using Orval for SigNoz
|
||||
* * regenerate with 'pnpm generate:api'
|
||||
* SigNoz
|
||||
*/
|
||||
|
||||
export type AgentCheckInPathParameters = {
|
||||
cloudProvider: string;
|
||||
};
|
||||
@@ -1,27 +0,0 @@
|
||||
/**
|
||||
* ! 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;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
/**
|
||||
* ! Do not edit manually
|
||||
* * The file has been auto-generated using Orval for SigNoz
|
||||
* * regenerate with 'pnpm generate:api'
|
||||
* SigNoz
|
||||
*/
|
||||
|
||||
export enum AiobservabilitytypesBlobPartDTOType {
|
||||
blob = 'blob',
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user