feat(region): Add admin region get + list endpoints (#6322)

**What**
Add `GET /admin/regions`
Add `GET /admin/regions/:id`

Blocked by #6320 

Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
This commit is contained in:
Oli Juhl
2024-02-11 17:13:49 +00:00
committed by GitHub
co-authored by Adrien de Peretti
parent b91a1ca5b8
commit 95d0e58d31
28 changed files with 566 additions and 87 deletions
+8 -1
View File
@@ -4,9 +4,9 @@ import {
InternalModuleDeclaration,
LinkModuleDefinition,
LoadedModule,
MedusaContainer,
MODULE_RESOURCE_TYPE,
MODULE_SCOPE,
MedusaContainer,
ModuleBootstrapDeclaration,
ModuleDefinition,
ModuleExports,
@@ -59,6 +59,11 @@ export type ModuleBootstrapOptions = {
sharedContainer?: MedusaContainer
moduleDefinition?: ModuleDefinition
injectedDependencies?: Record<string, any>
/**
* In this mode, all instances are partially loaded, meaning that the module will not be fully loaded and the services will not be available.
* Don't forget to clear the instances (MedusaModule.clearInstances()) after the migration are done.
*/
migrationOnly?: boolean
}
export type LinkModuleBootstrapOptions = {
@@ -213,6 +218,7 @@ export class MedusaModule {
sharedContainer,
moduleDefinition,
injectedDependencies,
migrationOnly,
}: ModuleBootstrapOptions): Promise<{
[key: string]: T
}> {
@@ -283,6 +289,7 @@ export class MedusaModule {
container,
moduleResolutions,
logger,
migrationOnly,
})
} catch (err) {
errorLoading(err)