@@ -8,75 +8,75 @@ import {
88 UpdateFolderInputSchema ,
99 UpdateProductInputSchema ,
1010} from '../pim/index.js' ;
11- import { checkTuriOrId , IdSchema , RefSchema , TURISchema } from '../shared' ;
11+ import { checkResourceIdentifierOrId , IdSchema , RefSchema , ResourceIdentifierSchema } from '../shared' ;
1212
1313export const CreateDocumentOperationSchema = CreateDocumentInputSchema . extend ( {
1414 _ref : RefSchema . optional ( ) ,
1515 intent : z . literal ( 'document/create' ) ,
1616 language : z . string ( ) . min ( 1 ) ,
17- turi : TURISchema . optional ( ) ,
17+ resourceIdentifier : ResourceIdentifierSchema . optional ( ) ,
1818} ) ;
1919
2020export const UpdateDocumentOperationSchema = UpdateDocumentInputSchema . extend ( {
2121 _ref : RefSchema . optional ( ) ,
2222 intent : z . literal ( 'document/update' ) ,
2323 language : z . string ( ) . min ( 1 ) ,
2424 itemId : IdSchema . optional ( ) ,
25- turi : TURISchema . optional ( ) ,
26- } ) . superRefine ( checkTuriOrId ) ;
25+ resourceIdentifier : ResourceIdentifierSchema . optional ( ) ,
26+ } ) . superRefine ( checkResourceIdentifierOrId ) ;
2727
2828export const UpsertDocumentOperationSchema = CreateDocumentInputSchema . extend ( {
2929 _ref : RefSchema . optional ( ) ,
3030 intent : z . literal ( 'document/upsert' ) ,
3131 language : z . string ( ) . min ( 1 ) ,
3232 itemId : IdSchema . optional ( ) ,
33- turi : TURISchema . optional ( ) ,
33+ resourceIdentifier : ResourceIdentifierSchema . optional ( ) ,
3434} ) ;
3535
3636export const CreateFolderOperationSchema = CreateFolderInputSchema . extend ( {
3737 _ref : RefSchema . optional ( ) ,
3838 intent : z . literal ( 'folder/create' ) ,
3939 language : z . string ( ) . min ( 1 ) ,
40- turi : TURISchema . optional ( ) ,
40+ resourceIdentifier : ResourceIdentifierSchema . optional ( ) ,
4141} ) ;
4242
4343export const UpdateFolderOperationSchema = UpdateFolderInputSchema . extend ( {
4444 _ref : RefSchema . optional ( ) ,
4545 intent : z . literal ( 'folder/update' ) ,
4646 language : z . string ( ) . min ( 1 ) ,
4747 itemId : IdSchema . optional ( ) ,
48- turi : TURISchema . optional ( ) ,
49- } ) . superRefine ( checkTuriOrId ) ;
48+ resourceIdentifier : ResourceIdentifierSchema . optional ( ) ,
49+ } ) . superRefine ( checkResourceIdentifierOrId ) ;
5050
5151export const UpsertFolderOperationSchema = CreateFolderInputSchema . extend ( {
5252 _ref : RefSchema . optional ( ) ,
5353 intent : z . literal ( 'folder/upsert' ) ,
5454 language : z . string ( ) . min ( 1 ) ,
5555 itemId : IdSchema . optional ( ) ,
56- turi : TURISchema . optional ( ) ,
56+ resourceIdentifier : ResourceIdentifierSchema . optional ( ) ,
5757} ) ;
5858
5959export const CreateProductOperationSchema = CreateProductInputSchema . extend ( {
6060 _ref : RefSchema . optional ( ) ,
6161 intent : z . literal ( 'product/create' ) ,
6262 language : z . string ( ) . min ( 1 ) ,
63- turi : TURISchema . optional ( ) ,
63+ resourceIdentifier : ResourceIdentifierSchema . optional ( ) ,
6464} ) ;
6565
6666export const UpdateProductOperationSchema = UpdateProductInputSchema . extend ( {
6767 _ref : RefSchema . optional ( ) ,
6868 intent : z . literal ( 'product/update' ) ,
6969 language : z . string ( ) . min ( 1 ) ,
7070 itemId : IdSchema . optional ( ) ,
71- turi : TURISchema . optional ( ) ,
72- } ) . superRefine ( checkTuriOrId ) ;
71+ resourceIdentifier : ResourceIdentifierSchema . optional ( ) ,
72+ } ) . superRefine ( checkResourceIdentifierOrId ) ;
7373
7474export const UpsertProductOperationSchema = CreateProductInputSchema . extend ( {
7575 _ref : RefSchema . optional ( ) ,
7676 intent : z . literal ( 'product/upsert' ) ,
7777 language : z . string ( ) . min ( 1 ) ,
7878 itemId : IdSchema . optional ( ) ,
79- turi : TURISchema . optional ( ) ,
79+ resourceIdentifier : ResourceIdentifierSchema . optional ( ) ,
8080} ) ;
8181
8282export const UpdateItemComponentOperationSchema = z
@@ -86,9 +86,9 @@ export const UpdateItemComponentOperationSchema = z
8686 language : z . string ( ) . min ( 1 ) ,
8787 component : ComponentContentInputSchema ,
8888 itemId : IdSchema . optional ( ) ,
89- turi : TURISchema . optional ( ) ,
89+ resourceIdentifier : ResourceIdentifierSchema . optional ( ) ,
9090 } )
91- . superRefine ( checkTuriOrId ) ;
91+ . superRefine ( checkResourceIdentifierOrId ) ;
9292
9393export const UpdateSkuComponentOperationSchema = z . object ( {
9494 _ref : RefSchema . optional ( ) ,
@@ -104,7 +104,7 @@ export const PublishItemOperationSchema = z.object({
104104 language : z . string ( ) . min ( 1 ) ,
105105 includeDescendants : z . boolean ( ) . optional ( ) ,
106106 itemId : IdSchema . optional ( ) ,
107- turi : TURISchema . optional ( ) ,
107+ resourceIdentifier : ResourceIdentifierSchema . optional ( ) ,
108108} ) ;
109109
110110export const UnPublishItemOperationSchema = PublishItemOperationSchema . omit ( { intent : true } ) . extend ( {
0 commit comments