@accounter/server 0.0.8-alpha-20251029234818-bb69914cb7aaa4859296baa4a256c251158fd15b → 0.0.8-alpha-20251029235231-f14290dbb5dedec255de3cef292d3b4c5c71298e
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 +26 -20
- package/dist/green-invoice-graphql/src/mesh-artifacts/index.d.ts +1 -1
- package/dist/server/src/__generated__/types.d.ts +18 -70
- package/dist/server/src/__generated__/types.js.map +1 -1
- package/dist/server/src/modules/contracts/__generated__/contracts.types.d.ts +0 -5
- package/dist/server/src/modules/financial-entities/__generated__/admin-businesses.types.d.ts +0 -57
- package/dist/server/src/modules/financial-entities/__generated__/admin-businesses.types.js +1 -0
- package/dist/server/src/modules/financial-entities/__generated__/admin-businesses.types.js.map +1 -1
- package/dist/server/src/modules/financial-entities/__generated__/types.d.ts +10 -33
- package/dist/server/src/modules/financial-entities/__generated__/types.js.map +1 -1
- package/dist/server/src/modules/financial-entities/providers/admin-businesses.provider.d.ts +1 -2
- package/dist/server/src/modules/financial-entities/providers/admin-businesses.provider.js +0 -37
- package/dist/server/src/modules/financial-entities/providers/admin-businesses.provider.js.map +1 -1
- package/dist/server/src/modules/financial-entities/resolvers/admin-businesses.resolver.js +11 -46
- package/dist/server/src/modules/financial-entities/resolvers/admin-businesses.resolver.js.map +1 -1
- package/dist/server/src/modules/financial-entities/typeDefs/admin-businesses.graphql.js +16 -49
- package/dist/server/src/modules/financial-entities/typeDefs/admin-businesses.graphql.js.map +1 -1
- package/dist/server/src/modules/financial-entities/types.d.ts +1 -1
- package/package.json +6 -6
- package/src/__generated__/types.ts +18 -76
- package/src/modules/contracts/__generated__/contracts.types.ts +0 -5
- package/src/modules/financial-entities/__generated__/admin-businesses.types.ts +0 -60
- package/src/modules/financial-entities/__generated__/types.ts +10 -33
- package/src/modules/financial-entities/providers/admin-businesses.provider.ts +0 -44
- package/src/modules/financial-entities/resolvers/admin-businesses.resolver.ts +11 -53
- package/src/modules/financial-entities/typeDefs/admin-businesses.graphql.ts +16 -49
- package/src/modules/financial-entities/types.ts +1 -1
- package/dist/server/src/modules/financial-entities/helpers/admin-businesses.helper.d.ts +0 -31
- package/dist/server/src/modules/financial-entities/helpers/admin-businesses.helper.js +0 -27
- package/dist/server/src/modules/financial-entities/helpers/admin-businesses.helper.js.map +0 -1
- package/src/modules/financial-entities/helpers/admin-businesses.helper.ts +0 -33
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @accounter/server
|
|
2
2
|
|
|
3
|
-
## 0.0.8-alpha-
|
|
3
|
+
## 0.0.8-alpha-20251029235231-f14290dbb5dedec255de3cef292d3b4c5c71298e
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
@@ -212,6 +212,25 @@
|
|
|
212
212
|
- Updated dependency [`puppeteer@24.26.1` ↗︎](https://www.npmjs.com/package/puppeteer/v/24.26.1)
|
|
213
213
|
(from `24.26.0`, in `dependencies`)
|
|
214
214
|
|
|
215
|
+
- [#2638](https://github.com/Urigo/accounter-fullstack/pull/2638)
|
|
216
|
+
[`cad4ed9`](https://github.com/Urigo/accounter-fullstack/commit/cad4ed9a12ef09c22d0c55715ba1453a73aa0773)
|
|
217
|
+
Thanks [@renovate](https://github.com/apps/renovate)! - dependencies updates:
|
|
218
|
+
- Updated dependency [`dotenv-cli@11.0.0` ↗︎](https://www.npmjs.com/package/dotenv-cli/v/11.0.0)
|
|
219
|
+
(from `10.0.0`, in `dependencies`)
|
|
220
|
+
|
|
221
|
+
- [#2639](https://github.com/Urigo/accounter-fullstack/pull/2639)
|
|
222
|
+
[`0792f80`](https://github.com/Urigo/accounter-fullstack/commit/0792f80e6c83326e63066e3d51c65cf554cb0a6e)
|
|
223
|
+
Thanks [@renovate](https://github.com/apps/renovate)! - dependencies updates:
|
|
224
|
+
- Updated dependency [`puppeteer@24.27.0` ↗︎](https://www.npmjs.com/package/puppeteer/v/24.27.0)
|
|
225
|
+
(from `24.26.1`, in `dependencies`)
|
|
226
|
+
|
|
227
|
+
- [#2643](https://github.com/Urigo/accounter-fullstack/pull/2643)
|
|
228
|
+
[`485cec8`](https://github.com/Urigo/accounter-fullstack/commit/485cec843689ba4777711231b88d876f1eac7022)
|
|
229
|
+
Thanks [@renovate](https://github.com/apps/renovate)! - dependencies updates:
|
|
230
|
+
- Updated dependency
|
|
231
|
+
[`@envelop/generic-auth@10.0.1` ↗︎](https://www.npmjs.com/package/@envelop/generic-auth/v/10.0.1)
|
|
232
|
+
(from `10.0.0`, in `dependencies`)
|
|
233
|
+
|
|
215
234
|
- [#2631](https://github.com/Urigo/accounter-fullstack/pull/2631)
|
|
216
235
|
[`86c8b3e`](https://github.com/Urigo/accounter-fullstack/commit/86c8b3ebea4e3be0c0e99a108ec1cdad8b39e5d8)
|
|
217
236
|
Thanks [@gilgardosh](https://github.com/gilgardosh)! - - **Database Schema Update**: A new
|
|
@@ -450,21 +469,6 @@
|
|
|
450
469
|
streamline the process of adding new businesses, specifically by simplifying the handling of tax
|
|
451
470
|
category insertions.
|
|
452
471
|
|
|
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
472
|
- [#2640](https://github.com/Urigo/accounter-fullstack/pull/2640)
|
|
469
473
|
[`26618ff`](https://github.com/Urigo/accounter-fullstack/commit/26618ff2d4a47d63e16ecec59f39887f48df52cf)
|
|
470
474
|
Thanks [@gilgardosh](https://github.com/gilgardosh)! - - **Renaming and Restructuring**: Key
|
|
@@ -498,12 +502,14 @@
|
|
|
498
502
|
environment variables have been updated to use optional chaining (`?.`) to safely handle cases
|
|
499
503
|
where the configuration might be `undefined`.
|
|
500
504
|
- Updated dependencies
|
|
501
|
-
[[`
|
|
505
|
+
[[`1ae19c6`](https://github.com/Urigo/accounter-fullstack/commit/1ae19c6f8dabd995120862795284dab6e363dc79),
|
|
506
|
+
[`65e3c7f`](https://github.com/Urigo/accounter-fullstack/commit/65e3c7f01993eb4f41244a40feefefa08b31a4e6),
|
|
502
507
|
[`65e3c7f`](https://github.com/Urigo/accounter-fullstack/commit/65e3c7f01993eb4f41244a40feefefa08b31a4e6),
|
|
503
508
|
[`65e3c7f`](https://github.com/Urigo/accounter-fullstack/commit/65e3c7f01993eb4f41244a40feefefa08b31a4e6)]:
|
|
504
|
-
- @accounter/
|
|
505
|
-
- @accounter/
|
|
506
|
-
- @accounter/
|
|
509
|
+
- @accounter/green-invoice-graphql@0.8.2-alpha-20251029235231-f14290dbb5dedec255de3cef292d3b4c5c71298e
|
|
510
|
+
- @accounter/pcn874-generator@0.6.3-alpha-20251029235231-f14290dbb5dedec255de3cef292d3b4c5c71298e
|
|
511
|
+
- @accounter/shaam-uniform-format-generator@0.2.2-alpha-20251029235231-f14290dbb5dedec255de3cef292d3b4c5c71298e
|
|
512
|
+
- @accounter/shaam6111-generator@0.1.4-alpha-20251029235231-f14290dbb5dedec255de3cef292d3b4c5c71298e
|
|
507
513
|
|
|
508
514
|
## 0.0.7
|
|
509
515
|
|
|
@@ -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 { GreenInvoiceTypes } from './sources/GreenInvoice/types';
|
|
8
7
|
import type { GreenInvoiceNewTypes } from './sources/GreenInvoiceNew/types';
|
|
8
|
+
import type { GreenInvoiceTypes } from './sources/GreenInvoice/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,15 +193,11 @@ 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
|
-
|
|
197
|
-
readonly
|
|
198
|
-
readonly
|
|
199
|
-
|
|
200
|
-
readonly
|
|
201
|
-
readonly taxAdvancesRates: ReadonlyArray<TaxAdvancesRate>;
|
|
202
|
-
readonly withholdingTaxAnnualIds: ReadonlyArray<AnnualId>;
|
|
203
|
-
/** Withholding Tax Info */
|
|
204
|
-
readonly withholdingTaxCompanyId?: Maybe<Scalars['String']['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']>;
|
|
205
201
|
};
|
|
206
202
|
/** defines a tag / category for charge arrangement */
|
|
207
203
|
export type AdminContext = {
|
|
@@ -335,17 +331,6 @@ export type AdminContextInput = {
|
|
|
335
331
|
readonly zkufotExpensesTaxCategoryId?: InputMaybe<Scalars['UUID']['input']>;
|
|
336
332
|
readonly zkufotIncomeTaxCategoryId?: InputMaybe<Scalars['UUID']['input']>;
|
|
337
333
|
};
|
|
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
|
-
};
|
|
349
334
|
/** Audit opinion type enum (חוות דעת) */
|
|
350
335
|
export type AuditOpinionType =
|
|
351
336
|
/** Adverse opinion (שלילית) */
|
|
@@ -1122,12 +1107,12 @@ export type Country = {
|
|
|
1122
1107
|
/** Input type for creating a new admin business. */
|
|
1123
1108
|
export type CreateAdminBusinessInput = {
|
|
1124
1109
|
readonly businessId: Scalars['UUID']['input'];
|
|
1125
|
-
readonly companyTaxId: Scalars['String']['input'];
|
|
1126
1110
|
readonly registrationDate: Scalars['TimelessDate']['input'];
|
|
1127
1111
|
readonly socialSecurityEmployerId?: InputMaybe<Scalars['String']['input']>;
|
|
1128
|
-
readonly
|
|
1112
|
+
readonly taxAdvancesId?: InputMaybe<Scalars['String']['input']>;
|
|
1129
1113
|
readonly taxAdvancesRate?: InputMaybe<Scalars['Float']['input']>;
|
|
1130
|
-
readonly
|
|
1114
|
+
readonly withholdingTaxBookNumber?: InputMaybe<Scalars['String']['input']>;
|
|
1115
|
+
readonly withholdingTaxFileNumber?: InputMaybe<Scalars['String']['input']>;
|
|
1131
1116
|
};
|
|
1132
1117
|
/** input for creating a new contract */
|
|
1133
1118
|
export type CreateContractInput = {
|
|
@@ -3556,17 +3541,6 @@ export type Tag = {
|
|
|
3556
3541
|
export type TagInput = {
|
|
3557
3542
|
readonly id: Scalars['String']['input'];
|
|
3558
3543
|
};
|
|
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
|
-
};
|
|
3570
3544
|
/** Tax category entity used for ledger records */
|
|
3571
3545
|
export type TaxCategory = FinancialEntity & {
|
|
3572
3546
|
readonly __typename?: 'TaxCategory';
|
|
@@ -3681,17 +3655,12 @@ export type Unprocessed = Document & Linkable & {
|
|
|
3681
3655
|
};
|
|
3682
3656
|
/** Input type for updating admin business details. */
|
|
3683
3657
|
export type UpdateAdminBusinessInput = {
|
|
3684
|
-
readonly governmentId?: InputMaybe<Scalars['String']['input']>;
|
|
3685
|
-
readonly name?: InputMaybe<Scalars['String']['input']>;
|
|
3686
3658
|
readonly registrationDate?: InputMaybe<Scalars['TimelessDate']['input']>;
|
|
3687
|
-
|
|
3688
|
-
readonly
|
|
3689
|
-
|
|
3690
|
-
readonly
|
|
3691
|
-
readonly
|
|
3692
|
-
readonly withholdingTaxAnnualIds?: InputMaybe<ReadonlyArray<AnnualIdInput>>;
|
|
3693
|
-
/** Withholding Tax Info */
|
|
3694
|
-
readonly withholdingTaxCompanyId?: InputMaybe<Scalars['String']['input']>;
|
|
3659
|
+
readonly socialSecurityEmployerId?: InputMaybe<Scalars['String']['input']>;
|
|
3660
|
+
readonly taxAdvancesId?: InputMaybe<Scalars['String']['input']>;
|
|
3661
|
+
readonly taxAdvancesRate?: InputMaybe<Scalars['Float']['input']>;
|
|
3662
|
+
readonly withholdingTaxBookNumber?: InputMaybe<Scalars['String']['input']>;
|
|
3663
|
+
readonly withholdingTaxFileNumber?: InputMaybe<Scalars['String']['input']>;
|
|
3695
3664
|
};
|
|
3696
3665
|
/** input for updateBusiness */
|
|
3697
3666
|
export type UpdateBusinessInput = {
|
|
@@ -4123,8 +4092,6 @@ export type ResolversTypes = {
|
|
|
4123
4092
|
AdminBusiness: ResolverTypeWrapper<IGetAllAdminBusinessesResult>;
|
|
4124
4093
|
AdminContext: ResolverTypeWrapper<IGetAdminContextsResult>;
|
|
4125
4094
|
AdminContextInput: AdminContextInput;
|
|
4126
|
-
AnnualId: ResolverTypeWrapper<AnnualId>;
|
|
4127
|
-
AnnualIdInput: AnnualIdInput;
|
|
4128
4095
|
AuditOpinionType: AuditOpinionType;
|
|
4129
4096
|
BalanceTransactions: ResolverTypeWrapper<IGetNormalizedBalanceTransactionsResult>;
|
|
4130
4097
|
BankDeposit: ResolverTypeWrapper<Omit<BankDeposit, 'transactions'> & {
|
|
@@ -4394,8 +4361,6 @@ export type ResolversTypes = {
|
|
|
4394
4361
|
SuggestionsInput: SuggestionsInput;
|
|
4395
4362
|
Tag: ResolverTypeWrapper<IGetAllTagsResult>;
|
|
4396
4363
|
TagInput: TagInput;
|
|
4397
|
-
TaxAdvancesRate: ResolverTypeWrapper<TaxAdvancesRate>;
|
|
4398
|
-
TaxAdvancesRateInput: TaxAdvancesRateInput;
|
|
4399
4364
|
TaxCategory: ResolverTypeWrapper<IGetAllTaxCategoriesResult>;
|
|
4400
4365
|
TaxReport: ResolverTypeWrapper<Omit<TaxReport, 'reference' | 'report'> & {
|
|
4401
4366
|
reference: ReadonlyArray<ResolversTypes['TaxReportYear']>;
|
|
@@ -4494,8 +4459,6 @@ export type ResolversParentTypes = {
|
|
|
4494
4459
|
AdminBusiness: IGetAllAdminBusinessesResult;
|
|
4495
4460
|
AdminContext: IGetAdminContextsResult;
|
|
4496
4461
|
AdminContextInput: AdminContextInput;
|
|
4497
|
-
AnnualId: AnnualId;
|
|
4498
|
-
AnnualIdInput: AnnualIdInput;
|
|
4499
4462
|
BalanceTransactions: IGetNormalizedBalanceTransactionsResult;
|
|
4500
4463
|
BankDeposit: Omit<BankDeposit, 'transactions'> & {
|
|
4501
4464
|
transactions: ReadonlyArray<ResolversParentTypes['Transaction']>;
|
|
@@ -4730,8 +4693,6 @@ export type ResolversParentTypes = {
|
|
|
4730
4693
|
SuggestionsInput: SuggestionsInput;
|
|
4731
4694
|
Tag: IGetAllTagsResult;
|
|
4732
4695
|
TagInput: TagInput;
|
|
4733
|
-
TaxAdvancesRate: TaxAdvancesRate;
|
|
4734
|
-
TaxAdvancesRateInput: TaxAdvancesRateInput;
|
|
4735
4696
|
TaxCategory: IGetAllTaxCategoriesResult;
|
|
4736
4697
|
TaxReport: Omit<TaxReport, 'reference' | 'report'> & {
|
|
4737
4698
|
reference: ReadonlyArray<ResolversParentTypes['TaxReportYear']>;
|
|
@@ -4833,12 +4794,11 @@ export type AdminBusinessResolvers<ContextType = GraphQLModules.Context, ParentT
|
|
|
4833
4794
|
id?: Resolver<ResolversTypes['UUID'], ParentType, ContextType>;
|
|
4834
4795
|
name?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
4835
4796
|
registrationDate?: Resolver<ResolversTypes['TimelessDate'], ParentType, ContextType>;
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
withholdingTaxCompanyId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
4797
|
+
socialSecurityEmployerId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
4798
|
+
taxAdvancesId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
4799
|
+
taxAdvancesRate?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
|
|
4800
|
+
withholdingTaxBookNumber?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
4801
|
+
withholdingTaxFileNumber?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
4842
4802
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
4843
4803
|
};
|
|
4844
4804
|
export type AdminContextResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['AdminContext'] = ResolversParentTypes['AdminContext']> = {
|
|
@@ -4907,11 +4867,6 @@ export type AdminContextResolvers<ContextType = GraphQLModules.Context, ParentTy
|
|
|
4907
4867
|
zkufotIncomeTaxCategory?: Resolver<Maybe<ResolversTypes['TaxCategory']>, ParentType, ContextType>;
|
|
4908
4868
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
4909
4869
|
};
|
|
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
|
-
};
|
|
4915
4870
|
export type BalanceTransactionsResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['BalanceTransactions'] = ResolversParentTypes['BalanceTransactions']> = {
|
|
4916
4871
|
amount?: Resolver<ResolversTypes['FinancialAmount'], ParentType, ContextType>;
|
|
4917
4872
|
amountUsd?: Resolver<ResolversTypes['FinancialAmount'], ParentType, ContextType>;
|
|
@@ -6706,11 +6661,6 @@ export type TagResolvers<ContextType = GraphQLModules.Context, ParentType extend
|
|
|
6706
6661
|
parent?: Resolver<Maybe<ResolversTypes['Tag']>, ParentType, ContextType>;
|
|
6707
6662
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
6708
6663
|
};
|
|
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
|
-
};
|
|
6714
6664
|
export type TaxCategoryResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['TaxCategory'] = ResolversParentTypes['TaxCategory']> = {
|
|
6715
6665
|
createdAt?: Resolver<ResolversTypes['DateTime'], ParentType, ContextType>;
|
|
6716
6666
|
id?: Resolver<ResolversTypes['UUID'], ParentType, ContextType>;
|
|
@@ -6943,7 +6893,6 @@ export type YearlyLedgerReportFinancialEntityInfoResolvers<ContextType = GraphQL
|
|
|
6943
6893
|
export type Resolvers<ContextType = GraphQLModules.Context> = {
|
|
6944
6894
|
AdminBusiness?: AdminBusinessResolvers<ContextType>;
|
|
6945
6895
|
AdminContext?: AdminContextResolvers<ContextType>;
|
|
6946
|
-
AnnualId?: AnnualIdResolvers<ContextType>;
|
|
6947
6896
|
BalanceTransactions?: BalanceTransactionsResolvers<ContextType>;
|
|
6948
6897
|
BankDeposit?: BankDepositResolvers<ContextType>;
|
|
6949
6898
|
BankDepositCharge?: BankDepositChargeResolvers<ContextType>;
|
|
@@ -7089,7 +7038,6 @@ export type Resolvers<ContextType = GraphQLModules.Context> = {
|
|
|
7089
7038
|
Suggestions?: SuggestionsResolvers<ContextType>;
|
|
7090
7039
|
SuggestionsEmailListenerConfig?: SuggestionsEmailListenerConfigResolvers<ContextType>;
|
|
7091
7040
|
Tag?: TagResolvers<ContextType>;
|
|
7092
|
-
TaxAdvancesRate?: TaxAdvancesRateResolvers<ContextType>;
|
|
7093
7041
|
TaxCategory?: TaxCategoryResolvers<ContextType>;
|
|
7094
7042
|
TaxReport?: TaxReportResolvers<ContextType>;
|
|
7095
7043
|
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;
|
|
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;AA23D7B,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -20,7 +20,6 @@ export interface IGetAllOpenContractsResult {
|
|
|
20
20
|
operations_count: string;
|
|
21
21
|
plan: string | null;
|
|
22
22
|
product: string | null;
|
|
23
|
-
purchase_order: string | null;
|
|
24
23
|
purchase_orders: stringArray;
|
|
25
24
|
remarks: string | null;
|
|
26
25
|
signed_agreement: string | null;
|
|
@@ -49,7 +48,6 @@ export interface IGetContractsByIdsResult {
|
|
|
49
48
|
operations_count: string;
|
|
50
49
|
plan: string | null;
|
|
51
50
|
product: string | null;
|
|
52
|
-
purchase_order: string | null;
|
|
53
51
|
purchase_orders: stringArray;
|
|
54
52
|
remarks: string | null;
|
|
55
53
|
signed_agreement: string | null;
|
|
@@ -78,7 +76,6 @@ export interface IGetContractsByClientIdsResult {
|
|
|
78
76
|
operations_count: string;
|
|
79
77
|
plan: string | null;
|
|
80
78
|
product: string | null;
|
|
81
|
-
purchase_order: string | null;
|
|
82
79
|
purchase_orders: stringArray;
|
|
83
80
|
remarks: string | null;
|
|
84
81
|
signed_agreement: string | null;
|
|
@@ -132,7 +129,6 @@ export interface IUpdateContractResult {
|
|
|
132
129
|
operations_count: string;
|
|
133
130
|
plan: string | null;
|
|
134
131
|
product: string | null;
|
|
135
|
-
purchase_order: string | null;
|
|
136
132
|
purchase_orders: stringArray;
|
|
137
133
|
remarks: string | null;
|
|
138
134
|
signed_agreement: string | null;
|
|
@@ -174,7 +170,6 @@ export interface IInsertContractResult {
|
|
|
174
170
|
operations_count: string;
|
|
175
171
|
plan: string | null;
|
|
176
172
|
product: string | null;
|
|
177
|
-
purchase_order: string | null;
|
|
178
173
|
purchase_orders: stringArray;
|
|
179
174
|
remarks: string | null;
|
|
180
175
|
signed_agreement: string | null;
|
package/dist/server/src/modules/financial-entities/__generated__/admin-businesses.types.d.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
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)[];
|
|
7
2
|
/** 'GetAdminBusinessesByIds' parameters type */
|
|
8
3
|
export interface IGetAdminBusinessesByIdsParams {
|
|
9
4
|
ids: readonly (string | null | void)[];
|
|
@@ -11,9 +6,6 @@ export interface IGetAdminBusinessesByIdsParams {
|
|
|
11
6
|
/** 'GetAdminBusinessesByIds' return type */
|
|
12
7
|
export interface IGetAdminBusinessesByIdsResult {
|
|
13
8
|
advance_tax_rate: number | null;
|
|
14
|
-
advance_tax_rates: JsonArray;
|
|
15
|
-
business_registration_start_date: Date | null;
|
|
16
|
-
company_tax_id: string | null;
|
|
17
9
|
id: string;
|
|
18
10
|
name: string;
|
|
19
11
|
nikuim: string | null;
|
|
@@ -21,8 +13,6 @@ export interface IGetAdminBusinessesByIdsResult {
|
|
|
21
13
|
pinkas_social_security_2021: string | null;
|
|
22
14
|
pinkas_social_security_2022: string | null;
|
|
23
15
|
registration_date: Date | null;
|
|
24
|
-
social_security_employer_ids: JsonArray;
|
|
25
|
-
tax_advances_ids: JsonArray;
|
|
26
16
|
tax_nikuim_pinkas_number: string | null;
|
|
27
17
|
tax_pinkas_number_2020: string | null;
|
|
28
18
|
tax_siduri_number_2021: string | null;
|
|
@@ -31,7 +21,6 @@ export interface IGetAdminBusinessesByIdsResult {
|
|
|
31
21
|
vat_number: string | null;
|
|
32
22
|
vat_report_cadence: number | null;
|
|
33
23
|
website_login_screenshot: string | null;
|
|
34
|
-
withholding_tax_annual_ids: JsonArray;
|
|
35
24
|
wizcloud_company_id: string | null;
|
|
36
25
|
wizcloud_token: string | null;
|
|
37
26
|
}
|
|
@@ -45,9 +34,6 @@ export type IGetAllAdminBusinessesParams = void;
|
|
|
45
34
|
/** 'GetAllAdminBusinesses' return type */
|
|
46
35
|
export interface IGetAllAdminBusinessesResult {
|
|
47
36
|
advance_tax_rate: number | null;
|
|
48
|
-
advance_tax_rates: JsonArray;
|
|
49
|
-
business_registration_start_date: Date | null;
|
|
50
|
-
company_tax_id: string | null;
|
|
51
37
|
id: string;
|
|
52
38
|
name: string;
|
|
53
39
|
nikuim: string | null;
|
|
@@ -55,8 +41,6 @@ export interface IGetAllAdminBusinessesResult {
|
|
|
55
41
|
pinkas_social_security_2021: string | null;
|
|
56
42
|
pinkas_social_security_2022: string | null;
|
|
57
43
|
registration_date: Date | null;
|
|
58
|
-
social_security_employer_ids: JsonArray;
|
|
59
|
-
tax_advances_ids: JsonArray;
|
|
60
44
|
tax_nikuim_pinkas_number: string | null;
|
|
61
45
|
tax_pinkas_number_2020: string | null;
|
|
62
46
|
tax_siduri_number_2021: string | null;
|
|
@@ -65,7 +49,6 @@ export interface IGetAllAdminBusinessesResult {
|
|
|
65
49
|
vat_number: string | null;
|
|
66
50
|
vat_report_cadence: number | null;
|
|
67
51
|
website_login_screenshot: string | null;
|
|
68
|
-
withholding_tax_annual_ids: JsonArray;
|
|
69
52
|
wizcloud_company_id: string | null;
|
|
70
53
|
wizcloud_token: string | null;
|
|
71
54
|
}
|
|
@@ -74,43 +57,3 @@ export interface IGetAllAdminBusinessesQuery {
|
|
|
74
57
|
params: IGetAllAdminBusinessesParams;
|
|
75
58
|
result: IGetAllAdminBusinessesResult;
|
|
76
59
|
}
|
|
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
|
-
}
|
package/dist/server/src/modules/financial-entities/__generated__/admin-businesses.types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-businesses.types.js","sourceRoot":"","sources":["../../../../../../src/modules/financial-entities/__generated__/admin-businesses.types.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"admin-businesses.types.js","sourceRoot":"","sources":["../../../../../../src/modules/financial-entities/__generated__/admin-businesses.types.ts"],"names":[],"mappings":"AAAA,mHAAmH"}
|
|
@@ -4,9 +4,7 @@ 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' | '
|
|
8
|
-
AnnualId: 'year' | 'id';
|
|
9
|
-
TaxAdvancesRate: 'date' | 'rate';
|
|
7
|
+
AdminBusiness: 'id' | 'name' | 'governmentId' | 'business' | 'withholdingTaxBookNumber' | 'withholdingTaxFileNumber' | 'socialSecurityEmployerId' | 'taxAdvancesRate' | 'taxAdvancesId' | 'registrationDate';
|
|
10
8
|
BusinessTransactionsSumFromLedgerRecordsSuccessfulResult: 'businessTransactionsSum';
|
|
11
9
|
BusinessTransactionSum: 'business' | 'credit' | 'debit' | 'total' | 'foreignCurrenciesSum';
|
|
12
10
|
ForeignCurrencySum: 'credit' | 'debit' | 'total' | 'currency';
|
|
@@ -50,10 +48,8 @@ export declare namespace FinancialEntitiesModule {
|
|
|
50
48
|
EmailAttachmentType: 'PDF' | 'PNG' | 'JPEG';
|
|
51
49
|
}
|
|
52
50
|
interface DefinedInputFields {
|
|
53
|
-
CreateAdminBusinessInput: 'businessId' | '
|
|
54
|
-
UpdateAdminBusinessInput: '
|
|
55
|
-
AnnualIdInput: 'year' | 'id';
|
|
56
|
-
TaxAdvancesRateInput: 'date' | 'rate';
|
|
51
|
+
CreateAdminBusinessInput: 'businessId' | 'withholdingTaxBookNumber' | 'withholdingTaxFileNumber' | 'socialSecurityEmployerId' | 'taxAdvancesRate' | 'taxAdvancesId' | 'registrationDate';
|
|
52
|
+
UpdateAdminBusinessInput: 'withholdingTaxBookNumber' | 'withholdingTaxFileNumber' | 'socialSecurityEmployerId' | 'taxAdvancesRate' | 'taxAdvancesId' | 'registrationDate';
|
|
57
53
|
BusinessTransactionsFilter: 'businessIDs' | 'ownerIds' | 'type' | 'fromDate' | 'toDate' | 'includeRevaluation';
|
|
58
54
|
UpdateBusinessInput: 'name' | 'sortCode' | 'country' | 'hebrewName' | 'address' | 'email' | 'website' | 'phoneNumber' | 'governmentId' | 'taxCategory' | 'exemptDealer' | 'suggestions' | 'optionalVAT' | 'isReceiptEnough' | 'isDocumentsOptional' | 'pcn874RecordType' | 'irsCode' | 'isActive';
|
|
59
55
|
InsertNewBusinessInput: 'name' | 'sortCode' | 'country' | 'hebrewName' | 'address' | 'email' | 'website' | 'phoneNumber' | 'governmentId' | 'taxCategory' | 'exemptDealer' | 'suggestions' | 'optionalVAT' | 'isReceiptEnough' | 'isDocumentsOptional' | 'pcn874RecordType' | 'irsCode' | 'isActive';
|
|
@@ -71,12 +67,8 @@ export declare namespace FinancialEntitiesModule {
|
|
|
71
67
|
export type Mutation = Pick<Types.Mutation, DefinedFields['Mutation']>;
|
|
72
68
|
export type CreateAdminBusinessInput = Pick<Types.CreateAdminBusinessInput, DefinedInputFields['CreateAdminBusinessInput']>;
|
|
73
69
|
export type UpdateAdminBusinessInput = Pick<Types.UpdateAdminBusinessInput, DefinedInputFields['UpdateAdminBusinessInput']>;
|
|
74
|
-
export type TimelessDate = Types.TimelessDate;
|
|
75
70
|
export type LtdFinancialEntity = Pick<Types.LtdFinancialEntity, DefinedFields['LtdFinancialEntity']>;
|
|
76
|
-
export type
|
|
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']>;
|
|
71
|
+
export type TimelessDate = Types.TimelessDate;
|
|
80
72
|
export type BusinessTransactionsSumFromLedgerRecordsResult = Types.BusinessTransactionsSumFromLedgerRecordsResult;
|
|
81
73
|
export type BusinessTransactionsFilter = Pick<Types.BusinessTransactionsFilter, DefinedInputFields['BusinessTransactionsFilter']>;
|
|
82
74
|
export type BusinessTransactionsFromLedgerRecordsResult = Types.BusinessTransactionsFromLedgerRecordsResult;
|
|
@@ -143,8 +135,6 @@ export declare namespace FinancialEntitiesModule {
|
|
|
143
135
|
export type QueryResolvers = Pick<Types.QueryResolvers, DefinedFields['Query']>;
|
|
144
136
|
export type MutationResolvers = Pick<Types.MutationResolvers, DefinedFields['Mutation']>;
|
|
145
137
|
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']>;
|
|
148
138
|
export type BusinessTransactionsSumFromLedgerRecordsSuccessfulResultResolvers = Pick<Types.BusinessTransactionsSumFromLedgerRecordsSuccessfulResultResolvers, DefinedFields['BusinessTransactionsSumFromLedgerRecordsSuccessfulResult'] | '__isTypeOf'>;
|
|
149
139
|
export type BusinessTransactionSumResolvers = Pick<Types.BusinessTransactionSumResolvers, DefinedFields['BusinessTransactionSum']>;
|
|
150
140
|
export type ForeignCurrencySumResolvers = Pick<Types.ForeignCurrencySumResolvers, DefinedFields['ForeignCurrencySum']>;
|
|
@@ -186,8 +176,6 @@ export declare namespace FinancialEntitiesModule {
|
|
|
186
176
|
Query?: QueryResolvers;
|
|
187
177
|
Mutation?: MutationResolvers;
|
|
188
178
|
AdminBusiness?: AdminBusinessResolvers;
|
|
189
|
-
AnnualId?: AnnualIdResolvers;
|
|
190
|
-
TaxAdvancesRate?: TaxAdvancesRateResolvers;
|
|
191
179
|
BusinessTransactionsSumFromLedgerRecordsSuccessfulResult?: BusinessTransactionsSumFromLedgerRecordsSuccessfulResultResolvers;
|
|
192
180
|
BusinessTransactionSum?: BusinessTransactionSumResolvers;
|
|
193
181
|
ForeignCurrencySum?: ForeignCurrencySumResolvers;
|
|
@@ -261,24 +249,13 @@ export declare namespace FinancialEntitiesModule {
|
|
|
261
249
|
id?: gm.Middleware[];
|
|
262
250
|
name?: gm.Middleware[];
|
|
263
251
|
governmentId?: gm.Middleware[];
|
|
264
|
-
registrationDate?: gm.Middleware[];
|
|
265
252
|
business?: gm.Middleware[];
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
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[];
|
|
253
|
+
withholdingTaxBookNumber?: gm.Middleware[];
|
|
254
|
+
withholdingTaxFileNumber?: gm.Middleware[];
|
|
255
|
+
socialSecurityEmployerId?: gm.Middleware[];
|
|
256
|
+
taxAdvancesRate?: gm.Middleware[];
|
|
257
|
+
taxAdvancesId?: gm.Middleware[];
|
|
258
|
+
registrationDate?: gm.Middleware[];
|
|
282
259
|
};
|
|
283
260
|
LtdFinancialEntity?: {
|
|
284
261
|
'*'?: 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,
|
|
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,6 +1,6 @@
|
|
|
1
1
|
import DataLoader from 'dataloader';
|
|
2
2
|
import { DBProvider } from '../../app-providers/db.provider.js';
|
|
3
|
-
import type { IGetAllAdminBusinessesResult
|
|
3
|
+
import type { IGetAllAdminBusinessesResult } from '../types.js';
|
|
4
4
|
export declare class AdminBusinessesProvider {
|
|
5
5
|
private dbProvider;
|
|
6
6
|
cache: {
|
|
@@ -16,6 +16,5 @@ 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>;
|
|
20
19
|
clearCache(): void;
|
|
21
20
|
}
|
|
@@ -4,7 +4,6 @@ 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';
|
|
8
7
|
const getAdminBusinessesByIds = sql `
|
|
9
8
|
SELECT ab.*, f.name, b.vat_number
|
|
10
9
|
FROM accounter_schema.businesses_admin ab
|
|
@@ -22,36 +21,6 @@ const getAllAdminBusinesses = sql `
|
|
|
22
21
|
USING (id)
|
|
23
22
|
INNER JOIN accounter_schema.financial_entities fe
|
|
24
23
|
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 *;`;
|
|
55
24
|
let AdminBusinessesProvider = class AdminBusinessesProvider {
|
|
56
25
|
dbProvider;
|
|
57
26
|
cache = getCacheInstance({
|
|
@@ -81,12 +50,6 @@ let AdminBusinessesProvider = class AdminBusinessesProvider {
|
|
|
81
50
|
return result;
|
|
82
51
|
});
|
|
83
52
|
}
|
|
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
|
-
}
|
|
90
53
|
clearCache() {
|
|
91
54
|
this.cache.clear();
|
|
92
55
|
}
|
package/dist/server/src/modules/financial-entities/providers/admin-businesses.provider.js.map
CHANGED
|
@@ -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;
|
|
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"}
|