Skip to content

Commit

Permalink
updates usage of LIST_ITEM_URL to LIST_ITEMS_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
dhurley14 committed Mar 5, 2025
1 parent dfcf0c3 commit fb461ab
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import {
} from '@kbn/securitysolution-io-ts-list-types';
import {
LIST_INDEX,
LIST_ITEM_URL,
LIST_ITEMS_URL,
LIST_PRIVILEGES_URL,
LIST_URL,
INTERNAL_FIND_LISTS_BY_SIZE,
Expand Down Expand Up @@ -167,7 +167,7 @@ const importList = async ({
const formData = new FormData();
formData.append('file', file as Blob);

return http.fetch<ListSchema>(`${LIST_ITEM_URL}/_import`, {
return http.fetch<ListSchema>(`${LIST_ITEMS_URL}/_import`, {
body: formData,
headers: { 'Content-Type': undefined },
method: 'POST',
Expand Down Expand Up @@ -242,7 +242,7 @@ const exportList = async ({
list_id,
signal,
}: ApiParams & ExportListItemQuerySchemaEncoded): Promise<Blob> =>
http.fetch<Blob>(`${LIST_ITEM_URL}/_export`, {
http.fetch<Blob>(`${LIST_ITEMS_URL}/_export`, {
method: 'POST',
query: { list_id },
signal,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { flow } from 'fp-ts/lib/function';
import { pipe } from 'fp-ts/lib/pipeable';
import { validateEither } from '@kbn/securitysolution-io-ts-utils';

import { LIST_ITEM_URL } from '@kbn/securitysolution-list-constants';
import { LIST_ITEMS_URL } from '@kbn/securitysolution-list-constants';
import {
ApiParams,
FindListItemsParams,
Expand Down Expand Up @@ -54,7 +54,7 @@ const findListItems = async ({
sort_order,
filter,
}: ApiParams & FindListItemSchema): Promise<FoundListItemSchema> => {
return http.fetch(`${LIST_ITEM_URL}/_find`, {
return http.fetch(`${LIST_ITEMS_URL}/_find`, {
method: 'GET',
query: {
cursor,
Expand Down Expand Up @@ -105,7 +105,7 @@ const deleteListItem = async ({
signal,
refresh,
}: ApiParams & DeleteListItemSchema): Promise<ListItemSchema> =>
http.fetch<ListItemSchema>(LIST_ITEM_URL, {
http.fetch<ListItemSchema>(LIST_ITEMS_URL, {
method: 'DELETE',
query: { id, refresh },
signal,
Expand Down Expand Up @@ -147,7 +147,7 @@ const patchListItem = async ({
value,
_version,
}: ApiParams & PatchListItemSchema): Promise<ListItemSchema> =>
http.fetch<ListItemSchema>(LIST_ITEM_URL, {
http.fetch<ListItemSchema>(LIST_ITEMS_URL, {
method: 'PATCH',
body: JSON.stringify({ id, value, _version }),
signal,
Expand Down Expand Up @@ -190,7 +190,7 @@ const createListItem = async ({
list_id,
refresh,
}: ApiParams & CreateListItemSchema): Promise<ListItemSchema> =>
http.fetch<ListItemSchema>(LIST_ITEM_URL, {
http.fetch<ListItemSchema>(LIST_ITEMS_URL, {
method: 'POST',
body: JSON.stringify({ value, list_id, refresh }),
signal,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { extname } from 'path';

import { schema } from '@kbn/config-schema';
import { transformError } from '@kbn/securitysolution-es-utils';
import { LIST_ITEM_URL } from '@kbn/securitysolution-list-constants';
import { LIST_ITEMS_URL } from '@kbn/securitysolution-list-constants';
import { buildRouteValidationWithZod } from '@kbn/zod-helpers';
import {
ImportListItemsRequestQuery,
Expand Down Expand Up @@ -38,7 +38,7 @@ export const importListItemRoute = (router: ListsPluginRouter, config: ConfigTyp
payload: config.importTimeout.asMilliseconds(),
},
},
path: `${LIST_ITEM_URL}/_import`,
path: `${LIST_ITEMS_URL}/_import`,
security: {
authz: {
requiredPrivileges: ['lists-all'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { Stream } from 'stream';

import { transformError } from '@kbn/securitysolution-es-utils';
import { LIST_ITEM_URL } from '@kbn/securitysolution-list-constants';
import { LIST_ITEMS_URL } from '@kbn/securitysolution-list-constants';
import { buildRouteValidationWithZod } from '@kbn/zod-helpers';
import { ExportListItemsRequestQuery } from '@kbn/securitysolution-lists-common/api';

Expand All @@ -20,7 +20,7 @@ export const exportListItemRoute = (router: ListsPluginRouter): void => {
router.versioned
.post({
access: 'public',
path: `${LIST_ITEM_URL}/_export`,
path: `${LIST_ITEMS_URL}/_export`,
security: {
authz: {
requiredPrivileges: ['lists-read'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { transformError } from '@kbn/securitysolution-es-utils';
import { LIST_ITEM_URL } from '@kbn/securitysolution-list-constants';
import { LIST_ITEMS_URL } from '@kbn/securitysolution-list-constants';
import { buildRouteValidationWithZod } from '@kbn/zod-helpers';
import {
FindListItemsRequestQuery,
Expand All @@ -21,7 +21,7 @@ export const findListItemRoute = (router: ListsPluginRouter): void => {
router.versioned
.get({
access: 'public',
path: `${LIST_ITEM_URL}/_find`,
path: `${LIST_ITEMS_URL}/_find`,
security: {
authz: {
requiredPrivileges: ['lists-read'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { transformError } from '@kbn/securitysolution-es-utils';
import { LIST_ITEM_URL } from '@kbn/securitysolution-list-constants';
import { LIST_ITEMS_URL } from '@kbn/securitysolution-list-constants';
import { buildRouteValidationWithZod } from '@kbn/zod-helpers';
import {
PatchListItemRequestBody,
Expand All @@ -21,7 +21,7 @@ export const patchListItemRoute = (router: ListsPluginRouter): void => {
router.versioned
.patch({
access: 'public',
path: LIST_ITEM_URL,
path: LIST_ITEMS_URL,
security: {
authz: {
requiredPrivileges: ['lists-all'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { transformError } from '@kbn/securitysolution-es-utils';
import { LIST_ITEM_URL } from '@kbn/securitysolution-list-constants';
import { LIST_ITEMS_URL } from '@kbn/securitysolution-list-constants';
import { buildRouteValidationWithZod } from '@kbn/zod-helpers';
import {
UpdateListItemRequestBody,
Expand All @@ -21,7 +21,7 @@ export const updateListItemRoute = (router: ListsPluginRouter): void => {
router.versioned
.put({
access: 'public',
path: LIST_ITEM_URL,
path: LIST_ITEMS_URL,
security: {
authz: {
requiredPrivileges: ['lists-all'],
Expand Down

0 comments on commit fb461ab

Please sign in to comment.