open-index/open-npm huggingface dataset:
npm package: @scayle/add-on-utils
Description: > A small set of utilities that can be helpful for building cloud panel add-ons
Latest version: 2.1.0

# @scayle/add-on-utils

> A small set of utilities that can be helpful for building cloud panel add-ons

## Install

```shell
npm i --save @scayle/add-on-utils
```

## Functions

### config

The `config` function can be used in the manifest file to add type-checking to the exports.

```typescript
import { config } from "@scayle/add-on-utils";

export default config(function(registerApplication, registerRoutes) {
    /* ... */
});
```

### mockCustomProps

The `mockCustomProps` function creates a dummy version of the add-on custom props. 
If you’re using Jest and Vue test utils, you can install it in your setup script like so:

```typescript
const { config } = require('@vue/test-utils');
const { AddOnPropsPlugin, mockCustomProps } = require('@scayle/add-on-utils');

config.global.plugins = [[AddOnPropsPlugin, {customProps: mockCustomProps()}]];
```

## Other

### AddOnPropsPlugin

The package also contains a Vue plugin, AddOnPropsPlugin which creates a global `$addOn` object with all the add-on custom props.

It can be combined with `mockCustomProps` for unit tests or standalone apps, or used with single-spa-vue to expose the actual add-on custom props.

```typescript
const vueLifecycles = singleSpaVue({
    /* ...*/
    handleInstance(instance, props) {
        instance.use(AddOnPropsPlugin, { customProps: props });
    },
});

export const { bootstrap, mount, unmount } = vueLifecycles;
```
npm package: @scayle/admin-api
Description: Strongly typed SDK for the Scayle Administration API
Latest version: 0.12.0

![scayle-logo-cr](https://cdn-prod.scayle.com/public/media/general/SCAYLE-Commerce-Engine-header.png)

<h1 align="center">
  SCAYLE Admin API TypeScript and JavaScript SDK
</h1>

<h4 align="center">
  <a href="https://scayle.dev">Documentation</a> |
  <a href="https://www.scayle.com/">Website</a>
</h4>

<p align="center">
  The SCAYLE <strong>Admin API TypeScript and JavaScript SDK</strong> streamlines interactions with Admin REST APIs.
</p>
<p align="center">
  <a href="#"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="SCAYLE's **Admin API TypeScript and JavaScript SDK is released under the MIT license." /></a>
</p>

## Installation

```sh
# Install the SDK with NPM
npm i @scayle/admin-api

# Install the SDK  with YARN
yarn add @scayle/admin-api
```

## How to Use

```typescript
import { createScayleAdminApiClient } from '@scayle/admin-api';

const client = createScayleAdminApiClient({
    tenant: 'my-tenant',
    accessToken: '<secret-token>'
});

const shopCountries = await client.shopCountries.getAllForShop('ay', { with: ['warehouses'] });
```

## What is Scayle ?

[SCAYLE](https://scayle.com) is a full-featured e-commerce software solution that comes with flexible APIs. Within SCAYLE, you can manage all aspects of your shop, such as products, stocks, customers, and transactions.

Learn more about [Scayles’s architecture](https://scayle.dev/en/dev/getting-started/introduction) and [commerce modules](https://scayle.dev/en/dev/getting-started/introduction) in the Docs.

## Other channels

- [GitHub Issues](https://github.com/scayle/admin-api-ts-sdk/issues)
- [LinkedIn](https://www.linkedin.com/company/scaylecommerce/)
- [Jobs](https://careers.smartrecruiters.com/ABOUTYOUGmbH/scayle)
- [AboutYou Tech Blog](https://aboutyou.tech/)

## License

Licensed under the [MIT](https://opensource.org/license/mit/)