Skip to content

Commit

Permalink
refactor!: update typescript interfaces using latest api-snippets (#297)
Browse files Browse the repository at this point in the history
* refactor!: update typescript interfaces using latest api-snippets

* chore: rebuild

* chore: add comment

* chore: wording

* chore: resolve and ignore vulnerabilities
  • Loading branch information
kleyow authored Mar 18, 2022
1 parent 6727acc commit 9a72083
Show file tree
Hide file tree
Showing 10 changed files with 159 additions and 51 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ _Note that these instructions are for Linux based systems. For Mac and/or Window
}'
```

The respose from the above call should indicate the result of the communication between the scheme-adapter and the Mojaloop API enabled switch or simulator.
The response from the above call should indicate the result of the communication between the scheme-adapter and the Mojaloop API enabled switch or simulator.

1. Speak to your switch operator or use your simulator to test the inbound (receiving money) API.

Expand Down
18 changes: 1 addition & 17 deletions src/OutboundServer/api_interfaces/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ export declare namespace Schemas {
type accountsCreationState = components['schemas']['accountsCreationState'];
type accountsResponse = components['schemas']['accountsResponse'];
type errorAccountsResponse = components['schemas']['errorAccountsResponse'];
type AccountAddress = components['schemas']['AccountAddress'];
type Account = components['schemas']['Account'];
type AccountList = components['schemas']['AccountList'];
type PartyIdInfo = components['schemas']['PartyIdInfo'];
type PartyName = components['schemas']['PartyName'];
type PartyComplexName = components['schemas']['PartyComplexName'];
Expand All @@ -101,17 +98,4 @@ export declare namespace Schemas {
type simpleTransfersPostRequest = components['schemas']['simpleTransfersPostRequest'];
type simpleTransfersPostResponse = components['schemas']['simpleTransfersPostResponse'];
type errorSimpleTransfersResponse = components['schemas']['errorSimpleTransfersResponse'];
type AuthorizationChannelType = components['schemas']['AuthorizationChannelType'];
type Integer = components['schemas']['Integer'];
type AuthorizationsPostRequest = components['schemas']['AuthorizationsPostRequest'];
type authorizationsPostRequest = components['schemas']['authorizationsPostRequest'];
type OtpValue = components['schemas']['OtpValue'];
type QRCODE = components['schemas']['QRCODE'];
type U2FPIN = components['schemas']['U2FPIN'];
type U2FPinValue = components['schemas']['U2FPinValue'];
type AuthenticationValue = components['schemas']['AuthenticationValue'];
type AuthenticationInfo = components['schemas']['AuthenticationInfo'];
type AuthorizationResponseType = components['schemas']['AuthorizationResponseType'];
type authorizationsPostResponse = components['schemas']['authorizationsPostResponse'];
type errorAuthorizationsResponse = components['schemas']['errorAuthorizationsResponse'];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ items:
properties:
idType:
$ref: >-
../../../../node_modules/@mojaloop/api-snippets/thirdparty/openapi3/components/schemas/PartyIdType.yaml
../../../../node_modules/@mojaloop/api-snippets/thirdparty/v1_0/openapi3/components/schemas/PartyIdType.yaml
idValue:
$ref: >-
../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/PartyIdentifier.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ items:
properties:
idType:
$ref: >-
../../../../node_modules/@mojaloop/api-snippets/thirdparty/openapi3/components/schemas/PartyIdType.yaml
../../../../node_modules/@mojaloop/api-snippets/thirdparty/v1_0/openapi3/components/schemas/PartyIdType.yaml
idValue:
$ref: >-
../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/PartyIdentifier.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
properties:
party:
$ref: >-
../../../../node_modules/@mojaloop/api-snippets/thirdparty/openapi3/components/schemas/Party.yaml
../../../../node_modules/@mojaloop/api-snippets/thirdparty/v1_0/openapi3/components/schemas/Party.yaml
description: Information regarding the requested Party.
currentState:
$ref: ../schemas/async2SyncCurrentState.yaml
required:
- party
- currentState
- currentState
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
title: QuotesPostRequest
type: object
properties:
fspId:
fspId:
title: destination DFSP requested to calculate the quote
$ref: >-
../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/FspId.yaml
quotesPostRequest:
$ref: >-
../../../../node_modules/@mojaloop/api-snippets/thirdparty/openapi3/components/schemas/QuotesPostRequest.yaml
required:
../../../../node_modules/@mojaloop/api-snippets/thirdparty/v1_0/openapi3/components/schemas/QuotesPostRequest.yaml
required:
- fspId
- quotesPostRequest
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ properties:
../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/TransactionInitiatorType.yaml
idType:
$ref: >-
../../../../node_modules/@mojaloop/api-snippets/thirdparty/openapi3/components/schemas/PartyIdType.yaml
../../../../node_modules/@mojaloop/api-snippets/thirdparty/v1_0/openapi3/components/schemas/PartyIdType.yaml
idValue:
$ref: >-
../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/PartyIdentifier.yaml
Expand Down
117 changes: 117 additions & 0 deletions src/audit-resolve.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,123 @@
"decision": "ignore",
"madeAt": 1644879161354,
"expiresAt": 1647471110577
},
"1064587|@mojaloop/central-services-shared>widdershins>urijs": {
"decision": "fix",
"madeAt": 1647565572809
},
"1064606|@mojaloop/central-services-shared>widdershins>urijs": {
"decision": "fix",
"madeAt": 1647565572809
},
"1067233|@mojaloop/central-services-shared>widdershins>urijs": {
"decision": "fix",
"madeAt": 1647565572809
},
"1064843|@mojaloop/event-sdk>@grpc/proto-loader>yargs>string-width>strip-ansi>ansi-regex": {
"decision": "ignore",
"madeAt": 1647565608486,
"expiresAt": 1650157604921
},
"1064843|@mojaloop/central-services-shared>widdershins>oas-resolver>yargs>string-width>strip-ansi>ansi-regex": {
"decision": "ignore",
"madeAt": 1647565608486,
"expiresAt": 1650157604921
},
"1064843|@mojaloop/central-services-shared>widdershins>oas-resolver>yargs>cliui>string-width>strip-ansi>ansi-regex": {
"decision": "ignore",
"madeAt": 1647565608486,
"expiresAt": 1650157604921
},
"1064843|@mojaloop/central-services-shared>widdershins>swagger2openapi>oas-resolver>yargs>cliui>string-width>strip-ansi>ansi-regex": {
"decision": "ignore",
"madeAt": 1647565608486,
"expiresAt": 1650157604921
},
"1064843|@mojaloop/central-services-shared>widdershins>swagger2openapi>oas-validator>oas-resolver>yargs>cliui>string-width>strip-ansi>ansi-regex": {
"decision": "ignore",
"madeAt": 1647565608486,
"expiresAt": 1650157604921
},
"1064843|@mojaloop/central-services-shared>widdershins>swagger2openapi>oas-validator>oas-resolver>yargs>cliui>wrap-ansi>string-width>strip-ansi>ansi-regex": {
"decision": "ignore",
"madeAt": 1647565608486,
"expiresAt": 1650157604921
},
"1064843|@mojaloop/event-sdk>@grpc/proto-loader>yargs>cliui>wrap-ansi>strip-ansi>ansi-regex": {
"decision": "ignore",
"madeAt": 1647565608486,
"expiresAt": 1650157604921
},
"1064843|@mojaloop/central-services-shared>widdershins>oas-resolver>yargs>cliui>wrap-ansi>strip-ansi>ansi-regex": {
"decision": "ignore",
"madeAt": 1647565608486,
"expiresAt": 1650157604921
},
"1064843|@mojaloop/central-services-shared>widdershins>swagger2openapi>oas-resolver>yargs>cliui>wrap-ansi>strip-ansi>ansi-regex": {
"decision": "ignore",
"madeAt": 1647565608486,
"expiresAt": 1650157604921
},
"1064843|@mojaloop/central-services-shared>widdershins>swagger2openapi>oas-validator>oas-resolver>yargs>cliui>wrap-ansi>strip-ansi>ansi-regex": {
"decision": "ignore",
"madeAt": 1647565608487,
"expiresAt": 1650157604921
},
"1064843|@mojaloop/event-sdk>@grpc/proto-loader>yargs>cliui>strip-ansi>ansi-regex": {
"decision": "ignore",
"madeAt": 1647565608487,
"expiresAt": 1650157604921
},
"1064661|@mojaloop/central-services-shared>shins>markdown-it": {
"decision": "ignore",
"madeAt": 1647565592292,
"expiresAt": 1650157555692
},
"1064744|@mojaloop/central-services-shared>widdershins>openapi-sampler>json-pointer": {
"decision": "ignore",
"madeAt": 1647565593879,
"expiresAt": 1650157555692
},
"1064761|@mojaloop/central-services-shared>widdershins>swagger2openapi>better-ajv-errors>jsonpointer": {
"decision": "ignore",
"madeAt": 1647565594838,
"expiresAt": 1650157555692
},
"1064761|@mojaloop/central-services-shared>widdershins>swagger2openapi>oas-validator>better-ajv-errors>jsonpointer": {
"decision": "ignore",
"madeAt": 1647565594838,
"expiresAt": 1650157555692
},
"1064843|@mojaloop/central-services-shared>widdershins>yargs>string-width>strip-ansi>ansi-regex": {
"decision": "ignore",
"madeAt": 1647565599016,
"expiresAt": 1650157555692
},
"1064843|@mojaloop/central-services-shared>widdershins>yargs>cliui>string-width>strip-ansi>ansi-regex": {
"decision": "ignore",
"madeAt": 1647565599016,
"expiresAt": 1650157555692
},
"1065159|@mojaloop/central-services-shared>widdershins>swagger2openapi>oas-validator>ajv": {
"decision": "ignore",
"madeAt": 1647565600359,
"expiresAt": 1650157555692
},
"1065367|@mojaloop/central-services-shared>shins>sanitize-html": {
"decision": "ignore",
"madeAt": 1647565601450,
"expiresAt": 1650157555692
},
"1065368|@mojaloop/central-services-shared>shins>sanitize-html": {
"decision": "ignore",
"madeAt": 1647565601450,
"expiresAt": 1650157555692
},
"1065523|@mojaloop/central-services-shared>widdershins>yargs>yargs-parser": {
"decision": "ignore",
"madeAt": 1647565602524,
"expiresAt": 1650157555692
}
},
"rules": {},
Expand Down
46 changes: 23 additions & 23 deletions src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"engines": {
"node": ">=14.15"
},

"scripts": {
"audit:resolve": "SHELL=sh resolve-audit --production",
"audit:check": "SHELL=sh check-audit --production",
Expand Down Expand Up @@ -49,6 +50,12 @@
"type": "git",
"url": "[email protected]:mojaloop/sdk-scheme-adapter.git"
},
"@comment dependencies": [
"koa2-oauth-server is an old unmaintained repo. It uses the now unsupported git protocol.",
"Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.",
"If you regenerate package-lock.json, you will manually have to update `git://` to `https://` on its",
"dependencies."
],
"dependencies": {
"@koa/cors": "^3.1.0",
"@mojaloop/central-services-error-handling": "11.3.0",
Expand All @@ -57,7 +64,7 @@
"@mojaloop/central-services-metrics": "11.0.0",
"@mojaloop/central-services-shared": "14.0.0",
"@mojaloop/event-sdk": "10.7.1",
"@mojaloop/sdk-standard-components": "15.13.0",
"@mojaloop/sdk-standard-components": "^16.0.0",
"ajv": "8.6.3",
"ajv-keywords": "5.0.0",
"axios": "^0.21.4",
Expand All @@ -79,7 +86,7 @@
"devDependencies": {
"@babel/core": "^7.15.5",
"@babel/preset-env": "^7.15.6",
"@mojaloop/api-snippets": "^13.0.3",
"@mojaloop/api-snippets": "^13.0.9",
"@redocly/openapi-cli": "^1.0.0-beta.59",
"@types/jest": "^27.0.1",
"babel-jest": "^27.2.0",
Expand Down

0 comments on commit 9a72083

Please sign in to comment.