New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ama-sdk/core

Package Overview
Dependencies
Maintainers
0
Versions
1782
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ama-sdk/core

Digital API - SDK Core

  • 11.5.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13K
increased by28.35%
Maintainers
0
Weekly downloads
 
Created
Source

@ama-sdk Core

Stable Version Bundle Size

This package contains a set of plugins, helpers and object definitions to dialog with an API following the ama-sdk architecture.

Please refer to the ama-sdk-schematics package for getting started with an API based on ama-sdk.

Available plugins

Available API Client

The API Clients are mandatory to the SDK to indicate the service that should be used by the SDK to process the calls. A list of API Clients are provided by this package:

API ClientImportDescription
ApiFetchClient@ama-sdk/client-fetchDefault API Client based on the browser FetchApi
ApiBeaconClient@ama-sdk/coreAPI Client based on the browser BeaconApi, it is processing synchronous call
ApiAngularClient@ama-sdk/core/clients/api-angular-clientAPI Client using the HttpClient exposed by the @angular/common package

Logs

In order to ease the logging in the ama-sdk plugins, it is possible to connect to third-party logging services. This can be achieved by adding a Logger implementation to the options of an API client.

For example, in the Otter showcase application, we could add a ConsoleLogger (from @o3r/core) as a parameter to the ApiFetchClient:

const logger = new ConsoleLogger();
function petApiFactory() {
  const apiConfig: ApiClient = new ApiFetchClient(
    {
      basePath: 'https://petstore3.swagger.io/api/v3',
      requestPlugins: [new SessionIdRequest()],
      fetchPlugins: [],
      logger
    }
  );
  return new PetApi(apiConfig);
}

Note: Adding a third-party logging service is optional. If undefined, the fallback is the console logger.

FAQs

Package last updated on 07 Jan 2025

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