@accounter/green-invoice-graphql 0.8.2-alpha-20251102085833-d574838ec8d962ba6be12f1ca15d9bee3e2b860d → 0.8.2-alpha-20251102160658-6d41b0a7bb225382246645badf39a28bcd8102e1

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,154 +7,150 @@ directive @enum(subgraph: String, value: String) on ENUM_VALUE
7
7
 
8
8
  directive @resolveRoot(subgraph: String) on FIELD_DEFINITION
9
9
 
10
- directive @resolveRootField(subgraph: String, field: String) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
10
+ directive @example(subgraph: String, value: ObjMap) repeatable on FIELD_DEFINITION | OBJECT | INPUT_OBJECT | ENUM | SCALAR
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
-
16
14
  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
17
15
 
18
16
  directive @transport(subgraph: String, kind: String, location: String, headers: [[String]], queryStringOptions: ObjMap, queryParams: [[String]]) repeatable on SCHEMA
19
17
 
20
18
  type Query {
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)
29
- }
30
-
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
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)
42
27
  }
43
28
 
44
- input DocumentInputNew_Input {
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!
45
68
  """Document's description"""
46
- description: String
47
- remarks: String
69
+ description: NonEmptyString!
70
+ """Document reference date"""
71
+ documentDate: Date!
72
+ downloaded: Boolean!
48
73
  """Texts appearing in footer"""
49
74
  footer: String
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
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!
59
86
  """Round the amounts"""
60
- rounding: Boolean
87
+ rounding: Boolean!
61
88
  """Digital sign the document"""
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
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!
77
104
  }
78
105
 
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
- }
106
+ """Floats that will have a value of 0 or more."""
107
+ scalar NonNegativeFloat
95
108
 
96
- """Document language"""
97
- enum DocumentLang {
98
- en
99
- he
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!
100
129
  }
101
130
 
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
- }
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")
132
135
 
