Skip to content

Commit 5f884c7

Browse files
Merge pull request #62 from Mastercard/updating-nodejs-7.5
adding the 7.5 support
2 parents adc096f + 0888368 commit 5f884c7

File tree

84 files changed

+14553
-7075
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+14553
-7075
lines changed

nodejs/.openapi-generator/FILES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.babelrc
12
.gitignore
23
.openapi-generator-ignore
34
.travis.yml

nodejs/.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.2.0
1+
7.5.0

nodejs/README.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g
2727

2828
- API version: 1.3.0
2929
- Package version: 1.3.0
30+
- Generator version: 7.5.0
3031
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
3132

3233
## Installation
@@ -43,6 +44,12 @@ Then install it via:
4344
npm install mdes_digital_enablement_api --save
4445
```
4546

47+
Finally, you need to build the module:
48+
49+
```shell
50+
npm run build
51+
```
52+
4653
##### Local development
4754

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

60-
Finally, switch to the directory you want to use your mdes_digital_enablement_api from, and run:
67+
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:
6168

6269
```shell
6370
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
6471
```
6572

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

68-
### git
75+
```shell
76+
npm run build
77+
```
78+
79+
#### git
6980

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

7384
```shell
@@ -76,7 +87,9 @@ then install it via:
7687

7788
### For browser
7889

79-
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):
90+
The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following
91+
the above steps with Node.js and installing browserify with `npm install -g browserify`,
92+
perform the following (assuming *main.js* is your entry file):
8093

8194
```shell
8295
browserify main.js > bundle.js
@@ -114,7 +127,6 @@ var api = new MdesDigitalEnablementApi.DeleteApi()
114127
var opts = {
115128
'deleteRequestSchema': new MdesDigitalEnablementApi.DeleteRequestSchema() // {DeleteRequestSchema} Contains the details of the request message.
116129
};
117-
118130
var callback = function(error, data, response) {
119131
if (error) {
120132
console.error(error);
@@ -204,4 +216,5 @@ Class | Method | HTTP request | Description
204216

205217
## Documentation for Authorization
206218

207-
All endpoints do not require authorization.
219+
Endpoints do not require authorization.
220+

nodejs/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
22
"useES6" : false
3-
}
3+
}

nodejs/docs/DeleteApi.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,24 @@ This API is used to delete one or more Tokens. The API is limited to 10 Tokens
1919
### Example
2020

2121
```javascript
22-
var MdesDigitalEnablementApi = require('mdes_digital_enablement_api');
22+
import MdesDigitalEnablementApi from 'mdes_digital_enablement_api';
2323

