Skip to main content

Class: OauthService

Hierarchy

  • TransactionBaseServiceCopy to Clipboard

    OauthServiceCopy to Clipboard

Constructors

constructor

new OauthService(cradleCopy to Clipboard)

Parameters

NameType
cradleCopy to ClipboardInjectedDependenciesCopy to Clipboard

Overrides

TransactionBaseService.constructor

Defined in

packages/medusa/src/services/oauth.ts:31

Properties

__configModule__

ProtectedCopy to Clipboard OptionalCopy to Clipboard ReadonlyCopy to Clipboard __configModule__: RecordCopy to Clipboard<stringCopy to Clipboard, unknownCopy to Clipboard>

Inherited from

TransactionBaseService.__configModule__

Defined in

packages/medusa/src/interfaces/transaction-base-service.ts:10


__container__

ProtectedCopy to Clipboard ReadonlyCopy to Clipboard __container__: anyCopy to Clipboard

Inherited from

TransactionBaseService.__container__

Defined in

packages/medusa/src/interfaces/transaction-base-service.ts:9


__moduleDeclaration__

ProtectedCopy to Clipboard OptionalCopy to Clipboard ReadonlyCopy to Clipboard __moduleDeclaration__: RecordCopy to Clipboard<stringCopy to Clipboard, unknownCopy to Clipboard>

Inherited from

TransactionBaseService.__moduleDeclaration__

Defined in

packages/medusa/src/interfaces/transaction-base-service.ts:11


container_

ProtectedCopy to Clipboard container_: InjectedDependenciesCopy to Clipboard

Defined in

packages/medusa/src/services/oauth.ts:27


eventBus_

ProtectedCopy to Clipboard eventBus_: EventBusServiceCopy to Clipboard

Defined in

packages/medusa/src/services/oauth.ts:29


manager

ProtectedCopy to Clipboard manager: EntityManagerCopy to Clipboard

Defined in

packages/medusa/src/services/oauth.ts:26


manager_

ProtectedCopy to Clipboard manager_: EntityManagerCopy to Clipboard

Overrides

TransactionBaseService.manager_

Defined in

packages/medusa/src/services/oauth.ts:19


oauthRepository_

ProtectedCopy to Clipboard oauthRepository_: typeof OauthRepositoryCopy to Clipboard

Defined in

packages/medusa/src/services/oauth.ts:28


transactionManager_

ProtectedCopy to Clipboard transactionManager_: undefinedCopy to Clipboard | EntityManagerCopy to Clipboard

Overrides

TransactionBaseService.transactionManager_

Defined in

packages/medusa/src/services/oauth.ts:20


Events

StaticCopy to Clipboard Events: ObjectCopy to Clipboard

Type declaration

NameType
TOKEN_GENERATEDCopy to ClipboardstringCopy to Clipboard
TOKEN_REFRESHEDCopy to ClipboardstringCopy to Clipboard

Defined in

packages/medusa/src/services/oauth.ts:21

Methods

atomicPhase_

ProtectedCopy to Clipboard atomicPhase_<TResultCopy to Clipboard, TErrorCopy to Clipboard>(workCopy to Clipboard, isolationOrErrorHandler?Copy to Clipboard, maybeErrorHandlerOrDontFail?Copy to Clipboard): PromiseCopy to Clipboard<TResultCopy to Clipboard>

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
TResultCopy to Clipboard
TErrorCopy to Clipboard

Parameters

NameTypeDescription
workCopy to Clipboard(transactionManagerCopy to Clipboard: EntityManagerCopy to Clipboard) => PromiseCopy to Clipboard<TResultCopy to Clipboard>the transactional work to be done
isolationOrErrorHandler?Copy to ClipboardIsolationLevelCopy to Clipboard | (errorCopy to Clipboard: TErrorCopy to Clipboard) => PromiseCopy to Clipboard<voidCopy to Clipboard | TResultCopy to Clipboard>the isolation level to be used for the work.
maybeErrorHandlerOrDontFail?Copy to Clipboard(errorCopy to Clipboard: TErrorCopy to Clipboard) => PromiseCopy to Clipboard<voidCopy to Clipboard | TResultCopy to Clipboard>Potential error handler

Returns

PromiseCopy to Clipboard<TResultCopy to Clipboard>

the result of the transactional work

