Skip to content

Commit 882ad61

Browse files
author
Tobias S. Keller
committed
fix: remaining isues
1 parent ad8c92b commit 882ad61

File tree

4 files changed

+4429
-4482
lines changed

4 files changed

+4429
-4482
lines changed

next.config.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ const nextConfig = {
1717
typescript: {
1818
tsconfigPath: './tsconfig.next.json',
1919
},
20-
serverExternalPackages: ['graphql', 'typeorm'],
21-
webpack: {
22-
devtool: 'source-map',
23-
},
24-
// We use webpack config for source maps, so we disable turbopack for now to match previous behavior or explicitly opt-in to webpack.
20+
serverExternalPackages: ['graphql', 'typeorm', 'apollo-server-lambda', 'apollo-server-core'],
2521
// Next 16 defaults to turbopack for `next build`.
2622
};
2723

src/backend/events/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import type { EventHandlerImport } from '@/common/api-types';
1+
import { EventHandlerImport } from '@/common/api-types';
22

33
const handlers: Record<string, EventHandlerImport> = {
4-
cron: async () =>
4+
'cron': async () =>
55
await import('@/backend/events/cron/handler').then(
66
(importedModule) => importedModule.handler,
77
),
@@ -17,11 +17,11 @@ const handlers: Record<string, EventHandlerImport> = {
1717
await import('@/backend/events/invoice/send/handler').then(
1818
(importedModule) => importedModule.handler,
1919
),
20-
receipt: async () =>
20+
'receipt': async () =>
2121
await import('@/backend/events/receipt/handler').then(
2222
(importedModule) => importedModule.handler,
2323
),
24-
template: async () =>
24+
'template': async () =>
2525
await import('@/backend/events/template/handler').then(
2626
(importedModule) => importedModule.handler,
2727
),

src/schema.gql

Lines changed: 19 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,10 @@ scalar DateTime
6868
type Expense {
6969
attachments: [Attachment!]
7070

71-
"""
72-
The full category object assigned to this expense.
73-
"""
71+
"""The full category object assigned to this expense."""
7472
category: ExpenseCategoryType
7573

76-
"""
77-
The ID of the expense category assigned to this expense.
78-
"""
74+
"""The ID of the expense category assigned to this expense."""
7975
categoryId: String
8076
createdAt: DateTime!
8177
description: String
@@ -111,9 +107,7 @@ type ExpenseCategoryType {
111107
input ExpenseInput {
112108
attachmentIds: [String!]
113109

114-
"""
115-
The ID of the expense category assigned to this expense.
116-
"""
110+
"""The ID of the expense category assigned to this expense."""
117111
categoryId: String
118112
description: String
119113
expendedAt: DateTime!
@@ -129,14 +123,10 @@ input ExpenseWhereInput {
129123
}
130124

131125
input ExtractReceiptInput {
132-
"""
133-
An array of attachment IDs to process.
134-
"""
126+
"""An array of attachment IDs to process."""
135127
attachmentIds: [String!]
136128

137-
"""
138-
Text content to process (e.g., from an email).
139-
"""
129+
"""Text content to process (e.g., from an email)."""
140130
text: String
141131
}
142132

@@ -180,18 +170,14 @@ input IncomeSurplusReportWhereInput {
180170
startDate: DateTime!
181171
}
182172

183-
"""
184-
The state of a check for an inventory item
185-
"""
173+
"""The state of a check for an inventory item"""
186174
enum InventoryCheckState {
187175
FAIL
188176
PASS
189177
RECHECK
190178
}
191179

192-
"""
193-
The type of history entry for an inventory item
194-
"""
180+
"""The type of history entry for an inventory item"""
195181
enum InventoryHistoryType {
196182
CHECK
197183
NOTE
@@ -243,9 +229,7 @@ input InventoryItemPropertyInput {
243229
value: String!
244230
}
245231

246-
"""
247-
The state of an inventory item
248-
"""
232+
"""The state of an inventory item"""
249233
enum InventoryItemState {
250234
BROKEN
251235
DEFAULT
@@ -347,9 +331,7 @@ type InvoiceActivity {
347331
activityAt: DateTime!
348332
attachToEmail: Boolean
349333

350-
"""
351-
The linked attachment details, if any
352-
"""
334+
"""The linked attachment details, if any"""
353335
attachment: Attachment
354336
id: String!
355337
notes: String
@@ -367,9 +349,7 @@ input InvoiceActivityInput {
367349
user: String
368350
}
369351

370-
"""
371-
Type of Activity Log entry
372-
"""
352+
"""Type of Activity Log entry"""
373353
enum InvoiceActivityType {
374354
ARCHIVE_INVOICE
375355
ARCHIVE_OFFER
@@ -481,9 +461,7 @@ type InvoiceLinks {
481461
offerId: String
482462
}
483463

484-
"""
485-
Supported output formats for digital invoices
486-
"""
464+
"""Supported output formats for digital invoices"""
487465
enum InvoiceOutputFormat {
488466
PDF
489467
XRECHNUNG
@@ -497,9 +475,7 @@ input InvoicePaymentInput {
497475
when: DateTime
498476
}
499477

500-
"""
501-
Invoice status
502-
"""
478+
"""Invoice status"""
503479
enum InvoiceStatus {
504480
CANCELLED
505481
DRAFT
@@ -513,9 +489,7 @@ input InvoiceSubmissionInput {
513489
when: DateTime
514490
}
515491

516-
"""
517-
The way(s) the invoice was submitted
518-
"""
492+
"""The way(s) the invoice was submitted"""
519493
enum InvoiceSubmissionType {
520494
EMAIL
521495
LETTER
@@ -540,9 +514,7 @@ type InvoiceTemplateResult {
540514
pdfTemplate: String!
541515
}
542516

543-
"""
544-
Invoice or Offer
545-
"""
517+
"""Invoice or Offer"""
546518
enum InvoiceType {
547519
INVOICE
548520
OFFER
@@ -566,12 +538,7 @@ input ListAttachmentsInput {
566538
type Mutation {
567539
addInventoryCheck(id: String!, note: String, state: InventoryCheckState!): Boolean!
568540
addInventoryNote(id: String!, note: String!): Boolean!
569-
attachUpload(
570-
attachmentId: String!
571-
expenseId: String
572-
inventoryId: String
573-
invoiceId: String
574-
): Attachment!
541+
attachUpload(attachmentId: String!, expenseId: String, inventoryId: String, invoiceId: String): Attachment!
575542
cancelScheduledInvoiceSend(id: String!): InvoiceChangedResponse!
576543
confirmUpload(attachmentId: String!): Attachment!
577544
copyInvoice(as: InvoiceType!, id: String!): InvoiceChangedResponse!
@@ -593,12 +560,7 @@ type Mutation {
593560
deleteProduct(id: String!): Product!
594561
extractReceipt(input: ExtractReceiptInput!): ExtractReceiptResult!
595562
importInvoices(data: [InvoiceImportInput!]!): [Invoice!]!
596-
invoiceAddComment(
597-
attachToEmail: Boolean
598-
attachmentId: String
599-
comment: String
600-
invoiceId: String!
601-
): InvoiceChangedResponse!
563+
invoiceAddComment(attachToEmail: Boolean, attachmentId: String, comment: String, invoiceId: String!): InvoiceChangedResponse!
602564
invoiceAddPayment(id: String!, payment: InvoicePaymentInput!): InvoiceChangedResponse!
603565
invoiceCancelUnpaid(deleteExpenses: Boolean, id: String!): InvoiceChangedResponse!
604566
invoiceDeleteDraft(id: String!): InvoiceChangedResponse!
@@ -608,18 +570,11 @@ type Mutation {
608570
purgeInvoices(confirm: String!): Boolean!
609571
requestUpload(fileName: String!, mimeType: String!, size: Int!): RequestAttachmentUploadUrlResult!
610572
sendTestEvent(data: String!, name: String!): String!
611-
setInvoiceActivityAttachmentEmailFlag(
612-
activityId: String!
613-
attachToEmail: Boolean!
614-
invoiceId: String!
615-
): InvoiceChangedResponse!
573+
setInvoiceActivityAttachmentEmailFlag(activityId: String!, attachToEmail: Boolean!, invoiceId: String!): InvoiceChangedResponse!
616574
testRenderTemplate(pdf: Boolean, styles: String!, template: String!): String!
617575
updateCustomer(data: CustomerInput!, id: String!): Customer!
618576
updateExpense(data: ExpenseInput!, id: String!): Expense!
619-
updateExpenseSettings(
620-
categories: [ExpenseCategoryInputType!]!
621-
fixExpensesForImport: Boolean
622-
): [ExpenseCategoryType!]!
577+
updateExpenseSettings(categories: [ExpenseCategoryInputType!]!, fixExpensesForImport: Boolean): [ExpenseCategoryType!]!
623578
updateInventoryItem(data: InventoryItemInput!, id: String!): InventoryItem!
624579
updateInventoryLocation(data: InventoryLocationInput!, id: String!): InventoryLocation!
625580
updateInventoryType(data: InventoryTypeInput!, id: String!): InventoryType!
@@ -683,11 +638,7 @@ type Query {
683638
inventoryItems(limit: Int, skip: Int, where: InventoryItemWhereInput): [InventoryItem!]!
684639
inventoryLocation(id: String): InventoryLocation
685640
inventoryLocationByBarcode(barcode: String!): InventoryLocation
686-
inventoryLocations(
687-
limit: Int
688-
skip: Int
689-
where: InventoryLocationWhereInput
690-
): [InventoryLocation!]!
641+
inventoryLocations(limit: Int, skip: Int, where: InventoryLocationWhereInput): [InventoryLocation!]!
691642
inventoryType(id: String): InventoryType
692643
inventoryTypes(limit: Int, skip: Int, where: InventoryTypeWhereInput): [InventoryType!]!
693644
invoice(id: String!): Invoice!

0 commit comments

Comments
 (0)