chore: fixed commit branch on generate reference action (#1857)

* fixed commit branch

* fixes after yarn upgrade
This commit is contained in:
Shahed Nasser
2022-07-15 18:08:07 +03:00
committed by GitHub
parent 32b066d923
commit e134f6d237
49 changed files with 13599 additions and 11325 deletions

View File

@@ -1,7 +1,5 @@
# Class: NotificationService
Provides layer to manipulate orchestrate notifications.
## Hierarchy
- `"medusa-interfaces"`
@@ -26,7 +24,7 @@ BaseService.constructor
#### Defined in
[services/notification.js:9](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/notification.js#L9)
[services/notification.js:9](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/notification.js#L9)
## Properties
@@ -36,7 +34,7 @@ BaseService.constructor
#### Defined in
[services/notification.js:30](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/notification.js#L30)
[services/notification.js:30](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/notification.js#L30)
___
@@ -46,7 +44,7 @@ ___
#### Defined in
[services/notification.js:19](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/notification.js#L19)
[services/notification.js:19](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/notification.js#L19)
___
@@ -56,7 +54,7 @@ ___
#### Defined in
[services/notification.js:23](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/notification.js#L23)
[services/notification.js:23](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/notification.js#L23)
___
@@ -66,7 +64,7 @@ ___
#### Defined in
[services/notification.js:27](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/notification.js#L27)
[services/notification.js:27](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/notification.js#L27)
___
@@ -76,7 +74,7 @@ ___
#### Defined in
[services/notification.js:29](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/notification.js#L29)
[services/notification.js:29](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/notification.js#L29)
## Methods
@@ -84,26 +82,20 @@ ___
**handleEvent**(`eventName`, `data`): `Promise`<`any`\>
Handles an event by relaying the event data to the subscribing providers.
The result of the notification send will be persisted in the database in
order to allow for resends. Will log any errors that are encountered.
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `eventName` | `string` | the event to handle |
| `data` | `any` | the data the event was sent with |
| `eventName` | `string` | |
| `data` | `any` | |
#### Returns
`Promise`<`any`\>
- the result of notification subscribed
#### Defined in
[services/notification.js:166](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/notification.js#L166)
[services/notification.js:166](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/notification.js#L166)
___
@@ -111,24 +103,20 @@ ___
**list**(`selector`, `config?`): `Notification`[]
Retrieves a list of notifications.
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `selector` | `any` | the params to select the notifications by. |
| `config` | `any` | the configuration to apply to the query |
| `selector` | `any` | |
| `config` | `any` | |
#### Returns
`Notification`[]
the notifications that satisfy the query.
#### Defined in
[services/notification.js:84](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/notification.js#L84)
[services/notification.js:84](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/notification.js#L84)
___
@@ -136,14 +124,11 @@ ___
**registerAttachmentGenerator**(`service`): `void`
Registers an attachment generator to the service. The generator can be
used to generate on demand invoices or other documents.
#### Parameters
| Name | Type |
| :------ | :------ |
| `service` | `any` |
| Name | Type | Description |
| :------ | :------ | :------ |
| `service` | `any` | |
#### Returns
@@ -151,7 +136,7 @@ used to generate on demand invoices or other documents.
#### Defined in
[services/notification.js:38](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/notification.js#L38)
[services/notification.js:38](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/notification.js#L38)
___
@@ -159,13 +144,11 @@ ___
**registerInstalledProviders**(`providers`): `Promise`<`void`\>
Takes a list of notification provider ids and persists them in the database.
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `providers` | `string`[] | a list of provider ids |
| `providers` | `string`[] | |
#### Returns
@@ -173,7 +156,7 @@ Takes a list of notification provider ids and persists them in the database.
#### Defined in
[services/notification.js:68](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/notification.js#L68)
[services/notification.js:68](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/notification.js#L68)
___
@@ -181,25 +164,20 @@ ___
**resend**(`id`, `config?`): `Notification`
Resends a notification by retrieving a prior notification and calling the
underlying provider's resendNotification method.
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `id` | `string` | the id of the notification |
| `config` | `any` | any configuration that might override the previous send |
| `id` | `string` | |
| `config` | `any` | |
#### Returns
`Notification`
the newly created notification
#### Defined in
[services/notification.js:237](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/notification.js#L237)
[services/notification.js:237](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/notification.js#L237)
___
@@ -207,24 +185,20 @@ ___
**retrieve**(`id`, `config?`): `Notification`
Retrieves a notification with a given id
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `id` | `string` | the id of the notification |
| `config` | `any` | the configuration to apply to the query |
| `id` | `string` | |
| `config` | `any` | |
#### Returns
`Notification`
the notification
#### Defined in
[services/notification.js:101](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/notification.js#L101)
[services/notification.js:101](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/notification.js#L101)
___
@@ -232,24 +206,19 @@ ___
**retrieveProvider_**(`id`): `NotificationProvider`
Finds a provider with a given id. Will throw a NOT_FOUND error if the
resolution fails.
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `id` | `string` | the id of the provider |
| `id` | `string` | |
#### Returns
`NotificationProvider`
the notification provider
#### Defined in
[services/notification.js:147](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/notification.js#L147)
[services/notification.js:147](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/notification.js#L147)
___
@@ -257,26 +226,21 @@ ___
**send**(`event`, `eventData`, `providerId`): `Notification`
Sends a notification, by calling the given provider's sendNotification
method. Persists the Notification in the database.
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `event` | `string` | the name of the event |
| `eventData` | `any` | the data the event was sent with |
| `providerId` | `string` | the provider that should hande the event. |
| `event` | `string` | |
| `eventData` | `any` | |
| `providerId` | `string` | |
#### Returns
`Notification`
the created notification
#### Defined in
[services/notification.js:195](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/notification.js#L195)
[services/notification.js:195](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/notification.js#L195)
___
@@ -284,14 +248,12 @@ ___
**subscribe**(`eventName`, `providerId`): `void`
Subscribes a given provider to an event.
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `eventName` | `string` | the event to subscribe to |
| `providerId` | `string` | the provider that the event will be sent to |
| `eventName` | `string` | |
| `providerId` | `string` | |
#### Returns
@@ -299,7 +261,7 @@ Subscribes a given provider to an event.
#### Defined in
[services/notification.js:126](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/notification.js#L126)
[services/notification.js:126](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/notification.js#L126)
___
@@ -307,20 +269,16 @@ ___
**withTransaction**(`transactionManager`): [`NotificationService`](NotificationService.md)
Sets the service's manager to a given transaction manager.
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `transactionManager` | `EntityManager` | the manager to use |
| `transactionManager` | `EntityManager` | |
#### Returns
[`NotificationService`](NotificationService.md)
a cloned notification service
#### Defined in
[services/notification.js:47](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/notification.js#L47)
[services/notification.js:47](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/notification.js#L47)