@@ -111,12 +111,51 @@ export const UnPublishItemOperationSchema = PublishItemOperationSchema.omit({ in
111111 intent : z . literal ( 'item/unpublish' ) ,
112112} ) ;
113113
114- export const DeleteItemOperationSchema = z . object ( {
115- _ref : RefSchema . optional ( ) ,
116- intent : z . literal ( 'item/delete' ) ,
117- itemId : IdSchema . optional ( ) ,
118- resourceIdentifier : ResourceIdentifierSchema . optional ( ) ,
119- } ) ;
114+ export const DeleteItemOperationSchema = z
115+ . object ( {
116+ _ref : RefSchema . optional ( ) ,
117+ intent : z . literal ( 'item/delete' ) ,
118+ itemId : IdSchema . optional ( ) ,
119+ resourceIdentifier : ResourceIdentifierSchema . optional ( ) ,
120+ } )
121+ . superRefine ( checkResourceIdentifierOrId ) ;
122+
123+ export const AddItemTreeNodeShortcutsOperationSchema = z
124+ . object ( {
125+ _ref : RefSchema . optional ( ) ,
126+ intent : z . literal ( 'item/paths/addShortcuts' ) ,
127+ itemId : IdSchema . optional ( ) ,
128+ resourceIdentifier : ResourceIdentifierSchema . optional ( ) ,
129+ shortcuts : z . array (
130+ z . object ( {
131+ parentId : IdSchema ,
132+ position : z . number ( ) . int ( ) . min ( 0 ) . optional ( ) ,
133+ } ) ,
134+ ) ,
135+ } )
136+ . superRefine ( checkResourceIdentifierOrId ) ;
137+
138+ export const AddItemTreeNodeAliasesOperationSchema = z
139+ . object ( {
140+ _ref : RefSchema . optional ( ) ,
141+ intent : z . literal ( 'item/paths/addAliases' ) ,
142+ itemId : IdSchema . optional ( ) ,
143+ resourceIdentifier : ResourceIdentifierSchema . optional ( ) ,
144+ language : z . string ( ) . min ( 1 ) ,
145+ paths : z . array ( z . string ( ) . min ( 1 ) ) ,
146+ } )
147+ . superRefine ( checkResourceIdentifierOrId ) ;
148+
149+ export const AddItemTreeNodeHistoryOperationSchema = z
150+ . object ( {
151+ _ref : RefSchema . optional ( ) ,
152+ intent : z . literal ( 'item/paths/addHistory' ) ,
153+ itemId : IdSchema . optional ( ) ,
154+ resourceIdentifier : ResourceIdentifierSchema . optional ( ) ,
155+ language : z . string ( ) . min ( 1 ) ,
156+ paths : z . array ( z . string ( ) . min ( 1 ) ) ,
157+ } )
158+ . superRefine ( checkResourceIdentifierOrId ) ;
120159
121160export type UpdateItemComponentOperation = z . infer < typeof UpdateItemComponentOperationSchema > ;
122161export type UpdateSkuComponentOperation = z . infer < typeof UpdateSkuComponentOperationSchema > ;
@@ -135,3 +174,7 @@ export type UpsertFolderOperation = z.infer<typeof UpsertFolderOperationSchema>;
135174export type CreateProductOperation = z . infer < typeof CreateProductOperationSchema > ;
136175export type UpdateProductOperation = z . infer < typeof UpdateProductOperationSchema > ;
137176export type UpsertProductOperation = z . infer < typeof UpsertProductOperationSchema > ;
177+
178+ export type AddItemTreeNodeShortcutsOperation = z . infer < typeof AddItemTreeNodeShortcutsOperationSchema > ;
179+ export type AddItemTreeNodeAliasesOperation = z . infer < typeof AddItemTreeNodeAliasesOperationSchema > ;
180+ export type AddItemTreeNodeHistoryOperation = z . infer < typeof AddItemTreeNodeHistoryOperationSchema > ;
0 commit comments