Skip to content

Commit

Permalink
docs: Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien2p committed Jul 27, 2022
1 parent 17915cd commit c299896
Show file tree
Hide file tree
Showing 58 changed files with 205 additions and 157 deletions.
26 changes: 25 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Depending on your situation, pick the right getting started section.

In that case, you must already have scaffold a new medusa store project. If that's not the case you can [follow the tutorial here](https://docs.medusajs.com/quickstart/quick-start).

Run the following command in your terminal (The last version is 1.7.1)
Run the following command in your terminal (The last version is 1.7.3)

```bash
npm install medusa-extender
Expand Down Expand Up @@ -394,6 +394,30 @@ export class Product extends MedusaProduct {
> The `override` parameter of the `@MedusaEntity` decorator allow to specify which entity
> from the core must be overridden.
To make your project aware of your customisation
at the medusa core level, you can use the [module augmentation](https://www.typescriptlang.org/docs/handbook/declaration-merging.html)
approach.

here is an example

```ts
// src/modules/your_modules/index.d.ts

import { User as ExtendedUser } from '@modules/user/user.entity';
import { default as ExtendedUserRepository } from '@modules/user/user.repository';

declare module '@medusajs/medusa/dist/models/user' {
export declare class User extends ExtendedUser {}
}

declare module '@medusajs/medusa' {
export declare class UserRepository extends ExtendedUserRepository {}
}

