Skip to content

Commit

Permalink
Merge pull request #424 from kontist/COM-243/Extend_transaction_filter
Browse files Browse the repository at this point in the history
Extend transaction filter with splits
  • Loading branch information
Campalo authored Dec 13, 2023
2 parents 8cce307 + 68ee9c1 commit 21a1acb
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 15 deletions.
52 changes: 46 additions & 6 deletions lib/graphql/schema.flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ export type Scalars = {|
Boolean: boolean,
Int: number,
Float: number,
/** The javascript `Date` as string. Type represents date and time as the ISO Date string. */
DateTime: any,
/** The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */
JSON: any,
/** The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */
JSONObject: any,
|};

Expand Down Expand Up @@ -56,6 +53,8 @@ export type Account = {|
/** A list of iban/name combinations based on existing user's transactions, provided to assist users when creating new transfers */
transferSuggestions?: ?Array<TransferSuggestion>,
transfers: TransfersConnection,
/** Account vat-related settings */
vatYearSettings: Array<VatYearSetting>,
|};


Expand Down Expand Up @@ -125,6 +124,12 @@ export type AccountTransfersArgs = {|
where?: ?TransfersConnectionFilter,
|};


/** The bank account of the current user */
export type AccountVatYearSettingsArgs = {|
year?: ?$ElementType<Scalars, 'Int'>,
|};

export type AccountBalance = {|
__typename?: 'AccountBalance',
currency?: ?$ElementType<Scalars, 'String'>,
Expand Down Expand Up @@ -318,6 +323,20 @@ export type BizTaxCarUsageEuerRows = {|
row176: $ElementType<Scalars, 'Int'>,
|};

export type BizTaxDeclarationPreview = {|
__typename?: 'BizTaxDeclarationPreview',
pdf: $ElementType<Scalars, 'String'>,
|};

export const BizTaxDeclarationTypeValues = Object.freeze({
Euer: 'EUER',
TradeTax: 'TRADE_TAX',
VatAnnual: 'VAT_ANNUAL'
});


export type BizTaxDeclarationType = $Values<typeof BizTaxDeclarationTypeValues>;

export type BizTaxHomeOfficeEuerRows = {|
__typename?: 'BizTaxHomeOfficeEuerRows',
row172: $ElementType<Scalars, 'Int'>,
Expand Down Expand Up @@ -1600,6 +1619,7 @@ export type Mutation = {|
/** Onboards user if needed */
onboardUser: $ElementType<Scalars, 'String'>,
postponeQuestionnaireAnswer: Questionnaire,
previewBizTaxDeclaration: BizTaxDeclarationPreview,
refundDirectDebit: MutationResult,
/** Close and order new card. Call when customer's card is damaged */
reorderCard: Card,
Expand Down Expand Up @@ -1672,6 +1692,7 @@ export type Mutation = {|
updateUserSignupInformation: MutationResult,
/** Update user's tax details */
updateUserTaxDetails: MutationResult,
updateVatYearSetting: VatYearSetting,
/** Submits UStVA declaration */
upsertDeclaration: Declaration,
/** Create or update user products that can be linked to the user's invoice(s) */
Expand Down Expand Up @@ -2091,6 +2112,12 @@ export type MutationPostponeQuestionnaireAnswerArgs = {|
|};


export type MutationPreviewBizTaxDeclarationArgs = {|
type: BizTaxDeclarationType,
year: $ElementType<Scalars, 'Int'>,
|};


export type MutationRefundDirectDebitArgs = {|
transactionId: $ElementType<Scalars, 'String'>,
|};
Expand Down Expand Up @@ -2320,6 +2347,12 @@ export type MutationUpdateUserTaxDetailsArgs = {|
|};


export type MutationUpdateVatYearSettingArgs = {|
vatPaymentFrequency: PaymentFrequency,
year: $ElementType<Scalars, 'Int'>,
|};


export type MutationUpsertDeclarationArgs = {|
payload: UpsertDeclarationArgs,
|};
Expand Down Expand Up @@ -2915,8 +2948,6 @@ export type QuestionnaireDocumentInput = {|

export const QuestionnaireDocumentTypeValues = Object.freeze({
BizTaxCarUsageLogbook: 'BIZ_TAX_CAR_USAGE_LOGBOOK',
BizTaxCarUsageOther: 'BIZ_TAX_CAR_USAGE_OTHER',
BizTaxCarUsagePrivatelyPaidCarExpenses: 'BIZ_TAX_CAR_USAGE_PRIVATELY_PAID_CAR_EXPENSES',
BizTaxCarUsagePurchaseContract: 'BIZ_TAX_CAR_USAGE_PURCHASE_CONTRACT',
BizTaxCarUsageTraveledKmWithPrivateCar: 'BIZ_TAX_CAR_USAGE_TRAVELED_KM_WITH_PRIVATE_CAR',
BizTaxOfficeUsageElectricity: 'BIZ_TAX_OFFICE_USAGE_ELECTRICITY',
Expand All @@ -2928,7 +2959,6 @@ export const QuestionnaireDocumentTypeValues = Object.freeze({
BizTaxOfficeUsageUtility: 'BIZ_TAX_OFFICE_USAGE_UTILITY',
BizTaxOfficeUsageUtilityAfterPayment: 'BIZ_TAX_OFFICE_USAGE_UTILITY_AFTER_PAYMENT',
BizTaxTravelExpensesBusinessTrips: 'BIZ_TAX_TRAVEL_EXPENSES_BUSINESS_TRIPS',
BizTaxTravelExpensesOther: 'BIZ_TAX_TRAVEL_EXPENSES_OTHER',
EoyCarUsageLogbook: 'EOY_CAR_USAGE_LOGBOOK',
EoyCarUsageOther: 'EOY_CAR_USAGE_OTHER',
EoyCarUsagePrivatelyPaidCarExpenses: 'EOY_CAR_USAGE_PRIVATELY_PAID_CAR_EXPENSES',
Expand Down Expand Up @@ -3558,6 +3588,7 @@ export type TermsAndConditions = {|

export const TermsAndConditionsNameValues = Object.freeze({
InstantCreditTransfer: 'INSTANT_CREDIT_TRANSFER',
Loan: 'LOAN',
TopUp: 'TOP_UP'
});

Expand Down Expand Up @@ -3738,6 +3769,7 @@ export type TransactionCondition = {|
source_eq?: ?$ElementType<Scalars, 'String'>,
source_in?: ?Array<$ElementType<Scalars, 'String'>>,
source_ne?: ?$ElementType<Scalars, 'String'>,
splits_exist?: ?$ElementType<Scalars, 'Boolean'>,
type_eq?: ?TransactionProjectionType,
valutaDate_eq?: ?$ElementType<Scalars, 'DateTime'>,
valutaDate_gt?: ?$ElementType<Scalars, 'DateTime'>,
Expand Down Expand Up @@ -3820,6 +3852,7 @@ export type TransactionFilter = {|
source_eq?: ?$ElementType<Scalars, 'String'>,
source_in?: ?Array<$ElementType<Scalars, 'String'>>,
source_ne?: ?$ElementType<Scalars, 'String'>,
splits_exist?: ?$ElementType<Scalars, 'Boolean'>,
type_eq?: ?TransactionProjectionType,
valutaDate_eq?: ?$ElementType<Scalars, 'DateTime'>,
valutaDate_gt?: ?$ElementType<Scalars, 'DateTime'>,
Expand Down Expand Up @@ -4742,6 +4775,13 @@ export const VatRateValues = Object.freeze({

export type VatRate = $Values<typeof VatRateValues>;

/** An account's VAT settings specific to a year */
export type VatYearSetting = {|
__typename?: 'VatYearSetting',
vatPaymentFrequency: $ElementType<Scalars, 'String'>,
year: $ElementType<Scalars, 'Float'>,
|};

export type VirtualCardDetailsArgs = {|
deviceId: $ElementType<Scalars, 'String'>,
jwe: Jwe,
Expand Down
49 changes: 43 additions & 6 deletions lib/graphql/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@ export type Scalars = {
Boolean: boolean;
Int: number;
Float: number;
/** The javascript `Date` as string. Type represents date and time as the ISO Date string. */
DateTime: any;
/** The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */
JSON: any;
/** The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */
JSONObject: any;
};

Expand Down Expand Up @@ -59,6 +56,8 @@ export type Account = {
/** A list of iban/name combinations based on existing user's transactions, provided to assist users when creating new transfers */
transferSuggestions?: Maybe<Array<TransferSuggestion>>;
transfers: TransfersConnection;
/** Account vat-related settings */
vatYearSettings: Array<VatYearSetting>;
};


Expand Down Expand Up @@ -128,6 +127,12 @@ export type AccountTransfersArgs = {
where?: InputMaybe<TransfersConnectionFilter>;
};


/** The bank account of the current user */
export type AccountVatYearSettingsArgs = {
year?: InputMaybe<Scalars['Int']>;
};

export type AccountBalance = {
__typename?: 'AccountBalance';
currency?: Maybe<Scalars['String']>;
Expand Down Expand Up @@ -303,6 +308,17 @@ export type BizTaxCarUsageEuerRows = {
row176: Scalars['Int'];
};

export type BizTaxDeclarationPreview = {
__typename?: 'BizTaxDeclarationPreview';
pdf: Scalars['String'];
};

export enum BizTaxDeclarationType {
Euer = 'EUER',
TradeTax = 'TRADE_TAX',
VatAnnual = 'VAT_ANNUAL'
}

export type BizTaxHomeOfficeEuerRows = {
__typename?: 'BizTaxHomeOfficeEuerRows';
row172: Scalars['Int'];
Expand Down Expand Up @@ -1498,6 +1514,7 @@ export type Mutation = {
/** Onboards user if needed */
onboardUser: Scalars['String'];
postponeQuestionnaireAnswer: Questionnaire;
previewBizTaxDeclaration: BizTaxDeclarationPreview;
refundDirectDebit: MutationResult;
/** Close and order new card. Call when customer's card is damaged */
reorderCard: Card;
Expand Down Expand Up @@ -1570,6 +1587,7 @@ export type Mutation = {
updateUserSignupInformation: MutationResult;
/** Update user's tax details */
updateUserTaxDetails: MutationResult;
updateVatYearSetting: VatYearSetting;
/** Submits UStVA declaration */
upsertDeclaration: Declaration;
/** Create or update user products that can be linked to the user's invoice(s) */
Expand Down Expand Up @@ -1989,6 +2007,12 @@ export type MutationPostponeQuestionnaireAnswerArgs = {
};


export type MutationPreviewBizTaxDeclarationArgs = {
type: BizTaxDeclarationType;
year: Scalars['Int'];
};


export type MutationRefundDirectDebitArgs = {
transactionId: Scalars['String'];
};
Expand Down Expand Up @@ -2218,6 +2242,12 @@ export type MutationUpdateUserTaxDetailsArgs = {
};


export type MutationUpdateVatYearSettingArgs = {
vatPaymentFrequency: PaymentFrequency;
year: Scalars['Int'];
};


export type MutationUpsertDeclarationArgs = {
payload: UpsertDeclarationArgs;
};
Expand Down Expand Up @@ -2786,8 +2816,6 @@ export type QuestionnaireDocumentInput = {

export enum QuestionnaireDocumentType {
BizTaxCarUsageLogbook = 'BIZ_TAX_CAR_USAGE_LOGBOOK',
BizTaxCarUsageOther = 'BIZ_TAX_CAR_USAGE_OTHER',
BizTaxCarUsagePrivatelyPaidCarExpenses = 'BIZ_TAX_CAR_USAGE_PRIVATELY_PAID_CAR_EXPENSES',
BizTaxCarUsagePurchaseContract = 'BIZ_TAX_CAR_USAGE_PURCHASE_CONTRACT',
BizTaxCarUsageTraveledKmWithPrivateCar = 'BIZ_TAX_CAR_USAGE_TRAVELED_KM_WITH_PRIVATE_CAR',
BizTaxOfficeUsageElectricity = 'BIZ_TAX_OFFICE_USAGE_ELECTRICITY',
Expand All @@ -2799,7 +2827,6 @@ export enum QuestionnaireDocumentType {
BizTaxOfficeUsageUtility = 'BIZ_TAX_OFFICE_USAGE_UTILITY',
BizTaxOfficeUsageUtilityAfterPayment = 'BIZ_TAX_OFFICE_USAGE_UTILITY_AFTER_PAYMENT',
BizTaxTravelExpensesBusinessTrips = 'BIZ_TAX_TRAVEL_EXPENSES_BUSINESS_TRIPS',
BizTaxTravelExpensesOther = 'BIZ_TAX_TRAVEL_EXPENSES_OTHER',
EoyCarUsageLogbook = 'EOY_CAR_USAGE_LOGBOOK',
EoyCarUsageOther = 'EOY_CAR_USAGE_OTHER',
EoyCarUsagePrivatelyPaidCarExpenses = 'EOY_CAR_USAGE_PRIVATELY_PAID_CAR_EXPENSES',
Expand Down Expand Up @@ -3366,6 +3393,7 @@ export type TermsAndConditions = {

export enum TermsAndConditionsName {
InstantCreditTransfer = 'INSTANT_CREDIT_TRANSFER',
Loan = 'LOAN',
TopUp = 'TOP_UP'
}

Expand Down Expand Up @@ -3531,6 +3559,7 @@ export type TransactionCondition = {
source_eq?: InputMaybe<Scalars['String']>;
source_in?: InputMaybe<Array<Scalars['String']>>;
source_ne?: InputMaybe<Scalars['String']>;
splits_exist?: InputMaybe<Scalars['Boolean']>;
type_eq?: InputMaybe<TransactionProjectionType>;
valutaDate_eq?: InputMaybe<Scalars['DateTime']>;
valutaDate_gt?: InputMaybe<Scalars['DateTime']>;
Expand Down Expand Up @@ -3607,6 +3636,7 @@ export type TransactionFilter = {
source_eq?: InputMaybe<Scalars['String']>;
source_in?: InputMaybe<Array<Scalars['String']>>;
source_ne?: InputMaybe<Scalars['String']>;
splits_exist?: InputMaybe<Scalars['Boolean']>;
type_eq?: InputMaybe<TransactionProjectionType>;
valutaDate_eq?: InputMaybe<Scalars['DateTime']>;
valutaDate_gt?: InputMaybe<Scalars['DateTime']>;
Expand Down Expand Up @@ -4519,6 +4549,13 @@ export enum VatRate {
Vat_19 = 'VAT_19'
}

/** An account's VAT settings specific to a year */
export type VatYearSetting = {
__typename?: 'VatYearSetting';
vatPaymentFrequency: Scalars['String'];
year: Scalars['Float'];
};

export type VirtualCardDetailsArgs = {
deviceId: Scalars['String'];
jwe: Jwe;
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kontist",
"version": "0.50.7",
"version": "0.50.8",
"description": "Kontist client SDK",
"main": "dist/lib/index.js",
"types": "dist/lib/index.d.ts",
Expand Down

0 comments on commit 21a1acb

Please sign in to comment.