@accounter/server 0.0.8-alpha-20251029233737-ec3a7806df63c8556b232ea893d0d3855d2c402a → 0.0.8-alpha-20251029234818-bb69914cb7aaa4859296baa4a256c251158fd15b

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.
Files changed (31) hide show
  1. package/CHANGELOG.md +20 -26
  2. package/dist/green-invoice-graphql/src/mesh-artifacts/index.d.ts +1 -1
  3. package/dist/server/src/__generated__/types.d.ts +70 -18
  4. package/dist/server/src/__generated__/types.js.map +1 -1
  5. package/dist/server/src/modules/contracts/__generated__/contracts.types.d.ts +5 -0
  6. package/dist/server/src/modules/financial-entities/__generated__/admin-businesses.types.d.ts +57 -0
  7. package/dist/server/src/modules/financial-entities/__generated__/admin-businesses.types.js +0 -1
  8. package/dist/server/src/modules/financial-entities/__generated__/admin-businesses.types.js.map +1 -1
  9. package/dist/server/src/modules/financial-entities/__generated__/types.d.ts +33 -10
  10. package/dist/server/src/modules/financial-entities/__generated__/types.js.map +1 -1
  11. package/dist/server/src/modules/financial-entities/helpers/admin-businesses.helper.d.ts +31 -0
  12. package/dist/server/src/modules/financial-entities/helpers/admin-businesses.helper.js +27 -0
  13. package/dist/server/src/modules/financial-entities/helpers/admin-businesses.helper.js.map +1 -0
  14. package/dist/server/src/modules/financial-entities/providers/admin-businesses.provider.d.ts +2 -1
  15. package/dist/server/src/modules/financial-entities/providers/admin-businesses.provider.js +37 -0
  16. package/dist/server/src/modules/financial-entities/providers/admin-businesses.provider.js.map +1 -1
  17. package/dist/server/src/modules/financial-entities/resolvers/admin-businesses.resolver.js +46 -11
  18. package/dist/server/src/modules/financial-entities/resolvers/admin-businesses.resolver.js.map +1 -1
  19. package/dist/server/src/modules/financial-entities/typeDefs/admin-businesses.graphql.js +49 -16
  20. package/dist/server/src/modules/financial-entities/typeDefs/admin-businesses.graphql.js.map +1 -1
  21. package/dist/server/src/modules/financial-entities/types.d.ts +1 -1
  22. package/package.json +4 -4
  23. package/src/__generated__/types.ts +76 -18
  24. package/src/modules/contracts/__generated__/contracts.types.ts +5 -0
  25. package/src/modules/financial-entities/__generated__/admin-businesses.types.ts +60 -0
  26. package/src/modules/financial-entities/__generated__/types.ts +33 -10
  27. package/src/modules/financial-entities/helpers/admin-businesses.helper.ts +33 -0
  28. package/src/modules/financial-entities/providers/admin-businesses.provider.ts +44 -0
  29. package/src/modules/financial-entities/resolvers/admin-businesses.resolver.ts +53 -11
  30. package/src/modules/financial-entities/typeDefs/admin-businesses.graphql.ts +49 -16
  31. package/src/modules/financial-entities/types.ts +1 -1
@@ -4,6 +4,7 @@ import { Injectable, Scope } from 'graphql-modules';
4
4
  import { DBProvider } from '../../app-providers/db.provider.js';
5
5
  import { sql } from '@pgtyped/runtime';
6
6
  import { getCacheInstance } from '../../../shared/helpers/index.js';
7
+ import { adminBusinessUpdateSchema } from '../helpers/admin-businesses.helper.js';
7
8
  const getAdminBusinessesByIds = sql `
8
9
  SELECT ab.*, f.name, b.vat_number
9
10
  FROM accounter_schema.businesses_admin ab
@@ -21,6 +22,36 @@ const getAllAdminBusinesses = sql `
21
22
  USING (id)
22
23
  INNER JOIN accounter_schema.financial_entities fe
