diff --git a/integrations/attio/package.json b/integrations/attio/package.json index 31273dd4861..ab309cd3d00 100644 --- a/integrations/attio/package.json +++ b/integrations/attio/package.json @@ -13,8 +13,6 @@ }, "devDependencies": { "@botpress/cli": "workspace:*", - "@botpress/sdk": "workspace:*", - "@types/node": "^22.16.4", - "typescript": "^5.6.3" + "@botpress/sdk": "workspace:*" } } diff --git a/integrations/bamboohr/package.json b/integrations/bamboohr/package.json index 0db6fed4fdd..1852753a2dd 100644 --- a/integrations/bamboohr/package.json +++ b/integrations/bamboohr/package.json @@ -18,8 +18,6 @@ "@botpress/common": "workspace:*", "@botpress/sdk": "workspace:*", "@types/jsonwebtoken": "^9.0.3", - "@types/lodash": "^4.14.191", - "@types/node": "^22.16.4", - "typescript": "^5.6.3" + "@types/lodash": "^4.14.191" } } diff --git a/integrations/feature-base/package.json b/integrations/feature-base/package.json index c34f7fd2526..f4e22fe7f0f 100644 --- a/integrations/feature-base/package.json +++ b/integrations/feature-base/package.json @@ -14,8 +14,6 @@ }, "devDependencies": { "@botpress/cli": "workspace:*", - "@botpress/sdk": "workspace:*", - "@types/node": "^22.16.4", - "typescript": "^5.6.3" + "@botpress/sdk": "workspace:*" } } diff --git a/integrations/grafana/.gitignore b/integrations/grafana/.gitignore deleted file mode 100644 index a9330ee0b02..00000000000 --- a/integrations/grafana/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -!src/gen -!src/gen/** diff --git a/integrations/grafana/definitions/dashboard-schemas.ts b/integrations/grafana/definitions/dashboard-schemas.ts index 79b19074d05..79db07fb2f2 100644 --- a/integrations/grafana/definitions/dashboard-schemas.ts +++ b/integrations/grafana/definitions/dashboard-schemas.ts @@ -1,5 +1,4 @@ import { z } from '@botpress/sdk' -import type { TextPanel, TimeSeriesPanel } from '../src/gen/types/GrafanaDashboard' export const gridPosSchema = z.object({ h: z.number().optional().title('Height').describe('Panel height in grid units'), @@ -20,7 +19,7 @@ export const textPanelSchema = z.object({ .describe('Rendering mode for the content'), id: z.number().optional().title('ID').describe('Numeric panel ID (assigned by Grafana)'), gridPos: gridPosSchema.optional().title('Grid Position').describe('Position and size of the panel in the grid'), -}) satisfies z.ZodType> +}) export const datasourceSchema = z.object({ type: z.string().title('Type').describe('Datasource type (e.g. "prometheus")'), @@ -47,7 +46,7 @@ export const timeSeriesPanelSchema = z.object({ .describe('Query targets for this panel'), fieldConfig: z.any().optional().title('Field Config').describe('Field display configuration'), options: z.any().optional().title('Options').describe('Panel display options'), -}) satisfies z.ZodType> +}) export const panelSchema = z.discriminatedUnion('type', [textPanelSchema, timeSeriesPanelSchema]) diff --git a/integrations/grafana/src/gen/specs/README.md b/integrations/grafana/grafana-api/README.md similarity index 99% rename from integrations/grafana/src/gen/specs/README.md rename to integrations/grafana/grafana-api/README.md index 8abff2f5b02..5449eb32d89 100644 --- a/integrations/grafana/src/gen/specs/README.md +++ b/integrations/grafana/grafana-api/README.md @@ -23,6 +23,7 @@ Grafana's Kubernetes-style API (`/apis/...`). These must be fetched from a live "https://your-stack.grafana.net/openapi/v3" | python3 -m json.tool | grep "grafana.app" ``` - **Re-fetch**: + ```sh TOKEN="your-grafana-service-account-token" BASE="https://your-stack.grafana.net" diff --git a/integrations/grafana/grafana-api/grafana-dashboard-k8s.json b/integrations/grafana/grafana-api/grafana-dashboard-k8s.json new file mode 100644 index 00000000000..6b83c8fc7fb --- /dev/null +++ b/integrations/grafana/grafana-api/grafana-dashboard-k8s.json @@ -0,0 +1,1154 @@ +{ + "openapi": "3.0.0", + "info": { + "description": "Grafana dashboards as resources", + "title": "dashboard.grafana.app/v1", + "version": "13.1.0-25461141735" + }, + "paths": { + "/apis/dashboard.grafana.app/v1/": { + "get": { + "tags": ["API Discovery"], + "description": "Describe the available kubernetes resources", + "operationId": "getAPIResources", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" } + }, + "application/yaml": { + "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" } + } + } + } + } + } + }, + "/apis/dashboard.grafana.app/v1/namespaces/{namespace}/dashboards": { + "get": { + "tags": ["Dashboard"], + "description": "list objects of kind Dashboard", + "operationId": "listDashboard", + "parameters": [ + { + "name": "allowWatchBookmarks", + "in": "query", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "schema": { "type": "boolean", "uniqueItems": true } + }, + { + "name": "continue", + "in": "query", + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "fieldSelector", + "in": "query", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "labelSelector", + "in": "query", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "limit", + "in": "query", + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "schema": { "type": "integer", "uniqueItems": true } + }, + { + "name": "resourceVersion", + "in": "query", + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "resourceVersionMatch", + "in": "query", + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "sendInitialEvents", + "in": "query", + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "schema": { "type": "boolean", "uniqueItems": true } + }, + { + "name": "shardSelector", + "in": "query", + "description": "shardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges:\n\n shardRange(object.metadata.uid, '0x0', '0x8000000000000000')\n shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000')\n\nField paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths:\n - object.metadata.uid\n - object.metadata.namespace\n\nhexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64.\n\nExamples:\n 2-shard split:\n shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000')\n shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000')\n 4-shard split:\n shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000')\n shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000')\n shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000')\n shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000')\n\nThis is an alpha field and requires enabling the ShardedListAndWatch feature gate.", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "timeoutSeconds", + "in": "query", + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "schema": { "type": "integer", "uniqueItems": true } + }, + { + "name": "watch", + "in": "query", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "schema": { "type": "boolean", "uniqueItems": true } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardList" + } + }, + "application/json;stream=watch": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardList" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardList" + } + } + } + } + }, + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { "group": "dashboard.grafana.app", "version": "v1", "kind": "Dashboard" } + }, + "post": { + "tags": ["Dashboard"], + "description": "create a Dashboard", + "operationId": "createDashboard", + "parameters": [ + { + "name": "dryRun", + "in": "query", + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "fieldManager", + "in": "query", + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "fieldValidation", + "in": "query", + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "schema": { "type": "string", "uniqueItems": true } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" + } + } + } + }, + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" + } + } + } + }, + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" + } + } + } + } + }, + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { "group": "dashboard.grafana.app", "version": "v1", "kind": "Dashboard" } + }, + "parameters": [ + { + "name": "namespace", + "in": "path", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "pretty", + "in": "query", + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "schema": { "type": "string", "uniqueItems": true } + } + ] + }, + "/apis/dashboard.grafana.app/v1/namespaces/{namespace}/dashboards/{name}": { + "get": { + "tags": ["Dashboard"], + "description": "read the specified Dashboard", + "operationId": "getDashboard", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" + } + } + } + } + }, + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { "group": "dashboard.grafana.app", "version": "v1", "kind": "Dashboard" } + }, + "put": { + "tags": ["Dashboard"], + "description": "replace the specified Dashboard", + "operationId": "replaceDashboard", + "parameters": [ + { + "name": "dryRun", + "in": "query", + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "fieldManager", + "in": "query", + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "fieldValidation", + "in": "query", + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "schema": { "type": "string", "uniqueItems": true } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" + } + } + } + }, + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" + } + } + } + } + }, + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { "group": "dashboard.grafana.app", "version": "v1", "kind": "Dashboard" } + }, + "delete": { + "tags": ["Dashboard"], + "description": "delete a Dashboard", + "operationId": "deleteDashboard", + "parameters": [ + { + "name": "dryRun", + "in": "query", + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "gracePeriodSeconds", + "in": "query", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "schema": { "type": "integer", "uniqueItems": true } + }, + { + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "in": "query", + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "schema": { "type": "boolean", "uniqueItems": true } + }, + { + "name": "orphanDependents", + "in": "query", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "schema": { "type": "boolean", "uniqueItems": true } + }, + { + "name": "propagationPolicy", + "in": "query", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "schema": { "type": "string", "uniqueItems": true } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } + }, + "application/yaml": { + "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } + } + } + }, + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } + }, + "application/yaml": { + "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } + } + } + } + }, + "x-kubernetes-action": "delete", + "x-kubernetes-group-version-kind": { "group": "dashboard.grafana.app", "version": "v1", "kind": "Dashboard" } + }, + "patch": { + "tags": ["Dashboard"], + "description": "partially update the specified Dashboard", + "operationId": "updateDashboard", + "parameters": [ + { + "name": "dryRun", + "in": "query", + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "fieldManager", + "in": "query", + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "fieldValidation", + "in": "query", + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "force", + "in": "query", + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "schema": { "type": "boolean", "uniqueItems": true } + } + ], + "requestBody": { + "content": { + "application/apply-patch+yaml": { + "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" } + }, + "application/json-patch+json": { + "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" } + }, + "application/merge-patch+json": { + "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" } + }, + "application/strategic-merge-patch+json": { + "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" + } + } + } + }, + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" + } + } + } + } + }, + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { "group": "dashboard.grafana.app", "version": "v1", "kind": "Dashboard" } + }, + "parameters": [ + { + "name": "name", + "in": "path", + "description": "name of the Dashboard", + "required": true, + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "namespace", + "in": "path", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "pretty", + "in": "query", + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "schema": { "type": "string", "uniqueItems": true } + } + ] + }, + "/apis/dashboard.grafana.app/v1/namespaces/{namespace}/dashboards/{name}/dto": { + "get": { + "tags": ["Dashboard"], + "description": "connect GET requests to dto of Dashboard", + "operationId": "getDashboardDto", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardWithAccessInfo" + } + } + } + } + }, + "x-kubernetes-action": "connect", + "x-kubernetes-group-version-kind": { + "group": "dashboard.grafana.app", + "version": "v1", + "kind": "DashboardWithAccessInfo" + } + }, + "parameters": [ + { + "name": "name", + "in": "path", + "description": "name of the DashboardWithAccessInfo", + "required": true, + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "namespace", + "in": "path", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "schema": { "type": "string", "uniqueItems": true } + } + ] + } + }, + "components": { + "schemas": { + "com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.AnnotationActions": { + "type": "object", + "required": ["canAdd", "canEdit", "canDelete"], + "properties": { + "canAdd": { "type": "boolean", "default": false }, + "canDelete": { "type": "boolean", "default": false }, + "canEdit": { "type": "boolean", "default": false } + } + }, + "com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.AnnotationPermission": { + "type": "object", + "required": ["dashboard"], + "properties": { + "dashboard": { + "default": {}, + "allOf": [ + { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.AnnotationActions" + } + ] + } + } + }, + "com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard": { + "type": "object", + "required": ["metadata", "spec", "status"], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "default": {}, + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" }] + }, + "spec": { + "description": "Spec is the spec of the Dashboard", + "allOf": [ + { + "$ref": "#/components/schemas/com.github.grafana.grafana.pkg.apimachinery.apis.common.v0alpha1.Unstructured" + } + ] + }, + "status": { + "default": {}, + "allOf": [ + { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardStatus" + } + ] + } + }, + "x-kubernetes-group-version-kind": [ + { "group": "dashboard.grafana.app", "kind": "Dashboard", "version": "v1" }, + { "group": "dashboard.grafana.app", "kind": "Dashboard", "version": "v1beta1" } + ] + }, + "com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardAccess": { + "type": "object", + "required": ["isPublic", "canSave", "canEdit", "canAdmin", "canStar", "canDelete", "annotationsPermissions"], + "properties": { + "annotationsPermissions": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.AnnotationPermission" + }, + "canAdmin": { "type": "boolean", "default": false }, + "canDelete": { "type": "boolean", "default": false }, + "canEdit": { "type": "boolean", "default": false }, + "canSave": { "description": "The permissions part", "type": "boolean", "default": false }, + "canStar": { "type": "boolean", "default": false }, + "isPublic": { "type": "boolean", "default": false }, + "slug": { "description": "Metadata fields", "type": "string" }, + "url": { "type": "string" } + } + }, + "com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardConversionStatus": { + "description": "ConversionStatus is the status of the conversion of the dashboard.", + "type": "object", + "required": ["failed"], + "properties": { + "error": { + "description": "The error message from the conversion. Empty if the conversion has not failed.", + "type": "string" + }, + "failed": { + "description": "Whether from another version has failed. If true, means that the dashboard is not valid, and the caller should instead fetch the stored version.", + "type": "boolean", + "default": false + }, + "source": { "description": "The original value map[string]any", "type": "object" }, + "storedVersion": { + "description": "The version which was stored when the dashboard was created / updated. Fetching this version should always succeed.", + "type": "string" + } + } + }, + "com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardList": { + "type": "object", + "required": ["metadata", "items"], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "items": { + "type": "array", + "items": { + "default": {}, + "allOf": [ + { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" + } + ] + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "default": {}, + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" }] + } + }, + "x-kubernetes-group-version-kind": [ + { "group": "dashboard.grafana.app", "kind": "DashboardList", "version": "v1" }, + { "group": "dashboard.grafana.app", "kind": "DashboardList", "version": "v1beta1" } + ] + }, + "com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardStatus": { + "type": "object", + "properties": { + "conversion": { + "description": "Optional conversion status.", + "allOf": [ + { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardConversionStatus" + } + ] + } + } + }, + "com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardWithAccessInfo": { + "description": "This is like the legacy DTO where access and metadata are all returned in a single call", + "type": "object", + "required": ["metadata", "spec", "status", "access"], + "properties": { + "access": { + "default": {}, + "allOf": [ + { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardAccess" + } + ] + }, + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "default": {}, + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" }] + }, + "spec": { + "description": "Spec is the spec of the Dashboard", + "allOf": [ + { + "$ref": "#/components/schemas/com.github.grafana.grafana.pkg.apimachinery.apis.common.v0alpha1.Unstructured" + } + ] + }, + "status": { + "default": {}, + "allOf": [ + { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardStatus" + } + ] + } + }, + "x-kubernetes-group-version-kind": [ + { "group": "dashboard.grafana.app", "kind": "DashboardWithAccessInfo", "version": "v1" }, + { "group": "dashboard.grafana.app", "kind": "DashboardWithAccessInfo", "version": "v1beta1" } + ] + }, + "com.github.grafana.grafana.pkg.apimachinery.apis.common.v0alpha1.Unstructured": { + "type": "object", + "additionalProperties": true, + "x-kubernetes-preserve-unknown-fields": true + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.APIResource": { + "description": "APIResource specifies the name of a resource and whether it is namespaced.", + "type": "object", + "required": ["name", "singularName", "namespaced", "kind", "verbs"], + "properties": { + "categories": { + "description": "categories is a list of the grouped resources this resource belongs to (e.g. 'all')", + "type": "array", + "items": { "type": "string", "default": "" }, + "x-kubernetes-list-type": "atomic" + }, + "group": { + "description": "group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\".", + "type": "string" + }, + "kind": { + "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", + "type": "string", + "default": "" + }, + "name": { "description": "name is the plural name of the resource.", "type": "string", "default": "" }, + "namespaced": { + "description": "namespaced indicates if a resource is namespaced or not.", + "type": "boolean", + "default": false + }, + "shortNames": { + "description": "shortNames is a list of suggested short names of the resource.", + "type": "array", + "items": { "type": "string", "default": "" }, + "x-kubernetes-list-type": "atomic" + }, + "singularName": { + "description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.", + "type": "string", + "default": "" + }, + "storageVersionHash": { + "description": "The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates.", + "type": "string" + }, + "verbs": { + "description": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)", + "type": "array", + "items": { "type": "string", "default": "" } + }, + "version": { + "description": "version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)\".", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList": { + "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", + "type": "object", + "required": ["groupVersion", "resources"], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "groupVersion": { + "description": "groupVersion is the group and version this APIResourceList is for.", + "type": "string", + "default": "" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "resources": { + "description": "resources contains the name of the resources and if they are namespaced.", + "type": "array", + "items": { + "default": {}, + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIResource" }] + }, + "x-kubernetes-list-type": "atomic" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions": { + "description": "DeleteOptions may be provided when deleting an API object.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "dryRun": { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "type": "array", + "items": { "type": "string", "default": "" }, + "x-kubernetes-list-type": "atomic" + }, + "gracePeriodSeconds": { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "type": "integer", + "format": "int64" + }, + "ignoreStoreReadErrorWithClusterBreakingPotential": { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "type": "boolean" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "orphanDependents": { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "type": "boolean" + }, + "preconditions": { + "description": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions" }] + }, + "propagationPolicy": { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1": { + "description": "FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.\n\nEach key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:\u003cname\u003e', where \u003cname\u003e is the name of a field in a struct, or key in a map 'v:\u003cvalue\u003e', where \u003cvalue\u003e is the exact json formatted value of a list item 'i:\u003cindex\u003e', where \u003cindex\u003e is position of a item in a list 'k:\u003ckeys\u003e', where \u003ckeys\u003e is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set.\n\nThe exact format is defined in sigs.k8s.io/structured-merge-diff", + "type": "object" + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta": { + "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", + "type": "object", + "properties": { + "continue": { + "description": "continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.", + "type": "string" + }, + "remainingItemCount": { + "description": "remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.", + "type": "integer", + "format": "int64" + }, + "resourceVersion": { + "description": "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", + "type": "string" + }, + "selfLink": { + "description": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry": { + "description": "ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the version of this resource that this field set applies to. The format is \"group/version\" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted.", + "type": "string" + }, + "fieldsType": { + "description": "FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: \"FieldsV1\"", + "type": "string" + }, + "fieldsV1": { + "description": "FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.", + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1" }] + }, + "manager": { + "description": "Manager is an identifier of the workflow managing these fields.", + "type": "string" + }, + "operation": { + "description": "Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.", + "type": "string" + }, + "subresource": { + "description": "Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource.", + "type": "string" + }, + "time": { + "description": "Time is the timestamp of when the ManagedFields entry was added. The timestamp will also be updated if a field is added, the manager changes any of the owned fields value or removes a field. The timestamp does not update when a field is removed from the entry because another manager took it over.", + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time" }] + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta": { + "description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + "type": "object", + "properties": { + "annotations": { + "description": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations", + "type": "object", + "additionalProperties": { "type": "string", "default": "" } + }, + "creationTimestamp": { + "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time" }] + }, + "deletionGracePeriodSeconds": { + "description": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", + "type": "integer", + "format": "int64" + }, + "deletionTimestamp": { + "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time" }] + }, + "finalizers": { + "description": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.", + "type": "array", + "items": { "type": "string", "default": "" }, + "x-kubernetes-list-type": "set", + "x-kubernetes-patch-strategy": "merge" + }, + "generateName": { + "description": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will return a 409.\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency", + "type": "string" + }, + "generation": { + "description": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", + "type": "integer", + "format": "int64" + }, + "labels": { + "description": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels", + "type": "object", + "additionalProperties": { "type": "string", "default": "" } + }, + "managedFields": { + "description": "ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object.", + "type": "array", + "items": { + "default": {}, + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry" }] + }, + "x-kubernetes-list-type": "atomic" + }, + "name": { + "description": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names", + "type": "string" + }, + "namespace": { + "description": "Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces", + "type": "string" + }, + "ownerReferences": { + "description": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", + "type": "array", + "items": { + "default": {}, + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference" }] + }, + "x-kubernetes-list-map-keys": ["uid"], + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "uid", + "x-kubernetes-patch-strategy": "merge" + }, + "resourceVersion": { + "description": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", + "type": "string" + }, + "selfLink": { + "description": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.", + "type": "string" + }, + "uid": { + "description": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference": { + "description": "OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.", + "type": "object", + "required": ["apiVersion", "kind", "name", "uid"], + "properties": { + "apiVersion": { "description": "API version of the referent.", "type": "string", "default": "" }, + "blockOwnerDeletion": { + "description": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.", + "type": "boolean" + }, + "controller": { + "description": "If true, this reference points to the managing controller.", + "type": "boolean" + }, + "kind": { + "description": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string", + "default": "" + }, + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names", + "type": "string", + "default": "" + }, + "uid": { + "description": "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids", + "type": "string", + "default": "" + } + }, + "x-kubernetes-map-type": "atomic" + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.Patch": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions": { + "description": "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", + "type": "object", + "properties": { + "resourceVersion": { "description": "Specifies the target ResourceVersion", "type": "string" }, + "uid": { "description": "Specifies the target UID.", "type": "string" } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.Status": { + "description": "Status is a return value for calls that don't return other objects.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "code": { + "description": "Suggested HTTP return code for this status, 0 if not set.", + "type": "integer", + "format": "int32" + }, + "details": { + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" }] + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "message": { + "description": "A human-readable description of the status of this operation.", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "default": {}, + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" }] + }, + "reason": { + "description": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.", + "type": "string" + }, + "status": { + "description": "Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.StatusCause": { + "description": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", + "type": "object", + "properties": { + "field": { + "description": "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"", + "type": "string" + }, + "message": { + "description": "A human-readable description of the cause of the error. This field may be presented as-is to a reader.", + "type": "string" + }, + "reason": { + "description": "A machine-readable description of the cause of the error. If this value is empty there is no information available.", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails": { + "description": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", + "type": "object", + "properties": { + "causes": { + "description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.", + "type": "array", + "items": { + "default": {}, + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusCause" }] + }, + "x-kubernetes-list-type": "atomic" + }, + "group": { + "description": "The group attribute of the resource associated with the status StatusReason.", + "type": "string" + }, + "kind": { + "description": "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "name": { + "description": "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).", + "type": "string" + }, + "retryAfterSeconds": { + "description": "If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.", + "type": "integer", + "format": "int32" + }, + "uid": { + "description": "UID of the resource. (when there is a single resource which can be described). More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.Time": { + "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "type": "string", + "format": "date-time" + } + } + } +} diff --git a/integrations/grafana/grafana-api/grafana-folder-k8s.json b/integrations/grafana/grafana-api/grafana-folder-k8s.json new file mode 100644 index 00000000000..0c5ab00af6b --- /dev/null +++ b/integrations/grafana/grafana-api/grafana-folder-k8s.json @@ -0,0 +1,1244 @@ +{ + "openapi": "3.0.0", + "info": { "description": "Grafana folders", "title": "folder.grafana.app/v1", "version": "13.1.0-25461141735" }, + "paths": { + "/apis/folder.grafana.app/v1/": { + "get": { + "tags": ["API Discovery"], + "description": "Describe the available kubernetes resources", + "operationId": "getAPIResources", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" } + }, + "application/yaml": { + "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" } + } + } + } + } + } + }, + "/apis/folder.grafana.app/v1/namespaces/{namespace}/folders": { + "get": { + "tags": ["Folder"], + "description": "list objects of kind Folder", + "operationId": "listFolder", + "parameters": [ + { + "name": "allowWatchBookmarks", + "in": "query", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "schema": { "type": "boolean", "uniqueItems": true } + }, + { + "name": "continue", + "in": "query", + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "fieldSelector", + "in": "query", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "labelSelector", + "in": "query", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "limit", + "in": "query", + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "schema": { "type": "integer", "uniqueItems": true } + }, + { + "name": "resourceVersion", + "in": "query", + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "resourceVersionMatch", + "in": "query", + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "sendInitialEvents", + "in": "query", + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "schema": { "type": "boolean", "uniqueItems": true } + }, + { + "name": "shardSelector", + "in": "query", + "description": "shardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges:\n\n shardRange(object.metadata.uid, '0x0', '0x8000000000000000')\n shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000')\n\nField paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths:\n - object.metadata.uid\n - object.metadata.namespace\n\nhexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64.\n\nExamples:\n 2-shard split:\n shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000')\n shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000')\n 4-shard split:\n shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000')\n shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000')\n shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000')\n shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000')\n\nThis is an alpha field and requires enabling the ShardedListAndWatch feature gate.", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "timeoutSeconds", + "in": "query", + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "schema": { "type": "integer", "uniqueItems": true } + }, + { + "name": "watch", + "in": "query", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "schema": { "type": "boolean", "uniqueItems": true } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderList" + } + }, + "application/json;stream=watch": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderList" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderList" + } + } + } + } + }, + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { "group": "folder.grafana.app", "version": "v1", "kind": "Folder" } + }, + "post": { + "tags": ["Folder"], + "description": "create a Folder", + "operationId": "createFolder", + "parameters": [ + { + "name": "dryRun", + "in": "query", + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "fieldManager", + "in": "query", + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "fieldValidation", + "in": "query", + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "schema": { "type": "string", "uniqueItems": true } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" + } + } + } + }, + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" + } + } + } + }, + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" + } + } + } + } + }, + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { "group": "folder.grafana.app", "version": "v1", "kind": "Folder" } + }, + "parameters": [ + { + "name": "namespace", + "in": "path", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "pretty", + "in": "query", + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "schema": { "type": "string", "uniqueItems": true } + } + ] + }, + "/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}": { + "get": { + "tags": ["Folder"], + "description": "read the specified Folder", + "operationId": "getFolder", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" + } + } + } + } + }, + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { "group": "folder.grafana.app", "version": "v1", "kind": "Folder" } + }, + "put": { + "tags": ["Folder"], + "description": "replace the specified Folder", + "operationId": "replaceFolder", + "parameters": [ + { + "name": "dryRun", + "in": "query", + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "fieldManager", + "in": "query", + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "fieldValidation", + "in": "query", + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "schema": { "type": "string", "uniqueItems": true } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" + } + } + } + }, + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" + } + } + } + } + }, + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { "group": "folder.grafana.app", "version": "v1", "kind": "Folder" } + }, + "delete": { + "tags": ["Folder"], + "description": "delete a Folder", + "operationId": "deleteFolder", + "parameters": [ + { + "name": "dryRun", + "in": "query", + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "gracePeriodSeconds", + "in": "query", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "schema": { "type": "integer", "uniqueItems": true } + }, + { + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "in": "query", + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "schema": { "type": "boolean", "uniqueItems": true } + }, + { + "name": "orphanDependents", + "in": "query", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "schema": { "type": "boolean", "uniqueItems": true } + }, + { + "name": "propagationPolicy", + "in": "query", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "schema": { "type": "string", "uniqueItems": true } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } + }, + "application/yaml": { + "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } + } + } + }, + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } + }, + "application/yaml": { + "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } + } + } + } + }, + "x-kubernetes-action": "delete", + "x-kubernetes-group-version-kind": { "group": "folder.grafana.app", "version": "v1", "kind": "Folder" } + }, + "patch": { + "tags": ["Folder"], + "description": "partially update the specified Folder", + "operationId": "updateFolder", + "parameters": [ + { + "name": "dryRun", + "in": "query", + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "fieldManager", + "in": "query", + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "fieldValidation", + "in": "query", + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "force", + "in": "query", + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "schema": { "type": "boolean", "uniqueItems": true } + } + ], + "requestBody": { + "content": { + "application/apply-patch+yaml": { + "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" } + }, + "application/json-patch+json": { + "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" } + }, + "application/merge-patch+json": { + "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" } + }, + "application/strategic-merge-patch+json": { + "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" + } + } + } + }, + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" + } + } + } + } + }, + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { "group": "folder.grafana.app", "version": "v1", "kind": "Folder" } + }, + "parameters": [ + { + "name": "name", + "in": "path", + "description": "name of the Folder", + "required": true, + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "namespace", + "in": "path", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "pretty", + "in": "query", + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "schema": { "type": "string", "uniqueItems": true } + } + ] + }, + "/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}/access": { + "get": { + "tags": ["Folder"], + "description": "connect GET requests to access of Folder", + "operationId": "getFolderAccess", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderAccessInfo" + } + } + } + } + }, + "x-kubernetes-action": "connect", + "x-kubernetes-group-version-kind": { + "group": "folder.grafana.app", + "version": "v1", + "kind": "FolderAccessInfo" + } + }, + "parameters": [ + { + "name": "name", + "in": "path", + "description": "name of the FolderAccessInfo", + "required": true, + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "namespace", + "in": "path", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "schema": { "type": "string", "uniqueItems": true } + } + ] + }, + "/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}/children": { + "get": { + "tags": ["Folder"], + "description": "connect GET requests to children of Folder", + "operationId": "getFolderChildren", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderList" + } + } + } + } + }, + "x-kubernetes-action": "connect", + "x-kubernetes-group-version-kind": { "group": "folder.grafana.app", "version": "v1", "kind": "FolderList" } + }, + "parameters": [ + { + "name": "name", + "in": "path", + "description": "name of the FolderList", + "required": true, + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "namespace", + "in": "path", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "schema": { "type": "string", "uniqueItems": true } + } + ] + }, + "/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}/counts": { + "get": { + "tags": ["Folder"], + "description": "connect GET requests to counts of Folder", + "operationId": "getFolderCounts", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.DescendantCounts" + } + } + } + } + }, + "x-kubernetes-action": "connect", + "x-kubernetes-group-version-kind": { + "group": "folder.grafana.app", + "version": "v1", + "kind": "DescendantCounts" + } + }, + "parameters": [ + { + "name": "name", + "in": "path", + "description": "name of the DescendantCounts", + "required": true, + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "namespace", + "in": "path", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "schema": { "type": "string", "uniqueItems": true } + } + ] + }, + "/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}/parents": { + "get": { + "tags": ["Folder"], + "description": "connect GET requests to parents of Folder", + "operationId": "getFolderParents", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderInfoList" + } + } + } + } + }, + "x-kubernetes-action": "connect", + "x-kubernetes-group-version-kind": { "group": "folder.grafana.app", "version": "v1", "kind": "FolderInfoList" } + }, + "parameters": [ + { + "name": "name", + "in": "path", + "description": "name of the FolderInfoList", + "required": true, + "schema": { "type": "string", "uniqueItems": true } + }, + { + "name": "namespace", + "in": "path", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "schema": { "type": "string", "uniqueItems": true } + } + ] + } + }, + "components": { + "schemas": { + "com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.DescendantCounts": { + "type": "object", + "required": ["counts"], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "counts": { + "type": "array", + "items": { + "default": {}, + "allOf": [ + { + "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.ResourceStats" + } + ] + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { "group": "folder.grafana.app", "kind": "DescendantCounts", "version": "v1" }, + { "group": "folder.grafana.app", "kind": "DescendantCounts", "version": "v1beta1" } + ] + }, + "com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder": { + "type": "object", + "required": ["metadata", "spec"], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "default": {}, + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" }] + }, + "spec": { + "description": "Spec is the spec of the Folder", + "default": {}, + "allOf": [ + { "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderSpec" } + ] + } + }, + "x-kubernetes-group-version-kind": [ + { "group": "folder.grafana.app", "kind": "Folder", "version": "v1" }, + { "group": "folder.grafana.app", "kind": "Folder", "version": "v1beta1" } + ] + }, + "com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderAccessInfo": { + "description": "Access control information for the current user", + "type": "object", + "required": ["canSave", "canEdit", "canAdmin", "canDelete"], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "canAdmin": { "type": "boolean", "default": false }, + "canDelete": { "type": "boolean", "default": false }, + "canEdit": { "type": "boolean", "default": false }, + "canSave": { "type": "boolean", "default": false }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { "group": "folder.grafana.app", "kind": "FolderAccessInfo", "version": "v1" }, + { "group": "folder.grafana.app", "kind": "FolderAccessInfo", "version": "v1beta1" } + ] + }, + "com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderInfo": { + "description": "FolderInfo briefly describes a folder -- unlike a folder resource, this is a partial record of the folder metadata used for navigating parents and children", + "type": "object", + "required": ["name", "title"], + "properties": { + "description": { "description": "The folder description", "type": "string" }, + "detached": { "description": "This folder does not resolve", "type": "boolean" }, + "name": { + "description": "Name is the k8s name (eg, the unique identifier) for a folder", + "type": "string", + "default": "" + }, + "parent": { "description": "The parent folder UID", "type": "string" }, + "title": { "description": "Title is the display value", "type": "string", "default": "" } + } + }, + "com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderInfoList": { + "description": "FolderInfoList returns a list of folder references (parents or children) Unlike FolderList, each item is not a full k8s object", + "type": "object", + "required": ["items"], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "items": { + "type": "array", + "items": { + "default": {}, + "allOf": [ + { "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderInfo" } + ] + }, + "x-kubernetes-list-map-keys": ["uid"], + "x-kubernetes-list-type": "map" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "default": {}, + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" }] + } + }, + "x-kubernetes-group-version-kind": [ + { "group": "folder.grafana.app", "kind": "FolderInfoList", "version": "v1" }, + { "group": "folder.grafana.app", "kind": "FolderInfoList", "version": "v1beta1" } + ] + }, + "com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderList": { + "type": "object", + "required": ["metadata", "items"], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "items": { + "type": "array", + "items": { + "default": {}, + "allOf": [ + { "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" } + ] + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "default": {}, + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" }] + } + }, + "x-kubernetes-group-version-kind": [ + { "group": "folder.grafana.app", "kind": "FolderList", "version": "v1" }, + { "group": "folder.grafana.app", "kind": "FolderList", "version": "v1beta1" } + ] + }, + "com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderSpec": { + "type": "object", + "required": ["title"], + "properties": { "description": { "type": "string" }, "title": { "type": "string", "default": "" } } + }, + "com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.ResourceStats": { + "type": "object", + "required": ["group", "resource", "count"], + "properties": { + "count": { "type": "integer", "format": "int64", "default": 0 }, + "group": { "type": "string", "default": "" }, + "resource": { "type": "string", "default": "" } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.APIResource": { + "description": "APIResource specifies the name of a resource and whether it is namespaced.", + "type": "object", + "required": ["name", "singularName", "namespaced", "kind", "verbs"], + "properties": { + "categories": { + "description": "categories is a list of the grouped resources this resource belongs to (e.g. 'all')", + "type": "array", + "items": { "type": "string", "default": "" }, + "x-kubernetes-list-type": "atomic" + }, + "group": { + "description": "group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\".", + "type": "string" + }, + "kind": { + "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", + "type": "string", + "default": "" + }, + "name": { "description": "name is the plural name of the resource.", "type": "string", "default": "" }, + "namespaced": { + "description": "namespaced indicates if a resource is namespaced or not.", + "type": "boolean", + "default": false + }, + "shortNames": { + "description": "shortNames is a list of suggested short names of the resource.", + "type": "array", + "items": { "type": "string", "default": "" }, + "x-kubernetes-list-type": "atomic" + }, + "singularName": { + "description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.", + "type": "string", + "default": "" + }, + "storageVersionHash": { + "description": "The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates.", + "type": "string" + }, + "verbs": { + "description": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)", + "type": "array", + "items": { "type": "string", "default": "" } + }, + "version": { + "description": "version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)\".", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList": { + "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", + "type": "object", + "required": ["groupVersion", "resources"], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "groupVersion": { + "description": "groupVersion is the group and version this APIResourceList is for.", + "type": "string", + "default": "" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "resources": { + "description": "resources contains the name of the resources and if they are namespaced.", + "type": "array", + "items": { + "default": {}, + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIResource" }] + }, + "x-kubernetes-list-type": "atomic" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions": { + "description": "DeleteOptions may be provided when deleting an API object.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "dryRun": { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "type": "array", + "items": { "type": "string", "default": "" }, + "x-kubernetes-list-type": "atomic" + }, + "gracePeriodSeconds": { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "type": "integer", + "format": "int64" + }, + "ignoreStoreReadErrorWithClusterBreakingPotential": { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "type": "boolean" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "orphanDependents": { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "type": "boolean" + }, + "preconditions": { + "description": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions" }] + }, + "propagationPolicy": { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1": { + "description": "FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.\n\nEach key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:\u003cname\u003e', where \u003cname\u003e is the name of a field in a struct, or key in a map 'v:\u003cvalue\u003e', where \u003cvalue\u003e is the exact json formatted value of a list item 'i:\u003cindex\u003e', where \u003cindex\u003e is position of a item in a list 'k:\u003ckeys\u003e', where \u003ckeys\u003e is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set.\n\nThe exact format is defined in sigs.k8s.io/structured-merge-diff", + "type": "object" + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta": { + "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", + "type": "object", + "properties": { + "continue": { + "description": "continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.", + "type": "string" + }, + "remainingItemCount": { + "description": "remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.", + "type": "integer", + "format": "int64" + }, + "resourceVersion": { + "description": "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", + "type": "string" + }, + "selfLink": { + "description": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry": { + "description": "ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the version of this resource that this field set applies to. The format is \"group/version\" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted.", + "type": "string" + }, + "fieldsType": { + "description": "FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: \"FieldsV1\"", + "type": "string" + }, + "fieldsV1": { + "description": "FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.", + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1" }] + }, + "manager": { + "description": "Manager is an identifier of the workflow managing these fields.", + "type": "string" + }, + "operation": { + "description": "Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.", + "type": "string" + }, + "subresource": { + "description": "Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource.", + "type": "string" + }, + "time": { + "description": "Time is the timestamp of when the ManagedFields entry was added. The timestamp will also be updated if a field is added, the manager changes any of the owned fields value or removes a field. The timestamp does not update when a field is removed from the entry because another manager took it over.", + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time" }] + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta": { + "description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + "type": "object", + "properties": { + "annotations": { + "description": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations", + "type": "object", + "additionalProperties": { "type": "string", "default": "" } + }, + "creationTimestamp": { + "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time" }] + }, + "deletionGracePeriodSeconds": { + "description": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", + "type": "integer", + "format": "int64" + }, + "deletionTimestamp": { + "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time" }] + }, + "finalizers": { + "description": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.", + "type": "array", + "items": { "type": "string", "default": "" }, + "x-kubernetes-list-type": "set", + "x-kubernetes-patch-strategy": "merge" + }, + "generateName": { + "description": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will return a 409.\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency", + "type": "string" + }, + "generation": { + "description": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", + "type": "integer", + "format": "int64" + }, + "labels": { + "description": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels", + "type": "object", + "additionalProperties": { "type": "string", "default": "" } + }, + "managedFields": { + "description": "ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object.", + "type": "array", + "items": { + "default": {}, + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry" }] + }, + "x-kubernetes-list-type": "atomic" + }, + "name": { + "description": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names", + "type": "string" + }, + "namespace": { + "description": "Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces", + "type": "string" + }, + "ownerReferences": { + "description": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", + "type": "array", + "items": { + "default": {}, + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference" }] + }, + "x-kubernetes-list-map-keys": ["uid"], + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "uid", + "x-kubernetes-patch-strategy": "merge" + }, + "resourceVersion": { + "description": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", + "type": "string" + }, + "selfLink": { + "description": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.", + "type": "string" + }, + "uid": { + "description": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference": { + "description": "OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.", + "type": "object", + "required": ["apiVersion", "kind", "name", "uid"], + "properties": { + "apiVersion": { "description": "API version of the referent.", "type": "string", "default": "" }, + "blockOwnerDeletion": { + "description": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.", + "type": "boolean" + }, + "controller": { + "description": "If true, this reference points to the managing controller.", + "type": "boolean" + }, + "kind": { + "description": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string", + "default": "" + }, + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names", + "type": "string", + "default": "" + }, + "uid": { + "description": "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids", + "type": "string", + "default": "" + } + }, + "x-kubernetes-map-type": "atomic" + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.Patch": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions": { + "description": "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", + "type": "object", + "properties": { + "resourceVersion": { "description": "Specifies the target ResourceVersion", "type": "string" }, + "uid": { "description": "Specifies the target UID.", "type": "string" } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.Status": { + "description": "Status is a return value for calls that don't return other objects.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "code": { + "description": "Suggested HTTP return code for this status, 0 if not set.", + "type": "integer", + "format": "int32" + }, + "details": { + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" }] + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "message": { + "description": "A human-readable description of the status of this operation.", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "default": {}, + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" }] + }, + "reason": { + "description": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.", + "type": "string" + }, + "status": { + "description": "Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.StatusCause": { + "description": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", + "type": "object", + "properties": { + "field": { + "description": "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"", + "type": "string" + }, + "message": { + "description": "A human-readable description of the cause of the error. This field may be presented as-is to a reader.", + "type": "string" + }, + "reason": { + "description": "A machine-readable description of the cause of the error. If this value is empty there is no information available.", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails": { + "description": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", + "type": "object", + "properties": { + "causes": { + "description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.", + "type": "array", + "items": { + "default": {}, + "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusCause" }] + }, + "x-kubernetes-list-type": "atomic" + }, + "group": { + "description": "The group attribute of the resource associated with the status StatusReason.", + "type": "string" + }, + "kind": { + "description": "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "name": { + "description": "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).", + "type": "string" + }, + "retryAfterSeconds": { + "description": "If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.", + "type": "integer", + "format": "int32" + }, + "uid": { + "description": "UID of the resource. (when there is a single resource which can be described). More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.Time": { + "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "type": "string", + "format": "date-time" + } + } + } +} diff --git a/integrations/grafana/src/gen/specs/grafana-legacy.json b/integrations/grafana/grafana-api/grafana-legacy.json similarity index 95% rename from integrations/grafana/src/gen/specs/grafana-legacy.json rename to integrations/grafana/grafana-api/grafana-legacy.json index 6a561c44d49..51d510e5636 100644 --- a/integrations/grafana/src/gen/specs/grafana-legacy.json +++ b/integrations/grafana/grafana-api/grafana-legacy.json @@ -1,14 +1,7 @@ { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "schemes": [ - "http", - "https" - ], + "consumes": ["application/json"], + "produces": ["application/json"], + "schemes": ["http", "https"], "swagger": "2.0", "info": { "description": "The Grafana backend exposes an HTTP API, the same API is used by the frontend to do\neverything from saving dashboards, creating users and updating data sources.", @@ -25,10 +18,7 @@ "/access-control/roles": { "get": { "description": "Gets all existing roles. The response contains all global and organization local roles, for the organization which user is signed in.\n\nYou need to have a permission with action `roles:read` and scope `roles:*`.\n\nThe `delegatable` flag reduces the set of roles to only those for which the signed-in user has permissions to assign.", - "tags": [ - "access_control", - "enterprise" - ], + "tags": ["access_control", "enterprise"], "summary": "Get all roles.", "operationId": "listRoles", "parameters": [ @@ -63,10 +53,7 @@ }, "post": { "description": "Creates a new custom role and maps given permissions to that role. Note that roles with the same prefix as Fixed Roles can’t be created.\n\nYou need to have a permission with action `roles:write` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has.\nFor example, if a user does not have required permissions for creating users, they won’t be able to create a custom role which allows to do that. This is done to prevent escalation of privileges.", - "tags": [ - "access_control", - "enterprise" - ], + "tags": ["access_control", "enterprise"], "summary": "Create a new custom role.", "operationId": "createRole", "parameters": [ @@ -98,10 +85,7 @@ "/access-control/roles/{roleUID}": { "get": { "description": "Get a role for the given UID.\n\nYou need to have a permission with action `roles:read` and scope `roles:*`.", - "tags": [ - "access_control", - "enterprise" - ], + "tags": ["access_control", "enterprise"], "summary": "Get a role.", "operationId": "getRole", "parameters": [ @@ -126,10 +110,7 @@ }, "put": { "description": "You need to have a permission with action `roles:write` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has.", - "tags": [ - "access_control", - "enterprise" - ], + "tags": ["access_control", "enterprise"], "summary": "Update a custom role.", "operationId": "updateRole", "parameters": [ @@ -168,10 +149,7 @@ }, "delete": { "description": "Delete a role with the given UID, and it’s permissions. If the role is assigned to a built-in role, the deletion operation will fail, unless force query param is set to true, and in that case all assignments will also be deleted.\n\nYou need to have a permission with action `roles:delete` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only delete a custom role with the same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to delete a custom role which allows to do that.", - "tags": [ - "access_control", - "enterprise" - ], + "tags": ["access_control", "enterprise"], "summary": "Delete a custom role.", "operationId": "deleteRole", "parameters": [ @@ -211,10 +189,7 @@ "/access-control/roles/{roleUID}/assignments": { "get": { "description": "Get role assignments for the role with the given UID.\nDoes not include role assignments mapped through group attribute sync.\n\nYou need to have a permission with action `teams.roles:list` and scope `teams:id:*` and `users.roles:list` and scope `users:id:*`.", - "tags": [ - "access_control", - "enterprise" - ], + "tags": ["access_control", "enterprise"], "summary": "Get role assignments.", "operationId": "getRoleAssignments", "parameters": [ @@ -242,10 +217,7 @@ }, "put": { "description": "Set role assignments for the role with the given UID.\n\nYou need to have a permission with action `teams.roles:add` and `teams.roles:remove` and scope `permissions:type:delegate`, and `users.roles:add` and `users.roles:remove` and scope `permissions:type:delegate`.", - "tags": [ - "access_control", - "enterprise" - ], + "tags": ["access_control", "enterprise"], "summary": "Set role assignments.", "operationId": "setRoleAssignments", "parameters": [ @@ -283,10 +255,7 @@ "/access-control/status": { "get": { "description": "Returns an indicator to check if fine-grained access control is enabled or not.\n\nYou need to have a permission with action `status:accesscontrol` and scope `services:accesscontrol`.", - "tags": [ - "access_control", - "enterprise" - ], + "tags": ["access_control", "enterprise"], "summary": "Get status.", "operationId": "getAccessControlStatus", "responses": { @@ -308,10 +277,7 @@ "/access-control/teams/roles/search": { "post": { "description": "Lists the roles that have been directly assigned to the given teams.\n\nYou need to have a permission with action `teams.roles:read` and scope `teams:id:*`.", - "tags": [ - "access_control", - "enterprise" - ], + "tags": ["access_control", "enterprise"], "summary": "List roles assigned to multiple teams.", "operationId": "listTeamsRoles", "parameters": [ @@ -343,10 +309,7 @@ "/access-control/teams/{teamId}/roles": { "get": { "description": "You need to have a permission with action `teams.roles:read` and scope `teams:id:\u003cteam ID\u003e`.", - "tags": [ - "access_control", - "enterprise" - ], + "tags": ["access_control", "enterprise"], "summary": "Get team roles.", "operationId": "listTeamRoles", "parameters": [ @@ -381,10 +344,7 @@ }, "put": { "description": "You need to have a permission with action `teams.roles:add` and `teams.roles:remove` and scope `permissions:type:delegate` for each.", - "tags": [ - "access_control", - "enterprise" - ], + "tags": ["access_control", "enterprise"], "summary": "Update team role.", "operationId": "setTeamRoles", "parameters": [ @@ -430,10 +390,7 @@ }, "post": { "description": "You need to have a permission with action `teams.roles:add` and scope `permissions:type:delegate`.", - "tags": [ - "access_control", - "enterprise" - ], + "tags": ["access_control", "enterprise"], "summary": "Add team role.", "operationId": "addTeamRole", "parameters": [ @@ -475,10 +432,7 @@ "/access-control/teams/{teamId}/roles/{roleUID}": { "delete": { "description": "You need to have a permission with action `teams.roles:remove` and scope `permissions:type:delegate`.", - "tags": [ - "access_control", - "enterprise" - ], + "tags": ["access_control", "enterprise"], "summary": "Remove team role.", "operationId": "removeTeamRole", "parameters": [ @@ -518,10 +472,7 @@ "/access-control/users/roles/search": { "post": { "description": "Lists the roles that have been directly assigned to the given users. The list does not include built-in roles (Viewer, Editor, Admin or Grafana Admin), and it does not include roles that have been inherited from a team.\n\nYou need to have a permission with action `users.roles:read` and scope `users:id:*`.", - "tags": [ - "access_control", - "enterprise" - ], + "tags": ["access_control", "enterprise"], "summary": "List roles assigned to multiple users.", "operationId": "listUsersRoles", "parameters": [ @@ -553,10 +504,7 @@ "/access-control/users/{userId}/roles": { "get": { "description": "Lists the roles that have been directly assigned to a given user. The list does not include built-in roles (Viewer, Editor, Admin or Grafana Admin), and it does not include roles that have been inherited from a team.\n\nYou need to have a permission with action `users.roles:read` and scope `users:id:\u003cuser ID\u003e`.", - "tags": [ - "access_control", - "enterprise" - ], + "tags": ["access_control", "enterprise"], "summary": "List roles assigned to a user.", "operationId": "listUserRoles", "parameters": [ @@ -596,10 +544,7 @@ }, "put": { "description": "Update the user’s role assignments to match the provided set of UIDs. This will remove any assigned roles that aren’t in the request and add roles that are in the set but are not already assigned to the user.\nRoles mapped through group attribute sync are not impacted.\nIf you want to add or remove a single role, consider using Add a user role assignment or Remove a user role assignment instead.\n\nYou need to have a permission with action `users.roles:add` and `users.roles:remove` and scope `permissions:type:delegate` for each. `permissions:type:delegate` scope ensures that users can only assign or unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign or unassign a role which will allow to do that. This is done to prevent escalation of privileges.", - "tags": [ - "access_control", - "enterprise" - ], + "tags": ["access_control", "enterprise"], "summary": "Set user role assignments.", "operationId": "setUserRoles", "parameters": [ @@ -645,10 +590,7 @@ }, "post": { "description": "Assign a role to a specific user. For bulk updates consider Set user role assignments.\n\nYou need to have a permission with action `users.roles:add` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only assign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign a role which will allow to do that. This is done to prevent escalation of privileges.", - "tags": [ - "access_control", - "enterprise" - ], + "tags": ["access_control", "enterprise"], "summary": "Add a user role assignment.", "operationId": "addUserRole", "parameters": [ @@ -687,10 +629,7 @@ "/access-control/users/{userId}/roles/{roleUID}": { "delete": { "description": "Revoke a role from a user. For bulk updates consider Set user role assignments.\n\nYou need to have a permission with action `users.roles:remove` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to unassign a role which will allow to do that. This is done to prevent escalation of privileges.", - "tags": [ - "access_control", - "enterprise" - ], + "tags": ["access_control", "enterprise"], "summary": "Remove a user role assignment.", "operationId": "removeUserRole", "parameters": [ @@ -735,9 +674,7 @@ }, "/access-control/{resource}/description": { "get": { - "tags": [ - "access_control" - ], + "tags": ["access_control"], "summary": "Get a description of a resource's access control properties.", "operationId": "getResourceDescription", "parameters": [ @@ -763,9 +700,7 @@ }, "/access-control/{resource}/{resourceID}": { "get": { - "tags": [ - "access_control" - ], + "tags": ["access_control"], "summary": "Get permissions for a resource.", "operationId": "getResourcePermissions", "parameters": [ @@ -799,9 +734,7 @@ }, "post": { "description": "Assigns permissions for a resource by a given type (`:resource`) and `:resourceID` to one or many\nassignment types. Allowed resources are `datasources`, `teams`, `dashboards`, `folders`, and `serviceaccounts`.\nRefer to the `/access-control/{resource}/description` endpoint for allowed Permissions.", - "tags": [ - "access_control" - ], + "tags": ["access_control"], "summary": "Set resource permissions.", "operationId": "setResourcePermissions", "parameters": [ @@ -848,9 +781,7 @@ "/access-control/{resource}/{resourceID}/builtInRoles/{builtInRole}": { "post": { "description": "Assigns permissions for a resource by a given type (`:resource`) and `:resourceID` to a built-in role.\nAllowed resources are `datasources`, `teams`, `dashboards`, `folders`, and `serviceaccounts`.\nRefer to the `/access-control/{resource}/description` endpoint for allowed Permissions.", - "tags": [ - "access_control" - ], + "tags": ["access_control"], "summary": "Set resource permissions for a built-in role.", "operationId": "setResourcePermissionsForBuiltInRole", "parameters": [ @@ -903,9 +834,7 @@ "/access-control/{resource}/{resourceID}/teams/{teamID}": { "post": { "description": "Assigns permissions for a resource by a given type (`:resource`) and `:resourceID` to a team.\nAllowed resources are `datasources`, `teams`, `dashboards`, `folders`, and `serviceaccounts`.\nRefer to the `/access-control/{resource}/description` endpoint for allowed Permissions.", - "tags": [ - "access_control" - ], + "tags": ["access_control"], "summary": "Set resource permissions for a team.", "operationId": "setResourcePermissionsForTeam", "parameters": [ @@ -959,9 +888,7 @@ "/access-control/{resource}/{resourceID}/users/{userID}": { "post": { "description": "Assigns permissions for a resource by a given type (`:resource`) and `:resourceID` to a user or a service account.\nAllowed resources are `datasources`, `teams`, `dashboards`, `folders`, and `serviceaccounts`.\nRefer to the `/access-control/{resource}/description` endpoint for allowed Permissions.", - "tags": [ - "access_control" - ], + "tags": ["access_control"], "summary": "Set resource permissions for a user.", "operationId": "setResourcePermissionsForUser", "parameters": [ @@ -1015,10 +942,7 @@ "/admin/ldap-sync-status": { "get": { "description": "You need to have a permission with action `ldap.status:read`.", - "tags": [ - "admin_ldap", - "enterprise" - ], + "tags": ["admin_ldap", "enterprise"], "summary": "Returns the current state of the LDAP background sync integration.", "operationId": "getSyncStatus", "responses": { @@ -1045,9 +969,7 @@ } ], "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.config:reload`.", - "tags": [ - "admin_ldap" - ], + "tags": ["admin_ldap"], "summary": "Reloads the LDAP configuration.", "operationId": "reloadLDAPCfg", "responses": { @@ -1065,9 +987,7 @@ } ], "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.status:read`.", - "tags": [ - "admin_ldap" - ], + "tags": ["admin_ldap"], "summary": "Attempts to connect to all the configured LDAP servers and returns information on whenever they're available or not.", "operationId": "getLDAPStatus", "responses": { @@ -1094,9 +1014,7 @@ } ], "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.user:sync`.", - "tags": [ - "admin_ldap" - ], + "tags": ["admin_ldap"], "summary": "Enables a single Grafana user to be synchronized against LDAP.", "operationId": "postSyncUserWithLDAP", "parameters": [ @@ -1132,9 +1050,7 @@ } ], "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.user:read`.", - "tags": [ - "admin_ldap" - ], + "tags": ["admin_ldap"], "summary": "Finds an user based on a username in LDAP. This helps illustrate how would the particular user be mapped in Grafana when synced.", "operationId": "getUserFromLDAP", "parameters": [ @@ -1163,11 +1079,7 @@ }, "/admin/provisioning/access-control/reload": { "post": { - "tags": [ - "admin_provisioning", - "access_control", - "enterprise" - ], + "tags": ["admin_provisioning", "access_control", "enterprise"], "summary": "You need to have a permission with action `provisioning:reload` with scope `provisioners:accesscontrol`.", "operationId": "adminProvisioningReloadAccessControl", "responses": { @@ -1191,9 +1103,7 @@ } ], "description": "Reloads the provisioning config files for dashboards again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:dashboards`.", - "tags": [ - "admin_provisioning" - ], + "tags": ["admin_provisioning"], "summary": "Reload dashboard provisioning configurations.", "operationId": "adminProvisioningReloadDashboards", "responses": { @@ -1220,9 +1130,7 @@ } ], "description": "Reloads the provisioning config files for datasources again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:datasources`.", - "tags": [ - "admin_provisioning" - ], + "tags": ["admin_provisioning"], "summary": "Reload datasource provisioning configurations.", "operationId": "adminProvisioningReloadDatasources", "responses": { @@ -1249,9 +1157,7 @@ } ], "description": "Reloads the provisioning config files for plugins again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:plugin`.", - "tags": [ - "admin_provisioning" - ], + "tags": ["admin_provisioning"], "summary": "Reload plugin provisioning configurations.", "operationId": "adminProvisioningReloadPlugins", "responses": { @@ -1278,9 +1184,7 @@ } ], "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `settings:read` and scopes: `settings:*`, `settings:auth.saml:` and `settings:auth.saml:enabled` (property level).", - "tags": [ - "admin" - ], + "tags": ["admin"], "summary": "Fetch settings.", "operationId": "adminGetSettings", "responses": { @@ -1299,9 +1203,7 @@ "/admin/stats": { "get": { "description": "Only works with Basic Authentication (username and password). See introduction for an explanation.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `server:stats:read`.", - "tags": [ - "admin" - ], + "tags": ["admin"], "summary": "Fetch Grafana Stats.", "operationId": "adminGetStats", "responses": { @@ -1328,9 +1230,7 @@ } ], "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users:create`.\nNote that OrgId is an optional parameter that can be used to assign a new user to a different organization when `auto_assign_org` is set to `true`.", - "tags": [ - "admin_users" - ], + "tags": ["admin_users"], "summary": "Create new user.", "operationId": "adminCreateUser", "parameters": [ @@ -1373,9 +1273,7 @@ } ], "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users:delete` and scope `global.users:*`.", - "tags": [ - "admin_users" - ], + "tags": ["admin_users"], "summary": "Delete global User.", "operationId": "adminDeleteUser", "parameters": [ @@ -1414,9 +1312,7 @@ } ], "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.authtoken:list` and scope `global.users:*`.", - "tags": [ - "admin_users" - ], + "tags": ["admin_users"], "summary": "Return a list of all auth tokens (devices) that the user currently have logged in from.", "operationId": "adminGetUserAuthTokens", "parameters": [ @@ -1452,9 +1348,7 @@ } ], "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users:disable` and scope `global.users:1` (userIDScope).", - "tags": [ - "admin_users" - ], + "tags": ["admin_users"], "summary": "Disable user.", "operationId": "adminDisableUser", "parameters": [ @@ -1493,9 +1387,7 @@ } ], "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users:enable` and scope `global.users:1` (userIDScope).", - "tags": [ - "admin_users" - ], + "tags": ["admin_users"], "summary": "Enable user.", "operationId": "adminEnableUser", "parameters": [ @@ -1534,9 +1426,7 @@ } ], "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.logout` and scope `global.users:*`.", - "tags": [ - "admin_users" - ], + "tags": ["admin_users"], "summary": "Logout user revokes all auth tokens (devices) for the user. User of issued auth tokens (devices) will no longer be logged in and will be required to authenticate again upon next activity.", "operationId": "adminLogoutUser", "parameters": [ @@ -1578,9 +1468,7 @@ } ], "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.password:update` and scope `global.users:*`.", - "tags": [ - "admin_users" - ], + "tags": ["admin_users"], "summary": "Set password for user.", "operationId": "adminUpdateUserPassword", "parameters": [ @@ -1622,9 +1510,7 @@ "/admin/users/{user_id}/permissions": { "put": { "description": "Only works with Basic Authentication (username and password). See introduction for an explanation.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.permissions:update` and scope `global.users:*`.", - "tags": [ - "admin_users" - ], + "tags": ["admin_users"], "summary": "Set permissions for user.", "operationId": "adminUpdateUserPermissions", "parameters": [ @@ -1671,10 +1557,7 @@ } ], "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.quotas:list` and scope `global.users:1` (userIDScope).", - "tags": [ - "quota", - "admin_users" - ], + "tags": ["quota", "admin_users"], "summary": "Fetch user quota.", "operationId": "getUserQuota", "parameters": [ @@ -1713,10 +1596,7 @@ } ], "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.quotas:update` and scope `global.users:1` (userIDScope).", - "tags": [ - "quota", - "admin_users" - ], + "tags": ["quota", "admin_users"], "summary": "Update user quota.", "operationId": "updateUserQuota", "parameters": [ @@ -1769,9 +1649,7 @@ } ], "description": "Revokes the given auth token (device) for the user. User of issued auth token (device) will no longer be logged in and will be required to authenticate again upon next activity.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.authtoken:update` and scope `global.users:*`.", - "tags": [ - "admin_users" - ], + "tags": ["admin_users"], "summary": "Revoke auth token for user.", "operationId": "adminRevokeUserAuthToken", "parameters": [ @@ -1816,9 +1694,7 @@ "/annotations": { "get": { "description": "Starting in Grafana v6.4 regions annotations are now returned in one entity that now includes the timeEnd property.", - "tags": [ - "annotations" - ], + "tags": ["annotations"], "summary": "Find Annotations.", "operationId": "getAnnotations", "parameters": [ @@ -1894,10 +1770,7 @@ "in": "query" }, { - "enum": [ - "alert", - "annotation" - ], + "enum": ["alert", "annotation"], "type": "string", "description": "Return alerts or user created annotations", "name": "type", @@ -1924,9 +1797,7 @@ }, "post": { "description": "Creates an annotation in the Grafana database. The dashboardId and panelId fields are optional. If they are not specified then an organization annotation is created and can be queried in any dashboard that adds the Grafana annotations data source. When creating a region annotation include the timeEnd property.\nThe format for `time` and `timeEnd` should be epoch numbers in millisecond resolution.\nThe response for this HTTP request is slightly different in versions prior to v6.4. In prior versions you would also get an endId if you where creating a region. But in 6.4 regions are represented using a single event with time and timeEnd properties.", - "tags": [ - "annotations" - ], + "tags": ["annotations"], "summary": "Create Annotation.", "operationId": "postAnnotation", "parameters": [ @@ -1961,9 +1832,7 @@ "/annotations/graphite": { "post": { "description": "Creates an annotation by using Graphite-compatible event format. The `when` and `data` fields are optional. If `when` is not specified then the current time will be used as annotation’s timestamp. The `tags` field can also be in prior to Graphite `0.10.0` format (string with multiple tags being separated by a space).", - "tags": [ - "annotations" - ], + "tags": ["annotations"], "summary": "Create Annotation in Graphite format.", "operationId": "postGraphiteAnnotation", "parameters": [ @@ -1997,9 +1866,7 @@ }, "/annotations/mass-delete": { "post": { - "tags": [ - "annotations" - ], + "tags": ["annotations"], "summary": "Delete multiple annotations.", "operationId": "massDeleteAnnotations", "parameters": [ @@ -2028,9 +1895,7 @@ "/annotations/tags": { "get": { "description": "Find all the event tags created in the annotations.", - "tags": [ - "annotations" - ], + "tags": ["annotations"], "summary": "Find Annotations Tags.", "operationId": "getAnnotationTags", "parameters": [ @@ -2063,9 +1928,7 @@ }, "/annotations/{annotation_id}": { "get": { - "tags": [ - "annotations" - ], + "tags": ["annotations"], "summary": "Get Annotation by ID.", "operationId": "getAnnotationByID", "parameters": [ @@ -2090,9 +1953,7 @@ }, "put": { "description": "Updates all properties of an annotation that matches the specified id. To only update certain property, consider using the Patch Annotation operation.", - "tags": [ - "annotations" - ], + "tags": ["annotations"], "summary": "Update Annotation.", "operationId": "updateAnnotation", "parameters": [ @@ -2131,9 +1992,7 @@ }, "delete": { "description": "Deletes the annotation that matches the specified ID.", - "tags": [ - "annotations" - ], + "tags": ["annotations"], "summary": "Delete Annotation By ID.", "operationId": "deleteAnnotationByID", "parameters": [ @@ -2161,9 +2020,7 @@ }, "patch": { "description": "Updates one or more properties of an annotation that matches the specified ID.\nThis operation currently supports updating of the `text`, `tags`, `time` and `timeEnd` properties.\nThis is available in Grafana 6.0.0-beta2 and above.", - "tags": [ - "annotations" - ], + "tags": ["annotations"], "summary": "Patch Annotation.", "operationId": "patchAnnotation", "parameters": [ @@ -2203,12 +2060,8 @@ }, "/anonymous/devices": { "get": { - "produces": [ - "application/json" - ], - "tags": [ - "devices" - ], + "produces": ["application/json"], + "tags": ["devices"], "summary": "Lists all devices within the last 30 days", "operationId": "listDevices", "responses": { @@ -2232,12 +2085,8 @@ }, "/anonymous/search": { "get": { - "produces": [ - "application/json" - ], - "tags": [ - "devices" - ], + "produces": ["application/json"], + "tags": ["devices"], "summary": "Lists all devices within the last 30 days", "operationId": "SearchDevices", "responses": { @@ -2261,9 +2110,7 @@ }, "/cloudmigration/migration": { "get": { - "tags": [ - "migrations" - ], + "tags": ["migrations"], "summary": "Get a list of all cloud migration sessions that have been created.", "operationId": "getSessionList", "responses": { @@ -2282,9 +2129,7 @@ } }, "post": { - "tags": [ - "migrations" - ], + "tags": ["migrations"], "summary": "Create a migration session.", "operationId": "createSession", "parameters": [ @@ -2318,9 +2163,7 @@ }, "/cloudmigration/migration/{uid}": { "get": { - "tags": [ - "migrations" - ], + "tags": ["migrations"], "summary": "Get a cloud migration session by its uid.", "operationId": "getSession", "parameters": [ @@ -2351,9 +2194,7 @@ } }, "delete": { - "tags": [ - "migrations" - ], + "tags": ["migrations"], "summary": "Delete a migration session by its uid.", "operationId": "deleteSession", "parameters": [ @@ -2384,9 +2225,7 @@ "/cloudmigration/migration/{uid}/snapshot": { "post": { "description": "If the snapshot initialization is successful, the snapshot uid is returned.", - "tags": [ - "migrations" - ], + "tags": ["migrations"], "summary": "Trigger the creation of an instance snapshot associated with the provided session.", "operationId": "createSnapshot", "parameters": [ @@ -2427,9 +2266,7 @@ }, "/cloudmigration/migration/{uid}/snapshot/{snapshotUid}": { "get": { - "tags": [ - "migrations" - ], + "tags": ["migrations"], "summary": "Get metadata about a snapshot, including where it is in its processing and final results.", "operationId": "getSnapshot", "parameters": [ @@ -2507,9 +2344,7 @@ "/cloudmigration/migration/{uid}/snapshot/{snapshotUid}/cancel": { "post": { "description": "TODO: Implement", - "tags": [ - "migrations" - ], + "tags": ["migrations"], "summary": "Cancel a snapshot, wherever it is in its processing chain.", "operationId": "cancelSnapshot", "parameters": [ @@ -2549,9 +2384,7 @@ }, "/cloudmigration/migration/{uid}/snapshot/{snapshotUid}/upload": { "post": { - "tags": [ - "migrations" - ], + "tags": ["migrations"], "summary": "Upload a snapshot to the Grafana Migration Service for processing.", "operationId": "uploadSnapshot", "parameters": [ @@ -2591,9 +2424,7 @@ }, "/cloudmigration/migration/{uid}/snapshots": { "get": { - "tags": [ - "migrations" - ], + "tags": ["migrations"], "summary": "Get a list of snapshots for a session.", "operationId": "getShapshotList", "parameters": [ @@ -2648,9 +2479,7 @@ }, "/cloudmigration/resources/dependencies": { "get": { - "tags": [ - "migrations" - ], + "tags": ["migrations"], "summary": "Get the resource dependencies graph for the current set of migratable resources.", "operationId": "getResourceDependencies", "responses": { @@ -2662,9 +2491,7 @@ }, "/cloudmigration/token": { "get": { - "tags": [ - "migrations" - ], + "tags": ["migrations"], "summary": "Fetch the cloud migration token if it exists.", "operationId": "getCloudMigrationToken", "responses": { @@ -2686,9 +2513,7 @@ } }, "post": { - "tags": [ - "migrations" - ], + "tags": ["migrations"], "summary": "Create gcom access token.", "operationId": "createCloudMigrationToken", "responses": { @@ -2709,9 +2534,7 @@ }, "/cloudmigration/token/{uid}": { "delete": { - "tags": [ - "migrations" - ], + "tags": ["migrations"], "summary": "Deletes a cloud migration token.", "operationId": "deleteCloudMigrationToken", "parameters": [ @@ -2744,12 +2567,8 @@ }, "/convert/api/prom/rules": { "get": { - "produces": [ - "application/yaml" - ], - "tags": [ - "convert_prometheus" - ], + "produces": ["application/yaml"], + "tags": ["convert_prometheus"], "summary": "Gets all Grafana-managed alert rules that were imported from Prometheus-compatible sources, grouped by namespace.", "operationId": "RouteConvertPrometheusCortexGetRules", "responses": { @@ -2774,16 +2593,9 @@ } }, "post": { - "consumes": [ - "application/json", - "application/yaml" - ], - "produces": [ - "application/json" - ], - "tags": [ - "convert_prometheus" - ], + "consumes": ["application/json", "application/yaml"], + "produces": ["application/json"], + "tags": ["convert_prometheus"], "summary": "Converts the submitted rule groups into Grafana-Managed Rules.", "operationId": "RouteConvertPrometheusCortexPostRuleGroups", "responses": { @@ -2804,12 +2616,8 @@ }, "/convert/api/prom/rules/{NamespaceTitle}": { "get": { - "produces": [ - "application/yaml" - ], - "tags": [ - "convert_prometheus" - ], + "produces": ["application/yaml"], + "tags": ["convert_prometheus"], "summary": "Gets Grafana-managed alert rules that were imported from Prometheus-compatible sources for a specified namespace (folder).", "operationId": "RouteConvertPrometheusCortexGetNamespace", "parameters": [ @@ -2843,15 +2651,9 @@ }, "post": { "description": "If the group already exists and was not imported from a Prometheus-compatible source initially,\nit will not be replaced and an error will be returned.", - "consumes": [ - "application/yaml" - ], - "produces": [ - "application/json" - ], - "tags": [ - "convert_prometheus" - ], + "consumes": ["application/yaml"], + "produces": ["application/json"], + "tags": ["convert_prometheus"], "summary": "Converts a Prometheus rule group into a Grafana rule group and creates or updates it within the specified namespace.", "operationId": "RouteConvertPrometheusCortexPostRuleGroup", "parameters": [ @@ -2916,12 +2718,8 @@ "x-raw-request": "true" }, "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "convert_prometheus" - ], + "produces": ["application/json"], + "tags": ["convert_prometheus"], "summary": "Deletes all rule groups that were imported from Prometheus-compatible sources within the specified namespace.", "operationId": "RouteConvertPrometheusCortexDeleteNamespace", "parameters": [ @@ -2950,12 +2748,8 @@ }, "/convert/api/prom/rules/{NamespaceTitle}/{Group}": { "get": { - "produces": [ - "application/yaml" - ], - "tags": [ - "convert_prometheus" - ], + "produces": ["application/yaml"], + "tags": ["convert_prometheus"], "summary": "Gets a single rule group in Prometheus-compatible format if it was imported from a Prometheus-compatible source.", "operationId": "RouteConvertPrometheusCortexGetRuleGroup", "parameters": [ @@ -2994,12 +2788,8 @@ } }, "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "convert_prometheus" - ], + "produces": ["application/json"], + "tags": ["convert_prometheus"], "summary": "Deletes a specific rule group if it was imported from a Prometheus-compatible source.", "operationId": "RouteConvertPrometheusCortexDeleteRuleGroup", "parameters": [ @@ -3034,12 +2824,8 @@ }, "/convert/prometheus/config/v1/rules": { "get": { - "produces": [ - "application/yaml" - ], - "tags": [ - "convert_prometheus" - ], + "produces": ["application/yaml"], + "tags": ["convert_prometheus"], "summary": "Gets all Grafana-managed alert rules that were imported from Prometheus-compatible sources, grouped by namespace.", "operationId": "RouteConvertPrometheusGetRules", "responses": { @@ -3064,16 +2850,9 @@ } }, "post": { - "consumes": [ - "application/json", - "application/yaml" - ], - "produces": [ - "application/json" - ], - "tags": [ - "convert_prometheus" - ], + "consumes": ["application/json", "application/yaml"], + "produces": ["application/json"], + "tags": ["convert_prometheus"], "summary": "Converts the submitted rule groups into Grafana-Managed Rules.", "operationId": "RouteConvertPrometheusPostRuleGroups", "responses": { @@ -3094,12 +2873,8 @@ }, "/convert/prometheus/config/v1/rules/{NamespaceTitle}": { "get": { - "produces": [ - "application/yaml" - ], - "tags": [ - "convert_prometheus" - ], + "produces": ["application/yaml"], + "tags": ["convert_prometheus"], "summary": "Gets Grafana-managed alert rules that were imported from Prometheus-compatible sources for a specified namespace (folder).", "operationId": "RouteConvertPrometheusGetNamespace", "parameters": [ @@ -3133,15 +2908,9 @@ }, "post": { "description": "If the group already exists and was not imported from a Prometheus-compatible source initially,\nit will not be replaced and an error will be returned.", - "consumes": [ - "application/yaml" - ], - "produces": [ - "application/json" - ], - "tags": [ - "convert_prometheus" - ], + "consumes": ["application/yaml"], + "produces": ["application/json"], + "tags": ["convert_prometheus"], "summary": "Converts a Prometheus rule group into a Grafana rule group and creates or updates it within the specified namespace.", "operationId": "RouteConvertPrometheusPostRuleGroup", "parameters": [ @@ -3206,12 +2975,8 @@ "x-raw-request": "true" }, "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "convert_prometheus" - ], + "produces": ["application/json"], + "tags": ["convert_prometheus"], "summary": "Deletes all rule groups that were imported from Prometheus-compatible sources within the specified namespace.", "operationId": "RouteConvertPrometheusDeleteNamespace", "parameters": [ @@ -3240,12 +3005,8 @@ }, "/convert/prometheus/config/v1/rules/{NamespaceTitle}/{Group}": { "get": { - "produces": [ - "application/yaml" - ], - "tags": [ - "convert_prometheus" - ], + "produces": ["application/yaml"], + "tags": ["convert_prometheus"], "summary": "Gets a single rule group in Prometheus-compatible format if it was imported from a Prometheus-compatible source.", "operationId": "RouteConvertPrometheusGetRuleGroup", "parameters": [ @@ -3284,12 +3045,8 @@ } }, "delete": { - "produces": [ - "application/json" - ], - "tags": [ - "convert_prometheus" - ], + "produces": ["application/json"], + "tags": ["convert_prometheus"], "summary": "Deletes a specific rule group if it was imported from a Prometheus-compatible source.", "operationId": "RouteConvertPrometheusDeleteRuleGroup", "parameters": [ @@ -3324,10 +3081,7 @@ }, "/dashboard/snapshots": { "get": { - "tags": [ - "dashboards", - "snapshots" - ], + "tags": ["dashboards", "snapshots"], "summary": "List snapshots.", "operationId": "searchDashboardSnapshots", "parameters": [ @@ -3359,9 +3113,7 @@ "/dashboards/db": { "post": { "description": "Creates a new dashboard or updates an existing dashboard.\nNote: This endpoint is not intended for creating folders, use `POST /api/folders` for that.\n\nUse: /apis/dashboards.grafana.app/v1/namespaces/{ns}/dashboards", - "tags": [ - "dashboards" - ], + "tags": ["dashboards"], "summary": "Create / Update dashboard", "operationId": "postDashboard", "deprecated": true, @@ -3406,9 +3158,7 @@ "/dashboards/home": { "get": { "description": "NOTE: the home dashboard is configured in preferences. This API will be removed in G13", - "tags": [ - "dashboards" - ], + "tags": ["dashboards"], "operationId": "getHomeDashboard", "deprecated": true, "responses": { @@ -3426,9 +3176,7 @@ }, "/dashboards/import": { "post": { - "tags": [ - "dashboards" - ], + "tags": ["dashboards"], "summary": "Import dashboard.", "operationId": "importDashboard", "parameters": [ @@ -3465,9 +3213,7 @@ }, "/dashboards/interpolate": { "post": { - "tags": [ - "dashboards" - ], + "tags": ["dashboards"], "summary": "Interpolate dashboard. This is an experimental endpoint under dashboardLibrary or suggestedDashboards feature flags and is subject to change.", "operationId": "interpolateDashboard", "responses": { @@ -3492,10 +3238,7 @@ "/dashboards/public-dashboards": { "get": { "description": "Get list of public dashboards", - "tags": [ - "dashboards", - "dashboard_public" - ], + "tags": ["dashboards", "dashboard_public"], "operationId": "listPublicDashboards", "responses": { "200": { @@ -3515,9 +3258,7 @@ }, "/dashboards/tags": { "get": { - "tags": [ - "dashboards" - ], + "tags": ["dashboards"], "summary": "Get all dashboards tags of an organization.", "operationId": "getDashboardTags", "deprecated": true, @@ -3537,10 +3278,7 @@ "/dashboards/uid/{dashboardUid}/public-dashboards": { "get": { "description": "Get public dashboard by dashboardUid", - "tags": [ - "dashboards", - "dashboard_public" - ], + "tags": ["dashboards", "dashboard_public"], "operationId": "getPublicDashboard", "parameters": [ { @@ -3573,13 +3311,8 @@ }, "post": { "description": "Create public dashboard for a dashboard", - "produces": [ - "application/json" - ], - "tags": [ - "dashboards", - "dashboard_public" - ], + "produces": ["application/json"], + "tags": ["dashboards", "dashboard_public"], "operationId": "createPublicDashboard", "parameters": [ { @@ -3619,10 +3352,7 @@ "/dashboards/uid/{dashboardUid}/public-dashboards/{uid}": { "delete": { "description": "Delete public dashboard for a dashboard", - "tags": [ - "dashboards", - "dashboard_public" - ], + "tags": ["dashboards", "dashboard_public"], "operationId": "deletePublicDashboard", "parameters": [ { @@ -3658,13 +3388,8 @@ }, "patch": { "description": "Update public dashboard for a dashboard", - "produces": [ - "application/json" - ], - "tags": [ - "dashboards", - "dashboard_public" - ], + "produces": ["application/json"], + "tags": ["dashboards", "dashboard_public"], "operationId": "updatePublicDashboard", "parameters": [ { @@ -3710,9 +3435,7 @@ "/dashboards/uid/{uid}": { "get": { "description": "Optional query parameter `apiVersion` selects the Kubernetes API version used to load the dashboard first\n(for example `v1beta1`). If that request fails, the default version is used instead. When omitted, only the default is used.\n\nWill return the dashboard given the dashboard unique identifier (uid).\n\nUse: /apis/dashboards.grafana.app/v1/namespaces/{ns}/dashboards/{uid}", - "tags": [ - "dashboards" - ], + "tags": ["dashboards"], "summary": "Get dashboard by uid.", "operationId": "getDashboardByUID", "deprecated": true, @@ -3747,9 +3470,7 @@ }, "delete": { "description": "Will delete the dashboard given the specified unique identifier (uid).\n\nUse: /apis/dashboards.grafana.app/v1/namespaces/{ns}/dashboards/{uid}", - "tags": [ - "dashboards" - ], + "tags": ["dashboards"], "summary": "Delete dashboard by uid.", "operationId": "deleteDashboardByUID", "deprecated": true, @@ -3783,10 +3504,7 @@ "/dashboards/uid/{uid}/permissions": { "get": { "description": "Use: /apis/dashboards.grafana.app/v1/namespaces/{ns}/dashboards/{uid}/access", - "tags": [ - "dashboards", - "permissions" - ], + "tags": ["dashboards", "permissions"], "summary": "Gets all existing permissions for the given dashboard.", "operationId": "getDashboardPermissionsListByUID", "deprecated": true, @@ -3818,10 +3536,7 @@ }, "post": { "description": "This operation will remove existing permissions if they’re not included in the request.", - "tags": [ - "dashboards", - "permissions" - ], + "tags": ["dashboards", "permissions"], "summary": "Updates permissions for a dashboard.", "operationId": "updateDashboardPermissionsByUID", "deprecated": true, @@ -3866,10 +3581,7 @@ "/dashboards/uid/{uid}/restore": { "post": { "description": "This API will be removed when /apis/dashboards.grafana.app/v1 is released.\nYou can restore a dashboard by reading it from history, then creating it again.", - "tags": [ - "dashboards", - "versions" - ], + "tags": ["dashboards", "versions"], "summary": "Restore a dashboard to a given dashboard version using UID.", "operationId": "restoreDashboardVersionByUID", "deprecated": true, @@ -3913,10 +3625,7 @@ }, "/dashboards/uid/{uid}/versions": { "get": { - "tags": [ - "dashboards", - "versions" - ], + "tags": ["dashboards", "versions"], "summary": "Gets all existing versions for the dashboard using UID.", "operationId": "getDashboardVersionsByUID", "deprecated": true, @@ -3965,10 +3674,7 @@ }, "/dashboards/uid/{uid}/versions/{DashboardVersionID}": { "get": { - "tags": [ - "dashboards", - "versions" - ], + "tags": ["dashboards", "versions"], "summary": "Get a specific dashboard version using UID.", "operationId": "getDashboardVersionByUID", "deprecated": true, @@ -4009,9 +3715,7 @@ "/datasources": { "get": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scope: `datasources:*`.", - "tags": [ - "datasources" - ], + "tags": ["datasources"], "summary": "Get all data sources.", "operationId": "getDataSources", "responses": { @@ -4031,9 +3735,7 @@ }, "post": { "description": "By defining `password` and `basicAuthPassword` under secureJsonData property\nGrafana encrypts them securely as an encrypted blob in the database.\nThe response then lists the encrypted fields under secureJsonFields.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:create`", - "tags": [ - "datasources" - ], + "tags": ["datasources"], "summary": "Create a data source.", "operationId": "addDataSource", "parameters": [ @@ -4067,10 +3769,7 @@ }, "/datasources/correlations": { "get": { - "tags": [ - "datasources", - "correlations" - ], + "tags": ["datasources", "correlations"], "summary": "Gets all correlations.", "operationId": "getCorrelations", "parameters": [ @@ -4121,9 +3820,7 @@ "/datasources/id/{name}": { "get": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:name:*` and `datasources:name:test_datasource` (single data source).", - "tags": [ - "datasources" - ], + "tags": ["datasources"], "summary": "Get data source Id by Name. This function will be removed in the future.", "operationId": "getDataSourceIdByName", "deprecated": true, @@ -4157,9 +3854,7 @@ "/datasources/name/{name}": { "get": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:name:*` and `datasources:name:test_datasource` (single data source).", - "tags": [ - "datasources" - ], + "tags": ["datasources"], "summary": "Get a single data source by Name. This function will be removed in the future.", "operationId": "getDataSourceByName", "deprecated": true, @@ -4188,9 +3883,7 @@ }, "delete": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:delete` and scopes: `datasources:*`, `datasources:name:*` and `datasources:name:test_datasource` (single data source).", - "tags": [ - "datasources" - ], + "tags": ["datasources"], "summary": "Delete an existing data source by name. This function will be removed in the future.", "operationId": "deleteDataSourceByName", "deprecated": true, @@ -4224,9 +3917,7 @@ "/datasources/proxy/uid/{uid}/{datasource_proxy_route}": { "get": { "description": "Proxies all calls to the actual data source.", - "tags": [ - "datasources" - ], + "tags": ["datasources"], "summary": "Data source proxy GET calls.", "operationId": "datasourceProxyGETByUIDcalls", "parameters": [ @@ -4266,9 +3957,7 @@ }, "post": { "description": "Proxies all calls to the actual data source. The data source should support POST methods for the specific path and role as defined", - "tags": [ - "datasources" - ], + "tags": ["datasources"], "summary": "Data source proxy POST calls.", "operationId": "datasourceProxyPOSTByUIDcalls", "parameters": [ @@ -4317,9 +4006,7 @@ }, "delete": { "description": "Proxies all calls to the actual data source.", - "tags": [ - "datasources" - ], + "tags": ["datasources"], "summary": "Data source proxy DELETE calls.", "operationId": "datasourceProxyDELETEByUIDcalls", "parameters": [ @@ -4360,10 +4047,7 @@ }, "/datasources/uid/{sourceUID}/correlations": { "get": { - "tags": [ - "datasources", - "correlations" - ], + "tags": ["datasources", "correlations"], "summary": "Gets all correlations originating from the given data source.", "operationId": "getCorrelationsBySourceUID", "parameters": [ @@ -4390,10 +4074,7 @@ } }, "post": { - "tags": [ - "datasources", - "correlations" - ], + "tags": ["datasources", "correlations"], "summary": "Add correlation.", "operationId": "createCorrelation", "parameters": [ @@ -4436,10 +4117,7 @@ }, "/datasources/uid/{sourceUID}/correlations/{correlationUID}": { "get": { - "tags": [ - "datasources", - "correlations" - ], + "tags": ["datasources", "correlations"], "summary": "Gets a correlation.", "operationId": "getCorrelation", "parameters": [ @@ -4472,10 +4150,7 @@ } }, "patch": { - "tags": [ - "datasources", - "correlations" - ], + "tags": ["datasources", "correlations"], "summary": "Updates a correlation.", "operationId": "updateCorrelation", "parameters": [ @@ -4524,9 +4199,7 @@ "/datasources/uid/{uid}": { "get": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:kLtEtcRGk` (single data source).", - "tags": [ - "datasources" - ], + "tags": ["datasources"], "summary": "Get a single data source by UID.", "operationId": "getDataSourceByUID", "parameters": [ @@ -4560,9 +4233,7 @@ }, "put": { "description": "Similar to creating a data source, `password` and `basicAuthPassword` should be defined under\nsecureJsonData in order to be stored securely as an encrypted blob in the database. Then, the\nencrypted fields are listed under secureJsonFields section in the response.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:write` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:1` (single data source).", - "tags": [ - "datasources" - ], + "tags": ["datasources"], "summary": "Update an existing data source.", "operationId": "updateDataSourceByUID", "parameters": [ @@ -4601,9 +4272,7 @@ }, "delete": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:delete` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:kLtEtcRGk` (single data source).", - "tags": [ - "datasources" - ], + "tags": ["datasources"], "summary": "Delete an existing data source by UID.", "operationId": "deleteDataSourceByUID", "parameters": [ @@ -4635,10 +4304,7 @@ }, "/datasources/uid/{uid}/correlations/{correlationUID}": { "delete": { - "tags": [ - "datasources", - "correlations" - ], + "tags": ["datasources", "correlations"], "summary": "Delete a correlation.", "operationId": "deleteCorrelation", "parameters": [ @@ -4676,10 +4342,7 @@ }, "/datasources/uid/{uid}/health": { "get": { - "tags": [ - "datasources", - "health" - ], + "tags": ["datasources", "health"], "summary": "Sends a health check request to the plugin datasource identified by the UID.", "operationId": "checkDatasourceHealthWithUID", "parameters": [ @@ -4711,9 +4374,7 @@ }, "/datasources/uid/{uid}/lbac/teams": { "get": { - "tags": [ - "enterprise" - ], + "tags": ["enterprise"], "summary": "Retrieves LBAC rules for a team.", "operationId": "getTeamLBACRulesApi", "parameters": [ @@ -4746,9 +4407,7 @@ } }, "put": { - "tags": [ - "enterprise" - ], + "tags": ["enterprise"], "summary": "Updates LBAC rules for a team.", "operationId": "updateTeamLBACRulesApi", "parameters": [ @@ -4790,9 +4449,7 @@ }, "/datasources/uid/{uid}/resources/{datasource_proxy_route}": { "get": { - "tags": [ - "datasources" - ], + "tags": ["datasources"], "summary": "Fetch data source resources.", "operationId": "callDatasourceResourceWithUID", "parameters": [ @@ -4834,9 +4491,7 @@ "/datasources/{dataSourceUID}/cache": { "get": { "description": "get cache config for a single data source", - "tags": [ - "enterprise" - ], + "tags": ["enterprise"], "operationId": "getDataSourceCacheConfig", "parameters": [ { @@ -4865,9 +4520,7 @@ }, "post": { "description": "set cache config for a single data source", - "tags": [ - "enterprise" - ], + "tags": ["enterprise"], "operationId": "setDataSourceCacheConfig", "parameters": [ { @@ -4909,9 +4562,7 @@ "/datasources/{dataSourceUID}/cache/clean": { "post": { "description": "clean cache for a single data source", - "tags": [ - "enterprise" - ], + "tags": ["enterprise"], "operationId": "cleanDataSourceCache", "parameters": [ { @@ -4937,9 +4588,7 @@ "/datasources/{dataSourceUID}/cache/disable": { "post": { "description": "disable cache for a single data source", - "tags": [ - "enterprise" - ], + "tags": ["enterprise"], "operationId": "disableDataSourceCache", "parameters": [ { @@ -4970,9 +4619,7 @@ "/datasources/{dataSourceUID}/cache/enable": { "post": { "description": "enable cache for a single data source", - "tags": [ - "enterprise" - ], + "tags": ["enterprise"], "operationId": "enableDataSourceCache", "parameters": [ { @@ -5003,9 +4650,7 @@ "/ds/query": { "post": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:query`.", - "tags": [ - "datasources" - ], + "tags": ["datasources"], "summary": "DataSource query metrics with expressions.", "operationId": "queryMetricsWithExpressions", "parameters": [ @@ -5043,9 +4688,7 @@ "/folders": { "get": { "description": "It returns all folders that the authenticated user has permission to view.\nIf nested folders are enabled, it expects an additional query parameter with the parent folder UID\nand returns the immediate subfolders that the authenticated user has permission to view.\nIf the parameter is not supplied then it returns immediate subfolders under the root\nthat the authenticated user has permission to view.\n\nUse: /apis/folder.grafana.app/v1/namespaces/{ns}/folders", - "tags": [ - "folders" - ], + "tags": ["folders"], "summary": "Get all folders.", "operationId": "getFolders", "deprecated": true, @@ -5073,10 +4716,7 @@ "in": "query" }, { - "enum": [ - "Edit", - "View" - ], + "enum": ["Edit", "View"], "type": "string", "default": "View", "description": "Set to `Edit` to return folders that the user can edit", @@ -5101,9 +4741,7 @@ }, "post": { "description": "If nested folders are enabled then it additionally expects the parent folder UID.\n\nUse: /apis/folder.grafana.app/v1/namespaces/{ns}/folders/{folder_uid}", - "tags": [ - "folders" - ], + "tags": ["folders"], "summary": "Create folder.", "operationId": "createFolder", "deprecated": true, @@ -5142,9 +4780,7 @@ "/folders/{folder_uid}": { "get": { "description": "Use: /apis/folder.grafana.app/v1/namespaces/{ns}/folders/{folder_uid}", - "tags": [ - "folders" - ], + "tags": ["folders"], "summary": "Get folder by uid.", "operationId": "getFolderByUID", "deprecated": true, @@ -5176,9 +4812,7 @@ }, "put": { "description": "Use: /apis/folder.grafana.app/v1/namespaces/{ns}/folders/{folder_uid}", - "tags": [ - "folders" - ], + "tags": ["folders"], "summary": "Update folder.", "operationId": "updateFolder", "deprecated": true, @@ -5225,9 +4859,7 @@ }, "delete": { "description": "Deletes an existing folder identified by UID along with all dashboards (and their alerts) stored in the folder. This operation cannot be reverted.\nIf nested folders are enabled then it also deletes all the subfolders.\n\nUse: /apis/folder.grafana.app/v1/namespaces/{ns}/folders/{folder_uid}", - "tags": [ - "folders" - ], + "tags": ["folders"], "summary": "Delete folder.", "operationId": "deleteFolder", "deprecated": true, @@ -5271,9 +4903,7 @@ "/folders/{folder_uid}/counts": { "get": { "description": "Use: /apis/folder.grafana.app/v1/namespaces/{ns}/folders/{folder_uid}", - "tags": [ - "folders" - ], + "tags": ["folders"], "summary": "Gets the count of each descendant of a folder by kind. The folder is identified by UID.", "operationId": "getFolderDescendantCounts", "deprecated": true, @@ -5307,9 +4937,7 @@ "/folders/{folder_uid}/move": { "post": { "description": "Use: /apis/folder.grafana.app/v1/namespaces/{ns}/folders/{folder_uid},\nChanging the parent folder annotation", - "tags": [ - "folders" - ], + "tags": ["folders"], "summary": "Move folder.", "operationId": "moveFolder", "deprecated": true, @@ -5350,10 +4978,7 @@ }, "/folders/{folder_uid}/permissions": { "get": { - "tags": [ - "folders", - "permissions" - ], + "tags": ["folders", "permissions"], "summary": "Gets all existing permissions for the folder with the given `uid`.", "operationId": "getFolderPermissionList", "deprecated": true, @@ -5384,10 +5009,7 @@ } }, "post": { - "tags": [ - "folders", - "permissions" - ], + "tags": ["folders", "permissions"], "summary": "Updates permissions for a folder. This operation will remove existing permissions if they’re not included in the request.", "operationId": "updateFolderPermissions", "parameters": [ @@ -5427,10 +5049,7 @@ }, "/groupsync/groups": { "get": { - "tags": [ - "group_attribute_sync", - "enterprise" - ], + "tags": ["group_attribute_sync", "enterprise"], "summary": "List groups that have mappings set. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", "operationId": "getMappedGroups", "responses": { @@ -5454,10 +5073,7 @@ }, "/groupsync/groups/{group_id}": { "put": { - "tags": [ - "group_attribute_sync", - "enterprise" - ], + "tags": ["group_attribute_sync", "enterprise"], "summary": "Update mappings for a group. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", "operationId": "updateGroupMappings", "parameters": [ @@ -5495,10 +5111,7 @@ } }, "post": { - "tags": [ - "group_attribute_sync", - "enterprise" - ], + "tags": ["group_attribute_sync", "enterprise"], "summary": "Create mappings for a group. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", "operationId": "createGroupMappings", "parameters": [ @@ -5536,10 +5149,7 @@ } }, "delete": { - "tags": [ - "group_attribute_sync", - "enterprise" - ], + "tags": ["group_attribute_sync", "enterprise"], "summary": "Delete mappings for a group. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", "operationId": "deleteGroupMappings", "parameters": [ @@ -5571,10 +5181,7 @@ }, "/groupsync/groups/{group_id}/roles": { "get": { - "tags": [ - "group_attribute_sync", - "enterprise" - ], + "tags": ["group_attribute_sync", "enterprise"], "summary": "Get roles mapped to a group. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", "operationId": "getGroupRoles", "parameters": [ @@ -5610,9 +5217,7 @@ "/health": { "get": { "description": "apiHealthHandler will return ok if Grafana's web server is running and it\ncan access the database. If the database cannot be accessed it will return\nhttp status code 503.", - "tags": [ - "health" - ], + "tags": ["health"], "operationId": "getHealth", "responses": { "200": { @@ -5630,9 +5235,7 @@ "/library-elements": { "get": { "description": "Returns a list of all library elements the authenticated user has permission to view.\nUse the `perPage` query parameter to control the maximum number of library elements returned; the default limit is `100`.\nYou can also use the `page` query parameter to fetch library elements from any page other than the first one.", - "tags": [ - "library_elements" - ], + "tags": ["library_elements"], "summary": "Get all library elements.", "operationId": "getLibraryElements", "parameters": [ @@ -5643,9 +5246,7 @@ "in": "query" }, { - "enum": [ - 1 - ], + "enum": [1], "type": "integer", "format": "int64", "description": "Kind of element to search for.", @@ -5653,10 +5254,7 @@ "in": "query" }, { - "enum": [ - "alpha-asc", - "alpha-desc" - ], + "enum": ["alpha-asc", "alpha-desc"], "type": "string", "description": "Sort order of elements.", "name": "sortDirection", @@ -5717,9 +5315,7 @@ }, "post": { "description": "Creates a new library element.", - "tags": [ - "library_elements" - ], + "tags": ["library_elements"], "summary": "Create library element.", "operationId": "createLibraryElement", "parameters": [ @@ -5757,9 +5353,7 @@ "/library-elements/name/{library_element_name}": { "get": { "description": "Returns a library element with the given name.", - "tags": [ - "library_elements" - ], + "tags": ["library_elements"], "summary": "Get library element by name.", "operationId": "getLibraryElementByName", "parameters": [ @@ -5789,9 +5383,7 @@ "/library-elements/{library_element_uid}": { "get": { "description": "Returns a library element with the given UID.", - "tags": [ - "library_elements" - ], + "tags": ["library_elements"], "summary": "Get library element by UID.", "operationId": "getLibraryElementByUID", "parameters": [ @@ -5822,9 +5414,7 @@ }, "delete": { "description": "Deletes an existing library element as specified by the UID. This operation cannot be reverted.\nYou cannot delete a library element that is connected. This operation cannot be reverted.", - "tags": [ - "library_elements" - ], + "tags": ["library_elements"], "summary": "Delete library element.", "operationId": "deleteLibraryElementByUID", "parameters": [ @@ -5858,9 +5448,7 @@ }, "patch": { "description": "Updates an existing library element identified by uid.", - "tags": [ - "library_elements" - ], + "tags": ["library_elements"], "summary": "Update library element.", "operationId": "updateLibraryElement", "parameters": [ @@ -5907,9 +5495,7 @@ "/library-elements/{library_element_uid}/connections/": { "get": { "description": "Returns a list of connections for a library element based on the UID specified.", - "tags": [ - "library_elements" - ], + "tags": ["library_elements"], "summary": "Get library element connections.", "operationId": "getLibraryElementConnections", "parameters": [ @@ -5941,10 +5527,7 @@ }, "/licensing/check": { "get": { - "tags": [ - "licensing", - "enterprise" - ], + "tags": ["licensing", "enterprise"], "summary": "Check license availability.", "operationId": "getStatus", "responses": { @@ -5957,10 +5540,7 @@ "/licensing/custom-permissions": { "get": { "description": "You need to have a permission with action `licensing.reports:read`.", - "tags": [ - "licensing", - "enterprise" - ], + "tags": ["licensing", "enterprise"], "summary": "Get custom permissions report.", "operationId": "getCustomPermissionsReport", "deprecated": true, @@ -5974,13 +5554,8 @@ "/licensing/custom-permissions-csv": { "get": { "description": "You need to have a permission with action `licensing.reports:read`.", - "produces": [ - "text/csv" - ], - "tags": [ - "licensing", - "enterprise" - ], + "produces": ["text/csv"], + "tags": ["licensing", "enterprise"], "summary": "Get custom permissions report in CSV format.", "operationId": "getCustomPermissionsCSV", "deprecated": true, @@ -5994,10 +5569,7 @@ "/licensing/refresh-stats": { "get": { "description": "You need to have a permission with action `licensing:read`.", - "tags": [ - "licensing", - "enterprise" - ], + "tags": ["licensing", "enterprise"], "summary": "Refresh license stats.", "operationId": "refreshLicenseStats", "responses": { @@ -6013,10 +5585,7 @@ "/licensing/token": { "get": { "description": "You need to have a permission with action `licensing:read`.", - "tags": [ - "licensing", - "enterprise" - ], + "tags": ["licensing", "enterprise"], "summary": "Get license token.", "operationId": "getLicenseToken", "responses": { @@ -6027,10 +5596,7 @@ }, "post": { "description": "You need to have a permission with action `licensing:write`.", - "tags": [ - "licensing", - "enterprise" - ], + "tags": ["licensing", "enterprise"], "summary": "Create license token.", "operationId": "postLicenseToken", "parameters": [ @@ -6054,10 +5620,7 @@ }, "delete": { "description": "Removes the license stored in the Grafana database. Available in Grafana Enterprise v7.4+.\n\nYou need to have a permission with action `licensing:delete`.", - "tags": [ - "licensing", - "enterprise" - ], + "tags": ["licensing", "enterprise"], "summary": "Remove license from database.", "operationId": "deleteLicenseToken", "parameters": [ @@ -6095,10 +5658,7 @@ "/licensing/token/renew": { "post": { "description": "Manually ask license issuer for a new token. Available in Grafana Enterprise v7.4+.\n\nYou need to have a permission with action `licensing:write`.", - "tags": [ - "licensing", - "enterprise" - ], + "tags": ["licensing", "enterprise"], "summary": "Manually force license refresh.", "operationId": "postRenewLicenseToken", "parameters": [ @@ -6126,10 +5686,7 @@ }, "/logout/saml": { "get": { - "tags": [ - "saml", - "enterprise" - ], + "tags": ["saml", "enterprise"], "summary": "GetLogout initiates single logout process.", "operationId": "getSAMLLogout", "responses": { @@ -6147,9 +5704,7 @@ }, "/org": { "get": { - "tags": [ - "org" - ], + "tags": ["org"], "summary": "Get current Organization.", "operationId": "getCurrentOrg", "responses": { @@ -6168,9 +5723,7 @@ } }, "put": { - "tags": [ - "org" - ], + "tags": ["org"], "summary": "Update current Organization.", "operationId": "updateCurrentOrg", "parameters": [ @@ -6204,9 +5757,7 @@ }, "/org/address": { "put": { - "tags": [ - "org" - ], + "tags": ["org"], "summary": "Update current Organization's address.", "operationId": "updateCurrentOrgAddress", "parameters": [ @@ -6240,10 +5791,7 @@ }, "/org/invites": { "get": { - "tags": [ - "org", - "invites" - ], + "tags": ["org", "invites"], "summary": "Get pending invites.", "operationId": "getPendingOrgInvites", "responses": { @@ -6262,10 +5810,7 @@ } }, "post": { - "tags": [ - "org", - "invites" - ], + "tags": ["org", "invites"], "summary": "Add invite.", "operationId": "addOrgInvite", "parameters": [ @@ -6302,10 +5847,7 @@ }, "/org/invites/{invitation_code}/revoke": { "delete": { - "tags": [ - "org", - "invites" - ], + "tags": ["org", "invites"], "summary": "Revoke invite.", "operationId": "revokeInvite", "parameters": [ @@ -6337,10 +5879,7 @@ }, "/org/preferences": { "get": { - "tags": [ - "org", - "preferences" - ], + "tags": ["org", "preferences"], "summary": "Get Current Org Prefs.", "operationId": "getOrgPreferences", "responses": { @@ -6359,10 +5898,7 @@ } }, "put": { - "tags": [ - "org", - "preferences" - ], + "tags": ["org", "preferences"], "summary": "Update Current Org Prefs.", "operationId": "updateOrgPreferences", "parameters": [ @@ -6394,10 +5930,7 @@ } }, "patch": { - "tags": [ - "org", - "preferences" - ], + "tags": ["org", "preferences"], "summary": "Patch Current Org Prefs.", "operationId": "patchOrgPreferences", "parameters": [ @@ -6432,10 +5965,7 @@ "/org/quotas": { "get": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `orgs.quotas:read` and scope `org:id:1` (orgIDScope).", - "tags": [ - "quota", - "org" - ], + "tags": ["quota", "org"], "summary": "Fetch Organization quota.", "operationId": "getCurrentOrgQuota", "responses": { @@ -6460,9 +5990,7 @@ "/org/users": { "get": { "description": "Returns all org users within the current organization. Accessible to users with org admin role.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:read` with scope `users:*`.", - "tags": [ - "org" - ], + "tags": ["org"], "summary": "Get all users within the current organization.", "operationId": "getOrgUsersForCurrentOrg", "parameters": [ @@ -6495,9 +6023,7 @@ }, "post": { "description": "Adds a global user to the current organization.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:add` with scope `users:*`.", - "tags": [ - "org" - ], + "tags": ["org"], "summary": "Add a new user to the current organization.", "operationId": "addOrgUserToCurrentOrg", "parameters": [ @@ -6529,9 +6055,7 @@ "/org/users/lookup": { "get": { "description": "Returns all org users within the current organization, but with less detailed information.\nAccessible to users with org admin role, admin in any folder or admin of any team.\nMainly used by Grafana UI for providing list of users when adding team members and when editing folder/dashboard permissions.", - "tags": [ - "org" - ], + "tags": ["org"], "summary": "Get all users within the current organization (lookup)", "operationId": "getOrgUsersForCurrentOrgLookup", "parameters": [ @@ -6566,9 +6090,7 @@ "/org/users/{user_id}": { "delete": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:remove` with scope `users:*`.", - "tags": [ - "org" - ], + "tags": ["org"], "summary": "Delete user in current organization.", "operationId": "removeOrgUserForCurrentOrg", "parameters": [ @@ -6600,9 +6122,7 @@ }, "patch": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users.role:update` with scope `users:*`.", - "tags": [ - "org" - ], + "tags": ["org"], "summary": "Updates the given user.", "operationId": "updateOrgUserForCurrentOrg", "parameters": [ @@ -6648,9 +6168,7 @@ "basic": [] } ], - "tags": [ - "orgs" - ], + "tags": ["orgs"], "summary": "Search all Organizations.", "operationId": "searchOrgs", "parameters": [ @@ -6701,9 +6219,7 @@ }, "post": { "description": "Only works if [users.allow_org_create](https://grafana.com/docs/grafana/latest/administration/configuration/#allow_org_create) is set.", - "tags": [ - "orgs" - ], + "tags": ["orgs"], "summary": "Create Organization.", "operationId": "createOrg", "parameters": [ @@ -6742,9 +6258,7 @@ "basic": [] } ], - "tags": [ - "orgs" - ], + "tags": ["orgs"], "summary": "Get Organization by Name.", "operationId": "getOrgByName", "parameters": [ @@ -6778,9 +6292,7 @@ "basic": [] } ], - "tags": [ - "orgs" - ], + "tags": ["orgs"], "summary": "Get Organization by ID.", "operationId": "getOrgByID", "parameters": [ @@ -6813,9 +6325,7 @@ "basic": [] } ], - "tags": [ - "orgs" - ], + "tags": ["orgs"], "summary": "Update Organization.", "operationId": "updateOrg", "parameters": [ @@ -6859,9 +6369,7 @@ "basic": [] } ], - "tags": [ - "orgs" - ], + "tags": ["orgs"], "summary": "Delete Organization.", "operationId": "deleteOrgByID", "parameters": [ @@ -6897,9 +6405,7 @@ }, "/orgs/{org_id}/address": { "put": { - "tags": [ - "orgs" - ], + "tags": ["orgs"], "summary": "Update Organization's address.", "operationId": "updateOrgAddress", "parameters": [ @@ -6941,10 +6447,7 @@ "/orgs/{org_id}/quotas": { "get": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `orgs.quotas:read` and scope `org:id:1` (orgIDScope).", - "tags": [ - "quota", - "orgs" - ], + "tags": ["quota", "orgs"], "summary": "Fetch Organization quota.", "operationId": "getOrgQuota", "parameters": [ @@ -6983,10 +6486,7 @@ } ], "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `orgs.quotas:write` and scope `org:id:1` (orgIDScope).", - "tags": [ - "quota", - "orgs" - ], + "tags": ["quota", "orgs"], "summary": "Update user quota.", "operationId": "updateOrgQuota", "parameters": [ @@ -7039,9 +6539,7 @@ } ], "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:read` with scope `users:*`.", - "tags": [ - "orgs" - ], + "tags": ["orgs"], "summary": "Get Users in Organization.", "operationId": "getOrgUsers", "parameters": [ @@ -7070,9 +6568,7 @@ }, "post": { "description": "Adds a global user to the current organization.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:add` with scope `users:*`.", - "tags": [ - "orgs" - ], + "tags": ["orgs"], "summary": "Add a new user to the current organization.", "operationId": "addOrgUser", "parameters": [ @@ -7116,9 +6612,7 @@ } ], "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:read` with scope `users:*`.", - "tags": [ - "orgs" - ], + "tags": ["orgs"], "summary": "Search Users in Organization.", "operationId": "searchOrgUsers", "parameters": [ @@ -7149,9 +6643,7 @@ "/orgs/{org_id}/users/{user_id}": { "delete": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:remove` with scope `users:*`.", - "tags": [ - "orgs" - ], + "tags": ["orgs"], "summary": "Delete user in current organization.", "operationId": "removeOrgUser", "parameters": [ @@ -7190,9 +6682,7 @@ }, "patch": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users.role:update` with scope `users:*`.", - "tags": [ - "orgs" - ], + "tags": ["orgs"], "summary": "Update Users in Organization.", "operationId": "updateOrgUser", "parameters": [ @@ -7241,9 +6731,7 @@ "/playlists": { "get": { "description": "Please refer to [new API](?api=playlist.grafana.app-v1).", - "tags": [ - "playlists" - ], + "tags": ["playlists"], "summary": "Get playlists.", "operationId": "searchPlaylists", "deprecated": true, @@ -7272,9 +6760,7 @@ }, "post": { "description": "Please refer to [new API](?api=playlist.grafana.app-v1).", - "tags": [ - "playlists" - ], + "tags": ["playlists"], "summary": "Create playlist.", "operationId": "createPlaylist", "deprecated": true, @@ -7310,9 +6796,7 @@ "/playlists/{uid}": { "get": { "description": "Please refer to [new API](?api=playlist.grafana.app-v1).", - "tags": [ - "playlists" - ], + "tags": ["playlists"], "summary": "Get playlist.", "operationId": "getPlaylist", "deprecated": true, @@ -7344,9 +6828,7 @@ }, "put": { "description": "Please refer to [new API](?api=playlist.grafana.app-v1).", - "tags": [ - "playlists" - ], + "tags": ["playlists"], "summary": "Update playlist.", "operationId": "updatePlaylist", "deprecated": true, @@ -7386,9 +6868,7 @@ }, "delete": { "description": "Please refer to [new API](?api=playlist.grafana.app-v1).", - "tags": [ - "playlists" - ], + "tags": ["playlists"], "summary": "Delete playlist.", "operationId": "deletePlaylist", "deprecated": true, @@ -7422,9 +6902,7 @@ "/playlists/{uid}/items": { "get": { "description": "Please refer to [new API](?api=playlist.grafana.app-v1) instead (items are included in the playlist spec).", - "tags": [ - "playlists" - ], + "tags": ["playlists"], "summary": "Get playlist items.", "operationId": "getPlaylistItems", "deprecated": true, @@ -7458,10 +6936,7 @@ "/public/dashboards/{accessToken}": { "get": { "description": "Get public dashboard for view", - "tags": [ - "dashboards", - "dashboard_public" - ], + "tags": ["dashboards", "dashboard_public"], "operationId": "viewPublicDashboard", "parameters": [ { @@ -7496,11 +6971,7 @@ "/public/dashboards/{accessToken}/annotations": { "get": { "description": "Get annotations for a public dashboard", - "tags": [ - "dashboards", - "annotations", - "dashboard_public" - ], + "tags": ["dashboards", "annotations", "dashboard_public"], "operationId": "getPublicAnnotations", "parameters": [ { @@ -7535,10 +7006,7 @@ "/public/dashboards/{accessToken}/panels/{panelId}/query": { "post": { "description": "Get results for a given panel on a public dashboard", - "tags": [ - "dashboards", - "dashboard_public" - ], + "tags": ["dashboards", "dashboard_public"], "operationId": "queryPublicDashboard", "parameters": [ { @@ -7580,9 +7048,7 @@ "/query-history": { "get": { "description": "Returns a list of queries in the query history that matches the search criteria.\nQuery history search supports pagination. Use the `limit` parameter to control the maximum number of queries returned; the default limit is 100.\nYou can also use the `page` query parameter to fetch queries from any page other than the first one.", - "tags": [ - "query_history" - ], + "tags": ["query_history"], "summary": "Query history search.", "operationId": "searchQueries", "parameters": [ @@ -7609,10 +7075,7 @@ "in": "query" }, { - "enum": [ - "time-desc", - "time-asc" - ], + "enum": ["time-desc", "time-asc"], "type": "string", "default": "time-desc", "description": "Sort method", @@ -7662,9 +7125,7 @@ }, "post": { "description": "Adds new query to query history.", - "tags": [ - "query_history" - ], + "tags": ["query_history"], "summary": "Add query to query history.", "operationId": "createQuery", "parameters": [ @@ -7696,9 +7157,7 @@ "/query-history/star/{query_history_uid}": { "post": { "description": "Adds star to query in query history as specified by the UID.", - "tags": [ - "query_history" - ], + "tags": ["query_history"], "summary": "Add star to query in query history.", "operationId": "starQuery", "parameters": [ @@ -7723,9 +7182,7 @@ }, "delete": { "description": "Removes star from query in query history as specified by the UID.", - "tags": [ - "query_history" - ], + "tags": ["query_history"], "summary": "Remove star to query in query history.", "operationId": "unstarQuery", "parameters": [ @@ -7752,9 +7209,7 @@ "/query-history/{query_history_uid}": { "delete": { "description": "Deletes an existing query in query history as specified by the UID. This operation cannot be reverted.", - "tags": [ - "query_history" - ], + "tags": ["query_history"], "summary": "Delete query in query history.", "operationId": "deleteQuery", "parameters": [ @@ -7779,9 +7234,7 @@ }, "patch": { "description": "Updates comment for query in query history as specified by the UID.", - "tags": [ - "query_history" - ], + "tags": ["query_history"], "summary": "Update comment for query in query history.", "operationId": "patchQueryComment", "parameters": [ @@ -7818,10 +7271,7 @@ }, "/recording-rules": { "get": { - "tags": [ - "recording_rules", - "enterprise" - ], + "tags": ["recording_rules", "enterprise"], "summary": "Lists all rules in the database: active or deleted.", "operationId": "listRecordingRules", "responses": { @@ -7843,10 +7293,7 @@ } }, "put": { - "tags": [ - "recording_rules", - "enterprise" - ], + "tags": ["recording_rules", "enterprise"], "summary": "Update the active status of a rule.", "operationId": "updateRecordingRule", "parameters": [ @@ -7878,10 +7325,7 @@ } }, "post": { - "tags": [ - "recording_rules", - "enterprise" - ], + "tags": ["recording_rules", "enterprise"], "summary": "Create a recording rule that is then registered and started.", "operationId": "createRecordingRule", "parameters": [ @@ -7915,10 +7359,7 @@ }, "/recording-rules/test": { "post": { - "tags": [ - "recording_rules", - "enterprise" - ], + "tags": ["recording_rules", "enterprise"], "summary": "Test a recording rule.", "operationId": "testCreateRecordingRule", "parameters": [ @@ -7955,10 +7396,7 @@ }, "/recording-rules/writer": { "get": { - "tags": [ - "recording_rules", - "enterprise" - ], + "tags": ["recording_rules", "enterprise"], "summary": "Return the prometheus remote write target.", "operationId": "getRecordingRuleWriteTarget", "responses": { @@ -7981,10 +7419,7 @@ }, "post": { "description": "It returns a 422 if there is not an existing prometheus data source configured.", - "tags": [ - "recording_rules", - "enterprise" - ], + "tags": ["recording_rules", "enterprise"], "summary": "Create a remote write target.", "operationId": "createRecordingRuleWriteTarget", "parameters": [ @@ -8019,10 +7454,7 @@ } }, "delete": { - "tags": [ - "recording_rules", - "enterprise" - ], + "tags": ["recording_rules", "enterprise"], "summary": "Delete the remote write target.", "operationId": "deleteRecordingRuleWriteTarget", "responses": { @@ -8046,10 +7478,7 @@ }, "/recording-rules/{recordingRuleID}": { "delete": { - "tags": [ - "recording_rules", - "enterprise" - ], + "tags": ["recording_rules", "enterprise"], "summary": "Delete removes the rule from the registry and stops it.", "operationId": "deleteRecordingRule", "parameters": [ @@ -8083,10 +7512,7 @@ "/reports": { "get": { "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports:read` with scope `reports:*`.", - "tags": [ - "reports", - "enterprise" - ], + "tags": ["reports", "enterprise"], "summary": "List reports.", "operationId": "getReports", "responses": { @@ -8106,10 +7532,7 @@ }, "post": { "description": "Available to org admins only and with a valid license.\n\nYou need to have a permission with action `reports.admin:create`.", - "tags": [ - "reports", - "enterprise" - ], + "tags": ["reports", "enterprise"], "summary": "Create a report.", "operationId": "createReport", "parameters": [ @@ -8147,10 +7570,7 @@ "/reports/dashboards/{uid}": { "get": { "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports:read` with scope `reports:*`.", - "tags": [ - "reports", - "enterprise" - ], + "tags": ["reports", "enterprise"], "summary": "List reports by dashboard uid.", "operationId": "getReportsByDashboardUID", "parameters": [ @@ -8180,10 +7600,7 @@ "/reports/email": { "post": { "description": "Generate and send a report. This API waits for the report to be generated before returning. We recommend that you set the client’s timeout to at least 60 seconds. Available to org admins only and with a valid license.\n\nOnly available in Grafana Enterprise v7.0+.\nThis API endpoint is experimental and may be deprecated in a future release. On deprecation, a migration strategy will be provided and the endpoint will remain functional until the next major release of Grafana.\n\nYou need to have a permission with action `reports:send`.", - "tags": [ - "reports", - "enterprise" - ], + "tags": ["reports", "enterprise"], "summary": "Send a report.", "operationId": "sendReport", "parameters": [ @@ -8221,10 +7638,7 @@ "/reports/images/:image": { "get": { "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.settings:read`.", - "tags": [ - "reports", - "enterprise" - ], + "tags": ["reports", "enterprise"], "summary": "Get custom branding report image.", "operationId": "getSettingsImage", "responses": { @@ -8249,13 +7663,8 @@ "/reports/render/csvs": { "get": { "description": "Available to all users and with a valid license.", - "produces": [ - "application/zip" - ], - "tags": [ - "reports", - "enterprise" - ], + "produces": ["application/zip"], + "tags": ["reports", "enterprise"], "summary": "Download a CSV report.", "operationId": "renderReportCSVs", "parameters": [ @@ -8292,13 +7701,8 @@ "/reports/render/pdfs": { "get": { "description": "Available to all users and with a valid license.", - "produces": [ - "application/pdf" - ], - "tags": [ - "reports", - "enterprise" - ], + "produces": ["application/pdf"], + "tags": ["reports", "enterprise"], "summary": "Render report for multiple dashboards.", "operationId": "renderReportPDFs", "parameters": [ @@ -8352,10 +7756,7 @@ "/reports/settings": { "get": { "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.settings:read`x.", - "tags": [ - "reports", - "enterprise" - ], + "tags": ["reports", "enterprise"], "summary": "Get report settings.", "operationId": "getReportSettings", "responses": { @@ -8375,10 +7776,7 @@ }, "post": { "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.settings:write`xx.", - "tags": [ - "reports", - "enterprise" - ], + "tags": ["reports", "enterprise"], "summary": "Save settings.", "operationId": "saveReportSettings", "parameters": [ @@ -8413,10 +7811,7 @@ "/reports/test-email": { "post": { "description": "Available to org admins only and with a valid license.\n\nYou need to have a permission with action `reports:send`.", - "tags": [ - "reports", - "enterprise" - ], + "tags": ["reports", "enterprise"], "summary": "Send test report via email.", "operationId": "sendTestEmail", "parameters": [ @@ -8454,10 +7849,7 @@ "/reports/{id}": { "get": { "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports:read` with scope `reports:id:\u003creport ID\u003e`.\n\nRequesting reports using the internal id will stop workgin in the future\nUse the reporting apiserver to manage reports. See: /apis/reporting.grafana.app/", - "tags": [ - "reports", - "enterprise" - ], + "tags": ["reports", "enterprise"], "summary": "Get a report.", "operationId": "getReport", "deprecated": true, @@ -8493,10 +7885,7 @@ }, "put": { "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.admin:write` with scope `reports:id:\u003creport ID\u003e`.\n\nRequesting reports using the internal id will stop workgin in the future\nUse the reporting apiserver to manage reports. See: /apis/reporting.grafana.app/", - "tags": [ - "reports", - "enterprise" - ], + "tags": ["reports", "enterprise"], "summary": "Update a report.", "operationId": "updateReport", "deprecated": true, @@ -8540,10 +7929,7 @@ }, "delete": { "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.delete` with scope `reports:id:\u003creport ID\u003e`.\n\nRequesting reports using the internal id will stop workgin in the future\nUse the reporting apiserver to manage reports. See: /apis/reporting.grafana.app/", - "tags": [ - "reports", - "enterprise" - ], + "tags": ["reports", "enterprise"], "summary": "Delete a report.", "operationId": "deleteReport", "deprecated": true, @@ -8580,10 +7966,7 @@ }, "/saml/acs": { "post": { - "tags": [ - "saml", - "enterprise" - ], + "tags": ["saml", "enterprise"], "summary": "It performs Assertion Consumer Service (ACS).", "operationId": "postACS", "parameters": [ @@ -8608,13 +7991,8 @@ }, "/saml/metadata": { "get": { - "produces": [ - "application/xml;application/samlmetadata+xml" - ], - "tags": [ - "saml", - "enterprise" - ], + "produces": ["application/xml;application/samlmetadata+xml"], + "tags": ["saml", "enterprise"], "summary": "It exposes the SP (Grafana's) metadata for the IdP's consumption.", "operationId": "getMetadata", "responses": { @@ -8627,10 +8005,7 @@ "/saml/slo": { "get": { "description": "There might be two possible requests:\n1. Logout response (callback) when Grafana initiates single logout and IdP returns response to logout request.\n2. Logout request when another SP initiates single logout and IdP sends logout request to the Grafana,\nor in case of IdP-initiated logout.", - "tags": [ - "saml", - "enterprise" - ], + "tags": ["saml", "enterprise"], "summary": "It performs Single Logout (SLO) callback.", "operationId": "getSLO", "responses": { @@ -8650,10 +8025,7 @@ }, "post": { "description": "There might be two possible requests:\n1. Logout response (callback) when Grafana initiates single logout and IdP returns response to logout request.\n2. Logout request when another SP initiates single logout and IdP sends logout request to the Grafana,\nor in case of IdP-initiated logout.", - "tags": [ - "saml", - "enterprise" - ], + "tags": ["saml", "enterprise"], "summary": "It performs Single Logout (SLO) callback.", "operationId": "postSLO", "parameters": [ @@ -8686,9 +8058,7 @@ }, "/search": { "get": { - "tags": [ - "search" - ], + "tags": ["search"], "operationId": "search", "parameters": [ { @@ -8708,10 +8078,7 @@ "in": "query" }, { - "enum": [ - "dash-folder", - "dash-db" - ], + "enum": ["dash-folder", "dash-db"], "type": "string", "description": "Type to search for, dash-folder or dash-db", "name": "type", @@ -8776,10 +8143,7 @@ "in": "query" }, { - "enum": [ - "Edit", - "View" - ], + "enum": ["Edit", "View"], "type": "string", "default": "View", "description": "Set to `Edit` to return dashboards/folders that the user can edit", @@ -8787,10 +8151,7 @@ "in": "query" }, { - "enum": [ - "alpha-asc", - "alpha-desc" - ], + "enum": ["alpha-asc", "alpha-desc"], "type": "string", "default": "alpha-asc", "description": "Sort method; for listing all the possible sort methods use the search sorting endpoint.", @@ -8822,9 +8183,7 @@ }, "/search/sorting": { "get": { - "tags": [ - "search" - ], + "tags": ["search"], "summary": "List search sorting options.", "operationId": "listSortOptions", "responses": { @@ -8840,9 +8199,7 @@ "/serviceaccounts": { "post": { "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:write` scope: `serviceaccounts:*`\n\nRequires basic authentication and that the authenticated user is a Grafana Admin.", - "tags": [ - "service_accounts" - ], + "tags": ["service_accounts"], "summary": "Create service account", "operationId": "createServiceAccount", "parameters": [ @@ -8876,9 +8233,7 @@ "/serviceaccounts/search": { "get": { "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:read` scope: `serviceaccounts:*`", - "tags": [ - "service_accounts" - ], + "tags": ["service_accounts"], "summary": "Search service accounts with paging", "operationId": "searchOrgServiceAccountsWithPaging", "parameters": [ @@ -8932,9 +8287,7 @@ "/serviceaccounts/{serviceAccountId}": { "get": { "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:read` scope: `serviceaccounts:id:1` (single service account)", - "tags": [ - "service_accounts" - ], + "tags": ["service_accounts"], "summary": "Get single serviceaccount by Id", "operationId": "retrieveServiceAccount", "parameters": [ @@ -8969,9 +8322,7 @@ }, "delete": { "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:delete` scope: `serviceaccounts:id:1` (single service account)", - "tags": [ - "service_accounts" - ], + "tags": ["service_accounts"], "summary": "Delete service account", "operationId": "deleteServiceAccount", "parameters": [ @@ -9006,9 +8357,7 @@ }, "patch": { "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:write` scope: `serviceaccounts:id:1` (single service account)", - "tags": [ - "service_accounts" - ], + "tags": ["service_accounts"], "summary": "Update service account", "operationId": "updateServiceAccount", "parameters": [ @@ -9052,9 +8401,7 @@ "/serviceaccounts/{serviceAccountId}/tokens": { "get": { "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:read` scope: `global:serviceaccounts:id:1` (single service account)\n\nRequires basic authentication and that the authenticated user is a Grafana Admin.", - "tags": [ - "service_accounts" - ], + "tags": ["service_accounts"], "summary": "Get service account tokens", "operationId": "listTokens", "parameters": [ @@ -9086,9 +8433,7 @@ }, "post": { "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:write` scope: `serviceaccounts:id:1` (single service account)", - "tags": [ - "service_accounts" - ], + "tags": ["service_accounts"], "summary": "CreateNewToken adds a token to a service account", "operationId": "createToken", "parameters": [ @@ -9135,9 +8480,7 @@ "/serviceaccounts/{serviceAccountId}/tokens/{tokenId}": { "delete": { "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:write` scope: `serviceaccounts:id:1` (single service account)\n\nRequires basic authentication and that the authenticated user is a Grafana Admin.", - "tags": [ - "service_accounts" - ], + "tags": ["service_accounts"], "summary": "DeleteToken deletes service account tokens", "operationId": "deleteToken", "parameters": [ @@ -9181,9 +8524,7 @@ "/signing-keys/keys": { "get": { "description": "Required permissions\nNone", - "tags": [ - "signing_keys" - ], + "tags": ["signing_keys"], "summary": "Get JSON Web Key Set (JWKS) with all the keys that can be used to verify tokens (public keys)", "operationId": "retrieveJWKS", "responses": { @@ -9198,9 +8539,7 @@ }, "/snapshot/shared-options": { "get": { - "tags": [ - "snapshots" - ], + "tags": ["snapshots"], "summary": "Get snapshot sharing settings.", "operationId": "getSharingOptions", "responses": { @@ -9216,10 +8555,7 @@ "/snapshots": { "post": { "description": "Snapshot public mode should be enabled or authentication is required.", - "tags": [ - "dashboards", - "snapshots" - ], + "tags": ["dashboards", "snapshots"], "summary": "When creating a snapshot using the API, you have to provide the full dashboard payload including the snapshot data. This endpoint is designed for the Grafana UI.", "operationId": "createDashboardSnapshot", "parameters": [ @@ -9251,10 +8587,7 @@ "/snapshots-delete/{deleteKey}": { "get": { "description": "Snapshot public mode should be enabled or authentication is required.", - "tags": [ - "dashboards", - "snapshots" - ], + "tags": ["dashboards", "snapshots"], "summary": "Delete Snapshot by deleteKey.", "operationId": "deleteDashboardSnapshotByDeleteKey", "parameters": [ @@ -9286,10 +8619,7 @@ }, "/snapshots/{key}": { "get": { - "tags": [ - "dashboards", - "snapshots" - ], + "tags": ["dashboards", "snapshots"], "summary": "Get Snapshot by Key.", "operationId": "getDashboardSnapshot", "parameters": [ @@ -9316,10 +8646,7 @@ } }, "delete": { - "tags": [ - "dashboards", - "snapshots" - ], + "tags": ["dashboards", "snapshots"], "summary": "Delete Snapshot by Key.", "operationId": "deleteDashboardSnapshot", "parameters": [ @@ -9348,9 +8675,7 @@ }, "/teams": { "post": { - "tags": [ - "teams" - ], + "tags": ["teams"], "summary": "Add Team.", "operationId": "createTeam", "parameters": [ @@ -9384,9 +8709,7 @@ }, "/teams/search": { "get": { - "tags": [ - "teams" - ], + "tags": ["teams"], "summary": "Team Search With Paging.", "operationId": "searchTeams", "parameters": [ @@ -9446,10 +8769,7 @@ }, "/teams/{teamId}/groups": { "get": { - "tags": [ - "sync_team_groups", - "enterprise" - ], + "tags": ["sync_team_groups", "enterprise"], "summary": "Get External Groups.", "operationId": "getTeamGroupsApi", "parameters": [ @@ -9482,10 +8802,7 @@ } }, "post": { - "tags": [ - "sync_team_groups", - "enterprise" - ], + "tags": ["sync_team_groups", "enterprise"], "summary": "Add External Group.", "operationId": "addTeamGroupApi", "parameters": [ @@ -9526,10 +8843,7 @@ } }, "delete": { - "tags": [ - "sync_team_groups", - "enterprise" - ], + "tags": ["sync_team_groups", "enterprise"], "summary": "Remove External Group.", "operationId": "removeTeamGroupApiQuery", "parameters": [ @@ -9569,10 +8883,7 @@ }, "/teams/{teamId}/groups/search": { "get": { - "tags": [ - "sync_team_groups", - "enterprise" - ], + "tags": ["sync_team_groups", "enterprise"], "summary": "Search for team groups with optional filtering and pagination.", "operationId": "searchTeamGroups", "parameters": [ @@ -9632,9 +8943,7 @@ }, "/teams/{team_id}": { "get": { - "tags": [ - "teams" - ], + "tags": ["teams"], "summary": "Get Team By ID.", "operationId": "getTeamByID", "parameters": [ @@ -9670,9 +8979,7 @@ } }, "put": { - "tags": [ - "teams" - ], + "tags": ["teams"], "summary": "Update Team.", "operationId": "updateTeam", "parameters": [ @@ -9713,9 +9020,7 @@ } }, "delete": { - "tags": [ - "teams" - ], + "tags": ["teams"], "summary": "Delete Team By ID.", "operationId": "deleteTeamByID", "parameters": [ @@ -9747,9 +9052,7 @@ }, "/teams/{team_id}/members": { "get": { - "tags": [ - "teams" - ], + "tags": ["teams"], "summary": "Get Team Members.", "operationId": "getTeamMembers", "parameters": [ @@ -9780,9 +9083,7 @@ }, "put": { "description": "Takes user emails, and updates team members and admins to the provided lists of users.\nAny current team members and admins not in the provided lists will be removed.", - "tags": [ - "teams" - ], + "tags": ["teams"], "summary": "Set team memberships.", "operationId": "setTeamMemberships", "parameters": [ @@ -9820,9 +9121,7 @@ } }, "post": { - "tags": [ - "teams" - ], + "tags": ["teams"], "summary": "Add Team Member.", "operationId": "addTeamMember", "parameters": [ @@ -9862,9 +9161,7 @@ }, "/teams/{team_id}/members/{user_id}": { "put": { - "tags": [ - "teams" - ], + "tags": ["teams"], "summary": "Update Team Member.", "operationId": "updateTeamMember", "parameters": [ @@ -9909,9 +9206,7 @@ } }, "delete": { - "tags": [ - "teams" - ], + "tags": ["teams"], "summary": "Remove Member From Team.", "operationId": "removeTeamMember", "parameters": [ @@ -9950,10 +9245,7 @@ }, "/teams/{team_id}/preferences": { "get": { - "tags": [ - "teams", - "preferences" - ], + "tags": ["teams", "preferences"], "summary": "Get Team Preferences.", "operationId": "getTeamPreferences", "parameters": [ @@ -9977,10 +9269,7 @@ } }, "put": { - "tags": [ - "teams", - "preferences" - ], + "tags": ["teams", "preferences"], "summary": "Update Team Preferences.", "operationId": "updateTeamPreferences", "parameters": [ @@ -10018,9 +9307,7 @@ "/user": { "get": { "description": "Get (current authenticated user)", - "tags": [ - "signed_in_user" - ], + "tags": ["signed_in_user"], "operationId": "getSignedInUser", "responses": { "200": { @@ -10041,9 +9328,7 @@ } }, "put": { - "tags": [ - "signed_in_user" - ], + "tags": ["signed_in_user"], "summary": "Update signed in User.", "operationId": "updateSignedInUser", "parameters": [ @@ -10079,9 +9364,7 @@ "/user/auth-tokens": { "get": { "description": "Return a list of all auth tokens (devices) that the actual user currently have logged in from.", - "tags": [ - "signed_in_user" - ], + "tags": ["signed_in_user"], "summary": "Auth tokens of the actual User.", "operationId": "getUserAuthTokens", "responses": { @@ -10103,9 +9386,7 @@ "/user/email/update": { "get": { "description": "Update the email of user given a verification code.", - "tags": [ - "user" - ], + "tags": ["user"], "summary": "Update user email.", "operationId": "updateUserEmail", "responses": { @@ -10117,9 +9398,7 @@ }, "/user/helpflags/clear": { "get": { - "tags": [ - "signed_in_user" - ], + "tags": ["signed_in_user"], "summary": "Clear user help flag.", "operationId": "clearHelpFlags", "responses": { @@ -10140,9 +9419,7 @@ }, "/user/helpflags/{flag_id}": { "put": { - "tags": [ - "signed_in_user" - ], + "tags": ["signed_in_user"], "summary": "Set user help flag.", "operationId": "setHelpFlag", "parameters": [ @@ -10177,9 +9454,7 @@ } ], "description": "Return a list of all organizations of the current user.", - "tags": [ - "signed_in_user" - ], + "tags": ["signed_in_user"], "summary": "Organizations of the actual User.", "operationId": "getSignedInUserOrgList", "responses": { @@ -10206,9 +9481,7 @@ } ], "description": "Changes the password for the user.", - "tags": [ - "signed_in_user" - ], + "tags": ["signed_in_user"], "summary": "Change Password.", "operationId": "changeUserPassword", "parameters": [ @@ -10243,10 +9516,7 @@ }, "/user/preferences": { "get": { - "tags": [ - "signed_in_user", - "preferences" - ], + "tags": ["signed_in_user", "preferences"], "summary": "Get user preferences.", "operationId": "getUserPreferences", "responses": { @@ -10263,10 +9533,7 @@ }, "put": { "description": "Omitting a key (`theme`, `homeDashboardUID`, `timezone`) will cause the current value to be replaced with the system default value.", - "tags": [ - "signed_in_user", - "preferences" - ], + "tags": ["signed_in_user", "preferences"], "summary": "Update user preferences.", "operationId": "updateUserPreferences", "parameters": [ @@ -10295,10 +9562,7 @@ } }, "patch": { - "tags": [ - "signed_in_user", - "preferences" - ], + "tags": ["signed_in_user", "preferences"], "summary": "Patch user preferences.", "operationId": "patchUserPreferences", "parameters": [ @@ -10329,10 +9593,7 @@ }, "/user/quotas": { "get": { - "tags": [ - "quota", - "signed_in_user" - ], + "tags": ["quota", "signed_in_user"], "summary": "Fetch user quota.", "operationId": "getUserQuotas", "responses": { @@ -10357,9 +9618,7 @@ "/user/revoke-auth-token": { "post": { "description": "Revokes the given auth token (device) for the actual user. User of issued auth token (device) will no longer be logged in and will be required to authenticate again upon next activity.", - "tags": [ - "signed_in_user" - ], + "tags": ["signed_in_user"], "summary": "Revoke an auth token of the actual User.", "operationId": "revokeUserAuthToken", "parameters": [ @@ -10394,9 +9653,7 @@ "/user/stars/dashboard/uid/{dashboard_uid}": { "post": { "description": "Stars the given Dashboard for the actual user.", - "tags": [ - "signed_in_user" - ], + "tags": ["signed_in_user"], "summary": "Star a dashboard.", "operationId": "starDashboardByUID", "parameters": [ @@ -10427,9 +9684,7 @@ }, "delete": { "description": "Deletes the starring of the given Dashboard for the actual user.", - "tags": [ - "signed_in_user" - ], + "tags": ["signed_in_user"], "summary": "Unstar a dashboard.", "operationId": "unstarDashboardByUID", "parameters": [ @@ -10462,9 +9717,7 @@ "/user/teams": { "get": { "description": "Return a list of all teams that the current user is member of.", - "tags": [ - "signed_in_user" - ], + "tags": ["signed_in_user"], "summary": "Teams that the actual User is member of.", "operationId": "getSignedInUserTeamList", "responses": { @@ -10486,9 +9739,7 @@ "/user/using/{org_id}": { "post": { "description": "Switch user context to the given organization.", - "tags": [ - "signed_in_user" - ], + "tags": ["signed_in_user"], "summary": "Switch user context for signed in user.", "operationId": "userSetUsingOrg", "parameters": [ @@ -10522,9 +9773,7 @@ "/users": { "get": { "description": "Returns all users that the authenticated user has permission to view, admin permission required.", - "tags": [ - "users" - ], + "tags": ["users"], "summary": "Get users.", "operationId": "searchUsers", "parameters": [ @@ -10563,9 +9812,7 @@ }, "/users/lookup": { "get": { - "tags": [ - "users" - ], + "tags": ["users"], "summary": "Get user by login or email.", "operationId": "getUserByLoginOrEmail", "parameters": [ @@ -10598,9 +9845,7 @@ }, "/users/search": { "get": { - "tags": [ - "users" - ], + "tags": ["users"], "summary": "Get users with paging.", "operationId": "searchUsersWithPaging", "responses": { @@ -10624,9 +9869,7 @@ }, "/users/{user_id}": { "get": { - "tags": [ - "users" - ], + "tags": ["users"], "summary": "Get user by id.", "operationId": "getUserByID", "parameters": [ @@ -10658,9 +9901,7 @@ }, "put": { "description": "Update the user identified by id.", - "tags": [ - "users" - ], + "tags": ["users"], "summary": "Update user.", "operationId": "updateUser", "parameters": [ @@ -10706,9 +9947,7 @@ "/users/{user_id}/orgs": { "get": { "description": "Get organizations for user identified by id.", - "tags": [ - "users" - ], + "tags": ["users"], "summary": "Get organizations for user.", "operationId": "getUserOrgList", "parameters": [ @@ -10742,9 +9981,7 @@ "/users/{user_id}/teams": { "get": { "description": "Get teams for user identified by id.", - "tags": [ - "users" - ], + "tags": ["users"], "summary": "Get teams for user.", "operationId": "getUserTeams", "parameters": [ @@ -10777,9 +10014,7 @@ }, "/v1/provisioning/alert-rules": { "get": { - "tags": [ - "provisioning" - ], + "tags": ["provisioning"], "summary": "Get all the alert rules.", "operationId": "RouteGetAlertRules", "deprecated": true, @@ -10799,12 +10034,8 @@ } }, "post": { - "consumes": [ - "application/json" - ], - "tags": [ - "provisioning" - ], + "consumes": ["application/json"], + "tags": ["provisioning"], "summary": "Create a new alert rule.", "operationId": "RoutePostAlertRule", "deprecated": true, @@ -10846,16 +10077,8 @@ }, "/v1/provisioning/alert-rules/export": { "get": { - "produces": [ - "application/json", - "application/yaml", - "application/terraform+hcl", - "text/yaml", - "text/hcl" - ], - "tags": [ - "provisioning" - ], + "produces": ["application/json", "application/yaml", "application/terraform+hcl", "text/yaml", "text/hcl"], + "tags": ["provisioning"], "summary": "Export all alert rules in provisioning file format.", "operationId": "RouteGetAlertRulesExport", "parameters": [ @@ -10867,11 +10090,7 @@ "in": "query" }, { - "enum": [ - "yaml", - "json", - "hcl" - ], + "enum": ["yaml", "json", "hcl"], "type": "string", "default": "yaml", "description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.", @@ -10921,9 +10140,7 @@ }, "/v1/provisioning/alert-rules/{UID}": { "get": { - "tags": [ - "provisioning" - ], + "tags": ["provisioning"], "summary": "Get a specific alert rule by UID.", "operationId": "RouteGetAlertRule", "deprecated": true, @@ -10955,12 +10172,8 @@ } }, "put": { - "consumes": [ - "application/json" - ], - "tags": [ - "provisioning" - ], + "consumes": ["application/json"], + "tags": ["provisioning"], "summary": "Update an existing alert rule.", "operationId": "RoutePutAlertRule", "deprecated": true, @@ -11007,9 +10220,7 @@ } }, "delete": { - "tags": [ - "provisioning" - ], + "tags": ["provisioning"], "summary": "Delete a specific alert rule by UID.", "operationId": "RouteDeleteAlertRule", "deprecated": true, @@ -11042,16 +10253,8 @@ }, "/v1/provisioning/alert-rules/{UID}/export": { "get": { - "produces": [ - "application/json", - "application/yaml", - "application/terraform+hcl", - "text/yaml", - "text/hcl" - ], - "tags": [ - "provisioning" - ], + "produces": ["application/json", "application/yaml", "application/terraform+hcl", "text/yaml", "text/hcl"], + "tags": ["provisioning"], "summary": "Export an alert rule in provisioning file format.", "operationId": "RouteGetAlertRuleExport", "parameters": [ @@ -11063,11 +10266,7 @@ "in": "query" }, { - "enum": [ - "yaml", - "json", - "hcl" - ], + "enum": ["yaml", "json", "hcl"], "type": "string", "default": "yaml", "description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.", @@ -11103,9 +10302,7 @@ }, "/v1/provisioning/contact-points": { "get": { - "tags": [ - "provisioning" - ], + "tags": ["provisioning"], "summary": "Get all the contact points.", "operationId": "RouteGetContactpoints", "deprecated": true, @@ -11133,12 +10330,8 @@ } }, "post": { - "consumes": [ - "application/json" - ], - "tags": [ - "provisioning" - ], + "consumes": ["application/json"], + "tags": ["provisioning"], "summary": "Create a contact point.", "operationId": "RoutePostContactpoints", "deprecated": true, @@ -11180,16 +10373,8 @@ }, "/v1/provisioning/contact-points/export": { "get": { - "produces": [ - "application/json", - "application/yaml", - "application/terraform+hcl", - "text/yaml", - "text/hcl" - ], - "tags": [ - "provisioning" - ], + "produces": ["application/json", "application/yaml", "application/terraform+hcl", "text/yaml", "text/hcl"], + "tags": ["provisioning"], "summary": "Export all contact points in provisioning file format.", "operationId": "RouteGetContactpointsExport", "parameters": [ @@ -11201,11 +10386,7 @@ "in": "query" }, { - "enum": [ - "yaml", - "json", - "hcl" - ], + "enum": ["yaml", "json", "hcl"], "type": "string", "default": "yaml", "description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.", @@ -11244,12 +10425,8 @@ }, "/v1/provisioning/contact-points/{UID}": { "put": { - "consumes": [ - "application/json" - ], - "tags": [ - "provisioning" - ], + "consumes": ["application/json"], + "tags": ["provisioning"], "summary": "Update an existing contact point.", "operationId": "RoutePutContactpoint", "deprecated": true, @@ -11296,12 +10473,8 @@ } }, "delete": { - "consumes": [ - "application/json" - ], - "tags": [ - "provisioning" - ], + "consumes": ["application/json"], + "tags": ["provisioning"], "summary": "Delete a contact point.", "operationId": "RouteDeleteContactpoints", "deprecated": true, @@ -11329,9 +10502,7 @@ }, "/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}": { "get": { - "tags": [ - "provisioning" - ], + "tags": ["provisioning"], "summary": "Get a rule group.", "operationId": "RouteGetAlertRuleGroup", "deprecated": true, @@ -11368,12 +10539,8 @@ } }, "put": { - "consumes": [ - "application/json" - ], - "tags": [ - "provisioning" - ], + "consumes": ["application/json"], + "tags": ["provisioning"], "summary": "Create or update alert rule group.", "operationId": "RoutePutAlertRuleGroup", "deprecated": true, @@ -11426,9 +10593,7 @@ }, "delete": { "description": "Delete rule group", - "tags": [ - "provisioning" - ], + "tags": ["provisioning"], "operationId": "RouteDeleteAlertRuleGroup", "deprecated": true, "parameters": [ @@ -11466,16 +10631,8 @@ }, "/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}/export": { "get": { - "produces": [ - "application/json", - "application/yaml", - "application/terraform+hcl", - "text/yaml", - "text/hcl" - ], - "tags": [ - "provisioning" - ], + "produces": ["application/json", "application/yaml", "application/terraform+hcl", "text/yaml", "text/hcl"], + "tags": ["provisioning"], "summary": "Export an alert rule group in provisioning file format.", "operationId": "RouteGetAlertRuleGroupExport", "parameters": [ @@ -11487,11 +10644,7 @@ "in": "query" }, { - "enum": [ - "yaml", - "json", - "hcl" - ], + "enum": ["yaml", "json", "hcl"], "type": "string", "default": "yaml", "description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.", @@ -11532,9 +10685,7 @@ }, "/v1/provisioning/mute-timings": { "get": { - "tags": [ - "provisioning" - ], + "tags": ["provisioning"], "summary": "Get all the mute timings.", "operationId": "RouteGetMuteTimings", "deprecated": true, @@ -11554,12 +10705,8 @@ } }, "post": { - "consumes": [ - "application/json" - ], - "tags": [ - "provisioning" - ], + "consumes": ["application/json"], + "tags": ["provisioning"], "summary": "Create a new mute timing.", "operationId": "RoutePostMuteTiming", "deprecated": true, @@ -11601,16 +10748,8 @@ }, "/v1/provisioning/mute-timings/export": { "get": { - "produces": [ - "application/json", - "application/yaml", - "application/terraform+hcl", - "text/yaml", - "text/hcl" - ], - "tags": [ - "provisioning" - ], + "produces": ["application/json", "application/yaml", "application/terraform+hcl", "text/yaml", "text/hcl"], + "tags": ["provisioning"], "summary": "Export all mute timings in provisioning format.", "operationId": "RouteExportMuteTimings", "parameters": [ @@ -11622,11 +10761,7 @@ "in": "query" }, { - "enum": [ - "yaml", - "json", - "hcl" - ], + "enum": ["yaml", "json", "hcl"], "type": "string", "default": "yaml", "description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.", @@ -11652,9 +10787,7 @@ }, "/v1/provisioning/mute-timings/{name}": { "get": { - "tags": [ - "provisioning" - ], + "tags": ["provisioning"], "summary": "Get a mute timing.", "operationId": "RouteGetMuteTiming", "deprecated": true, @@ -11686,12 +10819,8 @@ } }, "put": { - "consumes": [ - "application/json" - ], - "tags": [ - "provisioning" - ], + "consumes": ["application/json"], + "tags": ["provisioning"], "summary": "Replace an existing mute timing.", "operationId": "RoutePutMuteTiming", "deprecated": true, @@ -11744,9 +10873,7 @@ } }, "delete": { - "tags": [ - "provisioning" - ], + "tags": ["provisioning"], "summary": "Delete a mute timing.", "operationId": "RouteDeleteMuteTiming", "deprecated": true, @@ -11791,16 +10918,8 @@ }, "/v1/provisioning/mute-timings/{name}/export": { "get": { - "produces": [ - "application/json", - "application/yaml", - "application/terraform+hcl", - "text/yaml", - "text/hcl" - ], - "tags": [ - "provisioning" - ], + "produces": ["application/json", "application/yaml", "application/terraform+hcl", "text/yaml", "text/hcl"], + "tags": ["provisioning"], "summary": "Export a mute timing in provisioning format.", "operationId": "RouteExportMuteTiming", "parameters": [ @@ -11812,11 +10931,7 @@ "in": "query" }, { - "enum": [ - "yaml", - "json", - "hcl" - ], + "enum": ["yaml", "json", "hcl"], "type": "string", "default": "yaml", "description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.", @@ -11849,9 +10964,7 @@ }, "/v1/provisioning/policies": { "get": { - "tags": [ - "provisioning" - ], + "tags": ["provisioning"], "summary": "Get the notification policy tree.", "operationId": "RouteGetPolicyTree", "deprecated": true, @@ -11871,12 +10984,8 @@ } }, "put": { - "consumes": [ - "application/json" - ], - "tags": [ - "provisioning" - ], + "consumes": ["application/json"], + "tags": ["provisioning"], "summary": "Sets the notification policy tree.", "operationId": "RoutePutPolicyTree", "deprecated": true, @@ -11917,12 +11026,8 @@ } }, "delete": { - "consumes": [ - "application/json" - ], - "tags": [ - "provisioning" - ], + "consumes": ["application/json"], + "tags": ["provisioning"], "summary": "Clears the notification policy tree.", "operationId": "RouteResetPolicyTree", "deprecated": true, @@ -11944,16 +11049,8 @@ }, "/v1/provisioning/policies/export": { "get": { - "produces": [ - "application/json", - "application/yaml", - "application/terraform+hcl", - "text/yaml", - "text/hcl" - ], - "tags": [ - "provisioning" - ], + "produces": ["application/json", "application/yaml", "application/terraform+hcl", "text/yaml", "text/hcl"], + "tags": ["provisioning"], "summary": "Export the notification policy tree in provisioning file format.", "operationId": "RouteGetPolicyTreeExport", "responses": { @@ -11980,9 +11077,7 @@ }, "/v1/provisioning/templates": { "get": { - "tags": [ - "provisioning" - ], + "tags": ["provisioning"], "summary": "Get all notification template groups.", "operationId": "RouteGetTemplates", "deprecated": true, @@ -12004,9 +11099,7 @@ }, "/v1/provisioning/templates/{name}": { "get": { - "tags": [ - "provisioning" - ], + "tags": ["provisioning"], "summary": "Get a notification template group.", "operationId": "RouteGetTemplate", "deprecated": true, @@ -12041,12 +11134,8 @@ } }, "put": { - "consumes": [ - "application/json" - ], - "tags": [ - "provisioning" - ], + "consumes": ["application/json"], + "tags": ["provisioning"], "summary": "Updates an existing notification template group.", "operationId": "RoutePutTemplate", "deprecated": true, @@ -12099,9 +11188,7 @@ } }, "delete": { - "tags": [ - "provisioning" - ], + "tags": ["provisioning"], "summary": "Delete a notification template group.", "operationId": "RouteDeleteTemplate", "deprecated": true, @@ -12142,9 +11229,7 @@ "/v1/sso-settings": { "get": { "description": "You need to have a permission with action `settings:read` with scope `settings:auth.\u003cprovider\u003e:*`.", - "tags": [ - "sso_settings" - ], + "tags": ["sso_settings"], "summary": "List all SSO Settings entries", "operationId": "listAllProvidersSettings", "responses": { @@ -12166,9 +11251,7 @@ "/v1/sso-settings/{key}": { "get": { "description": "You need to have a permission with action `settings:read` with scope `settings:auth.\u003cprovider\u003e:*`.", - "tags": [ - "sso_settings" - ], + "tags": ["sso_settings"], "summary": "Get an SSO Settings entry by Key", "operationId": "getProviderSettings", "parameters": [ @@ -12199,9 +11282,7 @@ }, "put": { "description": "Inserts or updates the SSO Settings for a provider.\n\nYou need to have a permission with action `settings:write` and scope `settings:auth.\u003cprovider\u003e:*`.", - "tags": [ - "sso_settings" - ], + "tags": ["sso_settings"], "summary": "Update SSO Settings", "operationId": "updateProviderSettings", "parameters": [ @@ -12252,9 +11333,7 @@ }, "delete": { "description": "Removes the SSO Settings for a provider.\n\nYou need to have a permission with action `settings:write` and scope `settings:auth.\u003cprovider\u003e:*`.", - "tags": [ - "sso_settings" - ], + "tags": ["sso_settings"], "summary": "Remove SSO Settings", "operationId": "removeProviderSettings", "parameters": [ @@ -12288,9 +11367,7 @@ }, "patch": { "description": "Partially updates the SSO Settings for a provider. Only provided fields are updated.\n\nYou need to have a permission with action `settings:write` and scope `settings:auth.\u003cprovider\u003e:*`.", - "tags": [ - "sso_settings" - ], + "tags": ["sso_settings"], "summary": "Patch SSO Settings", "operationId": "patchProviderSettings", "parameters": [ @@ -12438,12 +11515,7 @@ }, "role": { "type": "string", - "enum": [ - "None", - "Viewer", - "Editor", - "Admin" - ] + "enum": ["None", "Viewer", "Editor", "Admin"] }, "sendEmail": { "type": "boolean" @@ -12458,12 +11530,7 @@ }, "role": { "type": "string", - "enum": [ - "None", - "Viewer", - "Editor", - "Admin" - ] + "enum": ["None", "Viewer", "Editor", "Admin"] } } }, @@ -12481,9 +11548,7 @@ }, "AddTeamMemberCommand": { "type": "object", - "required": [ - "userId" - ], + "required": ["userId"], "properties": { "userId": { "type": "integer", @@ -12689,12 +11754,7 @@ "Alert": { "type": "object", "title": "Alert has info for an alert.", - "required": [ - "labels", - "annotations", - "state", - "value" - ], + "required": ["labels", "annotations", "state", "value"], "properties": { "activeAt": { "type": "string", @@ -12717,9 +11777,7 @@ "AlertDiscovery": { "type": "object", "title": "AlertDiscovery has info for all active alerts.", - "required": [ - "alerts" - ], + "required": ["alerts"], "properties": { "alerts": { "type": "array", @@ -12824,9 +11882,7 @@ }, "AlertResponse": { "type": "object", - "required": [ - "status" - ], + "required": ["status"], "properties": { "data": { "$ref": "#/definitions/AlertDiscovery" @@ -12877,11 +11933,7 @@ }, "execErrState": { "type": "string", - "enum": [ - "OK", - "Alerting", - "Error" - ] + "enum": ["OK", "Alerting", "Error"] }, "for": { "$ref": "#/definitions/Duration" @@ -12904,11 +11956,7 @@ }, "noDataState": { "type": "string", - "enum": [ - "Alerting", - "NoData", - "OK" - ] + "enum": ["Alerting", "NoData", "OK"] }, "notification_settings": { "$ref": "#/definitions/AlertRuleNotificationSettingsExport" @@ -12993,9 +12041,7 @@ }, "AlertRuleNotificationSettings": { "type": "object", - "required": [ - "receiver" - ], + "required": ["receiver"], "properties": { "active_time_intervals": { "description": "Override the times when notifications should not be muted. These must match the name of a mute time interval defined\nin the alertmanager configuration time_intervals section. All notifications will be suppressed unless they are sent\nat the time that matches any interval.", @@ -13003,25 +12049,16 @@ "items": { "type": "string" }, - "example": [ - "maintenance" - ] + "example": ["maintenance"] }, "group_by": { "description": "Override the labels by which incoming alerts are grouped together. For example, multiple alerts coming in for\ncluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels\nuse the special value '...' as the sole label name.\nThis effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what\nyou want, unless you have a very low alert volume or your upstream notification system performs its own grouping.\nMust include 'alertname' and 'grafana_folder' if not using '...'.", "type": "array", - "default": [ - "alertname", - "grafana_folder" - ], + "default": ["alertname", "grafana_folder"], "items": { "type": "string" }, - "example": [ - "alertname", - "grafana_folder", - "cluster" - ] + "example": ["alertname", "grafana_folder", "cluster"] }, "group_interval": { "description": "Override how long to wait before sending a notification about new alerts that are added to a group of alerts for\nwhich an initial notification has already been sent. (Usually ~5m or more.)", @@ -13039,9 +12076,7 @@ "items": { "type": "string" }, - "example": [ - "maintenance" - ] + "example": ["maintenance"] }, "receiver": { "description": "Name of the receiver to send notifications to.", @@ -13143,15 +12178,7 @@ "AlertingRule": { "description": "adapted from cortex", "type": "object", - "required": [ - "name", - "query", - "health", - "type", - "state", - "annotations", - "activeAt" - ], + "required": ["name", "query", "health", "type", "state", "annotations", "activeAt"], "properties": { "activeAt": { "type": "string", @@ -13246,11 +12273,7 @@ "properties": { "alertmanagersChoice": { "type": "string", - "enum": [ - "all", - "internal", - "external" - ] + "enum": ["all", "internal", "external"] }, "numExternalAlertmanagers": { "type": "integer", @@ -13600,11 +12623,7 @@ }, "exec_err_state": { "type": "string", - "enum": [ - "OK", - "Alerting", - "Error" - ] + "enum": ["OK", "Alerting", "Error"] }, "for": { "type": "string" @@ -13634,11 +12653,7 @@ }, "no_data_state": { "type": "string", - "enum": [ - "Alerting", - "NoData", - "OK" - ] + "enum": ["Alerting", "NoData", "OK"] }, "rule_group": { "type": "string" @@ -14290,10 +13305,7 @@ }, "CorrelationConfig": { "type": "object", - "required": [ - "field", - "target" - ], + "required": ["field", "target"], "properties": { "field": { "description": "Field used to attach the correlation link", @@ -14417,9 +13429,7 @@ }, "CreateDashboardSnapshotCommand": { "type": "object", - "required": [ - "dashboard" - ], + "required": ["dashboard"], "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n+optional", @@ -14492,9 +13502,7 @@ "description": "Kind of element to create, Use 1 for library panels or 2 for c.\nDescription:\n1 - library panels", "type": "integer", "format": "int64", - "enum": [ - 1 - ] + "enum": [1] }, "model": { "description": "The JSON model for the library element.", @@ -14594,9 +13602,7 @@ "CreateQueryInQueryHistoryCommand": { "description": "CreateQueryInQueryHistoryCommand is the command for adding query history", "type": "object", - "required": [ - "queries" - ], + "required": ["queries"], "properties": { "datasourceUid": { "description": "UID of the data source for which are queries stored.", @@ -14653,12 +13659,7 @@ }, "role": { "type": "string", - "enum": [ - "None", - "Viewer", - "Editor", - "Admin" - ], + "enum": ["None", "Viewer", "Editor", "Admin"], "example": "Admin" } } @@ -14697,9 +13698,7 @@ }, "CreateTeamCommand": { "type": "object", - "required": [ - "name" - ], + "required": ["name"], "properties": { "email": { "type": "string" @@ -14742,12 +13741,7 @@ }, "role": { "type": "string", - "enum": [ - "None", - "Viewer", - "Editor", - "Admin" - ] + "enum": ["None", "Viewer", "Editor", "Admin"] }, "slug": { "type": "string" @@ -14807,12 +13801,7 @@ }, "role": { "type": "string", - "enum": [ - "None", - "Viewer", - "Editor", - "Admin" - ] + "enum": ["None", "Viewer", "Editor", "Admin"] }, "teamId": { "type": "integer", @@ -14827,9 +13816,7 @@ "DashboardCreateCommand": { "description": "These are the values expected to be sent from an end user\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", "type": "object", - "required": [ - "dashboard" - ], + "required": ["dashboard"], "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n+optional", @@ -15338,9 +14325,7 @@ }, "DiscoveryBase": { "type": "object", - "required": [ - "status" - ], + "required": ["status"], "properties": { "error": { "type": "string" @@ -15435,10 +14420,7 @@ "EmbeddedContactPoint": { "description": "EmbeddedContactPoint is the contact point type that is used\nby grafanas embedded alertmanager implementation.", "type": "object", - "required": [ - "type", - "settings" - ], + "required": ["type", "settings"], "properties": { "disableResolveMessage": { "type": "boolean", @@ -15526,9 +14508,7 @@ }, "ErrorResponseBody": { "type": "object", - "required": [ - "message" - ], + "required": ["message"], "properties": { "error": { "description": "Error An optional detailed description of the actual error. Only included if running in developer mode.", @@ -15664,12 +14644,7 @@ }, "ExternalAlertmanagerStatus": { "type": "object", - "required": [ - "cluster", - "config", - "uptime", - "versionInfo" - ], + "required": ["cluster", "config", "uptime", "versionInfo"], "properties": { "cluster": { "$ref": "#/definitions/clusterStatus" @@ -16492,11 +15467,7 @@ }, "exec_err_state": { "type": "string", - "enum": [ - "OK", - "Alerting", - "Error" - ] + "enum": ["OK", "Alerting", "Error"] }, "guid": { "type": "string" @@ -16524,11 +15495,7 @@ }, "no_data_state": { "type": "string", - "enum": [ - "Alerting", - "NoData", - "OK" - ] + "enum": ["Alerting", "NoData", "OK"] }, "notification_settings": { "$ref": "#/definitions/AlertRuleNotificationSettings" @@ -16594,11 +15561,7 @@ "properties": { "alertmanagersChoice": { "type": "string", - "enum": [ - "all", - "internal", - "external" - ] + "enum": ["all", "internal", "external"] } } }, @@ -16658,12 +15621,7 @@ }, "GettableStatus": { "type": "object", - "required": [ - "cluster", - "config", - "uptime", - "versionInfo" - ], + "required": ["cluster", "config", "uptime", "versionInfo"], "properties": { "cluster": { "$ref": "#/definitions/clusterStatus" @@ -17665,11 +16623,7 @@ }, "MetricRequest": { "type": "object", - "required": [ - "from", - "to", - "queries" - ], + "required": ["from", "to", "queries"], "properties": { "debug": { "type": "boolean" @@ -17721,11 +16675,7 @@ }, "MigrateDataResponseItemDTO": { "type": "object", - "required": [ - "type", - "refId", - "status" - ], + "required": ["type", "refId", "status"], "properties": { "errorCode": { "type": "string", @@ -17759,13 +16709,7 @@ }, "status": { "type": "string", - "enum": [ - "OK", - "WARNING", - "ERROR", - "PENDING", - "UNKNOWN" - ] + "enum": ["OK", "WARNING", "ERROR", "PENDING", "UNKNOWN"] }, "type": { "type": "string", @@ -18480,9 +17424,7 @@ "description": "Kind of element to create, Use 1 for library panels or 2 for c.\nDescription:\n1 - library panels", "type": "integer", "format": "int64", - "enum": [ - 1 - ] + "enum": [1] }, "model": { "description": "The JSON model for the library element.", @@ -18528,10 +17470,7 @@ }, "theme": { "type": "string", - "enum": [ - "light", - "dark" - ] + "enum": ["light", "dark"] }, "timezone": { "description": "Any IANA timezone string (e.g. America/New_York), 'utc', 'browser', or empty string", @@ -18718,9 +17657,7 @@ }, "PostAnnotationsCmd": { "type": "object", - "required": [ - "text" - ], + "required": ["text"], "properties": { "dashboardId": { "type": "integer", @@ -18958,9 +17895,7 @@ }, "PostableExtendedRuleNodeExtended": { "type": "object", - "required": [ - "rule" - ], + "required": ["rule"], "properties": { "folderTitle": { "type": "string", @@ -19030,11 +17965,7 @@ }, "exec_err_state": { "type": "string", - "enum": [ - "OK", - "Alerting", - "Error" - ] + "enum": ["OK", "Alerting", "Error"] }, "is_paused": { "type": "boolean" @@ -19050,11 +17981,7 @@ }, "no_data_state": { "type": "string", - "enum": [ - "Alerting", - "NoData", - "OK" - ] + "enum": ["Alerting", "NoData", "OK"] }, "notification_settings": { "$ref": "#/definitions/AlertRuleNotificationSettings" @@ -19075,11 +18002,7 @@ "properties": { "alertmanagersChoice": { "type": "string", - "enum": [ - "all", - "internal", - "external" - ] + "enum": ["all", "internal", "external"] } } }, @@ -19342,10 +18265,7 @@ "conditions": [ { "evaluator": { - "params": [ - 0, - 0 - ], + "params": [0, 0], "type": "gt" }, "operator": { @@ -19383,11 +18303,7 @@ }, "execErrState": { "type": "string", - "enum": [ - "OK", - "Alerting", - "Error" - ] + "enum": ["OK", "Alerting", "Error"] }, "folderUID": { "type": "string", @@ -19425,11 +18341,7 @@ }, "noDataState": { "type": "string", - "enum": [ - "Alerting", - "NoData", - "OK" - ] + "enum": ["Alerting", "NoData", "OK"] }, "notification_settings": { "$ref": "#/definitions/AlertRuleNotificationSettings" @@ -20050,10 +18962,7 @@ }, "Record": { "type": "object", - "required": [ - "metric", - "from" - ], + "required": ["metric", "from"], "properties": { "from": { "description": "Which expression node should be used as the input for the recorded metric.", @@ -20542,16 +19451,7 @@ }, "RoleDTO": { "type": "object", - "required": [ - "version", - "uid", - "name", - "displayName", - "description", - "group", - "updated", - "created" - ], + "required": ["version", "uid", "name", "displayName", "description", "group", "updated", "created"], "properties": { "created": { "type": "string", @@ -20754,12 +19654,7 @@ "Rule": { "description": "adapted from cortex", "type": "object", - "required": [ - "name", - "query", - "health", - "type" - ], + "required": ["name", "query", "health", "type"], "properties": { "evaluationTime": { "type": "number", @@ -20806,9 +19701,7 @@ }, "RuleDiscovery": { "type": "object", - "required": [ - "groups" - ], + "required": ["groups"], "properties": { "groupNextToken": { "type": "string" @@ -20830,13 +19723,7 @@ }, "RuleGroup": { "type": "object", - "required": [ - "name", - "file", - "folderUid", - "rules", - "interval" - ], + "required": ["name", "file", "folderUid", "rules", "interval"], "properties": { "evaluationTime": { "type": "number", @@ -20925,9 +19812,7 @@ }, "RuleResponse": { "type": "object", - "required": [ - "status" - ], + "required": ["status"], "properties": { "data": { "$ref": "#/definitions/RuleDiscovery" @@ -21831,14 +20716,7 @@ }, "TeamDTO": { "type": "object", - "required": [ - "id", - "uid", - "orgId", - "name", - "isProvisioned", - "memberCount" - ], + "required": ["id", "uid", "orgId", "name", "isProvisioned", "memberCount"], "properties": { "accessControl": { "type": "object", @@ -22066,12 +20944,7 @@ }, "role": { "type": "string", - "enum": [ - "None", - "Viewer", - "Editor", - "Admin" - ] + "enum": ["None", "Viewer", "Editor", "Admin"] }, "status": { "$ref": "#/definitions/TempUserStatus" @@ -22133,10 +21006,7 @@ "kind": { "description": "Kind of template error that occurred.", "type": "string", - "enum": [ - "invalid_template", - "execution_error" - ] + "enum": ["invalid_template", "execution_error"] }, "message": { "description": "Error message.", @@ -22158,11 +21028,7 @@ "scope": { "description": "Scope that was successfully used to interpolate the template. If the root scope \".\" fails, more specific\nscopes will be tried, such as \".Alerts', or \".Alert\".", "type": "string", - "enum": [ - ".", - ".Alerts", - ".Alert" - ] + "enum": [".", ".Alerts", ".Alert"] }, "text": { "description": "Interpolated value of the template.", @@ -22451,10 +21317,7 @@ }, "type": { "type": "string", - "enum": [ - "regex", - "logfmt" - ] + "enum": ["regex", "logfmt"] } } }, @@ -22483,11 +21346,11 @@ } } }, - "URL": { - "type": "string", - "format": "url" - }, - "Unstructured": { + "URL": { + "type": "string", + "format": "url" + }, + "Unstructured": { "description": "Unstructured allows objects that do not have Golang structs registered to be manipulated\ngenerically.", "type": "object", "properties": { @@ -22700,12 +21563,7 @@ "properties": { "role": { "type": "string", - "enum": [ - "None", - "Viewer", - "Editor", - "Admin" - ] + "enum": ["None", "Viewer", "Editor", "Admin"] } } }, @@ -22755,11 +21613,7 @@ }, "theme": { "type": "string", - "enum": [ - "light", - "dark", - "system" - ] + "enum": ["light", "dark", "system"] }, "timezone": { "description": "Any IANA timezone string (e.g. America/New_York), 'utc', 'browser', or empty string", @@ -22784,11 +21638,7 @@ }, "UpdateRoleCommand": { "type": "object", - "required": [ - "displayName", - "description", - "group" - ], + "required": ["displayName", "description", "group"], "properties": { "description": { "type": "string" @@ -22853,12 +21703,7 @@ }, "role": { "type": "string", - "enum": [ - "None", - "Viewer", - "Editor", - "Admin" - ] + "enum": ["None", "Viewer", "Editor", "Admin"] }, "serviceAccountId": { "type": "integer", @@ -22955,12 +21800,7 @@ }, "role": { "type": "string", - "enum": [ - "None", - "Viewer", - "Editor", - "Admin" - ] + "enum": ["None", "Viewer", "Editor", "Admin"] } } }, @@ -23304,9 +22144,7 @@ "alert": { "description": "Alert alert", "type": "object", - "required": [ - "labels" - ], + "required": ["labels"], "properties": { "generatorURL": { "description": "generator URL\nFormat: uri", @@ -23321,11 +22159,7 @@ "alertGroup": { "description": "AlertGroup alert group", "type": "object", - "required": [ - "alerts", - "labels", - "receiver" - ], + "required": ["alerts", "labels", "receiver"], "properties": { "alerts": { "description": "alerts", @@ -23353,11 +22187,7 @@ "alertStatus": { "description": "AlertStatus alert status", "type": "object", - "required": [ - "inhibitedBy", - "silencedBy", - "state" - ], + "required": ["inhibitedBy", "silencedBy", "state"], "properties": { "inhibitedBy": { "description": "inhibited by", @@ -23376,18 +22206,14 @@ "state": { "description": "state", "type": "string", - "enum": [ - "[unprocessed active suppressed]" - ] + "enum": ["[unprocessed active suppressed]"] } } }, "alertmanagerConfig": { "description": "AlertmanagerConfig alertmanager config", "type": "object", - "required": [ - "original" - ], + "required": ["original"], "properties": { "original": { "description": "original", @@ -23398,12 +22224,7 @@ "alertmanagerStatus": { "description": "AlertmanagerStatus alertmanager status", "type": "object", - "required": [ - "cluster", - "config", - "uptime", - "versionInfo" - ], + "required": ["cluster", "config", "uptime", "versionInfo"], "properties": { "cluster": { "$ref": "#/definitions/clusterStatus" @@ -23424,9 +22245,7 @@ "clusterStatus": { "description": "ClusterStatus cluster status", "type": "object", - "required": [ - "status" - ], + "required": ["status"], "properties": { "name": { "description": "name", @@ -23442,9 +22261,7 @@ "status": { "description": "status", "type": "string", - "enum": [ - "[ready settling disabled]" - ] + "enum": ["[ready settling disabled]"] } } }, @@ -23494,16 +22311,7 @@ "gettableAlert": { "description": "GettableAlert gettable alert", "type": "object", - "required": [ - "labels", - "annotations", - "endsAt", - "fingerprint", - "receivers", - "startsAt", - "status", - "updatedAt" - ], + "required": ["labels", "annotations", "endsAt", "fingerprint", "receivers", "startsAt", "status", "updatedAt"], "properties": { "annotations": { "$ref": "#/definitions/labelSet" @@ -23557,16 +22365,7 @@ }, "gettableGrafanaSilence": { "type": "object", - "required": [ - "comment", - "createdBy", - "endsAt", - "matchers", - "startsAt", - "id", - "status", - "updatedAt" - ], + "required": ["comment", "createdBy", "endsAt", "matchers", "startsAt", "id", "status", "updatedAt"], "properties": { "accessControl": { "type": "object", @@ -23626,16 +22425,7 @@ "gettableSilence": { "description": "GettableSilence gettable silence", "type": "object", - "required": [ - "comment", - "createdBy", - "endsAt", - "matchers", - "startsAt", - "id", - "status", - "updatedAt" - ], + "required": ["comment", "createdBy", "endsAt", "matchers", "startsAt", "id", "status", "updatedAt"], "properties": { "comment": { "description": "comment", @@ -23710,11 +22500,7 @@ "matcher": { "description": "Matcher matcher", "type": "object", - "required": [ - "isRegex", - "name", - "value" - ], + "required": ["isRegex", "name", "value"], "properties": { "isEqual": { "description": "is equal", @@ -23752,10 +22538,7 @@ "peerStatus": { "description": "PeerStatus peer status", "type": "object", - "required": [ - "address", - "name" - ], + "required": ["address", "name"], "properties": { "address": { "description": "address", @@ -23779,9 +22562,7 @@ "postableAlert": { "description": "PostableAlert postable alert", "type": "object", - "required": [ - "labels" - ], + "required": ["labels"], "properties": { "annotations": { "$ref": "#/definitions/labelSet" @@ -23816,13 +22597,7 @@ "postableSilence": { "description": "PostableSilence postable silence", "type": "object", - "required": [ - "comment", - "createdBy", - "endsAt", - "matchers", - "startsAt" - ], + "required": ["comment", "createdBy", "endsAt", "matchers", "startsAt"], "properties": { "comment": { "description": "comment", @@ -23854,10 +22629,7 @@ "publicError": { "description": "PublicError is derived from Error and only contains information\navailable to the end user.", "type": "object", - "required": [ - "statusCode", - "messageId" - ], + "required": ["statusCode", "messageId"], "properties": { "extra": { "description": "Extra Additional information about the error", @@ -23882,9 +22654,7 @@ "receiver": { "description": "Receiver receiver", "type": "object", - "required": [ - "name" - ], + "required": ["name"], "properties": { "name": { "description": "name", @@ -23973,13 +22743,7 @@ "silence": { "description": "Silence silence", "type": "object", - "required": [ - "comment", - "createdBy", - "endsAt", - "matchers", - "startsAt" - ], + "required": ["comment", "createdBy", "endsAt", "matchers", "startsAt"], "properties": { "comment": { "description": "comment", @@ -24007,30 +22771,19 @@ "silenceStatus": { "description": "SilenceStatus silence status", "type": "object", - "required": [ - "state" - ], + "required": ["state"], "properties": { "state": { "description": "state", "type": "string", - "enum": [ - "[expired active pending]" - ] + "enum": ["[expired active pending]"] } } }, "versionInfo": { "description": "VersionInfo version info", "type": "object", - "required": [ - "branch", - "buildDate", - "buildUser", - "goVersion", - "revision", - "version" - ], + "required": ["branch", "buildDate", "buildUser", "goVersion", "revision", "version"], "properties": { "branch": { "description": "branch", @@ -24240,12 +22993,7 @@ "description": "(empty)", "schema": { "type": "object", - "required": [ - "id", - "name", - "message", - "datasource" - ], + "required": ["id", "name", "message", "datasource"], "properties": { "datasource": { "$ref": "#/definitions/DataSource" @@ -24273,10 +23021,7 @@ "description": "(empty)", "schema": { "type": "object", - "required": [ - "orgId", - "message" - ], + "required": ["orgId", "message"], "properties": { "message": { "description": "Message Message of the created org.", @@ -24389,11 +23134,7 @@ "description": "(empty)", "schema": { "type": "object", - "required": [ - "uid", - "title", - "message" - ], + "required": ["uid", "title", "message"], "properties": { "message": { "description": "Message Message of the deleted dashboard.", @@ -24417,10 +23158,7 @@ "description": "(empty)", "schema": { "type": "object", - "required": [ - "id", - "message" - ], + "required": ["id", "message"], "properties": { "id": { "description": "ID Identifier of the deleted data source.", @@ -24440,11 +23178,7 @@ "description": "(empty)", "schema": { "type": "object", - "required": [ - "id", - "title", - "message" - ], + "required": ["id", "title", "message"], "properties": { "id": { "description": "ID Identifier of the deleted folder.", @@ -24595,9 +23329,7 @@ "description": "(empty)", "schema": { "type": "object", - "required": [ - "id" - ], + "required": ["id"], "properties": { "id": { "description": "ID Identifier of the data source.", @@ -25186,10 +23918,7 @@ "description": "(empty)", "schema": { "type": "object", - "required": [ - "id", - "message" - ], + "required": ["id", "message"], "properties": { "id": { "description": "ID Identifier of the created annotation.", @@ -25208,14 +23937,7 @@ "description": "(empty)", "schema": { "type": "object", - "required": [ - "status", - "title", - "version", - "id", - "uid", - "url" - ], + "required": ["status", "title", "version", "id", "uid", "url"], "properties": { "folderUid": { "description": "FolderUID The unique identifier (uid) of the folder the dashboard belongs to.", @@ -25595,4 +24317,4 @@ "name": "service_accounts" } ] -} \ No newline at end of file +} diff --git a/integrations/grafana/package.json b/integrations/grafana/package.json index ce12b4f369c..6d7c12f6274 100644 --- a/integrations/grafana/package.json +++ b/integrations/grafana/package.json @@ -5,8 +5,8 @@ "check:type": "tsc --noEmit", "check:bplint": "bp lint", "test": "vitest --run", - "generate:k8s": "openapi-ts -i ./src/gen/specs/grafana-dashboard-k8s.json ./src/gen/specs/grafana-folder-k8s.json -o ./src/gen/grafana-k8s-client -c @hey-api/client-fetch", - "generate:legacy": "openapi-ts -i ./src/gen/specs/grafana-legacy.json -o ./src/gen/grafana-legacy-client -c @hey-api/client-fetch", + "generate:k8s": "openapi-ts -i ./grafana-api/grafana-dashboard-k8s.json ./grafana-api/grafana-folder-k8s.json -o ./src/gen/grafana-k8s-client -c @hey-api/client-fetch", + "generate:legacy": "openapi-ts -i ./grafana-api/grafana-legacy.json -o ./src/gen/grafana-legacy-client -c @hey-api/client-fetch", "generate": "pnpm run generate:k8s && pnpm run generate:legacy" }, "private": true, @@ -16,8 +16,6 @@ "devDependencies": { "@botpress/cli": "workspace:*", "@hey-api/client-fetch": "^0.13.1", - "@hey-api/openapi-ts": "^0.97.1", - "@types/node": "^22.16.4", - "typescript": "^5.6.3" + "@hey-api/openapi-ts": "^0.97.1" } } diff --git a/integrations/grafana/src/client.ts b/integrations/grafana/src/client.ts index a9256046157..5fb51431979 100644 --- a/integrations/grafana/src/client.ts +++ b/integrations/grafana/src/client.ts @@ -31,7 +31,6 @@ import { createClient as createLegacyClient, createConfig as createLegacyConfig, } from './gen/grafana-legacy-client/client' -import type { Panel } from './gen/types/GrafanaDashboard' export type GrafanaConfig = { grafanaUsername: string @@ -43,6 +42,48 @@ type CreateFolderInput = z.infer type PolicyMatcher = z.infer type NotificationPolicyInput = z.infer +type Datasource = { + type: string + uid: string +} + +type Target = { + refId: string + datasource?: Datasource + expr?: string +} + +type GridPos = { + h?: number + w?: number + x?: number + y?: number +} + +type TextPanel = { + type: 'text' + title: string + description?: string + content?: string + mode?: 'markdown' | 'html' | 'code' + gridPos?: GridPos + id?: number +} + +type TimeSeriesPanel = { + type: 'timeseries' + title: string + description?: string + datasource?: Datasource + gridPos?: GridPos + id?: number + targets?: Target[] + fieldConfig?: any + options?: any +} + +type Panel = TextPanel | TimeSeriesPanel + type CreateDashboardInput = { uid: string title: string diff --git a/integrations/grafana/src/gen/.DS_Store b/integrations/grafana/src/gen/.DS_Store deleted file mode 100644 index dd49b34fd93..00000000000 Binary files a/integrations/grafana/src/gen/.DS_Store and /dev/null differ diff --git a/integrations/grafana/src/gen/grafana-k8s-client/client.gen.ts b/integrations/grafana/src/gen/grafana-k8s-client/client.gen.ts deleted file mode 100644 index cab3c70195b..00000000000 --- a/integrations/grafana/src/gen/grafana-k8s-client/client.gen.ts +++ /dev/null @@ -1,16 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import { type ClientOptions, type Config, createClient, createConfig } from './client'; -import type { ClientOptions as ClientOptions2 } from './types.gen'; - -/** - * The `createClientConfig()` function will be called on client initialization - * and the returned object will become the client's initial configuration. - * - * You may want to initialize your client this way instead of calling - * `setConfig()`. This is useful for example if you're using Next.js - * to ensure your client always has the correct values. - */ -export type CreateClientConfig = (override?: Config) => Config & T>; - -export const client = createClient(createConfig()); diff --git a/integrations/grafana/src/gen/grafana-k8s-client/client/client.gen.ts b/integrations/grafana/src/gen/grafana-k8s-client/client/client.gen.ts deleted file mode 100644 index 377b6c9e091..00000000000 --- a/integrations/grafana/src/gen/grafana-k8s-client/client/client.gen.ts +++ /dev/null @@ -1,280 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import { createSseClient } from '../core/serverSentEvents.gen'; -import type { HttpMethod } from '../core/types.gen'; -import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions, ResolvedRequestOptions } from './types.gen'; -import { - buildUrl, - createConfig, - createInterceptors, - getParseAs, - mergeConfigs, - mergeHeaders, - setAuthParams, -} from './utils.gen'; - -type ReqInit = Omit & { - body?: any; - headers: ReturnType; -}; - -export const createClient = (config: Config = {}): Client => { - let _config = mergeConfigs(createConfig(), config); - - const getConfig = (): Config => ({ ..._config }); - - const setConfig = (config: Config): Config => { - _config = mergeConfigs(_config, config); - return getConfig(); - }; - - const interceptors = createInterceptors(); - - const beforeRequest = async < - TData = unknown, - TResponseStyle extends 'data' | 'fields' = 'fields', - ThrowOnError extends boolean = boolean, - Url extends string = string, - >( - options: RequestOptions, - ) => { - const opts = { - ..._config, - ...options, - fetch: options.fetch ?? _config.fetch ?? globalThis.fetch, - headers: mergeHeaders(_config.headers, options.headers), - serializedBody: undefined as string | undefined, - }; - - if (opts.security) { - await setAuthParams({ - ...opts, - security: opts.security, - }); - } - - if (opts.requestValidator) { - await opts.requestValidator(opts); - } - - if (opts.body !== undefined && opts.bodySerializer) { - opts.serializedBody = opts.bodySerializer(opts.body) as string | undefined; - } - - // remove Content-Type header if body is empty to avoid sending invalid requests - if (opts.body === undefined || opts.serializedBody === '') { - opts.headers.delete('Content-Type'); - } - - const resolvedOpts = opts as typeof opts & - ResolvedRequestOptions; - const url = buildUrl(resolvedOpts); - - return { opts: resolvedOpts, url }; - }; - - const request: Client['request'] = async (options) => { - const throwOnError = options.throwOnError ?? _config.throwOnError; - const responseStyle = options.responseStyle ?? _config.responseStyle; - - let request: Request | undefined; - let response: Response | undefined; - - try { - const { opts, url } = await beforeRequest(options); - const requestInit: ReqInit = { - redirect: 'follow', - ...opts, - body: getValidRequestBody(opts), - }; - - request = new Request(url, requestInit); - - for (const fn of interceptors.request.fns) { - if (fn) { - request = await fn(request, opts); - } - } - - // fetch must be assigned here, otherwise it would throw the error: - // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation - const _fetch = opts.fetch!; - - response = await _fetch(request); - - for (const fn of interceptors.response.fns) { - if (fn) { - response = await fn(response, request, opts); - } - } - - const result = { - request, - response, - }; - - if (response.ok) { - const parseAs = - (opts.parseAs === 'auto' - ? getParseAs(response.headers.get('Content-Type')) - : opts.parseAs) ?? 'json'; - - if (response.status === 204 || response.headers.get('Content-Length') === '0') { - let emptyData: any; - switch (parseAs) { - case 'arrayBuffer': - case 'blob': - case 'text': - emptyData = await response[parseAs](); - break; - case 'formData': - emptyData = new FormData(); - break; - case 'stream': - emptyData = response.body; - break; - case 'json': - default: - emptyData = {}; - break; - } - return opts.responseStyle === 'data' - ? emptyData - : { - data: emptyData, - ...result, - }; - } - - let data: any; - switch (parseAs) { - case 'arrayBuffer': - case 'blob': - case 'formData': - case 'text': - data = await response[parseAs](); - break; - case 'json': { - // Some servers return 200 with no Content-Length and empty body. - // response.json() would throw; read as text and parse if non-empty. - const text = await response.text(); - data = text ? JSON.parse(text) : {}; - break; - } - case 'stream': - return opts.responseStyle === 'data' - ? response.body - : { - data: response.body, - ...result, - }; - } - - if (parseAs === 'json') { - if (opts.responseValidator) { - await opts.responseValidator(data); - } - - if (opts.responseTransformer) { - data = await opts.responseTransformer(data); - } - } - - return opts.responseStyle === 'data' - ? data - : { - data, - ...result, - }; - } - - const textError = await response.text(); - let jsonError: unknown; - - try { - jsonError = JSON.parse(textError); - } catch { - // noop - } - - throw jsonError ?? textError; - } catch (error) { - let finalError = error; - - for (const fn of interceptors.error.fns) { - if (fn) { - finalError = await fn(finalError, response, request, options as ResolvedRequestOptions); - } - } - - finalError = finalError || {}; - - if (throwOnError) { - throw finalError; - } - - // TODO: we probably want to return error and improve types - return responseStyle === 'data' - ? undefined - : { - error: finalError, - request, - response, - }; - } - }; - - const makeMethodFn = (method: Uppercase) => (options: RequestOptions) => - request({ ...options, method }); - - const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { - const { opts, url } = await beforeRequest(options); - return createSseClient({ - ...opts, - body: opts.body as BodyInit | null | undefined, - method, - onRequest: async (url, init) => { - let request = new Request(url, init); - for (const fn of interceptors.request.fns) { - if (fn) { - request = await fn(request, opts); - } - } - return request; - }, - serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined, - url, - }); - }; - - const _buildUrl: Client['buildUrl'] = (options) => buildUrl({ ..._config, ...options }); - - return { - buildUrl: _buildUrl, - connect: makeMethodFn('CONNECT'), - delete: makeMethodFn('DELETE'), - get: makeMethodFn('GET'), - getConfig, - head: makeMethodFn('HEAD'), - interceptors, - options: makeMethodFn('OPTIONS'), - patch: makeMethodFn('PATCH'), - post: makeMethodFn('POST'), - put: makeMethodFn('PUT'), - request, - setConfig, - sse: { - connect: makeSseFn('CONNECT'), - delete: makeSseFn('DELETE'), - get: makeSseFn('GET'), - head: makeSseFn('HEAD'), - options: makeSseFn('OPTIONS'), - patch: makeSseFn('PATCH'), - post: makeSseFn('POST'), - put: makeSseFn('PUT'), - trace: makeSseFn('TRACE'), - }, - trace: makeMethodFn('TRACE'), - } as Client; -}; diff --git a/integrations/grafana/src/gen/grafana-k8s-client/client/index.ts b/integrations/grafana/src/gen/grafana-k8s-client/client/index.ts deleted file mode 100644 index b295edeca0c..00000000000 --- a/integrations/grafana/src/gen/grafana-k8s-client/client/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export type { Auth } from '../core/auth.gen'; -export type { QuerySerializerOptions } from '../core/bodySerializer.gen'; -export { - formDataBodySerializer, - jsonBodySerializer, - urlSearchParamsBodySerializer, -} from '../core/bodySerializer.gen'; -export { buildClientParams } from '../core/params.gen'; -export { serializeQueryKeyValue } from '../core/queryKeySerializer.gen'; -export { createClient } from './client.gen'; -export type { - Client, - ClientOptions, - Config, - CreateClientConfig, - Options, - RequestOptions, - RequestResult, - ResolvedRequestOptions, - ResponseStyle, - TDataShape, -} from './types.gen'; -export { createConfig, mergeHeaders } from './utils.gen'; diff --git a/integrations/grafana/src/gen/grafana-k8s-client/client/types.gen.ts b/integrations/grafana/src/gen/grafana-k8s-client/client/types.gen.ts deleted file mode 100644 index 4b288a5099b..00000000000 --- a/integrations/grafana/src/gen/grafana-k8s-client/client/types.gen.ts +++ /dev/null @@ -1,217 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import type { Auth } from '../core/auth.gen'; -import type { - ServerSentEventsOptions, - ServerSentEventsResult, -} from '../core/serverSentEvents.gen'; -import type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen'; -import type { Middleware } from './utils.gen'; - -export type ResponseStyle = 'data' | 'fields'; - -export interface Config - extends Omit, CoreConfig { - /** - * Base URL for all requests made by this client. - */ - baseUrl?: T['baseUrl']; - /** - * Fetch API implementation. You can use this option to provide a custom - * fetch instance. - * - * @default globalThis.fetch - */ - fetch?: typeof fetch; - /** - * Please don't use the Fetch client for Next.js applications. The `next` - * options won't have any effect. - * - * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead. - */ - next?: never; - /** - * Return the response data parsed in a specified format. By default, `auto` - * will infer the appropriate method from the `Content-Type` response header. - * You can override this behavior with any of the {@link Body} methods. - * Select `stream` if you don't want to parse response data at all. - * - * @default 'auto' - */ - parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text'; - /** - * Should we return only data or multiple fields (data, error, response, etc.)? - * - * @default 'fields' - */ - responseStyle?: ResponseStyle; - /** - * Throw an error instead of returning it in the response? - * - * @default false - */ - throwOnError?: T['throwOnError']; -} - -export interface RequestOptions< - TData = unknown, - TResponseStyle extends ResponseStyle = 'fields', - ThrowOnError extends boolean = boolean, - Url extends string = string, -> - extends - Config<{ - responseStyle: TResponseStyle; - throwOnError: ThrowOnError; - }>, - Pick< - ServerSentEventsOptions, - | 'onRequest' - | 'onSseError' - | 'onSseEvent' - | 'sseDefaultRetryDelay' - | 'sseMaxRetryAttempts' - | 'sseMaxRetryDelay' - > { - /** - * Any body that you want to add to your request. - * - * {@link https://developer.mozilla.org/docs/Web/API/fetch#body} - */ - body?: unknown; - path?: Record; - query?: Record; - /** - * Security mechanism(s) to use for the request. - */ - security?: ReadonlyArray; - url: Url; -} - -export interface ResolvedRequestOptions< - TResponseStyle extends ResponseStyle = 'fields', - ThrowOnError extends boolean = boolean, - Url extends string = string, -> extends RequestOptions { - headers: Headers; - serializedBody?: string; -} - -export type RequestResult< - TData = unknown, - TError = unknown, - ThrowOnError extends boolean = boolean, - TResponseStyle extends ResponseStyle = 'fields', -> = ThrowOnError extends true - ? Promise< - TResponseStyle extends 'data' - ? TData extends Record - ? TData[keyof TData] - : TData - : { - data: TData extends Record ? TData[keyof TData] : TData; - request: Request; - response: Response; - } - > - : Promise< - TResponseStyle extends 'data' - ? (TData extends Record ? TData[keyof TData] : TData) | undefined - : ( - | { - data: TData extends Record ? TData[keyof TData] : TData; - error: undefined; - } - | { - data: undefined; - error: TError extends Record ? TError[keyof TError] : TError; - } - ) & { - /** request may be undefined, because error may be from building the request object itself */ - request?: Request; - /** response may be undefined, because error may be from building the request object itself or from a network error */ - response?: Response; - } - >; - -export interface ClientOptions { - baseUrl?: string; - responseStyle?: ResponseStyle; - throwOnError?: boolean; -} - -type MethodFn = < - TData = unknown, - TError = unknown, - ThrowOnError extends boolean = false, - TResponseStyle extends ResponseStyle = 'fields', ->( - options: Omit, 'method'>, -) => RequestResult; - -type SseFn = < - TData = unknown, - TError = unknown, - ThrowOnError extends boolean = false, - TResponseStyle extends ResponseStyle = 'fields', ->( - options: Omit, 'method'>, -) => Promise>; - -type RequestFn = < - TData = unknown, - TError = unknown, - ThrowOnError extends boolean = false, - TResponseStyle extends ResponseStyle = 'fields', ->( - options: Omit, 'method'> & - Pick>, 'method'>, -) => RequestResult; - -type BuildUrlFn = < - TData extends { - body?: unknown; - path?: Record; - query?: Record; - url: string; - }, ->( - options: TData & Options, -) => string; - -export type Client = CoreClient & { - interceptors: Middleware; -}; - -/** - * The `createClientConfig()` function will be called on client initialization - * and the returned object will become the client's initial configuration. - * - * You may want to initialize your client this way instead of calling - * `setConfig()`. This is useful for example if you're using Next.js - * to ensure your client always has the correct values. - */ -export type CreateClientConfig = ( - override?: Config, -) => Config & T>; - -export interface TDataShape { - body?: unknown; - headers?: unknown; - path?: unknown; - query?: unknown; - url: string; -} - -type OmitKeys = Pick>; - -export type Options< - TData extends TDataShape = TDataShape, - ThrowOnError extends boolean = boolean, - TResponse = unknown, - TResponseStyle extends ResponseStyle = 'fields', -> = OmitKeys< - RequestOptions, - 'body' | 'path' | 'query' | 'url' -> & - ([TData] extends [never] ? unknown : Omit); diff --git a/integrations/grafana/src/gen/grafana-k8s-client/client/utils.gen.ts b/integrations/grafana/src/gen/grafana-k8s-client/client/utils.gen.ts deleted file mode 100644 index eb0164fa8c1..00000000000 --- a/integrations/grafana/src/gen/grafana-k8s-client/client/utils.gen.ts +++ /dev/null @@ -1,318 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import { getAuthToken } from '../core/auth.gen'; -import type { QuerySerializerOptions } from '../core/bodySerializer.gen'; -import { jsonBodySerializer } from '../core/bodySerializer.gen'; -import { - serializeArrayParam, - serializeObjectParam, - serializePrimitiveParam, -} from '../core/pathSerializer.gen'; -import { getUrl } from '../core/utils.gen'; -import type { Client, ClientOptions, Config, RequestOptions } from './types.gen'; - -export const createQuerySerializer = ({ - parameters = {}, - ...args -}: QuerySerializerOptions = {}) => { - const querySerializer = (queryParams: T) => { - const search: string[] = []; - if (queryParams && typeof queryParams === 'object') { - for (const name in queryParams) { - const value = queryParams[name]; - - if (value === undefined || value === null) { - continue; - } - - const options = parameters[name] || args; - - if (Array.isArray(value)) { - const serializedArray = serializeArrayParam({ - allowReserved: options.allowReserved, - explode: true, - name, - style: 'form', - value, - ...options.array, - }); - if (serializedArray) search.push(serializedArray); - } else if (typeof value === 'object') { - const serializedObject = serializeObjectParam({ - allowReserved: options.allowReserved, - explode: true, - name, - style: 'deepObject', - value: value as Record, - ...options.object, - }); - if (serializedObject) search.push(serializedObject); - } else { - const serializedPrimitive = serializePrimitiveParam({ - allowReserved: options.allowReserved, - name, - value: value as string, - }); - if (serializedPrimitive) search.push(serializedPrimitive); - } - } - } - return search.join('&'); - }; - return querySerializer; -}; - -/** - * Infers parseAs value from provided Content-Type header. - */ -export const getParseAs = (contentType: string | null): Exclude => { - if (!contentType) { - // If no Content-Type header is provided, the best we can do is return the raw response body, - // which is effectively the same as the 'stream' option. - return 'stream'; - } - - const cleanContent = contentType.split(';')[0]?.trim(); - - if (!cleanContent) { - return; - } - - if (cleanContent.startsWith('application/json') || cleanContent.endsWith('+json')) { - return 'json'; - } - - if (cleanContent === 'multipart/form-data') { - return 'formData'; - } - - if ( - ['application/', 'audio/', 'image/', 'video/'].some((type) => cleanContent.startsWith(type)) - ) { - return 'blob'; - } - - if (cleanContent.startsWith('text/')) { - return 'text'; - } - - return; -}; - -const checkForExistence = ( - options: Pick & { - headers: Headers; - }, - name?: string, -): boolean => { - if (!name) { - return false; - } - if ( - options.headers.has(name) || - options.query?.[name] || - options.headers.get('Cookie')?.includes(`${name}=`) - ) { - return true; - } - return false; -}; - -export const setAuthParams = async ({ - security, - ...options -}: Pick, 'security'> & - Pick & { - headers: Headers; - }) => { - for (const auth of security) { - if (checkForExistence(options, auth.name)) { - continue; - } - - const token = await getAuthToken(auth, options.auth); - - if (!token) { - continue; - } - - const name = auth.name ?? 'Authorization'; - - switch (auth.in) { - case 'query': - if (!options.query) { - options.query = {}; - } - options.query[name] = token; - break; - case 'cookie': - options.headers.append('Cookie', `${name}=${token}`); - break; - case 'header': - default: - options.headers.set(name, token); - break; - } - } -}; - -export const buildUrl: Client['buildUrl'] = (options) => - getUrl({ - baseUrl: options.baseUrl as string, - path: options.path, - query: options.query, - querySerializer: - typeof options.querySerializer === 'function' - ? options.querySerializer - : createQuerySerializer(options.querySerializer), - url: options.url, - }); - -export const mergeConfigs = (a: Config, b: Config): Config => { - const config = { ...a, ...b }; - if (config.baseUrl?.endsWith('/')) { - config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1); - } - config.headers = mergeHeaders(a.headers, b.headers); - return config; -}; - -const headersEntries = (headers: Headers): Array<[string, string]> => { - const entries: Array<[string, string]> = []; - headers.forEach((value, key) => { - entries.push([key, value]); - }); - return entries; -}; - -export const mergeHeaders = ( - ...headers: Array['headers'] | undefined> -): Headers => { - const mergedHeaders = new Headers(); - for (const header of headers) { - if (!header) { - continue; - } - - const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header); - - for (const [key, value] of iterator) { - if (value === null) { - mergedHeaders.delete(key); - } else if (Array.isArray(value)) { - for (const v of value) { - mergedHeaders.append(key, v as string); - } - } else if (value !== undefined) { - // assume object headers are meant to be JSON stringified, i.e., their - // content value in OpenAPI specification is 'application/json' - mergedHeaders.set( - key, - typeof value === 'object' ? JSON.stringify(value) : (value as string), - ); - } - } - } - return mergedHeaders; -}; - -type ErrInterceptor = ( - error: Err, - /** response may be undefined due to a network error where no response object is produced */ - response: Res | undefined, - /** request may be undefined, because error may be from building the request object itself */ - request: Req | undefined, - options: Options, -) => Err | Promise; - -type ReqInterceptor = (request: Req, options: Options) => Req | Promise; - -type ResInterceptor = ( - response: Res, - request: Req, - options: Options, -) => Res | Promise; - -class Interceptors { - fns: Array = []; - - clear(): void { - this.fns = []; - } - - eject(id: number | Interceptor): void { - const index = this.getInterceptorIndex(id); - if (this.fns[index]) { - this.fns[index] = null; - } - } - - exists(id: number | Interceptor): boolean { - const index = this.getInterceptorIndex(id); - return Boolean(this.fns[index]); - } - - getInterceptorIndex(id: number | Interceptor): number { - if (typeof id === 'number') { - return this.fns[id] ? id : -1; - } - return this.fns.indexOf(id); - } - - update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false { - const index = this.getInterceptorIndex(id); - if (this.fns[index]) { - this.fns[index] = fn; - return id; - } - return false; - } - - use(fn: Interceptor): number { - this.fns.push(fn); - return this.fns.length - 1; - } -} - -export interface Middleware { - error: Interceptors>; - request: Interceptors>; - response: Interceptors>; -} - -export const createInterceptors = (): Middleware< - Req, - Res, - Err, - Options -> => ({ - error: new Interceptors>(), - request: new Interceptors>(), - response: new Interceptors>(), -}); - -const defaultQuerySerializer = createQuerySerializer({ - allowReserved: false, - array: { - explode: true, - style: 'form', - }, - object: { - explode: true, - style: 'deepObject', - }, -}); - -const defaultHeaders = { - 'Content-Type': 'application/json', -}; - -export const createConfig = ( - override: Config & T> = {}, -): Config & T> => ({ - ...jsonBodySerializer, - headers: defaultHeaders, - parseAs: 'auto', - querySerializer: defaultQuerySerializer, - ...override, -}); diff --git a/integrations/grafana/src/gen/grafana-k8s-client/core/auth.gen.ts b/integrations/grafana/src/gen/grafana-k8s-client/core/auth.gen.ts deleted file mode 100644 index 3ebf9947883..00000000000 --- a/integrations/grafana/src/gen/grafana-k8s-client/core/auth.gen.ts +++ /dev/null @@ -1,41 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export type AuthToken = string | undefined; - -export interface Auth { - /** - * Which part of the request do we use to send the auth? - * - * @default 'header' - */ - in?: 'header' | 'query' | 'cookie'; - /** - * Header or query parameter name. - * - * @default 'Authorization' - */ - name?: string; - scheme?: 'basic' | 'bearer'; - type: 'apiKey' | 'http'; -} - -export const getAuthToken = async ( - auth: Auth, - callback: ((auth: Auth) => Promise | AuthToken) | AuthToken, -): Promise => { - const token = typeof callback === 'function' ? await callback(auth) : callback; - - if (!token) { - return; - } - - if (auth.scheme === 'bearer') { - return `Bearer ${token}`; - } - - if (auth.scheme === 'basic') { - return `Basic ${btoa(token)}`; - } - - return token; -}; diff --git a/integrations/grafana/src/gen/grafana-k8s-client/core/bodySerializer.gen.ts b/integrations/grafana/src/gen/grafana-k8s-client/core/bodySerializer.gen.ts deleted file mode 100644 index 67daca60f89..00000000000 --- a/integrations/grafana/src/gen/grafana-k8s-client/core/bodySerializer.gen.ts +++ /dev/null @@ -1,82 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen'; - -export type QuerySerializer = (query: Record) => string; - -export type BodySerializer = (body: unknown) => unknown; - -type QuerySerializerOptionsObject = { - allowReserved?: boolean; - array?: Partial>; - object?: Partial>; -}; - -export type QuerySerializerOptions = QuerySerializerOptionsObject & { - /** - * Per-parameter serialization overrides. When provided, these settings - * override the global array/object settings for specific parameter names. - */ - parameters?: Record; -}; - -const serializeFormDataPair = (data: FormData, key: string, value: unknown): void => { - if (typeof value === 'string' || value instanceof Blob) { - data.append(key, value); - } else if (value instanceof Date) { - data.append(key, value.toISOString()); - } else { - data.append(key, JSON.stringify(value)); - } -}; - -const serializeUrlSearchParamsPair = (data: URLSearchParams, key: string, value: unknown): void => { - if (typeof value === 'string') { - data.append(key, value); - } else { - data.append(key, JSON.stringify(value)); - } -}; - -export const formDataBodySerializer = { - bodySerializer: (body: unknown): FormData => { - const data = new FormData(); - - Object.entries(body as Record).forEach(([key, value]) => { - if (value === undefined || value === null) { - return; - } - if (Array.isArray(value)) { - value.forEach((v) => serializeFormDataPair(data, key, v)); - } else { - serializeFormDataPair(data, key, value); - } - }); - - return data; - }, -}; - -export const jsonBodySerializer = { - bodySerializer: (body: unknown): string => - JSON.stringify(body, (_key, value) => (typeof value === 'bigint' ? value.toString() : value)), -}; - -export const urlSearchParamsBodySerializer = { - bodySerializer: (body: unknown): string => { - const data = new URLSearchParams(); - - Object.entries(body as Record).forEach(([key, value]) => { - if (value === undefined || value === null) { - return; - } - if (Array.isArray(value)) { - value.forEach((v) => serializeUrlSearchParamsPair(data, key, v)); - } else { - serializeUrlSearchParamsPair(data, key, value); - } - }); - - return data.toString(); - }, -}; diff --git a/integrations/grafana/src/gen/grafana-k8s-client/core/params.gen.ts b/integrations/grafana/src/gen/grafana-k8s-client/core/params.gen.ts deleted file mode 100644 index 7955601a5cc..00000000000 --- a/integrations/grafana/src/gen/grafana-k8s-client/core/params.gen.ts +++ /dev/null @@ -1,169 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -type Slot = 'body' | 'headers' | 'path' | 'query'; - -export type Field = - | { - in: Exclude; - /** - * Field name. This is the name we want the user to see and use. - */ - key: string; - /** - * Field mapped name. This is the name we want to use in the request. - * If omitted, we use the same value as `key`. - */ - map?: string; - } - | { - in: Extract; - /** - * Key isn't required for bodies. - */ - key?: string; - map?: string; - } - | { - /** - * Field name. This is the name we want the user to see and use. - */ - key: string; - /** - * Field mapped name. This is the name we want to use in the request. - * If `in` is omitted, `map` aliases `key` to the transport layer. - */ - map: Slot; - }; - -export interface Fields { - allowExtra?: Partial>; - args?: ReadonlyArray; -} - -export type FieldsConfig = ReadonlyArray; - -const extraPrefixesMap: Record = { - $body_: 'body', - $headers_: 'headers', - $path_: 'path', - $query_: 'query', -}; -const extraPrefixes = Object.entries(extraPrefixesMap); - -type KeyMap = Map< - string, - | { - in: Slot; - map?: string; - } - | { - in?: never; - map: Slot; - } ->; - -const buildKeyMap = (fields: FieldsConfig, map?: KeyMap): KeyMap => { - if (!map) { - map = new Map(); - } - - for (const config of fields) { - if ('in' in config) { - if (config.key) { - map.set(config.key, { - in: config.in, - map: config.map, - }); - } - } else if ('key' in config) { - map.set(config.key, { - map: config.map, - }); - } else if (config.args) { - buildKeyMap(config.args, map); - } - } - - return map; -}; - -interface Params { - body: unknown; - headers: Record; - path: Record; - query: Record; -} - -const stripEmptySlots = (params: Params) => { - for (const [slot, value] of Object.entries(params)) { - if (value && typeof value === 'object' && !Array.isArray(value) && !Object.keys(value).length) { - delete params[slot as Slot]; - } - } -}; - -export const buildClientParams = (args: ReadonlyArray, fields: FieldsConfig) => { - const params: Params = { - body: {}, - headers: {}, - path: {}, - query: {}, - }; - - const map = buildKeyMap(fields); - - let config: FieldsConfig[number] | undefined; - - for (const [index, arg] of args.entries()) { - if (fields[index]) { - config = fields[index]; - } - - if (!config) { - continue; - } - - if ('in' in config) { - if (config.key) { - const field = map.get(config.key)!; - const name = field.map || config.key; - if (field.in) { - (params[field.in] as Record)[name] = arg; - } - } else { - params.body = arg; - } - } else { - for (const [key, value] of Object.entries(arg ?? {})) { - const field = map.get(key); - - if (field) { - if (field.in) { - const name = field.map || key; - (params[field.in] as Record)[name] = value; - } else { - params[field.map] = value; - } - } else { - const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix)); - - if (extra) { - const [prefix, slot] = extra; - (params[slot] as Record)[key.slice(prefix.length)] = value; - } else if ('allowExtra' in config && config.allowExtra) { - for (const [slot, allowed] of Object.entries(config.allowExtra)) { - if (allowed) { - (params[slot as Slot] as Record)[key] = value; - break; - } - } - } - } - } - } - } - - stripEmptySlots(params); - - return params; -}; diff --git a/integrations/grafana/src/gen/grafana-k8s-client/core/pathSerializer.gen.ts b/integrations/grafana/src/gen/grafana-k8s-client/core/pathSerializer.gen.ts deleted file mode 100644 index 994b2848c63..00000000000 --- a/integrations/grafana/src/gen/grafana-k8s-client/core/pathSerializer.gen.ts +++ /dev/null @@ -1,171 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -interface SerializeOptions extends SerializePrimitiveOptions, SerializerOptions {} - -interface SerializePrimitiveOptions { - allowReserved?: boolean; - name: string; -} - -export interface SerializerOptions { - /** - * @default true - */ - explode: boolean; - style: T; -} - -export type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; -export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; -type MatrixStyle = 'label' | 'matrix' | 'simple'; -export type ObjectStyle = 'form' | 'deepObject'; -type ObjectSeparatorStyle = ObjectStyle | MatrixStyle; - -interface SerializePrimitiveParam extends SerializePrimitiveOptions { - value: string; -} - -export const separatorArrayExplode = (style: ArraySeparatorStyle) => { - switch (style) { - case 'label': - return '.'; - case 'matrix': - return ';'; - case 'simple': - return ','; - default: - return '&'; - } -}; - -export const separatorArrayNoExplode = (style: ArraySeparatorStyle) => { - switch (style) { - case 'form': - return ','; - case 'pipeDelimited': - return '|'; - case 'spaceDelimited': - return '%20'; - default: - return ','; - } -}; - -export const separatorObjectExplode = (style: ObjectSeparatorStyle) => { - switch (style) { - case 'label': - return '.'; - case 'matrix': - return ';'; - case 'simple': - return ','; - default: - return '&'; - } -}; - -export const serializeArrayParam = ({ - allowReserved, - explode, - name, - style, - value, -}: SerializeOptions & { - value: unknown[]; -}) => { - if (!explode) { - const joinedValues = ( - allowReserved ? value : value.map((v) => encodeURIComponent(v as string)) - ).join(separatorArrayNoExplode(style)); - switch (style) { - case 'label': - return `.${joinedValues}`; - case 'matrix': - return `;${name}=${joinedValues}`; - case 'simple': - return joinedValues; - default: - return `${name}=${joinedValues}`; - } - } - - const separator = separatorArrayExplode(style); - const joinedValues = value - .map((v) => { - if (style === 'label' || style === 'simple') { - return allowReserved ? v : encodeURIComponent(v as string); - } - - return serializePrimitiveParam({ - allowReserved, - name, - value: v as string, - }); - }) - .join(separator); - return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues; -}; - -export const serializePrimitiveParam = ({ - allowReserved, - name, - value, -}: SerializePrimitiveParam) => { - if (value === undefined || value === null) { - return ''; - } - - if (typeof value === 'object') { - throw new Error( - 'Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.', - ); - } - - return `${name}=${allowReserved ? value : encodeURIComponent(value)}`; -}; - -export const serializeObjectParam = ({ - allowReserved, - explode, - name, - style, - value, - valueOnly, -}: SerializeOptions & { - value: Record | Date; - valueOnly?: boolean; -}) => { - if (value instanceof Date) { - return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`; - } - - if (style !== 'deepObject' && !explode) { - let values: string[] = []; - Object.entries(value).forEach(([key, v]) => { - values = [...values, key, allowReserved ? (v as string) : encodeURIComponent(v as string)]; - }); - const joinedValues = values.join(','); - switch (style) { - case 'form': - return `${name}=${joinedValues}`; - case 'label': - return `.${joinedValues}`; - case 'matrix': - return `;${name}=${joinedValues}`; - default: - return joinedValues; - } - } - - const separator = separatorObjectExplode(style); - const joinedValues = Object.entries(value) - .map(([key, v]) => - serializePrimitiveParam({ - allowReserved, - name: style === 'deepObject' ? `${name}[${key}]` : key, - value: v as string, - }), - ) - .join(separator); - return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues; -}; diff --git a/integrations/grafana/src/gen/grafana-k8s-client/core/queryKeySerializer.gen.ts b/integrations/grafana/src/gen/grafana-k8s-client/core/queryKeySerializer.gen.ts deleted file mode 100644 index 5000df606f3..00000000000 --- a/integrations/grafana/src/gen/grafana-k8s-client/core/queryKeySerializer.gen.ts +++ /dev/null @@ -1,117 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -/** - * JSON-friendly union that mirrors what Pinia Colada can hash. - */ -export type JsonValue = - | null - | string - | number - | boolean - | JsonValue[] - | { [key: string]: JsonValue }; - -/** - * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes. - */ -export const queryKeyJsonReplacer = (_key: string, value: unknown) => { - if (value === undefined || typeof value === 'function' || typeof value === 'symbol') { - return undefined; - } - if (typeof value === 'bigint') { - return value.toString(); - } - if (value instanceof Date) { - return value.toISOString(); - } - return value; -}; - -/** - * Safely stringifies a value and parses it back into a JsonValue. - */ -export const stringifyToJsonValue = (input: unknown): JsonValue | undefined => { - try { - const json = JSON.stringify(input, queryKeyJsonReplacer); - if (json === undefined) { - return undefined; - } - return JSON.parse(json) as JsonValue; - } catch { - return undefined; - } -}; - -/** - * Detects plain objects (including objects with a null prototype). - */ -const isPlainObject = (value: unknown): value is Record => { - if (value === null || typeof value !== 'object') { - return false; - } - const prototype = Object.getPrototypeOf(value as object); - return prototype === Object.prototype || prototype === null; -}; - -/** - * Turns URLSearchParams into a sorted JSON object for deterministic keys. - */ -const serializeSearchParams = (params: URLSearchParams): JsonValue => { - const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b)); - const result: Record = {}; - - for (const [key, value] of entries) { - const existing = result[key]; - if (existing === undefined) { - result[key] = value; - continue; - } - - if (Array.isArray(existing)) { - (existing as string[]).push(value); - } else { - result[key] = [existing, value]; - } - } - - return result; -}; - -/** - * Normalizes any accepted value into a JSON-friendly shape for query keys. - */ -export const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => { - if (value === null) { - return null; - } - - if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') { - return value; - } - - if (value === undefined || typeof value === 'function' || typeof value === 'symbol') { - return undefined; - } - - if (typeof value === 'bigint') { - return value.toString(); - } - - if (value instanceof Date) { - return value.toISOString(); - } - - if (Array.isArray(value)) { - return stringifyToJsonValue(value); - } - - if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) { - return serializeSearchParams(value); - } - - if (isPlainObject(value)) { - return stringifyToJsonValue(value); - } - - return undefined; -}; diff --git a/integrations/grafana/src/gen/grafana-k8s-client/core/serverSentEvents.gen.ts b/integrations/grafana/src/gen/grafana-k8s-client/core/serverSentEvents.gen.ts deleted file mode 100644 index ddf3c4d13a4..00000000000 --- a/integrations/grafana/src/gen/grafana-k8s-client/core/serverSentEvents.gen.ts +++ /dev/null @@ -1,242 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import type { Config } from './types.gen'; - -export type ServerSentEventsOptions = Omit & - Pick & { - /** - * Fetch API implementation. You can use this option to provide a custom - * fetch instance. - * - * @default globalThis.fetch - */ - fetch?: typeof fetch; - /** - * Implementing clients can call request interceptors inside this hook. - */ - onRequest?: (url: string, init: RequestInit) => Promise; - /** - * Callback invoked when a network or parsing error occurs during streaming. - * - * This option applies only if the endpoint returns a stream of events. - * - * @param error The error that occurred. - */ - onSseError?: (error: unknown) => void; - /** - * Callback invoked when an event is streamed from the server. - * - * This option applies only if the endpoint returns a stream of events. - * - * @param event Event streamed from the server. - * @returns Nothing (void). - */ - onSseEvent?: (event: StreamEvent) => void; - serializedBody?: RequestInit['body']; - /** - * Default retry delay in milliseconds. - * - * This option applies only if the endpoint returns a stream of events. - * - * @default 3000 - */ - sseDefaultRetryDelay?: number; - /** - * Maximum number of retry attempts before giving up. - */ - sseMaxRetryAttempts?: number; - /** - * Maximum retry delay in milliseconds. - * - * Applies only when exponential backoff is used. - * - * This option applies only if the endpoint returns a stream of events. - * - * @default 30000 - */ - sseMaxRetryDelay?: number; - /** - * Optional sleep function for retry backoff. - * - * Defaults to using `setTimeout`. - */ - sseSleepFn?: (ms: number) => Promise; - url: string; - }; - -export interface StreamEvent { - data: TData; - event?: string; - id?: string; - retry?: number; -} - -export type ServerSentEventsResult = { - stream: AsyncGenerator< - TData extends Record ? TData[keyof TData] : TData, - TReturn, - TNext - >; -}; - -export function createSseClient({ - onRequest, - onSseError, - onSseEvent, - responseTransformer, - responseValidator, - sseDefaultRetryDelay, - sseMaxRetryAttempts, - sseMaxRetryDelay, - sseSleepFn, - url, - ...options -}: ServerSentEventsOptions): ServerSentEventsResult { - let lastEventId: string | undefined; - - const sleep = sseSleepFn ?? ((ms: number) => new Promise((resolve) => setTimeout(resolve, ms))); - - const createStream = async function* () { - let retryDelay: number = sseDefaultRetryDelay ?? 3000; - let attempt = 0; - const signal = options.signal ?? new AbortController().signal; - - while (true) { - if (signal.aborted) break; - - attempt++; - - const headers = - options.headers instanceof Headers - ? options.headers - : new Headers(options.headers as Record | undefined); - - if (lastEventId !== undefined) { - headers.set('Last-Event-ID', lastEventId); - } - - try { - const requestInit: RequestInit = { - redirect: 'follow', - ...options, - body: options.serializedBody, - headers, - signal, - }; - let request = new Request(url, requestInit); - if (onRequest) { - request = await onRequest(url, requestInit); - } - // fetch must be assigned here, otherwise it would throw the error: - // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation - const _fetch = options.fetch ?? globalThis.fetch; - const response = await _fetch(request); - - if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`); - - if (!response.body) throw new Error('No body in SSE response'); - - const reader = response.body.pipeThrough(new TextDecoderStream()).getReader(); - - let buffer = ''; - - const abortHandler = () => { - try { - reader.cancel(); - } catch { - // noop - } - }; - - signal.addEventListener('abort', abortHandler); - - try { - while (true) { - const { done, value } = await reader.read(); - if (done) break; - buffer += value; - buffer = buffer.replace(/\r\n?/g, '\n'); // normalize line endings - - const chunks = buffer.split('\n\n'); - buffer = chunks.pop() ?? ''; - - for (const chunk of chunks) { - const lines = chunk.split('\n'); - const dataLines: Array = []; - let eventName: string | undefined; - - for (const line of lines) { - if (line.startsWith('data:')) { - dataLines.push(line.replace(/^data:\s*/, '')); - } else if (line.startsWith('event:')) { - eventName = line.replace(/^event:\s*/, ''); - } else if (line.startsWith('id:')) { - lastEventId = line.replace(/^id:\s*/, ''); - } else if (line.startsWith('retry:')) { - const parsed = Number.parseInt(line.replace(/^retry:\s*/, ''), 10); - if (!Number.isNaN(parsed)) { - retryDelay = parsed; - } - } - } - - let data: unknown; - let parsedJson = false; - - if (dataLines.length) { - const rawData = dataLines.join('\n'); - try { - data = JSON.parse(rawData); - parsedJson = true; - } catch { - data = rawData; - } - } - - if (parsedJson) { - if (responseValidator) { - await responseValidator(data); - } - - if (responseTransformer) { - data = await responseTransformer(data); - } - } - - onSseEvent?.({ - data, - event: eventName, - id: lastEventId, - retry: retryDelay, - }); - - if (dataLines.length) { - yield data as any; - } - } - } - } finally { - signal.removeEventListener('abort', abortHandler); - reader.releaseLock(); - } - - break; // exit loop on normal completion - } catch (error) { - // connection failed or aborted; retry after delay - onSseError?.(error); - - if (sseMaxRetryAttempts !== undefined && attempt >= sseMaxRetryAttempts) { - break; // stop after firing error - } - - // exponential backoff: double retry each attempt, cap at 30s - const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 30000); - await sleep(backoff); - } - } - }; - - const stream = createStream(); - - return { stream }; -} diff --git a/integrations/grafana/src/gen/grafana-k8s-client/core/types.gen.ts b/integrations/grafana/src/gen/grafana-k8s-client/core/types.gen.ts deleted file mode 100644 index 9efe71d4c16..00000000000 --- a/integrations/grafana/src/gen/grafana-k8s-client/core/types.gen.ts +++ /dev/null @@ -1,104 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import type { Auth, AuthToken } from './auth.gen'; -import type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen'; - -export type HttpMethod = - | 'connect' - | 'delete' - | 'get' - | 'head' - | 'options' - | 'patch' - | 'post' - | 'put' - | 'trace'; - -export type Client< - RequestFn = never, - Config = unknown, - MethodFn = never, - BuildUrlFn = never, - SseFn = never, -> = { - /** - * Returns the final request URL. - */ - buildUrl: BuildUrlFn; - getConfig: () => Config; - request: RequestFn; - setConfig: (config: Config) => Config; -} & { - [K in HttpMethod]: MethodFn; -} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } }); - -export interface Config { - /** - * Auth token or a function returning auth token. The resolved value will be - * added to the request payload as defined by its `security` array. - */ - auth?: ((auth: Auth) => Promise | AuthToken) | AuthToken; - /** - * A function for serializing request body parameter. By default, - * {@link JSON.stringify()} will be used. - */ - bodySerializer?: BodySerializer | null; - /** - * An object containing any HTTP headers that you want to pre-populate your - * `Headers` object with. - * - * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more} - */ - headers?: - | RequestInit['headers'] - | Record< - string, - string | number | boolean | (string | number | boolean)[] | null | undefined | unknown - >; - /** - * The request method. - * - * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more} - */ - method?: Uppercase; - /** - * A function for serializing request query parameters. By default, arrays - * will be exploded in form style, objects will be exploded in deepObject - * style, and reserved characters are percent-encoded. - * - * This method will have no effect if the native `paramsSerializer()` Axios - * API function is used. - * - * {@link https://swagger.io/docs/specification/serialization/#query View examples} - */ - querySerializer?: QuerySerializer | QuerySerializerOptions; - /** - * A function validating request data. This is useful if you want to ensure - * the request conforms to the desired shape, so it can be safely sent to - * the server. - */ - requestValidator?: (data: unknown) => Promise; - /** - * A function transforming response data before it's returned. This is useful - * for post-processing data, e.g., converting ISO strings into Date objects. - */ - responseTransformer?: (data: unknown) => Promise; - /** - * A function validating response data. This is useful if you want to ensure - * the response conforms to the desired shape, so it can be safely passed to - * the transformers and returned to the user. - */ - responseValidator?: (data: unknown) => Promise; -} - -type IsExactlyNeverOrNeverUndefined = [T] extends [never] - ? true - : [T] extends [never | undefined] - ? [undefined] extends [T] - ? false - : true - : false; - -export type OmitNever> = { - [K in keyof T as IsExactlyNeverOrNeverUndefined extends true ? never : K]: T[K]; -}; diff --git a/integrations/grafana/src/gen/grafana-k8s-client/core/utils.gen.ts b/integrations/grafana/src/gen/grafana-k8s-client/core/utils.gen.ts deleted file mode 100644 index 9a4fec7830f..00000000000 --- a/integrations/grafana/src/gen/grafana-k8s-client/core/utils.gen.ts +++ /dev/null @@ -1,140 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import type { BodySerializer, QuerySerializer } from './bodySerializer.gen'; -import { - type ArraySeparatorStyle, - serializeArrayParam, - serializeObjectParam, - serializePrimitiveParam, -} from './pathSerializer.gen'; - -export interface PathSerializer { - path: Record; - url: string; -} - -export const PATH_PARAM_RE = /\{[^{}]+\}/g; - -export const defaultPathSerializer = ({ path, url: _url }: PathSerializer) => { - let url = _url; - const matches = _url.match(PATH_PARAM_RE); - if (matches) { - for (const match of matches) { - let explode = false; - let name = match.substring(1, match.length - 1); - let style: ArraySeparatorStyle = 'simple'; - - if (name.endsWith('*')) { - explode = true; - name = name.substring(0, name.length - 1); - } - - if (name.startsWith('.')) { - name = name.substring(1); - style = 'label'; - } else if (name.startsWith(';')) { - name = name.substring(1); - style = 'matrix'; - } - - const value = path[name]; - - if (value === undefined || value === null) { - continue; - } - - if (Array.isArray(value)) { - url = url.replace(match, serializeArrayParam({ explode, name, style, value })); - continue; - } - - if (typeof value === 'object') { - url = url.replace( - match, - serializeObjectParam({ - explode, - name, - style, - value: value as Record, - valueOnly: true, - }), - ); - continue; - } - - if (style === 'matrix') { - url = url.replace( - match, - `;${serializePrimitiveParam({ - name, - value: value as string, - })}`, - ); - continue; - } - - const replaceValue = encodeURIComponent( - style === 'label' ? `.${value as string}` : (value as string), - ); - url = url.replace(match, replaceValue); - } - } - return url; -}; - -export const getUrl = ({ - baseUrl, - path, - query, - querySerializer, - url: _url, -}: { - baseUrl?: string; - path?: Record; - query?: Record; - querySerializer: QuerySerializer; - url: string; -}) => { - const pathUrl = _url.startsWith('/') ? _url : `/${_url}`; - let url = (baseUrl ?? '') + pathUrl; - if (path) { - url = defaultPathSerializer({ path, url }); - } - let search = query ? querySerializer(query) : ''; - if (search.startsWith('?')) { - search = search.substring(1); - } - if (search) { - url += `?${search}`; - } - return url; -}; - -export function getValidRequestBody(options: { - body?: unknown; - bodySerializer?: BodySerializer | null; - serializedBody?: unknown; -}) { - const hasBody = options.body !== undefined; - const isSerializedBody = hasBody && options.bodySerializer; - - if (isSerializedBody) { - if ('serializedBody' in options) { - const hasSerializedBody = - options.serializedBody !== undefined && options.serializedBody !== ''; - - return hasSerializedBody ? options.serializedBody : null; - } - - // not all clients implement a serializedBody property (i.e., client-axios) - return options.body !== '' ? options.body : null; - } - - // plain/text body - if (hasBody) { - return options.body; - } - - // no body was provided - return undefined; -} diff --git a/integrations/grafana/src/gen/grafana-k8s-client/index.ts b/integrations/grafana/src/gen/grafana-k8s-client/index.ts deleted file mode 100644 index 143ad86669b..00000000000 --- a/integrations/grafana/src/gen/grafana-k8s-client/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export { grafanaDashboardK8sCreateDashboard, grafanaDashboardK8sDeleteDashboard, grafanaDashboardK8sGetApiResources, grafanaDashboardK8sGetDashboard, grafanaDashboardK8sGetDashboardDto, grafanaDashboardK8sListDashboard, grafanaDashboardK8sReplaceDashboard, grafanaDashboardK8sUpdateDashboard, grafanaFolderK8sCreateFolder, grafanaFolderK8sDeleteFolder, grafanaFolderK8sGetApiResources, grafanaFolderK8sGetFolder, grafanaFolderK8sGetFolderAccess, grafanaFolderK8sGetFolderChildren, grafanaFolderK8sGetFolderCounts, grafanaFolderK8sGetFolderParents, grafanaFolderK8sListFolder, grafanaFolderK8sReplaceFolder, grafanaFolderK8sUpdateFolder, type Options } from './sdk.gen'; -export type { ClientOptions, GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1AnnotationActions, GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1AnnotationPermission, GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1Dashboard, GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1DashboardAccess, GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1DashboardConversionStatus, GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1DashboardList, GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1DashboardStatus, GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1DashboardWithAccessInfo, GrafanaDashboardK8sComGithubGrafanaGrafanaPkgApimachineryApisCommonV0Alpha1Unstructured, GrafanaDashboardK8sCreateDashboardData, GrafanaDashboardK8sCreateDashboardResponse, GrafanaDashboardK8sCreateDashboardResponses, GrafanaDashboardK8sDeleteDashboardData, GrafanaDashboardK8sDeleteDashboardResponse, GrafanaDashboardK8sDeleteDashboardResponses, GrafanaDashboardK8sGetApiResourcesData, GrafanaDashboardK8sGetApiResourcesResponse, GrafanaDashboardK8sGetApiResourcesResponses, GrafanaDashboardK8sGetDashboardData, GrafanaDashboardK8sGetDashboardDtoData, GrafanaDashboardK8sGetDashboardDtoResponse, GrafanaDashboardK8sGetDashboardDtoResponses, GrafanaDashboardK8sGetDashboardResponse, GrafanaDashboardK8sGetDashboardResponses, GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1ApiResource, GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1ApiResourceList, GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1DeleteOptions, GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1FieldsV1, GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1ListMeta, GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1ManagedFieldsEntry, GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1ObjectMeta, GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1OwnerReference, GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1Patch, GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1Preconditions, GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1Status, GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1StatusCause, GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1StatusDetails, GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1Time, GrafanaDashboardK8sListDashboardData, GrafanaDashboardK8sListDashboardResponse, GrafanaDashboardK8sListDashboardResponses, GrafanaDashboardK8sReplaceDashboardData, GrafanaDashboardK8sReplaceDashboardResponse, GrafanaDashboardK8sReplaceDashboardResponses, GrafanaDashboardK8sUpdateDashboardData, GrafanaDashboardK8sUpdateDashboardResponse, GrafanaDashboardK8sUpdateDashboardResponses, GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1DescendantCounts, GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1Folder, GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1FolderAccessInfo, GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1FolderInfo, GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1FolderInfoList, GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1FolderList, GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1FolderSpec, GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1ResourceStats, GrafanaFolderK8sCreateFolderData, GrafanaFolderK8sCreateFolderResponse, GrafanaFolderK8sCreateFolderResponses, GrafanaFolderK8sDeleteFolderData, GrafanaFolderK8sDeleteFolderResponse, GrafanaFolderK8sDeleteFolderResponses, GrafanaFolderK8sGetApiResourcesData, GrafanaFolderK8sGetApiResourcesResponse, GrafanaFolderK8sGetApiResourcesResponses, GrafanaFolderK8sGetFolderAccessData, GrafanaFolderK8sGetFolderAccessResponse, GrafanaFolderK8sGetFolderAccessResponses, GrafanaFolderK8sGetFolderChildrenData, GrafanaFolderK8sGetFolderChildrenResponse, GrafanaFolderK8sGetFolderChildrenResponses, GrafanaFolderK8sGetFolderCountsData, GrafanaFolderK8sGetFolderCountsResponse, GrafanaFolderK8sGetFolderCountsResponses, GrafanaFolderK8sGetFolderData, GrafanaFolderK8sGetFolderParentsData, GrafanaFolderK8sGetFolderParentsResponse, GrafanaFolderK8sGetFolderParentsResponses, GrafanaFolderK8sGetFolderResponse, GrafanaFolderK8sGetFolderResponses, GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1ApiResource, GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1ApiResourceList, GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1DeleteOptions, GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1FieldsV1, GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1ListMeta, GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1ManagedFieldsEntry, GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1ObjectMeta, GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1OwnerReference, GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1Patch, GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1Preconditions, GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1Status, GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1StatusCause, GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1StatusDetails, GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1Time, GrafanaFolderK8sListFolderData, GrafanaFolderK8sListFolderResponse, GrafanaFolderK8sListFolderResponses, GrafanaFolderK8sReplaceFolderData, GrafanaFolderK8sReplaceFolderResponse, GrafanaFolderK8sReplaceFolderResponses, GrafanaFolderK8sUpdateFolderData, GrafanaFolderK8sUpdateFolderResponse, GrafanaFolderK8sUpdateFolderResponses } from './types.gen'; diff --git a/integrations/grafana/src/gen/grafana-k8s-client/sdk.gen.ts b/integrations/grafana/src/gen/grafana-k8s-client/sdk.gen.ts deleted file mode 100644 index dd719abf3d1..00000000000 --- a/integrations/grafana/src/gen/grafana-k8s-client/sdk.gen.ts +++ /dev/null @@ -1,156 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import type { Client, Options as Options2, TDataShape } from './client'; -import { client } from './client.gen'; -import type { GrafanaDashboardK8sCreateDashboardData, GrafanaDashboardK8sCreateDashboardResponses, GrafanaDashboardK8sDeleteDashboardData, GrafanaDashboardK8sDeleteDashboardResponses, GrafanaDashboardK8sGetApiResourcesData, GrafanaDashboardK8sGetApiResourcesResponses, GrafanaDashboardK8sGetDashboardData, GrafanaDashboardK8sGetDashboardDtoData, GrafanaDashboardK8sGetDashboardDtoResponses, GrafanaDashboardK8sGetDashboardResponses, GrafanaDashboardK8sListDashboardData, GrafanaDashboardK8sListDashboardResponses, GrafanaDashboardK8sReplaceDashboardData, GrafanaDashboardK8sReplaceDashboardResponses, GrafanaDashboardK8sUpdateDashboardData, GrafanaDashboardK8sUpdateDashboardResponses, GrafanaFolderK8sCreateFolderData, GrafanaFolderK8sCreateFolderResponses, GrafanaFolderK8sDeleteFolderData, GrafanaFolderK8sDeleteFolderResponses, GrafanaFolderK8sGetApiResourcesData, GrafanaFolderK8sGetApiResourcesResponses, GrafanaFolderK8sGetFolderAccessData, GrafanaFolderK8sGetFolderAccessResponses, GrafanaFolderK8sGetFolderChildrenData, GrafanaFolderK8sGetFolderChildrenResponses, GrafanaFolderK8sGetFolderCountsData, GrafanaFolderK8sGetFolderCountsResponses, GrafanaFolderK8sGetFolderData, GrafanaFolderK8sGetFolderParentsData, GrafanaFolderK8sGetFolderParentsResponses, GrafanaFolderK8sGetFolderResponses, GrafanaFolderK8sListFolderData, GrafanaFolderK8sListFolderResponses, GrafanaFolderK8sReplaceFolderData, GrafanaFolderK8sReplaceFolderResponses, GrafanaFolderK8sUpdateFolderData, GrafanaFolderK8sUpdateFolderResponses } from './types.gen'; - -export type Options = Options2 & { - /** - * You can provide a client instance returned by `createClient()` instead of - * individual options. This might be also useful if you want to implement a - * custom client. - */ - client?: Client; - /** - * You can pass arbitrary values through the `meta` object. This can be - * used to access values that aren't defined as part of the SDK function. - */ - meta?: Record; -}; - -/** - * Describe the available kubernetes resources - */ -export const grafanaDashboardK8sGetApiResources = (options?: Options) => (options?.client ?? client).get({ url: '/apis/dashboard.grafana.app/v1/', ...options }); - -/** - * list objects of kind Dashboard - */ -export const grafanaDashboardK8sListDashboard = (options: Options) => (options.client ?? client).get({ url: '/apis/dashboard.grafana.app/v1/namespaces/{namespace}/dashboards', ...options }); - -/** - * create a Dashboard - */ -export const grafanaDashboardK8sCreateDashboard = (options: Options) => (options.client ?? client).post({ - url: '/apis/dashboard.grafana.app/v1/namespaces/{namespace}/dashboards', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * delete a Dashboard - */ -export const grafanaDashboardK8sDeleteDashboard = (options: Options) => (options.client ?? client).delete({ url: '/apis/dashboard.grafana.app/v1/namespaces/{namespace}/dashboards/{name}', ...options }); - -/** - * read the specified Dashboard - */ -export const grafanaDashboardK8sGetDashboard = (options: Options) => (options.client ?? client).get({ url: '/apis/dashboard.grafana.app/v1/namespaces/{namespace}/dashboards/{name}', ...options }); - -/** - * partially update the specified Dashboard - */ -export const grafanaDashboardK8sUpdateDashboard = (options: Options) => (options.client ?? client).patch({ - url: '/apis/dashboard.grafana.app/v1/namespaces/{namespace}/dashboards/{name}', - ...options, - headers: { - 'Content-Type': 'application/json-patch+json', - ...options.headers - } -}); - -/** - * replace the specified Dashboard - */ -export const grafanaDashboardK8sReplaceDashboard = (options: Options) => (options.client ?? client).put({ - url: '/apis/dashboard.grafana.app/v1/namespaces/{namespace}/dashboards/{name}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * connect GET requests to dto of Dashboard - */ -export const grafanaDashboardK8sGetDashboardDto = (options: Options) => (options.client ?? client).get({ url: '/apis/dashboard.grafana.app/v1/namespaces/{namespace}/dashboards/{name}/dto', ...options }); - -/** - * Describe the available kubernetes resources - */ -export const grafanaFolderK8sGetApiResources = (options?: Options) => (options?.client ?? client).get({ url: '/apis/folder.grafana.app/v1/', ...options }); - -/** - * list objects of kind Folder - */ -export const grafanaFolderK8sListFolder = (options: Options) => (options.client ?? client).get({ url: '/apis/folder.grafana.app/v1/namespaces/{namespace}/folders', ...options }); - -/** - * create a Folder - */ -export const grafanaFolderK8sCreateFolder = (options: Options) => (options.client ?? client).post({ - url: '/apis/folder.grafana.app/v1/namespaces/{namespace}/folders', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * delete a Folder - */ -export const grafanaFolderK8sDeleteFolder = (options: Options) => (options.client ?? client).delete({ url: '/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}', ...options }); - -/** - * read the specified Folder - */ -export const grafanaFolderK8sGetFolder = (options: Options) => (options.client ?? client).get({ url: '/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}', ...options }); - -/** - * partially update the specified Folder - */ -export const grafanaFolderK8sUpdateFolder = (options: Options) => (options.client ?? client).patch({ - url: '/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}', - ...options, - headers: { - 'Content-Type': 'application/json-patch+json', - ...options.headers - } -}); - -/** - * replace the specified Folder - */ -export const grafanaFolderK8sReplaceFolder = (options: Options) => (options.client ?? client).put({ - url: '/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * connect GET requests to access of Folder - */ -export const grafanaFolderK8sGetFolderAccess = (options: Options) => (options.client ?? client).get({ url: '/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}/access', ...options }); - -/** - * connect GET requests to children of Folder - */ -export const grafanaFolderK8sGetFolderChildren = (options: Options) => (options.client ?? client).get({ url: '/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}/children', ...options }); - -/** - * connect GET requests to counts of Folder - */ -export const grafanaFolderK8sGetFolderCounts = (options: Options) => (options.client ?? client).get({ url: '/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}/counts', ...options }); - -/** - * connect GET requests to parents of Folder - */ -export const grafanaFolderK8sGetFolderParents = (options: Options) => (options.client ?? client).get({ url: '/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}/parents', ...options }); diff --git a/integrations/grafana/src/gen/grafana-k8s-client/types.gen.ts b/integrations/grafana/src/gen/grafana-k8s-client/types.gen.ts deleted file mode 100644 index b761a097ffa..00000000000 --- a/integrations/grafana/src/gen/grafana-k8s-client/types.gen.ts +++ /dev/null @@ -1,1868 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export type ClientOptions = { - baseUrl: `${string}://${string}` | (string & {}); -}; - -export type GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1AnnotationActions = { - canAdd: boolean; - canDelete: boolean; - canEdit: boolean; -}; - -export type GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1AnnotationPermission = { - dashboard: GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1AnnotationActions; -}; - -export type GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1Dashboard = { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - apiVersion?: string; - /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - kind?: string; - metadata: GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1ObjectMeta; - /** - * Spec is the spec of the Dashboard - */ - spec: GrafanaDashboardK8sComGithubGrafanaGrafanaPkgApimachineryApisCommonV0Alpha1Unstructured; - status: GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1DashboardStatus; -}; - -export type GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1DashboardAccess = { - annotationsPermissions: GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1AnnotationPermission; - canAdmin: boolean; - canDelete: boolean; - canEdit: boolean; - /** - * The permissions part - */ - canSave: boolean; - canStar: boolean; - isPublic: boolean; - /** - * Metadata fields - */ - slug?: string; - url?: string; -}; - -/** - * ConversionStatus is the status of the conversion of the dashboard. - */ -export type GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1DashboardConversionStatus = { - /** - * The error message from the conversion. Empty if the conversion has not failed. - */ - error?: string; - /** - * Whether from another version has failed. If true, means that the dashboard is not valid, and the caller should instead fetch the stored version. - */ - failed: boolean; - /** - * The original value map[string]any - */ - source?: { - [key: string]: unknown; - }; - /** - * The version which was stored when the dashboard was created / updated. Fetching this version should always succeed. - */ - storedVersion?: string; -}; - -export type GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1DashboardList = { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - apiVersion?: string; - items: Array; - /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - kind?: string; - metadata: GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1ListMeta; -}; - -export type GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1DashboardStatus = { - /** - * Optional conversion status. - */ - conversion?: GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1DashboardConversionStatus; -}; - -/** - * This is like the legacy DTO where access and metadata are all returned in a single call - */ -export type GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1DashboardWithAccessInfo = { - access: GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1DashboardAccess; - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - apiVersion?: string; - /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - kind?: string; - metadata: GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1ObjectMeta; - /** - * Spec is the spec of the Dashboard - */ - spec: GrafanaDashboardK8sComGithubGrafanaGrafanaPkgApimachineryApisCommonV0Alpha1Unstructured; - status: GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1DashboardStatus; -}; - -export type GrafanaDashboardK8sComGithubGrafanaGrafanaPkgApimachineryApisCommonV0Alpha1Unstructured = { - [key: string]: unknown; -}; - -/** - * APIResource specifies the name of a resource and whether it is namespaced. - */ -export type GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1ApiResource = { - /** - * categories is a list of the grouped resources this resource belongs to (e.g. 'all') - */ - categories?: Array; - /** - * group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale". - */ - group?: string; - /** - * kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo') - */ - kind: string; - /** - * name is the plural name of the resource. - */ - name: string; - /** - * namespaced indicates if a resource is namespaced or not. - */ - namespaced: boolean; - /** - * shortNames is a list of suggested short names of the resource. - */ - shortNames?: Array; - /** - * singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface. - */ - singularName: string; - /** - * The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates. - */ - storageVersionHash?: string; - /** - * verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy) - */ - verbs: Array; - /** - * version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)". - */ - version?: string; -}; - -/** - * APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced. - */ -export type GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1ApiResourceList = { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - apiVersion?: string; - /** - * groupVersion is the group and version this APIResourceList is for. - */ - groupVersion: string; - /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - kind?: string; - /** - * resources contains the name of the resources and if they are namespaced. - */ - resources: Array; -}; - -/** - * DeleteOptions may be provided when deleting an API object. - */ -export type GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1DeleteOptions = { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - apiVersion?: string; - /** - * When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - */ - dryRun?: Array; - /** - * The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - */ - gracePeriodSeconds?: number; - /** - * if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - */ - ignoreStoreReadErrorWithClusterBreakingPotential?: boolean; - /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - kind?: string; - /** - * Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - */ - orphanDependents?: boolean; - /** - * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned. - */ - preconditions?: GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1Preconditions; - /** - * Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - */ - propagationPolicy?: string; -}; - -/** - * FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format. - * - * Each key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:', where is the name of a field in a struct, or key in a map 'v:', where is the exact json formatted value of a list item 'i:', where is position of a item in a list 'k:', where is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set. - * - * The exact format is defined in sigs.k8s.io/structured-merge-diff - */ -export type GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1FieldsV1 = { - [key: string]: unknown; -}; - -/** - * ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}. - */ -export type GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1ListMeta = { - /** - * continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message. - */ - continue?: string; - /** - * remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact. - */ - remainingItemCount?: number; - /** - * String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - */ - resourceVersion?: string; - /** - * Deprecated: selfLink is a legacy read-only field that is no longer populated by the system. - */ - selfLink?: string; -}; - -/** - * ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to. - */ -export type GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1ManagedFieldsEntry = { - /** - * APIVersion defines the version of this resource that this field set applies to. The format is "group/version" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted. - */ - apiVersion?: string; - /** - * FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: "FieldsV1" - */ - fieldsType?: string; - /** - * FieldsV1 holds the first JSON version format as described in the "FieldsV1" type. - */ - fieldsV1?: GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1FieldsV1; - /** - * Manager is an identifier of the workflow managing these fields. - */ - manager?: string; - /** - * Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'. - */ - operation?: string; - /** - * Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource. - */ - subresource?: string; - /** - * Time is the timestamp of when the ManagedFields entry was added. The timestamp will also be updated if a field is added, the manager changes any of the owned fields value or removes a field. The timestamp does not update when a field is removed from the entry because another manager took it over. - */ - time?: GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1Time; -}; - -/** - * ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. - */ -export type GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1ObjectMeta = { - /** - * Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - */ - annotations?: { - [key: string]: string; - }; - /** - * CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - * - * Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - */ - creationTimestamp?: GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1Time; - /** - * Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only. - */ - deletionGracePeriodSeconds?: number; - /** - * DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested. - * - * Populated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - */ - deletionTimestamp?: GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1Time; - /** - * Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list. - */ - finalizers?: Array; - /** - * GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server. - * - * If this field is specified and the generated name exists, the server will return a 409. - * - * Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency - */ - generateName?: string; - /** - * A sequence number representing a specific generation of the desired state. Populated by the system. Read-only. - */ - generation?: number; - /** - * Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - */ - labels?: { - [key: string]: string; - }; - /** - * ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like "ci-cd". The set of fields is always in the version that the workflow used when modifying the object. - */ - managedFields?: Array; - /** - * Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - */ - name?: string; - /** - * Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. - * - * Must be a DNS_LABEL. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces - */ - namespace?: string; - /** - * List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller. - */ - ownerReferences?: Array; - /** - * An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources. - * - * Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - */ - resourceVersion?: string; - /** - * Deprecated: selfLink is a legacy read-only field that is no longer populated by the system. - */ - selfLink?: string; - /** - * UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. - * - * Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids - */ - uid?: string; -}; - -/** - * OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field. - */ -export type GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1OwnerReference = { - /** - * API version of the referent. - */ - apiVersion: string; - /** - * If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned. - */ - blockOwnerDeletion?: boolean; - /** - * If true, this reference points to the managing controller. - */ - controller?: boolean; - /** - * Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - kind: string; - /** - * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - */ - name: string; - /** - * UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids - */ - uid: string; -}; - -/** - * Patch is provided to give a concrete name and type to the Kubernetes PATCH request body. - */ -export type GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1Patch = { - [key: string]: unknown; -}; - -/** - * Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. - */ -export type GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1Preconditions = { - /** - * Specifies the target ResourceVersion - */ - resourceVersion?: string; - /** - * Specifies the target UID. - */ - uid?: string; -}; - -/** - * Status is a return value for calls that don't return other objects. - */ -export type GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1Status = { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - apiVersion?: string; - /** - * Suggested HTTP return code for this status, 0 if not set. - */ - code?: number; - /** - * Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type. - */ - details?: GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1StatusDetails; - /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - kind?: string; - /** - * A human-readable description of the status of this operation. - */ - message?: string; - /** - * Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - metadata?: GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1ListMeta; - /** - * A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it. - */ - reason?: string; - /** - * Status of the operation. One of: "Success" or "Failure". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - */ - status?: string; -}; - -/** - * StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered. - */ -export type GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1StatusCause = { - /** - * The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional. - * - * Examples: - * "name" - the field "name" on the current resource - * "items[0].name" - the field "name" on the first array entry in "items" - */ - field?: string; - /** - * A human-readable description of the cause of the error. This field may be presented as-is to a reader. - */ - message?: string; - /** - * A machine-readable description of the cause of the error. If this value is empty there is no information available. - */ - reason?: string; -}; - -/** - * StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined. - */ -export type GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1StatusDetails = { - /** - * The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - */ - causes?: Array; - /** - * The group attribute of the resource associated with the status StatusReason. - */ - group?: string; - /** - * The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - kind?: string; - /** - * The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - */ - name?: string; - /** - * If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action. - */ - retryAfterSeconds?: number; - /** - * UID of the resource. (when there is a single resource which can be described). More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids - */ - uid?: string; -}; - -/** - * Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. - */ -export type GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1Time = string; - -export type GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1DescendantCounts = { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - apiVersion?: string; - counts: Array; - /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - kind?: string; -}; - -export type GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1Folder = { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - apiVersion?: string; - /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - kind?: string; - metadata: GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1ObjectMeta; - /** - * Spec is the spec of the Folder - */ - spec: GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1FolderSpec; -}; - -/** - * Access control information for the current user - */ -export type GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1FolderAccessInfo = { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - apiVersion?: string; - canAdmin: boolean; - canDelete: boolean; - canEdit: boolean; - canSave: boolean; - /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - kind?: string; -}; - -/** - * FolderInfo briefly describes a folder -- unlike a folder resource, this is a partial record of the folder metadata used for navigating parents and children - */ -export type GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1FolderInfo = { - /** - * The folder description - */ - description?: string; - /** - * This folder does not resolve - */ - detached?: boolean; - /** - * Name is the k8s name (eg, the unique identifier) for a folder - */ - name: string; - /** - * The parent folder UID - */ - parent?: string; - /** - * Title is the display value - */ - title: string; -}; - -/** - * FolderInfoList returns a list of folder references (parents or children) Unlike FolderList, each item is not a full k8s object - */ -export type GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1FolderInfoList = { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - apiVersion?: string; - items: Array; - /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - kind?: string; - metadata?: GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1ListMeta; -}; - -export type GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1FolderList = { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - apiVersion?: string; - items: Array; - /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - kind?: string; - metadata: GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1ListMeta; -}; - -export type GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1FolderSpec = { - description?: string; - title: string; -}; - -export type GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1ResourceStats = { - count: number; - group: string; - resource: string; -}; - -/** - * APIResource specifies the name of a resource and whether it is namespaced. - */ -export type GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1ApiResource = { - /** - * categories is a list of the grouped resources this resource belongs to (e.g. 'all') - */ - categories?: Array; - /** - * group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale". - */ - group?: string; - /** - * kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo') - */ - kind: string; - /** - * name is the plural name of the resource. - */ - name: string; - /** - * namespaced indicates if a resource is namespaced or not. - */ - namespaced: boolean; - /** - * shortNames is a list of suggested short names of the resource. - */ - shortNames?: Array; - /** - * singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface. - */ - singularName: string; - /** - * The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates. - */ - storageVersionHash?: string; - /** - * verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy) - */ - verbs: Array; - /** - * version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)". - */ - version?: string; -}; - -/** - * APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced. - */ -export type GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1ApiResourceList = { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - apiVersion?: string; - /** - * groupVersion is the group and version this APIResourceList is for. - */ - groupVersion: string; - /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - kind?: string; - /** - * resources contains the name of the resources and if they are namespaced. - */ - resources: Array; -}; - -/** - * DeleteOptions may be provided when deleting an API object. - */ -export type GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1DeleteOptions = { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - apiVersion?: string; - /** - * When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - */ - dryRun?: Array; - /** - * The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - */ - gracePeriodSeconds?: number; - /** - * if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - */ - ignoreStoreReadErrorWithClusterBreakingPotential?: boolean; - /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - kind?: string; - /** - * Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - */ - orphanDependents?: boolean; - /** - * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned. - */ - preconditions?: GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1Preconditions; - /** - * Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - */ - propagationPolicy?: string; -}; - -/** - * FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format. - * - * Each key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:', where is the name of a field in a struct, or key in a map 'v:', where is the exact json formatted value of a list item 'i:', where is position of a item in a list 'k:', where is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set. - * - * The exact format is defined in sigs.k8s.io/structured-merge-diff - */ -export type GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1FieldsV1 = { - [key: string]: unknown; -}; - -/** - * ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}. - */ -export type GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1ListMeta = { - /** - * continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message. - */ - continue?: string; - /** - * remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact. - */ - remainingItemCount?: number; - /** - * String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - */ - resourceVersion?: string; - /** - * Deprecated: selfLink is a legacy read-only field that is no longer populated by the system. - */ - selfLink?: string; -}; - -/** - * ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to. - */ -export type GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1ManagedFieldsEntry = { - /** - * APIVersion defines the version of this resource that this field set applies to. The format is "group/version" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted. - */ - apiVersion?: string; - /** - * FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: "FieldsV1" - */ - fieldsType?: string; - /** - * FieldsV1 holds the first JSON version format as described in the "FieldsV1" type. - */ - fieldsV1?: GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1FieldsV1; - /** - * Manager is an identifier of the workflow managing these fields. - */ - manager?: string; - /** - * Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'. - */ - operation?: string; - /** - * Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource. - */ - subresource?: string; - /** - * Time is the timestamp of when the ManagedFields entry was added. The timestamp will also be updated if a field is added, the manager changes any of the owned fields value or removes a field. The timestamp does not update when a field is removed from the entry because another manager took it over. - */ - time?: GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1Time; -}; - -/** - * ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. - */ -export type GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1ObjectMeta = { - /** - * Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - */ - annotations?: { - [key: string]: string; - }; - /** - * CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - * - * Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - */ - creationTimestamp?: GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1Time; - /** - * Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only. - */ - deletionGracePeriodSeconds?: number; - /** - * DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested. - * - * Populated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - */ - deletionTimestamp?: GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1Time; - /** - * Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list. - */ - finalizers?: Array; - /** - * GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server. - * - * If this field is specified and the generated name exists, the server will return a 409. - * - * Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency - */ - generateName?: string; - /** - * A sequence number representing a specific generation of the desired state. Populated by the system. Read-only. - */ - generation?: number; - /** - * Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - */ - labels?: { - [key: string]: string; - }; - /** - * ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like "ci-cd". The set of fields is always in the version that the workflow used when modifying the object. - */ - managedFields?: Array; - /** - * Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - */ - name?: string; - /** - * Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. - * - * Must be a DNS_LABEL. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces - */ - namespace?: string; - /** - * List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller. - */ - ownerReferences?: Array; - /** - * An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources. - * - * Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - */ - resourceVersion?: string; - /** - * Deprecated: selfLink is a legacy read-only field that is no longer populated by the system. - */ - selfLink?: string; - /** - * UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. - * - * Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids - */ - uid?: string; -}; - -/** - * OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field. - */ -export type GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1OwnerReference = { - /** - * API version of the referent. - */ - apiVersion: string; - /** - * If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned. - */ - blockOwnerDeletion?: boolean; - /** - * If true, this reference points to the managing controller. - */ - controller?: boolean; - /** - * Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - kind: string; - /** - * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - */ - name: string; - /** - * UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids - */ - uid: string; -}; - -/** - * Patch is provided to give a concrete name and type to the Kubernetes PATCH request body. - */ -export type GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1Patch = { - [key: string]: unknown; -}; - -/** - * Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. - */ -export type GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1Preconditions = { - /** - * Specifies the target ResourceVersion - */ - resourceVersion?: string; - /** - * Specifies the target UID. - */ - uid?: string; -}; - -/** - * Status is a return value for calls that don't return other objects. - */ -export type GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1Status = { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - apiVersion?: string; - /** - * Suggested HTTP return code for this status, 0 if not set. - */ - code?: number; - /** - * Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type. - */ - details?: GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1StatusDetails; - /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - kind?: string; - /** - * A human-readable description of the status of this operation. - */ - message?: string; - /** - * Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - metadata?: GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1ListMeta; - /** - * A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it. - */ - reason?: string; - /** - * Status of the operation. One of: "Success" or "Failure". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - */ - status?: string; -}; - -/** - * StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered. - */ -export type GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1StatusCause = { - /** - * The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional. - * - * Examples: - * "name" - the field "name" on the current resource - * "items[0].name" - the field "name" on the first array entry in "items" - */ - field?: string; - /** - * A human-readable description of the cause of the error. This field may be presented as-is to a reader. - */ - message?: string; - /** - * A machine-readable description of the cause of the error. If this value is empty there is no information available. - */ - reason?: string; -}; - -/** - * StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined. - */ -export type GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1StatusDetails = { - /** - * The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - */ - causes?: Array; - /** - * The group attribute of the resource associated with the status StatusReason. - */ - group?: string; - /** - * The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - kind?: string; - /** - * The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - */ - name?: string; - /** - * If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action. - */ - retryAfterSeconds?: number; - /** - * UID of the resource. (when there is a single resource which can be described). More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids - */ - uid?: string; -}; - -/** - * Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. - */ -export type GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1Time = string; - -export type GrafanaDashboardK8sGetApiResourcesData = { - body?: never; - path?: never; - query?: never; - url: '/apis/dashboard.grafana.app/v1/'; -}; - -export type GrafanaDashboardK8sGetApiResourcesResponses = { - /** - * OK - */ - 200: GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1ApiResourceList; -}; - -export type GrafanaDashboardK8sGetApiResourcesResponse = GrafanaDashboardK8sGetApiResourcesResponses[keyof GrafanaDashboardK8sGetApiResourcesResponses]; - -export type GrafanaDashboardK8sListDashboardData = { - body?: never; - path: { - /** - * object name and auth scope, such as for teams and projects - */ - namespace: string; - }; - query?: { - /** - * If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - pretty?: string; - /** - * allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - */ - allowWatchBookmarks?: boolean; - /** - * The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". - * - * This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - */ - continue?: string; - /** - * A selector to restrict the list of returned objects by their fields. Defaults to everything. - */ - fieldSelector?: string; - /** - * A selector to restrict the list of returned objects by their labels. Defaults to everything. - */ - labelSelector?: string; - /** - * limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. - * - * The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - */ - limit?: number; - /** - * resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. - * - * Defaults to unset - */ - resourceVersion?: string; - /** - * resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. - * - * Defaults to unset - */ - resourceVersionMatch?: string; - /** - * `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic "Bookmark" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. - * - * When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan - * is interpreted as "data at least as new as the provided `resourceVersion`" - * and the bookmark event is send when the state is synced - * to a `resourceVersion` at least as fresh as the one provided by the ListOptions. - * If `resourceVersion` is unset, this is interpreted as "consistent read" and the - * bookmark event is send when the state is synced at least to the moment - * when request started being processed. - * - `resourceVersionMatch` set to any other value or unset - * Invalid error is returned. - * - * Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward compatibility reasons) and to false otherwise. - */ - sendInitialEvents?: boolean; - /** - * shardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: - * - * shardRange(object.metadata.uid, '0x0', '0x8000000000000000') - * shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') - * - * Field paths use CEL-style object-rooted syntax (e.g. "object.metadata.uid"), NOT the fieldSelector format ("metadata.uid"). Currently supported paths: - * - object.metadata.uid - * - object.metadata.namespace - * - * hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. - * - * Examples: - * 2-shard split: - * shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') - * shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') - * 4-shard split: - * shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') - * shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') - * shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') - * shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') - * - * This is an alpha field and requires enabling the ShardedListAndWatch feature gate. - */ - shardSelector?: string; - /** - * Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - */ - timeoutSeconds?: number; - /** - * Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - watch?: boolean; - }; - url: '/apis/dashboard.grafana.app/v1/namespaces/{namespace}/dashboards'; -}; - -export type GrafanaDashboardK8sListDashboardResponses = { - /** - * OK - */ - 200: GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1DashboardList; -}; - -export type GrafanaDashboardK8sListDashboardResponse = GrafanaDashboardK8sListDashboardResponses[keyof GrafanaDashboardK8sListDashboardResponses]; - -export type GrafanaDashboardK8sCreateDashboardData = { - body: GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1Dashboard; - path: { - /** - * object name and auth scope, such as for teams and projects - */ - namespace: string; - }; - query?: { - /** - * If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - pretty?: string; - /** - * When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - */ - dryRun?: string; - /** - * fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - fieldManager?: string; - /** - * fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - fieldValidation?: string; - }; - url: '/apis/dashboard.grafana.app/v1/namespaces/{namespace}/dashboards'; -}; - -export type GrafanaDashboardK8sCreateDashboardResponses = { - /** - * OK - */ - 200: GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1Dashboard; - /** - * Created - */ - 201: GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1Dashboard; - /** - * Accepted - */ - 202: GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1Dashboard; -}; - -export type GrafanaDashboardK8sCreateDashboardResponse = GrafanaDashboardK8sCreateDashboardResponses[keyof GrafanaDashboardK8sCreateDashboardResponses]; - -export type GrafanaDashboardK8sDeleteDashboardData = { - body?: never; - path: { - /** - * name of the Dashboard - */ - name: string; - /** - * object name and auth scope, such as for teams and projects - */ - namespace: string; - }; - query?: { - /** - * If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - pretty?: string; - /** - * When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - */ - dryRun?: string; - /** - * The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - */ - gracePeriodSeconds?: number; - /** - * if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - */ - ignoreStoreReadErrorWithClusterBreakingPotential?: boolean; - /** - * Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - */ - orphanDependents?: boolean; - /** - * Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - */ - propagationPolicy?: string; - }; - url: '/apis/dashboard.grafana.app/v1/namespaces/{namespace}/dashboards/{name}'; -}; - -export type GrafanaDashboardK8sDeleteDashboardResponses = { - /** - * OK - */ - 200: GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1Status; - /** - * Accepted - */ - 202: GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1Status; -}; - -export type GrafanaDashboardK8sDeleteDashboardResponse = GrafanaDashboardK8sDeleteDashboardResponses[keyof GrafanaDashboardK8sDeleteDashboardResponses]; - -export type GrafanaDashboardK8sGetDashboardData = { - body?: never; - path: { - /** - * name of the Dashboard - */ - name: string; - /** - * object name and auth scope, such as for teams and projects - */ - namespace: string; - }; - query?: { - /** - * If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - pretty?: string; - }; - url: '/apis/dashboard.grafana.app/v1/namespaces/{namespace}/dashboards/{name}'; -}; - -export type GrafanaDashboardK8sGetDashboardResponses = { - /** - * OK - */ - 200: GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1Dashboard; -}; - -export type GrafanaDashboardK8sGetDashboardResponse = GrafanaDashboardK8sGetDashboardResponses[keyof GrafanaDashboardK8sGetDashboardResponses]; - -export type GrafanaDashboardK8sUpdateDashboardData = { - body: GrafanaDashboardK8sIoK8sApimachineryPkgApisMetaV1Patch; - path: { - /** - * name of the Dashboard - */ - name: string; - /** - * object name and auth scope, such as for teams and projects - */ - namespace: string; - }; - query?: { - /** - * If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - pretty?: string; - /** - * When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - */ - dryRun?: string; - /** - * fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - */ - fieldManager?: string; - /** - * fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - fieldValidation?: string; - /** - * Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - force?: boolean; - }; - url: '/apis/dashboard.grafana.app/v1/namespaces/{namespace}/dashboards/{name}'; -}; - -export type GrafanaDashboardK8sUpdateDashboardResponses = { - /** - * OK - */ - 200: GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1Dashboard; - /** - * Created - */ - 201: GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1Dashboard; -}; - -export type GrafanaDashboardK8sUpdateDashboardResponse = GrafanaDashboardK8sUpdateDashboardResponses[keyof GrafanaDashboardK8sUpdateDashboardResponses]; - -export type GrafanaDashboardK8sReplaceDashboardData = { - body: GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1Dashboard; - path: { - /** - * name of the Dashboard - */ - name: string; - /** - * object name and auth scope, such as for teams and projects - */ - namespace: string; - }; - query?: { - /** - * If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - pretty?: string; - /** - * When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - */ - dryRun?: string; - /** - * fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - fieldManager?: string; - /** - * fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - fieldValidation?: string; - }; - url: '/apis/dashboard.grafana.app/v1/namespaces/{namespace}/dashboards/{name}'; -}; - -export type GrafanaDashboardK8sReplaceDashboardResponses = { - /** - * OK - */ - 200: GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1Dashboard; - /** - * Created - */ - 201: GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1Dashboard; -}; - -export type GrafanaDashboardK8sReplaceDashboardResponse = GrafanaDashboardK8sReplaceDashboardResponses[keyof GrafanaDashboardK8sReplaceDashboardResponses]; - -export type GrafanaDashboardK8sGetDashboardDtoData = { - body?: never; - path: { - /** - * name of the DashboardWithAccessInfo - */ - name: string; - /** - * object name and auth scope, such as for teams and projects - */ - namespace: string; - }; - query?: never; - url: '/apis/dashboard.grafana.app/v1/namespaces/{namespace}/dashboards/{name}/dto'; -}; - -export type GrafanaDashboardK8sGetDashboardDtoResponses = { - /** - * OK - */ - 200: GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1DashboardWithAccessInfo; -}; - -export type GrafanaDashboardK8sGetDashboardDtoResponse = GrafanaDashboardK8sGetDashboardDtoResponses[keyof GrafanaDashboardK8sGetDashboardDtoResponses]; - -export type GrafanaFolderK8sGetApiResourcesData = { - body?: never; - path?: never; - query?: never; - url: '/apis/folder.grafana.app/v1/'; -}; - -export type GrafanaFolderK8sGetApiResourcesResponses = { - /** - * OK - */ - 200: GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1ApiResourceList; -}; - -export type GrafanaFolderK8sGetApiResourcesResponse = GrafanaFolderK8sGetApiResourcesResponses[keyof GrafanaFolderK8sGetApiResourcesResponses]; - -export type GrafanaFolderK8sListFolderData = { - body?: never; - path: { - /** - * object name and auth scope, such as for teams and projects - */ - namespace: string; - }; - query?: { - /** - * If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - pretty?: string; - /** - * allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - */ - allowWatchBookmarks?: boolean; - /** - * The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". - * - * This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - */ - continue?: string; - /** - * A selector to restrict the list of returned objects by their fields. Defaults to everything. - */ - fieldSelector?: string; - /** - * A selector to restrict the list of returned objects by their labels. Defaults to everything. - */ - labelSelector?: string; - /** - * limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. - * - * The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - */ - limit?: number; - /** - * resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. - * - * Defaults to unset - */ - resourceVersion?: string; - /** - * resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. - * - * Defaults to unset - */ - resourceVersionMatch?: string; - /** - * `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic "Bookmark" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. - * - * When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan - * is interpreted as "data at least as new as the provided `resourceVersion`" - * and the bookmark event is send when the state is synced - * to a `resourceVersion` at least as fresh as the one provided by the ListOptions. - * If `resourceVersion` is unset, this is interpreted as "consistent read" and the - * bookmark event is send when the state is synced at least to the moment - * when request started being processed. - * - `resourceVersionMatch` set to any other value or unset - * Invalid error is returned. - * - * Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward compatibility reasons) and to false otherwise. - */ - sendInitialEvents?: boolean; - /** - * shardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges: - * - * shardRange(object.metadata.uid, '0x0', '0x8000000000000000') - * shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') - * - * Field paths use CEL-style object-rooted syntax (e.g. "object.metadata.uid"), NOT the fieldSelector format ("metadata.uid"). Currently supported paths: - * - object.metadata.uid - * - object.metadata.namespace - * - * hexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64. - * - * Examples: - * 2-shard split: - * shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') - * shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') - * 4-shard split: - * shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') - * shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') - * shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') - * shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') - * - * This is an alpha field and requires enabling the ShardedListAndWatch feature gate. - */ - shardSelector?: string; - /** - * Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - */ - timeoutSeconds?: number; - /** - * Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - watch?: boolean; - }; - url: '/apis/folder.grafana.app/v1/namespaces/{namespace}/folders'; -}; - -export type GrafanaFolderK8sListFolderResponses = { - /** - * OK - */ - 200: GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1FolderList; -}; - -export type GrafanaFolderK8sListFolderResponse = GrafanaFolderK8sListFolderResponses[keyof GrafanaFolderK8sListFolderResponses]; - -export type GrafanaFolderK8sCreateFolderData = { - body: GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1Folder; - path: { - /** - * object name and auth scope, such as for teams and projects - */ - namespace: string; - }; - query?: { - /** - * If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - pretty?: string; - /** - * When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - */ - dryRun?: string; - /** - * fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - fieldManager?: string; - /** - * fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - fieldValidation?: string; - }; - url: '/apis/folder.grafana.app/v1/namespaces/{namespace}/folders'; -}; - -export type GrafanaFolderK8sCreateFolderResponses = { - /** - * OK - */ - 200: GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1Folder; - /** - * Created - */ - 201: GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1Folder; - /** - * Accepted - */ - 202: GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1Folder; -}; - -export type GrafanaFolderK8sCreateFolderResponse = GrafanaFolderK8sCreateFolderResponses[keyof GrafanaFolderK8sCreateFolderResponses]; - -export type GrafanaFolderK8sDeleteFolderData = { - body?: never; - path: { - /** - * name of the Folder - */ - name: string; - /** - * object name and auth scope, such as for teams and projects - */ - namespace: string; - }; - query?: { - /** - * If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - pretty?: string; - /** - * When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - */ - dryRun?: string; - /** - * The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - */ - gracePeriodSeconds?: number; - /** - * if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - */ - ignoreStoreReadErrorWithClusterBreakingPotential?: boolean; - /** - * Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - */ - orphanDependents?: boolean; - /** - * Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - */ - propagationPolicy?: string; - }; - url: '/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}'; -}; - -export type GrafanaFolderK8sDeleteFolderResponses = { - /** - * OK - */ - 200: GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1Status; - /** - * Accepted - */ - 202: GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1Status; -}; - -export type GrafanaFolderK8sDeleteFolderResponse = GrafanaFolderK8sDeleteFolderResponses[keyof GrafanaFolderK8sDeleteFolderResponses]; - -export type GrafanaFolderK8sGetFolderData = { - body?: never; - path: { - /** - * name of the Folder - */ - name: string; - /** - * object name and auth scope, such as for teams and projects - */ - namespace: string; - }; - query?: { - /** - * If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - pretty?: string; - }; - url: '/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}'; -}; - -export type GrafanaFolderK8sGetFolderResponses = { - /** - * OK - */ - 200: GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1Folder; -}; - -export type GrafanaFolderK8sGetFolderResponse = GrafanaFolderK8sGetFolderResponses[keyof GrafanaFolderK8sGetFolderResponses]; - -export type GrafanaFolderK8sUpdateFolderData = { - body: GrafanaFolderK8sIoK8sApimachineryPkgApisMetaV1Patch; - path: { - /** - * name of the Folder - */ - name: string; - /** - * object name and auth scope, such as for teams and projects - */ - namespace: string; - }; - query?: { - /** - * If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - pretty?: string; - /** - * When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - */ - dryRun?: string; - /** - * fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - */ - fieldManager?: string; - /** - * fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - fieldValidation?: string; - /** - * Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - force?: boolean; - }; - url: '/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}'; -}; - -export type GrafanaFolderK8sUpdateFolderResponses = { - /** - * OK - */ - 200: GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1Folder; - /** - * Created - */ - 201: GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1Folder; -}; - -export type GrafanaFolderK8sUpdateFolderResponse = GrafanaFolderK8sUpdateFolderResponses[keyof GrafanaFolderK8sUpdateFolderResponses]; - -export type GrafanaFolderK8sReplaceFolderData = { - body: GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1Folder; - path: { - /** - * name of the Folder - */ - name: string; - /** - * object name and auth scope, such as for teams and projects - */ - namespace: string; - }; - query?: { - /** - * If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - pretty?: string; - /** - * When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - */ - dryRun?: string; - /** - * fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - fieldManager?: string; - /** - * fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - fieldValidation?: string; - }; - url: '/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}'; -}; - -export type GrafanaFolderK8sReplaceFolderResponses = { - /** - * OK - */ - 200: GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1Folder; - /** - * Created - */ - 201: GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1Folder; -}; - -export type GrafanaFolderK8sReplaceFolderResponse = GrafanaFolderK8sReplaceFolderResponses[keyof GrafanaFolderK8sReplaceFolderResponses]; - -export type GrafanaFolderK8sGetFolderAccessData = { - body?: never; - path: { - /** - * name of the FolderAccessInfo - */ - name: string; - /** - * object name and auth scope, such as for teams and projects - */ - namespace: string; - }; - query?: never; - url: '/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}/access'; -}; - -export type GrafanaFolderK8sGetFolderAccessResponses = { - /** - * OK - */ - 200: GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1FolderAccessInfo; -}; - -export type GrafanaFolderK8sGetFolderAccessResponse = GrafanaFolderK8sGetFolderAccessResponses[keyof GrafanaFolderK8sGetFolderAccessResponses]; - -export type GrafanaFolderK8sGetFolderChildrenData = { - body?: never; - path: { - /** - * name of the FolderList - */ - name: string; - /** - * object name and auth scope, such as for teams and projects - */ - namespace: string; - }; - query?: never; - url: '/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}/children'; -}; - -export type GrafanaFolderK8sGetFolderChildrenResponses = { - /** - * OK - */ - 200: GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1FolderList; -}; - -export type GrafanaFolderK8sGetFolderChildrenResponse = GrafanaFolderK8sGetFolderChildrenResponses[keyof GrafanaFolderK8sGetFolderChildrenResponses]; - -export type GrafanaFolderK8sGetFolderCountsData = { - body?: never; - path: { - /** - * name of the DescendantCounts - */ - name: string; - /** - * object name and auth scope, such as for teams and projects - */ - namespace: string; - }; - query?: never; - url: '/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}/counts'; -}; - -export type GrafanaFolderK8sGetFolderCountsResponses = { - /** - * OK - */ - 200: GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1DescendantCounts; -}; - -export type GrafanaFolderK8sGetFolderCountsResponse = GrafanaFolderK8sGetFolderCountsResponses[keyof GrafanaFolderK8sGetFolderCountsResponses]; - -export type GrafanaFolderK8sGetFolderParentsData = { - body?: never; - path: { - /** - * name of the FolderInfoList - */ - name: string; - /** - * object name and auth scope, such as for teams and projects - */ - namespace: string; - }; - query?: never; - url: '/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}/parents'; -}; - -export type GrafanaFolderK8sGetFolderParentsResponses = { - /** - * OK - */ - 200: GrafanaFolderK8sComGithubGrafanaGrafanaAppsFolderPkgApisFolderV1FolderInfoList; -}; - -export type GrafanaFolderK8sGetFolderParentsResponse = GrafanaFolderK8sGetFolderParentsResponses[keyof GrafanaFolderK8sGetFolderParentsResponses]; diff --git a/integrations/grafana/src/gen/grafana-legacy-client/client.gen.ts b/integrations/grafana/src/gen/grafana-legacy-client/client.gen.ts deleted file mode 100644 index cab3c70195b..00000000000 --- a/integrations/grafana/src/gen/grafana-legacy-client/client.gen.ts +++ /dev/null @@ -1,16 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import { type ClientOptions, type Config, createClient, createConfig } from './client'; -import type { ClientOptions as ClientOptions2 } from './types.gen'; - -/** - * The `createClientConfig()` function will be called on client initialization - * and the returned object will become the client's initial configuration. - * - * You may want to initialize your client this way instead of calling - * `setConfig()`. This is useful for example if you're using Next.js - * to ensure your client always has the correct values. - */ -export type CreateClientConfig = (override?: Config) => Config & T>; - -export const client = createClient(createConfig()); diff --git a/integrations/grafana/src/gen/grafana-legacy-client/client/client.gen.ts b/integrations/grafana/src/gen/grafana-legacy-client/client/client.gen.ts deleted file mode 100644 index 377b6c9e091..00000000000 --- a/integrations/grafana/src/gen/grafana-legacy-client/client/client.gen.ts +++ /dev/null @@ -1,280 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import { createSseClient } from '../core/serverSentEvents.gen'; -import type { HttpMethod } from '../core/types.gen'; -import { getValidRequestBody } from '../core/utils.gen'; -import type { Client, Config, RequestOptions, ResolvedRequestOptions } from './types.gen'; -import { - buildUrl, - createConfig, - createInterceptors, - getParseAs, - mergeConfigs, - mergeHeaders, - setAuthParams, -} from './utils.gen'; - -type ReqInit = Omit & { - body?: any; - headers: ReturnType; -}; - -export const createClient = (config: Config = {}): Client => { - let _config = mergeConfigs(createConfig(), config); - - const getConfig = (): Config => ({ ..._config }); - - const setConfig = (config: Config): Config => { - _config = mergeConfigs(_config, config); - return getConfig(); - }; - - const interceptors = createInterceptors(); - - const beforeRequest = async < - TData = unknown, - TResponseStyle extends 'data' | 'fields' = 'fields', - ThrowOnError extends boolean = boolean, - Url extends string = string, - >( - options: RequestOptions, - ) => { - const opts = { - ..._config, - ...options, - fetch: options.fetch ?? _config.fetch ?? globalThis.fetch, - headers: mergeHeaders(_config.headers, options.headers), - serializedBody: undefined as string | undefined, - }; - - if (opts.security) { - await setAuthParams({ - ...opts, - security: opts.security, - }); - } - - if (opts.requestValidator) { - await opts.requestValidator(opts); - } - - if (opts.body !== undefined && opts.bodySerializer) { - opts.serializedBody = opts.bodySerializer(opts.body) as string | undefined; - } - - // remove Content-Type header if body is empty to avoid sending invalid requests - if (opts.body === undefined || opts.serializedBody === '') { - opts.headers.delete('Content-Type'); - } - - const resolvedOpts = opts as typeof opts & - ResolvedRequestOptions; - const url = buildUrl(resolvedOpts); - - return { opts: resolvedOpts, url }; - }; - - const request: Client['request'] = async (options) => { - const throwOnError = options.throwOnError ?? _config.throwOnError; - const responseStyle = options.responseStyle ?? _config.responseStyle; - - let request: Request | undefined; - let response: Response | undefined; - - try { - const { opts, url } = await beforeRequest(options); - const requestInit: ReqInit = { - redirect: 'follow', - ...opts, - body: getValidRequestBody(opts), - }; - - request = new Request(url, requestInit); - - for (const fn of interceptors.request.fns) { - if (fn) { - request = await fn(request, opts); - } - } - - // fetch must be assigned here, otherwise it would throw the error: - // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation - const _fetch = opts.fetch!; - - response = await _fetch(request); - - for (const fn of interceptors.response.fns) { - if (fn) { - response = await fn(response, request, opts); - } - } - - const result = { - request, - response, - }; - - if (response.ok) { - const parseAs = - (opts.parseAs === 'auto' - ? getParseAs(response.headers.get('Content-Type')) - : opts.parseAs) ?? 'json'; - - if (response.status === 204 || response.headers.get('Content-Length') === '0') { - let emptyData: any; - switch (parseAs) { - case 'arrayBuffer': - case 'blob': - case 'text': - emptyData = await response[parseAs](); - break; - case 'formData': - emptyData = new FormData(); - break; - case 'stream': - emptyData = response.body; - break; - case 'json': - default: - emptyData = {}; - break; - } - return opts.responseStyle === 'data' - ? emptyData - : { - data: emptyData, - ...result, - }; - } - - let data: any; - switch (parseAs) { - case 'arrayBuffer': - case 'blob': - case 'formData': - case 'text': - data = await response[parseAs](); - break; - case 'json': { - // Some servers return 200 with no Content-Length and empty body. - // response.json() would throw; read as text and parse if non-empty. - const text = await response.text(); - data = text ? JSON.parse(text) : {}; - break; - } - case 'stream': - return opts.responseStyle === 'data' - ? response.body - : { - data: response.body, - ...result, - }; - } - - if (parseAs === 'json') { - if (opts.responseValidator) { - await opts.responseValidator(data); - } - - if (opts.responseTransformer) { - data = await opts.responseTransformer(data); - } - } - - return opts.responseStyle === 'data' - ? data - : { - data, - ...result, - }; - } - - const textError = await response.text(); - let jsonError: unknown; - - try { - jsonError = JSON.parse(textError); - } catch { - // noop - } - - throw jsonError ?? textError; - } catch (error) { - let finalError = error; - - for (const fn of interceptors.error.fns) { - if (fn) { - finalError = await fn(finalError, response, request, options as ResolvedRequestOptions); - } - } - - finalError = finalError || {}; - - if (throwOnError) { - throw finalError; - } - - // TODO: we probably want to return error and improve types - return responseStyle === 'data' - ? undefined - : { - error: finalError, - request, - response, - }; - } - }; - - const makeMethodFn = (method: Uppercase) => (options: RequestOptions) => - request({ ...options, method }); - - const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { - const { opts, url } = await beforeRequest(options); - return createSseClient({ - ...opts, - body: opts.body as BodyInit | null | undefined, - method, - onRequest: async (url, init) => { - let request = new Request(url, init); - for (const fn of interceptors.request.fns) { - if (fn) { - request = await fn(request, opts); - } - } - return request; - }, - serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined, - url, - }); - }; - - const _buildUrl: Client['buildUrl'] = (options) => buildUrl({ ..._config, ...options }); - - return { - buildUrl: _buildUrl, - connect: makeMethodFn('CONNECT'), - delete: makeMethodFn('DELETE'), - get: makeMethodFn('GET'), - getConfig, - head: makeMethodFn('HEAD'), - interceptors, - options: makeMethodFn('OPTIONS'), - patch: makeMethodFn('PATCH'), - post: makeMethodFn('POST'), - put: makeMethodFn('PUT'), - request, - setConfig, - sse: { - connect: makeSseFn('CONNECT'), - delete: makeSseFn('DELETE'), - get: makeSseFn('GET'), - head: makeSseFn('HEAD'), - options: makeSseFn('OPTIONS'), - patch: makeSseFn('PATCH'), - post: makeSseFn('POST'), - put: makeSseFn('PUT'), - trace: makeSseFn('TRACE'), - }, - trace: makeMethodFn('TRACE'), - } as Client; -}; diff --git a/integrations/grafana/src/gen/grafana-legacy-client/client/index.ts b/integrations/grafana/src/gen/grafana-legacy-client/client/index.ts deleted file mode 100644 index b295edeca0c..00000000000 --- a/integrations/grafana/src/gen/grafana-legacy-client/client/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export type { Auth } from '../core/auth.gen'; -export type { QuerySerializerOptions } from '../core/bodySerializer.gen'; -export { - formDataBodySerializer, - jsonBodySerializer, - urlSearchParamsBodySerializer, -} from '../core/bodySerializer.gen'; -export { buildClientParams } from '../core/params.gen'; -export { serializeQueryKeyValue } from '../core/queryKeySerializer.gen'; -export { createClient } from './client.gen'; -export type { - Client, - ClientOptions, - Config, - CreateClientConfig, - Options, - RequestOptions, - RequestResult, - ResolvedRequestOptions, - ResponseStyle, - TDataShape, -} from './types.gen'; -export { createConfig, mergeHeaders } from './utils.gen'; diff --git a/integrations/grafana/src/gen/grafana-legacy-client/client/types.gen.ts b/integrations/grafana/src/gen/grafana-legacy-client/client/types.gen.ts deleted file mode 100644 index 4b288a5099b..00000000000 --- a/integrations/grafana/src/gen/grafana-legacy-client/client/types.gen.ts +++ /dev/null @@ -1,217 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import type { Auth } from '../core/auth.gen'; -import type { - ServerSentEventsOptions, - ServerSentEventsResult, -} from '../core/serverSentEvents.gen'; -import type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen'; -import type { Middleware } from './utils.gen'; - -export type ResponseStyle = 'data' | 'fields'; - -export interface Config - extends Omit, CoreConfig { - /** - * Base URL for all requests made by this client. - */ - baseUrl?: T['baseUrl']; - /** - * Fetch API implementation. You can use this option to provide a custom - * fetch instance. - * - * @default globalThis.fetch - */ - fetch?: typeof fetch; - /** - * Please don't use the Fetch client for Next.js applications. The `next` - * options won't have any effect. - * - * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead. - */ - next?: never; - /** - * Return the response data parsed in a specified format. By default, `auto` - * will infer the appropriate method from the `Content-Type` response header. - * You can override this behavior with any of the {@link Body} methods. - * Select `stream` if you don't want to parse response data at all. - * - * @default 'auto' - */ - parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text'; - /** - * Should we return only data or multiple fields (data, error, response, etc.)? - * - * @default 'fields' - */ - responseStyle?: ResponseStyle; - /** - * Throw an error instead of returning it in the response? - * - * @default false - */ - throwOnError?: T['throwOnError']; -} - -export interface RequestOptions< - TData = unknown, - TResponseStyle extends ResponseStyle = 'fields', - ThrowOnError extends boolean = boolean, - Url extends string = string, -> - extends - Config<{ - responseStyle: TResponseStyle; - throwOnError: ThrowOnError; - }>, - Pick< - ServerSentEventsOptions, - | 'onRequest' - | 'onSseError' - | 'onSseEvent' - | 'sseDefaultRetryDelay' - | 'sseMaxRetryAttempts' - | 'sseMaxRetryDelay' - > { - /** - * Any body that you want to add to your request. - * - * {@link https://developer.mozilla.org/docs/Web/API/fetch#body} - */ - body?: unknown; - path?: Record; - query?: Record; - /** - * Security mechanism(s) to use for the request. - */ - security?: ReadonlyArray; - url: Url; -} - -export interface ResolvedRequestOptions< - TResponseStyle extends ResponseStyle = 'fields', - ThrowOnError extends boolean = boolean, - Url extends string = string, -> extends RequestOptions { - headers: Headers; - serializedBody?: string; -} - -export type RequestResult< - TData = unknown, - TError = unknown, - ThrowOnError extends boolean = boolean, - TResponseStyle extends ResponseStyle = 'fields', -> = ThrowOnError extends true - ? Promise< - TResponseStyle extends 'data' - ? TData extends Record - ? TData[keyof TData] - : TData - : { - data: TData extends Record ? TData[keyof TData] : TData; - request: Request; - response: Response; - } - > - : Promise< - TResponseStyle extends 'data' - ? (TData extends Record ? TData[keyof TData] : TData) | undefined - : ( - | { - data: TData extends Record ? TData[keyof TData] : TData; - error: undefined; - } - | { - data: undefined; - error: TError extends Record ? TError[keyof TError] : TError; - } - ) & { - /** request may be undefined, because error may be from building the request object itself */ - request?: Request; - /** response may be undefined, because error may be from building the request object itself or from a network error */ - response?: Response; - } - >; - -export interface ClientOptions { - baseUrl?: string; - responseStyle?: ResponseStyle; - throwOnError?: boolean; -} - -type MethodFn = < - TData = unknown, - TError = unknown, - ThrowOnError extends boolean = false, - TResponseStyle extends ResponseStyle = 'fields', ->( - options: Omit, 'method'>, -) => RequestResult; - -type SseFn = < - TData = unknown, - TError = unknown, - ThrowOnError extends boolean = false, - TResponseStyle extends ResponseStyle = 'fields', ->( - options: Omit, 'method'>, -) => Promise>; - -type RequestFn = < - TData = unknown, - TError = unknown, - ThrowOnError extends boolean = false, - TResponseStyle extends ResponseStyle = 'fields', ->( - options: Omit, 'method'> & - Pick>, 'method'>, -) => RequestResult; - -type BuildUrlFn = < - TData extends { - body?: unknown; - path?: Record; - query?: Record; - url: string; - }, ->( - options: TData & Options, -) => string; - -export type Client = CoreClient & { - interceptors: Middleware; -}; - -/** - * The `createClientConfig()` function will be called on client initialization - * and the returned object will become the client's initial configuration. - * - * You may want to initialize your client this way instead of calling - * `setConfig()`. This is useful for example if you're using Next.js - * to ensure your client always has the correct values. - */ -export type CreateClientConfig = ( - override?: Config, -) => Config & T>; - -export interface TDataShape { - body?: unknown; - headers?: unknown; - path?: unknown; - query?: unknown; - url: string; -} - -type OmitKeys = Pick>; - -export type Options< - TData extends TDataShape = TDataShape, - ThrowOnError extends boolean = boolean, - TResponse = unknown, - TResponseStyle extends ResponseStyle = 'fields', -> = OmitKeys< - RequestOptions, - 'body' | 'path' | 'query' | 'url' -> & - ([TData] extends [never] ? unknown : Omit); diff --git a/integrations/grafana/src/gen/grafana-legacy-client/client/utils.gen.ts b/integrations/grafana/src/gen/grafana-legacy-client/client/utils.gen.ts deleted file mode 100644 index eb0164fa8c1..00000000000 --- a/integrations/grafana/src/gen/grafana-legacy-client/client/utils.gen.ts +++ /dev/null @@ -1,318 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import { getAuthToken } from '../core/auth.gen'; -import type { QuerySerializerOptions } from '../core/bodySerializer.gen'; -import { jsonBodySerializer } from '../core/bodySerializer.gen'; -import { - serializeArrayParam, - serializeObjectParam, - serializePrimitiveParam, -} from '../core/pathSerializer.gen'; -import { getUrl } from '../core/utils.gen'; -import type { Client, ClientOptions, Config, RequestOptions } from './types.gen'; - -export const createQuerySerializer = ({ - parameters = {}, - ...args -}: QuerySerializerOptions = {}) => { - const querySerializer = (queryParams: T) => { - const search: string[] = []; - if (queryParams && typeof queryParams === 'object') { - for (const name in queryParams) { - const value = queryParams[name]; - - if (value === undefined || value === null) { - continue; - } - - const options = parameters[name] || args; - - if (Array.isArray(value)) { - const serializedArray = serializeArrayParam({ - allowReserved: options.allowReserved, - explode: true, - name, - style: 'form', - value, - ...options.array, - }); - if (serializedArray) search.push(serializedArray); - } else if (typeof value === 'object') { - const serializedObject = serializeObjectParam({ - allowReserved: options.allowReserved, - explode: true, - name, - style: 'deepObject', - value: value as Record, - ...options.object, - }); - if (serializedObject) search.push(serializedObject); - } else { - const serializedPrimitive = serializePrimitiveParam({ - allowReserved: options.allowReserved, - name, - value: value as string, - }); - if (serializedPrimitive) search.push(serializedPrimitive); - } - } - } - return search.join('&'); - }; - return querySerializer; -}; - -/** - * Infers parseAs value from provided Content-Type header. - */ -export const getParseAs = (contentType: string | null): Exclude => { - if (!contentType) { - // If no Content-Type header is provided, the best we can do is return the raw response body, - // which is effectively the same as the 'stream' option. - return 'stream'; - } - - const cleanContent = contentType.split(';')[0]?.trim(); - - if (!cleanContent) { - return; - } - - if (cleanContent.startsWith('application/json') || cleanContent.endsWith('+json')) { - return 'json'; - } - - if (cleanContent === 'multipart/form-data') { - return 'formData'; - } - - if ( - ['application/', 'audio/', 'image/', 'video/'].some((type) => cleanContent.startsWith(type)) - ) { - return 'blob'; - } - - if (cleanContent.startsWith('text/')) { - return 'text'; - } - - return; -}; - -const checkForExistence = ( - options: Pick & { - headers: Headers; - }, - name?: string, -): boolean => { - if (!name) { - return false; - } - if ( - options.headers.has(name) || - options.query?.[name] || - options.headers.get('Cookie')?.includes(`${name}=`) - ) { - return true; - } - return false; -}; - -export const setAuthParams = async ({ - security, - ...options -}: Pick, 'security'> & - Pick & { - headers: Headers; - }) => { - for (const auth of security) { - if (checkForExistence(options, auth.name)) { - continue; - } - - const token = await getAuthToken(auth, options.auth); - - if (!token) { - continue; - } - - const name = auth.name ?? 'Authorization'; - - switch (auth.in) { - case 'query': - if (!options.query) { - options.query = {}; - } - options.query[name] = token; - break; - case 'cookie': - options.headers.append('Cookie', `${name}=${token}`); - break; - case 'header': - default: - options.headers.set(name, token); - break; - } - } -}; - -export const buildUrl: Client['buildUrl'] = (options) => - getUrl({ - baseUrl: options.baseUrl as string, - path: options.path, - query: options.query, - querySerializer: - typeof options.querySerializer === 'function' - ? options.querySerializer - : createQuerySerializer(options.querySerializer), - url: options.url, - }); - -export const mergeConfigs = (a: Config, b: Config): Config => { - const config = { ...a, ...b }; - if (config.baseUrl?.endsWith('/')) { - config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1); - } - config.headers = mergeHeaders(a.headers, b.headers); - return config; -}; - -const headersEntries = (headers: Headers): Array<[string, string]> => { - const entries: Array<[string, string]> = []; - headers.forEach((value, key) => { - entries.push([key, value]); - }); - return entries; -}; - -export const mergeHeaders = ( - ...headers: Array['headers'] | undefined> -): Headers => { - const mergedHeaders = new Headers(); - for (const header of headers) { - if (!header) { - continue; - } - - const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header); - - for (const [key, value] of iterator) { - if (value === null) { - mergedHeaders.delete(key); - } else if (Array.isArray(value)) { - for (const v of value) { - mergedHeaders.append(key, v as string); - } - } else if (value !== undefined) { - // assume object headers are meant to be JSON stringified, i.e., their - // content value in OpenAPI specification is 'application/json' - mergedHeaders.set( - key, - typeof value === 'object' ? JSON.stringify(value) : (value as string), - ); - } - } - } - return mergedHeaders; -}; - -type ErrInterceptor = ( - error: Err, - /** response may be undefined due to a network error where no response object is produced */ - response: Res | undefined, - /** request may be undefined, because error may be from building the request object itself */ - request: Req | undefined, - options: Options, -) => Err | Promise; - -type ReqInterceptor = (request: Req, options: Options) => Req | Promise; - -type ResInterceptor = ( - response: Res, - request: Req, - options: Options, -) => Res | Promise; - -class Interceptors { - fns: Array = []; - - clear(): void { - this.fns = []; - } - - eject(id: number | Interceptor): void { - const index = this.getInterceptorIndex(id); - if (this.fns[index]) { - this.fns[index] = null; - } - } - - exists(id: number | Interceptor): boolean { - const index = this.getInterceptorIndex(id); - return Boolean(this.fns[index]); - } - - getInterceptorIndex(id: number | Interceptor): number { - if (typeof id === 'number') { - return this.fns[id] ? id : -1; - } - return this.fns.indexOf(id); - } - - update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false { - const index = this.getInterceptorIndex(id); - if (this.fns[index]) { - this.fns[index] = fn; - return id; - } - return false; - } - - use(fn: Interceptor): number { - this.fns.push(fn); - return this.fns.length - 1; - } -} - -export interface Middleware { - error: Interceptors>; - request: Interceptors>; - response: Interceptors>; -} - -export const createInterceptors = (): Middleware< - Req, - Res, - Err, - Options -> => ({ - error: new Interceptors>(), - request: new Interceptors>(), - response: new Interceptors>(), -}); - -const defaultQuerySerializer = createQuerySerializer({ - allowReserved: false, - array: { - explode: true, - style: 'form', - }, - object: { - explode: true, - style: 'deepObject', - }, -}); - -const defaultHeaders = { - 'Content-Type': 'application/json', -}; - -export const createConfig = ( - override: Config & T> = {}, -): Config & T> => ({ - ...jsonBodySerializer, - headers: defaultHeaders, - parseAs: 'auto', - querySerializer: defaultQuerySerializer, - ...override, -}); diff --git a/integrations/grafana/src/gen/grafana-legacy-client/core/auth.gen.ts b/integrations/grafana/src/gen/grafana-legacy-client/core/auth.gen.ts deleted file mode 100644 index 3ebf9947883..00000000000 --- a/integrations/grafana/src/gen/grafana-legacy-client/core/auth.gen.ts +++ /dev/null @@ -1,41 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export type AuthToken = string | undefined; - -export interface Auth { - /** - * Which part of the request do we use to send the auth? - * - * @default 'header' - */ - in?: 'header' | 'query' | 'cookie'; - /** - * Header or query parameter name. - * - * @default 'Authorization' - */ - name?: string; - scheme?: 'basic' | 'bearer'; - type: 'apiKey' | 'http'; -} - -export const getAuthToken = async ( - auth: Auth, - callback: ((auth: Auth) => Promise | AuthToken) | AuthToken, -): Promise => { - const token = typeof callback === 'function' ? await callback(auth) : callback; - - if (!token) { - return; - } - - if (auth.scheme === 'bearer') { - return `Bearer ${token}`; - } - - if (auth.scheme === 'basic') { - return `Basic ${btoa(token)}`; - } - - return token; -}; diff --git a/integrations/grafana/src/gen/grafana-legacy-client/core/bodySerializer.gen.ts b/integrations/grafana/src/gen/grafana-legacy-client/core/bodySerializer.gen.ts deleted file mode 100644 index 67daca60f89..00000000000 --- a/integrations/grafana/src/gen/grafana-legacy-client/core/bodySerializer.gen.ts +++ /dev/null @@ -1,82 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen'; - -export type QuerySerializer = (query: Record) => string; - -export type BodySerializer = (body: unknown) => unknown; - -type QuerySerializerOptionsObject = { - allowReserved?: boolean; - array?: Partial>; - object?: Partial>; -}; - -export type QuerySerializerOptions = QuerySerializerOptionsObject & { - /** - * Per-parameter serialization overrides. When provided, these settings - * override the global array/object settings for specific parameter names. - */ - parameters?: Record; -}; - -const serializeFormDataPair = (data: FormData, key: string, value: unknown): void => { - if (typeof value === 'string' || value instanceof Blob) { - data.append(key, value); - } else if (value instanceof Date) { - data.append(key, value.toISOString()); - } else { - data.append(key, JSON.stringify(value)); - } -}; - -const serializeUrlSearchParamsPair = (data: URLSearchParams, key: string, value: unknown): void => { - if (typeof value === 'string') { - data.append(key, value); - } else { - data.append(key, JSON.stringify(value)); - } -}; - -export const formDataBodySerializer = { - bodySerializer: (body: unknown): FormData => { - const data = new FormData(); - - Object.entries(body as Record).forEach(([key, value]) => { - if (value === undefined || value === null) { - return; - } - if (Array.isArray(value)) { - value.forEach((v) => serializeFormDataPair(data, key, v)); - } else { - serializeFormDataPair(data, key, value); - } - }); - - return data; - }, -}; - -export const jsonBodySerializer = { - bodySerializer: (body: unknown): string => - JSON.stringify(body, (_key, value) => (typeof value === 'bigint' ? value.toString() : value)), -}; - -export const urlSearchParamsBodySerializer = { - bodySerializer: (body: unknown): string => { - const data = new URLSearchParams(); - - Object.entries(body as Record).forEach(([key, value]) => { - if (value === undefined || value === null) { - return; - } - if (Array.isArray(value)) { - value.forEach((v) => serializeUrlSearchParamsPair(data, key, v)); - } else { - serializeUrlSearchParamsPair(data, key, value); - } - }); - - return data.toString(); - }, -}; diff --git a/integrations/grafana/src/gen/grafana-legacy-client/core/params.gen.ts b/integrations/grafana/src/gen/grafana-legacy-client/core/params.gen.ts deleted file mode 100644 index 7955601a5cc..00000000000 --- a/integrations/grafana/src/gen/grafana-legacy-client/core/params.gen.ts +++ /dev/null @@ -1,169 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -type Slot = 'body' | 'headers' | 'path' | 'query'; - -export type Field = - | { - in: Exclude; - /** - * Field name. This is the name we want the user to see and use. - */ - key: string; - /** - * Field mapped name. This is the name we want to use in the request. - * If omitted, we use the same value as `key`. - */ - map?: string; - } - | { - in: Extract; - /** - * Key isn't required for bodies. - */ - key?: string; - map?: string; - } - | { - /** - * Field name. This is the name we want the user to see and use. - */ - key: string; - /** - * Field mapped name. This is the name we want to use in the request. - * If `in` is omitted, `map` aliases `key` to the transport layer. - */ - map: Slot; - }; - -export interface Fields { - allowExtra?: Partial>; - args?: ReadonlyArray; -} - -export type FieldsConfig = ReadonlyArray; - -const extraPrefixesMap: Record = { - $body_: 'body', - $headers_: 'headers', - $path_: 'path', - $query_: 'query', -}; -const extraPrefixes = Object.entries(extraPrefixesMap); - -type KeyMap = Map< - string, - | { - in: Slot; - map?: string; - } - | { - in?: never; - map: Slot; - } ->; - -const buildKeyMap = (fields: FieldsConfig, map?: KeyMap): KeyMap => { - if (!map) { - map = new Map(); - } - - for (const config of fields) { - if ('in' in config) { - if (config.key) { - map.set(config.key, { - in: config.in, - map: config.map, - }); - } - } else if ('key' in config) { - map.set(config.key, { - map: config.map, - }); - } else if (config.args) { - buildKeyMap(config.args, map); - } - } - - return map; -}; - -interface Params { - body: unknown; - headers: Record; - path: Record; - query: Record; -} - -const stripEmptySlots = (params: Params) => { - for (const [slot, value] of Object.entries(params)) { - if (value && typeof value === 'object' && !Array.isArray(value) && !Object.keys(value).length) { - delete params[slot as Slot]; - } - } -}; - -export const buildClientParams = (args: ReadonlyArray, fields: FieldsConfig) => { - const params: Params = { - body: {}, - headers: {}, - path: {}, - query: {}, - }; - - const map = buildKeyMap(fields); - - let config: FieldsConfig[number] | undefined; - - for (const [index, arg] of args.entries()) { - if (fields[index]) { - config = fields[index]; - } - - if (!config) { - continue; - } - - if ('in' in config) { - if (config.key) { - const field = map.get(config.key)!; - const name = field.map || config.key; - if (field.in) { - (params[field.in] as Record)[name] = arg; - } - } else { - params.body = arg; - } - } else { - for (const [key, value] of Object.entries(arg ?? {})) { - const field = map.get(key); - - if (field) { - if (field.in) { - const name = field.map || key; - (params[field.in] as Record)[name] = value; - } else { - params[field.map] = value; - } - } else { - const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix)); - - if (extra) { - const [prefix, slot] = extra; - (params[slot] as Record)[key.slice(prefix.length)] = value; - } else if ('allowExtra' in config && config.allowExtra) { - for (const [slot, allowed] of Object.entries(config.allowExtra)) { - if (allowed) { - (params[slot as Slot] as Record)[key] = value; - break; - } - } - } - } - } - } - } - - stripEmptySlots(params); - - return params; -}; diff --git a/integrations/grafana/src/gen/grafana-legacy-client/core/pathSerializer.gen.ts b/integrations/grafana/src/gen/grafana-legacy-client/core/pathSerializer.gen.ts deleted file mode 100644 index 994b2848c63..00000000000 --- a/integrations/grafana/src/gen/grafana-legacy-client/core/pathSerializer.gen.ts +++ /dev/null @@ -1,171 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -interface SerializeOptions extends SerializePrimitiveOptions, SerializerOptions {} - -interface SerializePrimitiveOptions { - allowReserved?: boolean; - name: string; -} - -export interface SerializerOptions { - /** - * @default true - */ - explode: boolean; - style: T; -} - -export type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; -export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; -type MatrixStyle = 'label' | 'matrix' | 'simple'; -export type ObjectStyle = 'form' | 'deepObject'; -type ObjectSeparatorStyle = ObjectStyle | MatrixStyle; - -interface SerializePrimitiveParam extends SerializePrimitiveOptions { - value: string; -} - -export const separatorArrayExplode = (style: ArraySeparatorStyle) => { - switch (style) { - case 'label': - return '.'; - case 'matrix': - return ';'; - case 'simple': - return ','; - default: - return '&'; - } -}; - -export const separatorArrayNoExplode = (style: ArraySeparatorStyle) => { - switch (style) { - case 'form': - return ','; - case 'pipeDelimited': - return '|'; - case 'spaceDelimited': - return '%20'; - default: - return ','; - } -}; - -export const separatorObjectExplode = (style: ObjectSeparatorStyle) => { - switch (style) { - case 'label': - return '.'; - case 'matrix': - return ';'; - case 'simple': - return ','; - default: - return '&'; - } -}; - -export const serializeArrayParam = ({ - allowReserved, - explode, - name, - style, - value, -}: SerializeOptions & { - value: unknown[]; -}) => { - if (!explode) { - const joinedValues = ( - allowReserved ? value : value.map((v) => encodeURIComponent(v as string)) - ).join(separatorArrayNoExplode(style)); - switch (style) { - case 'label': - return `.${joinedValues}`; - case 'matrix': - return `;${name}=${joinedValues}`; - case 'simple': - return joinedValues; - default: - return `${name}=${joinedValues}`; - } - } - - const separator = separatorArrayExplode(style); - const joinedValues = value - .map((v) => { - if (style === 'label' || style === 'simple') { - return allowReserved ? v : encodeURIComponent(v as string); - } - - return serializePrimitiveParam({ - allowReserved, - name, - value: v as string, - }); - }) - .join(separator); - return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues; -}; - -export const serializePrimitiveParam = ({ - allowReserved, - name, - value, -}: SerializePrimitiveParam) => { - if (value === undefined || value === null) { - return ''; - } - - if (typeof value === 'object') { - throw new Error( - 'Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.', - ); - } - - return `${name}=${allowReserved ? value : encodeURIComponent(value)}`; -}; - -export const serializeObjectParam = ({ - allowReserved, - explode, - name, - style, - value, - valueOnly, -}: SerializeOptions & { - value: Record | Date; - valueOnly?: boolean; -}) => { - if (value instanceof Date) { - return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`; - } - - if (style !== 'deepObject' && !explode) { - let values: string[] = []; - Object.entries(value).forEach(([key, v]) => { - values = [...values, key, allowReserved ? (v as string) : encodeURIComponent(v as string)]; - }); - const joinedValues = values.join(','); - switch (style) { - case 'form': - return `${name}=${joinedValues}`; - case 'label': - return `.${joinedValues}`; - case 'matrix': - return `;${name}=${joinedValues}`; - default: - return joinedValues; - } - } - - const separator = separatorObjectExplode(style); - const joinedValues = Object.entries(value) - .map(([key, v]) => - serializePrimitiveParam({ - allowReserved, - name: style === 'deepObject' ? `${name}[${key}]` : key, - value: v as string, - }), - ) - .join(separator); - return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues; -}; diff --git a/integrations/grafana/src/gen/grafana-legacy-client/core/queryKeySerializer.gen.ts b/integrations/grafana/src/gen/grafana-legacy-client/core/queryKeySerializer.gen.ts deleted file mode 100644 index 5000df606f3..00000000000 --- a/integrations/grafana/src/gen/grafana-legacy-client/core/queryKeySerializer.gen.ts +++ /dev/null @@ -1,117 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -/** - * JSON-friendly union that mirrors what Pinia Colada can hash. - */ -export type JsonValue = - | null - | string - | number - | boolean - | JsonValue[] - | { [key: string]: JsonValue }; - -/** - * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes. - */ -export const queryKeyJsonReplacer = (_key: string, value: unknown) => { - if (value === undefined || typeof value === 'function' || typeof value === 'symbol') { - return undefined; - } - if (typeof value === 'bigint') { - return value.toString(); - } - if (value instanceof Date) { - return value.toISOString(); - } - return value; -}; - -/** - * Safely stringifies a value and parses it back into a JsonValue. - */ -export const stringifyToJsonValue = (input: unknown): JsonValue | undefined => { - try { - const json = JSON.stringify(input, queryKeyJsonReplacer); - if (json === undefined) { - return undefined; - } - return JSON.parse(json) as JsonValue; - } catch { - return undefined; - } -}; - -/** - * Detects plain objects (including objects with a null prototype). - */ -const isPlainObject = (value: unknown): value is Record => { - if (value === null || typeof value !== 'object') { - return false; - } - const prototype = Object.getPrototypeOf(value as object); - return prototype === Object.prototype || prototype === null; -}; - -/** - * Turns URLSearchParams into a sorted JSON object for deterministic keys. - */ -const serializeSearchParams = (params: URLSearchParams): JsonValue => { - const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b)); - const result: Record = {}; - - for (const [key, value] of entries) { - const existing = result[key]; - if (existing === undefined) { - result[key] = value; - continue; - } - - if (Array.isArray(existing)) { - (existing as string[]).push(value); - } else { - result[key] = [existing, value]; - } - } - - return result; -}; - -/** - * Normalizes any accepted value into a JSON-friendly shape for query keys. - */ -export const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => { - if (value === null) { - return null; - } - - if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') { - return value; - } - - if (value === undefined || typeof value === 'function' || typeof value === 'symbol') { - return undefined; - } - - if (typeof value === 'bigint') { - return value.toString(); - } - - if (value instanceof Date) { - return value.toISOString(); - } - - if (Array.isArray(value)) { - return stringifyToJsonValue(value); - } - - if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) { - return serializeSearchParams(value); - } - - if (isPlainObject(value)) { - return stringifyToJsonValue(value); - } - - return undefined; -}; diff --git a/integrations/grafana/src/gen/grafana-legacy-client/core/serverSentEvents.gen.ts b/integrations/grafana/src/gen/grafana-legacy-client/core/serverSentEvents.gen.ts deleted file mode 100644 index ddf3c4d13a4..00000000000 --- a/integrations/grafana/src/gen/grafana-legacy-client/core/serverSentEvents.gen.ts +++ /dev/null @@ -1,242 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import type { Config } from './types.gen'; - -export type ServerSentEventsOptions = Omit & - Pick & { - /** - * Fetch API implementation. You can use this option to provide a custom - * fetch instance. - * - * @default globalThis.fetch - */ - fetch?: typeof fetch; - /** - * Implementing clients can call request interceptors inside this hook. - */ - onRequest?: (url: string, init: RequestInit) => Promise; - /** - * Callback invoked when a network or parsing error occurs during streaming. - * - * This option applies only if the endpoint returns a stream of events. - * - * @param error The error that occurred. - */ - onSseError?: (error: unknown) => void; - /** - * Callback invoked when an event is streamed from the server. - * - * This option applies only if the endpoint returns a stream of events. - * - * @param event Event streamed from the server. - * @returns Nothing (void). - */ - onSseEvent?: (event: StreamEvent) => void; - serializedBody?: RequestInit['body']; - /** - * Default retry delay in milliseconds. - * - * This option applies only if the endpoint returns a stream of events. - * - * @default 3000 - */ - sseDefaultRetryDelay?: number; - /** - * Maximum number of retry attempts before giving up. - */ - sseMaxRetryAttempts?: number; - /** - * Maximum retry delay in milliseconds. - * - * Applies only when exponential backoff is used. - * - * This option applies only if the endpoint returns a stream of events. - * - * @default 30000 - */ - sseMaxRetryDelay?: number; - /** - * Optional sleep function for retry backoff. - * - * Defaults to using `setTimeout`. - */ - sseSleepFn?: (ms: number) => Promise; - url: string; - }; - -export interface StreamEvent { - data: TData; - event?: string; - id?: string; - retry?: number; -} - -export type ServerSentEventsResult = { - stream: AsyncGenerator< - TData extends Record ? TData[keyof TData] : TData, - TReturn, - TNext - >; -}; - -export function createSseClient({ - onRequest, - onSseError, - onSseEvent, - responseTransformer, - responseValidator, - sseDefaultRetryDelay, - sseMaxRetryAttempts, - sseMaxRetryDelay, - sseSleepFn, - url, - ...options -}: ServerSentEventsOptions): ServerSentEventsResult { - let lastEventId: string | undefined; - - const sleep = sseSleepFn ?? ((ms: number) => new Promise((resolve) => setTimeout(resolve, ms))); - - const createStream = async function* () { - let retryDelay: number = sseDefaultRetryDelay ?? 3000; - let attempt = 0; - const signal = options.signal ?? new AbortController().signal; - - while (true) { - if (signal.aborted) break; - - attempt++; - - const headers = - options.headers instanceof Headers - ? options.headers - : new Headers(options.headers as Record | undefined); - - if (lastEventId !== undefined) { - headers.set('Last-Event-ID', lastEventId); - } - - try { - const requestInit: RequestInit = { - redirect: 'follow', - ...options, - body: options.serializedBody, - headers, - signal, - }; - let request = new Request(url, requestInit); - if (onRequest) { - request = await onRequest(url, requestInit); - } - // fetch must be assigned here, otherwise it would throw the error: - // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation - const _fetch = options.fetch ?? globalThis.fetch; - const response = await _fetch(request); - - if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`); - - if (!response.body) throw new Error('No body in SSE response'); - - const reader = response.body.pipeThrough(new TextDecoderStream()).getReader(); - - let buffer = ''; - - const abortHandler = () => { - try { - reader.cancel(); - } catch { - // noop - } - }; - - signal.addEventListener('abort', abortHandler); - - try { - while (true) { - const { done, value } = await reader.read(); - if (done) break; - buffer += value; - buffer = buffer.replace(/\r\n?/g, '\n'); // normalize line endings - - const chunks = buffer.split('\n\n'); - buffer = chunks.pop() ?? ''; - - for (const chunk of chunks) { - const lines = chunk.split('\n'); - const dataLines: Array = []; - let eventName: string | undefined; - - for (const line of lines) { - if (line.startsWith('data:')) { - dataLines.push(line.replace(/^data:\s*/, '')); - } else if (line.startsWith('event:')) { - eventName = line.replace(/^event:\s*/, ''); - } else if (line.startsWith('id:')) { - lastEventId = line.replace(/^id:\s*/, ''); - } else if (line.startsWith('retry:')) { - const parsed = Number.parseInt(line.replace(/^retry:\s*/, ''), 10); - if (!Number.isNaN(parsed)) { - retryDelay = parsed; - } - } - } - - let data: unknown; - let parsedJson = false; - - if (dataLines.length) { - const rawData = dataLines.join('\n'); - try { - data = JSON.parse(rawData); - parsedJson = true; - } catch { - data = rawData; - } - } - - if (parsedJson) { - if (responseValidator) { - await responseValidator(data); - } - - if (responseTransformer) { - data = await responseTransformer(data); - } - } - - onSseEvent?.({ - data, - event: eventName, - id: lastEventId, - retry: retryDelay, - }); - - if (dataLines.length) { - yield data as any; - } - } - } - } finally { - signal.removeEventListener('abort', abortHandler); - reader.releaseLock(); - } - - break; // exit loop on normal completion - } catch (error) { - // connection failed or aborted; retry after delay - onSseError?.(error); - - if (sseMaxRetryAttempts !== undefined && attempt >= sseMaxRetryAttempts) { - break; // stop after firing error - } - - // exponential backoff: double retry each attempt, cap at 30s - const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 30000); - await sleep(backoff); - } - } - }; - - const stream = createStream(); - - return { stream }; -} diff --git a/integrations/grafana/src/gen/grafana-legacy-client/core/types.gen.ts b/integrations/grafana/src/gen/grafana-legacy-client/core/types.gen.ts deleted file mode 100644 index 9efe71d4c16..00000000000 --- a/integrations/grafana/src/gen/grafana-legacy-client/core/types.gen.ts +++ /dev/null @@ -1,104 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import type { Auth, AuthToken } from './auth.gen'; -import type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen'; - -export type HttpMethod = - | 'connect' - | 'delete' - | 'get' - | 'head' - | 'options' - | 'patch' - | 'post' - | 'put' - | 'trace'; - -export type Client< - RequestFn = never, - Config = unknown, - MethodFn = never, - BuildUrlFn = never, - SseFn = never, -> = { - /** - * Returns the final request URL. - */ - buildUrl: BuildUrlFn; - getConfig: () => Config; - request: RequestFn; - setConfig: (config: Config) => Config; -} & { - [K in HttpMethod]: MethodFn; -} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } }); - -export interface Config { - /** - * Auth token or a function returning auth token. The resolved value will be - * added to the request payload as defined by its `security` array. - */ - auth?: ((auth: Auth) => Promise | AuthToken) | AuthToken; - /** - * A function for serializing request body parameter. By default, - * {@link JSON.stringify()} will be used. - */ - bodySerializer?: BodySerializer | null; - /** - * An object containing any HTTP headers that you want to pre-populate your - * `Headers` object with. - * - * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more} - */ - headers?: - | RequestInit['headers'] - | Record< - string, - string | number | boolean | (string | number | boolean)[] | null | undefined | unknown - >; - /** - * The request method. - * - * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more} - */ - method?: Uppercase; - /** - * A function for serializing request query parameters. By default, arrays - * will be exploded in form style, objects will be exploded in deepObject - * style, and reserved characters are percent-encoded. - * - * This method will have no effect if the native `paramsSerializer()` Axios - * API function is used. - * - * {@link https://swagger.io/docs/specification/serialization/#query View examples} - */ - querySerializer?: QuerySerializer | QuerySerializerOptions; - /** - * A function validating request data. This is useful if you want to ensure - * the request conforms to the desired shape, so it can be safely sent to - * the server. - */ - requestValidator?: (data: unknown) => Promise; - /** - * A function transforming response data before it's returned. This is useful - * for post-processing data, e.g., converting ISO strings into Date objects. - */ - responseTransformer?: (data: unknown) => Promise; - /** - * A function validating response data. This is useful if you want to ensure - * the response conforms to the desired shape, so it can be safely passed to - * the transformers and returned to the user. - */ - responseValidator?: (data: unknown) => Promise; -} - -type IsExactlyNeverOrNeverUndefined = [T] extends [never] - ? true - : [T] extends [never | undefined] - ? [undefined] extends [T] - ? false - : true - : false; - -export type OmitNever> = { - [K in keyof T as IsExactlyNeverOrNeverUndefined extends true ? never : K]: T[K]; -}; diff --git a/integrations/grafana/src/gen/grafana-legacy-client/core/utils.gen.ts b/integrations/grafana/src/gen/grafana-legacy-client/core/utils.gen.ts deleted file mode 100644 index 9a4fec7830f..00000000000 --- a/integrations/grafana/src/gen/grafana-legacy-client/core/utils.gen.ts +++ /dev/null @@ -1,140 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import type { BodySerializer, QuerySerializer } from './bodySerializer.gen'; -import { - type ArraySeparatorStyle, - serializeArrayParam, - serializeObjectParam, - serializePrimitiveParam, -} from './pathSerializer.gen'; - -export interface PathSerializer { - path: Record; - url: string; -} - -export const PATH_PARAM_RE = /\{[^{}]+\}/g; - -export const defaultPathSerializer = ({ path, url: _url }: PathSerializer) => { - let url = _url; - const matches = _url.match(PATH_PARAM_RE); - if (matches) { - for (const match of matches) { - let explode = false; - let name = match.substring(1, match.length - 1); - let style: ArraySeparatorStyle = 'simple'; - - if (name.endsWith('*')) { - explode = true; - name = name.substring(0, name.length - 1); - } - - if (name.startsWith('.')) { - name = name.substring(1); - style = 'label'; - } else if (name.startsWith(';')) { - name = name.substring(1); - style = 'matrix'; - } - - const value = path[name]; - - if (value === undefined || value === null) { - continue; - } - - if (Array.isArray(value)) { - url = url.replace(match, serializeArrayParam({ explode, name, style, value })); - continue; - } - - if (typeof value === 'object') { - url = url.replace( - match, - serializeObjectParam({ - explode, - name, - style, - value: value as Record, - valueOnly: true, - }), - ); - continue; - } - - if (style === 'matrix') { - url = url.replace( - match, - `;${serializePrimitiveParam({ - name, - value: value as string, - })}`, - ); - continue; - } - - const replaceValue = encodeURIComponent( - style === 'label' ? `.${value as string}` : (value as string), - ); - url = url.replace(match, replaceValue); - } - } - return url; -}; - -export const getUrl = ({ - baseUrl, - path, - query, - querySerializer, - url: _url, -}: { - baseUrl?: string; - path?: Record; - query?: Record; - querySerializer: QuerySerializer; - url: string; -}) => { - const pathUrl = _url.startsWith('/') ? _url : `/${_url}`; - let url = (baseUrl ?? '') + pathUrl; - if (path) { - url = defaultPathSerializer({ path, url }); - } - let search = query ? querySerializer(query) : ''; - if (search.startsWith('?')) { - search = search.substring(1); - } - if (search) { - url += `?${search}`; - } - return url; -}; - -export function getValidRequestBody(options: { - body?: unknown; - bodySerializer?: BodySerializer | null; - serializedBody?: unknown; -}) { - const hasBody = options.body !== undefined; - const isSerializedBody = hasBody && options.bodySerializer; - - if (isSerializedBody) { - if ('serializedBody' in options) { - const hasSerializedBody = - options.serializedBody !== undefined && options.serializedBody !== ''; - - return hasSerializedBody ? options.serializedBody : null; - } - - // not all clients implement a serializedBody property (i.e., client-axios) - return options.body !== '' ? options.body : null; - } - - // plain/text body - if (hasBody) { - return options.body; - } - - // no body was provided - return undefined; -} diff --git a/integrations/grafana/src/gen/grafana-legacy-client/index.ts b/integrations/grafana/src/gen/grafana-legacy-client/index.ts deleted file mode 100644 index 5819603d2f5..00000000000 --- a/integrations/grafana/src/gen/grafana-legacy-client/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export { addDataSource, addOrgInvite, addOrgUser, addOrgUserToCurrentOrg, addTeamGroupApi, addTeamMember, addTeamRole, addUserRole, adminCreateUser, adminDeleteUser, adminDisableUser, adminEnableUser, adminGetSettings, adminGetStats, adminGetUserAuthTokens, adminLogoutUser, adminProvisioningReloadAccessControl, adminProvisioningReloadDashboards, adminProvisioningReloadDatasources, adminProvisioningReloadPlugins, adminRevokeUserAuthToken, adminUpdateUserPassword, adminUpdateUserPermissions, callDatasourceResourceWithUid, cancelSnapshot, changeUserPassword, checkDatasourceHealthWithUid, cleanDataSourceCache, clearHelpFlags, createCloudMigrationToken, createCorrelation, createDashboardSnapshot, createFolder, createGroupMappings, createLibraryElement, createOrg, createPlaylist, createPublicDashboard, createQuery, createRecordingRule, createRecordingRuleWriteTarget, createReport, createRole, createServiceAccount, createSession, createSnapshot, createTeam, createToken, datasourceProxyDeleteByUiDcalls, datasourceProxyGetByUiDcalls, datasourceProxyPostByUiDcalls, deleteAnnotationById, deleteCloudMigrationToken, deleteCorrelation, deleteDashboardByUid, deleteDashboardSnapshot, deleteDashboardSnapshotByDeleteKey, deleteDataSourceByName, deleteDataSourceByUid, deleteFolder, deleteGroupMappings, deleteLibraryElementByUid, deleteLicenseToken, deleteOrgById, deletePlaylist, deletePublicDashboard, deleteQuery, deleteRecordingRule, deleteRecordingRuleWriteTarget, deleteReport, deleteRole, deleteServiceAccount, deleteSession, deleteTeamById, deleteToken, disableDataSourceCache, enableDataSourceCache, getAccessControlStatus, getAnnotationById, getAnnotations, getAnnotationTags, getCloudMigrationToken, getCorrelation, getCorrelations, getCorrelationsBySourceUid, getCurrentOrg, getCurrentOrgQuota, getCustomPermissionsCsv, getCustomPermissionsReport, getDashboardByUid, getDashboardPermissionsListByUid, getDashboardSnapshot, getDashboardTags, getDashboardVersionByUid, getDashboardVersionsByUid, getDataSourceByName, getDataSourceByUid, getDataSourceCacheConfig, getDataSourceIdByName, getDataSources, getFolderByUid, getFolderDescendantCounts, getFolderPermissionList, getFolders, getGroupRoles, getHealth, getHomeDashboard, getLdapStatus, getLibraryElementByName, getLibraryElementByUid, getLibraryElementConnections, getLibraryElements, getLicenseToken, getMappedGroups, getMetadata, getOrgById, getOrgByName, getOrgPreferences, getOrgQuota, getOrgUsers, getOrgUsersForCurrentOrg, getOrgUsersForCurrentOrgLookup, getPendingOrgInvites, getPlaylist, getPlaylistItems, getProviderSettings, getPublicAnnotations, getPublicDashboard, getRecordingRuleWriteTarget, getReport, getReports, getReportsByDashboardUid, getReportSettings, getResourceDependencies, getResourceDescription, getResourcePermissions, getRole, getRoleAssignments, getSamlLogout, getSession, getSessionList, getSettingsImage, getShapshotList, getSharingOptions, getSignedInUser, getSignedInUserOrgList, getSignedInUserTeamList, getSlo, getSnapshot, getStatus, getSyncStatus, getTeamById, getTeamGroupsApi, getTeamLbacRulesApi, getTeamMembers, getTeamPreferences, getUserAuthTokens, getUserById, getUserByLoginOrEmail, getUserFromLdap, getUserOrgList, getUserPreferences, getUserQuota, getUserQuotas, getUserTeams, importDashboard, interpolateDashboard, listAllProvidersSettings, listDevices, listPublicDashboards, listRecordingRules, listRoles, listSortOptions, listTeamRoles, listTeamsRoles, listTokens, listUserRoles, listUsersRoles, massDeleteAnnotations, moveFolder, type Options, patchAnnotation, patchOrgPreferences, patchProviderSettings, patchQueryComment, patchUserPreferences, postAcs, postAnnotation, postDashboard, postGraphiteAnnotation, postLicenseToken, postRenewLicenseToken, postSlo, postSyncUserWithLdap, queryMetricsWithExpressions, queryPublicDashboard, refreshLicenseStats, reloadLdapCfg, removeOrgUser, removeOrgUserForCurrentOrg, removeProviderSettings, removeTeamGroupApiQuery, removeTeamMember, removeTeamRole, removeUserRole, renderReportCsvs, renderReportPdfs, restoreDashboardVersionByUid, retrieveJwks, retrieveServiceAccount, revokeInvite, revokeUserAuthToken, routeConvertPrometheusCortexDeleteNamespace, routeConvertPrometheusCortexDeleteRuleGroup, routeConvertPrometheusCortexGetNamespace, routeConvertPrometheusCortexGetRuleGroup, routeConvertPrometheusCortexGetRules, routeConvertPrometheusCortexPostRuleGroup, routeConvertPrometheusCortexPostRuleGroups, routeConvertPrometheusDeleteNamespace, routeConvertPrometheusDeleteRuleGroup, routeConvertPrometheusGetNamespace, routeConvertPrometheusGetRuleGroup, routeConvertPrometheusGetRules, routeConvertPrometheusPostRuleGroup, routeConvertPrometheusPostRuleGroups, routeDeleteAlertRule, routeDeleteAlertRuleGroup, routeDeleteContactpoints, routeDeleteMuteTiming, routeDeleteTemplate, routeExportMuteTiming, routeExportMuteTimings, routeGetAlertRule, routeGetAlertRuleExport, routeGetAlertRuleGroup, routeGetAlertRuleGroupExport, routeGetAlertRules, routeGetAlertRulesExport, routeGetContactpoints, routeGetContactpointsExport, routeGetMuteTiming, routeGetMuteTimings, routeGetPolicyTree, routeGetPolicyTreeExport, routeGetTemplate, routeGetTemplates, routePostAlertRule, routePostContactpoints, routePostMuteTiming, routePutAlertRule, routePutAlertRuleGroup, routePutContactpoint, routePutMuteTiming, routePutPolicyTree, routePutTemplate, routeResetPolicyTree, saveReportSettings, search, searchDashboardSnapshots, searchDevices, searchOrgs, searchOrgServiceAccountsWithPaging, searchOrgUsers, searchPlaylists, searchQueries, searchTeamGroups, searchTeams, searchUsers, searchUsersWithPaging, sendReport, sendTestEmail, setDataSourceCacheConfig, setHelpFlag, setResourcePermissions, setResourcePermissionsForBuiltInRole, setResourcePermissionsForTeam, setResourcePermissionsForUser, setRoleAssignments, setTeamMemberships, setTeamRoles, setUserRoles, starDashboardByUid, starQuery, testCreateRecordingRule, unstarDashboardByUid, unstarQuery, updateAnnotation, updateCorrelation, updateCurrentOrg, updateCurrentOrgAddress, updateDashboardPermissionsByUid, updateDataSourceByUid, updateFolder, updateFolderPermissions, updateGroupMappings, updateLibraryElement, updateOrg, updateOrgAddress, updateOrgPreferences, updateOrgQuota, updateOrgUser, updateOrgUserForCurrentOrg, updatePlaylist, updateProviderSettings, updatePublicDashboard, updateRecordingRule, updateReport, updateRole, updateServiceAccount, updateSignedInUser, updateTeam, updateTeamLbacRulesApi, updateTeamMember, updateTeamPreferences, updateUser, updateUserEmail, updateUserPreferences, updateUserQuota, uploadSnapshot, userSetUsingOrg, viewPublicDashboard } from './sdk.gen'; -export type { Ack, ActiveSyncStatusDto, ActiveUserStats, AddDataSourceCommand, AddDataSourceData, AddDataSourceError, AddDataSourceErrors, AddDataSourceResponse, AddDataSourceResponses, AddInviteForm, AddOrgInviteData, AddOrgInviteError, AddOrgInviteErrors, AddOrgInviteResponse, AddOrgInviteResponses, AddOrgUserCommand, AddOrgUserData, AddOrgUserError, AddOrgUserErrors, AddOrgUserResponse, AddOrgUserResponses, AddOrgUserToCurrentOrgData, AddOrgUserToCurrentOrgError, AddOrgUserToCurrentOrgErrors, AddOrgUserToCurrentOrgResponse, AddOrgUserToCurrentOrgResponses, Address, AddServiceAccountTokenCommand, AddTeamGroupApiData, AddTeamGroupApiError, AddTeamGroupApiErrors, AddTeamGroupApiResponse, AddTeamGroupApiResponses, AddTeamMemberCommand, AddTeamMemberData, AddTeamMemberError, AddTeamMemberErrors, AddTeamMemberResponse, AddTeamMemberResponses, AddTeamRoleCommand, AddTeamRoleData, AddTeamRoleError, AddTeamRoleErrors, AddTeamRoleResponse, AddTeamRoleResponses, AddUserRoleCommand, AddUserRoleData, AddUserRoleError, AddUserRoleErrors, AddUserRoleResponse, AddUserRoleResponses, AdminCreateUserData, AdminCreateUserError, AdminCreateUserErrors, AdminCreateUserForm, AdminCreateUserResponse, AdminCreateUserResponse2, AdminCreateUserResponses, AdminDeleteUserData, AdminDeleteUserError, AdminDeleteUserErrors, AdminDeleteUserResponse, AdminDeleteUserResponses, AdminDisableUserData, AdminDisableUserError, AdminDisableUserErrors, AdminDisableUserResponse, AdminDisableUserResponses, AdminEnableUserData, AdminEnableUserError, AdminEnableUserErrors, AdminEnableUserResponse, AdminEnableUserResponses, AdminGetSettingsData, AdminGetSettingsError, AdminGetSettingsErrors, AdminGetSettingsResponse, AdminGetSettingsResponses, AdminGetStatsData, AdminGetStatsError, AdminGetStatsErrors, AdminGetStatsResponse, AdminGetStatsResponses, AdminGetUserAuthTokensData, AdminGetUserAuthTokensError, AdminGetUserAuthTokensErrors, AdminGetUserAuthTokensResponse, AdminGetUserAuthTokensResponses, AdminLogoutUserData, AdminLogoutUserError, AdminLogoutUserErrors, AdminLogoutUserResponse, AdminLogoutUserResponses, AdminProvisioningReloadAccessControlData, AdminProvisioningReloadAccessControlError, AdminProvisioningReloadAccessControlErrors, AdminProvisioningReloadAccessControlResponse, AdminProvisioningReloadAccessControlResponses, AdminProvisioningReloadDashboardsData, AdminProvisioningReloadDashboardsError, AdminProvisioningReloadDashboardsErrors, AdminProvisioningReloadDashboardsResponse, AdminProvisioningReloadDashboardsResponses, AdminProvisioningReloadDatasourcesData, AdminProvisioningReloadDatasourcesError, AdminProvisioningReloadDatasourcesErrors, AdminProvisioningReloadDatasourcesResponse, AdminProvisioningReloadDatasourcesResponses, AdminProvisioningReloadPluginsData, AdminProvisioningReloadPluginsError, AdminProvisioningReloadPluginsErrors, AdminProvisioningReloadPluginsResponse, AdminProvisioningReloadPluginsResponses, AdminRevokeUserAuthTokenData, AdminRevokeUserAuthTokenError, AdminRevokeUserAuthTokenErrors, AdminRevokeUserAuthTokenResponse, AdminRevokeUserAuthTokenResponses, AdminStats, AdminUpdateUserPasswordData, AdminUpdateUserPasswordError, AdminUpdateUserPasswordErrors, AdminUpdateUserPasswordForm, AdminUpdateUserPasswordResponse, AdminUpdateUserPasswordResponses, AdminUpdateUserPermissionsData, AdminUpdateUserPermissionsError, AdminUpdateUserPermissionsErrors, AdminUpdateUserPermissionsForm, AdminUpdateUserPermissionsResponse, AdminUpdateUserPermissionsResponses, Alert, Alert2, AlertDiscovery, AlertGroup, AlertGroups, AlertingFileExport, AlertingRule, AlertingStatus, AlertInstancesResponse, AlertManager, AlertmanagerConfig, AlertManagerNotReady, AlertManagersResult, AlertmanagerStatus, AlertmanagerUserConfig, AlertQuery, AlertQueryExport, AlertResponse, AlertRuleEditorSettings, AlertRuleExport, AlertRuleGroup, AlertRuleGroupExport, AlertRuleGroupMetadata, AlertRuleGroupWritable, AlertRuleMetadata, AlertRuleNotificationSettings, AlertRuleNotificationSettingsExport, AlertRuleRecordExport, AlertStatus, Annotation, AnnotationActions, AnnotationEvent, AnnotationPanelFilter, AnnotationPermission, AnnotationQuery, AnnotationTarget, ApiRuleNode, Assignments, AttributeTypeAndValue, Authorization, BacktestConfig, BacktestResult, BasicAuth, CacheConfig, CacheConfigResponse, CacheConfigSetter, CalculateDiffTarget, CallDatasourceResourceWithUidData, CallDatasourceResourceWithUidError, CallDatasourceResourceWithUidErrors, CallDatasourceResourceWithUidResponse, CallDatasourceResourceWithUidResponses, CancelSnapshotData, CancelSnapshotError, CancelSnapshotErrors, CancelSnapshotResponses, Certificate, ChangeUserPasswordCommand, ChangeUserPasswordData, ChangeUserPasswordError, ChangeUserPasswordErrors, ChangeUserPasswordResponse, ChangeUserPasswordResponses, CheckDatasourceHealthWithUidData, CheckDatasourceHealthWithUidError, CheckDatasourceHealthWithUidErrors, CheckDatasourceHealthWithUidResponse, CheckDatasourceHealthWithUidResponses, CleanDataSourceCacheData, CleanDataSourceCacheError, CleanDataSourceCacheErrors, CleanDataSourceCacheResponse, CleanDataSourceCacheResponses, ClearHelpFlagsData, ClearHelpFlagsError, ClearHelpFlagsErrors, ClearHelpFlagsResponse, ClearHelpFlagsResponses, ClientOptions, CloudMigrationRunListDto, CloudMigrationSessionListResponseDto, CloudMigrationSessionRequestDto, CloudMigrationSessionResponseDto, ClusterStatus, ConfFloat64, Config, ContactPointExport, ContactPoints, ContactPointsWritable, ConvertPrometheusResponse, Correlation, CorrelationConfig, CorrelationConfigUpdateDto, CorrelationType, CounterResetHint, CreateAccessTokenResponseDto, CreateCloudMigrationTokenData, CreateCloudMigrationTokenError, CreateCloudMigrationTokenErrors, CreateCloudMigrationTokenResponse, CreateCloudMigrationTokenResponses, CreateCorrelationCommand, CreateCorrelationData, CreateCorrelationError, CreateCorrelationErrors, CreateCorrelationResponse, CreateCorrelationResponseBody, CreateCorrelationResponses, CreateDashboardSnapshotCommand, CreateDashboardSnapshotData, CreateDashboardSnapshotError, CreateDashboardSnapshotErrors, CreateDashboardSnapshotResponse, CreateDashboardSnapshotResponses, CreateFolderCommand, CreateFolderData, CreateFolderError, CreateFolderErrors, CreateFolderResponse, CreateFolderResponses, CreateGroupMappingsData, CreateGroupMappingsError, CreateGroupMappingsErrors, CreateGroupMappingsResponse, CreateGroupMappingsResponses, CreateLibraryElementCommand, CreateLibraryElementData, CreateLibraryElementError, CreateLibraryElementErrors, CreateLibraryElementResponse, CreateLibraryElementResponses, CreateOrgCommand, CreateOrgData, CreateOrgError, CreateOrgErrors, CreateOrgResponse, CreateOrgResponses, CreateOrUpdateReport, CreatePlaylistCommand, CreatePlaylistData, CreatePlaylistError, CreatePlaylistErrors, CreatePlaylistResponse, CreatePlaylistResponses, CreatePublicDashboardData, CreatePublicDashboardError, CreatePublicDashboardErrors, CreatePublicDashboardResponse, CreatePublicDashboardResponses, CreateQueryData, CreateQueryError, CreateQueryErrors, CreateQueryInQueryHistoryCommand, CreateQueryResponse, CreateQueryResponses, CreateRecordingRuleData, CreateRecordingRuleError, CreateRecordingRuleErrors, CreateRecordingRuleResponse, CreateRecordingRuleResponses, CreateRecordingRuleWriteTargetData, CreateRecordingRuleWriteTargetError, CreateRecordingRuleWriteTargetErrors, CreateRecordingRuleWriteTargetResponse, CreateRecordingRuleWriteTargetResponses, CreateReportData, CreateReportError, CreateReportErrors, CreateReportResponse, CreateReportResponses, CreateRoleData, CreateRoleError, CreateRoleErrors, CreateRoleForm, CreateRoleResponse, CreateRoleResponses, CreateServiceAccountData, CreateServiceAccountError, CreateServiceAccountErrors, CreateServiceAccountForm, CreateServiceAccountResponse, CreateServiceAccountResponses, CreateSessionData, CreateSessionError, CreateSessionErrors, CreateSessionResponse, CreateSessionResponses, CreateSnapshotData, CreateSnapshotError, CreateSnapshotErrors, CreateSnapshotRequestDto, CreateSnapshotResponse, CreateSnapshotResponseDto, CreateSnapshotResponses, CreateTeamCommand, CreateTeamData, CreateTeamError, CreateTeamErrors, CreateTeamResponse, CreateTeamResponses, CreateTokenData, CreateTokenError, CreateTokenErrors, CreateTokenResponse, CreateTokenResponses, DashboardAclInfoDto, DashboardAclUpdateItem, DashboardCreateCommand, DashboardFullWithMeta, DashboardMeta, DashboardRedirect, DashboardSnapshotDto, DashboardTagCloudItem, DashboardVersionMeta, DashboardVersionResponseMeta, DataLink, DataResponse, DataSource, DataSourceList, DataSourceListItemDto, DatasourceProxyDeleteByUiDcallsData, DatasourceProxyDeleteByUiDcallsError, DatasourceProxyDeleteByUiDcallsErrors, DatasourceProxyDeleteByUiDcallsResponses, DatasourceProxyGetByUiDcallsData, DatasourceProxyGetByUiDcallsError, DatasourceProxyGetByUiDcallsErrors, DatasourceProxyGetByUiDcallsResponses, DatasourceProxyPostByUiDcallsData, DatasourceProxyPostByUiDcallsError, DatasourceProxyPostByUiDcallsErrors, DatasourceProxyPostByUiDcallsResponses, DataSourceRef, DataTopic, DeleteAnnotationByIdData, DeleteAnnotationByIdError, DeleteAnnotationByIdErrors, DeleteAnnotationByIdResponse, DeleteAnnotationByIdResponses, DeleteCloudMigrationTokenData, DeleteCloudMigrationTokenError, DeleteCloudMigrationTokenErrors, DeleteCloudMigrationTokenResponses, DeleteCorrelationData, DeleteCorrelationError, DeleteCorrelationErrors, DeleteCorrelationResponse, DeleteCorrelationResponseBody, DeleteCorrelationResponses, DeleteDashboardByUidData, DeleteDashboardByUidError, DeleteDashboardByUidErrors, DeleteDashboardByUidResponse, DeleteDashboardByUidResponses, DeleteDashboardSnapshotByDeleteKeyData, DeleteDashboardSnapshotByDeleteKeyError, DeleteDashboardSnapshotByDeleteKeyErrors, DeleteDashboardSnapshotByDeleteKeyResponse, DeleteDashboardSnapshotByDeleteKeyResponses, DeleteDashboardSnapshotData, DeleteDashboardSnapshotError, DeleteDashboardSnapshotErrors, DeleteDashboardSnapshotResponse, DeleteDashboardSnapshotResponses, DeleteDataSourceByNameData, DeleteDataSourceByNameError, DeleteDataSourceByNameErrors, DeleteDataSourceByNameResponse, DeleteDataSourceByNameResponses, DeleteDataSourceByUidData, DeleteDataSourceByUidError, DeleteDataSourceByUidErrors, DeleteDataSourceByUidResponse, DeleteDataSourceByUidResponses, DeleteFolderData, DeleteFolderError, DeleteFolderErrors, DeleteFolderResponse, DeleteFolderResponses, DeleteGroupMappingsData, DeleteGroupMappingsError, DeleteGroupMappingsErrors, DeleteGroupMappingsResponse, DeleteGroupMappingsResponses, DeleteLibraryElementByUidData, DeleteLibraryElementByUidError, DeleteLibraryElementByUidErrors, DeleteLibraryElementByUidResponse, DeleteLibraryElementByUidResponses, DeleteLicenseTokenData, DeleteLicenseTokenError, DeleteLicenseTokenErrors, DeleteLicenseTokenResponse, DeleteLicenseTokenResponses, DeleteOrgByIdData, DeleteOrgByIdError, DeleteOrgByIdErrors, DeleteOrgByIdResponse, DeleteOrgByIdResponses, DeletePlaylistData, DeletePlaylistError, DeletePlaylistErrors, DeletePlaylistResponse, DeletePlaylistResponses, DeletePublicDashboardData, DeletePublicDashboardError, DeletePublicDashboardErrors, DeletePublicDashboardResponse, DeletePublicDashboardResponses, DeleteQueryData, DeleteQueryError, DeleteQueryErrors, DeleteQueryResponse, DeleteQueryResponses, DeleteRecordingRuleData, DeleteRecordingRuleError, DeleteRecordingRuleErrors, DeleteRecordingRuleResponse, DeleteRecordingRuleResponses, DeleteRecordingRuleWriteTargetData, DeleteRecordingRuleWriteTargetError, DeleteRecordingRuleWriteTargetErrors, DeleteRecordingRuleWriteTargetResponse, DeleteRecordingRuleWriteTargetResponses, DeleteReportData, DeleteReportError, DeleteReportErrors, DeleteReportResponse, DeleteReportResponses, DeleteRoleData, DeleteRoleError, DeleteRoleErrors, DeleteRoleResponse, DeleteRoleResponses, DeleteServiceAccountData, DeleteServiceAccountError, DeleteServiceAccountErrors, DeleteServiceAccountResponse, DeleteServiceAccountResponses, DeleteSessionData, DeleteSessionError, DeleteSessionErrors, DeleteTeamByIdData, DeleteTeamByIdError, DeleteTeamByIdErrors, DeleteTeamByIdResponse, DeleteTeamByIdResponses, DeleteTokenCommand, DeleteTokenData, DeleteTokenError, DeleteTokenErrors, DeleteTokenResponse, DeleteTokenResponses, DescendantCounts, Description, DeviceDto, DeviceSearchHitDto, DisableDataSourceCacheData, DisableDataSourceCacheError, DisableDataSourceCacheErrors, DisableDataSourceCacheResponse, DisableDataSourceCacheResponses, DiscordConfig, DiscoveryBase, DsAccess, DsPermissionType, Duration, EmailConfig, EmailDto, EmbeddedContactPoint, EmbeddedContactPointWritable, EnableDataSourceCacheData, EnableDataSourceCacheError, EnableDataSourceCacheErrors, EnableDataSourceCacheResponse, EnableDataSourceCacheResponses, EnumFieldConfig, ErrorResponseBody, ErrorType, EvalAlertConditionCommand, EvalQueriesPayload, EvalQueriesResponse, ExplorePanelsState, ExtendedReceiver, Extension, ExternalAlertmanagerConfig, ExternalAlertmanagerStatus, ExtKeyUsage, ExtraConfiguration, FailedUser, Failure, Field, FieldConfig, FieldTypeConfig, FindTagsResult, FloatHistogram, Folder, FolderSearchHit, FooterItem, ForbiddenError, Frame, FrameLabels, FrameMeta, Frames, FrameType, FrameTypeVersion, GetAccessControlStatusData, GetAccessControlStatusError, GetAccessControlStatusErrors, GetAccessControlStatusResponse, GetAccessControlStatusResponses, GetAccessTokenResponseDto, GetAnnotationByIdData, GetAnnotationByIdError, GetAnnotationByIdErrors, GetAnnotationByIdResponse, GetAnnotationByIdResponses, GetAnnotationsData, GetAnnotationsError, GetAnnotationsErrors, GetAnnotationsResponse, GetAnnotationsResponses, GetAnnotationTagsData, GetAnnotationTagsError, GetAnnotationTagsErrors, GetAnnotationTagsResponse, GetAnnotationTagsResponse2, GetAnnotationTagsResponses, GetCloudMigrationTokenData, GetCloudMigrationTokenError, GetCloudMigrationTokenErrors, GetCloudMigrationTokenResponse, GetCloudMigrationTokenResponses, GetCorrelationData, GetCorrelationError, GetCorrelationErrors, GetCorrelationResponse, GetCorrelationResponses, GetCorrelationsBySourceUidData, GetCorrelationsBySourceUidError, GetCorrelationsBySourceUidErrors, GetCorrelationsBySourceUidResponse, GetCorrelationsBySourceUidResponses, GetCorrelationsData, GetCorrelationsError, GetCorrelationsErrors, GetCorrelationsResponse, GetCorrelationsResponses, GetCurrentOrgData, GetCurrentOrgError, GetCurrentOrgErrors, GetCurrentOrgQuotaData, GetCurrentOrgQuotaError, GetCurrentOrgQuotaErrors, GetCurrentOrgQuotaResponse, GetCurrentOrgQuotaResponses, GetCurrentOrgResponse, GetCurrentOrgResponses, GetCustomPermissionsCsvData, GetCustomPermissionsCsvError, GetCustomPermissionsCsvErrors, GetCustomPermissionsReportData, GetCustomPermissionsReportError, GetCustomPermissionsReportErrors, GetDashboardByUidData, GetDashboardByUidError, GetDashboardByUidErrors, GetDashboardByUidResponse, GetDashboardByUidResponses, GetDashboardPermissionsListByUidData, GetDashboardPermissionsListByUidError, GetDashboardPermissionsListByUidErrors, GetDashboardPermissionsListByUidResponse, GetDashboardPermissionsListByUidResponses, GetDashboardSnapshotData, GetDashboardSnapshotError, GetDashboardSnapshotErrors, GetDashboardSnapshotResponses, GetDashboardTagsData, GetDashboardTagsError, GetDashboardTagsErrors, GetDashboardTagsResponse, GetDashboardTagsResponses, GetDashboardVersionByUidData, GetDashboardVersionByUidError, GetDashboardVersionByUidErrors, GetDashboardVersionByUidResponse, GetDashboardVersionByUidResponses, GetDashboardVersionsByUidData, GetDashboardVersionsByUidError, GetDashboardVersionsByUidErrors, GetDashboardVersionsByUidResponse, GetDashboardVersionsByUidResponses, GetDataSourceByNameData, GetDataSourceByNameError, GetDataSourceByNameErrors, GetDataSourceByNameResponse, GetDataSourceByNameResponses, GetDataSourceByUidData, GetDataSourceByUidError, GetDataSourceByUidErrors, GetDataSourceByUidResponse, GetDataSourceByUidResponses, GetDataSourceCacheConfigData, GetDataSourceCacheConfigError, GetDataSourceCacheConfigErrors, GetDataSourceCacheConfigResponse, GetDataSourceCacheConfigResponses, GetDataSourceIdByNameData, GetDataSourceIdByNameError, GetDataSourceIdByNameErrors, GetDataSourceIdByNameResponse, GetDataSourceIdByNameResponses, GetDataSourcesData, GetDataSourcesError, GetDataSourcesErrors, GetDataSourcesResponse, GetDataSourcesResponses, GetFolderByUidData, GetFolderByUidError, GetFolderByUidErrors, GetFolderByUidResponse, GetFolderByUidResponses, GetFolderDescendantCountsData, GetFolderDescendantCountsError, GetFolderDescendantCountsErrors, GetFolderDescendantCountsResponse, GetFolderDescendantCountsResponses, GetFolderPermissionListData, GetFolderPermissionListError, GetFolderPermissionListErrors, GetFolderPermissionListResponse, GetFolderPermissionListResponses, GetFoldersData, GetFoldersError, GetFoldersErrors, GetFoldersResponse, GetFoldersResponses, GetGroupRolesData, GetGroupRolesError, GetGroupRolesErrors, GetGroupRolesResponse, GetGroupRolesResponses, GetGroupsResponse, GetHealthData, GetHealthError, GetHealthErrors, GetHealthResponse, GetHealthResponses, GetHomeDashboardData, GetHomeDashboardError, GetHomeDashboardErrors, GetHomeDashboardResponse, GetHomeDashboardResponse2, GetHomeDashboardResponses, GetLdapStatusData, GetLdapStatusError, GetLdapStatusErrors, GetLdapStatusResponse, GetLdapStatusResponses, GetLibraryElementByNameData, GetLibraryElementByNameError, GetLibraryElementByNameErrors, GetLibraryElementByNameResponse, GetLibraryElementByNameResponses, GetLibraryElementByUidData, GetLibraryElementByUidError, GetLibraryElementByUidErrors, GetLibraryElementByUidResponse, GetLibraryElementByUidResponses, GetLibraryElementConnectionsData, GetLibraryElementConnectionsError, GetLibraryElementConnectionsErrors, GetLibraryElementConnectionsResponse, GetLibraryElementConnectionsResponses, GetLibraryElementsData, GetLibraryElementsError, GetLibraryElementsErrors, GetLibraryElementsResponse, GetLibraryElementsResponses, GetLicenseTokenData, GetLicenseTokenResponse, GetLicenseTokenResponses, GetMappedGroupsData, GetMappedGroupsError, GetMappedGroupsErrors, GetMappedGroupsResponse, GetMappedGroupsResponses, GetMetadataData, GetMetadataResponse, GetMetadataResponses, GetOrgByIdData, GetOrgByIdError, GetOrgByIdErrors, GetOrgByIdResponse, GetOrgByIdResponses, GetOrgByNameData, GetOrgByNameError, GetOrgByNameErrors, GetOrgByNameResponse, GetOrgByNameResponses, GetOrgPreferencesData, GetOrgPreferencesError, GetOrgPreferencesErrors, GetOrgPreferencesResponse, GetOrgPreferencesResponses, GetOrgQuotaData, GetOrgQuotaError, GetOrgQuotaErrors, GetOrgQuotaResponse, GetOrgQuotaResponses, GetOrgUsersData, GetOrgUsersError, GetOrgUsersErrors, GetOrgUsersForCurrentOrgData, GetOrgUsersForCurrentOrgError, GetOrgUsersForCurrentOrgErrors, GetOrgUsersForCurrentOrgLookupData, GetOrgUsersForCurrentOrgLookupError, GetOrgUsersForCurrentOrgLookupErrors, GetOrgUsersForCurrentOrgLookupResponse, GetOrgUsersForCurrentOrgLookupResponses, GetOrgUsersForCurrentOrgResponse, GetOrgUsersForCurrentOrgResponses, GetOrgUsersResponse, GetOrgUsersResponses, GetPendingOrgInvitesData, GetPendingOrgInvitesError, GetPendingOrgInvitesErrors, GetPendingOrgInvitesResponse, GetPendingOrgInvitesResponses, GetPlaylistData, GetPlaylistError, GetPlaylistErrors, GetPlaylistItemsData, GetPlaylistItemsError, GetPlaylistItemsErrors, GetPlaylistItemsResponse, GetPlaylistItemsResponses, GetPlaylistResponse, GetPlaylistResponses, GetProviderSettingsData, GetProviderSettingsError, GetProviderSettingsErrors, GetProviderSettingsResponse, GetProviderSettingsResponses, GetPublicAnnotationsData, GetPublicAnnotationsError, GetPublicAnnotationsErrors, GetPublicAnnotationsResponse, GetPublicAnnotationsResponses, GetPublicDashboardData, GetPublicDashboardError, GetPublicDashboardErrors, GetPublicDashboardResponse, GetPublicDashboardResponses, GetRecordingRuleWriteTargetData, GetRecordingRuleWriteTargetError, GetRecordingRuleWriteTargetErrors, GetRecordingRuleWriteTargetResponse, GetRecordingRuleWriteTargetResponses, GetReportData, GetReportError, GetReportErrors, GetReportResponse, GetReportResponses, GetReportsByDashboardUidData, GetReportsByDashboardUidError, GetReportsByDashboardUidErrors, GetReportsByDashboardUidResponse, GetReportsByDashboardUidResponses, GetReportsData, GetReportsError, GetReportsErrors, GetReportSettingsData, GetReportSettingsError, GetReportSettingsErrors, GetReportSettingsResponse, GetReportSettingsResponses, GetReportsResponse, GetReportsResponses, GetResourceDependenciesData, GetResourceDependenciesResponse, GetResourceDependenciesResponses, GetResourceDescriptionData, GetResourceDescriptionError, GetResourceDescriptionErrors, GetResourceDescriptionResponse, GetResourceDescriptionResponses, GetResourcePermissionsData, GetResourcePermissionsError, GetResourcePermissionsErrors, GetResourcePermissionsResponse, GetResourcePermissionsResponses, GetRoleAssignmentsData, GetRoleAssignmentsError, GetRoleAssignmentsErrors, GetRoleAssignmentsResponse, GetRoleAssignmentsResponses, GetRoleData, GetRoleError, GetRoleErrors, GetRoleResponse, GetRoleResponses, GetSamlLogoutData, GetSamlLogoutError, GetSamlLogoutErrors, GetSessionData, GetSessionError, GetSessionErrors, GetSessionListData, GetSessionListError, GetSessionListErrors, GetSessionListResponse, GetSessionListResponses, GetSessionResponse, GetSessionResponses, GetSettingsImageData, GetSettingsImageError, GetSettingsImageErrors, GetSettingsImageResponse, GetSettingsImageResponses, GetShapshotListData, GetShapshotListError, GetShapshotListErrors, GetShapshotListResponse, GetShapshotListResponses, GetSharingOptionsData, GetSharingOptionsError, GetSharingOptionsErrors, GetSharingOptionsResponse, GetSharingOptionsResponses, GetSignedInUserData, GetSignedInUserError, GetSignedInUserErrors, GetSignedInUserOrgListData, GetSignedInUserOrgListError, GetSignedInUserOrgListErrors, GetSignedInUserOrgListResponse, GetSignedInUserOrgListResponses, GetSignedInUserResponse, GetSignedInUserResponses, GetSignedInUserTeamListData, GetSignedInUserTeamListError, GetSignedInUserTeamListErrors, GetSignedInUserTeamListResponse, GetSignedInUserTeamListResponses, GetSloData, GetSloError, GetSloErrors, GetSnapshotData, GetSnapshotError, GetSnapshotErrors, GetSnapshotResponse, GetSnapshotResponseDto, GetSnapshotResponses, GetStatusData, GetStatusResponses, GetSyncStatusData, GetSyncStatusError, GetSyncStatusErrors, GetSyncStatusResponse, GetSyncStatusResponses, GettableAlert, GettableAlertmanagers, GettableAlerts, GettableApiAlertingConfig, GettableApiReceiver, GettableExtendedRuleNode, GettableGrafanaReceiver, GettableGrafanaReceivers, GettableGrafanaRule, GettableGrafanaSilence, GettableGrafanaSilences, GettableHistoricUserConfig, GettableNGalertConfig, GettableRuleGroupConfig, GettableRuleVersions, GettableSilence, GettableSilences, GettableStatus, GettableUserConfig, GetTeamByIdData, GetTeamByIdError, GetTeamByIdErrors, GetTeamByIdResponse, GetTeamByIdResponses, GetTeamGroupsApiData, GetTeamGroupsApiError, GetTeamGroupsApiErrors, GetTeamGroupsApiResponse, GetTeamGroupsApiResponses, GetTeamLbacRulesApiData, GetTeamLbacRulesApiError, GetTeamLbacRulesApiErrors, GetTeamLbacRulesApiResponse, GetTeamLbacRulesApiResponses, GetTeamMembersData, GetTeamMembersError, GetTeamMembersErrors, GetTeamMembersResponse, GetTeamMembersResponses, GetTeamPreferencesData, GetTeamPreferencesError, GetTeamPreferencesErrors, GetTeamPreferencesResponse, GetTeamPreferencesResponses, GetUserAuthTokensData, GetUserAuthTokensError, GetUserAuthTokensErrors, GetUserAuthTokensResponse, GetUserAuthTokensResponses, GetUserByIdData, GetUserByIdError, GetUserByIdErrors, GetUserByIdResponse, GetUserByIdResponses, GetUserByLoginOrEmailData, GetUserByLoginOrEmailError, GetUserByLoginOrEmailErrors, GetUserByLoginOrEmailResponse, GetUserByLoginOrEmailResponses, GetUserFromLdapData, GetUserFromLdapError, GetUserFromLdapErrors, GetUserFromLdapResponse, GetUserFromLdapResponses, GetUserOrgListData, GetUserOrgListError, GetUserOrgListErrors, GetUserOrgListResponse, GetUserOrgListResponses, GetUserPreferencesData, GetUserPreferencesError, GetUserPreferencesErrors, GetUserPreferencesResponse, GetUserPreferencesResponses, GetUserQuotaData, GetUserQuotaError, GetUserQuotaErrors, GetUserQuotaResponse, GetUserQuotaResponses, GetUserQuotasData, GetUserQuotasError, GetUserQuotasErrors, GetUserQuotasResponse, GetUserQuotasResponses, GetUserTeamsData, GetUserTeamsError, GetUserTeamsErrors, GetUserTeamsResponse, GetUserTeamsResponses, GlobalConfig, Group, GroupAttributes, Header, Headers, HealthResponse, Hit, HitList, HitType, HostPort, HttpClientConfig, ImportDashboardData, ImportDashboardError, ImportDashboardErrors, ImportDashboardInput, ImportDashboardRequest, ImportDashboardResponse, ImportDashboardResponse2, ImportDashboardResponses, InhibitRule, InspectType, IntegrationStatus, InternalDataLink, InterpolateDashboardData, InterpolateDashboardError, InterpolateDashboardErrors, InterpolateDashboardResponses, IpMask, IpNet, JiraConfig, Json, JsonWebKey, KeyUsage, Label, Labels, LabelSet, LibraryElementArrayResponse, LibraryElementConnectionDto, LibraryElementConnectionsResponse, LibraryElementDto, LibraryElementDtoMeta, LibraryElementDtoMetaUser, LibraryElementResponse, LibraryElementSearchResponse, LibraryElementSearchResult, LinkTransformationConfig, ListAllProvidersSettingsData, ListAllProvidersSettingsError, ListAllProvidersSettingsErrors, ListAllProvidersSettingsResponse, ListAllProvidersSettingsResponses, ListDevicesData, ListDevicesError, ListDevicesErrors, ListDevicesResponse, ListDevicesResponses, ListPublicDashboardsData, ListPublicDashboardsError, ListPublicDashboardsErrors, ListPublicDashboardsResponse, ListPublicDashboardsResponses, ListRecordingRulesData, ListRecordingRulesError, ListRecordingRulesErrors, ListRecordingRulesResponse, ListRecordingRulesResponses, ListRolesData, ListRolesError, ListRolesErrors, ListRolesResponse, ListRolesResponses, ListSortOptionsData, ListSortOptionsError, ListSortOptionsErrors, ListSortOptionsResponse, ListSortOptionsResponses, ListTeamRolesData, ListTeamRolesError, ListTeamRolesErrors, ListTeamRolesResponse, ListTeamRolesResponses, ListTeamsRolesData, ListTeamsRolesError, ListTeamsRolesErrors, ListTeamsRolesResponse, ListTeamsRolesResponses, ListTokensData, ListTokensError, ListTokensErrors, ListTokensResponse, ListTokensResponses, ListUserRolesData, ListUserRolesError, ListUserRolesErrors, ListUserRolesResponse, ListUserRolesResponses, ListUsersRolesData, ListUsersRolesError, ListUsersRolesErrors, ListUsersRolesResponse, ListUsersRolesResponses, ManagerKind, MassDeleteAnnotationsCmd, MassDeleteAnnotationsData, MassDeleteAnnotationsError, MassDeleteAnnotationsErrors, MassDeleteAnnotationsResponse, MassDeleteAnnotationsResponses, Matcher, Matcher2, Matchers, Matchers2, MatchRegexps, MatchType, MessageResponse, Metadata, MetricRequest, MigrateDataResponseDto, MigrateDataResponseItemDto, MigrateDataResponseListDto, MoveFolderCommand, MoveFolderData, MoveFolderError, MoveFolderErrors, MoveFolderResponse, MoveFolderResponses, MsTeamsConfig, MsTeamsV2Config, MultiStatus, MuteTimeInterval, MuteTimeIntervalExport, MuteTimings, Name, NamespaceConfigResponse, NavbarPreference, NewApiKeyResult, NotFound, Notice, NoticeSeverity, NotificationPolicyExport, NotificationTemplate, NotificationTemplateContent, NotificationTemplates, NotifierConfig, OAuth2, ObjectIdentifier, ObjectMatcher, ObjectMatchers, ObjectMatchersWritable, OpsGenieConfig, OpsGenieConfigResponder, OrgDetailsDto, OrgDto, OrgUserDto, PagerdutyConfig, PagerdutyImage, PagerdutyLink, Password, PatchAnnotationData, PatchAnnotationError, PatchAnnotationErrors, PatchAnnotationResponse, PatchAnnotationResponses, PatchAnnotationsCmd, PatchLibraryElementCommand, PatchOrgPreferencesData, PatchOrgPreferencesError, PatchOrgPreferencesErrors, PatchOrgPreferencesResponse, PatchOrgPreferencesResponses, PatchPrefsCmd, PatchProviderSettingsData, PatchProviderSettingsError, PatchProviderSettingsErrors, PatchProviderSettingsResponse, PatchProviderSettingsResponses, PatchQueryCommentData, PatchQueryCommentError, PatchQueryCommentErrors, PatchQueryCommentInQueryHistoryCommand, PatchQueryCommentResponse, PatchQueryCommentResponses, PatchUserPreferencesData, PatchUserPreferencesError, PatchUserPreferencesErrors, PatchUserPreferencesResponse, PatchUserPreferencesResponses, PeerStatus, Permission, PermissionDenied, PermissionType, Playlist, PlaylistDashboard, PlaylistDashboardsSlice, PlaylistDto, PlaylistItem, PlaylistItemDto, Playlists, PolicyMapping, PostableAlert, PostableAlerts, PostableApiAlertingConfig, PostableApiReceiver, PostableExtendedRuleNode, PostableExtendedRuleNodeExtended, PostableGrafanaReceiver, PostableGrafanaReceivers, PostableGrafanaRule, PostableNGalertConfig, PostableRuleGroupConfig, PostableSilence, PostableUserConfig, PostAcsData, PostAcsError, PostAcsErrors, PostAnnotationData, PostAnnotationError, PostAnnotationErrors, PostAnnotationResponse, PostAnnotationResponses, PostAnnotationsCmd, PostDashboardData, PostDashboardError, PostDashboardErrors, PostDashboardResponse, PostDashboardResponses, PostGraphiteAnnotationData, PostGraphiteAnnotationError, PostGraphiteAnnotationErrors, PostGraphiteAnnotationResponse, PostGraphiteAnnotationResponses, PostGraphiteAnnotationsCmd, PostLicenseTokenData, PostLicenseTokenError, PostLicenseTokenErrors, PostLicenseTokenResponse, PostLicenseTokenResponses, PostRenewLicenseTokenData, PostRenewLicenseTokenError, PostRenewLicenseTokenErrors, PostRenewLicenseTokenResponses, PostSilencesOkBody, PostSloData, PostSloError, PostSloErrors, PostSyncUserWithLdapData, PostSyncUserWithLdapError, PostSyncUserWithLdapErrors, PostSyncUserWithLdapResponse, PostSyncUserWithLdapResponses, PreferencesNavbarPreference, PreferencesQueryHistoryPreference, PreferencesSpec, PrometheusNamespace, PrometheusRemoteWriteTargetJson, PrometheusRule, PrometheusRuleGroup, Provenance, ProvisionedAlertRule, ProvisionedAlertRules, ProvisionedAlertRulesWritable, ProvisionedAlertRuleWritable, ProxyConfig, ProxyHeader, ProxyHeaderWritable, PublicDashboard, PublicDashboardDto, PublicDashboardListResponse, PublicDashboardListResponseWithPagination, PublicError, PublicError2, PublicKeyAlgorithm, PushoverConfig, QueryDataResponse, QueryHistoryDeleteQueryResponse, QueryHistoryDto, QueryHistoryPreference, QueryHistoryResponse, QueryHistorySearchResponse, QueryHistorySearchResult, QueryMetricsWithExpressionsData, QueryMetricsWithExpressionsError, QueryMetricsWithExpressionsErrors, QueryMetricsWithExpressionsResponse, QueryMetricsWithExpressionsResponses, QueryPublicDashboardData, QueryPublicDashboardError, QueryPublicDashboardErrors, QueryPublicDashboardResponse, QueryPublicDashboardResponses, QueryStat, QuotaDto, RawMessage, Receiver, Receiver2, ReceiverExport, ReceiverStatus, Record, RecordingRuleJson, RefreshLicenseStatsData, RefreshLicenseStatsError, RefreshLicenseStatsErrors, RefreshLicenseStatsResponse, RefreshLicenseStatsResponses, RelativeTimeRange, RelativeTimeRangeExport, ReloadLdapCfgData, ReloadLdapCfgError, ReloadLdapCfgErrors, RemoteWriteConfig, RemoveOrgUserData, RemoveOrgUserError, RemoveOrgUserErrors, RemoveOrgUserForCurrentOrgData, RemoveOrgUserForCurrentOrgError, RemoveOrgUserForCurrentOrgErrors, RemoveOrgUserForCurrentOrgResponse, RemoveOrgUserForCurrentOrgResponses, RemoveOrgUserResponse, RemoveOrgUserResponses, RemoveProviderSettingsData, RemoveProviderSettingsError, RemoveProviderSettingsErrors, RemoveProviderSettingsResponse, RemoveProviderSettingsResponses, RemoveTeamGroupApiQueryData, RemoveTeamGroupApiQueryError, RemoveTeamGroupApiQueryErrors, RemoveTeamGroupApiQueryResponse, RemoveTeamGroupApiQueryResponses, RemoveTeamMemberData, RemoveTeamMemberError, RemoveTeamMemberErrors, RemoveTeamMemberResponse, RemoveTeamMemberResponses, RemoveTeamRoleData, RemoveTeamRoleError, RemoveTeamRoleErrors, RemoveTeamRoleResponse, RemoveTeamRoleResponses, RemoveUserRoleData, RemoveUserRoleError, RemoveUserRoleErrors, RemoveUserRoleResponse, RemoveUserRoleResponses, RenderReportCsvsData, RenderReportCsvsError, RenderReportCsvsErrors, RenderReportCsvsResponse, RenderReportCsvsResponses, RenderReportPdfsData, RenderReportPdfsError, RenderReportPdfsErrors, RenderReportPdfsResponse, RenderReportPdfsResponses, Report, ReportBrandingOptions, ReportDashboard, ReportDashboardId, ReportEmail, ReportOptions, ReportSchedule, ReportSettings, ReportTimeRange, ReportUrlItem, ResourceDependenciesResponseDto, ResourceDependencyDto, ResourcePermissionDto, ResponseDetails, Responses, RestoreDashboardVersionByUidData, RestoreDashboardVersionByUidError, RestoreDashboardVersionByUidErrors, RestoreDashboardVersionByUidResponse, RestoreDashboardVersionByUidResponses, RestoreDashboardVersionCommand, RestoreDeletedDashboardCommand, RetrieveJwksData, RetrieveJwksError, RetrieveJwksErrors, RetrieveJwksResponse, RetrieveJwksResponses, RetrieveServiceAccountData, RetrieveServiceAccountError, RetrieveServiceAccountErrors, RetrieveServiceAccountResponse, RetrieveServiceAccountResponses, RevokeAuthTokenCmd, RevokeInviteData, RevokeInviteError, RevokeInviteErrors, RevokeInviteResponse, RevokeInviteResponses, RevokeUserAuthTokenData, RevokeUserAuthTokenError, RevokeUserAuthTokenErrors, RevokeUserAuthTokenResponse, RevokeUserAuthTokenResponses, RoleAssignmentsDto, RoleDto, RolesSearchQuery, Route, RouteConvertPrometheusCortexDeleteNamespaceData, RouteConvertPrometheusCortexDeleteNamespaceError, RouteConvertPrometheusCortexDeleteNamespaceErrors, RouteConvertPrometheusCortexDeleteNamespaceResponse, RouteConvertPrometheusCortexDeleteNamespaceResponses, RouteConvertPrometheusCortexDeleteRuleGroupData, RouteConvertPrometheusCortexDeleteRuleGroupError, RouteConvertPrometheusCortexDeleteRuleGroupErrors, RouteConvertPrometheusCortexDeleteRuleGroupResponse, RouteConvertPrometheusCortexDeleteRuleGroupResponses, RouteConvertPrometheusCortexGetNamespaceData, RouteConvertPrometheusCortexGetNamespaceError, RouteConvertPrometheusCortexGetNamespaceErrors, RouteConvertPrometheusCortexGetNamespaceResponse, RouteConvertPrometheusCortexGetNamespaceResponses, RouteConvertPrometheusCortexGetRuleGroupData, RouteConvertPrometheusCortexGetRuleGroupError, RouteConvertPrometheusCortexGetRuleGroupErrors, RouteConvertPrometheusCortexGetRuleGroupResponse, RouteConvertPrometheusCortexGetRuleGroupResponses, RouteConvertPrometheusCortexGetRulesData, RouteConvertPrometheusCortexGetRulesError, RouteConvertPrometheusCortexGetRulesErrors, RouteConvertPrometheusCortexGetRulesResponse, RouteConvertPrometheusCortexGetRulesResponses, RouteConvertPrometheusCortexPostRuleGroupData, RouteConvertPrometheusCortexPostRuleGroupError, RouteConvertPrometheusCortexPostRuleGroupErrors, RouteConvertPrometheusCortexPostRuleGroupResponse, RouteConvertPrometheusCortexPostRuleGroupResponses, RouteConvertPrometheusCortexPostRuleGroupsData, RouteConvertPrometheusCortexPostRuleGroupsError, RouteConvertPrometheusCortexPostRuleGroupsErrors, RouteConvertPrometheusCortexPostRuleGroupsResponse, RouteConvertPrometheusCortexPostRuleGroupsResponses, RouteConvertPrometheusDeleteNamespaceData, RouteConvertPrometheusDeleteNamespaceError, RouteConvertPrometheusDeleteNamespaceErrors, RouteConvertPrometheusDeleteNamespaceResponse, RouteConvertPrometheusDeleteNamespaceResponses, RouteConvertPrometheusDeleteRuleGroupData, RouteConvertPrometheusDeleteRuleGroupError, RouteConvertPrometheusDeleteRuleGroupErrors, RouteConvertPrometheusDeleteRuleGroupResponse, RouteConvertPrometheusDeleteRuleGroupResponses, RouteConvertPrometheusGetNamespaceData, RouteConvertPrometheusGetNamespaceError, RouteConvertPrometheusGetNamespaceErrors, RouteConvertPrometheusGetNamespaceResponse, RouteConvertPrometheusGetNamespaceResponses, RouteConvertPrometheusGetRuleGroupData, RouteConvertPrometheusGetRuleGroupError, RouteConvertPrometheusGetRuleGroupErrors, RouteConvertPrometheusGetRuleGroupResponse, RouteConvertPrometheusGetRuleGroupResponses, RouteConvertPrometheusGetRulesData, RouteConvertPrometheusGetRulesError, RouteConvertPrometheusGetRulesErrors, RouteConvertPrometheusGetRulesResponse, RouteConvertPrometheusGetRulesResponses, RouteConvertPrometheusPostRuleGroupData, RouteConvertPrometheusPostRuleGroupError, RouteConvertPrometheusPostRuleGroupErrors, RouteConvertPrometheusPostRuleGroupResponse, RouteConvertPrometheusPostRuleGroupResponses, RouteConvertPrometheusPostRuleGroupsData, RouteConvertPrometheusPostRuleGroupsError, RouteConvertPrometheusPostRuleGroupsErrors, RouteConvertPrometheusPostRuleGroupsResponse, RouteConvertPrometheusPostRuleGroupsResponses, RouteDeleteAlertRuleData, RouteDeleteAlertRuleError, RouteDeleteAlertRuleErrors, RouteDeleteAlertRuleGroupData, RouteDeleteAlertRuleGroupError, RouteDeleteAlertRuleGroupErrors, RouteDeleteAlertRuleGroupResponses, RouteDeleteAlertRuleResponses, RouteDeleteContactpointsData, RouteDeleteContactpointsError, RouteDeleteContactpointsErrors, RouteDeleteContactpointsResponses, RouteDeleteMuteTimingData, RouteDeleteMuteTimingError, RouteDeleteMuteTimingErrors, RouteDeleteMuteTimingResponses, RouteDeleteTemplateData, RouteDeleteTemplateError, RouteDeleteTemplateErrors, RouteDeleteTemplateResponses, RouteExport, RouteExportMuteTimingData, RouteExportMuteTimingError, RouteExportMuteTimingErrors, RouteExportMuteTimingResponse, RouteExportMuteTimingResponses, RouteExportMuteTimingsData, RouteExportMuteTimingsError, RouteExportMuteTimingsErrors, RouteExportMuteTimingsResponse, RouteExportMuteTimingsResponses, RouteGetAlertRuleData, RouteGetAlertRuleError, RouteGetAlertRuleErrors, RouteGetAlertRuleExportData, RouteGetAlertRuleExportError, RouteGetAlertRuleExportErrors, RouteGetAlertRuleExportResponse, RouteGetAlertRuleExportResponses, RouteGetAlertRuleGroupData, RouteGetAlertRuleGroupError, RouteGetAlertRuleGroupErrors, RouteGetAlertRuleGroupExportData, RouteGetAlertRuleGroupExportError, RouteGetAlertRuleGroupExportErrors, RouteGetAlertRuleGroupExportResponse, RouteGetAlertRuleGroupExportResponses, RouteGetAlertRuleGroupResponse, RouteGetAlertRuleGroupResponses, RouteGetAlertRuleResponse, RouteGetAlertRuleResponses, RouteGetAlertRulesData, RouteGetAlertRulesError, RouteGetAlertRulesErrors, RouteGetAlertRulesExportData, RouteGetAlertRulesExportError, RouteGetAlertRulesExportErrors, RouteGetAlertRulesExportResponse, RouteGetAlertRulesExportResponses, RouteGetAlertRulesResponse, RouteGetAlertRulesResponses, RouteGetContactpointsData, RouteGetContactpointsError, RouteGetContactpointsErrors, RouteGetContactpointsExportData, RouteGetContactpointsExportError, RouteGetContactpointsExportErrors, RouteGetContactpointsExportResponse, RouteGetContactpointsExportResponses, RouteGetContactpointsResponse, RouteGetContactpointsResponses, RouteGetMuteTimingData, RouteGetMuteTimingError, RouteGetMuteTimingErrors, RouteGetMuteTimingResponse, RouteGetMuteTimingResponses, RouteGetMuteTimingsData, RouteGetMuteTimingsError, RouteGetMuteTimingsErrors, RouteGetMuteTimingsResponse, RouteGetMuteTimingsResponses, RouteGetPolicyTreeData, RouteGetPolicyTreeError, RouteGetPolicyTreeErrors, RouteGetPolicyTreeExportData, RouteGetPolicyTreeExportError, RouteGetPolicyTreeExportErrors, RouteGetPolicyTreeExportResponse, RouteGetPolicyTreeExportResponses, RouteGetPolicyTreeResponse, RouteGetPolicyTreeResponses, RouteGetTemplateData, RouteGetTemplateError, RouteGetTemplateErrors, RouteGetTemplateResponse, RouteGetTemplateResponses, RouteGetTemplatesData, RouteGetTemplatesError, RouteGetTemplatesErrors, RouteGetTemplatesResponse, RouteGetTemplatesResponses, RoutePostAlertRuleData, RoutePostAlertRuleError, RoutePostAlertRuleErrors, RoutePostAlertRuleResponse, RoutePostAlertRuleResponses, RoutePostContactpointsData, RoutePostContactpointsError, RoutePostContactpointsErrors, RoutePostContactpointsResponse, RoutePostContactpointsResponses, RoutePostMuteTimingData, RoutePostMuteTimingError, RoutePostMuteTimingErrors, RoutePostMuteTimingResponse, RoutePostMuteTimingResponses, RoutePutAlertRuleData, RoutePutAlertRuleError, RoutePutAlertRuleErrors, RoutePutAlertRuleGroupData, RoutePutAlertRuleGroupError, RoutePutAlertRuleGroupErrors, RoutePutAlertRuleGroupResponse, RoutePutAlertRuleGroupResponses, RoutePutAlertRuleResponse, RoutePutAlertRuleResponses, RoutePutContactpointData, RoutePutContactpointError, RoutePutContactpointErrors, RoutePutContactpointResponse, RoutePutContactpointResponses, RoutePutMuteTimingData, RoutePutMuteTimingError, RoutePutMuteTimingErrors, RoutePutMuteTimingResponse, RoutePutMuteTimingResponses, RoutePutPolicyTreeData, RoutePutPolicyTreeError, RoutePutPolicyTreeErrors, RoutePutPolicyTreeResponse, RoutePutPolicyTreeResponses, RoutePutTemplateData, RoutePutTemplateError, RoutePutTemplateErrors, RoutePutTemplateResponse, RoutePutTemplateResponses, RouteResetPolicyTreeData, RouteResetPolicyTreeError, RouteResetPolicyTreeErrors, RouteResetPolicyTreeResponse, RouteResetPolicyTreeResponses, Rule, RuleDiscovery, RuleGroup, RuleGroupConfigResponse, RuleResponse, Sample, SaveDashboardCommand, SaveReportSettingsData, SaveReportSettingsError, SaveReportSettingsErrors, SaveReportSettingsResponse, SaveReportSettingsResponses, SearchDashboardSnapshotsData, SearchDashboardSnapshotsError, SearchDashboardSnapshotsErrors, SearchDashboardSnapshotsResponse, SearchDashboardSnapshotsResponses, SearchData, SearchDeviceQueryResult, SearchDevicesData, SearchDevicesError, SearchDevicesErrors, SearchDevicesResponse, SearchDevicesResponses, SearchError, SearchErrors, SearchOrgsData, SearchOrgsError, SearchOrgsErrors, SearchOrgServiceAccountsResult, SearchOrgServiceAccountsWithPagingData, SearchOrgServiceAccountsWithPagingError, SearchOrgServiceAccountsWithPagingErrors, SearchOrgServiceAccountsWithPagingResponse, SearchOrgServiceAccountsWithPagingResponses, SearchOrgsResponse, SearchOrgsResponses, SearchOrgUsersData, SearchOrgUsersError, SearchOrgUsersErrors, SearchOrgUsersQueryResult, SearchOrgUsersResponse, SearchOrgUsersResponses, SearchPlaylistsData, SearchPlaylistsError, SearchPlaylistsErrors, SearchPlaylistsResponse, SearchPlaylistsResponses, SearchQueriesData, SearchQueriesError, SearchQueriesErrors, SearchQueriesResponse, SearchQueriesResponses, SearchResponse, SearchResponses, SearchTeamGroupsData, SearchTeamGroupsError, SearchTeamGroupsErrors, SearchTeamGroupsQueryResult, SearchTeamGroupsResponse, SearchTeamGroupsResponses, SearchTeamQueryResult, SearchTeamsData, SearchTeamsError, SearchTeamsErrors, SearchTeamsResponse, SearchTeamsResponses, SearchUserQueryResult, SearchUsersData, SearchUsersError, SearchUsersErrors, SearchUsersResponse, SearchUsersResponses, SearchUsersWithPagingData, SearchUsersWithPagingError, SearchUsersWithPagingErrors, SearchUsersWithPagingResponse, SearchUsersWithPagingResponses, Secret, SecretUrl, SecretUrlWritable, SendReportData, SendReportError, SendReportErrors, SendReportResponse, SendReportResponses, SendTestEmailData, SendTestEmailError, SendTestEmailErrors, SendTestEmailResponse, SendTestEmailResponses, ServiceAccountDto, ServiceAccountProfileDto, SetDataSourceCacheConfigData, SetDataSourceCacheConfigError, SetDataSourceCacheConfigErrors, SetDataSourceCacheConfigResponse, SetDataSourceCacheConfigResponses, SetHelpFlagData, SetHelpFlagError, SetHelpFlagErrors, SetHelpFlagResponse, SetHelpFlagResponses, SetPermissionCommand, SetPermissionsCommand, SetResourcePermissionCommand, SetResourcePermissionsData, SetResourcePermissionsError, SetResourcePermissionsErrors, SetResourcePermissionsForBuiltInRoleData, SetResourcePermissionsForBuiltInRoleError, SetResourcePermissionsForBuiltInRoleErrors, SetResourcePermissionsForBuiltInRoleResponse, SetResourcePermissionsForBuiltInRoleResponses, SetResourcePermissionsForTeamData, SetResourcePermissionsForTeamError, SetResourcePermissionsForTeamErrors, SetResourcePermissionsForTeamResponse, SetResourcePermissionsForTeamResponses, SetResourcePermissionsForUserData, SetResourcePermissionsForUserError, SetResourcePermissionsForUserErrors, SetResourcePermissionsForUserResponse, SetResourcePermissionsForUserResponses, SetResourcePermissionsResponse, SetResourcePermissionsResponses, SetRoleAssignmentsCommand, SetRoleAssignmentsData, SetRoleAssignmentsError, SetRoleAssignmentsErrors, SetRoleAssignmentsResponse, SetRoleAssignmentsResponses, SetTeamMembershipsCommand, SetTeamMembershipsData, SetTeamMembershipsError, SetTeamMembershipsErrors, SetTeamMembershipsResponse, SetTeamMembershipsResponses, SetTeamRolesCommand, SetTeamRolesData, SetTeamRolesError, SetTeamRolesErrors, SetTeamRolesResponse, SetTeamRolesResponses, SettingsBag, SetUserRolesCommand, SetUserRolesData, SetUserRolesError, SetUserRolesErrors, SetUserRolesResponse, SetUserRolesResponses, ShareType, SignatureAlgorithm, SigV4Config, Silence, SilenceMetadata, SilenceStatus, SlackAction, SlackConfig, SlackConfirmationField, SlackField, SmtpNotEnabled, SnapshotDto, SnapshotListResponseDto, SnapshotResourceStats, SnsConfig, Source, Span, StarDashboardByUidData, StarDashboardByUidError, StarDashboardByUidErrors, StarDashboardByUidResponse, StarDashboardByUidResponses, StarQueryData, StarQueryError, StarQueryErrors, StarQueryResponse, StarQueryResponses, State, Status, Success, SuccessResponseBody, SupportedTransformationTypes, SyncResult, TagsDto, TeamDto, TeamGroupDto, TeamGroupMapping, TeamLbacRule, TeamLbacRules, TeamMemberDto, TelegramConfig, TempUserDto, TempUserStatus, TestCreateRecordingRuleData, TestCreateRecordingRuleError, TestCreateRecordingRuleErrors, TestCreateRecordingRuleResponse, TestCreateRecordingRuleResponses, TestRulePayload, TestRuleResponse, TestTemplatesConfigBodyParams, TestTemplatesErrorResult, TestTemplatesResult, TestTemplatesResults, Threshold, ThresholdsConfig, ThresholdsMode, TimeInterval, TimeIntervalItem, TimeIntervalTimeRange, TimeRange, TlsConfig, TlsVersion, Token, TokenDto, TokenStatus, Transformation, Transformations, Type, TypeMeta, UnstarDashboardByUidData, UnstarDashboardByUidError, UnstarDashboardByUidErrors, UnstarDashboardByUidResponse, UnstarDashboardByUidResponses, UnstarQueryData, UnstarQueryError, UnstarQueryErrors, UnstarQueryResponse, UnstarQueryResponses, Unstructured, UpdateAnnotationData, UpdateAnnotationError, UpdateAnnotationErrors, UpdateAnnotationResponse, UpdateAnnotationResponses, UpdateAnnotationsCmd, UpdateCorrelationCommand, UpdateCorrelationData, UpdateCorrelationError, UpdateCorrelationErrors, UpdateCorrelationResponse, UpdateCorrelationResponseBody, UpdateCorrelationResponses, UpdateCurrentOrgAddressData, UpdateCurrentOrgAddressError, UpdateCurrentOrgAddressErrors, UpdateCurrentOrgAddressResponse, UpdateCurrentOrgAddressResponses, UpdateCurrentOrgData, UpdateCurrentOrgError, UpdateCurrentOrgErrors, UpdateCurrentOrgResponse, UpdateCurrentOrgResponses, UpdateDashboardAclCommand, UpdateDashboardPermissionsByUidData, UpdateDashboardPermissionsByUidError, UpdateDashboardPermissionsByUidErrors, UpdateDashboardPermissionsByUidResponse, UpdateDashboardPermissionsByUidResponses, UpdateDataSourceByUidData, UpdateDataSourceByUidError, UpdateDataSourceByUidErrors, UpdateDataSourceByUidResponse, UpdateDataSourceByUidResponses, UpdateDataSourceCommand, UpdateFolderCommand, UpdateFolderData, UpdateFolderError, UpdateFolderErrors, UpdateFolderPermissionsData, UpdateFolderPermissionsError, UpdateFolderPermissionsErrors, UpdateFolderPermissionsResponse, UpdateFolderPermissionsResponses, UpdateFolderResponse, UpdateFolderResponses, UpdateGroupMappingsData, UpdateGroupMappingsError, UpdateGroupMappingsErrors, UpdateGroupMappingsResponse, UpdateGroupMappingsResponses, UpdateLibraryElementData, UpdateLibraryElementError, UpdateLibraryElementErrors, UpdateLibraryElementResponse, UpdateLibraryElementResponses, UpdateNamespaceRulesRequest, UpdateNamespaceRulesResponse, UpdateOrgAddressData, UpdateOrgAddressError, UpdateOrgAddressErrors, UpdateOrgAddressForm, UpdateOrgAddressResponse, UpdateOrgAddressResponses, UpdateOrgData, UpdateOrgError, UpdateOrgErrors, UpdateOrgForm, UpdateOrgPreferencesData, UpdateOrgPreferencesError, UpdateOrgPreferencesErrors, UpdateOrgPreferencesResponse, UpdateOrgPreferencesResponses, UpdateOrgQuotaData, UpdateOrgQuotaError, UpdateOrgQuotaErrors, UpdateOrgQuotaResponse, UpdateOrgQuotaResponses, UpdateOrgResponse, UpdateOrgResponses, UpdateOrgUserCommand, UpdateOrgUserData, UpdateOrgUserError, UpdateOrgUserErrors, UpdateOrgUserForCurrentOrgData, UpdateOrgUserForCurrentOrgError, UpdateOrgUserForCurrentOrgErrors, UpdateOrgUserForCurrentOrgResponse, UpdateOrgUserForCurrentOrgResponses, UpdateOrgUserResponse, UpdateOrgUserResponses, UpdatePlaylistCommand, UpdatePlaylistData, UpdatePlaylistError, UpdatePlaylistErrors, UpdatePlaylistResponse, UpdatePlaylistResponses, UpdatePrefsCmd, UpdateProviderSettingsData, UpdateProviderSettingsError, UpdateProviderSettingsErrors, UpdateProviderSettingsResponse, UpdateProviderSettingsResponses, UpdatePublicDashboardData, UpdatePublicDashboardError, UpdatePublicDashboardErrors, UpdatePublicDashboardResponse, UpdatePublicDashboardResponses, UpdateQuotaCmd, UpdateRecordingRuleData, UpdateRecordingRuleError, UpdateRecordingRuleErrors, UpdateRecordingRuleResponse, UpdateRecordingRuleResponses, UpdateReportData, UpdateReportError, UpdateReportErrors, UpdateReportResponse, UpdateReportResponses, UpdateRoleCommand, UpdateRoleData, UpdateRoleError, UpdateRoleErrors, UpdateRoleResponse, UpdateRoleResponses, UpdateRuleGroupResponse, UpdateServiceAccountData, UpdateServiceAccountError, UpdateServiceAccountErrors, UpdateServiceAccountForm, UpdateServiceAccountResponse, UpdateServiceAccountResponses, UpdateSignedInUserData, UpdateSignedInUserError, UpdateSignedInUserErrors, UpdateSignedInUserResponse, UpdateSignedInUserResponses, UpdateTeamCommand, UpdateTeamData, UpdateTeamError, UpdateTeamErrors, UpdateTeamLbacCommand, UpdateTeamLbacRulesApiData, UpdateTeamLbacRulesApiError, UpdateTeamLbacRulesApiErrors, UpdateTeamLbacRulesApiResponse, UpdateTeamLbacRulesApiResponses, UpdateTeamMemberCommand, UpdateTeamMemberData, UpdateTeamMemberError, UpdateTeamMemberErrors, UpdateTeamMemberResponse, UpdateTeamMemberResponses, UpdateTeamPreferencesData, UpdateTeamPreferencesError, UpdateTeamPreferencesErrors, UpdateTeamPreferencesResponse, UpdateTeamPreferencesResponses, UpdateTeamResponse, UpdateTeamResponses, UpdateUserCommand, UpdateUserData, UpdateUserEmailData, UpdateUserError, UpdateUserErrors, UpdateUserPreferencesData, UpdateUserPreferencesError, UpdateUserPreferencesErrors, UpdateUserPreferencesResponse, UpdateUserPreferencesResponses, UpdateUserQuotaData, UpdateUserQuotaError, UpdateUserQuotaErrors, UpdateUserQuotaResponse, UpdateUserQuotaResponses, UpdateUserResponse, UpdateUserResponses, UploadSnapshotData, UploadSnapshotError, UploadSnapshotErrors, UploadSnapshotResponses, Url, Userinfo, UserInfo, UserLookupDto, UserOrgDto, UserProfileDto, UserSearchHitDto, UserSetUsingOrgData, UserSetUsingOrgError, UserSetUsingOrgErrors, UserSetUsingOrgResponse, UserSetUsingOrgResponses, UserToken, ValidationError, ValueMapping, ValueMappings, ValueMappingsWritable, Vector, VersionInfo, VictorOpsConfig, ViewPublicDashboardData, ViewPublicDashboardError, ViewPublicDashboardErrors, ViewPublicDashboardResponse, ViewPublicDashboardResponses, VisType, WebexConfig, WebhookConfig, WechatConfig } from './types.gen'; diff --git a/integrations/grafana/src/gen/grafana-legacy-client/sdk.gen.ts b/integrations/grafana/src/gen/grafana-legacy-client/sdk.gen.ts deleted file mode 100644 index 107bee72b61..00000000000 --- a/integrations/grafana/src/gen/grafana-legacy-client/sdk.gen.ts +++ /dev/null @@ -1,3962 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import type { Client, Options as Options2, TDataShape } from './client'; -import { client } from './client.gen'; -import type { AddDataSourceData, AddDataSourceErrors, AddDataSourceResponses, AddOrgInviteData, AddOrgInviteErrors, AddOrgInviteResponses, AddOrgUserData, AddOrgUserErrors, AddOrgUserResponses, AddOrgUserToCurrentOrgData, AddOrgUserToCurrentOrgErrors, AddOrgUserToCurrentOrgResponses, AddTeamGroupApiData, AddTeamGroupApiErrors, AddTeamGroupApiResponses, AddTeamMemberData, AddTeamMemberErrors, AddTeamMemberResponses, AddTeamRoleData, AddTeamRoleErrors, AddTeamRoleResponses, AddUserRoleData, AddUserRoleErrors, AddUserRoleResponses, AdminCreateUserData, AdminCreateUserErrors, AdminCreateUserResponses, AdminDeleteUserData, AdminDeleteUserErrors, AdminDeleteUserResponses, AdminDisableUserData, AdminDisableUserErrors, AdminDisableUserResponses, AdminEnableUserData, AdminEnableUserErrors, AdminEnableUserResponses, AdminGetSettingsData, AdminGetSettingsErrors, AdminGetSettingsResponses, AdminGetStatsData, AdminGetStatsErrors, AdminGetStatsResponses, AdminGetUserAuthTokensData, AdminGetUserAuthTokensErrors, AdminGetUserAuthTokensResponses, AdminLogoutUserData, AdminLogoutUserErrors, AdminLogoutUserResponses, AdminProvisioningReloadAccessControlData, AdminProvisioningReloadAccessControlErrors, AdminProvisioningReloadAccessControlResponses, AdminProvisioningReloadDashboardsData, AdminProvisioningReloadDashboardsErrors, AdminProvisioningReloadDashboardsResponses, AdminProvisioningReloadDatasourcesData, AdminProvisioningReloadDatasourcesErrors, AdminProvisioningReloadDatasourcesResponses, AdminProvisioningReloadPluginsData, AdminProvisioningReloadPluginsErrors, AdminProvisioningReloadPluginsResponses, AdminRevokeUserAuthTokenData, AdminRevokeUserAuthTokenErrors, AdminRevokeUserAuthTokenResponses, AdminUpdateUserPasswordData, AdminUpdateUserPasswordErrors, AdminUpdateUserPasswordResponses, AdminUpdateUserPermissionsData, AdminUpdateUserPermissionsErrors, AdminUpdateUserPermissionsResponses, CallDatasourceResourceWithUidData, CallDatasourceResourceWithUidErrors, CallDatasourceResourceWithUidResponses, CancelSnapshotData, CancelSnapshotErrors, CancelSnapshotResponses, ChangeUserPasswordData, ChangeUserPasswordErrors, ChangeUserPasswordResponses, CheckDatasourceHealthWithUidData, CheckDatasourceHealthWithUidErrors, CheckDatasourceHealthWithUidResponses, CleanDataSourceCacheData, CleanDataSourceCacheErrors, CleanDataSourceCacheResponses, ClearHelpFlagsData, ClearHelpFlagsErrors, ClearHelpFlagsResponses, CreateCloudMigrationTokenData, CreateCloudMigrationTokenErrors, CreateCloudMigrationTokenResponses, CreateCorrelationData, CreateCorrelationErrors, CreateCorrelationResponses, CreateDashboardSnapshotData, CreateDashboardSnapshotErrors, CreateDashboardSnapshotResponses, CreateFolderData, CreateFolderErrors, CreateFolderResponses, CreateGroupMappingsData, CreateGroupMappingsErrors, CreateGroupMappingsResponses, CreateLibraryElementData, CreateLibraryElementErrors, CreateLibraryElementResponses, CreateOrgData, CreateOrgErrors, CreateOrgResponses, CreatePlaylistData, CreatePlaylistErrors, CreatePlaylistResponses, CreatePublicDashboardData, CreatePublicDashboardErrors, CreatePublicDashboardResponses, CreateQueryData, CreateQueryErrors, CreateQueryResponses, CreateRecordingRuleData, CreateRecordingRuleErrors, CreateRecordingRuleResponses, CreateRecordingRuleWriteTargetData, CreateRecordingRuleWriteTargetErrors, CreateRecordingRuleWriteTargetResponses, CreateReportData, CreateReportErrors, CreateReportResponses, CreateRoleData, CreateRoleErrors, CreateRoleResponses, CreateServiceAccountData, CreateServiceAccountErrors, CreateServiceAccountResponses, CreateSessionData, CreateSessionErrors, CreateSessionResponses, CreateSnapshotData, CreateSnapshotErrors, CreateSnapshotResponses, CreateTeamData, CreateTeamErrors, CreateTeamResponses, CreateTokenData, CreateTokenErrors, CreateTokenResponses, DatasourceProxyDeleteByUiDcallsData, DatasourceProxyDeleteByUiDcallsErrors, DatasourceProxyDeleteByUiDcallsResponses, DatasourceProxyGetByUiDcallsData, DatasourceProxyGetByUiDcallsErrors, DatasourceProxyGetByUiDcallsResponses, DatasourceProxyPostByUiDcallsData, DatasourceProxyPostByUiDcallsErrors, DatasourceProxyPostByUiDcallsResponses, DeleteAnnotationByIdData, DeleteAnnotationByIdErrors, DeleteAnnotationByIdResponses, DeleteCloudMigrationTokenData, DeleteCloudMigrationTokenErrors, DeleteCloudMigrationTokenResponses, DeleteCorrelationData, DeleteCorrelationErrors, DeleteCorrelationResponses, DeleteDashboardByUidData, DeleteDashboardByUidErrors, DeleteDashboardByUidResponses, DeleteDashboardSnapshotByDeleteKeyData, DeleteDashboardSnapshotByDeleteKeyErrors, DeleteDashboardSnapshotByDeleteKeyResponses, DeleteDashboardSnapshotData, DeleteDashboardSnapshotErrors, DeleteDashboardSnapshotResponses, DeleteDataSourceByNameData, DeleteDataSourceByNameErrors, DeleteDataSourceByNameResponses, DeleteDataSourceByUidData, DeleteDataSourceByUidErrors, DeleteDataSourceByUidResponses, DeleteFolderData, DeleteFolderErrors, DeleteFolderResponses, DeleteGroupMappingsData, DeleteGroupMappingsErrors, DeleteGroupMappingsResponses, DeleteLibraryElementByUidData, DeleteLibraryElementByUidErrors, DeleteLibraryElementByUidResponses, DeleteLicenseTokenData, DeleteLicenseTokenErrors, DeleteLicenseTokenResponses, DeleteOrgByIdData, DeleteOrgByIdErrors, DeleteOrgByIdResponses, DeletePlaylistData, DeletePlaylistErrors, DeletePlaylistResponses, DeletePublicDashboardData, DeletePublicDashboardErrors, DeletePublicDashboardResponses, DeleteQueryData, DeleteQueryErrors, DeleteQueryResponses, DeleteRecordingRuleData, DeleteRecordingRuleErrors, DeleteRecordingRuleResponses, DeleteRecordingRuleWriteTargetData, DeleteRecordingRuleWriteTargetErrors, DeleteRecordingRuleWriteTargetResponses, DeleteReportData, DeleteReportErrors, DeleteReportResponses, DeleteRoleData, DeleteRoleErrors, DeleteRoleResponses, DeleteServiceAccountData, DeleteServiceAccountErrors, DeleteServiceAccountResponses, DeleteSessionData, DeleteSessionErrors, DeleteTeamByIdData, DeleteTeamByIdErrors, DeleteTeamByIdResponses, DeleteTokenData, DeleteTokenErrors, DeleteTokenResponses, DisableDataSourceCacheData, DisableDataSourceCacheErrors, DisableDataSourceCacheResponses, EnableDataSourceCacheData, EnableDataSourceCacheErrors, EnableDataSourceCacheResponses, GetAccessControlStatusData, GetAccessControlStatusErrors, GetAccessControlStatusResponses, GetAnnotationByIdData, GetAnnotationByIdErrors, GetAnnotationByIdResponses, GetAnnotationsData, GetAnnotationsErrors, GetAnnotationsResponses, GetAnnotationTagsData, GetAnnotationTagsErrors, GetAnnotationTagsResponses, GetCloudMigrationTokenData, GetCloudMigrationTokenErrors, GetCloudMigrationTokenResponses, GetCorrelationData, GetCorrelationErrors, GetCorrelationResponses, GetCorrelationsBySourceUidData, GetCorrelationsBySourceUidErrors, GetCorrelationsBySourceUidResponses, GetCorrelationsData, GetCorrelationsErrors, GetCorrelationsResponses, GetCurrentOrgData, GetCurrentOrgErrors, GetCurrentOrgQuotaData, GetCurrentOrgQuotaErrors, GetCurrentOrgQuotaResponses, GetCurrentOrgResponses, GetCustomPermissionsCsvData, GetCustomPermissionsCsvErrors, GetCustomPermissionsReportData, GetCustomPermissionsReportErrors, GetDashboardByUidData, GetDashboardByUidErrors, GetDashboardByUidResponses, GetDashboardPermissionsListByUidData, GetDashboardPermissionsListByUidErrors, GetDashboardPermissionsListByUidResponses, GetDashboardSnapshotData, GetDashboardSnapshotErrors, GetDashboardSnapshotResponses, GetDashboardTagsData, GetDashboardTagsErrors, GetDashboardTagsResponses, GetDashboardVersionByUidData, GetDashboardVersionByUidErrors, GetDashboardVersionByUidResponses, GetDashboardVersionsByUidData, GetDashboardVersionsByUidErrors, GetDashboardVersionsByUidResponses, GetDataSourceByNameData, GetDataSourceByNameErrors, GetDataSourceByNameResponses, GetDataSourceByUidData, GetDataSourceByUidErrors, GetDataSourceByUidResponses, GetDataSourceCacheConfigData, GetDataSourceCacheConfigErrors, GetDataSourceCacheConfigResponses, GetDataSourceIdByNameData, GetDataSourceIdByNameErrors, GetDataSourceIdByNameResponses, GetDataSourcesData, GetDataSourcesErrors, GetDataSourcesResponses, GetFolderByUidData, GetFolderByUidErrors, GetFolderByUidResponses, GetFolderDescendantCountsData, GetFolderDescendantCountsErrors, GetFolderDescendantCountsResponses, GetFolderPermissionListData, GetFolderPermissionListErrors, GetFolderPermissionListResponses, GetFoldersData, GetFoldersErrors, GetFoldersResponses, GetGroupRolesData, GetGroupRolesErrors, GetGroupRolesResponses, GetHealthData, GetHealthErrors, GetHealthResponses, GetHomeDashboardData, GetHomeDashboardErrors, GetHomeDashboardResponses, GetLdapStatusData, GetLdapStatusErrors, GetLdapStatusResponses, GetLibraryElementByNameData, GetLibraryElementByNameErrors, GetLibraryElementByNameResponses, GetLibraryElementByUidData, GetLibraryElementByUidErrors, GetLibraryElementByUidResponses, GetLibraryElementConnectionsData, GetLibraryElementConnectionsErrors, GetLibraryElementConnectionsResponses, GetLibraryElementsData, GetLibraryElementsErrors, GetLibraryElementsResponses, GetLicenseTokenData, GetLicenseTokenResponses, GetMappedGroupsData, GetMappedGroupsErrors, GetMappedGroupsResponses, GetMetadataData, GetMetadataResponses, GetOrgByIdData, GetOrgByIdErrors, GetOrgByIdResponses, GetOrgByNameData, GetOrgByNameErrors, GetOrgByNameResponses, GetOrgPreferencesData, GetOrgPreferencesErrors, GetOrgPreferencesResponses, GetOrgQuotaData, GetOrgQuotaErrors, GetOrgQuotaResponses, GetOrgUsersData, GetOrgUsersErrors, GetOrgUsersForCurrentOrgData, GetOrgUsersForCurrentOrgErrors, GetOrgUsersForCurrentOrgLookupData, GetOrgUsersForCurrentOrgLookupErrors, GetOrgUsersForCurrentOrgLookupResponses, GetOrgUsersForCurrentOrgResponses, GetOrgUsersResponses, GetPendingOrgInvitesData, GetPendingOrgInvitesErrors, GetPendingOrgInvitesResponses, GetPlaylistData, GetPlaylistErrors, GetPlaylistItemsData, GetPlaylistItemsErrors, GetPlaylistItemsResponses, GetPlaylistResponses, GetProviderSettingsData, GetProviderSettingsErrors, GetProviderSettingsResponses, GetPublicAnnotationsData, GetPublicAnnotationsErrors, GetPublicAnnotationsResponses, GetPublicDashboardData, GetPublicDashboardErrors, GetPublicDashboardResponses, GetRecordingRuleWriteTargetData, GetRecordingRuleWriteTargetErrors, GetRecordingRuleWriteTargetResponses, GetReportData, GetReportErrors, GetReportResponses, GetReportsByDashboardUidData, GetReportsByDashboardUidErrors, GetReportsByDashboardUidResponses, GetReportsData, GetReportsErrors, GetReportSettingsData, GetReportSettingsErrors, GetReportSettingsResponses, GetReportsResponses, GetResourceDependenciesData, GetResourceDependenciesResponses, GetResourceDescriptionData, GetResourceDescriptionErrors, GetResourceDescriptionResponses, GetResourcePermissionsData, GetResourcePermissionsErrors, GetResourcePermissionsResponses, GetRoleAssignmentsData, GetRoleAssignmentsErrors, GetRoleAssignmentsResponses, GetRoleData, GetRoleErrors, GetRoleResponses, GetSamlLogoutData, GetSamlLogoutErrors, GetSessionData, GetSessionErrors, GetSessionListData, GetSessionListErrors, GetSessionListResponses, GetSessionResponses, GetSettingsImageData, GetSettingsImageErrors, GetSettingsImageResponses, GetShapshotListData, GetShapshotListErrors, GetShapshotListResponses, GetSharingOptionsData, GetSharingOptionsErrors, GetSharingOptionsResponses, GetSignedInUserData, GetSignedInUserErrors, GetSignedInUserOrgListData, GetSignedInUserOrgListErrors, GetSignedInUserOrgListResponses, GetSignedInUserResponses, GetSignedInUserTeamListData, GetSignedInUserTeamListErrors, GetSignedInUserTeamListResponses, GetSloData, GetSloErrors, GetSnapshotData, GetSnapshotErrors, GetSnapshotResponses, GetStatusData, GetStatusResponses, GetSyncStatusData, GetSyncStatusErrors, GetSyncStatusResponses, GetTeamByIdData, GetTeamByIdErrors, GetTeamByIdResponses, GetTeamGroupsApiData, GetTeamGroupsApiErrors, GetTeamGroupsApiResponses, GetTeamLbacRulesApiData, GetTeamLbacRulesApiErrors, GetTeamLbacRulesApiResponses, GetTeamMembersData, GetTeamMembersErrors, GetTeamMembersResponses, GetTeamPreferencesData, GetTeamPreferencesErrors, GetTeamPreferencesResponses, GetUserAuthTokensData, GetUserAuthTokensErrors, GetUserAuthTokensResponses, GetUserByIdData, GetUserByIdErrors, GetUserByIdResponses, GetUserByLoginOrEmailData, GetUserByLoginOrEmailErrors, GetUserByLoginOrEmailResponses, GetUserFromLdapData, GetUserFromLdapErrors, GetUserFromLdapResponses, GetUserOrgListData, GetUserOrgListErrors, GetUserOrgListResponses, GetUserPreferencesData, GetUserPreferencesErrors, GetUserPreferencesResponses, GetUserQuotaData, GetUserQuotaErrors, GetUserQuotaResponses, GetUserQuotasData, GetUserQuotasErrors, GetUserQuotasResponses, GetUserTeamsData, GetUserTeamsErrors, GetUserTeamsResponses, ImportDashboardData, ImportDashboardErrors, ImportDashboardResponses, InterpolateDashboardData, InterpolateDashboardErrors, InterpolateDashboardResponses, ListAllProvidersSettingsData, ListAllProvidersSettingsErrors, ListAllProvidersSettingsResponses, ListDevicesData, ListDevicesErrors, ListDevicesResponses, ListPublicDashboardsData, ListPublicDashboardsErrors, ListPublicDashboardsResponses, ListRecordingRulesData, ListRecordingRulesErrors, ListRecordingRulesResponses, ListRolesData, ListRolesErrors, ListRolesResponses, ListSortOptionsData, ListSortOptionsErrors, ListSortOptionsResponses, ListTeamRolesData, ListTeamRolesErrors, ListTeamRolesResponses, ListTeamsRolesData, ListTeamsRolesErrors, ListTeamsRolesResponses, ListTokensData, ListTokensErrors, ListTokensResponses, ListUserRolesData, ListUserRolesErrors, ListUserRolesResponses, ListUsersRolesData, ListUsersRolesErrors, ListUsersRolesResponses, MassDeleteAnnotationsData, MassDeleteAnnotationsErrors, MassDeleteAnnotationsResponses, MoveFolderData, MoveFolderErrors, MoveFolderResponses, PatchAnnotationData, PatchAnnotationErrors, PatchAnnotationResponses, PatchOrgPreferencesData, PatchOrgPreferencesErrors, PatchOrgPreferencesResponses, PatchProviderSettingsData, PatchProviderSettingsErrors, PatchProviderSettingsResponses, PatchQueryCommentData, PatchQueryCommentErrors, PatchQueryCommentResponses, PatchUserPreferencesData, PatchUserPreferencesErrors, PatchUserPreferencesResponses, PostAcsData, PostAcsErrors, PostAnnotationData, PostAnnotationErrors, PostAnnotationResponses, PostDashboardData, PostDashboardErrors, PostDashboardResponses, PostGraphiteAnnotationData, PostGraphiteAnnotationErrors, PostGraphiteAnnotationResponses, PostLicenseTokenData, PostLicenseTokenErrors, PostLicenseTokenResponses, PostRenewLicenseTokenData, PostRenewLicenseTokenErrors, PostRenewLicenseTokenResponses, PostSloData, PostSloErrors, PostSyncUserWithLdapData, PostSyncUserWithLdapErrors, PostSyncUserWithLdapResponses, QueryMetricsWithExpressionsData, QueryMetricsWithExpressionsErrors, QueryMetricsWithExpressionsResponses, QueryPublicDashboardData, QueryPublicDashboardErrors, QueryPublicDashboardResponses, RefreshLicenseStatsData, RefreshLicenseStatsErrors, RefreshLicenseStatsResponses, ReloadLdapCfgData, ReloadLdapCfgErrors, RemoveOrgUserData, RemoveOrgUserErrors, RemoveOrgUserForCurrentOrgData, RemoveOrgUserForCurrentOrgErrors, RemoveOrgUserForCurrentOrgResponses, RemoveOrgUserResponses, RemoveProviderSettingsData, RemoveProviderSettingsErrors, RemoveProviderSettingsResponses, RemoveTeamGroupApiQueryData, RemoveTeamGroupApiQueryErrors, RemoveTeamGroupApiQueryResponses, RemoveTeamMemberData, RemoveTeamMemberErrors, RemoveTeamMemberResponses, RemoveTeamRoleData, RemoveTeamRoleErrors, RemoveTeamRoleResponses, RemoveUserRoleData, RemoveUserRoleErrors, RemoveUserRoleResponses, RenderReportCsvsData, RenderReportCsvsErrors, RenderReportCsvsResponses, RenderReportPdfsData, RenderReportPdfsErrors, RenderReportPdfsResponses, RestoreDashboardVersionByUidData, RestoreDashboardVersionByUidErrors, RestoreDashboardVersionByUidResponses, RetrieveJwksData, RetrieveJwksErrors, RetrieveJwksResponses, RetrieveServiceAccountData, RetrieveServiceAccountErrors, RetrieveServiceAccountResponses, RevokeInviteData, RevokeInviteErrors, RevokeInviteResponses, RevokeUserAuthTokenData, RevokeUserAuthTokenErrors, RevokeUserAuthTokenResponses, RouteConvertPrometheusCortexDeleteNamespaceData, RouteConvertPrometheusCortexDeleteNamespaceErrors, RouteConvertPrometheusCortexDeleteNamespaceResponses, RouteConvertPrometheusCortexDeleteRuleGroupData, RouteConvertPrometheusCortexDeleteRuleGroupErrors, RouteConvertPrometheusCortexDeleteRuleGroupResponses, RouteConvertPrometheusCortexGetNamespaceData, RouteConvertPrometheusCortexGetNamespaceErrors, RouteConvertPrometheusCortexGetNamespaceResponses, RouteConvertPrometheusCortexGetRuleGroupData, RouteConvertPrometheusCortexGetRuleGroupErrors, RouteConvertPrometheusCortexGetRuleGroupResponses, RouteConvertPrometheusCortexGetRulesData, RouteConvertPrometheusCortexGetRulesErrors, RouteConvertPrometheusCortexGetRulesResponses, RouteConvertPrometheusCortexPostRuleGroupData, RouteConvertPrometheusCortexPostRuleGroupErrors, RouteConvertPrometheusCortexPostRuleGroupResponses, RouteConvertPrometheusCortexPostRuleGroupsData, RouteConvertPrometheusCortexPostRuleGroupsErrors, RouteConvertPrometheusCortexPostRuleGroupsResponses, RouteConvertPrometheusDeleteNamespaceData, RouteConvertPrometheusDeleteNamespaceErrors, RouteConvertPrometheusDeleteNamespaceResponses, RouteConvertPrometheusDeleteRuleGroupData, RouteConvertPrometheusDeleteRuleGroupErrors, RouteConvertPrometheusDeleteRuleGroupResponses, RouteConvertPrometheusGetNamespaceData, RouteConvertPrometheusGetNamespaceErrors, RouteConvertPrometheusGetNamespaceResponses, RouteConvertPrometheusGetRuleGroupData, RouteConvertPrometheusGetRuleGroupErrors, RouteConvertPrometheusGetRuleGroupResponses, RouteConvertPrometheusGetRulesData, RouteConvertPrometheusGetRulesErrors, RouteConvertPrometheusGetRulesResponses, RouteConvertPrometheusPostRuleGroupData, RouteConvertPrometheusPostRuleGroupErrors, RouteConvertPrometheusPostRuleGroupResponses, RouteConvertPrometheusPostRuleGroupsData, RouteConvertPrometheusPostRuleGroupsErrors, RouteConvertPrometheusPostRuleGroupsResponses, RouteDeleteAlertRuleData, RouteDeleteAlertRuleErrors, RouteDeleteAlertRuleGroupData, RouteDeleteAlertRuleGroupErrors, RouteDeleteAlertRuleGroupResponses, RouteDeleteAlertRuleResponses, RouteDeleteContactpointsData, RouteDeleteContactpointsErrors, RouteDeleteContactpointsResponses, RouteDeleteMuteTimingData, RouteDeleteMuteTimingErrors, RouteDeleteMuteTimingResponses, RouteDeleteTemplateData, RouteDeleteTemplateErrors, RouteDeleteTemplateResponses, RouteExportMuteTimingData, RouteExportMuteTimingErrors, RouteExportMuteTimingResponses, RouteExportMuteTimingsData, RouteExportMuteTimingsErrors, RouteExportMuteTimingsResponses, RouteGetAlertRuleData, RouteGetAlertRuleErrors, RouteGetAlertRuleExportData, RouteGetAlertRuleExportErrors, RouteGetAlertRuleExportResponses, RouteGetAlertRuleGroupData, RouteGetAlertRuleGroupErrors, RouteGetAlertRuleGroupExportData, RouteGetAlertRuleGroupExportErrors, RouteGetAlertRuleGroupExportResponses, RouteGetAlertRuleGroupResponses, RouteGetAlertRuleResponses, RouteGetAlertRulesData, RouteGetAlertRulesErrors, RouteGetAlertRulesExportData, RouteGetAlertRulesExportErrors, RouteGetAlertRulesExportResponses, RouteGetAlertRulesResponses, RouteGetContactpointsData, RouteGetContactpointsErrors, RouteGetContactpointsExportData, RouteGetContactpointsExportErrors, RouteGetContactpointsExportResponses, RouteGetContactpointsResponses, RouteGetMuteTimingData, RouteGetMuteTimingErrors, RouteGetMuteTimingResponses, RouteGetMuteTimingsData, RouteGetMuteTimingsErrors, RouteGetMuteTimingsResponses, RouteGetPolicyTreeData, RouteGetPolicyTreeErrors, RouteGetPolicyTreeExportData, RouteGetPolicyTreeExportErrors, RouteGetPolicyTreeExportResponses, RouteGetPolicyTreeResponses, RouteGetTemplateData, RouteGetTemplateErrors, RouteGetTemplateResponses, RouteGetTemplatesData, RouteGetTemplatesErrors, RouteGetTemplatesResponses, RoutePostAlertRuleData, RoutePostAlertRuleErrors, RoutePostAlertRuleResponses, RoutePostContactpointsData, RoutePostContactpointsErrors, RoutePostContactpointsResponses, RoutePostMuteTimingData, RoutePostMuteTimingErrors, RoutePostMuteTimingResponses, RoutePutAlertRuleData, RoutePutAlertRuleErrors, RoutePutAlertRuleGroupData, RoutePutAlertRuleGroupErrors, RoutePutAlertRuleGroupResponses, RoutePutAlertRuleResponses, RoutePutContactpointData, RoutePutContactpointErrors, RoutePutContactpointResponses, RoutePutMuteTimingData, RoutePutMuteTimingErrors, RoutePutMuteTimingResponses, RoutePutPolicyTreeData, RoutePutPolicyTreeErrors, RoutePutPolicyTreeResponses, RoutePutTemplateData, RoutePutTemplateErrors, RoutePutTemplateResponses, RouteResetPolicyTreeData, RouteResetPolicyTreeErrors, RouteResetPolicyTreeResponses, SaveReportSettingsData, SaveReportSettingsErrors, SaveReportSettingsResponses, SearchDashboardSnapshotsData, SearchDashboardSnapshotsErrors, SearchDashboardSnapshotsResponses, SearchData, SearchDevicesData, SearchDevicesErrors, SearchDevicesResponses, SearchErrors, SearchOrgsData, SearchOrgsErrors, SearchOrgServiceAccountsWithPagingData, SearchOrgServiceAccountsWithPagingErrors, SearchOrgServiceAccountsWithPagingResponses, SearchOrgsResponses, SearchOrgUsersData, SearchOrgUsersErrors, SearchOrgUsersResponses, SearchPlaylistsData, SearchPlaylistsErrors, SearchPlaylistsResponses, SearchQueriesData, SearchQueriesErrors, SearchQueriesResponses, SearchResponses, SearchTeamGroupsData, SearchTeamGroupsErrors, SearchTeamGroupsResponses, SearchTeamsData, SearchTeamsErrors, SearchTeamsResponses, SearchUsersData, SearchUsersErrors, SearchUsersResponses, SearchUsersWithPagingData, SearchUsersWithPagingErrors, SearchUsersWithPagingResponses, SendReportData, SendReportErrors, SendReportResponses, SendTestEmailData, SendTestEmailErrors, SendTestEmailResponses, SetDataSourceCacheConfigData, SetDataSourceCacheConfigErrors, SetDataSourceCacheConfigResponses, SetHelpFlagData, SetHelpFlagErrors, SetHelpFlagResponses, SetResourcePermissionsData, SetResourcePermissionsErrors, SetResourcePermissionsForBuiltInRoleData, SetResourcePermissionsForBuiltInRoleErrors, SetResourcePermissionsForBuiltInRoleResponses, SetResourcePermissionsForTeamData, SetResourcePermissionsForTeamErrors, SetResourcePermissionsForTeamResponses, SetResourcePermissionsForUserData, SetResourcePermissionsForUserErrors, SetResourcePermissionsForUserResponses, SetResourcePermissionsResponses, SetRoleAssignmentsData, SetRoleAssignmentsErrors, SetRoleAssignmentsResponses, SetTeamMembershipsData, SetTeamMembershipsErrors, SetTeamMembershipsResponses, SetTeamRolesData, SetTeamRolesErrors, SetTeamRolesResponses, SetUserRolesData, SetUserRolesErrors, SetUserRolesResponses, StarDashboardByUidData, StarDashboardByUidErrors, StarDashboardByUidResponses, StarQueryData, StarQueryErrors, StarQueryResponses, TestCreateRecordingRuleData, TestCreateRecordingRuleErrors, TestCreateRecordingRuleResponses, UnstarDashboardByUidData, UnstarDashboardByUidErrors, UnstarDashboardByUidResponses, UnstarQueryData, UnstarQueryErrors, UnstarQueryResponses, UpdateAnnotationData, UpdateAnnotationErrors, UpdateAnnotationResponses, UpdateCorrelationData, UpdateCorrelationErrors, UpdateCorrelationResponses, UpdateCurrentOrgAddressData, UpdateCurrentOrgAddressErrors, UpdateCurrentOrgAddressResponses, UpdateCurrentOrgData, UpdateCurrentOrgErrors, UpdateCurrentOrgResponses, UpdateDashboardPermissionsByUidData, UpdateDashboardPermissionsByUidErrors, UpdateDashboardPermissionsByUidResponses, UpdateDataSourceByUidData, UpdateDataSourceByUidErrors, UpdateDataSourceByUidResponses, UpdateFolderData, UpdateFolderErrors, UpdateFolderPermissionsData, UpdateFolderPermissionsErrors, UpdateFolderPermissionsResponses, UpdateFolderResponses, UpdateGroupMappingsData, UpdateGroupMappingsErrors, UpdateGroupMappingsResponses, UpdateLibraryElementData, UpdateLibraryElementErrors, UpdateLibraryElementResponses, UpdateOrgAddressData, UpdateOrgAddressErrors, UpdateOrgAddressResponses, UpdateOrgData, UpdateOrgErrors, UpdateOrgPreferencesData, UpdateOrgPreferencesErrors, UpdateOrgPreferencesResponses, UpdateOrgQuotaData, UpdateOrgQuotaErrors, UpdateOrgQuotaResponses, UpdateOrgResponses, UpdateOrgUserData, UpdateOrgUserErrors, UpdateOrgUserForCurrentOrgData, UpdateOrgUserForCurrentOrgErrors, UpdateOrgUserForCurrentOrgResponses, UpdateOrgUserResponses, UpdatePlaylistData, UpdatePlaylistErrors, UpdatePlaylistResponses, UpdateProviderSettingsData, UpdateProviderSettingsErrors, UpdateProviderSettingsResponses, UpdatePublicDashboardData, UpdatePublicDashboardErrors, UpdatePublicDashboardResponses, UpdateRecordingRuleData, UpdateRecordingRuleErrors, UpdateRecordingRuleResponses, UpdateReportData, UpdateReportErrors, UpdateReportResponses, UpdateRoleData, UpdateRoleErrors, UpdateRoleResponses, UpdateServiceAccountData, UpdateServiceAccountErrors, UpdateServiceAccountResponses, UpdateSignedInUserData, UpdateSignedInUserErrors, UpdateSignedInUserResponses, UpdateTeamData, UpdateTeamErrors, UpdateTeamLbacRulesApiData, UpdateTeamLbacRulesApiErrors, UpdateTeamLbacRulesApiResponses, UpdateTeamMemberData, UpdateTeamMemberErrors, UpdateTeamMemberResponses, UpdateTeamPreferencesData, UpdateTeamPreferencesErrors, UpdateTeamPreferencesResponses, UpdateTeamResponses, UpdateUserData, UpdateUserEmailData, UpdateUserErrors, UpdateUserPreferencesData, UpdateUserPreferencesErrors, UpdateUserPreferencesResponses, UpdateUserQuotaData, UpdateUserQuotaErrors, UpdateUserQuotaResponses, UpdateUserResponses, UploadSnapshotData, UploadSnapshotErrors, UploadSnapshotResponses, UserSetUsingOrgData, UserSetUsingOrgErrors, UserSetUsingOrgResponses, ViewPublicDashboardData, ViewPublicDashboardErrors, ViewPublicDashboardResponses } from './types.gen'; - -export type Options = Options2 & { - /** - * You can provide a client instance returned by `createClient()` instead of - * individual options. This might be also useful if you want to implement a - * custom client. - */ - client?: Client; - /** - * You can pass arbitrary values through the `meta` object. This can be - * used to access values that aren't defined as part of the SDK function. - */ - meta?: Record; -}; - -/** - * Get all roles. - * - * Gets all existing roles. The response contains all global and organization local roles, for the organization which user is signed in. - * - * You need to have a permission with action `roles:read` and scope `roles:*`. - * - * The `delegatable` flag reduces the set of roles to only those for which the signed-in user has permissions to assign. - */ -export const listRoles = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/access-control/roles', - ...options -}); - -/** - * Create a new custom role. - * - * Creates a new custom role and maps given permissions to that role. Note that roles with the same prefix as Fixed Roles can’t be created. - * - * You need to have a permission with action `roles:write` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has. - * For example, if a user does not have required permissions for creating users, they won’t be able to create a custom role which allows to do that. This is done to prevent escalation of privileges. - */ -export const createRole = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/access-control/roles', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Delete a custom role. - * - * Delete a role with the given UID, and it’s permissions. If the role is assigned to a built-in role, the deletion operation will fail, unless force query param is set to true, and in that case all assignments will also be deleted. - * - * You need to have a permission with action `roles:delete` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only delete a custom role with the same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to delete a custom role which allows to do that. - */ -export const deleteRole = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/access-control/roles/{roleUID}', - ...options -}); - -/** - * Get a role. - * - * Get a role for the given UID. - * - * You need to have a permission with action `roles:read` and scope `roles:*`. - */ -export const getRole = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/access-control/roles/{roleUID}', - ...options -}); - -/** - * Update a custom role. - * - * You need to have a permission with action `roles:write` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has. - */ -export const updateRole = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/access-control/roles/{roleUID}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Get role assignments. - * - * Get role assignments for the role with the given UID. - * Does not include role assignments mapped through group attribute sync. - * - * You need to have a permission with action `teams.roles:list` and scope `teams:id:*` and `users.roles:list` and scope `users:id:*`. - */ -export const getRoleAssignments = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/access-control/roles/{roleUID}/assignments', - ...options -}); - -/** - * Set role assignments. - * - * Set role assignments for the role with the given UID. - * - * You need to have a permission with action `teams.roles:add` and `teams.roles:remove` and scope `permissions:type:delegate`, and `users.roles:add` and `users.roles:remove` and scope `permissions:type:delegate`. - */ -export const setRoleAssignments = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/access-control/roles/{roleUID}/assignments', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Get status. - * - * Returns an indicator to check if fine-grained access control is enabled or not. - * - * You need to have a permission with action `status:accesscontrol` and scope `services:accesscontrol`. - */ -export const getAccessControlStatus = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/access-control/status', - ...options -}); - -/** - * List roles assigned to multiple teams. - * - * Lists the roles that have been directly assigned to the given teams. - * - * You need to have a permission with action `teams.roles:read` and scope `teams:id:*`. - */ -export const listTeamsRoles = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/access-control/teams/roles/search', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Get team roles. - * - * You need to have a permission with action `teams.roles:read` and scope `teams:id:`. - */ -export const listTeamRoles = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/access-control/teams/{teamId}/roles', - ...options -}); - -/** - * Add team role. - * - * You need to have a permission with action `teams.roles:add` and scope `permissions:type:delegate`. - */ -export const addTeamRole = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/access-control/teams/{teamId}/roles', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Update team role. - * - * You need to have a permission with action `teams.roles:add` and `teams.roles:remove` and scope `permissions:type:delegate` for each. - */ -export const setTeamRoles = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/access-control/teams/{teamId}/roles', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Remove team role. - * - * You need to have a permission with action `teams.roles:remove` and scope `permissions:type:delegate`. - */ -export const removeTeamRole = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/access-control/teams/{teamId}/roles/{roleUID}', - ...options -}); - -/** - * List roles assigned to multiple users. - * - * Lists the roles that have been directly assigned to the given users. The list does not include built-in roles (Viewer, Editor, Admin or Grafana Admin), and it does not include roles that have been inherited from a team. - * - * You need to have a permission with action `users.roles:read` and scope `users:id:*`. - */ -export const listUsersRoles = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/access-control/users/roles/search', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * List roles assigned to a user. - * - * Lists the roles that have been directly assigned to a given user. The list does not include built-in roles (Viewer, Editor, Admin or Grafana Admin), and it does not include roles that have been inherited from a team. - * - * You need to have a permission with action `users.roles:read` and scope `users:id:`. - */ -export const listUserRoles = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/access-control/users/{userId}/roles', - ...options -}); - -/** - * Add a user role assignment. - * - * Assign a role to a specific user. For bulk updates consider Set user role assignments. - * - * You need to have a permission with action `users.roles:add` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only assign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign a role which will allow to do that. This is done to prevent escalation of privileges. - */ -export const addUserRole = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/access-control/users/{userId}/roles', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Set user role assignments. - * - * Update the user’s role assignments to match the provided set of UIDs. This will remove any assigned roles that aren’t in the request and add roles that are in the set but are not already assigned to the user. - * Roles mapped through group attribute sync are not impacted. - * If you want to add or remove a single role, consider using Add a user role assignment or Remove a user role assignment instead. - * - * You need to have a permission with action `users.roles:add` and `users.roles:remove` and scope `permissions:type:delegate` for each. `permissions:type:delegate` scope ensures that users can only assign or unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign or unassign a role which will allow to do that. This is done to prevent escalation of privileges. - */ -export const setUserRoles = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/access-control/users/{userId}/roles', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Remove a user role assignment. - * - * Revoke a role from a user. For bulk updates consider Set user role assignments. - * - * You need to have a permission with action `users.roles:remove` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to unassign a role which will allow to do that. This is done to prevent escalation of privileges. - */ -export const removeUserRole = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/access-control/users/{userId}/roles/{roleUID}', - ...options -}); - -/** - * Get a description of a resource's access control properties. - */ -export const getResourceDescription = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/access-control/{resource}/description', - ...options -}); - -/** - * Get permissions for a resource. - */ -export const getResourcePermissions = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/access-control/{resource}/{resourceID}', - ...options -}); - -/** - * Set resource permissions. - * - * Assigns permissions for a resource by a given type (`:resource`) and `:resourceID` to one or many - * assignment types. Allowed resources are `datasources`, `teams`, `dashboards`, `folders`, and `serviceaccounts`. - * Refer to the `/access-control/{resource}/description` endpoint for allowed Permissions. - */ -export const setResourcePermissions = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/access-control/{resource}/{resourceID}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Set resource permissions for a built-in role. - * - * Assigns permissions for a resource by a given type (`:resource`) and `:resourceID` to a built-in role. - * Allowed resources are `datasources`, `teams`, `dashboards`, `folders`, and `serviceaccounts`. - * Refer to the `/access-control/{resource}/description` endpoint for allowed Permissions. - */ -export const setResourcePermissionsForBuiltInRole = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/access-control/{resource}/{resourceID}/builtInRoles/{builtInRole}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Set resource permissions for a team. - * - * Assigns permissions for a resource by a given type (`:resource`) and `:resourceID` to a team. - * Allowed resources are `datasources`, `teams`, `dashboards`, `folders`, and `serviceaccounts`. - * Refer to the `/access-control/{resource}/description` endpoint for allowed Permissions. - */ -export const setResourcePermissionsForTeam = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/access-control/{resource}/{resourceID}/teams/{teamID}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Set resource permissions for a user. - * - * Assigns permissions for a resource by a given type (`:resource`) and `:resourceID` to a user or a service account. - * Allowed resources are `datasources`, `teams`, `dashboards`, `folders`, and `serviceaccounts`. - * Refer to the `/access-control/{resource}/description` endpoint for allowed Permissions. - */ -export const setResourcePermissionsForUser = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/access-control/{resource}/{resourceID}/users/{userID}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Returns the current state of the LDAP background sync integration. - * - * You need to have a permission with action `ldap.status:read`. - */ -export const getSyncStatus = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/admin/ldap-sync-status', - ...options -}); - -/** - * Reloads the LDAP configuration. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.config:reload`. - */ -export const reloadLdapCfg = (options?: Options) => (options?.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/admin/ldap/reload', - ...options -}); - -/** - * Attempts to connect to all the configured LDAP servers and returns information on whenever they're available or not. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.status:read`. - */ -export const getLdapStatus = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/admin/ldap/status', - ...options -}); - -/** - * Enables a single Grafana user to be synchronized against LDAP. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.user:sync`. - */ -export const postSyncUserWithLdap = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/admin/ldap/sync/{user_id}', - ...options -}); - -/** - * Finds an user based on a username in LDAP. This helps illustrate how would the particular user be mapped in Grafana when synced. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.user:read`. - */ -export const getUserFromLdap = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/admin/ldap/{user_name}', - ...options -}); - -/** - * You need to have a permission with action `provisioning:reload` with scope `provisioners:accesscontrol`. - */ -export const adminProvisioningReloadAccessControl = (options?: Options) => (options?.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/admin/provisioning/access-control/reload', - ...options -}); - -/** - * Reload dashboard provisioning configurations. - * - * Reloads the provisioning config files for dashboards again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning. - * If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:dashboards`. - */ -export const adminProvisioningReloadDashboards = (options?: Options) => (options?.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/admin/provisioning/dashboards/reload', - ...options -}); - -/** - * Reload datasource provisioning configurations. - * - * Reloads the provisioning config files for datasources again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning. - * If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:datasources`. - */ -export const adminProvisioningReloadDatasources = (options?: Options) => (options?.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/admin/provisioning/datasources/reload', - ...options -}); - -/** - * Reload plugin provisioning configurations. - * - * Reloads the provisioning config files for plugins again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning. - * If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:plugin`. - */ -export const adminProvisioningReloadPlugins = (options?: Options) => (options?.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/admin/provisioning/plugins/reload', - ...options -}); - -/** - * Fetch settings. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `settings:read` and scopes: `settings:*`, `settings:auth.saml:` and `settings:auth.saml:enabled` (property level). - */ -export const adminGetSettings = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/admin/settings', - ...options -}); - -/** - * Fetch Grafana Stats. - * - * Only works with Basic Authentication (username and password). See introduction for an explanation. - * If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `server:stats:read`. - */ -export const adminGetStats = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/admin/stats', - ...options -}); - -/** - * Create new user. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users:create`. - * Note that OrgId is an optional parameter that can be used to assign a new user to a different organization when `auto_assign_org` is set to `true`. - */ -export const adminCreateUser = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/admin/users', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Delete global User. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users:delete` and scope `global.users:*`. - */ -export const adminDeleteUser = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/admin/users/{user_id}', - ...options -}); - -/** - * Return a list of all auth tokens (devices) that the user currently have logged in from. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.authtoken:list` and scope `global.users:*`. - */ -export const adminGetUserAuthTokens = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/admin/users/{user_id}/auth-tokens', - ...options -}); - -/** - * Disable user. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users:disable` and scope `global.users:1` (userIDScope). - */ -export const adminDisableUser = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/admin/users/{user_id}/disable', - ...options -}); - -/** - * Enable user. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users:enable` and scope `global.users:1` (userIDScope). - */ -export const adminEnableUser = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/admin/users/{user_id}/enable', - ...options -}); - -/** - * Logout user revokes all auth tokens (devices) for the user. User of issued auth tokens (devices) will no longer be logged in and will be required to authenticate again upon next activity. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.logout` and scope `global.users:*`. - */ -export const adminLogoutUser = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/admin/users/{user_id}/logout', - ...options -}); - -/** - * Set password for user. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.password:update` and scope `global.users:*`. - */ -export const adminUpdateUserPassword = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/admin/users/{user_id}/password', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Set permissions for user. - * - * Only works with Basic Authentication (username and password). See introduction for an explanation. - * If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.permissions:update` and scope `global.users:*`. - */ -export const adminUpdateUserPermissions = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/admin/users/{user_id}/permissions', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Fetch user quota. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.quotas:list` and scope `global.users:1` (userIDScope). - */ -export const getUserQuota = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/admin/users/{user_id}/quotas', - ...options -}); - -/** - * Update user quota. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.quotas:update` and scope `global.users:1` (userIDScope). - */ -export const updateUserQuota = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/admin/users/{user_id}/quotas/{quota_target}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Revoke auth token for user. - * - * Revokes the given auth token (device) for the user. User of issued auth token (device) will no longer be logged in and will be required to authenticate again upon next activity. - * If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.authtoken:update` and scope `global.users:*`. - */ -export const adminRevokeUserAuthToken = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/admin/users/{user_id}/revoke-auth-token', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Find Annotations. - * - * Starting in Grafana v6.4 regions annotations are now returned in one entity that now includes the timeEnd property. - */ -export const getAnnotations = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/annotations', - ...options -}); - -/** - * Create Annotation. - * - * Creates an annotation in the Grafana database. The dashboardId and panelId fields are optional. If they are not specified then an organization annotation is created and can be queried in any dashboard that adds the Grafana annotations data source. When creating a region annotation include the timeEnd property. - * The format for `time` and `timeEnd` should be epoch numbers in millisecond resolution. - * The response for this HTTP request is slightly different in versions prior to v6.4. In prior versions you would also get an endId if you where creating a region. But in 6.4 regions are represented using a single event with time and timeEnd properties. - */ -export const postAnnotation = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/annotations', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Create Annotation in Graphite format. - * - * Creates an annotation by using Graphite-compatible event format. The `when` and `data` fields are optional. If `when` is not specified then the current time will be used as annotation’s timestamp. The `tags` field can also be in prior to Graphite `0.10.0` format (string with multiple tags being separated by a space). - */ -export const postGraphiteAnnotation = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/annotations/graphite', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Delete multiple annotations. - */ -export const massDeleteAnnotations = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/annotations/mass-delete', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Find Annotations Tags. - * - * Find all the event tags created in the annotations. - */ -export const getAnnotationTags = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/annotations/tags', - ...options -}); - -/** - * Delete Annotation By ID. - * - * Deletes the annotation that matches the specified ID. - */ -export const deleteAnnotationById = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/annotations/{annotation_id}', - ...options -}); - -/** - * Get Annotation by ID. - */ -export const getAnnotationById = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/annotations/{annotation_id}', - ...options -}); - -/** - * Patch Annotation. - * - * Updates one or more properties of an annotation that matches the specified ID. - * This operation currently supports updating of the `text`, `tags`, `time` and `timeEnd` properties. - * This is available in Grafana 6.0.0-beta2 and above. - */ -export const patchAnnotation = (options: Options) => (options.client ?? client).patch({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/annotations/{annotation_id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Update Annotation. - * - * Updates all properties of an annotation that matches the specified id. To only update certain property, consider using the Patch Annotation operation. - */ -export const updateAnnotation = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/annotations/{annotation_id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Lists all devices within the last 30 days - */ -export const listDevices = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/anonymous/devices', - ...options -}); - -/** - * Lists all devices within the last 30 days - */ -export const searchDevices = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/anonymous/search', - ...options -}); - -/** - * Get a list of all cloud migration sessions that have been created. - */ -export const getSessionList = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/cloudmigration/migration', - ...options -}); - -/** - * Create a migration session. - */ -export const createSession = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/cloudmigration/migration', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Delete a migration session by its uid. - */ -export const deleteSession = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/cloudmigration/migration/{uid}', - ...options -}); - -/** - * Get a cloud migration session by its uid. - */ -export const getSession = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/cloudmigration/migration/{uid}', - ...options -}); - -/** - * Trigger the creation of an instance snapshot associated with the provided session. - * - * If the snapshot initialization is successful, the snapshot uid is returned. - */ -export const createSnapshot = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/cloudmigration/migration/{uid}/snapshot', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Get metadata about a snapshot, including where it is in its processing and final results. - */ -export const getSnapshot = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/cloudmigration/migration/{uid}/snapshot/{snapshotUid}', - ...options -}); - -/** - * Cancel a snapshot, wherever it is in its processing chain. - * - * TODO: Implement - */ -export const cancelSnapshot = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/cloudmigration/migration/{uid}/snapshot/{snapshotUid}/cancel', - ...options -}); - -/** - * Upload a snapshot to the Grafana Migration Service for processing. - */ -export const uploadSnapshot = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/cloudmigration/migration/{uid}/snapshot/{snapshotUid}/upload', - ...options -}); - -/** - * Get a list of snapshots for a session. - */ -export const getShapshotList = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/cloudmigration/migration/{uid}/snapshots', - ...options -}); - -/** - * Get the resource dependencies graph for the current set of migratable resources. - */ -export const getResourceDependencies = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/cloudmigration/resources/dependencies', - ...options -}); - -/** - * Fetch the cloud migration token if it exists. - */ -export const getCloudMigrationToken = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/cloudmigration/token', - ...options -}); - -/** - * Create gcom access token. - */ -export const createCloudMigrationToken = (options?: Options) => (options?.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/cloudmigration/token', - ...options -}); - -/** - * Deletes a cloud migration token. - */ -export const deleteCloudMigrationToken = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/cloudmigration/token/{uid}', - ...options -}); - -/** - * Gets all Grafana-managed alert rules that were imported from Prometheus-compatible sources, grouped by namespace. - */ -export const routeConvertPrometheusCortexGetRules = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/convert/api/prom/rules', - ...options -}); - -/** - * Converts the submitted rule groups into Grafana-Managed Rules. - */ -export const routeConvertPrometheusCortexPostRuleGroups = (options?: Options) => (options?.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/convert/api/prom/rules', - ...options -}); - -/** - * Deletes all rule groups that were imported from Prometheus-compatible sources within the specified namespace. - */ -export const routeConvertPrometheusCortexDeleteNamespace = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/convert/api/prom/rules/{NamespaceTitle}', - ...options -}); - -/** - * Gets Grafana-managed alert rules that were imported from Prometheus-compatible sources for a specified namespace (folder). - */ -export const routeConvertPrometheusCortexGetNamespace = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/convert/api/prom/rules/{NamespaceTitle}', - ...options -}); - -/** - * Converts a Prometheus rule group into a Grafana rule group and creates or updates it within the specified namespace. - * - * If the group already exists and was not imported from a Prometheus-compatible source initially, - * it will not be replaced and an error will be returned. - */ -export const routeConvertPrometheusCortexPostRuleGroup = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/convert/api/prom/rules/{NamespaceTitle}', - ...options, - headers: { - 'Content-Type': 'application/yaml', - ...options.headers - } -}); - -/** - * Deletes a specific rule group if it was imported from a Prometheus-compatible source. - */ -export const routeConvertPrometheusCortexDeleteRuleGroup = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/convert/api/prom/rules/{NamespaceTitle}/{Group}', - ...options -}); - -/** - * Gets a single rule group in Prometheus-compatible format if it was imported from a Prometheus-compatible source. - */ -export const routeConvertPrometheusCortexGetRuleGroup = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/convert/api/prom/rules/{NamespaceTitle}/{Group}', - ...options -}); - -/** - * Gets all Grafana-managed alert rules that were imported from Prometheus-compatible sources, grouped by namespace. - */ -export const routeConvertPrometheusGetRules = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/convert/prometheus/config/v1/rules', - ...options -}); - -/** - * Converts the submitted rule groups into Grafana-Managed Rules. - */ -export const routeConvertPrometheusPostRuleGroups = (options?: Options) => (options?.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/convert/prometheus/config/v1/rules', - ...options -}); - -/** - * Deletes all rule groups that were imported from Prometheus-compatible sources within the specified namespace. - */ -export const routeConvertPrometheusDeleteNamespace = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/convert/prometheus/config/v1/rules/{NamespaceTitle}', - ...options -}); - -/** - * Gets Grafana-managed alert rules that were imported from Prometheus-compatible sources for a specified namespace (folder). - */ -export const routeConvertPrometheusGetNamespace = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/convert/prometheus/config/v1/rules/{NamespaceTitle}', - ...options -}); - -/** - * Converts a Prometheus rule group into a Grafana rule group and creates or updates it within the specified namespace. - * - * If the group already exists and was not imported from a Prometheus-compatible source initially, - * it will not be replaced and an error will be returned. - */ -export const routeConvertPrometheusPostRuleGroup = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/convert/prometheus/config/v1/rules/{NamespaceTitle}', - ...options, - headers: { - 'Content-Type': 'application/yaml', - ...options.headers - } -}); - -/** - * Deletes a specific rule group if it was imported from a Prometheus-compatible source. - */ -export const routeConvertPrometheusDeleteRuleGroup = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/convert/prometheus/config/v1/rules/{NamespaceTitle}/{Group}', - ...options -}); - -/** - * Gets a single rule group in Prometheus-compatible format if it was imported from a Prometheus-compatible source. - */ -export const routeConvertPrometheusGetRuleGroup = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/convert/prometheus/config/v1/rules/{NamespaceTitle}/{Group}', - ...options -}); - -/** - * List snapshots. - */ -export const searchDashboardSnapshots = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/dashboard/snapshots', - ...options -}); - -/** - * Create / Update dashboard - * - * Creates a new dashboard or updates an existing dashboard. - * Note: This endpoint is not intended for creating folders, use `POST /api/folders` for that. - * - * Use: /apis/dashboards.grafana.app/v1/namespaces/{ns}/dashboards - * - * @deprecated - */ -export const postDashboard = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/dashboards/db', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * NOTE: the home dashboard is configured in preferences. This API will be removed in G13 - * - * @deprecated - */ -export const getHomeDashboard = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/dashboards/home', - ...options -}); - -/** - * Import dashboard. - */ -export const importDashboard = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/dashboards/import', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Interpolate dashboard. This is an experimental endpoint under dashboardLibrary or suggestedDashboards feature flags and is subject to change. - */ -export const interpolateDashboard = (options?: Options) => (options?.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/dashboards/interpolate', - ...options -}); - -/** - * Get list of public dashboards - */ -export const listPublicDashboards = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/dashboards/public-dashboards', - ...options -}); - -/** - * Get all dashboards tags of an organization. - * - * @deprecated - */ -export const getDashboardTags = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/dashboards/tags', - ...options -}); - -/** - * Get public dashboard by dashboardUid - */ -export const getPublicDashboard = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/dashboards/uid/{dashboardUid}/public-dashboards', - ...options -}); - -/** - * Create public dashboard for a dashboard - */ -export const createPublicDashboard = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/dashboards/uid/{dashboardUid}/public-dashboards', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Delete public dashboard for a dashboard - */ -export const deletePublicDashboard = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/dashboards/uid/{dashboardUid}/public-dashboards/{uid}', - ...options -}); - -/** - * Update public dashboard for a dashboard - */ -export const updatePublicDashboard = (options: Options) => (options.client ?? client).patch({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/dashboards/uid/{dashboardUid}/public-dashboards/{uid}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Delete dashboard by uid. - * - * Will delete the dashboard given the specified unique identifier (uid). - * - * Use: /apis/dashboards.grafana.app/v1/namespaces/{ns}/dashboards/{uid} - * - * @deprecated - */ -export const deleteDashboardByUid = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/dashboards/uid/{uid}', - ...options -}); - -/** - * Get dashboard by uid. - * - * Optional query parameter `apiVersion` selects the Kubernetes API version used to load the dashboard first - * (for example `v1beta1`). If that request fails, the default version is used instead. When omitted, only the default is used. - * - * Will return the dashboard given the dashboard unique identifier (uid). - * - * Use: /apis/dashboards.grafana.app/v1/namespaces/{ns}/dashboards/{uid} - * - * @deprecated - */ -export const getDashboardByUid = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/dashboards/uid/{uid}', - ...options -}); - -/** - * Gets all existing permissions for the given dashboard. - * - * Use: /apis/dashboards.grafana.app/v1/namespaces/{ns}/dashboards/{uid}/access - * - * @deprecated - */ -export const getDashboardPermissionsListByUid = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/dashboards/uid/{uid}/permissions', - ...options -}); - -/** - * Updates permissions for a dashboard. - * - * This operation will remove existing permissions if they’re not included in the request. - * - * @deprecated - */ -export const updateDashboardPermissionsByUid = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/dashboards/uid/{uid}/permissions', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Restore a dashboard to a given dashboard version using UID. - * - * This API will be removed when /apis/dashboards.grafana.app/v1 is released. - * You can restore a dashboard by reading it from history, then creating it again. - * - * @deprecated - */ -export const restoreDashboardVersionByUid = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/dashboards/uid/{uid}/restore', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Gets all existing versions for the dashboard using UID. - * - * @deprecated - */ -export const getDashboardVersionsByUid = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/dashboards/uid/{uid}/versions', - ...options -}); - -/** - * Get a specific dashboard version using UID. - * - * @deprecated - */ -export const getDashboardVersionByUid = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/dashboards/uid/{uid}/versions/{DashboardVersionID}', - ...options -}); - -/** - * Get all data sources. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled - * you need to have a permission with action: `datasources:read` and scope: `datasources:*`. - */ -export const getDataSources = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources', - ...options -}); - -/** - * Create a data source. - * - * By defining `password` and `basicAuthPassword` under secureJsonData property - * Grafana encrypts them securely as an encrypted blob in the database. - * The response then lists the encrypted fields under secureJsonFields. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled - * you need to have a permission with action: `datasources:create` - */ -export const addDataSource = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Gets all correlations. - */ -export const getCorrelations = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources/correlations', - ...options -}); - -/** - * Get data source Id by Name. This function will be removed in the future. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled - * you need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:name:*` and `datasources:name:test_datasource` (single data source). - * - * @deprecated - */ -export const getDataSourceIdByName = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources/id/{name}', - ...options -}); - -/** - * Delete an existing data source by name. This function will be removed in the future. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled - * you need to have a permission with action: `datasources:delete` and scopes: `datasources:*`, `datasources:name:*` and `datasources:name:test_datasource` (single data source). - * - * @deprecated - */ -export const deleteDataSourceByName = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources/name/{name}', - ...options -}); - -/** - * Get a single data source by Name. This function will be removed in the future. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled - * you need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:name:*` and `datasources:name:test_datasource` (single data source). - * - * @deprecated - */ -export const getDataSourceByName = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources/name/{name}', - ...options -}); - -/** - * Data source proxy DELETE calls. - * - * Proxies all calls to the actual data source. - */ -export const datasourceProxyDeleteByUiDcalls = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources/proxy/uid/{uid}/{datasource_proxy_route}', - ...options -}); - -/** - * Data source proxy GET calls. - * - * Proxies all calls to the actual data source. - */ -export const datasourceProxyGetByUiDcalls = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources/proxy/uid/{uid}/{datasource_proxy_route}', - ...options -}); - -/** - * Data source proxy POST calls. - * - * Proxies all calls to the actual data source. The data source should support POST methods for the specific path and role as defined - */ -export const datasourceProxyPostByUiDcalls = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources/proxy/uid/{uid}/{datasource_proxy_route}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Gets all correlations originating from the given data source. - */ -export const getCorrelationsBySourceUid = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources/uid/{sourceUID}/correlations', - ...options -}); - -/** - * Add correlation. - */ -export const createCorrelation = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources/uid/{sourceUID}/correlations', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Gets a correlation. - */ -export const getCorrelation = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources/uid/{sourceUID}/correlations/{correlationUID}', - ...options -}); - -/** - * Updates a correlation. - */ -export const updateCorrelation = (options: Options) => (options.client ?? client).patch({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources/uid/{sourceUID}/correlations/{correlationUID}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Delete an existing data source by UID. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled - * you need to have a permission with action: `datasources:delete` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:kLtEtcRGk` (single data source). - */ -export const deleteDataSourceByUid = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources/uid/{uid}', - ...options -}); - -/** - * Get a single data source by UID. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled - * you need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:kLtEtcRGk` (single data source). - */ -export const getDataSourceByUid = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources/uid/{uid}', - ...options -}); - -/** - * Update an existing data source. - * - * Similar to creating a data source, `password` and `basicAuthPassword` should be defined under - * secureJsonData in order to be stored securely as an encrypted blob in the database. Then, the - * encrypted fields are listed under secureJsonFields section in the response. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled - * you need to have a permission with action: `datasources:write` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:1` (single data source). - */ -export const updateDataSourceByUid = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources/uid/{uid}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Delete a correlation. - */ -export const deleteCorrelation = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources/uid/{uid}/correlations/{correlationUID}', - ...options -}); - -/** - * Sends a health check request to the plugin datasource identified by the UID. - */ -export const checkDatasourceHealthWithUid = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources/uid/{uid}/health', - ...options -}); - -/** - * Retrieves LBAC rules for a team. - */ -export const getTeamLbacRulesApi = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources/uid/{uid}/lbac/teams', - ...options -}); - -/** - * Updates LBAC rules for a team. - */ -export const updateTeamLbacRulesApi = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources/uid/{uid}/lbac/teams', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Fetch data source resources. - */ -export const callDatasourceResourceWithUid = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources/uid/{uid}/resources/{datasource_proxy_route}', - ...options -}); - -/** - * get cache config for a single data source - */ -export const getDataSourceCacheConfig = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources/{dataSourceUID}/cache', - ...options -}); - -/** - * set cache config for a single data source - */ -export const setDataSourceCacheConfig = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources/{dataSourceUID}/cache', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * clean cache for a single data source - */ -export const cleanDataSourceCache = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources/{dataSourceUID}/cache/clean', - ...options -}); - -/** - * disable cache for a single data source - */ -export const disableDataSourceCache = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources/{dataSourceUID}/cache/disable', - ...options -}); - -/** - * enable cache for a single data source - */ -export const enableDataSourceCache = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/datasources/{dataSourceUID}/cache/enable', - ...options -}); - -/** - * DataSource query metrics with expressions. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled - * you need to have a permission with action: `datasources:query`. - */ -export const queryMetricsWithExpressions = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/ds/query', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Get all folders. - * - * It returns all folders that the authenticated user has permission to view. - * If nested folders are enabled, it expects an additional query parameter with the parent folder UID - * and returns the immediate subfolders that the authenticated user has permission to view. - * If the parameter is not supplied then it returns immediate subfolders under the root - * that the authenticated user has permission to view. - * - * Use: /apis/folder.grafana.app/v1/namespaces/{ns}/folders - * - * @deprecated - */ -export const getFolders = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/folders', - ...options -}); - -/** - * Create folder. - * - * If nested folders are enabled then it additionally expects the parent folder UID. - * - * Use: /apis/folder.grafana.app/v1/namespaces/{ns}/folders/{folder_uid} - * - * @deprecated - */ -export const createFolder = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/folders', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Delete folder. - * - * Deletes an existing folder identified by UID along with all dashboards (and their alerts) stored in the folder. This operation cannot be reverted. - * If nested folders are enabled then it also deletes all the subfolders. - * - * Use: /apis/folder.grafana.app/v1/namespaces/{ns}/folders/{folder_uid} - * - * @deprecated - */ -export const deleteFolder = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/folders/{folder_uid}', - ...options -}); - -/** - * Get folder by uid. - * - * Use: /apis/folder.grafana.app/v1/namespaces/{ns}/folders/{folder_uid} - * - * @deprecated - */ -export const getFolderByUid = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/folders/{folder_uid}', - ...options -}); - -/** - * Update folder. - * - * Use: /apis/folder.grafana.app/v1/namespaces/{ns}/folders/{folder_uid} - * - * @deprecated - */ -export const updateFolder = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/folders/{folder_uid}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Gets the count of each descendant of a folder by kind. The folder is identified by UID. - * - * Use: /apis/folder.grafana.app/v1/namespaces/{ns}/folders/{folder_uid} - * - * @deprecated - */ -export const getFolderDescendantCounts = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/folders/{folder_uid}/counts', - ...options -}); - -/** - * Move folder. - * - * Use: /apis/folder.grafana.app/v1/namespaces/{ns}/folders/{folder_uid}, - * Changing the parent folder annotation - * - * @deprecated - */ -export const moveFolder = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/folders/{folder_uid}/move', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Gets all existing permissions for the folder with the given `uid`. - * - * @deprecated - */ -export const getFolderPermissionList = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/folders/{folder_uid}/permissions', - ...options -}); - -/** - * Updates permissions for a folder. This operation will remove existing permissions if they’re not included in the request. - */ -export const updateFolderPermissions = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/folders/{folder_uid}/permissions', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * List groups that have mappings set. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental. - */ -export const getMappedGroups = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/groupsync/groups', - ...options -}); - -/** - * Delete mappings for a group. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental. - */ -export const deleteGroupMappings = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/groupsync/groups/{group_id}', - ...options -}); - -/** - * Create mappings for a group. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental. - */ -export const createGroupMappings = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/groupsync/groups/{group_id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Update mappings for a group. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental. - */ -export const updateGroupMappings = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/groupsync/groups/{group_id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Get roles mapped to a group. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental. - */ -export const getGroupRoles = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/groupsync/groups/{group_id}/roles', - ...options -}); - -/** - * apiHealthHandler will return ok if Grafana's web server is running and it - * can access the database. If the database cannot be accessed it will return - * http status code 503. - */ -export const getHealth = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/health', - ...options -}); - -/** - * Get all library elements. - * - * Returns a list of all library elements the authenticated user has permission to view. - * Use the `perPage` query parameter to control the maximum number of library elements returned; the default limit is `100`. - * You can also use the `page` query parameter to fetch library elements from any page other than the first one. - */ -export const getLibraryElements = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/library-elements', - ...options -}); - -/** - * Create library element. - * - * Creates a new library element. - */ -export const createLibraryElement = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/library-elements', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Get library element by name. - * - * Returns a library element with the given name. - */ -export const getLibraryElementByName = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/library-elements/name/{library_element_name}', - ...options -}); - -/** - * Delete library element. - * - * Deletes an existing library element as specified by the UID. This operation cannot be reverted. - * You cannot delete a library element that is connected. This operation cannot be reverted. - */ -export const deleteLibraryElementByUid = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/library-elements/{library_element_uid}', - ...options -}); - -/** - * Get library element by UID. - * - * Returns a library element with the given UID. - */ -export const getLibraryElementByUid = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/library-elements/{library_element_uid}', - ...options -}); - -/** - * Update library element. - * - * Updates an existing library element identified by uid. - */ -export const updateLibraryElement = (options: Options) => (options.client ?? client).patch({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/library-elements/{library_element_uid}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Get library element connections. - * - * Returns a list of connections for a library element based on the UID specified. - */ -export const getLibraryElementConnections = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/library-elements/{library_element_uid}/connections/', - ...options -}); - -/** - * Check license availability. - */ -export const getStatus = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/licensing/check', - ...options -}); - -/** - * Get custom permissions report. - * - * You need to have a permission with action `licensing.reports:read`. - * - * @deprecated - */ -export const getCustomPermissionsReport = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/licensing/custom-permissions', - ...options -}); - -/** - * Get custom permissions report in CSV format. - * - * You need to have a permission with action `licensing.reports:read`. - * - * @deprecated - */ -export const getCustomPermissionsCsv = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/licensing/custom-permissions-csv', - ...options -}); - -/** - * Refresh license stats. - * - * You need to have a permission with action `licensing:read`. - */ -export const refreshLicenseStats = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/licensing/refresh-stats', - ...options -}); - -/** - * Remove license from database. - * - * Removes the license stored in the Grafana database. Available in Grafana Enterprise v7.4+. - * - * You need to have a permission with action `licensing:delete`. - */ -export const deleteLicenseToken = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/licensing/token', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Get license token. - * - * You need to have a permission with action `licensing:read`. - */ -export const getLicenseToken = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/licensing/token', - ...options -}); - -/** - * Create license token. - * - * You need to have a permission with action `licensing:write`. - */ -export const postLicenseToken = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/licensing/token', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Manually force license refresh. - * - * Manually ask license issuer for a new token. Available in Grafana Enterprise v7.4+. - * - * You need to have a permission with action `licensing:write`. - */ -export const postRenewLicenseToken = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/licensing/token/renew', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * GetLogout initiates single logout process. - */ -export const getSamlLogout = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/logout/saml', - ...options -}); - -/** - * Get current Organization. - */ -export const getCurrentOrg = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/org', - ...options -}); - -/** - * Update current Organization. - */ -export const updateCurrentOrg = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/org', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Update current Organization's address. - */ -export const updateCurrentOrgAddress = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/org/address', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Get pending invites. - */ -export const getPendingOrgInvites = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/org/invites', - ...options -}); - -/** - * Add invite. - */ -export const addOrgInvite = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/org/invites', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Revoke invite. - */ -export const revokeInvite = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/org/invites/{invitation_code}/revoke', - ...options -}); - -/** - * Get Current Org Prefs. - */ -export const getOrgPreferences = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/org/preferences', - ...options -}); - -/** - * Patch Current Org Prefs. - */ -export const patchOrgPreferences = (options: Options) => (options.client ?? client).patch({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/org/preferences', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Update Current Org Prefs. - */ -export const updateOrgPreferences = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/org/preferences', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Fetch Organization quota. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `orgs.quotas:read` and scope `org:id:1` (orgIDScope). - */ -export const getCurrentOrgQuota = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/org/quotas', - ...options -}); - -/** - * Get all users within the current organization. - * - * Returns all org users within the current organization. Accessible to users with org admin role. - * If you are running Grafana Enterprise and have Fine-grained access control enabled - * you need to have a permission with action: `org.users:read` with scope `users:*`. - */ -export const getOrgUsersForCurrentOrg = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/org/users', - ...options -}); - -/** - * Add a new user to the current organization. - * - * Adds a global user to the current organization. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled - * you need to have a permission with action: `org.users:add` with scope `users:*`. - */ -export const addOrgUserToCurrentOrg = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/org/users', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Get all users within the current organization (lookup) - * - * Returns all org users within the current organization, but with less detailed information. - * Accessible to users with org admin role, admin in any folder or admin of any team. - * Mainly used by Grafana UI for providing list of users when adding team members and when editing folder/dashboard permissions. - */ -export const getOrgUsersForCurrentOrgLookup = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/org/users/lookup', - ...options -}); - -/** - * Delete user in current organization. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled - * you need to have a permission with action: `org.users:remove` with scope `users:*`. - */ -export const removeOrgUserForCurrentOrg = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/org/users/{user_id}', - ...options -}); - -/** - * Updates the given user. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled - * you need to have a permission with action: `org.users.role:update` with scope `users:*`. - */ -export const updateOrgUserForCurrentOrg = (options: Options) => (options.client ?? client).patch({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/org/users/{user_id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Search all Organizations. - */ -export const searchOrgs = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/orgs', - ...options -}); - -/** - * Create Organization. - * - * Only works if [users.allow_org_create](https://grafana.com/docs/grafana/latest/administration/configuration/#allow_org_create) is set. - */ -export const createOrg = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/orgs', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Get Organization by Name. - */ -export const getOrgByName = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/orgs/name/{org_name}', - ...options -}); - -/** - * Delete Organization. - */ -export const deleteOrgById = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/orgs/{org_id}', - ...options -}); - -/** - * Get Organization by ID. - */ -export const getOrgById = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/orgs/{org_id}', - ...options -}); - -/** - * Update Organization. - */ -export const updateOrg = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/orgs/{org_id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Update Organization's address. - */ -export const updateOrgAddress = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/orgs/{org_id}/address', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Fetch Organization quota. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `orgs.quotas:read` and scope `org:id:1` (orgIDScope). - */ -export const getOrgQuota = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/orgs/{org_id}/quotas', - ...options -}); - -/** - * Update user quota. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `orgs.quotas:write` and scope `org:id:1` (orgIDScope). - */ -export const updateOrgQuota = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/orgs/{org_id}/quotas/{quota_target}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Get Users in Organization. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled - * you need to have a permission with action: `org.users:read` with scope `users:*`. - */ -export const getOrgUsers = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/orgs/{org_id}/users', - ...options -}); - -/** - * Add a new user to the current organization. - * - * Adds a global user to the current organization. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled - * you need to have a permission with action: `org.users:add` with scope `users:*`. - */ -export const addOrgUser = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/orgs/{org_id}/users', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Search Users in Organization. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled - * you need to have a permission with action: `org.users:read` with scope `users:*`. - */ -export const searchOrgUsers = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/orgs/{org_id}/users/search', - ...options -}); - -/** - * Delete user in current organization. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled - * you need to have a permission with action: `org.users:remove` with scope `users:*`. - */ -export const removeOrgUser = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/orgs/{org_id}/users/{user_id}', - ...options -}); - -/** - * Update Users in Organization. - * - * If you are running Grafana Enterprise and have Fine-grained access control enabled - * you need to have a permission with action: `org.users.role:update` with scope `users:*`. - */ -export const updateOrgUser = (options: Options) => (options.client ?? client).patch({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/orgs/{org_id}/users/{user_id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Get playlists. - * - * Please refer to [new API](?api=playlist.grafana.app-v1). - * - * @deprecated - */ -export const searchPlaylists = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/playlists', - ...options -}); - -/** - * Create playlist. - * - * Please refer to [new API](?api=playlist.grafana.app-v1). - * - * @deprecated - */ -export const createPlaylist = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/playlists', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Delete playlist. - * - * Please refer to [new API](?api=playlist.grafana.app-v1). - * - * @deprecated - */ -export const deletePlaylist = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/playlists/{uid}', - ...options -}); - -/** - * Get playlist. - * - * Please refer to [new API](?api=playlist.grafana.app-v1). - * - * @deprecated - */ -export const getPlaylist = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/playlists/{uid}', - ...options -}); - -/** - * Update playlist. - * - * Please refer to [new API](?api=playlist.grafana.app-v1). - * - * @deprecated - */ -export const updatePlaylist = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/playlists/{uid}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Get playlist items. - * - * Please refer to [new API](?api=playlist.grafana.app-v1) instead (items are included in the playlist spec). - * - * @deprecated - */ -export const getPlaylistItems = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/playlists/{uid}/items', - ...options -}); - -/** - * Get public dashboard for view - */ -export const viewPublicDashboard = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/public/dashboards/{accessToken}', - ...options -}); - -/** - * Get annotations for a public dashboard - */ -export const getPublicAnnotations = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/public/dashboards/{accessToken}/annotations', - ...options -}); - -/** - * Get results for a given panel on a public dashboard - */ -export const queryPublicDashboard = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/public/dashboards/{accessToken}/panels/{panelId}/query', - ...options -}); - -/** - * Query history search. - * - * Returns a list of queries in the query history that matches the search criteria. - * Query history search supports pagination. Use the `limit` parameter to control the maximum number of queries returned; the default limit is 100. - * You can also use the `page` query parameter to fetch queries from any page other than the first one. - */ -export const searchQueries = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/query-history', - ...options -}); - -/** - * Add query to query history. - * - * Adds new query to query history. - */ -export const createQuery = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/query-history', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Remove star to query in query history. - * - * Removes star from query in query history as specified by the UID. - */ -export const unstarQuery = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/query-history/star/{query_history_uid}', - ...options -}); - -/** - * Add star to query in query history. - * - * Adds star to query in query history as specified by the UID. - */ -export const starQuery = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/query-history/star/{query_history_uid}', - ...options -}); - -/** - * Delete query in query history. - * - * Deletes an existing query in query history as specified by the UID. This operation cannot be reverted. - */ -export const deleteQuery = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/query-history/{query_history_uid}', - ...options -}); - -/** - * Update comment for query in query history. - * - * Updates comment for query in query history as specified by the UID. - */ -export const patchQueryComment = (options: Options) => (options.client ?? client).patch({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/query-history/{query_history_uid}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Lists all rules in the database: active or deleted. - */ -export const listRecordingRules = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/recording-rules', - ...options -}); - -/** - * Create a recording rule that is then registered and started. - */ -export const createRecordingRule = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/recording-rules', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Update the active status of a rule. - */ -export const updateRecordingRule = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/recording-rules', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Test a recording rule. - */ -export const testCreateRecordingRule = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/recording-rules/test', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Delete the remote write target. - */ -export const deleteRecordingRuleWriteTarget = (options?: Options) => (options?.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/recording-rules/writer', - ...options -}); - -/** - * Return the prometheus remote write target. - */ -export const getRecordingRuleWriteTarget = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/recording-rules/writer', - ...options -}); - -/** - * Create a remote write target. - * - * It returns a 422 if there is not an existing prometheus data source configured. - */ -export const createRecordingRuleWriteTarget = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/recording-rules/writer', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Delete removes the rule from the registry and stops it. - */ -export const deleteRecordingRule = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/recording-rules/{recordingRuleID}', - ...options -}); - -/** - * List reports. - * - * Available to org admins only and with a valid or expired license. - * - * You need to have a permission with action `reports:read` with scope `reports:*`. - */ -export const getReports = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/reports', - ...options -}); - -/** - * Create a report. - * - * Available to org admins only and with a valid license. - * - * You need to have a permission with action `reports.admin:create`. - */ -export const createReport = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/reports', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * List reports by dashboard uid. - * - * Available to org admins only and with a valid or expired license. - * - * You need to have a permission with action `reports:read` with scope `reports:*`. - */ -export const getReportsByDashboardUid = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/reports/dashboards/{uid}', - ...options -}); - -/** - * Send a report. - * - * Generate and send a report. This API waits for the report to be generated before returning. We recommend that you set the client’s timeout to at least 60 seconds. Available to org admins only and with a valid license. - * - * Only available in Grafana Enterprise v7.0+. - * This API endpoint is experimental and may be deprecated in a future release. On deprecation, a migration strategy will be provided and the endpoint will remain functional until the next major release of Grafana. - * - * You need to have a permission with action `reports:send`. - */ -export const sendReport = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/reports/email', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Get custom branding report image. - * - * Available to org admins only and with a valid or expired license. - * - * You need to have a permission with action `reports.settings:read`. - */ -export const getSettingsImage = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/reports/images/:image', - ...options -}); - -/** - * Download a CSV report. - * - * Available to all users and with a valid license. - */ -export const renderReportCsvs = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/reports/render/csvs', - ...options -}); - -/** - * Render report for multiple dashboards. - * - * Available to all users and with a valid license. - */ -export const renderReportPdfs = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/reports/render/pdfs', - ...options -}); - -/** - * Get report settings. - * - * Available to org admins only and with a valid or expired license. - * - * You need to have a permission with action `reports.settings:read`x. - */ -export const getReportSettings = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/reports/settings', - ...options -}); - -/** - * Save settings. - * - * Available to org admins only and with a valid or expired license. - * - * You need to have a permission with action `reports.settings:write`xx. - */ -export const saveReportSettings = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/reports/settings', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Send test report via email. - * - * Available to org admins only and with a valid license. - * - * You need to have a permission with action `reports:send`. - */ -export const sendTestEmail = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/reports/test-email', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Delete a report. - * - * Available to org admins only and with a valid or expired license. - * - * You need to have a permission with action `reports.delete` with scope `reports:id:`. - * - * Requesting reports using the internal id will stop workgin in the future - * Use the reporting apiserver to manage reports. See: /apis/reporting.grafana.app/ - * - * @deprecated - */ -export const deleteReport = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/reports/{id}', - ...options -}); - -/** - * Get a report. - * - * Available to org admins only and with a valid or expired license. - * - * You need to have a permission with action `reports:read` with scope `reports:id:`. - * - * Requesting reports using the internal id will stop workgin in the future - * Use the reporting apiserver to manage reports. See: /apis/reporting.grafana.app/ - * - * @deprecated - */ -export const getReport = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/reports/{id}', - ...options -}); - -/** - * Update a report. - * - * Available to org admins only and with a valid or expired license. - * - * You need to have a permission with action `reports.admin:write` with scope `reports:id:`. - * - * Requesting reports using the internal id will stop workgin in the future - * Use the reporting apiserver to manage reports. See: /apis/reporting.grafana.app/ - * - * @deprecated - */ -export const updateReport = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/reports/{id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * It performs Assertion Consumer Service (ACS). - */ -export const postAcs = (options?: Options) => (options?.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/saml/acs', - ...options -}); - -/** - * It exposes the SP (Grafana's) metadata for the IdP's consumption. - */ -export const getMetadata = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/saml/metadata', - ...options -}); - -/** - * It performs Single Logout (SLO) callback. - * - * There might be two possible requests: - * 1. Logout response (callback) when Grafana initiates single logout and IdP returns response to logout request. - * 2. Logout request when another SP initiates single logout and IdP sends logout request to the Grafana, - * or in case of IdP-initiated logout. - */ -export const getSlo = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/saml/slo', - ...options -}); - -/** - * It performs Single Logout (SLO) callback. - * - * There might be two possible requests: - * 1. Logout response (callback) when Grafana initiates single logout and IdP returns response to logout request. - * 2. Logout request when another SP initiates single logout and IdP sends logout request to the Grafana, - * or in case of IdP-initiated logout. - */ -export const postSlo = (options?: Options) => (options?.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/saml/slo', - ...options -}); - -export const search = (options?: Options) => (options?.client ?? client).get({ - querySerializer: { parameters: { - dashboardIds: { array: { explode: false } }, - dashboardUIDs: { array: { explode: false } }, - folderIds: { array: { explode: false } }, - folderUIDs: { array: { explode: false } } - } }, - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/search', - ...options -}); - -/** - * List search sorting options. - */ -export const listSortOptions = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/search/sorting', - ...options -}); - -/** - * Create service account - * - * Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation): - * action: `serviceaccounts:write` scope: `serviceaccounts:*` - * - * Requires basic authentication and that the authenticated user is a Grafana Admin. - */ -export const createServiceAccount = (options?: Options) => (options?.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/serviceaccounts', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options?.headers - } -}); - -/** - * Search service accounts with paging - * - * Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation): - * action: `serviceaccounts:read` scope: `serviceaccounts:*` - */ -export const searchOrgServiceAccountsWithPaging = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/serviceaccounts/search', - ...options -}); - -/** - * Delete service account - * - * Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation): - * action: `serviceaccounts:delete` scope: `serviceaccounts:id:1` (single service account) - */ -export const deleteServiceAccount = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/serviceaccounts/{serviceAccountId}', - ...options -}); - -/** - * Get single serviceaccount by Id - * - * Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation): - * action: `serviceaccounts:read` scope: `serviceaccounts:id:1` (single service account) - */ -export const retrieveServiceAccount = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/serviceaccounts/{serviceAccountId}', - ...options -}); - -/** - * Update service account - * - * Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation): - * action: `serviceaccounts:write` scope: `serviceaccounts:id:1` (single service account) - */ -export const updateServiceAccount = (options: Options) => (options.client ?? client).patch({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/serviceaccounts/{serviceAccountId}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Get service account tokens - * - * Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation): - * action: `serviceaccounts:read` scope: `global:serviceaccounts:id:1` (single service account) - * - * Requires basic authentication and that the authenticated user is a Grafana Admin. - */ -export const listTokens = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/serviceaccounts/{serviceAccountId}/tokens', - ...options -}); - -/** - * CreateNewToken adds a token to a service account - * - * Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation): - * action: `serviceaccounts:write` scope: `serviceaccounts:id:1` (single service account) - */ -export const createToken = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/serviceaccounts/{serviceAccountId}/tokens', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * DeleteToken deletes service account tokens - * - * Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation): - * action: `serviceaccounts:write` scope: `serviceaccounts:id:1` (single service account) - * - * Requires basic authentication and that the authenticated user is a Grafana Admin. - */ -export const deleteToken = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/serviceaccounts/{serviceAccountId}/tokens/{tokenId}', - ...options -}); - -/** - * Get JSON Web Key Set (JWKS) with all the keys that can be used to verify tokens (public keys) - * - * Required permissions - * None - */ -export const retrieveJwks = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/signing-keys/keys', - ...options -}); - -/** - * Get snapshot sharing settings. - */ -export const getSharingOptions = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/snapshot/shared-options', - ...options -}); - -/** - * When creating a snapshot using the API, you have to provide the full dashboard payload including the snapshot data. This endpoint is designed for the Grafana UI. - * - * Snapshot public mode should be enabled or authentication is required. - */ -export const createDashboardSnapshot = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/snapshots', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Delete Snapshot by deleteKey. - * - * Snapshot public mode should be enabled or authentication is required. - */ -export const deleteDashboardSnapshotByDeleteKey = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/snapshots-delete/{deleteKey}', - ...options -}); - -/** - * Delete Snapshot by Key. - */ -export const deleteDashboardSnapshot = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/snapshots/{key}', - ...options -}); - -/** - * Get Snapshot by Key. - */ -export const getDashboardSnapshot = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/snapshots/{key}', - ...options -}); - -/** - * Add Team. - */ -export const createTeam = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/teams', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Team Search With Paging. - */ -export const searchTeams = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/teams/search', - ...options -}); - -/** - * Remove External Group. - */ -export const removeTeamGroupApiQuery = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/teams/{teamId}/groups', - ...options -}); - -/** - * Get External Groups. - */ -export const getTeamGroupsApi = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/teams/{teamId}/groups', - ...options -}); - -/** - * Add External Group. - */ -export const addTeamGroupApi = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/teams/{teamId}/groups', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Search for team groups with optional filtering and pagination. - */ -export const searchTeamGroups = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/teams/{teamId}/groups/search', - ...options -}); - -/** - * Delete Team By ID. - */ -export const deleteTeamById = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/teams/{team_id}', - ...options -}); - -/** - * Get Team By ID. - */ -export const getTeamById = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/teams/{team_id}', - ...options -}); - -/** - * Update Team. - */ -export const updateTeam = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/teams/{team_id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Get Team Members. - */ -export const getTeamMembers = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/teams/{team_id}/members', - ...options -}); - -/** - * Add Team Member. - */ -export const addTeamMember = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/teams/{team_id}/members', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Set team memberships. - * - * Takes user emails, and updates team members and admins to the provided lists of users. - * Any current team members and admins not in the provided lists will be removed. - */ -export const setTeamMemberships = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/teams/{team_id}/members', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Remove Member From Team. - */ -export const removeTeamMember = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/teams/{team_id}/members/{user_id}', - ...options -}); - -/** - * Update Team Member. - */ -export const updateTeamMember = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/teams/{team_id}/members/{user_id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Get Team Preferences. - */ -export const getTeamPreferences = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/teams/{team_id}/preferences', - ...options -}); - -/** - * Update Team Preferences. - */ -export const updateTeamPreferences = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/teams/{team_id}/preferences', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Get (current authenticated user) - */ -export const getSignedInUser = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/user', - ...options -}); - -/** - * Update signed in User. - */ -export const updateSignedInUser = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/user', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Auth tokens of the actual User. - * - * Return a list of all auth tokens (devices) that the actual user currently have logged in from. - */ -export const getUserAuthTokens = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/user/auth-tokens', - ...options -}); - -/** - * Update user email. - * - * Update the email of user given a verification code. - */ -export const updateUserEmail = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/user/email/update', - ...options -}); - -/** - * Clear user help flag. - */ -export const clearHelpFlags = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/user/helpflags/clear', - ...options -}); - -/** - * Set user help flag. - */ -export const setHelpFlag = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/user/helpflags/{flag_id}', - ...options -}); - -/** - * Organizations of the actual User. - * - * Return a list of all organizations of the current user. - */ -export const getSignedInUserOrgList = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/user/orgs', - ...options -}); - -/** - * Change Password. - * - * Changes the password for the user. - */ -export const changeUserPassword = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/user/password', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Get user preferences. - */ -export const getUserPreferences = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/user/preferences', - ...options -}); - -/** - * Patch user preferences. - */ -export const patchUserPreferences = (options: Options) => (options.client ?? client).patch({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/user/preferences', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Update user preferences. - * - * Omitting a key (`theme`, `homeDashboardUID`, `timezone`) will cause the current value to be replaced with the system default value. - */ -export const updateUserPreferences = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/user/preferences', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Fetch user quota. - */ -export const getUserQuotas = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/user/quotas', - ...options -}); - -/** - * Revoke an auth token of the actual User. - * - * Revokes the given auth token (device) for the actual user. User of issued auth token (device) will no longer be logged in and will be required to authenticate again upon next activity. - */ -export const revokeUserAuthToken = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/user/revoke-auth-token', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Unstar a dashboard. - * - * Deletes the starring of the given Dashboard for the actual user. - */ -export const unstarDashboardByUid = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/user/stars/dashboard/uid/{dashboard_uid}', - ...options -}); - -/** - * Star a dashboard. - * - * Stars the given Dashboard for the actual user. - */ -export const starDashboardByUid = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/user/stars/dashboard/uid/{dashboard_uid}', - ...options -}); - -/** - * Teams that the actual User is member of. - * - * Return a list of all teams that the current user is member of. - */ -export const getSignedInUserTeamList = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/user/teams', - ...options -}); - -/** - * Switch user context for signed in user. - * - * Switch user context to the given organization. - */ -export const userSetUsingOrg = (options: Options) => (options.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/user/using/{org_id}', - ...options -}); - -/** - * Get users. - * - * Returns all users that the authenticated user has permission to view, admin permission required. - */ -export const searchUsers = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/users', - ...options -}); - -/** - * Get user by login or email. - */ -export const getUserByLoginOrEmail = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/users/lookup', - ...options -}); - -/** - * Get users with paging. - */ -export const searchUsersWithPaging = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/users/search', - ...options -}); - -/** - * Get user by id. - */ -export const getUserById = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/users/{user_id}', - ...options -}); - -/** - * Update user. - * - * Update the user identified by id. - */ -export const updateUser = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/users/{user_id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Get organizations for user. - * - * Get organizations for user identified by id. - */ -export const getUserOrgList = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/users/{user_id}/orgs', - ...options -}); - -/** - * Get teams for user. - * - * Get teams for user identified by id. - */ -export const getUserTeams = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/users/{user_id}/teams', - ...options -}); - -/** - * Get all the alert rules. - * - * @deprecated - */ -export const routeGetAlertRules = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/alert-rules', - ...options -}); - -/** - * Create a new alert rule. - * - * @deprecated - */ -export const routePostAlertRule = (options?: Options) => (options?.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/alert-rules', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options?.headers - } -}); - -/** - * Export all alert rules in provisioning file format. - */ -export const routeGetAlertRulesExport = (options?: Options) => (options?.client ?? client).get({ - querySerializer: { parameters: { folderUid: { array: { explode: false } } } }, - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/alert-rules/export', - ...options -}); - -/** - * Delete a specific alert rule by UID. - * - * @deprecated - */ -export const routeDeleteAlertRule = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/alert-rules/{UID}', - ...options -}); - -/** - * Get a specific alert rule by UID. - * - * @deprecated - */ -export const routeGetAlertRule = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/alert-rules/{UID}', - ...options -}); - -/** - * Update an existing alert rule. - * - * @deprecated - */ -export const routePutAlertRule = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/alert-rules/{UID}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Export an alert rule in provisioning file format. - */ -export const routeGetAlertRuleExport = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/alert-rules/{UID}/export', - ...options -}); - -/** - * Get all the contact points. - * - * @deprecated - */ -export const routeGetContactpoints = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/contact-points', - ...options -}); - -/** - * Create a contact point. - * - * @deprecated - */ -export const routePostContactpoints = (options?: Options) => (options?.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/contact-points', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options?.headers - } -}); - -/** - * Export all contact points in provisioning file format. - */ -export const routeGetContactpointsExport = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/contact-points/export', - ...options -}); - -/** - * Delete a contact point. - * - * @deprecated - */ -export const routeDeleteContactpoints = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/contact-points/{UID}', - ...options -}); - -/** - * Update an existing contact point. - * - * @deprecated - */ -export const routePutContactpoint = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/contact-points/{UID}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Delete rule group - * - * @deprecated - */ -export const routeDeleteAlertRuleGroup = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}', - ...options -}); - -/** - * Get a rule group. - * - * @deprecated - */ -export const routeGetAlertRuleGroup = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}', - ...options -}); - -/** - * Create or update alert rule group. - * - * @deprecated - */ -export const routePutAlertRuleGroup = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Export an alert rule group in provisioning file format. - */ -export const routeGetAlertRuleGroupExport = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}/export', - ...options -}); - -/** - * Get all the mute timings. - * - * @deprecated - */ -export const routeGetMuteTimings = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/mute-timings', - ...options -}); - -/** - * Create a new mute timing. - * - * @deprecated - */ -export const routePostMuteTiming = (options?: Options) => (options?.client ?? client).post({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/mute-timings', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options?.headers - } -}); - -/** - * Export all mute timings in provisioning format. - */ -export const routeExportMuteTimings = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/mute-timings/export', - ...options -}); - -/** - * Delete a mute timing. - * - * @deprecated - */ -export const routeDeleteMuteTiming = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/mute-timings/{name}', - ...options -}); - -/** - * Get a mute timing. - * - * @deprecated - */ -export const routeGetMuteTiming = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/mute-timings/{name}', - ...options -}); - -/** - * Replace an existing mute timing. - * - * @deprecated - */ -export const routePutMuteTiming = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/mute-timings/{name}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Export a mute timing in provisioning format. - */ -export const routeExportMuteTiming = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/mute-timings/{name}/export', - ...options -}); - -/** - * Clears the notification policy tree. - * - * @deprecated - */ -export const routeResetPolicyTree = (options?: Options) => (options?.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/policies', - ...options -}); - -/** - * Get the notification policy tree. - * - * @deprecated - */ -export const routeGetPolicyTree = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/policies', - ...options -}); - -/** - * Sets the notification policy tree. - * - * @deprecated - */ -export const routePutPolicyTree = (options?: Options) => (options?.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/policies', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options?.headers - } -}); - -/** - * Export the notification policy tree in provisioning file format. - */ -export const routeGetPolicyTreeExport = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/policies/export', - ...options -}); - -/** - * Get all notification template groups. - * - * @deprecated - */ -export const routeGetTemplates = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/templates', - ...options -}); - -/** - * Delete a notification template group. - * - * @deprecated - */ -export const routeDeleteTemplate = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/templates/{name}', - ...options -}); - -/** - * Get a notification template group. - * - * @deprecated - */ -export const routeGetTemplate = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/templates/{name}', - ...options -}); - -/** - * Updates an existing notification template group. - * - * @deprecated - */ -export const routePutTemplate = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/provisioning/templates/{name}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * List all SSO Settings entries - * - * You need to have a permission with action `settings:read` with scope `settings:auth.:*`. - */ -export const listAllProvidersSettings = (options?: Options) => (options?.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/sso-settings', - ...options -}); - -/** - * Remove SSO Settings - * - * Removes the SSO Settings for a provider. - * - * You need to have a permission with action `settings:write` and scope `settings:auth.:*`. - */ -export const removeProviderSettings = (options: Options) => (options.client ?? client).delete({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/sso-settings/{key}', - ...options -}); - -/** - * Get an SSO Settings entry by Key - * - * You need to have a permission with action `settings:read` with scope `settings:auth.:*`. - */ -export const getProviderSettings = (options: Options) => (options.client ?? client).get({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/sso-settings/{key}', - ...options -}); - -/** - * Patch SSO Settings - * - * Partially updates the SSO Settings for a provider. Only provided fields are updated. - * - * You need to have a permission with action `settings:write` and scope `settings:auth.:*`. - */ -export const patchProviderSettings = (options: Options) => (options.client ?? client).patch({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/sso-settings/{key}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Update SSO Settings - * - * Inserts or updates the SSO Settings for a provider. - * - * You need to have a permission with action `settings:write` and scope `settings:auth.:*`. - */ -export const updateProviderSettings = (options: Options) => (options.client ?? client).put({ - security: [{ scheme: 'basic', type: 'http' }, { name: 'Authorization', type: 'apiKey' }], - url: '/v1/sso-settings/{key}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); diff --git a/integrations/grafana/src/gen/grafana-legacy-client/types.gen.ts b/integrations/grafana/src/gen/grafana-legacy-client/types.gen.ts deleted file mode 100644 index 75aae364f64..00000000000 --- a/integrations/grafana/src/gen/grafana-legacy-client/types.gen.ts +++ /dev/null @@ -1,17954 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export type ClientOptions = { - baseUrl: `http://${string}/api` | `https://${string}/api` | (string & {}); -}; - -export type Ack = { - [key: string]: unknown; -}; - -/** - * ActiveSyncStatusDTO holds the information for LDAP background Sync - */ -export type ActiveSyncStatusDto = { - enabled?: boolean; - nextSync?: string; - prevSync?: SyncResult; - schedule?: string; -}; - -export type ActiveUserStats = { - active_admins_and_editors?: number; - active_anonymous_devices?: number; - active_users?: number; - active_viewers?: number; -}; - -/** - * Also acts as api DTO - */ -export type AddDataSourceCommand = { - access?: DsAccess; - basicAuth?: boolean; - basicAuthUser?: string; - database?: string; - isDefault?: boolean; - jsonData?: Json; - name?: string; - secureJsonData?: { - [key: string]: string; - }; - type?: string; - uid?: string; - url?: string; - user?: string; - withCredentials?: boolean; -}; - -export type AddInviteForm = { - loginOrEmail?: string; - name?: string; - role?: 'None' | 'Viewer' | 'Editor' | 'Admin'; - sendEmail?: boolean; -}; - -export type AddOrgUserCommand = { - loginOrEmail?: string; - role?: 'None' | 'Viewer' | 'Editor' | 'Admin'; -}; - -export type AddServiceAccountTokenCommand = { - name?: string; - secondsToLive?: number; -}; - -export type AddTeamMemberCommand = { - userId: number; -}; - -export type AddTeamRoleCommand = { - roleUid?: string; -}; - -export type AddUserRoleCommand = { - global?: boolean; - roleUid?: string; -}; - -export type Address = { - address1?: string; - address2?: string; - city?: string; - country?: string; - state?: string; - zipCode?: string; -}; - -export type AdminCreateUserForm = { - email?: string; - login?: string; - name?: string; - orgId?: number; - password?: Password; -}; - -export type AdminCreateUserResponse = { - id?: number; - message?: string; - uid?: string; -}; - -export type AdminStats = { - activeAdmins?: number; - activeDevices?: number; - activeEditors?: number; - activeSessions?: number; - activeUsers?: number; - activeViewers?: number; - admins?: number; - alerts?: number; - dailyActiveAdmins?: number; - dailyActiveEditors?: number; - dailyActiveSessions?: number; - dailyActiveUsers?: number; - dailyActiveViewers?: number; - dashboards?: number; - datasources?: number; - editors?: number; - monthlyActiveUsers?: number; - orgs?: number; - playlists?: number; - snapshots?: number; - stars?: number; - tags?: number; - users?: number; - viewers?: number; -}; - -export type AdminUpdateUserPasswordForm = { - password?: Password; -}; - -export type AdminUpdateUserPermissionsForm = { - isGrafanaAdmin?: boolean; -}; - -/** - * Alert has info for an alert. - */ -export type Alert = { - activeAt?: string; - annotations: Labels; - labels: Labels; - state: string; - value: string; -}; - -/** - * AlertDiscovery has info for all active alerts. - */ -export type AlertDiscovery = { - alerts: Array; -}; - -export type AlertInstancesResponse = { - /** - * Instances is an array of arrow encoded dataframes - * each frame has a single row, and a column for each instance (alert identified by unique labels) with a boolean value (firing/not firing) - */ - instances?: Array>; -}; - -/** - * AlertManager models a configured Alert Manager. - */ -export type AlertManager = { - url?: string; -}; - -export type AlertManagerNotReady = { - [key: string]: unknown; -}; - -/** - * AlertManagersResult contains the result from querying the alertmanagers endpoint. - */ -export type AlertManagersResult = { - activeAlertManagers?: Array; - droppedAlertManagers?: Array; -}; - -/** - * AlertQuery represents a single query associated with an alert definition. - */ -export type AlertQuery = { - /** - * Grafana data source unique identifier; it should be '__expr__' for a Server Side Expression operation. - */ - datasourceUid?: string; - /** - * JSON is the raw JSON query and includes the above properties as well as custom properties. - */ - model?: { - [key: string]: unknown; - }; - /** - * QueryType is an optional identifier for the type of query. - * It can be used to distinguish different types of queries. - */ - queryType?: string; - /** - * RefID is the unique identifier of the query, set by the frontend call. - */ - refId?: string; - relativeTimeRange?: RelativeTimeRange; -}; - -/** - * AlertQueryExport is the provisioned export of models.AlertQuery. - */ -export type AlertQueryExport = { - datasourceUid?: string; - model?: { - [key: string]: unknown; - }; - queryType?: string; - refId?: string; - relativeTimeRange?: RelativeTimeRangeExport; -}; - -export type AlertResponse = { - data?: AlertDiscovery; - error?: string; - errorType?: ErrorType; - status: string; -}; - -export type AlertRuleEditorSettings = { - simplified_notifications_section?: boolean; - simplified_query_and_expressions_section?: boolean; -}; - -/** - * AlertRuleExport is the provisioned file export of models.AlertRule. - */ -export type AlertRuleExport = { - annotations?: { - [key: string]: string; - }; - condition?: string; - dashboardUid?: string; - data?: Array; - execErrState?: 'OK' | 'Alerting' | 'Error'; - for?: Duration; - isPaused?: boolean; - keepFiringFor?: Duration; - labels?: { - [key: string]: string; - }; - missing_series_evals_to_resolve?: number; - noDataState?: 'Alerting' | 'NoData' | 'OK'; - notification_settings?: AlertRuleNotificationSettingsExport; - panelId?: number; - record?: AlertRuleRecordExport; - title?: string; - uid?: string; -}; - -export type AlertRuleGroup = { - folderUid?: string; - interval?: number; - rules?: Array; - title?: string; -}; - -/** - * AlertRuleGroupExport is the provisioned file export of AlertRuleGroupV1. - */ -export type AlertRuleGroupExport = { - folder?: string; - interval?: Duration; - name?: string; - orgId?: number; - rules?: Array; -}; - -export type AlertRuleGroupMetadata = { - interval?: number; -}; - -export type AlertRuleMetadata = { - editor_settings?: AlertRuleEditorSettings; -}; - -export type AlertRuleNotificationSettings = { - /** - * Override the times when notifications should not be muted. These must match the name of a mute time interval defined - * in the alertmanager configuration time_intervals section. All notifications will be suppressed unless they are sent - * at the time that matches any interval. - */ - active_time_intervals?: Array; - /** - * Override the labels by which incoming alerts are grouped together. For example, multiple alerts coming in for - * cluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels - * use the special value '...' as the sole label name. - * This effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what - * you want, unless you have a very low alert volume or your upstream notification system performs its own grouping. - * Must include 'alertname' and 'grafana_folder' if not using '...'. - */ - group_by?: Array; - /** - * Override how long to wait before sending a notification about new alerts that are added to a group of alerts for - * which an initial notification has already been sent. (Usually ~5m or more.) - */ - group_interval?: string; - /** - * Override how long to initially wait to send a notification for a group of alerts. Allows to wait for an - * inhibiting alert to arrive or collect more initial alerts for the same group. (Usually ~0s to few minutes.) - */ - group_wait?: string; - /** - * Override the times when notifications should be muted. These must match the name of a mute time interval defined - * in the alertmanager configuration time_intervals section. When muted it will not send any notifications, but - * otherwise acts normally. - */ - mute_time_intervals?: Array; - /** - * Name of the receiver to send notifications to. - */ - receiver: string; - /** - * Override how long to wait before sending a notification again if it has already been sent successfully for an - * alert. (Usually ~3h or more). - * Note that this parameter is implicitly bound by Alertmanager's `--data.retention` configuration flag. - * Notifications will be resent after either repeat_interval or the data retention period have passed, whichever - * occurs first. `repeat_interval` should not be less than `group_interval`. - */ - repeat_interval?: string; -}; - -/** - * AlertRuleNotificationSettingsExport is the provisioned export of models.NotificationSettings. - */ -export type AlertRuleNotificationSettingsExport = { - active_time_intervals?: Array; - group_by?: Array; - group_interval?: string; - group_wait?: string; - mute_time_intervals?: Array; - receiver?: string; - repeat_interval?: string; -}; - -/** - * Record is the provisioned export of models.Record. - */ -export type AlertRuleRecordExport = { - from?: string; - metric?: string; - targetDatasourceUid?: string; -}; - -/** - * AlertingFileExport is the full provisioned file export. - */ -export type AlertingFileExport = { - apiVersion?: number; - contactPoints?: Array; - groups?: Array; - muteTimes?: Array; - policies?: Array; -}; - -/** - * adapted from cortex - */ -export type AlertingRule = { - activeAt: string; - alerts?: Array; - annotations: Labels; - duration?: number; - evaluationTime?: number; - folderUid?: string; - health: string; - isPaused?: boolean; - keepFiringFor?: number; - labels?: Labels; - lastError?: string; - lastEvaluation?: string; - name: string; - notificationSettings?: AlertRuleNotificationSettings; - provenance?: Provenance; - queriedDatasourceUIDs?: Array; - query: string; - /** - * State can be "pending", "firing", "inactive". - */ - state: string; - totals?: { - [key: string]: number; - }; - totalsFiltered?: { - [key: string]: number; - }; - type: string; - uid?: string; -}; - -export type AlertingStatus = { - alertmanagersChoice?: 'all' | 'internal' | 'external'; - numExternalAlertmanagers?: number; -}; - -export type AlertmanagerUserConfig = { - /** - * Configuration for Alertmanager in YAML format. - * in: body - */ - alertmanager_config?: string; - template_files?: { - [key: string]: string; - }; -}; - -export type Annotation = { - alertId?: number; - alertName?: string; - avatarUrl?: string; - created?: number; - /** - * Deprecated: Use DashboardUID and OrgID instead - */ - dashboardId?: number; - dashboardUID?: string; - data?: Json; - email?: string; - id?: number; - login?: string; - newState?: string; - panelId?: number; - prevState?: string; - tags?: Array; - text?: string; - time?: number; - timeEnd?: number; - updated?: number; - userId?: number; - userUID?: string; -}; - -/** - * +k8s:deepcopy-gen=true - */ -export type AnnotationActions = { - canAdd?: boolean; - canDelete?: boolean; - canEdit?: boolean; -}; - -export type AnnotationEvent = { - color?: string; - dashboardId?: number; - dashboardUID?: string; - id?: number; - isRegion?: boolean; - panelId?: number; - source?: AnnotationQuery; - tags?: Array; - text?: string; - time?: number; - timeEnd?: number; -}; - -export type AnnotationPanelFilter = { - /** - * Should the specified panels be included or excluded - */ - exclude?: boolean; - /** - * Panel IDs that should be included or excluded - */ - ids?: Array; -}; - -/** - * +k8s:deepcopy-gen=true - */ -export type AnnotationPermission = { - dashboard?: AnnotationActions; -}; - -/** - * TODO docs - * FROM: AnnotationQuery in grafana-data/src/types/annotations.ts - */ -export type AnnotationQuery = { - /** - * Set to 1 for the standard annotation query all dashboards have by default. - */ - builtIn?: number; - datasource?: DataSourceRef; - /** - * When enabled the annotation query is issued with every dashboard refresh - */ - enable?: boolean; - filter?: AnnotationPanelFilter; - /** - * Annotation queries can be toggled on or off at the top of the dashboard. - * When hide is true, the toggle is not shown in the dashboard. - */ - hide?: boolean; - /** - * Color to use for the annotation event markers - */ - iconColor?: string; - /** - * Name of annotation. - */ - name?: string; - /** - * Placement can be used to display the annotation query somewhere else on the dashboard other than the default location. - */ - placement?: string; - target?: AnnotationTarget; - /** - * TODO -- this should not exist here, it is based on the --grafana-- datasource - */ - type?: string; -}; - -/** - * TODO: this should be a regular DataQuery that depends on the selected dashboard - * these match the properties of the "grafana" datasouce that is default in most dashboards - */ -export type AnnotationTarget = { - /** - * Only required/valid for the grafana datasource... - * but code+tests is already depending on it so hard to change - */ - limit?: number; - /** - * Only required/valid for the grafana datasource... - * but code+tests is already depending on it so hard to change - */ - matchAny?: boolean; - /** - * Only required/valid for the grafana datasource... - * but code+tests is already depending on it so hard to change - */ - tags?: Array; - /** - * Only required/valid for the grafana datasource... - * but code+tests is already depending on it so hard to change - */ - type?: string; -}; - -export type ApiRuleNode = { - alert?: string; - annotations?: { - [key: string]: string; - }; - expr?: string; - for?: string; - keep_firing_for?: string; - labels?: { - [key: string]: string; - }; - record?: string; -}; - -export type Assignments = { - builtInRoles?: boolean; - serviceAccounts?: boolean; - teams?: boolean; - users?: boolean; -}; - -/** - * AttributeTypeAndValue mirrors the ASN.1 structure of the same name in - * RFC 5280, Section 4.1.2.4. - */ -export type AttributeTypeAndValue = { - Type?: ObjectIdentifier; - Value?: unknown; -}; - -/** - * Authorization contains HTTP authorization credentials. - */ -export type Authorization = { - credentials?: Secret; - credentials_file?: string; - /** - * CredentialsRef is the name of the secret within the secret manager to use as credentials. - */ - credentials_ref?: string; - type?: string; -}; - -export type BacktestConfig = { - condition?: string; - data?: Array; - exec_err_state?: 'OK' | 'Alerting' | 'Error'; - for?: string; - from?: string; - interval?: Duration; - keep_firing_for?: string; - labels?: { - [key: string]: string; - }; - missing_series_evals_to_resolve?: number; - namespace_uid?: string; - no_data_state?: 'Alerting' | 'NoData' | 'OK'; - rule_group?: string; - title?: string; - to?: string; - uid?: string; -}; - -export type BacktestResult = Frame; - -/** - * BasicAuth contains basic HTTP authentication credentials. - */ -export type BasicAuth = { - password?: Secret; - password_file?: string; - /** - * PasswordRef is the name of the secret within the secret manager to use as the password. - */ - password_ref?: string; - username?: string; - username_file?: string; - /** - * UsernameRef is the name of the secret within the secret manager to use as the username. - */ - username_ref?: string; -}; - -/** - * Config defines the internal representation of a cache configuration, including fields not set by the API caller - */ -export type CacheConfig = { - created?: string; - /** - * Fields that can be set by the API caller - read/write - */ - dataSourceID?: number; - dataSourceUID?: string; - /** - * These are returned by the HTTP API, but are managed internally - read-only - * Note: 'created' and 'updated' are special properties managed automatically by xorm, but we are setting them manually - */ - defaultTTLMs?: number; - enabled?: boolean; - /** - * TTL MS, or "time to live", is how long a cached item will stay in the cache before it is removed (in milliseconds) - */ - ttlQueriesMs?: number; - ttlResourcesMs?: number; - updated?: string; - /** - * If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini - */ - useDefaultTTL?: boolean; -}; - -export type CacheConfigResponse = { - created?: string; - /** - * Fields that can be set by the API caller - read/write - */ - dataSourceID?: number; - dataSourceUID?: string; - /** - * These are returned by the HTTP API, but are managed internally - read-only - * Note: 'created' and 'updated' are special properties managed automatically by xorm, but we are setting them manually - */ - defaultTTLMs?: number; - enabled?: boolean; - message?: string; - /** - * TTL MS, or "time to live", is how long a cached item will stay in the cache before it is removed (in milliseconds) - */ - ttlQueriesMs?: number; - ttlResourcesMs?: number; - updated?: string; - /** - * If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini - */ - useDefaultTTL?: boolean; -}; - -/** - * ConfigSetter defines the cache parameters that users can configure per datasource - * This is only intended to be consumed by the SetCache HTTP Handler - */ -export type CacheConfigSetter = { - dataSourceID?: number; - dataSourceUID?: string; - enabled?: boolean; - /** - * TTL MS, or "time to live", is how long a cached item will stay in the cache before it is removed (in milliseconds) - */ - ttlQueriesMs?: number; - ttlResourcesMs?: number; - /** - * If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini - */ - useDefaultTTL?: boolean; -}; - -export type CalculateDiffTarget = { - dashboardId?: number; - unsavedDashboard?: Json; - version?: number; -}; - -/** - * A Certificate represents an X.509 certificate. - */ -export type Certificate = { - AuthorityKeyId?: Array; - /** - * BasicConstraintsValid indicates whether IsCA, MaxPathLen, - * and MaxPathLenZero are valid. - */ - BasicConstraintsValid?: boolean; - /** - * CRL Distribution Points - */ - CRLDistributionPoints?: Array; - /** - * Subject Alternate Name values. (Note that these values may not be valid - * if invalid values were contained within a parsed certificate. For - * example, an element of DNSNames may not be a valid DNS domain name.) - */ - DNSNames?: Array; - EmailAddresses?: Array; - ExcludedDNSDomains?: Array; - ExcludedEmailAddresses?: Array; - ExcludedIPRanges?: Array; - ExcludedURIDomains?: Array; - ExtKeyUsage?: Array; - /** - * Extensions contains raw X.509 extensions. When parsing certificates, - * this can be used to extract non-critical extensions that are not - * parsed by this package. When marshaling certificates, the Extensions - * field is ignored, see ExtraExtensions. - */ - Extensions?: Array; - /** - * ExtraExtensions contains extensions to be copied, raw, into any - * marshaled certificates. Values override any extensions that would - * otherwise be produced based on the other fields. The ExtraExtensions - * field is not populated when parsing certificates, see Extensions. - */ - ExtraExtensions?: Array; - IPAddresses?: Array; - /** - * InhibitAnyPolicy and InhibitAnyPolicyZero indicate the presence and value - * of the inhibitAnyPolicy extension. - * - * The value of InhibitAnyPolicy indicates the number of additional - * certificates in the path after this certificate that may use the - * anyPolicy policy OID to indicate a match with any other policy. - * - * When parsing a certificate, a positive non-zero InhibitAnyPolicy means - * that the field was specified, -1 means it was unset, and - * InhibitAnyPolicyZero being true mean that the field was explicitly set to - * zero. The case of InhibitAnyPolicy==0 with InhibitAnyPolicyZero==false - * should be treated equivalent to -1 (unset). - */ - InhibitAnyPolicy?: number; - /** - * InhibitAnyPolicyZero indicates that InhibitAnyPolicy==0 should be - * interpreted as an actual maximum path length of zero. Otherwise, that - * combination is interpreted as InhibitAnyPolicy not being set. - */ - InhibitAnyPolicyZero?: boolean; - /** - * InhibitPolicyMapping and InhibitPolicyMappingZero indicate the presence - * and value of the inhibitPolicyMapping field of the policyConstraints - * extension. - * - * The value of InhibitPolicyMapping indicates the number of additional - * certificates in the path after this certificate that may use policy - * mapping. - * - * When parsing a certificate, a positive non-zero InhibitPolicyMapping - * means that the field was specified, -1 means it was unset, and - * InhibitPolicyMappingZero being true mean that the field was explicitly - * set to zero. The case of InhibitPolicyMapping==0 with - * InhibitPolicyMappingZero==false should be treated equivalent to -1 - * (unset). - */ - InhibitPolicyMapping?: number; - /** - * InhibitPolicyMappingZero indicates that InhibitPolicyMapping==0 should be - * interpreted as an actual maximum path length of zero. Otherwise, that - * combination is interpreted as InhibitAnyPolicy not being set. - */ - InhibitPolicyMappingZero?: boolean; - IsCA?: boolean; - Issuer?: Name; - IssuingCertificateURL?: Array; - KeyUsage?: KeyUsage; - /** - * MaxPathLen and MaxPathLenZero indicate the presence and - * value of the BasicConstraints' "pathLenConstraint". - * - * When parsing a certificate, a positive non-zero MaxPathLen - * means that the field was specified, -1 means it was unset, - * and MaxPathLenZero being true mean that the field was - * explicitly set to zero. The case of MaxPathLen==0 with MaxPathLenZero==false - * should be treated equivalent to -1 (unset). - * - * When generating a certificate, an unset pathLenConstraint - * can be requested with either MaxPathLen == -1 or using the - * zero value for both MaxPathLen and MaxPathLenZero. - */ - MaxPathLen?: number; - /** - * MaxPathLenZero indicates that BasicConstraintsValid==true - * and MaxPathLen==0 should be interpreted as an actual - * maximum path length of zero. Otherwise, that combination is - * interpreted as MaxPathLen not being set. - */ - MaxPathLenZero?: boolean; - NotBefore?: string; - /** - * RFC 5280, 4.2.2.1 (Authority Information Access) - */ - OCSPServer?: Array; - PermittedDNSDomains?: Array; - /** - * Name constraints - */ - PermittedDNSDomainsCritical?: boolean; - PermittedEmailAddresses?: Array; - PermittedIPRanges?: Array; - PermittedURIDomains?: Array; - /** - * Policies contains all policy identifiers included in the certificate. - * See CreateCertificate for context about how this field and the PolicyIdentifiers field - * interact. - * In Go 1.22, encoding/gob cannot handle and ignores this field. - */ - Policies?: Array; - /** - * PolicyIdentifiers contains asn1.ObjectIdentifiers, the components - * of which are limited to int32. If a certificate contains a policy which - * cannot be represented by asn1.ObjectIdentifier, it will not be included in - * PolicyIdentifiers, but will be present in Policies, which contains all parsed - * policy OIDs. - * See CreateCertificate for context about how this field and the Policies field - * interact. - */ - PolicyIdentifiers?: Array; - /** - * PolicyMappings contains a list of policy mappings included in the certificate. - */ - PolicyMappings?: Array; - PublicKey?: unknown; - PublicKeyAlgorithm?: PublicKeyAlgorithm; - Raw?: Array; - RawIssuer?: Array; - RawSubject?: Array; - RawSubjectPublicKeyInfo?: Array; - RawTBSCertificate?: Array; - /** - * RequireExplicitPolicy and RequireExplicitPolicyZero indicate the presence - * and value of the requireExplicitPolicy field of the policyConstraints - * extension. - * - * The value of RequireExplicitPolicy indicates the number of additional - * certificates in the path after this certificate before an explicit policy - * is required for the rest of the path. When an explicit policy is required, - * each subsequent certificate in the path must contain a required policy OID, - * or a policy OID which has been declared as equivalent through the policy - * mapping extension. - * - * When parsing a certificate, a positive non-zero RequireExplicitPolicy - * means that the field was specified, -1 means it was unset, and - * RequireExplicitPolicyZero being true mean that the field was explicitly - * set to zero. The case of RequireExplicitPolicy==0 with - * RequireExplicitPolicyZero==false should be treated equivalent to -1 - * (unset). - */ - RequireExplicitPolicy?: number; - /** - * RequireExplicitPolicyZero indicates that RequireExplicitPolicy==0 should be - * interpreted as an actual maximum path length of zero. Otherwise, that - * combination is interpreted as InhibitAnyPolicy not being set. - */ - RequireExplicitPolicyZero?: boolean; - SerialNumber?: string; - Signature?: Array; - SignatureAlgorithm?: SignatureAlgorithm; - Subject?: Name; - SubjectKeyId?: Array; - URIs?: Array; - /** - * UnhandledCriticalExtensions contains a list of extension IDs that - * were not (fully) processed when parsing. Verify will fail if this - * slice is non-empty, unless verification is delegated to an OS - * library which understands all the critical extensions. - * - * Users can access these extensions using Extensions and can remove - * elements from this slice if they believe that they have been - * handled. - */ - UnhandledCriticalExtensions?: Array; - UnknownExtKeyUsage?: Array; - Version?: number; -}; - -export type ChangeUserPasswordCommand = { - newPassword?: Password; - oldPassword?: Password; -}; - -export type CloudMigrationRunListDto = { - runs?: Array; -}; - -export type CloudMigrationSessionListResponseDto = { - sessions?: Array; -}; - -export type CloudMigrationSessionRequestDto = { - authToken?: string; -}; - -export type CloudMigrationSessionResponseDto = { - created?: string; - slug?: string; - uid?: string; - updated?: string; -}; - -/** - * ConfFloat64 is a float64. It Marshals float64 values of NaN of Inf - * to null. - */ -export type ConfFloat64 = number; - -/** - * Config is the top-level configuration for Alertmanager's config files. - */ -export type Config = { - global?: GlobalConfig; - inhibit_rules?: Array; - /** - * MuteTimeIntervals is deprecated and will be removed before Alertmanager 1.0. - */ - mute_time_intervals?: Array; - route?: Route; - templates?: Array; - time_intervals?: Array; -}; - -/** - * ContactPointExport is the provisioned file export of alerting.ContactPointV1. - */ -export type ContactPointExport = { - name?: string; - orgId?: number; - receivers?: Array; -}; - -export type ContactPoints = Array; - -export type ConvertPrometheusResponse = { - error?: string; - errorType?: string; - status?: string; -}; - -/** - * Correlation is the model for correlations definitions - */ -export type Correlation = { - config?: CorrelationConfig; - /** - * Description of the correlation - */ - description?: string; - /** - * Label identifying the correlation - */ - label?: string; - /** - * OrgID of the data source the correlation originates from - */ - orgId?: number; - /** - * Provisioned True if the correlation was created during provisioning - */ - provisioned?: boolean; - /** - * UID of the data source the correlation originates from - */ - sourceUID?: string; - /** - * UID of the data source the correlation points to - */ - targetUID?: string; - type?: CorrelationType; - /** - * Unique identifier of the correlation - */ - uid?: string; -}; - -export type CorrelationConfig = { - /** - * Field used to attach the correlation link - */ - field: string; - /** - * Target data query - */ - target: { - [key: string]: unknown; - }; - transformations?: Transformations; - type?: CorrelationType; -}; - -export type CorrelationConfigUpdateDto = { - /** - * Field used to attach the correlation link - */ - field?: string; - /** - * Target data query - */ - target?: { - [key: string]: unknown; - }; - /** - * Source data transformations - */ - transformations?: Array; -}; - -/** - * the type of correlation, either query for containing query information, or external for containing an external URL - * +enum - */ -export type CorrelationType = string; - -/** - * CounterResetHint contains the known information about a counter reset, - * - * or alternatively that we are dealing with a gauge histogram, where counter resets do not apply. - */ -export type CounterResetHint = number; - -export type CreateAccessTokenResponseDto = { - token?: string; -}; - -/** - * CreateCorrelationCommand is the command for creating a correlation - */ -export type CreateCorrelationCommand = { - config?: CorrelationConfig; - /** - * Optional description of the correlation - */ - description?: string; - /** - * Optional label identifying the correlation - */ - label?: string; - /** - * True if correlation was created with provisioning. This makes it read-only. - */ - provisioned?: boolean; - /** - * Target data source UID to which the correlation is created. required if type = query - */ - targetUID?: string; - type?: CorrelationType; -}; - -/** - * CreateCorrelationResponse is the response struct for CreateCorrelationCommand - */ -export type CreateCorrelationResponseBody = { - message?: string; - result?: Correlation; -}; - -export type CreateDashboardSnapshotCommand = { - /** - * APIVersion defines the versioned schema of this representation of an object. - * Servers should convert recognized schemas to the latest internal value, and - * may reject unrecognized values. - * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - * +optional - */ - apiVersion?: string; - dashboard: Unstructured; - /** - * Unique key used to delete the snapshot. It is different from the `key` so that only the creator can delete the snapshot. Required if `external` is `true`. - */ - deleteKey?: string; - /** - * When the snapshot should expire in seconds in seconds. Default is never to expire. - */ - expires?: number; - /** - * these are passed when storing an external snapshot ref - * Save the snapshot on an external server rather than locally. - */ - external?: boolean; - /** - * Define the unique key. Required if `external` is `true`. - */ - key?: string; - /** - * Kind is a string value representing the REST resource this object represents. - * Servers may infer this from the endpoint the client submits requests to. - * Cannot be updated. - * In CamelCase. - * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - * +optional - */ - kind?: string; - /** - * Snapshot name - */ - name?: string; -}; - -/** - * CreateFolderCommand captures the information required by the folder service - * to create a folder. - */ -export type CreateFolderCommand = { - description?: string; - parentUid?: string; - title?: string; - uid?: string; -}; - -/** - * CreateLibraryElementCommand is the command for adding a LibraryElement - */ -export type CreateLibraryElementCommand = { - /** - * ID of the folder where the library element is stored. - * - * Deprecated: use FolderUID instead - */ - folderId?: number; - /** - * UID of the folder where the library element is stored. - */ - folderUid?: string; - /** - * Kind of element to create, Use 1 for library panels or 2 for c. - * Description: - * 1 - library panels - */ - kind?: 1; - /** - * The JSON model for the library element. - */ - model?: { - [key: string]: unknown; - }; - /** - * Name of the library element. - */ - name?: string; - uid?: string; -}; - -export type CreateOrUpdateReport = { - dashboards?: Array; - enableCsv?: boolean; - enableDashboardUrl?: boolean; - formats?: Array; - message?: string; - name?: string; - options?: ReportOptions; - recipients?: string; - replyTo?: string; - scaleFactor?: number; - schedule?: ReportSchedule; - state?: State; - subject?: string; - urls?: Array; -}; - -export type CreateOrgCommand = { - name?: string; -}; - -export type CreatePlaylistCommand = { - interval?: string; - items?: Array; - name?: string; -}; - -/** - * CreateQueryInQueryHistoryCommand is the command for adding query history - */ -export type CreateQueryInQueryHistoryCommand = { - /** - * UID of the data source for which are queries stored. - */ - datasourceUid?: string; - queries: Json; -}; - -export type CreateRoleForm = { - description?: string; - displayName?: string; - global?: boolean; - group?: string; - hidden?: boolean; - name?: string; - permissions?: Array; - uid?: string; -}; - -export type CreateServiceAccountForm = { - isDisabled?: boolean; - name?: string; - role?: 'None' | 'Viewer' | 'Editor' | 'Admin'; -}; - -export type CreateSnapshotRequestDto = { - resourceTypes?: Array<'DASHBOARD' | 'DATASOURCE' | 'FOLDER' | 'LIBRARY_ELEMENT' | 'ALERT_RULE' | 'ALERT_RULE_GROUP' | 'CONTACT_POINT' | 'NOTIFICATION_POLICY' | 'NOTIFICATION_TEMPLATE' | 'MUTE_TIMING' | 'PLUGIN'>; -}; - -export type CreateSnapshotResponseDto = { - uid?: string; -}; - -export type CreateTeamCommand = { - email?: string; - name: string; -}; - -export type DashboardAclInfoDto = { - created?: string; - dashboardId?: number; - /** - * Deprecated: use FolderUID instead - */ - folderId?: number; - folderUid?: string; - inherited?: boolean; - isFolder?: boolean; - permission?: PermissionType; - permissionName?: string; - role?: 'None' | 'Viewer' | 'Editor' | 'Admin'; - slug?: string; - team?: string; - teamAvatarUrl?: string; - teamEmail?: string; - teamId?: number; - teamUid?: string; - title?: string; - uid?: string; - updated?: string; - url?: string; - userAvatarUrl?: string; - userEmail?: string; - userId?: number; - userLogin?: string; - userUid?: string; -}; - -export type DashboardAclUpdateItem = { - permission?: PermissionType; - role?: 'None' | 'Viewer' | 'Editor' | 'Admin'; - teamId?: number; - userId?: number; -}; - -/** - * These are the values expected to be sent from an end user - * +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - */ -export type DashboardCreateCommand = { - /** - * APIVersion defines the versioned schema of this representation of an object. - * Servers should convert recognized schemas to the latest internal value, and - * may reject unrecognized values. - * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - * +optional - */ - apiVersion?: string; - dashboard: Unstructured; - /** - * When the snapshot should expire in seconds in seconds. Default is never to expire. - */ - expires?: number; - /** - * these are passed when storing an external snapshot ref - * Save the snapshot on an external server rather than locally. - */ - external?: boolean; - /** - * Kind is a string value representing the REST resource this object represents. - * Servers may infer this from the endpoint the client submits requests to. - * Cannot be updated. - * In CamelCase. - * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - * +optional - */ - kind?: string; - /** - * Snapshot name - */ - name?: string; -}; - -export type DashboardFullWithMeta = { - dashboard?: Json; - meta?: DashboardMeta; -}; - -export type DashboardMeta = { - annotationsPermissions?: AnnotationPermission; - apiVersion?: string; - canAdmin?: boolean; - canDelete?: boolean; - canEdit?: boolean; - canSave?: boolean; - canStar?: boolean; - created?: string; - createdBy?: string; - expires?: string; - /** - * Deprecated: use FolderUID instead - */ - folderId?: number; - folderTitle?: string; - folderUid?: string; - folderUrl?: string; - hasAcl?: boolean; - isFolder?: boolean; - isSnapshot?: boolean; - provisioned?: boolean; - provisionedExternalId?: string; - publicDashboardEnabled?: boolean; - slug?: string; - type?: string; - updated?: string; - updatedBy?: string; - url?: string; - version?: number; -}; - -export type DashboardRedirect = { - redirectUri?: string; -}; - -/** - * DashboardSnapshotDTO without dashboard map - */ -export type DashboardSnapshotDto = { - created?: string; - expires?: string; - external?: boolean; - externalUrl?: string; - key?: string; - name?: string; - updated?: string; -}; - -export type DashboardTagCloudItem = { - count?: number; - term?: string; -}; - -/** - * DashboardVersionMeta extends the DashboardVersionDTO with the names - * associated with the UserIds, overriding the field with the same name from - * the DashboardVersionDTO model. - */ -export type DashboardVersionMeta = { - created?: string; - createdBy?: string; - dashboardId?: number; - data?: Json; - id?: number; - message?: string; - parentVersion?: number; - restoredFrom?: number; - uid?: string; - version?: number; -}; - -export type DashboardVersionResponseMeta = { - continueToken?: string; - versions?: Array; -}; - -/** - * DataLink define what - */ -export type DataLink = { - internal?: InternalDataLink; - targetBlank?: boolean; - title?: string; - url?: string; -}; - -/** - * DataResponse contains the results from a DataQuery. - * - * A map of RefIDs (unique query identifiers) to this type makes up the Responses property of a QueryDataResponse. - * The Error property is used to allow for partial success responses from the containing QueryDataResponse. - */ -export type DataResponse = { - /** - * Error is a property to be set if the corresponding DataQuery has an error. - */ - Error?: string; - ErrorSource?: Source; - Frames?: Frames; - Status?: Status; -}; - -export type DataSource = { - access?: DsAccess; - accessControl?: Metadata; - basicAuth?: boolean; - basicAuthUser?: string; - database?: string; - id?: number; - isDefault?: boolean; - jsonData?: Json; - name?: string; - orgId?: number; - readOnly?: boolean; - secureJsonFields?: { - [key: string]: boolean; - }; - type?: string; - typeLogoUrl?: string; - uid?: string; - url?: string; - user?: string; - version?: number; - withCredentials?: boolean; -}; - -export type DataSourceList = Array; - -export type DataSourceListItemDto = { - access?: DsAccess; - basicAuth?: boolean; - database?: string; - id?: number; - isDefault?: boolean; - jsonData?: Json; - name?: string; - orgId?: number; - readOnly?: boolean; - type?: string; - typeLogoUrl?: string; - typeName?: string; - uid?: string; - url?: string; - user?: string; -}; - -/** - * Ref to a DataSource instance - */ -export type DataSourceRef = { - /** - * The plugin type-id - */ - type?: string; - /** - * Specific datasource instance - */ - uid?: string; -}; - -/** - * DataTopic is used to identify which topic the frame should be assigned to. - * - * nolint:revive - */ -export type DataTopic = string; - -export type DeleteCorrelationResponseBody = { - message?: string; -}; - -export type DeleteTokenCommand = { - instance?: string; -}; - -export type DescendantCounts = { - [key: string]: number; -}; - -export type Description = { - assignments?: Assignments; - permissions?: Array; -}; - -export type DeviceSearchHitDto = { - clientIp?: string; - createdAt?: string; - deviceId?: string; - lastSeenAt?: string; - updatedAt?: string; - userAgent?: string; -}; - -/** - * DiscordConfig configures notifications via Discord. - */ -export type DiscordConfig = { - http_config?: HttpClientConfig; - message?: string; - send_resolved?: boolean; - title?: string; - webhook_url?: SecretUrl; - webhook_url_file?: string; -}; - -export type DiscoveryBase = { - error?: string; - errorType?: ErrorType; - status: string; -}; - -export type DsAccess = string; - -/** - * Datasource permission - * Description: - * `0` - No Access - * `1` - Query - * `2` - Edit - * Enum: 0,1,2 - */ -export type DsPermissionType = number; - -/** - * A Duration represents the elapsed time between two instants - * as an int64 nanosecond count. The representation limits the - * largest representable duration to approximately 290 years. - */ -export type Duration = number; - -/** - * EmailConfig configures notifications via mail. - */ -export type EmailConfig = { - auth_identity?: string; - auth_password?: Secret; - auth_password_file?: string; - auth_secret?: Secret; - auth_username?: string; - from?: string; - headers?: { - [key: string]: string; - }; - hello?: string; - html?: string; - require_tls?: boolean; - send_resolved?: boolean; - smarthost?: HostPort; - text?: string; - tls_config?: TlsConfig; - /** - * Email address to notify. - */ - to?: string; -}; - -export type EmailDto = { - recipient?: string; - uid?: string; -}; - -/** - * EmbeddedContactPoint is the contact point type that is used - * by grafanas embedded alertmanager implementation. - */ -export type EmbeddedContactPoint = { - disableResolveMessage?: boolean; - /** - * Name is used as grouping key in the UI. Contact points with the - * same name will be grouped in the UI. - */ - name?: string; - readonly provenance?: string; - settings: Json; - type: 'alertmanager' | 'dingding' | 'discord' | 'email' | 'googlechat' | 'kafka' | 'line' | 'opsgenie' | 'pagerduty' | 'pushover' | 'sensugo' | 'slack' | 'teams' | 'telegram' | 'threema' | 'victorops' | 'webhook' | 'wecom'; - /** - * UID is the unique identifier of the contact point. The UID can be - * set by the user. - */ - uid?: string; -}; - -/** - * Enum field config - * Vector values are used as lookup keys into the enum fields - */ -export type EnumFieldConfig = { - /** - * Color is the color value for a given index (empty is undefined) - */ - color?: Array; - /** - * Description of the enum state - */ - description?: Array; - /** - * Icon supports setting an icon for a given index value - */ - icon?: Array; - /** - * Value is the string display value for a given index - */ - text?: Array; -}; - -export type ErrorResponseBody = { - /** - * Error An optional detailed description of the actual error. Only included if running in developer mode. - */ - error?: string; - /** - * a human readable version of the error - */ - message: string; - /** - * Status An optional status to denote the cause of the error. - * - * For example, a 412 Precondition Failed error may include additional information of why that error happened. - */ - status?: string; -}; - -/** - * ErrorType models the different API error types. - */ -export type ErrorType = string; - -/** - * EvalAlertConditionCommand is the command for evaluating a condition - */ -export type EvalAlertConditionCommand = { - condition?: string; - data?: Array; - now?: string; -}; - -export type EvalQueriesPayload = { - condition?: string; - data?: Array; - now?: string; -}; - -export type EvalQueriesResponse = { - [key: string]: unknown; -}; - -/** - * This is an object constructed with the keys as the values of the enum VisType and the value being a bag of properties - */ -export type ExplorePanelsState = unknown; - -/** - * ExtKeyUsage represents an extended set of actions that are valid for a given key. - * - * Each of the ExtKeyUsage* constants define a unique action. - */ -export type ExtKeyUsage = number; - -export type ExtendedReceiver = { - email_configs?: EmailConfig; - grafana_managed_receiver?: PostableGrafanaReceiver; - opsgenie_configs?: OpsGenieConfig; - pagerduty_configs?: PagerdutyConfig; - pushover_configs?: PushoverConfig; - slack_configs?: SlackConfig; - victorops_configs?: VictorOpsConfig; - webhook_configs?: WebhookConfig; - wechat_configs?: WechatConfig; -}; - -/** - * Extension represents the ASN.1 structure of the same name. See RFC - * 5280, section 4.2. - */ -export type Extension = { - Critical?: boolean; - Id?: ObjectIdentifier; - Value?: Array; -}; - -export type ExternalAlertmanagerConfig = { - alertmanager_config?: Config; - template_files?: { - [key: string]: string; - }; -}; - -export type ExternalAlertmanagerStatus = { - cluster: ClusterStatus; - config: Config; - /** - * uptime - */ - uptime: string; - versionInfo: VersionInfo; -}; - -export type ExtraConfiguration = { - alertmanager_config?: string; - identifier?: string; - merge_matchers?: Matchers; - template_files?: { - [key: string]: string; - }; -}; - -/** - * FailedUser holds the information of an user that failed - */ -export type FailedUser = { - Error?: string; - Login?: string; -}; - -export type Failure = ResponseDetails; - -/** - * Field represents a typed column of data within a Frame. - * - * A Field is essentially a slice of various types with extra properties and methods. - * See NewField() for supported types. - * - * The slice data in the Field is a not exported, so methods on the Field are used to to manipulate its data. - */ -export type Field = { - config?: FieldConfig; - labels?: FrameLabels; - /** - * Name is default identifier of the field. The name does not have to be unique, but the combination - * of name and Labels should be unique for proper behavior in all situations. - */ - name?: string; -}; - -/** - * FieldConfig represents the display properties for a Field. - */ -export type FieldConfig = { - /** - * Map values to a display color - * NOTE: this interface is under development in the frontend... so simple map for now - */ - color?: { - [key: string]: unknown; - }; - /** - * Panel Specific Values - */ - custom?: { - [key: string]: unknown; - }; - decimals?: number; - /** - * Description is human readable field metadata - */ - description?: string; - /** - * DisplayName overrides Grafana default naming, should not be used from a data source - */ - displayName?: string; - /** - * DisplayNameFromDS overrides Grafana default naming strategy. - */ - displayNameFromDS?: string; - /** - * Filterable indicates if the Field's data can be filtered by additional calls. - */ - filterable?: boolean; - /** - * Interval indicates the expected regular step between values in the series. - * When an interval exists, consumers can identify "missing" values when the expected value is not present. - * The grafana timeseries visualization will render disconnected values when missing values are found it the time field. - * The interval uses the same units as the values. For time.Time, this is defined in milliseconds. - */ - interval?: number; - /** - * The behavior when clicking on a result - */ - links?: Array; - mappings?: ValueMappings; - max?: ConfFloat64; - min?: ConfFloat64; - /** - * Alternative to empty string - */ - noValue?: string; - /** - * Path is an explicit path to the field in the datasource. When the frame meta includes a path, - * this will default to `${frame.meta.path}/${field.name} - * - * When defined, this value can be used as an identifier within the datasource scope, and - * may be used as an identifier to update values in a subsequent request - */ - path?: string; - thresholds?: ThresholdsConfig; - type?: FieldTypeConfig; - /** - * Numeric Options - */ - unit?: string; - /** - * Writeable indicates that the datasource knows how to update this value - */ - writeable?: boolean; -}; - -/** - * FieldTypeConfig has type specific configs, only one should be active at a time - */ -export type FieldTypeConfig = { - enum?: EnumFieldConfig; -}; - -/** - * FindTagsResult is the result of a tags search. - */ -export type FindTagsResult = { - tags?: Array; -}; - -/** - * FloatHistogram is similar to Histogram but uses float64 for all - * counts. Additionally, bucket counts are absolute and not deltas. - * - * A FloatHistogram is needed by PromQL to handle operations that might result - * in fractional counts. Since the counts in a histogram are unlikely to be too - * large to be represented precisely by a float64, a FloatHistogram can also be - * used to represent a histogram with integer counts and thus serves as a more - * generalized representation. - */ -export type FloatHistogram = { - /** - * Total number of observations. Must be zero or positive. - */ - Count?: number; - CounterResetHint?: CounterResetHint; - /** - * Holds the custom (usually upper) bounds for bucket definitions, otherwise nil. - * This slice is interned, to be treated as immutable and copied by reference. - * These numbers should be strictly increasing. This field is only used when the - * schema is for custom buckets, and the ZeroThreshold, ZeroCount, NegativeSpans - * and NegativeBuckets fields are not used in that case. - */ - CustomValues?: Array; - /** - * Observation counts in buckets. Each represents an absolute count and - * must be zero or positive. - */ - PositiveBuckets?: Array; - /** - * Spans for positive and negative buckets (see Span below). - */ - PositiveSpans?: Array; - /** - * Currently valid schema numbers are -4 <= n <= 8 for exponential buckets. - * They are all for base-2 bucket schemas, where 1 is a bucket boundary in - * each case, and then each power of two is divided into 2^n logarithmic buckets. - * Or in other words, each bucket boundary is the previous boundary times - * 2^(2^-n). Another valid schema number is -53 for custom buckets, defined by - * the CustomValues field. - */ - Schema?: number; - /** - * Sum of observations. This is also used as the stale marker. - */ - Sum?: number; - /** - * Observations falling into the zero bucket. Must be zero or positive. - */ - ZeroCount?: number; - /** - * Width of the zero bucket. - */ - ZeroThreshold?: number; -}; - -export type Folder = { - accessControl?: Metadata; - canAdmin?: boolean; - canDelete?: boolean; - canEdit?: boolean; - canSave?: boolean; - created?: string; - createdBy?: string; - hasAcl?: boolean; - /** - * Deprecated: use UID instead - */ - id?: number; - managedBy?: ManagerKind; - orgId?: number; - /** - * only used if nested folders are enabled - */ - parentUid?: string; - /** - * the parent folders starting from the root going down - */ - parents?: Array; - title?: string; - uid?: string; - updated?: string; - updatedBy?: string; - url?: string; - version?: number; -}; - -export type FolderSearchHit = { - id?: number; - managedBy?: ManagerKind; - parentUid?: string; - title?: string; - uid?: string; -}; - -export type FooterItem = { - color?: string; - fontSize?: string; - fontStyle?: string; - fontWeight?: string; - type?: string; - value?: string; -}; - -export type ForbiddenError = { - body?: PublicError; -}; - -/** - * Frame is a columnar data structure where each column is a Field. - * - * Each Field is well typed by its FieldType and supports optional Labels. - * - * A Frame is a general data container for Grafana. A Frame can be table data - * or time series data depending on its content and field types. - */ -export type Frame = { - /** - * Fields are the columns of a frame. - * All Fields must be of the same the length when marshalling the Frame for transmission. - * There should be no `nil` entries in the Fields slice (making them pointers was a mistake). - */ - Fields?: Array; - Meta?: FrameMeta; - /** - * Name is used in some Grafana visualizations. - */ - Name?: string; - /** - * RefID is a property that can be set to match a Frame to its originating query. - */ - RefID?: string; -}; - -/** - * Labels are used to add metadata to an object. The JSON will always be sorted keys - */ -export type FrameLabels = { - [key: string]: string; -}; - -/** - * FrameMeta matches: - * - * https://github.com/grafana/grafana/blob/master/packages/grafana-data/src/types/data.ts#L11 - * NOTE -- in javascript this can accept any `[key: string]: any;` however - * this interface only exposes the values we want to be exposed - */ -export type FrameMeta = { - /** - * Channel is the path to a stream in grafana live that has real-time updates for this data. - */ - channel?: string; - /** - * Custom datasource specific values. - */ - custom?: unknown; - dataTopic?: DataTopic; - /** - * ExecutedQueryString is the raw query sent to the underlying system. All macros and templating - * have been applied. When metadata contains this value, it will be shown in the query inspector. - */ - executedQueryString?: string; - /** - * Notices provide additional information about the data in the Frame that - * Grafana can display to the user in the user interface. - */ - notices?: Array; - /** - * Path is a browsable path on the datasource. - */ - path?: string; - /** - * PathSeparator defines the separator pattern to decode a hierarchy. The default separator is '/'. - */ - pathSeparator?: string; - /** - * PreferredVisualizationPluginId sets the panel plugin id to use to render the data when using Explore. If - * the plugin cannot be found will fall back to PreferredVisualization. - */ - preferredVisualisationPluginId?: string; - preferredVisualisationType?: VisType; - /** - * Stats is an array of query result statistics. - */ - stats?: Array; - type?: FrameType; - typeVersion?: FrameTypeVersion; - /** - * Array of field indices which values create a unique id for each row. Ideally this should be globally unique ID - * but that isn't guarantied. Should help with keeping track and deduplicating rows in visualizations, especially - * with streaming data with frequent updates. - */ - uniqueRowIdFields?: Array; -}; - -/** - * A FrameType string, when present in a frame's metadata, asserts that the - * frame's structure conforms to the FrameType's specification. - * This property is currently optional, so FrameType may be FrameTypeUnknown even if the properties of - * the Frame correspond to a defined FrameType. - * +enum - */ -export type FrameType = string; - -/** - * FrameType is a 2 number version (Major / Minor). - */ -export type FrameTypeVersion = Array; - -/** - * Frames is a slice of Frame pointers. - * - * It is the main data container within a backend.DataResponse. - * There should be no `nil` entries in the Frames slice (making them pointers was a mistake). - */ -export type Frames = Array; - -export type GetAccessTokenResponseDto = { - createdAt?: string; - displayName?: string; - expiresAt?: string; - firstUsedAt?: string; - id?: string; - lastUsedAt?: string; -}; - -/** - * GetAnnotationTagsResponse is a response struct for FindTagsResult. - */ -export type GetAnnotationTagsResponse = { - result?: FindTagsResult; -}; - -/** - * Get home dashboard response. - */ -export type GetHomeDashboardResponse = { - dashboard?: Json; - meta?: DashboardMeta; -} & { - redirectUri?: string; -}; - -export type GetSnapshotResponseDto = { - created?: string; - finished?: string; - results?: Array; - sessionUid?: string; - stats?: SnapshotResourceStats; - status?: 'INITIALIZING' | 'CREATING' | 'PENDING_UPLOAD' | 'UPLOADING' | 'PENDING_PROCESSING' | 'PROCESSING' | 'FINISHED' | 'CANCELED' | 'ERROR' | 'UNKNOWN'; - uid?: string; -}; - -export type GettableAlertmanagers = { - data?: AlertManagersResult; - status?: string; -}; - -export type GettableApiAlertingConfig = { - global?: GlobalConfig; - inhibit_rules?: Array; - muteTimeProvenances?: { - [key: string]: Provenance; - }; - /** - * MuteTimeIntervals is deprecated and will be removed before Alertmanager 1.0. - */ - mute_time_intervals?: Array; - /** - * Override with our superset receiver type - */ - receivers?: Array; - route?: Route; - templates?: Array; - time_intervals?: Array; -}; - -export type GettableApiReceiver = { - discord_configs?: Array; - email_configs?: Array; - grafana_managed_receiver_configs?: Array; - jira_configs?: Array; - msteams_configs?: Array; - msteamsv2_configs?: Array; - /** - * A unique identifier for this receiver. - */ - name?: string; - opsgenie_configs?: Array; - pagerduty_configs?: Array; - pushover_configs?: Array; - slack_configs?: Array; - sns_configs?: Array; - telegram_configs?: Array; - victorops_configs?: Array; - webex_configs?: Array; - webhook_configs?: Array; - wechat_configs?: Array; -}; - -export type GettableExtendedRuleNode = { - alert?: string; - annotations?: { - [key: string]: string; - }; - expr?: string; - for?: string; - grafana_alert?: GettableGrafanaRule; - keep_firing_for?: string; - labels?: { - [key: string]: string; - }; - record?: string; -}; - -export type GettableGrafanaReceiver = { - disableResolveMessage?: boolean; - name?: string; - provenance?: Provenance; - secureFields?: { - [key: string]: boolean; - }; - settings?: RawMessage; - type?: string; - uid?: string; -}; - -export type GettableGrafanaReceivers = { - grafana_managed_receiver_configs?: Array; -}; - -export type GettableGrafanaRule = { - condition?: string; - data?: Array; - exec_err_state?: 'OK' | 'Alerting' | 'Error'; - guid?: string; - intervalSeconds?: number; - is_paused?: boolean; - /** - * Field is only populated when listing alert rule versions. - */ - message?: string; - metadata?: AlertRuleMetadata; - missing_series_evals_to_resolve?: number; - namespace_uid?: string; - no_data_state?: 'Alerting' | 'NoData' | 'OK'; - notification_settings?: AlertRuleNotificationSettings; - provenance?: Provenance; - record?: Record; - rule_group?: string; - title?: string; - uid?: string; - updated?: string; - updated_by?: UserInfo; - version?: number; -}; - -export type GettableHistoricUserConfig = { - alertmanager_config?: GettableApiAlertingConfig; - id?: number; - last_applied?: string; - template_file_provenances?: { - [key: string]: Provenance; - }; - template_files?: { - [key: string]: string; - }; -}; - -export type GettableNGalertConfig = { - alertmanagersChoice?: 'all' | 'internal' | 'external'; -}; - -export type GettableRuleGroupConfig = { - align_evaluation_time_on_interval?: boolean; - evaluation_delay?: string; - interval?: Duration; - labels?: { - [key: string]: string; - }; - limit?: number; - name?: string; - query_offset?: string; - remote_write?: Array; - rules?: Array; - source_tenants?: Array; -}; - -export type GettableRuleVersions = Array; - -export type GettableStatus = { - cluster: ClusterStatus; - config: PostableApiAlertingConfig; - /** - * uptime - */ - uptime: string; - versionInfo: VersionInfo; -}; - -export type GettableUserConfig = { - alertmanager_config?: GettableApiAlertingConfig; - extra_config?: Array; - template_file_provenances?: { - [key: string]: Provenance; - }; - template_files?: { - [key: string]: string; - }; -}; - -/** - * GlobalConfig defines configuration parameters that are valid globally - * unless overwritten. - */ -export type GlobalConfig = { - http_config?: HttpClientConfig; - jira_api_url?: Url; - opsgenie_api_key?: Secret; - opsgenie_api_key_file?: string; - opsgenie_api_url?: Url; - pagerduty_url?: Url; - resolve_timeout?: Duration; - slack_api_url?: SecretUrl; - slack_api_url_file?: string; - smtp_auth_identity?: string; - smtp_auth_password?: Secret; - smtp_auth_password_file?: string; - smtp_auth_secret?: Secret; - smtp_auth_username?: string; - smtp_from?: string; - smtp_hello?: string; - smtp_require_tls?: boolean; - smtp_smarthost?: HostPort; - smtp_tls_config?: TlsConfig; - telegram_api_url?: Url; - victorops_api_key?: Secret; - victorops_api_key_file?: string; - victorops_api_url?: Url; - webex_api_url?: Url; - wechat_api_corp_id?: string; - wechat_api_secret?: Secret; - wechat_api_url?: Url; -}; - -export type Group = { - groupID?: string; - mappings?: unknown; -}; - -export type GroupAttributes = { - roles?: Array; -}; - -/** - * HTTPClientConfig configures an HTTP client. - */ -export type HttpClientConfig = { - authorization?: Authorization; - basic_auth?: BasicAuth; - bearer_token?: Secret; - /** - * The bearer token file for the targets. Deprecated in favour of - * Authorization.CredentialsFile. - */ - bearer_token_file?: string; - /** - * EnableHTTP2 specifies whether the client should configure HTTP2. - * The omitempty flag is not set, because it would be hidden from the - * marshalled configuration when set to false. - */ - enable_http2?: boolean; - /** - * FollowRedirects specifies whether the client should follow HTTP 3xx redirects. - * The omitempty flag is not set, because it would be hidden from the - * marshalled configuration when set to false. - */ - follow_redirects?: boolean; - http_headers?: Headers; - /** - * NoProxy contains addresses that should not use a proxy. - */ - no_proxy?: string; - oauth2?: OAuth2; - proxy_connect_header?: ProxyHeader; - /** - * ProxyFromEnvironment makes use of net/http ProxyFromEnvironment function - * to determine proxies. - */ - proxy_from_environment?: boolean; - proxy_url?: Url; - tls_config?: TlsConfig; -}; - -/** - * Header represents the configuration for a single HTTP header. - */ -export type Header = { - files?: Array; - secrets?: Array; - values?: Array; -}; - -/** - * Headers represents the configuration for HTTP headers. - */ -export type Headers = { - Headers?: { - [key: string]: Header; - }; -}; - -export type Hit = { - description?: string; - folderId?: number; - folderTitle?: string; - folderUid?: string; - folderUrl?: string; - id?: number; - isDeleted?: boolean; - isStarred?: boolean; - orgId?: number; - permanentlyDeleteDate?: string; - slug?: string; - sortMeta?: number; - sortMetaName?: string; - tags?: Array; - title?: string; - type?: HitType; - uid?: string; - uri?: string; - url?: string; -}; - -export type HitList = Array; - -export type HitType = string; - -/** - * HostPort represents a "host:port" network address. - */ -export type HostPort = { - Host?: string; - Port?: string; -}; - -/** - * An IPMask is a bitmask that can be used to manipulate - * IP addresses for IP addressing and routing. - * - * See type [IPNet] and func [ParseCIDR] for details. - */ -export type IpMask = Array; - -/** - * An IPNet represents an IP network. - */ -export type IpNet = { - IP?: string; - Mask?: IpMask; -}; - -/** - * ImportDashboardInput definition of input parameters when importing a dashboard. - */ -export type ImportDashboardInput = { - name?: string; - pluginId?: string; - type?: string; - value?: string; -}; - -/** - * ImportDashboardRequest request object for importing a dashboard. - */ -export type ImportDashboardRequest = { - dashboard?: Json; - /** - * Deprecated: use FolderUID instead - */ - folderId?: number; - folderUid?: string; - inputs?: Array; - overwrite?: boolean; - path?: string; - pluginId?: string; -}; - -/** - * ImportDashboardResponse response object returned when importing a dashboard. - */ -export type ImportDashboardResponse = { - dashboardId?: number; - description?: string; - /** - * Deprecated: use FolderUID instead - */ - folderId?: number; - folderUid?: string; - imported?: boolean; - importedRevision?: number; - importedUri?: string; - importedUrl?: string; - path?: string; - pluginId?: string; - removed?: boolean; - revision?: number; - slug?: string; - title?: string; - uid?: string; -}; - -/** - * InhibitRule defines an inhibition rule that mutes alerts that match the - * target labels if an alert matching the source labels exists. - * Both alerts have to have a set of labels being equal. - */ -export type InhibitRule = { - /** - * A set of labels that must be equal between the source and target alert - * for them to be a match. - */ - equal?: Array; - /** - * SourceMatch defines a set of labels that have to equal the given - * value for source alerts. Deprecated. Remove before v1.0 release. - */ - source_match?: { - [key: string]: string; - }; - source_match_re?: MatchRegexps; - source_matchers?: Matchers; - /** - * TargetMatch defines a set of labels that have to equal the given - * value for target alerts. Deprecated. Remove before v1.0 release. - */ - target_match?: { - [key: string]: string; - }; - target_match_re?: MatchRegexps; - target_matchers?: Matchers; -}; - -/** - * InspectType is a type for the Inspect property of a Notice. - */ -export type InspectType = number; - -export type IntegrationStatus = { - /** - * A timestamp indicating the last attempt to deliver a notification regardless of the outcome. - * Format: date-time - */ - lastNotifyAttempt?: string; - /** - * Duration of the last attempt to deliver a notification in humanized format (`1s` or `15ms`, etc). - */ - lastNotifyAttemptDuration?: string; - /** - * Error string for the last attempt to deliver a notification. Empty if the last attempt was successful. - */ - lastNotifyAttemptError?: string; - /** - * Name of the integration. - */ - name?: string; - /** - * Whether the integration is configured to send resolved notifications. - */ - sendResolved?: boolean; -}; - -/** - * InternalDataLink definition to allow Explore links to be constructed in the backend - */ -export type InternalDataLink = { - datasourceName?: string; - datasourceUid?: string; - panelsState?: ExplorePanelsState; - query?: unknown; - timeRange?: TimeRange; - transformations?: Array; -}; - -/** - * JSONWebKey represents a public or private key in JWK format. It can be - * marshaled into JSON and unmarshaled from JSON. - */ -export type JsonWebKey = { - /** - * Key algorithm, parsed from `alg` header. - */ - Algorithm?: string; - /** - * X.509 certificate thumbprint (SHA-1), parsed from `x5t` header. - */ - CertificateThumbprintSHA1?: Array; - /** - * X.509 certificate thumbprint (SHA-256), parsed from `x5t#S256` header. - */ - CertificateThumbprintSHA256?: Array; - /** - * X.509 certificate chain, parsed from `x5c` header. - */ - Certificates?: Array; - CertificatesURL?: Url; - /** - * Key is the Go in-memory representation of this key. It must have one - * of these types: - * ed25519.PublicKey - * ed25519.PrivateKey - * ecdsa.PublicKey - * ecdsa.PrivateKey - * rsa.PublicKey - * rsa.PrivateKey - * []byte (a symmetric key) - * - * When marshaling this JSONWebKey into JSON, the "kty" header parameter - * will be automatically set based on the type of this field. - */ - Key?: unknown; - /** - * Key identifier, parsed from `kid` header. - */ - KeyID?: string; - /** - * Key use, parsed from `use` header. - */ - Use?: string; -}; - -export type JiraConfig = { - api_url?: Url; - custom_fields?: { - [key: string]: unknown; - }; - description?: string; - http_config?: HttpClientConfig; - issue_type?: string; - labels?: Array; - priority?: string; - project?: string; - reopen_duration?: Duration; - reopen_transition?: string; - resolve_transition?: string; - send_resolved?: boolean; - summary?: string; - wont_fix_resolution?: string; -}; - -export type Json = { - [key: string]: unknown; -}; - -/** - * KeyUsage represents the set of actions that are valid for a given key. It's - * a bitmap of the KeyUsage* constants. - */ -export type KeyUsage = number; - -/** - * Label is a key/value pair of strings. - */ -export type Label = { - Name?: string; -}; - -/** - * Labels is a sorted set of labels. Order has to be guaranteed upon - * instantiation. - */ -export type Labels = Array