@accounter/green-invoice-graphql 0.8.2-alpha-20251102160658-6d41b0a7bb225382246645badf39a28bcd8102e1 → 0.8.2-alpha-20251102162844-adaba3b25910083f6ebd80bd580629e1c0871260

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,150 +7,154 @@ directive @enum(subgraph: String, value: String) on ENUM_VALUE
7
7
 
8
8
  directive @resolveRoot(subgraph: String) on FIELD_DEFINITION
9
9
 
10
- directive @example(subgraph: String, value: ObjMap) repeatable on FIELD_DEFINITION | OBJECT | INPUT_OBJECT | ENUM | SCALAR
10
+ directive @resolveRootField(subgraph: String, field: String) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
11
11
 
12
12
  directive @statusCodeTypeName(subgraph: String, typeName: String, statusCode: String) repeatable on UNION
13
13
 
14
+ directive @example(subgraph: String, value: ObjMap) repeatable on FIELD_DEFINITION | OBJECT | INPUT_OBJECT | ENUM | SCALAR
15
+
14
16
  directive @httpOperation(subgraph: String, path: String, operationSpecificHeaders: [[String]], httpMethod: HTTPMethod, isBinary: Boolean, requestBaseBody: ObjMap, queryParamArgMap: ObjMap, queryStringOptionsByParam: ObjMap, jsonApiFields: Boolean, queryStringOptions: ObjMap) on FIELD_DEFINITION
15
17
 
16
18
  directive @transport(subgraph: String, kind: String, location: String, headers: [[String]], queryStringOptions: ObjMap, queryParams: [[String]]) repeatable on SCHEMA
17
19
 
18
20
  type Query {
19
- getDocument(id: String!): _DOLLAR_defs_Document @httpOperation(subgraph: "GreenInvoice", path: "/documents/{args.id}", httpMethod: GET)
20
- searchDocuments(input: _DOLLAR_defs_searchDocumentsRequest_Input): _DOLLAR_defs_searchDocumentsResponse @httpOperation(subgraph: "GreenInvoice", path: "/documents/search", httpMethod: POST)
21
- previewDocument(input: _DOLLAR_defs_DocumentInputNew_Input): _DOLLAR_defs_previewDocumentResponse @httpOperation(subgraph: "GreenInvoice", path: "/documents/preview", httpMethod: POST)
22
- getLinkedDocuments(id: String!): _DOLLAR_defs_GetLinkedDocuments @httpOperation(subgraph: "GreenInvoice", path: "/documents/{args.id}/linked", httpMethod: GET)
23
- getExpense(id: String!): _DOLLAR_defs_GetExpense @httpOperation(subgraph: "GreenInvoice", path: "/expenses/{args.id}", httpMethod: GET)
24
- searchExpenses(input: _DOLLAR_defs_searchExpensesRequest_Input): _DOLLAR_defs_searchExpensesResponse @httpOperation(subgraph: "GreenInvoice", path: "/expenses/search", httpMethod: POST)
25
- searchExpenseDrafts(input: _DOLLAR_defs_searchExpenseDraftsRequest_Input): searchExpenseDrafts_response @httpOperation(subgraph: "GreenInvoice", path: "/expenses/drafts/search", httpMethod: POST)
26
- getClient(id: String!): _DOLLAR_defs_getClientResponse @httpOperation(subgraph: "GreenInvoice", path: "/clients/{args.id}", httpMethod: GET)
21
+ previewDocument(input: DocumentInputNew_Input): previewDocumentResponse @httpOperation(subgraph: "GreenInvoice", path: "/documents/preview", httpMethod: POST)
22
+ getExpense(id: String!): GetExpense @httpOperation(subgraph: "GreenInvoice", path: "/expenses/{args.id}", httpMethod: GET)
23
+ searchExpenses(input: searchExpensesRequest_Input): searchExpensesResponse @httpOperation(subgraph: "GreenInvoice", path: "/expenses/search", httpMethod: POST)
24
+ searchDocuments(input: searchDocumentsRequest_Input): searchDocumentsResponse @httpOperation(subgraph: "GreenInvoice", path: "/documents/search", httpMethod: POST)
25
+ searchExpenseDrafts(input: searchExpenseDraftsRequest_Input): searchExpenseDrafts_response @httpOperation(subgraph: "GreenInvoice", path: "/expenses/drafts/search", httpMethod: POST)
26
+ getDocument(id: String!): Document @httpOperation(subgraph: "GreenInvoice", path: "/documents/{args.id}", httpMethod: GET)
27
+ getLinkedDocuments(id: String!): GetLinkedDocuments @httpOperation(subgraph: "GreenInvoice", path: "/documents/{args.id}/linked", httpMethod: GET)
28
+ getClient(id: String!): getClientResponse @httpOperation(subgraph: "GreenInvoice", path: "/clients/{args.id}", httpMethod: GET)
27
29
  }
28
30
 
