Skip to main content

Class: AdminCollectionsResource

Hierarchy

  • Copy to Clipboard

    Copy to Clipboard

Methods

addProducts

addProducts(

Copy to Clipboard
,
Copy to Clipboard
,
Copy to Clipboard
):
Copy to Clipboard
<
Copy to Clipboard
>

Copy to Clipboard

Updates products associated with a Product Collection

Parameters

NameTypeDescription
Copy to Clipboard
Copy to Clipboard
the id of the Collection
Copy to Clipboard
Copy to Clipboard
an object which contains an array of Product IDs to add to the Product Collection
Copy to Clipboard
Copy to Clipboard
<
Copy to Clipboard
,
Copy to Clipboard
>

Returns

<
Copy to Clipboard
>

Defined in

medusa-js/src/resources/admin/collections.ts:100


create

create(

Copy to Clipboard
,
Copy to Clipboard
):
Copy to Clipboard
<
Copy to Clipboard
>

Copy to Clipboard

Creates a collection.

Parameters

NameType
Copy to Clipboard
Copy to Clipboard
Copy to Clipboard
Copy to Clipboard
<
Copy to Clipboard
,
Copy to Clipboard
>

Returns

<
Copy to Clipboard
>

Created collection.

Defined in

medusa-js/src/resources/admin/collections.ts:22


delete

delete(

Copy to Clipboard
,
Copy to Clipboard
):
Copy to Clipboard
<
Copy to Clipboard
>

Copy to Clipboard

deletes a collection

Parameters

NameTypeDescription
Copy to Clipboard
Copy to Clipboard
id of collection to delete.
Copy to Clipboard
Copy to Clipboard
<
Copy to Clipboard
,
Copy to Clipboard
>

Returns

<
Copy to Clipboard
>

Deleted response

Defined in

medusa-js/src/resources/admin/collections.ts:52


list

list(

Copy to Clipboard
,
Copy to Clipboard
):
Copy to Clipboard
<
Copy to Clipboard
>

Copy to Clipboard

Lists collections matching a query

Parameters

NameTypeDescription
Copy to Clipboard
Copy to Clipboard
Query for searching collections
Copy to Clipboard
Copy to Clipboard
<
Copy to Clipboard
,
Copy to Clipboard
>

Returns

<
Copy to Clipboard
>

a list of collections matching the query.

Defined in

medusa-js/src/resources/admin/collections.ts:80


removeProducts

removeProducts(

Copy to Clipboard
,
Copy to Clipboard
,
Copy to Clipboard
):
Copy to Clipboard
<
Copy to Clipboard
>

Copy to Clipboard

Removes products associated with a Product Collection

Parameters

NameTypeDescription
Copy to Clipboard
Copy to Clipboard
the id of the Collection
Copy to Clipboard
Copy to Clipboard
an object which contains an array of Product IDs to add to the Product Collection
Copy to Clipboard
Copy to Clipboard
<
Copy to Clipboard
,
Copy to Clipboard
>

Returns

<
Copy to Clipboard
>

Defined in

medusa-js/src/resources/admin/collections.ts:115


retrieve

retrieve(

Copy to Clipboard
,
Copy to Clipboard
):
Copy to Clipboard
<
Copy to Clipboard
>

Copy to Clipboard

get a collection

Parameters

NameTypeDescription
Copy to Clipboard
Copy to Clipboard
id of the collection to retrieve.
Copy to Clipboard
Copy to Clipboard
<
Copy to Clipboard
,
Copy to Clipboard
>

Returns

<
Copy to Clipboard
>

the collection with the given id

Defined in

medusa-js/src/resources/admin/collections.ts:66


update

update(

Copy to Clipboard
,
Copy to Clipboard
,
Copy to Clipboard
):
Copy to Clipboard
<
Copy to Clipboard
>

Copy to Clipboard

Updates a collection

Parameters

NameTypeDescription
Copy to Clipboard
Copy to Clipboard
id of the collection to update.
Copy to Clipboard
Copy to Clipboard
update to apply to collection.
Copy to Clipboard
Copy to Clipboard
<
Copy to Clipboard
,
Copy to Clipboard
>

Returns

<
Copy to Clipboard
>

the updated collection.

Defined in

medusa-js/src/resources/admin/collections.ts:37