Skip to content

Commit

Permalink
Merge branch 'fix/2060_typescript_api_exports' into fix/2060_local_pa…
Browse files Browse the repository at this point in the history
…ckage_install
  • Loading branch information
eoln committed Feb 24, 2021
2 parents 765de52 + cbc8897 commit 16441e7
Show file tree
Hide file tree
Showing 10 changed files with 2,240 additions and 4,713 deletions.
33 changes: 18 additions & 15 deletions src/OutboundServer/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ paths:
operationId: PartiesByTypeAndID
responses:
'200':
$ref: '#/components/responses/partiesByIdResponse'
$ref: '#/components/responses/partiesByIdSuccess'
'404':
$ref: '#/components/responses/partiesByIdError404'
'/parties/{Type}/{ID}/{SubId}':
Expand All @@ -427,7 +427,7 @@ paths:
operationId: PartiesSubIdByTypeAndID
responses:
'200':
$ref: '#/components/responses/partiesByIdResponse'
$ref: '#/components/responses/partiesByIdSuccess'
'404':
$ref: '#/components/responses/partiesByIdError404'
/quotes:
Expand Down Expand Up @@ -2115,6 +2115,19 @@ components:
- WAITING_FOR_ACTION
- COMPLETED
- ERROR_OCCURRED
partiesByIdResponse:
title: partiesByIdResponse
type: object
description: 'GET /parties/{Type}/{ID} response object'
properties:
party:
$ref: '#/components/schemas/Party'
description: Information regarding the requested Party.
currentState:
$ref: '#/components/schemas/async2SyncCurrentState'
required:
- party
- currentState
QuotesPostRequest:
title: QuotesPostRequest
type: object
Expand Down Expand Up @@ -2607,22 +2620,12 @@ components:
application/json:
schema:
$ref: '#/components/schemas/errorAccountsResponse'
partiesByIdResponse:
description: PartiesByIdResponse
partiesByIdSuccess:
description: PartiesByIdSuccess
content:
application/json:
schema:
type: object
description: 'GET /parties/{Type}/{ID} response object'
properties:
party:
$ref: '#/components/schemas/Party'
description: Information regarding the requested Party.
currentState:
$ref: '#/components/schemas/async2SyncCurrentState'
required:
- party
- currentState
$ref: '#/components/schemas/partiesByIdResponse'
partiesByIdError404:
description: PartiesByIdError404
content:
Expand Down
1 change: 1 addition & 0 deletions src/OutboundServer/api_interfaces/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export declare namespace Schemas {
type PartyPersonalInfo = components["schemas"]["PartyPersonalInfo"];
type Party = components["schemas"]["Party"];
type async2SyncCurrentState = components["schemas"]["async2SyncCurrentState"];
type partiesByIdResponse = components["schemas"]["partiesByIdResponse"];
type QuotesPostRequest = components["schemas"]["QuotesPostRequest"];
type quotesPostRequest = components["schemas"]["quotesPostRequest"];
type quotesPostResponse = components["schemas"]["quotesPostResponse"];
Expand Down
20 changes: 11 additions & 9 deletions src/OutboundServer/api_interfaces/openapi.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,14 +288,14 @@ export interface operations {
/** The HTTP request GET /parties// (or GET /parties///) is used to lookup information regarding the requested Party, defined by , and optionally (for example, GET /parties/MSISDN/123456789, or GET /parties/BUSINESS/shoecompany/employee1). */
PartiesByTypeAndID: {
responses: {
200: components["responses"]["partiesByIdResponse"];
200: components["responses"]["partiesByIdSuccess"];
404: components["responses"]["partiesByIdError404"];
};
};
/** The HTTP request GET /parties// (or GET /parties///) is used to lookup information regarding the requested Party, defined by , and optionally (for example, GET /parties/MSISDN/123456789, or GET /parties/BUSINESS/shoecompany/employee1). */
PartiesSubIdByTypeAndID: {
responses: {
200: components["responses"]["partiesByIdResponse"];
200: components["responses"]["partiesByIdSuccess"];
404: components["responses"]["partiesByIdError404"];
};
};
Expand Down Expand Up @@ -1085,6 +1085,12 @@ export interface components {
| "WAITING_FOR_ACTION"
| "COMPLETED"
| "ERROR_OCCURRED";
/** GET /parties/{Type}/{ID} response object */
partiesByIdResponse: {
/** Information regarding the requested Party. */
party: components["schemas"]["Party"];
currentState: components["schemas"]["async2SyncCurrentState"];
};
/** The object sent in the POST /quotes request. */
QuotesPostRequest: {
/** Common ID between the FSPs for the quote object, decided by the Payer FSP. The ID should be reused for resends of the same quote for a transaction. A new ID should be generated for each new quote for a transaction. */
Expand Down Expand Up @@ -1341,14 +1347,10 @@ export interface components {
"application/json": components["schemas"]["errorAccountsResponse"];
};
};
/** PartiesByIdResponse */
partiesByIdResponse: {
/** PartiesByIdSuccess */
partiesByIdSuccess: {
content: {
"application/json": {
/** Information regarding the requested Party. */
party: components["schemas"]["Party"];
currentState: components["schemas"]["async2SyncCurrentState"];
};
"application/json": components["schemas"]["partiesByIdResponse"];
};
};
/** PartiesByIdError404 */
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
description: PartiesByIdSuccess
content:
application/json:
schema:
$ref: ../schemas/partiesByIdResponse.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
title: partiesByIdResponse
type: object
description: 'GET /parties/{Type}/{ID} response object'
properties:
party:
$ref: >-
../../../../node_modules/@mojaloop/api-snippets/thirdparty/openapi3/components/schemas/Party.yaml
description: Information regarding the requested Party.
currentState:
$ref: ../schemas/async2SyncCurrentState.yaml
required:
- party
- currentState
2 changes: 1 addition & 1 deletion src/OutboundServer/api_template/paths/parties_Type_ID.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ get:
operationId: PartiesByTypeAndID
responses:
'200':
$ref: ../components/responses/partiesByIdResponse.yaml
$ref: ../components/responses/partiesByIdSuccess.yaml
'404':
$ref: ../components/responses/partiesByIdError404.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ get:
operationId: PartiesSubIdByTypeAndID
responses:
'200':
$ref: ../components/responses/partiesByIdResponse.yaml
$ref: ../components/responses/partiesByIdSuccess.yaml
'404':
$ref: ../components/responses/partiesByIdError404.yaml
6 changes: 1 addition & 5 deletions src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
import * as OutboundAPI from './OutboundServer/api_interfaces';
declare const _default: {
OutboundAPI: typeof OutboundAPI;
};
export default _default;
export * as OutboundAPI from './OutboundServer/api_interfaces';
Loading

0 comments on commit 16441e7

Please sign in to comment.