feat: Add support for authentication to the sdk, and plug it in the admin (#7349)

* feat: Add support for authentication to the sdk, and plug it in the admin

* fix: await fetch before returning in sdk
This commit is contained in:
Stevche Radevski
2024-05-17 14:37:38 +02:00
committed by GitHub
parent ff337498a0
commit 00a37cede1
13 changed files with 207 additions and 133 deletions

View File

@@ -1,17 +1,22 @@
import { Admin } from "./admin"
import { Auth } from "./auth"
import { Client } from "./client"
import { Store } from "./store"
import { Config } from "./types"
class Medusa {
public client: Client
public admin: Admin
public store: Store
public auth: Auth
constructor(config: Config) {
this.client = new Client(config)
this.admin = new Admin(this.client)
this.store = new Store(this.client)
this.auth = new Auth(this.client, config)
}
}