23
24
  USING (id);`;
25
+ const updateAdminBusinesses = sql `
26
+ UPDATE accounter_schema.businesses_admin
27
+ SET
28
+ business_registration_start_date = COALESCE(
29
+ $businessRegistrationStartDate,
30
+ business_registration_start_date
31
+ ),
32
+ company_tax_id = COALESCE(
33
+ $companyTaxId,
34
+ company_tax_id
35
+ ),
36
+ advance_tax_rates = COALESCE(
37
+ $advanceTaxRates,
38
+ advance_tax_rates
39
+ ),
40
+ tax_advances_ids = COALESCE(
41
+ $taxAdvancesIds,
42
+ tax_advances_ids
43
+ ),
44
+ social_security_employer_ids = COALESCE(
45
+ $socialSecurityEmployerIds,
46
+ social_security_employer_ids
47
+ ),
48
+ withholding_tax_annual_ids = COALESCE(
49
+ $withholdingTaxAnnualIds,
50
+ withholding_tax_annual_ids
51
+ )
52
+ WHERE
53
+ id = $id
54
+ RETURNING *;`;
24
55
  let AdminBusinessesProvider = class AdminBusinessesProvider {
25
56
  dbProvider;
26
57
  cache = getCacheInstance({
@@ -50,6 +81,12 @@ let AdminBusinessesProvider = class AdminBusinessesProvider {
50
81
  return result;
51
82
  });
52
83
  }
84
+ async updateAdminBusiness(params) {
85
+ const inputParams = adminBusinessUpdateSchema.parse(params);
86
+ const [result] = await updateAdminBusinesses.run(inputParams, this.dbProvider);
87
+ this.clearCache();
88
+ return result;
89
+ }
53
90
  clearCache() {
54
91
  this.cache.clear();
55
92
  }
@@ -1 +1 @@
1
- {"version":3,"file":"admin-businesses.provider.js","sourceRoot":"","sources":["../../../../../../src/modules/financial-entities/providers/admin-businesses.provider.ts"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAOnD,MAAM,uBAAuB,GAAG,GAAG,CAA+B;;;;;;;0BAOxC,CAAC;AAE3B,MAAM,qBAAqB,GAAG,GAAG,CAA6B;;;;;;;;kBAQ5C,CAAC;AAMZ,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAKd;IAJpB,KAAK,GAAG,gBAAgB,CAAC;QACvB,MAAM,EAAE,EAAE,GAAG,CAAC;KACf,CAAC,CAAC;IAEH,YAAoB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAEtC,KAAK,CAAC,yBAAyB,CAAC,GAAsB;QAC5D,MAAM,SAAS,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QACpC,MAAM,eAAe,GAAG,MAAM,uBAAuB,CAAC,GAAG,CACvD;YACE,GAAG,EAAE,SAAS;SACf,EACD,IAAI,CAAC,UAAU,CAChB,CAAC;QACF,OAAO,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IACvE,CAAC;IAEM,0BAA0B,GAAG,IAAI,UAAU,CAChD,CAAC,GAAsB,EAAE,EAAE,CAAC,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,EAC/D;QACE,UAAU,EAAE,EAAE,CAAC,EAAE,CAAC,kBAAkB,EAAE,EAAE;QACxC,QAAQ,EAAE,IAAI,CAAC,KAAK;KACrB,CACF,CAAC;IAEK,qBAAqB;QAC1B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAiC,sBAAsB,CAAC,CAAC;QACpF,IAAI,IAAI,EAAE,CAAC;YACT,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC;QACD,OAAO,qBAAqB,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;YACzE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAC;YAC/C,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC;IAEM,UAAU;QACf,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;CACF,CAAA;AAxCY,uBAAuB;IAJnC,UAAU,CAAC;QACV,KAAK,EAAE,KAAK,CAAC,SAAS;QACtB,MAAM,EAAE,IAAI;KACb,CAAC;qCAMgC,UAAU;GAL/B,uBAAuB,CAwCnC"}
1
+ {"version":3,"file":"admin-businesses.provider.js","sourceRoot":"","sources":["../../../../../../src/modules/financial-entities/providers/admin-businesses.provider.ts"],"names":[],"mappings":";A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AC,EAC/D;QACE,UAAU,EAAE,EAAE,CAAC,EAAE,CAAC,kBAAkB,EAAE,EAAE;QACxC,QAAQ,EAAE,IAAI,CAAC,KAAK;KACrB,CACF,CAAC;IAEK,qBAAqB;QAC1B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAiC,sBAAsB,CAAC,CAAC;QACpF,IAAI,IAAI,EAAE,CAAC;YACT,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC;QACD,OAAO,qBAAqB,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;YACzE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAC;YAC/C,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,mBAAmB,CAC9B,MAAoC;QAEpC,MAAM,WAAW,GAAG,yBAAyB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC5D,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,qBAAqB,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAC/E,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,OAAO,MAAM,CAAC;IAChB,CAAC;IAEM,UAAU;QACf,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;CACF,CAAA;AAjDY,uBAAuB;IAJnC,UAAU,CAAC;QACV,KAAK,EAAE,KAAK,CAAC,SAAS;QACtB,MAAM,EAAE,IAAI;KACb,CAAC;qCAMgC,UAAU;GAL/B,uBAAuB,CAiDnC"}
@@ -1,5 +1,6 @@
1
1
  import { GraphQLError } from 'graphql';
2
2
  import { dateToTimelessDateString } from '../../../shared/helpers/index.js';
3
+ import { taxAdvancesRatesSchema, yearlyIdsSchema } from '../helpers/admin-businesses.helper.js';
3
4
  import { AdminBusinessesProvider } from '../providers/admin-businesses.provider.js';
4
5
  import { BusinessesProvider } from '../providers/businesses.provider.js';
5
6
  export const adminBusinessesResolvers = {
@@ -18,6 +19,39 @@ export const adminBusinessesResolvers = {
18
19
  return adminBusinesses;
19
20
  },
20
21
  },
22
+ Mutation: {
23
+ updateAdminBusiness: async (_, { businessId, fields }, { injector }) => {
24
+ try {
25
+ await injector.get(AdminBusinessesProvider).updateAdminBusiness({
26
+ id: businessId,
27
+ businessRegistrationStartDate: fields.registrationDate,
28
+ companyTaxId: fields.withholdingTaxCompanyId,
29
+ taxAdvancesIds: fields.taxAdvancesAnnualIds
30
+ ? [...fields.taxAdvancesAnnualIds]
31
+ : undefined,
32
+ advanceTaxRates: fields.taxAdvancesRates ? [...fields.taxAdvancesRates] : undefined,
33
+ withholdingTaxAnnualIds: fields.withholdingTaxAnnualIds
34
+ ? [...fields.withholdingTaxAnnualIds]
35
+ : undefined,
36
+ socialSecurityEmployerIds: fields.socialSecurityEmployerIds
37
+ ? [...fields.socialSecurityEmployerIds]
38
+ : undefined,
39
+ });
40
+ const updatedAdminBusiness = await injector
41
+ .get(AdminBusinessesProvider)
42
+ .getAdminBusinessByIdLoader.load(businessId);
43
+ if (!updatedAdminBusiness) {
44
+ throw new GraphQLError(`Error updating Admin business ID="${businessId}"`);
45
+ }
46
+ return updatedAdminBusiness;
47
+ }
48
+ catch (error) {
49
+ const message = `Error updating Admin business ID="${businessId}"`;
50
+ console.error(message, error);
51
+ throw new GraphQLError(message);
52
+ }
53
+ },
54
+ },
21
55
  AdminBusiness: {
22
56
  id: admin => admin.id,
23
57
  name: admin => admin.name,
@@ -27,6 +61,12 @@ export const adminBusinessesResolvers = {
27
61
  }
28
62
  return admin.vat_number;
29
63
  },
64
+ registrationDate: admin => {
65
+ if (!admin.registration_date) {
66
+ throw new GraphQLError(`Admin business ID="${admin.id}" has no registration date`);
67
+ }
68
+ return dateToTimelessDateString(admin.registration_date);
69
+ },
30
70
  business: async (admin, _, { injector }) => {
31
71
  const business = await injector.get(BusinessesProvider).getBusinessByIdLoader.load(admin.id);
32
72
  if (!business) {
@@ -34,17 +74,12 @@ export const adminBusinessesResolvers = {
34
74
  }
35
75
  return business;
36
76
  },
37
- withholdingTaxBookNumber: admin => admin.tax_nikuim_pinkas_number,
38
- withholdingTaxFileNumber: admin => admin.nikuim,
39
- socialSecurityEmployerId: admin => admin.pinkas_social_security_2022,
40
- taxAdvancesRate: admin => admin.advance_tax_rate,
41
- taxAdvancesId: admin => admin.tax_siduri_number_2022,
42
- registrationDate: admin => {
43
- if (!admin.registration_date) {
44
- throw new GraphQLError(`Admin business ID="${admin.id}" has no registration date`);
45
- }
46
- return dateToTimelessDateString(admin.registration_date);
47
- },
77
+ taxAdvancesAnnualIds: admin => yearlyIdsSchema.parse(admin.tax_advances_ids),
78
+ taxAdvancesRates: admin => taxAdvancesRatesSchema.parse(admin.advance_tax_rates),
79
+ withholdingTaxCompanyId: admin => admin.company_tax_id,
80
+ withholdingTaxAnnualIds: admin => yearlyIdsSchema.parse(admin.withholding_tax_annual_ids),
81
+ socialSecurityDeductionsId: admin => `${admin.company_tax_id}00`,
82
+ socialSecurityEmployerIds: admin => yearlyIdsSchema.parse(admin.social_security_employer_ids),
48
83
  },
49
84
  LtdFinancialEntity: {
50
85
  adminInfo: async (parentBusiness, _, { injector }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"admin-businesses.resolver.js","sourceRoot":"","sources":["../../../../../../src/modules/financial-entities/resolvers/admin-businesses.resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAGzE,MAAM,CAAC,MAAM,wBAAwB,GAAsC;IACzE,KAAK,EAAE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AY,CAAC,gBAAgB,KAAK,CAAC,EAAE,aAAa,CAAC,CAAC;YAChE,CAAC;YACD,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,wBAAwB;QACjE,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM;QAC/C,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,2BAA2B;QACpE,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,gBAAgB;QAChD,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,sBAAsB;QACpD,gBAAgB,EAAE,KAAK,CAAC,EAAE;YACxB,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE,CAAC;gBAC7B,MAAM,IAAI,YAAY,CAAC,sBAAsB,KAAK,CAAC,EAAE,4BAA4B,CAAC,CAAC;YACrF,CAAC;YACD,OAAO,wBAAwB,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAC3D,CAAC;KACF;IACD,kBAAkB,EAAE;QAClB,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YACnD,MAAM,aAAa,GAAG,MAAM,QAAQ;iBACjC,GAAG,CAAC,uBAAuB,CAAC;iBAC5B,0BAA0B,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;YAEtD,OAAO,aAAa,IAAI,IAAI,CAAC;QAC/B,CAAC;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"admin-businesses.resolver.js","sourceRoot":"","sources":["../../../../../../src/modules/financial-entities/resolvers/admin-businesses.resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EAAE,sBAAsB,EAAE,eAAe,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cAAc,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YACnD,MAAM,aAAa,GAAG,MAAM,QAAQ;iBACjC,GAAG,CAAC,uBAAuB,CAAC;iBAC5B,0BAA0B,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;YAEtD,OAAO,aAAa,IAAI,IAAI,CAAC;QAC/B,CAAC;KACF;CACF,CAAC"}
@@ -18,34 +18,67 @@ export default gql `
18
18
  id: UUID!