24-
var apiInstance = new MdesDigitalEnablementApi.DeleteApi();
25-
var opts = {
24+
let apiInstance = new MdesDigitalEnablementApi.DeleteApi();
25+
let opts = {
2626
'deleteRequestSchema': new MdesDigitalEnablementApi.DeleteRequestSchema() // DeleteRequestSchema | Contains the details of the request message.
2727
};
28-
var callback = function(error, data, response) {
28+
apiInstance.deleteDigitization(opts, (error, data, response) => {
2929
if (error) {
3030
console.error(error);
3131
} else {
3232
console.log('API called successfully. Returned data: ' + data);
3333
}
34-
};
35-
apiInstance.deleteDigitization(opts, callback);
34+
});
3635
```
3736

3837
### Parameters
3938

4039

41-
4240
Name | Type | Description | Notes
4341
------------- | ------------- | ------------- | -------------
4442
**deleteRequestSchema** | [**DeleteRequestSchema**](DeleteRequestSchema.md)| Contains the details of the request message. | [optional]

nodejs/docs/GetAssetApi.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,22 @@ This API is used to retrieve static Assets from MDES?s repository, such as - Car
1919
### Example
2020

2121
```javascript
22-
var MdesDigitalEnablementApi = require('mdes_digital_enablement_api');
22+
import MdesDigitalEnablementApi from 'mdes_digital_enablement_api';
2323

24-
var apiInstance = new MdesDigitalEnablementApi.GetAssetApi();
25-
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.
26-
var callback = function(error, data, response) {
24+
let apiInstance = new MdesDigitalEnablementApi.GetAssetApi();
25+
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.
26+
apiInstance.getAsset(assetId, (error, data, response) => {
2727
if (error) {
2828
console.error(error);
2929
} else {
3030
console.log('API called successfully. Returned data: ' + data);
3131
}
32-
};
33-
apiInstance.getAsset(assetId, callback);
32+
});
3433
```
3534

3635
### Parameters
3736

3837

39-
4038
Name | Type | Description | Notes
4139
------------- | ------------- | ------------- | -------------
4240
**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. |

nodejs/docs/GetTaskStatusApi.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,24 @@ Used to check the status of any asynchronous task that was previously requested.
1919
### Example
2020

2121
```javascript
22-
var MdesDigitalEnablementApi = require('mdes_digital_enablement_api');
22+
import MdesDigitalEnablementApi from 'mdes_digital_enablement_api';
2323

24-
var apiInstance = new MdesDigitalEnablementApi.GetTaskStatusApi();
25-
var opts = {
24+
let apiInstance = new MdesDigitalEnablementApi.GetTaskStatusApi();
25+
let opts = {
2626
'getTaskStatusRequestSchema': new MdesDigitalEnablementApi.GetTaskStatusRequestSchema() // GetTaskStatusRequestSchema | Contains the details of the request message.
2727
};
28-
var callback = function(error, data, response) {
28+
apiInstance.getTaskStatus(opts, (error, data, response) => {
2929
if (error) {
3030
console.error(error);
3131
} else {
3232
console.log('API called successfully. Returned data: ' + data);
3333
}
34-
};
35-
apiInstance.getTaskStatus(opts, callback);
34+
});
3635
```
3736

3837
### Parameters
3938

4039

41-
4240
Name | Type | Description | Notes
4341
------------- | ------------- | ------------- | -------------
4442
**getTaskStatusRequestSchema** | [**GetTaskStatusRequestSchema**](GetTaskStatusRequestSchema.md)| Contains the details of the request message. | [optional]

nodejs/docs/GetTokenApi.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,24 @@ This API is used to get the status and details of a single given Token. It may b
1919
### Example
2020

2121
```javascript
22-
var MdesDigitalEnablementApi = require('mdes_digital_enablement_api');
22+
import MdesDigitalEnablementApi from 'mdes_digital_enablement_api';
2323

24-
var apiInstance = new MdesDigitalEnablementApi.GetTokenApi();
25-
var opts = {
24+
let apiInstance = new MdesDigitalEnablementApi.GetTokenApi();
25+
let opts = {
2626
'getTokenRequestSchema': new MdesDigitalEnablementApi.GetTokenRequestSchema() // GetTokenRequestSchema | Contains the details of the request message.
2727
};
28-
var callback = function(error, data, response) {
28+
apiInstance.getToken(opts, (error, data, response) => {
2929
if (error) {
3030
console.error(error);
3131
} else {
3232
console.log('API called successfully. Returned data: ' + data);
3333
}
34-
};
35-
apiInstance.getToken(opts, callback);
34+
});
3635
```
3736

3837
### Parameters
3938

4039

41-
4240
Name | Type | Description | Notes
4341
------------- | ------------- | ------------- | -------------
4442
**getTokenRequestSchema** | [**GetTokenRequestSchema**](GetTokenRequestSchema.md)| Contains the details of the request message. | [optional]

nodejs/docs/NotifyTokenUpdatedApi.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,24 @@ This API is used by MDES to notify the Token Requestor of significant Token upda
1919
### Example
2020

2121
```javascript
22-
var MdesDigitalEnablementApi = require('mdes_digital_enablement_api');
22+
import MdesDigitalEnablementApi from 'mdes_digital_enablement_api';
2323

24-
var apiInstance = new MdesDigitalEnablementApi.NotifyTokenUpdatedApi();
25-
var opts = {
24+
let apiInstance = new MdesDigitalEnablementApi.NotifyTokenUpdatedApi();
25+
let opts = {
2626
'notifyTokenUpdatedRequestSchema': new MdesDigitalEnablementApi.NotifyTokenUpdatedRequestSchema() // NotifyTokenUpdatedRequestSchema | Contains the details of the request message.
2727
};
28-
var callback = function(error, data, response) {
28+
apiInstance.notifyTokenUpdateForTokenStateChange(opts, (error, data, response) => {
2929
if (error) {
3030
console.error(error);
3131
} else {
3232
console.log('API called successfully. Returned data: ' + data);
3333
}
34-
};
35-
apiInstance.notifyTokenUpdateForTokenStateChange(opts, callback);
34+
});
3635
```
3736

3837
### Parameters
3938

4039

41-
4240
Name | Type | Description | Notes
4341
------------- | ------------- | ------------- | -------------
4442
**notifyTokenUpdatedRequestSchema** | [**NotifyTokenUpdatedRequestSchema**](NotifyTokenUpdatedRequestSchema.md)| Contains the details of the request message. | [optional]

nodejs/docs/SearchTokensApi.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,24 @@ This API is used to get basic token information for all tokens on a specified de
1919
### Example
2020

2121
```javascript
22-
var MdesDigitalEnablementApi = require('mdes_digital_enablement_api');
22+
import MdesDigitalEnablementApi from 'mdes_digital_enablement_api';
2323

24-
var apiInstance = new MdesDigitalEnablementApi.SearchTokensApi();
25-
var opts = {
24+
let apiInstance = new MdesDigitalEnablementApi.SearchTokensApi();
25+
let opts = {
2626
'searchTokensRequestSchema': new MdesDigitalEnablementApi.SearchTokensRequestSchema() // SearchTokensRequestSchema | Contains the details of the request message.
2727
};
28-
var callback = function(error, data, response) {
28+
apiInstance.searchTokens(opts, (error, data, response) => {
2929
if (error) {
3030
console.error(error);
3131
} else {
3232
console.log('API called successfully. Returned data: ' + data);
3333
}
34-
};
35-
apiInstance.searchTokens(opts, callback);
34+
});
3635
```
3736

3837
### Parameters
3938

4039

41-
4240
Name | Type | Description | Notes
4341
------------- | ------------- | ------------- | -------------
4442
**searchTokensRequestSchema** | [**SearchTokensRequestSchema**](SearchTokensRequestSchema.md)| Contains the details of the request message. | [optional]

0 commit comments

Comments
 (0)