chore(o11y): add missing access options to routes (#197511)

This commit is contained in:
Kevin Delemme 2024-10-24 09:15:05 -04:00 committed by GitHub
parent f25ef61d52
commit b3d5c4b46e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 20 additions and 0 deletions

View file

@ -98,6 +98,9 @@ export function registerAnnotationAPIs({
validate: {
body: unknowns,
},
options: {
access: 'public',
},
},
wrapRouteHandler(t.type({ body: createAnnotationRt }), ({ data, client }) => {
return client.create(data.body);
@ -110,6 +113,9 @@ export function registerAnnotationAPIs({
validate: {
body: unknowns,
},
options: {
access: 'public',
},
},
wrapRouteHandler(t.type({ body: updateAnnotationRt }), ({ data, client }) => {
return client.update(data.body);
@ -122,6 +128,9 @@ export function registerAnnotationAPIs({
validate: {
params: unknowns,
},
options: {
access: 'public',
},
},
wrapRouteHandler(t.type({ params: deleteAnnotationRt }), ({ data, client }) => {
return client.delete(data.params);
@ -134,6 +143,9 @@ export function registerAnnotationAPIs({
validate: {
params: unknowns,
},
options: {
access: 'public',
},
},
wrapRouteHandler(t.type({ params: getAnnotationByIdRt }), ({ data, client }) => {
return client.getById(data.params);
@ -146,6 +158,9 @@ export function registerAnnotationAPIs({
validate: {
query: unknowns,
},
options: {
access: 'public',
},
},
wrapRouteHandler(t.type({ query: findAnnotationRt }), ({ data, client }) => {
return client.find(data.query);
@ -158,6 +173,9 @@ export function registerAnnotationAPIs({
validate: {
query: unknowns,
},
options: {
access: 'public',
},
},
wrapRouteHandler(t.type({}), ({ client }) => {
return client.permissions();

View file

@ -13,6 +13,7 @@ const getObservabilityAlertDetailsContextRoute = createObservabilityServerRoute(
endpoint: 'GET /internal/observability/assistant/alert_details_contextual_insights',
options: {
tags: [],
access: 'internal',
},
params: t.type({
query: alertDetailsContextRt,

View file

@ -13,6 +13,7 @@ const alertsDynamicIndexPatternRoute = createObservabilityServerRoute({
endpoint: 'GET /api/observability/rules/alerts/dynamic_index_pattern 2023-10-31',
options: {
tags: [],
access: 'public',
},
params: t.type({
query: t.type({