@friendsofshopware/app-server-sdk
Advanced tools
Comparing version 0.0.23 to 0.0.24
@@ -5,3 +5,3 @@ { | ||
"name": "@friendsofshopware/app-server-sdk", | ||
"version": "0.0.23", | ||
"version": "0.0.24", | ||
"description": "Shopware App Server SDK", | ||
@@ -8,0 +8,0 @@ "keywords": [ |
import { Registration } from "./registration.js"; | ||
import { HmacSigner } from "./signer.js"; | ||
import { IShopRepository } from "./repository.js"; | ||
import { ShopRepositoryInterface } from "./repository.js"; | ||
import { ContextResolver } from "./context-resolver.js"; | ||
export declare class AppServer { | ||
cfg: IAppConfig; | ||
repository: IShopRepository; | ||
repository: ShopRepositoryInterface; | ||
signer: HmacSigner; | ||
registration: Registration; | ||
contextResolver: ContextResolver; | ||
constructor(cfg: IAppConfig, repository: IShopRepository, signer: HmacSigner); | ||
constructor(cfg: IAppConfig, repository: ShopRepositoryInterface, signer: HmacSigner); | ||
} | ||
@@ -13,0 +13,0 @@ export interface IAppConfig { |
import { AppServer } from "./app.js"; | ||
import { HttpClient } from "./http-client.js"; | ||
import { IShop } from "./repository.js"; | ||
import { ShopInterface } from "./repository.js"; | ||
export declare class ContextResolver { | ||
@@ -11,7 +11,7 @@ private app; | ||
declare class Context { | ||
shop: IShop; | ||
shop: ShopInterface; | ||
payload: any; | ||
httpClient: HttpClient; | ||
constructor(shop: IShop, payload: any, httpClient: HttpClient); | ||
constructor(shop: ShopInterface, payload: any, httpClient: HttpClient); | ||
} | ||
export {}; |
@@ -1,6 +0,6 @@ | ||
import { IShop } from "./repository.js"; | ||
import { ShopInterface } from "./repository.js"; | ||
export declare class HttpClient { | ||
private shop; | ||
private storage; | ||
constructor(shop: IShop); | ||
constructor(shop: ShopInterface); | ||
get(url: string, headers?: object): Promise<HttpResponse>; | ||
@@ -7,0 +7,0 @@ post(url: string, json?: object, headers?: any): Promise<HttpResponse>; |
export { AppServer } from "./app.js"; | ||
export type { IAppConfig } from "./app.js"; | ||
export { InMemoryShopRepository, SimpleShop } from "./repository.js"; | ||
export type { IShop, IShopRepository } from "./repository.js"; | ||
export type { ShopInterface, ShopRepositoryInterface } from "./repository.js"; |
@@ -1,2 +0,2 @@ | ||
export interface IShop { | ||
export interface ShopInterface { | ||
getShopId(): string; | ||
@@ -9,10 +9,10 @@ getShopUrl(): string; | ||
} | ||
export interface IShopRepository { | ||
createShopStruct(shopId: string, shopUrl: string, shopSecret: string): IShop; | ||
createShop(shop: IShop): Promise<void>; | ||
getShopById(id: string): Promise<IShop | null>; | ||
updateShop(shop: IShop): Promise<void>; | ||
export interface ShopRepositoryInterface { | ||
createShopStruct(shopId: string, shopUrl: string, shopSecret: string): ShopInterface; | ||
createShop(shop: ShopInterface): Promise<void>; | ||
getShopById(id: string): Promise<ShopInterface | null>; | ||
updateShop(shop: ShopInterface): Promise<void>; | ||
deleteShop(id: string): Promise<void>; | ||
} | ||
export declare class SimpleShop implements IShop { | ||
export declare class SimpleShop implements ShopInterface { | ||
private shopId; | ||
@@ -31,10 +31,10 @@ private shopUrl; | ||
} | ||
export declare class InMemoryShopRepository implements IShopRepository { | ||
export declare class InMemoryShopRepository implements ShopRepositoryInterface { | ||
private storage; | ||
constructor(); | ||
createShopStruct(shopId: string, shopUrl: string, shopSecret: string): IShop; | ||
createShop(shop: IShop): Promise<void>; | ||
getShopById(id: string): Promise<IShop | null>; | ||
updateShop(shop: IShop): Promise<void>; | ||
createShopStruct(shopId: string, shopUrl: string, shopSecret: string): ShopInterface; | ||
createShop(shop: ShopInterface): Promise<void>; | ||
getShopById(id: string): Promise<ShopInterface | null>; | ||
updateShop(shop: ShopInterface): Promise<void>; | ||
deleteShop(id: string): Promise<void>; | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22435