Inherited from

TransactionBaseService.atomicPhase_

Defined in

packages/medusa/src/interfaces/transaction-base-service.ts:50


create

create(dataCopy to Clipboard): PromiseCopy to Clipboard<OauthCopy to Clipboard>

Parameters

NameType
dataCopy to ClipboardCreateOauthInputCopy to Clipboard

Returns

PromiseCopy to Clipboard<OauthCopy to Clipboard>

Defined in

packages/medusa/src/services/oauth.ts:88


generateToken

generateToken(appNameCopy to Clipboard, codeCopy to Clipboard, stateCopy to Clipboard): PromiseCopy to Clipboard<OauthCopy to Clipboard>

Parameters

NameType
appNameCopy to ClipboardstringCopy to Clipboard
codeCopy to ClipboardstringCopy to Clipboard
stateCopy to ClipboardstringCopy to Clipboard

Returns

PromiseCopy to Clipboard<OauthCopy to Clipboard>

Defined in

packages/medusa/src/services/oauth.ts:122


list

list(selectorCopy to Clipboard): PromiseCopy to Clipboard<OauthCopy to Clipboard[]>

Parameters

NameType
selectorCopy to ClipboardSelectorCopy to Clipboard<OauthCopy to Clipboard>

Returns

PromiseCopy to Clipboard<OauthCopy to Clipboard[]>

Defined in

packages/medusa/src/services/oauth.ts:80


refreshToken

refreshToken(appNameCopy to Clipboard): PromiseCopy to Clipboard<OauthCopy to Clipboard>

Parameters

NameType
appNameCopy to ClipboardstringCopy to Clipboard

Returns

PromiseCopy to Clipboard<OauthCopy to Clipboard>

Defined in

packages/medusa/src/services/oauth.ts:156


registerOauthApp

registerOauthApp(appDetailsCopy to Clipboard): PromiseCopy to Clipboard<OauthCopy to Clipboard>

Parameters

NameType
appDetailsCopy to ClipboardCreateOauthInputCopy to Clipboard

Returns

PromiseCopy to Clipboard<OauthCopy to Clipboard>

Defined in

packages/medusa/src/services/oauth.ts:112


retrieve

retrieve(oauthIdCopy to Clipboard): PromiseCopy to Clipboard<OauthCopy to Clipboard>

Parameters

NameType
oauthIdCopy to ClipboardstringCopy to Clipboard

Returns

PromiseCopy to Clipboard<OauthCopy to Clipboard>

Defined in

packages/medusa/src/services/oauth.ts:57


retrieveByName

retrieveByName(appNameCopy to Clipboard): PromiseCopy to Clipboard<OauthCopy to Clipboard>

Parameters

NameType
appNameCopy to ClipboardstringCopy to Clipboard

Returns

PromiseCopy to Clipboard<OauthCopy to Clipboard>

Defined in

packages/medusa/src/services/oauth.ts:41


shouldRetryTransaction_

ProtectedCopy to Clipboard shouldRetryTransaction_(errCopy to Clipboard): booleanCopy to Clipboard

Parameters

NameType
errCopy to ClipboardRecordCopy to Clipboard<stringCopy to Clipboard, unknownCopy to Clipboard> | { codeCopy to Clipboard: stringCopy to Clipboard }

Returns

booleanCopy to Clipboard

Inherited from

TransactionBaseService.shouldRetryTransaction_

Defined in

packages/medusa/src/interfaces/transaction-base-service.ts:31


update

update(idCopy to Clipboard, updateCopy to Clipboard): PromiseCopy to Clipboard<OauthCopy to Clipboard>

Parameters

NameType
idCopy to ClipboardstringCopy to Clipboard
updateCopy to ClipboardUpdateOauthInputCopy to Clipboard

Returns

PromiseCopy to Clipboard<OauthCopy to Clipboard>

Defined in

packages/medusa/src/services/oauth.ts:101


withTransaction

withTransaction(transactionManager?Copy to Clipboard): OauthServiceCopy to Clipboard

Parameters

NameType
transactionManager?Copy to ClipboardEntityManagerCopy to Clipboard

Returns

OauthServiceCopy to Clipboard

Inherited from

TransactionBaseService.withTransaction

Defined in

packages/medusa/src/interfaces/transaction-base-service.ts:14