Files
klz-cables.com/.pnpm-store/v10/files/a1/dd6a65a7f4de52d815cf5ff5c9a59b6eaffd005987434df3d7e0d53a05ca39ee676e9271a6ea60e38158fdef923daa9638366b6c7adaf0f10e2e442e9e018f
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

51 lines
2.8 KiB
Plaintext

import { NestedPartial, UnpackList } from "../../../types/utils.js";
import { CollectionType } from "../../../types/schema.js";
import { ApplyQueryFields } from "../../../types/output.js";
import { Query } from "../../../types/query.js";
import { RestCommand } from "../../types.js";
//#region src/rest/commands/update/items.d.ts
type UpdateItemOutput<Schema, Collection extends keyof Schema, TQuery extends Query<Schema, Schema[Collection]>> = ApplyQueryFields<Schema, CollectionType<Schema, Collection>, TQuery['fields']>;
/**
* Update multiple items at the same time.
*
* @param collection The collection of the items
* @param keysOrQuery The primary keys or a query
* @param item The item data to update
* @param query Optional return data query
*
* @returns Returns the item objects for the updated items.
* @throws Will throw if keysOrQuery is empty
* @throws Will throw if collection is empty
* @throws Will throw if collection is a core collection
*/
declare const updateItems: <Schema, Collection extends keyof Schema, const TQuery extends Query<Schema, Schema[Collection]>>(collection: Collection, keysOrQuery: string[] | number[] | Query<Schema, Schema[Collection]>, item: NestedPartial<UnpackList<Schema[Collection]>>, query?: TQuery) => RestCommand<UpdateItemOutput<Schema, Collection, TQuery>[], Schema>;
/**
* Update multiple items as batch.
*
* @param collection The collection of the items
* @param items The items to update
* @param query Optional return data query
*
* @returns Returns the item objects for the updated items.
* @throws Will throw if collection is empty
* @throws Will throw if collection is a core collection
*/
declare const updateItemsBatch: <Schema, Collection extends keyof Schema, const TQuery extends Query<Schema, Schema[Collection]>>(collection: Collection, items: NestedPartial<UnpackList<Schema[Collection]>>[], query?: TQuery) => RestCommand<UpdateItemOutput<Schema, Collection, TQuery>[], Schema>;
/**
* Update an existing item.
*
* @param collection The collection of the item
* @param key The primary key of the item
* @param item The item data to update
* @param query Optional return data query
*
* @returns Returns the item object of the item that was updated.
* @throws Will throw if key is empty
* @throws Will throw if collection is empty
* @throws Will throw if collection is a core collection
*/
declare const updateItem: <Schema, Collection extends keyof Schema, const TQuery extends Query<Schema, Schema[Collection]>, Item = UnpackList<Schema[Collection]>>(collection: Collection, key: string | number, item: NestedPartial<Item>, query?: TQuery) => RestCommand<UpdateItemOutput<Schema, Collection, TQuery>, Schema>;
//#endregion
export { UpdateItemOutput, updateItem, updateItems, updateItemsBatch };
//# sourceMappingURL=items.d.ts.map