Socket
Socket
Sign inDemoInstall

@sap-ux/axios-extension

Package Overview
Dependencies
Maintainers
3
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap-ux/axios-extension

Extension of the Axios module adding convinience methods to interact with SAP systems especially with OData services.


Version published
Weekly downloads
151K
increased by1.87%
Maintainers
3
Weekly downloads
 
Created
Source

Axios Extension

The @sap-ux/axios-extension module is an extension of the axios framework adding convenience methods to interact with SAP systems especially with OData services..

Features

Factories

The module offers factory functions allowing to generate ServiceProvider instances.

Service Provider

The base service provider extends the class Axios abstracting whether it is running in SAP Business Application Studio or locally.

It offers convenience methods to simplify the handling of:

  • different versions of S/4 HANA systems
  • different authentication methods in the SAP ecosystem.
  • running locally or in SAP Business Application Studio

It exposes the service(path) method that creates a new Axios instance for the requested service. It will reuse authentication details and cookies from the provider.

ABAP Service Provider

Another extension of the base provider handling specifics for ABAP based backend systems. It offers simplified access to the catalog services as well as the UI5 ABAP repository service.

Services

The generic OData service simplifies the access to the service metadata as well as the access to response data. It is used as base class for

Catalog Service

Simplified consumption of the SAP catalog service useful for fetching annotations.

ABAP UI5 Respository Service

Allows deployment of applications to the UI5 ABAP Repository as well as checking deployed applications.

App Index Service

A class respresenting the app index service allowing to search applications deployed on an ABAP system.

Layered Repository Service

Allows deployment of adaptation projects.

Usage:

import { createForAbap } from '@sap-ux/axios-extension';

const provider = createForAbap({
    baseURL: 'https://sap.example',
    params: { 'sap-client': client }
});
const service = provider.layeredRepository();
await service.deploy('./dist/my-variant-webapp.zip', {
    namespace: 'apps/my.base.app/appVariants/customer.variant/',
    package: 'MY_PACKAGE',
    transport: 'ABC123'
});

Installation

Npm

npm install --save @sap-ux/axios-extension

Yarn

yarn add @sap-ux/axios-extension

Pnpm

pnpm add @sap-ux/axios-extension

Usage

import { createForAbap } from '@sap-ux/axios-extension';

const provider = createForAbap({
    baseURL: 'https://sap.example',
    params: { 'sap-client': client }
});
const service = provider.service('/ns/my_service');
const metadata = await service.metadata();

See more examples in /test/factory.test.ts

FAQs

Package last updated on 20 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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