Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: typescript exports & rebuild openapi #56

Merged
merged 2 commits into from
Feb 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 24 additions & 63 deletions src/fspiop/v1_1/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

export interface paths {
"/interface": {
post: operations["Interface"];
post: operations["test"];
};
"/participants/Type/ID": {
post: operations["ParticipantsByIDAndType"];
Expand Down Expand Up @@ -301,7 +301,7 @@ export interface operations {
/**
* Essential path to include schema definitions that are not used so that these definitions get included into the openapi-cli bundle api definition so that they get converted into typescript definitions.
*/
Interface: {
test: {
requestBody: {
"application/json":
| components["schemas"]["BinaryString"]
Expand Down Expand Up @@ -1798,13 +1798,7 @@ export interface components {
* Data model for the complex type Extension.
*/
Extension: {
/**
* Extension key.
*/
key: components["schemas"]["ExtensionKey"];
/**
* Extension value.
*/
value: components["schemas"]["ExtensionValue"];
};
/**
Expand Down Expand Up @@ -1865,17 +1859,8 @@ export interface components {
* Data model for the complex type PartyComplexName.
*/
PartyComplexName: {
/**
* Party’s first name.
*/
firstName?: components["schemas"]["FirstName"];
/**
* Party’s middle name.
*/
middleName?: components["schemas"]["MiddleName"];
/**
* Party’s last name.
*/
lastName?: components["schemas"]["LastName"];
};
/**
Expand All @@ -1886,13 +1871,7 @@ export interface components {
* Data model for the complex type PartyPersonalInfo.
*/
PartyPersonalInfo: {
/**
* First, middle and last name for the Party.
*/
complexName?: components["schemas"]["PartyComplexName"];
/**
* Date of birth for the Party.
*/
dateOfBirth?: components["schemas"]["DateOfBirth"];
};
/**
Expand Down Expand Up @@ -2090,13 +2069,7 @@ export interface components {
* Data model for the complex type Money.
*/
Money: {
/**
* Currency of the amount.
*/
currency: components["schemas"]["Currency"];
/**
* Amount of Money.
*/
amount: components["schemas"]["Amount"];
};
/**
Expand Down Expand Up @@ -2139,13 +2112,7 @@ export interface components {
* Data model for the complex type Refund.
*/
Refund: {
/**
* Reference to the original transaction ID that is requested to be refunded.
*/
originalTransactionId: components["schemas"]["CorrelationId"];
/**
* Free text indicating the reason for the refund.
*/
refundReason?: components["schemas"]["RefundReason"];
};
/**
Expand All @@ -2156,29 +2123,11 @@ export interface components {
* Data model for the complex type TransactionType.
*/
TransactionType: {
/**
* Deposit, withdrawal, refund, …
*/
scenario: components["schemas"]["TransactionScenario"];
/**
* Possible sub-scenario, defined locally within the scheme.
*/
subScenario?: components["schemas"]["TransactionSubScenario"];
/**
* Who is initiating the transaction - Payer or Payee.
*/
initiator: components["schemas"]["TransactionInitiator"];
/**
* Consumer, agent, business, …
*/
initiatorType: components["schemas"]["TransactionInitiatorType"];
/**
* Extra information specific to a refund scenario. Should only be populated if scenario is REFUND.
*/
refundInfo?: components["schemas"]["Refund"];
/**
* Balance of Payments code.
*/
balanceOfPayments?: components["schemas"]["BalanceOfPayments"];
};
/**
Expand Down Expand Up @@ -2238,13 +2187,7 @@ export interface components {
* Data model for the complex type ErrorInformation.
*/
ErrorInformation: {
/**
* Specific error number.
*/
errorCode: components["schemas"]["ErrorCode"];
/**
* Error description string.
*/
errorDescription: components["schemas"]["ErrorDescription"];
extensionList?: components["schemas"]["ExtensionList"];
};
Expand Down Expand Up @@ -2363,8 +2306,9 @@ export interface components {
* Below are the allowed values for the enumeration AuthenticationType.
* - OTP - One-time password generated by the Payer FSP.
* - QRCODE - QR code used as One Time Password.
* - U2F - U2F is a new addition isolated to Thirdparty stream.
*/
AuthenticationType: "OTP" | "QRCODE";
AuthenticationType: "OTP" | "QRCODE" | "U2F";
/**
* The API data type DateTime is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons. The format is according to [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html), expressed in a combined date, time and time zone format. A more readable version of the format is yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples are "2016-05-24T08:38:08.699-04:00", "2016-05-24T08:38:08.699Z" (where Z indicates Zulu time zone, same as UTC).
*/
Expand Down Expand Up @@ -2559,12 +2503,29 @@ export interface components {
* QR code used as a One Time Password.
*/
QRCODE: string;
/**
* U2F challenge-response, where payer FSP verifies if the response provided by end-user device matches the previously registered key.
*/
U2FPIN: string;
/**
* U2F challenge-response, where payer FSP verifies if the response provided by end-user device matches the previously registered key.
*/
U2FPinValue: {
/**
* U2F challenge-response.
*/
pinValue: components["schemas"]["U2FPIN"];
/**
* Sequential counter used for cloning detection. Present only for U2F authentication.
*/
counter: components["schemas"]["Integer"];
};
/**
* Contains the authentication value. The format depends on the authentication type used in the AuthenticationInfo complex type.
*/
AuthenticationValue:
| components["schemas"]["OtpValue"]
| components["schemas"]["QRCODE"];
AuthenticationValue: Partial<components["schemas"]["OtpValue"]> &
Partial<components["schemas"]["QRCODE"]> &
Partial<components["schemas"]["U2FPinValue"]>;
/**
* Data model for the complex type AuthenticationInfo.
*/
Expand Down
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
/* eslint-disable camelcase */

import * as v1_0 from './fspiop/v1_0'
import * as v1_1 from './fspiop/v1_1'
import * as thirdparty from './thirdparty'

export * as v1_0 from './fspiop/v1_0'
export * as v1_1 from './fspiop/v1_1'
export * as thirdparty from './thirdparty'

export default {
v1_0,
v1_1,
Expand Down
34 changes: 16 additions & 18 deletions src/thirdparty/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -627,19 +627,18 @@ export interface components {
/**
* Contains the authentication value. The format depends on the authentication type used in the AuthenticationInfo complex type.
*/
AuthenticationValue:
| string
| string
| {
AuthenticationValue: Partial<string> &
Partial<string> &
Partial<{
/**
* U2F challenge-response.
*/
* U2F challenge-response.
*/
pinValue: string;
/**
* Sequential counter used for cloning detection. Present only for U2F authentication.
*/
* Sequential counter used for cloning detection. Present only for U2F authentication.
*/
counter: string;
};
}>;
/**
* Data model for the complex type AuthenticationInfo.
*/
Expand All @@ -654,19 +653,18 @@ export interface components {
/**
* Contains the authentication value. The format depends on the authentication type used in the AuthenticationInfo complex type.
*/
authenticationValue:
| string
| string
| {
authenticationValue: Partial<string> &
Partial<string> &
Partial<{
/**
* U2F challenge-response.
*/
* U2F challenge-response.
*/
pinValue: string;
/**
* Sequential counter used for cloning detection. Present only for U2F authentication.
*/
* Sequential counter used for cloning detection. Present only for U2F authentication.
*/
counter: string;
};
}>;
};
/**
* Below are the allowed values for the enumeration AuthorizationChannelType.
Expand Down