@accounter/server 0.0.8-alpha-20251029233659-8fb74309c9f1de4f20423db029c5740e2df4bb5d → 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 (47) hide show
  1. package/CHANGELOG.md +33 -4
  2. package/dist/green-invoice-graphql/src/mesh-artifacts/index.d.ts +1 -1
  3. package/dist/server/src/__generated__/types.d.ts +82 -18
  4. package/dist/server/src/__generated__/types.js.map +1 -1
  5. package/dist/server/src/modules/financial-entities/__generated__/admin-businesses.types.d.ts +57 -0
  6. package/dist/server/src/modules/financial-entities/__generated__/admin-businesses.types.js +0 -1
  7. package/dist/server/src/modules/financial-entities/__generated__/admin-businesses.types.js.map +1 -1
  8. package/dist/server/src/modules/financial-entities/__generated__/types.d.ts +33 -10
  9. package/dist/server/src/modules/financial-entities/__generated__/types.js.map +1 -1
  10. package/dist/server/src/modules/financial-entities/helpers/admin-businesses.helper.d.ts +31 -0
  11. package/dist/server/src/modules/financial-entities/helpers/admin-businesses.helper.js +27 -0
  12. package/dist/server/src/modules/financial-entities/helpers/admin-businesses.helper.js.map +1 -0
  13. package/dist/server/src/modules/financial-entities/providers/admin-businesses.provider.d.ts +2 -1
  14. package/dist/server/src/modules/financial-entities/providers/admin-businesses.provider.js +37 -0
  15. package/dist/server/src/modules/financial-entities/providers/admin-businesses.provider.js.map +1 -1
  16. package/dist/server/src/modules/financial-entities/resolvers/admin-businesses.resolver.js +46 -11
  17. package/dist/server/src/modules/financial-entities/resolvers/admin-businesses.resolver.js.map +1 -1
  18. package/dist/server/src/modules/financial-entities/typeDefs/admin-businesses.graphql.js +49 -16
  19. package/dist/server/src/modules/financial-entities/typeDefs/admin-businesses.graphql.js.map +1 -1
  20. package/dist/server/src/modules/financial-entities/types.d.ts +1 -1
  21. package/dist/server/src/modules/ledger/__generated__/types.d.ts +3 -2
  22. package/dist/server/src/modules/ledger/__generated__/types.js.map +1 -1
  23. package/dist/server/src/modules/ledger/resolvers/ledger.resolver.js +5 -0
  24. package/dist/server/src/modules/ledger/resolvers/ledger.resolver.js.map +1 -1
  25. package/dist/server/src/modules/ledger/typeDefs/ledger.graphql.js +2 -0
  26. package/dist/server/src/modules/ledger/typeDefs/ledger.graphql.js.map +1 -1
  27. package/dist/server/src/modules/transactions/__generated__/types.d.ts +2 -1
  28. package/dist/server/src/modules/transactions/__generated__/types.js.map +1 -1
  29. package/dist/server/src/modules/transactions/resolvers/transactions.resolver.js +10 -0
  30. package/dist/server/src/modules/transactions/resolvers/transactions.resolver.js.map +1 -1
  31. package/dist/server/src/modules/transactions/typeDefs/transactions.graphql.js +1 -0
  32. package/dist/server/src/modules/transactions/typeDefs/transactions.graphql.js.map +1 -1
  33. package/package.json +1 -1
  34. package/src/__generated__/types.ts +92 -18
  35. package/src/modules/financial-entities/__generated__/admin-businesses.types.ts +60 -0
  36. package/src/modules/financial-entities/__generated__/types.ts +33 -10
  37. package/src/modules/financial-entities/helpers/admin-businesses.helper.ts +33 -0
  38. package/src/modules/financial-entities/providers/admin-businesses.provider.ts +44 -0
  39. package/src/modules/financial-entities/resolvers/admin-businesses.resolver.ts +53 -11
  40. package/src/modules/financial-entities/typeDefs/admin-businesses.graphql.ts +49 -16
  41. package/src/modules/financial-entities/types.ts +1 -1
  42. package/src/modules/ledger/__generated__/types.ts +3 -2
  43. package/src/modules/ledger/resolvers/ledger.resolver.ts +5 -0
  44. package/src/modules/ledger/typeDefs/ledger.graphql.ts +2 -0
  45. package/src/modules/transactions/__generated__/types.ts +2 -1
  46. package/src/modules/transactions/resolvers/transactions.resolver.ts +10 -0
  47. package/src/modules/transactions/typeDefs/transactions.graphql.ts +1 -0
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @accounter/server
2
2
 
3
- ## 0.0.8-alpha-20251029233659-8fb74309c9f1de4f20423db029c5740e2df4bb5d
3
+ ## 0.0.8-alpha-20251029234818-bb69914cb7aaa4859296baa4a256c251158fd15b
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -450,6 +450,35 @@
450
450
  streamline the process of adding new businesses, specifically by simplifying the handling of tax
451
451
  category insertions.
452
452
 
