This commit is contained in:
JiriUhlir
2026-06-29 09:47:05 +02:00
parent 60cb139a33
commit 9c08dacc69
29 changed files with 3703 additions and 23 deletions
+36
View File
@@ -0,0 +1,36 @@
import { SapB1Client, SapB1ClientOptions } from "./client/SapB1Client";
import { SapB1Config } from "./config";
import { BusinessPartnersResource } from "./resources/BusinessPartners";
import { DeliveryNotesResource, InvoicesResource, OrdersResource, PurchaseOrdersResource } from "./resources/Documents";
import { ItemsResource } from "./resources/Items";
import { StockTransfersResource } from "./resources/StockTransfers";
export class SapBusinessOneServiceLayer {
public readonly client: SapB1Client;
public readonly businessPartners: BusinessPartnersResource;
public readonly items: ItemsResource;
public readonly orders: OrdersResource;
public readonly invoices: InvoicesResource;
public readonly purchaseOrders: PurchaseOrdersResource;
public readonly deliveryNotes: DeliveryNotesResource;
public readonly stockTransfers: StockTransfersResource;
public constructor(config: SapB1Config, options: SapB1ClientOptions = {}) {
this.client = new SapB1Client(config, options);
this.businessPartners = new BusinessPartnersResource(this.client);
this.items = new ItemsResource(this.client);
this.orders = new OrdersResource(this.client);
this.invoices = new InvoicesResource(this.client);
this.purchaseOrders = new PurchaseOrdersResource(this.client);
this.deliveryNotes = new DeliveryNotesResource(this.client);
this.stockTransfers = new StockTransfersResource(this.client);
}
public login(): Promise<unknown> {
return this.client.login();
}
public logout(): Promise<void> {
return this.client.logout();
}
}