29
- """A Single Document"""
30
- type _DOLLAR_defs_Document {
31
- """
32
- Total amount, in requested currency (including the VAT, Discount & Rounding)
33
- """
34
- amount: NonNegativeFloat!
35
- """
36
- Amount due VAT - Amount before VAT, and before rounding & discount (if requested)
37
- """
38
- amountDueVat: NonNegativeFloat!
39
- """Amount due VAT - local currency"""
40
- amountDueVatLocal: NonNegativeFloat!
41
- """Amount excluded VAT - Amount that is excluded of VAT"""
42
- amountExcludeVat: NonNegativeFloat!
43
- """
44
- Amount exempt VAT - 0 unless there's one or more items that are excluded of VAT such as mixed documents (that have both VAT excluded & included items)
45
- """
46
- amountExemptVat: NonNegativeFloat!
47
- """Amount in local currency"""
48
- amountLocal: NonNegativeFloat!
49
- """
50
- Amount that is still left to be paid, exists only in payment request documents
51
- """
52
- amountOpened: NonNegativeFloat!
53
- business: _DOLLAR_defs_Business!
54
- calculatedAmountLocal: Float!
55
- calculatedAmountOpenedLocal: Float!
56
- calculatedIncomeAmountExcludeLocal: Float!
57
- calculatedIncomeAmountLocal: Float!
58
- calculatedPaymentAmountLocal: Float!
59
- cancellable: Boolean!
60
- cancelType: Float
61
- client: query_getDocument_client!
62
- """The creation date, in UNIX timestamp format"""
63
- creationDate: NonNegativeInt!
64
- currency: _DOLLAR_defs_Currency!
65
- """Currency rate relative to ILS"""
66
- currencyRate: NonNegativeFloat!
67
- data: _DOLLAR_defs_DocumentData!
31
+ union previewDocumentResponse = query_previewDocument_oneOf_0 | ErrorResponse
32
+
33
+ type query_previewDocument_oneOf_0 {
34
+ """Preview document file in Base64"""
35
+ file: String!
36
+ }
37
+
38
+ """Error"""
39
+ type ErrorResponse {
40
+ errorCode: Float
41
+ errorMessage: String
42
+ }
43
+
44
+ input DocumentInputNew_Input {
68
45
  """Document's description"""
69
- description: NonEmptyString!
70
- """Document reference date"""
71
- documentDate: Date!
72
- downloaded: Boolean!
46
+ description: String
47
+ remarks: String
73
48
  """Texts appearing in footer"""
74
49
  footer: String
75
- """Document ID"""
76
- id: String!
77
- income: [_DOLLAR_defs_Income]!
78
- lang: _DOLLAR_defs_DocumentLang!
79
- linkedDocuments: [_DOLLAR_defs_DocumentLinkedDocument]
80
- """Document tax number"""
81
- number: String!
82
- payment: [_DOLLAR_defs_PaymentDocument]!
83
- ref: [Float]!
84
- remarks: String
85
- reverseCharge: Boolean!
50
+ type: DocumentType!
51
+ """Document date in the format YYYY-MM-DD"""
52
+ date: String
53
+ """Document payment due date in the format YYYY-MM-DD"""
54
+ dueDate: String
55
+ lang: DocumentLang!
56
+ currency: Currency!
57
+ vatType: VatType!
58
+ discount: DocumentDiscount_Input
86
59
  """Round the amounts"""
87
- rounding: Boolean!
60
+ rounding: Boolean
88
61
  """Digital sign the document"""
89
- signed: Boolean!
90
- skinId: Float!
91
- """Document status"""
92
- status: Float!
93
- taxConfirmationEligible: Boolean!
94
- templateId: Float!
95
- type: _DOLLAR_defs_DocumentType!
96
- url: _DOLLAR_defs_Url!
97
- userName: String
98
- """VAT amount"""
99
- vat: NonNegativeFloat!
100
- vatLocal: Float
101
- """VAT rate"""
102
- vatRate: NonNegativeFloat!
103
- vatType: _DOLLAR_defs_VatType!
62
+ signed: Boolean
63
+ """Max payments allowed (valid only on supported accounts)"""
64
+ maxPayments: Int
65
+ client: mutationInput_addDocument_input_allOf_0_client_Input
66
+ income: [Income_Input]
67
+ payment: [PaymentDocument_Input]
68
+ """
69
+ Linked document IDs. allows you to state the related / relevant documents, e.g.: when creating a receipt, attach your original invoice document ID as one of the ids in the linkedDocumentIds - this in turn will automatically close the original invoice if needed.
70
+ """
71
+ linkedDocumentIds: [String]
72
+ """
73
+ Linked payment ID (valid for document type 305 only). allows you to define the paymentId that the document is going to be relevant to, this can be attached only to invoice documents (type 305).
74
+ """
75
+ linkedPaymentId: String
76
+ linkType: mutationInput_addDocument_input_allOf_0_linkType
104
77
  }
105
78
 
106
- """Floats that will have a value of 0 or more."""
107
- scalar NonNegativeFloat
79
+ """Document type"""
80
+ enum DocumentType {
81
+ _10 @enum(subgraph: "GreenInvoice", value: "10")
82
+ _100 @enum(subgraph: "GreenInvoice", value: "100")
83
+ _200 @enum(subgraph: "GreenInvoice", value: "200")
84
+ _210 @enum(subgraph: "GreenInvoice", value: "210")
85
+ _300 @enum(subgraph: "GreenInvoice", value: "300")
86
+ _305 @enum(subgraph: "GreenInvoice", value: "305")
87
+ _320 @enum(subgraph: "GreenInvoice", value: "320")
88
+ _330 @enum(subgraph: "GreenInvoice", value: "330")
89
+ _400 @enum(subgraph: "GreenInvoice", value: "400")
90
+ _405 @enum(subgraph: "GreenInvoice", value: "405")
91
+ _500 @enum(subgraph: "GreenInvoice", value: "500")
92
+ _600 @enum(subgraph: "GreenInvoice", value: "600")
93
+ _610 @enum(subgraph: "GreenInvoice", value: "610")
94
+ }
108
95
 
109
- type _DOLLAR_defs_Business {
110
- accountantDocsEmailSettings: Float!
111
- accountantEmails: [JSON]!
112
- accountantReportEmailSettings: Float!
113
- accountingType: Float!
114
- active: Boolean!
115
- advanceNationalInsuranceRate: Float!
116
- advanceTaxRate: Float!
117
- bankDisplay: Boolean!
118
- bankDisplayEn: Boolean!
119
- deductionRate: Float!
120
- documentsEmailSettings: Float!
121
- emailSubjectType: Float!
122
- """Is the business exemption free or not"""
123
- exemption: Boolean!
124
- incomeReportEmailSettings: Float!
125
- incomeReportFormatType: Float!
126
- reportSendingDay: Float!
127
- senderEmailSettings: Float!
128
- type: query_getDocument_business_type!
96
+ """Document language"""
97
+ enum DocumentLang {
98
+ en
99
+ he
129
100
  }
130
101
 
131
- """
132
- The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
133
- """
134
- scalar JSON @specifiedBy(url: "http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf")
102
+ """3-letter ISO item currency code"""
103
+ enum Currency {
104
+ ILS
105
+ USD
106
+ EUR
107
+ GBP
108
+ JPY
109
+ CHF
110
+ CNY
111
+ AUD
112
+ CAD
113
+ RUB
114
+ BRL
115
+ HKD
116
+ SGD
117
+ THB
118
+ MXN
119
+ TRY
120
+ NZD
121
+ SEK
122
+ NOK
123
+ DKK
124
+ KRW
125
+ INR
126
+ IDR
127
+ PLN
128
+ RON
129
+ ZAR
130
+ HRK
131
+ }
135
132
 
136
- """The business type ID"""
137
- enum query_getDocument_business_type {
133
+ """VAT type"""
134
+ enum VatType @example(subgraph: "GreenInvoice", value: "0") {
135
+ _0 @enum(subgraph: "GreenInvoice", value: "0")
138
136
  _1 @enum(subgraph: "GreenInvoice", value: "1")
139
137
  _2 @enum(subgraph: "GreenInvoice", value: "2")
140
- _3 @enum(subgraph: "GreenInvoice", value: "3")
141
- _4 @enum(subgraph: "GreenInvoice", value: "4")
142
- _5 @enum(subgraph: "GreenInvoice", value: "5")
143
- _6 @enum(subgraph: "GreenInvoice", value: "6")
144
138
  }
145
139
 
146
- type query_getDocument_client {
147
- country: _DOLLAR_defs_Country
148
- """List of email addresses"""
149
- emails: [EmailAddress]
150
- """The client ID"""
151
- id: UUID
140
+ """Discount information"""
141
+ input DocumentDiscount_Input {
142
+ amount: Float!
143
+ type: mutationInput_addDocument_input_allOf_0_discount_type!
144
+ }
145
+
146
+ """Discount amount type"""
147
+ enum mutationInput_addDocument_input_allOf_0_discount_type {
148
+ sum
149
+ percentage
150
+ }
151
+
152
+ input mutationInput_addDocument_input_allOf_0_client_Input {
153
+ country: Country
154
+ emails: [String]
155
+ id: JSON!
152
156
  """The client name"""
153
- name: NonEmptyString
157
+ name: String
154
158
  phone: String
155
159
  """The client tax ID"""
156
160
  taxId: String
@@ -168,11 +172,10 @@ type query_getDocument_client {
168
172
  mobile: String
169
173
  """Add a temporary client to the clients' list"""
170
174
  add: Boolean
171
- JSON: JSON @resolveRoot(subgraph: "GreenInvoice")
172
175
  }
173
176
 
174
177
  """2-letter ISO supplier country code, default is IL"""
175
- enum _DOLLAR_defs_Country {
178
+ enum Country {
176
179
  UG
177
180
  UZ
178
181
  AT
@@ -426,143 +429,44 @@ enum _DOLLAR_defs_Country {
426
429
  }
427
430
 
428
431
  """
429
- A field whose value conforms to the standard internet email address format as specified in HTML Spec: https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address.
430
- """
431
- scalar EmailAddress @specifiedBy(url: "https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address")
432
-
433
- """
434
- A field whose value is a generic Universally Unique Identifier: https://en.wikipedia.org/wiki/Universally_unique_identifier.
432
+ The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
435
433
  """
436
- scalar UUID
437
-
438
- """A string that cannot be passed as an empty value"""
439
- scalar NonEmptyString
440
-
441
- """Integers that will have a value of 0 or more."""
442
- scalar NonNegativeInt
443
-
444
- """3-letter ISO item currency code"""
445
- enum _DOLLAR_defs_Currency {
446
- ILS
447
- USD
448
- EUR
449
- GBP
450
- JPY
451
- CHF
452
- CNY
453
- AUD
454
- CAD
455
- RUB
456
- BRL
457
- HKD
458
- SGD
459
- THB
460
- MXN
461
- TRY
462
- NZD
463
- SEK
464
- NOK
465
- DKK
466
- KRW
467
- INR
468
- IDR
469
- PLN
470
- RON
471
- ZAR
472
- HRK
473
- }
474
-
475
- type _DOLLAR_defs_DocumentData {
476
- """TODO: implement"""
477
- tags: [JSON]
478
- }
479
-
480
- """Represents date values"""
481
- scalar Date
434
+ scalar JSON @specifiedBy(url: "http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf")
482
435
 
483
- type _DOLLAR_defs_Income {
436
+ input Income_Input {
484
437
  """Amount"""
485
- amount: NonNegativeFloat
438
+ amount: Float
486
439
  """Total amount"""
487
- amountTotal: NonNegativeFloat
440
+ amountTotal: Float
488
441
  """Catalog number"""
489
442
  catalogNum: String
490
- currency: _DOLLAR_defs_Currency!
443
+ currency: Currency!
491
444
  """Currency rate relative to ILS"""
492
- currencyRate: NonNegativeFloat
445
+ currencyRate: Float
493
446
  """Item description"""
494
- description: NonEmptyString!
447
+ description: String!
495
448
  """The ID of the item to attach as income"""
496
449
  itemId: String
497
450
  """Item price"""
498
- price: NonNegativeFloat!
451
+ price: Float!
499
452
  """Quantity"""
500
- quantity: NonNegativeFloat!
453
+ quantity: Float!
501
454
  """VAT amount"""
502
- vat: NonNegativeFloat
455
+ vat: Float
503
456
  """VAT rate"""
504
- vatRate: NonNegativeFloat
505
- vatType: _DOLLAR_defs_VatType!
506
- }
507
-
508
- """VAT type"""
509
- enum _DOLLAR_defs_VatType @example(subgraph: "GreenInvoice", value: "0") {
510
- _0 @enum(subgraph: "GreenInvoice", value: "0")
511
- _1 @enum(subgraph: "GreenInvoice", value: "1")
512
- _2 @enum(subgraph: "GreenInvoice", value: "2")
513
- }
514
-
515
- """Document language"""
516
- enum _DOLLAR_defs_DocumentLang {
517
- en
518
- he
519
- }
520
-
521
- """A Linked Document"""
522
- type _DOLLAR_defs_DocumentLinkedDocument {
523
- """
524
- Total amount, in requested currency (including the VAT, Discount & Rounding)
525
- """
526
- amount: NonNegativeFloat!
527
- currency: _DOLLAR_defs_Currency!
528
- """Currency rate relative to ILS"""
529
- currencyRate: NonNegativeFloat!
530
- """Document reference date"""
531
- documentDate: Date!
532
- """Document ID"""
533
- id: String!
534
- """Document tax number"""
535
- number: String!
536
- reverseCharge: Boolean!
537
- type: _DOLLAR_defs_DocumentType!
538
- }
539
-
540
- """Document type"""
541
- enum _DOLLAR_defs_DocumentType {
542
- _10 @enum(subgraph: "GreenInvoice", value: "10")
543
- _100 @enum(subgraph: "GreenInvoice", value: "100")
544
- _200 @enum(subgraph: "GreenInvoice", value: "200")
545
- _210 @enum(subgraph: "GreenInvoice", value: "210")
546
- _300 @enum(subgraph: "GreenInvoice", value: "300")
547
- _305 @enum(subgraph: "GreenInvoice", value: "305")
548
- _320 @enum(subgraph: "GreenInvoice", value: "320")
549
- _330 @enum(subgraph: "GreenInvoice", value: "330")
550
- _400 @enum(subgraph: "GreenInvoice", value: "400")
551
- _405 @enum(subgraph: "GreenInvoice", value: "405")
552
- _500 @enum(subgraph: "GreenInvoice", value: "500")
553
- _600 @enum(subgraph: "GreenInvoice", value: "600")
554
- _610 @enum(subgraph: "GreenInvoice", value: "610")
457
+ vatRate: Float
458
+ vatType: VatType!
555
459
  }
556
460
 
557
- type _DOLLAR_defs_PaymentDocument {
558
- currency: _DOLLAR_defs_Currency!
461
+ input PaymentDocument_Input {
462
+ currency: Currency!
559
463
  """Currency rate relative to ILS"""
560
- currencyRate: NonNegativeFloat
464
+ currencyRate: Float
561
465
  date: String
562
466
  """Sum paid"""
563
467
  price: Float!
564
- type: query_getDocument_payment_items_type!
565
- subType: query_getDocument_payment_items_subType
468
+ type: mutationInput_addDocument_input_allOf_0_payment_items_type!
469
+ subType: mutationInput_addDocument_input_allOf_0_payment_items_subType
566
470
  """Bank name (required when using Cheques)"""
567
471
  bankName: String
568
472
  """Bank branch number (required when using Cheques)"""
@@ -575,11 +479,11 @@ type _DOLLAR_defs_PaymentDocument {
575
479
  accountId: String
576
480
  """Transaction ID (PayPal / Payment App / Other)"""
577
481
  transactionId: String
578
- appType: query_getDocument_payment_items_appType
579
- cardType: query_getDocument_payment_items_cardType
482
+ appType: mutationInput_addDocument_input_allOf_0_payment_items_appType
483
+ cardType: mutationInput_addDocument_input_allOf_0_payment_items_cardType
580
484
  """Credit card's last 4 digits"""
581
485
  cardNum: String
582
- dealType: query_getDocument_payment_items_dealType
486
+ dealType: mutationInput_addDocument_input_allOf_0_payment_items_dealType
583
487
  """Credit card's payments count (1-36)"""
584
488
  numPayments: Int
585
489
  """Credit card's first payment"""
@@ -587,7 +491,7 @@ type _DOLLAR_defs_PaymentDocument {
587
491
  }
588
492
 
589
493
  """Payment method"""
590
- enum query_getDocument_payment_items_type {
494
+ enum mutationInput_addDocument_input_allOf_0_payment_items_type {
591
495
  NEGATIVE_1 @enum(subgraph: "GreenInvoice", value: "-1")
592
496
  _0 @enum(subgraph: "GreenInvoice", value: "0")
593
497
  _1 @enum(subgraph: "GreenInvoice", value: "1")
@@ -601,7 +505,7 @@ enum query_getDocument_payment_items_type {
601
505
  }
602
506
 
603
507
  """Other payment sub type (required when using 'other' as a Payment type)"""
604
- enum query_getDocument_payment_items_subType {
508
+ enum mutationInput_addDocument_input_allOf_0_payment_items_subType {
605
509
  _1 @enum(subgraph: "GreenInvoice", value: "1")
606
510
  _2 @enum(subgraph: "GreenInvoice", value: "2")
607
511
  _3 @enum(subgraph: "GreenInvoice", value: "3")
@@ -613,7 +517,7 @@ enum query_getDocument_payment_items_subType {
613
517
  }
614
518
 
615
519
  """Payment app type (required when using 'payment app' as a Payment type)"""
616
- enum query_getDocument_payment_items_appType {
520
+ enum mutationInput_addDocument_input_allOf_0_payment_items_appType {
617
521
  _1 @enum(subgraph: "GreenInvoice", value: "1")
618
522
  _2 @enum(subgraph: "GreenInvoice", value: "2")
619
523
  _3 @enum(subgraph: "GreenInvoice", value: "3")
@@ -623,7 +527,7 @@ enum query_getDocument_payment_items_appType {
623
527
  }
624
528
 
625
529
  """Credit card type"""
626
- enum query_getDocument_payment_items_cardType {
530
+ enum mutationInput_addDocument_input_allOf_0_payment_items_cardType {
627
531
  _1 @enum(subgraph: "GreenInvoice", value: "1")
628
532
  _2 @enum(subgraph: "GreenInvoice", value: "2")
629
533
  _3 @enum(subgraph: "GreenInvoice", value: "3")
@@ -632,7 +536,7 @@ enum query_getDocument_payment_items_cardType {
632
536
  }
633
537
 
634
538
  """Credit card deal type"""
635
- enum query_getDocument_payment_items_dealType {
539
+ enum mutationInput_addDocument_input_allOf_0_payment_items_dealType {
636
540
  _1 @enum(subgraph: "GreenInvoice", value: "1")
637
541
  _2 @enum(subgraph: "GreenInvoice", value: "2")
638
542
  _3 @enum(subgraph: "GreenInvoice", value: "3")
@@ -641,248 +545,27 @@ enum query_getDocument_payment_items_dealType {
641
545
  _6 @enum(subgraph: "GreenInvoice", value: "6")
642
546
  }
643
547
 
644
- type _DOLLAR_defs_Url {
645
- """Copy in Hebrew"""
646
- he: String!
647
- """Copy in English"""
648
- en: String
649
- """Origin"""
650
- origin: String!
651
- }
652
-
653
- type _DOLLAR_defs_searchDocumentsResponse {
654
- """Total number of items"""
655
- total: NonNegativeFloat!
656
- """Current page number"""
657
- page: PositiveFloat!
658
- """Number of items per page"""
659
- pageSize: PositiveFloat!
660
- """Total number of pages"""
661
- pages: NonNegativeFloat!
662
- """Starting index"""
663
- from: NonNegativeFloat
664
- """Ending index"""
665
- to: NonNegativeFloat
666
- items: [_DOLLAR_defs_Document]!
667
- }
668
-
669
- """Floats that will have a value greater than 0."""
670
- scalar PositiveFloat
671
-
672
- input _DOLLAR_defs_searchDocumentsRequest_Input {
673
- """Page requested"""
674
- page: Float
675
- """Results per page"""
676
- pageSize: Float
677
- """Document tax number"""
678
- number: String
679
- """Document type"""
680
- type: [_DOLLAR_defs_DocumentType]
681
- """Document status"""
682
- status: [queryInput_searchDocuments_input_status_items]
683
- """Payment types used in this document"""
684
- paymentTypes: [queryInput_searchDocuments_input_paymentTypes_items]
685
- """
686
- Documents that were created after the specified date in the format YYYY-MM-DD
687
- """
688
- fromDate: Date
689
- """
690
- Documents that were created until the specified date in the format YYYY-MM-DD
691
- """
692
- toDate: Date
693
- """Client ID"""
694
- clientId: String
695
- """Client name"""
696
- clientName: String
697
- """Document description"""
698
- description: String
699
- """Whether document was downloaded by client"""
700
- download: Boolean
701
- sort: queryInput_searchDocuments_input_sort
702
- }
703
-
704
- enum queryInput_searchDocuments_input_status_items {
705
- _0 @enum(subgraph: "GreenInvoice", value: "0")
706
- _1 @enum(subgraph: "GreenInvoice", value: "1")
707
- _2 @enum(subgraph: "GreenInvoice", value: "2")
708
- _3 @enum(subgraph: "GreenInvoice", value: "3")
709
- _4 @enum(subgraph: "GreenInvoice", value: "4")
710
- }
711
-
712
- enum queryInput_searchDocuments_input_paymentTypes_items {
713
- NEGATIVE_1 @enum(subgraph: "GreenInvoice", value: "-1")
714
- _0 @enum(subgraph: "GreenInvoice", value: "0")
715
- _1 @enum(subgraph: "GreenInvoice", value: "1")
716
- _2 @enum(subgraph: "GreenInvoice", value: "2")
717
- _3 @enum(subgraph: "GreenInvoice", value: "3")
718
- _4 @enum(subgraph: "GreenInvoice", value: "4")
719
- _5 @enum(subgraph: "GreenInvoice", value: "5")
720
- _10 @enum(subgraph: "GreenInvoice", value: "10")
721
- _11 @enum(subgraph: "GreenInvoice", value: "11")
722
- }
723
-
724
- enum queryInput_searchDocuments_input_sort {
725
- documentDate
726
- creationDate
727
- }
728
-
729
- union _DOLLAR_defs_previewDocumentResponse = query_previewDocument_oneOf_0 | _DOLLAR_defs_ErrorResponse
730
-
731
- type query_previewDocument_oneOf_0 {
732
- """Preview document file in Base64"""
733
- file: String!
734
- }
735
-
736
- """Error"""
737
- type _DOLLAR_defs_ErrorResponse {
738
- errorCode: Float
739
- errorMessage: String
740
- }
741
-
742
- input _DOLLAR_defs_DocumentInputNew_Input {
743
- """Document's description"""
744
- description: NonEmptyString
745
- remarks: String
746
- """Texts appearing in footer"""
747
- footer: String
748
- type: _DOLLAR_defs_DocumentType!
749
- """Document date in the format YYYY-MM-DD"""
750
- date: String
751
- """Document payment due date in the format YYYY-MM-DD"""
752
- dueDate: String
753
- lang: _DOLLAR_defs_DocumentLang!
754
- currency: _DOLLAR_defs_Currency!
755
- vatType: _DOLLAR_defs_VatType!
756
- discount: _DOLLAR_defs_DocumentDiscount_Input
757
- """Round the amounts"""
758
- rounding: Boolean
759
- """Digital sign the document"""
760
- signed: Boolean
761
- """Max payments allowed (valid only on supported accounts)"""
762
- maxPayments: Int
763
- client: JSON
764
- income: [_DOLLAR_defs_Income_Input]
765
- payment: [_DOLLAR_defs_PaymentDocument_Input]
766
- """
767
- Linked document IDs. allows you to state the related / relevant documents, e.g.: when creating a receipt, attach your original invoice document ID as one of the ids in the linkedDocumentIds - this in turn will automatically close the original invoice if needed.
768
- """
769
- linkedDocumentIds: [String]
770
- """
771
- Linked payment ID (valid for document type 305 only). allows you to define the paymentId that the document is going to be relevant to, this can be attached only to invoice documents (type 305).
772
- """
773
- linkedPaymentId: String
774
- linkType: queryInput_previewDocument_input_linkType
775
- }
776
-
777
- """Discount information"""
778
- input _DOLLAR_defs_DocumentDiscount_Input {
779
- amount: Float!
780
- type: queryInput_previewDocument_input_discount_type!
781
- }
782
-
783
- """Discount amount type"""
784
- enum queryInput_previewDocument_input_discount_type {
785
- sum
786
- percentage
787
- }
788
-
789
- input _DOLLAR_defs_Income_Input {
790
- """Amount"""
791
- amount: NonNegativeFloat
792
- """Total amount"""
793
- amountTotal: NonNegativeFloat
794
- """Catalog number"""
795
- catalogNum: String
796
- currency: _DOLLAR_defs_Currency!
797
- """Currency rate relative to ILS"""
798
- currencyRate: NonNegativeFloat
799
- """Item description"""
800
- description: NonEmptyString!
801
- """The ID of the item to attach as income"""
802
- itemId: String
803
- """Item price"""
804
- price: NonNegativeFloat!
805
- """Quantity"""
806
- quantity: NonNegativeFloat!
807
- """VAT amount"""
808
- vat: NonNegativeFloat
809
- """VAT rate"""
810
- vatRate: NonNegativeFloat
811
- vatType: _DOLLAR_defs_VatType!
812
- }
813
-
814
- input _DOLLAR_defs_PaymentDocument_Input {
815
- currency: _DOLLAR_defs_Currency!
816
- """Currency rate relative to ILS"""
817
- currencyRate: NonNegativeFloat
818
- date: String
819
- """Sum paid"""
820
- price: Float!
821
- type: query_getDocument_payment_items_type!
822
- subType: query_getDocument_payment_items_subType
823
- """Bank name (required when using Cheques)"""
824
- bankName: String
825
- """Bank branch number (required when using Cheques)"""
826
- bankBranch: String
827
- """Bank account number (required when using Cheques)"""
828
- bankAccount: String
829
- """Cheque number (required when using Cheques)"""
830
- chequeNum: String
831
- """Payer account (PayPal / Payment App / Other)"""
832
- accountId: String
833
- """Transaction ID (PayPal / Payment App / Other)"""
834
- transactionId: String
835
- appType: query_getDocument_payment_items_appType
836
- cardType: query_getDocument_payment_items_cardType
837
- """Credit card's last 4 digits"""
838
- cardNum: String
839
- dealType: query_getDocument_payment_items_dealType
840
- """Credit card's payments count (1-36)"""
841
- numPayments: Int
842
- """Credit card's first payment"""
843
- firstPayment: Float
844
- }
845
-
846
548
  """Reference type (applicable only when using linkedDocumentIds)"""
847
- enum queryInput_previewDocument_input_linkType {
549
+ enum mutationInput_addDocument_input_allOf_0_linkType {
848
550
  LINK
849
551
  CANCEL
850
552
  }
851
553
 
852
- type _DOLLAR_defs_GetLinkedDocuments {
853
- """
854
- Total amount, in requested currency (including the VAT, Discount & Rounding)
855
- """
856
- amount: NonNegativeFloat
857
- currency: _DOLLAR_defs_Currency
858
- """Currency rate relative to ILS"""
859
- currencyRate: NonNegativeFloat
860
- """Document reference date"""
861
- documentDate: Date
862
- """Document ID"""
863
- id: String
864
- """Document tax number"""
865
- number: String
866
- """Document status"""
867
- status: Float
868
- type: _DOLLAR_defs_DocumentType
869
- }
870
-
871
554
  """A Single Expense"""
872
- type _DOLLAR_defs_GetExpense {
555
+ type GetExpense {
873
556
  """The amount excluding the vat"""
874
557
  amountExcludeVat: Float
875
558
  """The expense ID"""
876
559
  id: String
877
- businessType: query_getExpense_businessType
878
- documentType: _DOLLAR_defs_ExpenseDocumentType
879
- status: query_getExpense_status
880
- paymentType: query_getExpense_paymentType
881
- currency: _DOLLAR_defs_Currency
560
+ businessType: mutation_updateExpense_oneOf_0_businessType
561
+ documentType: ExpenseDocumentType
562
+ status: mutation_updateExpense_oneOf_0_status
563
+ paymentType: mutation_updateExpense_oneOf_0_paymentType
564
+ currency: Currency
882
565
  """Currency rate relative to ILS"""
883
- currencyRate: NonNegativeFloat
566
+ currencyRate: Float
884
567
  """VAT amount"""
885
- vat: NonNegativeFloat
568
+ vat: Float
886
569
  """The total amount of the expense"""
887
570
  amount: Float
888
571
  """Date of the expense"""
@@ -897,7 +580,7 @@ type _DOLLAR_defs_GetExpense {
897
580
  description: String
898
581
  """Remarks for the expense"""
899
582
  remarks: String
900
- supplier: _DOLLAR_defs_Supplier
583
+ supplier: Supplier
901
584
  """URL of expense thumbnail"""
902
585
  thumbnail: String
903
586
  """URL to download the expense thumbnail"""
@@ -906,7 +589,7 @@ type _DOLLAR_defs_GetExpense {
906
589
  cancellable: Boolean
907
590
  """Reporting date of the expense"""
908
591
  reportingDate: String
909
- accountingClassification: _DOLLAR_defs_AccountingClassification
592
+ accountingClassification: AccountingClassification
910
593
  """The local amount of the expense"""
911
594
  amountLocal: Float
912
595
  """The amount of accounting"""
@@ -914,13 +597,13 @@ type _DOLLAR_defs_GetExpense {
914
597
  """The vat amount of accounting"""
915
598
  vatAccounting: Float
916
599
  """The creation date, in UNIX timestamp format"""
917
- creationDate: NonNegativeInt
600
+ creationDate: Int
918
601
  """The last update date of the expense, in UNIX timestamp format"""
919
602
  lastUpdateDate: Int
920
603
  }
921
604
 
922
605
  """The business type ID"""
923
- enum query_getExpense_businessType {
606
+ enum mutation_updateExpense_oneOf_0_businessType {
924
607
  _1 @enum(subgraph: "GreenInvoice", value: "1")
925
608
  _2 @enum(subgraph: "GreenInvoice", value: "2")
926
609
  _3 @enum(subgraph: "GreenInvoice", value: "3")
@@ -930,7 +613,7 @@ enum query_getExpense_businessType {
930
613
  }
931
614
 
932
615
  """Document type"""
933
- enum _DOLLAR_defs_ExpenseDocumentType {
616
+ enum ExpenseDocumentType {
934
617
  _20 @enum(subgraph: "GreenInvoice", value: "20")
935
618
  _305 @enum(subgraph: "GreenInvoice", value: "305")
936
619
  _320 @enum(subgraph: "GreenInvoice", value: "320")
@@ -940,7 +623,7 @@ enum _DOLLAR_defs_ExpenseDocumentType {
940
623
  }
941
624
 
942
625
  """The status of the expense"""
943
- enum query_getExpense_status {
626
+ enum mutation_updateExpense_oneOf_0_status {
944
627
  _10 @enum(subgraph: "GreenInvoice", value: "10")
945
628
  _20 @enum(subgraph: "GreenInvoice", value: "20")
946
629
  _30 @enum(subgraph: "GreenInvoice", value: "30")
@@ -948,7 +631,7 @@ enum query_getExpense_status {
948
631
  }
949
632
 
950
633
  """Payment method"""
951
- enum query_getExpense_paymentType {
634
+ enum mutation_updateExpense_oneOf_0_paymentType {
952
635
  NEGATIVE_1 @enum(subgraph: "GreenInvoice", value: "-1")
953
636
  _0 @enum(subgraph: "GreenInvoice", value: "0")
954
637
  _1 @enum(subgraph: "GreenInvoice", value: "1")
@@ -960,30 +643,8 @@ enum query_getExpense_paymentType {
960
643
  _11 @enum(subgraph: "GreenInvoice", value: "11")
961
644
  }
962
645
 
963
- type _DOLLAR_defs_Supplier {
964
- """Phone number"""
965
- phone: String
966
- """Mobile number"""
967
- mobile: String
968
- """Email addresses"""
969
- emails: [EmailAddress]
970
- """Fax number"""
971
- fax: String
972
- """Contact person name"""
973
- contactPerson: String
974
- """Street address"""
975
- address: String
976
- """City name"""
977
- city: String
978
- """Zip/postal code"""
979
- zip: String
980
- country: _DOLLAR_defs_Country
981
- """Bank name"""
982
- bankName: String
983
- """Bank branch number"""
984
- bankBranch: String
985
- """Bank account number"""
986
- bankAccount: String
646
+ """Supplier of the expense"""
647
+ type Supplier {
987
648
  """The supplier ID"""
988
649
  id: String
989
650
  """The supplier name"""
@@ -992,16 +653,38 @@ type _DOLLAR_defs_Supplier {
992
653
  active: Boolean
993
654
  """The supplier tax ID"""
994
655
  taxId: String
995
- paymentTerms: query_getExpense_supplier_allOf_3_paymentTerms
656
+ paymentTerms: mutation_addExpense_oneOf_0_allOf_0_supplier_paymentTerms
657
+ """The supplier bank name"""
658
+ bankName: String
659
+ """The supplier bank branch number"""
660
+ bankBranch: String
661
+ """The supplier bank account number"""
662
+ bankAccount: String
663
+ country: Country
664
+ """The supplier phone number"""
665
+ phone: String
666
+ """The supplier mobile number"""
667
+ mobile: String
668
+ """The supplier contact person name"""
669
+ contactPerson: String
670
+ emails: [String]
996
671
  labels: [String]
997
672
  """The creation date, in UNIX timestamp format"""
998
- creationDate: NonNegativeInt
673
+ creationDate: Int
999
674
  """The last update date of the supplier, in UNIX timestamp format"""
1000
675
  lastUpdateDate: Int
1001
676
  """The supplier department"""
1002
677
  department: String
1003
678
  """The supplier accounting key"""
1004
679
  accountingKey: String
680
+ """The supplier address"""
681
+ address: String
682
+ """The supplier city"""
683
+ city: String
684
+ """The supplier zip code"""
685
+ zip: String
686
+ """The supplier fax number"""
687
+ fax: String
1005
688
  """The Supplier remarks for self use"""
1006
689
  remarks: String
1007
690
  """The amount of incomes from the customer"""
@@ -1012,7 +695,7 @@ type _DOLLAR_defs_Supplier {
1012
695
  }
1013
696
 
1014
697
  """The supplier payment term, default is 0"""
1015
- enum query_getExpense_supplier_allOf_3_paymentTerms {
698
+ enum mutation_addExpense_oneOf_0_allOf_0_supplier_paymentTerms {
1016
699
  NEGATIVE_1 @enum(subgraph: "GreenInvoice", value: "-1")
1017
700
  _0 @enum(subgraph: "GreenInvoice", value: "0")
1018
701
  _10 @enum(subgraph: "GreenInvoice", value: "10")
@@ -1026,7 +709,7 @@ enum query_getExpense_supplier_allOf_3_paymentTerms {
1026
709
  }
1027
710
 
1028
711
  """Account classification of the expense"""
1029
- type _DOLLAR_defs_AccountingClassification {
712
+ type AccountingClassification {
1030
713
  """The classification ID, see 'Get Accounting Classifications' endpoint"""
1031
714
  id: String
1032
715
  """The classification key"""
@@ -1035,7 +718,7 @@ type _DOLLAR_defs_AccountingClassification {
1035
718
  code: String
1036
719
  """The classification title"""
1037
720
  title: String
1038
- irsCode: query_getExpense_accountingClassification_irsCode
721
+ irsCode: mutation_addExpense_oneOf_0_allOf_0_accountingClassification_irsCode
1039
722
  """The classification income"""
1040
723
  income: Float
1041
724
  """The classification type"""
@@ -1045,7 +728,7 @@ type _DOLLAR_defs_AccountingClassification {
1045
728
  }
1046
729
 
1047
730
  """The classification IRS code"""
1048
- enum query_getExpense_accountingClassification_irsCode {
731
+ enum mutation_addExpense_oneOf_0_allOf_0_accountingClassification_irsCode {
1049
732
  _1306 @enum(subgraph: "GreenInvoice", value: "1306")
1050
733
  _1307 @enum(subgraph: "GreenInvoice", value: "1307")
1051
734
  _1310 @enum(subgraph: "GreenInvoice", value: "1310")
@@ -1103,23 +786,19 @@ enum query_getExpense_accountingClassification_irsCode {
1103
786
  _8090 @enum(subgraph: "GreenInvoice", value: "8090")
1104
787
  }
1105
788
 
1106
- type _DOLLAR_defs_searchExpensesResponse {
1107
- """Total number of items"""
1108
- total: NonNegativeFloat!
1109
- """Current page number"""
1110
- page: PositiveFloat!
1111
- """Number of items per page"""
1112
- pageSize: PositiveFloat!
1113
- """Total number of pages"""
1114
- pages: NonNegativeFloat!
1115
- """Starting index"""
1116
- from: NonNegativeFloat
1117
- """Ending index"""
1118
- to: NonNegativeFloat
1119
- items: _DOLLAR_defs_GetExpense
789
+ type searchExpensesResponse {
790
+ """The total length of the items that were retrieved"""
791
+ total: Float
792
+ """The page that was requested to retrieve"""
793
+ page: Float
794
+ """The page size that was requested"""
795
+ pageSize: Float
796
+ """The amount of pages that exist"""
797
+ pages: Float
798
+ items: GetExpense
1120
799
  }
1121
800
 
1122
- input _DOLLAR_defs_searchExpensesRequest_Input {
801
+ input searchExpensesRequest_Input {
1123
802
  """
1124
803
  Expense that were created after the specified date in the format YYYY-MM-DD
1125
804
  """
@@ -1158,167 +837,456 @@ input _DOLLAR_defs_searchExpensesRequest_Input {
1158
837
  pageSize: Float!
1159
838
  }
1160
839
 
1161
- union searchExpenseDrafts_response @statusCodeTypeName(subgraph: "GreenInvoice", statusCode: "200", typeName: "searchExpenseDrafts_200_response") @statusCodeTypeName(subgraph: "GreenInvoice", statusCode: "201", typeName: "searchExpenseDrafts_200_response") @statusCodeTypeName(subgraph: "GreenInvoice", statusCode: "404", typeName: "searchExpenseDrafts_404_response") = searchExpenseDrafts_200_response | searchExpenseDrafts_404_response
1162
-
1163
- type searchExpenseDrafts_200_response {
1164
- """Total number of items"""
1165
- total: NonNegativeFloat!
1166
- """Current page number"""
1167
- page: PositiveFloat!
1168
- """Number of items per page"""
1169
- pageSize: PositiveFloat!
1170
- """Total number of pages"""
1171
- pages: NonNegativeFloat!
1172
- """Starting index"""
1173
- from: NonNegativeFloat
1174
- """Ending index"""
1175
- to: NonNegativeFloat
1176
- aggregations: query_searchExpenseDrafts_oneOf_0_allOf_1_aggregations!
1177
- """The expense drafts that were found"""
1178
- items: [query_searchExpenseDrafts_oneOf_0_allOf_1_items_items]!
1179
- }
1180
-
1181
- type query_searchExpenseDrafts_oneOf_0_allOf_1_aggregations {
1182
- totalAmount: query_searchExpenseDrafts_oneOf_0_allOf_1_aggregations_totalAmount!
1183
- }
1184
-
1185
- type query_searchExpenseDrafts_oneOf_0_allOf_1_aggregations_totalAmount {
1186
- value: Float!
1187
- }
1188
-
1189
- """Partial Expense"""
1190
- type query_searchExpenseDrafts_oneOf_0_allOf_1_items_items {
1191
- id: String!
1192
- status: Float!
1193
- """The creation date, in UNIX timestamp format"""
1194
- creationDate: NonNegativeInt!
1195
- lastUpdateDate: Float!
1196
- reportingPeriod: String!
1197
- hasDefaultValues: Boolean!
1198
- url: String!
1199
- thumbnail: String!
1200
- expense: query_searchExpenseDrafts_oneOf_0_allOf_1_items_items_expense!
840
+ type searchDocumentsResponse {
841
+ """The total length of the items that were retrieved"""
842
+ total: Float!
843
+ """The page that was requested to retrieve"""
844
+ page: Float!
845
+ """The page size that was requested"""
846
+ pageSize: Float!
847
+ """The amount of pages that exist"""
848
+ pages: Float!
849
+ items: [Document]!
1201
850
  }
1202
851
 
1203
- type query_searchExpenseDrafts_oneOf_0_allOf_1_items_items_expense {
1204
- accountingClassification: _DOLLAR_defs_AccountingClassification!
1205
- """Is the expense active or not"""
1206
- active: Boolean!
852
+ """A Single Document"""
853
+ type Document {
1207
854
  """
1208
- Should we save the supplier or not (by setting this to true you are required to add a supplier)
855
+ Total amount, in requested currency (including the VAT, Discount & Rounding)
1209
856
  """
1210
- addRecipient: Boolean!
1211
- """The total amount of the expense"""
1212
- amount: Float
1213
- confirmFromEdit: Boolean!
1214
- currency: _DOLLAR_defs_Currency!
1215
- """Currency rate relative to ILS"""
1216
- currencyRate: NonNegativeFloat!
1217
- """Date of the expense"""
1218
- date: String
1219
- """Description for the expense"""
1220
- description: String!
1221
- documentType: _DOLLAR_defs_ExpenseDocumentType!
1222
- """File hash"""
1223
- fileHash: String!
1224
- """Key of the file location"""
1225
- fileKey: String!
1226
- labels: [String]!
1227
- """Number of the expense"""
1228
- number: String
1229
- paymentType: query_searchExpenseDrafts_oneOf_0_allOf_1_items_items_expense_paymentType
1230
- """Reporting date of the expense"""
1231
- reportingDate: String!
1232
- supplier: _DOLLAR_defs_Supplier!
1233
- tags: [String]!
1234
- texts: [String]!
1235
- """VAT amount"""
1236
- vat: NonNegativeFloat!
1237
- }
1238
-
1239
- """Payment method"""
1240
- union query_searchExpenseDrafts_oneOf_0_allOf_1_items_items_expense_paymentType = Boolean_container | query_searchExpenseDrafts_oneOf_0_allOf_1_items_items_expense_paymentType_oneOf_1_container
1241
-
1242
- type Boolean_container {
1243
- Boolean: Boolean @resolveRoot(subgraph: "GreenInvoice")
1244
- }
1245
-
1246
- type query_searchExpenseDrafts_oneOf_0_allOf_1_items_items_expense_paymentType_oneOf_1_container {
1247
- query_searchExpenseDrafts_oneOf_0_allOf_1_items_items_expense_paymentType_oneOf_1: query_searchExpenseDrafts_oneOf_0_allOf_1_items_items_expense_paymentType_oneOf_1 @resolveRoot(subgraph: "GreenInvoice")
1248
- }
1249
-
1250
- enum query_searchExpenseDrafts_oneOf_0_allOf_1_items_items_expense_paymentType_oneOf_1 {
1251
- _1 @enum(subgraph: "GreenInvoice", value: "1")
1252
- _2 @enum(subgraph: "GreenInvoice", value: "2")
1253
- _3 @enum(subgraph: "GreenInvoice", value: "3")
1254
- _4 @enum(subgraph: "GreenInvoice", value: "4")
1255
- _5 @enum(subgraph: "GreenInvoice", value: "5")
1256
- _10 @enum(subgraph: "GreenInvoice", value: "10")
1257
- _11 @enum(subgraph: "GreenInvoice", value: "11")
1258
- }
1259
-
1260
- type searchExpenseDrafts_404_response {
1261
- errorCode: Int
1262
- errorMessage: String
1263
- }
1264
-
1265
- input _DOLLAR_defs_searchExpenseDraftsRequest_Input {
857
+ amount: Float!
1266
858
  """
1267
- Expense drafts that were created after the specified date in the format YYYY-MM-DD
859
+ Amount due VAT - Amount before VAT, and before rounding & discount (if requested)
1268
860
  """
1269
- fromDate: Date
861
+ amountDueVat: Float!
862
+ """Amount due VAT - local currency"""
863
+ amountDueVatLocal: Float!
864
+ """Amount excluded VAT - Amount that is excluded of VAT"""
865
+ amountExcludeVat: Float!
1270
866
  """
1271
- Expense drafts that were created until the specified date in the format YYYY-MM-DD
867
+ Amount exempt VAT - 0 unless there's one or more items that are excluded of VAT such as mixed documents (that have both VAT excluded & included items)
1272
868
  """
1273
- toDate: Date
1274
- """Expense draft description"""
1275
- description: String
1276
- """Supplier's ID"""
1277
- supplierId: String
1278
- """Supplier's name"""
1279
- supplierName: String
869
+ amountExemptVat: Float!
870
+ """Amount in local currency"""
871
+ amountLocal: Float!
872
+ """
873
+ Amount that is still left to be paid, exists only in payment request documents
874
+ """
875
+ amountOpened: Float!
876
+ business: Business!
877
+ calculatedAmountLocal: Float!
878
+ calculatedAmountOpenedLocal: Float!
879
+ calculatedIncomeAmountExcludeLocal: Float!
880
+ calculatedIncomeAmountLocal: Float!
881
+ calculatedPaymentAmountLocal: Float!
882
+ cancellable: Boolean!
883
+ cancelType: Float
884
+ client: Client!
885
+ """The creation date, in UNIX timestamp format"""
886
+ creationDate: Int!
887
+ currency: Currency!
888
+ """Currency rate relative to ILS"""
889
+ currencyRate: Float!
890
+ data: DocumentData!
891
+ """Document's description"""
892
+ description: String!
893
+ """Document reference date"""
894
+ documentDate: String!
895
+ downloaded: Boolean!
896
+ """Texts appearing in footer"""
897
+ footer: String
898
+ """Document ID"""
899
+ id: String!
900
+ income: [Income]!
901
+ lang: DocumentLang!
902
+ linkedDocuments: [DocumentLinkedDocument]
903
+ """Document tax number"""
904
+ number: String!
905
+ payment: [PaymentDocument]!
906
+ ref: [Float]!
907
+ remarks: String
908
+ reverseCharge: Boolean!
909
+ """Round the amounts"""
910
+ rounding: Boolean!
911
+ """Digital sign the document"""
912
+ signed: Boolean!
913
+ skinId: Float!
914
+ """Document status"""
915
+ status: Float!
916
+ taxConfirmationEligible: Boolean!
917
+ templateId: Float!
918
+ type: DocumentType!
919
+ url: Url!
920
+ userName: String
921
+ """VAT amount"""
922
+ vat: Float!
923
+ vatLocal: Float
924
+ """VAT rate"""
925
+ vatRate: Float!
926
+ vatType: VatType!
927
+ }
928
+
929
+ type Business {
930
+ accountantDocsEmailSettings: Float!
931
+ accountantEmails: [JSON]!
932
+ accountantReportEmailSettings: Float!
933
+ accountingType: Float!
934
+ active: Boolean!
935
+ advanceNationalInsuranceRate: Float!
936
+ advanceTaxRate: Float!
937
+ bankDisplay: Boolean!
938
+ bankDisplayEn: Boolean!
939
+ deductionRate: Float!
940
+ documentsEmailSettings: Float!
941
+ emailSubjectType: Float!
942
+ """Is the business exemption free or not"""
943
+ exemption: Boolean!
944
+ incomeReportEmailSettings: Float!
945
+ incomeReportFormatType: Float!
946
+ reportSendingDay: Float!
947
+ senderEmailSettings: Float!
948
+ type: query_searchDocuments_items_items_business_type!
949
+ }
950
+
951
+ """The business type ID"""
952
+ enum query_searchDocuments_items_items_business_type {
953
+ _1 @enum(subgraph: "GreenInvoice", value: "1")
954
+ _2 @enum(subgraph: "GreenInvoice", value: "2")
955
+ _3 @enum(subgraph: "GreenInvoice", value: "3")
956
+ _4 @enum(subgraph: "GreenInvoice", value: "4")
957
+ _5 @enum(subgraph: "GreenInvoice", value: "5")
958
+ _6 @enum(subgraph: "GreenInvoice", value: "6")
959
+ }
960
+
961
+ type Client {
962
+ country: Country!
963
+ emails: [String]!
964
+ """The client ID"""
965
+ id: String!
966
+ """The client name"""
967
+ name: String!
968
+ phone: String!
969
+ """The client tax ID"""
970
+ taxId: String
971
+ """Whether the client is self"""
972
+ self: Boolean!
973
+ }
974
+
975
+ type DocumentData {
976
+ """TODO: implement"""
977
+ tags: [JSON]
978
+ }
979
+
980
+ type Income {
981
+ """Amount"""
982
+ amount: Float
983
+ """Total amount"""
984
+ amountTotal: Float
985
+ """Catalog number"""
986
+ catalogNum: String
987
+ currency: Currency!
988
+ """Currency rate relative to ILS"""
989
+ currencyRate: Float
990
+ """Item description"""
991
+ description: String!
992
+ """The ID of the item to attach as income"""
993
+ itemId: String
994
+ """Item price"""
995
+ price: Float!
996
+ """Quantity"""
997
+ quantity: Float!
998
+ """VAT amount"""
999
+ vat: Float
1000
+ """VAT rate"""
1001
+ vatRate: Float
1002
+ vatType: VatType!
1003
+ }
1004
+
1005
+ """A Linked Document"""
1006
+ type DocumentLinkedDocument {
1007
+ """
1008
+ Total amount, in requested currency (including the VAT, Discount & Rounding)
1009
+ """
1010
+ amount: Float!
1011
+ currency: Currency!
1012
+ """Currency rate relative to ILS"""
1013
+ currencyRate: Float!
1014
+ """Document reference date"""
1015
+ documentDate: String!
1016
+ """Document ID"""
1017
+ id: String!
1018
+ """Document tax number"""
1019
+ number: String!
1020
+ reverseCharge: Boolean!
1021
+ type: DocumentType!
1022
+ }
1023
+
1024
+ type PaymentDocument {
1025
+ currency: Currency!
1026
+ """Currency rate relative to ILS"""
1027
+ currencyRate: Float
1028
+ date: String
1029
+ """Sum paid"""
1030
+ price: Float!
1031
+ type: mutationInput_addDocument_input_allOf_0_payment_items_type!
1032
+ subType: mutationInput_addDocument_input_allOf_0_payment_items_subType
1033
+ """Bank name (required when using Cheques)"""
1034
+ bankName: String
1035
+ """Bank branch number (required when using Cheques)"""
1036
+ bankBranch: String
1037
+ """Bank account number (required when using Cheques)"""
1038
+ bankAccount: String
1039
+ """Cheque number (required when using Cheques)"""
1040
+ chequeNum: String
1041
+ """Payer account (PayPal / Payment App / Other)"""
1042
+ accountId: String
1043
+ """Transaction ID (PayPal / Payment App / Other)"""
1044
+ transactionId: String
1045
+ appType: mutationInput_addDocument_input_allOf_0_payment_items_appType
1046
+ cardType: mutationInput_addDocument_input_allOf_0_payment_items_cardType
1047
+ """Credit card's last 4 digits"""
1048
+ cardNum: String
1049
+ dealType: mutationInput_addDocument_input_allOf_0_payment_items_dealType
1050
+ """Credit card's payments count (1-36)"""
1051
+ numPayments: Int
1052
+ """Credit card's first payment"""
1053
+ firstPayment: Float
1054
+ }
1055
+
1056
+ type Url {
1057
+ """Copy in Hebrew"""
1058
+ he: String!
1059
+ """Copy in English"""
1060
+ en: String
1061
+ """Origin"""
1062
+ origin: String!
1063
+ }
1064
+
1065
+ input searchDocumentsRequest_Input {
1280
1066
  """Page requested"""
1281
1067
  page: Float
1282
1068
  """Results per page"""
1283
1069
  pageSize: Float
1070
+ """Document tax number"""
1071
+ number: String
1072
+ """Document type"""
1073
+ type: [DocumentType]
1074
+ """Document status"""
1075
+ status: [queryInput_searchDocuments_input_status_items]
1076
+ """Payment types used in this document"""
1077
+ paymentTypes: [queryInput_searchDocuments_input_paymentTypes_items]
1078
+ """
1079
+ Documents that were created after the specified date in the format YYYY-MM-DD
1080
+ """
1081
+ fromDate: String
1082
+ """
1083
+ Documents that were created until the specified date in the format YYYY-MM-DD
1084
+ """
1085
+ toDate: String
1086
+ """Client ID"""
1087
+ clientId: String
1088
+ """Client name"""
1089
+ clientName: String
1090
+ """Document description"""
1091
+ description: String
1092
+ """Whether document was downloaded by client"""
1093
+ download: Boolean
1094
+ sort: queryInput_searchDocuments_input_sort
1095
+ }
1096
+
1097
+ enum queryInput_searchDocuments_input_status_items {
1098
+ _0 @enum(subgraph: "GreenInvoice", value: "0")
1099
+ _1 @enum(subgraph: "GreenInvoice", value: "1")
1100
+ _2 @enum(subgraph: "GreenInvoice", value: "2")
1101
+ _3 @enum(subgraph: "GreenInvoice", value: "3")
1102
+ _4 @enum(subgraph: "GreenInvoice", value: "4")
1103
+ }
1104
+
1105
+ enum queryInput_searchDocuments_input_paymentTypes_items {
1106
+ NEGATIVE_1 @enum(subgraph: "GreenInvoice", value: "-1")
1107
+ _0 @enum(subgraph: "GreenInvoice", value: "0")
1108
+ _1 @enum(subgraph: "GreenInvoice", value: "1")
1109
+ _2 @enum(subgraph: "GreenInvoice", value: "2")
1110
+ _3 @enum(subgraph: "GreenInvoice", value: "3")
1111
+ _4 @enum(subgraph: "GreenInvoice", value: "4")
1112
+ _5 @enum(subgraph: "GreenInvoice", value: "5")
1113
+ _10 @enum(subgraph: "GreenInvoice", value: "10")
1114
+ _11 @enum(subgraph: "GreenInvoice", value: "11")
1115
+ }
1116
+
1117
+ enum queryInput_searchDocuments_input_sort {
1118
+ documentDate
1119
+ creationDate
1120
+ }
1121
+
1122
+ union searchExpenseDrafts_response @statusCodeTypeName(subgraph: "GreenInvoice", statusCode: "200", typeName: "searchExpenseDraftsResponse") @statusCodeTypeName(subgraph: "GreenInvoice", statusCode: "201", typeName: "searchExpenseDraftsResponse") @statusCodeTypeName(subgraph: "GreenInvoice", statusCode: "404", typeName: "generalErrorResponse") = searchExpenseDraftsResponse | generalErrorResponse
1123
+
1124
+ type searchExpenseDraftsResponse {
1125
+ """The total length of the items that were retrieved"""
1126
+ total: Float!
1127
+ from: Float
1128
+ to: Float
1129
+ """The page that was requested to retrieve"""
1130
+ page: Float!
1131
+ """The page size that was requested"""
1132
+ pageSize: Float!
1133
+ """The amount of pages that exist"""
1134
+ pages: Float!
1135
+ aggregations: query_searchExpenseDrafts_oneOf_0_aggregations!
1136
+ """The expense drafts that were found"""
1137
+ items: [query_searchExpenseDrafts_oneOf_0_items_items]!
1138
+ }
1139
+
1140
+ type query_searchExpenseDrafts_oneOf_0_aggregations {
1141
+ totalAmount: query_searchExpenseDrafts_oneOf_0_aggregations_totalAmount!
1142
+ }
1143
+
1144
+ type query_searchExpenseDrafts_oneOf_0_aggregations_totalAmount {
1145
+ value: Float!
1146
+ }
1147
+
1148
+ """Partial Expense"""
1149
+ type query_searchExpenseDrafts_oneOf_0_items_items {
1150
+ id: String!
1151
+ status: Float!
1152
+ """The creation date, in UNIX timestamp format"""
1153
+ creationDate: Int!
1154
+ lastUpdateDate: Float!
1155
+ reportingPeriod: String!
1156
+ hasDefaultValues: Boolean!
1157
+ url: String!
1158
+ thumbnail: String!
1159
+ expense: query_searchExpenseDrafts_oneOf_0_items_items_expense!
1160
+ }
1161
+
1162
+ type query_searchExpenseDrafts_oneOf_0_items_items_expense {
1163
+ accountingClassification: AccountingClassification!
1164
+ """Is the expense active or not"""
1165
+ active: Boolean!
1166
+ """
1167
+ Should we save the supplier or not (by setting this to true you are required to add a supplier)
1168
+ """
1169
+ addRecipient: Boolean!
1170
+ """The total amount of the expense"""
1171
+ amount: Float
1172
+ confirmFromEdit: Boolean!
1173
+ currency: Currency!
1174
+ """Currency rate relative to ILS"""
1175
+ currencyRate: Float!
1176
+ """Date of the expense"""
1177
+ date: String
1178
+ """Description for the expense"""
1179
+ description: String!
1180
+ documentType: ExpenseDocumentType!
1181
+ """File hash"""
1182
+ fileHash: String!
1183
+ """Key of the file location"""
1184
+ fileKey: String!
1185
+ labels: [String]!
1186
+ """Number of the expense"""
1187
+ number: String
1188
+ paymentType: query_searchExpenseDrafts_oneOf_0_items_items_expense_paymentType
1189
+ """Reporting date of the expense"""
1190
+ reportingDate: String!
1191
+ supplier: Supplier!
1192
+ tags: [String]!
1193
+ texts: [String]!
1194
+ """VAT amount"""
1195
+ vat: Float!
1196
+ }
1197
+
1198
+ """Payment method"""
1199
+ union query_searchExpenseDrafts_oneOf_0_items_items_expense_paymentType = Boolean_container | query_searchExpenseDrafts_oneOf_0_items_items_expense_paymentType_oneOf_1_container
1200
+
1201
+ type Boolean_container {
1202
+ Boolean: Boolean @resolveRoot(subgraph: "GreenInvoice")
1203
+ }
1204
+
1205
+ type query_searchExpenseDrafts_oneOf_0_items_items_expense_paymentType_oneOf_1_container {
1206
+ query_searchExpenseDrafts_oneOf_0_items_items_expense_paymentType_oneOf_1: query_searchExpenseDrafts_oneOf_0_items_items_expense_paymentType_oneOf_1 @resolveRoot(subgraph: "GreenInvoice")
1207
+ }
1208
+
1209
+ enum query_searchExpenseDrafts_oneOf_0_items_items_expense_paymentType_oneOf_1 {
1210
+ _1 @enum(subgraph: "GreenInvoice", value: "1")
1211
+ _2 @enum(subgraph: "GreenInvoice", value: "2")
1212
+ _3 @enum(subgraph: "GreenInvoice", value: "3")
1213
+ _4 @enum(subgraph: "GreenInvoice", value: "4")
1214
+ _5 @enum(subgraph: "GreenInvoice", value: "5")
1215
+ _10 @enum(subgraph: "GreenInvoice", value: "10")
1216
+ _11 @enum(subgraph: "GreenInvoice", value: "11")
1217
+ }
1218
+
1219
+ type generalErrorResponse {
1220
+ errorCode_: Int @resolveRootField(subgraph: "GreenInvoice", field: "errorCode:")
1221
+ errorMessage: String
1222
+ }
1223
+
1224
+ input searchExpenseDraftsRequest_Input {
1225
+ """
1226
+ Expense drafts that were created after the specified date in the format YYYY-MM-DD
1227
+ """
1228
+ fromDate: String
1229
+ """
1230
+ Expense drafts that were created until the specified date in the format YYYY-MM-DD
1231
+ """
1232
+ toDate: String
1233
+ """Expense draft description"""
1234
+ description: String
1235
+ """Supplier's ID"""
1236
+ supplierId: String
1237
+ """Supplier's name"""
1238
+ supplierName: String
1239
+ """Page requested"""
1240
+ page: Float
1241
+ """Results per page"""
1242
+ pageSize: Float
1243
+ }
1244
+
1245
+ type GetLinkedDocuments {
1246
+ """
1247
+ Total amount, in requested currency (including the VAT, Discount & Rounding)
1248
+ """
1249
+ amount: Float
1250
+ currency: Currency
1251
+ """Currency rate relative to ILS"""
1252
+ currencyRate: Float
1253
+ """Document reference date"""
1254
+ documentDate: String
1255
+ """Document ID"""
1256
+ id: String
1257
+ """Document tax number"""
1258
+ number: String
1259
+ """Document status"""
1260
+ status: Float
1261
+ type: DocumentType
1284
1262
  }
1285
1263
 
1286
- type _DOLLAR_defs_getClientResponse {
1287
- """Phone number"""
1288
- phone: String
1289
- """Mobile number"""
1290
- mobile: String
1291
- """Email addresses"""
1292
- emails: [EmailAddress]
1293
- """Fax number"""
1294
- fax: String
1295
- """Contact person name"""
1296
- contactPerson: String
1297
- """Street address"""
1298
- address: String
1299
- """City name"""
1300
- city: String
1301
- """Zip/postal code"""
1302
- zip: String
1303
- country: _DOLLAR_defs_Country
1304
- """Bank name"""
1305
- bankName: String
1306
- """Bank branch number"""
1307
- bankBranch: String
1308
- """Bank account number"""
1309
- bankAccount: String
1264
+ type getClientResponse {
1310
1265
  """The client ID"""
1311
- id: UUID
1266
+ id: String
1312
1267
  """The client name"""
1313
- name: NonEmptyString
1268
+ name: String
1314
1269
  """Is the client currently active or not"""
1315
1270
  active: Boolean
1316
1271
  """The client tax ID"""
1317
1272
  taxId: String
1318
- paymentTerms: query_getClient_allOf_3_paymentTerms
1273
+ paymentTerms: query_getClient_paymentTerms
1274
+ """The client bank name"""
1275
+ bankName: String
1276
+ """The client bank branch"""
1277
+ bankBranch: String
1278
+ """The supplier bank account number"""
1279
+ bankAccount: String
1280
+ country: Country
1281
+ phone: String
1282
+ """The supplier mobile number"""
1283
+ mobile: String
1284
+ """The supplier contact person name"""
1285
+ contactPerson: String
1286
+ emails: [String]
1319
1287
  labels: [String]
1320
1288
  """The creation date, in UNIX timestamp format"""
1321
- creationDate: NonNegativeInt
1289
+ creationDate: Int
1322
1290
  """The last update date of the supplier, in UNIX timestamp format"""
1323
1291
  lastUpdateDate: Int
1324
1292
  """
@@ -1329,10 +1297,18 @@ type _DOLLAR_defs_getClientResponse {
1329
1297
  department: String
1330
1298
  """The supplier accounting key"""
1331
1299
  accountingKey: String
1300
+ """The supplier address"""
1301
+ address: String
1302
+ """The supplier city"""
1303
+ city: String
1304
+ """The supplier zip code"""
1305
+ zip: String
1332
1306
  """The category this client is related to"""
1333
1307
  category: Int
1334
1308
  """The sub category this client is related to"""
1335
1309
  subCategory: Int
1310
+ """Client fax"""
1311
+ fax: String
1336
1312
  """Client remarks for self use"""
1337
1313
  remarks: String
1338
1314
  """The amount of incomes from the customer"""
@@ -1343,7 +1319,7 @@ type _DOLLAR_defs_getClientResponse {
1343
1319
  }
1344
1320
 
1345
1321
  """The client payment term, default is 0"""
1346
- enum query_getClient_allOf_3_paymentTerms {
1322
+ enum query_getClient_paymentTerms {
1347
1323
  NEGATIVE_1 @enum(subgraph: "GreenInvoice", value: "-1")
1348
1324
  _0 @enum(subgraph: "GreenInvoice", value: "0")
1349
1325
  _10 @enum(subgraph: "GreenInvoice", value: "10")
@@ -1357,104 +1333,33 @@ enum query_getClient_allOf_3_paymentTerms {
1357
1333
  }
1358
1334
 
1359
1335
  type Mutation {
1360
- addDocument(
1361
- """Add a document to the current business"""
1362
- input: _DOLLAR_defs_addDocumentRequest_Input
1363
- ): _DOLLAR_defs_addDocumentResponse @httpOperation(subgraph: "GreenInvoice", path: "/documents", httpMethod: POST)
1336
+ addExpense(input: Expense_Input): addExpenseResponse @httpOperation(subgraph: "GreenInvoice", path: "/expenses", httpMethod: POST)
1337
+ addDocument(input: addDocumentRequest_Input): addDocumentResponse @httpOperation(subgraph: "GreenInvoice", path: "/documents", httpMethod: POST)
1338
+ updateExpense(id: String, input: updateExpenseRequest_Input): updateExpenseResponse @httpOperation(subgraph: "GreenInvoice", path: "/expenses/{args.id}", httpMethod: PUT)
1339
+ addExpenseDraftByFile(input: addExpenseDraftByFileRequest_Input): addExpenseDraftByFile_response @httpOperation(subgraph: "GreenInvoice", path: "/expenses/file", httpMethod: POST)
1364
1340
  closeDocument(id: String!): JSON @httpOperation(subgraph: "GreenInvoice", path: "/documents/{args.id}/close", httpMethod: POST)
1365
- addExpense(input: JSON): _DOLLAR_defs_addExpenseResponse @httpOperation(subgraph: "GreenInvoice", path: "/expenses", httpMethod: POST)
1366
- updateExpense(id: String, input: _DOLLAR_defs_updateExpenseRequest_Input): _DOLLAR_defs_updateExpenseResponse @httpOperation(subgraph: "GreenInvoice", path: "/expenses/{args.id}", httpMethod: PUT)
1367
- addExpenseDraftByFile(input: _DOLLAR_defs_addExpenseDraftByFileRequest_Input): addExpenseDraftByFile_response @httpOperation(subgraph: "GreenInvoice", path: "/expenses/file", httpMethod: POST)
1368
- addClient(
1369
- """Add a new client to the current business"""
1370
- input: _DOLLAR_defs_addClientRequest_Input
1371
- ): _DOLLAR_defs_addClientResponse @httpOperation(subgraph: "GreenInvoice", path: "/clients", httpMethod: POST)
1372
- updateClient(id: String!, input: _DOLLAR_defs_updateClientRequest_Input): _DOLLAR_defs_updateClientResponse @httpOperation(subgraph: "GreenInvoice", path: "/clients/{args.id}", httpMethod: PUT)
1373
- deleteClient(id: String!): _DOLLAR_defs_deleteClientResponse @httpOperation(subgraph: "GreenInvoice", path: "/clients/{args.id}", httpMethod: DELETE)
1374
- }
1375
-
1376
- union _DOLLAR_defs_addDocumentResponse = _DOLLAR_defs_AddedDocument | _DOLLAR_defs_ErrorResponse
1377
-
1378
- type _DOLLAR_defs_AddedDocument {
1379
- """Document ID"""
1380
- id: String!
1381
- lang: _DOLLAR_defs_DocumentLang!
1382
- """Document serial number"""
1383
- number: PositiveInt!
1384
- """Digital sign the document"""
1385
- signed: Boolean!
1386
- url: _DOLLAR_defs_Url!
1387
- }
1388
-
1389
- """Integers that will have a value greater than 0."""
1390
- scalar PositiveInt
1391
-
1392
- """Add a document to the current business"""
1393
- input _DOLLAR_defs_addDocumentRequest_Input {
1394
- """Document's description"""
1395
- description: NonEmptyString
1396
- remarks: String
1397
- """Texts appearing in footer"""
1398
- footer: String
1399
- type: _DOLLAR_defs_DocumentType!
1400
- """Document date in the format YYYY-MM-DD"""
1401
- date: String
1402
- """Document payment due date in the format YYYY-MM-DD"""
1403
- dueDate: String
1404
- lang: _DOLLAR_defs_DocumentLang!
1405
- currency: _DOLLAR_defs_Currency!
1406
- vatType: _DOLLAR_defs_VatType!
1407
- discount: _DOLLAR_defs_DocumentDiscount_Input
1408
- """Round the amounts"""
1409
- rounding: Boolean
1410
- """Digital sign the document"""
1411
- signed: Boolean
1412
- """Max payments allowed (valid only on supported accounts)"""
1413
- maxPayments: Int
1414
- client: JSON
1415
- income: [_DOLLAR_defs_Income_Input]
1416
- payment: [_DOLLAR_defs_PaymentDocument_Input]
1417
- """
1418
- Linked document IDs. allows you to state the related / relevant documents, e.g.: when creating a receipt, attach your original invoice document ID as one of the ids in the linkedDocumentIds - this in turn will automatically close the original invoice if needed.
1419
- """
1420
- linkedDocumentIds: [String]
1421
- """
1422
- Linked payment ID (valid for document type 305 only). allows you to define the paymentId that the document is going to be relevant to, this can be attached only to invoice documents (type 305).
1423
- """
1424
- linkedPaymentId: String
1425
- linkType: queryInput_previewDocument_input_linkType
1426
- """Email content to send with the document"""
1427
- emailContent: String
1428
- """Whether to attach the document to the email"""
1429
- attachment: Boolean
1430
1341
  }
1431
1342
 
1432
- union _DOLLAR_defs_addExpenseResponse = _DOLLAR_defs_Expense | _DOLLAR_defs_ErrorResponse
1343
+ union addExpenseResponse = Expense | ErrorResponse
1433
1344
 
1434
- type _DOLLAR_defs_Expense {
1345
+ type Expense {
1435
1346
  paymentType: mutation_addExpense_oneOf_0_allOf_0_paymentType
1436
- currency: _DOLLAR_defs_Currency
1347
+ currency: JSON!
1437
1348
  """Currency rate relative to ILS"""
1438
- currencyRate: NonNegativeFloat
1439
- """VAT amount"""
1440
- vat: NonNegativeFloat
1441
- """The total amount of the expense"""
1442
- amount: Float
1443
- """Date of the expense"""
1444
- date: String
1349
+ currencyRate: Float
1350
+ vat: JSON!
1351
+ amount: JSON!
1352
+ date: JSON!
1445
1353
  """Due date of the expense"""
1446
1354
  dueDate: String
1447
- """Reporting date of the expense"""
1448
- reportingDate: String
1449
- documentType: _DOLLAR_defs_ExpenseDocumentType
1450
- """Number of the expense"""
1451
- number: String
1355
+ reportingDate: JSON!
1356
+ documentType: JSON!
1357
+ number: JSON!
1452
1358
  """Description for the expense"""
1453
1359
  description: String
1454
- """Remarks for the expense"""
1455
1360
  remarks: String
1456
- supplier: _DOLLAR_defs_Supplier
1457
- accountingClassification: _DOLLAR_defs_AccountingClassification
1361
+ supplier: JSON!
1362
+ accountingClassification: JSON!
1458
1363
  """Is the expense active or not"""
1459
1364
  active: Boolean
1460
1365
  """
@@ -1465,7 +1370,6 @@ type _DOLLAR_defs_Expense {
1465
1370
  Should we save the accounting classification (by setting this to true you are required to add an accounting classification that contains title & irsCode)
1466
1371
  """
1467
1372
  addAccountingClassification: Boolean
1468
- JSON: JSON @resolveRoot(subgraph: "GreenInvoice")
1469
1373
  }
1470
1374
 
1471
1375
  """Payment method"""
@@ -1485,17 +1389,105 @@ enum mutation_addExpense_oneOf_0_allOf_0_paymentType_oneOf_1 {
1485
1389
  _11 @enum(subgraph: "GreenInvoice", value: "11")
1486
1390
  }
1487
1391
 
1488
- union _DOLLAR_defs_updateExpenseResponse = _DOLLAR_defs_GetExpense | _DOLLAR_defs_ErrorResponse
1392
+ input Expense_Input {
1393
+ paymentType: mutation_addExpense_oneOf_0_allOf_0_paymentType_Input
1394
+ currency: JSON!
1395
+ """Currency rate relative to ILS"""
1396
+ currencyRate: Float
1397
+ vat: JSON!
1398
+ amount: JSON!
1399
+ date: JSON!
1400
+ """Due date of the expense"""
1401
+ dueDate: String
1402
+ reportingDate: JSON!
1403
+ documentType: JSON!
1404
+ number: JSON!
1405
+ """Description for the expense"""
1406
+ description: String
1407
+ remarks: String
1408
+ supplier: JSON!
1409
+ accountingClassification: JSON!
1410
+ """Is the expense active or not"""
1411
+ active: Boolean
1412
+ """
1413
+ Should we save the supplier or not (by setting this to true you are required to add a supplier)
1414
+ """
1415
+ addRecipient: Boolean
1416
+ """
1417
+ Should we save the accounting classification (by setting this to true you are required to add an accounting classification that contains title & irsCode)
1418
+ """
1419
+ addAccountingClassification: Boolean
1420
+ }
1421
+
1422
+ input mutation_addExpense_oneOf_0_allOf_0_paymentType_Input @oneOf(subgraph: "GreenInvoice") {
1423
+ Boolean: Boolean
1424
+ mutation_addExpense_oneOf_0_allOf_0_paymentType_oneOf_1: mutation_addExpense_oneOf_0_allOf_0_paymentType_oneOf_1
1425
+ }
1426
+
1427
+ union addDocumentResponse = AddedDocument | ErrorResponse
1428
+
1429
+ type AddedDocument {
1430
+ """Document ID"""
1431
+ id: String!
1432
+ lang: DocumentLang!
1433
+ """Document serial number"""
1434
+ number: Int!
1435
+ """Digital sign the document"""
1436
+ signed: Boolean!
1437
+ url: Url!
1438
+ }
1439
+
1440
+ """Add a document to the current business"""
1441
+ input addDocumentRequest_Input {
1442
+ """Document's description"""
1443
+ description: String
1444
+ remarks: String
1445
+ """Texts appearing in footer"""
1446
+ footer: String
1447
+ type: DocumentType!
1448
+ """Document date in the format YYYY-MM-DD"""
1449
+ date: String
1450
+ """Document payment due date in the format YYYY-MM-DD"""
1451
+ dueDate: String
1452
+ lang: DocumentLang!
1453
+ currency: Currency!
1454
+ vatType: VatType!
1455
+ discount: DocumentDiscount_Input
1456
+ """Round the amounts"""
1457
+ rounding: Boolean
1458
+ """Digital sign the document"""
1459
+ signed: Boolean
1460
+ """Max payments allowed (valid only on supported accounts)"""
1461
+ maxPayments: Int
1462
+ client: mutationInput_addDocument_input_allOf_0_client_Input
1463
+ income: [Income_Input]
1464
+ payment: [PaymentDocument_Input]
1465
+ """
1466
+ Linked document IDs. allows you to state the related / relevant documents, e.g.: when creating a receipt, attach your original invoice document ID as one of the ids in the linkedDocumentIds - this in turn will automatically close the original invoice if needed.
1467
+ """
1468
+ linkedDocumentIds: [String]
1469
+ """
1470
+ Linked payment ID (valid for document type 305 only). allows you to define the paymentId that the document is going to be relevant to, this can be attached only to invoice documents (type 305).
1471
+ """
1472
+ linkedPaymentId: String
1473
+ linkType: mutationInput_addDocument_input_allOf_0_linkType
1474
+ """Email content to send with the document"""
1475
+ emailContent: String
1476
+ """Whether to attach the document to the email"""
1477
+ attachment: Boolean
1478
+ }
1479
+
1480
+ union updateExpenseResponse = GetExpense | ErrorResponse
1489
1481
 
1490
- input _DOLLAR_defs_updateExpenseRequest_Input {
1482
+ input updateExpenseRequest_Input {
1491
1483
  """The expense ID"""
1492
1484
  id: String!
1493
1485
  paymentType: mutationInput_updateExpense_input_paymentType_Input
1494
- currency: _DOLLAR_defs_Currency
1486
+ currency: Currency
1495
1487
  """Currency rate relative to ILS"""
1496
- currencyRate: NonNegativeFloat
1488
+ currencyRate: Float
1497
1489
  """VAT amount"""
1498
- vat: NonNegativeFloat
1490
+ vat: Float
1499
1491
  """The total amount of the expense"""
1500
1492
  amount: Float
1501
1493
  """Date of the expense"""
@@ -1504,15 +1496,14 @@ input _DOLLAR_defs_updateExpenseRequest_Input {
1504
1496
  dueDate: String
1505
1497
  """Reporting date of the expense"""
1506
1498
  reportingDate: String
1507
- documentType: _DOLLAR_defs_ExpenseDocumentType
1499
+ documentType: ExpenseDocumentType
1508
1500
  """Number of the expense"""
1509
1501
  number: String
1510
1502
  """Description for the expense"""
1511
1503
  description: String
1512
- """Remarks for the expense"""
1513
1504
  remarks: String
1514
- supplier: _DOLLAR_defs_Supplier_Input
1515
- accountingClassification: _DOLLAR_defs_AccountingClassification_Input
1505
+ supplier: Supplier_Input
1506
+ accountingClassification: AccountingClassification_Input
1516
1507
  """Is the expense active or not"""
1517
1508
  active: Boolean
1518
1509
  }
@@ -1532,30 +1523,8 @@ enum mutationInput_updateExpense_input_paymentType_oneOf_1 {
1532
1523
  _11 @enum(subgraph: "GreenInvoice", value: "11")
1533
1524
  }
1534
1525
 
1535
- input _DOLLAR_defs_Supplier_Input {
1536
- """Phone number"""
1537
- phone: String
1538
- """Mobile number"""
1539
- mobile: String
1540
- """Email addresses"""
1541
- emails: [EmailAddress]
1542
- """Fax number"""
1543
- fax: String
1544
- """Contact person name"""
1545
- contactPerson: String
1546
- """Street address"""
1547
- address: String
1548
- """City name"""
1549
- city: String
1550
- """Zip/postal code"""
1551
- zip: String
1552
- country: _DOLLAR_defs_Country
1553
- """Bank name"""
1554
- bankName: String
1555
- """Bank branch number"""
1556
- bankBranch: String
1557
- """Bank account number"""
1558
- bankAccount: String
1526
+ """Supplier of the expense"""
1527
+ input Supplier_Input {
1559
1528
  """The supplier ID"""
1560
1529
  id: String
1561
1530
  """The supplier name"""
@@ -1564,16 +1533,38 @@ input _DOLLAR_defs_Supplier_Input {
1564
1533
  active: Boolean
1565
1534
  """The supplier tax ID"""
1566
1535
  taxId: String
1567
- paymentTerms: query_getExpense_supplier_allOf_3_paymentTerms
1536
+ paymentTerms: mutation_addExpense_oneOf_0_allOf_0_supplier_paymentTerms
1537
+ """The supplier bank name"""
1538
+ bankName: String
1539
+ """The supplier bank branch number"""
1540
+ bankBranch: String
1541
+ """The supplier bank account number"""
1542
+ bankAccount: String
1543
+ country: Country
1544
+ """The supplier phone number"""
1545
+ phone: String
1546
+ """The supplier mobile number"""
1547
+ mobile: String
1548
+ """The supplier contact person name"""
1549
+ contactPerson: String
1550
+ emails: [String]
1568
1551
  labels: [String]
1569
1552
  """The creation date, in UNIX timestamp format"""
1570
- creationDate: NonNegativeInt
1553
+ creationDate: Int
1571
1554
  """The last update date of the supplier, in UNIX timestamp format"""
1572
1555
  lastUpdateDate: Int
1573
1556
  """The supplier department"""
1574
1557
  department: String
1575
1558
  """The supplier accounting key"""
1576
1559
  accountingKey: String
1560
+ """The supplier address"""
1561
+ address: String
1562
+ """The supplier city"""
1563
+ city: String
1564
+ """The supplier zip code"""
1565
+ zip: String
1566
+ """The supplier fax number"""
1567
+ fax: String
1577
1568
  """The Supplier remarks for self use"""
1578
1569
  remarks: String
1579
1570
  """The amount of incomes from the customer"""
@@ -1584,7 +1575,7 @@ input _DOLLAR_defs_Supplier_Input {
1584
1575
  }
1585
1576
 
1586
1577
  """Account classification of the expense"""
1587
- input _DOLLAR_defs_AccountingClassification_Input {
1578
+ input AccountingClassification_Input {
1588
1579
  """The classification ID, see 'Get Accounting Classifications' endpoint"""
1589
1580
  id: String
1590
1581
  """The classification key"""
@@ -1593,7 +1584,7 @@ input _DOLLAR_defs_AccountingClassification_Input {
1593
1584
  code: String
1594
1585
  """The classification title"""
1595
1586
  title: String
1596
- irsCode: query_getExpense_accountingClassification_irsCode
1587
+ irsCode: mutation_addExpense_oneOf_0_allOf_0_accountingClassification_irsCode
1597
1588
  """The classification income"""
1598
1589
  income: Float
1599
1590
  """The classification type"""
@@ -1602,17 +1593,17 @@ input _DOLLAR_defs_AccountingClassification_Input {
1602
1593
  vat: Float
1603
1594
  }
1604
1595
 
1605
- union addExpenseDraftByFile_response @statusCodeTypeName(subgraph: "GreenInvoice", statusCode: "200", typeName: "addExpenseDraftByFile_200_response") @statusCodeTypeName(subgraph: "GreenInvoice", statusCode: "201", typeName: "addExpenseDraftByFile_200_response") @statusCodeTypeName(subgraph: "GreenInvoice", statusCode: "400", typeName: "searchExpenseDrafts_404_response") @statusCodeTypeName(subgraph: "GreenInvoice", statusCode: "404", typeName: "searchExpenseDrafts_404_response") @statusCodeTypeName(subgraph: "GreenInvoice", statusCode: "405", typeName: "searchExpenseDrafts_404_response") = addExpenseDraftByFile_200_response | searchExpenseDrafts_404_response
1596
+ union addExpenseDraftByFile_response @statusCodeTypeName(subgraph: "GreenInvoice", statusCode: "200", typeName: "GetExpenseDraft") @statusCodeTypeName(subgraph: "GreenInvoice", statusCode: "201", typeName: "GetExpenseDraft") @statusCodeTypeName(subgraph: "GreenInvoice", statusCode: "400", typeName: "generalErrorResponse") @statusCodeTypeName(subgraph: "GreenInvoice", statusCode: "404", typeName: "generalErrorResponse") @statusCodeTypeName(subgraph: "GreenInvoice", statusCode: "405", typeName: "generalErrorResponse") = GetExpenseDraft | generalErrorResponse
1606
1597
 
1607
- type addExpenseDraftByFile_200_response {
1598
+ type GetExpenseDraft {
1608
1599
  """The expense draft ID"""
1609
1600
  id: String
1610
1601
  status: mutation_addExpenseDraftByFile_oneOf_0_status
1611
1602
  """The creation date, in UNIX timestamp format"""
1612
- creationDate: NonNegativeInt
1603
+ creationDate: Int
1613
1604
  """The last update date of the expense draft, in UNIX timestamp format"""
1614
1605
  lastUpdateDate: Int
1615
- expense: _DOLLAR_defs_ExpensePartial
1606
+ expense: ExpensePartial
1616
1607
  """URL of expense thumbnail"""
1617
1608
  thumbnail: String
1618
1609
  """URL to download the expense thumbnail"""
@@ -1626,13 +1617,13 @@ enum mutation_addExpenseDraftByFile_oneOf_0_status {
1626
1617
  }
1627
1618
 
1628
1619
  """A Single Expense"""
1629
- type _DOLLAR_defs_ExpensePartial {
1620
+ type ExpensePartial {
1630
1621
  paymentType: mutation_addExpense_oneOf_0_allOf_0_paymentType
1631
- currency: _DOLLAR_defs_Currency
1622
+ currency: Currency
1632
1623
  """Currency rate relative to ILS"""
1633
- currencyRate: NonNegativeFloat
1624
+ currencyRate: Float
1634
1625
  """VAT amount"""
1635
- vat: NonNegativeFloat
1626
+ vat: Float
1636
1627
  """The total amount of the expense"""
1637
1628
  amount: Float
1638
1629
  """Date of the expense"""
@@ -1641,15 +1632,14 @@ type _DOLLAR_defs_ExpensePartial {
1641
1632
  dueDate: String
1642
1633
  """Reporting date of the expense"""
1643
1634
  reportingDate: String
1644
- documentType: _DOLLAR_defs_ExpenseDocumentType
1635
+ documentType: ExpenseDocumentType
1645
1636
  """Number of the expense"""
1646
1637
  number: String
1647
1638
  """Description for the expense"""
1648
1639
  description: String
1649
- """Remarks for the expense"""
1650
1640
  remarks: String
1651
- supplier: _DOLLAR_defs_Supplier
1652
- accountingClassification: _DOLLAR_defs_AccountingClassification
1641
+ supplier: Supplier
1642
+ accountingClassification: AccountingClassification
1653
1643
  """Is the expense active or not"""
1654
1644
  active: Boolean
1655
1645
  """
@@ -1662,143 +1652,11 @@ type _DOLLAR_defs_ExpensePartial {
1662
1652
  addAccountingClassification: Boolean
1663
1653
  }
1664
1654
 
1665
- input _DOLLAR_defs_addExpenseDraftByFileRequest_Input {
1655
+ input addExpenseDraftByFileRequest_Input {
1666
1656
  """The file, in Base64, allowed types: GIF, PNG, JPG, SVG, PDF"""
1667
1657
  file: String
1668
1658
  }
1669
1659
 
1670
- union _DOLLAR_defs_addClientResponse = _DOLLAR_defs_getClientResponse | _DOLLAR_defs_ErrorResponse
1671
-
1672
- """Add a new client to the current business"""
1673
- input _DOLLAR_defs_addClientRequest_Input {
1674
- """Phone number"""
1675
- phone: String
1676
- """Mobile number"""
1677
- mobile: String
1678
- """Email addresses"""
1679
- emails: [EmailAddress]
1680
- """Fax number"""
1681
- fax: String
1682
- """Contact person name"""
1683
- contactPerson: String
1684
- """Street address"""
1685
- address: String
1686
- """City name"""
1687
- city: String
1688
- """Zip/postal code"""
1689
- zip: String
1690
- country: _DOLLAR_defs_Country
1691
- """Bank name"""
1692
- bankName: String
1693
- """Bank branch number"""
1694
- bankBranch: String
1695
- """Bank account number"""
1696
- bankAccount: String
1697
- """The client name"""
1698
- name: NonEmptyString!
1699
- """Is the client currently active or not"""
1700
- active: Boolean
1701
- """The client tax ID"""
1702
- taxId: String
1703
- paymentTerms: mutationInput_addClient_input_allOf_3_paymentTerms
1704
- labels: [String]
1705
- """
1706
- Whether to send emails to the user automatically when assigning him to an invoice or not
1707
- """
1708
- send: Boolean
1709
- """The client department"""
1710
- department: String
1711
- """The client accounting key"""
1712
- accountingKey: String
1713
- """The category this client is related to"""
1714
- category: Int
1715
- """The sub category this client is related to"""
1716
- subCategory: Int
1717
- """Client remarks for self use"""
1718
- remarks: String
1719
- }
1720
-
1721
- """The client payment term, default is 0"""
1722
- enum mutationInput_addClient_input_allOf_3_paymentTerms {
1723
- NEGATIVE_1 @enum(subgraph: "GreenInvoice", value: "-1")
1724
- _0 @enum(subgraph: "GreenInvoice", value: "0")
1725
- _10 @enum(subgraph: "GreenInvoice", value: "10")
1726
- _15 @enum(subgraph: "GreenInvoice", value: "15")
1727
- _30 @enum(subgraph: "GreenInvoice", value: "30")
1728
- _45 @enum(subgraph: "GreenInvoice", value: "45")
1729
- _60 @enum(subgraph: "GreenInvoice", value: "60")
1730
- _75 @enum(subgraph: "GreenInvoice", value: "75")
1731
- _90 @enum(subgraph: "GreenInvoice", value: "90")
1732
- _120 @enum(subgraph: "GreenInvoice", value: "120")
1733
- }
1734
-
1735
- union _DOLLAR_defs_updateClientResponse = _DOLLAR_defs_getClientResponse | _DOLLAR_defs_ErrorResponse
1736
-
1737
- """Update an existing client"""
1738
- input _DOLLAR_defs_updateClientRequest_Input {
1739
- """The client name"""
1740
- name: NonEmptyString!
1741
- """Is the client currently active or not"""
1742
- active: Boolean
1743
- """The client tax ID"""
1744
- taxId: String
1745
- paymentTerms: mutationInput_updateClient_input_paymentTerms
1746
- labels: [String]
1747
- """
1748
- Whether to send emails to the user automatically when assigning him to an invoice or not
1749
- """
1750
- send: Boolean
1751
- """The client department"""
1752
- department: String
1753
- """The client accounting key"""
1754
- accountingKey: String
1755
- """The category this client is related to"""
1756
- category: Int
1757
- """The sub category this client is related to"""
1758
- subCategory: Int
1759
- """Client remarks for self use"""
1760
- remarks: String
1761
- """Phone number"""
1762
- phone: String
1763
- """Mobile number"""
1764
- mobile: String
1765
- """Email addresses"""
1766
- emails: [EmailAddress]
1767
- """Fax number"""
1768
- fax: String
1769
- """Contact person name"""
1770
- contactPerson: String
1771
- """Street address"""
1772
- address: String
1773
- """City name"""
1774
- city: String
1775
- """Zip/postal code"""
1776
- zip: String
1777
- country: _DOLLAR_defs_Country
1778
- """Bank name"""
1779
- bankName: String
1780
- """Bank branch number"""
1781
- bankBranch: String
1782
- """Bank account number"""
1783
- bankAccount: String
1784
- }
1785
-
1786
- """The client payment term, default is 0"""
1787
- enum mutationInput_updateClient_input_paymentTerms {
1788
- NEGATIVE_1 @enum(subgraph: "GreenInvoice", value: "-1")
1789
- _0 @enum(subgraph: "GreenInvoice", value: "0")
1790
- _10 @enum(subgraph: "GreenInvoice", value: "10")
1791
- _15 @enum(subgraph: "GreenInvoice", value: "15")
1792
- _30 @enum(subgraph: "GreenInvoice", value: "30")
1793
- _45 @enum(subgraph: "GreenInvoice", value: "45")
1794
- _60 @enum(subgraph: "GreenInvoice", value: "60")
1795
- _75 @enum(subgraph: "GreenInvoice", value: "75")
1796
- _90 @enum(subgraph: "GreenInvoice", value: "90")
1797
- _120 @enum(subgraph: "GreenInvoice", value: "120")
1798
- }
1799
-
1800
- union _DOLLAR_defs_deleteClientResponse = _DOLLAR_defs_getClientResponse | _DOLLAR_defs_ErrorResponse
1801
-
1802
1660
  scalar ObjMap
1803
1661
 
1804
1662
  enum HTTPMethod {