File tree Expand file tree Collapse file tree 8 files changed +29
-1
lines changed Expand file tree Collapse file tree 8 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -310,4 +310,4 @@ export type DeserializerOrUndefined = t.TypeOf<typeof deserializerOrUndefined>;
310310
311311export const _version = t . string ;
312312export const _versionOrUndefined = t . union ( [ _version , t . undefined ] ) ;
313- export type _versionOrUndefined = t . TypeOf < typeof _versionOrUndefined > ;
313+ export type _VersionOrUndefined = t . TypeOf < typeof _versionOrUndefined > ;
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ export const updateEndpointListItemRoute = (router: IRouter): void => {
4141 meta,
4242 type,
4343 _tags,
44+ _version,
4445 comments,
4546 entries,
4647 item_id : itemId ,
@@ -49,6 +50,7 @@ export const updateEndpointListItemRoute = (router: IRouter): void => {
4950 const exceptionLists = getExceptionListClient ( context ) ;
5051 const exceptionListItem = await exceptionLists . updateEndpointListItem ( {
5152 _tags,
53+ _version,
5254 comments,
5355 description,
5456 entries,
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ export const updateExceptionListItemRoute = (router: IRouter): void => {
4141 meta,
4242 type,
4343 _tags,
44+ _version,
4445 comments,
4546 entries,
4647 item_id : itemId ,
@@ -50,6 +51,7 @@ export const updateExceptionListItemRoute = (router: IRouter): void => {
5051 const exceptionLists = getExceptionListClient ( context ) ;
5152 const exceptionListItem = await exceptionLists . updateExceptionListItem ( {
5253 _tags,
54+ _version,
5355 comments,
5456 description,
5557 entries,
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ export const updateExceptionListRoute = (router: IRouter): void => {
3636 try {
3737 const {
3838 _tags,
39+ _version,
3940 tags,
4041 name,
4142 description,
@@ -54,6 +55,7 @@ export const updateExceptionListRoute = (router: IRouter): void => {
5455 } else {
5556 const list = await exceptionLists . updateExceptionList ( {
5657 _tags,
58+ _version,
5759 description,
5860 id,
5961 listId,
Original file line number Diff line number Diff line change @@ -131,6 +131,7 @@ export class ExceptionListClient {
131131 */
132132 public updateEndpointListItem = async ( {
133133 _tags,
134+ _version,
134135 comments,
135136 description,
136137 entries,
@@ -145,6 +146,7 @@ export class ExceptionListClient {
145146 await this . createEndpointList ( ) ;
146147 return updateExceptionListItem ( {
147148 _tags,
149+ _version,
148150 comments,
149151 description,
150152 entries,
@@ -198,6 +200,7 @@ export class ExceptionListClient {
198200
199201 public updateExceptionList = async ( {
200202 _tags,
203+ _version,
201204 id,
202205 description,
203206 listId,
@@ -210,6 +213,7 @@ export class ExceptionListClient {
210213 const { savedObjectsClient, user } = this ;
211214 return updateExceptionList ( {
212215 _tags,
216+ _version,
213217 description,
214218 id,
215219 listId,
@@ -270,6 +274,7 @@ export class ExceptionListClient {
270274
271275 public updateExceptionListItem = async ( {
272276 _tags,
277+ _version,
273278 comments,
274279 description,
275280 entries,
@@ -284,6 +289,7 @@ export class ExceptionListClient {
284289 const { savedObjectsClient, user } = this ;
285290 return updateExceptionListItem ( {
286291 _tags,
292+ _version,
287293 comments,
288294 description,
289295 entries,
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ import {
3838 UpdateCommentsArray ,
3939 _Tags ,
4040 _TagsOrUndefined ,
41+ _VersionOrUndefined ,
4142} from '../../../common/schemas' ;
4243
4344export interface ConstructorOptions {
@@ -64,6 +65,7 @@ export interface CreateExceptionListOptions {
6465
6566export interface UpdateExceptionListOptions {
6667 _tags : _TagsOrUndefined ;
68+ _version : _VersionOrUndefined ;
6769 id : IdOrUndefined ;
6870 listId : ListIdOrUndefined ;
6971 namespaceType : NamespaceType ;
@@ -130,6 +132,7 @@ export interface CreateEndpointListItemOptions {
130132
131133export interface UpdateExceptionListItemOptions {
132134 _tags : _TagsOrUndefined ;
135+ _version : _VersionOrUndefined ;
133136 comments : UpdateCommentsArray ;
134137 entries : EntriesArrayOrUndefined ;
135138 id : IdOrUndefined ;
@@ -144,6 +147,7 @@ export interface UpdateExceptionListItemOptions {
144147
145148export interface UpdateEndpointListItemOptions {
146149 _tags : _TagsOrUndefined ;
150+ _version : _VersionOrUndefined ;
147151 comments : UpdateCommentsArray ;
148152 entries : EntriesArrayOrUndefined ;
149153 id : IdOrUndefined ;
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import {
1818 NamespaceType ,
1919 TagsOrUndefined ,
2020 _TagsOrUndefined ,
21+ _VersionOrUndefined ,
2122} from '../../../common/schemas' ;
2223
2324import { getSavedObjectType , transformSavedObjectUpdateToExceptionList } from './utils' ;
@@ -26,6 +27,7 @@ import { getExceptionList } from './get_exception_list';
2627interface UpdateExceptionListOptions {
2728 id : IdOrUndefined ;
2829 _tags : _TagsOrUndefined ;
30+ _version : _VersionOrUndefined ;
2931 name : NameOrUndefined ;
3032 description : DescriptionOrUndefined ;
3133 savedObjectsClient : SavedObjectsClientContract ;
@@ -40,6 +42,7 @@ interface UpdateExceptionListOptions {
4042
4143export const updateExceptionList = async ( {
4244 _tags,
45+ _version,
4346 id,
4447 savedObjectsClient,
4548 namespaceType,
@@ -67,6 +70,9 @@ export const updateExceptionList = async ({
6770 tags,
6871 type,
6972 updated_by : user ,
73+ } ,
74+ {
75+ version : _version ,
7076 }
7177 ) ;
7278 return transformSavedObjectUpdateToExceptionList ( { exceptionList, savedObject } ) ;
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import {
2020 TagsOrUndefined ,
2121 UpdateCommentsArrayOrUndefined ,
2222 _TagsOrUndefined ,
23+ _VersionOrUndefined ,
2324} from '../../../common/schemas' ;
2425
2526import {
@@ -33,6 +34,7 @@ interface UpdateExceptionListItemOptions {
3334 id : IdOrUndefined ;
3435 comments : UpdateCommentsArrayOrUndefined ;
3536 _tags : _TagsOrUndefined ;
37+ _version : _VersionOrUndefined ;
3638 name : NameOrUndefined ;
3739 description : DescriptionOrUndefined ;
3840 entries : EntriesArrayOrUndefined ;
@@ -48,6 +50,7 @@ interface UpdateExceptionListItemOptions {
4850
4951export const updateExceptionListItem = async ( {
5052 _tags,
53+ _version,
5154 comments,
5255 entries,
5356 id,
@@ -89,6 +92,9 @@ export const updateExceptionListItem = async ({
8992 tags,
9093 type,
9194 updated_by : user ,
95+ } ,
96+ {
97+ version : _version ,
9298 }
9399 ) ;
94100 return transformSavedObjectUpdateToExceptionListItem ( {
You can’t perform that action at this time.
0 commit comments