```

To see a live example, you can look at the starters, they include the module augmentation approach.

### @Repository

This decorator gives you the ability to either create a new custom repository that will
Expand Down
8 changes: 4 additions & 4 deletions docs/classes/Medusa.Medusa-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Load medusa and apply all components

#### Defined in

[src/Medusa.ts:39](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/Medusa.ts#L39)
[src/Medusa.ts:39](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/Medusa.ts#L39)

## Properties

Expand All @@ -46,7 +46,7 @@ Load medusa and apply all components

#### Defined in

[src/Medusa.ts:32](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/Medusa.ts#L32)
[src/Medusa.ts:32](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/Medusa.ts#L32)

___

Expand All @@ -56,7 +56,7 @@ ___

#### Defined in

[src/Medusa.ts:33](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/Medusa.ts#L33)
[src/Medusa.ts:33](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/Medusa.ts#L33)

## Methods

Expand All @@ -76,4 +76,4 @@ ___

#### Defined in

[src/Medusa.ts:47](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/Medusa.ts#L47)
[src/Medusa.ts:47](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/Medusa.ts#L47)
2 changes: 1 addition & 1 deletion docs/classes/core_componentMap.ComponentMap.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ Map.get

#### Defined in

[src/core/componentMap.ts:4](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/core/componentMap.ts#L4)
[src/core/componentMap.ts:4](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/core/componentMap.ts#L4)
12 changes: 6 additions & 6 deletions docs/classes/core_event_emmiter.Internals.CustomEventEmmiter.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ EventEmitter.constructor

#### Defined in

[src/core/event-emmiter.ts:22](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/core/event-emmiter.ts#L22)
[src/core/event-emmiter.ts:22](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/core/event-emmiter.ts#L22)

## Properties

Expand All @@ -51,7 +51,7 @@ EventEmitter.constructor

#### Defined in

[src/core/event-emmiter.ts:20](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/core/event-emmiter.ts#L20)
[src/core/event-emmiter.ts:20](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/core/event-emmiter.ts#L20)

## Methods

Expand Down Expand Up @@ -80,7 +80,7 @@ Emit an asynchrone event entity based and wait for the result.

#### Defined in

[src/core/event-emmiter.ts:79](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/core/event-emmiter.ts#L79)
[src/core/event-emmiter.ts:79](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/core/event-emmiter.ts#L79)

___

Expand Down Expand Up @@ -110,7 +110,7 @@ Register a new event handler.

#### Defined in

[src/core/event-emmiter.ts:32](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/core/event-emmiter.ts#L32)
[src/core/event-emmiter.ts:32](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/core/event-emmiter.ts#L32)

___

Expand All @@ -132,7 +132,7 @@ Apply all event handlers hold by the `listenerDescriptor`.

#### Defined in

[src/core/event-emmiter.ts:44](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/core/event-emmiter.ts#L44)
[src/core/event-emmiter.ts:44](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/core/event-emmiter.ts#L44)

___

Expand All @@ -146,4 +146,4 @@ ___

#### Defined in

[src/core/event-emmiter.ts:67](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/core/event-emmiter.ts#L67)
[src/core/event-emmiter.ts:67](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/core/event-emmiter.ts#L67)
26 changes: 13 additions & 13 deletions docs/classes/core_logger.Logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Internal logger to display information about the build.

#### Defined in

[src/core/logger.ts:20](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/core/logger.ts#L20)
[src/core/logger.ts:20](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/core/logger.ts#L20)

## Properties

Expand All @@ -59,7 +59,7 @@ Internal logger to display information about the build.

#### Defined in

[src/core/logger.ts:10](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/core/logger.ts#L10)
[src/core/logger.ts:10](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/core/logger.ts#L10)

___

Expand All @@ -69,7 +69,7 @@ ___

#### Defined in

[src/core/logger.ts:9](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/core/logger.ts#L9)
[src/core/logger.ts:9](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/core/logger.ts#L9)

___

Expand All @@ -79,7 +79,7 @@ ___

#### Defined in

[src/core/logger.ts:8](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/core/logger.ts#L8)
[src/core/logger.ts:8](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/core/logger.ts#L8)

## Accessors

Expand All @@ -93,7 +93,7 @@ ___

#### Defined in

[src/core/logger.ts:16](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/core/logger.ts#L16)
[src/core/logger.ts:16](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/core/logger.ts#L16)

___

Expand All @@ -107,7 +107,7 @@ ___

#### Defined in

[src/core/logger.ts:12](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/core/logger.ts#L12)
[src/core/logger.ts:12](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/core/logger.ts#L12)

## Methods

Expand All @@ -131,7 +131,7 @@ Build logs taking in count the level color

#### Defined in

[src/core/logger.ts:89](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/core/logger.ts#L89)
[src/core/logger.ts:89](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/core/logger.ts#L89)

___

Expand All @@ -154,7 +154,7 @@ Display error logs in red immediately

#### Defined in

[src/core/logger.ts:66](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/core/logger.ts#L66)
[src/core/logger.ts:66](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/core/logger.ts#L66)

___

Expand All @@ -170,7 +170,7 @@ display all queues logs and then reset the queue.

#### Defined in

[src/core/logger.ts:73](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/core/logger.ts#L73)
[src/core/logger.ts:73](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/core/logger.ts#L73)

___

Expand All @@ -193,7 +193,7 @@ Display log immediately.

#### Defined in

[src/core/logger.ts:48](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/core/logger.ts#L48)
[src/core/logger.ts:48](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/core/logger.ts#L48)

___

Expand All @@ -216,7 +216,7 @@ Push new logs to queue and then show them later on.

#### Defined in

[src/core/logger.ts:34](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/core/logger.ts#L34)
[src/core/logger.ts:34](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/core/logger.ts#L34)

___

Expand All @@ -239,7 +239,7 @@ Display warning immediately.

#### Defined in

[src/core/logger.ts:57](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/core/logger.ts#L57)
[src/core/logger.ts:57](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/core/logger.ts#L57)

___

Expand All @@ -260,4 +260,4 @@ ___

#### Defined in

[src/core/logger.ts:25](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/core/logger.ts#L25)
[src/core/logger.ts:25](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/core/logger.ts#L25)
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:41](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/decorators/onMedusaEntityEvent.decorator.ts#L41)
[src/decorators/onMedusaEntityEvent.decorator.ts:41](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/decorators/onMedusaEntityEvent.decorator.ts#L41)

## Properties

Expand All @@ -55,7 +55,7 @@

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:39](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/decorators/onMedusaEntityEvent.decorator.ts#L39)
[src/decorators/onMedusaEntityEvent.decorator.ts:39](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/decorators/onMedusaEntityEvent.decorator.ts#L39)

___

Expand All @@ -65,7 +65,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:38](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/decorators/onMedusaEntityEvent.decorator.ts#L38)
[src/decorators/onMedusaEntityEvent.decorator.ts:38](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/decorators/onMedusaEntityEvent.decorator.ts#L38)

## Accessors

Expand All @@ -79,7 +79,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:49](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/decorators/onMedusaEntityEvent.decorator.ts#L49)
[src/decorators/onMedusaEntityEvent.decorator.ts:49](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/decorators/onMedusaEntityEvent.decorator.ts#L49)

___

Expand All @@ -93,7 +93,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:45](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/decorators/onMedusaEntityEvent.decorator.ts#L45)
[src/decorators/onMedusaEntityEvent.decorator.ts:45](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/decorators/onMedusaEntityEvent.decorator.ts#L45)

## Methods

Expand All @@ -120,7 +120,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:69](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/decorators/onMedusaEntityEvent.decorator.ts#L69)
[src/decorators/onMedusaEntityEvent.decorator.ts:69](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/decorators/onMedusaEntityEvent.decorator.ts#L69)

___

Expand All @@ -146,7 +146,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:57](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/decorators/onMedusaEntityEvent.decorator.ts#L57)
[src/decorators/onMedusaEntityEvent.decorator.ts:57](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/decorators/onMedusaEntityEvent.decorator.ts#L57)

___

Expand All @@ -173,7 +173,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:83](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/decorators/onMedusaEntityEvent.decorator.ts#L83)
[src/decorators/onMedusaEntityEvent.decorator.ts:83](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/decorators/onMedusaEntityEvent.decorator.ts#L83)

___

Expand All @@ -199,7 +199,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:65](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/decorators/onMedusaEntityEvent.decorator.ts#L65)
[src/decorators/onMedusaEntityEvent.decorator.ts:65](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/decorators/onMedusaEntityEvent.decorator.ts#L65)

___

Expand All @@ -226,7 +226,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:76](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/decorators/onMedusaEntityEvent.decorator.ts#L76)
[src/decorators/onMedusaEntityEvent.decorator.ts:76](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/decorators/onMedusaEntityEvent.decorator.ts#L76)

___

Expand All @@ -252,7 +252,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:61](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/decorators/onMedusaEntityEvent.decorator.ts#L61)
[src/decorators/onMedusaEntityEvent.decorator.ts:61](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/decorators/onMedusaEntityEvent.decorator.ts#L61)

___

Expand Down Expand Up @@ -280,7 +280,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:90](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/decorators/onMedusaEntityEvent.decorator.ts#L90)
[src/decorators/onMedusaEntityEvent.decorator.ts:90](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/decorators/onMedusaEntityEvent.decorator.ts#L90)

___

Expand All @@ -300,4 +300,4 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:53](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/decorators/onMedusaEntityEvent.decorator.ts#L53)
[src/decorators/onMedusaEntityEvent.decorator.ts:53](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/decorators/onMedusaEntityEvent.decorator.ts#L53)
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@

#### Defined in

[src/modules/multi-tenancy/tenant.middleware.ts:12](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/modules/multi-tenancy/tenant.middleware.ts#L12)
[src/modules/multi-tenancy/tenant.middleware.ts:12](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/modules/multi-tenancy/tenant.middleware.ts#L12)
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@

#### Defined in

[src/modules/multi-tenancy/tenant.module.ts:9](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/modules/multi-tenancy/tenant.module.ts#L9)
[src/modules/multi-tenancy/tenant.module.ts:9](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/modules/multi-tenancy/tenant.module.ts#L9)
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#### Defined in

[src/modules/multi-tenancy/tenant.service.ts:11](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/modules/multi-tenancy/tenant.service.ts#L11)
[src/modules/multi-tenancy/tenant.service.ts:11](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/modules/multi-tenancy/tenant.service.ts#L11)

## Properties

Expand All @@ -43,7 +43,7 @@

#### Defined in

[src/modules/multi-tenancy/tenant.service.ts:9](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/modules/multi-tenancy/tenant.service.ts#L9)
[src/modules/multi-tenancy/tenant.service.ts:9](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/modules/multi-tenancy/tenant.service.ts#L9)

## Methods

Expand All @@ -66,4 +66,4 @@ Provide a way to switch between database connections depending on the request pr

#### Defined in

[src/modules/multi-tenancy/tenant.service.ts:18](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/modules/multi-tenancy/tenant.service.ts#L18)
[src/modules/multi-tenancy/tenant.service.ts:18](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/modules/multi-tenancy/tenant.service.ts#L18)
2 changes: 1 addition & 1 deletion docs/interfaces/core_types.MedusaDynamicModule.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ Describe a dynamic module which resolve its import dynamically.

#### Defined in

[src/core/types.ts:189](https://github.com/adrien2p/medusa-extender/blob/624a76f/src/core/types.ts#L189)
[src/core/types.ts:189](https://github.com/adrien2p/medusa-extender/blob/17915cd/src/core/types.ts#L189)
Loading

0 comments on commit c299896

Please sign in to comment.