@silexpert/core 2.0.68 → 2.0.70-0
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/dist/api/resources/Account.d.ts +1 -0
- package/dist/api/resources/Account.d.ts.map +1 -1
- package/dist/api/resources/Account.js +3 -0
- package/dist/api/resources/Account.js.map +1 -1
- package/dist/api/resources/Acd.d.ts +2 -1
- package/dist/api/resources/Acd.d.ts.map +1 -1
- package/dist/api/resources/Acd.js +3 -0
- package/dist/api/resources/Acd.js.map +1 -1
- package/dist/api/resources/Notification.d.ts +2 -1
- package/dist/api/resources/Notification.d.ts.map +1 -1
- package/dist/api/resources/Notification.js +3 -0
- package/dist/api/resources/Notification.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/types/Enum/Ged.d.ts +2 -1
- package/dist/types/Enum/Ged.d.ts.map +1 -1
- package/dist/types/Enum/Ged.js +1 -0
- package/dist/types/Enum/Ged.js.map +1 -1
- package/dist/types/Interface/api/account/Create.d.ts +5 -1
- package/dist/types/Interface/api/account/Create.d.ts.map +1 -1
- package/dist/types/Interface/api/account/Create.js +38 -4
- package/dist/types/Interface/api/account/Create.js.map +1 -1
- package/dist/types/Interface/api/acd/Vat.d.ts +52 -0
- package/dist/types/Interface/api/acd/Vat.d.ts.map +1 -0
- package/dist/types/Interface/api/acd/Vat.js +14 -0
- package/dist/types/Interface/api/acd/Vat.js.map +1 -0
- package/dist/types/Interface/api/docoon/Create.d.ts +25 -0
- package/dist/types/Interface/api/docoon/Create.d.ts.map +1 -1
- package/dist/types/Interface/api/docoon/Create.js +8 -1
- package/dist/types/Interface/api/docoon/Create.js.map +1 -1
- package/dist/types/Interface/api/docoon/Read.d.ts +106 -0
- package/dist/types/Interface/api/docoon/Read.d.ts.map +1 -1
- package/dist/types/Interface/api/docoon/Read.js.map +1 -1
- package/dist/types/Interface/api/einvoicing/SyncFlowStatusResult.d.ts +12 -0
- package/dist/types/Interface/api/einvoicing/SyncFlowStatusResult.d.ts.map +1 -0
- package/dist/types/Interface/api/einvoicing/SyncFlowStatusResult.js +2 -0
- package/dist/types/Interface/api/einvoicing/SyncFlowStatusResult.js.map +1 -0
- package/dist/types/Interface/api/notification/CreateInternalNotification.d.ts +17 -0
- package/dist/types/Interface/api/notification/CreateInternalNotification.d.ts.map +1 -0
- package/dist/types/Interface/api/notification/CreateInternalNotification.js +98 -0
- package/dist/types/Interface/api/notification/CreateInternalNotification.js.map +1 -0
- package/dist/types/Interface/api/product/CreateProduct.d.ts +1 -0
- package/dist/types/Interface/api/product/CreateProduct.d.ts.map +1 -1
- package/dist/types/Interface/api/product/CreateProduct.js +8 -1
- package/dist/types/Interface/api/product/CreateProduct.js.map +1 -1
- package/dist/types/Interface/models/IAccount.d.ts +1 -0
- package/dist/types/Interface/models/IAccount.d.ts.map +1 -1
- package/dist/types/Interface/models/IAccount.js +1 -0
- package/dist/types/Interface/models/IAccount.js.map +1 -1
- package/dist/types/Interface/models/IAccountingFile.d.ts +1 -0
- package/dist/types/Interface/models/IAccountingFile.d.ts.map +1 -1
- package/dist/types/Interface/models/IAccountingFile.js +1 -0
- package/dist/types/Interface/models/IAccountingFile.js.map +1 -1
- package/dist/types/Interface/models/IEInvoicing.d.ts +1 -1
- package/dist/types/Interface/models/IEInvoicing.d.ts.map +1 -1
- package/dist/types/Interface/models/IEInvoicing.js.map +1 -1
- package/dist/types/Interface/models/IProduct.d.ts +3 -0
- package/dist/types/Interface/models/IProduct.d.ts.map +1 -1
- package/dist/types/Interface/models/IProduct.js +2 -0
- package/dist/types/Interface/models/IProduct.js.map +1 -1
- package/dist/types/Interface/models/IProductInvoice.d.ts +3 -0
- package/dist/types/Interface/models/IProductInvoice.d.ts.map +1 -1
- package/dist/types/Interface/models/IProductInvoice.js +2 -0
- package/dist/types/Interface/models/IProductInvoice.js.map +1 -1
- package/dist/types/Interface/models/ISocietyGescom.d.ts +1 -0
- package/dist/types/Interface/models/ISocietyGescom.d.ts.map +1 -1
- package/dist/types/Interface/models/ISocietyGescom.js +2 -0
- package/dist/types/Interface/models/ISocietyGescom.js.map +1 -1
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -1
- package/dist/utils/acdVat.d.ts +4 -0
- package/dist/utils/acdVat.d.ts.map +1 -0
- package/dist/utils/acdVat.js +57 -0
- package/dist/utils/acdVat.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/tests/acdVat.spec.d.ts +2 -0
- package/dist/utils/tests/acdVat.spec.d.ts.map +1 -0
- package/dist/utils/tests/acdVat.spec.js +25 -0
- package/dist/utils/tests/acdVat.spec.js.map +1 -0
- package/package.json +1 -1
- package/ts/api/resources/Account.ts +4 -0
- package/ts/api/resources/Acd.ts +5 -1
- package/ts/api/resources/Notification.ts +5 -1
- package/ts/index.ts +1 -0
- package/ts/types/Enum/Ged.ts +1 -0
- package/ts/types/Interface/api/account/Create.ts +29 -3
- package/ts/types/Interface/api/acd/Vat.ts +52 -0
- package/ts/types/Interface/api/docoon/Create.ts +31 -1
- package/ts/types/Interface/api/docoon/Read.ts +114 -0
- package/ts/types/Interface/api/einvoicing/SyncFlowStatusResult.ts +12 -0
- package/ts/types/Interface/api/notification/CreateInternalNotification.ts +64 -0
- package/ts/types/Interface/api/product/CreateProduct.ts +6 -1
- package/ts/types/Interface/models/IAccount.ts +1 -0
- package/ts/types/Interface/models/IAccountingFile.ts +1 -0
- package/ts/types/Interface/models/IEInvoicing.ts +1 -1
- package/ts/types/Interface/models/IProduct.ts +3 -0
- package/ts/types/Interface/models/IProductInvoice.ts +3 -0
- package/ts/types/Interface/models/ISocietyGescom.ts +2 -0
- package/ts/types/index.ts +3 -0
- package/ts/utils/acdVat.ts +63 -0
- package/ts/utils/index.ts +1 -0
- package/ts/utils/tests/acdVat.spec.ts +26 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acdVat.d.ts","sourceRoot":"","sources":["../../ts/utils/acdVat.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,wBAAgB,iBAAiB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,UAAU,GAAG,IAAI,CAiC1E;AAED,wBAAgB,iBAAiB,CAAC,UAAU,CAAC,EAAE,UAAU,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAwB/E"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Vat } from '../types/Enum/Vat.js';
|
|
2
|
+
import { AcdVatCode } from '../types/Interface/api/acd/Vat.js';
|
|
3
|
+
export function idVatToAcdVatCode(idVat) {
|
|
4
|
+
if (!idVat) {
|
|
5
|
+
return null;
|
|
6
|
+
}
|
|
7
|
+
const vat = Object.values(Vat).find((currentVat) => currentVat.id === idVat);
|
|
8
|
+
if (!vat) {
|
|
9
|
+
return AcdVatCode.NON_AFFECTE;
|
|
10
|
+
}
|
|
11
|
+
if (vat.isVatIntracom) {
|
|
12
|
+
return AcdVatCode.INTRACOM;
|
|
13
|
+
}
|
|
14
|
+
if (vat.isVatImportation) {
|
|
15
|
+
return AcdVatCode.AUTOL;
|
|
16
|
+
}
|
|
17
|
+
switch (vat.value) {
|
|
18
|
+
case 2.1:
|
|
19
|
+
return AcdVatCode.REDUIT_2_1;
|
|
20
|
+
case 5.5:
|
|
21
|
+
return AcdVatCode.REDUIT_5_5;
|
|
22
|
+
case 10:
|
|
23
|
+
return AcdVatCode.REDUIT_10;
|
|
24
|
+
case 20:
|
|
25
|
+
return AcdVatCode.NORMAL;
|
|
26
|
+
case 0:
|
|
27
|
+
return null;
|
|
28
|
+
default:
|
|
29
|
+
return AcdVatCode.NON_AFFECTE;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export function acdVatCodeToIdVat(acdVatCode) {
|
|
33
|
+
switch (acdVatCode) {
|
|
34
|
+
case AcdVatCode.NORMAL:
|
|
35
|
+
return Vat.TX_20.id;
|
|
36
|
+
case AcdVatCode.REDUIT_10:
|
|
37
|
+
return Vat.TX_10.id;
|
|
38
|
+
case AcdVatCode.REDUIT_5_5:
|
|
39
|
+
return Vat.TX_5_5.id;
|
|
40
|
+
case AcdVatCode.REDUIT_2_1:
|
|
41
|
+
return Vat.TX_2_1.id;
|
|
42
|
+
case AcdVatCode.INTRACOM:
|
|
43
|
+
// L'information de taux est perdue dans le code ACD, on retombe sur l'intracom a 20% par defaut.
|
|
44
|
+
return Vat.INTRACOM_TX_20.id;
|
|
45
|
+
case AcdVatCode.AUTOL:
|
|
46
|
+
// L'information de taux est perdue dans le code ACD, on retombe sur l'importation a 20% par defaut.
|
|
47
|
+
return Vat.IMPORTATION_TX_20.id;
|
|
48
|
+
case AcdVatCode.NON_AFFECTE:
|
|
49
|
+
case AcdVatCode.ONI:
|
|
50
|
+
case AcdVatCode.SUR_IMMOBILISATION:
|
|
51
|
+
case AcdVatCode.SPECIAL:
|
|
52
|
+
case null:
|
|
53
|
+
case undefined:
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=acdVat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acdVat.js","sourceRoot":"","sources":["../../ts/utils/acdVat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,MAAM,UAAU,iBAAiB,CAAC,KAAqB;IACrD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC;IAE7E,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,UAAU,CAAC,WAAW,CAAC;IAChC,CAAC;IAED,IAAI,GAAG,CAAC,aAAa,EAAE,CAAC;QACtB,OAAO,UAAU,CAAC,QAAQ,CAAC;IAC7B,CAAC;IAED,IAAI,GAAG,CAAC,gBAAgB,EAAE,CAAC;QACzB,OAAO,UAAU,CAAC,KAAK,CAAC;IAC1B,CAAC;IAED,QAAQ,GAAG,CAAC,KAAK,EAAE,CAAC;QAClB,KAAK,GAAG;YACN,OAAO,UAAU,CAAC,UAAU,CAAC;QAC/B,KAAK,GAAG;YACN,OAAO,UAAU,CAAC,UAAU,CAAC;QAC/B,KAAK,EAAE;YACL,OAAO,UAAU,CAAC,SAAS,CAAC;QAC9B,KAAK,EAAE;YACL,OAAO,UAAU,CAAC,MAAM,CAAC;QAC3B,KAAK,CAAC;YACJ,OAAO,IAAI,CAAC;QACd;YACE,OAAO,UAAU,CAAC,WAAW,CAAC;IAClC,CAAC;AACH,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,UAA8B;IAC9D,QAAQ,UAAU,EAAE,CAAC;QACnB,KAAK,UAAU,CAAC,MAAM;YACpB,OAAO,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QACtB,KAAK,UAAU,CAAC,SAAS;YACvB,OAAO,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QACtB,KAAK,UAAU,CAAC,UAAU;YACxB,OAAO,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;QACvB,KAAK,UAAU,CAAC,UAAU;YACxB,OAAO,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;QACvB,KAAK,UAAU,CAAC,QAAQ;YACtB,iGAAiG;YACjG,OAAO,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC;QAC/B,KAAK,UAAU,CAAC,KAAK;YACnB,oGAAoG;YACpG,OAAO,GAAG,CAAC,iBAAiB,CAAC,EAAE,CAAC;QAClC,KAAK,UAAU,CAAC,WAAW,CAAC;QAC5B,KAAK,UAAU,CAAC,GAAG,CAAC;QACpB,KAAK,UAAU,CAAC,kBAAkB,CAAC;QACnC,KAAK,UAAU,CAAC,OAAO,CAAC;QACxB,KAAK,IAAI,CAAC;QACV,KAAK,SAAS;YACZ,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC","sourcesContent":["import { Vat } from '../types/Enum/Vat.js';\nimport { AcdVatCode } from '../types/Interface/api/acd/Vat.js';\n\nexport function idVatToAcdVatCode(idVat?: number | null): AcdVatCode | null {\n if (!idVat) {\n return null;\n }\n\n const vat = Object.values(Vat).find((currentVat) => currentVat.id === idVat);\n\n if (!vat) {\n return AcdVatCode.NON_AFFECTE;\n }\n\n if (vat.isVatIntracom) {\n return AcdVatCode.INTRACOM;\n }\n\n if (vat.isVatImportation) {\n return AcdVatCode.AUTOL;\n }\n\n switch (vat.value) {\n case 2.1:\n return AcdVatCode.REDUIT_2_1;\n case 5.5:\n return AcdVatCode.REDUIT_5_5;\n case 10:\n return AcdVatCode.REDUIT_10;\n case 20:\n return AcdVatCode.NORMAL;\n case 0:\n return null;\n default:\n return AcdVatCode.NON_AFFECTE;\n }\n}\n\nexport function acdVatCodeToIdVat(acdVatCode?: AcdVatCode | null): number | null {\n switch (acdVatCode) {\n case AcdVatCode.NORMAL:\n return Vat.TX_20.id;\n case AcdVatCode.REDUIT_10:\n return Vat.TX_10.id;\n case AcdVatCode.REDUIT_5_5:\n return Vat.TX_5_5.id;\n case AcdVatCode.REDUIT_2_1:\n return Vat.TX_2_1.id;\n case AcdVatCode.INTRACOM:\n // L'information de taux est perdue dans le code ACD, on retombe sur l'intracom a 20% par defaut.\n return Vat.INTRACOM_TX_20.id;\n case AcdVatCode.AUTOL:\n // L'information de taux est perdue dans le code ACD, on retombe sur l'importation a 20% par defaut.\n return Vat.IMPORTATION_TX_20.id;\n case AcdVatCode.NON_AFFECTE:\n case AcdVatCode.ONI:\n case AcdVatCode.SUR_IMMOBILISATION:\n case AcdVatCode.SPECIAL:\n case null:\n case undefined:\n return null;\n }\n}\n"]}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export * from './bankAccount.js';
|
|
|
20
20
|
export * from './commercialOffer.js';
|
|
21
21
|
export * from './societyApproval.js';
|
|
22
22
|
export * from './commercialManagement/saleEmail.js';
|
|
23
|
+
export * from './acdVat.js';
|
|
23
24
|
export * from './transforms/boolean.transform.js';
|
|
24
25
|
export * from './transforms/number.transform.js';
|
|
25
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../ts/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,6CAA6C,CAAC;AAC5D,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,sCAAsC,CAAC;AACrD,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../ts/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,6CAA6C,CAAC;AAC5D,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,sCAAsC,CAAC;AACrD,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qCAAqC,CAAC;AACpD,cAAc,aAAa,CAAC;AAC5B,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC"}
|
package/dist/utils/index.js
CHANGED
|
@@ -20,6 +20,7 @@ export * from './bankAccount.js';
|
|
|
20
20
|
export * from './commercialOffer.js';
|
|
21
21
|
export * from './societyApproval.js';
|
|
22
22
|
export * from './commercialManagement/saleEmail.js';
|
|
23
|
+
export * from './acdVat.js';
|
|
23
24
|
export * from './transforms/boolean.transform.js';
|
|
24
25
|
export * from './transforms/number.transform.js';
|
|
25
26
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../ts/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,6CAA6C,CAAC;AAC5D,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,sCAAsC,CAAC;AACrD,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC","sourcesContent":["export * from './objectUtils/index.js';\nexport * from './stringUtils/index.js';\nexport * from './brands.js';\nexport * from './webmail.js';\nexport * from './decorators/isE164PhoneNumber.decorator.js';\nexport * from './documents.js';\nexport * from './balanceSheetModule.js';\nexport * from './siretValidation.js';\nexport * from './statutsGeneration.js';\nexport * from './exercice.js';\nexport * from './prestation.js';\nexport * from './task.js';\nexport * from './social.js';\nexport * from './commercialManagement/recurrence.js';\nexport * from './amount.js';\nexport * from './quotation.js';\nexport * from './isHtml.js';\nexport * from './isUrl.js';\nexport * from './bankAccount.js';\nexport * from './commercialOffer.js';\nexport * from './societyApproval.js';\nexport * from './commercialManagement/saleEmail.js';\nexport * from './transforms/boolean.transform.js';\nexport * from './transforms/number.transform.js';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../ts/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,6CAA6C,CAAC;AAC5D,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,sCAAsC,CAAC;AACrD,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qCAAqC,CAAC;AACpD,cAAc,aAAa,CAAC;AAC5B,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC","sourcesContent":["export * from './objectUtils/index.js';\nexport * from './stringUtils/index.js';\nexport * from './brands.js';\nexport * from './webmail.js';\nexport * from './decorators/isE164PhoneNumber.decorator.js';\nexport * from './documents.js';\nexport * from './balanceSheetModule.js';\nexport * from './siretValidation.js';\nexport * from './statutsGeneration.js';\nexport * from './exercice.js';\nexport * from './prestation.js';\nexport * from './task.js';\nexport * from './social.js';\nexport * from './commercialManagement/recurrence.js';\nexport * from './amount.js';\nexport * from './quotation.js';\nexport * from './isHtml.js';\nexport * from './isUrl.js';\nexport * from './bankAccount.js';\nexport * from './commercialOffer.js';\nexport * from './societyApproval.js';\nexport * from './commercialManagement/saleEmail.js';\nexport * from './acdVat.js';\nexport * from './transforms/boolean.transform.js';\nexport * from './transforms/number.transform.js';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acdVat.spec.d.ts","sourceRoot":"","sources":["../../../ts/utils/tests/acdVat.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { describe, expect, test } from 'vitest';
|
|
2
|
+
import { Vat } from '../../types/Enum/Vat.js';
|
|
3
|
+
import { AcdVatCode } from '../../types/Interface/api/acd/Vat.js';
|
|
4
|
+
import { acdVatCodeToIdVat, idVatToAcdVatCode } from '../acdVat.js';
|
|
5
|
+
describe('acdVat utils', () => {
|
|
6
|
+
test('should map internal VAT ids to ACD VAT codes', () => {
|
|
7
|
+
expect(idVatToAcdVatCode(Vat.TX_20.id)).toBe(AcdVatCode.NORMAL);
|
|
8
|
+
expect(idVatToAcdVatCode(Vat.TX_10.id)).toBe(AcdVatCode.REDUIT_10);
|
|
9
|
+
expect(idVatToAcdVatCode(Vat.TX_5_5.id)).toBe(AcdVatCode.REDUIT_5_5);
|
|
10
|
+
expect(idVatToAcdVatCode(Vat.TX_2_1.id)).toBe(AcdVatCode.REDUIT_2_1);
|
|
11
|
+
expect(idVatToAcdVatCode(Vat.INTRACOM_TX_20.id)).toBe(AcdVatCode.INTRACOM);
|
|
12
|
+
expect(idVatToAcdVatCode(Vat.IMPORTATION_TX_20.id)).toBe(AcdVatCode.AUTOL);
|
|
13
|
+
expect(idVatToAcdVatCode(Vat.WITHOUT_TAXE.id)).toBeNull();
|
|
14
|
+
});
|
|
15
|
+
test('should map ACD VAT codes back to internal VAT ids', () => {
|
|
16
|
+
expect(acdVatCodeToIdVat(AcdVatCode.NORMAL)).toBe(Vat.TX_20.id);
|
|
17
|
+
expect(acdVatCodeToIdVat(AcdVatCode.REDUIT_10)).toBe(Vat.TX_10.id);
|
|
18
|
+
expect(acdVatCodeToIdVat(AcdVatCode.REDUIT_5_5)).toBe(Vat.TX_5_5.id);
|
|
19
|
+
expect(acdVatCodeToIdVat(AcdVatCode.REDUIT_2_1)).toBe(Vat.TX_2_1.id);
|
|
20
|
+
expect(acdVatCodeToIdVat(AcdVatCode.INTRACOM)).toBe(Vat.INTRACOM_TX_20.id);
|
|
21
|
+
expect(acdVatCodeToIdVat(AcdVatCode.AUTOL)).toBe(Vat.IMPORTATION_TX_20.id);
|
|
22
|
+
expect(acdVatCodeToIdVat(AcdVatCode.NON_AFFECTE)).toBeNull();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=acdVat.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acdVat.spec.js","sourceRoot":"","sources":["../../../ts/utils/tests/acdVat.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEpE,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,IAAI,CAAC,8CAA8C,EAAE,GAAG,EAAE;QACxD,MAAM,CAAC,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAChE,MAAM,CAAC,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QACnE,MAAM,CAAC,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QACrE,MAAM,CAAC,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QACrE,MAAM,CAAC,iBAAiB,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAC3E,MAAM,CAAC,iBAAiB,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAC3E,MAAM,CAAC,iBAAiB,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC5D,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,mDAAmD,EAAE,GAAG,EAAE;QAC7D,MAAM,CAAC,iBAAiB,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAChE,MAAM,CAAC,iBAAiB,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACnE,MAAM,CAAC,iBAAiB,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACrE,MAAM,CAAC,iBAAiB,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACrE,MAAM,CAAC,iBAAiB,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;QAC3E,MAAM,CAAC,iBAAiB,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;QAC3E,MAAM,CAAC,iBAAiB,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC/D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { describe, expect, test } from 'vitest';\nimport { Vat } from '../../types/Enum/Vat.js';\nimport { AcdVatCode } from '../../types/Interface/api/acd/Vat.js';\nimport { acdVatCodeToIdVat, idVatToAcdVatCode } from '../acdVat.js';\n\ndescribe('acdVat utils', () => {\n test('should map internal VAT ids to ACD VAT codes', () => {\n expect(idVatToAcdVatCode(Vat.TX_20.id)).toBe(AcdVatCode.NORMAL);\n expect(idVatToAcdVatCode(Vat.TX_10.id)).toBe(AcdVatCode.REDUIT_10);\n expect(idVatToAcdVatCode(Vat.TX_5_5.id)).toBe(AcdVatCode.REDUIT_5_5);\n expect(idVatToAcdVatCode(Vat.TX_2_1.id)).toBe(AcdVatCode.REDUIT_2_1);\n expect(idVatToAcdVatCode(Vat.INTRACOM_TX_20.id)).toBe(AcdVatCode.INTRACOM);\n expect(idVatToAcdVatCode(Vat.IMPORTATION_TX_20.id)).toBe(AcdVatCode.AUTOL);\n expect(idVatToAcdVatCode(Vat.WITHOUT_TAXE.id)).toBeNull();\n });\n\n test('should map ACD VAT codes back to internal VAT ids', () => {\n expect(acdVatCodeToIdVat(AcdVatCode.NORMAL)).toBe(Vat.TX_20.id);\n expect(acdVatCodeToIdVat(AcdVatCode.REDUIT_10)).toBe(Vat.TX_10.id);\n expect(acdVatCodeToIdVat(AcdVatCode.REDUIT_5_5)).toBe(Vat.TX_5_5.id);\n expect(acdVatCodeToIdVat(AcdVatCode.REDUIT_2_1)).toBe(Vat.TX_2_1.id);\n expect(acdVatCodeToIdVat(AcdVatCode.INTRACOM)).toBe(Vat.INTRACOM_TX_20.id);\n expect(acdVatCodeToIdVat(AcdVatCode.AUTOL)).toBe(Vat.IMPORTATION_TX_20.id);\n expect(acdVatCodeToIdVat(AcdVatCode.NON_AFFECTE)).toBeNull();\n });\n});\n"]}
|
package/package.json
CHANGED
|
@@ -37,6 +37,10 @@ export class Account extends Resource {
|
|
|
37
37
|
return this.axios.$post(`/society/${idSociety}/accountsSociety`, params);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
getOrCreateAccountsSociety(idSociety: number, params: CreateAccountSociety): Promise<IAccount> {
|
|
41
|
+
return this.axios.$post(`/society/${idSociety}/accountsSociety/get-or-create`, params);
|
|
42
|
+
}
|
|
43
|
+
|
|
40
44
|
getGenericAccounts(): Promise<BasePaginate<IAccount>> {
|
|
41
45
|
return this.axios.$get('/society/genericAccounts');
|
|
42
46
|
}
|
package/ts/api/resources/Acd.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { CreateAcdAuthentication } from '../../index.js';
|
|
1
|
+
import type { CreateAcdAuthentication, IAccount } from '../../index.js';
|
|
2
2
|
import { Resource } from '../Resource.js';
|
|
3
3
|
|
|
4
4
|
export class Acd extends Resource {
|
|
5
5
|
authenticate(body: CreateAcdAuthentication): Promise<{ token: string }> {
|
|
6
6
|
return this.axios.$post('/connectors/acd/authenticate', body);
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
getAccounts(): Promise<IAccount[]> {
|
|
10
|
+
return this.axios.$get('/connectors/acd/accounts');
|
|
11
|
+
}
|
|
8
12
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import { IAppNotification, UpdateAppNotificationStatus } from '../../types/index.js';
|
|
1
|
+
import { IAppNotification, INotification, UpdateAppNotificationStatus } from '../../types/index.js';
|
|
2
2
|
import { Resource } from '../Resource.js';
|
|
3
3
|
|
|
4
4
|
export class Notification extends Resource {
|
|
5
|
+
create(idUser: number, data: Partial<INotification>): Promise<INotification> {
|
|
6
|
+
return this.axios.$post(`/notifications/${idUser}`, data);
|
|
7
|
+
}
|
|
8
|
+
|
|
5
9
|
createTestNotification(idUser: number): Promise<string> {
|
|
6
10
|
return this.axios.$post(`/mobile/notifications/${idUser}`);
|
|
7
11
|
}
|
package/ts/index.ts
CHANGED
|
@@ -2,5 +2,6 @@ export * from './utils/index.js';
|
|
|
2
2
|
export * from './utils/commercialManagement/product.js';
|
|
3
3
|
export * from './utils/commercialManagement/vat.js';
|
|
4
4
|
export * from './utils/commercialManagement/recovery.js';
|
|
5
|
+
export * from './utils/acdVat.js';
|
|
5
6
|
export * from './types/index.js';
|
|
6
7
|
export * from './api/index.js';
|
package/ts/types/Enum/Ged.ts
CHANGED
|
@@ -178,6 +178,7 @@ export enum TypeFile {
|
|
|
178
178
|
ACCOUNTING_CONSISTENCY_CHECK = 115, // Contrôle de cohérence
|
|
179
179
|
ACCOUNTING_PREVIEW_PLAQUETTE = 116, // Preview plaquette comptable
|
|
180
180
|
ACCESS_CARD = 117, // Fiche d'accès
|
|
181
|
+
MANDAT_PA_EC = 118,
|
|
181
182
|
}
|
|
182
183
|
|
|
183
184
|
/** @deprecated this is a legacy enum try to use TypeFile enum if you can or use both enum's */
|
|
@@ -1,19 +1,45 @@
|
|
|
1
|
-
import { IsArray, IsDateString, IsNumber, IsOptional, IsString } from 'class-validator';
|
|
1
|
+
import { IsArray, IsDateString, IsNumber, IsOptional, IsString, IsBoolean, IsObject, IsInt } from 'class-validator';
|
|
2
2
|
import { IAccount } from '../../../index.js';
|
|
3
3
|
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
4
4
|
|
|
5
5
|
export class CreateAccountSociety {
|
|
6
6
|
@ApiProperty()
|
|
7
|
+
@IsInt()
|
|
7
8
|
number: number;
|
|
8
9
|
|
|
9
10
|
@ApiProperty()
|
|
11
|
+
@IsString()
|
|
10
12
|
name: string;
|
|
11
13
|
|
|
12
|
-
@
|
|
13
|
-
|
|
14
|
+
@ApiPropertyOptional()
|
|
15
|
+
@IsInt()
|
|
16
|
+
@IsOptional()
|
|
17
|
+
idNature?: number;
|
|
14
18
|
|
|
15
19
|
@ApiPropertyOptional()
|
|
20
|
+
@IsInt()
|
|
21
|
+
@IsOptional()
|
|
22
|
+
idAccountType?: number;
|
|
23
|
+
|
|
24
|
+
@ApiPropertyOptional()
|
|
25
|
+
@IsInt()
|
|
26
|
+
@IsOptional()
|
|
16
27
|
idVat?: number;
|
|
28
|
+
|
|
29
|
+
@ApiPropertyOptional()
|
|
30
|
+
@IsInt()
|
|
31
|
+
@IsOptional()
|
|
32
|
+
idParentAccount?: number;
|
|
33
|
+
|
|
34
|
+
@ApiPropertyOptional()
|
|
35
|
+
@IsBoolean()
|
|
36
|
+
@IsOptional()
|
|
37
|
+
isGeneric?: boolean;
|
|
38
|
+
|
|
39
|
+
@ApiPropertyOptional()
|
|
40
|
+
@IsObject()
|
|
41
|
+
@IsOptional()
|
|
42
|
+
metadata?: Record<string, any>;
|
|
17
43
|
}
|
|
18
44
|
|
|
19
45
|
export class CreateAccount {
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export enum AcdVatCode {
|
|
2
|
+
AUTOL = 'AUTOL',
|
|
3
|
+
INTRACOM = 'INTRACOM',
|
|
4
|
+
NON_AFFECTE = 'NON_AFFECTE',
|
|
5
|
+
ONI = 'ONI',
|
|
6
|
+
SUR_IMMOBILISATION = 'TI',
|
|
7
|
+
NORMAL = 'TN',
|
|
8
|
+
REDUIT_5_5 = 'TR1',
|
|
9
|
+
REDUIT_10 = 'TR2',
|
|
10
|
+
REDUIT_2_1 = 'TSR',
|
|
11
|
+
SPECIAL = 'TS',
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type AcdCompte = {
|
|
15
|
+
Code: string | null;
|
|
16
|
+
Categ: string | null;
|
|
17
|
+
Lib: string | null;
|
|
18
|
+
Let: string | null;
|
|
19
|
+
RegEc: string | null;
|
|
20
|
+
Qte: string | null;
|
|
21
|
+
Coll: boolean;
|
|
22
|
+
CptCptCol: string | null;
|
|
23
|
+
CodeTVA: string | null;
|
|
24
|
+
CompteHorsTaxe: string | null;
|
|
25
|
+
CptInactif: boolean;
|
|
26
|
+
UniteQte1: Array<string> | null;
|
|
27
|
+
UniteQte2: Array<string> | null;
|
|
28
|
+
ActivationAnalytique: boolean;
|
|
29
|
+
CleRepartition: {
|
|
30
|
+
Code: string | null;
|
|
31
|
+
Lib: string | null;
|
|
32
|
+
Auto: boolean;
|
|
33
|
+
} | null;
|
|
34
|
+
Tiers: {
|
|
35
|
+
Code: number;
|
|
36
|
+
RaisonSociale: string | null;
|
|
37
|
+
Siren: string | null;
|
|
38
|
+
Siret: string | null;
|
|
39
|
+
Telephone: string | null;
|
|
40
|
+
Email: string | null;
|
|
41
|
+
Fax: string | null;
|
|
42
|
+
NumeroIntracom: string | null;
|
|
43
|
+
Adresse?: {
|
|
44
|
+
Numero: string | null;
|
|
45
|
+
Nature: string | null;
|
|
46
|
+
Complement: string | null;
|
|
47
|
+
Hameau: string | null;
|
|
48
|
+
CodePostal: string | null;
|
|
49
|
+
Pays: string | null;
|
|
50
|
+
};
|
|
51
|
+
} | null;
|
|
52
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiPropertyOptional, ApiProperty } from '@nestjs/swagger';
|
|
2
|
-
import { IsString, IsOptional, IsArray, IsEnum, IsDateString } from 'class-validator';
|
|
2
|
+
import { IsString, IsOptional, IsArray, IsEnum, IsDateString, IsNumber } from 'class-validator';
|
|
3
3
|
import { DocoonFlowType } from './DocoonInvoice.js';
|
|
4
4
|
import { EInvoicingStatusCode } from '#types/Enum/EInvoicingStatusCode.js';
|
|
5
5
|
import { EInvoicingReasonType } from '#types/Enum/EInvoicingReasonType.js';
|
|
@@ -21,7 +21,32 @@ export type CreateLegalEntity = {
|
|
|
21
21
|
|
|
22
22
|
export type CreateLegalEntityStructure = {
|
|
23
23
|
legalIdSchemeId?: string;
|
|
24
|
+
legalId: string;
|
|
25
|
+
isEnabled?: boolean;
|
|
26
|
+
address?: {
|
|
27
|
+
name?: string;
|
|
28
|
+
street?: string;
|
|
29
|
+
city?: string;
|
|
30
|
+
zipCode?: string;
|
|
31
|
+
postBox?: string;
|
|
32
|
+
additionalInfo?: string;
|
|
33
|
+
country?: string;
|
|
34
|
+
};
|
|
35
|
+
mainActivity?: {
|
|
36
|
+
name?: string;
|
|
37
|
+
code?: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export type CreateStructure = {
|
|
42
|
+
name: string;
|
|
43
|
+
parentStructureId: string;
|
|
44
|
+
code?: string;
|
|
45
|
+
legalIdSchemeId?: string;
|
|
46
|
+
legalId: string;
|
|
24
47
|
isEnabled?: boolean;
|
|
48
|
+
startDate?: string | null;
|
|
49
|
+
endDate?: string | null;
|
|
25
50
|
address?: {
|
|
26
51
|
name?: string;
|
|
27
52
|
street?: string;
|
|
@@ -85,4 +110,9 @@ export class AcceptEInvoice {
|
|
|
85
110
|
@IsString()
|
|
86
111
|
@IsOptional()
|
|
87
112
|
internalComment?: string;
|
|
113
|
+
|
|
114
|
+
@ApiPropertyOptional()
|
|
115
|
+
@IsNumber()
|
|
116
|
+
@IsOptional()
|
|
117
|
+
idThirdParty?: number;
|
|
88
118
|
}
|
|
@@ -239,6 +239,21 @@ export interface ReadDocoonDirectoryLineAdded {
|
|
|
239
239
|
flowError: ReadDocoonDirectoryLineFlowError;
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
+
export interface ReadDocoonDirectoryLine {
|
|
243
|
+
id: string;
|
|
244
|
+
creationDate: string;
|
|
245
|
+
lastModificationDate: string;
|
|
246
|
+
structureId: string;
|
|
247
|
+
structureName: string;
|
|
248
|
+
name: string;
|
|
249
|
+
addressingIdentifier: string;
|
|
250
|
+
status: string;
|
|
251
|
+
message: string;
|
|
252
|
+
dateFrom: string;
|
|
253
|
+
dateTo?: string | null;
|
|
254
|
+
flowError?: ReadDocoonDirectoryLineFlowError;
|
|
255
|
+
}
|
|
256
|
+
|
|
242
257
|
export interface ReadDocoonDirectoryLineFlowError {
|
|
243
258
|
details: string[];
|
|
244
259
|
errorCode: string;
|
|
@@ -248,3 +263,102 @@ export interface ReadDocoonTenantDirectoryLines {
|
|
|
248
263
|
tenantId: string;
|
|
249
264
|
directoryLines: ReadDocoonDirectoryLineAdded[];
|
|
250
265
|
}
|
|
266
|
+
|
|
267
|
+
export interface ReadAllDocoonTenantDirectoryLines {
|
|
268
|
+
tenantId: string;
|
|
269
|
+
totalNumberOfResults: number;
|
|
270
|
+
directoryLines: ReadDocoonDirectoryLine[];
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export interface GetFlowOutputCustomDTO {
|
|
274
|
+
submittedAt?: string;
|
|
275
|
+
updatedAt?: string;
|
|
276
|
+
creationUserId?: string;
|
|
277
|
+
creationUserLabel?: string;
|
|
278
|
+
lastModificationUserId?: string;
|
|
279
|
+
lastModificationUserLabel?: string;
|
|
280
|
+
tenantId?: string;
|
|
281
|
+
structureId?: string;
|
|
282
|
+
documentTypeCode?: string;
|
|
283
|
+
docType?: string;
|
|
284
|
+
convertedSyntax?: string;
|
|
285
|
+
documentId?: string;
|
|
286
|
+
flowId?: string;
|
|
287
|
+
sha256?: string;
|
|
288
|
+
trackingId?: string;
|
|
289
|
+
name?: string;
|
|
290
|
+
flowSyntax?: string;
|
|
291
|
+
flowProfile?: string;
|
|
292
|
+
flowStatus?: string;
|
|
293
|
+
flowType?: string;
|
|
294
|
+
flowDirection?: string;
|
|
295
|
+
flowCategory?: string;
|
|
296
|
+
attachmentNumber?: number;
|
|
297
|
+
documentSubTypeCode?: string;
|
|
298
|
+
status?: string;
|
|
299
|
+
documentStatus?: string;
|
|
300
|
+
details?: Record<string, any>;
|
|
301
|
+
gedFields?: Array<{
|
|
302
|
+
key?: string;
|
|
303
|
+
value?: string;
|
|
304
|
+
dataType?: string;
|
|
305
|
+
}>;
|
|
306
|
+
jobIds?: string[];
|
|
307
|
+
attachmentIds?: string[];
|
|
308
|
+
acknowledgment?: {
|
|
309
|
+
status?: string;
|
|
310
|
+
path?: string | null;
|
|
311
|
+
details?:
|
|
312
|
+
| {
|
|
313
|
+
level?: string | null;
|
|
314
|
+
item?: string | null;
|
|
315
|
+
reasonCode?: string | null;
|
|
316
|
+
reasonMessage?: string | null;
|
|
317
|
+
fullMessage?: string | null;
|
|
318
|
+
}
|
|
319
|
+
| Array<{
|
|
320
|
+
level?: string | null;
|
|
321
|
+
item?: string | null;
|
|
322
|
+
reasonCode?: string | null;
|
|
323
|
+
reasonMessage?: string | null;
|
|
324
|
+
fullMessage?: string | null;
|
|
325
|
+
}>;
|
|
326
|
+
};
|
|
327
|
+
acknowledgement?: {
|
|
328
|
+
status?: string;
|
|
329
|
+
path?: string | null;
|
|
330
|
+
details?:
|
|
331
|
+
| {
|
|
332
|
+
level?: string | null;
|
|
333
|
+
item?: string | null;
|
|
334
|
+
reasonCode?: string | null;
|
|
335
|
+
reasonMessage?: string | null;
|
|
336
|
+
fullMessage?: string | null;
|
|
337
|
+
}
|
|
338
|
+
| Array<{
|
|
339
|
+
level?: string | null;
|
|
340
|
+
item?: string | null;
|
|
341
|
+
reasonCode?: string | null;
|
|
342
|
+
reasonMessage?: string | null;
|
|
343
|
+
fullMessage?: string | null;
|
|
344
|
+
}>;
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
export interface DocoonWebhookPayload {
|
|
349
|
+
activityType: string;
|
|
350
|
+
date: string;
|
|
351
|
+
jobId: string;
|
|
352
|
+
jobMessageId: string;
|
|
353
|
+
documentId: string;
|
|
354
|
+
documentName: string;
|
|
355
|
+
tenantId: string;
|
|
356
|
+
tenantName: string;
|
|
357
|
+
flowId: string;
|
|
358
|
+
senderIdentifier: string;
|
|
359
|
+
receiverIdentifier: string;
|
|
360
|
+
detailMessage: string;
|
|
361
|
+
validationErrors: string;
|
|
362
|
+
chorusStatus: string;
|
|
363
|
+
chorusComment: string;
|
|
364
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EInvoicingStatusCode } from '#types/Enum/EInvoicingStatusCode.js';
|
|
2
|
+
|
|
3
|
+
export type SyncFlowStatusResult = {
|
|
4
|
+
id: number;
|
|
5
|
+
status: EInvoicingStatusCode;
|
|
6
|
+
message: string | null;
|
|
7
|
+
docoonStatus: string;
|
|
8
|
+
files: {
|
|
9
|
+
xmlId: number | null;
|
|
10
|
+
pdfId: number | null;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
2
|
+
import { IsBoolean, IsInt, IsOptional, IsString } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
export class CreateNotificationDataDto {
|
|
5
|
+
@ApiPropertyOptional()
|
|
6
|
+
@IsOptional()
|
|
7
|
+
@IsString()
|
|
8
|
+
title?: string;
|
|
9
|
+
|
|
10
|
+
@ApiPropertyOptional()
|
|
11
|
+
@IsOptional()
|
|
12
|
+
@IsString()
|
|
13
|
+
message?: string;
|
|
14
|
+
|
|
15
|
+
@ApiPropertyOptional()
|
|
16
|
+
@IsOptional()
|
|
17
|
+
@IsString()
|
|
18
|
+
link?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export class CreateInternalNotificationDto {
|
|
22
|
+
@ApiProperty()
|
|
23
|
+
@IsInt()
|
|
24
|
+
idTypeNotificationCode: number;
|
|
25
|
+
|
|
26
|
+
@ApiProperty()
|
|
27
|
+
@IsInt()
|
|
28
|
+
idTypeNotificationType: number;
|
|
29
|
+
|
|
30
|
+
@ApiPropertyOptional()
|
|
31
|
+
@IsOptional()
|
|
32
|
+
@IsBoolean()
|
|
33
|
+
deletion?: boolean;
|
|
34
|
+
|
|
35
|
+
@ApiPropertyOptional()
|
|
36
|
+
@IsOptional()
|
|
37
|
+
@IsBoolean()
|
|
38
|
+
markable?: boolean;
|
|
39
|
+
|
|
40
|
+
@ApiPropertyOptional()
|
|
41
|
+
@IsOptional()
|
|
42
|
+
@IsBoolean()
|
|
43
|
+
flaggable?: boolean;
|
|
44
|
+
|
|
45
|
+
@ApiPropertyOptional()
|
|
46
|
+
@IsOptional()
|
|
47
|
+
@IsBoolean()
|
|
48
|
+
displaysUsersWhoRead?: boolean;
|
|
49
|
+
|
|
50
|
+
@ApiPropertyOptional()
|
|
51
|
+
@IsOptional()
|
|
52
|
+
@IsString()
|
|
53
|
+
title?: string;
|
|
54
|
+
|
|
55
|
+
@ApiPropertyOptional()
|
|
56
|
+
@IsOptional()
|
|
57
|
+
@IsString()
|
|
58
|
+
message?: string;
|
|
59
|
+
|
|
60
|
+
@ApiPropertyOptional()
|
|
61
|
+
@IsOptional()
|
|
62
|
+
@IsString()
|
|
63
|
+
link?: string;
|
|
64
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IsBoolean, IsNumber, IsOptional, IsString, Min } from 'class-validator';
|
|
1
|
+
import { IsBoolean, IsInt, IsNumber, IsOptional, IsString, Min } from 'class-validator';
|
|
2
2
|
import { ProductType, Unit } from '../../../index.js';
|
|
3
3
|
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
4
4
|
import { ToBoolean } from '../../../../utils/transforms/boolean.transform.js';
|
|
@@ -54,4 +54,9 @@ export class CreateProduct {
|
|
|
54
54
|
@IsString()
|
|
55
55
|
@IsOptional()
|
|
56
56
|
codeProduct?: string;
|
|
57
|
+
|
|
58
|
+
@ApiPropertyOptional()
|
|
59
|
+
@IsInt()
|
|
60
|
+
@IsOptional()
|
|
61
|
+
idAccount?: number;
|
|
57
62
|
}
|
|
@@ -19,6 +19,7 @@ export class IAccountingFile {
|
|
|
19
19
|
totalTaxExcluded?: number | null;
|
|
20
20
|
isMobile: boolean;
|
|
21
21
|
internComment?: string | null;
|
|
22
|
+
invoiceNumber?: string | null;
|
|
22
23
|
idAccountingTransaction?: number | null;
|
|
23
24
|
idEstimateInvoice?: number | null;
|
|
24
25
|
idAccountingFileType: number;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IVat } from './IVat.js';
|
|
2
2
|
import { ISociety } from './ISociety.js';
|
|
3
|
+
import { IAccount } from './IAccount.js';
|
|
3
4
|
|
|
4
5
|
// products
|
|
5
6
|
export class IProduct {
|
|
@@ -15,6 +16,7 @@ export class IProduct {
|
|
|
15
16
|
amountOfPurchase: number | null;
|
|
16
17
|
marginVatType?: number;
|
|
17
18
|
idSociety: number;
|
|
19
|
+
idAccount?: number | null;
|
|
18
20
|
createdAt?: Date | null;
|
|
19
21
|
updatedAt?: Date | null;
|
|
20
22
|
deletedAt?: Date | null;
|
|
@@ -22,4 +24,5 @@ export class IProduct {
|
|
|
22
24
|
// Associations
|
|
23
25
|
vat?: IVat;
|
|
24
26
|
society?: ISociety;
|
|
27
|
+
account?: IAccount;
|
|
25
28
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IVat } from './IVat.js';
|
|
2
2
|
import { IProduct } from './IProduct.js';
|
|
3
|
+
import type { IAccount } from './IAccount.js';
|
|
3
4
|
import { DiscountType } from '../../Enum/CommercialManagement.js';
|
|
4
5
|
|
|
5
6
|
// itemsEstimates
|
|
@@ -7,6 +8,7 @@ export class IProductInvoice {
|
|
|
7
8
|
id?: number;
|
|
8
9
|
idEstimateInvoice: number;
|
|
9
10
|
idProduct: number | null;
|
|
11
|
+
idAccount?: number | null;
|
|
10
12
|
idVat: number;
|
|
11
13
|
marginVatType?: number;
|
|
12
14
|
amountOfPurchase: number | null;
|
|
@@ -26,4 +28,5 @@ export class IProductInvoice {
|
|
|
26
28
|
// Associations
|
|
27
29
|
vat?: IVat;
|
|
28
30
|
product?: IProduct;
|
|
31
|
+
account?: IAccount;
|
|
29
32
|
}
|