@@ -39,7 +39,7 @@ describe("Catalog Operations", () => {
3939 } ;
4040 mockAxiosInstance . post . mockResolvedValue ( mockResponse ) ;
4141
42- const result = await client . createCatalog ( "test-catalog" ) ;
42+ const result = await client . createCatalog ( { catalogName : "test-catalog" } ) ;
4343
4444 expect ( mockAxiosInstance . post ) . toHaveBeenCalledWith (
4545 "/api/catalogs/test-catalog"
@@ -56,7 +56,7 @@ describe("Catalog Operations", () => {
5656 } ;
5757 mockAxiosInstance . post . mockResolvedValue ( mockResponse ) ;
5858
59- await client . createCatalog ( "test catalog/with+special" ) ;
59+ await client . createCatalog ( { catalogName : "test catalog/with+special" } ) ;
6060
6161 expect ( mockAxiosInstance . post ) . toHaveBeenCalledWith (
6262 "/api/catalogs/test%20catalog%2Fwith%2Bspecial"
@@ -99,7 +99,10 @@ describe("Catalog Operations", () => {
9999 } ;
100100 mockAxiosInstance . get . mockResolvedValue ( mockResponse ) ;
101101
102- const result = await client . getCatalogItem ( "products" , "item1" ) ;
102+ const result = await client . getCatalogItem ( {
103+ catalogName : "products" ,
104+ itemId : "item1" ,
105+ } ) ;
103106
104107 expect ( mockAxiosInstance . get ) . toHaveBeenCalledWith (
105108 "/api/catalogs/products/items/item1"
@@ -119,7 +122,10 @@ describe("Catalog Operations", () => {
119122 } ;
120123 mockAxiosInstance . get . mockResolvedValue ( mockResponse ) ;
121124
122- await client . getCatalogItem ( "my catalog" , "item/1" ) ;
125+ await client . getCatalogItem ( {
126+ catalogName : "my catalog" ,
127+ itemId : "item/1" ,
128+ } ) ;
123129
124130 expect ( mockAxiosInstance . get ) . toHaveBeenCalledWith (
125131 "/api/catalogs/my%20catalog/items/item%2F1"
@@ -137,7 +143,10 @@ describe("Catalog Operations", () => {
137143 } ;
138144 mockAxiosInstance . delete . mockResolvedValue ( mockResponse ) ;
139145
140- const result = await client . deleteCatalogItem ( "products" , "item1" ) ;
146+ const result = await client . deleteCatalogItem ( {
147+ catalogName : "products" ,
148+ itemId : "item1" ,
149+ } ) ;
141150
142151 expect ( mockAxiosInstance . delete ) . toHaveBeenCalledWith (
143152 "/api/catalogs/products/items/item1"
@@ -154,7 +163,10 @@ describe("Catalog Operations", () => {
154163 } ;
155164 mockAxiosInstance . delete . mockResolvedValue ( mockResponse ) ;
156165
157- await client . deleteCatalogItem ( "my catalog" , "item+1" ) ;
166+ await client . deleteCatalogItem ( {
167+ catalogName : "my catalog" ,
168+ itemId : "item+1" ,
169+ } ) ;
158170
159171 expect ( mockAxiosInstance . delete ) . toHaveBeenCalledWith (
160172 "/api/catalogs/my%20catalog/items/item%2B1"
@@ -427,7 +439,10 @@ describe("Catalog Operations", () => {
427439 const expectedError = createIterableError ( axiosError ) ;
428440 mockAxiosInstance . get . mockRejectedValue ( expectedError ) ;
429441
430- const promise = client . getCatalogItem ( "nonexistent" , "item123" ) ;
442+ const promise = client . getCatalogItem ( {
443+ catalogName : "nonexistent" ,
444+ itemId : "item123" ,
445+ } ) ;
431446 await expect ( promise ) . rejects . toThrow ( IterableApiError ) ;
432447
433448 try {
@@ -452,7 +467,7 @@ describe("Catalog Operations", () => {
452467 } ;
453468 mockAxiosInstance . delete . mockResolvedValue ( mockResponse ) ;
454469
455- const result = await client . deleteCatalog ( "test-catalog" ) ;
470+ const result = await client . deleteCatalog ( { catalogName : "test-catalog" } ) ;
456471
457472 expect ( mockAxiosInstance . delete ) . toHaveBeenCalledWith (
458473 "/api/catalogs/test-catalog"
@@ -469,7 +484,7 @@ describe("Catalog Operations", () => {
469484 } ;
470485 mockAxiosInstance . delete . mockResolvedValue ( mockResponse ) ;
471486
472- await client . deleteCatalog ( "test catalog with spaces" ) ;
487+ await client . deleteCatalog ( { catalogName : "test catalog with spaces" } ) ;
473488
474489 expect ( mockAxiosInstance . delete ) . toHaveBeenCalledWith (
475490 "/api/catalogs/test%20catalog%20with%20spaces"
0 commit comments