@accounter/server 0.0.8-alpha-20251022132444-51d3ebadb2849ea323e03b88c735cdca4f91db7d → 0.0.8-alpha-20251022162652-6facbcde08fdda0fb354ba7105432df320367509
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 +27 -4
- package/dist/server/src/__generated__/types.d.ts +52 -0
- package/dist/server/src/__generated__/types.js.map +1 -1
- package/dist/server/src/modules/financial-entities/__generated__/types.d.ts +55 -42
- package/dist/server/src/modules/financial-entities/__generated__/types.js.map +1 -1
- package/dist/server/src/modules/financial-entities/resolvers/admin-businesses.resolver.js +19 -0
- 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 +36 -0
- package/dist/server/src/modules/financial-entities/typeDefs/admin-businesses.graphql.js.map +1 -1
- package/package.json +2 -2
- package/src/__generated__/types.ts +60 -0
- package/src/modules/financial-entities/__generated__/types.ts +55 -42
- package/src/modules/financial-entities/resolvers/admin-businesses.resolver.ts +20 -0
- package/src/modules/financial-entities/typeDefs/admin-businesses.graphql.ts +36 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @accounter/server
|
|
2
2
|
|
|
3
|
-
## 0.0.8-alpha-
|
|
3
|
+
## 0.0.8-alpha-20251022162652-6facbcde08fdda0fb354ba7105432df320367509
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
@@ -140,6 +140,12 @@
|
|
|
140
140
|
[`@ai-sdk/anthropic@2.0.35` ↗︎](https://www.npmjs.com/package/@ai-sdk/anthropic/v/2.0.35) (from
|
|
141
141
|
`2.0.34`, in `dependencies`)
|
|
142
142
|
|
|
143
|
+
- [#2605](https://github.com/Urigo/accounter-fullstack/pull/2605)
|
|
144
|
+
[`7d9f1ae`](https://github.com/Urigo/accounter-fullstack/commit/7d9f1ae5ba5a047d8228099de8ed84e7c13fbdc0)
|
|
145
|
+
Thanks [@gilgardosh](https://github.com/gilgardosh)! - dependencies updates:
|
|
146
|
+
- Updated dependency [`puppeteer@24.26.0` ↗︎](https://www.npmjs.com/package/puppeteer/v/24.26.0)
|
|
147
|
+
(from `24.25.0`, in `dependencies`)
|
|
148
|
+
|
|
143
149
|
- [#2551](https://github.com/Urigo/accounter-fullstack/pull/2551)
|
|
144
150
|
[`14900d1`](https://github.com/Urigo/accounter-fullstack/commit/14900d10209272429118ff4bd2e52893c813170b)
|
|
145
151
|
Thanks [@gilgardosh](https://github.com/gilgardosh)! - - **Error Handling Standardization**: The
|
|
@@ -282,6 +288,23 @@
|
|
|
282
288
|
`documents.resolver.ts` and `green-invoice.helper.ts`, new document insertions explicitly set
|
|
283
289
|
`fileHash` to `null` where the hash is not generated at that specific point in the workflow.
|
|
284
290
|
|
|
291
|
+
- [#2605](https://github.com/Urigo/accounter-fullstack/pull/2605)
|
|
292
|
+
[`da6cc9b`](https://github.com/Urigo/accounter-fullstack/commit/da6cc9bc05d1bee5cfd1f0902808ceaa0bfa6fc1)
|
|
293
|
+
Thanks [@gilgardosh](https://github.com/gilgardosh)! - - **New Admin Business Configuration Tab**:
|
|
294
|
+
Introduced a dedicated "Admin" tab within the business details page to manage administrative
|
|
295
|
+
financial information.
|
|
296
|
+
- **Frontend Component Development**: A new `AdminBusinessSection` React component was created,
|
|
297
|
+
featuring a form for various tax and registration details, with client-side validation using
|
|
298
|
+
`zod` and `react-hook-form`.
|
|
299
|
+
- **GraphQL API Extension**: New GraphQL types (`CreateAdminBusinessInput`,
|
|
300
|
+
`UpdateAdminBusinessInput`) and mutations (`createAdminBusiness`, `updateAdminBusiness`,
|
|
301
|
+
`deleteAdminBusiness`) were added to the backend to support the management of admin business
|
|
302
|
+
data.
|
|
303
|
+
- **Data Fetching and Update Logic**: A new `useUpdateAdminBusiness` hook was implemented on the
|
|
304
|
+
frontend to interact with the new GraphQL mutations, handling data submission and user feedback.
|
|
305
|
+
- **Backend Resolver Implementation**: Server-side resolvers were updated to expose administrative
|
|
306
|
+
business fields and handle the logic for fetching and updating this data.
|
|
307
|
+
|
|
285
308
|
- [#2561](https://github.com/Urigo/accounter-fullstack/pull/2561)
|
|
286
309
|
[`e853097`](https://github.com/Urigo/accounter-fullstack/commit/e853097bbe987be8292981c527ba49562bf2f28b)
|
|
287
310
|
Thanks [@gilgardosh](https://github.com/gilgardosh)! - - **Refactored Ledger Storage Helper**: The
|
|
@@ -317,9 +340,9 @@
|
|
|
317
340
|
[[`65e3c7f`](https://github.com/Urigo/accounter-fullstack/commit/65e3c7f01993eb4f41244a40feefefa08b31a4e6),
|
|
318
341
|
[`65e3c7f`](https://github.com/Urigo/accounter-fullstack/commit/65e3c7f01993eb4f41244a40feefefa08b31a4e6),
|
|
319
342
|
[`65e3c7f`](https://github.com/Urigo/accounter-fullstack/commit/65e3c7f01993eb4f41244a40feefefa08b31a4e6)]:
|
|
320
|
-
- @accounter/pcn874-generator@0.6.3-alpha-
|
|
321
|
-
- @accounter/shaam-uniform-format-generator@0.2.2-alpha-
|
|
322
|
-
- @accounter/shaam6111-generator@0.1.4-alpha-
|
|
343
|
+
- @accounter/pcn874-generator@0.6.3-alpha-20251022162652-6facbcde08fdda0fb354ba7105432df320367509
|
|
344
|
+
- @accounter/shaam-uniform-format-generator@0.2.2-alpha-20251022162652-6facbcde08fdda0fb354ba7105432df320367509
|
|
345
|
+
- @accounter/shaam6111-generator@0.1.4-alpha-20251022162652-6facbcde08fdda0fb354ba7105432df320367509
|
|
323
346
|
|
|
324
347
|
## 0.0.7
|
|
325
348
|
|
|
@@ -188,10 +188,15 @@ export type AddBusinessTripTravelAndSubsistenceExpenseInput = {
|
|
|
188
188
|
/** Represents a business entity managed by an accountant in the system. */
|
|
189
189
|
export type AdminBusiness = {
|
|
190
190
|
readonly __typename?: 'AdminBusiness';
|
|
191
|
+
readonly advanceTaxRate?: Maybe<Scalars['Float']['output']>;
|
|
191
192
|
readonly business: LtdFinancialEntity;
|
|
193
|
+
readonly employerWithholdingTaxAccountNumber?: Maybe<Scalars['String']['output']>;
|
|
192
194
|
readonly governmentId: Scalars['String']['output'];
|
|
193
195
|
readonly id: Scalars['UUID']['output'];
|
|
194
196
|
readonly name: Scalars['String']['output'];
|
|
197
|
+
readonly nationalInsuranceEmployerId?: Maybe<Scalars['String']['output']>;
|
|
198
|
+
readonly registrationDate: Scalars['TimelessDate']['output'];
|
|
199
|
+
readonly taxPrepaymentId?: Maybe<Scalars['String']['output']>;
|
|
195
200
|
};
|
|
196
201
|
/** defines a tag / category for charge arrangement */
|
|
197
202
|
export type AdminContext = {
|
|
@@ -1097,6 +1102,15 @@ export type Country = {
|
|
|
1097
1102
|
readonly id: Scalars['ID']['output'];
|
|
1098
1103
|
readonly name: Scalars['String']['output'];
|
|
1099
1104
|
};
|
|
1105
|
+
/** Input type for creating a new admin business. */
|
|
1106
|
+
export type CreateAdminBusinessInput = {
|
|
1107
|
+
readonly advanceTaxRate?: InputMaybe<Scalars['Float']['input']>;
|
|
1108
|
+
readonly businessId: Scalars['UUID']['input'];
|
|
1109
|
+
readonly employerWithholdingTaxAccountNumber?: InputMaybe<Scalars['String']['input']>;
|
|
1110
|
+
readonly nationalInsuranceEmployerId?: InputMaybe<Scalars['String']['input']>;
|
|
1111
|
+
readonly registrationDate: Scalars['TimelessDate']['input'];
|
|
1112
|
+
readonly taxPrepaymentId?: InputMaybe<Scalars['String']['input']>;
|
|
1113
|
+
};
|
|
1100
1114
|
/** input for creating a new contract */
|
|
1101
1115
|
export type CreateContractInput = {
|
|
1102
1116
|
readonly amount: FinancialAmountInput;
|
|
@@ -2008,6 +2022,7 @@ export type LtdFinancialEntity = Business & FinancialEntity & {
|
|
|
2008
2022
|
readonly __typename?: 'LtdFinancialEntity';
|
|
2009
2023
|
readonly accounts: ReadonlyArray<FinancialAccount>;
|
|
2010
2024
|
readonly address?: Maybe<Scalars['String']['output']>;
|
|
2025
|
+
readonly adminInfo?: Maybe<AdminBusiness>;
|
|
2011
2026
|
readonly charges: PaginatedCharges;
|
|
2012
2027
|
readonly clientInfo?: Maybe<Client>;
|
|
2013
2028
|
readonly country: Scalars['String']['output'];
|
|
@@ -2116,8 +2131,10 @@ export type Mutation = {
|
|
|
2116
2131
|
readonly categorizeBusinessTripExpense: Scalars['UUID']['output'];
|
|
2117
2132
|
readonly categorizeIntoExistingBusinessTripExpense: Scalars['UUID']['output'];
|
|
2118
2133
|
readonly closeDocument: Scalars['Boolean']['output'];
|
|
2134
|
+
readonly createAdminBusiness: AdminBusiness;
|
|
2119
2135
|
readonly createContract: Contract;
|
|
2120
2136
|
readonly creditShareholdersBusinessTripTravelAndSubsistence: ReadonlyArray<Scalars['UUID']['output']>;
|
|
2137
|
+
readonly deleteAdminBusiness: Scalars['Boolean']['output'];
|
|
2121
2138
|
readonly deleteBusinessTripAttendee: Scalars['Boolean']['output'];
|
|
2122
2139
|
readonly deleteBusinessTripExpense: Scalars['Boolean']['output'];
|
|
2123
2140
|
readonly deleteCharge: Scalars['Boolean']['output'];
|
|
@@ -2165,6 +2182,7 @@ export type Mutation = {
|
|
|
2165
2182
|
readonly startGmailListener: Scalars['Boolean']['output'];
|
|
2166
2183
|
readonly stopGmailListener: Scalars['Boolean']['output'];
|
|
2167
2184
|
readonly uncategorizePartialBusinessTripExpense: Scalars['Boolean']['output'];
|
|
2185
|
+
readonly updateAdminBusiness: AdminBusiness;
|
|
2168
2186
|
readonly updateAdminContext: AdminContext;
|
|
2169
2187
|
readonly updateBusiness: UpdateBusinessResponse;
|
|
2170
2188
|
readonly updateBusinessTrip: Scalars['UUID']['output'];
|
|
@@ -2267,6 +2285,10 @@ export type MutationCloseDocumentArgs = {
|
|
|
2267
2285
|
id: Scalars['UUID']['input'];
|
|
2268
2286
|
};
|
|
2269
2287
|
/** mutation root */
|
|
2288
|
+
export type MutationCreateAdminBusinessArgs = {
|
|
2289
|
+
input: CreateAdminBusinessInput;
|
|
2290
|
+
};
|
|
2291
|
+
/** mutation root */
|
|
2270
2292
|
export type MutationCreateContractArgs = {
|
|
2271
2293
|
input: CreateContractInput;
|
|
2272
2294
|
};
|
|
@@ -2275,6 +2297,10 @@ export type MutationCreditShareholdersBusinessTripTravelAndSubsistenceArgs = {
|
|
|
2275
2297
|
businessTripId: Scalars['UUID']['input'];
|
|
2276
2298
|
};
|
|
2277
2299
|
/** mutation root */
|
|
2300
|
+
export type MutationDeleteAdminBusinessArgs = {
|
|
2301
|
+
businessId: Scalars['UUID']['input'];
|
|
2302
|
+
};
|
|
2303
|
+
/** mutation root */
|
|
2278
2304
|
export type MutationDeleteBusinessTripAttendeeArgs = {
|
|
2279
2305
|
fields: DeleteBusinessTripAttendeeInput;
|
|
2280
2306
|
};
|
|
@@ -2455,6 +2481,11 @@ export type MutationUncategorizePartialBusinessTripExpenseArgs = {
|
|
|
2455
2481
|
transactionId: Scalars['UUID']['input'];
|
|
2456
2482
|
};
|
|
2457
2483
|
/** mutation root */
|
|
2484
|
+
export type MutationUpdateAdminBusinessArgs = {
|
|
2485
|
+
businessId: Scalars['UUID']['input'];
|
|
2486
|
+
fields: UpdateAdminBusinessInput;
|
|
2487
|
+
};
|
|
2488
|
+
/** mutation root */
|
|
2458
2489
|
export type MutationUpdateAdminContextArgs = {
|
|
2459
2490
|
context: AdminContextInput;
|
|
2460
2491
|
};
|
|
@@ -3607,6 +3638,14 @@ export type Unprocessed = Document & Linkable & {
|
|
|
3607
3638
|
readonly image?: Maybe<Scalars['URL']['output']>;
|
|
3608
3639
|
readonly isReviewed?: Maybe<Scalars['Boolean']['output']>;
|
|
3609
3640
|
};
|
|
3641
|
+
/** Input type for updating admin business details. */
|
|
3642
|
+
export type UpdateAdminBusinessInput = {
|
|
3643
|
+
readonly advanceTaxRate?: InputMaybe<Scalars['Float']['input']>;
|
|
3644
|
+
readonly employerWithholdingTaxAccountNumber?: InputMaybe<Scalars['String']['input']>;
|
|
3645
|
+
readonly nationalInsuranceEmployerId?: InputMaybe<Scalars['String']['input']>;
|
|
3646
|
+
readonly registrationDate?: InputMaybe<Scalars['TimelessDate']['input']>;
|
|
3647
|
+
readonly taxPrepaymentId?: InputMaybe<Scalars['String']['input']>;
|
|
3648
|
+
};
|
|
3610
3649
|
/** input for updateBusiness */
|
|
3611
3650
|
export type UpdateBusinessInput = {
|
|
3612
3651
|
readonly address?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -4112,6 +4151,7 @@ export type ResolversTypes = {
|
|
|
4112
4151
|
CorporateTaxRulingComplianceReport: ResolverTypeWrapper<CorporateTaxRulingComplianceReportProto>;
|
|
4113
4152
|
CorporateTaxRulingComplianceReportDifferences: ResolverTypeWrapper<CorporateTaxRulingComplianceReportDifferences>;
|
|
4114
4153
|
Country: ResolverTypeWrapper<IGetAllCountriesResult>;
|
|
4154
|
+
CreateAdminBusinessInput: CreateAdminBusinessInput;
|
|
4115
4155
|
CreateContractInput: CreateContractInput;
|
|
4116
4156
|
CreditInvoice: ResolverTypeWrapper<IGetAllDocumentsResult>;
|
|
4117
4157
|
CreditcardBankCharge: ResolverTypeWrapper<IGetChargesByIdsResult>;
|
|
@@ -4324,6 +4364,7 @@ export type ResolversTypes = {
|
|
|
4324
4364
|
}>;
|
|
4325
4365
|
UniformFormat: ResolverTypeWrapper<UniformFormat>;
|
|
4326
4366
|
Unprocessed: ResolverTypeWrapper<IGetAllDocumentsResult>;
|
|
4367
|
+
UpdateAdminBusinessInput: UpdateAdminBusinessInput;
|
|
4327
4368
|
UpdateBusinessInput: UpdateBusinessInput;
|
|
4328
4369
|
UpdateBusinessResponse: ResolverTypeWrapper<ResolversUnionTypes<ResolversTypes>['UpdateBusinessResponse']>;
|
|
4329
4370
|
UpdateBusinessTripAccommodationsExpenseInput: UpdateBusinessTripAccommodationsExpenseInput;
|
|
@@ -4469,6 +4510,7 @@ export type ResolversParentTypes = {
|
|
|
4469
4510
|
CorporateTaxRulingComplianceReport: CorporateTaxRulingComplianceReportProto;
|
|
4470
4511
|
CorporateTaxRulingComplianceReportDifferences: CorporateTaxRulingComplianceReportDifferences;
|
|
4471
4512
|
Country: IGetAllCountriesResult;
|
|
4513
|
+
CreateAdminBusinessInput: CreateAdminBusinessInput;
|
|
4472
4514
|
CreateContractInput: CreateContractInput;
|
|
4473
4515
|
CreditInvoice: IGetAllDocumentsResult;
|
|
4474
4516
|
CreditcardBankCharge: IGetChargesByIdsResult;
|
|
@@ -4653,6 +4695,7 @@ export type ResolversParentTypes = {
|
|
|
4653
4695
|
};
|
|
4654
4696
|
UniformFormat: UniformFormat;
|
|
4655
4697
|
Unprocessed: IGetAllDocumentsResult;
|
|
4698
|
+
UpdateAdminBusinessInput: UpdateAdminBusinessInput;
|
|
4656
4699
|
UpdateBusinessInput: UpdateBusinessInput;
|
|
4657
4700
|
UpdateBusinessResponse: ResolversUnionTypes<ResolversParentTypes>['UpdateBusinessResponse'];
|
|
4658
4701
|
UpdateBusinessTripAccommodationsExpenseInput: UpdateBusinessTripAccommodationsExpenseInput;
|
|
@@ -4729,10 +4772,15 @@ export type DeferDirectiveResolver<Result, Parent, ContextType = GraphQLModules.
|
|
|
4729
4772
|
export type StreamDirectiveArgs = {};
|
|
4730
4773
|
export type StreamDirectiveResolver<Result, Parent, ContextType = GraphQLModules.Context, Args = StreamDirectiveArgs> = DirectiveResolverFn<Result, Parent, ContextType, Args>;
|
|
4731
4774
|
export type AdminBusinessResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['AdminBusiness'] = ResolversParentTypes['AdminBusiness']> = {
|
|
4775
|
+
advanceTaxRate?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
|
|
4732
4776
|
business?: Resolver<ResolversTypes['LtdFinancialEntity'], ParentType, ContextType>;
|
|
4777
|
+
employerWithholdingTaxAccountNumber?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
4733
4778
|
governmentId?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
4734
4779
|
id?: Resolver<ResolversTypes['UUID'], ParentType, ContextType>;
|
|
4735
4780
|
name?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
4781
|
+
nationalInsuranceEmployerId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
4782
|
+
registrationDate?: Resolver<ResolversTypes['TimelessDate'], ParentType, ContextType>;
|
|
4783
|
+
taxPrepaymentId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
4736
4784
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
4737
4785
|
};
|
|
4738
4786
|
export type AdminContextResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['AdminContext'] = ResolversParentTypes['AdminContext']> = {
|
|
@@ -5982,6 +6030,7 @@ export type LinkableResolvers<ContextType = GraphQLModules.Context, ParentType e
|
|
|
5982
6030
|
export type LtdFinancialEntityResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['LtdFinancialEntity'] = ResolversParentTypes['LtdFinancialEntity']> = {
|
|
5983
6031
|
accounts?: Resolver<ReadonlyArray<ResolversTypes['FinancialAccount']>, ParentType, ContextType>;
|
|
5984
6032
|
address?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
6033
|
+
adminInfo?: Resolver<Maybe<ResolversTypes['AdminBusiness']>, ParentType, ContextType>;
|
|
5985
6034
|
charges?: Resolver<ResolversTypes['PaginatedCharges'], ParentType, ContextType, RequireFields<LtdFinancialEntityChargesArgs, 'limit' | 'page'>>;
|
|
5986
6035
|
clientInfo?: Resolver<Maybe<ResolversTypes['Client']>, ParentType, ContextType>;
|
|
5987
6036
|
country?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
@@ -6088,8 +6137,10 @@ export type MutationResolvers<ContextType = GraphQLModules.Context, ParentType e
|
|
|
6088
6137
|
categorizeBusinessTripExpense?: Resolver<ResolversTypes['UUID'], ParentType, ContextType, RequireFields<MutationCategorizeBusinessTripExpenseArgs, 'fields'>>;
|
|
6089
6138
|
categorizeIntoExistingBusinessTripExpense?: Resolver<ResolversTypes['UUID'], ParentType, ContextType, RequireFields<MutationCategorizeIntoExistingBusinessTripExpenseArgs, 'fields'>>;
|
|
6090
6139
|
closeDocument?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType, RequireFields<MutationCloseDocumentArgs, 'id'>>;
|
|
6140
|
+
createAdminBusiness?: Resolver<ResolversTypes['AdminBusiness'], ParentType, ContextType, RequireFields<MutationCreateAdminBusinessArgs, 'input'>>;
|
|
6091
6141
|
createContract?: Resolver<ResolversTypes['Contract'], ParentType, ContextType, RequireFields<MutationCreateContractArgs, 'input'>>;
|
|
6092
6142
|
creditShareholdersBusinessTripTravelAndSubsistence?: Resolver<ReadonlyArray<ResolversTypes['UUID']>, ParentType, ContextType, RequireFields<MutationCreditShareholdersBusinessTripTravelAndSubsistenceArgs, 'businessTripId'>>;
|
|
6143
|
+
deleteAdminBusiness?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType, RequireFields<MutationDeleteAdminBusinessArgs, 'businessId'>>;
|
|
6093
6144
|
deleteBusinessTripAttendee?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType, RequireFields<MutationDeleteBusinessTripAttendeeArgs, 'fields'>>;
|
|
6094
6145
|
deleteBusinessTripExpense?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType, RequireFields<MutationDeleteBusinessTripExpenseArgs, 'businessTripExpenseId'>>;
|
|
6095
6146
|
deleteCharge?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType, RequireFields<MutationDeleteChargeArgs, 'chargeId'>>;
|
|
@@ -6137,6 +6188,7 @@ export type MutationResolvers<ContextType = GraphQLModules.Context, ParentType e
|
|
|
6137
6188
|
startGmailListener?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>;
|
|
6138
6189
|
stopGmailListener?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>;
|
|
6139
6190
|
uncategorizePartialBusinessTripExpense?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType, RequireFields<MutationUncategorizePartialBusinessTripExpenseArgs, 'businessTripExpenseId' | 'transactionId'>>;
|
|
6191
|
+
updateAdminBusiness?: Resolver<ResolversTypes['AdminBusiness'], ParentType, ContextType, RequireFields<MutationUpdateAdminBusinessArgs, 'businessId' | 'fields'>>;
|
|
6140
6192
|
updateAdminContext?: Resolver<ResolversTypes['AdminContext'], ParentType, ContextType, RequireFields<MutationUpdateAdminContextArgs, 'context'>>;
|
|
6141
6193
|
updateBusiness?: Resolver<ResolversTypes['UpdateBusinessResponse'], ParentType, ContextType, RequireFields<MutationUpdateBusinessArgs, 'businessId' | 'fields' | 'ownerId'>>;
|
|
6142
6194
|
updateBusinessTrip?: Resolver<ResolversTypes['UUID'], ParentType, ContextType, RequireFields<MutationUpdateBusinessTripArgs, 'fields'>>;
|
|
@@ -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;AAo2BrD,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAsX7B,OAAO,EAAE,QAAQ,EAAE,CAAC;AAuLpB,OAAO,EAAE,YAAY,EAAE,CAAC;AA2lCxB,OAAO,EAAE,iBAAiB,EAAE,CAAC;AA42D7B,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -3,18 +3,18 @@ import * as gm from "graphql-modules";
|
|
|
3
3
|
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' | 'employerWithholdingTaxAccountNumber' | 'taxPrepaymentId' | 'nationalInsuranceEmployerId' | 'advanceTaxRate' | 'registrationDate';
|
|
7
8
|
BusinessTransactionsSumFromLedgerRecordsSuccessfulResult: 'businessTransactionsSum';
|
|
8
9
|
BusinessTransactionSum: 'business' | 'credit' | 'debit' | 'total' | 'foreignCurrenciesSum';
|
|
9
10
|
ForeignCurrencySum: 'credit' | 'debit' | 'total' | 'currency';
|
|
10
11
|
BusinessTransactionsFromLedgerRecordsSuccessfulResult: 'businessTransactions';
|
|
11
12
|
BusinessTransaction: 'amount' | 'business' | 'foreignAmount' | 'invoiceDate' | 'reference' | 'details' | 'counterAccount' | 'chargeId';
|
|
12
13
|
PaginatedBusinesses: 'nodes' | 'pageInfo';
|
|
13
|
-
LtdFinancialEntity: 'id' | 'country' | 'governmentId' | 'name' | 'address' | 'hebrewName' | 'email' | 'website' | 'phoneNumber' | 'exemptDealer' | 'optionalVAT' | 'suggestions' | 'pcn874RecordType' | 'irsCode' | 'isActive' | 'isReceiptEnough' | 'isDocumentsOptional' | 'createdAt' | 'updatedAt' | 'clientInfo' | 'taxCategory';
|
|
14
|
+
LtdFinancialEntity: 'adminInfo' | 'id' | 'country' | 'governmentId' | 'name' | 'address' | 'hebrewName' | 'email' | 'website' | 'phoneNumber' | 'exemptDealer' | 'optionalVAT' | 'suggestions' | 'pcn874RecordType' | 'irsCode' | 'isActive' | 'isReceiptEnough' | 'isDocumentsOptional' | 'createdAt' | 'updatedAt' | 'clientInfo' | 'taxCategory';
|
|
14
15
|
Suggestions: 'phrases' | 'tags' | 'description' | 'emails' | 'emailListener' | 'priority';
|
|
15
16
|
SuggestionsEmailListenerConfig: 'internalEmailLinks' | 'emailBody' | 'attachments';
|
|
16
17
|
PersonalFinancialEntity: 'id' | 'name' | 'email' | 'pcn874RecordType' | 'irsCode' | 'isActive' | 'createdAt' | 'updatedAt';
|
|
17
|
-
Mutation: 'updateBusiness' | 'insertNewBusiness' | 'mergeBusinesses' | 'batchGenerateBusinessesOutOfTransactions' | 'updateClient' | 'insertClient' | 'updateTaxCategory' | 'insertTaxCategory';
|
|
18
18
|
Client: 'id' | 'originalBusiness' | 'greenInvoiceId' | 'hiveId' | 'emails' | 'generatedDocumentType' | 'greenInvoiceInfo';
|
|
19
19
|
PaginatedFinancialEntities: 'nodes' | 'pageInfo';
|
|
20
20
|
TaxCategory: 'id' | 'name' | 'irsCode' | 'createdAt' | 'updatedAt' | 'isActive';
|
|
@@ -48,6 +48,8 @@ export declare namespace FinancialEntitiesModule {
|
|
|
48
48
|
EmailAttachmentType: 'PDF' | 'PNG' | 'JPEG';
|
|
49
49
|
}
|
|
50
50
|
interface DefinedInputFields {
|
|
51
|
+
CreateAdminBusinessInput: 'businessId' | 'employerWithholdingTaxAccountNumber' | 'taxPrepaymentId' | 'nationalInsuranceEmployerId' | 'advanceTaxRate' | 'registrationDate';
|
|
52
|
+
UpdateAdminBusinessInput: 'employerWithholdingTaxAccountNumber' | 'taxPrepaymentId' | 'nationalInsuranceEmployerId' | 'advanceTaxRate' | 'registrationDate';
|
|
51
53
|
BusinessTransactionsFilter: 'businessIDs' | 'ownerIds' | 'type' | 'fromDate' | 'toDate' | 'includeRevaluation';
|
|
52
54
|
UpdateBusinessInput: 'name' | 'sortCode' | 'country' | 'hebrewName' | 'address' | 'email' | 'website' | 'phoneNumber' | 'governmentId' | 'taxCategory' | 'exemptDealer' | 'suggestions' | 'optionalVAT' | 'isReceiptEnough' | 'isDocumentsOptional' | 'pcn874RecordType' | 'irsCode' | 'isActive';
|
|
53
55
|
InsertNewBusinessInput: 'name' | 'sortCode' | 'country' | 'hebrewName' | 'address' | 'email' | 'website' | 'phoneNumber' | 'governmentId' | 'taxCategory' | 'exemptDealer' | 'suggestions' | 'optionalVAT' | 'isReceiptEnough' | 'isDocumentsOptional' | 'pcn874RecordType' | 'irsCode' | 'isActive';
|
|
@@ -62,12 +64,15 @@ export declare namespace FinancialEntitiesModule {
|
|
|
62
64
|
export type Query = Pick<Types.Query, DefinedFields['Query']>;
|
|
63
65
|
export type AdminBusiness = Pick<Types.AdminBusiness, DefinedFields['AdminBusiness']>;
|
|
64
66
|
export type UUID = Types.Uuid;
|
|
67
|
+
export type Mutation = Pick<Types.Mutation, DefinedFields['Mutation']>;
|
|
68
|
+
export type CreateAdminBusinessInput = Pick<Types.CreateAdminBusinessInput, DefinedInputFields['CreateAdminBusinessInput']>;
|
|
69
|
+
export type UpdateAdminBusinessInput = Pick<Types.UpdateAdminBusinessInput, DefinedInputFields['UpdateAdminBusinessInput']>;
|
|
65
70
|
export type LtdFinancialEntity = Pick<Types.LtdFinancialEntity, DefinedFields['LtdFinancialEntity']>;
|
|
71
|
+
export type TimelessDate = Types.TimelessDate;
|
|
66
72
|
export type BusinessTransactionsSumFromLedgerRecordsResult = Types.BusinessTransactionsSumFromLedgerRecordsResult;
|
|
67
73
|
export type BusinessTransactionsFilter = Pick<Types.BusinessTransactionsFilter, DefinedInputFields['BusinessTransactionsFilter']>;
|
|
68
74
|
export type BusinessTransactionsFromLedgerRecordsResult = Types.BusinessTransactionsFromLedgerRecordsResult;
|
|
69
75
|
export type FinancialEntityType = DefinedEnumValues['FinancialEntityType'];
|
|
70
|
-
export type TimelessDate = Types.TimelessDate;
|
|
71
76
|
export type BusinessTransactionsSumFromLedgerRecordsSuccessfulResult = Pick<Types.BusinessTransactionsSumFromLedgerRecordsSuccessfulResult, DefinedFields['BusinessTransactionsSumFromLedgerRecordsSuccessfulResult']>;
|
|
72
77
|
export type CommonError = Types.CommonError;
|
|
73
78
|
export type BusinessTransactionSum = Pick<Types.BusinessTransactionSum, DefinedFields['BusinessTransactionSum']>;
|
|
@@ -87,7 +92,6 @@ export declare namespace FinancialEntitiesModule {
|
|
|
87
92
|
export type SuggestionsEmailListenerConfig = Pick<Types.SuggestionsEmailListenerConfig, DefinedFields['SuggestionsEmailListenerConfig']>;
|
|
88
93
|
export type EmailAttachmentType = DefinedEnumValues['EmailAttachmentType'];
|
|
89
94
|
export type PersonalFinancialEntity = Pick<Types.PersonalFinancialEntity, DefinedFields['PersonalFinancialEntity']>;
|
|
90
|
-
export type Mutation = Pick<Types.Mutation, DefinedFields['Mutation']>;
|
|
91
95
|
export type UpdateBusinessResponse = Types.UpdateBusinessResponse;
|
|
92
96
|
export type UpdateBusinessInput = Pick<Types.UpdateBusinessInput, DefinedInputFields['UpdateBusinessInput']>;
|
|
93
97
|
export type InsertNewBusinessInput = Pick<Types.InsertNewBusinessInput, DefinedInputFields['InsertNewBusinessInput']>;
|
|
@@ -129,6 +133,7 @@ export declare namespace FinancialEntitiesModule {
|
|
|
129
133
|
export type UpdateTaxCategoryInput = Pick<Types.UpdateTaxCategoryInput, DefinedInputFields['UpdateTaxCategoryInput']>;
|
|
130
134
|
export type InsertTaxCategoryInput = Pick<Types.InsertTaxCategoryInput, DefinedInputFields['InsertTaxCategoryInput']>;
|
|
131
135
|
export type QueryResolvers = Pick<Types.QueryResolvers, DefinedFields['Query']>;
|
|
136
|
+
export type MutationResolvers = Pick<Types.MutationResolvers, DefinedFields['Mutation']>;
|
|
132
137
|
export type AdminBusinessResolvers = Pick<Types.AdminBusinessResolvers, DefinedFields['AdminBusiness']>;
|
|
133
138
|
export type BusinessTransactionsSumFromLedgerRecordsSuccessfulResultResolvers = Pick<Types.BusinessTransactionsSumFromLedgerRecordsSuccessfulResultResolvers, DefinedFields['BusinessTransactionsSumFromLedgerRecordsSuccessfulResult'] | '__isTypeOf'>;
|
|
134
139
|
export type BusinessTransactionSumResolvers = Pick<Types.BusinessTransactionSumResolvers, DefinedFields['BusinessTransactionSum']>;
|
|
@@ -140,7 +145,6 @@ export declare namespace FinancialEntitiesModule {
|
|
|
140
145
|
export type SuggestionsResolvers = Pick<Types.SuggestionsResolvers, DefinedFields['Suggestions']>;
|
|
141
146
|
export type SuggestionsEmailListenerConfigResolvers = Pick<Types.SuggestionsEmailListenerConfigResolvers, DefinedFields['SuggestionsEmailListenerConfig']>;
|
|
142
147
|
export type PersonalFinancialEntityResolvers = Pick<Types.PersonalFinancialEntityResolvers, DefinedFields['PersonalFinancialEntity'] | '__isTypeOf'>;
|
|
143
|
-
export type MutationResolvers = Pick<Types.MutationResolvers, DefinedFields['Mutation']>;
|
|
144
148
|
export type ClientResolvers = Pick<Types.ClientResolvers, DefinedFields['Client'] | '__isTypeOf'>;
|
|
145
149
|
export type PaginatedFinancialEntitiesResolvers = Pick<Types.PaginatedFinancialEntitiesResolvers, DefinedFields['PaginatedFinancialEntities']>;
|
|
146
150
|
export type TaxCategoryResolvers = Pick<Types.TaxCategoryResolvers, DefinedFields['TaxCategory'] | '__isTypeOf'>;
|
|
@@ -170,6 +174,7 @@ export declare namespace FinancialEntitiesModule {
|
|
|
170
174
|
export type FinancialDocumentResolvers = Pick<Types.FinancialDocumentResolvers, DefinedFields['FinancialDocument']>;
|
|
171
175
|
export interface Resolvers {
|
|
172
176
|
Query?: QueryResolvers;
|
|
177
|
+
Mutation?: MutationResolvers;
|
|
173
178
|
AdminBusiness?: AdminBusinessResolvers;
|
|
174
179
|
BusinessTransactionsSumFromLedgerRecordsSuccessfulResult?: BusinessTransactionsSumFromLedgerRecordsSuccessfulResultResolvers;
|
|
175
180
|
BusinessTransactionSum?: BusinessTransactionSumResolvers;
|
|
@@ -181,7 +186,6 @@ export declare namespace FinancialEntitiesModule {
|
|
|
181
186
|
Suggestions?: SuggestionsResolvers;
|
|
182
187
|
SuggestionsEmailListenerConfig?: SuggestionsEmailListenerConfigResolvers;
|
|
183
188
|
PersonalFinancialEntity?: PersonalFinancialEntityResolvers;
|
|
184
|
-
Mutation?: MutationResolvers;
|
|
185
189
|
Client?: ClientResolvers;
|
|
186
190
|
PaginatedFinancialEntities?: PaginatedFinancialEntitiesResolvers;
|
|
187
191
|
TaxCategory?: TaxCategoryResolvers;
|
|
@@ -226,12 +230,56 @@ export declare namespace FinancialEntitiesModule {
|
|
|
226
230
|
taxCategory?: gm.Middleware[];
|
|
227
231
|
taxCategoryByBusinessId?: gm.Middleware[];
|
|
228
232
|
};
|
|
233
|
+
Mutation?: {
|
|
234
|
+
'*'?: gm.Middleware[];
|
|
235
|
+
createAdminBusiness?: gm.Middleware[];
|
|
236
|
+
updateAdminBusiness?: gm.Middleware[];
|
|
237
|
+
deleteAdminBusiness?: gm.Middleware[];
|
|
238
|
+
updateBusiness?: gm.Middleware[];
|
|
239
|
+
insertNewBusiness?: gm.Middleware[];
|
|
240
|
+
mergeBusinesses?: gm.Middleware[];
|
|
241
|
+
batchGenerateBusinessesOutOfTransactions?: gm.Middleware[];
|
|
242
|
+
updateClient?: gm.Middleware[];
|
|
243
|
+
insertClient?: gm.Middleware[];
|
|
244
|
+
updateTaxCategory?: gm.Middleware[];
|
|
245
|
+
insertTaxCategory?: gm.Middleware[];
|
|
246
|
+
};
|
|
229
247
|
AdminBusiness?: {
|
|
230
248
|
'*'?: gm.Middleware[];
|
|
231
249
|
id?: gm.Middleware[];
|
|
232
250
|
name?: gm.Middleware[];
|
|
233
251
|
governmentId?: gm.Middleware[];
|
|
234
252
|
business?: gm.Middleware[];
|
|
253
|
+
employerWithholdingTaxAccountNumber?: gm.Middleware[];
|
|
254
|
+
taxPrepaymentId?: gm.Middleware[];
|
|
255
|
+
nationalInsuranceEmployerId?: gm.Middleware[];
|
|
256
|
+
advanceTaxRate?: gm.Middleware[];
|
|
257
|
+
registrationDate?: gm.Middleware[];
|
|
258
|
+
};
|
|
259
|
+
LtdFinancialEntity?: {
|
|
260
|
+
'*'?: gm.Middleware[];
|
|
261
|
+
adminInfo?: gm.Middleware[];
|
|
262
|
+
id?: gm.Middleware[];
|
|
263
|
+
country?: gm.Middleware[];
|
|
264
|
+
governmentId?: gm.Middleware[];
|
|
265
|
+
name?: gm.Middleware[];
|
|
266
|
+
address?: gm.Middleware[];
|
|
267
|
+
hebrewName?: gm.Middleware[];
|
|
268
|
+
email?: gm.Middleware[];
|
|
269
|
+
website?: gm.Middleware[];
|
|
270
|
+
phoneNumber?: gm.Middleware[];
|
|
271
|
+
exemptDealer?: gm.Middleware[];
|
|
272
|
+
optionalVAT?: gm.Middleware[];
|
|
273
|
+
suggestions?: gm.Middleware[];
|
|
274
|
+
pcn874RecordType?: gm.Middleware[];
|
|
275
|
+
irsCode?: gm.Middleware[];
|
|
276
|
+
isActive?: gm.Middleware[];
|
|
277
|
+
isReceiptEnough?: gm.Middleware[];
|
|
278
|
+
isDocumentsOptional?: gm.Middleware[];
|
|
279
|
+
createdAt?: gm.Middleware[];
|
|
280
|
+
updatedAt?: gm.Middleware[];
|
|
281
|
+
clientInfo?: gm.Middleware[];
|
|
282
|
+
taxCategory?: gm.Middleware[];
|
|
235
283
|
};
|
|
236
284
|
BusinessTransactionsSumFromLedgerRecordsSuccessfulResult?: {
|
|
237
285
|
'*'?: gm.Middleware[];
|
|
@@ -272,30 +320,6 @@ export declare namespace FinancialEntitiesModule {
|
|
|
272
320
|
nodes?: gm.Middleware[];
|
|
273
321
|
pageInfo?: gm.Middleware[];
|
|
274
322
|
};
|
|
275
|
-
LtdFinancialEntity?: {
|
|
276
|
-
'*'?: gm.Middleware[];
|
|
277
|
-
id?: gm.Middleware[];
|
|
278
|
-
country?: gm.Middleware[];
|
|
279
|
-
governmentId?: gm.Middleware[];
|
|
280
|
-
name?: gm.Middleware[];
|
|
281
|
-
address?: gm.Middleware[];
|
|
282
|
-
hebrewName?: gm.Middleware[];
|
|
283
|
-
email?: gm.Middleware[];
|
|
284
|
-
website?: gm.Middleware[];
|
|
285
|
-
phoneNumber?: gm.Middleware[];
|
|
286
|
-
exemptDealer?: gm.Middleware[];
|
|
287
|
-
optionalVAT?: gm.Middleware[];
|
|
288
|
-
suggestions?: gm.Middleware[];
|
|
289
|
-
pcn874RecordType?: gm.Middleware[];
|
|
290
|
-
irsCode?: gm.Middleware[];
|
|
291
|
-
isActive?: gm.Middleware[];
|
|
292
|
-
isReceiptEnough?: gm.Middleware[];
|
|
293
|
-
isDocumentsOptional?: gm.Middleware[];
|
|
294
|
-
createdAt?: gm.Middleware[];
|
|
295
|
-
updatedAt?: gm.Middleware[];
|
|
296
|
-
clientInfo?: gm.Middleware[];
|
|
297
|
-
taxCategory?: gm.Middleware[];
|
|
298
|
-
};
|
|
299
323
|
Suggestions?: {
|
|
300
324
|
'*'?: gm.Middleware[];
|
|
301
325
|
phrases?: gm.Middleware[];
|
|
@@ -322,17 +346,6 @@ export declare namespace FinancialEntitiesModule {
|
|
|
322
346
|
createdAt?: gm.Middleware[];
|
|
323
347
|
updatedAt?: gm.Middleware[];
|
|
324
348
|
};
|
|
325
|
-
Mutation?: {
|
|
326
|
-
'*'?: gm.Middleware[];
|
|
327
|
-
updateBusiness?: gm.Middleware[];
|
|
328
|
-
insertNewBusiness?: gm.Middleware[];
|
|
329
|
-
mergeBusinesses?: gm.Middleware[];
|
|
330
|
-
batchGenerateBusinessesOutOfTransactions?: gm.Middleware[];
|
|
331
|
-
updateClient?: gm.Middleware[];
|
|
332
|
-
insertClient?: gm.Middleware[];
|
|
333
|
-
updateTaxCategory?: gm.Middleware[];
|
|
334
|
-
insertTaxCategory?: gm.Middleware[];
|
|
335
|
-
};
|
|
336
349
|
CommonCharge?: {
|
|
337
350
|
'*'?: gm.Middleware[];
|
|
338
351
|
owner?: 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,CAmevC;AAneD,WAAiB,uBAAuB;IA0CrC,CAAC;IAKD,CAAC;IAeD,CAAC;IAuJD,CAAC;IA6QD,CAAC;AACJ,CAAC,EAnegB,uBAAuB,KAAvB,uBAAuB,QAmevC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GraphQLError } from 'graphql';
|
|
2
|
+
import { dateToTimelessDateString } from '../../../shared/helpers/index.js';
|
|
2
3
|
import { AdminBusinessesProvider } from '../providers/admin-businesses.provider.js';
|
|
3
4
|
import { BusinessesProvider } from '../providers/businesses.provider.js';
|
|
4
5
|
export const adminBusinessesResolvers = {
|
|
@@ -33,6 +34,24 @@ export const adminBusinessesResolvers = {
|
|
|
33
34
|
}
|
|
34
35
|
return business;
|
|
35
36
|
},
|
|
37
|
+
employerWithholdingTaxAccountNumber: admin => admin.tax_nikuim_pinkas_number,
|
|
38
|
+
taxPrepaymentId: admin => admin.tax_siduri_number_2022,
|
|
39
|
+
nationalInsuranceEmployerId: admin => admin.pinkas_social_security_2022,
|
|
40
|
+
advanceTaxRate: admin => admin.advance_tax_rate,
|
|
41
|
+
registrationDate: admin => {
|
|
42
|
+
if (!admin.registration_date) {
|
|
43
|
+
throw new GraphQLError(`Admin business ID="${admin.id}" has no registration date`);
|
|
44
|
+
}
|
|
45
|
+
return dateToTimelessDateString(admin.registration_date);
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
LtdFinancialEntity: {
|
|
49
|
+
adminInfo: async (parentBusiness, _, { injector }) => {
|
|
50
|
+
const adminBusiness = await injector
|
|
51
|
+
.get(AdminBusinessesProvider)
|
|
52
|
+
.getAdminBusinessByIdLoader.load(parentBusiness.id);
|
|
53
|
+
return adminBusiness ?? null;
|
|
54
|
+
},
|
|
36
55
|
},
|
|
37
56
|
};
|
|
38
57
|
//# sourceMappingURL=admin-businesses.resolver.js.map
|
package/dist/server/src/modules/financial-entities/resolvers/admin-businesses.resolver.js.map
CHANGED
|
@@ -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,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAGzE,MAAM,CAAC,MAAM,wBAAwB,GAAsC;IACzE,KAAK,EAAE;QACL,aAAa,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAC/C,MAAM,aAAa,GAAG,MAAM,QAAQ;iBACjC,GAAG,CAAC,uBAAuB,CAAC;iBAC5B,0BAA0B,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACvC,IAAI,CAAC,aAAa,EAAE,CAAC;gBACnB,MAAM,IAAI,YAAY,CAAC,sBAAsB,EAAE,aAAa,CAAC,CAAC;YAChE,CAAC;YAED,OAAO,aAAa,CAAC;QACvB,CAAC;QACD,kBAAkB,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAChD,MAAM,eAAe,GAAG,MAAM,QAAQ,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC,qBAAqB,EAAE,CAAC;YAE5F,OAAO,eAAe,CAAC;QACzB,CAAC;KACF;IACD,aAAa,EAAE;QACb,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE;QACrB,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI;QACzB,YAAY,EAAE,KAAK,CAAC,EAAE;YACpB,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;gBACtB,MAAM,IAAI,YAAY,CAAC,sBAAsB,KAAK,CAAC,EAAE,qBAAqB,CAAC,CAAC;YAC9E,CAAC;YACD,OAAO,KAAK,CAAC,UAAU,CAAC;QAC1B,CAAC;QACD,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YACzC,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC7F,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACd,MAAM,IAAI,YAAY,CAAC,gBAAgB,KAAK,CAAC,EAAE,aAAa,CAAC,CAAC;YAChE,CAAC;YACD,OAAO,QAAQ,CAAC;QAClB,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;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;QACL,aAAa,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAC/C,MAAM,aAAa,GAAG,MAAM,QAAQ;iBACjC,GAAG,CAAC,uBAAuB,CAAC;iBAC5B,0BAA0B,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACvC,IAAI,CAAC,aAAa,EAAE,CAAC;gBACnB,MAAM,IAAI,YAAY,CAAC,sBAAsB,EAAE,aAAa,CAAC,CAAC;YAChE,CAAC;YAED,OAAO,aAAa,CAAC;QACvB,CAAC;QACD,kBAAkB,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAChD,MAAM,eAAe,GAAG,MAAM,QAAQ,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC,qBAAqB,EAAE,CAAC;YAE5F,OAAO,eAAe,CAAC;QACzB,CAAC;KACF;IACD,aAAa,EAAE;QACb,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE;QACrB,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI;QACzB,YAAY,EAAE,KAAK,CAAC,EAAE;YACpB,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;gBACtB,MAAM,IAAI,YAAY,CAAC,sBAAsB,KAAK,CAAC,EAAE,qBAAqB,CAAC,CAAC;YAC9E,CAAC;YACD,OAAO,KAAK,CAAC,UAAU,CAAC;QAC1B,CAAC;QACD,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YACzC,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC7F,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACd,MAAM,IAAI,YAAY,CAAC,gBAAgB,KAAK,CAAC,EAAE,aAAa,CAAC,CAAC;YAChE,CAAC;YACD,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,mCAAmC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,wBAAwB;QAC5E,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,sBAAsB;QACtD,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,2BAA2B;QACvE,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,gBAAgB;QAC/C,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"}
|
|
@@ -4,6 +4,14 @@ export default gql `
|
|
|
4
4
|
adminBusiness(id: UUID!): AdminBusiness! @auth(role: ACCOUNTANT)
|
|
5
5
|
allAdminBusinesses: [AdminBusiness!]! @auth(role: ACCOUNTANT)
|
|
6
6
|
}
|
|
7
|
+
extend type Mutation {
|
|
8
|
+
createAdminBusiness(input: CreateAdminBusinessInput!): AdminBusiness! @auth(role: ADMIN)
|
|
9
|
+
|
|
10
|
+
updateAdminBusiness(businessId: UUID!, fields: UpdateAdminBusinessInput!): AdminBusiness!
|
|
11
|
+
@auth(role: ADMIN)
|
|
12
|
+
|
|
13
|
+
deleteAdminBusiness(businessId: UUID!): Boolean! @auth(role: ADMIN)
|
|
14
|
+
}
|
|
7
15
|
|
|
8
16
|
" Represents a business entity managed by an accountant in the system."
|
|
9
17
|
type AdminBusiness {
|
|
@@ -11,6 +19,34 @@ export default gql `
|
|
|
11
19
|
name: String!
|
|
12
20
|
governmentId: String!
|
|
13
21
|
business: LtdFinancialEntity!
|
|
22
|
+
employerWithholdingTaxAccountNumber: String
|
|
23
|
+
taxPrepaymentId: String
|
|
24
|
+
nationalInsuranceEmployerId: String
|
|
25
|
+
advanceTaxRate: Float
|
|
26
|
+
registrationDate: TimelessDate!
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
" Input type for creating a new admin business. "
|
|
30
|
+
input CreateAdminBusinessInput {
|
|
31
|
+
businessId: UUID!
|
|
32
|
+
employerWithholdingTaxAccountNumber: String
|
|
33
|
+
taxPrepaymentId: String
|
|
34
|
+
nationalInsuranceEmployerId: String
|
|
35
|
+
advanceTaxRate: Float
|
|
36
|
+
registrationDate: TimelessDate!
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
" Input type for updating admin business details. "
|
|
40
|
+
input UpdateAdminBusinessInput {
|
|
41
|
+
employerWithholdingTaxAccountNumber: String
|
|
42
|
+
taxPrepaymentId: String
|
|
43
|
+
nationalInsuranceEmployerId: String
|
|
44
|
+
advanceTaxRate: Float
|
|
45
|
+
registrationDate: TimelessDate
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
extend type LtdFinancialEntity {
|
|
49
|
+
adminInfo: AdminBusiness
|
|
14
50
|
}
|
|
15
51
|
`;
|
|
16
52
|
//# sourceMappingURL=admin-businesses.graphql.js.map
|
|
@@ -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
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@accounter/server",
|
|
3
|
-
"version": "0.0.8-alpha-
|
|
3
|
+
"version": "0.0.8-alpha-20251022162652-6facbcde08fdda0fb354ba7105432df320367509",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -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.
|
|
51
|
+
"puppeteer": "24.25.0",
|
|
52
52
|
"reflect-metadata": "0.2.2",
|
|
53
53
|
"strip-indent": "4.1.1",
|
|
54
54
|
"zod": "4.1.12"
|
|
@@ -143,10 +143,15 @@ export type AddBusinessTripTravelAndSubsistenceExpenseInput = {
|
|
|
143
143
|
/** Represents a business entity managed by an accountant in the system. */
|
|
144
144
|
export type AdminBusiness = {
|
|
145
145
|
readonly __typename?: 'AdminBusiness';
|
|
146
|
+
readonly advanceTaxRate?: Maybe<Scalars['Float']['output']>;
|
|
146
147
|
readonly business: LtdFinancialEntity;
|
|
148
|
+
readonly employerWithholdingTaxAccountNumber?: Maybe<Scalars['String']['output']>;
|
|
147
149
|
readonly governmentId: Scalars['String']['output'];
|
|
148
150
|
readonly id: Scalars['UUID']['output'];
|
|
149
151
|
readonly name: Scalars['String']['output'];
|
|
152
|
+
readonly nationalInsuranceEmployerId?: Maybe<Scalars['String']['output']>;
|
|
153
|
+
readonly registrationDate: Scalars['TimelessDate']['output'];
|
|
154
|
+
readonly taxPrepaymentId?: Maybe<Scalars['String']['output']>;
|
|
150
155
|
};
|
|
151
156
|
|
|
152
157
|
/** defines a tag / category for charge arrangement */
|
|
@@ -1138,6 +1143,16 @@ export type Country = {
|
|
|
1138
1143
|
readonly name: Scalars['String']['output'];
|
|
1139
1144
|
};
|
|
1140
1145
|
|
|
1146
|
+
/** Input type for creating a new admin business. */
|
|
1147
|
+
export type CreateAdminBusinessInput = {
|
|
1148
|
+
readonly advanceTaxRate?: InputMaybe<Scalars['Float']['input']>;
|
|
1149
|
+
readonly businessId: Scalars['UUID']['input'];
|
|
1150
|
+
readonly employerWithholdingTaxAccountNumber?: InputMaybe<Scalars['String']['input']>;
|
|
1151
|
+
readonly nationalInsuranceEmployerId?: InputMaybe<Scalars['String']['input']>;
|
|
1152
|
+
readonly registrationDate: Scalars['TimelessDate']['input'];
|
|
1153
|
+
readonly taxPrepaymentId?: InputMaybe<Scalars['String']['input']>;
|
|
1154
|
+
};
|
|
1155
|
+
|
|
1141
1156
|
/** input for creating a new contract */
|
|
1142
1157
|
export type CreateContractInput = {
|
|
1143
1158
|
readonly amount: FinancialAmountInput;
|
|
@@ -2463,6 +2478,7 @@ export type LtdFinancialEntity = Business & FinancialEntity & {
|
|
|
2463
2478
|
readonly __typename?: 'LtdFinancialEntity';
|
|
2464
2479
|
readonly accounts: ReadonlyArray<FinancialAccount>;
|
|
2465
2480
|
readonly address?: Maybe<Scalars['String']['output']>;
|
|
2481
|
+
readonly adminInfo?: Maybe<AdminBusiness>;
|
|
2466
2482
|
readonly charges: PaginatedCharges;
|
|
2467
2483
|
readonly clientInfo?: Maybe<Client>;
|
|
2468
2484
|
readonly country: Scalars['String']['output'];
|
|
@@ -2580,8 +2596,10 @@ export type Mutation = {
|
|
|
2580
2596
|
readonly categorizeBusinessTripExpense: Scalars['UUID']['output'];
|
|
2581
2597
|
readonly categorizeIntoExistingBusinessTripExpense: Scalars['UUID']['output'];
|
|
2582
2598
|
readonly closeDocument: Scalars['Boolean']['output'];
|
|
2599
|
+
readonly createAdminBusiness: AdminBusiness;
|
|
2583
2600
|
readonly createContract: Contract;
|
|
2584
2601
|
readonly creditShareholdersBusinessTripTravelAndSubsistence: ReadonlyArray<Scalars['UUID']['output']>;
|
|
2602
|
+
readonly deleteAdminBusiness: Scalars['Boolean']['output'];
|
|
2585
2603
|
readonly deleteBusinessTripAttendee: Scalars['Boolean']['output'];
|
|
2586
2604
|
readonly deleteBusinessTripExpense: Scalars['Boolean']['output'];
|
|
2587
2605
|
readonly deleteCharge: Scalars['Boolean']['output'];
|
|
@@ -2629,6 +2647,7 @@ export type Mutation = {
|
|
|
2629
2647
|
readonly startGmailListener: Scalars['Boolean']['output'];
|
|
2630
2648
|
readonly stopGmailListener: Scalars['Boolean']['output'];
|
|
2631
2649
|
readonly uncategorizePartialBusinessTripExpense: Scalars['Boolean']['output'];
|
|
2650
|
+
readonly updateAdminBusiness: AdminBusiness;
|
|
2632
2651
|
readonly updateAdminContext: AdminContext;
|
|
2633
2652
|
readonly updateBusiness: UpdateBusinessResponse;
|
|
2634
2653
|
readonly updateBusinessTrip: Scalars['UUID']['output'];
|
|
@@ -2760,6 +2779,12 @@ export type MutationCloseDocumentArgs = {
|
|
|
2760
2779
|
};
|
|
2761
2780
|
|
|
2762
2781
|
|
|
2782
|
+
/** mutation root */
|
|
2783
|
+
export type MutationCreateAdminBusinessArgs = {
|
|
2784
|
+
input: CreateAdminBusinessInput;
|
|
2785
|
+
};
|
|
2786
|
+
|
|
2787
|
+
|
|
2763
2788
|
/** mutation root */
|
|
2764
2789
|
export type MutationCreateContractArgs = {
|
|
2765
2790
|
input: CreateContractInput;
|
|
@@ -2772,6 +2797,12 @@ export type MutationCreditShareholdersBusinessTripTravelAndSubsistenceArgs = {
|
|
|
2772
2797
|
};
|
|
2773
2798
|
|
|
2774
2799
|
|
|
2800
|
+
/** mutation root */
|
|
2801
|
+
export type MutationDeleteAdminBusinessArgs = {
|
|
2802
|
+
businessId: Scalars['UUID']['input'];
|
|
2803
|
+
};
|
|
2804
|
+
|
|
2805
|
+
|
|
2775
2806
|
/** mutation root */
|
|
2776
2807
|
export type MutationDeleteBusinessTripAttendeeArgs = {
|
|
2777
2808
|
fields: DeleteBusinessTripAttendeeInput;
|
|
@@ -3032,6 +3063,13 @@ export type MutationUncategorizePartialBusinessTripExpenseArgs = {
|
|
|
3032
3063
|
};
|
|
3033
3064
|
|
|
3034
3065
|
|
|
3066
|
+
/** mutation root */
|
|
3067
|
+
export type MutationUpdateAdminBusinessArgs = {
|
|
3068
|
+
businessId: Scalars['UUID']['input'];
|
|
3069
|
+
fields: UpdateAdminBusinessInput;
|
|
3070
|
+
};
|
|
3071
|
+
|
|
3072
|
+
|
|
3035
3073
|
/** mutation root */
|
|
3036
3074
|
export type MutationUpdateAdminContextArgs = {
|
|
3037
3075
|
context: AdminContextInput;
|
|
@@ -4438,6 +4476,15 @@ export type Unprocessed = Document & Linkable & {
|
|
|
4438
4476
|
readonly isReviewed?: Maybe<Scalars['Boolean']['output']>;
|
|
4439
4477
|
};
|
|
4440
4478
|
|
|
4479
|
+
/** Input type for updating admin business details. */
|
|
4480
|
+
export type UpdateAdminBusinessInput = {
|
|
4481
|
+
readonly advanceTaxRate?: InputMaybe<Scalars['Float']['input']>;
|
|
4482
|
+
readonly employerWithholdingTaxAccountNumber?: InputMaybe<Scalars['String']['input']>;
|
|
4483
|
+
readonly nationalInsuranceEmployerId?: InputMaybe<Scalars['String']['input']>;
|
|
4484
|
+
readonly registrationDate?: InputMaybe<Scalars['TimelessDate']['input']>;
|
|
4485
|
+
readonly taxPrepaymentId?: InputMaybe<Scalars['String']['input']>;
|
|
4486
|
+
};
|
|
4487
|
+
|
|
4441
4488
|
/** input for updateBusiness */
|
|
4442
4489
|
export type UpdateBusinessInput = {
|
|
4443
4490
|
readonly address?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -4994,6 +5041,7 @@ export type ResolversTypes = {
|
|
|
4994
5041
|
CorporateTaxRulingComplianceReport: ResolverTypeWrapper<CorporateTaxRulingComplianceReportProto>;
|
|
4995
5042
|
CorporateTaxRulingComplianceReportDifferences: ResolverTypeWrapper<CorporateTaxRulingComplianceReportDifferences>;
|
|
4996
5043
|
Country: ResolverTypeWrapper<IGetAllCountriesResult>;
|
|
5044
|
+
CreateAdminBusinessInput: CreateAdminBusinessInput;
|
|
4997
5045
|
CreateContractInput: CreateContractInput;
|
|
4998
5046
|
CreditInvoice: ResolverTypeWrapper<IGetAllDocumentsResult>;
|
|
4999
5047
|
CreditcardBankCharge: ResolverTypeWrapper<IGetChargesByIdsResult>;
|
|
@@ -5160,6 +5208,7 @@ export type ResolversTypes = {
|
|
|
5160
5208
|
UncategorizedTransaction: ResolverTypeWrapper<Omit<UncategorizedTransaction, 'transaction'> & { transaction: ResolversTypes['Transaction'] }>;
|
|
5161
5209
|
UniformFormat: ResolverTypeWrapper<UniformFormat>;
|
|
5162
5210
|
Unprocessed: ResolverTypeWrapper<IGetAllDocumentsResult>;
|
|
5211
|
+
UpdateAdminBusinessInput: UpdateAdminBusinessInput;
|
|
5163
5212
|
UpdateBusinessInput: UpdateBusinessInput;
|
|
5164
5213
|
UpdateBusinessResponse: ResolverTypeWrapper<ResolversUnionTypes<ResolversTypes>['UpdateBusinessResponse']>;
|
|
5165
5214
|
UpdateBusinessTripAccommodationsExpenseInput: UpdateBusinessTripAccommodationsExpenseInput;
|
|
@@ -5271,6 +5320,7 @@ export type ResolversParentTypes = {
|
|
|
5271
5320
|
CorporateTaxRulingComplianceReport: CorporateTaxRulingComplianceReportProto;
|
|
5272
5321
|
CorporateTaxRulingComplianceReportDifferences: CorporateTaxRulingComplianceReportDifferences;
|
|
5273
5322
|
Country: IGetAllCountriesResult;
|
|
5323
|
+
CreateAdminBusinessInput: CreateAdminBusinessInput;
|
|
5274
5324
|
CreateContractInput: CreateContractInput;
|
|
5275
5325
|
CreditInvoice: IGetAllDocumentsResult;
|
|
5276
5326
|
CreditcardBankCharge: IGetChargesByIdsResult;
|
|
@@ -5409,6 +5459,7 @@ export type ResolversParentTypes = {
|
|
|
5409
5459
|
UncategorizedTransaction: Omit<UncategorizedTransaction, 'transaction'> & { transaction: ResolversParentTypes['Transaction'] };
|
|
5410
5460
|
UniformFormat: UniformFormat;
|
|
5411
5461
|
Unprocessed: IGetAllDocumentsResult;
|
|
5462
|
+
UpdateAdminBusinessInput: UpdateAdminBusinessInput;
|
|
5412
5463
|
UpdateBusinessInput: UpdateBusinessInput;
|
|
5413
5464
|
UpdateBusinessResponse: ResolversUnionTypes<ResolversParentTypes>['UpdateBusinessResponse'];
|
|
5414
5465
|
UpdateBusinessTripAccommodationsExpenseInput: UpdateBusinessTripAccommodationsExpenseInput;
|
|
@@ -5471,10 +5522,15 @@ export type StreamDirectiveArgs = { };
|
|
|
5471
5522
|
export type StreamDirectiveResolver<Result, Parent, ContextType = GraphQLModules.Context, Args = StreamDirectiveArgs> = DirectiveResolverFn<Result, Parent, ContextType, Args>;
|
|
5472
5523
|
|
|
5473
5524
|
export type AdminBusinessResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['AdminBusiness'] = ResolversParentTypes['AdminBusiness']> = {
|
|
5525
|
+
advanceTaxRate?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
|
|
5474
5526
|
business?: Resolver<ResolversTypes['LtdFinancialEntity'], ParentType, ContextType>;
|
|
5527
|
+
employerWithholdingTaxAccountNumber?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
5475
5528
|
governmentId?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
5476
5529
|
id?: Resolver<ResolversTypes['UUID'], ParentType, ContextType>;
|
|
5477
5530
|
name?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
5531
|
+
nationalInsuranceEmployerId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
5532
|
+
registrationDate?: Resolver<ResolversTypes['TimelessDate'], ParentType, ContextType>;
|
|
5533
|
+
taxPrepaymentId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
5478
5534
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
5479
5535
|
};
|
|
5480
5536
|
|
|
@@ -6807,6 +6863,7 @@ export type LinkableResolvers<ContextType = GraphQLModules.Context, ParentType e
|
|
|
6807
6863
|
export type LtdFinancialEntityResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['LtdFinancialEntity'] = ResolversParentTypes['LtdFinancialEntity']> = {
|
|
6808
6864
|
accounts?: Resolver<ReadonlyArray<ResolversTypes['FinancialAccount']>, ParentType, ContextType>;
|
|
6809
6865
|
address?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
6866
|
+
adminInfo?: Resolver<Maybe<ResolversTypes['AdminBusiness']>, ParentType, ContextType>;
|
|
6810
6867
|
charges?: Resolver<ResolversTypes['PaginatedCharges'], ParentType, ContextType, RequireFields<LtdFinancialEntityChargesArgs, 'limit' | 'page'>>;
|
|
6811
6868
|
clientInfo?: Resolver<Maybe<ResolversTypes['Client']>, ParentType, ContextType>;
|
|
6812
6869
|
country?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
@@ -6912,8 +6969,10 @@ export type MutationResolvers<ContextType = GraphQLModules.Context, ParentType e
|
|
|
6912
6969
|
categorizeBusinessTripExpense?: Resolver<ResolversTypes['UUID'], ParentType, ContextType, RequireFields<MutationCategorizeBusinessTripExpenseArgs, 'fields'>>;
|
|
6913
6970
|
categorizeIntoExistingBusinessTripExpense?: Resolver<ResolversTypes['UUID'], ParentType, ContextType, RequireFields<MutationCategorizeIntoExistingBusinessTripExpenseArgs, 'fields'>>;
|
|
6914
6971
|
closeDocument?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType, RequireFields<MutationCloseDocumentArgs, 'id'>>;
|
|
6972
|
+
createAdminBusiness?: Resolver<ResolversTypes['AdminBusiness'], ParentType, ContextType, RequireFields<MutationCreateAdminBusinessArgs, 'input'>>;
|
|
6915
6973
|
createContract?: Resolver<ResolversTypes['Contract'], ParentType, ContextType, RequireFields<MutationCreateContractArgs, 'input'>>;
|
|
6916
6974
|
creditShareholdersBusinessTripTravelAndSubsistence?: Resolver<ReadonlyArray<ResolversTypes['UUID']>, ParentType, ContextType, RequireFields<MutationCreditShareholdersBusinessTripTravelAndSubsistenceArgs, 'businessTripId'>>;
|
|
6975
|
+
deleteAdminBusiness?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType, RequireFields<MutationDeleteAdminBusinessArgs, 'businessId'>>;
|
|
6917
6976
|
deleteBusinessTripAttendee?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType, RequireFields<MutationDeleteBusinessTripAttendeeArgs, 'fields'>>;
|
|
6918
6977
|
deleteBusinessTripExpense?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType, RequireFields<MutationDeleteBusinessTripExpenseArgs, 'businessTripExpenseId'>>;
|
|
6919
6978
|
deleteCharge?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType, RequireFields<MutationDeleteChargeArgs, 'chargeId'>>;
|
|
@@ -6961,6 +7020,7 @@ export type MutationResolvers<ContextType = GraphQLModules.Context, ParentType e
|
|
|
6961
7020
|
startGmailListener?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>;
|
|
6962
7021
|
stopGmailListener?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>;
|
|
6963
7022
|
uncategorizePartialBusinessTripExpense?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType, RequireFields<MutationUncategorizePartialBusinessTripExpenseArgs, 'businessTripExpenseId' | 'transactionId'>>;
|
|
7023
|
+
updateAdminBusiness?: Resolver<ResolversTypes['AdminBusiness'], ParentType, ContextType, RequireFields<MutationUpdateAdminBusinessArgs, 'businessId' | 'fields'>>;
|
|
6964
7024
|
updateAdminContext?: Resolver<ResolversTypes['AdminContext'], ParentType, ContextType, RequireFields<MutationUpdateAdminContextArgs, 'context'>>;
|
|
6965
7025
|
updateBusiness?: Resolver<ResolversTypes['UpdateBusinessResponse'], ParentType, ContextType, RequireFields<MutationUpdateBusinessArgs, 'businessId' | 'fields' | 'ownerId'>>;
|
|
6966
7026
|
updateBusinessTrip?: Resolver<ResolversTypes['UUID'], ParentType, ContextType, RequireFields<MutationUpdateBusinessTripArgs, 'fields'>>;
|
|
@@ -3,18 +3,18 @@ import * as gm from "graphql-modules";
|
|
|
3
3
|
export 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' | 'employerWithholdingTaxAccountNumber' | 'taxPrepaymentId' | 'nationalInsuranceEmployerId' | 'advanceTaxRate' | 'registrationDate';
|
|
7
8
|
BusinessTransactionsSumFromLedgerRecordsSuccessfulResult: 'businessTransactionsSum';
|
|
8
9
|
BusinessTransactionSum: 'business' | 'credit' | 'debit' | 'total' | 'foreignCurrenciesSum';
|
|
9
10
|
ForeignCurrencySum: 'credit' | 'debit' | 'total' | 'currency';
|
|
10
11
|
BusinessTransactionsFromLedgerRecordsSuccessfulResult: 'businessTransactions';
|
|
11
12
|
BusinessTransaction: 'amount' | 'business' | 'foreignAmount' | 'invoiceDate' | 'reference' | 'details' | 'counterAccount' | 'chargeId';
|
|
12
13
|
PaginatedBusinesses: 'nodes' | 'pageInfo';
|
|
13
|
-
LtdFinancialEntity: 'id' | 'country' | 'governmentId' | 'name' | 'address' | 'hebrewName' | 'email' | 'website' | 'phoneNumber' | 'exemptDealer' | 'optionalVAT' | 'suggestions' | 'pcn874RecordType' | 'irsCode' | 'isActive' | 'isReceiptEnough' | 'isDocumentsOptional' | 'createdAt' | 'updatedAt' | 'clientInfo' | 'taxCategory';
|
|
14
|
+
LtdFinancialEntity: 'adminInfo' | 'id' | 'country' | 'governmentId' | 'name' | 'address' | 'hebrewName' | 'email' | 'website' | 'phoneNumber' | 'exemptDealer' | 'optionalVAT' | 'suggestions' | 'pcn874RecordType' | 'irsCode' | 'isActive' | 'isReceiptEnough' | 'isDocumentsOptional' | 'createdAt' | 'updatedAt' | 'clientInfo' | 'taxCategory';
|
|
14
15
|
Suggestions: 'phrases' | 'tags' | 'description' | 'emails' | 'emailListener' | 'priority';
|
|
15
16
|
SuggestionsEmailListenerConfig: 'internalEmailLinks' | 'emailBody' | 'attachments';
|
|
16
17
|
PersonalFinancialEntity: 'id' | 'name' | 'email' | 'pcn874RecordType' | 'irsCode' | 'isActive' | 'createdAt' | 'updatedAt';
|
|
17
|
-
Mutation: 'updateBusiness' | 'insertNewBusiness' | 'mergeBusinesses' | 'batchGenerateBusinessesOutOfTransactions' | 'updateClient' | 'insertClient' | 'updateTaxCategory' | 'insertTaxCategory';
|
|
18
18
|
Client: 'id' | 'originalBusiness' | 'greenInvoiceId' | 'hiveId' | 'emails' | 'generatedDocumentType' | 'greenInvoiceInfo';
|
|
19
19
|
PaginatedFinancialEntities: 'nodes' | 'pageInfo';
|
|
20
20
|
TaxCategory: 'id' | 'name' | 'irsCode' | 'createdAt' | 'updatedAt' | 'isActive';
|
|
@@ -50,6 +50,8 @@ export namespace FinancialEntitiesModule {
|
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
interface DefinedInputFields {
|
|
53
|
+
CreateAdminBusinessInput: 'businessId' | 'employerWithholdingTaxAccountNumber' | 'taxPrepaymentId' | 'nationalInsuranceEmployerId' | 'advanceTaxRate' | 'registrationDate';
|
|
54
|
+
UpdateAdminBusinessInput: 'employerWithholdingTaxAccountNumber' | 'taxPrepaymentId' | 'nationalInsuranceEmployerId' | 'advanceTaxRate' | 'registrationDate';
|
|
53
55
|
BusinessTransactionsFilter: 'businessIDs' | 'ownerIds' | 'type' | 'fromDate' | 'toDate' | 'includeRevaluation';
|
|
54
56
|
UpdateBusinessInput: 'name' | 'sortCode' | 'country' | 'hebrewName' | 'address' | 'email' | 'website' | 'phoneNumber' | 'governmentId' | 'taxCategory' | 'exemptDealer' | 'suggestions' | 'optionalVAT' | 'isReceiptEnough' | 'isDocumentsOptional' | 'pcn874RecordType' | 'irsCode' | 'isActive';
|
|
55
57
|
InsertNewBusinessInput: 'name' | 'sortCode' | 'country' | 'hebrewName' | 'address' | 'email' | 'website' | 'phoneNumber' | 'governmentId' | 'taxCategory' | 'exemptDealer' | 'suggestions' | 'optionalVAT' | 'isReceiptEnough' | 'isDocumentsOptional' | 'pcn874RecordType' | 'irsCode' | 'isActive';
|
|
@@ -65,12 +67,15 @@ export namespace FinancialEntitiesModule {
|
|
|
65
67
|
export type Query = Pick<Types.Query, DefinedFields['Query']>;
|
|
66
68
|
export type AdminBusiness = Pick<Types.AdminBusiness, DefinedFields['AdminBusiness']>;
|
|
67
69
|
export type UUID = Types.Uuid;
|
|
70
|
+
export type Mutation = Pick<Types.Mutation, DefinedFields['Mutation']>;
|
|
71
|
+
export type CreateAdminBusinessInput = Pick<Types.CreateAdminBusinessInput, DefinedInputFields['CreateAdminBusinessInput']>;
|
|
72
|
+
export type UpdateAdminBusinessInput = Pick<Types.UpdateAdminBusinessInput, DefinedInputFields['UpdateAdminBusinessInput']>;
|
|
68
73
|
export type LtdFinancialEntity = Pick<Types.LtdFinancialEntity, DefinedFields['LtdFinancialEntity']>;
|
|
74
|
+
export type TimelessDate = Types.TimelessDate;
|
|
69
75
|
export type BusinessTransactionsSumFromLedgerRecordsResult = Types.BusinessTransactionsSumFromLedgerRecordsResult;
|
|
70
76
|
export type BusinessTransactionsFilter = Pick<Types.BusinessTransactionsFilter, DefinedInputFields['BusinessTransactionsFilter']>;
|
|
71
77
|
export type BusinessTransactionsFromLedgerRecordsResult = Types.BusinessTransactionsFromLedgerRecordsResult;
|
|
72
78
|
export type FinancialEntityType = DefinedEnumValues['FinancialEntityType'];
|
|
73
|
-
export type TimelessDate = Types.TimelessDate;
|
|
74
79
|
export type BusinessTransactionsSumFromLedgerRecordsSuccessfulResult = Pick<Types.BusinessTransactionsSumFromLedgerRecordsSuccessfulResult, DefinedFields['BusinessTransactionsSumFromLedgerRecordsSuccessfulResult']>;
|
|
75
80
|
export type CommonError = Types.CommonError;
|
|
76
81
|
export type BusinessTransactionSum = Pick<Types.BusinessTransactionSum, DefinedFields['BusinessTransactionSum']>;
|
|
@@ -90,7 +95,6 @@ export namespace FinancialEntitiesModule {
|
|
|
90
95
|
export type SuggestionsEmailListenerConfig = Pick<Types.SuggestionsEmailListenerConfig, DefinedFields['SuggestionsEmailListenerConfig']>;
|
|
91
96
|
export type EmailAttachmentType = DefinedEnumValues['EmailAttachmentType'];
|
|
92
97
|
export type PersonalFinancialEntity = Pick<Types.PersonalFinancialEntity, DefinedFields['PersonalFinancialEntity']>;
|
|
93
|
-
export type Mutation = Pick<Types.Mutation, DefinedFields['Mutation']>;
|
|
94
98
|
export type UpdateBusinessResponse = Types.UpdateBusinessResponse;
|
|
95
99
|
export type UpdateBusinessInput = Pick<Types.UpdateBusinessInput, DefinedInputFields['UpdateBusinessInput']>;
|
|
96
100
|
export type InsertNewBusinessInput = Pick<Types.InsertNewBusinessInput, DefinedInputFields['InsertNewBusinessInput']>;
|
|
@@ -133,6 +137,7 @@ export namespace FinancialEntitiesModule {
|
|
|
133
137
|
export type InsertTaxCategoryInput = Pick<Types.InsertTaxCategoryInput, DefinedInputFields['InsertTaxCategoryInput']>;
|
|
134
138
|
|
|
135
139
|
export type QueryResolvers = Pick<Types.QueryResolvers, DefinedFields['Query']>;
|
|
140
|
+
export type MutationResolvers = Pick<Types.MutationResolvers, DefinedFields['Mutation']>;
|
|
136
141
|
export type AdminBusinessResolvers = Pick<Types.AdminBusinessResolvers, DefinedFields['AdminBusiness']>;
|
|
137
142
|
export type BusinessTransactionsSumFromLedgerRecordsSuccessfulResultResolvers = Pick<Types.BusinessTransactionsSumFromLedgerRecordsSuccessfulResultResolvers, DefinedFields['BusinessTransactionsSumFromLedgerRecordsSuccessfulResult'] | '__isTypeOf'>;
|
|
138
143
|
export type BusinessTransactionSumResolvers = Pick<Types.BusinessTransactionSumResolvers, DefinedFields['BusinessTransactionSum']>;
|
|
@@ -144,7 +149,6 @@ export namespace FinancialEntitiesModule {
|
|
|
144
149
|
export type SuggestionsResolvers = Pick<Types.SuggestionsResolvers, DefinedFields['Suggestions']>;
|
|
145
150
|
export type SuggestionsEmailListenerConfigResolvers = Pick<Types.SuggestionsEmailListenerConfigResolvers, DefinedFields['SuggestionsEmailListenerConfig']>;
|
|
146
151
|
export type PersonalFinancialEntityResolvers = Pick<Types.PersonalFinancialEntityResolvers, DefinedFields['PersonalFinancialEntity'] | '__isTypeOf'>;
|
|
147
|
-
export type MutationResolvers = Pick<Types.MutationResolvers, DefinedFields['Mutation']>;
|
|
148
152
|
export type ClientResolvers = Pick<Types.ClientResolvers, DefinedFields['Client'] | '__isTypeOf'>;
|
|
149
153
|
export type PaginatedFinancialEntitiesResolvers = Pick<Types.PaginatedFinancialEntitiesResolvers, DefinedFields['PaginatedFinancialEntities']>;
|
|
150
154
|
export type TaxCategoryResolvers = Pick<Types.TaxCategoryResolvers, DefinedFields['TaxCategory'] | '__isTypeOf'>;
|
|
@@ -175,6 +179,7 @@ export namespace FinancialEntitiesModule {
|
|
|
175
179
|
|
|
176
180
|
export interface Resolvers {
|
|
177
181
|
Query?: QueryResolvers;
|
|
182
|
+
Mutation?: MutationResolvers;
|
|
178
183
|
AdminBusiness?: AdminBusinessResolvers;
|
|
179
184
|
BusinessTransactionsSumFromLedgerRecordsSuccessfulResult?: BusinessTransactionsSumFromLedgerRecordsSuccessfulResultResolvers;
|
|
180
185
|
BusinessTransactionSum?: BusinessTransactionSumResolvers;
|
|
@@ -186,7 +191,6 @@ export namespace FinancialEntitiesModule {
|
|
|
186
191
|
Suggestions?: SuggestionsResolvers;
|
|
187
192
|
SuggestionsEmailListenerConfig?: SuggestionsEmailListenerConfigResolvers;
|
|
188
193
|
PersonalFinancialEntity?: PersonalFinancialEntityResolvers;
|
|
189
|
-
Mutation?: MutationResolvers;
|
|
190
194
|
Client?: ClientResolvers;
|
|
191
195
|
PaginatedFinancialEntities?: PaginatedFinancialEntitiesResolvers;
|
|
192
196
|
TaxCategory?: TaxCategoryResolvers;
|
|
@@ -232,12 +236,56 @@ export namespace FinancialEntitiesModule {
|
|
|
232
236
|
taxCategory?: gm.Middleware[];
|
|
233
237
|
taxCategoryByBusinessId?: gm.Middleware[];
|
|
234
238
|
};
|
|
239
|
+
Mutation?: {
|
|
240
|
+
'*'?: gm.Middleware[];
|
|
241
|
+
createAdminBusiness?: gm.Middleware[];
|
|
242
|
+
updateAdminBusiness?: gm.Middleware[];
|
|
243
|
+
deleteAdminBusiness?: gm.Middleware[];
|
|
244
|
+
updateBusiness?: gm.Middleware[];
|
|
245
|
+
insertNewBusiness?: gm.Middleware[];
|
|
246
|
+
mergeBusinesses?: gm.Middleware[];
|
|
247
|
+
batchGenerateBusinessesOutOfTransactions?: gm.Middleware[];
|
|
248
|
+
updateClient?: gm.Middleware[];
|
|
249
|
+
insertClient?: gm.Middleware[];
|
|
250
|
+
updateTaxCategory?: gm.Middleware[];
|
|
251
|
+
insertTaxCategory?: gm.Middleware[];
|
|
252
|
+
};
|
|
235
253
|
AdminBusiness?: {
|
|
236
254
|
'*'?: gm.Middleware[];
|
|
237
255
|
id?: gm.Middleware[];
|
|
238
256
|
name?: gm.Middleware[];
|
|
239
257
|
governmentId?: gm.Middleware[];
|
|
240
258
|
business?: gm.Middleware[];
|
|
259
|
+
employerWithholdingTaxAccountNumber?: gm.Middleware[];
|
|
260
|
+
taxPrepaymentId?: gm.Middleware[];
|
|
261
|
+
nationalInsuranceEmployerId?: gm.Middleware[];
|
|
262
|
+
advanceTaxRate?: gm.Middleware[];
|
|
263
|
+
registrationDate?: gm.Middleware[];
|
|
264
|
+
};
|
|
265
|
+
LtdFinancialEntity?: {
|
|
266
|
+
'*'?: gm.Middleware[];
|
|
267
|
+
adminInfo?: gm.Middleware[];
|
|
268
|
+
id?: gm.Middleware[];
|
|
269
|
+
country?: gm.Middleware[];
|
|
270
|
+
governmentId?: gm.Middleware[];
|
|
271
|
+
name?: gm.Middleware[];
|
|
272
|
+
address?: gm.Middleware[];
|
|
273
|
+
hebrewName?: gm.Middleware[];
|
|
274
|
+
email?: gm.Middleware[];
|
|
275
|
+
website?: gm.Middleware[];
|
|
276
|
+
phoneNumber?: gm.Middleware[];
|
|
277
|
+
exemptDealer?: gm.Middleware[];
|
|
278
|
+
optionalVAT?: gm.Middleware[];
|
|
279
|
+
suggestions?: gm.Middleware[];
|
|
280
|
+
pcn874RecordType?: gm.Middleware[];
|
|
281
|
+
irsCode?: gm.Middleware[];
|
|
282
|
+
isActive?: gm.Middleware[];
|
|
283
|
+
isReceiptEnough?: gm.Middleware[];
|
|
284
|
+
isDocumentsOptional?: gm.Middleware[];
|
|
285
|
+
createdAt?: gm.Middleware[];
|
|
286
|
+
updatedAt?: gm.Middleware[];
|
|
287
|
+
clientInfo?: gm.Middleware[];
|
|
288
|
+
taxCategory?: gm.Middleware[];
|
|
241
289
|
};
|
|
242
290
|
BusinessTransactionsSumFromLedgerRecordsSuccessfulResult?: {
|
|
243
291
|
'*'?: gm.Middleware[];
|
|
@@ -278,30 +326,6 @@ export namespace FinancialEntitiesModule {
|
|
|
278
326
|
nodes?: gm.Middleware[];
|
|
279
327
|
pageInfo?: gm.Middleware[];
|
|
280
328
|
};
|
|
281
|
-
LtdFinancialEntity?: {
|
|
282
|
-
'*'?: gm.Middleware[];
|
|
283
|
-
id?: gm.Middleware[];
|
|
284
|
-
country?: gm.Middleware[];
|
|
285
|
-
governmentId?: gm.Middleware[];
|
|
286
|
-
name?: gm.Middleware[];
|
|
287
|
-
address?: gm.Middleware[];
|
|
288
|
-
hebrewName?: gm.Middleware[];
|
|
289
|
-
email?: gm.Middleware[];
|
|
290
|
-
website?: gm.Middleware[];
|
|
291
|
-
phoneNumber?: gm.Middleware[];
|
|
292
|
-
exemptDealer?: gm.Middleware[];
|
|
293
|
-
optionalVAT?: gm.Middleware[];
|
|
294
|
-
suggestions?: gm.Middleware[];
|
|
295
|
-
pcn874RecordType?: gm.Middleware[];
|
|
296
|
-
irsCode?: gm.Middleware[];
|
|
297
|
-
isActive?: gm.Middleware[];
|
|
298
|
-
isReceiptEnough?: gm.Middleware[];
|
|
299
|
-
isDocumentsOptional?: gm.Middleware[];
|
|
300
|
-
createdAt?: gm.Middleware[];
|
|
301
|
-
updatedAt?: gm.Middleware[];
|
|
302
|
-
clientInfo?: gm.Middleware[];
|
|
303
|
-
taxCategory?: gm.Middleware[];
|
|
304
|
-
};
|
|
305
329
|
Suggestions?: {
|
|
306
330
|
'*'?: gm.Middleware[];
|
|
307
331
|
phrases?: gm.Middleware[];
|
|
@@ -328,17 +352,6 @@ export namespace FinancialEntitiesModule {
|
|
|
328
352
|
createdAt?: gm.Middleware[];
|
|
329
353
|
updatedAt?: gm.Middleware[];
|
|
330
354
|
};
|
|
331
|
-
Mutation?: {
|
|
332
|
-
'*'?: gm.Middleware[];
|
|
333
|
-
updateBusiness?: gm.Middleware[];
|
|
334
|
-
insertNewBusiness?: gm.Middleware[];
|
|
335
|
-
mergeBusinesses?: gm.Middleware[];
|
|
336
|
-
batchGenerateBusinessesOutOfTransactions?: gm.Middleware[];
|
|
337
|
-
updateClient?: gm.Middleware[];
|
|
338
|
-
insertClient?: gm.Middleware[];
|
|
339
|
-
updateTaxCategory?: gm.Middleware[];
|
|
340
|
-
insertTaxCategory?: gm.Middleware[];
|
|
341
|
-
};
|
|
342
355
|
CommonCharge?: {
|
|
343
356
|
'*'?: gm.Middleware[];
|
|
344
357
|
owner?: gm.Middleware[];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GraphQLError } from 'graphql';
|
|
2
|
+
import { dateToTimelessDateString } from '@shared/helpers';
|
|
2
3
|
import { AdminBusinessesProvider } from '../providers/admin-businesses.provider.js';
|
|
3
4
|
import { BusinessesProvider } from '../providers/businesses.provider.js';
|
|
4
5
|
import type { FinancialEntitiesModule } from '../types.js';
|
|
@@ -37,5 +38,24 @@ export const adminBusinessesResolvers: FinancialEntitiesModule.Resolvers = {
|
|
|
37
38
|
}
|
|
38
39
|
return business;
|
|
39
40
|
},
|
|
41
|
+
employerWithholdingTaxAccountNumber: admin => admin.tax_nikuim_pinkas_number,
|
|
42
|
+
taxPrepaymentId: admin => admin.tax_siduri_number_2022,
|
|
43
|
+
nationalInsuranceEmployerId: admin => admin.pinkas_social_security_2022,
|
|
44
|
+
advanceTaxRate: admin => admin.advance_tax_rate,
|
|
45
|
+
registrationDate: admin => {
|
|
46
|
+
if (!admin.registration_date) {
|
|
47
|
+
throw new GraphQLError(`Admin business ID="${admin.id}" has no registration date`);
|
|
48
|
+
}
|
|
49
|
+
return dateToTimelessDateString(admin.registration_date);
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
LtdFinancialEntity: {
|
|
53
|
+
adminInfo: async (parentBusiness, _, { injector }) => {
|
|
54
|
+
const adminBusiness = await injector
|
|
55
|
+
.get(AdminBusinessesProvider)
|
|
56
|
+
.getAdminBusinessByIdLoader.load(parentBusiness.id);
|
|
57
|
+
|
|
58
|
+
return adminBusiness ?? null;
|
|
59
|
+
},
|
|
40
60
|
},
|
|
41
61
|
};
|
|
@@ -5,6 +5,14 @@ export default gql`
|
|
|
5
5
|
adminBusiness(id: UUID!): AdminBusiness! @auth(role: ACCOUNTANT)
|
|
6
6
|
allAdminBusinesses: [AdminBusiness!]! @auth(role: ACCOUNTANT)
|
|
7
7
|
}
|
|
8
|
+
extend type Mutation {
|
|
9
|
+
createAdminBusiness(input: CreateAdminBusinessInput!): AdminBusiness! @auth(role: ADMIN)
|
|
10
|
+
|
|
11
|
+
updateAdminBusiness(businessId: UUID!, fields: UpdateAdminBusinessInput!): AdminBusiness!
|
|
12
|
+
@auth(role: ADMIN)
|
|
13
|
+
|
|
14
|
+
deleteAdminBusiness(businessId: UUID!): Boolean! @auth(role: ADMIN)
|
|
15
|
+
}
|
|
8
16
|
|
|
9
17
|
" Represents a business entity managed by an accountant in the system."
|
|
10
18
|
type AdminBusiness {
|
|
@@ -12,5 +20,33 @@ export default gql`
|
|
|
12
20
|
name: String!
|
|
13
21
|
governmentId: String!
|
|
14
22
|
business: LtdFinancialEntity!
|
|
23
|
+
employerWithholdingTaxAccountNumber: String
|
|
24
|
+
taxPrepaymentId: String
|
|
25
|
+
nationalInsuranceEmployerId: String
|
|
26
|
+
advanceTaxRate: Float
|
|
27
|
+
registrationDate: TimelessDate!
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
" Input type for creating a new admin business. "
|
|
31
|
+
input CreateAdminBusinessInput {
|
|
32
|
+
businessId: UUID!
|
|
33
|
+
employerWithholdingTaxAccountNumber: String
|
|
34
|
+
taxPrepaymentId: String
|
|
35
|
+
nationalInsuranceEmployerId: String
|
|
36
|
+
advanceTaxRate: Float
|
|
37
|
+
registrationDate: TimelessDate!
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
" Input type for updating admin business details. "
|
|
41
|
+
input UpdateAdminBusinessInput {
|
|
42
|
+
employerWithholdingTaxAccountNumber: String
|
|
43
|
+
taxPrepaymentId: String
|
|
44
|
+
nationalInsuranceEmployerId: String
|
|
45
|
+
advanceTaxRate: Float
|
|
46
|
+
registrationDate: TimelessDate
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
extend type LtdFinancialEntity {
|
|
50
|
+
adminInfo: AdminBusiness
|
|
15
51
|
}
|
|
16
52
|
`;
|