npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ula-aca/aries-cloudagent-interface

v2.0.0

Published

An Aries Cloudagent API Wrapper for JavaScript and NodeJS

Downloads

15

Readme

Aries Cloudagent Interface JavaScript

Continuous Integration Badge Maintainability Test Coverage semantic-release Dependabot Status Commitizen friendly GitHub license GitHub release PRs Welcome

Installation

In an existing project (with package.json), install @ula-aca/aries-cloudagent-interface

# NPM
npm install --save @ula-aca/aries-cloudagent-interface

# Yarn
yarn add @ula-aca/aries-cloudagent-interface

Usage

The API is generated using the OpenAPI Schema (Swagger) from Aries Cloud Agent Python. However this schema is not representing the real API. A lot of types are not correct. Keep this in mind when using this package. Please open issues or pull requests with patches when you find them.

The interface is generated, so to know for sure what is being exported import the package and see what's exposed. It matches the OpenApi schema which is viewable in the Swagger UI.

import {
  Configuration,
  LedgerApi,
  SchemaApi,
  ConnectionsApi,
  CredentialDefinitionApi,
  ...
} from '@ula-aca/aries-cloudagent-interface'

Generating Open API Client

Aries Cloudagent Python provides a Swagger (OpenAPI) definition of the exposed API. the OpenAPI Schema for Aries Cloud Agent Python is located in this repo. We generate the API Client with the OpenAPI Generator CLI. This can be done via the generate-api-client script.

The generated API Client will be placed in the generated/openapi directory and included in the TypeScript compile process.

Aries Cloudagent Python generates a Swagger v2 schema that contains errors. To get around this we convert the Swagger v2 schema to an OpenAPI v3 schema. You can do this by running the get-openapi-spec scripts and passing the url of the swagger.json file to the scripts. This downloads the v2 schema, converts it to v3 and places it as resources/aca-py-openapi-schema.json.

# Download and covert OpenAPI schema. Is tracked in git repo
yarn get-openapi-spec http://aca-py-api.com/api/docs/swagger.json

# Generate OpenAPI client. Is not tracked in git repo
yarn generate-api-client

Swagger UI

A Swagger UI instance is hosted in this repository for the currently used OpenAPI schema. See https://ula-aca.github.io/aries-cloudagent-interface-javascript/

Running tests

Unit tests are done with Mocha. As this package only generates code and exports it, there is only one test that tests whether the generated directory is exported. In the future tests can be added where appropriate.

yarn test

We aim to achieve a coverage of 100%.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License and disclaimer

apache-2.0 with a notice.

We discourage the use of this work in production environments as it is in active development and not mature enough.