@accounter/server 0.0.8-alpha-20251030164843-d2f490daba879840366288d1f62974ab25081876 → 0.0.8-alpha-20251031141702-e34a767c5819bcbc513f11c64581c7a3a88fb731
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 +31 -7
- package/dist/server/src/__generated__/types.d.ts +70 -18
- package/dist/server/src/__generated__/types.js.map +1 -1
- package/dist/server/src/modules/financial-entities/__generated__/admin-businesses.types.d.ts +57 -0
- package/dist/server/src/modules/financial-entities/__generated__/admin-businesses.types.js +0 -1
- 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 +33 -10
- package/dist/server/src/modules/financial-entities/__generated__/types.js.map +1 -1
- package/dist/server/src/modules/financial-entities/helpers/admin-businesses.helper.d.ts +31 -0
- package/dist/server/src/modules/financial-entities/helpers/admin-businesses.helper.js +27 -0
- package/dist/server/src/modules/financial-entities/helpers/admin-businesses.helper.js.map +1 -0
- package/dist/server/src/modules/financial-entities/providers/admin-businesses.provider.d.ts +2 -1
- package/dist/server/src/modules/financial-entities/providers/admin-businesses.provider.js +37 -0
- 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 +46 -11
- 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 +49 -16
- 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 +3 -3
- package/src/__generated__/types.ts +76 -18
- package/src/modules/financial-entities/__generated__/admin-businesses.types.ts +60 -0
- package/src/modules/financial-entities/__generated__/types.ts +33 -10
- package/src/modules/financial-entities/helpers/admin-businesses.helper.ts +33 -0
- package/src/modules/financial-entities/providers/admin-businesses.provider.ts +44 -0
- package/src/modules/financial-entities/resolvers/admin-businesses.resolver.ts +53 -11
- package/src/modules/financial-entities/typeDefs/admin-businesses.graphql.ts +49 -16
- package/src/modules/financial-entities/types.ts +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GraphQLError } from 'graphql';
|
|
2
2
|
import { dateToTimelessDateString } from '../../../shared/helpers/index.js';
|
|
3
|
+
import { taxAdvancesRatesSchema, yearlyIdsSchema } from '../helpers/admin-businesses.helper.js';
|
|
3
4
|
import { AdminBusinessesProvider } from '../providers/admin-businesses.provider.js';
|
|
4
5
|
import { BusinessesProvider } from '../providers/businesses.provider.js';
|
|
5
6
|
export const adminBusinessesResolvers = {
|
|
@@ -18,6 +19,39 @@ export const adminBusinessesResolvers = {
|
|
|
18
19
|
return adminBusinesses;
|
|
19
20
|
},
|
|
20
21
|
},
|
|
22
|
+
Mutation: {
|
|
23
|
+
updateAdminBusiness: async (_, { businessId, fields }, { injector }) => {
|
|
24
|
+
try {
|
|
25
|
+
await injector.get(AdminBusinessesProvider).updateAdminBusiness({
|
|
26
|
+
id: businessId,
|
|
27
|
+
businessRegistrationStartDate: fields.registrationDate,
|
|
28
|
+
companyTaxId: fields.withholdingTaxCompanyId,
|
|
29
|
+
taxAdvancesIds: fields.taxAdvancesAnnualIds
|
|
30
|
+
? [...fields.taxAdvancesAnnualIds]
|
|
31
|
+
: undefined,
|
|
32
|
+
advanceTaxRates: fields.taxAdvancesRates ? [...fields.taxAdvancesRates] : undefined,
|
|
33
|
+
withholdingTaxAnnualIds: fields.withholdingTaxAnnualIds
|
|
34
|
+
? [...fields.withholdingTaxAnnualIds]
|
|
35
|
+
: undefined,
|
|
36
|
+
socialSecurityEmployerIds: fields.socialSecurityEmployerIds
|
|
37
|
+
? [...fields.socialSecurityEmployerIds]
|
|
38
|
+
: undefined,
|
|
39
|
+
});
|
|
40
|
+
const updatedAdminBusiness = await injector
|
|
41
|
+
.get(AdminBusinessesProvider)
|
|
42
|
+
.getAdminBusinessByIdLoader.load(businessId);
|
|
43
|
+
if (!updatedAdminBusiness) {
|
|
44
|
+
throw new GraphQLError(`Error updating Admin business ID="${businessId}"`);
|
|
45
|
+
}
|
|
46
|
+
return updatedAdminBusiness;
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
const message = `Error updating Admin business ID="${businessId}"`;
|
|
50
|
+
console.error(message, error);
|
|
51
|
+
throw new GraphQLError(message);
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
},
|
|
21
55
|
AdminBusiness: {
|
|
22
56
|
id: admin => admin.id,
|
|
23
57
|
name: admin => admin.name,
|
|
@@ -27,6 +61,12 @@ export const adminBusinessesResolvers = {
|
|
|
27
61
|
}
|
|
28
62
|
return admin.vat_number;
|
|
29
63
|
},
|
|
64
|
+
registrationDate: admin => {
|
|
65
|
+
if (!admin.registration_date) {
|
|
66
|
+
throw new GraphQLError(`Admin business ID="${admin.id}" has no registration date`);
|
|
67
|
+
}
|
|
68
|
+
return dateToTimelessDateString(admin.registration_date);
|
|
69
|
+
},
|
|
30
70
|
business: async (admin, _, { injector }) => {
|
|
31
71
|
const business = await injector.get(BusinessesProvider).getBusinessByIdLoader.load(admin.id);
|
|
32
72
|
if (!business) {
|
|
@@ -34,17 +74,12 @@ export const adminBusinessesResolvers = {
|
|
|
34
74
|
}
|
|
35
75
|
return business;
|
|
36
76
|
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if (!admin.registration_date) {
|
|
44
|
-
throw new GraphQLError(`Admin business ID="${admin.id}" has no registration date`);
|
|
45
|
-
}
|
|
46
|
-
return dateToTimelessDateString(admin.registration_date);
|
|
47
|
-
},
|
|
77
|
+
taxAdvancesAnnualIds: admin => yearlyIdsSchema.parse(admin.tax_advances_ids),
|
|
78
|
+
taxAdvancesRates: admin => taxAdvancesRatesSchema.parse(admin.advance_tax_rates),
|
|
79
|
+
withholdingTaxCompanyId: admin => admin.company_tax_id,
|
|
80
|
+
withholdingTaxAnnualIds: admin => yearlyIdsSchema.parse(admin.withholding_tax_annual_ids),
|
|
81
|
+
socialSecurityDeductionsId: admin => `${admin.company_tax_id}00`,
|
|
82
|
+
socialSecurityEmployerIds: admin => yearlyIdsSchema.parse(admin.social_security_employer_ids),
|
|
48
83
|
},
|
|
49
84
|
LtdFinancialEntity: {
|
|
50
85
|
adminInfo: async (parentBusiness, _, { injector }) => {
|
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,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"admin-businesses.resolver.js","sourceRoot":"","sources":["../../../../../../src/modules/financial-entities/resolvers/admin-businesses.resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAChG,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,I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
|
22
|
-
withholdingTaxBookNumber: String
|
|
23
|
-
withholdingTaxFileNumber: String
|
|
24
|
-
socialSecurityEmployerId: String
|
|
25
|
-
taxAdvancesRate: Float
|
|
26
|
-
taxAdvancesId: String
|
|
27
21
|
registrationDate: TimelessDate!
|
|
22
|
+
business: LtdFinancialEntity!
|
|
23
|
+
" Tax Advances Info "
|
|
24
|
+
taxAdvancesAnnualIds: [AnnualId!]!
|
|
25
|
+
taxAdvancesRates: [TaxAdvancesRate!]!
|
|
26
|
+
" Withholding Tax Info "
|
|
27
|
+
withholdingTaxCompanyId: String
|
|
28
|
+
withholdingTaxAnnualIds: [AnnualId!]!
|
|
29
|
+
" Social Security Info "
|
|
30
|
+
socialSecurityDeductionsId: String
|
|
31
|
+
socialSecurityEmployerIds: [AnnualId!]!
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
" Represents an annual identifier for tax purposes. "
|
|
35
|
+
type AnnualId {
|
|
36
|
+
year: Int!
|
|
37
|
+
id: String!
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
" Represents the tax advance rate for a specific date. "
|
|
41
|
+
type TaxAdvancesRate {
|
|
42
|
+
date: TimelessDate!
|
|
43
|
+
rate: Float!
|
|
28
44
|
}
|
|
29
45
|
|
|
30
46
|
" Input type for creating a new admin business. "
|
|
31
47
|
input CreateAdminBusinessInput {
|
|
32
48
|
businessId: UUID!
|
|
33
|
-
withholdingTaxBookNumber: String
|
|
34
|
-
withholdingTaxFileNumber: String
|
|
35
|
-
socialSecurityEmployerId: String
|
|
36
|
-
taxAdvancesRate: Float
|
|
37
|
-
taxAdvancesId: String
|
|
38
49
|
registrationDate: TimelessDate!
|
|
50
|
+
companyTaxId: String!
|
|
51
|
+
taxAdvancesAnnualId: String
|
|
52
|
+
taxAdvancesRate: Float
|
|
53
|
+
withholdingTaxAnnualId: String
|
|
54
|
+
socialSecurityEmployerId: String
|
|
39
55
|
}
|
|
40
56
|
|
|
41
57
|
" Input type for updating admin business details. "
|
|
42
58
|
input UpdateAdminBusinessInput {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
socialSecurityEmployerId: String
|
|
46
|
-
taxAdvancesRate: Float
|
|
47
|
-
taxAdvancesId: String
|
|
59
|
+
name: String
|
|
60
|
+
governmentId: String
|
|
48
61
|
registrationDate: TimelessDate
|
|
62
|
+
" Tax Advances Info "
|
|
63
|
+
taxAdvancesAnnualIds: [AnnualIdInput!]
|
|
64
|
+
taxAdvancesRates: [TaxAdvancesRateInput!]
|
|
65
|
+
" Withholding Tax Info "
|
|
66
|
+
withholdingTaxCompanyId: String
|
|
67
|
+
withholdingTaxAnnualIds: [AnnualIdInput!]
|
|
68
|
+
" Social Security Info "
|
|
69
|
+
socialSecurityEmployerIds: [AnnualIdInput!]
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
" Input type representing an annual identifier for tax purposes. "
|
|
73
|
+
input AnnualIdInput {
|
|
74
|
+
year: Int!
|
|
75
|
+
id: String!
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
" Input type representing the tax advance rate for a specific date. "
|
|
79
|
+
input TaxAdvancesRateInput {
|
|
80
|
+
date: TimelessDate!
|
|
81
|
+
rate: Float!
|
|
49
82
|
}
|
|
50
83
|
|
|
51
84
|
extend type LtdFinancialEntity {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-businesses.graphql.js","sourceRoot":"","sources":["../../../../../../src/modules/financial-entities/typeDefs/admin-businesses.graphql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,eAAe,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"admin-businesses.graphql.js","sourceRoot":"","sources":["../../../../../../src/modules/financial-entities/typeDefs/admin-businesses.graphql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqFjB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from './__generated__/types.js';
|
|
2
|
-
export type { Json, pcn874_record_type } from './__generated__/businesses.types.js';
|
|
2
|
+
export type { Json, pcn874_record_type, DateOrString } from './__generated__/businesses.types.js';
|
|
3
3
|
export * from './__generated__/businesses.types.js';
|
|
4
4
|
export * from './__generated__/businesses-operation.types.js';
|
|
5
5
|
export * from './__generated__/admin-businesses.types.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@accounter/server",
|
|
3
|
-
"version": "0.0.8-alpha-
|
|
3
|
+
"version": "0.0.8-alpha-20251031141702-e34a767c5819bcbc513f11c64581c7a3a88fb731",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@accounter/pcn874-generator": "workspace:^",
|
|
23
23
|
"@accounter/shaam-uniform-format-generator": "workspace:^",
|
|
24
24
|
"@accounter/shaam6111-generator": "workspace:^",
|
|
25
|
-
"@ai-sdk/anthropic": "2.0.
|
|
25
|
+
"@ai-sdk/anthropic": "2.0.39",
|
|
26
26
|
"@envelop/generic-auth": "10.0.1",
|
|
27
27
|
"@envelop/graphql-modules": "8.0.0",
|
|
28
28
|
"@google-cloud/pubsub": "5.2.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@pgtyped/cli": "2.4.3",
|
|
32
32
|
"@pgtyped/runtime": "2.4.2",
|
|
33
33
|
"@whatwg-node/fetch": "0.10.11",
|
|
34
|
-
"ai": "5.0.
|
|
34
|
+
"ai": "5.0.82",
|
|
35
35
|
"basic-auth": "2.0.1",
|
|
36
36
|
"bcrypt": "6.0.0",
|
|
37
37
|
"cloudinary": "2.8.0",
|
|
@@ -148,11 +148,15 @@ export type AdminBusiness = {
|
|
|
148
148
|
readonly id: Scalars['UUID']['output'];
|
|
149
149
|
readonly name: Scalars['String']['output'];
|
|
150
150
|
readonly registrationDate: Scalars['TimelessDate']['output'];
|
|
151
|
-
|
|
152
|
-
readonly
|
|
153
|
-
readonly
|
|
154
|
-
|
|
155
|
-
readonly
|
|
151
|
+
/** Social Security Info */
|
|
152
|
+
readonly socialSecurityDeductionsId?: Maybe<Scalars['String']['output']>;
|
|
153
|
+
readonly socialSecurityEmployerIds: ReadonlyArray<AnnualId>;
|
|
154
|
+
/** Tax Advances Info */
|
|
155
|
+
readonly taxAdvancesAnnualIds: ReadonlyArray<AnnualId>;
|
|
156
|
+
readonly taxAdvancesRates: ReadonlyArray<TaxAdvancesRate>;
|
|
157
|
+
readonly withholdingTaxAnnualIds: ReadonlyArray<AnnualId>;
|
|
158
|
+
/** Withholding Tax Info */
|
|
159
|
+
readonly withholdingTaxCompanyId?: Maybe<Scalars['String']['output']>;
|
|
156
160
|
};
|
|
157
161
|
|
|
158
162
|
/** defines a tag / category for charge arrangement */
|
|
@@ -289,6 +293,19 @@ export type AdminContextInput = {
|
|
|
289
293
|
readonly zkufotIncomeTaxCategoryId?: InputMaybe<Scalars['UUID']['input']>;
|
|
290
294
|
};
|
|
291
295
|
|
|
296
|
+
/** Represents an annual identifier for tax purposes. */
|
|
297
|
+
export type AnnualId = {
|
|
298
|
+
readonly __typename?: 'AnnualId';
|
|
299
|
+
readonly id: Scalars['String']['output'];
|
|
300
|
+
readonly year: Scalars['Int']['output'];
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
/** Input type representing an annual identifier for tax purposes. */
|
|
304
|
+
export type AnnualIdInput = {
|
|
305
|
+
readonly id: Scalars['String']['input'];
|
|
306
|
+
readonly year: Scalars['Int']['input'];
|
|
307
|
+
};
|
|
308
|
+
|
|
292
309
|
/** Audit opinion type enum (חוות דעת) */
|
|
293
310
|
export type AuditOpinionType =
|
|
294
311
|
/** Adverse opinion (שלילית) */
|
|
@@ -1148,12 +1165,12 @@ export type Country = {
|
|
|
1148
1165
|
/** Input type for creating a new admin business. */
|
|
1149
1166
|
export type CreateAdminBusinessInput = {
|
|
1150
1167
|
readonly businessId: Scalars['UUID']['input'];
|
|
1168
|
+
readonly companyTaxId: Scalars['String']['input'];
|
|
1151
1169
|
readonly registrationDate: Scalars['TimelessDate']['input'];
|
|
1152
1170
|
readonly socialSecurityEmployerId?: InputMaybe<Scalars['String']['input']>;
|
|
1153
|
-
readonly
|
|
1171
|
+
readonly taxAdvancesAnnualId?: InputMaybe<Scalars['String']['input']>;
|
|
1154
1172
|
readonly taxAdvancesRate?: InputMaybe<Scalars['Float']['input']>;
|
|
1155
|
-
readonly
|
|
1156
|
-
readonly withholdingTaxFileNumber?: InputMaybe<Scalars['String']['input']>;
|
|
1173
|
+
readonly withholdingTaxAnnualId?: InputMaybe<Scalars['String']['input']>;
|
|
1157
1174
|
};
|
|
1158
1175
|
|
|
1159
1176
|
/** input for creating a new contract */
|
|
@@ -4395,6 +4412,19 @@ export type TagInput = {
|
|
|
4395
4412
|
readonly id: Scalars['String']['input'];
|
|
4396
4413
|
};
|
|
4397
4414
|
|
|
4415
|
+
/** Represents the tax advance rate for a specific date. */
|
|
4416
|
+
export type TaxAdvancesRate = {
|
|
4417
|
+
readonly __typename?: 'TaxAdvancesRate';
|
|
4418
|
+
readonly date: Scalars['TimelessDate']['output'];
|
|
4419
|
+
readonly rate: Scalars['Float']['output'];
|
|
4420
|
+
};
|
|
4421
|
+
|
|
4422
|
+
/** Input type representing the tax advance rate for a specific date. */
|
|
4423
|
+
export type TaxAdvancesRateInput = {
|
|
4424
|
+
readonly date: Scalars['TimelessDate']['input'];
|
|
4425
|
+
readonly rate: Scalars['Float']['input'];
|
|
4426
|
+
};
|
|
4427
|
+
|
|
4398
4428
|
/** Tax category entity used for ledger records */
|
|
4399
4429
|
export type TaxCategory = FinancialEntity & {
|
|
4400
4430
|
readonly __typename?: 'TaxCategory';
|
|
@@ -4519,12 +4549,17 @@ export type Unprocessed = Document & Linkable & {
|
|
|
4519
4549
|
|
|
4520
4550
|
/** Input type for updating admin business details. */
|
|
4521
4551
|
export type UpdateAdminBusinessInput = {
|
|
4552
|
+
readonly governmentId?: InputMaybe<Scalars['String']['input']>;
|
|
4553
|
+
readonly name?: InputMaybe<Scalars['String']['input']>;
|
|
4522
4554
|
readonly registrationDate?: InputMaybe<Scalars['TimelessDate']['input']>;
|
|
4523
|
-
|
|
4524
|
-
readonly
|
|
4525
|
-
|
|
4526
|
-
readonly
|
|
4527
|
-
readonly
|
|
4555
|
+
/** Social Security Info */
|
|
4556
|
+
readonly socialSecurityEmployerIds?: InputMaybe<ReadonlyArray<AnnualIdInput>>;
|
|
4557
|
+
/** Tax Advances Info */
|
|
4558
|
+
readonly taxAdvancesAnnualIds?: InputMaybe<ReadonlyArray<AnnualIdInput>>;
|
|
4559
|
+
readonly taxAdvancesRates?: InputMaybe<ReadonlyArray<TaxAdvancesRateInput>>;
|
|
4560
|
+
readonly withholdingTaxAnnualIds?: InputMaybe<ReadonlyArray<AnnualIdInput>>;
|
|
4561
|
+
/** Withholding Tax Info */
|
|
4562
|
+
readonly withholdingTaxCompanyId?: InputMaybe<Scalars['String']['input']>;
|
|
4528
4563
|
};
|
|
4529
4564
|
|
|
4530
4565
|
/** input for updateBusiness */
|
|
@@ -5022,6 +5057,8 @@ export type ResolversTypes = {
|
|
|
5022
5057
|
AdminBusiness: ResolverTypeWrapper<IGetAllAdminBusinessesResult>;
|
|
5023
5058
|
AdminContext: ResolverTypeWrapper<IGetAdminContextsResult>;
|
|
5024
5059
|
AdminContextInput: AdminContextInput;
|
|
5060
|
+
AnnualId: ResolverTypeWrapper<AnnualId>;
|
|
5061
|
+
AnnualIdInput: AnnualIdInput;
|
|
5025
5062
|
AuditOpinionType: AuditOpinionType;
|
|
5026
5063
|
BalanceTransactions: ResolverTypeWrapper<IGetNormalizedBalanceTransactionsResult>;
|
|
5027
5064
|
BankDeposit: ResolverTypeWrapper<Omit<BankDeposit, 'transactions'> & { transactions: ReadonlyArray<ResolversTypes['Transaction']> }>;
|
|
@@ -5238,6 +5275,8 @@ export type ResolversTypes = {
|
|
|
5238
5275
|
SuggestionsInput: SuggestionsInput;
|
|
5239
5276
|
Tag: ResolverTypeWrapper<IGetAllTagsResult>;
|
|
5240
5277
|
TagInput: TagInput;
|
|
5278
|
+
TaxAdvancesRate: ResolverTypeWrapper<TaxAdvancesRate>;
|
|
5279
|
+
TaxAdvancesRateInput: TaxAdvancesRateInput;
|
|
5241
5280
|
TaxCategory: ResolverTypeWrapper<IGetAllTaxCategoriesResult>;
|
|
5242
5281
|
TaxReport: ResolverTypeWrapper<Omit<TaxReport, 'reference' | 'report'> & { reference: ReadonlyArray<ResolversTypes['TaxReportYear']>, report: ResolversTypes['TaxReportYear'] }>;
|
|
5243
5282
|
TaxReportYear: ResolverTypeWrapper<TaxReportYearProto>;
|
|
@@ -5309,6 +5348,8 @@ export type ResolversParentTypes = {
|
|
|
5309
5348
|
AdminBusiness: IGetAllAdminBusinessesResult;
|
|
5310
5349
|
AdminContext: IGetAdminContextsResult;
|
|
5311
5350
|
AdminContextInput: AdminContextInput;
|
|
5351
|
+
AnnualId: AnnualId;
|
|
5352
|
+
AnnualIdInput: AnnualIdInput;
|
|
5312
5353
|
BalanceTransactions: IGetNormalizedBalanceTransactionsResult;
|
|
5313
5354
|
BankDeposit: Omit<BankDeposit, 'transactions'> & { transactions: ReadonlyArray<ResolversParentTypes['Transaction']> };
|
|
5314
5355
|
BankDepositCharge: IGetChargesByIdsResult;
|
|
@@ -5490,6 +5531,8 @@ export type ResolversParentTypes = {
|
|
|
5490
5531
|
SuggestionsInput: SuggestionsInput;
|
|
5491
5532
|
Tag: IGetAllTagsResult;
|
|
5492
5533
|
TagInput: TagInput;
|
|
5534
|
+
TaxAdvancesRate: TaxAdvancesRate;
|
|
5535
|
+
TaxAdvancesRateInput: TaxAdvancesRateInput;
|
|
5493
5536
|
TaxCategory: IGetAllTaxCategoriesResult;
|
|
5494
5537
|
TaxReport: Omit<TaxReport, 'reference' | 'report'> & { reference: ReadonlyArray<ResolversParentTypes['TaxReportYear']>, report: ResolversParentTypes['TaxReportYear'] };
|
|
5495
5538
|
TaxReportYear: TaxReportYearProto;
|
|
@@ -5570,11 +5613,12 @@ export type AdminBusinessResolvers<ContextType = GraphQLModules.Context, ParentT
|
|
|
5570
5613
|
id?: Resolver<ResolversTypes['UUID'], ParentType, ContextType>;
|
|
5571
5614
|
name?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
5572
5615
|
registrationDate?: Resolver<ResolversTypes['TimelessDate'], ParentType, ContextType>;
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5616
|
+
socialSecurityDeductionsId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
5617
|
+
socialSecurityEmployerIds?: Resolver<ReadonlyArray<ResolversTypes['AnnualId']>, ParentType, ContextType>;
|
|
5618
|
+
taxAdvancesAnnualIds?: Resolver<ReadonlyArray<ResolversTypes['AnnualId']>, ParentType, ContextType>;
|
|
5619
|
+
taxAdvancesRates?: Resolver<ReadonlyArray<ResolversTypes['TaxAdvancesRate']>, ParentType, ContextType>;
|
|
5620
|
+
withholdingTaxAnnualIds?: Resolver<ReadonlyArray<ResolversTypes['AnnualId']>, ParentType, ContextType>;
|
|
5621
|
+
withholdingTaxCompanyId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
5578
5622
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
5579
5623
|
};
|
|
5580
5624
|
|
|
@@ -5645,6 +5689,12 @@ export type AdminContextResolvers<ContextType = GraphQLModules.Context, ParentTy
|
|
|
5645
5689
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
5646
5690
|
};
|
|
5647
5691
|
|
|
5692
|
+
export type AnnualIdResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['AnnualId'] = ResolversParentTypes['AnnualId']> = {
|
|
5693
|
+
id?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
5694
|
+
year?: Resolver<ResolversTypes['Int'], ParentType, ContextType>;
|
|
5695
|
+
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
5696
|
+
};
|
|
5697
|
+
|
|
5648
5698
|
export type BalanceTransactionsResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['BalanceTransactions'] = ResolversParentTypes['BalanceTransactions']> = {
|
|
5649
5699
|
amount?: Resolver<ResolversTypes['FinancialAmount'], ParentType, ContextType>;
|
|
5650
5700
|
amountUsd?: Resolver<ResolversTypes['FinancialAmount'], ParentType, ContextType>;
|
|
@@ -7555,6 +7605,12 @@ export type TagResolvers<ContextType = GraphQLModules.Context, ParentType extend
|
|
|
7555
7605
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
7556
7606
|
};
|
|
7557
7607
|
|
|
7608
|
+
export type TaxAdvancesRateResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['TaxAdvancesRate'] = ResolversParentTypes['TaxAdvancesRate']> = {
|
|
7609
|
+
date?: Resolver<ResolversTypes['TimelessDate'], ParentType, ContextType>;
|
|
7610
|
+
rate?: Resolver<ResolversTypes['Float'], ParentType, ContextType>;
|
|
7611
|
+
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
7612
|
+
};
|
|
7613
|
+
|
|
7558
7614
|
export type TaxCategoryResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['TaxCategory'] = ResolversParentTypes['TaxCategory']> = {
|
|
7559
7615
|
createdAt?: Resolver<ResolversTypes['DateTime'], ParentType, ContextType>;
|
|
7560
7616
|
id?: Resolver<ResolversTypes['UUID'], ParentType, ContextType>;
|
|
@@ -7823,6 +7879,7 @@ export type YearlyLedgerReportFinancialEntityInfoResolvers<ContextType = GraphQL
|
|
|
7823
7879
|
export type Resolvers<ContextType = GraphQLModules.Context> = {
|
|
7824
7880
|
AdminBusiness?: AdminBusinessResolvers<ContextType>;
|
|
7825
7881
|
AdminContext?: AdminContextResolvers<ContextType>;
|
|
7882
|
+
AnnualId?: AnnualIdResolvers<ContextType>;
|
|
7826
7883
|
BalanceTransactions?: BalanceTransactionsResolvers<ContextType>;
|
|
7827
7884
|
BankDeposit?: BankDepositResolvers<ContextType>;
|
|
7828
7885
|
BankDepositCharge?: BankDepositChargeResolvers<ContextType>;
|
|
@@ -7968,6 +8025,7 @@ export type Resolvers<ContextType = GraphQLModules.Context> = {
|
|
|
7968
8025
|
Suggestions?: SuggestionsResolvers<ContextType>;
|
|
7969
8026
|
SuggestionsEmailListenerConfig?: SuggestionsEmailListenerConfigResolvers<ContextType>;
|
|
7970
8027
|
Tag?: TagResolvers<ContextType>;
|
|
8028
|
+
TaxAdvancesRate?: TaxAdvancesRateResolvers<ContextType>;
|
|
7971
8029
|
TaxCategory?: TaxCategoryResolvers<ContextType>;
|
|
7972
8030
|
TaxReport?: TaxReportResolvers<ContextType>;
|
|
7973
8031
|
TaxReportYear?: TaxReportYearResolvers<ContextType>;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
/** Types generated for queries found in "src/modules/financial-entities/providers/admin-businesses.provider.ts" */
|
|
2
|
+
export type DateOrString = Date | string;
|
|
3
|
+
|
|
4
|
+
export type Json = null | boolean | number | string | Json[] | { [key: string]: Json };
|
|
5
|
+
|
|
6
|
+
export type JsonArray = (Json)[];
|
|
2
7
|
|
|
3
8
|
/** 'GetAdminBusinessesByIds' parameters type */
|
|
4
9
|
export interface IGetAdminBusinessesByIdsParams {
|
|
@@ -8,6 +13,9 @@ export interface IGetAdminBusinessesByIdsParams {
|
|
|
8
13
|
/** 'GetAdminBusinessesByIds' return type */
|
|
9
14
|
export interface IGetAdminBusinessesByIdsResult {
|
|
10
15
|
advance_tax_rate: number | null;
|
|
16
|
+
advance_tax_rates: JsonArray;
|
|
17
|
+
business_registration_start_date: Date | null;
|
|
18
|
+
company_tax_id: string | null;
|
|
11
19
|
id: string;
|
|
12
20
|
name: string;
|
|
13
21
|
nikuim: string | null;
|
|
@@ -15,6 +23,8 @@ export interface IGetAdminBusinessesByIdsResult {
|
|
|
15
23
|
pinkas_social_security_2021: string | null;
|
|
16
24
|
pinkas_social_security_2022: string | null;
|
|
17
25
|
registration_date: Date | null;
|
|
26
|
+
social_security_employer_ids: JsonArray;
|
|
27
|
+
tax_advances_ids: JsonArray;
|
|
18
28
|
tax_nikuim_pinkas_number: string | null;
|
|
19
29
|
tax_pinkas_number_2020: string | null;
|
|
20
30
|
tax_siduri_number_2021: string | null;
|
|
@@ -23,6 +33,7 @@ export interface IGetAdminBusinessesByIdsResult {
|
|
|
23
33
|
vat_number: string | null;
|
|
24
34
|
vat_report_cadence: number | null;
|
|
25
35
|
website_login_screenshot: string | null;
|
|
36
|
+
withholding_tax_annual_ids: JsonArray;
|
|
26
37
|
wizcloud_company_id: string | null;
|
|
27
38
|
wizcloud_token: string | null;
|
|
28
39
|
}
|
|
@@ -39,6 +50,9 @@ export type IGetAllAdminBusinessesParams = void;
|
|
|
39
50
|
/** 'GetAllAdminBusinesses' return type */
|
|
40
51
|
export interface IGetAllAdminBusinessesResult {
|
|
41
52
|
advance_tax_rate: number | null;
|
|
53
|
+
advance_tax_rates: JsonArray;
|
|
54
|
+
business_registration_start_date: Date | null;
|
|
55
|
+
company_tax_id: string | null;
|
|
42
56
|
id: string;
|
|
43
57
|
name: string;
|
|
44
58
|
nikuim: string | null;
|
|
@@ -46,6 +60,8 @@ export interface IGetAllAdminBusinessesResult {
|
|
|
46
60
|
pinkas_social_security_2021: string | null;
|
|
47
61
|
pinkas_social_security_2022: string | null;
|
|
48
62
|
registration_date: Date | null;
|
|
63
|
+
social_security_employer_ids: JsonArray;
|
|
64
|
+
tax_advances_ids: JsonArray;
|
|
49
65
|
tax_nikuim_pinkas_number: string | null;
|
|
50
66
|
tax_pinkas_number_2020: string | null;
|
|
51
67
|
tax_siduri_number_2021: string | null;
|
|
@@ -54,6 +70,7 @@ export interface IGetAllAdminBusinessesResult {
|
|
|
54
70
|
vat_number: string | null;
|
|
55
71
|
vat_report_cadence: number | null;
|
|
56
72
|
website_login_screenshot: string | null;
|
|
73
|
+
withholding_tax_annual_ids: JsonArray;
|
|
57
74
|
wizcloud_company_id: string | null;
|
|
58
75
|
wizcloud_token: string | null;
|
|
59
76
|
}
|
|
@@ -64,3 +81,46 @@ export interface IGetAllAdminBusinessesQuery {
|
|
|
64
81
|
result: IGetAllAdminBusinessesResult;
|
|
65
82
|
}
|
|
66
83
|
|
|
84
|
+
/** 'UpdateAdminBusinesses' parameters type */
|
|
85
|
+
export interface IUpdateAdminBusinessesParams {
|
|
86
|
+
advanceTaxRates?: JsonArray | null | void;
|
|
87
|
+
businessRegistrationStartDate?: DateOrString | null | void;
|
|
88
|
+
companyTaxId?: string | null | void;
|
|
89
|
+
id?: string | null | void;
|
|
90
|
+
socialSecurityEmployerIds?: JsonArray | null | void;
|
|
91
|
+
taxAdvancesIds?: JsonArray | null | void;
|
|
92
|
+
withholdingTaxAnnualIds?: JsonArray | null | void;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** 'UpdateAdminBusinesses' return type */
|
|
96
|
+
export interface IUpdateAdminBusinessesResult {
|
|
97
|
+
advance_tax_rate: number | null;
|
|
98
|
+
advance_tax_rates: JsonArray;
|
|
99
|
+
business_registration_start_date: Date | null;
|
|
100
|
+
company_tax_id: string | null;
|
|
101
|
+
id: string;
|
|
102
|
+
nikuim: string | null;
|
|
103
|
+
password: string | null;
|
|
104
|
+
pinkas_social_security_2021: string | null;
|
|
105
|
+
pinkas_social_security_2022: string | null;
|
|
106
|
+
registration_date: Date | null;
|
|
107
|
+
social_security_employer_ids: JsonArray;
|
|
108
|
+
tax_advances_ids: JsonArray;
|
|
109
|
+
tax_nikuim_pinkas_number: string | null;
|
|
110
|
+
tax_pinkas_number_2020: string | null;
|
|
111
|
+
tax_siduri_number_2021: string | null;
|
|
112
|
+
tax_siduri_number_2022: string | null;
|
|
113
|
+
username_vat_website: string | null;
|
|
114
|
+
vat_report_cadence: number | null;
|
|
115
|
+
website_login_screenshot: string | null;
|
|
116
|
+
withholding_tax_annual_ids: JsonArray;
|
|
117
|
+
wizcloud_company_id: string | null;
|
|
118
|
+
wizcloud_token: string | null;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** 'UpdateAdminBusinesses' query type */
|
|
122
|
+
export interface IUpdateAdminBusinessesQuery {
|
|
123
|
+
params: IUpdateAdminBusinessesParams;
|
|
124
|
+
result: IUpdateAdminBusinessesResult;
|
|
125
|
+
}
|
|
126
|
+
|
|
@@ -4,7 +4,9 @@ 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' | '
|
|
7
|
+
AdminBusiness: 'id' | 'name' | 'governmentId' | 'registrationDate' | 'business' | 'taxAdvancesAnnualIds' | 'taxAdvancesRates' | 'withholdingTaxCompanyId' | 'withholdingTaxAnnualIds' | 'socialSecurityDeductionsId' | 'socialSecurityEmployerIds';
|
|
8
|
+
AnnualId: 'year' | 'id';
|
|
9
|
+
TaxAdvancesRate: 'date' | 'rate';
|
|
8
10
|
BusinessTransactionsSumFromLedgerRecordsSuccessfulResult: 'businessTransactionsSum';
|
|
9
11
|
BusinessTransactionSum: 'business' | 'credit' | 'debit' | 'total' | 'foreignCurrenciesSum';
|
|
10
12
|
ForeignCurrencySum: 'credit' | 'debit' | 'total' | 'currency';
|
|
@@ -50,8 +52,10 @@ export namespace FinancialEntitiesModule {
|
|
|
50
52
|
};
|
|
51
53
|
|
|
52
54
|
interface DefinedInputFields {
|
|
53
|
-
CreateAdminBusinessInput: 'businessId' | '
|
|
54
|
-
UpdateAdminBusinessInput: '
|
|
55
|
+
CreateAdminBusinessInput: 'businessId' | 'registrationDate' | 'companyTaxId' | 'taxAdvancesAnnualId' | 'taxAdvancesRate' | 'withholdingTaxAnnualId' | 'socialSecurityEmployerId';
|
|
56
|
+
UpdateAdminBusinessInput: 'name' | 'governmentId' | 'registrationDate' | 'taxAdvancesAnnualIds' | 'taxAdvancesRates' | 'withholdingTaxCompanyId' | 'withholdingTaxAnnualIds' | 'socialSecurityEmployerIds';
|
|
57
|
+
AnnualIdInput: 'year' | 'id';
|
|
58
|
+
TaxAdvancesRateInput: 'date' | 'rate';
|
|
55
59
|
BusinessTransactionsFilter: 'businessIDs' | 'ownerIds' | 'type' | 'fromDate' | 'toDate' | 'includeRevaluation';
|
|
56
60
|
UpdateBusinessInput: 'name' | 'sortCode' | 'country' | 'hebrewName' | 'address' | 'email' | 'website' | 'phoneNumber' | 'governmentId' | 'taxCategory' | 'exemptDealer' | 'suggestions' | 'optionalVAT' | 'isReceiptEnough' | 'isDocumentsOptional' | 'pcn874RecordType' | 'irsCode' | 'isActive';
|
|
57
61
|
InsertNewBusinessInput: 'name' | 'sortCode' | 'country' | 'hebrewName' | 'address' | 'email' | 'website' | 'phoneNumber' | 'governmentId' | 'taxCategory' | 'exemptDealer' | 'suggestions' | 'optionalVAT' | 'isReceiptEnough' | 'isDocumentsOptional' | 'pcn874RecordType' | 'irsCode' | 'isActive';
|
|
@@ -70,8 +74,12 @@ export namespace FinancialEntitiesModule {
|
|
|
70
74
|
export type Mutation = Pick<Types.Mutation, DefinedFields['Mutation']>;
|
|
71
75
|
export type CreateAdminBusinessInput = Pick<Types.CreateAdminBusinessInput, DefinedInputFields['CreateAdminBusinessInput']>;
|
|
72
76
|
export type UpdateAdminBusinessInput = Pick<Types.UpdateAdminBusinessInput, DefinedInputFields['UpdateAdminBusinessInput']>;
|
|
73
|
-
export type LtdFinancialEntity = Pick<Types.LtdFinancialEntity, DefinedFields['LtdFinancialEntity']>;
|
|
74
77
|
export type TimelessDate = Types.TimelessDate;
|
|
78
|
+
export type LtdFinancialEntity = Pick<Types.LtdFinancialEntity, DefinedFields['LtdFinancialEntity']>;
|
|
79
|
+
export type AnnualId = Pick<Types.AnnualId, DefinedFields['AnnualId']>;
|
|
80
|
+
export type TaxAdvancesRate = Pick<Types.TaxAdvancesRate, DefinedFields['TaxAdvancesRate']>;
|
|
81
|
+
export type AnnualIdInput = Pick<Types.AnnualIdInput, DefinedInputFields['AnnualIdInput']>;
|
|
82
|
+
export type TaxAdvancesRateInput = Pick<Types.TaxAdvancesRateInput, DefinedInputFields['TaxAdvancesRateInput']>;
|
|
75
83
|
export type BusinessTransactionsSumFromLedgerRecordsResult = Types.BusinessTransactionsSumFromLedgerRecordsResult;
|
|
76
84
|
export type BusinessTransactionsFilter = Pick<Types.BusinessTransactionsFilter, DefinedInputFields['BusinessTransactionsFilter']>;
|
|
77
85
|
export type BusinessTransactionsFromLedgerRecordsResult = Types.BusinessTransactionsFromLedgerRecordsResult;
|
|
@@ -139,6 +147,8 @@ export namespace FinancialEntitiesModule {
|
|
|
139
147
|
export type QueryResolvers = Pick<Types.QueryResolvers, DefinedFields['Query']>;
|
|
140
148
|
export type MutationResolvers = Pick<Types.MutationResolvers, DefinedFields['Mutation']>;
|
|
141
149
|
export type AdminBusinessResolvers = Pick<Types.AdminBusinessResolvers, DefinedFields['AdminBusiness']>;
|
|
150
|
+
export type AnnualIdResolvers = Pick<Types.AnnualIdResolvers, DefinedFields['AnnualId']>;
|
|
151
|
+
export type TaxAdvancesRateResolvers = Pick<Types.TaxAdvancesRateResolvers, DefinedFields['TaxAdvancesRate']>;
|
|
142
152
|
export type BusinessTransactionsSumFromLedgerRecordsSuccessfulResultResolvers = Pick<Types.BusinessTransactionsSumFromLedgerRecordsSuccessfulResultResolvers, DefinedFields['BusinessTransactionsSumFromLedgerRecordsSuccessfulResult'] | '__isTypeOf'>;
|
|
143
153
|
export type BusinessTransactionSumResolvers = Pick<Types.BusinessTransactionSumResolvers, DefinedFields['BusinessTransactionSum']>;
|
|
144
154
|
export type ForeignCurrencySumResolvers = Pick<Types.ForeignCurrencySumResolvers, DefinedFields['ForeignCurrencySum']>;
|
|
@@ -181,6 +191,8 @@ export namespace FinancialEntitiesModule {
|
|
|
181
191
|
Query?: QueryResolvers;
|
|
182
192
|
Mutation?: MutationResolvers;
|
|
183
193
|
AdminBusiness?: AdminBusinessResolvers;
|
|
194
|
+
AnnualId?: AnnualIdResolvers;
|
|
195
|
+
TaxAdvancesRate?: TaxAdvancesRateResolvers;
|
|
184
196
|
BusinessTransactionsSumFromLedgerRecordsSuccessfulResult?: BusinessTransactionsSumFromLedgerRecordsSuccessfulResultResolvers;
|
|
185
197
|
BusinessTransactionSum?: BusinessTransactionSumResolvers;
|
|
186
198
|
ForeignCurrencySum?: ForeignCurrencySumResolvers;
|
|
@@ -255,13 +267,24 @@ export namespace FinancialEntitiesModule {
|
|
|
255
267
|
id?: gm.Middleware[];
|
|
256
268
|
name?: gm.Middleware[];
|
|
257
269
|
governmentId?: gm.Middleware[];
|
|
258
|
-
business?: gm.Middleware[];
|
|
259
|
-
withholdingTaxBookNumber?: gm.Middleware[];
|
|
260
|
-
withholdingTaxFileNumber?: gm.Middleware[];
|
|
261
|
-
socialSecurityEmployerId?: gm.Middleware[];
|
|
262
|
-
taxAdvancesRate?: gm.Middleware[];
|
|
263
|
-
taxAdvancesId?: gm.Middleware[];
|
|
264
270
|
registrationDate?: gm.Middleware[];
|
|
271
|
+
business?: gm.Middleware[];
|
|
272
|
+
taxAdvancesAnnualIds?: gm.Middleware[];
|
|
273
|
+
taxAdvancesRates?: gm.Middleware[];
|
|
274
|
+
withholdingTaxCompanyId?: gm.Middleware[];
|
|
275
|
+
withholdingTaxAnnualIds?: gm.Middleware[];
|
|
276
|
+
socialSecurityDeductionsId?: gm.Middleware[];
|
|
277
|
+
socialSecurityEmployerIds?: gm.Middleware[];
|
|
278
|
+
};
|
|
279
|
+
AnnualId?: {
|
|
280
|
+
'*'?: gm.Middleware[];
|
|
281
|
+
year?: gm.Middleware[];
|
|
282
|
+
id?: gm.Middleware[];
|
|
283
|
+
};
|
|
284
|
+
TaxAdvancesRate?: {
|
|
285
|
+
'*'?: gm.Middleware[];
|
|
286
|
+
date?: gm.Middleware[];
|
|
287
|
+
rate?: gm.Middleware[];
|
|
265
288
|
};
|
|
266
289
|
LtdFinancialEntity?: {
|
|
267
290
|
'*'?: gm.Middleware[];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
const yearlyIdSchema = z
|
|
4
|
+
.object({
|
|
5
|
+
year: z.number().min(2000).max(2100),
|
|
6
|
+
id: z.string().min(1, { message: 'ID is required' }),
|
|
7
|
+
})
|
|
8
|
+
.strict();
|
|
9
|
+
|
|
10
|
+
const taxAdvanceRateSchema = z
|
|
11
|
+
.object({
|
|
12
|
+
date: z.iso.date(),
|
|
13
|
+
rate: z.number().min(0).max(1),
|
|
14
|
+
})
|
|
15
|
+
.strict();
|
|
16
|
+
|
|
17
|
+
export const adminBusinessUpdateSchema = z
|
|
18
|
+
.object({
|
|
19
|
+
id: z.uuid(),
|
|
20
|
+
businessRegistrationStartDate: z.iso.date().optional(),
|
|
21
|
+
companyTaxId: z.string().optional(),
|
|
22
|
+
advanceTaxRates: z.array(taxAdvanceRateSchema).optional(),
|
|
23
|
+
taxAdvancesIds: z.array(yearlyIdSchema).optional(),
|
|
24
|
+
socialSecurityEmployerIds: z.array(yearlyIdSchema).optional(),
|
|
25
|
+
withholdingTaxAnnualIds: z.array(yearlyIdSchema).optional(),
|
|
26
|
+
})
|
|
27
|
+
.strict();
|
|
28
|
+
|
|
29
|
+
export type AdminBusinessUpdateSchema = z.infer<typeof adminBusinessUpdateSchema>;
|
|
30
|
+
|
|
31
|
+
export const yearlyIdsSchema = z.array(yearlyIdSchema);
|
|
32
|
+
|
|
33
|
+
export const taxAdvancesRatesSchema = z.array(taxAdvanceRateSchema);
|