19
19
  name: String!
20
20
  governmentId: String!
21
- business: LtdFinancialEntity!
22
- withholdingTaxBookNumber: String
23
- withholdingTaxFileNumber: String
24
- socialSecurityEmployerId: String
25
- taxAdvancesRate: Float
26
- taxAdvancesId: String
27
21
  registrationDate: TimelessDate!
22
+ business: LtdFinancialEntity!
23
+ " Tax Advances Info "
24
+ taxAdvancesAnnualIds: [AnnualId!]!
25
+ taxAdvancesRates: [TaxAdvancesRate!]!
26
+ " Withholding Tax Info "
27
+ withholdingTaxCompanyId: String
28
+ withholdingTaxAnnualIds: [AnnualId!]!
29
+ " Social Security Info "
30
+ socialSecurityDeductionsId: String
31
+ socialSecurityEmployerIds: [AnnualId!]!
32
+ }
33
+
34
+ " Represents an annual identifier for tax purposes. "
35
+ type AnnualId {
36
+ year: Int!
37
+ id: String!
38
+ }
39
+
40
+ " Represents the tax advance rate for a specific date. "
41
+ type TaxAdvancesRate {
42
+ date: TimelessDate!
43
+ rate: Float!
28
44
  }
29
45
 
30
46
  " Input type for creating a new admin business. "
