@fiatconnect/fiatconnect-types
Advanced tools
Comparing version 2.1.1 to 3.0.0
@@ -5,2 +5,14 @@ # Changelog | ||
## [3.0.0](https://github.com/fiatconnect/fiatconnect-types/compare/v2.1.1...v3.0.0) (2022-04-25) | ||
### ⚠ BREAKING CHANGES | ||
* quoteId added as required parameter for transfer requests | ||
* guaranteedUntil made required in quote response | ||
* quoteId added to quote response | ||
### Features | ||
* added REAL/cREAL ([#17](https://github.com/fiatconnect/fiatconnect-types/issues/17)) ([d0114ab](https://github.com/fiatconnect/fiatconnect-types/commit/d0114ab3869e7f2a061da950d43a731e0f5af8ef)) | ||
* **errors:** add InvalidParameters error ([#14](https://github.com/fiatconnect/fiatconnect-types/issues/14)) ([2ceaefd](https://github.com/fiatconnect/fiatconnect-types/commit/2ceaefd3810913399ea84902226ae1f10c26e06e)) | ||
## [2.1.1](https://github.com/fiatconnect/fiatconnect-types/compare/v2.1.0...v2.1.1) (2022-03-15) | ||
@@ -7,0 +19,0 @@ ### Bug Fixes |
@@ -15,10 +15,17 @@ export declare type QuoteRequestQuery = { | ||
cryptoAmount: string; | ||
guaranteedUntil?: string; | ||
guaranteedUntil: string; | ||
quoteId: string; | ||
}; | ||
kyc: { | ||
kycRequired: boolean; | ||
kycSchemas: KycSchema[]; | ||
kycSchemas: QuoteResponseKycSchema[]; | ||
}; | ||
fiatAccount: Partial<Record<FiatAccountType, FiatAccountTypeQuoteData>>; | ||
}; | ||
export declare type QuoteResponseKycSchema = { | ||
kycSchema: KycSchema; | ||
allowedValues: { | ||
[key: string]: string[]; | ||
}; | ||
}; | ||
export declare type QuoteErrorResponse = { | ||
@@ -32,3 +39,3 @@ error: FiatConnectError; | ||
export declare type FiatAccountTypeQuoteData = { | ||
fiatAccountSchemas: FiatAccountSchema[]; | ||
fiatAccountSchemas: QuoteResponseFiatAccountSchema[]; | ||
fee?: string; | ||
@@ -40,2 +47,8 @@ feeType?: FeeType; | ||
}; | ||
export declare type QuoteResponseFiatAccountSchema = { | ||
fiatAccountSchema: FiatAccountSchema; | ||
allowedValues: { | ||
[key: string]: string[]; | ||
}; | ||
}; | ||
export declare type KycRequestParams = { | ||
@@ -57,4 +70,4 @@ kycSchema: KycSchema; | ||
fiatAccountId: string; | ||
name: string; | ||
institution: string; | ||
accountName: string; | ||
institutionName: string; | ||
fiatAccountType: FiatAccountType; | ||
@@ -67,2 +80,3 @@ }; | ||
fiatAccountId: string; | ||
quoteId: string; | ||
}; | ||
@@ -147,7 +161,9 @@ export declare type TransferResponse = { | ||
TransferNotAllowed = "TransferNotAllowed", | ||
KycExpired = "KycExpired" | ||
KycExpired = "KycExpired", | ||
InvalidParameters = "InvalidParameters" | ||
} | ||
export declare enum FiatType { | ||
USD = "USD", | ||
EUR = "EUR" | ||
EUR = "EUR", | ||
REAL = "REAL" | ||
} | ||
@@ -157,2 +173,3 @@ export declare enum CryptoType { | ||
cEUR = "cEUR", | ||
cREAL = "cREAL", | ||
CELO = "CELO" | ||
@@ -164,15 +181,13 @@ } | ||
export declare enum FiatAccountSchema { | ||
MockCheckingAccount = "MockCheckingAccount" | ||
AccountNumber = "AccountNumber" | ||
} | ||
export declare enum FiatAccountType { | ||
MockCheckingAccount = "MockCheckingAccount", | ||
MockDebitCard = "MockDebitCard", | ||
MockCreditCard = "MockCreditCard" | ||
BankAccount = "BankAccount" | ||
} | ||
export interface MockCheckingAccount { | ||
bankName: string; | ||
export interface AccountNumber { | ||
accountName: string; | ||
fiatType: FiatType; | ||
institutionName: string; | ||
accountNumber: string; | ||
routingNumber: string; | ||
country: string; | ||
fiatAccountType: FiatAccountType.BankAccount; | ||
} | ||
@@ -179,0 +194,0 @@ export interface PersonalDataAndDocumentsKyc { |
@@ -69,2 +69,3 @@ "use strict"; | ||
FiatConnectError["KycExpired"] = "KycExpired"; | ||
FiatConnectError["InvalidParameters"] = "InvalidParameters"; | ||
})(FiatConnectError = exports.FiatConnectError || (exports.FiatConnectError = {})); | ||
@@ -85,2 +86,3 @@ /* | ||
FiatType["EUR"] = "EUR"; | ||
FiatType["REAL"] = "REAL"; | ||
})(FiatType = exports.FiatType || (exports.FiatType = {})); | ||
@@ -91,2 +93,3 @@ var CryptoType; | ||
CryptoType["cEUR"] = "cEUR"; | ||
CryptoType["cREAL"] = "cREAL"; | ||
CryptoType["CELO"] = "CELO"; | ||
@@ -100,10 +103,8 @@ })(CryptoType = exports.CryptoType || (exports.CryptoType = {})); | ||
(function (FiatAccountSchema) { | ||
FiatAccountSchema["MockCheckingAccount"] = "MockCheckingAccount"; | ||
FiatAccountSchema["AccountNumber"] = "AccountNumber"; | ||
})(FiatAccountSchema = exports.FiatAccountSchema || (exports.FiatAccountSchema = {})); | ||
var FiatAccountType; | ||
(function (FiatAccountType) { | ||
FiatAccountType["MockCheckingAccount"] = "MockCheckingAccount"; | ||
FiatAccountType["MockDebitCard"] = "MockDebitCard"; | ||
FiatAccountType["MockCreditCard"] = "MockCreditCard"; | ||
FiatAccountType["BankAccount"] = "BankAccount"; | ||
})(FiatAccountType = exports.FiatAccountType || (exports.FiatAccountType = {})); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@fiatconnect/fiatconnect-types", | ||
"version": "2.1.1", | ||
"version": "3.0.0", | ||
"description": "Types used in the FiatConnect specification. Offered as standalone module for payment providers and wallets to both use for FiatConnect APIs and integrations.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -36,7 +36,8 @@ | ||
cryptoAmount: string | ||
guaranteedUntil?: string | ||
guaranteedUntil: string | ||
quoteId: string | ||
} | ||
kyc: { | ||
kycRequired: boolean | ||
kycSchemas: KycSchema[] | ||
kycSchemas: QuoteResponseKycSchema[] | ||
} | ||
@@ -46,2 +47,10 @@ fiatAccount: Partial<Record<FiatAccountType, FiatAccountTypeQuoteData>> | ||
// Helper type | ||
export type QuoteResponseKycSchema = { | ||
kycSchema: KycSchema | ||
allowedValues: { | ||
[key:string]: string[] | ||
} | ||
} | ||
export type QuoteErrorResponse = { | ||
@@ -57,3 +66,3 @@ error: FiatConnectError | ||
export type FiatAccountTypeQuoteData = { | ||
fiatAccountSchemas: FiatAccountSchema[] | ||
fiatAccountSchemas: QuoteResponseFiatAccountSchema[] | ||
fee?: string | ||
@@ -66,2 +75,10 @@ feeType?: FeeType | ||
// Helper type | ||
export type QuoteResponseFiatAccountSchema = { | ||
fiatAccountSchema: FiatAccountSchema | ||
allowedValues: { | ||
[key:string]: string[] | ||
} | ||
} | ||
/* | ||
@@ -107,4 +124,4 @@ / KYC Endpoint Types | ||
fiatAccountId: string | ||
name: string | ||
institution: string | ||
accountName: string | ||
institutionName: string | ||
fiatAccountType: FiatAccountType | ||
@@ -123,2 +140,3 @@ } | ||
fiatAccountId: string | ||
quoteId: string | ||
} | ||
@@ -229,2 +247,3 @@ | ||
KycExpired = 'KycExpired', | ||
InvalidParameters = 'InvalidParameters', | ||
} | ||
@@ -246,2 +265,3 @@ | ||
EUR = 'EUR', | ||
REAL = 'REAL' | ||
} | ||
@@ -252,2 +272,3 @@ | ||
cEUR = 'cEUR', | ||
cREAL = 'cREAL', | ||
CELO = 'CELO', | ||
@@ -261,17 +282,15 @@ } | ||
export enum FiatAccountSchema { | ||
MockCheckingAccount = 'MockCheckingAccount', | ||
AccountNumber = 'AccountNumber' | ||
} | ||
export enum FiatAccountType { | ||
MockCheckingAccount = 'MockCheckingAccount', | ||
MockDebitCard = 'MockDebitCard', | ||
MockCreditCard = 'MockCreditCard', | ||
BankAccount = 'BankAccount' | ||
} | ||
export interface MockCheckingAccount { | ||
bankName: string | ||
accountName: string | ||
fiatType: FiatType | ||
accountNumber: string | ||
routingNumber: string | ||
export interface AccountNumber { | ||
accountName: string, | ||
institutionName: string, | ||
accountNumber: string, | ||
country: string, | ||
fiatAccountType: FiatAccountType.BankAccount | ||
} | ||
@@ -278,0 +297,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27403
610