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
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- `"medusa-interfaces"`
|
||||
- `TransactionBaseService`<[`NoteService`](NoteService.md)\>
|
||||
|
||||
↳ **`NoteService`**
|
||||
|
||||
@@ -16,21 +16,97 @@
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `__namedParameters` | `Object` |
|
||||
| `__namedParameters` | `InjectedDependencies` |
|
||||
|
||||
#### Overrides
|
||||
|
||||
BaseService.constructor
|
||||
TransactionBaseService<NoteService\>.constructor
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/note.js:12](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/note.js#L12)
|
||||
[packages/medusa/src/services/note.ts:29](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/services/note.ts#L29)
|
||||
|
||||
## Properties
|
||||
|
||||
### configModule
|
||||
|
||||
• `Protected` `Optional` `Readonly` **configModule**: `Record`<`string`, `unknown`\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
TransactionBaseService.configModule
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/medusa/src/interfaces/transaction-base-service.ts:13](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/interfaces/transaction-base-service.ts#L13)
|
||||
|
||||
___
|
||||
|
||||
### container
|
||||
|
||||
• `Protected` `Readonly` **container**: `unknown`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
TransactionBaseService.container
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/medusa/src/interfaces/transaction-base-service.ts:12](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/interfaces/transaction-base-service.ts#L12)
|
||||
|
||||
___
|
||||
|
||||
### eventBus\_
|
||||
|
||||
• `Protected` `Readonly` **eventBus\_**: [`EventBusService`](EventBusService.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/medusa/src/services/note.ts:27](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/services/note.ts#L27)
|
||||
|
||||
___
|
||||
|
||||
### manager\_
|
||||
|
||||
• `Protected` **manager\_**: `EntityManager`
|
||||
|
||||
#### Overrides
|
||||
|
||||
TransactionBaseService.manager\_
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/medusa/src/services/note.ts:24](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/services/note.ts#L24)
|
||||
|
||||
___
|
||||
|
||||
### noteRepository\_
|
||||
|
||||
• `Protected` `Readonly` **noteRepository\_**: typeof `NoteRepository`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/medusa/src/services/note.ts:26](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/services/note.ts#L26)
|
||||
|
||||
___
|
||||
|
||||
### transactionManager\_
|
||||
|
||||
• `Protected` **transactionManager\_**: `undefined` \| `EntityManager`
|
||||
|
||||
#### Overrides
|
||||
|
||||
TransactionBaseService.transactionManager\_
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/medusa/src/services/note.ts:25](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/services/note.ts#L25)
|
||||
|
||||
___
|
||||
|
||||
### Events
|
||||
|
||||
▪ `Static` **Events**: `Object`
|
||||
▪ `Static` `Readonly` **Events**: `Object`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
@@ -42,48 +118,94 @@ BaseService.constructor
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/note.js:6](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/note.js#L6)
|
||||
[packages/medusa/src/services/note.ts:18](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/services/note.ts#L18)
|
||||
|
||||
## Methods
|
||||
|
||||
### create
|
||||
### atomicPhase\_
|
||||
|
||||
▸ **create**(`data`, `config?`): `Promise`<`any`\>
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
|
||||
Wraps some work within a transactional block. If the service already has
|
||||
a transaction manager attached this will be reused, otherwise a new
|
||||
transaction manager is created.
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name |
|
||||
| :------ |
|
||||
| `TResult` |
|
||||
| `TError` |
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `data` | `CreateNoteInput` | |
|
||||
| `config` | `any` | |
|
||||
| `work` | (`transactionManager`: `EntityManager`) => `Promise`<`TResult`\> | the transactional work to be done |
|
||||
| `isolationOrErrorHandler?` | `IsolationLevel` \| (`error`: `TError`) => `Promise`<`void` \| `TResult`\> | the isolation level to be used for the work. |
|
||||
| `maybeErrorHandlerOrDontFail?` | (`error`: `TError`) => `Promise`<`void` \| `TResult`\> | Potential error handler |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`any`\>
|
||||
`Promise`<`TResult`\>
|
||||
|
||||
the result of the transactional work
|
||||
|
||||
#### Inherited from
|
||||
|
||||
TransactionBaseService.atomicPhase\_
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/note.js:98](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/note.js#L98)
|
||||
[packages/medusa/src/interfaces/transaction-base-service.ts:53](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/interfaces/transaction-base-service.ts#L53)
|
||||
|
||||
___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`data`, `config?`): `Promise`<`Note`\>
|
||||
|
||||
Creates a note associated with a given author
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `data` | `CreateNoteInput` | the note to create |
|
||||
| `config` | `Object` | any configurations if needed, including meta data |
|
||||
| `config.metadata` | `Record`<`string`, `unknown`\> | - |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`Note`\>
|
||||
|
||||
resolves to the creation result
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/medusa/src/services/note.ts:96](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/services/note.ts#L96)
|
||||
|
||||
___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`noteId`): `Promise`<`any`\>
|
||||
▸ **delete**(`noteId`): `Promise`<`void`\>
|
||||
|
||||
Deletes a given note
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `noteId` | `any` | |
|
||||
| `noteId` | `string` | id of the note to delete |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`any`\>
|
||||
`Promise`<`void`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/note.js:154](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/note.js#L154)
|
||||
[packages/medusa/src/services/note.ts:154](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/services/note.ts#L154)
|
||||
|
||||
___
|
||||
|
||||
@@ -91,23 +213,24 @@ ___
|
||||
|
||||
▸ **list**(`selector`, `config?`): `Promise`<`Note`[]\>
|
||||
|
||||
Fetches all notes related to the given selector
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `selector` | `any` | |
|
||||
| `config` | `Object` | |
|
||||
| `config.relations` | `string`[] | |
|
||||
| `config.skip` | `number` | |
|
||||
| `config.take` | `number` | |
|
||||
| `selector` | `Selector`<`Note`\> | the query object for find |
|
||||
| `config` | `FindConfig`<`Note`\> | the configuration used to find the objects. contains relations, skip, and take. |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`Note`[]\>
|
||||
|
||||
notes related to the given search.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/note.js:77](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/note.js#L77)
|
||||
[packages/medusa/src/services/note.ts:75](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/services/note.ts#L75)
|
||||
|
||||
___
|
||||
|
||||
@@ -115,58 +238,94 @@ ___
|
||||
|
||||
▸ **retrieve**(`id`, `config?`): `Promise`<`Note`\>
|
||||
|
||||
Retrieves a specific note.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `id` | `string` | |
|
||||
| `config` | `any` | |
|
||||
| `id` | `string` | the id of the note to retrieve. |
|
||||
| `config` | `FindConfig`<`Note`\> | any options needed to query for the result. |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`Note`\>
|
||||
|
||||
which resolves to the requested note.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/note.js:51](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/note.js#L51)
|
||||
[packages/medusa/src/services/note.ts:47](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/services/note.ts#L47)
|
||||
|
||||
___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `err` | `Record`<`string`, `unknown`\> \| { `code`: `string` } |
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
TransactionBaseService.shouldRetryTransaction\_
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/medusa/src/interfaces/transaction-base-service.ts:34](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/interfaces/transaction-base-service.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`noteId`, `value`): `Promise`<`any`\>
|
||||
▸ **update**(`noteId`, `value`): `Promise`<`Note`\>
|
||||
|
||||
Updates a given note with a new value
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `noteId` | `any` | |
|
||||
| `value` | `any` | |
|
||||
| `noteId` | `string` | the id of the note to update |
|
||||
| `value` | `string` | the new value |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`any`\>
|
||||
`Promise`<`Note`\>
|
||||
|
||||
resolves to the updated element
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/note.js:131](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/note.js#L131)
|
||||
[packages/medusa/src/services/note.ts:132](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/services/note.ts#L132)
|
||||
|
||||
___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager`): [`NoteService`](NoteService.md)
|
||||
▸ **withTransaction**(`transactionManager?`): [`NoteService`](NoteService.md)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `transactionManager` | `EntityManager` | |
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `transactionManager?` | `EntityManager` |
|
||||
|
||||
#### Returns
|
||||
|
||||
[`NoteService`](NoteService.md)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
TransactionBaseService.withTransaction
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/note.js:30](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/note.js#L30)
|
||||
[packages/medusa/src/interfaces/transaction-base-service.ts:16](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/interfaces/transaction-base-service.ts#L16)
|
||||
|
||||
Reference in New Issue
Block a user