Comparing version 0.50.1 to 0.50.3
@@ -8,2 +8,6 @@ # Changelog | ||
## [Unreleased] | ||
## [0.50.0] - 2023-09-12 | ||
## Removed | ||
- Removed `title, description, button, featuresToggleLabel, FeaturesGroups` from the `subscriptionPlans` query | ||
## [0.49.0] - 2023-01-31 | ||
@@ -10,0 +14,0 @@ ## Added |
@@ -57,3 +57,3 @@ "use strict"; | ||
var model_1 = require("./model"); | ||
var GET_ACCOUNT = "query getAccount {\n viewer {\n mainAccount {\n iban\n bic\n balance\n availableBalance\n cardHolderRepresentation\n cardHolderRepresentations\n hasPendingCardFraudCase\n canCreateOverdraft\n }\n }\n}"; | ||
var GET_ACCOUNT = "query getAccount {\n viewer {\n mainAccount {\n iban\n bic\n balance\n availableBalance\n cardHolderRepresentation\n cardHolderRepresentations\n hasPendingCardFraudCase\n canCreateOverdraft\n createdAt\n }\n }\n}"; | ||
var GET_ACCOUNT_STATS = "query getAccountStats {\n viewer {\n mainAccount {\n stats {\n accountBalance\n main\n yours\n unknown\n vatAmount\n vatTotal\n vatMissing\n taxCurrentYearAmount\n taxPastYearsAmount\n taxTotal\n taxMissing\n }\n }\n }\n}"; | ||
@@ -60,0 +60,0 @@ var GET_SOLARIS_BALANCE = "query getSolarisBalance {\n viewer {\n mainAccount {\n solarisBalance {\n balance {\n value\n currency\n unit\n }\n availableBalance {\n value\n currency\n unit\n }\n seizureProtection {\n currentBlockedAmount {\n value\n currency\n unit\n }\n protectedAmount {\n value\n currency\n unit\n }\n protectedAmountExpiring {\n value\n currency\n unit\n }\n protectedAmountExpiringDate\n }\n }\n }\n }\n }\n"; |
@@ -90,3 +90,3 @@ import { Card as CardModel, CardSettings, MutationActivateCardArgs, MutationChangeCardPinArgs, MutationChangeCardStatusArgs, MutationConfirmChangeCardPinArgs, MutationCreateCardArgs, MutationReorderCardArgs, MutationReplaceCardArgs, MutationUpdateCardSettingsArgs, GooglePayCardToken, MutationAddGooglePayCardTokenArgs, MutationDeleteGooglePayCardTokenArgs, WhitelistCardResponse, ConfirmFraudResponse, CardPinKey, MutationChangeCardPinEncryptedArgs, MutationChangeCardPinWithChangeRequestArgs } from "./schema"; | ||
* | ||
* @param args query parameters including card id, contactlessEnabled, atm and purchase card limits | ||
* @param args query parameters including card id, atm and purchase card limits | ||
* @returns updated card settings | ||
@@ -93,0 +93,0 @@ */ |
@@ -57,3 +57,3 @@ "use strict"; | ||
var resultPage_1 = require("./resultPage"); | ||
var CARD_FIELDS = "\n id\n status\n type\n holder\n formattedExpirationDate\n maskedPan\n pinSet\n addedToApplePay\n newCardOrdered\n settings {\n contactlessEnabled\n }\n googlePayTokens {\n walletId\n tokenRefId\n }\n"; | ||
var CARD_FIELDS = "\n id\n status\n type\n holder\n formattedExpirationDate\n maskedPan\n pinSet\n addedToApplePay\n newCardOrdered\n googlePayTokens {\n walletId\n tokenRefId\n }\n"; | ||
var CARD_LIMITS_FIELDS = "\n daily {\n maxAmountCents\n maxTransactions\n }\n monthly {\n maxAmountCents\n maxTransactions\n }\n"; | ||
@@ -71,3 +71,3 @@ var GET_CARDS = "query getCards {\n viewer {\n mainAccount {\n cards {\n ".concat(CARD_FIELDS, "\n }\n }\n }\n}"); | ||
var CHANGE_CARD_STATUS = "mutation changeCardStatus(\n $id: String!\n $action: CardAction!\n) {\n changeCardStatus(\n id: $id\n action: $action\n ) {\n ".concat(CARD_FIELDS, "\n }\n}"); | ||
var UPDATE_CARD_SETTINGS = "mutation updateCardSettings(\n $id: String!\n $contactlessEnabled: Boolean\n $atmLimits: CardLimitsInput\n $purchaseLimits: CardLimitsInput\n) {\n updateCardSettings(\n settings: {\n contactlessEnabled: $contactlessEnabled\n atmLimits: $atmLimits\n purchaseLimits: $purchaseLimits\n }\n id: $id\n ) {\n contactlessEnabled\n cardSpendingLimits {\n atm {\n ".concat(CARD_LIMITS_FIELDS, "\n }\n purchase {\n ").concat(CARD_LIMITS_FIELDS, "\n }\n }\n }\n}"); | ||
var UPDATE_CARD_SETTINGS = "mutation updateCardSettings(\n $id: String!\n $atmLimits: CardLimitsInput\n $purchaseLimits: CardLimitsInput\n) {\n updateCardSettings(\n settings: {\n atmLimits: $atmLimits\n purchaseLimits: $purchaseLimits\n }\n id: $id\n ) {\n cardSpendingLimits {\n atm {\n ".concat(CARD_LIMITS_FIELDS, "\n }\n purchase {\n ").concat(CARD_LIMITS_FIELDS, "\n }\n }\n }\n}"); | ||
var REPLACE_CARD = "mutation replaceCard(\n $id: String!\n) {\n replaceCard(\n id: $id\n ) {\n ".concat(CARD_FIELDS, "\n }\n}"); | ||
@@ -305,3 +305,3 @@ var REORDER_CARD = "mutation reorderCard(\n $id: String!\n) {\n reorderCard(\n id: $id\n ) {\n ".concat(CARD_FIELDS, "\n }\n}"); | ||
* | ||
* @param args query parameters including card id, contactlessEnabled, atm and purchase card limits | ||
* @param args query parameters including card id, atm and purchase card limits | ||
* @returns updated card settings | ||
@@ -308,0 +308,0 @@ */ |
@@ -40,7 +40,8 @@ "use strict"; | ||
exports.Declaration = void 0; | ||
var FETCH_DECLARATIONS = "\n query fetchDeclarations ($type: DeclarationType!) {\n viewer {\n mainAccount {\n declarations (type: $type) {\n id\n amount\n period\n year\n uploadedAt\n }\n }\n }\n }\n"; | ||
var DECLARATION_FIELDS = "\n id\n amount\n period\n year\n uploadedAt\n submissionStatus\n"; | ||
var FETCH_DECLARATIONS = "\n query fetchDeclarations ($type: DeclarationType!) {\n viewer {\n mainAccount {\n declarations (type: $type) {\n ".concat(DECLARATION_FIELDS, "\n }\n }\n }\n }\n"); | ||
var GET_DECLARATION_PDF = "\n query getDeclarationPdf ($id: Int!) {\n viewer {\n mainAccount {\n declarationPdfUrl(id: $id)\n }\n }\n }\n"; | ||
var SUBMIT_DECLARATION = "\n mutation(\n $period: String!,\n $year: Int!\n ) {\n submitDeclaration(\n period: $period,\n year: $year\n ) {\n id\n amount\n period\n year\n uploadedAt\n }\n }\n"; | ||
var GET_DECLARATION_STATS = "\n query getDeclarationStats($period: String!, $year: Int!) {\n viewer {\n mainAccount {\n declarationStats(\n period: $period,\n year: $year\n ) {\n amount\n uncategorized {\n id\n amount\n name\n purpose\n valutaDate\n selectedBookingDate\n category\n categoryCode\n vatRate\n vatAmount\n isSplit\n }\n categoryGroups {\n amount\n categoryCode\n categoryCodeTranslation\n transactions {\n id\n amount\n name\n purpose\n valutaDate\n selectedBookingDate\n category\n categoryCode\n vatRate\n vatAmount\n isSplit\n }\n }\n }\n }\n }\n }\n"; | ||
var CATEGORIZE_TRANSACTION_MUTATION = "mutation(\n $id: ID!,\n $category: TransactionCategory,\n $categoryCode: String,\n $date: String\n $isSplit: Boolean\n) {\n categorizeTransactionForDeclaration(\n id: $id,\n category: $category,\n categoryCode: $categoryCode\n date: $date\n isSplit: $isSplit\n ) {\n category\n categoryCode\n date\n }\n}"; | ||
var SUBMIT_DECLARATION = "\n mutation(\n $period: String!,\n $year: Int!\n ) {\n submitDeclaration(\n period: $period,\n year: $year\n ) {\n ".concat(DECLARATION_FIELDS, "\n }\n }\n"); | ||
var GET_DECLARATION_STATS = "\n query getDeclarationStats($period: String!, $year: Int!) {\n viewer {\n mainAccount {\n declarationStats(\n period: $period,\n year: $year\n ) {\n amount\n uncategorized {\n id\n amount\n name\n purpose\n valutaDate\n selectedBookingDate\n category\n categoryCode\n vatCategoryCode\n vatRate\n vatAmount\n isSplit\n }\n categoryGroups {\n amount\n categoryCode\n categoryCodeTranslation\n transactions {\n id\n amount\n name\n purpose\n valutaDate\n selectedBookingDate\n category\n categoryCode\n vatCategoryCode\n vatRate\n vatAmount\n isSplit\n }\n }\n }\n }\n }\n }\n"; | ||
var CATEGORIZE_TRANSACTION_MUTATION = "mutation(\n $id: ID!,\n $category: TransactionCategory,\n $categoryCode: String,\n $vatCategoryCode: String,\n $date: String\n $isSplit: Boolean\n $businessAssetInput: BusinessAssetInput\n) {\n categorizeTransactionForDeclaration(\n id: $id,\n category: $category,\n categoryCode: $categoryCode\n vatCategoryCode: $vatCategoryCode,\n date: $date\n isSplit: $isSplit\n businessAssetInput: $businessAssetInput\n ) {\n category\n categoryCode\n vatCategoryCode\n date\n }\n}"; | ||
var Declaration = /** @class */ (function () { | ||
@@ -47,0 +48,0 @@ function Declaration(client) { |
import { PageInfo } from "./schema"; | ||
export interface IResultPageInterface<T> { | ||
import { FetchOptions } from "./types"; | ||
export interface IResultPageInterface<T, FetchOptionsType = FetchOptions, RestArgs extends any[] = any[]> { | ||
items: T[]; | ||
pageInfo: PageInfo; | ||
nextPage?: () => Promise<IResultPageInterface<T>>; | ||
previousPage?: () => Promise<IResultPageInterface<T>>; | ||
nextPage?: () => Promise<IResultPageInterface<T, FetchOptionsType, RestArgs>>; | ||
previousPage?: () => Promise<IResultPageInterface<T, FetchOptionsType, RestArgs>>; | ||
} | ||
export interface IFetch<ModelType, FetchOptionsType> { | ||
fetch(args?: FetchOptionsType): Promise<IResultPageInterface<ModelType>>; | ||
export interface IFetch<ModelType, FetchOptionsType, RestArgs extends any[] = any[]> { | ||
fetch(args?: FetchOptionsType, ...rest: RestArgs): Promise<IResultPageInterface<ModelType, FetchOptionsType, RestArgs>>; | ||
} |
import { IFetch } from "./interfaces"; | ||
import { PageInfo } from "./schema"; | ||
import { FetchOptions } from "./types"; | ||
export declare class ResultPage<ModelType, FetchOptionsType = FetchOptions> { | ||
export declare class ResultPage<ModelType, FetchOptionsType = FetchOptions, RestArgs extends any[] = any[]> { | ||
items: ModelType[]; | ||
pageInfo: PageInfo; | ||
nextPage?: () => Promise<ResultPage<ModelType, FetchOptionsType>>; | ||
previousPage?: () => Promise<ResultPage<ModelType, FetchOptionsType>>; | ||
constructor(model: IFetch<ModelType, FetchOptionsType>, items: ModelType[], pageInfo: PageInfo, args: FetchOptionsType); | ||
nextPage?: () => Promise<ResultPage<ModelType, FetchOptionsType, RestArgs>>; | ||
previousPage?: () => Promise<ResultPage<ModelType, FetchOptionsType, RestArgs>>; | ||
constructor(model: IFetch<ModelType, FetchOptionsType, RestArgs>, items: ModelType[], pageInfo: PageInfo, args: FetchOptionsType, ...rest: RestArgs); | ||
} |
@@ -13,2 +13,11 @@ "use strict"; | ||
}; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { | ||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { | ||
if (ar || !(i in from)) { | ||
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | ||
ar[i] = from[i]; | ||
} | ||
} | ||
return to.concat(ar || Array.prototype.slice.call(from)); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -18,2 +27,6 @@ exports.ResultPage = void 0; | ||
function ResultPage(model, items, pageInfo, args) { | ||
var rest = []; | ||
for (var _i = 4; _i < arguments.length; _i++) { | ||
rest[_i - 4] = arguments[_i]; | ||
} | ||
this.items = items; | ||
@@ -23,3 +36,3 @@ this.pageInfo = pageInfo; | ||
this.nextPage = function () { | ||
return model.fetch(__assign(__assign({}, args), { after: pageInfo.endCursor })); | ||
return model.fetch.apply(model, __spreadArray([__assign(__assign({}, args), { after: pageInfo.endCursor })], rest, false)); | ||
}; | ||
@@ -29,3 +42,3 @@ } | ||
this.previousPage = function () { | ||
return model.fetch(__assign(__assign({}, args), { before: pageInfo.startCursor })); | ||
return model.fetch.apply(model, __spreadArray([__assign(__assign({}, args), { before: pageInfo.startCursor })], rest, false)); | ||
}; | ||
@@ -32,0 +45,0 @@ } |
@@ -7,4 +7,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ScreeningStatus = exports.ScreeningProgress = exports.ScopeType = exports.RiskClassificationStatus = exports.ReviewTriggerPlatform = exports.ReviewTriggerName = exports.RequestPlatform = exports.QuestionnaireType = exports.QuestionnaireTaskStatus = exports.QuestionnaireStatus = exports.QuestionnaireDocumentType = exports.QuestionnaireAnswerDocumentsStatus = exports.PurchaseType = exports.PurchaseState = exports.Platform = exports.PermanentExtensionStatus = exports.PaymentFrequency = exports.OverdraftApplicationStatus = exports.NotificationType = exports.Nationality = exports.MaximumCashTransactionsPercentage = exports.InvoiceStatusType = exports.InvoiceStatus = exports.InternationalCustomers = exports.IntegrationType = exports.IdnowReminderType = exports.IdentificationStatus = exports.GrantType = exports.Gender = exports.FibuFinalCheckTaskType = exports.FibuFinalCheckTaskStatus = exports.DocumentUploadSource = exports.DocumentType = exports.DocumentMatchStatus = exports.DeviceConsentEventType = exports.DeviceActivityType = exports.DeclarationType = exports.CustomerVettingStatus = exports.CompanyType = exports.CategoryCode = exports.CategorizationType = exports.CaseResolution = exports.CardType = exports.CardStatus = exports.CardAction = exports.BatchTransferStatus = exports.BaseOperator = exports.BannerName = exports.ActionReason = exports.AccountState = void 0; | ||
exports.VatRate = exports.VatCategoryCode = exports.UserVatRate = exports.UserReviewStatus = exports.UserDependentType = exports.UserConfirmation = exports.TransferType = exports.TransferStatus = exports.TransactionProjectionType = exports.TransactionFeeType = exports.TransactionFeeStatus = exports.TransactionCategory = exports.ThreeStateAnswer = exports.TaxPaymentFrequency = exports.TaxNumberType = exports.TaxDeclarationType = exports.TaxDeclarationStatus = exports.TaxCaseStatus = exports.Status = exports.StandingOrderReoccurrenceType = exports.SepaTransferStatus = void 0; | ||
exports.RiskClassificationStatus = exports.ReviewTriggerPlatform = exports.ReviewTriggerName = exports.RequestPlatform = exports.QuestionnaireType = exports.QuestionnaireTaskStatus = exports.QuestionnaireStatus = exports.QuestionnaireDocumentType = exports.QuestionnaireAnswerDocumentsStatus = exports.PurchaseType = exports.PurchaseState = exports.Platform = exports.PermanentExtensionStatus = exports.PaymentFrequency = exports.OverdraftApplicationStatus = exports.NotificationType = exports.Nationality = exports.MaximumCashTransactionsPercentage = exports.InvoiceStatusType = exports.InvoiceStatus = exports.InternationalCustomers = exports.IntegrationType = exports.IdnowReminderType = exports.IdentificationStatus = exports.GrantType = exports.Gender = exports.FibuFinalCheckTaskType = exports.FibuFinalCheckTaskStatus = exports.ExitReason = exports.DocumentUploadSource = exports.DocumentType = exports.DocumentMatchStatus = exports.DeviceConsentEventType = exports.DeviceActivityType = exports.DeliveryMethod = exports.DeclarationType = exports.CustomerVettingStatus = exports.CompanyType = exports.CategoryCode = exports.CategorizationType = exports.CaseResolution = exports.CardType = exports.CardStatus = exports.CardAction = exports.BatchTransferStatus = exports.BaseOperator = exports.BannerName = exports.AssetType = exports.ActionReason = exports.AccountState = void 0; | ||
exports.VatRate = exports.VatCategoryCode = exports.UserVatRate = exports.UserReviewStatus = exports.UserDependentType = exports.UserConfirmation = exports.TransferType = exports.TransferStatus = exports.TransactionSource = exports.TransactionProjectionType = exports.TransactionFeeType = exports.TransactionFeeStatus = exports.TransactionCategory = exports.TourStatus = exports.TourName = exports.ThreeStateAnswer = exports.TaxPaymentFrequency = exports.TaxNumberType = exports.TaxDeclarationType = exports.TaxDeclarationStatus = exports.TaxCaseStatus = exports.SubmissionStatus = exports.Status = exports.StandingOrderReoccurrenceType = exports.SepaTransferStatus = exports.ScreeningStatus = exports.ScreeningProgress = exports.ScopeType = exports.Skr = void 0; | ||
var AccountState; | ||
@@ -33,2 +33,10 @@ (function (AccountState) { | ||
})(ActionReason = exports.ActionReason || (exports.ActionReason = {})); | ||
var AssetType; | ||
(function (AssetType) { | ||
AssetType["Immovable"] = "IMMOVABLE"; | ||
AssetType["Intangible"] = "INTANGIBLE"; | ||
AssetType["MovableMotorVehicles"] = "MOVABLE_MOTOR_VEHICLES"; | ||
AssetType["MovableOfficeEquipment"] = "MOVABLE_OFFICE_EQUIPMENT"; | ||
AssetType["MovableOthers"] = "MOVABLE_OTHERS"; | ||
})(AssetType = exports.AssetType || (exports.AssetType = {})); | ||
var BannerName; | ||
@@ -119,5 +127,10 @@ (function (BannerName) { | ||
CategoryCode["Education"] = "EDUCATION"; | ||
CategoryCode["ElectronicServiceEuB2C"] = "ELECTRONIC_SERVICE_EU_B2C"; | ||
CategoryCode["ElectronicServiceEuB2CKu"] = "ELECTRONIC_SERVICE_EU_B2C_KU"; | ||
CategoryCode["Entertainment"] = "ENTERTAINMENT"; | ||
CategoryCode["ExternalFreelancer"] = "EXTERNAL_FREELANCER"; | ||
CategoryCode["Fees"] = "FEES"; | ||
CategoryCode["FreeValueDelivery"] = "FREE_VALUE_DELIVERY"; | ||
CategoryCode["FreeValueDeliveryPv_19"] = "FREE_VALUE_DELIVERY_PV_19"; | ||
CategoryCode["FreeValueService"] = "FREE_VALUE_SERVICE"; | ||
CategoryCode["Gifts"] = "GIFTS"; | ||
@@ -129,2 +142,3 @@ CategoryCode["Goods"] = "GOODS"; | ||
CategoryCode["IncomeIntl"] = "INCOME_INTL"; | ||
CategoryCode["IncomeOnlyVat"] = "INCOME_ONLY_VAT"; | ||
CategoryCode["Insurances"] = "INSURANCES"; | ||
@@ -201,2 +215,7 @@ CategoryCode["InterestsAssets"] = "INTERESTS_ASSETS"; | ||
})(DeclarationType = exports.DeclarationType || (exports.DeclarationType = {})); | ||
var DeliveryMethod; | ||
(function (DeliveryMethod) { | ||
DeliveryMethod["DeviceSigning"] = "DEVICE_SIGNING"; | ||
DeliveryMethod["MobileNumber"] = "MOBILE_NUMBER"; | ||
})(DeliveryMethod = exports.DeliveryMethod || (exports.DeliveryMethod = {})); | ||
var DeviceActivityType; | ||
@@ -238,2 +257,9 @@ (function (DeviceActivityType) { | ||
})(DocumentUploadSource = exports.DocumentUploadSource || (exports.DocumentUploadSource = {})); | ||
var ExitReason; | ||
(function (ExitReason) { | ||
ExitReason["Depreciated"] = "DEPRECIATED"; | ||
ExitReason["Lost"] = "LOST"; | ||
ExitReason["PrivateUse"] = "PRIVATE_USE"; | ||
ExitReason["Sold"] = "SOLD"; | ||
})(ExitReason = exports.ExitReason || (exports.ExitReason = {})); | ||
var FibuFinalCheckTaskStatus; | ||
@@ -246,2 +272,4 @@ (function (FibuFinalCheckTaskStatus) { | ||
(function (FibuFinalCheckTaskType) { | ||
FibuFinalCheckTaskType["SubmitAssets"] = "SUBMIT_ASSETS"; | ||
FibuFinalCheckTaskType["SubmitExternalTransactions"] = "SUBMIT_EXTERNAL_TRANSACTIONS"; | ||
FibuFinalCheckTaskType["TaxReceipts"] = "TAX_RECEIPTS"; | ||
@@ -617,2 +645,4 @@ FibuFinalCheckTaskType["UploadAdvisor"] = "UPLOAD_ADVISOR"; | ||
PurchaseType["BasicInitial"] = "BASIC_INITIAL"; | ||
PurchaseType["BizTax"] = "BIZ_TAX"; | ||
PurchaseType["Bookkeeping"] = "BOOKKEEPING"; | ||
PurchaseType["Card"] = "CARD"; | ||
@@ -639,2 +669,20 @@ PurchaseType["Kontax"] = "KONTAX"; | ||
QuestionnaireDocumentType["EoyCarUsageTraveledKmWithPrivateCar"] = "EOY_CAR_USAGE_TRAVELED_KM_WITH_PRIVATE_CAR"; | ||
QuestionnaireDocumentType["EoyIncomeTaxAdditionalIncomeAddlSelfEmployment"] = "EOY_INCOME_TAX_ADDITIONAL_INCOME_ADDL_SELF_EMPLOYMENT"; | ||
QuestionnaireDocumentType["EoyIncomeTaxAdditionalIncomeCapitalAssetsIntl"] = "EOY_INCOME_TAX_ADDITIONAL_INCOME_CAPITAL_ASSETS_INTL"; | ||
QuestionnaireDocumentType["EoyIncomeTaxAdditionalIncomeCrypto"] = "EOY_INCOME_TAX_ADDITIONAL_INCOME_CRYPTO"; | ||
QuestionnaireDocumentType["EoyIncomeTaxAdditionalIncomeEmployedWork"] = "EOY_INCOME_TAX_ADDITIONAL_INCOME_EMPLOYED_WORK"; | ||
QuestionnaireDocumentType["EoyIncomeTaxAdditionalIncomeEmploymentExpenses"] = "EOY_INCOME_TAX_ADDITIONAL_INCOME_EMPLOYMENT_EXPENSES"; | ||
QuestionnaireDocumentType["EoyIncomeTaxAdditionalIncomeInternationalIncome"] = "EOY_INCOME_TAX_ADDITIONAL_INCOME_INTERNATIONAL_INCOME"; | ||
QuestionnaireDocumentType["EoyIncomeTaxAdditionalIncomeOther"] = "EOY_INCOME_TAX_ADDITIONAL_INCOME_OTHER"; | ||
QuestionnaireDocumentType["EoyIncomeTaxAdditionalIncomePartnerAddlSelfEmployment"] = "EOY_INCOME_TAX_ADDITIONAL_INCOME_PARTNER_ADDL_SELF_EMPLOYMENT"; | ||
QuestionnaireDocumentType["EoyIncomeTaxAdditionalIncomePartnerCapitalAssetsIntl"] = "EOY_INCOME_TAX_ADDITIONAL_INCOME_PARTNER_CAPITAL_ASSETS_INTL"; | ||
QuestionnaireDocumentType["EoyIncomeTaxAdditionalIncomePartnerCrypto"] = "EOY_INCOME_TAX_ADDITIONAL_INCOME_PARTNER_CRYPTO"; | ||
QuestionnaireDocumentType["EoyIncomeTaxAdditionalIncomePartnerEmployedWork"] = "EOY_INCOME_TAX_ADDITIONAL_INCOME_PARTNER_EMPLOYED_WORK"; | ||
QuestionnaireDocumentType["EoyIncomeTaxAdditionalIncomePartnerEmploymentExpenses"] = "EOY_INCOME_TAX_ADDITIONAL_INCOME_PARTNER_EMPLOYMENT_EXPENSES"; | ||
QuestionnaireDocumentType["EoyIncomeTaxAdditionalIncomePartnerInternationalIncome"] = "EOY_INCOME_TAX_ADDITIONAL_INCOME_PARTNER_INTERNATIONAL_INCOME"; | ||
QuestionnaireDocumentType["EoyIncomeTaxAdditionalIncomePartnerOther"] = "EOY_INCOME_TAX_ADDITIONAL_INCOME_PARTNER_OTHER"; | ||
QuestionnaireDocumentType["EoyIncomeTaxAdditionalIncomePartnerPensions"] = "EOY_INCOME_TAX_ADDITIONAL_INCOME_PARTNER_PENSIONS"; | ||
QuestionnaireDocumentType["EoyIncomeTaxAdditionalIncomePartnerSaleOfProperty"] = "EOY_INCOME_TAX_ADDITIONAL_INCOME_PARTNER_SALE_OF_PROPERTY"; | ||
QuestionnaireDocumentType["EoyIncomeTaxAdditionalIncomePensions"] = "EOY_INCOME_TAX_ADDITIONAL_INCOME_PENSIONS"; | ||
QuestionnaireDocumentType["EoyIncomeTaxAdditionalIncomeSaleOfProperty"] = "EOY_INCOME_TAX_ADDITIONAL_INCOME_SALE_OF_PROPERTY"; | ||
QuestionnaireDocumentType["EoyIncomeTaxBasicDataOther"] = "EOY_INCOME_TAX_BASIC_DATA_OTHER"; | ||
@@ -644,2 +692,3 @@ QuestionnaireDocumentType["EoyIncomeTaxBasicDataPartnerOther"] = "EOY_INCOME_TAX_BASIC_DATA_PARTNER_OTHER"; | ||
QuestionnaireDocumentType["EoyIncomeTaxBasicDataProofOfDisability"] = "EOY_INCOME_TAX_BASIC_DATA_PROOF_OF_DISABILITY"; | ||
QuestionnaireDocumentType["EoyIncomeTaxBasicDataRentalAndLease"] = "EOY_INCOME_TAX_BASIC_DATA_RENTAL_AND_LEASE"; | ||
QuestionnaireDocumentType["EoyIncomeTaxChildAdditionalHealthInsurance"] = "EOY_INCOME_TAX_CHILD_ADDITIONAL_HEALTH_INSURANCE"; | ||
@@ -653,2 +702,32 @@ QuestionnaireDocumentType["EoyIncomeTaxChildChildcare"] = "EOY_INCOME_TAX_CHILD_CHILDCARE"; | ||
QuestionnaireDocumentType["EoyIncomeTaxChildUniversityFees"] = "EOY_INCOME_TAX_CHILD_UNIVERSITY_FEES"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesAccidentInsurance"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_ACCIDENT_INSURANCE"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesAliments"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_ALIMENTS"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesDisabilityInsurance"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_DISABILITY_INSURANCE"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesExtraordinaryBurdens"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_EXTRAORDINARY_BURDENS"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesHealthInsurance"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_HEALTH_INSURANCE"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesHouseholdServices"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_HOUSEHOLD_SERVICES"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesLifeInsurance"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_LIFE_INSURANCE"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesOther"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_OTHER"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesPartnerAccidentInsurance"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_PARTNER_ACCIDENT_INSURANCE"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesPartnerAliments"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_PARTNER_ALIMENTS"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesPartnerDisabilityInsurance"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_PARTNER_DISABILITY_INSURANCE"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesPartnerExtraordinaryBurdens"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_PARTNER_EXTRAORDINARY_BURDENS"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesPartnerHealthInsurance"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_PARTNER_HEALTH_INSURANCE"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesPartnerHouseholdServices"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_PARTNER_HOUSEHOLD_SERVICES"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesPartnerLifeInsurance"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_PARTNER_LIFE_INSURANCE"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesPartnerOther"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_PARTNER_OTHER"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesPartnerPensionInsurance"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_PARTNER_PENSION_INSURANCE"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesPartnerPrivateDonations"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_PARTNER_PRIVATE_DONATIONS"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesPartnerReister"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_PARTNER_REISTER"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesPartnerRurup"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_PARTNER_RURUP"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesPartnerUnemploymentInsurance"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_PARTNER_UNEMPLOYMENT_INSURANCE"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesPartnerUniversityFees"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_PARTNER_UNIVERSITY_FEES"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesPartnerVehicleLiability"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_PARTNER_VEHICLE_LIABILITY"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesPensionInsurance"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_PENSION_INSURANCE"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesPrivateDonations"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_PRIVATE_DONATIONS"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesReister"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_REISTER"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesRurup"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_RURUP"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesUnemploymentInsurance"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_UNEMPLOYMENT_INSURANCE"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesUniversityFees"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_UNIVERSITY_FEES"; | ||
QuestionnaireDocumentType["EoyIncomeTaxPrivateExpensesVehicleLiability"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_VEHICLE_LIABILITY"; | ||
QuestionnaireDocumentType["EoyOfficeUsageElectricity"] = "EOY_OFFICE_USAGE_ELECTRICITY"; | ||
@@ -692,3 +771,2 @@ QuestionnaireDocumentType["EoyOfficeUsageFloorPlan"] = "EOY_OFFICE_USAGE_FLOOR_PLAN"; | ||
QuestionnaireType["EoyIncomeTaxPrivateExpensesPartner"] = "EOY_INCOME_TAX_PRIVATE_EXPENSES_PARTNER"; | ||
QuestionnaireType["EoyIncomeTaxRentingLeasing"] = "EOY_INCOME_TAX_RENTING_LEASING"; | ||
QuestionnaireType["EoyOfficeUsage"] = "EOY_OFFICE_USAGE"; | ||
@@ -737,2 +815,7 @@ QuestionnaireType["EoyTravelExpenses"] = "EOY_TRAVEL_EXPENSES"; | ||
})(RiskClassificationStatus = exports.RiskClassificationStatus || (exports.RiskClassificationStatus = {})); | ||
var Skr; | ||
(function (Skr) { | ||
Skr["Skr03"] = "SKR03"; | ||
Skr["Skr04"] = "SKR04"; | ||
})(Skr = exports.Skr || (exports.Skr = {})); | ||
var ScopeType; | ||
@@ -786,2 +869,7 @@ (function (ScopeType) { | ||
})(Status = exports.Status || (exports.Status = {})); | ||
var SubmissionStatus; | ||
(function (SubmissionStatus) { | ||
SubmissionStatus["AlreadySubmitted"] = "ALREADY_SUBMITTED"; | ||
SubmissionStatus["NotNeeded"] = "NOT_NEEDED"; | ||
})(SubmissionStatus = exports.SubmissionStatus || (exports.SubmissionStatus = {})); | ||
var TaxCaseStatus; | ||
@@ -837,2 +925,12 @@ (function (TaxCaseStatus) { | ||
})(ThreeStateAnswer = exports.ThreeStateAnswer || (exports.ThreeStateAnswer = {})); | ||
var TourName; | ||
(function (TourName) { | ||
TourName["BookkeepingOnboarding"] = "BOOKKEEPING_ONBOARDING"; | ||
})(TourName = exports.TourName || (exports.TourName = {})); | ||
var TourStatus; | ||
(function (TourStatus) { | ||
TourStatus["Dismissed"] = "DISMISSED"; | ||
TourStatus["Finished"] = "FINISHED"; | ||
TourStatus["Started"] = "STARTED"; | ||
})(TourStatus = exports.TourStatus || (exports.TourStatus = {})); | ||
var TransactionCategory; | ||
@@ -897,2 +995,3 @@ (function (TransactionCategory) { | ||
TransactionProjectionType["CorrectionCardTransaction"] = "CorrectionCardTransaction"; | ||
TransactionProjectionType["CorrectionNostro"] = "CorrectionNostro"; | ||
TransactionProjectionType["CorrectionSepaCreditTransfer"] = "CorrectionSEPACreditTransfer"; | ||
@@ -907,5 +1006,7 @@ TransactionProjectionType["DebitPresentment"] = "DEBIT_PRESENTMENT"; | ||
TransactionProjectionType["ExternalTransaction"] = "EXTERNAL_TRANSACTION"; | ||
TransactionProjectionType["ExternalTransactionCash"] = "EXTERNAL_TRANSACTION_CASH"; | ||
TransactionProjectionType["ForcePostTransaction"] = "FORCE_POST_TRANSACTION"; | ||
TransactionProjectionType["ForeignPayment"] = "FOREIGN_PAYMENT"; | ||
TransactionProjectionType["InterestAccrued"] = "INTEREST_ACCRUED"; | ||
TransactionProjectionType["InternalTransfer"] = "INTERNAL_TRANSFER"; | ||
TransactionProjectionType["InternationalCreditTransfer"] = "INTERNATIONAL_CREDIT_TRANSFER"; | ||
@@ -931,6 +1032,13 @@ TransactionProjectionType["IntraCustomerTransfer"] = "INTRA_CUSTOMER_TRANSFER"; | ||
TransactionProjectionType["TransferToBankAccount"] = "TRANSFER_TO_BANK_ACCOUNT"; | ||
TransactionProjectionType["Target2CreditTransfer"] = "Target2CreditTransfer"; | ||
TransactionProjectionType["Target2CreditTransfer1"] = "Target2CreditTransfer1"; | ||
TransactionProjectionType["Target2CreditTransfer2"] = "Target2CreditTransfer2"; | ||
TransactionProjectionType["VerificationCode"] = "VERIFICATION_CODE"; | ||
TransactionProjectionType["WireTransferTopup"] = "WIRE_TRANSFER_TOPUP"; | ||
})(TransactionProjectionType = exports.TransactionProjectionType || (exports.TransactionProjectionType = {})); | ||
var TransactionSource; | ||
(function (TransactionSource) { | ||
TransactionSource["BackofficeManual"] = "BACKOFFICE_MANUAL"; | ||
TransactionSource["Solaris"] = "SOLARIS"; | ||
TransactionSource["User"] = "USER"; | ||
})(TransactionSource = exports.TransactionSource || (exports.TransactionSource = {})); | ||
var TransferStatus; | ||
@@ -961,2 +1069,4 @@ (function (TransferStatus) { | ||
UserConfirmation["ManualDocumentsUploaded"] = "MANUAL_DOCUMENTS_UPLOADED"; | ||
UserConfirmation["SubmitAssets"] = "SUBMIT_ASSETS"; | ||
UserConfirmation["SubmitExternalTransactions"] = "SUBMIT_EXTERNAL_TRANSACTIONS"; | ||
UserConfirmation["TaxDeclarationNotNeeded"] = "TAX_DECLARATION_NOT_NEEDED"; | ||
@@ -963,0 +1073,0 @@ UserConfirmation["ToolsDocumentsUploaded"] = "TOOLS_DOCUMENTS_UPLOADED"; |
@@ -41,3 +41,3 @@ "use strict"; | ||
var UPDATE_PLAN = "mutation updatePlan(\n $newPlan: PurchaseType!\n $couponCode: String\n) {\n updateSubscriptionPlan(newPlan: $newPlan, couponCode: $couponCode) {\n newPlan\n previousPlans\n updateActiveAt\n hasCanceledDowngrade\n hasOrderedPhysicalCard\n couponCode\n }\n}"; | ||
var FETCH_PLANS = "query fetchPlans ($couponCode: String) {\n viewer {\n subscriptionPlans (couponCode: $couponCode) {\n couponCode\n couponValidFor\n plans {\n type\n title\n description\n subtitle\n button\n featuresToggleLabel\n featureGroups {\n title\n features {\n title\n }\n }\n fee {\n amount\n discountAmount\n fullAmount\n discountPercentage\n }\n }\n }\n }\n}"; | ||
var FETCH_PLANS = "query fetchPlans ($couponCode: String) {\n viewer {\n subscriptionPlans (couponCode: $couponCode) {\n couponCode\n couponValidFor\n plans {\n type\n subtitle\n fee {\n amount\n discountAmount\n fullAmount\n discountPercentage\n }\n }\n }\n }\n}"; | ||
var FETCH_PURCHASES = "query fetchUserPlans {\n viewer {\n subscriptions {\n type\n state\n }\n }\n}"; | ||
@@ -44,0 +44,0 @@ var SUBSCRIBE_TO_PLAN = "mutation SubscribeToPlan($type: PurchaseType!, $couponCode: String) {\n subscribeToPlan(type: $type, couponCode: $couponCode) {\n type,\n state\n }\n}"; |
@@ -5,7 +5,8 @@ import { IterableModel } from "./iterableModel"; | ||
import { FetchOptions, Subscription, SearchFilter } from "./types"; | ||
export declare const TRANSACTION_FIELDS = "\n id\n amount\n name\n iban\n type\n bookingDate\n valutaDate\n paymentMethod\n category\n categoryCode\n vatCategoryCode\n vatRate\n categorizationType\n userSelectedBookingDate\n purpose\n personalNote\n originalAmount\n foreignCurrency\n createdAt\n splits {\n id\n amount\n category\n categoryCode\n userSelectedBookingDate\n categorizationType\n vatCategoryCode\n }\n recurlyInvoiceNumber\n canBeRecategorized\n"; | ||
export declare const NEW_TRANSACTION_SUBSCRIPTION: string; | ||
export declare const getUpdateTransactionMutation: (fields: string) => string; | ||
export declare const CREATE_SPLIT_TRANSACTION: string; | ||
export declare const DELETE_SPLIT_TRANSACTION: string; | ||
export declare const UPDATE_SPLIT_TRANSACTION: string; | ||
export declare const getCreateSplitTransactionMutation: (fields?: string) => string; | ||
export declare const getDeleteSplitTransactionMutation: (fields?: string) => string; | ||
export declare const getUpdateSplitTransactionMutation: (fields?: string) => string; | ||
export declare const CREATE_TRANSACTION_ASSET = "mutation createTransactionAsset(\n $transactionId: ID!\n $name: String!\n $filetype: String!\n $assetableType: String\n $uploadPlatform: RequestPlatform\n) {\n createTransactionAsset(\n transactionId: $transactionId\n name: $name\n filetype: $filetype\n assetableType: $assetableType\n uploadPlatform: $uploadPlatform\n ) {\n assetId\n url\n formData {\n key\n value\n }\n }\n}"; | ||
@@ -55,3 +56,3 @@ export declare const FINALIZE_TRANSACTION_ASSET: string; | ||
*/ | ||
fetchOne(args: AccountTransactionArgs, fields?: string): Promise<import("./schema").Maybe<TransactionModel> | undefined>; | ||
fetchOne(args: AccountTransactionArgs, fields?: string): Promise<import("./schema").Maybe<import("./schema").RawTransactionProjection> | undefined>; | ||
subscribe(onNext: (event: TransactionModel) => any, onError?: (error: Error) => any): Subscription; | ||
@@ -70,5 +71,6 @@ /** | ||
* @param args transaction ID and split data | ||
* @param fields optional custom transaction fields | ||
* @returns the transaction with created split data | ||
*/ | ||
createSplit(args: MutationCreateTransactionSplitsArgs): Promise<TransactionModel>; | ||
createSplit(args: MutationCreateTransactionSplitsArgs, fields?: string): Promise<import("./schema").RawTransactionProjection>; | ||
/** | ||
@@ -78,5 +80,6 @@ * Removes transaction splits | ||
* @param args transaction ID | ||
* @param fields optional custom transaction fields | ||
* @returns the transaction with emptied split data | ||
*/ | ||
deleteSplit(args: MutationDeleteTransactionSplitsArgs): Promise<TransactionModel>; | ||
deleteSplit(args: MutationDeleteTransactionSplitsArgs, fields?: string): Promise<import("./schema").RawTransactionProjection>; | ||
/** | ||
@@ -86,5 +89,6 @@ * Updates transaction splits | ||
* @param args transaction ID and split data including the splits' IDs | ||
* @param fields optional custom transaction fields | ||
* @returns the transaction with updated split data | ||
*/ | ||
updateSplit(args: MutationUpdateTransactionSplitsArgs): Promise<TransactionModel>; | ||
updateSplit(args: MutationUpdateTransactionSplitsArgs, fields?: string): Promise<import("./schema").RawTransactionProjection>; | ||
/** | ||
@@ -91,0 +95,0 @@ * Creates upload parameters for uploading a TransactionAsset file |
@@ -74,3 +74,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Transaction = exports.DELETE_TRANSACTION_ASSET = exports.FINALIZE_TRANSACTION_ASSET = exports.CREATE_TRANSACTION_ASSET = exports.UPDATE_SPLIT_TRANSACTION = exports.DELETE_SPLIT_TRANSACTION = exports.CREATE_SPLIT_TRANSACTION = exports.getUpdateTransactionMutation = exports.NEW_TRANSACTION_SUBSCRIPTION = void 0; | ||
exports.Transaction = exports.DELETE_TRANSACTION_ASSET = exports.FINALIZE_TRANSACTION_ASSET = exports.CREATE_TRANSACTION_ASSET = exports.getUpdateSplitTransactionMutation = exports.getDeleteSplitTransactionMutation = exports.getCreateSplitTransactionMutation = exports.getUpdateTransactionMutation = exports.NEW_TRANSACTION_SUBSCRIPTION = exports.TRANSACTION_FIELDS = void 0; | ||
var iterableModel_1 = require("./iterableModel"); | ||
@@ -83,12 +83,25 @@ var resultPage_1 = require("./resultPage"); | ||
var ASSET_FIELDS = "\n id\n name\n filetype\n thumbnail\n fullsize\n"; | ||
var TRANSACTION_FIELDS = "\n id\n amount\n name\n iban\n type\n bookingDate\n valutaDate\n paymentMethod\n category\n categoryCode\n categorizationType\n userSelectedBookingDate\n purpose\n personalNote\n originalAmount\n foreignCurrency\n createdAt\n splits {\n id\n amount\n category\n userSelectedBookingDate\n categorizationType\n }\n recurlyInvoiceNumber\n canBeRecategorized\n"; | ||
exports.TRANSACTION_FIELDS = "\n id\n amount\n name\n iban\n type\n bookingDate\n valutaDate\n paymentMethod\n category\n categoryCode\n vatCategoryCode\n vatRate\n categorizationType\n userSelectedBookingDate\n purpose\n personalNote\n originalAmount\n foreignCurrency\n createdAt\n splits {\n id\n amount\n category\n categoryCode\n userSelectedBookingDate\n categorizationType\n vatCategoryCode\n }\n recurlyInvoiceNumber\n canBeRecategorized\n"; | ||
var TRANSACTION_DETAILS = "\n assets {\n ".concat(ASSET_FIELDS, "\n }\n documentNumber\n documentPreviewUrl\n documentDownloadUrl\n documentType\n e2eId\n mandateNumber\n"); | ||
var getFetchTransactionsQuery = function (fields) { return "\n query fetchTransactions ($first: Int, $last: Int, $after: String, $before: String, $filter: TransactionFilter, $preset: FilterPresetInput) {\n viewer {\n mainAccount {\n transactions(first: $first, last: $last, after: $after, before: $before, filter: $filter, preset: $preset) {\n edges {\n node {\n ".concat(fields, "\n }\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n }\n }\n }\n"); }; | ||
var getFetchTransactionQuery = function (fields) { return "\n query fetchTransaction ($id: ID!) {\n viewer {\n mainAccount {\n transaction(id: $id) {\n ".concat(fields, "\n }\n }\n }\n }\n"); }; | ||
exports.NEW_TRANSACTION_SUBSCRIPTION = "subscription {\n newTransaction {\n ".concat(TRANSACTION_FIELDS, "\n ").concat(TRANSACTION_DETAILS, "\n }\n}"); | ||
var getUpdateTransactionMutation = function (fields) { return "mutation updateTransaction(\n $id: String!\n $category: TransactionCategory,\n $userSelectedBookingDate: DateTime,\n $personalNote: String,\n) {\n updateTransaction(\n id: $id\n category: $category\n userSelectedBookingDate: $userSelectedBookingDate\n personalNote: $personalNote\n ) {\n ".concat(fields, "\n }\n}"); }; | ||
exports.NEW_TRANSACTION_SUBSCRIPTION = "subscription {\n newTransaction {\n ".concat(exports.TRANSACTION_FIELDS, "\n ").concat(TRANSACTION_DETAILS, "\n }\n}"); | ||
var getUpdateTransactionMutation = function (fields) { return "mutation updateTransaction(\n $id: String!\n $category: TransactionCategory,\n $userSelectedBookingDate: DateTime,\n $personalNote: String,\n $vatRate: VatRate,\n $categoryCode: String,\n $vatCategoryCode: String,\n $splits: [TransactionSplitInput!],\n) {\n updateTransaction(\n id: $id\n category: $category\n userSelectedBookingDate: $userSelectedBookingDate\n personalNote: $personalNote\n vatRate: $vatRate\n categoryCode: $categoryCode\n vatCategoryCode: $vatCategoryCode\n splits: $splits\n ) {\n ".concat(fields, "\n }\n}"); }; | ||
exports.getUpdateTransactionMutation = getUpdateTransactionMutation; | ||
exports.CREATE_SPLIT_TRANSACTION = "mutation createTransactionSplits(\n $transactionId: ID!\n $splits: [CreateTransactionSplitsInput!]!\n) {\n createTransactionSplits(\n transactionId: $transactionId\n splits: $splits\n ) {\n ".concat(TRANSACTION_FIELDS, "\n ").concat(TRANSACTION_DETAILS, "\n }\n}"); | ||
exports.DELETE_SPLIT_TRANSACTION = "mutation deleteTransactionSplits(\n $transactionId: ID!\n) {\n deleteTransactionSplits(\n transactionId: $transactionId\n ) {\n ".concat(TRANSACTION_FIELDS, "\n ").concat(TRANSACTION_DETAILS, "\n }\n}"); | ||
exports.UPDATE_SPLIT_TRANSACTION = "mutation updateTransactionSplits(\n $transactionId: ID!\n $splits: [UpdateTransactionSplitsInput!]!\n) {\n updateTransactionSplits(\n transactionId: $transactionId\n splits: $splits\n ) {\n ".concat(TRANSACTION_FIELDS, "\n ").concat(TRANSACTION_DETAILS, "\n }\n}"); | ||
var DEFAULT_SPLIT_TRANSACTION_FIELDS = "\n".concat(exports.TRANSACTION_FIELDS, "\n").concat(TRANSACTION_DETAILS, "\n"); | ||
var getCreateSplitTransactionMutation = function (fields) { | ||
if (fields === void 0) { fields = DEFAULT_SPLIT_TRANSACTION_FIELDS; } | ||
return "mutation createTransactionSplits(\n $transactionId: ID!\n $splits: [CreateTransactionSplitsInput!]!\n) {\n createTransactionSplits(\n transactionId: $transactionId\n splits: $splits\n ) {\n ".concat(fields, "\n }\n}"); | ||
}; | ||
exports.getCreateSplitTransactionMutation = getCreateSplitTransactionMutation; | ||
var getDeleteSplitTransactionMutation = function (fields) { | ||
if (fields === void 0) { fields = DEFAULT_SPLIT_TRANSACTION_FIELDS; } | ||
return "mutation deleteTransactionSplits(\n $transactionId: ID!\n) {\n deleteTransactionSplits(\n transactionId: $transactionId\n ) {\n ".concat(fields, "\n }\n}"); | ||
}; | ||
exports.getDeleteSplitTransactionMutation = getDeleteSplitTransactionMutation; | ||
var getUpdateSplitTransactionMutation = function (fields) { | ||
if (fields === void 0) { fields = DEFAULT_SPLIT_TRANSACTION_FIELDS; } | ||
return "mutation updateTransactionSplits(\n $transactionId: ID!\n $splits: [UpdateTransactionSplitsInput!]!\n) {\n updateTransactionSplits(\n transactionId: $transactionId\n splits: $splits\n ) {\n ".concat(fields, "\n }\n}"); | ||
}; | ||
exports.getUpdateSplitTransactionMutation = getUpdateSplitTransactionMutation; | ||
exports.CREATE_TRANSACTION_ASSET = "mutation createTransactionAsset(\n $transactionId: ID!\n $name: String!\n $filetype: String!\n $assetableType: String\n $uploadPlatform: RequestPlatform\n) {\n createTransactionAsset(\n transactionId: $transactionId\n name: $name\n filetype: $filetype\n assetableType: $assetableType\n uploadPlatform: $uploadPlatform\n ) {\n assetId\n url\n formData {\n key\n value\n }\n }\n}"; | ||
@@ -114,3 +127,3 @@ exports.FINALIZE_TRANSACTION_ASSET = "mutation finalizeTransactionAssetUpload(\n $assetId: ID!\n) {\n finalizeTransactionAssetUpload(\n assetId: $assetId\n ) {\n ".concat(ASSET_FIELDS, "\n }\n}"); | ||
var _a, _b, _c, _d, _e, _f, _g, _h; | ||
if (fields === void 0) { fields = TRANSACTION_FIELDS; } | ||
if (fields === void 0) { fields = exports.TRANSACTION_FIELDS; } | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -128,3 +141,3 @@ var result, transactions, pageInfo; | ||
}; | ||
return [2 /*return*/, new resultPage_1.ResultPage(this, transactions, pageInfo, args)]; | ||
return [2 /*return*/, new resultPage_1.ResultPage(this, transactions, pageInfo, args, fields)]; | ||
} | ||
@@ -170,3 +183,3 @@ }); | ||
var _a, _b; | ||
if (fields === void 0) { fields = "".concat(TRANSACTION_FIELDS, "\n ").concat(TRANSACTION_DETAILS); } | ||
if (fields === void 0) { fields = "".concat(exports.TRANSACTION_FIELDS, "\n ").concat(TRANSACTION_DETAILS); } | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -200,3 +213,3 @@ var result; | ||
Transaction.prototype.update = function (args, fields) { | ||
if (fields === void 0) { fields = "".concat(TRANSACTION_FIELDS, "\n ").concat(TRANSACTION_DETAILS); } | ||
if (fields === void 0) { fields = "".concat(exports.TRANSACTION_FIELDS, "\n ").concat(TRANSACTION_DETAILS); } | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -218,5 +231,6 @@ var result; | ||
* @param args transaction ID and split data | ||
* @param fields optional custom transaction fields | ||
* @returns the transaction with created split data | ||
*/ | ||
Transaction.prototype.createSplit = function (args) { | ||
Transaction.prototype.createSplit = function (args, fields) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -226,3 +240,3 @@ var result; | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, this.client.rawQuery(exports.CREATE_SPLIT_TRANSACTION, args)]; | ||
case 0: return [4 /*yield*/, this.client.rawQuery((0, exports.getCreateSplitTransactionMutation)(fields), args)]; | ||
case 1: | ||
@@ -239,5 +253,6 @@ result = _a.sent(); | ||
* @param args transaction ID | ||
* @param fields optional custom transaction fields | ||
* @returns the transaction with emptied split data | ||
*/ | ||
Transaction.prototype.deleteSplit = function (args) { | ||
Transaction.prototype.deleteSplit = function (args, fields) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -247,3 +262,3 @@ var result; | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, this.client.rawQuery(exports.DELETE_SPLIT_TRANSACTION, args)]; | ||
case 0: return [4 /*yield*/, this.client.rawQuery((0, exports.getDeleteSplitTransactionMutation)(fields), args)]; | ||
case 1: | ||
@@ -260,5 +275,6 @@ result = _a.sent(); | ||
* @param args transaction ID and split data including the splits' IDs | ||
* @param fields optional custom transaction fields | ||
* @returns the transaction with updated split data | ||
*/ | ||
Transaction.prototype.updateSplit = function (args) { | ||
Transaction.prototype.updateSplit = function (args, fields) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -268,3 +284,3 @@ var result; | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, this.client.rawQuery(exports.UPDATE_SPLIT_TRANSACTION, args)]; | ||
case 0: return [4 /*yield*/, this.client.rawQuery((0, exports.getUpdateSplitTransactionMutation)(fields), args)]; | ||
case 1: | ||
@@ -271,0 +287,0 @@ result = _a.sent(); |
import { IterableModel } from "./iterableModel"; | ||
import { ResultPage } from "./resultPage"; | ||
import { AccountTransfersArgs, BatchTransfer, ConfirmationRequestOrTransfer, CreateTransferInput, Transfer as TransferModel, TransferSuggestion, TransferType, UnfinishedTransfer, UpdateTransferInput } from "./schema"; | ||
import { AccountTransfersArgs, BatchTransfer, ConfirmationRequest, ConfirmationRequestOrTransfer, CreateTransferInput, MutationCancelTransferArgs, MutationConfirmCancelTransferArgs, MutationCreateTransferArgs, MutationUpdateTransferArgs, Transfer as TransferModel, TransferSuggestion, UnfinishedTransfer } from "./schema"; | ||
export declare class Transfer extends IterableModel<TransferModel, AccountTransfersArgs> { | ||
@@ -9,5 +9,7 @@ /** | ||
* @param transfer transfer data including at least recipient, IBAN and amount | ||
* @returns confirmation id used to confirm the transfer | ||
* @param deviceId device id used for device signing authorization | ||
* @param deliveryMethod delivery method used for device signing / mobile number authorization | ||
* @returns confirmation id and optional string to sign used to confirm the transfer | ||
*/ | ||
createOne(transfer: CreateTransferInput): Promise<string>; | ||
createOne({ transfer, deviceId, deliveryMethod, }: MutationCreateTransferArgs): Promise<ConfirmationRequest>; | ||
/** | ||
@@ -18,5 +20,12 @@ * Creates single wire transfer / timed order / standing order | ||
* @param authorizationToken sms token | ||
* @param signature signature of string to sign obtained as a result of `transfer.createOne` call | ||
* @param deviceId device id used for device signing authorization | ||
* @returns confirmed wire transfer | ||
*/ | ||
confirmOne(confirmationId: string, authorizationToken: string): Promise<TransferModel>; | ||
confirmOne({ confirmationId, authorizationToken, signature, deviceId, }: { | ||
confirmationId: string; | ||
authorizationToken?: string; | ||
signature?: string; | ||
deviceId?: string; | ||
}): Promise<TransferModel>; | ||
/** | ||
@@ -42,5 +51,7 @@ * Creates multiple wire transfers which can be later confirmed with single `authorizationToken` | ||
* @param id transfer id | ||
* @param deliveryMethod delivery method used for device signing / mobile number authorization | ||
* @param deviceId device id used for device signing authorization | ||
* @returns confirmation id used to confirm the cancellation or transfer if confirmation is not needed | ||
*/ | ||
cancelTransfer(type: TransferType, id: string): Promise<ConfirmationRequestOrTransfer>; | ||
cancelTransfer({ type, id, deliveryMethod, deviceId, }: MutationCancelTransferArgs): Promise<ConfirmationRequestOrTransfer>; | ||
/** | ||
@@ -52,5 +63,7 @@ * Confirm transfer cancellation | ||
* @param authorizationToken sms token | ||
* @param signature signature of string to sign obtained as a result of `transfer.cancelTransfer` call | ||
* @param deviceId device id used for device signing authorization | ||
* @returns canceled transfer | ||
*/ | ||
confirmCancelTransfer(type: TransferType, confirmationId: string, authorizationToken: string): Promise<TransferModel>; | ||
confirmCancelTransfer({ type, confirmationId, authorizationToken, signature, deviceId, }: MutationConfirmCancelTransferArgs): Promise<TransferModel>; | ||
/** | ||
@@ -60,5 +73,7 @@ * Update a standing order | ||
* @param transfer transfer data including at least id and type. For Timed Orders and Sepa Transfers, only category and userSelectedBooking date can be updated | ||
* @param deviceId device id used for device signing authorization | ||
* @param deliveryMethod delivery method used for device signing / mobile number authorization | ||
* @returns confirmation id used to confirm the update of Standing order or Transfer for Sepa Transfer / Timed Order | ||
*/ | ||
update(transfer: UpdateTransferInput): Promise<ConfirmationRequestOrTransfer>; | ||
update({ transfer, deliveryMethod, deviceId, }: MutationUpdateTransferArgs): Promise<ConfirmationRequestOrTransfer>; | ||
/** | ||
@@ -65,0 +80,0 @@ * Fetches first 50 transfers of provided type which match the query |
@@ -58,12 +58,12 @@ "use strict"; | ||
var TRANSFER_FIELDS = "\n id\n recipient\n iban\n amount\n status\n executeAt\n lastExecutionDate\n purpose\n e2eId\n reoccurrence\n nextOccurrence\n category\n userSelectedBookingDate\n personalNote\n"; | ||
var CREATE_TRANSFER = "mutation createTransfer($transfer: CreateTransferInput!) {\n createTransfer(transfer: $transfer) {\n confirmationId\n }\n}"; | ||
var CONFIRM_TRANSFER = "mutation confirmTransfer(\n $confirmationId: String!\n $authorizationToken: String!\n) {\n confirmTransfer(\n confirmationId: $confirmationId\n authorizationToken: $authorizationToken\n ) {\n ".concat(TRANSFER_FIELDS, "\n }\n}"); | ||
var CREATE_TRANSFER = "mutation createTransfer(\n $transfer: CreateTransferInput!\n $deviceId: String\n $deliveryMethod: DeliveryMethod\n) {\n createTransfer(\n transfer: $transfer\n deviceId: $deviceId\n deliveryMethod: $deliveryMethod\n ) {\n confirmationId\n stringToSign\n }\n}"; | ||
var CONFIRM_TRANSFER = "mutation confirmTransfer(\n $confirmationId: String!\n $authorizationToken: String\n $signature: String\n $deviceId: String\n) {\n confirmTransfer(\n confirmationId: $confirmationId\n authorizationToken: $authorizationToken\n signature: $signature\n deviceId: $deviceId\n ) {\n ".concat(TRANSFER_FIELDS, "\n }\n}"); | ||
var CREATE_TRANSFERS = "mutation createTransfers(\n $transfers: [CreateSepaTransferInput!]!\n) {\n createTransfers(transfers: $transfers) {\n confirmationId\n }\n}"; | ||
var CONFIRM_TRANSFERS = "mutation confirmTransfers(\n $confirmationId: String!\n $authorizationToken: String!\n) {\n confirmTransfers(\n confirmationId: $confirmationId\n authorizationToken: $authorizationToken\n ) {\n id\n status\n transfers {\n id\n status\n recipient\n iban\n purpose\n amount\n e2eId\n }\n }\n}"; | ||
var CANCEL_TRANSFER = "mutation cancelTransfer($type: TransferType!, $id: String!) {\n cancelTransfer(type: $type, id: $id) {\n ... on ConfirmationRequest {\n confirmationId\n }\n\n ... on Transfer {\n ".concat(TRANSFER_FIELDS, "\n }\n }\n}"); | ||
var CONFIRM_CANCEL_TRANSFER = "mutation confirmCancelTransfer(\n $type: TransferType!\n $confirmationId: String!\n $authorizationToken: String!\n) {\n confirmCancelTransfer(\n type: $type\n confirmationId: $confirmationId\n authorizationToken: $authorizationToken\n ) {\n ".concat(TRANSFER_FIELDS, "\n }\n}"); | ||
var CANCEL_TRANSFER = "mutation cancelTransfer(\n $type: TransferType!,\n $id: String!,\n $deviceId: String,\n $deliveryMethod: DeliveryMethod\n) {\n cancelTransfer(\n type: $type,\n id: $id,\n deviceId: $deviceId,\n deliveryMethod: $deliveryMethod\n ) {\n ... on ConfirmationRequest {\n confirmationId\n stringToSign\n }\n\n ... on Transfer {\n ".concat(TRANSFER_FIELDS, "\n }\n }\n}"); | ||
var CONFIRM_CANCEL_TRANSFER = "mutation confirmCancelTransfer(\n $type: TransferType!\n $confirmationId: String!\n $authorizationToken: String\n $deviceId: String\n $signature: String\n) {\n confirmCancelTransfer(\n type: $type\n confirmationId: $confirmationId\n authorizationToken: $authorizationToken\n deviceId: $deviceId\n signature: $signature\n ) {\n ".concat(TRANSFER_FIELDS, "\n }\n}"); | ||
var FETCH_TRANSFERS = "\n query fetchTransfers(\n $type: TransferType!,\n $where: TransfersConnectionFilter,\n $first: Int,\n $last: Int,\n $after: String,\n $before: String\n ) {\n viewer {\n mainAccount {\n transfers(\n type: $type,\n where: $where,\n first: $first,\n last: $last,\n after: $after,\n before: $before\n ) {\n edges {\n node {\n ".concat(TRANSFER_FIELDS, "\n }\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n }\n }\n }\n"); | ||
var GET_TRANSFER_SUGGESTIONS = "\n query getTransferSuggestions {\n viewer {\n mainAccount {\n transferSuggestions {\n iban\n name\n }\n }\n }\n }\n"; | ||
var GET_UNFINISHED_TRANSFERS = "\n query getUnfinishedTransfers {\n viewer {\n unfinishedTransfers {\n amount\n recipient\n iban\n purpose\n }\n }\n }\n"; | ||
var UPDATE_TRANSFER = "mutation updateTransfer($transfer: UpdateTransferInput!) {\n updateTransfer(transfer: $transfer) {\n ... on ConfirmationRequest {\n confirmationId\n }\n\n ... on Transfer {\n ".concat(TRANSFER_FIELDS, "\n }\n }\n}"); | ||
var UPDATE_TRANSFER = "mutation updateTransfer(\n $transfer: UpdateTransferInput!\n $deviceId: String\n $deliveryMethod: DeliveryMethod\n) {\n updateTransfer(\n transfer: $transfer\n deviceId: $deviceId\n deliveryMethod: $deliveryMethod\n ) {\n ... on ConfirmationRequest {\n confirmationId\n stringToSign\n }\n\n ... on Transfer {\n ".concat(TRANSFER_FIELDS, "\n }\n }\n}"); | ||
var Transfer = /** @class */ (function (_super) { | ||
@@ -78,13 +78,20 @@ __extends(Transfer, _super); | ||
* @param transfer transfer data including at least recipient, IBAN and amount | ||
* @returns confirmation id used to confirm the transfer | ||
* @param deviceId device id used for device signing authorization | ||
* @param deliveryMethod delivery method used for device signing / mobile number authorization | ||
* @returns confirmation id and optional string to sign used to confirm the transfer | ||
*/ | ||
Transfer.prototype.createOne = function (transfer) { | ||
Transfer.prototype.createOne = function (_a) { | ||
var transfer = _a.transfer, deviceId = _a.deviceId, deliveryMethod = _a.deliveryMethod; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var result; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, this.client.rawQuery(CREATE_TRANSFER, { transfer: transfer })]; | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: return [4 /*yield*/, this.client.rawQuery(CREATE_TRANSFER, { | ||
transfer: transfer, | ||
deviceId: deviceId, | ||
deliveryMethod: deliveryMethod, | ||
})]; | ||
case 1: | ||
result = _a.sent(); | ||
return [2 /*return*/, result.createTransfer.confirmationId]; | ||
result = _b.sent(); | ||
return [2 /*return*/, result.createTransfer]; | ||
} | ||
@@ -99,15 +106,20 @@ }); | ||
* @param authorizationToken sms token | ||
* @param signature signature of string to sign obtained as a result of `transfer.createOne` call | ||
* @param deviceId device id used for device signing authorization | ||
* @returns confirmed wire transfer | ||
*/ | ||
Transfer.prototype.confirmOne = function (confirmationId, authorizationToken) { | ||
Transfer.prototype.confirmOne = function (_a) { | ||
var confirmationId = _a.confirmationId, authorizationToken = _a.authorizationToken, signature = _a.signature, deviceId = _a.deviceId; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var result; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: return [4 /*yield*/, this.client.rawQuery(CONFIRM_TRANSFER, { | ||
authorizationToken: authorizationToken, | ||
confirmationId: confirmationId, | ||
signature: signature, | ||
deviceId: deviceId, | ||
})]; | ||
case 1: | ||
result = _a.sent(); | ||
result = _b.sent(); | ||
return [2 /*return*/, result.confirmTransfer]; | ||
@@ -165,12 +177,20 @@ } | ||
* @param id transfer id | ||
* @param deliveryMethod delivery method used for device signing / mobile number authorization | ||
* @param deviceId device id used for device signing authorization | ||
* @returns confirmation id used to confirm the cancellation or transfer if confirmation is not needed | ||
*/ | ||
Transfer.prototype.cancelTransfer = function (type, id) { | ||
Transfer.prototype.cancelTransfer = function (_a) { | ||
var type = _a.type, id = _a.id, deliveryMethod = _a.deliveryMethod, deviceId = _a.deviceId; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var result; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, this.client.rawQuery(CANCEL_TRANSFER, { type: type, id: id })]; | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: return [4 /*yield*/, this.client.rawQuery(CANCEL_TRANSFER, { | ||
type: type, | ||
id: id, | ||
deliveryMethod: deliveryMethod, | ||
deviceId: deviceId, | ||
})]; | ||
case 1: | ||
result = _a.sent(); | ||
result = _b.sent(); | ||
return [2 /*return*/, result.cancelTransfer]; | ||
@@ -187,9 +207,12 @@ } | ||
* @param authorizationToken sms token | ||
* @param signature signature of string to sign obtained as a result of `transfer.cancelTransfer` call | ||
* @param deviceId device id used for device signing authorization | ||
* @returns canceled transfer | ||
*/ | ||
Transfer.prototype.confirmCancelTransfer = function (type, confirmationId, authorizationToken) { | ||
Transfer.prototype.confirmCancelTransfer = function (_a) { | ||
var type = _a.type, confirmationId = _a.confirmationId, authorizationToken = _a.authorizationToken, signature = _a.signature, deviceId = _a.deviceId; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var result; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: return [4 /*yield*/, this.client.rawQuery(CONFIRM_CANCEL_TRANSFER, { | ||
@@ -199,5 +222,7 @@ authorizationToken: authorizationToken, | ||
type: type, | ||
deviceId: deviceId, | ||
signature: signature, | ||
})]; | ||
case 1: | ||
result = _a.sent(); | ||
result = _b.sent(); | ||
return [2 /*return*/, result.confirmCancelTransfer]; | ||
@@ -212,12 +237,19 @@ } | ||
* @param transfer transfer data including at least id and type. For Timed Orders and Sepa Transfers, only category and userSelectedBooking date can be updated | ||
* @param deviceId device id used for device signing authorization | ||
* @param deliveryMethod delivery method used for device signing / mobile number authorization | ||
* @returns confirmation id used to confirm the update of Standing order or Transfer for Sepa Transfer / Timed Order | ||
*/ | ||
Transfer.prototype.update = function (transfer) { | ||
Transfer.prototype.update = function (_a) { | ||
var transfer = _a.transfer, deliveryMethod = _a.deliveryMethod, deviceId = _a.deviceId; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var result; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, this.client.rawQuery(UPDATE_TRANSFER, { transfer: transfer })]; | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: return [4 /*yield*/, this.client.rawQuery(UPDATE_TRANSFER, { | ||
transfer: transfer, | ||
deliveryMethod: deliveryMethod, | ||
deviceId: deviceId, | ||
})]; | ||
case 1: | ||
result = _a.sent(); | ||
result = _b.sent(); | ||
return [2 /*return*/, result.updateTransfer]; | ||
@@ -224,0 +256,0 @@ } |
{ | ||
"name": "kontist", | ||
"version": "0.50.1", | ||
"version": "0.50.3", | ||
"description": "Kontist client SDK", | ||
@@ -29,2 +29,5 @@ "main": "dist/lib/index.js", | ||
}, | ||
"overrides": { | ||
"tough-cookie": "4.1.3" | ||
}, | ||
"devDependencies": { | ||
@@ -31,0 +34,0 @@ "@graphql-codegen/add": "^3.1.1", |
@@ -21,5 +21,2 @@ import { expect } from "chai"; | ||
pinSet: false, | ||
settings: { | ||
contactlessEnabled: true, | ||
}, | ||
googlePayTokens: [], | ||
@@ -421,3 +418,2 @@ addedToApplePay: true, | ||
const updatedCardSettings = { | ||
contactlessEnabled: false, | ||
...cardLimitsData, | ||
@@ -424,0 +420,0 @@ }; |
@@ -1,6 +0,6 @@ | ||
import {expect} from "chai"; | ||
import { expect } from "chai"; | ||
import * as sinon from "sinon"; | ||
import {Client} from "../../lib"; | ||
import {Declaration} from "../../lib/graphql/declaration"; | ||
import { Client } from "../../lib"; | ||
import { Declaration } from "../../lib/graphql/declaration"; | ||
import { | ||
@@ -12,2 +12,3 @@ Declaration as DeclarationModel, | ||
CategorizeTransactionForDeclarationResponse, | ||
SubmissionStatus, | ||
} from "../../lib/graphql/schema"; | ||
@@ -52,2 +53,3 @@ | ||
uploadedAt: "2021-07-01", | ||
submissionStatus: SubmissionStatus.AlreadySubmitted, | ||
}, | ||
@@ -54,0 +56,0 @@ ]; |
@@ -11,2 +11,3 @@ import { expect } from "chai"; | ||
TransactionProjectionType, | ||
TransactionSource, | ||
} from "../../lib/graphql/schema"; | ||
@@ -66,5 +67,6 @@ | ||
splits: [], | ||
personalNote: "Some note", | ||
source: TransactionSource.Solaris, | ||
hasAssets: false, | ||
transactionAssets: [], | ||
personalNote: "Some note", | ||
source: "SOLARIS", | ||
}, | ||
@@ -71,0 +73,0 @@ ], |
@@ -43,16 +43,3 @@ import { expect } from "chai"; | ||
type: "BASIC", | ||
title: "Free", | ||
description: "All-round business banking with virtual card", | ||
subtitle: "/ month plus VAT for the first year, then much more expensive", | ||
button: "Open Free", | ||
featuresToggleLabel: "All Kontist Free features", | ||
featureGroups: [ | ||
{ | ||
title: null, | ||
features: [ | ||
{ title: "Unlimited SEPA transfers" }, | ||
{ title: "Virtual Card" }, | ||
], | ||
}, | ||
], | ||
fee: { | ||
@@ -59,0 +46,0 @@ amount: 0, |
import { expect } from "chai"; | ||
import * as sinon from "sinon"; | ||
import { Client } from "../../lib"; | ||
import { Transaction, TransactionCategory, BaseOperator, RequestPlatform } from "../../lib/graphql/schema"; | ||
import { | ||
Transaction, | ||
TransactionCategory, | ||
BaseOperator, | ||
RequestPlatform, | ||
VatRate, | ||
} from "../../lib/graphql/schema"; | ||
import { | ||
NEW_TRANSACTION_SUBSCRIPTION, | ||
CREATE_SPLIT_TRANSACTION, | ||
DELETE_SPLIT_TRANSACTION, | ||
UPDATE_SPLIT_TRANSACTION, | ||
getCreateSplitTransactionMutation, | ||
getDeleteSplitTransactionMutation, | ||
getUpdateSplitTransactionMutation, | ||
CREATE_TRANSACTION_ASSET, | ||
FINALIZE_TRANSACTION_ASSET, | ||
DELETE_TRANSACTION_ASSET | ||
DELETE_TRANSACTION_ASSET, | ||
TRANSACTION_FIELDS, | ||
} from "../../lib/graphql/transaction"; | ||
@@ -28,3 +35,4 @@ import { SubscriptionType } from "../../lib/graphql/types"; | ||
let thirdTransaction: Transaction; | ||
let stub: any; | ||
let stub: sinon.SinonStub; | ||
let fetchSpy: sinon.SinonSpy; | ||
@@ -34,6 +42,7 @@ beforeEach(() => { | ||
stub = sinon.stub(client.graphQL, "rawQuery"); | ||
fetchSpy = sinon.spy(client.models.transaction, "fetch"); | ||
firstTransaction = createTransaction({ | ||
name: "Santa Claus", | ||
amount: 900 | ||
amount: 900, | ||
}); | ||
@@ -43,3 +52,3 @@ secondTransaction = createTransaction(); | ||
name: "Willy Wonka", | ||
amount: 1200 | ||
amount: 1200, | ||
}); | ||
@@ -52,3 +61,3 @@ | ||
pageInfo: { hasNextPage: true, hasPreviousPage: false }, | ||
}), | ||
}) | ||
); | ||
@@ -61,3 +70,3 @@ | ||
pageInfo: { hasNextPage: false, hasPreviousPage: false }, | ||
}), | ||
}) | ||
); | ||
@@ -68,2 +77,3 @@ }); | ||
stub.restore(); | ||
fetchSpy.restore(); | ||
}); | ||
@@ -82,4 +92,12 @@ | ||
expect(fetchSpy.callCount).to.equal(1); | ||
const secondPage = firstPage.nextPage && (await firstPage.nextPage()); | ||
expect(secondPage?.items).to.deep.equal([thirdTransaction]); | ||
expect(fetchSpy.callCount).to.equal(2); | ||
expect(fetchSpy.lastCall.args).to.deep.eq([ | ||
{ first: 2, after: "22222" }, | ||
TRANSACTION_FIELDS, | ||
]); | ||
}); | ||
@@ -106,3 +124,3 @@ | ||
pageInfo: { hasPreviousPage: false, hasNextPage: false }, | ||
}), | ||
}) | ||
); | ||
@@ -114,21 +132,16 @@ | ||
amount_gt: 1000, | ||
name_like:"SaNtA" | ||
} | ||
name_like: "SaNtA", | ||
}, | ||
}); | ||
expect(stub.callCount).to.equal(1); | ||
expect(stub.getCall(0).args[1]).to.deep.equal( | ||
{ | ||
filter: { | ||
operator: BaseOperator.And, | ||
amount_gt: 1000, | ||
name_like: "SaNtA" | ||
} | ||
} | ||
); | ||
expect(results.items).to.deep.equal([ | ||
firstTransaction, | ||
thirdTransaction, | ||
]); | ||
}) | ||
expect(stub.getCall(0).args[1]).to.deep.equal({ | ||
filter: { | ||
operator: BaseOperator.And, | ||
amount_gt: 1000, | ||
name_like: "SaNtA", | ||
}, | ||
}); | ||
expect(results.items).to.deep.equal([firstTransaction, thirdTransaction]); | ||
}); | ||
@@ -142,3 +155,3 @@ describe("when iterating backwards", () => { | ||
pageInfo: { hasPreviousPage: true, hasNextPage: false }, | ||
}), | ||
}) | ||
); | ||
@@ -150,3 +163,3 @@ stub.onSecondCall().resolves( | ||
pageInfo: { hasPreviousPage: false, hasNextPage: false }, | ||
}), | ||
}) | ||
); | ||
@@ -200,3 +213,3 @@ | ||
const customFields = `id category`; | ||
before(async () => { | ||
@@ -301,3 +314,3 @@ graphqlClientStub.rawQuery.reset(); | ||
userSelectedBookingDate: new Date().toISOString(), | ||
personalNote: "Business lunch" | ||
personalNote: "Business lunch", | ||
}); | ||
@@ -313,3 +326,5 @@ stub.resolves({ | ||
userSelectedBookingDate: new Date().toISOString(), | ||
personalNote: transactionData.personalNote | ||
personalNote: transactionData.personalNote, | ||
vatRate: VatRate.Vat_19, | ||
categoryCode: "1120", | ||
}); | ||
@@ -341,4 +356,4 @@ | ||
category: TransactionCategory.TaxPayment, | ||
userSelectedBookingDate: new Date('2020-01-01').toISOString(), | ||
splits: [] | ||
userSelectedBookingDate: new Date("2020-01-01").toISOString(), | ||
splits: [], | ||
}); | ||
@@ -350,3 +365,3 @@ const splitData = [ | ||
category: TransactionCategory.TaxPayment, | ||
userSelectedBookingDate: new Date('2020-01-01').toISOString(), | ||
userSelectedBookingDate: new Date("2020-01-01").toISOString(), | ||
}, | ||
@@ -357,3 +372,3 @@ { | ||
category: TransactionCategory.VatPayment, | ||
userSelectedBookingDate: new Date('2020-01-01').toISOString(), | ||
userSelectedBookingDate: new Date("2020-01-01").toISOString(), | ||
}, | ||
@@ -365,3 +380,3 @@ ]; | ||
userSelectedBookingDate: null, | ||
splits: splitData | ||
splits: splitData, | ||
}); | ||
@@ -375,3 +390,3 @@ stub.resolves({ | ||
transactionId: transactionDataBefore.id, | ||
splits: splitData | ||
splits: splitData, | ||
}); | ||
@@ -381,4 +396,7 @@ | ||
expect(stub.callCount).to.eq(1); | ||
expect(stub.args[0][0]).to.eq(CREATE_SPLIT_TRANSACTION); | ||
expect(stub.args[0][1]).to.deep.eq({transactionId: transactionDataBefore.id, splits: splitData}); | ||
expect(stub.args[0][0]).to.eq(getCreateSplitTransactionMutation()); | ||
expect(stub.args[0][1]).to.deep.eq({ | ||
transactionId: transactionDataBefore.id, | ||
splits: splitData, | ||
}); | ||
expect(result).to.deep.eq(transactionDataAfter); | ||
@@ -412,3 +430,3 @@ }); | ||
category: TransactionCategory.TaxPayment, | ||
userSelectedBookingDate: new Date('2020-01-01').toISOString(), | ||
userSelectedBookingDate: new Date("2020-01-01").toISOString(), | ||
}, | ||
@@ -419,5 +437,5 @@ { | ||
category: TransactionCategory.VatPayment, | ||
userSelectedBookingDate: new Date('2020-01-01').toISOString(), | ||
userSelectedBookingDate: new Date("2020-01-01").toISOString(), | ||
}, | ||
] | ||
], | ||
}); | ||
@@ -428,3 +446,3 @@ const transactionDataAfter = createTransaction({ | ||
userSelectedBookingDate: null, | ||
splits: [] | ||
splits: [], | ||
}); | ||
@@ -437,3 +455,3 @@ stub.resolves({ | ||
const result = await client.models.transaction.deleteSplit({ | ||
transactionId: transactionDataBefore.id | ||
transactionId: transactionDataBefore.id, | ||
}); | ||
@@ -443,4 +461,6 @@ | ||
expect(stub.callCount).to.eq(1); | ||
expect(stub.args[0][0]).to.eq(DELETE_SPLIT_TRANSACTION); | ||
expect(stub.args[0][1]).to.deep.eq({transactionId: transactionDataBefore.id}); | ||
expect(stub.args[0][0]).to.eq(getDeleteSplitTransactionMutation()); | ||
expect(stub.args[0][1]).to.deep.eq({ | ||
transactionId: transactionDataBefore.id, | ||
}); | ||
expect(result).to.deep.eq(transactionDataAfter); | ||
@@ -470,3 +490,3 @@ }); | ||
category: TransactionCategory.TaxPayment, | ||
userSelectedBookingDate: new Date('2020-01-01').toISOString(), | ||
userSelectedBookingDate: new Date("2020-01-01").toISOString(), | ||
}, | ||
@@ -477,3 +497,3 @@ { | ||
category: TransactionCategory.VatPayment, | ||
userSelectedBookingDate: new Date('2020-01-01').toISOString(), | ||
userSelectedBookingDate: new Date("2020-01-01").toISOString(), | ||
}, | ||
@@ -485,3 +505,3 @@ ]; | ||
userSelectedBookingDate: null, | ||
splits: splitDataBefore | ||
splits: splitDataBefore, | ||
}); | ||
@@ -493,3 +513,3 @@ const splitDataAfter = [ | ||
category: TransactionCategory.Private, | ||
userSelectedBookingDate: null | ||
userSelectedBookingDate: null, | ||
}, | ||
@@ -500,3 +520,3 @@ { | ||
category: TransactionCategory.Vat_19, | ||
userSelectedBookingDate: null | ||
userSelectedBookingDate: null, | ||
}, | ||
@@ -508,3 +528,3 @@ ]; | ||
userSelectedBookingDate: null, | ||
splits: splitDataAfter | ||
splits: splitDataAfter, | ||
}); | ||
@@ -518,3 +538,3 @@ stub.resolves({ | ||
transactionId: transactionDataBefore.id, | ||
splits: splitDataAfter | ||
splits: splitDataAfter, | ||
}); | ||
@@ -524,4 +544,7 @@ | ||
expect(stub.callCount).to.eq(1); | ||
expect(stub.args[0][0]).to.eq(UPDATE_SPLIT_TRANSACTION); | ||
expect(stub.args[0][1]).to.deep.eq({transactionId: transactionDataBefore.id, splits: splitDataAfter}); | ||
expect(stub.args[0][0]).to.eq(getUpdateSplitTransactionMutation()); | ||
expect(stub.args[0][1]).to.deep.eq({ | ||
transactionId: transactionDataBefore.id, | ||
splits: splitDataAfter, | ||
}); | ||
expect(result).to.deep.eq(transactionDataAfter); | ||
@@ -548,3 +571,3 @@ }); | ||
category: TransactionCategory.TaxPayment, | ||
userSelectedBookingDate: new Date('2020-01-01').toISOString(), | ||
userSelectedBookingDate: new Date("2020-01-01").toISOString(), | ||
}); | ||
@@ -566,3 +589,3 @@ | ||
filetype: "jpg", | ||
uploadPlatform: RequestPlatform.NativeShare | ||
uploadPlatform: RequestPlatform.NativeShare, | ||
}); | ||
@@ -573,3 +596,8 @@ | ||
expect(stub.args[0][0]).to.eq(CREATE_TRANSACTION_ASSET); | ||
expect(stub.args[0][1]).to.deep.eq({ transactionId: transaction.id, name: "test", filetype: "jpg", uploadPlatform: RequestPlatform.NativeShare }); | ||
expect(stub.args[0][1]).to.deep.eq({ | ||
transactionId: transaction.id, | ||
name: "test", | ||
filetype: "jpg", | ||
uploadPlatform: RequestPlatform.NativeShare, | ||
}); | ||
expect(result).to.deep.eq(expectedResult); | ||
@@ -605,10 +633,13 @@ }); | ||
const result = await client.models.transaction.finalizeTransactionAssetUpload({ | ||
assetId: asset.id | ||
}); | ||
const result = | ||
await client.models.transaction.finalizeTransactionAssetUpload({ | ||
assetId: asset.id, | ||
}); | ||
// assert: check for valid rawQuery number of calls and proper arguments + expected result | ||
expect(stub.callCount).to.eq(1); | ||
expect(stub.args[0][0]).to.eq(FINALIZE_TRANSACTION_ASSET, | ||
DELETE_TRANSACTION_ASSET); | ||
expect(stub.args[0][0]).to.eq( | ||
FINALIZE_TRANSACTION_ASSET, | ||
DELETE_TRANSACTION_ASSET | ||
); | ||
expect(stub.args[0][1]).to.deep.eq({ assetId: asset.id }); | ||
@@ -639,3 +670,5 @@ expect(result).to.deep.eq(asset); | ||
const result = await client.models.transaction.deleteTransactionAsset({ assetId }); | ||
const result = await client.models.transaction.deleteTransactionAsset({ | ||
assetId, | ||
}); | ||
@@ -665,3 +698,3 @@ // assert: check for valid rawQuery number of calls and proper arguments + expected result | ||
fetchStub.resetHistory(); | ||
}) | ||
}); | ||
@@ -701,3 +734,5 @@ describe("when user provides only text", () => { | ||
filter: { | ||
amount_in: [123400, -123400, -56700, 56700, 8612, -8612, 9010, -9010], | ||
amount_in: [ | ||
123400, -123400, -56700, 56700, 8612, -8612, 9010, -9010, | ||
], | ||
name_likeAny: ["1234", "-567", "86.12", "90,1"], | ||
@@ -710,3 +745,3 @@ operator: BaseOperator.Or, | ||
amount_lt: 123500, | ||
operator: BaseOperator.And | ||
operator: BaseOperator.And, | ||
}, | ||
@@ -716,3 +751,3 @@ { | ||
amount_lte: -123400, | ||
operator: BaseOperator.And | ||
operator: BaseOperator.And, | ||
}, | ||
@@ -722,3 +757,3 @@ { | ||
amount_lt: 56800, | ||
operator: BaseOperator.And | ||
operator: BaseOperator.And, | ||
}, | ||
@@ -728,7 +763,7 @@ { | ||
amount_lte: -56700, | ||
operator: BaseOperator.And | ||
} | ||
] | ||
operator: BaseOperator.And, | ||
}, | ||
], | ||
}, | ||
preset: undefined | ||
preset: undefined, | ||
}); | ||
@@ -756,3 +791,3 @@ }); | ||
}, | ||
preset: undefined | ||
preset: undefined, | ||
}); | ||
@@ -804,3 +839,3 @@ }); | ||
amount_lt: 123500, | ||
operator: BaseOperator.And | ||
operator: BaseOperator.And, | ||
}, | ||
@@ -810,7 +845,7 @@ { | ||
amount_lte: -123400, | ||
operator: BaseOperator.And | ||
} | ||
] | ||
operator: BaseOperator.And, | ||
}, | ||
], | ||
}, | ||
preset: undefined | ||
preset: undefined, | ||
}); | ||
@@ -840,3 +875,3 @@ }); | ||
amount_lt: 2000000000, | ||
operator: BaseOperator.And | ||
operator: BaseOperator.And, | ||
}, | ||
@@ -846,7 +881,7 @@ { | ||
amount_lte: -1999999900, | ||
operator: BaseOperator.And | ||
} | ||
] | ||
operator: BaseOperator.And, | ||
}, | ||
], | ||
}, | ||
preset: undefined | ||
preset: undefined, | ||
}); | ||
@@ -870,5 +905,5 @@ }); | ||
operator: BaseOperator.Or, | ||
purpose_likeAny: ["hello", "world"] | ||
purpose_likeAny: ["hello", "world"], | ||
}, | ||
preset: undefined | ||
preset: undefined, | ||
}); | ||
@@ -893,3 +928,3 @@ }); | ||
}, | ||
preset: undefined | ||
preset: undefined, | ||
}); | ||
@@ -916,13 +951,9 @@ }); | ||
{ | ||
name_likeAny: [ | ||
"hello" | ||
], | ||
name_likeAny: ["hello"], | ||
operator: "OR", | ||
purpose_likeAny: [ | ||
"hello" | ||
] | ||
} | ||
] | ||
purpose_likeAny: ["hello"], | ||
}, | ||
], | ||
}, | ||
preset: undefined | ||
preset: undefined, | ||
}); | ||
@@ -949,10 +980,6 @@ }); | ||
{ | ||
name_likeAny: [ | ||
"5" | ||
], | ||
name_likeAny: ["5"], | ||
operator: "OR", | ||
purpose_likeAny: [ | ||
"5" | ||
], | ||
amount_in: [ 500, -500 ], | ||
purpose_likeAny: ["5"], | ||
amount_in: [500, -500], | ||
}, | ||
@@ -962,3 +989,3 @@ { | ||
amount_lt: 600, | ||
operator: "AND" | ||
operator: "AND", | ||
}, | ||
@@ -968,7 +995,7 @@ { | ||
amount_lte: -500, | ||
operator: "AND" | ||
} | ||
] | ||
operator: "AND", | ||
}, | ||
], | ||
}, | ||
preset: undefined | ||
preset: undefined, | ||
}); | ||
@@ -1008,4 +1035,21 @@ }); | ||
let client: Client; | ||
const csv = "Buchungsdatum";"Wertstellungsdatum";"Transaktionstyp";"Empfänger";"Betrag";"IBAN";"Verwendungszweck";"end_to_end_id";"Buchungsstatus";"Kategorie";"Persönliche Notiz" | ||
"2021-08-23";"2021-08-23";"Überweisung";;"-12,34";"DE32110101001000000029";"transaction1";"test1";"Gebucht";; | ||
const csv = "Buchungsdatum"; | ||
("Wertstellungsdatum"); | ||
("Transaktionstyp"); | ||
("Empfänger"); | ||
("Betrag"); | ||
("IBAN"); | ||
("Verwendungszweck"); | ||
("end_to_end_id"); | ||
("Buchungsstatus"); | ||
("Kategorie"); | ||
("Persönliche Notiz"); | ||
("2021-08-23"); | ||
("2021-08-23"); | ||
("Überweisung"); | ||
("-12,34"); | ||
("DE32110101001000000029"); | ||
("transaction1"); | ||
("test1"); | ||
("Gebucht"); | ||
@@ -1012,0 +1056,0 @@ beforeEach(() => { |
@@ -10,3 +10,4 @@ import { expect } from "chai"; | ||
CreateTransferInput, | ||
UnfinishedTransfer | ||
UnfinishedTransfer, | ||
DeliveryMethod, | ||
} from "../../lib/graphql/schema"; | ||
@@ -19,2 +20,4 @@ import { createTransfer, generatePaginatedResponse } from "../helpers"; | ||
let result: any; | ||
const deviceId = "device-id"; | ||
const deliveryMethod = DeliveryMethod.DeviceSigning; | ||
@@ -30,12 +33,13 @@ before(() => { | ||
const transfer: CreateTransferInput = { | ||
amount: 1, | ||
purpose: "money1", | ||
e2eId: "e2e-1", | ||
reoccurrence: StandingOrderReoccurrenceType.Annually, | ||
lastExecutionDate: "2022-02-01", | ||
recipient: "r1", | ||
iban: "iban1" | ||
amount: 1, | ||
purpose: "money1", | ||
e2eId: "e2e-1", | ||
reoccurrence: StandingOrderReoccurrenceType.Annually, | ||
lastExecutionDate: "2022-02-01", | ||
recipient: "r1", | ||
iban: "iban1", | ||
}; | ||
const createTransferResult = { | ||
confirmationId: 100 | ||
confirmationId: 100, | ||
stringToSign: "string-to-sign", | ||
}; | ||
@@ -48,3 +52,7 @@ | ||
}); | ||
result = await transferInstance.createOne(transfer); | ||
result = await transferInstance.createOne({ | ||
transfer, | ||
deviceId, | ||
deliveryMethod, | ||
}); | ||
}); | ||
@@ -56,7 +64,7 @@ | ||
expect(query).to.include("createTransfer"); | ||
expect(variables).to.eql({ transfer }); | ||
expect(variables).to.eql({ transfer, deviceId, deliveryMethod }); | ||
}); | ||
it("should return confirmTransfers result", () => { | ||
expect(result).to.eql(100); | ||
expect(result).to.eql(createTransferResult); | ||
}); | ||
@@ -77,3 +85,6 @@ }); | ||
}); | ||
result = await transferInstance.confirmOne(confirmationId, authorizationToken); | ||
result = await transferInstance.confirmOne({ | ||
confirmationId, | ||
authorizationToken, | ||
}); | ||
}); | ||
@@ -85,3 +96,8 @@ | ||
expect(query).to.include("confirmTransfer"); | ||
expect(variables).to.eql({ confirmationId, authorizationToken }); | ||
expect(variables).to.eql({ | ||
confirmationId, | ||
authorizationToken, | ||
deviceId: undefined, | ||
signature: undefined, | ||
}); | ||
}); | ||
@@ -103,3 +119,3 @@ | ||
recipient: "r1", | ||
iban: "iban1" | ||
iban: "iban1", | ||
}, | ||
@@ -113,7 +129,7 @@ { | ||
recipient: "r2", | ||
iban: "iban2" | ||
iban: "iban2", | ||
}, | ||
]; | ||
const createTransfersResult = { | ||
confirmationId: 100 | ||
confirmationId: 100, | ||
}; | ||
@@ -140,3 +156,3 @@ | ||
}); | ||
describe("#confirmMany", () => { | ||
@@ -154,3 +170,6 @@ const confirmationId = "id-stub"; | ||
}); | ||
result = await transferInstance.confirmMany(confirmationId, authorizationToken); | ||
result = await transferInstance.confirmMany( | ||
confirmationId, | ||
authorizationToken | ||
); | ||
}); | ||
@@ -182,3 +201,3 @@ | ||
}); | ||
result = await transferInstance.cancelTransfer(type, id); | ||
result = await transferInstance.cancelTransfer({ type, id }); | ||
}); | ||
@@ -190,3 +209,8 @@ | ||
expect(query).to.include("cancelTransfer"); | ||
expect(variables).to.eql({ type, id }); | ||
expect(variables).to.eql({ | ||
type, | ||
id, | ||
deliveryMethod: undefined, | ||
deviceId: undefined, | ||
}); | ||
}); | ||
@@ -212,7 +236,7 @@ | ||
}); | ||
result = await transferInstance.confirmCancelTransfer( | ||
result = await transferInstance.confirmCancelTransfer({ | ||
type, | ||
confirmationId, | ||
authorizationToken, | ||
); | ||
}); | ||
}); | ||
@@ -224,3 +248,9 @@ | ||
expect(query).to.include("confirmCancelTransfer"); | ||
expect(variables).to.eql({ type, confirmationId, authorizationToken }); | ||
expect(variables).to.eql({ | ||
type, | ||
confirmationId, | ||
authorizationToken, | ||
deviceId: undefined, | ||
signature: undefined, | ||
}); | ||
}); | ||
@@ -253,3 +283,3 @@ | ||
}, | ||
}), | ||
}) | ||
); | ||
@@ -265,3 +295,3 @@ | ||
}, | ||
}), | ||
}) | ||
); | ||
@@ -308,3 +338,3 @@ }); | ||
}, | ||
}), | ||
}) | ||
); | ||
@@ -320,3 +350,3 @@ | ||
}, | ||
}), | ||
}) | ||
); | ||
@@ -399,3 +429,5 @@ | ||
graphqlClientStub.rawQuery.resolves({}); | ||
result = await transferInstance.fetch({ type: TransferType.SepaTransfer }); | ||
result = await transferInstance.fetch({ | ||
type: TransferType.SepaTransfer, | ||
}); | ||
}); | ||
@@ -420,3 +452,3 @@ | ||
lastExecutionDate: "2022-02-02", | ||
type: TransferType.StandingOrder | ||
type: TransferType.StandingOrder, | ||
}; | ||
@@ -429,6 +461,6 @@ const confirmationId = "standing-order:123456789"; | ||
updateTransfer: { | ||
confirmationId | ||
} | ||
confirmationId, | ||
}, | ||
}); | ||
result = await transferInstance.update(updatePayload); | ||
result = await transferInstance.update({ transfer: updatePayload }); | ||
}); | ||
@@ -440,3 +472,7 @@ | ||
expect(query).to.include("updateTransfer"); | ||
expect(variables).to.eql({ transfer: updatePayload }); | ||
expect(variables).to.eql({ | ||
transfer: updatePayload, | ||
deliveryMethod: undefined, | ||
deviceId: undefined, | ||
}); | ||
}); | ||
@@ -452,3 +488,3 @@ | ||
const userSelectedBookingDate = new Date().toISOString(); | ||
const personalNote = "business travel" | ||
const personalNote = "business travel"; | ||
const updatePayload = { | ||
@@ -469,5 +505,5 @@ id: "some-id", | ||
personalNote, | ||
} | ||
}, | ||
}); | ||
result = await transferInstance.update(updatePayload); | ||
result = await transferInstance.update({ transfer: updatePayload }); | ||
}); | ||
@@ -479,3 +515,7 @@ | ||
expect(query).to.include("updateTransfer"); | ||
expect(variables).to.eql({ transfer: updatePayload }); | ||
expect(variables).to.eql({ | ||
transfer: updatePayload, | ||
deliveryMethod: undefined, | ||
deviceId: undefined, | ||
}); | ||
}); | ||
@@ -487,3 +527,3 @@ | ||
userSelectedBookingDate, | ||
personalNote | ||
personalNote, | ||
}); | ||
@@ -496,3 +536,3 @@ }); | ||
const userSelectedBookingDate = new Date().toISOString(); | ||
const personalNote = "best French restaurant in Berlin" | ||
const personalNote = "best French restaurant in Berlin"; | ||
const updatePayload = { | ||
@@ -512,6 +552,6 @@ id: "some-id", | ||
userSelectedBookingDate, | ||
personalNote | ||
} | ||
personalNote, | ||
}, | ||
}); | ||
result = await transferInstance.update(updatePayload); | ||
result = await transferInstance.update({ transfer: updatePayload }); | ||
}); | ||
@@ -523,3 +563,7 @@ | ||
expect(query).to.include("updateTransfer"); | ||
expect(variables).to.eql({ transfer: updatePayload }); | ||
expect(variables).to.eql({ | ||
transfer: updatePayload, | ||
deliveryMethod: undefined, | ||
deviceId: undefined, | ||
}); | ||
}); | ||
@@ -531,3 +575,3 @@ | ||
userSelectedBookingDate, | ||
personalNote | ||
personalNote, | ||
}); | ||
@@ -540,8 +584,10 @@ }); | ||
const unfinishedTransfers = [{ | ||
amount: 1234, | ||
recipient: "John Doe", | ||
iban: "DE32110101001000000029", | ||
purpose: "time is money", | ||
}]; | ||
const unfinishedTransfers = [ | ||
{ | ||
amount: 1234, | ||
recipient: "John Doe", | ||
iban: "DE32110101001000000029", | ||
purpose: "time is money", | ||
}, | ||
]; | ||
@@ -548,0 +594,0 @@ describe("when there are unfinished transfers", () => { |
import { | ||
Transaction, | ||
TransactionProjectionType, | ||
TransactionSource, | ||
Transfer, | ||
@@ -39,3 +40,2 @@ TransferStatus, | ||
assets: [], | ||
transactionAssets: [], | ||
createdAt: new Date(0).toISOString(), | ||
@@ -45,3 +45,5 @@ categorizationType: null, | ||
description: "", | ||
source: "SOLARIS", | ||
source: TransactionSource.Solaris, | ||
hasAssets: false, | ||
transactionAssets: [], | ||
...override, | ||
@@ -48,0 +50,0 @@ }; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1067543
18939