31
47
  input CreateAdminBusinessInput {
32
48
  businessId: UUID!
33
- withholdingTaxBookNumber: String
34
- withholdingTaxFileNumber: String
35
- socialSecurityEmployerId: String
36
- taxAdvancesRate: Float
37
- taxAdvancesId: String
38
49
  registrationDate: TimelessDate!
50
+ companyTaxId: String!
51
+ taxAdvancesAnnualId: String
52
+ taxAdvancesRate: Float
53
+ withholdingTaxAnnualId: String
54
+ socialSecurityEmployerId: String
39
55
  }
40
56
 
41
57
  " Input type for updating admin business details. "
42
58
  input UpdateAdminBusinessInput {
43
- withholdingTaxBookNumber: String
44
- withholdingTaxFileNumber: String
45
- socialSecurityEmployerId: String
46
- taxAdvancesRate: Float
47
- taxAdvancesId: String
59
+ name: String
60
+ governmentId: String
48
61
  registrationDate: TimelessDate
62
+ " Tax Advances Info "
63
+ taxAdvancesAnnualIds: [AnnualIdInput!]
64
+ taxAdvancesRates: [TaxAdvancesRateInput!]
65
+ " Withholding Tax Info "
66
+ withholdingTaxCompanyId: String
67
+ withholdingTaxAnnualIds: [AnnualIdInput!]
68
+ " Social Security Info "
69
+ socialSecurityEmployerIds: [AnnualIdInput!]
70
+ }
71
+
72
+ " Input type representing an annual identifier for tax purposes. "
73
+ input AnnualIdInput {
74
+ year: Int!
75
+ id: String!
76
+ }
77
+
78
+ " Input type representing the tax advance rate for a specific date. "
79
+ input TaxAdvancesRateInput {
80
+ date: TimelessDate!
81
+ rate: Float!
49
82
  }
50
83
 
