Skip to content

Commit

Permalink
Merge pull request #62 from Mastercard/updating-nodejs-7.5
Browse files Browse the repository at this point in the history
adding the 7.5 support
  • Loading branch information
karen-avetisyan-mc authored Sep 30, 2024
2 parents adc096f + 0888368 commit 5f884c7
Show file tree
Hide file tree
Showing 84 changed files with 14,553 additions and 7,075 deletions.
1 change: 1 addition & 0 deletions nodejs/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.babelrc
.gitignore
.openapi-generator-ignore
.travis.yml
Expand Down
2 changes: 1 addition & 1 deletion nodejs/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.2.0
7.5.0
27 changes: 20 additions & 7 deletions nodejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g

- API version: 1.3.0
- Package version: 1.3.0
- Generator version: 7.5.0
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

## Installation
Expand All @@ -43,6 +44,12 @@ Then install it via:
npm install mdes_digital_enablement_api --save
```

Finally, 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:
Expand All @@ -57,17 +64,21 @@ Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the follow
npm link
```

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

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

You should now be able to `require('mdes_digital_enablement_api')` in javascript files from the directory you ran the last command above from.
Finally, you need to build the module:

### git
```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
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
Expand All @@ -76,7 +87,9 @@ then install it via:

### 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, that's to say your javascript file where you actually use this library):
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
Expand Down Expand Up @@ -114,7 +127,6 @@ var api = new MdesDigitalEnablementApi.DeleteApi()
var opts = {
'deleteRequestSchema': new MdesDigitalEnablementApi.DeleteRequestSchema() // {DeleteRequestSchema} Contains the details of the request message.
};

var callback = function(error, data, response) {
if (error) {
console.error(error);
Expand Down Expand Up @@ -204,4 +216,5 @@ Class | Method | HTTP request | Description

## Documentation for Authorization

All endpoints do not require authorization.
Endpoints do not require authorization.

2 changes: 1 addition & 1 deletion nodejs/config.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"useES6" : false
}
}
12 changes: 5 additions & 7 deletions nodejs/docs/DeleteApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,24 @@ This API is used to delete one or more Tokens. The API is limited to 10 Tokens
### Example

```javascript
var MdesDigitalEnablementApi = require('mdes_digital_enablement_api');
import MdesDigitalEnablementApi from 'mdes_digital_enablement_api';

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

### Parameters



Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**deleteRequestSchema** | [**DeleteRequestSchema**](DeleteRequestSchema.md)| Contains the details of the request message. | [optional]
Expand Down
12 changes: 5 additions & 7 deletions nodejs/docs/GetAssetApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,22 @@ This API is used to retrieve static Assets from MDES?s repository, such as - Car
### Example

```javascript
var MdesDigitalEnablementApi = require('mdes_digital_enablement_api');
import MdesDigitalEnablementApi from 'mdes_digital_enablement_api';

var apiInstance = new MdesDigitalEnablementApi.GetAssetApi();
var assetId = "assetId_example"; // String | An Asset ID corresponds to an individual Digital Asset. Digital Assets are returned as part of the Product Configuration from the Tokenize Response. The Asset ID itself is supplied as a Get request in the form of https://{INSERT ENVIRONMENT URL HERE}/mdes/assets/static/1/0/asset/{AssetID} - See JSON examples for details.
var callback = function(error, data, response) {
let apiInstance = new MdesDigitalEnablementApi.GetAssetApi();
let assetId = "assetId_example"; // String | An Asset ID corresponds to an individual Digital Asset. Digital Assets are returned as part of the Product Configuration from the Tokenize Response. The Asset ID itself is supplied as a Get request in the form of https://{INSERT ENVIRONMENT URL HERE}/mdes/assets/static/1/0/asset/{AssetID} - See JSON examples for details.
apiInstance.getAsset(assetId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getAsset(assetId, callback);
});
```

### Parameters



Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**assetId** | **String**| An Asset ID corresponds to an individual Digital Asset. Digital Assets are returned as part of the Product Configuration from the Tokenize Response. The Asset ID itself is supplied as a Get request in the form of https://{INSERT ENVIRONMENT URL HERE}/mdes/assets/static/1/0/asset/{AssetID} - See JSON examples for details. |
Expand Down
12 changes: 5 additions & 7 deletions nodejs/docs/GetTaskStatusApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,24 @@ Used to check the status of any asynchronous task that was previously requested.
### Example

```javascript
var MdesDigitalEnablementApi = require('mdes_digital_enablement_api');
import MdesDigitalEnablementApi from 'mdes_digital_enablement_api';

var apiInstance = new MdesDigitalEnablementApi.GetTaskStatusApi();
var opts = {
let apiInstance = new MdesDigitalEnablementApi.GetTaskStatusApi();
let opts = {
'getTaskStatusRequestSchema': new MdesDigitalEnablementApi.GetTaskStatusRequestSchema() // GetTaskStatusRequestSchema | Contains the details of the request message.
};
var callback = function(error, data, response) {
apiInstance.getTaskStatus(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getTaskStatus(opts, callback);
});
```

### Parameters



Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**getTaskStatusRequestSchema** | [**GetTaskStatusRequestSchema**](GetTaskStatusRequestSchema.md)| Contains the details of the request message. | [optional]
Expand Down
12 changes: 5 additions & 7 deletions nodejs/docs/GetTokenApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,24 @@ This API is used to get the status and details of a single given Token. It may b
### Example

