Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@friendsofshopware/app-server-sdk

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@friendsofshopware/app-server-sdk - npm Package Compare versions

Comparing version 0.0.25 to 0.0.26

10

esm/http-client.js

@@ -57,8 +57,8 @@ export class HttpClient {

else if (!f.ok) {
throw new ApiClientRequestFailed(this.shop.getShopId(), new HttpResponse(f.status, await f.json(), f.headers));
throw new ApiClientRequestFailed(this.shop.getShopId(), new HttpClientResponse(f.status, await f.json(), f.headers));
}
if (f.status === 204) {
return new HttpResponse(f.status, {}, f.headers);
return new HttpClientResponse(f.status, {}, f.headers);
}
return new HttpResponse(f.status, await f.json(), f.headers);
return new HttpClientResponse(f.status, await f.json(), f.headers);
}

@@ -79,3 +79,3 @@ async getToken() {

if (!auth.ok) {
throw new ApiClientAuthenticationFailed(this.shop.getShopId(), new HttpResponse(auth.status, await auth.json(), auth.headers));
throw new ApiClientAuthenticationFailed(this.shop.getShopId(), new HttpClientResponse(auth.status, await auth.json(), auth.headers));
}

@@ -97,3 +97,3 @@ const expireDate = new Date();

}
export class HttpResponse {
export class HttpClientResponse {
constructor(statusCode, body, headers) {

@@ -100,0 +100,0 @@ Object.defineProperty(this, "statusCode", {

export { AppServer } from "./app.js";
export { InMemoryShopRepository, SimpleShop } from "./repository.js";
export { HttpClient, HttpClientResponse } from "./http-client.js";

@@ -5,3 +5,3 @@ {

"name": "@friendsofshopware/app-server-sdk",
"version": "0.0.25",
"version": "0.0.26",
"description": "Shopware App Server SDK",

@@ -8,0 +8,0 @@ "keywords": [

@@ -6,3 +6,3 @@ import { Registration } from "./registration.js";

export declare class AppServer {
cfg: IAppConfig;
cfg: AppConfigurationInterface;
repository: ShopRepositoryInterface;

@@ -12,5 +12,5 @@ signer: HmacSigner;

contextResolver: ContextResolver;
constructor(cfg: IAppConfig, repository: ShopRepositoryInterface, signer: HmacSigner);
constructor(cfg: AppConfigurationInterface, repository: ShopRepositoryInterface, signer: HmacSigner);
}
export interface IAppConfig {
export interface AppConfigurationInterface {
/**

@@ -17,0 +17,0 @@ * Your app name

@@ -6,11 +6,11 @@ import { ShopInterface } from "./repository.js";

constructor(shop: ShopInterface);
get(url: string, headers?: object): Promise<HttpResponse>;
post(url: string, json?: object, headers?: any): Promise<HttpResponse>;
put(url: string, json?: object, headers?: any): Promise<HttpResponse>;
patch(url: string, json?: object, headers?: any): Promise<HttpResponse>;
delete(url: string, json?: object, headers?: any): Promise<HttpResponse>;
get(url: string, headers?: object): Promise<HttpClientResponse>;
post(url: string, json?: object, headers?: any): Promise<HttpClientResponse>;
put(url: string, json?: object, headers?: any): Promise<HttpClientResponse>;
patch(url: string, json?: object, headers?: any): Promise<HttpClientResponse>;
delete(url: string, json?: object, headers?: any): Promise<HttpClientResponse>;
private request;
getToken(): Promise<string>;
}
export declare class HttpResponse {
export declare class HttpClientResponse {
statusCode: number;

@@ -22,8 +22,8 @@ body: any;

export declare class ApiClientAuthenticationFailed extends Error {
response: HttpResponse;
constructor(shopId: string, response: HttpResponse);
response: HttpClientResponse;
constructor(shopId: string, response: HttpClientResponse);
}
export declare class ApiClientRequestFailed extends Error {
response: HttpResponse;
constructor(shopId: string, response: HttpResponse);
response: HttpClientResponse;
constructor(shopId: string, response: HttpClientResponse);
}
export { AppServer } from "./app.js";
export type { IAppConfig } from "./app.js";
export type { AppConfigurationInterface } from "./app.js";
export { InMemoryShopRepository, SimpleShop } from "./repository.js";
export type { ShopInterface, ShopRepositoryInterface } from "./repository.js";
export { HttpClient, HttpClientResponse } from "./http-client.js";
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc