@accounter/server 0.0.8-alpha-20251102162123-4116da86b4346a2ba1598da87dfbed6dff5b3393 → 0.0.8-alpha-20251102162844-adaba3b25910083f6ebd80bd580629e1c0871260
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 +21 -5
- package/dist/green-invoice-graphql/src/mesh-artifacts/index.d.ts +1191 -1444
- package/dist/green-invoice-graphql/src/mesh-artifacts/index.js +427 -614
- package/dist/green-invoice-graphql/src/mesh-artifacts/index.js.map +1 -1
- package/dist/green-invoice-graphql/src/mesh-artifacts/sources/GreenInvoice/schemaWithAnnotations.js +9268 -11080
- package/dist/green-invoice-graphql/src/mesh-artifacts/sources/GreenInvoice/schemaWithAnnotations.js.map +1 -1
- package/dist/green-invoice-graphql/src/mesh-artifacts/sources/GreenInvoice/types.d.ts +639 -776
- package/dist/green-invoice-graphql/src/mesh-artifacts/sources/GreenInvoiceNew/schemaWithAnnotations.js +8 -8
- package/dist/green-invoice-graphql/src/mesh-artifacts/sources/GreenInvoiceNew/schemaWithAnnotations.js.map +1 -1
- package/dist/green-invoice-graphql/src/mesh-artifacts/sources/GreenInvoiceNew/types.d.ts +8 -8
- package/dist/server/src/modules/app-providers/green-invoice-client.d.ts +24 -28
- package/dist/server/src/modules/app-providers/green-invoice-client.js +1 -67
- package/dist/server/src/modules/app-providers/green-invoice-client.js.map +1 -1
- package/dist/server/src/modules/countries/types.d.ts +0 -251
- package/dist/server/src/modules/countries/types.js +0 -252
- package/dist/server/src/modules/countries/types.js.map +1 -1
- package/dist/server/src/modules/financial-entities/resolvers/businesses.resolver.js +2 -6
- package/dist/server/src/modules/financial-entities/resolvers/businesses.resolver.js.map +1 -1
- package/dist/server/src/modules/financial-entities/resolvers/clients.resolvers.js +0 -5
- package/dist/server/src/modules/financial-entities/resolvers/clients.resolvers.js.map +1 -1
- package/dist/server/src/modules/green-invoice/helpers/contract-to-draft.helper.js +1 -1
- package/dist/server/src/modules/green-invoice/helpers/contract-to-draft.helper.js.map +1 -1
- package/dist/server/src/modules/green-invoice/helpers/green-invoice.helper.d.ts +23 -26
- package/dist/server/src/modules/green-invoice/helpers/green-invoice.helper.js +4 -1018
- package/dist/server/src/modules/green-invoice/helpers/green-invoice.helper.js.map +1 -1
- package/dist/server/src/modules/green-invoice/helpers/issue-document.helper.d.ts +5 -4
- package/dist/server/src/modules/green-invoice/helpers/issue-document.helper.js +29 -0
- package/dist/server/src/modules/green-invoice/helpers/issue-document.helper.js.map +1 -1
- package/dist/server/src/modules/green-invoice/resolvers/green-invoice.resolvers.js +1 -2
- package/dist/server/src/modules/green-invoice/resolvers/green-invoice.resolvers.js.map +1 -1
- package/package.json +4 -4
- package/src/modules/app-providers/green-invoice-client.ts +1 -82
- package/src/modules/countries/types.ts +0 -252
- package/src/modules/financial-entities/resolvers/businesses.resolver.ts +2 -10
- package/src/modules/financial-entities/resolvers/clients.resolvers.ts +0 -11
- package/src/modules/green-invoice/helpers/contract-to-draft.helper.ts +1 -1
- package/src/modules/green-invoice/helpers/green-invoice.helper.ts +43 -1068
- package/src/modules/green-invoice/helpers/issue-document.helper.ts +41 -3
- package/src/modules/green-invoice/resolvers/green-invoice.resolvers.ts +6 -6
- package/dist/server/src/modules/green-invoice/helpers/green-invoice-clients.helper.d.ts +0 -5
- package/dist/server/src/modules/green-invoice/helpers/green-invoice-clients.helper.js +0 -194
- package/dist/server/src/modules/green-invoice/helpers/green-invoice-clients.helper.js.map +0 -1
- package/src/modules/green-invoice/helpers/green-invoice-clients.helper.ts +0 -241
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { GraphQLError } from 'graphql';
|
|
2
2
|
import { GreenInvoiceClientProvider } from '../../app-providers/green-invoice-client.js';
|
|
3
3
|
import { BusinessesProvider } from '../../financial-entities/providers/businesses.provider.js';
|
|
4
|
-
import { addGreenInvoiceClient, updateGreenInvoiceClient, } from '../../green-invoice/helpers/green-invoice-clients.helper.js';
|
|
5
4
|
import { ClientsProvider } from '../providers/clients.provider.js';
|
|
6
5
|
export const clientsResolvers = {
|
|
7
6
|
Query: {
|
|
@@ -52,8 +51,6 @@ export const clientsResolvers = {
|
|
|
52
51
|
}
|
|
53
52
|
throw new Error(message);
|
|
54
53
|
});
|
|
55
|
-
// update green invoice client if needed
|
|
56
|
-
await updateGreenInvoiceClient(businessId, injector, undefined, fields);
|
|
57
54
|
return updatedClient;
|
|
58
55
|
}
|
|
59
56
|
catch (e) {
|
|
@@ -75,8 +72,6 @@ export const clientsResolvers = {
|
|
|
75
72
|
if (!insertClient) {
|
|
76
73
|
throw new Error(`No client returned after insertion`);
|
|
77
74
|
}
|
|
78
|
-
// create green invoice client record
|
|
79
|
-
await addGreenInvoiceClient(insertClient.business_id, injector);
|
|
80
75
|
return insertClient;
|
|
81
76
|
}
|
|
82
77
|
catch (e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clients.resolvers.js","sourceRoot":"","sources":["../../../../../../src/modules/financial-entities/resolvers/clients.resolvers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,0BAA0B,EAAE,MAAM,gDAAgD,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,8DAA8D,CAAC;AAClG,OAAO,
|
|
1
|
+
{"version":3,"file":"clients.resolvers.js","sourceRoot":"","sources":["../../../../../../src/modules/financial-entities/resolvers/clients.resolvers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,0BAA0B,EAAE,MAAM,gDAAgD,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,8DAA8D,CAAC;AAClG,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAOnE,MAAM,CAAC,MAAM,gBAAgB,GAAsC;IACjE,KAAK,EAAE;QACL,MAAM,EAAE,KAAK,EAAE,CAA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,CAAC,0BAA0B,CAAC;iBAC/B,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;YAChD,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,IAAI,YAAY,CACpB,iCAAiC,QAAQ,CAAC,gBAAgB,aAAa,CACxE,CAAC;YACJ,CAAC;YACD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAc,CAAC,CAAC,CAAC,EAAE,CAAC;YAChF,OAAO;gBACL,GAAG,MAAM;gBACT,MAAM;gBACN,EAAE,EAAE,QAAQ,CAAC,gBAAgB;aAC9B,CAAC;QACJ,CAAC;KACF;IACD,kBAAkB,EAAE;QAClB,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAC9C,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,mBAAmB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;YAEzF,OAAO,MAAM,IAAI,IAAI,CAAC;QACxB,CAAC;KACF;CACF,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { normalizeDocumentType } from '../../documents/resolvers/common.js';
|
|
|
4
4
|
import { BusinessesProvider } from '../../financial-entities/providers/businesses.provider.js';
|
|
5
5
|
import { ClientsProvider } from '../../financial-entities/providers/clients.provider.js';
|
|
6
6
|
import { dateToTimelessDateString } from '../../../shared/helpers/index.js';
|
|
7
|
-
import { getClientFromGreenInvoiceClient } from './
|
|
7
|
+
import { getClientFromGreenInvoiceClient } from './issue-document.helper.js';
|
|
8
8
|
export const convertContractToDraft = async (contract, injector, issueMonth) => {
|
|
9
9
|
const businessPromise = injector
|
|
10
10
|
.get(BusinessesProvider)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-to-draft.helper.js","sourceRoot":"","sources":["../../../../../../src/modules/green-invoice/helpers/contract-to-draft.helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,8DAA8D,CAAC;AAClG,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAG5F,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EAAE,+BAA+B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"contract-to-draft.helper.js","sourceRoot":"","sources":["../../../../../../src/modules/green-invoice/helpers/contract-to-draft.helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,8DAA8D,CAAC;AAClG,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAG5F,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EAAE,+BAA+B,EAAE,MAAM,4BAA4B,CAAC;AAE7E,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,EACzC,QAAkC,EAClC,QAAkB,EAClB,UAA8B,EAC9B,EAAE;IACF,MAAM,eAAe,GAAG,QAAQ;SAC7B,GAAG,CAAC,kBAAkB,CAAC;SACvB,qBAAqB,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAClD,MAAM,aAA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KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IAElD,MAAM,aAAa,GAAoB;QACrC,OAAO,EAAE,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,CAAC,OAAO,IAAI,EAAE,EAAE;QAC7I,WAAW,EAAE,qCAAqC,KAAK,IAAI,IAAI,EAAE;QACjE,IAAI,EAAE,qBAAqB,CAAC,QAAQ,CAAC,aAAa,CAAC;QACnD,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,QAAQ;QACjB,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,QAAQ,CAAC,QAAoB;QACvC,OAAO,EAAE,QAAQ;QACjB,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE;YACN,GAAG,kBAAkB;YACrB,MAAM,EAAE,CAAC,GAAG,CAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,CAAc,IAAI,EAAE,CAAC,CAAC;SAClE;QACD,MAAM,EAAE;YACN;gBACE,WAAW,EAAE,qCAAqC,KAAK,IAAI,IAAI,EAAE;gBACjE,QAAQ,EAAE,CAAC;gBACX,KAAK,EAAE,QAAQ,CAAC,MAAM;gBACtB,QAAQ,EAAE,QAAQ,CAAC,QAAoB;gBACvC,OAAO,EAAE,QAAQ;aAClB;SACF;KACF,CAAC;IAEF,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC"}
|
|
@@ -1,34 +1,31 @@
|
|
|
1
1
|
import { Injector } from 'graphql-modules';
|
|
2
|
-
import type {
|
|
3
|
-
import { CountryCode } from '../../countries/types';
|
|
2
|
+
import type { Document, DocumentInputNew_Input, DocumentLang, ExpenseDocumentType, Currency as GreenInvoiceCurrency, DocumentType as GreenInvoiceDocumentType, mutationInput_addDocument_input_allOf_0_discount_type, mutationInput_addDocument_input_allOf_0_linkType, mutationInput_addDocument_input_allOf_0_payment_items_appType, mutationInput_addDocument_input_allOf_0_payment_items_cardType, mutationInput_addDocument_input_allOf_0_payment_items_dealType, mutationInput_addDocument_input_allOf_0_payment_items_subType, mutationInput_addDocument_input_allOf_0_payment_items_type, VatType } from '../../../../../green-invoice-graphql/src/index.js';
|
|
4
3
|
import type { document_status } from '../../documents/types';
|
|
5
|
-
import { Currency, DocumentType,
|
|
6
|
-
export declare function normalizeDocumentType(rawType?: GreenInvoiceDocumentType |
|
|
4
|
+
import { Currency, DocumentType, GreenInvoicePaymentType, NewDocumentInfo, NewDocumentInput, type GreenInvoiceDiscountType, type GreenInvoiceDocumentLang, type GreenInvoiceLinkType, type GreenInvoicePaymentAppType, type GreenInvoicePaymentCardType, type GreenInvoicePaymentDealType, type GreenInvoicePaymentSubType, type GreenInvoiceVatType } from '../../../__generated__/types.js';
|
|
5
|
+
export declare function normalizeDocumentType(rawType?: GreenInvoiceDocumentType | ExpenseDocumentType | number | null): DocumentType;
|
|
7
6
|
export declare function getGreenInvoiceDocumentType(documentType: DocumentType): GreenInvoiceDocumentType;
|
|
8
7
|
export declare function getTypeFromGreenInvoiceDocument(documentType: GreenInvoiceDocumentType): DocumentType;
|
|
9
8
|
export declare function getGreenInvoiceDocumentNameFromType(documentType: DocumentType | GreenInvoiceDocumentType): string;
|
|
10
|
-
export declare function getGreenInvoiceDocumentLanguage(lang: GreenInvoiceDocumentLang):
|
|
11
|
-
export declare function getLanguageFromGreenInvoiceDocument(lang:
|
|
12
|
-
export declare function getGreenInvoiceDocumentVatType(vatType: GreenInvoiceVatType):
|
|
13
|
-
export declare function getVatTypeFromGreenInvoiceDocument(vatType:
|
|
14
|
-
export declare function getGreenInvoiceDocumentDiscountType(discountType: GreenInvoiceDiscountType):
|
|
15
|
-
export declare function getGreenInvoiceDocumentPaymentType(type: GreenInvoicePaymentType):
|
|
16
|
-
export declare function getTypeFromGreenInvoiceDocumentPayment(type:
|
|
17
|
-
export declare function getGreenInvoiceDocumentPaymentSubType(subType: GreenInvoicePaymentSubType):
|
|
18
|
-
export declare function getSubTypeFromGreenInvoiceDocumentPayment(subType:
|
|
19
|
-
export declare function getGreenInvoiceDocumentPaymentAppType(appType: GreenInvoicePaymentAppType):
|
|
20
|
-
export declare function getPaymentAppTypeFromGreenInvoiceDocument(appType:
|
|
21
|
-
export declare function getGreenInvoiceDocumentPaymentCardType(cardType: GreenInvoicePaymentCardType):
|
|
22
|
-
export declare function getCardTypeFromGreenInvoiceDocumentPayment(cardType:
|
|
23
|
-
export declare function getGreenInvoiceDocumentPaymentDealType(dealType: GreenInvoicePaymentDealType):
|
|
24
|
-
export declare function getDealTypeFromGreenInvoiceDocumentPayment(dealType:
|
|
25
|
-
export declare function getGreenInvoiceDocumentLinkType(linkType: GreenInvoiceLinkType):
|
|
9
|
+
export declare function getGreenInvoiceDocumentLanguage(lang: GreenInvoiceDocumentLang): DocumentLang;
|
|
10
|
+
export declare function getLanguageFromGreenInvoiceDocument(lang: DocumentLang): GreenInvoiceDocumentLang;
|
|
11
|
+
export declare function getGreenInvoiceDocumentVatType(vatType: GreenInvoiceVatType): VatType;
|
|
12
|
+
export declare function getVatTypeFromGreenInvoiceDocument(vatType: VatType): GreenInvoiceVatType;
|
|
13
|
+
export declare function getGreenInvoiceDocumentDiscountType(discountType: GreenInvoiceDiscountType): mutationInput_addDocument_input_allOf_0_discount_type;
|
|
14
|
+
export declare function getGreenInvoiceDocumentPaymentType(type: GreenInvoicePaymentType): mutationInput_addDocument_input_allOf_0_payment_items_type;
|
|
15
|
+
export declare function getTypeFromGreenInvoiceDocumentPayment(type: mutationInput_addDocument_input_allOf_0_payment_items_type): GreenInvoicePaymentType;
|
|
16
|
+
export declare function getGreenInvoiceDocumentPaymentSubType(subType: GreenInvoicePaymentSubType): mutationInput_addDocument_input_allOf_0_payment_items_subType;
|
|
17
|
+
export declare function getSubTypeFromGreenInvoiceDocumentPayment(subType: mutationInput_addDocument_input_allOf_0_payment_items_subType): GreenInvoicePaymentSubType;
|
|
18
|
+
export declare function getGreenInvoiceDocumentPaymentAppType(appType: GreenInvoicePaymentAppType): mutationInput_addDocument_input_allOf_0_payment_items_appType;
|
|
19
|
+
export declare function getPaymentAppTypeFromGreenInvoiceDocument(appType: mutationInput_addDocument_input_allOf_0_payment_items_appType): GreenInvoicePaymentAppType;
|
|
20
|
+
export declare function getGreenInvoiceDocumentPaymentCardType(cardType: GreenInvoicePaymentCardType): mutationInput_addDocument_input_allOf_0_payment_items_cardType;
|
|
21
|
+
export declare function getCardTypeFromGreenInvoiceDocumentPayment(cardType: mutationInput_addDocument_input_allOf_0_payment_items_cardType): GreenInvoicePaymentCardType;
|
|
22
|
+
export declare function getGreenInvoiceDocumentPaymentDealType(dealType: GreenInvoicePaymentDealType): mutationInput_addDocument_input_allOf_0_payment_items_dealType;
|
|
23
|
+
export declare function getDealTypeFromGreenInvoiceDocumentPayment(dealType: mutationInput_addDocument_input_allOf_0_payment_items_dealType): GreenInvoicePaymentDealType;
|
|
24
|
+
export declare function getGreenInvoiceDocumentLinkType(linkType: GreenInvoiceLinkType): mutationInput_addDocument_input_allOf_0_linkType;
|
|
26
25
|
export declare function convertCurrencyToGreenInvoice(currency: Currency): GreenInvoiceCurrency;
|
|
27
|
-
export declare function greenInvoiceCountryToCountryCode(country: GreenInvoiceCountry): CountryCode;
|
|
28
|
-
export declare function countryCodeToGreenInvoiceCountry(countryCode: CountryCode): GreenInvoiceCountry;
|
|
29
26
|
export declare function greenInvoiceToDocumentStatus(greenInvoiceStatus: number): document_status;
|
|
30
27
|
export declare function getLinkedDocuments(injector: Injector, externalDocumentId: string): Promise<string[] | null>;
|
|
31
|
-
export declare function insertNewDocumentFromGreenInvoice(injector: Injector, greenInvoiceDoc:
|
|
32
|
-
export declare function getGreenInvoiceDocuments(injector: Injector, recursive?: boolean): Promise<
|
|
33
|
-
export declare function convertDocumentInputIntoGreenInvoiceInput(initialInput: NewDocumentInput, injector: Injector): Promise<
|
|
34
|
-
export declare function convertGreenInvoiceDocumentToLocalDocumentInfo(greenInvoiceDocument:
|
|
28
|
+
export declare function insertNewDocumentFromGreenInvoice(injector: Injector, greenInvoiceDoc: Document, ownerId: string, preDictatedChargeId?: string | null): Promise<import("../../documents/types").IInsertDocumentsResult>;
|
|
29
|
+
export declare function getGreenInvoiceDocuments(injector: Injector, recursive?: boolean): Promise<Document[]>;
|
|
30
|
+
export declare function convertDocumentInputIntoGreenInvoiceInput(initialInput: NewDocumentInput, injector: Injector): Promise<DocumentInputNew_Input>;
|
|
31
|
+
export declare function convertGreenInvoiceDocumentToLocalDocumentInfo(greenInvoiceDocument: Document): NewDocumentInfo;
|