green-invoice-graphql
Version:
Graphql server for wrapping payper API
4 lines • 28.5 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = { "name": "GreenInvoice", "baseUrl": "https://api.greeninvoice.co.il/api/v1", "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" }], "operationHeaders": { "Authorization": "Bearer {env.GREEN_INVOICE_AUTH_TOKEN}", "Content-Type": "application/json" }, "referencedSchema": { "$ref": "#/definitions/_schema", "definitions": { "mutation_addExpense_oneOf_0_paymentType_oneOf_0": { "type": "boolean", "title": "mutation_addExpense_oneOf_0_paymentType_oneOf_0" }, "mutation_addExpense_oneOf_0_paymentType_oneOf_1": { "type": ["string", "number"], "enum": ["1", "2", "3", "4", "5", "10", "11", 1, 2, 3, 4, 5, 10, 11], "title": "mutation_addExpense_oneOf_0_paymentType_oneOf_1" }, "mutation_addExpense_oneOf_0_paymentType": { "description": "Payment method", "oneOf": [{ "$ref": "#/definitions/mutation_addExpense_oneOf_0_paymentType_oneOf_0" }, { "$ref": "#/definitions/mutation_addExpense_oneOf_0_paymentType_oneOf_1" }], "title": "mutation_addExpense_oneOf_0_paymentType" }, "Currency": { "type": "string", "description": "3-letter ISO item currency code", "enum": ["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"], "title": "Currency", "$resolvedRef": "/definitions/Currency" }, "mutation_addExpense_oneOf_0_currencyRate": { "type": "number", "description": "Currency rate relative to ILS", "title": "mutation_addExpense_oneOf_0_currencyRate" }, "mutation_addExpense_oneOf_0_vat": { "type": "number", "description": "The amount of the vat", "title": "mutation_addExpense_oneOf_0_vat" }, "mutation_addExpense_oneOf_0_amount": { "type": "number", "description": "The total amount of the expense", "title": "mutation_addExpense_oneOf_0_amount" }, "mutation_addExpense_oneOf_0_documentType": { "type": "number", "description": "Document type", "enum": [20, 305, 320, 330, 400, 405], "title": "mutation_addExpense_oneOf_0_documentType" }, "mutation_addExpense_oneOf_0_supplier_active": { "type": "boolean", "description": "Is the supplier active or not", "title": "mutation_addExpense_oneOf_0_supplier_active" }, "mutation_addExpense_oneOf_0_supplier_paymentTerms": { "type": "number", "description": "The supplier payment term, default is 0", "enum": [-1, 0, 10, 15, 30, 45, 60, 75, 90, 120], "title": "mutation_addExpense_oneOf_0_supplier_paymentTerms" }, "Country": { "type": "string", "description": "2-letter ISO supplier country code, default is IL", "enum": ["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"], "title": "Country", "$resolvedRef": "/definitions/Country" }, "mutation_addExpense_oneOf_0_supplier_incomeAmount": { "type": "number", "description": "The amount of incomes from the customer", "title": "mutation_addExpense_oneOf_0_supplier_incomeAmount" }, "mutation_addExpense_oneOf_0_supplier_paymentAmount": { "type": "number", "title": "mutation_addExpense_oneOf_0_supplier_paymentAmount" }, "mutation_addExpense_oneOf_0_supplier_balanceAmount": { "type": "number", "description": "The balance amount of the supplier", "title": "mutation_addExpense_oneOf_0_supplier_balanceAmount" }, "Supplier": { "type": "object", "additionalProperties": false, "description": "Supplier of the expense", "properties": { "id": { "type": "string", "description": "The supplier ID" }, "name": { "type": "string", "description": "The supplier name" }, "active": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_supplier_active" }, "taxId": { "type": "string", "description": "The supplier tax ID" }, "paymentTerms": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_supplier_paymentTerms" }, "bankName": { "type": "string", "description": "The supplier bank name" }, "bankBranch": { "type": "string", "description": "The supplier bank branch number" }, "bankAccount": { "type": "string", "description": "The supplier bank account number" }, "country": { "$ref": "#/definitions/Country" }, "phone": { "type": "string", "description": "The supplier phone number" }, "mobile": { "type": "string", "description": "The supplier mobile number" }, "contactPerson": { "type": "string", "description": "The supplier contact person name" }, "emails": { "type": "array", "additionalItems": false, "items": { "type": "string" } }, "labels": { "type": "array", "additionalItems": false, "items": { "type": "string" } }, "creationDate": { "type": "integer", "description": "The creation date of the supplier, in UNIX timestamp format" }, "lastUpdateDate": { "type": "integer", "description": "The last update date of the supplier, in UNIX timestamp format" }, "department": { "type": "string", "description": "The supplier department" }, "accountingKey": { "type": "string", "description": "The supplier accounting key" }, "address": { "type": "string", "description": "The supplier address" }, "city": { "type": "string", "description": "The supplier city" }, "zip": { "type": "string", "description": "The supplier zip code" }, "fax": { "type": "string", "description": "The supplier fax number" }, "remarks": { "type": "string", "description": "The Supplier remarks for self use" }, "incomeAmount": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_supplier_incomeAmount" }, "paymentAmount": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_supplier_paymentAmount" }, "balanceAmount": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_supplier_balanceAmount" } }, "title": "Supplier", "$resolvedRef": "/definitions/Supplier" }, "mutation_addExpense_oneOf_0_accountingClassification_irsCode": { "type": "number", "description": "The classification IRS code", "enum": [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], "title": "mutation_addExpense_oneOf_0_accountingClassification_irsCode" }, "mutation_addExpense_oneOf_0_accountingClassification_income": { "type": "number", "description": "The classification income", "title": "mutation_addExpense_oneOf_0_accountingClassification_income" }, "mutation_addExpense_oneOf_0_accountingClassification_type": { "type": "number", "description": "The classification type", "title": "mutation_addExpense_oneOf_0_accountingClassification_type" }, "mutation_addExpense_oneOf_0_accountingClassification_vat": { "type": "number", "description": "The classification VAT", "title": "mutation_addExpense_oneOf_0_accountingClassification_vat" }, "AccountingClassification": { "type": "object", "additionalProperties": false, "description": "Account classification of the expense", "properties": { "id": { "type": "string", "description": "The classification ID, see 'Get Accounting Classifications' endpoint" }, "key": { "type": "string", "description": "The classification key" }, "code": { "type": "string", "description": "The classification code" }, "title": { "type": "string", "description": "The classification title" }, "irsCode": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_accountingClassification_irsCode" }, "income": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_accountingClassification_income" }, "type": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_accountingClassification_type" }, "vat": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_accountingClassification_vat" } }, "title": "AccountingClassification", "$resolvedRef": "/definitions/AccountingClassification" }, "mutation_addExpense_oneOf_0_active": { "type": "boolean", "description": "Is the expense active or not", "title": "mutation_addExpense_oneOf_0_active" }, "mutation_addExpense_oneOf_0_addRecipient": { "type": "boolean", "description": "Should we save the supplier or not (by setting this to true you are required to add a supplier)", "title": "mutation_addExpense_oneOf_0_addRecipient" }, "mutation_addExpense_oneOf_0_addAccountingClassification": { "type": "boolean", "description": "Should we save the accounting classification (by setting this to true you are required to add an accounting classification that contains title & irsCode)", "title": "mutation_addExpense_oneOf_0_addAccountingClassification" }, "Expense": { "type": "object", "additionalProperties": false, "description": "A Single Expense", "properties": { "paymentType": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_paymentType" }, "currency": { "$ref": "#/definitions/Currency" }, "currencyRate": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_currencyRate" }, "vat": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_vat" }, "amount": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_amount" }, "date": { "type": "string", "description": "Date of the expense" }, "dueDate": { "type": "string", "description": "Due date of the expense" }, "reportingDate": { "type": "string", "description": "Reporting date of the expense" }, "documentType": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_documentType" }, "number": { "type": "string", "description": "Number of the expense" }, "description": { "type": "string", "description": "Description for the expense" }, "remarks": { "type": "string", "string": "Remarks for the expense" }, "supplier": { "$ref": "#/definitions/Supplier" }, "accountingClassification": { "$ref": "#/definitions/AccountingClassification" }, "active": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_active" }, "addRecipient": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_addRecipient" }, "addAccountingClassification": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_addAccountingClassification" } }, "required": ["currency", "vat", "amount", "date", "reportingDate", "documentType", "number", "supplier", "accountingClassification"], "title": "Expense", "$resolvedRef": "/definitions/Expense" }, "ErrorResponse": { "type": "object", "additionalProperties": false, "description": "Error", "properties": { "errorCode": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_supplier_paymentAmount" }, "errorMessage": { "type": "string" } }, "title": "ErrorResponse", "$resolvedRef": "/definitions/ErrorResponse" }, "addExpenseResponse": { "oneOf": [{ "$ref": "#/definitions/Expense" }, { "$ref": "#/definitions/ErrorResponse" }], "title": "addExpenseResponse", "$resolvedRef": "/definitions/addExpenseResponse" }, "mutation_addExpenseDraftByFile_oneOf_0_status": { "type": "number", "description": "The status of the expense draft", "enum": [10, 50], "title": "mutation_addExpenseDraftByFile_oneOf_0_status" }, "GetExpenseDraft": { "type": "object", "additionalProperties": false, "required": ["description", "result"], "properties": { "id": { "type": "string", "description": "The expense draft ID" }, "status": { "$ref": "#/definitions/mutation_addExpenseDraftByFile_oneOf_0_status" }, "creationDate": { "type": "integer", "description": "The creation date of the expense draft, in UNIX timestamp format" }, "lastUpdateDate": { "type": "integer", "description": "The last update date of the expense draft, in UNIX timestamp format" }, "expense": { "$ref": "#/definitions/Expense" }, "thumbnail": { "type": "string", "description": "URL of expense thumbnail" }, "url": { "type": "string", "description": "URL to download the expense thumbnail" } }, "title": "GetExpenseDraft", "$resolvedRef": "/definitions/GetExpenseDraft" }, "addExpenseDraftByFileResponse": { "oneOf": [{ "$ref": "#/definitions/GetExpenseDraft" }, { "$ref": "#/definitions/ErrorResponse" }], "title": "addExpenseDraftByFileResponse", "$resolvedRef": "/definitions/addExpenseDraftByFileResponse" }, "Mutation": { "type": "object", "title": "Mutation", "properties": { "addExpense": { "$ref": "#/definitions/addExpenseResponse" }, "addExpenseDraftByFile": { "$ref": "#/definitions/addExpenseDraftByFileResponse" } } }, "addExpenseDraftByFileRequest": { "type": "object", "additionalProperties": false, "required": [], "properties": { "file": { "type": "string", "description": "The file, in Base64, allowed types: GIF, PNG, JPG, SVG, PDF" } }, "title": "addExpenseDraftByFileRequest", "$resolvedRef": "/definitions/addExpenseDraftByFileRequest" }, "MutationInput": { "type": "object", "title": "MutationInput", "properties": { "addExpense": { "$ref": "#/definitions/Expense" }, "addExpenseDraftByFile": { "$ref": "#/definitions/addExpenseDraftByFileRequest" } } }, "query_getExpense_oneOf_0_businessType": { "type": "number", "description": "The business type ID", "enum": [1, 2, 3, 4, 5, 6], "title": "query_getExpense_oneOf_0_businessType" }, "query_getExpense_oneOf_0_documentType": { "type": "number", "description": "The type of the expense", "enum": [20, 305, 320, 330, 400, 405], "title": "query_getExpense_oneOf_0_documentType" }, "query_getExpense_oneOf_0_status": { "type": "number", "description": "The status of the expense", "enum": [10, 20, 30, 100], "title": "query_getExpense_oneOf_0_status" }, "query_getExpense_oneOf_0_paymentType": { "type": "number", "description": "Payment method", "enum": [-1, 0, 1, 2, 3, 4, 5, 10, 11], "title": "query_getExpense_oneOf_0_paymentType" }, "query_getExpense_oneOf_0_amountExcludeVat": { "type": "number", "description": "The amount excluding the vat", "title": "query_getExpense_oneOf_0_amountExcludeVat" }, "query_getExpense_oneOf_0_active": { "type": "boolean", "description": "Is the expense currently active or not", "title": "query_getExpense_oneOf_0_active" }, "query_getExpense_oneOf_0_cancellable": { "type": "boolean", "description": "Is the supplier currently active or not", "title": "query_getExpense_oneOf_0_cancellable" }, "query_getExpense_oneOf_0_amountLocal": { "type": "number", "description": "The local amount of the expense", "title": "query_getExpense_oneOf_0_amountLocal" }, "query_getExpense_oneOf_0_amountAccounting": { "type": "number", "description": "The amount of accounting", "title": "query_getExpense_oneOf_0_amountAccounting" }, "query_getExpense_oneOf_0_vatAccounting": { "type": "number", "description": "The vat amount of accounting", "title": "query_getExpense_oneOf_0_vatAccounting" }, "GetExpense": { "type": "object", "additionalProperties": false, "description": "A Single Expense", "properties": { "id": { "type": "string", "description": "The expense ID" }, "businessType": { "$ref": "#/definitions/query_getExpense_oneOf_0_businessType" }, "documentType": { "$ref": "#/definitions/query_getExpense_oneOf_0_documentType" }, "status": { "$ref": "#/definitions/query_getExpense_oneOf_0_status" }, "paymentType": { "$ref": "#/definitions/query_getExpense_oneOf_0_paymentType" }, "currency": { "$ref": "#/definitions/Currency" }, "currencyRate": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_currencyRate" }, "amountExcludeVat": { "$ref": "#/definitions/query_getExpense_oneOf_0_amountExcludeVat" }, "vat": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_vat" }, "amount": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_amount" }, "date": { "type": "string", "description": "Date of the expense" }, "dueDate": { "type": "string", "description": "Due date of the expense" }, "number": { "type": "string", "description": "Number of the expense" }, "active": { "$ref": "#/definitions/query_getExpense_oneOf_0_active" }, "description": { "type": "string", "description": "Description for the expense" }, "remarks": { "type": "string", "description": "Remarks for the expense" }, "supplier": { "$ref": "#/definitions/Supplier" }, "thumbnail": { "type": "string", "description": "URL of expense thumbnail" }, "url": { "type": "string", "description": "URL to download the expense thumbnail" }, "cancellable": { "$ref": "#/definitions/query_getExpense_oneOf_0_cancellable" }, "reportingDate": { "type": "string", "description": "Reporting date of the expense" }, "accountingClassification": { "$ref": "#/definitions/AccountingClassification" }, "amountLocal": { "$ref": "#/definitions/query_getExpense_oneOf_0_amountLocal" }, "amountAccounting": { "$ref": "#/definitions/query_getExpense_oneOf_0_amountAccounting" }, "vatAccounting": { "$ref": "#/definitions/query_getExpense_oneOf_0_vatAccounting" }, "creationDate": { "type": "integer", "description": "The creation date of the expense, in UNIX timestamp format" }, "lastUpdateDate": { "type": "integer", "description": "The last update date of the expense, in UNIX timestamp format" } }, "title": "GetExpense", "$resolvedRef": "/definitions/GetExpense" }, "getExpenseResponse": { "oneOf": [{ "$ref": "#/definitions/GetExpense" }, { "$ref": "#/definitions/ErrorResponse" }], "title": "getExpenseResponse", "$resolvedRef": "/definitions/getExpenseResponse" }, "updateExpenseResponse": { "oneOf": [{ "$ref": "#/definitions/GetExpense" }, { "$ref": "#/definitions/ErrorResponse" }], "title": "updateExpenseResponse", "$resolvedRef": "/definitions/updateExpenseResponse" }, "query_searchExpenses_total": { "type": "number", "description": "The total length of the items that were retrieved", "title": "query_searchExpenses_total" }, "query_searchExpenses_page": { "type": "number", "description": "The page that was requested to retrieve", "title": "query_searchExpenses_page" }, "query_searchExpenses_pageSize": { "type": "number", "description": "The page size that was requested", "title": "query_searchExpenses_pageSize" }, "query_searchExpenses_pages": { "type": "number", "description": "The amount of pages that exist", "title": "query_searchExpenses_pages" }, "searchExpensesResponse": { "type": "object", "properties": { "total": { "$ref": "#/definitions/query_searchExpenses_total" }, "page": { "$ref": "#/definitions/query_searchExpenses_page" }, "pageSize": { "$ref": "#/definitions/query_searchExpenses_pageSize" }, "pages": { "$ref": "#/definitions/query_searchExpenses_pages" }, "items": { "$ref": "#/definitions/GetExpense" } }, "title": "searchExpensesResponse", "$resolvedRef": "/definitions/searchExpensesResponse" }, "query_searchExpenseDrafts_items_items": { "type": "object", "additionalProperties": false, "description": "Partial Expense", "properties": { "currency": { "$ref": "#/definitions/Currency" }, "currencyRate": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_currencyRate" }, "vat": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_vat" }, "amount": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_amount" }, "description": { "type": "string", "description": "Description for the expense" }, "supplier": { "$ref": "#/definitions/Supplier" }, "fileHash": { "type": "string", "description": "File hash" }, "fileKey": { "type": "string", "description": "Key of the file location" } }, "title": "query_searchExpenseDrafts_items_items" }, "searchExpenseDraftsResponse": { "type": "object", "additionalProperties": false, "required": ["page", "pageSize"], "properties": { "total": { "$ref": "#/definitions/query_searchExpenses_total" }, "page": { "$ref": "#/definitions/query_searchExpenses_page" }, "pageSize": { "$ref": "#/definitions/query_searchExpenses_pageSize" }, "pages": { "$ref": "#/definitions/query_searchExpenses_pages" }, "items": { "type": "array", "additionalItems": false, "description": "The expense drafts that were found", "items": { "$ref": "#/definitions/query_searchExpenseDrafts_items_items" } } }, "title": "searchExpenseDraftsResponse", "$resolvedRef": "/definitions/searchExpenseDraftsResponse" }, "Query": { "type": "object", "title": "Query", "properties": { "getExpense": { "$ref": "#/definitions/getExpenseResponse" }, "updateExpense": { "$ref": "#/definitions/updateExpenseResponse" }, "searchExpenses": { "$ref": "#/definitions/searchExpensesResponse" }, "searchExpenseDrafts": { "$ref": "#/definitions/searchExpenseDraftsResponse" } } }, "getExpenseRequest": { "type": "object", "additionalProperties": false, "required": ["id"], "properties": { "id": { "type": "string", "description": "The expense ID" } }, "title": "getExpenseRequest", "$resolvedRef": "/definitions/getExpenseRequest" }, "updateExpenseRequest": { "type": "object", "additionalProperties": false, "required": ["id"], "properties": { "id": { "type": "string", "description": "The expense ID" }, "paymentType": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_paymentType" }, "currency": { "$ref": "#/definitions/Currency" }, "currencyRate": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_currencyRate" }, "vat": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_vat" }, "amount": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_amount" }, "date": { "type": "string", "description": "Date of the expense" }, "dueDate": { "type": "string", "description": "Due date of the expense" }, "reportingDate": { "type": "string", "description": "Reporting date of the expense" }, "documentType": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_documentType" }, "number": { "type": "string", "description": "Number of the expense" }, "description": { "type": "string", "description": "Description for the expense" }, "remarks": { "type": "string", "string": "Remarks for the expense" }, "supplier": { "$ref": "#/definitions/Supplier" }, "accountingClassification": { "$ref": "#/definitions/AccountingClassification" }, "active": { "$ref": "#/definitions/mutation_addExpense_oneOf_0_active" } }, "title": "updateExpenseRequest", "$resolvedRef": "/definitions/updateExpenseRequest" }, "queryInput_searchExpenses_paid": { "type": "boolean", "description": "Filter expenses that are only paid or unpaid, if not added to the request, will return both", "title": "queryInput_searchExpenses_paid" }, "queryInput_searchExpenses_reported": { "type": "boolean", "description": "Filter expenses that are only reported or unreported, if not added to the request, will return both", "title": "queryInput_searchExpenses_reported" }, "queryInput_searchExpenses_minAmount": { "type": "number", "description": "Min amount of the expense", "title": "queryInput_searchExpenses_minAmount" }, "queryInput_searchExpenses_maxAmount": { "type": "number", "description": "Max amount of the expense", "title": "queryInput_searchExpenses_maxAmount" }, "queryInput_searchExpenses_page": { "type": "number", "description": "Page requested", "title": "queryInput_searchExpenses_page" }, "queryInput_searchExpenses_pageSize": { "type": "number", "description": "Results per page", "title": "queryInput_searchExpenses_pageSize" }, "searchExpensesRequest": { "type": "object", "additionalProperties": false, "properties": { "fromDate": { "type": "string", "description": "Expense that were created after the specified date in the format YYYY-MM-DD" }, "toDate": { "type": "string", "description": "Expense that were created until the specified date in the format YYYY-MM-DD" }, "dueDate": { "type": "string", "description": "Due date of the expense, in the format YYYY-MM-DD" }, "description": { "type": "string", "description": "Expense description" }, "supplierId": { "type": "string", "description": "Supplier's ID" }, "supplierName": { "type": "string", "description": "Supplier's name" }, "number": { "type": "string", "description": "Expense serial number" }, "paid": { "$ref": "#/definitions/queryInput_searchExpenses_paid" }, "reported": { "$ref": "#/definitions/queryInput_searchExpenses_reported" }, "sort": { "type": "string", "description": "The field to sort the results by" }, "minAmount": { "$ref": "#/definitions/queryInput_searchExpenses_minAmount" }, "maxAmount": { "$ref": "#/definitions/queryInput_searchExpenses_maxAmount" }, "page": { "$ref": "#/definitions/queryInput_searchExpenses_page" }, "pageSize": { "$ref": "#/definitions/queryInput_searchExpenses_pageSize" } }, "required": ["minAmount", "maxAmount", "page", "pageSize"], "title": "searchExpensesRequest", "$resolvedRef": "/definitions/searchExpensesRequest" }, "searchExpenseDraftsRequest": { "type": "object", "additionalProperties": false, "required": [], "properties": { "fromDate": { "type": "string", "description": "Expense drafts that were created after the specified date in the format YYYY-MM-DD" }, "toDate": { "type": "string", "description": "Expense drafts that were created until the specified date in the format YYYY-MM-DD" }, "description": { "type": "string", "description": "Expense draft description" }, "supplierId": { "type": "string", "description": "Supplier's ID" }, "supplierName": { "type": "string", "description": "Supplier's name" }, "page": { "$ref": "#/definitions/queryInput_searchExpenses_page" }, "pageSize": { "$ref": "#/definitions/queryInput_searchExpenses_pageSize" } }, "title": "searchExpenseDraftsRequest", "$resolvedRef": "/definitions/searchExpenseDraftsRequest" }, "QueryInput": { "type": "object", "title": "QueryInput", "properties": { "getExpense": { "$ref": "#/definitions/getExpenseRequest" }, "updateExpense": { "$ref": "#/definitions/updateExpenseRequest" }, "searchExpenses": { "$ref": "#/definitions/searchExpensesRequest" }, "searchExpenseDrafts": { "$ref": "#/definitions/searchExpenseDraftsRequest" } } }, "_schema": { "type": "object", "title": "_schema", "properties": { "mutation": { "$ref": "#/definitions/Mutation" }, "mutationInput": { "$ref": "#/definitions/MutationInput" }, "query": { "$ref": "#/definitions/Query" }, "queryInput": { "$ref": "#/definitions/QueryInput" } }, "required": ["query"] } } } };
//# sourceMappingURL=jsonSchemaBundle.js.map