@accounter/server 0.0.9-alpha-20251211102658-1b334ef361fc6faf8cd44900059dd236994fe9ab → 0.0.9-alpha-20251211102754-3592a860d1348674bd09af63fa304ff1e439a1dd
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.
- package/CHANGELOG.md +5 -5
- package/GMAIL_LISTENER.md +7 -7
- package/dist/green-invoice-graphql/src/mesh-artifacts/index.d.ts +1 -1
- package/dist/server/src/__tests__/factories/charge.d.ts +3 -1
- package/dist/server/src/__tests__/factories/charge.js +2 -1
- package/dist/server/src/__tests__/factories/charge.js.map +1 -1
- package/dist/server/src/__tests__/factories/transaction.d.ts +3 -1
- package/dist/server/src/__tests__/factories/transaction.js +1 -0
- package/dist/server/src/__tests__/factories/transaction.js.map +1 -1
- package/dist/server/src/__tests__/helpers/fixture-loader.d.ts +7 -3
- package/dist/server/src/__tests__/helpers/fixture-loader.js +28 -20
- package/dist/server/src/__tests__/helpers/fixture-loader.js.map +1 -1
- package/dist/server/src/__tests__/helpers/fixture-types.d.ts +1 -3
- package/dist/server/src/modules/accountant-approval/index.js +1 -1
- package/dist/server/src/modules/accountant-approval/index.js.map +1 -1
- package/dist/server/src/modules/admin-context/index.js +1 -1
- package/dist/server/src/modules/admin-context/index.js.map +1 -1
- package/dist/server/src/modules/bank-deposits/index.js +1 -1
- package/dist/server/src/modules/bank-deposits/index.js.map +1 -1
- package/dist/server/src/modules/bank-deposits/providers/bank-deposit-transactions.provider.d.ts +4 -4
- package/dist/server/src/modules/business-trips/index.js +3 -3
- package/dist/server/src/modules/business-trips/index.js.map +1 -1
- package/dist/server/src/modules/charges/index.js +4 -4
- package/dist/server/src/modules/charges/index.js.map +1 -1
- package/dist/server/src/modules/charges-matcher/index.js +1 -1
- package/dist/server/src/modules/charges-matcher/index.js.map +1 -1
- package/dist/server/src/modules/charts/index.js +1 -1
- package/dist/server/src/modules/charts/index.js.map +1 -1
- package/dist/server/src/modules/common/index.js +4 -4
- package/dist/server/src/modules/common/index.js.map +1 -1
- package/dist/server/src/modules/common/resolvers/timeless-date.d.ts +1 -1
- package/dist/server/src/modules/contracts/index.js +1 -1
- package/dist/server/src/modules/contracts/index.js.map +1 -1
- package/dist/server/src/modules/corn-jobs/index.js +1 -1
- package/dist/server/src/modules/corn-jobs/index.js.map +1 -1
- package/dist/server/src/modules/corporate-taxes/index.js +1 -1
- package/dist/server/src/modules/corporate-taxes/index.js.map +1 -1
- package/dist/server/src/modules/corporate-taxes/providers/corporate-taxes.provider.d.ts +1 -1
- package/dist/server/src/modules/countries/index.js +1 -1
- package/dist/server/src/modules/countries/index.js.map +1 -1
- package/dist/server/src/modules/deel/index.js +1 -1
- package/dist/server/src/modules/deel/index.js.map +1 -1
- package/dist/server/src/modules/depreciation/index.js +1 -1
- package/dist/server/src/modules/depreciation/index.js.map +1 -1
- package/dist/server/src/modules/dividends/index.js +1 -1
- package/dist/server/src/modules/dividends/index.js.map +1 -1
- package/dist/server/src/modules/documents/index.js +3 -3
- package/dist/server/src/modules/documents/index.js.map +1 -1
- package/dist/server/src/modules/exchange-rates/index.js +1 -1
- package/dist/server/src/modules/exchange-rates/index.js.map +1 -1
- package/dist/server/src/modules/financial-accounts/index.js +2 -2
- package/dist/server/src/modules/financial-accounts/index.js.map +1 -1
- package/dist/server/src/modules/financial-entities/index.js +6 -6
- package/dist/server/src/modules/financial-entities/index.js.map +1 -1
- package/dist/server/src/modules/green-invoice/index.js +1 -1
- package/dist/server/src/modules/green-invoice/index.js.map +1 -1
- package/dist/server/src/modules/ledger/__tests__/helpers/ledger-assertions.js +5 -5
- package/dist/server/src/modules/ledger/__tests__/helpers/ledger-assertions.js.map +1 -1
- package/dist/server/src/modules/ledger/index.js +1 -1
- package/dist/server/src/modules/ledger/index.js.map +1 -1
- package/dist/server/src/modules/misc-expenses/index.js +1 -1
- package/dist/server/src/modules/misc-expenses/index.js.map +1 -1
- package/dist/server/src/modules/reports/helpers/pcn.helper.d.ts +1 -1
- package/dist/server/src/modules/reports/index.js +12 -12
- package/dist/server/src/modules/reports/index.js.map +1 -1
- package/dist/server/src/modules/salaries/index.js +3 -3
- package/dist/server/src/modules/salaries/index.js.map +1 -1
- package/dist/server/src/modules/sort-codes/index.js +1 -1
- package/dist/server/src/modules/sort-codes/index.js.map +1 -1
- package/dist/server/src/modules/tags/index.js +1 -1
- package/dist/server/src/modules/tags/index.js.map +1 -1
- package/dist/server/src/modules/transactions/helpers/effective-date.helper.d.ts +1 -1
- package/dist/server/src/modules/transactions/index.js +3 -3
- package/dist/server/src/modules/transactions/index.js.map +1 -1
- package/dist/server/src/modules/vat/index.js +1 -1
- package/dist/server/src/modules/vat/index.js.map +1 -1
- package/dist/server/src/modules/vat/providers/vat.provider.d.ts +1 -1
- package/docs/implementation-guide.md +2 -2
- package/package.json +1 -1
- package/src/__tests__/factories/charge.ts +4 -2
- package/src/__tests__/factories/transaction.ts +3 -1
- package/src/__tests__/helpers/fixture-loader.ts +30 -22
- package/src/__tests__/helpers/fixture-types.ts +1 -3
- package/src/modules/accountant-approval/index.ts +1 -1
- package/src/modules/admin-context/index.ts +1 -1
- package/src/modules/bank-deposits/index.ts +1 -1
- package/src/modules/business-trips/index.ts +3 -3
- package/src/modules/charges/index.ts +4 -4
- package/src/modules/charges-matcher/README.md +12 -12
- package/src/modules/charges-matcher/documentation/SPEC.md +103 -103
- package/src/modules/charges-matcher/index.ts +1 -1
- package/src/modules/charts/index.ts +1 -1
- package/src/modules/common/index.ts +4 -4
- package/src/modules/contracts/index.ts +1 -1
- package/src/modules/corn-jobs/index.ts +1 -1
- package/src/modules/corporate-taxes/index.ts +1 -1
- package/src/modules/countries/index.ts +1 -1
- package/src/modules/deel/index.ts +1 -1
- package/src/modules/depreciation/index.ts +1 -1
- package/src/modules/dividends/index.ts +1 -1
- package/src/modules/documents/index.ts +3 -3
- package/src/modules/exchange-rates/index.ts +1 -1
- package/src/modules/financial-accounts/index.ts +2 -2
- package/src/modules/financial-entities/index.ts +6 -6
- package/src/modules/green-invoice/index.ts +1 -1
- package/src/modules/ledger/__tests__/helpers/ledger-assertions.ts +5 -6
- package/src/modules/ledger/__tests__/ledger-scenario-a.integration.test.ts +2 -2
- package/src/modules/ledger/index.ts +1 -1
- package/src/modules/misc-expenses/index.ts +1 -1
- package/src/modules/reports/index.ts +12 -12
- package/src/modules/salaries/index.ts +3 -3
- package/src/modules/sort-codes/index.ts +1 -1
- package/src/modules/tags/index.ts +1 -1
- package/src/modules/transactions/index.ts +3 -3
- package/src/modules/vat/index.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @accounter/server
|
|
2
2
|
|
|
3
|
-
## 0.0.9-alpha-
|
|
3
|
+
## 0.0.9-alpha-20251211102754-3592a860d1348674bd09af63fa304ff1e439a1dd
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
@@ -304,10 +304,10 @@
|
|
|
304
304
|
[`ef68321`](https://github.com/Urigo/accounter-fullstack/commit/ef68321608d60a7208e82a2c413f27beb502e3cc),
|
|
305
305
|
[`ef68321`](https://github.com/Urigo/accounter-fullstack/commit/ef68321608d60a7208e82a2c413f27beb502e3cc),
|
|
306
306
|
[`c7d6f21`](https://github.com/Urigo/accounter-fullstack/commit/c7d6f21ed62658159b1323334501daca03c8d3e5)]:
|
|
307
|
-
- @accounter/green-invoice-graphql@0.8.3-alpha-
|
|
308
|
-
- @accounter/pcn874-generator@0.6.4-alpha-
|
|
309
|
-
- @accounter/shaam-uniform-format-generator@0.2.3-alpha-
|
|
310
|
-
- @accounter/shaam6111-generator@0.1.5-alpha-
|
|
307
|
+
- @accounter/green-invoice-graphql@0.8.3-alpha-20251211102754-3592a860d1348674bd09af63fa304ff1e439a1dd
|
|
308
|
+
- @accounter/pcn874-generator@0.6.4-alpha-20251211102754-3592a860d1348674bd09af63fa304ff1e439a1dd
|
|
309
|
+
- @accounter/shaam-uniform-format-generator@0.2.3-alpha-20251211102754-3592a860d1348674bd09af63fa304ff1e439a1dd
|
|
310
|
+
- @accounter/shaam6111-generator@0.1.5-alpha-20251211102754-3592a860d1348674bd09af63fa304ff1e439a1dd
|
|
311
311
|
|
|
312
312
|
## 0.0.8
|
|
313
313
|
|
package/GMAIL_LISTENER.md
CHANGED
|
@@ -68,20 +68,20 @@ setInterval(async () => {
|
|
|
68
68
|
const response = await gmail.users.messages.list({
|
|
69
69
|
userId: 'me',
|
|
70
70
|
q: `label:${TARGET_LABEL} is:unread`,
|
|
71
|
-
maxResults: 10
|
|
72
|
-
})
|
|
71
|
+
maxResults: 10,
|
|
72
|
+
});
|
|
73
73
|
|
|
74
74
|
for (const message of response.data.messages || []) {
|
|
75
|
-
const emailData = await gmailService.getEmailById(message.id!)
|
|
75
|
+
const emailData = await gmailService.getEmailById(message.id!);
|
|
76
76
|
if (emailData) {
|
|
77
|
-
await executeCustomFunction(emailData)
|
|
77
|
+
await executeCustomFunction(emailData);
|
|
78
78
|
// Mark as read to avoid reprocessing
|
|
79
79
|
await gmail.users.messages.modify({
|
|
80
80
|
userId: 'me',
|
|
81
81
|
id: message.id!,
|
|
82
|
-
requestBody: { removeLabelIds: ['UNREAD'] }
|
|
83
|
-
})
|
|
82
|
+
requestBody: { removeLabelIds: ['UNREAD'] },
|
|
83
|
+
});
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
}, 30000) // Poll every 30 seconds
|
|
86
|
+
}, 30000); // Poll every 30 seconds
|
|
87
87
|
```
|
|
@@ -4,8 +4,8 @@ import type { GetMeshOptions } from '@graphql-mesh/runtime';
|
|
|
4
4
|
import type { YamlConfig } from '@graphql-mesh/types';
|
|
5
5
|
import { MeshHTTPHandler } from '@graphql-mesh/http';
|
|
6
6
|
import { type ExecuteMeshFn, type SubscribeMeshFn, type MeshContext as BaseMeshContext, type MeshInstance } from '@graphql-mesh/runtime';
|
|
7
|
-
import type { GreenInvoiceNewTypes } from './sources/GreenInvoiceNew/types';
|
|
8
7
|
import type { GreenInvoiceTypes } from './sources/GreenInvoice/types';
|
|
8
|
+
import type { GreenInvoiceNewTypes } from './sources/GreenInvoiceNew/types';
|
|
9
9
|
export type Maybe<T> = T | null;
|
|
10
10
|
export type InputMaybe<T> = Maybe<T>;
|
|
11
11
|
export type Exact<T extends {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Based on charges table schema from migrations and charges.provider.ts:
|
|
7
7
|
* - Required: owner_id
|
|
8
|
-
* - Optional: type, accountant_status, user_description, tax_category_id, optional_vat, documents_optional_flag
|
|
8
|
+
* - Optional: type, accountant_status, user_description, tax_category_id, optional_vat, documents_optional_flag, is_property
|
|
9
9
|
*
|
|
10
10
|
* @see packages/server/src/modules/charges/providers/charges.provider.ts (generateCharge query)
|
|
11
11
|
* @see packages/migrations/src/actions/*-charges-*.ts (migrations)
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
export interface ChargeInsertParams {
|
|
20
20
|
id?: string;
|
|
21
21
|
owner_id: string;
|
|
22
|
+
is_property?: boolean | null;
|
|
22
23
|
type?: string | null;
|
|
23
24
|
accountant_status?: string | null;
|
|
24
25
|
user_description?: string | null;
|
|
@@ -41,6 +42,7 @@ export interface ChargeInsertParams {
|
|
|
41
42
|
* - accountant_status defaults to 'PENDING' (database requires NOT NULL)
|
|
42
43
|
* - optional_vat defaults to false (database requires NOT NULL)
|
|
43
44
|
* - documents_optional_flag defaults to false (database requires NOT NULL)
|
|
45
|
+
* - is_property defaults to null (property-related charges can override to true)
|
|
44
46
|
* - id defaults to deterministic UUID if not provided
|
|
45
47
|
*
|
|
46
48
|
* @example
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Based on charges table schema from migrations and charges.provider.ts:
|
|
7
7
|
* - Required: owner_id
|
|
8
|
-
* - Optional: type, accountant_status, user_description, tax_category_id, optional_vat, documents_optional_flag
|
|
8
|
+
* - Optional: type, accountant_status, user_description, tax_category_id, optional_vat, documents_optional_flag, is_property
|
|
9
9
|
*
|
|
10
10
|
* @see packages/server/src/modules/charges/providers/charges.provider.ts (generateCharge query)
|
|
11
11
|
* @see packages/migrations/src/actions/*-charges-*.ts (migrations)
|
|
@@ -26,6 +26,7 @@ import { makeUUID, makeUUIDLegacy } from '../../demo-fixtures/helpers/determinis
|
|
|
26
26
|
* - accountant_status defaults to 'PENDING' (database requires NOT NULL)
|
|
27
27
|
* - optional_vat defaults to false (database requires NOT NULL)
|
|
28
28
|
* - documents_optional_flag defaults to false (database requires NOT NULL)
|
|
29
|
+
* - is_property defaults to null (property-related charges can override to true)
|
|
29
30
|
* - id defaults to deterministic UUID if not provided
|
|
30
31
|
*
|
|
31
32
|
* @example
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charge.js","sourceRoot":"","sources":["../../../../../src/__tests__/factories/charge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,mDAAmD,CAAC;
|
|
1
|
+
{"version":3,"file":"charge.js","sourceRoot":"","sources":["../../../../../src/__tests__/factories/charge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,mDAAmD,CAAC;AAoB7F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,MAAM,UAAU,YAAY,CAC1B,MAIC,EACD,SAAuC;IAEvC,OAAO;QACL,EAAE,EAAE,cAAc,EAAE;QACpB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,IAAI,EAAE,IAAI;QACV,iBAAiB,EAAE,SAAS;QAC5B,gBAAgB,EAAE,MAAM,CAAC,gBAAgB,IAAI,IAAI;QACjD,eAAe,EAAE,MAAM,CAAC,eAAe,IAAI,QAAQ,CAAC,cAAc,EAAE,sBAAsB,CAAC;QAC3F,YAAY,EAAE,KAAK;QACnB,uBAAuB,EAAE,KAAK;QAC9B,GAAG,SAAS;KACb,CAAC;AACJ,CAAC"}
|
|
@@ -27,9 +27,10 @@ export interface TransactionInsertParams {
|
|
|
27
27
|
event_date: string;
|
|
28
28
|
debit_date?: string | null;
|
|
29
29
|
amount: string;
|
|
30
|
-
current_balance
|
|
30
|
+
current_balance?: string;
|
|
31
31
|
business_id?: string | null;
|
|
32
32
|
is_fee?: boolean | null;
|
|
33
|
+
currency_rate?: number | null;
|
|
33
34
|
}
|
|
34
35
|
/**
|
|
35
36
|
* Create a transaction for test fixtures
|
|
@@ -45,6 +46,7 @@ export interface TransactionInsertParams {
|
|
|
45
46
|
* - currency is required (e.g., 'ILS', 'USD', 'EUR')
|
|
46
47
|
* - event_date is required (transaction date)
|
|
47
48
|
* - is_fee defaults to false (regular transaction, not a fee)
|
|
49
|
+
* - currency_rate defaults to null (foreign currency transactions can specify exchange rate)
|
|
48
50
|
* - account_id defaults to deterministic UUID if not provided
|
|
49
51
|
* - source_id defaults to deterministic UUID (raw transaction reference)
|
|
50
52
|
* - source_description defaults to null
|
|
@@ -25,6 +25,7 @@ import { formatNumeric } from './money.js';
|
|
|
25
25
|
* - currency is required (e.g., 'ILS', 'USD', 'EUR')
|
|
26
26
|
* - event_date is required (transaction date)
|
|
27
27
|
* - is_fee defaults to false (regular transaction, not a fee)
|
|
28
|
+
* - currency_rate defaults to null (foreign currency transactions can specify exchange rate)
|
|
28
29
|
* - account_id defaults to deterministic UUID if not provided
|
|
29
30
|
* - source_id defaults to deterministic UUID (raw transaction reference)
|
|
30
31
|
* - source_description defaults to null
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../../../src/__tests__/factories/transaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,mDAAmD,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../../../src/__tests__/factories/transaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,mDAAmD,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AA0B3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,MAAM,UAAU,iBAAiB,CAC/B,MAOC,EACD,SAA4C;IAE5C,OAAO;QACL,EAAE,EAAE,cAAc,EAAE;QACpB,UAAU,EAAE,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAC;QAClD,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,SAAS,EAAE,QAAQ,CAAC,oBAAoB,EAAE,eAAe,CAAC;QAC1D,kBAAkB,EAAE,IAAI;QACxB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,UAAU,EACR,OAAO,MAAM,CAAC,UAAU,KAAK,QAAQ;YACnC,CAAC,CAAC,MAAM,CAAC,UAAU;YACnB,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;QAClD,UAAU,EAAE,IAAI;QAChB,MAAM,EAAE,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC;QACxF,eAAe,EAAE,GAAG;QACpB,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,KAAK;QAC9B,GAAG,SAAS;KACb,CAAC;AACJ,CAAC"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @see packages/server/src/__tests__/helpers/fixture-types.ts for fixture structure
|
|
8
8
|
* @see packages/server/src/__tests__/helpers/fixture-validation.ts for validation logic
|
|
9
9
|
*/
|
|
10
|
-
import type { PoolClient } from 'pg';
|
|
10
|
+
import type { Client, PoolClient } from 'pg';
|
|
11
11
|
import type { Fixture } from './fixture-types.js';
|
|
12
12
|
/**
|
|
13
13
|
* Custom error for fixture insertion failures
|
|
@@ -67,12 +67,16 @@ export type FixtureIdMapping = Map<string, string>;
|
|
|
67
67
|
* - Checks referential integrity (charge IDs, business IDs, etc.)
|
|
68
68
|
* - Validates required fields
|
|
69
69
|
*
|
|
70
|
-
* @param client - PostgreSQL client within an active transaction
|
|
70
|
+
* @param client - PostgreSQL client (PoolClient or standalone Client) within an active transaction
|
|
71
71
|
* @param fixture - Complete fixture to insert
|
|
72
72
|
* @returns Promise resolving to ID mapping (fixture ID → database ID)
|
|
73
73
|
* @throws {Error} If fixture validation fails (via assertValidFixture)
|
|
74
74
|
* @throws {FixtureInsertionError} If any insertion section fails
|
|
75
75
|
*
|
|
76
|
+
* @remarks
|
|
77
|
+
* Type Safety: Accepts both PoolClient and Client to support both test transactions
|
|
78
|
+
* (pool.connect()) and standalone connections (new pg.Client()) used in seed scripts.
|
|
79
|
+
*
|
|
76
80
|
* @example
|
|
77
81
|
* ```typescript
|
|
78
82
|
* import { withTestTransaction } from './test-transaction.js';
|
|
@@ -93,4 +97,4 @@ export type FixtureIdMapping = Map<string, string>;
|
|
|
93
97
|
* );
|
|
94
98
|
* ```
|
|
95
99
|
*/
|
|
96
|
-
export declare function insertFixture(client: PoolClient, fixture: Fixture): Promise<FixtureIdMapping>;
|
|
100
|
+
export declare function insertFixture(client: PoolClient | Client, fixture: Fixture): Promise<FixtureIdMapping>;
|
|
@@ -70,12 +70,16 @@ export class FixtureInsertionError extends Error {
|
|
|
70
70
|
* - Checks referential integrity (charge IDs, business IDs, etc.)
|
|
71
71
|
* - Validates required fields
|
|
72
72
|
*
|
|
73
|
-
* @param client - PostgreSQL client within an active transaction
|
|
73
|
+
* @param client - PostgreSQL client (PoolClient or standalone Client) within an active transaction
|
|
74
74
|
* @param fixture - Complete fixture to insert
|
|
75
75
|
* @returns Promise resolving to ID mapping (fixture ID → database ID)
|
|
76
76
|
* @throws {Error} If fixture validation fails (via assertValidFixture)
|
|
77
77
|
* @throws {FixtureInsertionError} If any insertion section fails
|
|
78
78
|
*
|
|
79
|
+
* @remarks
|
|
80
|
+
* Type Safety: Accepts both PoolClient and Client to support both test transactions
|
|
81
|
+
* (pool.connect()) and standalone connections (new pg.Client()) used in seed scripts.
|
|
82
|
+
*
|
|
79
83
|
* @example
|
|
80
84
|
* ```typescript
|
|
81
85
|
* import { withTestTransaction } from './test-transaction.js';
|
|
@@ -140,13 +144,13 @@ export async function insertFixture(client, fixture) {
|
|
|
140
144
|
business.website,
|
|
141
145
|
business.phoneNumber,
|
|
142
146
|
business.governmentId, // Maps to vat_number column
|
|
143
|
-
business.exemptDealer,
|
|
144
|
-
business.suggestions,
|
|
145
|
-
business.optionalVat,
|
|
146
|
-
business.country,
|
|
147
|
-
business.pcn874RecordTypeOverride,
|
|
148
|
-
business.isReceiptEnough,
|
|
149
|
-
business.isDocumentsOptional,
|
|
147
|
+
business.exemptDealer ?? false,
|
|
148
|
+
business.suggestions ?? null,
|
|
149
|
+
business.optionalVat ?? false,
|
|
150
|
+
business.country ?? 'ISR',
|
|
151
|
+
business.pcn874RecordTypeOverride ?? null,
|
|
152
|
+
business.isReceiptEnough ?? false,
|
|
153
|
+
business.isDocumentsOptional ?? false,
|
|
150
154
|
]);
|
|
151
155
|
if (entityResult.rows.length > 0) {
|
|
152
156
|
idMapping.set(business.id, entityResult.rows[0].id);
|
|
@@ -172,7 +176,7 @@ export async function insertFixture(client, fixture) {
|
|
|
172
176
|
id, hashavshevet_name, tax_excluded
|
|
173
177
|
)
|
|
174
178
|
VALUES ($1, $2, $3)
|
|
175
|
-
ON CONFLICT (id) DO NOTHING`, [taxCategory.id, taxCategory.hashavshevetName, taxCategory.taxExcluded]);
|
|
179
|
+
ON CONFLICT (id) DO NOTHING`, [taxCategory.id, taxCategory.hashavshevetName, taxCategory.taxExcluded ?? false]);
|
|
176
180
|
if (entityResult.rows.length > 0) {
|
|
177
181
|
idMapping.set(taxCategory.id, entityResult.rows[0].id);
|
|
178
182
|
}
|
|
@@ -235,18 +239,20 @@ export async function insertFixture(client, fixture) {
|
|
|
235
239
|
for (const charge of fixture.charges.charges) {
|
|
236
240
|
await client.query(`INSERT INTO ${qualifyTable('charges')} (
|
|
237
241
|
id, owner_id, type, accountant_status, user_description,
|
|
238
|
-
tax_category_id, optional_vat, documents_optional_flag
|
|
242
|
+
tax_category_id, optional_vat, documents_optional_flag,
|
|
243
|
+
is_property, created_at, updated_at
|
|
239
244
|
)
|
|
240
|
-
VALUES ($1, $2, $3, $4, $5, $6, $7, $8)
|
|
245
|
+
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, NOW(), NOW())
|
|
241
246
|
ON CONFLICT (id) DO NOTHING`, [
|
|
242
247
|
charge.id,
|
|
243
248
|
charge.owner_id,
|
|
244
|
-
charge.type,
|
|
245
|
-
charge.accountant_status,
|
|
249
|
+
charge.type ?? null,
|
|
250
|
+
charge.accountant_status ?? 'PENDING',
|
|
246
251
|
charge.user_description,
|
|
247
|
-
charge.tax_category_id,
|
|
248
|
-
charge.optional_vat,
|
|
249
|
-
charge.documents_optional_flag,
|
|
252
|
+
charge.tax_category_id ?? null,
|
|
253
|
+
charge.optional_vat ?? false,
|
|
254
|
+
charge.documents_optional_flag ?? false,
|
|
255
|
+
charge.is_property ?? false,
|
|
250
256
|
]);
|
|
251
257
|
idMapping.set(charge.id, charge.id);
|
|
252
258
|
}
|
|
@@ -278,9 +284,10 @@ export async function insertFixture(client, fixture) {
|
|
|
278
284
|
await client.query(`INSERT INTO ${qualifyTable('transactions')} (
|
|
279
285
|
id, account_id, charge_id, source_id, source_description,
|
|
280
286
|
currency, event_date, debit_date, amount, current_balance,
|
|
281
|
-
business_id, is_fee, source_reference, source_origin, origin_key
|
|
287
|
+
business_id, is_fee, source_reference, source_origin, origin_key,
|
|
288
|
+
currency_rate, created_at, updated_at
|
|
282
289
|
)
|
|
283
|
-
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15)
|
|
290
|
+
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, NOW(), NOW())
|
|
284
291
|
ON CONFLICT (id) DO NOTHING`, [
|
|
285
292
|
transaction.id,
|
|
286
293
|
accountId,
|
|
@@ -291,12 +298,13 @@ export async function insertFixture(client, fixture) {
|
|
|
291
298
|
transaction.event_date,
|
|
292
299
|
transaction.debit_date,
|
|
293
300
|
transaction.amount,
|
|
294
|
-
transaction.current_balance,
|
|
301
|
+
transaction.current_balance ?? '0',
|
|
295
302
|
transaction.business_id,
|
|
296
|
-
transaction.is_fee,
|
|
303
|
+
transaction.is_fee ?? false,
|
|
297
304
|
'TEST-REF', // source_reference (NOT NULL)
|
|
298
305
|
'TEST', // source_origin (NOT NULL)
|
|
299
306
|
dummyEtherscanId, // origin_key (NOT NULL) - must match etherscan_id in raw list
|
|
307
|
+
transaction.currency_rate ?? 1,
|
|
300
308
|
]);
|
|
301
309
|
idMapping.set(transaction.id, transaction.id);
|
|
302
310
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fixture-loader.js","sourceRoot":"","sources":["../../../../../src/__tests__/helpers/fixture-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,mDAAmD,CAAC;AAE7F;;;;;GAKG;AACH,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IAE5B;IACA;IACA;IAHlB,YACkB,OAAe,EACf,aAAoB,EACpB,OAAiC;QAEjD,KAAK,CACH,qCAAqC,OAAO,MAAM,aAAa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AC,EAAG,CAAC,CAAC;YAClD,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,sBAAsB;IACtB,IAAI,OAAO,CAAC,SAAS,EAAE,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC3E,MAAM,uBAAuB,CAAC,WAAW,EAAE,KAAK,IAAI,EAAE;YACpD,KAAK,MAAM,QAAQ,IAAI,OAAO,CAAC,SAAU,CAAC,SAAS,EAAE,CAAC;gBACpD,MAAM,MAAM,CAAC,KAAK,CAChB,eAAe,YAAY,CAAC,WAAW,CAAC;;;;;;;sCAOZ,EAC5B;oBACE,QAAQ,CAAC,EAAE;oBACX,QAAQ,CAAC,SAAS;oBAClB,QAAQ,CAAC,QAAQ;oBACjB,QAAQ,CAAC,IAAI;oBACb,QAAQ,CAAC,aAAa;oBACtB,QAAQ,CAAC,IAAI;oBACb,QAAQ,CAAC,YAAY;oBACrB,QAAQ,CAAC,aAAa;oBACtB,QAAQ,CAAC,UAAU;oBACnB,QAAQ,CAAC,SAAS;oBAClB,QAAQ,CAAC,SAAS;oBAClB,QAAQ,CAAC,WAAW;oBACpB,QAAQ,CAAC,wBAAwB;oBACjC,QAAQ,CAAC,aAAa;oBACtB,QAAQ,CAAC,iBAAiB;oBAC1B,QAAQ,CAAC,sBAAsB;oBAC/B,QAAQ,CAAC,SAAS;iBACnB,CACF,CAAC;gBAEF,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAG,EAAE,QAAQ,CAAC,EAAG,CAAC,CAAC;YAC5C,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -12,9 +12,7 @@
|
|
|
12
12
|
* @see packages/server/src/__tests__/helpers/fixture-validation.ts for validation logic
|
|
13
13
|
* @see packages/server/src/__tests__/helpers/fixture-loader.ts for insertion logic
|
|
14
14
|
*/
|
|
15
|
-
import type { ChargeInsertParams } from '../factories/
|
|
16
|
-
import type { TransactionInsertParams } from '../factories/transaction.js';
|
|
17
|
-
import type { DocumentInsertParams } from '../factories/document.js';
|
|
15
|
+
import type { ChargeInsertParams, TransactionInsertParams, DocumentInsertParams } from '../factories/index.js';
|
|
18
16
|
import type { financial_account_type } from '../../modules/transactions/types.js';
|
|
19
17
|
/**
|
|
20
18
|
* Business entities in a fixture
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import accountantApproval from './typeDefs/accountant-approval.graphql.js';
|
|
1
2
|
import { createModule } from 'graphql-modules';
|
|
2
3
|
import { accountantApprovalResolvers } from './resolvers/accountant-approval.resolver.js';
|
|
3
|
-
import accountantApproval from './typeDefs/accountant-approval.graphql.js';
|
|
4
4
|
const __dirname = new URL('.', import.meta.url).pathname;
|
|
5
5
|
export const accountantApprovalModule = createModule({
|
|
6
6
|
id: 'accountantApproval',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/accountant-approval/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,2BAA2B,EAAE,MAAM,6CAA6C,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/accountant-approval/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,2BAA2B,EAAE,MAAM,6CAA6C,CAAC;AAE1F,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC;AAEzD,MAAM,CAAC,MAAM,wBAAwB,GAAG,YAAY,CAAC;IACnD,EAAE,EAAE,oBAAoB;IACxB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,CAAC,kBAAkB,CAAC;IAC9B,SAAS,EAAE,CAAC,2BAA2B,CAAC;CACzC,CAAC,CAAC;AAEH,OAAO,KAAK,uBAAuB,MAAM,YAAY,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import adminContext from './typeDefs/admin-context.graphql.js';
|
|
1
2
|
import { createModule } from 'graphql-modules';
|
|
2
3
|
import { AdminContextProvider } from './providers/admin-context.provider.js';
|
|
3
4
|
import { adminContextResolvers } from './resolvers/admin-context.resolvers.js';
|
|
4
|
-
import adminContext from './typeDefs/admin-context.graphql.js';
|
|
5
5
|
const __dirname = new URL('.', import.meta.url).pathname;
|
|
6
6
|
export const adminContextModule = createModule({
|
|
7
7
|
id: 'adminContext',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/admin-context/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/admin-context/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,qCAAqC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAE/E,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC;AAEzD,MAAM,CAAC,MAAM,kBAAkB,GAAG,YAAY,CAAC;IAC7C,EAAE,EAAE,cAAc;IAClB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,CAAC,YAAY,CAAC;IACxB,SAAS,EAAE,CAAC,qBAAqB,CAAC;IAClC,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC,oBAAoB,CAAC;CACxC,CAAC,CAAC;AAEH,OAAO,KAAK,iBAAiB,MAAM,YAAY,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import bankDeposits from './typeDefs/bank-deposits.graphql.js';
|
|
1
2
|
import { createModule } from 'graphql-modules';
|
|
2
3
|
import { BankDepositTransactionsProvider } from './providers/bank-deposit-transactions.provider.js';
|
|
3
4
|
import { bankDepositTransactionsResolvers } from './resolvers/bank-deposit-transactions.resolver.js';
|
|
4
|
-
import bankDeposits from './typeDefs/bank-deposits.graphql.js';
|
|
5
5
|
const __dirname = new URL('.', import.meta.url).pathname;
|
|
6
6
|
export const bankDepositsModule = createModule({
|
|
7
7
|
id: 'bankDeposits',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/bank-deposits/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,+BAA+B,EAAE,MAAM,mDAAmD,CAAC;AACpG,OAAO,EAAE,gCAAgC,EAAE,MAAM,mDAAmD,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/bank-deposits/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,qCAAqC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,+BAA+B,EAAE,MAAM,mDAAmD,CAAC;AACpG,OAAO,EAAE,gCAAgC,EAAE,MAAM,mDAAmD,CAAC;AAErG,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC;AAEzD,MAAM,CAAC,MAAM,kBAAkB,GAAG,YAAY,CAAC;IAC7C,EAAE,EAAE,cAAc;IAClB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,CAAC,YAAY,CAAC;IACxB,SAAS,EAAE,CAAC,gCAAgC,CAAC;IAC7C,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC,+BAA+B,CAAC;CACnD,CAAC,CAAC;AAEH,OAAO,KAAK,iBAAiB,MAAM,YAAY,CAAC"}
|