453
+ - [#2645](https://github.com/Urigo/accounter-fullstack/pull/2645)
454
+ [`ffc4613`](https://github.com/Urigo/accounter-fullstack/commit/ffc4613763bf5c0bf8e169d8016cc996fed26819)
455
+ Thanks [@gilgardosh](https://github.com/gilgardosh)! - - **Database Schema Refactor**: The
456
+ `businesses_admin` table is updated to replace single-value fields for tax and social security
457
+ identifiers with array-based JSONB columns, allowing for multiple annual IDs and historical tax
458
+ rates.
459
+ - **GraphQL Schema Update**: The GraphQL `AdminBusiness` type and related input types
460
+ (`CreateAdminBusinessInput`, `UpdateAdminBusinessInput`) are modified to reflect the new array
461
+ structures, introducing `AnnualId` and `TaxAdvancesRate` types.
462
+ - **Frontend Form Overhaul**: The `admin-business-section.tsx` component is refactored to use
463
+ `react-hook-form`'s `useFieldArray` for dynamic management of annual IDs and tax rates,
464
+ providing a more flexible user interface.
465
+ - **Backend Logic Adaptation**: New Zod schemas and resolver logic are implemented on the server
466
+ to validate and process the updated array-based data for admin business updates.
467
+
468
+ - [#2640](https://github.com/Urigo/accounter-fullstack/pull/2640)
469
+ [`26618ff`](https://github.com/Urigo/accounter-fullstack/commit/26618ff2d4a47d63e16ecec59f39887f48df52cf)
470
+ Thanks [@gilgardosh](https://github.com/gilgardosh)! - - **Renaming and Restructuring**: Key
471
+ components and routes related to "Business Transactions" have been renamed to "Business Ledger
472
+ Records" and moved into a new `business-ledger` directory, improving clarity and organization.
473
+ - **New Business Detail Tabs**: The business detail page now features new dedicated tabs for
474
+ "Ledger" and "Balance", providing a more structured view of financial data.
475
+ - **Enhanced Ledger and Transaction Tables**: Both the `LedgerTable` and `TransactionsTable`
476
+ components have been updated with pagination, improved sorting capabilities, and clearer column
477
+ headers for better user experience.
478
+ - **API Expansion**: New GraphQL queries and resolvers have been introduced on the server-side to
479
+ support fetching ledger records and transactions specifically by financial entity, catering to
480
+ the new UI structure.
481
+
453
482
  - [#2547](https://github.com/Urigo/accounter-fullstack/pull/2547)
454
483
  [`fd9fb24`](https://github.com/Urigo/accounter-fullstack/commit/fd9fb2445cba9a450f8c78f8100160d9b7c5c38a)
455
484
  Thanks [@gilgardosh](https://github.com/gilgardosh)! - 1. **Environment Variable Validation**: The
@@ -472,9 +501,9 @@
472
501
  [[`65e3c7f`](https://github.com/Urigo/accounter-fullstack/commit/65e3c7f01993eb4f41244a40feefefa08b31a4e6),
473
502
  [`65e3c7f`](https://github.com/Urigo/accounter-fullstack/commit/65e3c7f01993eb4f41244a40feefefa08b31a4e6),
474
503
  [`65e3c7f`](https://github.com/Urigo/accounter-fullstack/commit/65e3c7f01993eb4f41244a40feefefa08b31a4e6)]:
475
- - @accounter/pcn874-generator@0.6.3-alpha-20251029233659-8fb74309c9f1de4f20423db029c5740e2df4bb5d
476
- - @accounter/shaam-uniform-format-generator@0.2.2-alpha-20251029233659-8fb74309c9f1de4f20423db029c5740e2df4bb5d
477
- - @accounter/shaam6111-generator@0.1.4-alpha-20251029233659-8fb74309c9f1de4f20423db029c5740e2df4bb5d
504
+ - @accounter/pcn874-generator@0.6.3-alpha-20251029234818-bb69914cb7aaa4859296baa4a256c251158fd15b
505
+ - @accounter/shaam-uniform-format-generator@0.2.2-alpha-20251029234818-bb69914cb7aaa4859296baa4a256c251158fd15b
506
+ - @accounter/shaam6111-generator@0.1.4-alpha-20251029234818-bb69914cb7aaa4859296baa4a256c251158fd15b
478
507
 
479
508
  ## 0.0.7
480
509
 
@@ -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 {
@@ -193,11 +193,15 @@ export type AdminBusiness = {
193
193
  readonly id: Scalars['UUID']['output'];
194
194
  readonly name: Scalars['String']['output'];
195
195
  readonly registrationDate: Scalars['TimelessDate']['output'];
196
- readonly socialSecurityEmployerId?: Maybe<Scalars['String']['output']>;
197
- readonly taxAdvancesId?: Maybe<Scalars['String']['output']>;
198
- readonly taxAdvancesRate?: Maybe<Scalars['Float']['output']>;
199
- readonly withholdingTaxBookNumber?: Maybe<Scalars['String']['output']>;
200
- readonly withholdingTaxFileNumber?: Maybe<Scalars['String']['output']>;
196
+ /** Social Security Info */
197
+ readonly socialSecurityDeductionsId?: Maybe<Scalars['String']['output']>;
198
+ readonly socialSecurityEmployerIds: ReadonlyArray<AnnualId>;
199
+ /** Tax Advances Info */
200
+ readonly taxAdvancesAnnualIds: ReadonlyArray<AnnualId>;
201
+ readonly taxAdvancesRates: ReadonlyArray<TaxAdvancesRate>;
202
+ readonly withholdingTaxAnnualIds: ReadonlyArray<AnnualId>;
203
+ /** Withholding Tax Info */
204
+ readonly withholdingTaxCompanyId?: Maybe<Scalars['String']['output']>;
201
205
  };
202
206
  /** defines a tag / category for charge arrangement */
203
207
  export type AdminContext = {
@@ -331,6 +335,17 @@ export type AdminContextInput = {
331
335
  readonly zkufotExpensesTaxCategoryId?: InputMaybe<Scalars['UUID']['input']>;
332
336
  readonly zkufotIncomeTaxCategoryId?: InputMaybe<Scalars['UUID']['input']>;
333
337
  };
338
+ /** Represents an annual identifier for tax purposes. */
339
+ export type AnnualId = {
340
+ readonly __typename?: 'AnnualId';
341
+ readonly id: Scalars['String']['output'];
342
+ readonly year: Scalars['Int']['output'];
343
+ };
344
+ /** Input type representing an annual identifier for tax purposes. */
345
+ export type AnnualIdInput = {
346
+ readonly id: Scalars['String']['input'];
347
+ readonly year: Scalars['Int']['input'];
348
+ };
334
349
  /** Audit opinion type enum (חוות דעת) */
335
350
  export type AuditOpinionType =
336
351
  /** Adverse opinion (שלילית) */
@@ -1107,12 +1122,12 @@ export type Country = {
1107
1122
  /** Input type for creating a new admin business. */
1108
1123
  export type CreateAdminBusinessInput = {
1109
1124
  readonly businessId: Scalars['UUID']['input'];
1125
+ readonly companyTaxId: Scalars['String']['input'];
1110
1126
  readonly registrationDate: Scalars['TimelessDate']['input'];
1111
1127
  readonly socialSecurityEmployerId?: InputMaybe<Scalars['String']['input']>;
1112
- readonly taxAdvancesId?: InputMaybe<Scalars['String']['input']>;
1128
+ readonly taxAdvancesAnnualId?: InputMaybe<Scalars['String']['input']>;
1113
1129
  readonly taxAdvancesRate?: InputMaybe<Scalars['Float']['input']>;
1114
- readonly withholdingTaxBookNumber?: InputMaybe<Scalars['String']['input']>;
1115
- readonly withholdingTaxFileNumber?: InputMaybe<Scalars['String']['input']>;
1130
+ readonly withholdingTaxAnnualId?: InputMaybe<Scalars['String']['input']>;
1116
1131
  };
1117
1132
  /** input for creating a new contract */
1118
1133
  export type CreateContractInput = {
@@ -2872,6 +2887,7 @@ export type Query = {
2872
2887
  readonly greenInvoiceClient: GreenInvoiceClient;
2873
2888
  readonly incomeExpenseChart: IncomeExpenseChart;
2874
2889
  readonly ledgerRecordsByDates: ReadonlyArray<LedgerRecord>;
2890
+ readonly ledgerRecordsByFinancialEntity: ReadonlyArray<LedgerRecord>;
2875
2891
  readonly miscExpensesByCharge: ReadonlyArray<MiscExpense>;
2876
2892
  readonly newDocumentInfoDraftByCharge: NewDocumentInfo;
2877
2893
  readonly newDocumentInfoDraftByDocument: NewDocumentInfo;
@@ -2896,6 +2912,7 @@ export type Query = {
2896
2912
  readonly taxCategory: TaxCategory;
2897
2913
  readonly taxCategoryByBusinessId?: Maybe<TaxCategory>;
2898
2914
  readonly taxReport: TaxReport;
2915
+ readonly transactionsByFinancialEntity: ReadonlyArray<Transaction>;
2899
2916
  readonly transactionsByIDs: ReadonlyArray<Transaction>;
2900
2917
  readonly transactionsForBalanceReport: ReadonlyArray<BalanceTransactions>;
2901
2918
  readonly uniformFormat?: Maybe<UniformFormat>;
@@ -3045,6 +3062,10 @@ export type QueryLedgerRecordsByDatesArgs = {
3045
3062
  toDate: Scalars['TimelessDate']['input'];
3046
3063
  };
3047
3064
  /** query root */
3065
+ export type QueryLedgerRecordsByFinancialEntityArgs = {
3066
+ financialEntityId: Scalars['UUID']['input'];
3067
+ };
3068
+ /** query root */
3048
3069
  export type QueryMiscExpensesByChargeArgs = {
3049
3070
  chargeId: Scalars['UUID']['input'];
3050
3071
  };
@@ -3148,6 +3169,10 @@ export type QueryTaxReportArgs = {
3148
3169
  reportYear: Scalars['Int']['input'];
3149
3170
  };
3150
3171
  /** query root */
3172
+ export type QueryTransactionsByFinancialEntityArgs = {
3173
+ financialEntityID: Scalars['UUID']['input'];
3174
+ };
3175
+ /** query root */
3151
3176
  export type QueryTransactionsByIDsArgs = {
3152
3177
  transactionIDs: ReadonlyArray<Scalars['UUID']['input']>;
3153
3178
  };
@@ -3531,6 +3556,17 @@ export type Tag = {
3531
3556
  export type TagInput = {
3532
3557
  readonly id: Scalars['String']['input'];
3533
3558
  };
3559
+ /** Represents the tax advance rate for a specific date. */
3560
+ export type TaxAdvancesRate = {
3561
+ readonly __typename?: 'TaxAdvancesRate';
3562
+ readonly date: Scalars['TimelessDate']['output'];
3563
+ readonly rate: Scalars['Float']['output'];
3564
+ };
3565
+ /** Input type representing the tax advance rate for a specific date. */
3566
+ export type TaxAdvancesRateInput = {
3567
+ readonly date: Scalars['TimelessDate']['input'];
3568
+ readonly rate: Scalars['Float']['input'];
3569
+ };
3534
3570
  /** Tax category entity used for ledger records */
3535
3571
  export type TaxCategory = FinancialEntity & {
3536
3572
  readonly __typename?: 'TaxCategory';
@@ -3645,12 +3681,17 @@ export type Unprocessed = Document & Linkable & {
3645
3681
  };
3646
3682
  /** Input type for updating admin business details. */
3647
3683
  export type UpdateAdminBusinessInput = {
3684
+ readonly governmentId?: InputMaybe<Scalars['String']['input']>;
3685
+ readonly name?: InputMaybe<Scalars['String']['input']>;
3648
3686
  readonly registrationDate?: InputMaybe<Scalars['TimelessDate']['input']>;
3649
- readonly socialSecurityEmployerId?: InputMaybe<Scalars['String']['input']>;
3650
- readonly taxAdvancesId?: InputMaybe<Scalars['String']['input']>;
3651
- readonly taxAdvancesRate?: InputMaybe<Scalars['Float']['input']>;
3652
- readonly withholdingTaxBookNumber?: InputMaybe<Scalars['String']['input']>;
3653
- readonly withholdingTaxFileNumber?: InputMaybe<Scalars['String']['input']>;
3687
+ /** Social Security Info */
3688
+ readonly socialSecurityEmployerIds?: InputMaybe<ReadonlyArray<AnnualIdInput>>;
3689
+ /** Tax Advances Info */
3690
+ readonly taxAdvancesAnnualIds?: InputMaybe<ReadonlyArray<AnnualIdInput>>;
3691
+ readonly taxAdvancesRates?: InputMaybe<ReadonlyArray<TaxAdvancesRateInput>>;
3692
+ readonly withholdingTaxAnnualIds?: InputMaybe<ReadonlyArray<AnnualIdInput>>;
3693
+ /** Withholding Tax Info */
3694
+ readonly withholdingTaxCompanyId?: InputMaybe<Scalars['String']['input']>;
3654
3695
  };
3655
3696
  /** input for updateBusiness */
3656
3697
  export type UpdateBusinessInput = {
@@ -4082,6 +4123,8 @@ export type ResolversTypes = {
4082
4123
  AdminBusiness: ResolverTypeWrapper<IGetAllAdminBusinessesResult>;
4083
4124
  AdminContext: ResolverTypeWrapper<IGetAdminContextsResult>;
4084
4125
  AdminContextInput: AdminContextInput;
4126
+ AnnualId: ResolverTypeWrapper<AnnualId>;
4127
+ AnnualIdInput: AnnualIdInput;
4085
4128
  AuditOpinionType: AuditOpinionType;
4086
4129
  BalanceTransactions: ResolverTypeWrapper<IGetNormalizedBalanceTransactionsResult>;
4087
4130
  BankDeposit: ResolverTypeWrapper<Omit<BankDeposit, 'transactions'> & {
@@ -4351,6 +4394,8 @@ export type ResolversTypes = {
4351
4394
  SuggestionsInput: SuggestionsInput;
4352
4395
  Tag: ResolverTypeWrapper<IGetAllTagsResult>;
4353
4396
  TagInput: TagInput;
4397
+ TaxAdvancesRate: ResolverTypeWrapper<TaxAdvancesRate>;
4398
+ TaxAdvancesRateInput: TaxAdvancesRateInput;
4354
4399
  TaxCategory: ResolverTypeWrapper<IGetAllTaxCategoriesResult>;
4355
4400
  TaxReport: ResolverTypeWrapper<Omit<TaxReport, 'reference' | 'report'> & {
4356
4401
  reference: ReadonlyArray<ResolversTypes['TaxReportYear']>;
@@ -4449,6 +4494,8 @@ export type ResolversParentTypes = {
4449
4494
  AdminBusiness: IGetAllAdminBusinessesResult;
4450
4495
  AdminContext: IGetAdminContextsResult;
4451
4496
  AdminContextInput: AdminContextInput;
4497
+ AnnualId: AnnualId;
4498
+ AnnualIdInput: AnnualIdInput;
4452
4499
  BalanceTransactions: IGetNormalizedBalanceTransactionsResult;
4453
4500
  BankDeposit: Omit<BankDeposit, 'transactions'> & {
4454
4501
  transactions: ReadonlyArray<ResolversParentTypes['Transaction']>;
@@ -4683,6 +4730,8 @@ export type ResolversParentTypes = {
4683
4730
  SuggestionsInput: SuggestionsInput;
4684
4731
  Tag: IGetAllTagsResult;
4685
4732
  TagInput: TagInput;
4733
+ TaxAdvancesRate: TaxAdvancesRate;
4734
+ TaxAdvancesRateInput: TaxAdvancesRateInput;
4686
4735
  TaxCategory: IGetAllTaxCategoriesResult;
4687
4736
  TaxReport: Omit<TaxReport, 'reference' | 'report'> & {
4688
4737
  reference: ReadonlyArray<ResolversParentTypes['TaxReportYear']>;
@@ -4784,11 +4833,12 @@ export type AdminBusinessResolvers<ContextType = GraphQLModules.Context, ParentT
4784
4833
  id?: Resolver<ResolversTypes['UUID'], ParentType, ContextType>;
4785
4834
  name?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
4786
4835
  registrationDate?: Resolver<ResolversTypes['TimelessDate'], ParentType, ContextType>;
4787
- socialSecurityEmployerId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
4788
- taxAdvancesId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
4789
- taxAdvancesRate?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
4790
- withholdingTaxBookNumber?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
4791
- withholdingTaxFileNumber?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
4836
+ socialSecurityDeductionsId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
4837
+ socialSecurityEmployerIds?: Resolver<ReadonlyArray<ResolversTypes['AnnualId']>, ParentType, ContextType>;
4838
+ taxAdvancesAnnualIds?: Resolver<ReadonlyArray<ResolversTypes['AnnualId']>, ParentType, ContextType>;
4839
+ taxAdvancesRates?: Resolver<ReadonlyArray<ResolversTypes['TaxAdvancesRate']>, ParentType, ContextType>;
4840
+ withholdingTaxAnnualIds?: Resolver<ReadonlyArray<ResolversTypes['AnnualId']>, ParentType, ContextType>;
4841
+ withholdingTaxCompanyId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
4792
4842
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
4793
4843
  };
4794
4844
  export type AdminContextResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['AdminContext'] = ResolversParentTypes['AdminContext']> = {
@@ -4857,6 +4907,11 @@ export type AdminContextResolvers<ContextType = GraphQLModules.Context, ParentTy
4857
4907
  zkufotIncomeTaxCategory?: Resolver<Maybe<ResolversTypes['TaxCategory']>, ParentType, ContextType>;
4858
4908
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
4859
4909
  };
4910
+ export type AnnualIdResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['AnnualId'] = ResolversParentTypes['AnnualId']> = {
4911
+ id?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
4912
+ year?: Resolver<ResolversTypes['Int'], ParentType, ContextType>;
4913
+ __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
4914
+ };
4860
4915
  export type BalanceTransactionsResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['BalanceTransactions'] = ResolversParentTypes['BalanceTransactions']> = {
4861
4916
  amount?: Resolver<ResolversTypes['FinancialAmount'], ParentType, ContextType>;
4862
4917
  amountUsd?: Resolver<ResolversTypes['FinancialAmount'], ParentType, ContextType>;
@@ -6408,6 +6463,7 @@ export type QueryResolvers<ContextType = GraphQLModules.Context, ParentType exte
6408
6463
  greenInvoiceClient?: Resolver<ResolversTypes['GreenInvoiceClient'], ParentType, ContextType, RequireFields<QueryGreenInvoiceClientArgs, 'clientId'>>;
6409
6464
  incomeExpenseChart?: Resolver<ResolversTypes['IncomeExpenseChart'], ParentType, ContextType, RequireFields<QueryIncomeExpenseChartArgs, 'filters'>>;
6410
6465
  ledgerRecordsByDates?: Resolver<ReadonlyArray<ResolversTypes['LedgerRecord']>, ParentType, ContextType, RequireFields<QueryLedgerRecordsByDatesArgs, 'fromDate' | 'toDate'>>;
6466
+ ledgerRecordsByFinancialEntity?: Resolver<ReadonlyArray<ResolversTypes['LedgerRecord']>, ParentType, ContextType, RequireFields<QueryLedgerRecordsByFinancialEntityArgs, 'financialEntityId'>>;
6411
6467
  miscExpensesByCharge?: Resolver<ReadonlyArray<ResolversTypes['MiscExpense']>, ParentType, ContextType, RequireFields<QueryMiscExpensesByChargeArgs, 'chargeId'>>;
6412
6468
  newDocumentInfoDraftByCharge?: Resolver<ResolversTypes['NewDocumentInfo'], ParentType, ContextType, RequireFields<QueryNewDocumentInfoDraftByChargeArgs, 'chargeId'>>;
6413
6469
  newDocumentInfoDraftByDocument?: Resolver<ResolversTypes['NewDocumentInfo'], ParentType, ContextType, RequireFields<QueryNewDocumentInfoDraftByDocumentArgs, 'documentId'>>;
@@ -6430,6 +6486,7 @@ export type QueryResolvers<ContextType = GraphQLModules.Context, ParentType exte
6430
6486
  taxCategory?: Resolver<ResolversTypes['TaxCategory'], ParentType, ContextType, RequireFields<QueryTaxCategoryArgs, 'id'>>;
6431
6487
  taxCategoryByBusinessId?: Resolver<Maybe<ResolversTypes['TaxCategory']>, ParentType, ContextType, RequireFields<QueryTaxCategoryByBusinessIdArgs, 'businessId' | 'ownerId'>>;
6432
6488
  taxReport?: Resolver<ResolversTypes['TaxReport'], ParentType, ContextType, RequireFields<QueryTaxReportArgs, 'referenceYears' | 'reportYear'>>;
6489
+ transactionsByFinancialEntity?: Resolver<ReadonlyArray<ResolversTypes['Transaction']>, ParentType, ContextType, RequireFields<QueryTransactionsByFinancialEntityArgs, 'financialEntityID'>>;
6433
6490
  transactionsByIDs?: Resolver<ReadonlyArray<ResolversTypes['Transaction']>, ParentType, ContextType, RequireFields<QueryTransactionsByIDsArgs, 'transactionIDs'>>;
6434
6491
  transactionsForBalanceReport?: Resolver<ReadonlyArray<ResolversTypes['BalanceTransactions']>, ParentType, ContextType, RequireFields<QueryTransactionsForBalanceReportArgs, 'fromDate' | 'toDate'>>;
6435
6492
  uniformFormat?: Resolver<Maybe<ResolversTypes['UniformFormat']>, ParentType, ContextType, RequireFields<QueryUniformFormatArgs, 'fromDate' | 'toDate'>>;
@@ -6649,6 +6706,11 @@ export type TagResolvers<ContextType = GraphQLModules.Context, ParentType extend
6649
6706
  parent?: Resolver<Maybe<ResolversTypes['Tag']>, ParentType, ContextType>;
6650
6707
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
6651
6708
  };
6709
+ export type TaxAdvancesRateResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['TaxAdvancesRate'] = ResolversParentTypes['TaxAdvancesRate']> = {
6710
+ date?: Resolver<ResolversTypes['TimelessDate'], ParentType, ContextType>;
6711
+ rate?: Resolver<ResolversTypes['Float'], ParentType, ContextType>;
6712
+ __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
6713
+ };
6652
6714
  export type TaxCategoryResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['TaxCategory'] = ResolversParentTypes['TaxCategory']> = {
6653
6715
  createdAt?: Resolver<ResolversTypes['DateTime'], ParentType, ContextType>;
6654
6716
  id?: Resolver<ResolversTypes['UUID'], ParentType, ContextType>;
@@ -6881,6 +6943,7 @@ export type YearlyLedgerReportFinancialEntityInfoResolvers<ContextType = GraphQL
6881
6943
  export type Resolvers<ContextType = GraphQLModules.Context> = {
6882
6944
  AdminBusiness?: AdminBusinessResolvers<ContextType>;
6883
6945
  AdminContext?: AdminContextResolvers<ContextType>;
6946
+ AnnualId?: AnnualIdResolvers<ContextType>;
6884
6947
  BalanceTransactions?: BalanceTransactionsResolvers<ContextType>;
6885
6948
  BankDeposit?: BankDepositResolvers<ContextType>;
6886
6949
  BankDepositCharge?: BankDepositChargeResolvers<ContextType>;
@@ -7026,6 +7089,7 @@ export type Resolvers<ContextType = GraphQLModules.Context> = {
7026
7089
  Suggestions?: SuggestionsResolvers<ContextType>;
7027
7090
  SuggestionsEmailListenerConfig?: SuggestionsEmailListenerConfigResolvers<ContextType>;
7028
7091
  Tag?: TagResolvers<ContextType>;
7092
+ TaxAdvancesRate?: TaxAdvancesRateResolvers<ContextType>;
7029
7093
  TaxCategory?: TaxCategoryResolvers<ContextType>;
7030
7094
  TaxReport?: TaxReportResolvers<ContextType>;
7031
7095
  TaxReportYear?: TaxReportYearResolvers<ContextType>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/__generated__/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAq2BrD,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAyX7B,OAAO,EAAE,QAAQ,EAAE,CAAC;AAuLpB,OAAO,EAAE,YAAY,EAAE,CAAC;AA2lCxB,OAAO,EAAE,iBAAiB,EAAE,CAAC;AA62D7B,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/__generated__/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAs3BrD,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAyX7B,OAAO,EAAE,QAAQ,EAAE,CAAC;AAuLpB,OAAO,EAAE,YAAY,EAAE,CAAC;AA2lCxB,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAw4D7B,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -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
+ export type Json = null | boolean | number | string | Json[] | {
4
+ [key: string]: Json;
5
+ };
6
+ export type JsonArray = (Json)[];
2
7
  /** 'GetAdminBusinessesByIds' parameters type */
3
8
  export interface IGetAdminBusinessesByIdsParams {
4
9
  ids: readonly (string | null | void)[];
@@ -6,6 +11,9 @@ export interface IGetAdminBusinessesByIdsParams {
6
11
  /** 'GetAdminBusinessesByIds' return type */
7
12
  export interface IGetAdminBusinessesByIdsResult {
8
13
  advance_tax_rate: number | null;
14
+ advance_tax_rates: JsonArray;
15
+ business_registration_start_date: Date | null;
16
+ company_tax_id: string | null;
9
17
  id: string;
10
18
  name: string;
11
19
  nikuim: string | null;
@@ -13,6 +21,8 @@ export interface IGetAdminBusinessesByIdsResult {
13
21
  pinkas_social_security_2021: string | null;
14
22
  pinkas_social_security_2022: string | null;
15
23
  registration_date: Date | null;
24
+ social_security_employer_ids: JsonArray;
25
+ tax_advances_ids: JsonArray;
16
26
  tax_nikuim_pinkas_number: string | null;
17
27
  tax_pinkas_number_2020: string | null;
18
28
  tax_siduri_number_2021: string | null;
@@ -21,6 +31,7 @@ export interface IGetAdminBusinessesByIdsResult {
21
31
  vat_number: string | null;
22
32
  vat_report_cadence: number | null;
23
33
  website_login_screenshot: string | null;
34
+ withholding_tax_annual_ids: JsonArray;
24
35
  wizcloud_company_id: string | null;
25
36
  wizcloud_token: string | null;
26
37
  }
@@ -34,6 +45,9 @@ export type IGetAllAdminBusinessesParams = void;
34
45
  /** 'GetAllAdminBusinesses' return type */
35
46
  export interface IGetAllAdminBusinessesResult {
36
47
  advance_tax_rate: number | null;
48
+ advance_tax_rates: JsonArray;
49
+ business_registration_start_date: Date | null;
50
+ company_tax_id: string | null;
37
51
  id: string;
38
52
  name: string;
39
53
  nikuim: string | null;
@@ -41,6 +55,8 @@ export interface IGetAllAdminBusinessesResult {
41
55
  pinkas_social_security_2021: string | null;
42
56
  pinkas_social_security_2022: string | null;
43
57
  registration_date: Date | null;
58
+ social_security_employer_ids: JsonArray;
59
+ tax_advances_ids: JsonArray;
44
60
  tax_nikuim_pinkas_number: string | null;
45
61
  tax_pinkas_number_2020: string | null;
46
62
  tax_siduri_number_2021: string | null;
@@ -49,6 +65,7 @@ export interface IGetAllAdminBusinessesResult {
49
65
  vat_number: string | null;
50
66
  vat_report_cadence: number | null;
51
67
  website_login_screenshot: string | null;
68
+ withholding_tax_annual_ids: JsonArray;
52
69
  wizcloud_company_id: string | null;
53
70
  wizcloud_token: string | null;
54
71
  }
@@ -57,3 +74,43 @@ export interface IGetAllAdminBusinessesQuery {
57
74
  params: IGetAllAdminBusinessesParams;
58
75
  result: IGetAllAdminBusinessesResult;
59
76
  }
77
+ /** 'UpdateAdminBusinesses' parameters type */
78
+ export interface IUpdateAdminBusinessesParams {
79
+ advanceTaxRates?: JsonArray | null | void;
80
+ businessRegistrationStartDate?: DateOrString | null | void;
81
+ companyTaxId?: string | null | void;
82
+ id?: string | null | void;
83
+ socialSecurityEmployerIds?: JsonArray | null | void;
84
+ taxAdvancesIds?: JsonArray | null | void;
85
+ withholdingTaxAnnualIds?: JsonArray | null | void;
86
+ }
87
+ /** 'UpdateAdminBusinesses' return type */
88
+ export interface IUpdateAdminBusinessesResult {
89
+ advance_tax_rate: number | null;
90
+ advance_tax_rates: JsonArray;
91
+ business_registration_start_date: Date | null;
92
+ company_tax_id: string | null;
93
+ id: string;
94
+ nikuim: string | null;
95
+ password: string | null;
96
+ pinkas_social_security_2021: string | null;
97
+ pinkas_social_security_2022: string | null;
98
+ registration_date: Date | null;
99
+ social_security_employer_ids: JsonArray;
100
+ tax_advances_ids: JsonArray;
101
+ tax_nikuim_pinkas_number: string | null;
102
+ tax_pinkas_number_2020: string | null;
103
+ tax_siduri_number_2021: string | null;
104
+ tax_siduri_number_2022: string | null;
105
+ username_vat_website: string | null;
106
+ vat_report_cadence: number | null;
107
+ website_login_screenshot: string | null;
108
+ withholding_tax_annual_ids: JsonArray;
109
+ wizcloud_company_id: string | null;
110
+ wizcloud_token: string | null;
111
+ }
112
+ /** 'UpdateAdminBusinesses' query type */
113
+ export interface IUpdateAdminBusinessesQuery {
114
+ params: IUpdateAdminBusinessesParams;
115
+ result: IUpdateAdminBusinessesResult;
116
+ }
@@ -1,3 +1,2 @@
1
- /** Types generated for queries found in "src/modules/financial-entities/providers/admin-businesses.provider.ts" */
2
1
  export {};
3
2
  //# sourceMappingURL=admin-businesses.types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"admin-businesses.types.js","sourceRoot":"","sources":["../../../../../../src/modules/financial-entities/__generated__/admin-businesses.types.ts"],"names":[],"mappings":"AAAA,mHAAmH"}
1
+ {"version":3,"file":"admin-businesses.types.js","sourceRoot":"","sources":["../../../../../../src/modules/financial-entities/__generated__/admin-businesses.types.ts"],"names":[],"mappings":""}
@@ -4,7 +4,9 @@ export declare namespace FinancialEntitiesModule {
4
4
  interface DefinedFields {
5
5
  Query: 'adminBusiness' | 'allAdminBusinesses' | 'businessTransactionsSumFromLedgerRecords' | 'businessTransactionsFromLedgerRecords' | 'business' | 'businesses' | 'allBusinesses' | 'client' | 'allClients' | 'financialEntity' | 'allFinancialEntities' | 'taxCategories' | 'taxCategory' | 'taxCategoryByBusinessId';
6
6
  Mutation: 'createAdminBusiness' | 'updateAdminBusiness' | 'deleteAdminBusiness' | 'updateBusiness' | 'insertNewBusiness' | 'mergeBusinesses' | 'batchGenerateBusinessesOutOfTransactions' | 'updateClient' | 'insertClient' | 'updateTaxCategory' | 'insertTaxCategory';
7
- AdminBusiness: 'id' | 'name' | 'governmentId' | 'business' | 'withholdingTaxBookNumber' | 'withholdingTaxFileNumber' | 'socialSecurityEmployerId' | 'taxAdvancesRate' | 'taxAdvancesId' | 'registrationDate';
7
+ AdminBusiness: 'id' | 'name' | 'governmentId' | 'registrationDate' | 'business' | 'taxAdvancesAnnualIds' | 'taxAdvancesRates' | 'withholdingTaxCompanyId' | 'withholdingTaxAnnualIds' | 'socialSecurityDeductionsId' | 'socialSecurityEmployerIds';
8
+ AnnualId: 'year' | 'id';
9
+ TaxAdvancesRate: 'date' | 'rate';
8
10
  BusinessTransactionsSumFromLedgerRecordsSuccessfulResult: 'businessTransactionsSum';
9
11
  BusinessTransactionSum: 'business' | 'credit' | 'debit' | 'total' | 'foreignCurrenciesSum';
10
12
  ForeignCurrencySum: 'credit' | 'debit' | 'total' | 'currency';
@@ -48,8 +50,10 @@ export declare namespace FinancialEntitiesModule {
48
50
  EmailAttachmentType: 'PDF' | 'PNG' | 'JPEG';
49
51
  }
50
52
  interface DefinedInputFields {
51
- CreateAdminBusinessInput: 'businessId' | 'withholdingTaxBookNumber' | 'withholdingTaxFileNumber' | 'socialSecurityEmployerId' | 'taxAdvancesRate' | 'taxAdvancesId' | 'registrationDate';
52
- UpdateAdminBusinessInput: 'withholdingTaxBookNumber' | 'withholdingTaxFileNumber' | 'socialSecurityEmployerId' | 'taxAdvancesRate' | 'taxAdvancesId' | 'registrationDate';
53
+ CreateAdminBusinessInput: 'businessId' | 'registrationDate' | 'companyTaxId' | 'taxAdvancesAnnualId' | 'taxAdvancesRate' | 'withholdingTaxAnnualId' | 'socialSecurityEmployerId';
54
+ UpdateAdminBusinessInput: 'name' | 'governmentId' | 'registrationDate' | 'taxAdvancesAnnualIds' | 'taxAdvancesRates' | 'withholdingTaxCompanyId' | 'withholdingTaxAnnualIds' | 'socialSecurityEmployerIds';
55
+ AnnualIdInput: 'year' | 'id';
56
+ TaxAdvancesRateInput: 'date' | 'rate';
53
57
  BusinessTransactionsFilter: 'businessIDs' | 'ownerIds' | 'type' | 'fromDate' | 'toDate' | 'includeRevaluation';
54
58
  UpdateBusinessInput: 'name' | 'sortCode' | 'country' | 'hebrewName' | 'address' | 'email' | 'website' | 'phoneNumber' | 'governmentId' | 'taxCategory' | 'exemptDealer' | 'suggestions' | 'optionalVAT' | 'isReceiptEnough' | 'isDocumentsOptional' | 'pcn874RecordType' | 'irsCode' | 'isActive';
55
59
  InsertNewBusinessInput: 'name' | 'sortCode' | 'country' | 'hebrewName' | 'address' | 'email' | 'website' | 'phoneNumber' | 'governmentId' | 'taxCategory' | 'exemptDealer' | 'suggestions' | 'optionalVAT' | 'isReceiptEnough' | 'isDocumentsOptional' | 'pcn874RecordType' | 'irsCode' | 'isActive';
@@ -67,8 +71,12 @@ export declare namespace FinancialEntitiesModule {
67
71
  export type Mutation = Pick<Types.Mutation, DefinedFields['Mutation']>;
68
72
  export type CreateAdminBusinessInput = Pick<Types.CreateAdminBusinessInput, DefinedInputFields['CreateAdminBusinessInput']>;
69
73
  export type UpdateAdminBusinessInput = Pick<Types.UpdateAdminBusinessInput, DefinedInputFields['UpdateAdminBusinessInput']>;
70
- export type LtdFinancialEntity = Pick<Types.LtdFinancialEntity, DefinedFields['LtdFinancialEntity']>;
71
74
  export type TimelessDate = Types.TimelessDate;
75
+ export type LtdFinancialEntity = Pick<Types.LtdFinancialEntity, DefinedFields['LtdFinancialEntity']>;
76
+ export type AnnualId = Pick<Types.AnnualId, DefinedFields['AnnualId']>;
77
+ export type TaxAdvancesRate = Pick<Types.TaxAdvancesRate, DefinedFields['TaxAdvancesRate']>;
78
+ export type AnnualIdInput = Pick<Types.AnnualIdInput, DefinedInputFields['AnnualIdInput']>;
79
+ export type TaxAdvancesRateInput = Pick<Types.TaxAdvancesRateInput, DefinedInputFields['TaxAdvancesRateInput']>;
72
80
  export type BusinessTransactionsSumFromLedgerRecordsResult = Types.BusinessTransactionsSumFromLedgerRecordsResult;
73
81
  export type BusinessTransactionsFilter = Pick<Types.BusinessTransactionsFilter, DefinedInputFields['BusinessTransactionsFilter']>;
74
82
  export type BusinessTransactionsFromLedgerRecordsResult = Types.BusinessTransactionsFromLedgerRecordsResult;
@@ -135,6 +143,8 @@ export declare namespace FinancialEntitiesModule {
135
143
  export type QueryResolvers = Pick<Types.QueryResolvers, DefinedFields['Query']>;
136
144
  export type MutationResolvers = Pick<Types.MutationResolvers, DefinedFields['Mutation']>;
137
145
  export type AdminBusinessResolvers = Pick<Types.AdminBusinessResolvers, DefinedFields['AdminBusiness']>;
146
+ export type AnnualIdResolvers = Pick<Types.AnnualIdResolvers, DefinedFields['AnnualId']>;
147
+ export type TaxAdvancesRateResolvers = Pick<Types.TaxAdvancesRateResolvers, DefinedFields['TaxAdvancesRate']>;
138
148
  export type BusinessTransactionsSumFromLedgerRecordsSuccessfulResultResolvers = Pick<Types.BusinessTransactionsSumFromLedgerRecordsSuccessfulResultResolvers, DefinedFields['BusinessTransactionsSumFromLedgerRecordsSuccessfulResult'] | '__isTypeOf'>;
139
149
  export type BusinessTransactionSumResolvers = Pick<Types.BusinessTransactionSumResolvers, DefinedFields['BusinessTransactionSum']>;
140
150
  export type ForeignCurrencySumResolvers = Pick<Types.ForeignCurrencySumResolvers, DefinedFields['ForeignCurrencySum']>;
@@ -176,6 +186,8 @@ export declare namespace FinancialEntitiesModule {
176
186
  Query?: QueryResolvers;
177
187
  Mutation?: MutationResolvers;
178
188
  AdminBusiness?: AdminBusinessResolvers;
189
+ AnnualId?: AnnualIdResolvers;
190
+ TaxAdvancesRate?: TaxAdvancesRateResolvers;
179
191
  BusinessTransactionsSumFromLedgerRecordsSuccessfulResult?: BusinessTransactionsSumFromLedgerRecordsSuccessfulResultResolvers;
180
192
  BusinessTransactionSum?: BusinessTransactionSumResolvers;
181
193
  ForeignCurrencySum?: ForeignCurrencySumResolvers;
@@ -249,13 +261,24 @@ export declare namespace FinancialEntitiesModule {
249
261
  id?: gm.Middleware[];
250
262
  name?: gm.Middleware[];
251
263
  governmentId?: gm.Middleware[];
252
- business?: gm.Middleware[];
253
- withholdingTaxBookNumber?: gm.Middleware[];
254
- withholdingTaxFileNumber?: gm.Middleware[];
255
- socialSecurityEmployerId?: gm.Middleware[];
256
- taxAdvancesRate?: gm.Middleware[];
257
- taxAdvancesId?: gm.Middleware[];
258
264
  registrationDate?: gm.Middleware[];
265
+ business?: gm.Middleware[];
266
+ taxAdvancesAnnualIds?: gm.Middleware[];
267
+ taxAdvancesRates?: gm.Middleware[];
268
+ withholdingTaxCompanyId?: gm.Middleware[];
269
+ withholdingTaxAnnualIds?: gm.Middleware[];
270
+ socialSecurityDeductionsId?: gm.Middleware[];
271
+ socialSecurityEmployerIds?: gm.Middleware[];
272
+ };
273
+ AnnualId?: {
274
+ '*'?: gm.Middleware[];
275
+ year?: gm.Middleware[];
276
+ id?: gm.Middleware[];
277
+ };
278
+ TaxAdvancesRate?: {
279
+ '*'?: gm.Middleware[];
280
+ date?: gm.Middleware[];
281
+ rate?: gm.Middleware[];
259
282
  };
260
283
  LtdFinancialEntity?: {
261
284
  '*'?: gm.Middleware[];
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/modules/financial-entities/__generated__/types.ts"],"names":[],"mappings":"AAEA,MAAM,KAAW,uBAAuB,CAoevC;AApeD,WAAiB,uBAAuB;IA0CrC,CAAC;IAKD,CAAC;IAeD,CAAC;IAuJD,CAAC;IA8QD,CAAC;AACJ,CAAC,EApegB,uBAAuB,KAAvB,uBAAuB,QAoevC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/modules/financial-entities/__generated__/types.ts"],"names":[],"mappings":"AAEA,MAAM,KAAW,uBAAuB,CA2fvC;AA3fD,WAAiB,uBAAuB;IA4CrC,CAAC;IAKD,CAAC;IAiBD,CAAC;IA+JD,CAAC;IAyRD,CAAC;AACJ,CAAC,EA3fgB,uBAAuB,KAAvB,uBAAuB,QA2fvC"}
@@ -0,0 +1,31 @@
1
+ import { z } from 'zod';
2
+ export declare const adminBusinessUpdateSchema: z.ZodObject<{
3
+ id: z.ZodUUID;
4
+ businessRegistrationStartDate: z.ZodOptional<z.ZodISODate>;
5
+ companyTaxId: z.ZodOptional<z.ZodString>;
6
+ advanceTaxRates: z.ZodOptional<z.ZodArray<z.ZodObject<{
7
+ date: z.ZodISODate;
8
+ rate: z.ZodNumber;
9
+ }, z.core.$strict>>>;
10
+ taxAdvancesIds: z.ZodOptional<z.ZodArray<z.ZodObject<{
11
+ year: z.ZodNumber;
12
+ id: z.ZodString;
13
+ }, z.core.$strict>>>;
14
+ socialSecurityEmployerIds: z.ZodOptional<z.ZodArray<z.ZodObject<{
15
+ year: z.ZodNumber;
16
+ id: z.ZodString;
17
+ }, z.core.$strict>>>;
18
+ withholdingTaxAnnualIds: z.ZodOptional<z.ZodArray<z.ZodObject<{
19
+ year: z.ZodNumber;
20
+ id: z.ZodString;
21
+ }, z.core.$strict>>>;
22
+ }, z.core.$strict>;
23
+ export type AdminBusinessUpdateSchema = z.infer<typeof adminBusinessUpdateSchema>;
24
+ export declare const yearlyIdsSchema: z.ZodArray<z.ZodObject<{
25
+ year: z.ZodNumber;
26
+ id: z.ZodString;
27
+ }, z.core.$strict>>;
28
+ export declare const taxAdvancesRatesSchema: z.ZodArray<z.ZodObject<{
29
+ date: z.ZodISODate;
30
+ rate: z.ZodNumber;
31
+ }, z.core.$strict>>;
@@ -0,0 +1,27 @@
1
+ import { z } from 'zod';
2
+ const yearlyIdSchema = z
3
+ .object({
4
+ year: z.number().min(2000).max(2100),
5
+ id: z.string().min(1, { message: 'ID is required' }),
6
+ })
7
+ .strict();
8
+ const taxAdvanceRateSchema = z
9
+ .object({
10
+ date: z.iso.date(),
11
+ rate: z.number().min(0).max(1),
12
+ })
13
+ .strict();
14
+ export const adminBusinessUpdateSchema = z
15
+ .object({
16
+ id: z.uuid(),
17
+ businessRegistrationStartDate: z.iso.date().optional(),
18
+ companyTaxId: z.string().optional(),
19
+ advanceTaxRates: z.array(taxAdvanceRateSchema).optional(),
20
+ taxAdvancesIds: z.array(yearlyIdSchema).optional(),
21
+ socialSecurityEmployerIds: z.array(yearlyIdSchema).optional(),
22
+ withholdingTaxAnnualIds: z.array(yearlyIdSchema).optional(),
23
+ })
24
+ .strict();
25
+ export const yearlyIdsSchema = z.array(yearlyIdSchema);
26
+ export const taxAdvancesRatesSchema = z.array(taxAdvanceRateSchema);
27
+ //# sourceMappingURL=admin-businesses.helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-businesses.helper.js","sourceRoot":"","sources":["../../../../../../src/modules/financial-entities/helpers/admin-businesses.helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,cAAc,GAAG,CAAC;KACrB,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;IACpC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,CAAC;CACrD,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,oBAAoB,GAAG,CAAC;KAC3B,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE;IAClB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CAC/B,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC;KACvC,MAAM,CAAC;IACN,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE;IACZ,6BAA6B,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACtD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,QAAQ,EAAE;IACzD,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,QAAQ,EAAE;IAClD,yBAAyB,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,QAAQ,EAAE;IAC7D,uBAAuB,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,QAAQ,EAAE;CAC5D,CAAC;KACD,MAAM,EAAE,CAAC;AAIZ,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;AAEvD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import DataLoader from 'dataloader';
2
2
  import { DBProvider } from '../../app-providers/db.provider.js';
3
- import type { IGetAllAdminBusinessesResult } from '../types.js';
3
+ import type { IGetAllAdminBusinessesResult, IUpdateAdminBusinessesParams, IUpdateAdminBusinessesResult } from '../types.js';
4
4
  export declare class AdminBusinessesProvider {
5
5
  private dbProvider;
6
6
  cache: {
@@ -16,5 +16,6 @@ export declare class AdminBusinessesProvider {
16
16
  private batchAdminBusinessesByIds;
17
17
  getAdminBusinessByIdLoader: DataLoader<string, import("../types.js").IGetAdminBusinessesByIdsResult | undefined, import("node-cache").Key | import("node-cache").Key[]>;
18
18
  getAllAdminBusinesses(): Promise<IGetAllAdminBusinessesResult[]>;
19
+ updateAdminBusiness(params: IUpdateAdminBusinessesParams): Promise<IUpdateAdminBusinessesResult>;
19
20
  clearCache(): void;
20
21
  }