docs: create docs workspace (#5174)

* docs: migrate ui docs to docs universe

* created yarn workspace

* added eslint and tsconfig configurations

* fix eslint configurations

* fixed eslint configurations

* shared tailwind configurations

* added shared ui package

* added more shared components

* migrating more components

* made details components shared

* move InlineCode component

* moved InputText

* moved Loading component

* Moved Modal component

* moved Select components

* Moved Tooltip component

* moved Search components

* moved ColorMode provider

* Moved Notification components and providers

* used icons package

* use UI colors in api-reference

* moved Navbar component

* used Navbar and Search in UI docs

* added Feedback to UI docs

* general enhancements

* fix color mode

* added copy colors file from ui-preset

* added features and enhancements to UI docs

* move Sidebar component and provider

* general fixes and preparations for deployment

* update docusaurus version

* adjusted versions

* fix output directory

* remove rootDirectory property

* fix yarn.lock

* moved code component

* added vale for all docs MD and MDX

* fix tests

* fix vale error

* fix deployment errors

* change ignore commands

* add output directory

* fix docs test

* general fixes

* content fixes

* fix announcement script

* added changeset

* fix vale checks

* added nofilter option

* fix vale error
This commit is contained in:
Shahed Nasser
2023-09-21 20:57:15 +03:00
committed by GitHub
parent 19c5d5ba36
commit fa7c94b4cc
3209 changed files with 32188 additions and 31018 deletions

View File

@@ -0,0 +1,425 @@
# Class: AdminDiscountsResource
## Hierarchy
- `default`
**`AdminDiscountsResource`**
## Methods
### addConditionResourceBatch
**addConditionResourceBatch**(`discountId`, `conditionId`, `payload`, `query?`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsRes`](../modules/internal-7.md#admindiscountsres)\>
**`Description`**
Add a batch of items to a discount condition
#### Parameters
| Name | Type |
| :------ | :------ |
| `discountId` | `string` |
| `conditionId` | `string` |
| `payload` | [`AdminPostDiscountsDiscountConditionsConditionBatchReq`](internal-7.AdminPostDiscountsDiscountConditionsConditionBatchReq.md) |
| `query?` | [`AdminPostDiscountsDiscountConditionsConditionBatchParams`](internal-7.AdminPostDiscountsDiscountConditionsConditionBatchParams.md) |
| `customHeaders` | `Record`<`string`, `any`\> |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsRes`](../modules/internal-7.md#admindiscountsres)\>
#### Defined in
[medusa-js/src/resources/admin/discounts.ts:218](https://github.com/medusajs/medusa/blob/29135c051/packages/medusa-js/src/resources/admin/discounts.ts#L218)
___
### addRegion
**addRegion**(`id`, `regionId`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsRes`](../modules/internal-7.md#admindiscountsres)\>
**`Description`**
Adds region to discount
#### Parameters
| Name | Type |
| :------ | :------ |
| `id` | `string` |
| `regionId` | `string` |
| `customHeaders` | `Record`<`string`, `any`\> |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsRes`](../modules/internal-7.md#admindiscountsres)\>
#### Defined in
[medusa-js/src/resources/admin/discounts.ts:27](https://github.com/medusajs/medusa/blob/29135c051/packages/medusa-js/src/resources/admin/discounts.ts#L27)
___
### create
**create**(`payload`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsRes`](../modules/internal-7.md#admindiscountsres)\>
**`Description`**
Creates discounts
#### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | [`AdminPostDiscountsReq`](internal-7.AdminPostDiscountsReq.md) |
| `customHeaders` | `Record`<`string`, `any`\> |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsRes`](../modules/internal-7.md#admindiscountsres)\>
#### Defined in
[medusa-js/src/resources/admin/discounts.ts:39](https://github.com/medusajs/medusa/blob/29135c051/packages/medusa-js/src/resources/admin/discounts.ts#L39)
___
### createCondition
**createCondition**(`discountId`, `payload`, `query?`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsRes`](../modules/internal-7.md#admindiscountsres)\>
**`Description`**
creates a discount condition
#### Parameters
| Name | Type |
| :------ | :------ |
| `discountId` | `string` |
| `payload` | [`AdminPostDiscountsDiscountConditions`](internal-7.AdminPostDiscountsDiscountConditions.md) |
| `query` | [`AdminPostDiscountsDiscountConditionsParams`](internal-7.AdminPostDiscountsDiscountConditionsParams.md) |
| `customHeaders` | `Record`<`string`, `any`\> |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsRes`](../modules/internal-7.md#admindiscountsres)\>
#### Defined in
[medusa-js/src/resources/admin/discounts.ts:148](https://github.com/medusajs/medusa/blob/29135c051/packages/medusa-js/src/resources/admin/discounts.ts#L148)
___
### createDynamicCode
**createDynamicCode**(`id`, `payload`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsRes`](../modules/internal-7.md#admindiscountsres)\>
**`Description`**
Creates a dynamic discount code
#### Parameters
| Name | Type |
| :------ | :------ |
| `id` | `string` |
| `payload` | [`AdminPostDiscountsDiscountDynamicCodesReq`](internal-7.AdminPostDiscountsDiscountDynamicCodesReq.md) |
| `customHeaders` | `Record`<`string`, `any`\> |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsRes`](../modules/internal-7.md#admindiscountsres)\>
#### Defined in
[medusa-js/src/resources/admin/discounts.ts:62](https://github.com/medusajs/medusa/blob/29135c051/packages/medusa-js/src/resources/admin/discounts.ts#L62)
___
### delete
**delete**(`id`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`DeleteResponse`](../modules/internal-3.md#deleteresponse)\>
**`Description`**
Deletes a discount
#### Parameters
| Name | Type |
| :------ | :------ |
| `id` | `string` |
| `customHeaders` | `Record`<`string`, `any`\> |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`DeleteResponse`](../modules/internal-3.md#deleteresponse)\>
#### Defined in
[medusa-js/src/resources/admin/discounts.ts:74](https://github.com/medusajs/medusa/blob/29135c051/packages/medusa-js/src/resources/admin/discounts.ts#L74)
___
### deleteCondition
**deleteCondition**(`discountId`, `conditionId`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`DeleteResponse`](../modules/internal-3.md#deleteresponse)\>
**`Description`**
Removes a condition from a discount
#### Parameters
| Name | Type |
| :------ | :------ |
| `discountId` | `string` |
| `conditionId` | `string` |
| `customHeaders` | `Record`<`string`, `any`\> |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`DeleteResponse`](../modules/internal-3.md#deleteresponse)\>
#### Defined in
[medusa-js/src/resources/admin/discounts.ts:187](https://github.com/medusajs/medusa/blob/29135c051/packages/medusa-js/src/resources/admin/discounts.ts#L187)
___
### deleteConditionResourceBatch
**deleteConditionResourceBatch**(`discountId`, `conditionId`, `payload`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsRes`](../modules/internal-7.md#admindiscountsres)\>
**`Description`**
Delete a batch of items from a discount condition
#### Parameters
| Name | Type |
| :------ | :------ |
| `discountId` | `string` |
| `conditionId` | `string` |
| `payload` | [`AdminDeleteDiscountsDiscountConditionsConditionBatchReq`](internal-7.AdminDeleteDiscountsDiscountConditionsConditionBatchReq.md) |
| `customHeaders` | `Record`<`string`, `any`\> |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsRes`](../modules/internal-7.md#admindiscountsres)\>
#### Defined in
[medusa-js/src/resources/admin/discounts.ts:238](https://github.com/medusajs/medusa/blob/29135c051/packages/medusa-js/src/resources/admin/discounts.ts#L238)
___
### deleteDynamicCode
**deleteDynamicCode**(`id`, `code`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsRes`](../modules/internal-7.md#admindiscountsres)\>
**`Description`**
Deletes a dynamic discount
#### Parameters
| Name | Type |
| :------ | :------ |
| `id` | `string` |
| `code` | `string` |
| `customHeaders` | `Record`<`string`, `any`\> |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsRes`](../modules/internal-7.md#admindiscountsres)\>
#### Defined in
[medusa-js/src/resources/admin/discounts.ts:85](https://github.com/medusajs/medusa/blob/29135c051/packages/medusa-js/src/resources/admin/discounts.ts#L85)
___
### getCondition
**getCondition**(`discountId`, `conditionId`, `query?`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountConditionsRes`](../modules/internal-7.md#admindiscountconditionsres)\>
**`Description`**
Gets a condition from a discount
#### Parameters
| Name | Type |
| :------ | :------ |
| `discountId` | `string` |
| `conditionId` | `string` |
| `query?` | [`AdminGetDiscountsDiscountConditionsConditionParams`](internal-7.AdminGetDiscountsDiscountConditionsConditionParams.md) |
| `customHeaders` | `Record`<`string`, `any`\> |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountConditionsRes`](../modules/internal-7.md#admindiscountconditionsres)\>
#### Defined in
[medusa-js/src/resources/admin/discounts.ts:199](https://github.com/medusajs/medusa/blob/29135c051/packages/medusa-js/src/resources/admin/discounts.ts#L199)
___
### list
**list**(`query?`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsListRes`](../modules/internal-7.md#admindiscountslistres)\>
**`Description`**
Lists discounts
#### Parameters
| Name | Type |
| :------ | :------ |
| `query?` | [`AdminGetDiscountsParams`](internal-7.AdminGetDiscountsParams.md) |
| `customHeaders` | `Record`<`string`, `any`\> |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsListRes`](../modules/internal-7.md#admindiscountslistres)\>
#### Defined in
[medusa-js/src/resources/admin/discounts.ts:119](https://github.com/medusajs/medusa/blob/29135c051/packages/medusa-js/src/resources/admin/discounts.ts#L119)
___
### removeRegion
**removeRegion**(`id`, `regionId`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsRes`](../modules/internal-7.md#admindiscountsres)\>
**`Description`**
Removes a region from a discount
#### Parameters
| Name | Type |
| :------ | :------ |
| `id` | `string` |
| `regionId` | `string` |
| `customHeaders` | `Record`<`string`, `any`\> |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsRes`](../modules/internal-7.md#admindiscountsres)\>
#### Defined in
[medusa-js/src/resources/admin/discounts.ts:136](https://github.com/medusajs/medusa/blob/29135c051/packages/medusa-js/src/resources/admin/discounts.ts#L136)
___
### retrieve
**retrieve**(`id`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsRes`](../modules/internal-7.md#admindiscountsres)\>
**`Description`**
Retrieves a discount
#### Parameters
| Name | Type |
| :------ | :------ |
| `id` | `string` |
| `customHeaders` | `Record`<`string`, `any`\> |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsRes`](../modules/internal-7.md#admindiscountsres)\>
#### Defined in
[medusa-js/src/resources/admin/discounts.ts:97](https://github.com/medusajs/medusa/blob/29135c051/packages/medusa-js/src/resources/admin/discounts.ts#L97)
___
### retrieveByCode
**retrieveByCode**(`code`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsRes`](../modules/internal-7.md#admindiscountsres)\>
**`Description`**
Retrieves a discount by code
#### Parameters
| Name | Type |
| :------ | :------ |
| `code` | `string` |
| `customHeaders` | `Record`<`string`, `any`\> |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsRes`](../modules/internal-7.md#admindiscountsres)\>
#### Defined in
[medusa-js/src/resources/admin/discounts.ts:108](https://github.com/medusajs/medusa/blob/29135c051/packages/medusa-js/src/resources/admin/discounts.ts#L108)
___
### update
**update**(`id`, `payload`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsRes`](../modules/internal-7.md#admindiscountsres)\>
**`Description`**
Updates discount
#### Parameters
| Name | Type |
| :------ | :------ |
| `id` | `string` |
| `payload` | [`AdminPostDiscountsDiscountReq`](internal-7.AdminPostDiscountsDiscountReq.md) |
| `customHeaders` | `Record`<`string`, `any`\> |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsRes`](../modules/internal-7.md#admindiscountsres)\>
#### Defined in
[medusa-js/src/resources/admin/discounts.ts:50](https://github.com/medusajs/medusa/blob/29135c051/packages/medusa-js/src/resources/admin/discounts.ts#L50)
___
### updateCondition
**updateCondition**(`discountId`, `conditionId`, `payload`, `query?`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsRes`](../modules/internal-7.md#admindiscountsres)\>
**`Description`**
Updates a discount condition
#### Parameters
| Name | Type |
| :------ | :------ |
| `discountId` | `string` |
| `conditionId` | `string` |
| `payload` | [`AdminPostDiscountsDiscountConditionsCondition`](internal-7.AdminPostDiscountsDiscountConditionsCondition.md) |
| `query` | [`AdminPostDiscountsDiscountConditionsConditionParams`](internal-7.AdminPostDiscountsDiscountConditionsConditionParams.md) |
| `customHeaders` | `Record`<`string`, `any`\> |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminDiscountsRes`](../modules/internal-7.md#admindiscountsres)\>
#### Defined in
[medusa-js/src/resources/admin/discounts.ts:167](https://github.com/medusajs/medusa/blob/29135c051/packages/medusa-js/src/resources/admin/discounts.ts#L167)