# bestow_mk_openapi

> The_MDES_APIs_are_designed_as_RPC_style_stateless_web_services_where_each_API_endpoint_represents_an_operation_to_be_performed___All_request_and_response_payloads_are_sent_in_the_JSON__JavaScript_Object_Notation_data_interchange_format__Each_endpoint_in_t

Latest version **1.2.10** (published 2020-06-15) · Unlicense license · 0 weekly downloads

## Install

```sh
npm install bestow_mk_openapi
pnpm add bestow_mk_openapi
yarn add bestow_mk_openapi
bun add bestow_mk_openapi
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.10 |
| Published | 2020-06-15 |
| First published | 2020-06-15 |
| Weekly downloads | 0 |
| License | Unlicense |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 850.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | etonecheg |

## Links

- npm: https://www.npmjs.com/package/bestow_mk_openapi
- npm.io page: https://npm.io/package/bestow_mk_openapi

## Dependencies (2)

- [babel-cli](https://npm.io/package/babel-cli.md) ^6.26.0
- [superagent](https://npm.io/package/superagent.md) 3.7.0

## Recent versions

- 1.2.10 (latest) — 2020-06-15

## README

# mdes_for_merchants

MdesForMerchants - JavaScript client for mdes_for_merchants
The MDES APIs are designed as RPC style stateless web services where each API endpoint represents an operation to be performed.  All request and response payloads are sent in the JSON (JavaScript Object Notation) data-interchange format. Each endpoint in the API specifies the HTTP Method used to access it. All strings in request and response objects are to be UTF-8 encoded.  Each API URI includes the major and minor version of API that it conforms to.  This will allow multiple concurrent versions of the API to be deployed simultaneously. <br> __Authentication__ Mastercard uses OAuth 1.0a with body hash extension for authenticating the API clients. This requires every request that you send to  Mastercard to be signed with an RSA private key. A private-public RSA key pair must be generated consisting of: <br> 1 . A private key for the OAuth signature for API requests. It is recommended to keep the private key in a password-protected or hardware keystore. <br> 2. A public key is shared with Mastercard during the project setup process through either a certificate signing request (CSR) or the API Key Generator. Mastercard will use the public key to verify the OAuth signature that is provided on every API call.<br>  An OAUTH1.0a signer library is available on [GitHub](https://github.com/Mastercard/oauth1-signer-java) <br>  __Encryption__<br>  All communications between Issuer web service and the Mastercard gateway is encrypted using TLS. <br> __Additional Encryption of Sensitive Data__ In addition to the OAuth authentication, when using MDES Digital Enablement Service, any PCI sensitive and all account holder Personally Identifiable Information (PII) data must be encrypted. This requirement applies to the API fields containing encryptedData. Sensitive data is encrypted using a symmetric session (one-time-use) key. The symmetric session key is then wrapped with an RSA Public Key supplied by Mastercard during API setup phase (the Customer Encryption Key). <br>  Java Client Encryption Library available on [GitHub](https://github.com/Mastercard/client-encryption-java) 
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.2.10
- Package version: 1.2.10
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

## Installation

### For [Node.js](https://nodejs.org/)

#### npm

To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).

Then install it via:

```shell
npm install mdes_for_merchants --save
```

Finaly, you need to build the module:

```shell
npm run build
```

##### Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run:

```shell
npm install
```

Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:

```shell
npm link
```

To use the link you just defined in your project, switch to the directory you want to use your mdes_for_merchants from, and run:

```shell
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
```

Finaly, you need to build the module:

```shell
npm run build
```

#### git

If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID
then install it via:

```shell
    npm install GIT_USER_ID/GIT_REPO_ID --save
```

### For browser

The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following
the above steps with Node.js and installing browserify with `npm install -g browserify`,
perform the following (assuming *main.js* is your entry file):

```shell
browserify main.js > bundle.js
```

Then include *bundle.js* in the HTML pages.

### Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error:
Cannot resolve module", most certainly you should disable AMD loader. Add/merge
the following section to your webpack config:

```javascript
module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}
```

## Getting Started

Please follow the [installation](#installation) instruction and execute the following JS code:

```javascript
var MdesForMerchants = require('mdes_for_merchants');