51
84
  extend type LtdFinancialEntity {
@@ -1 +1 @@
1
- {"version":3,"file":"admin-businesses.graphql.js","sourceRoot":"","sources":["../../../../../../src/modules/financial-entities/typeDefs/admin-businesses.graphql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDjB,CAAC"}
1
+ {"version":3,"file":"admin-businesses.graphql.js","sourceRoot":"","sources":["../../../../../../src/modules/financial-entities/typeDefs/admin-businesses.graphql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqFjB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export * from './__generated__/types.js';
2
- export type { Json, pcn874_record_type } from './__generated__/businesses.types.js';
2
+ export type { Json, pcn874_record_type, DateOrString } from './__generated__/businesses.types.js';
3
3
  export * from './__generated__/businesses.types.js';
4
4
  export * from './__generated__/businesses-operation.types.js';
5
5
  export * from './__generated__/admin-businesses.types.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@accounter/server",
3
- "version": "0.0.8-alpha-20251029233737-ec3a7806df63c8556b232ea893d0d3855d2c402a",
3
+ "version": "0.0.8-alpha-20251029234818-bb69914cb7aaa4859296baa4a256c251158fd15b",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "license": "MIT",
@@ -23,7 +23,7 @@
23
23
  "@accounter/shaam-uniform-format-generator": "workspace:^",
24
24
  "@accounter/shaam6111-generator": "workspace:^",
25
25
  "@ai-sdk/anthropic": "2.0.38",
26
- "@envelop/generic-auth": "10.0.1",
26
+ "@envelop/generic-auth": "10.0.0",
27
27
  "@envelop/graphql-modules": "8.0.0",
28
28
  "@google-cloud/pubsub": "5.2.0",
29
29
  "@graphql-hive/yoga": "0.42.2",
@@ -38,7 +38,7 @@
38
38
  "dataloader": "2.2.3",
39
39
  "date-fns": "4.1.0",
40
40
  "dotenv": "17.2.3",
41
- "dotenv-cli": "11.0.0",
41
+ "dotenv-cli": "10.0.0",
42
42
  "googleapis": "164.1.0",
43
43
  "graphql": "16.11.0",
44
44
  "graphql-modules": "3.0.0",
@@ -48,7 +48,7 @@
48
48
  "node-cache": "5.1.2",
49
49
  "node-xlsx": "0.24.0",
50
50
  "pg": "8.16.3",
51
- "puppeteer": "24.27.0",
51
+ "puppeteer": "24.26.1",
52
52
  "reflect-metadata": "0.2.2",
53
53
  "strip-indent": "4.1.1",
54
54
  "zod": "4.1.12"
@@ -148,11 +148,15 @@ export type AdminBusiness = {
148
148
  readonly id: Scalars['UUID']['output'];
149
149
  readonly name: Scalars['String']['output'];
150
150
  readonly registrationDate: Scalars['TimelessDate']['output'];
151
- readonly socialSecurityEmployerId?: Maybe<Scalars['String']['output']>;
152
- readonly taxAdvancesId?: Maybe<Scalars['String']['output']>;
153
- readonly taxAdvancesRate?: Maybe<Scalars['Float']['output']>;
154
- readonly withholdingTaxBookNumber?: Maybe<Scalars['String']['output']>;
155
- readonly withholdingTaxFileNumber?: Maybe<Scalars['String']['output']>;
151
+ /** Social Security Info */
152
+ readonly socialSecurityDeductionsId?: Maybe<Scalars['String']['output']>;
153
+ readonly socialSecurityEmployerIds: ReadonlyArray<AnnualId>;
154
+ /** Tax Advances Info */
155
+ readonly taxAdvancesAnnualIds: ReadonlyArray<AnnualId>;
156
+ readonly taxAdvancesRates: ReadonlyArray<TaxAdvancesRate>;
157
+ readonly withholdingTaxAnnualIds: ReadonlyArray<AnnualId>;
158
+ /** Withholding Tax Info */
159
+ readonly withholdingTaxCompanyId?: Maybe<Scalars['String']['output']>;
156
160
  };
157
161
 
158
162
  /** defines a tag / category for charge arrangement */
@@ -289,6 +293,19 @@ export type AdminContextInput = {
289
293
  readonly zkufotIncomeTaxCategoryId?: InputMaybe<Scalars['UUID']['input']>;
290
294
  };
291
295
 
296
+ /** Represents an annual identifier for tax purposes. */
297
+ export type AnnualId = {
298
+ readonly __typename?: 'AnnualId';
299
+ readonly id: Scalars['String']['output'];
300
+ readonly year: Scalars['Int']['output'];
301
+ };
302
+
303
+ /** Input type representing an annual identifier for tax purposes. */
304
+ export type AnnualIdInput = {
305
+ readonly id: Scalars['String']['input'];
306
+ readonly year: Scalars['Int']['input'];
307
+ };
308
+
292
309
  /** Audit opinion type enum (חוות דעת) */
293
310
  export type AuditOpinionType =
294
311
  /** Adverse opinion (שלילית) */
@@ -1148,12 +1165,12 @@ export type Country = {
1148
1165
  /** Input type for creating a new admin business. */
1149
1166
  export type CreateAdminBusinessInput = {
1150
1167
  readonly businessId: Scalars['UUID']['input'];
1168
+ readonly companyTaxId: Scalars['String']['input'];
1151
1169
  readonly registrationDate: Scalars['TimelessDate']['input'];
1152
1170
  readonly socialSecurityEmployerId?: InputMaybe<Scalars['String']['input']>;
1153
- readonly taxAdvancesId?: InputMaybe<Scalars['String']['input']>;
1171
+ readonly taxAdvancesAnnualId?: InputMaybe<Scalars['String']['input']>;
1154
1172
  readonly taxAdvancesRate?: InputMaybe<Scalars['Float']['input']>;
1155
- readonly withholdingTaxBookNumber?: InputMaybe<Scalars['String']['input']>;
1156
- readonly withholdingTaxFileNumber?: InputMaybe<Scalars['String']['input']>;
1173
+ readonly withholdingTaxAnnualId?: InputMaybe<Scalars['String']['input']>;
1157
1174
  };
1158
1175
 
1159
1176
  /** input for creating a new contract */
@@ -4373,6 +4390,19 @@ export type TagInput = {
4373
4390
  readonly id: Scalars['String']['input'];
4374
4391
  };
4375
4392
 
4393
+ /** Represents the tax advance rate for a specific date. */
4394
+ export type TaxAdvancesRate = {
4395
+ readonly __typename?: 'TaxAdvancesRate';
4396
+ readonly date: Scalars['TimelessDate']['output'];
4397
+ readonly rate: Scalars['Float']['output'];
4398
+ };
4399
+
4400
+ /** Input type representing the tax advance rate for a specific date. */
4401
+ export type TaxAdvancesRateInput = {
4402
+ readonly date: Scalars['TimelessDate']['input'];
4403
+ readonly rate: Scalars['Float']['input'];
4404
+ };
4405
+
4376
4406
  /** Tax category entity used for ledger records */
4377
4407
  export type TaxCategory = FinancialEntity & {
4378
4408
  readonly __typename?: 'TaxCategory';
@@ -4497,12 +4527,17 @@ export type Unprocessed = Document & Linkable & {
4497
4527
 
4498
4528
  /** Input type for updating admin business details. */
4499
4529
  export type UpdateAdminBusinessInput = {
4530
+ readonly governmentId?: InputMaybe<Scalars['String']['input']>;
4531
+ readonly name?: InputMaybe<Scalars['String']['input']>;
4500
4532
  readonly registrationDate?: InputMaybe<Scalars['TimelessDate']['input']>;
4501
- readonly socialSecurityEmployerId?: InputMaybe<Scalars['String']['input']>;
4502
- readonly taxAdvancesId?: InputMaybe<Scalars['String']['input']>;
4503
- readonly taxAdvancesRate?: InputMaybe<Scalars['Float']['input']>;
4504
- readonly withholdingTaxBookNumber?: InputMaybe<Scalars['String']['input']>;
4505
- readonly withholdingTaxFileNumber?: InputMaybe<Scalars['String']['input']>;
4533
+ /** Social Security Info */
4534
+ readonly socialSecurityEmployerIds?: InputMaybe<ReadonlyArray<AnnualIdInput>>;
4535
+ /** Tax Advances Info */
4536
+ readonly taxAdvancesAnnualIds?: InputMaybe<ReadonlyArray<AnnualIdInput>>;
4537
+ readonly taxAdvancesRates?: InputMaybe<ReadonlyArray<TaxAdvancesRateInput>>;
4538
+ readonly withholdingTaxAnnualIds?: InputMaybe<ReadonlyArray<AnnualIdInput>>;
4539
+ /** Withholding Tax Info */
4540
+ readonly withholdingTaxCompanyId?: InputMaybe<Scalars['String']['input']>;
4506
4541
  };
4507
4542
 
4508
4543
  /** input for updateBusiness */
@@ -5000,6 +5035,8 @@ export type ResolversTypes = {
5000
5035
  AdminBusiness: ResolverTypeWrapper<IGetAllAdminBusinessesResult>;
5001
5036
  AdminContext: ResolverTypeWrapper<IGetAdminContextsResult>;
5002
5037
  AdminContextInput: AdminContextInput;
5038
+ AnnualId: ResolverTypeWrapper<AnnualId>;
5039
+ AnnualIdInput: AnnualIdInput;
5003
5040
  AuditOpinionType: AuditOpinionType;
5004
5041
  BalanceTransactions: ResolverTypeWrapper<IGetNormalizedBalanceTransactionsResult>;
5005
5042
  BankDeposit: ResolverTypeWrapper<Omit<BankDeposit, 'transactions'> & { transactions: ReadonlyArray<ResolversTypes['Transaction']> }>;
@@ -5216,6 +5253,8 @@ export type ResolversTypes = {
5216
5253
  SuggestionsInput: SuggestionsInput;
5217
5254
  Tag: ResolverTypeWrapper<IGetAllTagsResult>;
5218
5255
  TagInput: TagInput;
5256
+ TaxAdvancesRate: ResolverTypeWrapper<TaxAdvancesRate>;
5257
+ TaxAdvancesRateInput: TaxAdvancesRateInput;
5219
5258
  TaxCategory: ResolverTypeWrapper<IGetAllTaxCategoriesResult>;
5220
5259
  TaxReport: ResolverTypeWrapper<Omit<TaxReport, 'reference' | 'report'> & { reference: ReadonlyArray<ResolversTypes['TaxReportYear']>, report: ResolversTypes['TaxReportYear'] }>;
5221
5260
  TaxReportYear: ResolverTypeWrapper<TaxReportYearProto>;
@@ -5287,6 +5326,8 @@ export type ResolversParentTypes = {
5287
5326
  AdminBusiness: IGetAllAdminBusinessesResult;
5288
5327
  AdminContext: IGetAdminContextsResult;
5289
5328
  AdminContextInput: AdminContextInput;
5329
+ AnnualId: AnnualId;
5330
+ AnnualIdInput: AnnualIdInput;
5290
5331
  BalanceTransactions: IGetNormalizedBalanceTransactionsResult;
5291
5332
  BankDeposit: Omit<BankDeposit, 'transactions'> & { transactions: ReadonlyArray<ResolversParentTypes['Transaction']> };
5292
5333
  BankDepositCharge: IGetChargesByIdsResult;
@@ -5468,6 +5509,8 @@ export type ResolversParentTypes = {
5468
5509
  SuggestionsInput: SuggestionsInput;
5469
5510
  Tag: IGetAllTagsResult;
5470
5511
  TagInput: TagInput;
5512
+ TaxAdvancesRate: TaxAdvancesRate;
5513
+ TaxAdvancesRateInput: TaxAdvancesRateInput;
5471
5514
  TaxCategory: IGetAllTaxCategoriesResult;
5472
5515
  TaxReport: Omit<TaxReport, 'reference' | 'report'> & { reference: ReadonlyArray<ResolversParentTypes['TaxReportYear']>, report: ResolversParentTypes['TaxReportYear'] };
5473
5516
  TaxReportYear: TaxReportYearProto;
@@ -5548,11 +5591,12 @@ export type AdminBusinessResolvers<ContextType = GraphQLModules.Context, ParentT
5548
5591
  id?: Resolver<ResolversTypes['UUID'], ParentType, ContextType>;
5549
5592
  name?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
5550
5593
  registrationDate?: Resolver<ResolversTypes['TimelessDate'], ParentType, ContextType>;
5551
- socialSecurityEmployerId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
5552
- taxAdvancesId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
5553
- taxAdvancesRate?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
5554
- withholdingTaxBookNumber?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
5555
- withholdingTaxFileNumber?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
5594
+ socialSecurityDeductionsId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
5595
+ socialSecurityEmployerIds?: Resolver<ReadonlyArray<ResolversTypes['AnnualId']>, ParentType, ContextType>;
5596
+ taxAdvancesAnnualIds?: Resolver<ReadonlyArray<ResolversTypes['AnnualId']>, ParentType, ContextType>;
5597
+ taxAdvancesRates?: Resolver<ReadonlyArray<ResolversTypes['TaxAdvancesRate']>, ParentType, ContextType>;
5598
+ withholdingTaxAnnualIds?: Resolver<ReadonlyArray<ResolversTypes['AnnualId']>, ParentType, ContextType>;
5599
+ withholdingTaxCompanyId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
5556
5600
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
5557
5601
  };
5558
5602
 
@@ -5623,6 +5667,12 @@ export type AdminContextResolvers<ContextType = GraphQLModules.Context, ParentTy
5623
5667
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
5624
5668
  };
5625
5669
 
5670
+ export type AnnualIdResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['AnnualId'] = ResolversParentTypes['AnnualId']> = {
5671
+ id?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
5672
+ year?: Resolver<ResolversTypes['Int'], ParentType, ContextType>;
5673
+ __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
5674
+ };
5675
+
5626
5676
  export type BalanceTransactionsResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['BalanceTransactions'] = ResolversParentTypes['BalanceTransactions']> = {
5627
5677
  amount?: Resolver<ResolversTypes['FinancialAmount'], ParentType, ContextType>;
5628
5678
  amountUsd?: Resolver<ResolversTypes['FinancialAmount'], ParentType, ContextType>;
@@ -7530,6 +7580,12 @@ export type TagResolvers<ContextType = GraphQLModules.Context, ParentType extend
7530
7580
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
7531
7581
  };
7532
7582
 
7583
+ export type TaxAdvancesRateResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['TaxAdvancesRate'] = ResolversParentTypes['TaxAdvancesRate']> = {
7584
+ date?: Resolver<ResolversTypes['TimelessDate'], ParentType, ContextType>;
7585
+ rate?: Resolver<ResolversTypes['Float'], ParentType, ContextType>;
7586
+ __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
7587
+ };
7588
+
7533
7589
  export type TaxCategoryResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['TaxCategory'] = ResolversParentTypes['TaxCategory']> = {
7534
7590
  createdAt?: Resolver<ResolversTypes['DateTime'], ParentType, ContextType>;
7535
7591
  id?: Resolver<ResolversTypes['UUID'], ParentType, ContextType>;
@@ -7798,6 +7854,7 @@ export type YearlyLedgerReportFinancialEntityInfoResolvers<ContextType = GraphQL
7798
7854
  export type Resolvers<ContextType = GraphQLModules.Context> = {
7799
7855
  AdminBusiness?: AdminBusinessResolvers<ContextType>;
7800
7856
  AdminContext?: AdminContextResolvers<ContextType>;
7857
+ AnnualId?: AnnualIdResolvers<ContextType>;
7801
7858
  BalanceTransactions?: BalanceTransactionsResolvers<ContextType>;
7802
7859
  BankDeposit?: BankDepositResolvers<ContextType>;
7803
7860
  BankDepositCharge?: BankDepositChargeResolvers<ContextType>;
@@ -7943,6 +8000,7 @@ export type Resolvers<ContextType = GraphQLModules.Context> = {
7943
8000
  Suggestions?: SuggestionsResolvers<ContextType>;
7944
8001
  SuggestionsEmailListenerConfig?: SuggestionsEmailListenerConfigResolvers<ContextType>;
7945
8002
  Tag?: TagResolvers<ContextType>;
8003
+ TaxAdvancesRate?: TaxAdvancesRateResolvers<ContextType>;
7946
8004
  TaxCategory?: TaxCategoryResolvers<ContextType>;
7947
8005
  TaxReport?: TaxReportResolvers<ContextType>;
7948
8006
  TaxReportYear?: TaxReportYearResolvers<ContextType>;
@@ -26,6 +26,7 @@ export interface IGetAllOpenContractsResult {
26
26
  operations_count: string;
27
27
  plan: string | null;
28
28
  product: string | null;
29
+ purchase_order: string | null;
29
30
  purchase_orders: stringArray;
30
31
  remarks: string | null;
31
32
  signed_agreement: string | null;
@@ -57,6 +58,7 @@ export interface IGetContractsByIdsResult {
57
58
  operations_count: string;
58
59
  plan: string | null;
59
60
  product: string | null;
61
+ purchase_order: string | null;
60
62
  purchase_orders: stringArray;
61
63
  remarks: string | null;
62
64
  signed_agreement: string | null;
@@ -88,6 +90,7 @@ export interface IGetContractsByClientIdsResult {
88
90
  operations_count: string;
89
91
  plan: string | null;
90
92
  product: string | null;
93
+ purchase_order: string | null;
91
94
  purchase_orders: stringArray;
92
95
  remarks: string | null;
93
96
  signed_agreement: string | null;
@@ -147,6 +150,7 @@ export interface IUpdateContractResult {
147
150
  operations_count: string;
148
151
  plan: string | null;
149
152
  product: string | null;
153
+ purchase_order: string | null;
150
154
  purchase_orders: stringArray;
151
155
  remarks: string | null;
152
156
  signed_agreement: string | null;
@@ -191,6 +195,7 @@ export interface IInsertContractResult {
191
195
  operations_count: string;
192
196
  plan: string | null;
193
197
  product: string | null;
198
+ purchase_order: string | null;
194
199
  purchase_orders: stringArray;
195
200
  remarks: string | null;
196
201
  signed_agreement: string | null;
@@ -1,4 +1,9 @@
1
1
  /** Types generated for queries found in "src/modules/financial-entities/providers/admin-businesses.provider.ts" */
2
+ export type DateOrString = Date | string;
3
+
4
+ export type Json = null | boolean | number | string | Json[] | { [key: string]: Json };
5
+
6
+ export type JsonArray = (Json)[];
2
7
 
3
8
  /** 'GetAdminBusinessesByIds' parameters type */
4
9
  export interface IGetAdminBusinessesByIdsParams {
@@ -8,6 +13,9 @@ export interface IGetAdminBusinessesByIdsParams {
8
13
  /** 'GetAdminBusinessesByIds' return type */
9
14
  export interface IGetAdminBusinessesByIdsResult {
10
15
  advance_tax_rate: number | null;
16
+ advance_tax_rates: JsonArray;
17
+ business_registration_start_date: Date | null;
18
+ company_tax_id: string | null;
11
19
  id: string;
12
20
  name: string;
13
21
  nikuim: string | null;
@@ -15,6 +23,8 @@ export interface IGetAdminBusinessesByIdsResult {
15
23
  pinkas_social_security_2021: string | null;
16
24
  pinkas_social_security_2022: string | null;
17
25
  registration_date: Date | null;
26
+ social_security_employer_ids: JsonArray;
27
+ tax_advances_ids: JsonArray;
18
28
  tax_nikuim_pinkas_number: string | null;
19
29
  tax_pinkas_number_2020: string | null;
20
30
  tax_siduri_number_2021: string | null;
@@ -23,6 +33,7 @@ export interface IGetAdminBusinessesByIdsResult {
23
33
  vat_number: string | null;
24
34
  vat_report_cadence: number | null;
25
35
  website_login_screenshot: string | null;
36
+ withholding_tax_annual_ids: JsonArray;
26
37
  wizcloud_company_id: string | null;
27
38
  wizcloud_token: string | null;
28
39
  }
@@ -39,6 +50,9 @@ export type IGetAllAdminBusinessesParams = void;
39
50
  /** 'GetAllAdminBusinesses' return type */
40
51
  export interface IGetAllAdminBusinessesResult {
41
52
  advance_tax_rate: number | null;
53
+ advance_tax_rates: JsonArray;
54
+ business_registration_start_date: Date | null;
55
+ company_tax_id: string | null;
42
56
  id: string;
43
57
  name: string;
44
58
  nikuim: string | null;
@@ -46,6 +60,8 @@ export interface IGetAllAdminBusinessesResult {
46
60
  pinkas_social_security_2021: string | null;
47
61
  pinkas_social_security_2022: string | null;
48
62
  registration_date: Date | null;
63
+ social_security_employer_ids: JsonArray;
64
+ tax_advances_ids: JsonArray;
49
65
  tax_nikuim_pinkas_number: string | null;
50
66
  tax_pinkas_number_2020: string | null;
51
67
  tax_siduri_number_2021: string | null;
@@ -54,6 +70,7 @@ export interface IGetAllAdminBusinessesResult {
54
70
  vat_number: string | null;
55
71
  vat_report_cadence: number | null;
56
72
  website_login_screenshot: string | null;
73
+ withholding_tax_annual_ids: JsonArray;
57
74
  wizcloud_company_id: string | null;
58
75
  wizcloud_token: string | null;
59
76
  }
@@ -64,3 +81,46 @@ export interface IGetAllAdminBusinessesQuery {
64
81
  result: IGetAllAdminBusinessesResult;
65
82
  }
66
83
 
84
+ /** 'UpdateAdminBusinesses' parameters type */
85
+ export interface IUpdateAdminBusinessesParams {
86
+ advanceTaxRates?: JsonArray | null | void;
87
+ businessRegistrationStartDate?: DateOrString | null | void;
88
+ companyTaxId?: string | null | void;
89
+ id?: string | null | void;
90
+ socialSecurityEmployerIds?: JsonArray | null | void;
91
+ taxAdvancesIds?: JsonArray | null | void;
92
+ withholdingTaxAnnualIds?: JsonArray | null | void;
93
+ }
94
+
95
+ /** 'UpdateAdminBusinesses' return type */
96
+ export interface IUpdateAdminBusinessesResult {
97
+ advance_tax_rate: number | null;
98
+ advance_tax_rates: JsonArray;
99
+ business_registration_start_date: Date | null;
100
+ company_tax_id: string | null;
101
+ id: string;
102
+ nikuim: string | null;
103
+ password: string | null;
104
+ pinkas_social_security_2021: string | null;
105
+ pinkas_social_security_2022: string | null;
106
+ registration_date: Date | null;
107
+ social_security_employer_ids: JsonArray;
108
+ tax_advances_ids: JsonArray;
109
+ tax_nikuim_pinkas_number: string | null;
110
+ tax_pinkas_number_2020: string | null;
111
+ tax_siduri_number_2021: string | null;
112
+ tax_siduri_number_2022: string | null;
113
+ username_vat_website: string | null;
114
+ vat_report_cadence: number | null;
115
+ website_login_screenshot: string | null;
116
+ withholding_tax_annual_ids: JsonArray;
117
+ wizcloud_company_id: string | null;
118
+ wizcloud_token: string | null;
119
+ }
120
+
121
+ /** 'UpdateAdminBusinesses' query type */
122
+ export interface IUpdateAdminBusinessesQuery {
123
+ params: IUpdateAdminBusinessesParams;
124
+ result: IUpdateAdminBusinessesResult;
125
+ }
126
+