133
- """VAT type"""
134
- enum VatType @example(subgraph: "GreenInvoice", value: "0") {
135
- _0 @enum(subgraph: "GreenInvoice", value: "0")
136
+ """The business type ID"""
137
+ enum query_getDocument_business_type {
136
138
  _1 @enum(subgraph: "GreenInvoice", value: "1")
137
139
  _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")
138
144
  }
139
145
 
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!
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
156
152
  """The client name"""
157
- name: String
153
+ name: NonEmptyString
158
154
  phone: String
159
155
  """The client tax ID"""
160
156
  taxId: String
@@ -172,10 +168,11 @@ input mutationInput_addDocument_input_allOf_0_client_Input {
172
168
  mobile: String
173
169
  """Add a temporary client to the clients' list"""
174
170
  add: Boolean
171
+ JSON: JSON @resolveRoot(subgraph: "GreenInvoice")
175
172
  }
176
173
 
177
174
  """2-letter ISO supplier country code, default is IL"""
178
- enum Country {
175
+ enum _DOLLAR_defs_Country {
179
176
  UG
180
177
  UZ
181
178
  AT
@@ -429,44 +426,143 @@ enum Country {
429
426
  }
430
427
 
431
428
  """
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).
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.
433
430
  """
434
- scalar JSON @specifiedBy(url: "http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf")
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.
435
+ """
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
435
482
 
436
- input Income_Input {
483
+ type _DOLLAR_defs_Income {
437
484
  """Amount"""
438
- amount: Float
485
+ amount: NonNegativeFloat
439
486
  """Total amount"""
440
- amountTotal: Float
487
+ amountTotal: NonNegativeFloat
441
488
  """Catalog number"""
442
489
  catalogNum: String
443
- currency: Currency!
490
+ currency: _DOLLAR_defs_Currency!
444
491
  """Currency rate relative to ILS"""
445
- currencyRate: Float
492
+ currencyRate: NonNegativeFloat
446
493
  """Item description"""
447
- description: String!
494
+ description: NonEmptyString!
448
495
  """The ID of the item to attach as income"""
449
496
  itemId: String
450
497
  """Item price"""
451
- price: Float!
498
+ price: NonNegativeFloat!
452
499
  """Quantity"""
453
- quantity: Float!
500
+ quantity: NonNegativeFloat!
454
501
  """VAT amount"""
455
- vat: Float
502
+ vat: NonNegativeFloat
456
503
  """VAT rate"""
457
- vatRate: Float
458
- vatType: VatType!
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")
459
555
  }
460
556
 
461
- input PaymentDocument_Input {
462
- currency: Currency!
557
+ type _DOLLAR_defs_PaymentDocument {
558
+ currency: _DOLLAR_defs_Currency!
463
559
  """Currency rate relative to ILS"""
464
- currencyRate: Float
560
+ currencyRate: NonNegativeFloat
465
561
  date: String
466
562
  """Sum paid"""
467
563
  price: Float!
468
- type: mutationInput_addDocument_input_allOf_0_payment_items_type!
469
- subType: mutationInput_addDocument_input_allOf_0_payment_items_subType
564
+ type: query_getDocument_payment_items_type!
565
+ subType: query_getDocument_payment_items_subType
470
566
  """Bank name (required when using Cheques)"""
471
567
  bankName: String
472
568
  """Bank branch number (required when using Cheques)"""
@@ -479,11 +575,11 @@ input PaymentDocument_Input {
479
575
  accountId: String
480
576
  """Transaction ID (PayPal / Payment App / Other)"""
481
577
  transactionId: String
482
- appType: mutationInput_addDocument_input_allOf_0_payment_items_appType
483
- cardType: mutationInput_addDocument_input_allOf_0_payment_items_cardType
578
+ appType: query_getDocument_payment_items_appType
579
+ cardType: query_getDocument_payment_items_cardType
484
580
  """Credit card's last 4 digits"""
485
581
  cardNum: String
486
- dealType: mutationInput_addDocument_input_allOf_0_payment_items_dealType
582
+ dealType: query_getDocument_payment_items_dealType
487
583
  """Credit card's payments count (1-36)"""
488
584
  numPayments: Int
489
585
  """Credit card's first payment"""
@@ -491,7 +587,7 @@ input PaymentDocument_Input {
491
587
  }
492
588
 
493
589
  """Payment method"""
494
- enum mutationInput_addDocument_input_allOf_0_payment_items_type {
590
+ enum query_getDocument_payment_items_type {
495
591
  NEGATIVE_1 @enum(subgraph: "GreenInvoice", value: "-1")
496
592
  _0 @enum(subgraph: "GreenInvoice", value: "0")
497
593
  _1 @enum(subgraph: "GreenInvoice", value: "1")
@@ -505,7 +601,7 @@ enum mutationInput_addDocument_input_allOf_0_payment_items_type {
505
601
  }
506
602
 
507
603
  """Other payment sub type (required when using 'other' as a Payment type)"""
508
- enum mutationInput_addDocument_input_allOf_0_payment_items_subType {
604
+ enum query_getDocument_payment_items_subType {
509
605
  _1 @enum(subgraph: "GreenInvoice", value: "1")
510
606
  _2 @enum(subgraph: "GreenInvoice", value: "2")
511
607
  _3 @enum(subgraph: "GreenInvoice", value: "3")
@@ -517,7 +613,7 @@ enum mutationInput_addDocument_input_allOf_0_payment_items_subType {
517
613
  }
518
614
 
519
615
  """Payment app type (required when using 'payment app' as a Payment type)"""
520
- enum mutationInput_addDocument_input_allOf_0_payment_items_appType {
616
+ enum query_getDocument_payment_items_appType {
521
617
  _1 @enum(subgraph: "GreenInvoice", value: "1")
522
618
  _2 @enum(subgraph: "GreenInvoice", value: "2")
523
619
  _3 @enum(subgraph: "GreenInvoice", value: "3")
@@ -527,7 +623,7 @@ enum mutationInput_addDocument_input_allOf_0_payment_items_appType {
527
623
  }
528
624
 
529
625
  """Credit card type"""
530
- enum mutationInput_addDocument_input_allOf_0_payment_items_cardType {
626
+ enum query_getDocument_payment_items_cardType {
531
627
  _1 @enum(subgraph: "GreenInvoice", value: "1")
532
628
  _2 @enum(subgraph: "GreenInvoice", value: "2")
533
629
  _3 @enum(subgraph: "GreenInvoice", value: "3")
@@ -536,7 +632,7 @@ enum mutationInput_addDocument_input_allOf_0_payment_items_cardType {
536
632
  }
537
633
 
538
634
  """Credit card deal type"""
539
- enum mutationInput_addDocument_input_allOf_0_payment_items_dealType {
635
+ enum query_getDocument_payment_items_dealType {
540
636
  _1 @enum(subgraph: "GreenInvoice", value: "1")
541
637
  _2 @enum(subgraph: "GreenInvoice", value: "2")
542
638
  _3 @enum(subgraph: "GreenInvoice", value: "3")
@@ -545,27 +641,248 @@ enum mutationInput_addDocument_input_allOf_0_payment_items_dealType {
545
641
  _6 @enum(subgraph: "GreenInvoice", value: "6")
546
642
  }
547
643
 
548
- """Reference type (applicable only when using linkedDocumentIds)"""
549
- enum mutationInput_addDocument_input_allOf_0_linkType {
550
- LINK
551
- CANCEL
552
- }
553
-
554
- """A Single Expense"""
555
- type GetExpense {
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
+ """Reference type (applicable only when using linkedDocumentIds)"""
847
+ enum queryInput_previewDocument_input_linkType {
848
+ LINK
849
+ CANCEL
850
+ }
851
+
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
+ """A Single Expense"""
872
+ type _DOLLAR_defs_GetExpense {
556
873
  """The amount excluding the vat"""
557
874
  amountExcludeVat: Float
558
875
  """The expense ID"""
559
876
  id: String
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
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
565
882
  """Currency rate relative to ILS"""
566
- currencyRate: Float
883
+ currencyRate: NonNegativeFloat
567
884
  """VAT amount"""
568
- vat: Float
885
+ vat: NonNegativeFloat
569
886
  """The total amount of the expense"""
570
887
  amount: Float
571
888
  """Date of the expense"""
@@ -580,7 +897,7 @@ type GetExpense {
580
897
  description: String
581
898
  """Remarks for the expense"""
582
899
  remarks: String
583
- supplier: Supplier
900
+ supplier: _DOLLAR_defs_Supplier
584
901
  """URL of expense thumbnail"""
585
902
  thumbnail: String
586
903
  """URL to download the expense thumbnail"""
@@ -589,7 +906,7 @@ type GetExpense {
589
906
  cancellable: Boolean
590
907
  """Reporting date of the expense"""
591
908
  reportingDate: String
592
- accountingClassification: AccountingClassification
909
+ accountingClassification: _DOLLAR_defs_AccountingClassification
593
910
  """The local amount of the expense"""
594
911
  amountLocal: Float
595
912
  """The amount of accounting"""
@@ -597,13 +914,13 @@ type GetExpense {
597
914
  """The vat amount of accounting"""
598
915
  vatAccounting: Float
599
916
  """The creation date, in UNIX timestamp format"""
600
- creationDate: Int
917
+ creationDate: NonNegativeInt
601
918
  """The last update date of the expense, in UNIX timestamp format"""
602
919
  lastUpdateDate: Int
603
920
  }
604
921
 
605
922
  """The business type ID"""
606
- enum mutation_updateExpense_oneOf_0_businessType {
923
+ enum query_getExpense_businessType {
607
924
  _1 @enum(subgraph: "GreenInvoice", value: "1")
608
925
  _2 @enum(subgraph: "GreenInvoice", value: "2")
609
926
  _3 @enum(subgraph: "GreenInvoice", value: "3")
@@ -613,7 +930,7 @@ enum mutation_updateExpense_oneOf_0_businessType {
613
930
  }
614
931
 
615
932
  """Document type"""
616
- enum ExpenseDocumentType {
933
+ enum _DOLLAR_defs_ExpenseDocumentType {
617
934
  _20 @enum(subgraph: "GreenInvoice", value: "20")
618
935
  _305 @enum(subgraph: "GreenInvoice", value: "305")
619
936
  _320 @enum(subgraph: "GreenInvoice", value: "320")
@@ -623,7 +940,7 @@ enum ExpenseDocumentType {
623
940
  }
624
941
 
625
942
  """The status of the expense"""
626
- enum mutation_updateExpense_oneOf_0_status {
943
+ enum query_getExpense_status {
627
944
  _10 @enum(subgraph: "GreenInvoice", value: "10")
628
945
  _20 @enum(subgraph: "GreenInvoice", value: "20")
629
946
  _30 @enum(subgraph: "GreenInvoice", value: "30")
@@ -631,7 +948,7 @@ enum mutation_updateExpense_oneOf_0_status {
631
948
  }
632
949
 
633
950
  """Payment method"""
634
- enum mutation_updateExpense_oneOf_0_paymentType {
951
+ enum query_getExpense_paymentType {
635
952
  NEGATIVE_1 @enum(subgraph: "GreenInvoice", value: "-1")
636
953
  _0 @enum(subgraph: "GreenInvoice", value: "0")
637
954
  _1 @enum(subgraph: "GreenInvoice", value: "1")
@@ -643,8 +960,30 @@ enum mutation_updateExpense_oneOf_0_paymentType {
643
960
  _11 @enum(subgraph: "GreenInvoice", value: "11")
644
961
  }
645
962
 
646
- """Supplier of the expense"""
647
- type Supplier {
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
648
987
  """The supplier ID"""
649
988
  id: String
650
989
  """The supplier name"""
@@ -653,38 +992,16 @@ type Supplier {
653
992
  active: Boolean
654
993
  """The supplier tax ID"""
655
994
  taxId: String
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]
995
+ paymentTerms: query_getExpense_supplier_allOf_3_paymentTerms
671
996
  labels: [String]
672
997
  """The creation date, in UNIX timestamp format"""
673
- creationDate: Int
998
+ creationDate: NonNegativeInt
674
999
  """The last update date of the supplier, in UNIX timestamp format"""
675
1000
  lastUpdateDate: Int
676
1001
  """The supplier department"""
677
1002
  department: String
678
1003
  """The supplier accounting key"""
679
1004
  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
688
1005
  """The Supplier remarks for self use"""
689
1006
  remarks: String
690
1007
  """The amount of incomes from the customer"""
@@ -695,7 +1012,7 @@ type Supplier {
695
1012
  }
696
1013
 
697
1014
  """The supplier payment term, default is 0"""
698
- enum mutation_addExpense_oneOf_0_allOf_0_supplier_paymentTerms {
1015
+ enum query_getExpense_supplier_allOf_3_paymentTerms {
699
1016
  NEGATIVE_1 @enum(subgraph: "GreenInvoice", value: "-1")
700
1017
  _0 @enum(subgraph: "GreenInvoice", value: "0")
701
1018
  _10 @enum(subgraph: "GreenInvoice", value: "10")
@@ -709,7 +1026,7 @@ enum mutation_addExpense_oneOf_0_allOf_0_supplier_paymentTerms {
709
1026
  }
710
1027
 
711
1028
  """Account classification of the expense"""
712
- type AccountingClassification {
1029
+ type _DOLLAR_defs_AccountingClassification {
713
1030
  """The classification ID, see 'Get Accounting Classifications' endpoint"""
714
1031
  id: String
715
1032
  """The classification key"""
@@ -718,7 +1035,7 @@ type AccountingClassification {
718
1035
  code: String
719
1036
  """The classification title"""
720
1037
  title: String
721
- irsCode: mutation_addExpense_oneOf_0_allOf_0_accountingClassification_irsCode
1038
+ irsCode: query_getExpense_accountingClassification_irsCode
722
1039
  """The classification income"""
723
1040
  income: Float
724
1041
  """The classification type"""
@@ -728,7 +1045,7 @@ type AccountingClassification {
728
1045
  }
729
1046
 
730
1047
  """The classification IRS code"""
731
- enum mutation_addExpense_oneOf_0_allOf_0_accountingClassification_irsCode {
1048
+ enum query_getExpense_accountingClassification_irsCode {
732
1049
  _1306 @enum(subgraph: "GreenInvoice", value: "1306")
733
1050
  _1307 @enum(subgraph: "GreenInvoice", value: "1307")
734
1051
  _1310 @enum(subgraph: "GreenInvoice", value: "1310")
@@ -786,19 +1103,23 @@ enum mutation_addExpense_oneOf_0_allOf_0_accountingClassification_irsCode {
786
1103
  _8090 @enum(subgraph: "GreenInvoice", value: "8090")
787
1104
  }
788
1105
 
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
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
799
1120
  }
800
1121
 
801
- input searchExpensesRequest_Input {
1122
+ input _DOLLAR_defs_searchExpensesRequest_Input {
802
1123
  """
803
1124
  Expense that were created after the specified date in the format YYYY-MM-DD
804
1125
  """
@@ -837,330 +1158,50 @@ input searchExpensesRequest_Input {
837
1158
  pageSize: Float!
838
1159
  }
839
1160
 
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]!
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]!
850
1179
  }
851
1180
 
852
- """A Single Document"""
853
- type Document {
854
- """
855
- Total amount, in requested currency (including the VAT, Discount & Rounding)
856
- """
857
- amount: Float!
858
- """
859
- Amount due VAT - Amount before VAT, and before rounding & discount (if requested)
860
- """
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!
866
- """
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)
868
- """
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"""
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 {
899
1191
  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
1192
  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!
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!
927
1201
  }
928
1202
 
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 {
1066
- """Page requested"""
1067
- page: Float
1068
- """Results per page"""
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!
1203
+ type query_searchExpenseDrafts_oneOf_0_allOf_1_items_items_expense {
1204
+ accountingClassification: _DOLLAR_defs_AccountingClassification!
1164
1205
  """Is the expense active or not"""
1165
1206
  active: Boolean!
1166
1207
  """
@@ -1170,14 +1211,14 @@ type query_searchExpenseDrafts_oneOf_0_items_items_expense {
1170
1211
  """The total amount of the expense"""
1171
1212
  amount: Float
1172
1213
  confirmFromEdit: Boolean!
1173
- currency: Currency!
1214
+ currency: _DOLLAR_defs_Currency!
1174
1215
  """Currency rate relative to ILS"""
1175
- currencyRate: Float!
1216
+ currencyRate: NonNegativeFloat!
1176
1217
  """Date of the expense"""
1177
1218
  date: String
1178
1219
  """Description for the expense"""
1179
1220
  description: String!
1180
- documentType: ExpenseDocumentType!
1221
+ documentType: _DOLLAR_defs_ExpenseDocumentType!
1181
1222
  """File hash"""
1182
1223
  fileHash: String!
1183
1224
  """Key of the file location"""
@@ -1185,28 +1226,28 @@ type query_searchExpenseDrafts_oneOf_0_items_items_expense {
1185
1226
  labels: [String]!
1186
1227
  """Number of the expense"""
1187
1228
  number: String
1188
- paymentType: query_searchExpenseDrafts_oneOf_0_items_items_expense_paymentType
1229
+ paymentType: query_searchExpenseDrafts_oneOf_0_allOf_1_items_items_expense_paymentType
1189
1230
  """Reporting date of the expense"""
1190
1231
  reportingDate: String!
1191
- supplier: Supplier!
1232
+ supplier: _DOLLAR_defs_Supplier!
1192
1233
  tags: [String]!
1193
1234
  texts: [String]!
1194
1235
  """VAT amount"""
1195
- vat: Float!
1236
+ vat: NonNegativeFloat!
1196
1237
  }
1197
1238
 
1198
1239
  """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
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
1200
1241
 
1201
1242
  type Boolean_container {
1202
1243
  Boolean: Boolean @resolveRoot(subgraph: "GreenInvoice")
1203
1244
  }
1204
1245
 
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")
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")
1207
1248
  }
1208
1249
 
1209
- enum query_searchExpenseDrafts_oneOf_0_items_items_expense_paymentType_oneOf_1 {
1250
+ enum query_searchExpenseDrafts_oneOf_0_allOf_1_items_items_expense_paymentType_oneOf_1 {
1210
1251
  _1 @enum(subgraph: "GreenInvoice", value: "1")
1211
1252
  _2 @enum(subgraph: "GreenInvoice", value: "2")
1212
1253
  _3 @enum(subgraph: "GreenInvoice", value: "3")
@@ -1216,20 +1257,20 @@ enum query_searchExpenseDrafts_oneOf_0_items_items_expense_paymentType_oneOf_1 {
1216
1257
  _11 @enum(subgraph: "GreenInvoice", value: "11")
1217
1258
  }
1218
1259
 
1219
- type generalErrorResponse {
1220
- errorCode_: Int @resolveRootField(subgraph: "GreenInvoice", field: "errorCode:")
1260
+ type searchExpenseDrafts_404_response {
1261
+ errorCode: Int
1221
1262
  errorMessage: String
1222
1263
  }
1223
1264
 
1224
- input searchExpenseDraftsRequest_Input {
1265
+ input _DOLLAR_defs_searchExpenseDraftsRequest_Input {
1225
1266
  """
1226
1267
  Expense drafts that were created after the specified date in the format YYYY-MM-DD
1227
1268
  """
1228
- fromDate: String
1269
+ fromDate: Date
1229
1270
  """
1230
1271
  Expense drafts that were created until the specified date in the format YYYY-MM-DD
1231
1272
  """
1232
- toDate: String
1273
+ toDate: Date
1233
1274
  """Expense draft description"""
1234
1275
  description: String
1235
1276
  """Supplier's ID"""
@@ -1242,51 +1283,42 @@ input searchExpenseDraftsRequest_Input {
1242
1283
  pageSize: Float
1243
1284
  }
1244
1285
 
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
1262
- }
1263
-
1264
- type getClientResponse {
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
1265
1310
  """The client ID"""
1266
- id: String
1311
+ id: UUID
1267
1312
  """The client name"""
1268
- name: String
1313
+ name: NonEmptyString
1269
1314
  """Is the client currently active or not"""
1270
1315
  active: Boolean
1271
1316
  """The client tax ID"""
1272
1317
  taxId: String
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]
1318
+ paymentTerms: query_getClient_allOf_3_paymentTerms
1287
1319
  labels: [String]
1288
1320
  """The creation date, in UNIX timestamp format"""
1289
- creationDate: Int
1321
+ creationDate: NonNegativeInt
1290
1322
  """The last update date of the supplier, in UNIX timestamp format"""
1291
1323
  lastUpdateDate: Int
1292
1324
  """
@@ -1297,18 +1329,10 @@ type getClientResponse {
1297
1329
  department: String
1298
1330
  """The supplier accounting key"""
1299
1331
  accountingKey: String
1300
- """The supplier address"""
1301
- address: String
1302
- """The supplier city"""
1303
- city: String
1304
- """The supplier zip code"""
1305
- zip: String
1306
1332
  """The category this client is related to"""
1307
1333
  category: Int
1308
1334
  """The sub category this client is related to"""
1309
1335
  subCategory: Int
1310
- """Client fax"""
1311
- fax: String
1312
1336
  """Client remarks for self use"""
1313
1337
  remarks: String
1314
1338
  """The amount of incomes from the customer"""
@@ -1319,7 +1343,7 @@ type getClientResponse {
1319
1343
  }
1320
1344
 
1321
1345
  """The client payment term, default is 0"""
1322
- enum query_getClient_paymentTerms {
1346
+ enum query_getClient_allOf_3_paymentTerms {
1323
1347
  NEGATIVE_1 @enum(subgraph: "GreenInvoice", value: "-1")
1324
1348
  _0 @enum(subgraph: "GreenInvoice", value: "0")
1325
1349
  _10 @enum(subgraph: "GreenInvoice", value: "10")
@@ -1333,135 +1357,63 @@ enum query_getClient_paymentTerms {
1333
1357
  }
1334
1358
 
1335
1359
  type Mutation {
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)
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)
1340
1364
  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)
1341
1374
  }
1342
1375
 
1343
- union addExpenseResponse = Expense | ErrorResponse
1344
-
1345
- type Expense {
1346
- paymentType: mutation_addExpense_oneOf_0_allOf_0_paymentType
1347
- currency: JSON!
1348
- """Currency rate relative to ILS"""
1349
- currencyRate: Float
1350
- vat: JSON!
1351
- amount: JSON!
1352
- date: JSON!
1353
- """Due date of the expense"""
1354
- dueDate: String
1355
- reportingDate: JSON!
1356
- documentType: JSON!
1357
- number: JSON!
1358
- """Description for the expense"""
1359
- description: String
1360
- remarks: String
1361
- supplier: JSON!
1362
- accountingClassification: JSON!
1363
- """Is the expense active or not"""
1364
- active: Boolean
1365
- """
1366
- Should we save the supplier or not (by setting this to true you are required to add a supplier)
1367
- """
1368
- addRecipient: Boolean
1369
- """
1370
- Should we save the accounting classification (by setting this to true you are required to add an accounting classification that contains title & irsCode)
1371
- """
1372
- addAccountingClassification: Boolean
1373
- }
1374
-
1375
- """Payment method"""
1376
- union mutation_addExpense_oneOf_0_allOf_0_paymentType = Boolean_container | mutation_addExpense_oneOf_0_allOf_0_paymentType_oneOf_1_container
1377
-
1378
- type mutation_addExpense_oneOf_0_allOf_0_paymentType_oneOf_1_container {
1379
- mutation_addExpense_oneOf_0_allOf_0_paymentType_oneOf_1: mutation_addExpense_oneOf_0_allOf_0_paymentType_oneOf_1 @resolveRoot(subgraph: "GreenInvoice")
1380
- }
1381
-
1382
- enum mutation_addExpense_oneOf_0_allOf_0_paymentType_oneOf_1 {
1383
- _1 @enum(subgraph: "GreenInvoice", value: "1")
1384
- _2 @enum(subgraph: "GreenInvoice", value: "2")
1385
- _3 @enum(subgraph: "GreenInvoice", value: "3")
1386
- _4 @enum(subgraph: "GreenInvoice", value: "4")
1387
- _5 @enum(subgraph: "GreenInvoice", value: "5")
1388
- _10 @enum(subgraph: "GreenInvoice", value: "10")
1389
- _11 @enum(subgraph: "GreenInvoice", value: "11")
1390
- }
1391
-
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
1376
+ union _DOLLAR_defs_addDocumentResponse = _DOLLAR_defs_AddedDocument | _DOLLAR_defs_ErrorResponse
1428
1377
 
1429
- type AddedDocument {
1378
+ type _DOLLAR_defs_AddedDocument {
1430
1379
  """Document ID"""
1431
1380
  id: String!
1432
- lang: DocumentLang!
1381
+ lang: _DOLLAR_defs_DocumentLang!
1433
1382
  """Document serial number"""
1434
- number: Int!
1383
+ number: PositiveInt!
1435
1384
  """Digital sign the document"""
1436
1385
  signed: Boolean!
1437
- url: Url!
1386
+ url: _DOLLAR_defs_Url!
1438
1387
  }
1439
1388
 
1389
+ """Integers that will have a value greater than 0."""
1390
+ scalar PositiveInt
1391
+
1440
1392
  """Add a document to the current business"""
1441
- input addDocumentRequest_Input {
1393
+ input _DOLLAR_defs_addDocumentRequest_Input {
1442
1394
  """Document's description"""
1443
- description: String
1395
+ description: NonEmptyString
1444
1396
  remarks: String
1445
1397
  """Texts appearing in footer"""
1446
1398
  footer: String
1447
- type: DocumentType!
1399
+ type: _DOLLAR_defs_DocumentType!
1448
1400
  """Document date in the format YYYY-MM-DD"""
1449
1401
  date: String
1450
1402
  """Document payment due date in the format YYYY-MM-DD"""
1451
1403
  dueDate: String
1452
- lang: DocumentLang!
1453
- currency: Currency!
1454
- vatType: VatType!
1455
- discount: DocumentDiscount_Input
1404
+ lang: _DOLLAR_defs_DocumentLang!
1405
+ currency: _DOLLAR_defs_Currency!
1406
+ vatType: _DOLLAR_defs_VatType!
1407
+ discount: _DOLLAR_defs_DocumentDiscount_Input
1456
1408
  """Round the amounts"""
1457
1409
  rounding: Boolean
1458
1410
  """Digital sign the document"""
1459
1411
  signed: Boolean
1460
1412
  """Max payments allowed (valid only on supported accounts)"""
1461
1413
  maxPayments: Int
1462
- client: mutationInput_addDocument_input_allOf_0_client_Input
1463
- income: [Income_Input]
1464
- payment: [PaymentDocument_Input]
1414
+ client: JSON
1415
+ income: [_DOLLAR_defs_Income_Input]
1416
+ payment: [_DOLLAR_defs_PaymentDocument_Input]
1465
1417
  """
1466
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.
1467
1419
  """
@@ -1470,24 +1422,80 @@ input addDocumentRequest_Input {
1470
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).
1471
1423
  """
1472
1424
  linkedPaymentId: String
1473
- linkType: mutationInput_addDocument_input_allOf_0_linkType
1425
+ linkType: queryInput_previewDocument_input_linkType
1474
1426
  """Email content to send with the document"""
1475
1427
  emailContent: String
1476
1428
  """Whether to attach the document to the email"""
1477
1429
  attachment: Boolean
1478
1430
  }
1479
1431
 
1480
- union updateExpenseResponse = GetExpense | ErrorResponse
1432
+ union _DOLLAR_defs_addExpenseResponse = _DOLLAR_defs_Expense | _DOLLAR_defs_ErrorResponse
1481
1433
 
1482
- input updateExpenseRequest_Input {
1434
+ type _DOLLAR_defs_Expense {
1435
+ paymentType: mutation_addExpense_oneOf_0_allOf_0_paymentType
1436
+ currency: _DOLLAR_defs_Currency
1437
+ """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
1445
+ """Due date of the expense"""
1446
+ dueDate: String
1447
+ """Reporting date of the expense"""
1448
+ reportingDate: String
1449
+ documentType: _DOLLAR_defs_ExpenseDocumentType
1450
+ """Number of the expense"""
1451
+ number: String
1452
+ """Description for the expense"""
1453
+ description: String
1454
+ """Remarks for the expense"""
1455
+ remarks: String
1456
+ supplier: _DOLLAR_defs_Supplier
1457
+ accountingClassification: _DOLLAR_defs_AccountingClassification
1458
+ """Is the expense active or not"""
1459
+ active: Boolean
1460
+ """
1461
+ Should we save the supplier or not (by setting this to true you are required to add a supplier)
1462
+ """
1463
+ addRecipient: Boolean
1464
+ """
1465
+ Should we save the accounting classification (by setting this to true you are required to add an accounting classification that contains title & irsCode)
1466
+ """
1467
+ addAccountingClassification: Boolean
1468
+ JSON: JSON @resolveRoot(subgraph: "GreenInvoice")
1469
+ }
1470
+
1471
+ """Payment method"""
1472
+ union mutation_addExpense_oneOf_0_allOf_0_paymentType = Boolean_container | mutation_addExpense_oneOf_0_allOf_0_paymentType_oneOf_1_container
1473
+
1474
+ type mutation_addExpense_oneOf_0_allOf_0_paymentType_oneOf_1_container {
1475
+ mutation_addExpense_oneOf_0_allOf_0_paymentType_oneOf_1: mutation_addExpense_oneOf_0_allOf_0_paymentType_oneOf_1 @resolveRoot(subgraph: "GreenInvoice")
1476
+ }
1477
+
1478
+ enum mutation_addExpense_oneOf_0_allOf_0_paymentType_oneOf_1 {
1479
+ _1 @enum(subgraph: "GreenInvoice", value: "1")
1480
+ _2 @enum(subgraph: "GreenInvoice", value: "2")
1481
+ _3 @enum(subgraph: "GreenInvoice", value: "3")
1482
+ _4 @enum(subgraph: "GreenInvoice", value: "4")
1483
+ _5 @enum(subgraph: "GreenInvoice", value: "5")
1484
+ _10 @enum(subgraph: "GreenInvoice", value: "10")
1485
+ _11 @enum(subgraph: "GreenInvoice", value: "11")
1486
+ }
1487
+
1488
+ union _DOLLAR_defs_updateExpenseResponse = _DOLLAR_defs_GetExpense | _DOLLAR_defs_ErrorResponse
1489
+
1490
+ input _DOLLAR_defs_updateExpenseRequest_Input {
1483
1491
  """The expense ID"""
1484
1492
  id: String!
1485
1493
  paymentType: mutationInput_updateExpense_input_paymentType_Input
1486
- currency: Currency
1494
+ currency: _DOLLAR_defs_Currency
1487
1495
  """Currency rate relative to ILS"""
1488
- currencyRate: Float
1496
+ currencyRate: NonNegativeFloat
1489
1497
  """VAT amount"""
1490
- vat: Float
1498
+ vat: NonNegativeFloat
1491
1499
  """The total amount of the expense"""
1492
1500
  amount: Float
1493
1501
  """Date of the expense"""
@@ -1496,14 +1504,15 @@ input updateExpenseRequest_Input {
1496
1504
  dueDate: String
1497
1505
  """Reporting date of the expense"""
1498
1506
  reportingDate: String
1499
- documentType: ExpenseDocumentType
1507
+ documentType: _DOLLAR_defs_ExpenseDocumentType
1500
1508
  """Number of the expense"""
1501
1509
  number: String
1502
1510
  """Description for the expense"""
1503
1511
  description: String
1512
+ """Remarks for the expense"""
1504
1513
  remarks: String
1505
- supplier: Supplier_Input
1506
- accountingClassification: AccountingClassification_Input
1514
+ supplier: _DOLLAR_defs_Supplier_Input
1515
+ accountingClassification: _DOLLAR_defs_AccountingClassification_Input
1507
1516
  """Is the expense active or not"""
1508
1517
  active: Boolean
1509
1518
  }
@@ -1523,8 +1532,30 @@ enum mutationInput_updateExpense_input_paymentType_oneOf_1 {
1523
1532
  _11 @enum(subgraph: "GreenInvoice", value: "11")
1524
1533
  }
1525
1534
 
1526
- """Supplier of the expense"""
1527
- input Supplier_Input {
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
1528
1559
  """The supplier ID"""
1529
1560
  id: String
1530
1561
  """The supplier name"""
@@ -1533,38 +1564,16 @@ input Supplier_Input {
1533
1564
  active: Boolean
1534
1565
  """The supplier tax ID"""
1535
1566
  taxId: String
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]
1567
+ paymentTerms: query_getExpense_supplier_allOf_3_paymentTerms
1551
1568
  labels: [String]
1552
1569
  """The creation date, in UNIX timestamp format"""
1553
- creationDate: Int
1570
+ creationDate: NonNegativeInt
1554
1571
  """The last update date of the supplier, in UNIX timestamp format"""
1555
1572
  lastUpdateDate: Int
1556
1573
  """The supplier department"""
1557
1574
  department: String
1558
1575
  """The supplier accounting key"""
1559
1576
  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
1568
1577
  """The Supplier remarks for self use"""
1569
1578
  remarks: String
1570
1579
  """The amount of incomes from the customer"""
@@ -1575,7 +1584,7 @@ input Supplier_Input {
1575
1584
  }
1576
1585
 
1577
1586
  """Account classification of the expense"""
1578
- input AccountingClassification_Input {
1587
+ input _DOLLAR_defs_AccountingClassification_Input {
1579
1588
  """The classification ID, see 'Get Accounting Classifications' endpoint"""
1580
1589
  id: String
1581
1590
  """The classification key"""
@@ -1584,7 +1593,7 @@ input AccountingClassification_Input {
1584
1593
  code: String
1585
1594
  """The classification title"""
1586
1595
  title: String
1587
- irsCode: mutation_addExpense_oneOf_0_allOf_0_accountingClassification_irsCode
1596
+ irsCode: query_getExpense_accountingClassification_irsCode
1588
1597
  """The classification income"""
1589
1598
  income: Float
1590
1599
  """The classification type"""
@@ -1593,17 +1602,17 @@ input AccountingClassification_Input {
1593
1602
  vat: Float
1594
1603
  }
1595
1604
 
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
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
1597
1606
 
1598
- type GetExpenseDraft {
1607
+ type addExpenseDraftByFile_200_response {
1599
1608
  """The expense draft ID"""
1600
1609
  id: String
1601
1610
  status: mutation_addExpenseDraftByFile_oneOf_0_status
1602
1611
  """The creation date, in UNIX timestamp format"""
1603
- creationDate: Int
1612
+ creationDate: NonNegativeInt
1604
1613
  """The last update date of the expense draft, in UNIX timestamp format"""
1605
1614
  lastUpdateDate: Int
1606
- expense: ExpensePartial
1615
+ expense: _DOLLAR_defs_ExpensePartial
1607
1616
  """URL of expense thumbnail"""
1608
1617
  thumbnail: String
1609
1618
  """URL to download the expense thumbnail"""
@@ -1617,13 +1626,13 @@ enum mutation_addExpenseDraftByFile_oneOf_0_status {
1617
1626
  }
1618
1627
 
1619
1628
  """A Single Expense"""
1620
- type ExpensePartial {
1629
+ type _DOLLAR_defs_ExpensePartial {
1621
1630
  paymentType: mutation_addExpense_oneOf_0_allOf_0_paymentType
1622
- currency: Currency
1631
+ currency: _DOLLAR_defs_Currency
1623
1632
  """Currency rate relative to ILS"""
1624
- currencyRate: Float
1633
+ currencyRate: NonNegativeFloat
1625
1634
  """VAT amount"""
1626
- vat: Float
1635
+ vat: NonNegativeFloat
1627
1636
  """The total amount of the expense"""
1628
1637
  amount: Float
1629
1638
  """Date of the expense"""
@@ -1632,14 +1641,15 @@ type ExpensePartial {
1632
1641
  dueDate: String
1633
1642
  """Reporting date of the expense"""
1634
1643
  reportingDate: String
1635
- documentType: ExpenseDocumentType
1644
+ documentType: _DOLLAR_defs_ExpenseDocumentType
1636
1645
  """Number of the expense"""
1637
1646
  number: String
1638
1647
  """Description for the expense"""
1639
1648
  description: String
1649
+ """Remarks for the expense"""
1640
1650
  remarks: String
1641
- supplier: Supplier
1642
- accountingClassification: AccountingClassification
1651
+ supplier: _DOLLAR_defs_Supplier
1652
+ accountingClassification: _DOLLAR_defs_AccountingClassification
1643
1653
  """Is the expense active or not"""
1644
1654
  active: Boolean
1645
1655
  """
@@ -1652,11 +1662,143 @@ type ExpensePartial {
1652
1662
  addAccountingClassification: Boolean
1653
1663
  }
1654
1664
 
1655
- input addExpenseDraftByFileRequest_Input {
1665
+ input _DOLLAR_defs_addExpenseDraftByFileRequest_Input {
1656
1666
  """The file, in Base64, allowed types: GIF, PNG, JPG, SVG, PDF"""
1657
1667
  file: String
1658
1668
  }
1659
1669
 
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
+
1660
1802
  scalar ObjMap
1661
1803
 
1662
1804
  enum HTTPMethod {