var api = new MdesForMerchants.DeleteApi()
var opts = {
  'deleteRequestSchema': new MdesForMerchants.DeleteRequestSchema() // {DeleteRequestSchema} Contains the details of the request message. 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteDigitization(opts, callback);

```

## Documentation for API Endpoints

All URIs are relative to *https://api.mastercard.com/mdes*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*MdesForMerchants.DeleteApi* | [**deleteDigitization**](docs/DeleteApi.md#deleteDigitization) | **POST** /digitization/#env/1/0/delete | Used to delete one or more Tokens. The API is limited to 10 Tokens per request.
*MdesForMerchants.GetAssetApi* | [**getAsset**](docs/GetAssetApi.md#getAsset) | **GET** /assets/#env/1/0/asset/{AssetId} | Used to retrieve static Assets from the MDES repository.
*MdesForMerchants.GetTaskStatusApi* | [**getTaskStatus**](docs/GetTaskStatusApi.md#getTaskStatus) | **POST** /digitization/#env/1/0/getTaskStatus | Used to check the status of any asynchronous task that was previously requested.
*MdesForMerchants.GetTokenApi* | [**getToken**](docs/GetTokenApi.md#getToken) | **POST** /digitization/#env/1/0/getToken | Used to get the status and details of a single given Token.
*MdesForMerchants.NotifyTokenUpdatedApi* | [**notifyTokenUpdateForTokenStateChange**](docs/NotifyTokenUpdatedApi.md#notifyTokenUpdateForTokenStateChange) | **POST** /digitization/#env/1/0/notifyTokenUpdated | Outbound API used by MDES to notify the Token Requestor of significant Token updates, such as when the Token is activated, suspended, unsuspended or deleted; or when information about the Token or its product configuration has changed.
*MdesForMerchants.SearchTokensApi* | [**searchTokens**](docs/SearchTokensApi.md#searchTokens) | **POST** /digitization/#env/1/0/searchTokens | Used to get basic token information for all tokens on a specified device, or all tokens mapped to the given Account PAN.
*MdesForMerchants.SuspendApi* | [**createSuspend**](docs/SuspendApi.md#createSuspend) | **POST** /digitization/#env/1/0/suspend | Used to temporarily suspend one or more Tokens.
*MdesForMerchants.TokenizeApi* | [**createTokenize**](docs/TokenizeApi.md#createTokenize) | **POST** /digitization/#env/1/0/tokenize | Used to digitize a card to create a server-based Token.
*MdesForMerchants.TransactApi* | [**createTransact**](docs/TransactApi.md#createTransact) | **POST** /remotetransaction/#env/1/0/transact | Used by the Token Requestor to create a Digital Secure Remote Payment (\&quot;DSRP\&quot;) transaction cryptogram using the credentials stored within MDES in order to perform a DSRP transaction.
*MdesForMerchants.UnsuspendApi* | [**createUnsuspend**](docs/UnsuspendApi.md#createUnsuspend) | **POST** /digitization/#env/1/0/unsuspend | Used to unsuspend one or more previously suspended Tokens. The API is limited to 10 Tokens per request.


## Documentation for Models

 - [MdesForMerchants.AccountHolderData](docs/AccountHolderData.md)
 - [MdesForMerchants.AccountHolderDataOutbound](docs/AccountHolderDataOutbound.md)
 - [MdesForMerchants.AssetResponseSchema](docs/AssetResponseSchema.md)
 - [MdesForMerchants.AuthenticationMethods](docs/AuthenticationMethods.md)
 - [MdesForMerchants.BillingAddress](docs/BillingAddress.md)
 - [MdesForMerchants.CardAccountDataInbound](docs/CardAccountDataInbound.md)
 - [MdesForMerchants.CardAccountDataOutbound](docs/CardAccountDataOutbound.md)
 - [MdesForMerchants.DecisioningData](docs/DecisioningData.md)
 - [MdesForMerchants.DeleteRequestSchema](docs/DeleteRequestSchema.md)
 - [MdesForMerchants.DeleteResponseSchema](docs/DeleteResponseSchema.md)
 - [MdesForMerchants.EncryptedPayload](docs/EncryptedPayload.md)
 - [MdesForMerchants.EncryptedPayloadTransact](docs/EncryptedPayloadTransact.md)
 - [MdesForMerchants.Error](docs/Error.md)
 - [MdesForMerchants.ErrorsResponse](docs/ErrorsResponse.md)
 - [MdesForMerchants.FundingAccountData](docs/FundingAccountData.md)
 - [MdesForMerchants.FundingAccountInfo](docs/FundingAccountInfo.md)
 - [MdesForMerchants.FundingAccountInfoEncryptedPayload](docs/FundingAccountInfoEncryptedPayload.md)
 - [MdesForMerchants.GatewayError](docs/GatewayError.md)
 - [MdesForMerchants.GatewayErrorsResponse](docs/GatewayErrorsResponse.md)
 - [MdesForMerchants.GatewayErrorsSchema](docs/GatewayErrorsSchema.md)
 - [MdesForMerchants.GetTaskStatusRequestSchema](docs/GetTaskStatusRequestSchema.md)
 - [MdesForMerchants.GetTaskStatusResponseSchema](docs/GetTaskStatusResponseSchema.md)
 - [MdesForMerchants.GetTokenRequestSchema](docs/GetTokenRequestSchema.md)
 - [MdesForMerchants.GetTokenResponseSchema](docs/GetTokenResponseSchema.md)
 - [MdesForMerchants.MediaContent](docs/MediaContent.md)
 - [MdesForMerchants.NotifyTokenEncryptedPayload](docs/NotifyTokenEncryptedPayload.md)
 - [MdesForMerchants.NotifyTokenUpdatedRequestSchema](docs/NotifyTokenUpdatedRequestSchema.md)
 - [MdesForMerchants.NotifyTokenUpdatedResponseSchema](docs/NotifyTokenUpdatedResponseSchema.md)
 - [MdesForMerchants.PhoneNumber](docs/PhoneNumber.md)
 - [MdesForMerchants.ProductConfig](docs/ProductConfig.md)
 - [MdesForMerchants.SearchTokensRequestSchema](docs/SearchTokensRequestSchema.md)
 - [MdesForMerchants.SearchTokensResponseSchema](docs/SearchTokensResponseSchema.md)
 - [MdesForMerchants.SuspendRequestSchema](docs/SuspendRequestSchema.md)
 - [MdesForMerchants.SuspendResponseSchema](docs/SuspendResponseSchema.md)
 - [MdesForMerchants.Token](docs/Token.md)
 - [MdesForMerchants.TokenDetail](docs/TokenDetail.md)
 - [MdesForMerchants.TokenDetailData](docs/TokenDetailData.md)
 - [MdesForMerchants.TokenDetailDataGetTokenOnly](docs/TokenDetailDataGetTokenOnly.md)
 - [MdesForMerchants.TokenDetailDataPAROnly](docs/TokenDetailDataPAROnly.md)
 - [MdesForMerchants.TokenDetailGetTokenOnly](docs/TokenDetailGetTokenOnly.md)
 - [MdesForMerchants.TokenDetailPAROnly](docs/TokenDetailPAROnly.md)
 - [MdesForMerchants.TokenForLCM](docs/TokenForLCM.md)
 - [MdesForMerchants.TokenInfo](docs/TokenInfo.md)
 - [MdesForMerchants.TokenizeRequestSchema](docs/TokenizeRequestSchema.md)
 - [MdesForMerchants.TokenizeResponseSchema](docs/TokenizeResponseSchema.md)
 - [MdesForMerchants.TransactEncryptedData](docs/TransactEncryptedData.md)
 - [MdesForMerchants.TransactError](docs/TransactError.md)
 - [MdesForMerchants.TransactRequestSchema](docs/TransactRequestSchema.md)
 - [MdesForMerchants.TransactResponseSchema](docs/TransactResponseSchema.md)
 - [MdesForMerchants.UnSuspendRequestSchema](docs/UnSuspendRequestSchema.md)
 - [MdesForMerchants.UnSuspendResponseSchema](docs/UnSuspendResponseSchema.md)


## Documentation for Authorization

All endpoints do not require authorization.

---
_Source: https://npm.io/package/bestow_mk_openapi · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