```javascript
var MdesDigitalEnablementApi = require('mdes_digital_enablement_api');
import MdesDigitalEnablementApi from 'mdes_digital_enablement_api';

var apiInstance = new MdesDigitalEnablementApi.GetTokenApi();
var opts = {
let apiInstance = new MdesDigitalEnablementApi.GetTokenApi();
let opts = {
'getTokenRequestSchema': new MdesDigitalEnablementApi.GetTokenRequestSchema() // GetTokenRequestSchema | Contains the details of the request message.
};
var callback = function(error, data, response) {
apiInstance.getToken(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getToken(opts, callback);
});
```

### Parameters



Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**getTokenRequestSchema** | [**GetTokenRequestSchema**](GetTokenRequestSchema.md)| Contains the details of the request message. | [optional]
Expand Down
12 changes: 5 additions & 7 deletions nodejs/docs/NotifyTokenUpdatedApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,24 @@ This API is used by MDES to notify the Token Requestor of significant Token upda
### Example

```javascript
var MdesDigitalEnablementApi = require('mdes_digital_enablement_api');
import MdesDigitalEnablementApi from 'mdes_digital_enablement_api';

var apiInstance = new MdesDigitalEnablementApi.NotifyTokenUpdatedApi();
var opts = {
let apiInstance = new MdesDigitalEnablementApi.NotifyTokenUpdatedApi();
let opts = {
'notifyTokenUpdatedRequestSchema': new MdesDigitalEnablementApi.NotifyTokenUpdatedRequestSchema() // NotifyTokenUpdatedRequestSchema | Contains the details of the request message.
};
var callback = function(error, data, response) {
apiInstance.notifyTokenUpdateForTokenStateChange(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.notifyTokenUpdateForTokenStateChange(opts, callback);
});
```

### Parameters



Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**notifyTokenUpdatedRequestSchema** | [**NotifyTokenUpdatedRequestSchema**](NotifyTokenUpdatedRequestSchema.md)| Contains the details of the request message. | [optional]
Expand Down
12 changes: 5 additions & 7 deletions nodejs/docs/SearchTokensApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,24 @@ This API is used to get basic token information for all tokens on a specified de
### Example

```javascript
var MdesDigitalEnablementApi = require('mdes_digital_enablement_api');
import MdesDigitalEnablementApi from 'mdes_digital_enablement_api';

var apiInstance = new MdesDigitalEnablementApi.SearchTokensApi();
var opts = {
let apiInstance = new MdesDigitalEnablementApi.SearchTokensApi();
let opts = {
'searchTokensRequestSchema': new MdesDigitalEnablementApi.SearchTokensRequestSchema() // SearchTokensRequestSchema | Contains the details of the request message.
};
var callback = function(error, data, response) {
apiInstance.searchTokens(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.searchTokens(opts, callback);
});
```

### Parameters



Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**searchTokensRequestSchema** | [**SearchTokensRequestSchema**](SearchTokensRequestSchema.md)| Contains the details of the request message. | [optional]
Expand Down
12 changes: 5 additions & 7 deletions nodejs/docs/SuspendApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,24 @@ This API is used to temporarily suspend one or more Tokens (for example, suspend
### Example

```javascript
var MdesDigitalEnablementApi = require('mdes_digital_enablement_api');
import MdesDigitalEnablementApi from 'mdes_digital_enablement_api';

var apiInstance = new MdesDigitalEnablementApi.SuspendApi();
var opts = {
let apiInstance = new MdesDigitalEnablementApi.SuspendApi();
let opts = {
'suspendRequestSchema': new MdesDigitalEnablementApi.SuspendRequestSchema() // SuspendRequestSchema | Contains the details of the request message.
};
var callback = function(error, data, response) {
apiInstance.createSuspend(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.createSuspend(opts, callback);
});
```

### Parameters



Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**suspendRequestSchema** | [**SuspendRequestSchema**](SuspendRequestSchema.md)| Contains the details of the request message. | [optional]
Expand Down
12 changes: 5 additions & 7 deletions nodejs/docs/TokenizeApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,24 @@ Used to digitize a card to create a server-based Token. MDES will perform both c
### Example

```javascript
var MdesDigitalEnablementApi = require('mdes_digital_enablement_api');
import MdesDigitalEnablementApi from 'mdes_digital_enablement_api';

var apiInstance = new MdesDigitalEnablementApi.TokenizeApi();
var opts = {
let apiInstance = new MdesDigitalEnablementApi.TokenizeApi();
let opts = {
'tokenizeRequestSchema': new MdesDigitalEnablementApi.TokenizeRequestSchema() // TokenizeRequestSchema | A Tokenize request is used to digitize a PAN.
};
var callback = function(error, data, response) {
apiInstance.createTokenize(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.createTokenize(opts, callback);
});
```

### Parameters



Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**tokenizeRequestSchema** | [**TokenizeRequestSchema**](TokenizeRequestSchema.md)| A Tokenize request is used to digitize a PAN. | [optional]
Expand Down
12 changes: 5 additions & 7 deletions nodejs/docs/TransactApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,24 @@ This API is used by the Token Requestor to create a Digital Secure Remote Paymen
### Example

```javascript
var MdesDigitalEnablementApi = require('mdes_digital_enablement_api');
import MdesDigitalEnablementApi from 'mdes_digital_enablement_api';

var apiInstance = new MdesDigitalEnablementApi.TransactApi();
var opts = {
let apiInstance = new MdesDigitalEnablementApi.TransactApi();
let opts = {
'transactRequestSchema': new MdesDigitalEnablementApi.TransactRequestSchema() // TransactRequestSchema | Contains the details of the request message.
};
var callback = function(error, data, response) {
apiInstance.createTransact(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.createTransact(opts, callback);
});
```

### Parameters



Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**transactRequestSchema** | [**TransactRequestSchema**](TransactRequestSchema.md)| Contains the details of the request message. | [optional]
Expand Down
Loading

0 comments on commit 5f884c7

Please sign in to comment.