Skip to content

Instantly share code, notes, and snippets.

@remy
Last active June 28, 2024 13:23
Show Gist options
  • Save remy/f312dc6186c26dbf75ce8597b6eaa436 to your computer and use it in GitHub Desktop.
Save remy/f312dc6186c26dbf75ce8597b6eaa436 to your computer and use it in GitHub Desktop.
enum ACCOUNT_STATE {
ACTIVE
CLOSED
PENDING
SUSPENDED
}
scalar AWSDateTime
scalar AWSEmail
scalar AWSJSON
type Account {
createdAt: AWSDateTime
description: String
details: AccountDetails
id: ID!
metadata: AWSJSON
name: String!
providerMetadata: ProviderMetadata
state: ACCOUNT_STATE
type: AccountType
updatedAt: AWSDateTime
}
union AccountDetails = AccountDetailsIBAN | AccountDetailsUK
type AccountDetailsIBAN {
BIC: String
IBAN: String
}
input AccountDetailsInput {
BIC: String
IBAN: String
accountNumber: String
sortCode: String
}
type AccountDetailsUK {
accountNumber: String
sortCode: String
}
type AccountType {
countryCode: String
currency: String
customerType: CUSTOMER_TYPE
description: String
fee: FeeSchedule
id: ID!
name: String
provider: Provider
}
type Address {
addressLines: [String]
city: String
countryCode: String
postCode: String
}
input AddressInput {
addressLines: [String]
city: String
countryCode: String
postCode: String
}
type Beneficiary {
accountDetails: AccountDetails
countryCode: String
createdAt: AWSDateTime
customerId: String
description: String
expiresAt: AWSDateTime
id: ID!
metadata: AWSJSON
name: String
providerMetadata: ProviderMetadata
updatedAt: AWSDateTime
}
enum CARD_ISSUER {
VISA
}
enum CARD_TRANSACTION_TYPE {
AUTH_ONLY
CNP_DST
CNP_EEA
CNP_INT
THREE_DS
}
enum CARD_TYPE {
DIGITAL
PHYSICAL
VIRTUAL
}
enum CONTRACT_STATE {
ARCHIVED
DRAFT
PUBLISHED
}
enum CUSTOMER_STATE {
ACTIVE
ARCHIVED
LEGAL_ACCEPTANCE
PENDING
SUSPENDED
VERIFICATION
}
enum CUSTOMER_TYPE {
CONSUMER
CORPORATE
}
type Card {
cardIssuer: CARD_ISSUER
createdAt: AWSDateTime
description: String
id: ID!
metadata: AWSJSON
name: String
providerMetadata: ProviderMetadata
updatedAt: AWSDateTime
}
type Contract {
createdAt: AWSDateTime
id: ID!
publishDate: AWSDateTime
state: CONTRACT_STATE
text: String
updatedAt: AWSDateTime
}
type ContractAgreement {
createdAt: AWSDateTime
customer: Customer
id: ID!
person: Person
updatedAt: Contract
}
input CreateAccountInput {
accountTypeId: String
description: String
name: String!
}
input CreateAccountTypeInput {
country: String!
currency: String!
customerType: CUSTOMER_TYPE
description: String
feeScheduleId: String
name: String
providerId: String!
}
input CreateBeneficiaryInput {
accountDetails: AccountDetailsInput
countryCode: String
customerId: String
description: String
name: String
}
input CreateCardInput {
accountId: String
cardType: CARD_TYPE
}
input CreateCustomerInput {
address: AddressInput
name: String
orgDetails: OrgDetailsInput
owner: String
type: CUSTOMER_TYPE
}
input CreateKYBInput {
customerId: String
}
input CreateKYCInput {
customerId: String
personId: String
}
input CreatePaymentInput {
description: String
destination: AccountDetailsInput
source: String
sourceAmount: String
sourceCurrency: String
targetAmount: String
targetCurrency: String
type: PAYMENT_TYPE
}
type CreatePaymentResponse {
paymentId: ID
transactionId: String
verification: Boolean
}
input CreatePersonInput {
address: AddressInput
email: AWSEmail
firstName: String
lastName: String
nationality: String
}
type Customer {
accounts: [Account]
address: Address
createdAt: AWSDateTime
id: ID!
kyb: KYB
kyc: KYC
metadata: AWSJSON
name: String
orgDetails: OrgDetails
providerMetadata: ProviderMetadata
riskScore: RiskScore
state: CUSTOMER_STATE
type: CUSTOMER_TYPE
updatedAt: AWSDateTime
}
type Event {
createdAt: AWSDateTime
data: EventObject
eventType: String
id: ID!
transactionId: String
version: String
}
union EventObject = Account | Beneficiary | Card | Customer | FeeSchedule | KYB | KYC | Payment | Person | Provider
enum FEE_SCHEDULE_STATE {
ACTIVE
DRAFT
INACTIVE
}
enum FEE_TYPE {
ACCOUNT_MAINTENANCE
TRANSACTION_FEE
}
type FeeItem {
amount: String
createdAt: AWSDateTime
feeType: FEE_TYPE
id: ID!
name: String
orendaAmount: String
orendaPercentage: String
paymentType: PAYMENT_TYPE
percentage: String
transactionType: TRANSACTION_TYPE
updatedAt: AWSDateTime
}
input FeeItemInput {
amount: String
feeType: FEE_TYPE
name: String
orendaAmount: String
orendaPercentage: String
paymentType: PAYMENT_TYPE
percentage: String
transactionType: TRANSACTION_TYPE
}
type FeeSchedule {
createdAt: AWSDateTime
currency: String
description: String
feeItems: [FeeItem]
id: ID!
name: String
state: FEE_SCHEDULE_STATE
updatedAt: AWSDateTime
}
input FeeScheduleInput {
currency: String
description: String
feeItems: [FeeItemInput]
name: String
}
type FeeTransactionItem {
createdAt: AWSDateTime
feeCurrency: String
feeTransactionId: String
id: ID!
orendaFeeValue: String
subType: String
transactionId: String
type: TRANSACTION_TYPE
updatedAt: AWSDateTime
}
type GetTransactionsResponse {
cursor: String
data: [Transaction]
}
type KYB {
createdAt: AWSDateTime
customerId: String!
id: ID!
metadata: AWSJSON
providerMetadata: ProviderMetadata
questionnaire: KYBQuestionnaire
result: KYC_KYB_RESULT
status: String
updatedAt: AWSDateTime
}
type KYBQuestionnaire {
annualPayments: String
annualTurnover: String
companyDocumentsCert: String
companyDocumentsComp: String
companyPostcode: String
companyTaxIdNumber: String
companyWebsite: String
id: ID!
industrySector: String
totalEmployees: String
turnoverCurrency: String
}
type KYC {
IDDocs: [AWSJSON]
address: Address
countryOfResidence: String
createdAt: AWSDateTime
customerId: String
dateOfBirth: String
id: ID!
metadata: AWSJSON
nationality: String
personId: String
providerMetadata: ProviderMetadata
result: KYC_KYB_RESULT
status: String
telephone: String
updatedAt: AWSDateTime
}
enum KYC_KYB_RESULT {
AMBER
GREEN
RED
}
type ListAccountTypeResponse {
id: ID
name: String
}
type ListFeeScheduleResponse {
id: ID
name: String
status: FEE_SCHEDULE_STATE
}
type Merchant {
category: String
id: ID!
location: Address
logo: String
mcc: String
name: String
}
type Mutation {
activateFeeSchedule: ID
agreeContract: ID
archiveAccount(id: ID!, reason: String): ID
archiveBeneficiary(id: ID!): ID
archiveCustomer(id: ID!, reason: String): ID
archivePerson(id: ID!, reason: String): ID
closeAccount(id: ID!, reason: String): ID
createAccount(input: CreateAccountInput): ID
createAccountType(input: CreateAccountTypeInput): ID
createBeneficiary(input: CreateBeneficiaryInput): ID
createCard(input: CreateCardInput): ID
createCustomer(input: CreateCustomerInput): ID
createFeeSchedule(id: ID): ID
createKYB(input: CreateKYBInput): ID
createKYC(input: CreateKYCInput): ID
createPayment(input: CreatePaymentInput): CreatePaymentResponse
createPerson(input: CreatePersonInput): ID
resetCardPin(id: ID!): ID
suspendAccount(id: ID!, reason: String): ID
suspendCard(id: ID!, reason: String): ID
suspendCustomer(id: ID!, reason: String): ID
suspendPerson(id: ID!, reason: String): ID
updateAccountType(id: ID!, input: UpdateAccountTypeInput): ID
updateCustomer(id: ID!, input: UpdateCustomerInput): ID
updateEventMetadata(id: ID!, metadata: AWSJSON): ID
updateFeeItem(feeItem: UpdateFeeItemInput, id: ID!): ID
updateFeeItems(feeItems: [UpdateFeeItemInput], id: ID!): ID
updateFeeSchedule(id: ID!, input: UpdateFeeScheduleInput): ID
updatePerson(id: ID!, input: UpdatePersonInput!): ID
updateTransactionMetadata(id: ID!, metadata: AWSJSON): ID
verifyTransaction(code: String): Boolean
}
type OrgDetails {
orgNumber: String
orgType: String
taxNumber: String
}
input OrgDetailsInput {
orgNumber: String
orgType: String
taxNumber: String
}
enum PAYMENT_TYPE {
BACS_IN
BACS_OUT
CHAPS_IN
CHAPS_OUT
DIRECT_DEBIT_IN
DIRECT_DEBIT_OUT
FASTER_IN
FASTER_OUT
INTERNAL_IN
INTERNAL_OUT
SECT_IN
SECT_OUT
SEPA_IN
SEPA_OUT
SWIFT_IN
SWIFT_OUT
}
type Payment {
createdAt: AWSDateTime
description: String
destination: AccountDetails
exchangeRate: String
fee: FeeTransactionItem
id: ID!
merchant: Merchant
metadata: AWSJSON
providerMetadata: ProviderMetadata
reporting: RegulatoryReporting
source: Account
sourceAmount: String
sourceCurrency: String
status: TRANSACTION_STATE
targetAmount: String
targetCurrency: String
type: PAYMENT_TYPE
updatedAt: AWSDateTime
}
type Person {
address: Address
createdAt: AWSDateTime
dateOfBirth: String
email: AWSEmail
firstName: String
gender: String
id: ID!
identity: String
kyc: KYC
lastName: String
metadata: AWSJSON
nationality: String
providerMetadata: ProviderMetadata
title: String
updatedAt: AWSDateTime
}
type Program {
address: Address
createdAt: AWSDateTime
id: ID!
kyb: KYB
name: String
updatedAt: AWSDateTime
}
type Provider {
createdAt: AWSDateTime
endpoint: String
id: ID!
name: String
updatedAt: AWSDateTime
}
input ProviderInput {
name: String
}
type ProviderMetadata {
metadata: AWSJSON
provider: Provider
}
type Query {
getAccount(id: ID!): Account
getAccountType(id: ID!): AccountType
getCard(id: ID!): Card
getCardPayment(id: ID!): Payment
getCurrencies: [String]
getCustomer(id: ID!): Customer
getFeeSchedule(id: ID!): FeeSchedule
getFeeSchedules: [FeeSchedule]
getKYB(id: ID!): KYB
getKYC(id: ID!): KYC
getPayment(id: ID!): Payment
getPerson(id: ID!): Person
getTransactionItem(id: ID!): Transaction
getTransactions(cursor: String, filter: TransactionFilter, fromDate: AWSDateTime, paginate: Boolean, toDate: AWSDateTime): GetTransactionsResponse
listAccountTypes: [ListAccountTypeResponse]
listFeeSchedules: [ListFeeScheduleResponse]
}
enum RRTYPE {
BOTH
CRED
DEBT
}
type RegulatoryReporting {
amount: String
code: String
countryCode: String
currency: String
id: ID!
name: String
type: RRTYPE
}
type RiskItem {
metric: String
score: String
value: String
}
type RiskMeasurement {
id: ID!
max: String
metric: String
min: String
score: String
value: String
}
type RiskScore {
category: String
customerId: String
detail: [RiskItem]
id: ID!
score: String
}
enum TRANSACTION_STATE {
FAILED
PENDING
STARTED
SUCCESS
}
enum TRANSACTION_TYPE {
ACCOUNT_ARCHIVE
ACCOUNT_CREATE
ACCOUNT_SUSPEND
ACCOUNT_UPDATE
ANNUAL_CARD_FEE
ANNUAL_FEE
CARD_DIGITAL_CREATE
CARD_PAYMENT
CARD_PHYSICAL_ACTIVATE
CARD_PHYSICAL_CREATE
CARD_PIN_REQUEST
CARD_PIN_RESET
CARD_REFUND
CARD_REMOVE
CARD_SUSPEND
CARD_VIRTUAL_CREATE
CUSTOMER_ARCHIVE
CUSTOMER_CREATE
CUSTOMER_UPDATE
KYB_APPROVE
KYB_CREATE
KYB_DENY
KYB_UPDATE
KYC_APPROVE
KYC_CREATE
KYC_DENY
KYC_UPDATE
MONTHLY_FEE
PAYMENT_IN
PAYMENT_OUT
PERSON_ARCHIVE
PERSON_CREATE
PERSON_UPDATE
}
type Transaction {
amount: String
createdAt: AWSDateTime
createdBy: Person
currency: String
entity: EventObject
events: [Event]
fee: FeeTransactionItem
feeAmount: String
id: ID!
metadata: AWSJSON
state: TRANSACTION_STATE
type: TRANSACTION_TYPE
updatedAt: AWSDateTime
updatedBy: Person
}
input TransactionFilter {
accountCode: String
accountName: String
currency: String
status: TRANSACTION_STATE
transactionType: TRANSACTION_TYPE
}
input UpdateAccountTypeInput {
description: String
feeScheduleId: String
name: String
}
input UpdateCustomerInput {
address: AddressInput
name: String
orgDetails: OrgDetailsInput
owner: String
type: CUSTOMER_TYPE
}
input UpdateFeeItemInput {
amount: String
feeType: FEE_TYPE
name: String
orendaAmount: String
orendaPercentage: String
paymentType: PAYMENT_TYPE
percentage: String
transactionType: TRANSACTION_TYPE
}
input UpdateFeeScheduleInput {
accountTypeId: String
currency: String
description: String
name: String
}
input UpdatePersonInput {
address: AddressInput
email: AWSEmail
firstName: String
lastName: String
nationality: String
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment