green-invoice-graphql
Version:
Graphql server for wrapping payper API
2,744 lines • 93.2 kB
text/typescript
// @ts-nocheck
import { GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql';
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
import { gql } from '@graphql-mesh/utils';
export type Maybe<T> = T | null;
export type InputMaybe<T> = Maybe<T>;
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
export type RequireFields<T, K extends keyof T> = Omit<T, K> & { [P in K]-?: NonNullable<T[P]> };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
/** The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID. */
ID: string;
/** The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. */
String: string;
/** The `Boolean` scalar type represents `true` or `false`. */
Boolean: boolean;
/** The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. */
Int: number;
/** The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). */
Float: number;
/** Payment method */
mutation_addExpense_oneOf_0_paymentType: any;
};
export type Query = {
getExpense?: Maybe<getExpenseResponse>;
updateExpense?: Maybe<updateExpenseResponse>;
searchExpenses?: Maybe<searchExpensesResponse>;
searchExpenseDrafts?: Maybe<searchExpenseDraftsResponse>;
};
export type QuerygetExpenseArgs = {
input: getExpenseRequest_Input;
id?: InputMaybe<Scalars['ID']>;
};
export type QueryupdateExpenseArgs = {
input: updateExpenseRequest_Input;
id?: InputMaybe<Scalars['ID']>;
};
export type QuerysearchExpensesArgs = {
input: searchExpensesRequest_Input;
};
export type QuerysearchExpenseDraftsArgs = {
input?: InputMaybe<searchExpenseDraftsRequest_Input>;
};
export type getExpenseResponse = GetExpense | ErrorResponse;
/** A Single Expense */
export type GetExpense = {
/** The expense ID */
id?: Maybe<Scalars['String']>;
businessType?: Maybe<query_getExpense_oneOf_0_businessType>;
documentType?: Maybe<query_getExpense_oneOf_0_documentType>;
status?: Maybe<query_getExpense_oneOf_0_status>;
paymentType?: Maybe<query_getExpense_oneOf_0_paymentType>;
currency?: Maybe<Currency>;
/** Currency rate relative to ILS */
currencyRate?: Maybe<Scalars['Float']>;
/** The amount excluding the vat */
amountExcludeVat?: Maybe<Scalars['Float']>;
/** The amount of the vat */
vat?: Maybe<Scalars['Float']>;
/** The total amount of the expense */
amount?: Maybe<Scalars['Float']>;
/** Date of the expense */
date?: Maybe<Scalars['String']>;
/** Due date of the expense */
dueDate?: Maybe<Scalars['String']>;
/** Number of the expense */
number?: Maybe<Scalars['String']>;
/** Is the expense currently active or not */
active?: Maybe<Scalars['Boolean']>;
/** Description for the expense */
description?: Maybe<Scalars['String']>;
/** Remarks for the expense */
remarks?: Maybe<Scalars['String']>;
supplier?: Maybe<Supplier>;
/** URL of expense thumbnail */
thumbnail?: Maybe<Scalars['String']>;
/** URL to download the expense thumbnail */
url?: Maybe<Scalars['String']>;
/** Is the supplier currently active or not */
cancellable?: Maybe<Scalars['Boolean']>;
/** Reporting date of the expense */
reportingDate?: Maybe<Scalars['String']>;
accountingClassification?: Maybe<AccountingClassification>;
/** The local amount of the expense */
amountLocal?: Maybe<Scalars['Float']>;
/** The amount of accounting */
amountAccounting?: Maybe<Scalars['Float']>;
/** The vat amount of accounting */
vatAccounting?: Maybe<Scalars['Float']>;
/** The creation date of the expense, in UNIX timestamp format */
creationDate?: Maybe<Scalars['Int']>;
/** The last update date of the expense, in UNIX timestamp format */
lastUpdateDate?: Maybe<Scalars['Int']>;
};
/** The business type ID */
export type query_getExpense_oneOf_0_businessType =
| '_1'
| '_2'
| '_3'
| '_4'
| '_5'
| '_6';
/** The type of the expense */
export type query_getExpense_oneOf_0_documentType =
| '_20'
| '_305'
| '_320'
| '_330'
| '_400'
| '_405';
/** The status of the expense */
export type query_getExpense_oneOf_0_status =
| '_10'
| '_20'
| '_30'
| '_100';
/** Payment method */
export type query_getExpense_oneOf_0_paymentType =
| 'NEGATIVE_1'
| '_0'
| '_1'
| '_2'
| '_3'
| '_4'
| '_5'
| '_10'
| '_11';
/** 3-letter ISO item currency code */
export type Currency =
| 'ILS'
| 'USD'
| 'EUR'
| 'GBP'
| 'JPY'
| 'CHF'
| 'CNY'
| 'AUD'
| 'CAD'
| 'RUB'
| 'BRL'
| 'HKD'
| 'SGD'
| 'THB'
| 'MXN'
| 'TRY'
| 'NZD'
| 'SEK'
| 'NOK'
| 'DKK'
| 'KRW'
| 'INR'
| 'IDR'
| 'PLN'
| 'RON'
| 'ZAR'
| 'HRK';
/** Supplier of the expense */
export type Supplier = {
/** The supplier ID */
id?: Maybe<Scalars['String']>;
/** The supplier name */
name?: Maybe<Scalars['String']>;
/** Is the supplier active or not */
active?: Maybe<Scalars['Boolean']>;
/** The supplier tax ID */
taxId?: Maybe<Scalars['String']>;
paymentTerms?: Maybe<mutation_addExpense_oneOf_0_supplier_paymentTerms>;
/** The supplier bank name */
bankName?: Maybe<Scalars['String']>;
/** The supplier bank branch number */
bankBranch?: Maybe<Scalars['String']>;
/** The supplier bank account number */
bankAccount?: Maybe<Scalars['String']>;
country?: Maybe<Country>;
/** The supplier phone number */
phone?: Maybe<Scalars['String']>;
/** The supplier mobile number */
mobile?: Maybe<Scalars['String']>;
/** The supplier contact person name */
contactPerson?: Maybe<Scalars['String']>;
emails?: Maybe<Array<Maybe<Scalars['String']>>>;
labels?: Maybe<Array<Maybe<Scalars['String']>>>;
/** The creation date of the supplier, in UNIX timestamp format */
creationDate?: Maybe<Scalars['Int']>;
/** The last update date of the supplier, in UNIX timestamp format */
lastUpdateDate?: Maybe<Scalars['Int']>;
/** The supplier department */
department?: Maybe<Scalars['String']>;
/** The supplier accounting key */
accountingKey?: Maybe<Scalars['String']>;
/** The supplier address */
address?: Maybe<Scalars['String']>;
/** The supplier city */
city?: Maybe<Scalars['String']>;
/** The supplier zip code */
zip?: Maybe<Scalars['String']>;
/** The supplier fax number */
fax?: Maybe<Scalars['String']>;
/** The Supplier remarks for self use */
remarks?: Maybe<Scalars['String']>;
/** The amount of incomes from the customer */
incomeAmount?: Maybe<Scalars['Float']>;
paymentAmount?: Maybe<Scalars['Float']>;
/** The balance amount of the supplier */
balanceAmount?: Maybe<Scalars['Float']>;
};
/** The supplier payment term, default is 0 */
export type mutation_addExpense_oneOf_0_supplier_paymentTerms =
| 'NEGATIVE_1'
| '_0'
| '_10'
| '_15'
| '_30'
| '_45'
| '_60'
| '_75'
| '_90'
| '_120';
/** 2-letter ISO supplier country code, default is IL */
export type Country =
| 'UG'
| 'UZ'
| 'AT'
| 'AU'
| 'UA'
| 'UY'
| 'AZ'
| 'CX'
| 'AE'
| 'IT'
| 'BS'
| 'GS'
| 'UM'
| 'VI'
| 'VG'
| 'HM'
| 'TC'
| 'MP'
| 'MH'
| 'SB'
| 'FO'
| 'FK'
| 'FJ'
| 'KM'
| 'CK'
| 'CC'
| 'KY'
| 'ID'
| 'IS'
| 'IE'
| 'IR'
| 'SV'
| 'AL'
| 'DZ'
| 'AX'
| 'AO'
| 'AI'
| 'AD'
| 'AQ'
| 'AG'
| 'EE'
| 'AF'
| 'EC'
| 'AR'
| 'US'
| 'AW'
| 'ER'
| 'AM'
| 'ET'
| 'BT'
| 'BV'
| 'BW'
| 'BG'
| 'BO'
| 'BA'
| 'BI'
| 'BF'
| 'BH'
| 'BY'
| 'BE'
| 'BZ'
| 'BD'
| 'BJ'
| 'BB'
| 'BN'
| 'BR'
| 'GB'
| 'BM'
| 'DJ'
| 'JM'
| 'JE'
| 'GA'
| 'GE'
| 'GH'
| 'GT'
| 'GU'
| 'GP'
| 'GY'
| 'GI'
| 'GN'
| 'GW'
| 'GQ'
| 'GF'
| 'GM'
| 'GL'
| 'DE'
| 'GD'
| 'GG'
| 'DM'
| 'DK'
| 'ZA'
| 'SS'
| 'KR'
| 'IM'
| 'NF'
| 'HT'
| 'MV'
| 'BQ'
| 'IN'
| 'NL'
| 'HK'
| 'HU'
| 'HN'
| 'IO'
| 'TF'
| 'PH'
| 'DO'
| 'CD'
| 'CF'
| 'PS'
| 'WF'
| 'VN'
| 'VU'
| 'VE'
| 'VA'
| 'ZW'
| 'ZM'
| 'CI'
| 'TJ'
| 'TV'
| 'TG'
| 'TO'
| 'TN'
| 'TK'
| 'TR'
| 'TM'
| 'TW'
| 'TZ'
| 'TT'
| 'GR'
| 'JP'
| 'JO'
| 'IL'
| 'KW'
| 'CV'
| 'LA'
| 'LB'
| 'LY'
| 'LU'
| 'LV'
| 'LR'
| 'LT'
| 'LI'
| 'LS'
| 'MR'
| 'MU'
| 'ML'
| 'MG'
| 'MZ'
| 'MD'
| 'MN'
| 'ME'
| 'MS'
| 'MC'
| 'TL'
| 'MM'
| 'YT'
| 'FM'
| 'MW'
| 'MY'
| 'MT'
| 'EG'
| 'MO'
| 'MK'
| 'MX'
| 'MA'
| 'MQ'
| 'NR'
| 'NO'
| 'NG'
| 'NZ'
| 'NU'
| 'NE'
| 'NI'
| 'NA'
| 'NP'
| 'ST'
| 'SJ'
| 'EH'
| 'SD'
| 'SZ'
| 'SO'
| 'SY'
| 'SR'
| 'SL'
| 'SC'
| 'CN'
| 'SG'
| 'SI'
| 'SK'
| 'WS'
| 'AS'
| 'BL'
| 'MF'
| 'SM'
| 'PM'
| 'SN'
| 'SH'
| 'VC'
| 'LC'
| 'SX'
| 'KN'
| 'SA'
| 'ES'
| 'RS'
| 'LK'
| 'OM'
| 'IQ'
| 'PW'
| 'PL'
| 'PF'
| 'PR'
| 'PT'
| 'PN'
| 'FI'
| 'PA'
| 'PG'
| 'PK'
| 'PY'
| 'PE'
| 'TD'
| 'CL'
| 'CZ'
| 'KP'
| 'FR'
| 'CU'
| 'CO'
| 'CG'
| 'XK'
| 'CR'
| 'CW'
| 'KZ'
| 'QA'
| 'KG'
| 'KI'
| 'NC'
| 'KH'
| 'CM'
| 'CA'
| 'KE'
| 'CY'
| 'HR'
| 'RE'
| 'RW'
| 'RO'
| 'RU'
| 'SE'
| 'CH'
| 'TH'
| 'YE';
/** Account classification of the expense */
export type AccountingClassification = {
/** The classification ID, see 'Get Accounting Classifications' endpoint */
id?: Maybe<Scalars['String']>;
/** The classification key */
key?: Maybe<Scalars['String']>;
/** The classification code */
code?: Maybe<Scalars['String']>;
/** The classification title */
title?: Maybe<Scalars['String']>;
irsCode?: Maybe<mutation_addExpense_oneOf_0_accountingClassification_irsCode>;
/** The classification income */
income?: Maybe<Scalars['Float']>;
/** The classification type */
type?: Maybe<Scalars['Float']>;
/** The classification VAT */
vat?: Maybe<Scalars['Float']>;
};
/** The classification IRS code */
export type mutation_addExpense_oneOf_0_accountingClassification_irsCode =
| '_1306'
| '_1307'
| '_1310'
| '_1320'
| '_1330'
| '_1340'
| '_1390'
| '_3011'
| '_3012'
| '_3015'
| '_3055'
| '_3060'
| '_3066'
| '_3067'
| '_3068'
| '_3070'
| '_3075'
| '_3080'
| '_3085'
| '_3090'
| '_3100'
| '_3120'
| '_3511'
| '_3512'
| '_3515'
| '_3520'
| '_3535'
| '_3540'
| '_3545'
| '_3550'
| '_3555'
| '_3560'
| '_3566'
| '_3567'
| '_3568'
| '_3570'
| '_3575'
| '_3580'
| '_3590'
| '_3595'
| '_3600'
| '_3620'
| '_3625'
| '_3640'
| '_3650'
| '_3660'
| '_3665'
| '_3680'
| '_5010'
| '_5090'
| '_8040'
| '_8050'
| '_8060'
| '_8080'
| '_8090';
/** Error */
export type ErrorResponse = {
errorCode?: Maybe<Scalars['Float']>;
errorMessage?: Maybe<Scalars['String']>;
};
export type getExpenseRequest_Input = {
/** The expense ID */
id: Scalars['String'];
};
export type updateExpenseResponse = GetExpense | ErrorResponse;
export type updateExpenseRequest_Input = {
/** The expense ID */
id: Scalars['String'];
paymentType?: InputMaybe<mutation_addExpense_oneOf_0_paymentType_Input>;
currency?: InputMaybe<Currency>;
/** Currency rate relative to ILS */
currencyRate?: InputMaybe<Scalars['Float']>;
/** The amount of the vat */
vat?: InputMaybe<Scalars['Float']>;
/** The total amount of the expense */
amount?: InputMaybe<Scalars['Float']>;
/** Date of the expense */
date?: InputMaybe<Scalars['String']>;
/** Due date of the expense */
dueDate?: InputMaybe<Scalars['String']>;
/** Reporting date of the expense */
reportingDate?: InputMaybe<Scalars['String']>;
documentType?: InputMaybe<mutation_addExpense_oneOf_0_documentType>;
/** Number of the expense */
number?: InputMaybe<Scalars['String']>;
/** Description for the expense */
description?: InputMaybe<Scalars['String']>;
remarks?: InputMaybe<Scalars['String']>;
supplier?: InputMaybe<Supplier_Input>;
accountingClassification?: InputMaybe<AccountingClassification_Input>;
/** Is the expense active or not */
active?: InputMaybe<Scalars['Boolean']>;
};
/** Payment method */
export type mutation_addExpense_oneOf_0_paymentType_Input = {
Boolean?: InputMaybe<Scalars['Boolean']>;
mutation_addExpense_oneOf_0_paymentType_oneOf_1?: InputMaybe<mutation_addExpense_oneOf_0_paymentType_oneOf_1>;
};
export type mutation_addExpense_oneOf_0_paymentType_oneOf_1 =
| '_1'
| '_2'
| '_3'
| '_4'
| '_5'
| '_10'
| '_11';
/** Document type */
export type mutation_addExpense_oneOf_0_documentType =
| '_20'
| '_305'
| '_320'
| '_330'
| '_400'
| '_405';
/** Supplier of the expense */
export type Supplier_Input = {
/** The supplier ID */
id?: InputMaybe<Scalars['String']>;
/** The supplier name */
name?: InputMaybe<Scalars['String']>;
/** Is the supplier active or not */
active?: InputMaybe<Scalars['Boolean']>;
/** The supplier tax ID */
taxId?: InputMaybe<Scalars['String']>;
paymentTerms?: InputMaybe<mutation_addExpense_oneOf_0_supplier_paymentTerms>;
/** The supplier bank name */
bankName?: InputMaybe<Scalars['String']>;
/** The supplier bank branch number */
bankBranch?: InputMaybe<Scalars['String']>;
/** The supplier bank account number */
bankAccount?: InputMaybe<Scalars['String']>;
country?: InputMaybe<Country>;
/** The supplier phone number */
phone?: InputMaybe<Scalars['String']>;
/** The supplier mobile number */
mobile?: InputMaybe<Scalars['String']>;
/** The supplier contact person name */
contactPerson?: InputMaybe<Scalars['String']>;
emails?: InputMaybe<Array<InputMaybe<Scalars['String']>>>;
labels?: InputMaybe<Array<InputMaybe<Scalars['String']>>>;
/** The creation date of the supplier, in UNIX timestamp format */
creationDate?: InputMaybe<Scalars['Int']>;
/** The last update date of the supplier, in UNIX timestamp format */
lastUpdateDate?: InputMaybe<Scalars['Int']>;
/** The supplier department */
department?: InputMaybe<Scalars['String']>;
/** The supplier accounting key */
accountingKey?: InputMaybe<Scalars['String']>;
/** The supplier address */
address?: InputMaybe<Scalars['String']>;
/** The supplier city */
city?: InputMaybe<Scalars['String']>;
/** The supplier zip code */
zip?: InputMaybe<Scalars['String']>;
/** The supplier fax number */
fax?: InputMaybe<Scalars['String']>;
/** The Supplier remarks for self use */
remarks?: InputMaybe<Scalars['String']>;
/** The amount of incomes from the customer */
incomeAmount?: InputMaybe<Scalars['Float']>;
paymentAmount?: InputMaybe<Scalars['Float']>;
/** The balance amount of the supplier */
balanceAmount?: InputMaybe<Scalars['Float']>;
};
/** Account classification of the expense */
export type AccountingClassification_Input = {
/** The classification ID, see 'Get Accounting Classifications' endpoint */
id?: InputMaybe<Scalars['String']>;
/** The classification key */
key?: InputMaybe<Scalars['String']>;
/** The classification code */
code?: InputMaybe<Scalars['String']>;
/** The classification title */
title?: InputMaybe<Scalars['String']>;
irsCode?: InputMaybe<mutation_addExpense_oneOf_0_accountingClassification_irsCode>;
/** The classification income */
income?: InputMaybe<Scalars['Float']>;
/** The classification type */
type?: InputMaybe<Scalars['Float']>;
/** The classification VAT */
vat?: InputMaybe<Scalars['Float']>;
};
export type searchExpensesResponse = {
/** The total length of the items that were retrieved */
total?: Maybe<Scalars['Float']>;
/** The page that was requested to retrieve */
page?: Maybe<Scalars['Float']>;
/** The page size that was requested */
pageSize?: Maybe<Scalars['Float']>;
/** The amount of pages that exist */
pages?: Maybe<Scalars['Float']>;
items?: Maybe<GetExpense>;
};
export type searchExpensesRequest_Input = {
/** Expense that were created after the specified date in the format YYYY-MM-DD */
fromDate?: InputMaybe<Scalars['String']>;
/** Expense that were created until the specified date in the format YYYY-MM-DD */
toDate?: InputMaybe<Scalars['String']>;
/** Due date of the expense, in the format YYYY-MM-DD */
dueDate?: InputMaybe<Scalars['String']>;
/** Expense description */
description?: InputMaybe<Scalars['String']>;
/** Supplier's ID */
supplierId?: InputMaybe<Scalars['String']>;
/** Supplier's name */
supplierName?: InputMaybe<Scalars['String']>;
/** Expense serial number */
number?: InputMaybe<Scalars['String']>;
/** Filter expenses that are only paid or unpaid, if not added to the request, will return both */
paid?: InputMaybe<Scalars['Boolean']>;
/** Filter expenses that are only reported or unreported, if not added to the request, will return both */
reported?: InputMaybe<Scalars['Boolean']>;
/** The field to sort the results by */
sort?: InputMaybe<Scalars['String']>;
/** Min amount of the expense */
minAmount: Scalars['Float'];
/** Max amount of the expense */
maxAmount: Scalars['Float'];
/** Page requested */
page: Scalars['Float'];
/** Results per page */
pageSize: Scalars['Float'];
};
export type searchExpenseDraftsResponse = {
/** The total length of the items that were retrieved */
total?: Maybe<Scalars['Float']>;
/** The page that was requested to retrieve */
page: Scalars['Float'];
/** The page size that was requested */
pageSize: Scalars['Float'];
/** The amount of pages that exist */
pages?: Maybe<Scalars['Float']>;
/** The expense drafts that were found */
items?: Maybe<Array<Maybe<query_searchExpenseDrafts_items_items>>>;
};
/** Partial Expense */
export type query_searchExpenseDrafts_items_items = {
currency?: Maybe<Currency>;
/** Currency rate relative to ILS */
currencyRate?: Maybe<Scalars['Float']>;
/** The amount of the vat */
vat?: Maybe<Scalars['Float']>;
/** The total amount of the expense */
amount?: Maybe<Scalars['Float']>;
/** Description for the expense */
description?: Maybe<Scalars['String']>;
supplier?: Maybe<Supplier>;
/** File hash */
fileHash?: Maybe<Scalars['String']>;
/** Key of the file location */
fileKey?: Maybe<Scalars['String']>;
};
export type searchExpenseDraftsRequest_Input = {
/** Expense drafts that were created after the specified date in the format YYYY-MM-DD */
fromDate?: InputMaybe<Scalars['String']>;
/** Expense drafts that were created until the specified date in the format YYYY-MM-DD */
toDate?: InputMaybe<Scalars['String']>;
/** Expense draft description */
description?: InputMaybe<Scalars['String']>;
/** Supplier's ID */
supplierId?: InputMaybe<Scalars['String']>;
/** Supplier's name */
supplierName?: InputMaybe<Scalars['String']>;
/** Page requested */
page?: InputMaybe<Scalars['Float']>;
/** Results per page */
pageSize?: InputMaybe<Scalars['Float']>;
};
export type Mutation = {
addExpense?: Maybe<addExpenseResponse>;
addExpenseDraftByFile?: Maybe<addExpenseDraftByFileResponse>;
};
export type MutationaddExpenseArgs = {
input: Expense_Input;
};
export type MutationaddExpenseDraftByFileArgs = {
input?: InputMaybe<addExpenseDraftByFileRequest_Input>;
};
export type addExpenseResponse = Expense | ErrorResponse;
/** A Single Expense */
export type Expense = {
paymentType?: Maybe<Scalars['mutation_addExpense_oneOf_0_paymentType']>;
currency: Currency;
/** Currency rate relative to ILS */
currencyRate?: Maybe<Scalars['Float']>;
/** The amount of the vat */
vat: Scalars['Float'];
/** The total amount of the expense */
amount: Scalars['Float'];
/** Date of the expense */
date: Scalars['String'];
/** Due date of the expense */
dueDate?: Maybe<Scalars['String']>;
/** Reporting date of the expense */
reportingDate: Scalars['String'];
documentType: mutation_addExpense_oneOf_0_documentType;
/** Number of the expense */
number: Scalars['String'];
/** Description for the expense */
description?: Maybe<Scalars['String']>;
remarks?: Maybe<Scalars['String']>;
supplier: Supplier;
accountingClassification: AccountingClassification;
/** Is the expense active or not */
active?: Maybe<Scalars['Boolean']>;
/** Should we save the supplier or not (by setting this to true you are required to add a supplier) */
addRecipient?: Maybe<Scalars['Boolean']>;
/** Should we save the accounting classification (by setting this to true you are required to add an accounting classification that contains title & irsCode) */
addAccountingClassification?: Maybe<Scalars['Boolean']>;
};
/** A Single Expense */
export type Expense_Input = {
paymentType?: InputMaybe<mutation_addExpense_oneOf_0_paymentType_Input>;
currency: Currency;
/** Currency rate relative to ILS */
currencyRate?: InputMaybe<Scalars['Float']>;
/** The amount of the vat */
vat: Scalars['Float'];
/** The total amount of the expense */
amount: Scalars['Float'];
/** Date of the expense */
date: Scalars['String'];
/** Due date of the expense */
dueDate?: InputMaybe<Scalars['String']>;
/** Reporting date of the expense */
reportingDate: Scalars['String'];
documentType: mutation_addExpense_oneOf_0_documentType;
/** Number of the expense */
number: Scalars['String'];
/** Description for the expense */
description?: InputMaybe<Scalars['String']>;
remarks?: InputMaybe<Scalars['String']>;
supplier: Supplier_Input;
accountingClassification: AccountingClassification_Input;
/** Is the expense active or not */
active?: InputMaybe<Scalars['Boolean']>;
/** Should we save the supplier or not (by setting this to true you are required to add a supplier) */
addRecipient?: InputMaybe<Scalars['Boolean']>;
/** Should we save the accounting classification (by setting this to true you are required to add an accounting classification that contains title & irsCode) */
addAccountingClassification?: InputMaybe<Scalars['Boolean']>;
};
export type addExpenseDraftByFileResponse = GetExpenseDraft | ErrorResponse;
export type GetExpenseDraft = {
/** The expense draft ID */
id?: Maybe<Scalars['String']>;
status?: Maybe<mutation_addExpenseDraftByFile_oneOf_0_status>;
/** The creation date of the expense draft, in UNIX timestamp format */
creationDate?: Maybe<Scalars['Int']>;
/** The last update date of the expense draft, in UNIX timestamp format */
lastUpdateDate?: Maybe<Scalars['Int']>;
expense?: Maybe<Expense>;
/** URL of expense thumbnail */
thumbnail?: Maybe<Scalars['String']>;
/** URL to download the expense thumbnail */
url?: Maybe<Scalars['String']>;
};
/** The status of the expense draft */
export type mutation_addExpenseDraftByFile_oneOf_0_status =
| '_10'
| '_50';
export type addExpenseDraftByFileRequest_Input = {
/** The file, in Base64, allowed types: GIF, PNG, JPG, SVG, PDF */
file?: InputMaybe<Scalars['String']>;
};
export type WithIndex<TObject> = TObject & Record<string, any>;
export type ResolversObject<TObject> = WithIndex<TObject>;
export type ResolverTypeWrapper<T> = Promise<T> | T;
export type ResolverWithResolve<TResult, TParent, TContext, TArgs> = {
resolve: ResolverFn<TResult, TParent, TContext, TArgs>;
};
export type Resolver<TResult, TParent = {}, TContext = {}, TArgs = {}> = ResolverFn<TResult, TParent, TContext, TArgs> | ResolverWithResolve<TResult, TParent, TContext, TArgs>;
export type ResolverFn<TResult, TParent, TContext, TArgs> = (
parent: TParent,
args: TArgs,
context: TContext,
info: GraphQLResolveInfo
) => Promise<TResult> | TResult;
export type SubscriptionSubscribeFn<TResult, TParent, TContext, TArgs> = (
parent: TParent,
args: TArgs,
context: TContext,
info: GraphQLResolveInfo
) => AsyncIterable<TResult> | Promise<AsyncIterable<TResult>>;
export type SubscriptionResolveFn<TResult, TParent, TContext, TArgs> = (
parent: TParent,
args: TArgs,
context: TContext,
info: GraphQLResolveInfo
) => TResult | Promise<TResult>;
export interface SubscriptionSubscriberObject<TResult, TKey extends string, TParent, TContext, TArgs> {
subscribe: SubscriptionSubscribeFn<{ [key in TKey]: TResult }, TParent, TContext, TArgs>;
resolve?: SubscriptionResolveFn<TResult, { [key in TKey]: TResult }, TContext, TArgs>;
}
export interface SubscriptionResolverObject<TResult, TParent, TContext, TArgs> {
subscribe: SubscriptionSubscribeFn<any, TParent, TContext, TArgs>;
resolve: SubscriptionResolveFn<TResult, any, TContext, TArgs>;
}
export type SubscriptionObject<TResult, TKey extends string, TParent, TContext, TArgs> =
| SubscriptionSubscriberObject<TResult, TKey, TParent, TContext, TArgs>
| SubscriptionResolverObject<TResult, TParent, TContext, TArgs>;
export type SubscriptionResolver<TResult, TKey extends string, TParent = {}, TContext = {}, TArgs = {}> =
| ((...args: any[]) => SubscriptionObject<TResult, TKey, TParent, TContext, TArgs>)
| SubscriptionObject<TResult, TKey, TParent, TContext, TArgs>;
export type TypeResolveFn<TTypes, TParent = {}, TContext = {}> = (
parent: TParent,
context: TContext,
info: GraphQLResolveInfo
) => Maybe<TTypes> | Promise<Maybe<TTypes>>;
export type IsTypeOfResolverFn<T = {}, TContext = {}> = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise<boolean>;
export type NextResolverFn<T> = () => Promise<T>;
export type DirectiveResolverFn<TResult = {}, TParent = {}, TContext = {}, TArgs = {}> = (
next: NextResolverFn<TResult>,
parent: TParent,
args: TArgs,
context: TContext,
info: GraphQLResolveInfo
) => TResult | Promise<TResult>;
/** Mapping between all available schema types and the resolvers types */
export type ResolversTypes = ResolversObject<{
Query: ResolverTypeWrapper<{}>;
ID: ResolverTypeWrapper<Scalars['ID']>;
getExpenseResponse: ResolversTypes['GetExpense'] | ResolversTypes['ErrorResponse'];
GetExpense: ResolverTypeWrapper<GetExpense>;
String: ResolverTypeWrapper<Scalars['String']>;
Float: ResolverTypeWrapper<Scalars['Float']>;
Boolean: ResolverTypeWrapper<Scalars['Boolean']>;
Int: ResolverTypeWrapper<Scalars['Int']>;
query_getExpense_oneOf_0_businessType: query_getExpense_oneOf_0_businessType;
query_getExpense_oneOf_0_documentType: query_getExpense_oneOf_0_documentType;
query_getExpense_oneOf_0_status: query_getExpense_oneOf_0_status;
query_getExpense_oneOf_0_paymentType: query_getExpense_oneOf_0_paymentType;
Currency: Currency;
Supplier: ResolverTypeWrapper<Supplier>;
mutation_addExpense_oneOf_0_supplier_paymentTerms: mutation_addExpense_oneOf_0_supplier_paymentTerms;
Country: Country;
AccountingClassification: ResolverTypeWrapper<AccountingClassification>;
mutation_addExpense_oneOf_0_accountingClassification_irsCode: mutation_addExpense_oneOf_0_accountingClassification_irsCode;
ErrorResponse: ResolverTypeWrapper<ErrorResponse>;
getExpenseRequest_Input: getExpenseRequest_Input;
updateExpenseResponse: ResolversTypes['GetExpense'] | ResolversTypes['ErrorResponse'];
updateExpenseRequest_Input: updateExpenseRequest_Input;
mutation_addExpense_oneOf_0_paymentType_Input: mutation_addExpense_oneOf_0_paymentType_Input;
mutation_addExpense_oneOf_0_paymentType_oneOf_1: mutation_addExpense_oneOf_0_paymentType_oneOf_1;
mutation_addExpense_oneOf_0_documentType: mutation_addExpense_oneOf_0_documentType;
Supplier_Input: Supplier_Input;
AccountingClassification_Input: AccountingClassification_Input;
searchExpensesResponse: ResolverTypeWrapper<searchExpensesResponse>;
searchExpensesRequest_Input: searchExpensesRequest_Input;
searchExpenseDraftsResponse: ResolverTypeWrapper<searchExpenseDraftsResponse>;
query_searchExpenseDrafts_items_items: ResolverTypeWrapper<query_searchExpenseDrafts_items_items>;
searchExpenseDraftsRequest_Input: searchExpenseDraftsRequest_Input;
Mutation: ResolverTypeWrapper<{}>;
addExpenseResponse: ResolversTypes['Expense'] | ResolversTypes['ErrorResponse'];
Expense: ResolverTypeWrapper<Expense>;
mutation_addExpense_oneOf_0_paymentType: ResolverTypeWrapper<Scalars['mutation_addExpense_oneOf_0_paymentType']>;
Expense_Input: Expense_Input;
addExpenseDraftByFileResponse: ResolversTypes['GetExpenseDraft'] | ResolversTypes['ErrorResponse'];
GetExpenseDraft: ResolverTypeWrapper<GetExpenseDraft>;
mutation_addExpenseDraftByFile_oneOf_0_status: mutation_addExpenseDraftByFile_oneOf_0_status;
addExpenseDraftByFileRequest_Input: addExpenseDraftByFileRequest_Input;
}>;
/** Mapping between all available schema types and the resolvers parents */
export type ResolversParentTypes = ResolversObject<{
Query: {};
ID: Scalars['ID'];
getExpenseResponse: ResolversParentTypes['GetExpense'] | ResolversParentTypes['ErrorResponse'];
GetExpense: GetExpense;
String: Scalars['String'];
Float: Scalars['Float'];
Boolean: Scalars['Boolean'];
Int: Scalars['Int'];
Supplier: Supplier;
AccountingClassification: AccountingClassification;
ErrorResponse: ErrorResponse;
getExpenseRequest_Input: getExpenseRequest_Input;
updateExpenseResponse: ResolversParentTypes['GetExpense'] | ResolversParentTypes['ErrorResponse'];
updateExpenseRequest_Input: updateExpenseRequest_Input;
mutation_addExpense_oneOf_0_paymentType_Input: mutation_addExpense_oneOf_0_paymentType_Input;
Supplier_Input: Supplier_Input;
AccountingClassification_Input: AccountingClassification_Input;
searchExpensesResponse: searchExpensesResponse;
searchExpensesRequest_Input: searchExpensesRequest_Input;
searchExpenseDraftsResponse: searchExpenseDraftsResponse;
query_searchExpenseDrafts_items_items: query_searchExpenseDrafts_items_items;
searchExpenseDraftsRequest_Input: searchExpenseDraftsRequest_Input;
Mutation: {};
addExpenseResponse: ResolversParentTypes['Expense'] | ResolversParentTypes['ErrorResponse'];
Expense: Expense;
mutation_addExpense_oneOf_0_paymentType: Scalars['mutation_addExpense_oneOf_0_paymentType'];
Expense_Input: Expense_Input;
addExpenseDraftByFileResponse: ResolversParentTypes['GetExpenseDraft'] | ResolversParentTypes['ErrorResponse'];
GetExpenseDraft: GetExpenseDraft;
addExpenseDraftByFileRequest_Input: addExpenseDraftByFileRequest_Input;
}>;
export type oneOfDirectiveArgs = { };
export type oneOfDirectiveResolver<Result, Parent, ContextType = MeshContext, Args = oneOfDirectiveArgs> = DirectiveResolverFn<Result, Parent, ContextType, Args>;
export type QueryResolvers<ContextType = MeshContext, ParentType extends ResolversParentTypes['Query'] = ResolversParentTypes['Query']> = ResolversObject<{
getExpense?: Resolver<Maybe<ResolversTypes['getExpenseResponse']>, ParentType, ContextType, RequireFields<QuerygetExpenseArgs, 'input'>>;
updateExpense?: Resolver<Maybe<ResolversTypes['updateExpenseResponse']>, ParentType, ContextType, RequireFields<QueryupdateExpenseArgs, 'input'>>;
searchExpenses?: Resolver<Maybe<ResolversTypes['searchExpensesResponse']>, ParentType, ContextType, RequireFields<QuerysearchExpensesArgs, 'input'>>;
searchExpenseDrafts?: Resolver<Maybe<ResolversTypes['searchExpenseDraftsResponse']>, ParentType, ContextType, Partial<QuerysearchExpenseDraftsArgs>>;
}>;
export type getExpenseResponseResolvers<ContextType = MeshContext, ParentType extends ResolversParentTypes['getExpenseResponse'] = ResolversParentTypes['getExpenseResponse']> = ResolversObject<{
__resolveType: TypeResolveFn<'GetExpense' | 'ErrorResponse', ParentType, ContextType>;
}>;
export type GetExpenseResolvers<ContextType = MeshContext, ParentType extends ResolversParentTypes['GetExpense'] = ResolversParentTypes['GetExpense']> = ResolversObject<{
id?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
businessType?: Resolver<Maybe<ResolversTypes['query_getExpense_oneOf_0_businessType']>, ParentType, ContextType>;
documentType?: Resolver<Maybe<ResolversTypes['query_getExpense_oneOf_0_documentType']>, ParentType, ContextType>;
status?: Resolver<Maybe<ResolversTypes['query_getExpense_oneOf_0_status']>, ParentType, ContextType>;
paymentType?: Resolver<Maybe<ResolversTypes['query_getExpense_oneOf_0_paymentType']>, ParentType, ContextType>;
currency?: Resolver<Maybe<ResolversTypes['Currency']>, ParentType, ContextType>;
currencyRate?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
amountExcludeVat?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
vat?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
amount?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
date?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
dueDate?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
number?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
active?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
description?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
remarks?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
supplier?: Resolver<Maybe<ResolversTypes['Supplier']>, ParentType, ContextType>;
thumbnail?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
url?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
cancellable?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
reportingDate?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
accountingClassification?: Resolver<Maybe<ResolversTypes['AccountingClassification']>, ParentType, ContextType>;
amountLocal?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
amountAccounting?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
vatAccounting?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
creationDate?: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>;
lastUpdateDate?: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
}>;
export type query_getExpense_oneOf_0_businessTypeResolvers = { _1: 1, _2: 2, _3: 3, _4: 4, _5: 5, _6: 6 };
export type query_getExpense_oneOf_0_documentTypeResolvers = { _20: 20, _305: 305, _320: 320, _330: 330, _400: 400, _405: 405 };
export type query_getExpense_oneOf_0_statusResolvers = { _10: 10, _20: 20, _30: 30, _100: 100 };
export type query_getExpense_oneOf_0_paymentTypeResolvers = { NEGATIVE_1: -1, _0: '0', _1: 1, _2: 2, _3: 3, _4: 4, _5: 5, _10: 10, _11: 11 };
export type SupplierResolvers<ContextType = MeshContext, ParentType extends ResolversParentTypes['Supplier'] = ResolversParentTypes['Supplier']> = ResolversObject<{
id?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
name?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
active?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
taxId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
paymentTerms?: Resolver<Maybe<ResolversTypes['mutation_addExpense_oneOf_0_supplier_paymentTerms']>, ParentType, ContextType>;
bankName?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
bankBranch?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
bankAccount?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
country?: Resolver<Maybe<ResolversTypes['Country']>, ParentType, ContextType>;
phone?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
mobile?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
contactPerson?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
emails?: Resolver<Maybe<Array<Maybe<ResolversTypes['String']>>>, ParentType, ContextType>;
labels?: Resolver<Maybe<Array<Maybe<ResolversTypes['String']>>>, ParentType, ContextType>;
creationDate?: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>;
lastUpdateDate?: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>;
department?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
accountingKey?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
address?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
city?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
zip?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
fax?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
remarks?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
incomeAmount?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
paymentAmount?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
balanceAmount?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
}>;
export type mutation_addExpense_oneOf_0_supplier_paymentTermsResolvers = { NEGATIVE_1: -1, _0: '0', _10: 10, _15: 15, _30: 30, _45: 45, _60: 60, _75: 75, _90: 90, _120: 120 };
export type AccountingClassificationResolvers<ContextType = MeshContext, ParentType extends ResolversParentTypes['AccountingClassification'] = ResolversParentTypes['AccountingClassification']> = ResolversObject<{
id?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
key?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
code?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
title?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
irsCode?: Resolver<Maybe<ResolversTypes['mutation_addExpense_oneOf_0_accountingClassification_irsCode']>, ParentType, ContextType>;
income?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
type?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
vat?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
}>;
export type mutation_addExpense_oneOf_0_accountingClassification_irsCodeResolvers = { _1306: 1306, _1307: 1307, _1310: 1310, _1320: 1320, _1330: 1330, _1340: 1340, _1390: 1390, _3011: 3011, _3012: 3012, _3015: 3015, _3055: 3055, _3060: 3060, _3066: 3066, _3067: 3067, _3068: 3068, _3070: 3070, _3075: 3075, _3080: 3080, _3085: 3085, _3090: 3090, _3100: 3100, _3120: 3120, _3511: 3511, _3512: 3512, _3515: 3515, _3520: 3520, _3535: 3535, _3540: 3540, _3545: 3545, _3550: 3550, _3555: 3555, _3560: 3560, _3566: 3566, _3567: 3567, _3568: 3568, _3570: 3570, _3575: 3575, _3580: 3580, _3590: 3590, _3595: 3595, _3600: 3600, _3620: 3620, _3625: 3625, _3640: 3640, _3650: 3650, _3660: 3660, _3665: 3665, _3680: 3680, _5010: 5010, _5090: 5090, _8040: 8040, _8050: 8050, _8060: 8060, _8080: 8080, _8090: 8090 };
export type ErrorResponseResolvers<ContextType = MeshContext, ParentType extends ResolversParentTypes['ErrorResponse'] = ResolversParentTypes['ErrorResponse']> = ResolversObject<{
errorCode?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
errorMessage?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
}>;
export type updateExpenseResponseResolvers<ContextType = MeshContext, ParentType extends ResolversParentTypes['updateExpenseResponse'] = ResolversParentTypes['updateExpenseResponse']> = ResolversObject<{
__resolveType: TypeResolveFn<'GetExpense' | 'ErrorResponse', ParentType, ContextType>;
}>;
export type mutation_addExpense_oneOf_0_paymentType_oneOf_1Resolvers = { _1: 1, _2: 2, _3: 3, _4: 4, _5: 5, _10: 10, _11: 11 };
export type mutation_addExpense_oneOf_0_documentTypeResolvers = { _20: 20, _305: 305, _320: 320, _330: 330, _400: 400, _405: 405 };
export type searchExpensesResponseResolvers<ContextType = MeshContext, ParentType extends ResolversParentTypes['searchExpensesResponse'] = ResolversParentTypes['searchExpensesResponse']> = ResolversObject<{
total?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
page?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
pageSize?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
pages?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
items?: Resolver<Maybe<ResolversTypes['GetExpense']>, ParentType, ContextType>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
}>;
export type searchExpenseDraftsResponseResolvers<ContextType = MeshContext, ParentType extends ResolversParentTypes['searchExpenseDraftsResponse'] = ResolversParentTypes['searchExpenseDraftsResponse']> = ResolversObject<{
total?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
page?: Resolver<ResolversTypes['Float'], ParentType, ContextType>;
pageSize?: Resolver<ResolversTypes['Float'], ParentType, ContextType>;
pages?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
items?: Resolver<Maybe<Array<Maybe<ResolversTypes['query_searchExpenseDrafts_items_items']>>>, ParentType, ContextType>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
}>;
export type query_searchExpenseDrafts_items_itemsResolvers<ContextType = MeshContext, ParentType extends ResolversParentTypes['query_searchExpenseDrafts_items_items'] = ResolversParentTypes['query_searchExpenseDrafts_items_items']> = ResolversObject<{
currency?: Resolver<Maybe<ResolversTypes['Currency']>, ParentType, ContextType>;
currencyRate?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
vat?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
amount?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
description?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
supplier?: Resolver<Maybe<ResolversTypes['Supplier']>, ParentType, ContextType>;
fileHash?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
fileKey?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
}>;
export type MutationResolvers<ContextType = MeshContext, ParentType extends ResolversParentTypes['Mutation'] = ResolversParentTypes['Mutation']> = ResolversObject<{
addExpense?: Resolver<Maybe<ResolversTypes['addExpenseResponse']>, ParentType, ContextType, RequireFields<MutationaddExpenseArgs, 'input'>>;
addExpenseDraftByFile?: Resolver<Maybe<ResolversTypes['addExpenseDraftByFileResponse']>, ParentType, ContextType, Partial<MutationaddExpenseDraftByFileArgs>>;
}>;
export type addExpenseResponseResolvers<ContextType = MeshContext, ParentType extends ResolversParentTypes['addExpenseResponse'] = ResolversParentTypes['addExpenseResponse']> = ResolversObject<{
__resolveType: TypeResolveFn<'Expense' | 'ErrorResponse', ParentType, ContextType>;
}>;
export type ExpenseResolvers<ContextType = MeshContext, ParentType extends ResolversParentTypes['Expense'] = ResolversParentTypes['Expense']> = ResolversObject<{
paymentType?: Resolver<Maybe<ResolversTypes['mutation_addExpense_oneOf_0_paymentType']>, ParentType, ContextType>;
currency?: Resolver<ResolversTypes['Currency'], ParentType, ContextType>;
currencyRate?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
vat?: Resolver<ResolversTypes['Float'], ParentType, ContextType>;
amount?: Resolver<ResolversTypes['Float'], ParentType, ContextType>;
date?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
dueDate?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
reportingDate?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
documentType?: Resolver<ResolversTypes['mutation_addExpense_oneOf_0_documentType'], ParentType, ContextType>;
number?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
description?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
remarks?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
supplier?: Resolver<ResolversTypes['Supplier'], ParentType, ContextType>;
accountingClassification?: Resolver<ResolversTypes['AccountingClassification'], ParentType, ContextType>;
active?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
addRecipient?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
addAccountingClassification?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
}>;
export interface mutation_addExpense_oneOf_0_paymentTypeScalarConfig extends GraphQLScalarTypeConfig<ResolversTypes['mutation_addExpense_oneOf_0_paymentType'], any> {
name: 'mutation_addExpense_oneOf_0_paymentType';
}
export type addExpenseDraftByFileResponseResolvers<ContextType = MeshContext, ParentType extends ResolversParentTypes['addExpenseDraftByFileResponse'] = ResolversParentTypes['addExpenseDraftByFileResponse']> = ResolversObject<{
__resolveType: TypeResolveFn<'GetExpenseDraft' | 'ErrorResponse', ParentType, ContextType>;
}>;
export type GetExpenseDraftResolvers<ContextType = MeshContext, ParentType extends ResolversParentTypes['GetExpenseDraft'] = ResolversParentTypes['GetExpenseDraft']> = ResolversObject<{
id?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
status?: Resolver<Maybe<ResolversTypes['mutation_addExpenseDraftByFile_oneOf_0_status']>, ParentType, ContextType>;
creationDate?: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>;
lastUpdateDate?: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>;
expense?: Resolver<Maybe<ResolversTypes['Expense']>, ParentType, ContextType>;
thumbnail?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
url?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
}>;
export type mutation_addExpenseDraftByFile_oneOf_0_statusResolvers = { _10: 10, _50: 50 };
export type Resolvers<ContextType = MeshContext> = ResolversObject<{
Query?: QueryResolvers<ContextType>;
getExpenseResponse?: getExpenseResponseResolvers<ContextType>;
GetExpense?: GetExpenseResolvers<ContextType>;
query_getExpense_oneOf_0_businessType?: query_getExpense_oneOf_0_businessTypeResolvers;
query_getExpense_oneOf_0_documentType?: query_getExpense_oneOf_0_documentTypeResolvers;
query_getExpense_oneOf_0_status?: query_getExpense_oneOf_0_statusResolvers;
query_getExpense_oneOf_0_paymentType?: query_getExpense_oneOf_0_paymentTypeResolvers;
Supplier?: SupplierResolvers<ContextType>;
mutation_addExpense_oneOf_0_supplier_paymentTerms?: mutation_addExpense_oneOf_0_supplier_paymentTermsResolvers;
AccountingClassification?: AccountingClassificationResolvers<ContextType>;
mutation_addExpense_oneOf_0_accountingClassification_irsCode?: mutation_addExpense_oneOf_0_accountingClassification_irsCodeResolvers;
ErrorResponse?: ErrorResponseResolvers<ContextType>;
updateExpenseResponse?: updateExpenseResponseResolvers<ContextType>;
mutation_addExpense_oneOf_0_paymentType_oneOf_1?: mutation_addExpense_oneOf_0_paymentType_oneOf_1Resolvers;
mutation_addExpense_oneOf_0_documentType?: mutation_addExpense_oneOf_0_documentTypeResolvers;
searchExpensesResponse?: searchExpensesResponseResolvers<ContextType>;
searchExpenseDraftsResponse?: searchExpenseDraftsResponseResolvers<ContextType>;
query_searchExpenseDrafts_items_items?: query_searchExpenseDrafts_items_itemsResolvers<ContextType>;
Mutation?: MutationResolvers<ContextType>;
addExpenseResponse?: addExpenseResponseResolvers<ContextType>;
Expense?: ExpenseResolvers<ContextType>;
mutation_addExpense_oneOf_0_paymentType?: GraphQLScalarType;
addExpenseDraftByFileResponse?: addExpenseDraftByFileResponseResolvers<ContextType>;
GetExpenseDraft?: GetExpenseDraftResolvers<ContextType>;
mutation_addExpenseDraftByFile_oneOf_0_status?: mutation_addExpenseDraftByFile_oneOf_0_statusResolvers;
}>;
export type DirectiveResolvers<ContextType = MeshContext> = ResolversObject<{
oneOf?: oneOfDirectiveResolver<any, any, ContextType>;
}>;
import { MeshContext as BaseMeshContext, MeshInstance } from '@graphql-mesh/runtime';
import { InContextSdkMethod } from '@graphql-mesh/types';
export namespace GreenInvoiceTypes {
export type Maybe<T> = T | null;
export type InputMaybe<T> = Maybe<T>;
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
/** The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID. */
ID: string;
/** The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. */
String: string;
/** The `Boolean` scalar type represents `true` or `false`. */
Boolean: boolean;
/** The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. */
Int: number;
/** The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). */
Float: number;
/** Payment method */
mutation_addExpense_oneOf_0_paymentType: any;
};
export type Query = {
getExpense?: Maybe<getExpenseResponse>;
updateExpense?: Maybe<updateExpenseResponse>;
searchExpenses?: Maybe<searchExpensesResponse>;
searchExpenseDrafts?: Maybe<searchExpenseDraftsResponse>;
};
export type QuerygetExpenseArgs = {
input: getExpenseRequest_Input;
id?: InputMaybe<Scalars['ID']>;
};
export type QueryupdateExpenseArgs = {
input: updateExpenseRequest_Input;
id?: InputMaybe<Scalars['ID']>;
};
export type QuerysearchExpensesArgs = {
input: searchExpensesRequest_Input;
};
export type QuerysearchExpenseDraftsArgs = {
input?: InputMaybe<searchExpenseDraftsRequest_Input>;
};
export type getExpenseResponse = GetExpense | ErrorResponse;
/** A Single Expense */
export type GetExpense = {
/** The expense ID */
id?: Maybe<Scalars['String']>;
businessType?: Maybe<query_getExpense_oneOf_0_businessType>;
documentType?: Maybe<query_getExpense_oneOf_0_documentType>;
status?: Maybe<query_getExpense_oneOf_0_status>;
paymentType?: Maybe<query_getExpense_oneOf_0_paymentType>;
currency?: Maybe<Currency>;
/** Currency rate relative to ILS */
currencyRate?: Maybe<Scalars['Float']>;
/** The amount excluding the vat */
amountExcludeVat?: Maybe<Scalars['Float']>;
/** The amount of the vat */
vat?: Maybe<Scalars['Float']>;
/** The total amount of the expense */
amount?: Maybe<Scalars['Float']>;
/** Date of the expense */
date?: Maybe<Scalars['String']>;
/** Due date of the expense */
dueDate?: Maybe<Scalars['String']>;
/** Number of the expense */
number?: Maybe<Scalars['String']>;
/** Is the expense currently active or not */
active?: Maybe<Scalars['Boolean']>;
/** Description for the expense */
description?: Maybe<Scalars['String']>;
/** Remarks for the expense */
remarks?: Maybe<Scalars['String']>;
supplier?: Maybe<Supplier>;
/** URL of expense thumbnail */
thumbnail?: Maybe<Scalars['String']>;
/** URL to download the expense thumbnail */
url?: Maybe<Scalars['String']>;
/** Is the supplier currently active or not */
cancellable?: Maybe<Scalars['Boolean']>;
/** Reporting date of the expense */
reportingDate?: Maybe<Scalars['String']>;
accountingClassification?: Maybe<AccountingClassification>;
/** The local amount of the expense */
amountLocal?: Maybe<Scalars['Float']>;
/** The amount of accounting */
amountAccounting?: Maybe<Scalars['Float']>;
/** The vat amount of accounting */
vatAccounting?: Maybe<Scalars['Float']>;
/** The creation date of the expense, in UNIX timestamp format */
creationDate?: Maybe<Scalars['Int']>;
/** The last update date of the expense, in UNIX timestamp format */
lastUpdateDate?: Maybe<Scalars['Int']>;
};
/** The business type ID */
export type query_getExpense_oneOf_0_businessType =
| '_1'
| '_2'
| '_3'
| '_4'
| '_5'
| '_6';
/** The type of the expense */
export type query_getExpense_oneOf_0_documentType =
| '_20'
| '_305'
| '_320'
| '_330'
| '_400'
| '_405';
/** The status of the expense */
export type query_getExpense_oneOf_0_status =
| '_10'
| '_20'
| '_30'
| '_100';
/** Payment method */
export type query_getExpense_oneOf_0_paymentType =
| 'NEGATIVE_1'
| '_0'
| '_1'
| '_2'
| '_3'
| '_4'
| '_5'
| '_10'
| '_11';
/** 3-letter ISO item currency code */
export type Currency =
| 'ILS'
| 'USD'
| 'EUR'
| 'GBP'
| 'JPY'
| 'CHF'
| 'CNY'
| 'AUD'
| 'CAD'
| 'RUB'
| 'BRL'
| 'HKD'
| 'SGD'
| 'THB'
| 'MXN'
| 'TRY'
| 'NZD'
| 'SEK'
| 'NOK'
| 'DKK'
| 'KRW'
| 'INR'
| 'IDR'
| 'PLN'
| 'RON'
| 'ZAR'
| 'HRK';
/** Supplier of the expense */
export type Supplier = {
/** The supplier ID */
id?: Maybe<Scalars['String']>;
/** The supplier name */
name?: Maybe<Scalars['String']>;
/** Is the supplier active or not */
active?: Maybe<Scalars['Boolean']>;
/** The supplier tax ID */
taxId?: Maybe<Scalars['String']>;
paymentTerms?: Maybe<mutation_addExpense_oneOf_0_supplier_paymentTerms>;
/** The supplier bank name */
bankName?: Maybe<Scalars['String']>;
/** The supplier bank branch number */
bankBranch?: Maybe<Scalars['String']>;
/** The supplier bank account number */
bankAccount?: Maybe<Scalars['String']>;
country?: Maybe<Country>;
/** The supplier phone number */
phone?: Maybe<Scalars['String']>;
/** The supplier mobile number */
mobile?: Maybe<Scalars['String']>;
/** The supplier contact person name */
contactPerson?: Maybe<Scalars['String']>;
emails?: Maybe<Array<Maybe<Scalars['String']>>>;
labels?: Maybe<Array<Maybe<Scalars['String']>>>;
/** The creation date of the supplier, in UNIX timestamp format */
creationDate?: Maybe<Scalars['Int']>;
/** The last update date of the supplier, in UNIX timestamp format */
lastUpdateDate?: Maybe<Scalars['Int']>;
/** The supplier department */
department?: Maybe<Scalars['String']>;
/** The supplier accounting key */
accountingKey?: Maybe<Scalars['String']>;
/** The supplier address */
address?: Maybe<Scalars['String']>;
/** The supplier city */
city?: Maybe<Scalars['String']>;
/** The supplier zip code */
zip?: Maybe<Scalars['String']>;
/** The supplier fax number */
fax?: Maybe<Scalars['String']>;
/** The Supplier remarks for self use */
remarks?: Maybe<Scalars['String']>;
/** The amount of incomes from the customer */
incomeAmount?: Maybe<Scalars['Float']>;
paymentAmount?: Maybe<Scalars['Float']>;
/** The balance amount of the supplier */
balanceAmount?: Maybe<Scalars['Float']>;
};
/** The supplier payment term, default is 0 */
export type mutation_addExpense_oneOf_0_supplier_paymentTerms =
| 'NEGATIVE_1'
| '_0'
| '_10'
| '_15'
| '_30'
| '_45'
| '_60'
| '_75'
| '_90'
| '_120';
/** 2-letter ISO supplier country code, default is IL */
export type Country =
| 'UG'
| 'UZ'
| 'AT'
| 'AU'
| 'UA'
| 'UY'
| 'AZ'
| 'CX'
| 'AE'
| 'IT'
| 'BS'
| 'GS'
| 'UM'
| 'VI'
| 'VG'
| 'HM'
| 'TC'
| 'MP'
| 'MH'
| 'SB'
| 'FO'
| 'FK'
| 'FJ'
| 'KM'
| 'CK'
| 'CC'
| 'KY'
| 'ID'
| 'IS'
| 'IE'
| 'IR'
| 'SV'
| 'AL'
| 'DZ'
| 'AX'
| 'AO'
| 'AI'
| 'AD'
| 'AQ'
| 'AG'
| 'EE'
| 'AF'
| 'EC'
| 'AR'
| 'US'
| 'AW'
| 'ER'
| 'AM'
| 'ET'
| 'BT'
| 'BV'
| 'BW'
| 'BG'
| 'BO'
| 'BA'
| 'BI'
| 'BF'
| 'BH'
| 'BY'
| 'BE'
| 'BZ'
| 'BD'
| 'BJ'
| 'BB'
| 'BN'
| 'BR'
| 'GB'
| 'BM'
| 'DJ'
| 'JM'
| 'JE'
| 'GA'
| 'GE'
| 'GH'
| 'GT'
| 'GU'
| 'GP'
| 'GY'
| 'GI'
| 'GN'
| 'GW'
| 'GQ'
| 'GF'
| 'GM'
| 'GL'
| 'DE'
| 'GD'
| 'GG'
| 'DM'
| 'DK'
| 'ZA'
| 'SS'
| 'KR'
| 'IM'
| 'NF'
| 'HT'
| 'MV'
| 'BQ'
| 'IN'
| 'NL'
| 'HK'
| 'HU'
| 'HN'
| 'IO'
| 'TF'
| 'PH'
| 'DO'
| 'CD'
| 'CF'
| 'PS'
| 'WF'
| 'VN'
| 'VU'
| 'VE'
| 'VA'
| 'ZW'
| 'ZM'
| 'CI'
| 'TJ'
| 'TV'
| 'TG'
| 'TO'
| 'TN'
| 'TK'
| 'TR'
| 'TM'
| 'TW'
| 'TZ'
| 'TT'
| 'GR'
| 'JP'
| 'JO'
| 'IL'
| 'KW'
| 'CV'
| 'LA'
| 'LB'
| 'LY'
| 'LU'
| 'LV'
| 'LR'
| 'LT'
| 'LI'
| 'LS'
| 'MR'
| 'MU'
| 'ML'
| 'MG'
| 'MZ'
| 'MD'
| 'MN'
| 'ME'
| 'MS'
| 'MC'
| 'TL'
| 'MM'
| 'YT'
| 'FM'
| 'MW'
| 'MY'
| 'MT'
| 'EG'
| 'MO'
| 'MK'
| 'MX'
| 'MA'
| 'MQ'
| 'NR'
| 'NO'
| 'NG'
| 'NZ'
| 'NU'
| 'NE'
| 'NI'
| 'NA'
| 'NP'
| 'ST'
| 'SJ'
| 'EH'
| 'SD'
| 'SZ'
| 'SO'
| 'SY'
| 'SR'
| 'SL'
| 'SC'
| 'CN'
| 'SG'
| 'SI'
| 'SK'
| 'WS'
| 'AS'
| 'BL'
| 'MF'
| 'SM'
| 'PM'
| 'SN'
| 'SH'
| 'VC'
| 'LC'
| 'SX'
| 'KN'
| 'SA'
| 'ES'
| 'RS'
| 'LK'
| 'OM'
| 'IQ'
| 'PW'
| 'PL'
| 'PF'
| 'PR'
| 'PT'
| 'PN'
| 'FI'
| 'PA'
| 'PG'
| 'PK'
| 'PY'
| 'PE'
| 'TD'
| 'CL'
| 'CZ'
| 'KP'
| 'FR'
| 'CU'
| 'CO'
| 'CG'
| 'XK'
| 'CR'
| 'CW'
| 'KZ'
| 'QA'
| 'KG'
| 'KI'
| 'NC'
| 'KH'
| 'CM'
| 'CA'
| 'KE'
| 'CY'
| 'HR'
| 'RE'
| 'RW'
| 'RO'
| 'RU'
| 'SE'
| 'CH'
| 'TH'
| 'YE';
/** Account classification of the expense */
export type AccountingClassification = {
/** The classification ID, see 'Get Accounting Classifications' endpoint */
id?: Maybe<Scalars['String']>;
/** The classification key */
key?: Maybe<Scalars['String']>;
/** The classification code */
code?: Maybe<Scalars['String']>;
/** The classification title */
title?: Maybe<Scalars['String']>;
irsCode?: Maybe<mutation_addExpense_oneOf_0_accountingClassification_irsCode>;
/** The classification income */
income?: Maybe<Scalars['Float']>;
/** The classification type */
type?: Maybe<Scalars['Float']>;
/** The classification VAT */
vat?: Maybe<Scalars['Float']>;
};
/** The classification IRS code */
export type mutation_addExpense_oneOf_0_accountingClassification_irsCode =
| '_1306'
| '_1307'
| '_1310'
| '_1320'
| '_1330'
| '_1340'
| '_1390'
| '_3011'
| '_3012'
| '_3015'
| '_3055'
| '_3060'
| '_3066'
| '_3067'
| '_3068'
| '_3070'
| '_3075'
| '_3080'
| '_3085'
| '_3090'
| '_3100'
| '_3120'
| '_3511'
| '_3512'
| '_3515'
| '_3520'
| '_3535'
| '_3540'
| '_3545'
| '_3550'
| '_3555'
| '_3560'
| '_3566'
| '_3567'
| '_3568'
| '_3570'
| '_3575'
| '_3580'
| '_3590'
| '_3595'
| '_3600'
| '_3620'
| '_3625'
| '_3640'
| '_3650'
| '_3660'
| '_3665'
| '_3680'
| '_5010'
| '_5090'
| '_8040'
| '_8050'
| '_8060'
| '_8080'
| '_8090';
/** Error */
export type ErrorResponse = {
errorCode?: Maybe<Scalars['Float']>;
errorMessage?: Maybe<Scalars['String']>;
};
export type getExpenseRequest_Input = {
/** The expense ID */
id: Scalars['String'];
};
export type updateExpenseResponse = GetExpense | ErrorResponse;
export type updateExpenseRequest_Input = {
/** The expense ID */
id: Scalars['String'];
paymentType?: InputMaybe<mutation_addExpense_oneOf_0_paymentType_Input>;
currency?: InputMaybe<Currency>;
/** Currency rate relative to ILS */
currencyRate?: InputMaybe<Scalars['Float']>;
/** The amount of the vat */
vat?: InputMaybe<Scalars['Float']>;
/** The total amount of the expense */
amount?: InputMaybe<Scalars['Float']>;
/** Date of the expense */
date?: InputMaybe<Scalars['String']>;
/** Due date of the expense */
dueDate?: InputMaybe<Scalars['String']>;
/** Reporting date of the expense */
reportingDate?: InputMaybe<Scalars['String']>;
documentType?: InputMaybe<mutation_addExpense_oneOf_0_documentType>;
/** Number of the expense */
number?: InputMaybe<Scalars['String']>;
/** Description for the expense */
description?: InputMaybe<Scalars['String']>;
remarks?: InputMaybe<Scalars['String']>;
supplier?: InputMaybe<Supplier_Input>;
accountingClassification?: InputMaybe<AccountingClassification_Input>;
/** Is the expense active or not */
active?: InputMaybe<Scalars['Boolean']>;
};
/** Payment method */
export type mutation_addExpense_oneOf_0_paymentType_Input = {
Boolean?: InputMaybe<Scalars['Boolean']>;
mutation_addExpense_oneOf_0_paymentType_oneOf_1?: InputMaybe<mutation_addExpense_oneOf_0_paymentType_oneOf_1>;
};
export type mutation_addExpense_oneOf_0_paymentType_oneOf_1 =
| '_1'
| '_2'
| '_3'
| '_4'
| '_5'
| '_10'
| '_11';
/** Document type */
export type mutation_addExpense_oneOf_0_documentType =
| '_20'
| '_305'
| '_320'
| '_330'
| '_400'
| '_405';
/** Supplier of the expense */
export type Supplier_Input = {
/** The supplier ID */
id?: InputMaybe<Scalars['String']>;
/** The supplier name */
name?: InputMaybe<Scalars['String']>;
/** Is the supplier active or not */
active?: InputMaybe<Scalars['Boolean']>;
/** The supplier tax ID */
taxId?: InputMaybe<Scalars['String']>;
paymentTerms?: InputMaybe<mutation_addExpense_oneOf_0_supplier_paymentTerms>;
/** The supplier bank name */
bankName?: InputMaybe<Scalars['String']>;
/** The supplier bank branch number */
bankBranch?: InputMaybe<Scalars['String']>;
/** The supplier bank account number */
bankAccount?: InputMaybe<Scalars['String']>;
country?: InputMaybe<Country>;
/** The supplier phone number */
phone?: InputMaybe<Scalars['String']>;
/** The supplier mobile number */
mobile?: InputMaybe<Scalars['String']>;
/** The supplier contact person name */
contactPerson?: InputMaybe<Scalars['String']>;
emails?: InputMaybe<Array<InputMaybe<Scalars['String']>>>;
labels?: InputMaybe<Array<InputMaybe<Scalars['String']>>>;
/** The creation date of the supplier, in UNIX timestamp format */
creationDate?: InputMaybe<Scalars['Int']>;
/** The last update date of the supplier, in UNIX timestamp format */
lastUpdateDate?: InputMaybe<Scalars['Int']>;
/** The supplier department */
department?: InputMaybe<Scalars['String']>;
/** The supplier accounting key */
accountingKey?: InputMaybe<Scalars['String']>;
/** The supplier address */
address?: InputMaybe<Scalars['String']>;
/** The supplier city */
city?: InputMaybe<Scalars['String']>;
/** The supplier zip code */
zip?: InputMaybe<Scalars['String']>;
/** The supplier fax number */
fax?: InputMaybe<Scalars['String']>;
/** The Supplier remarks for self use */
remarks?: InputMaybe<Scalars['String']>;
/** The amount of incomes from the customer */
incomeAmount?: InputMaybe<Scalars['Float']>;
paymentAmount?: InputMaybe<Scalars['Float']>;
/** The balance amount of the supplier */
balanceAmount?: InputMaybe<Scalars['Float']>;
};
/** Account classification of the expense */
export type AccountingClassification_Input = {
/** The classification ID, see 'Get Accounting Classifications' endpoint */
id?: InputMaybe<Scalars['String']>;
/** The classification key */
key?: InputMaybe<Scalars['String']>;
/** The classification code */
code?: InputMaybe<Scalars['String']>;
/** The classification title */
title?: InputMaybe<Scalars['String']>;
irsCode?: InputMaybe<mutation_addExpense_oneOf_0_accountingClassification_irsCode>;
/** The classification income */
income?: InputMaybe<Scalars['Float']>;
/** The classification type */
type?: InputMaybe<Scalars['Float']>;
/** The classification VAT */
vat?: InputMaybe<Scalars['Float']>;
};
export type searchExpensesResponse = {
/** The total length of the items that were retrieved */
total?: Maybe<Scalars['Float']>;
/** The page that was requested to retrieve */
page?: Maybe<Scalars['Float']>;
/** The page size that was requested */
pageSize?: Maybe<Scalars['Float']>;
/** The amount of pages that exist */
pages?: Maybe<Scalars['Float']>;
items?: Maybe<GetExpense>;
};
export type searchExpensesRequest_Input = {
/** Expense that were created after the specified date in the format YYYY-MM-DD */
fromDate?: InputMaybe<Scalars['String']>;
/** Expense that were created until the specified date in the format YYYY-MM-DD */
toDate?: InputMaybe<Scalars['String']>;
/** Due date of the expense, in the format YYYY-MM-DD */
dueDate?: InputMaybe<Scalars['String']>;
/** Expense description */
description?: InputMaybe<Scalars['String']>;
/** Supplier's ID */
supplierId?: InputMaybe<Scalars['String']>;
/** Supplier's name */
supplierName?: InputMaybe<Scalars['String']>;
/** Expense serial number */
number?: InputMaybe<Scalars['String']>;
/** Filter expenses that are only paid or unpaid, if not added to the request, will return both */
paid?: InputMaybe<Scalars['Boolean']>;
/** Filter expenses that are only reported or unreported, if not added to the request, will return both */
reported?: InputMaybe<Scalars['Boolean']>;
/** The field to sort the results by */
sort?: InputMaybe<Scalars['String']>;
/** Min amount of the expense */
minAmount: Scalars['Float'];
/** Max amount of the expense */
maxAmount: Scalars['Float'];
/** Page requested */
page: Scalars['Float'];
/** Results per page */
pageSize: Scalars['Float'];
};
export type searchExpenseDraftsResponse = {
/** The total length of the items that were retrieved */
total?: Maybe<Scalars['Float']>;
/** The page that was requested to retrieve */
page: Scalars['Float'];
/** The page size that was requested */
pageSize: Scalars['Float'];
/** The amount of pages that exist */
pages?: Maybe<Scalars['Float']>;
/** The expense drafts that were found */
items?: Maybe<Array<Maybe<query_searchExpenseDrafts_items_items>>>;
};
/** Partial Expense */
export type query_searchExpenseDrafts_items_items = {
currency?: Maybe<Currency>;
/** Currency rate relative to ILS */
currencyRate?: Maybe<Scalars['Float']>;
/** The amount of the vat */
vat?: Maybe<Scalars['Float']>;
/** The total amount of the expense */
amount?: Maybe<Scalars['Float']>;
/** Description for the expense */
description?: Maybe<Scalars['String']>;
supplier?: Maybe<Supplier>;
/** File hash */
fileHash?: Maybe<Scalars['String']>;
/** Key of the file location */
fileKey?: Maybe<Scalars['String']>;
};
export type searchExpenseDraftsRequest_Input = {
/** Expense drafts that were created after the specified date in the format YYYY-MM-DD */
fromDate?: InputMaybe<Scalars['String']>;
/** Expense drafts that were created until the specified date in the format YYYY-MM-DD */
toDate?: InputMaybe<Scalars['String']>;
/** Expense draft description */
description?: InputMaybe<Scalars['String']>;
/** Supplier's ID */
supplierId?: InputMaybe<Scalars['String']>;
/** Supplier's name */
supplierName?: InputMaybe<Scalars['String']>;
/** Page requested */
page?: InputMaybe<Scalars['Float']>;
/** Results per page */
pageSize?: InputMaybe<Scalars['Float']>;
};
export type Mutation = {
addExpense?: Maybe<addExpenseResponse>;
addExpenseDraftByFile?: Maybe<addExpenseDraftByFileResponse>;
};
export type MutationaddExpenseArgs = {
input: Expense_Input;
};
export type MutationaddExpenseDraftByFileArgs = {
input?: InputMaybe<addExpenseDraftByFileRequest_Input>;
};
export type addExpenseResponse = Expense | ErrorResponse;
/** A Single Expense */
export type Expense = {
paymentType?: Maybe<Scalars['mutation_addExpense_oneOf_0_paymentType']>;
currency: Currency;
/** Currency rate relative to ILS */
currencyRate?: Maybe<Scalars['Float']>;
/** The amount of the vat */
vat: Scalars['Float'];
/** The total amount of the expense */
amount: Scalars['Float'];
/** Date of the expense */
date: Scalars['String'];
/** Due date of the expense */
dueDate?: Maybe<Scalars['String']>;
/** Reporting date of the expense */
reportingDate: Scalars['String'];
documentType: mutation_addExpense_oneOf_0_documentType;
/** Number of the expense */
number: Scalars['String'];
/** Description for the expense */
description?: Maybe<Scalars['String']>;
remarks?: Maybe<Scalars['String']>;
supplier: Supplier;
accountingClassification: AccountingClassification;
/** Is the expense active or not */
active?: Maybe<Scalars['Boolean']>;
/** Should we save the supplier or not (by setting this to true you are required to add a supplier) */
addRecipient?: Maybe<Scalars['Boolean']>;
/** Should we save the accounting classification (by setting this to true you are required to add an accounting classification that contains title & irsCode) */
addAccountingClassification?: Maybe<Scalars['Boolean']>;
};
/** A Single Expense */
export type Expense_Input = {
paymentType?: InputMaybe<mutation_addExpense_oneOf_0_paymentType_Input>;
currency: Currency;
/** Currency rate relative to ILS */
currencyRate?: InputMaybe<Scalars['Float']>;
/** The amount of the vat */
vat: Scalars['Float'];
/** The total amount of the expense */
amount: Scalars['Float'];
/** Date of the expense */
date: Scalars['String'];
/** Due date of the expense */
dueDate?: InputMaybe<Scalars['String']>;
/** Reporting date of the expense */
reportingDate: Scalars['String'];
documentType: mutation_addExpense_oneOf_0_documentType;
/** Number of the expense */
number: Scalars['String'];
/** Description for the expense */
description?: InputMaybe<Scalars['String']>;
remarks?: InputMaybe<Scalars['String']>;
supplier: Supplier_Input;
accountingClassification: AccountingClassification_Input;
/** Is the expense active or not */
active?: InputMaybe<Scalars['Boolean']>;
/** Should we save the supplier or not (by setting this to true you are required to add a supplier) */
addRecipient?: InputMaybe<Scalars['Boolean']>;
/** Should we save the accounting classification (by setting this to true you are required to add an accounting classification that contains title & irsCode) */
addAccountingClassification?: InputMaybe<Scalars['Boolean']>;
};
export type addExpenseDraftByFileResponse = GetExpenseDraft | ErrorResponse;
export type GetExpenseDraft = {
/** The expense draft ID */
id?: Maybe<Scalars['String']>;
status?: Maybe<mutation_addExpenseDraftByFile_oneOf_0_status>;
/** The creation date of the expense draft, in UNIX timestamp format */
creationDate?: Maybe<Scalars['Int']>;
/** The last update date of the expense draft, in UNIX timestamp format */
lastUpdateDate?: Maybe<Scalars['Int']>;
expense?: Maybe<Expense>;
/** URL of expense thumbnail */
thumbnail?: Maybe<Scalars['String']>;
/** URL to download the expense thumbnail */
url?: Maybe<Scalars['String']>;
};
/** The status of the expense draft */
export type mutation_addExpenseDraftByFile_oneOf_0_status =
| '_10'
| '_50';
export type addExpenseDraftByFileRequest_Input = {
/** The file, in Base64, allowed types: GIF, PNG, JPG, SVG, PDF */
file?: InputMaybe<Scalars['String']>;
};
}
export type QueryGreenInvoiceSdk = {
/** undefined **/
getExpense: InContextSdkMethod<GreenInvoiceTypes.Query['getExpense'], GreenInvoiceTypes.QuerygetExpenseArgs, MeshContext>,
/** undefined **/
updateExpense: InContextSdkMethod<GreenInvoiceTypes.Query['updateExpense'], GreenInvoiceTypes.QueryupdateExpenseArgs, MeshContext>,
/** undefined **/
searchExpenses: InContextSdkMethod<GreenInvoiceTypes.Query['searchExpenses'], GreenInvoiceTypes.QuerysearchExpensesArgs, MeshContext>,
/** undefined **/
searchExpenseDrafts: InContextSdkMethod<GreenInvoiceTypes.Query['searchExpenseDrafts'], GreenInvoiceTypes.QuerysearchExpenseDraftsArgs, MeshContext>
};
export type MutationGreenInvoiceSdk = {
/** undefined **/
addExpense: InContextSdkMethod<GreenInvoiceTypes.Mutation['addExpense'], GreenInvoiceTypes.MutationaddExpenseArgs, MeshContext>,
/** undefined **/
addExpenseDraftByFile: InContextSdkMethod<GreenInvoiceTypes.Mutation['addExpenseDraftByFile'], GreenInvoiceTypes.MutationaddExpenseDraftByFileArgs, MeshContext>
};
export type SubscriptionGreenInvoiceSdk = {
};
export type GreenInvoiceContext = {
["GreenInvoice"]: { Query: QueryGreenInvoiceSdk, Mutation: MutationGreenInvoiceSdk, Subscription: SubscriptionGreenInvoiceSdk },
};
export type MeshContext = GreenInvoiceContext & BaseMeshContext;
import { getMesh } from '@graphql-mesh/runtime';
import { MeshStore, FsStoreStorageAdapter } from '@graphql-mesh/store';
import { path as pathModule } from '@graphql-mesh/cross-helpers';
import { fileURLToPath } from '@graphql-mesh/utils';
import ExternalModule_0 from 'ts-node/register/transpile-only';
import ExternalModule_1 from '@graphql-mesh/cache-inmemory-lru';
import ExternalModule_2 from '@graphql-mesh/json-schema';
import ExternalModule_3 from '@graphql-mesh/merger-bare';
import ExternalModule_4 from './sources/GreenInvoice/jsonSchemaBundle';
const importedModules: Record<string, any> = {
// @ts-ignore
["ts-node/register/transpile-only"]: ExternalModule_0,
// @ts-ignore
["@graphql-mesh/cache-inmemory-lru"]: ExternalModule_1,
// @ts-ignore
["@graphql-mesh/json-schema"]: ExternalModule_2,
// @ts-ignore
["@graphql-mesh/merger-bare"]: ExternalModule_3,
// @ts-ignore
[".mesh/sources/GreenInvoice/jsonSchemaBundle"]: ExternalModule_4
};
const baseDir = pathModule.join(__dirname, '..');
const importFn = (moduleId: string) => {
const relativeModuleId = (pathModule.isAbsolute(moduleId) ? pathModule.relative(baseDir, moduleId) : moduleId).split('\\').join('/').replace(baseDir + '/', '');
if (!(relativeModuleId in importedModules)) {
throw new Error(`Cannot find module '${relativeModuleId}'.`);
}
return Promise.resolve(importedModules[relativeModuleId]);
};
const rootStore = new MeshStore('.mesh', new FsStoreStorageAdapter({
cwd: baseDir,
importFn,
fileType: 'ts',
}), {
readonly: true,
validate: false
});
import { GetMeshOptions } from '@graphql-mesh/runtime';
import { YamlConfig } from '@graphql-mesh/types';
import { parse } from 'graphql';
import 'ts-node/register/transpile-only';
import { PubSub } from '@graphql-mesh/utils';
import MeshCache from '@graphql-mesh/cache-inmemory-lru';
import { DefaultLogger } from '@graphql-mesh/utils';
import JsonSchemaHandler from '@graphql-mesh/json-schema'
import BareMerger from '@graphql-mesh/merger-bare';
import { resolveAdditionalResolvers } from '@graphql-mesh/utils';
import { parseWithCache } from '@graphql-mesh/utils';
export const rawConfig: YamlConfig.Config = {"sources":[{"name":"GreenInvoice","handler":{"jsonSchema":{"baseUrl":"https://api.greeninvoice.co.il/api/v1","operationHeaders":{"Authorization":"Bearer {env.GREEN_INVOICE_AUTH_TOKEN}","Content-Type":"application/json"},"operations":[{"type":"Mutation","field":"addExpense","path":"/expenses","method":"POST","requestSchema":"./src/json-schemas/greenInvoice.json#/definitions/addExpenseRequest","responseSchema":"./src/json-schemas/greenInvoice.json#/definitions/addExpenseResponse"},{"type":"Query","field":"getExpense","path":"/expenses/{args.id}","method":"GET","requestSchema":"./src/json-schemas/greenInvoice.json#/definitions/getExpenseRequest","responseSchema":"./src/json-schemas/greenInvoice.json#/definitions/getExpenseResponse"},{"type":"Query","field":"updateExpense","path":"/expenses/{args.id}","method":"PUT","requestSchema":"./src/json-schemas/greenInvoice.json#/definitions/updateExpenseRequest","responseSchema":"./src/json-schemas/greenInvoice.json#/definitions/updateExpenseResponse"},{"type":"Query","field":"searchExpenses","path":"/expenses/search","method":"POST","requestSchema":"./src/json-schemas/greenInvoice.json#/definitions/searchExpensesRequest","responseSchema":"./src/json-schemas/greenInvoice.json#/definitions/searchExpensesResponse"},{"type":"Mutation","field":"addExpenseDraftByFile","path":"/expenses/file","method":"POST","requestSchema":"./src/json-schemas/greenInvoice.json#/definitions/addExpenseDraftByFileRequest","responseSchema":"./src/json-schemas/greenInvoice.json#/definitions/addExpenseDraftByFileResponse"},{"type":"Query","field":"searchExpenseDrafts","path":"/expenses/drafts/search","method":"POST","requestSchema":"./src/json-schemas/greenInvoice.json#/definitions/searchExpenseDraftsRequest","responseSchema":"./src/json-schemas/greenInvoice.json#/definitions/searchExpenseDraftsResponse"}]}}}],"serve":{"browser":false},"sdk":{"generateOperations":{"selectionSetDepth":2}},"require":["ts-node/register/transpile-only"]} as any
export async function getMeshOptions(): Promise<GetMeshOptions> {
const pubsub = new PubSub();
const cache = new (MeshCache as any)({
...(rawConfig.cache || {}),
importFn,
store: rootStore.child('cache'),
pubsub,
} as any)
const sourcesStore = rootStore.child('sources');
const logger = new DefaultLogger('🕸️');
const sources = [];
const transforms = [];
const greenInvoiceTransforms = [];
const additionalTypeDefs = [] as any[];
const greenInvoiceHandler = new JsonSchemaHandler({
name: rawConfig.sources[0].name,
config: rawConfig.sources[0].handler["jsonSchema"],
baseDir,
cache,
pubsub,
store: sourcesStore.child(rawConfig.sources[0].name),
logger: logger.child(rawConfig.sources[0].name),
importFn
});
sources.push({
name: 'GreenInvoice',
handler: greenInvoiceHandler,
transforms: greenInvoiceTransforms
})
const merger = new(BareMerger as any)({
cache,
pubsub,
logger: logger.child('BareMerger'),
store: rootStore.child('bareMerger')
})
const additionalResolversRawConfig = [];
const additionalResolvers = await resolveAdditionalResolvers(
baseDir,
additionalResolversRawConfig,
importFn,
pubsub
)
const liveQueryInvalidations = rawConfig.liveQueryInvalidations;
const additionalEnvelopPlugins = [];
const documents = documentsInSDL.map((documentSdl: string, i: number) => ({
rawSDL: documentSdl,
document: parseWithCache(documentSdl),
location: `document_${i}.graphql`,
}))
return {
sources,
transforms,
additionalTypeDefs,
additionalResolvers,
cache,
pubsub,
merger,
logger,
liveQueryInvalidations,
additionalEnvelopPlugins,
documents,
};
}
export const documentsInSDL = /*#__PURE__*/ [];
export async function getBuiltMesh(): Promise<MeshInstance<MeshContext>> {
const meshConfig = await getMeshOptions();
return getMesh<MeshContext>(meshConfig);
}
export async function getMeshSDK<TGlobalContext = any, TOperationContext = any>(globalContext?: TGlobalContext) {
const { sdkRequesterFactory } = await getBuiltMesh();
return getSdk<TOperationContext>(sdkRequesterFactory(globalContext));
}
export type getExpense_queryQueryVariables = Exact<{
input: getExpenseRequest_Input;
id?: InputMaybe<Scalars['ID']>;
}>;
export type getExpense_queryQuery = { getExpense?: Maybe<(
Pick<GetExpense, 'id' | 'businessType' | 'documentType' | 'status' | 'paymentType' | 'currency' | 'currencyRate' | 'amountExcludeVat' | 'vat' | 'amount' | 'date' | 'dueDate' | 'number' | 'active' | 'description' | 'remarks' | 'thumbnail' | 'url' | 'cancellable' | 'reportingDate' | 'amountLocal' | 'amountAccounting' | 'vatAccounting' | 'creationDate' | 'lastUpdateDate'>
& { supplier?: Maybe<Pick<Supplier, 'id' | 'name' | 'active' | 'taxId' | 'paymentTerms' | 'bankName' | 'bankBranch' | 'bankAccount' | 'country' | 'phone' | 'mobile' | 'contactPerson' | 'emails' | 'labels' | 'creationDate' | 'lastUpdateDate' | 'department' | 'accountingKey' | 'address' | 'city' | 'zip' | 'fax' | 'remarks' | 'incomeAmount' | 'paymentAmount' | 'balanceAmount'>>, accountingClassification?: Maybe<Pick<AccountingClassification, 'id' | 'key' | 'code' | 'title' | 'irsCode' | 'income' | 'type' | 'vat'>> }
) | Pick<ErrorResponse, 'errorCode' | 'errorMessage'>> };
export type updateExpense_queryQueryVariables = Exact<{
input: updateExpenseRequest_Input;
id?: InputMaybe<Scalars['ID']>;
}>;
export type updateExpense_queryQuery = { updateExpense?: Maybe<(
Pick<GetExpense, 'id' | 'businessType' | 'documentType' | 'status' | 'paymentType' | 'currency' | 'currencyRate' | 'amountExcludeVat' | 'vat' | 'amount' | 'date' | 'dueDate' | 'number' | 'active' | 'description' | 'remarks' | 'thumbnail' | 'url' | 'cancellable' | 'reportingDate' | 'amountLocal' | 'amountAccounting' | 'vatAccounting' | 'creationDate' | 'lastUpdateDate'>
& { supplier?: Maybe<Pick<Supplier, 'id' | 'name' | 'active' | 'taxId' | 'paymentTerms' | 'bankName' | 'bankBranch' | 'bankAccount' | 'country' | 'phone' | 'mobile' | 'contactPerson' | 'emails' | 'labels' | 'creationDate' | 'lastUpdateDate' | 'department' | 'accountingKey' | 'address' | 'city' | 'zip' | 'fax' | 'remarks' | 'incomeAmount' | 'paymentAmount' | 'balanceAmount'>>, accountingClassification?: Maybe<Pick<AccountingClassification, 'id' | 'key' | 'code' | 'title' | 'irsCode' | 'income' | 'type' | 'vat'>> }
) | Pick<ErrorResponse, 'errorCode' | 'errorMessage'>> };
export type searchExpenses_queryQueryVariables = Exact<{
input: searchExpensesRequest_Input;
}>;
export type searchExpenses_queryQuery = { searchExpenses?: Maybe<(
Pick<searchExpensesResponse, 'total' | 'page' | 'pageSize' | 'pages'>
& { items?: Maybe<Pick<GetExpense, 'id' | 'businessType' | 'documentType' | 'status' | 'paymentType' | 'currency' | 'currencyRate' | 'amountExcludeVat' | 'vat' | 'amount' | 'date' | 'dueDate' | 'number' | 'active' | 'description' | 'remarks' | 'thumbnail' | 'url' | 'cancellable' | 'reportingDate' | 'amountLocal' | 'amountAccounting' | 'vatAccounting' | 'creationDate' | 'lastUpdateDate'>> }
)> };
export type searchExpenseDrafts_queryQueryVariables = Exact<{
input?: InputMaybe<searchExpenseDraftsRequest_Input>;
}>;
export type searchExpenseDrafts_queryQuery = { searchExpenseDrafts?: Maybe<(
Pick<searchExpenseDraftsResponse, 'total' | 'page' | 'pageSize' | 'pages'>
& { items?: Maybe<Array<Maybe<Pick<query_searchExpenseDrafts_items_items, 'currency' | 'currencyRate' | 'vat' | 'amount' | 'description' | 'fileHash' | 'fileKey'>>>> }
)> };
export type addExpense_mutationMutationVariables = Exact<{
input: Expense_Input;
}>;
export type addExpense_mutationMutation = { addExpense?: Maybe<(
Pick<Expense, 'paymentType' | 'currency' | 'currencyRate' | 'vat' | 'amount' | 'date' | 'dueDate' | 'reportingDate' | 'documentType' | 'number' | 'description' | 'remarks' | 'active' | 'addRecipient' | 'addAccountingClassification'>
& { supplier: Pick<Supplier, 'id' | 'name' | 'active' | 'taxId' | 'paymentTerms' | 'bankName' | 'bankBranch' | 'bankAccount' | 'country' | 'phone' | 'mobile' | 'contactPerson' | 'emails' | 'labels' | 'creationDate' | 'lastUpdateDate' | 'department' | 'accountingKey' | 'address' | 'city' | 'zip' | 'fax' | 'remarks' | 'incomeAmount' | 'paymentAmount' | 'balanceAmount'>, accountingClassification: Pick<AccountingClassification, 'id' | 'key' | 'code' | 'title' | 'irsCode' | 'income' | 'type' | 'vat'> }
) | Pick<ErrorResponse, 'errorCode' | 'errorMessage'>> };
export type addExpenseDraftByFile_mutationMutationVariables = Exact<{
input?: InputMaybe<addExpenseDraftByFileRequest_Input>;
}>;
export type addExpenseDraftByFile_mutationMutation = { addExpenseDraftByFile?: Maybe<(
Pick<GetExpenseDraft, 'id' | 'status' | 'creationDate' | 'lastUpdateDate' | 'thumbnail' | 'url'>
& { expense?: Maybe<Pick<Expense, 'paymentType' | 'currency' | 'currencyRate' | 'vat' | 'amount' | 'date' | 'dueDate' | 'reportingDate' | 'documentType' | 'number' | 'description' | 'remarks' | 'active' | 'addRecipient' | 'addAccountingClassification'>> }
) | Pick<ErrorResponse, 'errorCode' | 'errorMessage'>> };
export const getExpense_queryDocument = gql`
query getExpense_query($input: getExpenseRequest_Input!, $id: ID) {
getExpense(input: $input, id: $id) {
... on GetExpense {
id
businessType
documentType
status
paymentType
currency
currencyRate
amountExcludeVat
vat
amount
date
dueDate
number
active
description
remarks
supplier {
id
name
active
taxId
paymentTerms
bankName
bankBranch
bankAccount
country
phone
mobile
contactPerson
emails
labels
creationDate
lastUpdateDate
department
accountingKey
address
city
zip
fax
remarks
incomeAmount
paymentAmount
balanceAmount
}
thumbnail
url
cancellable
reportingDate
accountingClassification {
id
key
code
title
irsCode
income
type
vat
}
amountLocal
amountAccounting
vatAccounting
creationDate
lastUpdateDate
}
... on ErrorResponse {
errorCode
errorMessage
}
}
}
` as unknown as DocumentNode<getExpense_queryQuery, getExpense_queryQueryVariables>;
export const updateExpense_queryDocument = gql`
query updateExpense_query($input: updateExpenseRequest_Input!, $id: ID) {
updateExpense(input: $input, id: $id) {
... on GetExpense {
id
businessType
documentType
status
paymentType
currency
currencyRate
amountExcludeVat
vat
amount
date
dueDate
number
active
description
remarks
supplier {
id
name
active
taxId
paymentTerms
bankName
bankBranch
bankAccount
country
phone
mobile
contactPerson
emails
labels
creationDate
lastUpdateDate
department
accountingKey
address
city
zip
fax
remarks
incomeAmount
paymentAmount
balanceAmount
}
thumbnail
url
cancellable
reportingDate
accountingClassification {
id
key
code
title
irsCode
income
type
vat
}
amountLocal
amountAccounting
vatAccounting
creationDate
lastUpdateDate
}
... on ErrorResponse {
errorCode
errorMessage
}
}
}
` as unknown as DocumentNode<updateExpense_queryQuery, updateExpense_queryQueryVariables>;
export const searchExpenses_queryDocument = gql`
query searchExpenses_query($input: searchExpensesRequest_Input!) {
searchExpenses(input: $input) {
total
page
pageSize
pages
items {
id
businessType
documentType
status
paymentType
currency
currencyRate
amountExcludeVat
vat
amount
date
dueDate
number
active
description
remarks
thumbnail
url
cancellable
reportingDate
amountLocal
amountAccounting
vatAccounting
creationDate
lastUpdateDate
}
}
}
` as unknown as DocumentNode<searchExpenses_queryQuery, searchExpenses_queryQueryVariables>;
export const searchExpenseDrafts_queryDocument = gql`
query searchExpenseDrafts_query($input: searchExpenseDraftsRequest_Input) {
searchExpenseDrafts(input: $input) {
total
page
pageSize
pages
items {
currency
currencyRate
vat
amount
description
fileHash
fileKey
}
}
}
` as unknown as DocumentNode<searchExpenseDrafts_queryQuery, searchExpenseDrafts_queryQueryVariables>;
export const addExpense_mutationDocument = gql`
mutation addExpense_mutation($input: Expense_Input!) {
addExpense(input: $input) {
... on Expense {
paymentType
currency
currencyRate
vat
amount
date
dueDate
reportingDate
documentType
number
description
remarks
supplier {
id
name
active
taxId
paymentTerms
bankName
bankBranch
bankAccount
country
phone
mobile
contactPerson
emails
labels
creationDate
lastUpdateDate
department
accountingKey
address
city
zip
fax
remarks
incomeAmount
paymentAmount
balanceAmount
}
accountingClassification {
id
key
code
title
irsCode
income
type
vat
}
active
addRecipient
addAccountingClassification
}
... on ErrorResponse {
errorCode
errorMessage
}
}
}
` as unknown as DocumentNode<addExpense_mutationMutation, addExpense_mutationMutationVariables>;
export const addExpenseDraftByFile_mutationDocument = gql`
mutation addExpenseDraftByFile_mutation($input: addExpenseDraftByFileRequest_Input) {
addExpenseDraftByFile(input: $input) {
... on GetExpenseDraft {
id
status
creationDate
lastUpdateDate
expense {
paymentType
currency
currencyRate
vat
amount
date
dueDate
reportingDate
documentType
number
description
remarks
active
addRecipient
addAccountingClassification
}
thumbnail
url
}
... on ErrorResponse {
errorCode
errorMessage
}
}
}
` as unknown as DocumentNode<addExpenseDraftByFile_mutationMutation, addExpenseDraftByFile_mutationMutationVariables>;
export type Requester<C= {}> = <R, V>(doc: DocumentNode, vars?: V, options?: C) => Promise<R>
export function getSdk<C>(requester: Requester<C>) {
return {
getExpense_query(variables: getExpense_queryQueryVariables, options?: C): Promise<getExpense_queryQuery> {
return requester<getExpense_queryQuery, getExpense_queryQueryVariables>(getExpense_queryDocument, variables, options);
},
updateExpense_query(variables: updateExpense_queryQueryVariables, options?: C): Promise<updateExpense_queryQuery> {
return requester<updateExpense_queryQuery, updateExpense_queryQueryVariables>(updateExpense_queryDocument, variables, options);
},
searchExpenses_query(variables: searchExpenses_queryQueryVariables, options?: C): Promise<searchExpenses_queryQuery> {
return requester<searchExpenses_queryQuery, searchExpenses_queryQueryVariables>(searchExpenses_queryDocument, variables, options);
},
searchExpenseDrafts_query(variables?: searchExpenseDrafts_queryQueryVariables, options?: C): Promise<searchExpenseDrafts_queryQuery> {
return requester<searchExpenseDrafts_queryQuery, searchExpenseDrafts_queryQueryVariables>(searchExpenseDrafts_queryDocument, variables, options);
},
addExpense_mutation(variables: addExpense_mutationMutationVariables, options?: C): Promise<addExpense_mutationMutation> {
return requester<addExpense_mutationMutation, addExpense_mutationMutationVariables>(addExpense_mutationDocument, variables, options);
},
addExpenseDraftByFile_mutation(variables?: addExpenseDraftByFile_mutationMutationVariables, options?: C): Promise<addExpenseDraftByFile_mutationMutation> {
return requester<addExpenseDraftByFile_mutationMutation, addExpenseDraftByFile_mutationMutationVariables>(addExpenseDraftByFile_mutationDocument, variables, options);
}
};
}
export type Sdk = ReturnType<typeof getSdk>;