Files
medusa-store/docs/content/references/js-client/classes/AdminCollectionsResource.md
Shahed Nasser 02d5c1da88 docs: update Typedoc and regenerate references (#1994)
* generated new services reference

* changed from automatic push to automated pull request

* updated typedoc, regenerated JS Client reference

* regenerated the reference after updating typedoc

* added action for js client
2022-08-04 17:29:52 +03:00

4.1 KiB

Class: AdminCollectionsResource

Hierarchy

  • default

    AdminCollectionsResource

Methods

create

create(payload, customHeaders?): ResponsePromise<AdminCollectionsRes>

Description

Creates a collection.

Parameters

Name Type
payload AdminPostCollectionsReq
customHeaders Record<string, any>

Returns

ResponsePromise<AdminCollectionsRes>

Created collection.

Defined in

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


delete

delete(id, customHeaders?): ResponsePromise<DeleteResponse>

Description

deletes a collection

Parameters

Name Type Description
id string id of collection to delete.
customHeaders Record<string, any>

Returns

ResponsePromise<DeleteResponse>

Deleted response

Defined in

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


list

list(query?, customHeaders?): ResponsePromise<AdminCollectionsListRes>

Description

Lists collections matching a query

Parameters

Name Type Description
query? AdminGetCollectionsParams Query for searching collections
customHeaders Record<string, any>

Returns

ResponsePromise<AdminCollectionsListRes>

a list of collections matching the query.

Defined in

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


retrieve

retrieve(id, customHeaders?): ResponsePromise<AdminCollectionsRes>

Description

get a collection

Parameters

Name Type Description
id string id of the collection to retrieve.
customHeaders Record<string, any>

Returns

ResponsePromise<AdminCollectionsRes>

the collection with the given id

Defined in

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


update

update(id, payload, customHeaders?): ResponsePromise<AdminCollectionsRes>

Description

Updates a collection

Parameters

Name Type Description
id string id of the collection to update.
payload AdminPostCollectionsCollectionReq update to apply to collection.
customHeaders Record<string, any>

Returns

ResponsePromise<AdminCollectionsRes>

the updated collection.

Defined in

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