@silexpert/core 2.0.70-0 → 2.0.71
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/Library.d.ts +1 -0
- package/dist/api/resources/Library.d.ts.map +1 -1
- package/dist/api/resources/Library.js +8 -0
- package/dist/api/resources/Library.js.map +1 -1
- package/dist/types/Interface/api/commercialManagement/Read.d.ts +3 -1
- package/dist/types/Interface/api/commercialManagement/Read.d.ts.map +1 -1
- package/dist/types/Interface/api/commercialManagement/Read.js.map +1 -1
- package/dist/types/Interface/api/docoon/Create.d.ts +6 -19
- package/dist/types/Interface/api/docoon/Create.d.ts.map +1 -1
- package/dist/types/Interface/api/docoon/Create.js +7 -0
- package/dist/types/Interface/api/docoon/Create.js.map +1 -1
- package/dist/types/Interface/api/docoon/DocoonInvoice.d.ts +9 -7
- package/dist/types/Interface/api/docoon/DocoonInvoice.d.ts.map +1 -1
- package/dist/types/Interface/api/docoon/DocoonInvoice.js.map +1 -1
- package/dist/types/Interface/api/einvoicing/SyncFlowStatusResult.d.ts +0 -4
- package/dist/types/Interface/api/einvoicing/SyncFlowStatusResult.d.ts.map +1 -1
- package/dist/types/Interface/api/einvoicing/SyncFlowStatusResult.js.map +1 -1
- package/dist/types/Interface/models/IAccountingFile.d.ts +0 -1
- package/dist/types/Interface/models/IAccountingFile.d.ts.map +1 -1
- package/dist/types/Interface/models/IAccountingFile.js +0 -1
- package/dist/types/Interface/models/IAccountingFile.js.map +1 -1
- package/dist/utils/tests/brands.spec.d.ts +2 -0
- package/dist/utils/tests/brands.spec.d.ts.map +1 -0
- package/dist/utils/tests/brands.spec.js +25 -0
- package/dist/utils/tests/brands.spec.js.map +1 -0
- package/package.json +1 -1
- package/ts/api/resources/Library.ts +9 -0
- package/ts/types/Interface/api/commercialManagement/Read.ts +6 -1
- package/ts/types/Interface/api/docoon/Create.ts +11 -20
- package/ts/types/Interface/api/docoon/DocoonInvoice.ts +12 -7
- package/ts/types/Interface/api/einvoicing/SyncFlowStatusResult.ts +0 -4
- package/ts/types/Interface/models/IAccountingFile.ts +0 -1
- package/ts/utils/tests/brands.spec.ts +31 -0
|
@@ -10,6 +10,7 @@ export declare class Library extends Resource {
|
|
|
10
10
|
updateOrCreate(idFile: number, params: UpdateOrCreateGedFile): Promise<IGedFile>;
|
|
11
11
|
update(idFile: number, params: UpdateGedFile): Promise<IGedFile>;
|
|
12
12
|
download(idSociety: number, params: QueryDownloadFile, isPdfFile?: boolean): Promise<Buffer>;
|
|
13
|
+
exportDepartureDocuments(idSociety: number, idExercice: number): Promise<Blob>;
|
|
13
14
|
delete(idFile: number): Promise<number>;
|
|
14
15
|
getPaginatedForSociety(idSociety: number, params: QueryLibrarySociety, signal: AbortSignal): Promise<BasePaginate<ReadSocietyLibrary>>;
|
|
15
16
|
convertPdfToImage(body: Omit<ConvertFilePdfToImage, 'file'>, file: File): Promise<ConvertResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Library.d.ts","sourceRoot":"","sources":["../../../ts/api/resources/Library.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,QAAQ,EACR,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAE9B,qBAAa,OAAQ,SAAQ,QAAQ;IACnC,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAI/C,GAAG,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAIvD,iBAAiB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAMxE,MAAM,CAAC,MAAM,EAAE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+39,14 @@ export class Library extends Resource {
|
|
|
39
39
|
: {}),
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
+
exportDepartureDocuments(idSociety, idExercice) {
|
|
43
|
+
return this.axios.$get(`/societies/${idSociety}/library/exercices/${idExercice}/departure-export`, {
|
|
44
|
+
responseType: 'blob',
|
|
45
|
+
headers: {
|
|
46
|
+
Accept: 'application/zip',
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
}
|
|
42
50
|
delete(idFile) {
|
|
43
51
|
return this.axios.$delete(`/library/file/${idFile}`);
|
|
44
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Library.js","sourceRoot":"","sources":["../../../ts/api/resources/Library.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAe1C,MAAM,OAAO,OAAQ,SAAQ,QAAQ;IACnC,MAAM,CAAC,QAAkB;QACvB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,eAAe,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,cAAc,EAAE,qBAAqB,EAAE,EAAE,CAAC,CAAC;IAC7G,CAAC;IAED,GAAG,CAAC,MAAwB;QAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,iBAAiB,CAAC,MAA2B;QAC3C,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,4BAA4B,EAAE;YACnD,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC,EAAE;SACtG,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,MAAwB;QAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAA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,CAAC;IAED,iBAAiB,CAAC,IAAyC,EAAE,IAAU;QACrE,MAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;QAChC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAC5C,IAAI,KAAK,EAAE,CAAC;gBACV,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;YACnC,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC9B,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,uBAAuB,EAAE,QAAQ,EAAE;YACzD,OAAO,EAAE,EAAE,cAAc,EAAE,qBAAqB,EAAE;SACnD,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import { Resource } from '../Resource.js';\nimport {\n QueryLibraryFile,\n UpdateOrCreateGedFile,\n IGedFile,\n QueryDownloadFile,\n UpdateGedFile,\n QueryLastFileOfType,\n QueryLibrarySociety,\n BasePaginate,\n ReadSocietyLibrary,\n ConvertFilePdfToImage,\n ConvertResponse,\n} from '../../types/index.js';\n\nexport class Library extends Resource {\n create(formData: FormData): Promise<IGedFile[]> {\n return this.axios.$post('/library/file', formData, { headers: { 'Content-Type': 'multipart/form-data' } });\n }\n\n get(params: QueryLibraryFile): Promise<IGedFile | null> {\n return this.axios.$get('/library/file', { params });\n }\n\n getLastFileOfType(params: QueryLastFileOfType): Promise<IGedFile | null> {\n return this.axios.$get('/library/files-for-library', {\n params: { ...params, page: 1, limit: 1, attributes: ['createdAt'], include: ['user', 'fileFromGed'] },\n });\n }\n\n getAll(params: QueryLibraryFile): Promise<IGedFile[]> {\n return this.axios.$get('/library/files', { params });\n }\n\n getAllForLibrary(params: QueryLibraryFile): Promise<IGedFile[]> {\n return this.axios.$get('/library/files-for-library', { params });\n }\n\n countAll(params: QueryLibraryFile): Promise<Array<object>> {\n return this.axios.$get('/library/count-for-library', { params });\n }\n\n updateOrCreate(idFile: number, params: UpdateOrCreateGedFile): Promise<IGedFile> {\n return this.axios.$post(`/library/file/${idFile}`, params);\n }\n\n update(idFile: number, params: UpdateGedFile): Promise<IGedFile> {\n return this.axios.$put(`/library/file/${idFile}`, params);\n }\n\n download(idSociety: number, params: QueryDownloadFile, isPdfFile = false): Promise<Buffer> {\n return this.axios.$get(`/library/${idSociety}/file/download`, {\n params,\n ...(isPdfFile\n ? {\n responseType: 'arraybuffer',\n headers: {\n Accept: 'application/pdf',\n },\n }\n : {}),\n });\n }\n\n delete(idFile: number): Promise<number> {\n return this.axios.$delete(`/library/file/${idFile}`);\n }\n\n getPaginatedForSociety(\n idSociety: number,\n params: QueryLibrarySociety,\n signal: AbortSignal,\n ): Promise<BasePaginate<ReadSocietyLibrary>> {\n return this.axios.$get(`/societies/${idSociety}/library`, { params, signal });\n }\n\n convertPdfToImage(body: Omit<ConvertFilePdfToImage, 'file'>, file: File): Promise<ConvertResponse> {\n const formData = new FormData();\n Object.entries(body).forEach(([key, value]) => {\n if (value) {\n formData.append(key, `${value}`);\n }\n });\n\n formData.append('file', file);\n return this.axios.$post('/convert-pdf-to-image', formData, {\n headers: { 'Content-Type': 'multipart/form-data' },\n });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Library.js","sourceRoot":"","sources":["../../../ts/api/resources/Library.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAe1C,MAAM,OAAO,OAAQ,SAAQ,QAAQ;IACnC,MAAM,CAAC,QAAkB;QACvB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,eAAe,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,cAAc,EAAE,qBAAqB,EAAE,EAAE,CAAC,CAAC;IAC7G,CAAC;IAED,GAAG,CAAC,MAAwB;QAC1B,OAAO,IAAI,CA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ACL,CAAC;CACF","sourcesContent":["import { Resource } from '../Resource.js';\nimport {\n QueryLibraryFile,\n UpdateOrCreateGedFile,\n IGedFile,\n QueryDownloadFile,\n UpdateGedFile,\n QueryLastFileOfType,\n QueryLibrarySociety,\n BasePaginate,\n ReadSocietyLibrary,\n ConvertFilePdfToImage,\n ConvertResponse,\n} from '../../types/index.js';\n\nexport class Library extends Resource {\n create(formData: FormData): Promise<IGedFile[]> {\n return this.axios.$post('/library/file', formData, { headers: { 'Content-Type': 'multipart/form-data' } });\n }\n\n get(params: QueryLibraryFile): Promise<IGedFile | null> {\n return this.axios.$get('/library/file', { params });\n }\n\n getLastFileOfType(params: QueryLastFileOfType): Promise<IGedFile | null> {\n return this.axios.$get('/library/files-for-library', {\n params: { ...params, page: 1, limit: 1, attributes: ['createdAt'], include: ['user', 'fileFromGed'] },\n });\n }\n\n getAll(params: QueryLibraryFile): Promise<IGedFile[]> {\n return this.axios.$get('/library/files', { params });\n }\n\n getAllForLibrary(params: QueryLibraryFile): Promise<IGedFile[]> {\n return this.axios.$get('/library/files-for-library', { params });\n }\n\n countAll(params: QueryLibraryFile): Promise<Array<object>> {\n return this.axios.$get('/library/count-for-library', { params });\n }\n\n updateOrCreate(idFile: number, params: UpdateOrCreateGedFile): Promise<IGedFile> {\n return this.axios.$post(`/library/file/${idFile}`, params);\n }\n\n update(idFile: number, params: UpdateGedFile): Promise<IGedFile> {\n return this.axios.$put(`/library/file/${idFile}`, params);\n }\n\n download(idSociety: number, params: QueryDownloadFile, isPdfFile = false): Promise<Buffer> {\n return this.axios.$get(`/library/${idSociety}/file/download`, {\n params,\n ...(isPdfFile\n ? {\n responseType: 'arraybuffer',\n headers: {\n Accept: 'application/pdf',\n },\n }\n : {}),\n });\n }\n\n exportDepartureDocuments(idSociety: number, idExercice: number): Promise<Blob> {\n return this.axios.$get(`/societies/${idSociety}/library/exercices/${idExercice}/departure-export`, {\n responseType: 'blob',\n headers: {\n Accept: 'application/zip',\n },\n });\n }\n\n delete(idFile: number): Promise<number> {\n return this.axios.$delete(`/library/file/${idFile}`);\n }\n\n getPaginatedForSociety(\n idSociety: number,\n params: QueryLibrarySociety,\n signal: AbortSignal,\n ): Promise<BasePaginate<ReadSocietyLibrary>> {\n return this.axios.$get(`/societies/${idSociety}/library`, { params, signal });\n }\n\n convertPdfToImage(body: Omit<ConvertFilePdfToImage, 'file'>, file: File): Promise<ConvertResponse> {\n const formData = new FormData();\n Object.entries(body).forEach(([key, value]) => {\n if (value) {\n formData.append(key, `${value}`);\n }\n });\n\n formData.append('file', file);\n return this.axios.$post('/convert-pdf-to-image', formData, {\n headers: { 'Content-Type': 'multipart/form-data' },\n });\n }\n}\n"]}
|
|
@@ -204,7 +204,9 @@ export type ReadEInvoicingReception = {
|
|
|
204
204
|
}>;
|
|
205
205
|
};
|
|
206
206
|
};
|
|
207
|
-
export type ProductInvoiceFromEInvoice = Omit<IProductInvoice, 'id' | 'idEstimateInvoice' | 'createdAt' | 'updatedAt'
|
|
207
|
+
export type ProductInvoiceFromEInvoice = Omit<IProductInvoice, 'id' | 'idEstimateInvoice' | 'createdAt' | 'updatedAt'> & {
|
|
208
|
+
idAccount: number | null;
|
|
209
|
+
};
|
|
208
210
|
export type ReadEinvoiceInfo = {
|
|
209
211
|
emissionDate: string;
|
|
210
212
|
dueDate: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Read.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/commercialManagement/Read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,kCAAkC,EAAE,MAAM,qDAAqD,CAAC;AACzG,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,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Y,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,0BAA0B,EAAE,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,IAAI,GAAG,KAAK,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,iBAAiB,GAAG,iBAAiB,CAAC;IAC5C,MAAM,EAAE,KAAK,GAAG,KAAK,GAAG,UAAU,CAAC;IACnC,QAAQ,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrF,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Read.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/commercialManagement/Read.ts"],"names":[],"mappings":"","sourcesContent":["import { EstimateInvoiceType } from '../../../Enum/EstimateInvoice.js';\nimport { IAccountingFile } from '../../models/IAccountingFile.js';\nimport { IProductInvoice } from '../../models/IProductInvoice.js';\nimport { ReadFormattedAccountingTransaction } from '../accountingEntry/AnnotateAccountingTransaction.js';\nimport { CommercialDocumentInputs } from './Create.js';\nimport { IEstimateInvoice } from '../../models/IEstimateInvoice.js';\nimport { EstimateStatus, FontIds, InvoiceStatus } from '../../../Enum/CommercialManagement.js';\nimport { IThirdParty } from '../../models/IThirdParty.js';\nimport { InternationalizationChoices } from '../../../../utils/commercialManagement/internationalization/type.js';\nimport { ISaleEmail } from '../../models/ISaleEmail.js';\nimport { CountryId } from '#types/Enum/Country.js';\n\nexport type ReadCashBasedInvoice = Partial<IAccountingFile>;\n\nexport type ReadAccrualInvoice = Partial<ReadFormattedAccountingTransaction>;\n\nexport type ReadEstimateInvoice = IEstimateInvoice & { id: number };\n\nexport type ReadProductEditing = IProductInvoice & {\n totalTaxExcluded: number;\n unitFormatted: string;\n vatFormatted: string;\n discountFormatted: string | null;\n discountTypeFormatted: string | null;\n priceTaxExcludedFormatted: string | null;\n totalTaxExcludedFormatted: string | null;\n marginVatFormatted: string | null;\n};\n\nexport type ReadThirdPartyEditing = IThirdParty & {\n deliveryCountry: string | null;\n country: string | null;\n};\n\nexport type FacturXInvoiceData = {\n label: string;\n invoiceNumber: string;\n dateValue: string;\n totalTaxIncluded: number;\n totalTaxExcluded: number;\n isAsset: boolean;\n thirdParty: IThirdParty;\n amounts: Array<{ idVat: number; amountBase: number; amountVat: number }>;\n};\n\nexport type ReadVatEditing = {\n id: number;\n name: string;\n amount: number;\n value: number;\n baseFormatted: string;\n amountFormatted: string;\n toPay: number;\n base: number;\n};\n\nexport type ReadPreview = { idFile: number };\n\nexport type ReadDocumentEditing = CommercialDocumentInputs & {\n title?: string | null;\n idEstimateInvoiceType: EstimateInvoiceType;\n phoneContact: string | null;\n dueDateFormatted: string | null;\n expirationDateFormatted: string | null;\n capitalFormatted: string | null;\n depositFormatted: string | null;\n emissionDateFormatted: string | null;\n products: ReadProductEditing[];\n vats: ReadVatEditing[];\n totalTaxExcluded: number;\n totalTaxIncluded: number;\n totalTaxAndDiscountIncluded: number;\n generalDiscountFormatted: string | null;\n totalTaxExcludedFormatted: string;\n totalTaxIncludedFormatted: string;\n totalTaxAndDiscountIncludedFormatted: string;\n totalVatAmountFormatted: string;\n font: {\n id: FontIds;\n name: string;\n url: string;\n };\n shouldDisplayDiscountColumn: boolean;\n paymentLink?: string;\n marginVats: string[];\n accountingCategoryFormatted: string | null;\n languageTemplate: InternationalizationChoices;\n};\n\nexport type ReadCommercialDocumentTemplate = {\n header: string;\n body: string;\n footer: string;\n data: ReadDocumentEditing;\n};\n\nexport type ReadEstimateInvoiceStatus =\n | InvoiceStatus.PAID\n | InvoiceStatus.UNPAID\n | InvoiceStatus.CANCELED\n | InvoiceStatus.WAITING\n | EstimateStatus.REFUSED\n | EstimateStatus.BILLED\n | EstimateStatus.ACCEPTED\n | EstimateStatus.WAITING\n | EstimateStatus.EXPIRED;\n\ntype CountAndNumber = { count: number; amount: number };\n\nexport type ReadCountDocumentByStatus = {\n invoices: { paid: CountAndNumber; waiting: CountAndNumber; unpaid: CountAndNumber };\n preSales: { accepted: CountAndNumber; waiting: CountAndNumber; refused: CountAndNumber };\n};\n\nexport type ReadCommercialMailTemplate = {\n header: string;\n};\n\nexport type ReadSaleEmail = ISaleEmail & {\n defaultFromApplication: boolean;\n};\n\nexport type ReadRecentActivity = {\n id: number;\n type: 'estimate' | 'product' | 'tier';\n label: string;\n updatedAt: string;\n // i don't know if needed, it is in the type but not return from service for now\n item?: IEstimateInvoice | IProductInvoice | IThirdParty;\n};\n\nexport type ReadStatisticRecurrentRevenue = {\n period: string;\n done: {\n totalTaxExcluded: number;\n totalTaxIncluded: number;\n };\n projection: {\n totalTaxExcluded: number;\n totalTaxIncluded: number;\n } | null;\n};\n\nexport type ReadEInvoicingReception = {\n label: string;\n reference: string;\n emissionDate: string;\n dueDate: string | undefined;\n idCurrency: number;\n type: EstimateInvoiceType;\n purchaseOrderReference: string | undefined;\n /** float, not in cent */\n totalTaxExcluded: number;\n /** float, not in cent */\n totalTaxIncluded: number;\n /** float, not in cent */\n depositPaid: number;\n /** float, not in cent */\n amountToPay: number;\n customer: {\n reference: string | undefined;\n name: string | undefined;\n siren: string | undefined;\n vatNumber: string | undefined;\n idCountry: CountryId | undefined;\n };\n provider: {\n name: string | undefined;\n siren: string | undefined;\n vatNumber: string | undefined;\n email: string | undefined;\n idCountry: CountryId | undefined;\n };\n products: Array<{\n externalId: string;\n name: string;\n comment: string | null;\n quantity: number;\n taxExcluded: number;\n totalTaxExcluded: number;\n taxRate: number | undefined;\n idVat: number | undefined;\n externalData: {\n id: string;\n unit: string | undefined;\n };\n }>;\n referencedInvoices: Array<{\n number: string;\n date: string;\n }>;\n vat: {\n totalTaxExcluded: number | undefined;\n list: Array<{\n idVat: number | undefined;\n amountBase: number;\n taxAmount: number;\n }>;\n };\n discount: {\n document: Array<{\n isCharge: boolean;\n amount: number;\n taxRate: number | undefined;\n idVat: number | undefined;\n externalData: {\n reasonCode: string | undefined;\n };\n }>;\n lines: Array<{\n isCharge: boolean;\n amount: number;\n }>;\n };\n};\n\nexport type ProductInvoiceFromEInvoice = Omit
|
|
1
|
+
{"version":3,"file":"Read.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/commercialManagement/Read.ts"],"names":[],"mappings":"","sourcesContent":["import { EstimateInvoiceType } from '../../../Enum/EstimateInvoice.js';\nimport { IAccountingFile } from '../../models/IAccountingFile.js';\nimport { IProductInvoice } from '../../models/IProductInvoice.js';\nimport { ReadFormattedAccountingTransaction } from '../accountingEntry/AnnotateAccountingTransaction.js';\nimport { CommercialDocumentInputs } from './Create.js';\nimport { IEstimateInvoice } from '../../models/IEstimateInvoice.js';\nimport { EstimateStatus, FontIds, InvoiceStatus } from '../../../Enum/CommercialManagement.js';\nimport { IThirdParty } from '../../models/IThirdParty.js';\nimport { InternationalizationChoices } from '../../../../utils/commercialManagement/internationalization/type.js';\nimport { ISaleEmail } from '../../models/ISaleEmail.js';\nimport { CountryId } from '#types/Enum/Country.js';\n\nexport type ReadCashBasedInvoice = Partial<IAccountingFile>;\n\nexport type ReadAccrualInvoice = Partial<ReadFormattedAccountingTransaction>;\n\nexport type ReadEstimateInvoice = IEstimateInvoice & { id: number };\n\nexport type ReadProductEditing = IProductInvoice & {\n totalTaxExcluded: number;\n unitFormatted: string;\n vatFormatted: string;\n discountFormatted: string | null;\n discountTypeFormatted: string | null;\n priceTaxExcludedFormatted: string | null;\n totalTaxExcludedFormatted: string | null;\n marginVatFormatted: string | null;\n};\n\nexport type ReadThirdPartyEditing = IThirdParty & {\n deliveryCountry: string | null;\n country: string | null;\n};\n\nexport type FacturXInvoiceData = {\n label: string;\n invoiceNumber: string;\n dateValue: string;\n totalTaxIncluded: number;\n totalTaxExcluded: number;\n isAsset: boolean;\n thirdParty: IThirdParty;\n amounts: Array<{ idVat: number; amountBase: number; amountVat: number }>;\n};\n\nexport type ReadVatEditing = {\n id: number;\n name: string;\n amount: number;\n value: number;\n baseFormatted: string;\n amountFormatted: string;\n toPay: number;\n base: number;\n};\n\nexport type ReadPreview = { idFile: number };\n\nexport type ReadDocumentEditing = CommercialDocumentInputs & {\n title?: string | null;\n idEstimateInvoiceType: EstimateInvoiceType;\n phoneContact: string | null;\n dueDateFormatted: string | null;\n expirationDateFormatted: string | null;\n capitalFormatted: string | null;\n depositFormatted: string | null;\n emissionDateFormatted: string | null;\n products: ReadProductEditing[];\n vats: ReadVatEditing[];\n totalTaxExcluded: number;\n totalTaxIncluded: number;\n totalTaxAndDiscountIncluded: number;\n generalDiscountFormatted: string | null;\n totalTaxExcludedFormatted: string;\n totalTaxIncludedFormatted: string;\n totalTaxAndDiscountIncludedFormatted: string;\n totalVatAmountFormatted: string;\n font: {\n id: FontIds;\n name: string;\n url: string;\n };\n shouldDisplayDiscountColumn: boolean;\n paymentLink?: string;\n marginVats: string[];\n accountingCategoryFormatted: string | null;\n languageTemplate: InternationalizationChoices;\n};\n\nexport type ReadCommercialDocumentTemplate = {\n header: string;\n body: string;\n footer: string;\n data: ReadDocumentEditing;\n};\n\nexport type ReadEstimateInvoiceStatus =\n | InvoiceStatus.PAID\n | InvoiceStatus.UNPAID\n | InvoiceStatus.CANCELED\n | InvoiceStatus.WAITING\n | EstimateStatus.REFUSED\n | EstimateStatus.BILLED\n | EstimateStatus.ACCEPTED\n | EstimateStatus.WAITING\n | EstimateStatus.EXPIRED;\n\ntype CountAndNumber = { count: number; amount: number };\n\nexport type ReadCountDocumentByStatus = {\n invoices: { paid: CountAndNumber; waiting: CountAndNumber; unpaid: CountAndNumber };\n preSales: { accepted: CountAndNumber; waiting: CountAndNumber; refused: CountAndNumber };\n};\n\nexport type ReadCommercialMailTemplate = {\n header: string;\n};\n\nexport type ReadSaleEmail = ISaleEmail & {\n defaultFromApplication: boolean;\n};\n\nexport type ReadRecentActivity = {\n id: number;\n type: 'estimate' | 'product' | 'tier';\n label: string;\n updatedAt: string;\n // i don't know if needed, it is in the type but not return from service for now\n item?: IEstimateInvoice | IProductInvoice | IThirdParty;\n};\n\nexport type ReadStatisticRecurrentRevenue = {\n period: string;\n done: {\n totalTaxExcluded: number;\n totalTaxIncluded: number;\n };\n projection: {\n totalTaxExcluded: number;\n totalTaxIncluded: number;\n } | null;\n};\n\nexport type ReadEInvoicingReception = {\n label: string;\n reference: string;\n emissionDate: string;\n dueDate: string | undefined;\n idCurrency: number;\n type: EstimateInvoiceType;\n purchaseOrderReference: string | undefined;\n /** float, not in cent */\n totalTaxExcluded: number;\n /** float, not in cent */\n totalTaxIncluded: number;\n /** float, not in cent */\n depositPaid: number;\n /** float, not in cent */\n amountToPay: number;\n customer: {\n reference: string | undefined;\n name: string | undefined;\n siren: string | undefined;\n vatNumber: string | undefined;\n idCountry: CountryId | undefined;\n };\n provider: {\n name: string | undefined;\n siren: string | undefined;\n vatNumber: string | undefined;\n email: string | undefined;\n idCountry: CountryId | undefined;\n };\n products: Array<{\n externalId: string;\n name: string;\n comment: string | null;\n quantity: number;\n taxExcluded: number;\n totalTaxExcluded: number;\n taxRate: number | undefined;\n idVat: number | undefined;\n externalData: {\n id: string;\n unit: string | undefined;\n };\n }>;\n referencedInvoices: Array<{\n number: string;\n date: string;\n }>;\n vat: {\n totalTaxExcluded: number | undefined;\n list: Array<{\n idVat: number | undefined;\n amountBase: number;\n taxAmount: number;\n }>;\n };\n discount: {\n document: Array<{\n isCharge: boolean;\n amount: number;\n taxRate: number | undefined;\n idVat: number | undefined;\n externalData: {\n reasonCode: string | undefined;\n };\n }>;\n lines: Array<{\n isCharge: boolean;\n amount: number;\n }>;\n };\n};\n\nexport type ProductInvoiceFromEInvoice = Omit<\n IProductInvoice,\n 'id' | 'idEstimateInvoice' | 'createdAt' | 'updatedAt'\n> & {\n idAccount: number | null;\n};\n\nexport type ReadEinvoiceInfo = {\n emissionDate: string;\n dueDate: string;\n idThirdParty: number;\n idCurrency: number;\n externalId: string;\n internalNumber: string;\n products: ProductInvoiceFromEInvoice[];\n};\n\nexport type ReadEInvoice = {\n externalId: string;\n entityId: string;\n direction: 'In' | 'Out';\n type: string;\n flow: 'CustomerInvoice' | 'SupplierInvoice';\n syntax: 'UBL' | 'CII' | 'Factur-X';\n category: 'FLUX1' | 'FLUX2' | 'FLUX3' | 'FLUX4' | 'FLUX5' | 'FLUX6';\n name: string;\n status: string;\n statusDetails: Array<{ code: string; description: string; fullDescription: string }>;\n updatedAt: string;\n submittedAt: string;\n documentStatus: string;\n externalStructureId: string;\n documentId: string;\n};\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DocoonFlowType } from './DocoonInvoice.js';
|
|
2
2
|
import { EInvoicingStatusCode } from '#types/Enum/EInvoicingStatusCode.js';
|
|
3
3
|
import { EInvoicingReasonType } from '#types/Enum/EInvoicingReasonType.js';
|
|
4
|
+
import { ProductInvoiceFromEInvoice } from '#types/index.js';
|
|
4
5
|
export type CreateLegalEntity = {
|
|
5
6
|
name: string;
|
|
6
7
|
legalId: string;
|
|
@@ -16,30 +17,12 @@ export type CreateLegalEntity = {
|
|
|
16
17
|
structures?: CreateLegalEntityStructure[];
|
|
17
18
|
};
|
|
18
19
|
export type CreateLegalEntityStructure = {
|
|
19
|
-
legalIdSchemeId?: string;
|
|
20
|
-
legalId: string;
|
|
21
|
-
isEnabled?: boolean;
|
|
22
|
-
address?: {
|
|
23
|
-
name?: string;
|
|
24
|
-
street?: string;
|
|
25
|
-
city?: string;
|
|
26
|
-
zipCode?: string;
|
|
27
|
-
postBox?: string;
|
|
28
|
-
additionalInfo?: string;
|
|
29
|
-
country?: string;
|
|
30
|
-
};
|
|
31
|
-
mainActivity?: {
|
|
32
|
-
name?: string;
|
|
33
|
-
code?: string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
export type CreateStructure = {
|
|
37
20
|
name: string;
|
|
38
|
-
parentStructureId: string;
|
|
39
21
|
code?: string;
|
|
40
22
|
legalIdSchemeId?: string;
|
|
41
23
|
legalId: string;
|
|
42
24
|
isEnabled?: boolean;
|
|
25
|
+
countryCode?: string;
|
|
43
26
|
startDate?: string | null;
|
|
44
27
|
endDate?: string | null;
|
|
45
28
|
address?: {
|
|
@@ -56,6 +39,9 @@ export type CreateStructure = {
|
|
|
56
39
|
code?: string;
|
|
57
40
|
};
|
|
58
41
|
};
|
|
42
|
+
export type CreateStructure = CreateLegalEntityStructure & {
|
|
43
|
+
parentStructureId: string;
|
|
44
|
+
};
|
|
59
45
|
export type RelaunchDirectoryLine = {
|
|
60
46
|
directoryLineId: string;
|
|
61
47
|
directoryLineInfo: {
|
|
@@ -76,6 +62,7 @@ export declare class RejectEInvoice {
|
|
|
76
62
|
}
|
|
77
63
|
export declare class AcceptEInvoice {
|
|
78
64
|
status: EInvoicingStatusCode;
|
|
65
|
+
products?: ProductInvoiceFromEInvoice[];
|
|
79
66
|
internalNumber?: string;
|
|
80
67
|
internalComment?: string;
|
|
81
68
|
idThirdParty?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Create.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/docoon/Create.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cA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}
|
|
@@ -50,6 +50,7 @@ __decorate([
|
|
|
50
50
|
], RejectEInvoice.prototype, "reason", void 0);
|
|
51
51
|
export class AcceptEInvoice {
|
|
52
52
|
status;
|
|
53
|
+
products;
|
|
53
54
|
internalNumber;
|
|
54
55
|
internalComment;
|
|
55
56
|
idThirdParty;
|
|
@@ -59,6 +60,12 @@ __decorate([
|
|
|
59
60
|
IsEnum(EInvoicingStatusCode),
|
|
60
61
|
__metadata("design:type", Number)
|
|
61
62
|
], AcceptEInvoice.prototype, "status", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
ApiProperty(),
|
|
65
|
+
IsArray(),
|
|
66
|
+
IsOptional(),
|
|
67
|
+
__metadata("design:type", Array)
|
|
68
|
+
], AcceptEInvoice.prototype, "products", void 0);
|
|
62
69
|
__decorate([
|
|
63
70
|
ApiPropertyOptional(),
|
|
64
71
|
IsString(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Create.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/docoon/Create.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhG,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"Create.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/docoon/Create.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhG,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAuD3E,MAAM,OAAO,mBAAmB;IAI9B,YAAY,CAAU;IAMtB,QAAQ,CAAoB;CAC7B;AAPC;IAHC,mBAAmB,EAAE;IACrB,YAAY,EAAE;IACd,UAAU,EAAE;;yDACS;AAMtB;IAJC,mBAAmB,EAAE;IACrB,OAAO,EAAE;IACT,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACxB,UAAU,EAAE;;qDACe;AAE9B,MAAM,OAAO,cAAc;IAGzB,MAAM,CAAuB;IAI7B,UAAU,CAAuB;IAIjC,MAAM,CAAS;CAChB;AATC;IAFC,WAAW,EAAE;IACb,MAAM,CAAC,oBAAoB,CAAC;;8CACA;AAI7B;IAFC,WAAW,EAAE;IACb,MAAM,CAAC,oBAAoB,CAAC;;kDACI;AAIjC;IAFC,WAAW,EAAE;IACb,QAAQ,EAAE;;8CACI;AAEjB,MAAM,OAAO,cAAc;IAGzB,MAAM,CAAuB;IAK7B,QAAQ,CAAgC;IAKxC,cAAc,CAAU;IAKxB,eAAe,CAAU;IAKzB,YAAY,CAAU;CACvB;AArBC;IAFC,WAAW,EAAE;IACb,MAAM,CAAC,oBAAoB,CAAC;;8CACA;AAK7B;IAHC,WAAW,EAAE;IACb,OAAO,EAAE;IACT,UAAU,EAAE;;gDAC2B;AAKxC;IAHC,mBAAmB,EAAE;IACrB,QAAQ,EAAE;IACV,UAAU,EAAE;;sDACW;AAKxB;IAHC,mBAAmB,EAAE;IACrB,QAAQ,EAAE;IACV,UAAU,EAAE;;uDACY;AAKzB;IAHC,mBAAmB,EAAE;IACrB,QAAQ,EAAE;IACV,UAAU,EAAE;;oDACS","sourcesContent":["import { ApiPropertyOptional, ApiProperty } from '@nestjs/swagger';\nimport { IsString, IsOptional, IsArray, IsEnum, IsDateString, IsNumber } from 'class-validator';\nimport { DocoonFlowType } from './DocoonInvoice.js';\nimport { EInvoicingStatusCode } from '#types/Enum/EInvoicingStatusCode.js';\nimport { EInvoicingReasonType } from '#types/Enum/EInvoicingReasonType.js';\nimport { ProductInvoiceFromEInvoice } from '#types/index.js';\n\nexport type CreateLegalEntity = {\n name: string;\n legalId: string;\n isEnabled: boolean;\n legalIdSchemeId?: string;\n code?: string;\n isTaxable?: boolean;\n taxCountryCode?: string;\n personType?: 'PRIVATE_PERSON' | 'MORAL_PERSON_PRIVATE' | 'MORAL_PERSON_PUBLIC';\n taxId?: string;\n legalForm?: string;\n capital?: number;\n structures?: CreateLegalEntityStructure[];\n};\n\nexport type CreateLegalEntityStructure = {\n name: string;\n code?: string;\n legalIdSchemeId?: string;\n legalId: string;\n isEnabled?: boolean;\n countryCode?: string;\n startDate?: string | null;\n endDate?: string | null;\n address?: {\n name?: string;\n street?: string;\n city?: string;\n zipCode?: string;\n postBox?: string;\n additionalInfo?: string;\n country?: string;\n };\n mainActivity?: {\n name?: string;\n code?: string;\n };\n};\n\nexport type CreateStructure = CreateLegalEntityStructure & {\n parentStructureId: string;\n};\n\nexport type RelaunchDirectoryLine = {\n directoryLineId: string;\n directoryLineInfo: {\n name: string;\n dateFrom: string;\n dateTo?: string | null;\n addressingIdentifier: string;\n };\n};\nexport class ImportDocoonInvoice {\n @ApiPropertyOptional()\n @IsDateString()\n @IsOptional()\n updatedAfter?: string;\n\n @ApiPropertyOptional()\n @IsArray()\n @IsString({ each: true })\n @IsOptional()\n flowType?: DocoonFlowType[];\n}\nexport class RejectEInvoice {\n @ApiProperty()\n @IsEnum(EInvoicingStatusCode)\n status: EInvoicingStatusCode;\n\n @ApiProperty()\n @IsEnum(EInvoicingReasonType)\n reasonType: EInvoicingReasonType;\n\n @ApiProperty()\n @IsString()\n reason: string;\n}\nexport class AcceptEInvoice {\n @ApiProperty()\n @IsEnum(EInvoicingStatusCode)\n status: EInvoicingStatusCode;\n\n @ApiProperty()\n @IsArray()\n @IsOptional()\n products?: ProductInvoiceFromEInvoice[];\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n internalNumber?: string;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n internalComment?: string;\n\n @ApiPropertyOptional()\n @IsNumber()\n @IsOptional()\n idThirdParty?: number;\n}\n"]}
|
|
@@ -176,16 +176,18 @@ export type ReadDocoonResultSearch = {
|
|
|
176
176
|
documentStatus: string;
|
|
177
177
|
name: string;
|
|
178
178
|
acknowledgement?: DocoonFlowAcknowledgement;
|
|
179
|
+
acknowledgment?: DocoonFlowAcknowledgement;
|
|
179
180
|
};
|
|
180
181
|
export type DocoonFlowAcknowledgement = {
|
|
181
182
|
status: 'Ok' | 'Error';
|
|
182
|
-
details?:
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
183
|
+
details?: DocoonFlowAcknowledgementDetails;
|
|
184
|
+
};
|
|
185
|
+
export type DocoonFlowAcknowledgementDetails = {
|
|
186
|
+
level: string | null;
|
|
187
|
+
item: string | null;
|
|
188
|
+
reasonCode: string | null;
|
|
189
|
+
reasonMessage: string | null;
|
|
190
|
+
fullMessage: string | null;
|
|
189
191
|
};
|
|
190
192
|
export type DocoonFlowType = 'CustomerInvoice' | 'SupplierInvoice';
|
|
191
193
|
export type DocoonFlowDirection = 'In' | 'Out';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocoonInvoice.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/docoon/DocoonInvoice.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CA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AC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE;YACL,YAAY,EAAE,MAAM,CAAC;YACrB,QAAQ,EAAE,cAAc,EAAE,CAAC;SAC5B,CAAC;KACH,CAAC;IACF,MAAM,EAAE,sBAAsB,EAAE,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,mBAAmB,CAAC;IACnC,QAAQ,EAAE,cAAc,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,kBAAkB,CAAC;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"DocoonInvoice.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/docoon/DocoonInvoice.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oBAAoB,EA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E,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;AACnE,MAAM,MAAM,mBAAmB,GAAG,IAAI,GAAG,KAAK,CAAC;AAC/C,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,CAAC;AAC1D,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAE3F,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocoonInvoice.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/docoon/DocoonInvoice.ts"],"names":[],"mappings":"","sourcesContent":["export type DocoonInvoice = {\n numeroFacture: string;\n dateEmission: string;\n codeType: string;\n codeDevise: string;\n codeDateExigibiliteTva: string;\n dateEcheance: string;\n referenceAcheteur: string;\n referenceBonCommande: string;\n numeroOrdreVente: string;\n identifiantObjetFacture: string;\n identifiantSchema: string;\n referenceComptableAcheteur: string;\n conditionPaiement: string;\n noteDeFacture: Array<{\n codeSujetNote: string;\n noteFacture: string;\n }>;\n controleDuProcessus: {\n typeProcessus: string;\n typeProfil: string;\n };\n /**\n * THIRDPARTY\n */\n vendeur: {\n raisonSociale: string;\n appellationCommerciale: string;\n identifiantPrive: Array<{\n identifiant: string;\n identifiantSchema: string;\n }>;\n numeroSiren: string;\n identifiantSchemaIdentifiant: string;\n identifiantFiscal: Array<{\n qualifiantIdentifiantFiscal: string;\n identifiantTva: string;\n }>;\n email: string;\n identifiantEmail: string;\n formeJuridique: string;\n adressePostale: {\n adresse1: string;\n adresse2: string | null;\n localite: string;\n cp: string;\n codePays: string;\n };\n contact: {\n pointContact: string;\n telephone: string;\n email: string;\n };\n countryCodeFR: boolean;\n };\n //\n acheteur: {\n raisonSociale: string;\n appellationCommerciale?: string;\n identifiantPrive: Array<{\n identifiant: string;\n identifiantSchema: string;\n }>;\n numeroSiren: string;\n identifiantSchemaIdentifiant: string;\n identifiantFiscal: Array<{\n qualifiantIdentifiantFiscal: string;\n identifiantTva: string;\n }>;\n email: string;\n identifiantEmail: string;\n adressePostale: {\n adresse1: string;\n adresse2: string | null;\n localite: string;\n cp: string;\n codePays: string;\n };\n contact: {\n pointContact: string;\n telephone: string;\n email: string;\n };\n countryCodeFR: boolean;\n };\n\n informationsDeLivraisonPresentationDeService: {\n lieuLivraison: string;\n };\n\n periodeDeFacturation: {\n dateDebut: string;\n dateFin: string;\n };\n adresseDeLivraisonRealisationPrestationDeService: {\n adresse1: string;\n adresse2: string | null;\n localite: string;\n cp: string;\n codePays: string;\n };\n instructionsDePaiement: {\n codeMoyen: string;\n libelleMoyen: 'Virement';\n avis: string;\n virement: {\n identifiantComptePaiement: string;\n nomComptePaiement: string;\n identifiantPrestatairePaiement: string;\n };\n };\n totauxDuDocument: {\n sommeMontantNetLigne: number;\n sommeRemiseDocument: number;\n sommeChargeDocument: number;\n montantTotalFactureHorsTva: number;\n montantTotalTvaFacture: number;\n montantTotalFactureAvecTva: number;\n montantPaye: number;\n montantAPayer: number;\n };\n ventilationDeLaTva: Array<{\n baseImpositionTva: number;\n montantTypeTva: number;\n codeTypeTva: string;\n tauxTypeTva: number;\n }>;\n ligneDeFacture: Array<{\n identifiant: string;\n quantiteFacture: number;\n codeQuantiteFacture: string;\n montantNetFacture: number;\n detailDuPrix: {\n prixNet: number;\n rabaisPrix: number;\n prixBrut: number;\n quantiteBasePrix: number;\n codeQuantitePrix: string;\n };\n informationSurLaTva: {\n codeTypeTva: string;\n tauxTva: number;\n };\n informationSurArticle: {\n designation: string;\n description: string;\n };\n }>;\n};\n\nexport type ReadDocoonSearch = {\n total: number;\n offset: number;\n limit: number;\n filter: {\n limit: number;\n offset: number;\n where: {\n updatedAfter: string;\n flowType: DocoonFlowType[];\n };\n };\n result: ReadDocoonResultSearch[];\n};\n\nexport type ReadDocoonResultSearch = {\n documentId: string;\n structureId: string;\n submittedAt: string;\n updatedAt: string;\n flowId: string;\n trackingId: string;\n flowDirection: DocoonFlowDirection;\n flowType: DocoonFlowType;\n flowStatus: string;\n flowSyntax: DocoonFlowSyntax;\n flowProfile: string;\n flowCategory: DocoonFlowCategory;\n isRead: boolean;\n documentTypeCode: string;\n documentStatus: string;\n name: string;\n acknowledgement?: DocoonFlowAcknowledgement;\n};\n\nexport type DocoonFlowAcknowledgement = {\n status: 'Ok' | 'Error';\n details?:
|
|
1
|
+
{"version":3,"file":"DocoonInvoice.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/docoon/DocoonInvoice.ts"],"names":[],"mappings":"","sourcesContent":["export type DocoonInvoice = {\n numeroFacture: string;\n dateEmission: string;\n codeType: string;\n codeDevise: string;\n codeDateExigibiliteTva: string;\n dateEcheance: string;\n referenceAcheteur: string;\n referenceBonCommande: string;\n numeroOrdreVente: string;\n identifiantObjetFacture: string;\n identifiantSchema: string;\n referenceComptableAcheteur: string;\n conditionPaiement: string;\n noteDeFacture: Array<{\n codeSujetNote: string;\n noteFacture: string;\n }>;\n controleDuProcessus: {\n typeProcessus: string;\n typeProfil: string;\n };\n /**\n * THIRDPARTY\n */\n vendeur: {\n raisonSociale: string;\n appellationCommerciale: string;\n identifiantPrive: Array<{\n identifiant: string;\n identifiantSchema: string;\n }>;\n numeroSiren: string;\n identifiantSchemaIdentifiant: string;\n identifiantFiscal: Array<{\n qualifiantIdentifiantFiscal: string;\n identifiantTva: string;\n }>;\n email: string;\n identifiantEmail: string;\n formeJuridique: string;\n adressePostale: {\n adresse1: string;\n adresse2: string | null;\n localite: string;\n cp: string;\n codePays: string;\n };\n contact: {\n pointContact: string;\n telephone: string;\n email: string;\n };\n countryCodeFR: boolean;\n };\n //\n acheteur: {\n raisonSociale: string;\n appellationCommerciale?: string;\n identifiantPrive: Array<{\n identifiant: string;\n identifiantSchema: string;\n }>;\n numeroSiren: string;\n identifiantSchemaIdentifiant: string;\n identifiantFiscal: Array<{\n qualifiantIdentifiantFiscal: string;\n identifiantTva: string;\n }>;\n email: string;\n identifiantEmail: string;\n adressePostale: {\n adresse1: string;\n adresse2: string | null;\n localite: string;\n cp: string;\n codePays: string;\n };\n contact: {\n pointContact: string;\n telephone: string;\n email: string;\n };\n countryCodeFR: boolean;\n };\n\n informationsDeLivraisonPresentationDeService: {\n lieuLivraison: string;\n };\n\n periodeDeFacturation: {\n dateDebut: string;\n dateFin: string;\n };\n adresseDeLivraisonRealisationPrestationDeService: {\n adresse1: string;\n adresse2: string | null;\n localite: string;\n cp: string;\n codePays: string;\n };\n instructionsDePaiement: {\n codeMoyen: string;\n libelleMoyen: 'Virement';\n avis: string;\n virement: {\n identifiantComptePaiement: string;\n nomComptePaiement: string;\n identifiantPrestatairePaiement: string;\n };\n };\n totauxDuDocument: {\n sommeMontantNetLigne: number;\n sommeRemiseDocument: number;\n sommeChargeDocument: number;\n montantTotalFactureHorsTva: number;\n montantTotalTvaFacture: number;\n montantTotalFactureAvecTva: number;\n montantPaye: number;\n montantAPayer: number;\n };\n ventilationDeLaTva: Array<{\n baseImpositionTva: number;\n montantTypeTva: number;\n codeTypeTva: string;\n tauxTypeTva: number;\n }>;\n ligneDeFacture: Array<{\n identifiant: string;\n quantiteFacture: number;\n codeQuantiteFacture: string;\n montantNetFacture: number;\n detailDuPrix: {\n prixNet: number;\n rabaisPrix: number;\n prixBrut: number;\n quantiteBasePrix: number;\n codeQuantitePrix: string;\n };\n informationSurLaTva: {\n codeTypeTva: string;\n tauxTva: number;\n };\n informationSurArticle: {\n designation: string;\n description: string;\n };\n }>;\n};\n\nexport type ReadDocoonSearch = {\n total: number;\n offset: number;\n limit: number;\n filter: {\n limit: number;\n offset: number;\n where: {\n updatedAfter: string;\n flowType: DocoonFlowType[];\n };\n };\n result: ReadDocoonResultSearch[];\n};\n\nexport type ReadDocoonResultSearch = {\n documentId: string;\n structureId: string;\n submittedAt: string;\n updatedAt: string;\n flowId: string;\n trackingId: string;\n flowDirection: DocoonFlowDirection;\n flowType: DocoonFlowType;\n flowStatus: string;\n flowSyntax: DocoonFlowSyntax;\n flowProfile: string;\n flowCategory: DocoonFlowCategory;\n isRead: boolean;\n documentTypeCode: string;\n documentStatus: string;\n name: string;\n acknowledgement?: DocoonFlowAcknowledgement;\n // There is probably a typo in the document but just in case, we handle both \"acknowledgment\" and \"acknowledgement\"\n acknowledgment?: DocoonFlowAcknowledgement;\n};\n\nexport type DocoonFlowAcknowledgement = {\n status: 'Ok' | 'Error';\n details?: DocoonFlowAcknowledgementDetails;\n};\n\nexport type DocoonFlowAcknowledgementDetails = {\n level: string | null;\n item: string | null;\n reasonCode: string | null;\n reasonMessage: string | null;\n fullMessage: string | null;\n};\n\nexport type DocoonFlowType = 'CustomerInvoice' | 'SupplierInvoice';\nexport type DocoonFlowDirection = 'In' | 'Out';\nexport type DocoonFlowSyntax = 'UBL' | 'CII' | 'Factur-X';\nexport type DocoonFlowCategory = 'FLUX1' | 'FLUX2' | 'FLUX3' | 'FLUX4' | 'FLUX5' | 'FLUX6';\n\nexport type DocoonFlowDocType = 'Original' | 'ReadableView';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SyncFlowStatusResult.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/einvoicing/SyncFlowStatusResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,oBAAoB,CAAC;IAC7B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"SyncFlowStatusResult.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/einvoicing/SyncFlowStatusResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,oBAAoB,CAAC;IAC7B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SyncFlowStatusResult.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/einvoicing/SyncFlowStatusResult.ts"],"names":[],"mappings":"","sourcesContent":["import { EInvoicingStatusCode } from '#types/Enum/EInvoicingStatusCode.js';\n\nexport type SyncFlowStatusResult = {\n id: number;\n status: EInvoicingStatusCode;\n message: string | null;\n docoonStatus: string;\n
|
|
1
|
+
{"version":3,"file":"SyncFlowStatusResult.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/einvoicing/SyncFlowStatusResult.ts"],"names":[],"mappings":"","sourcesContent":["import { EInvoicingStatusCode } from '#types/Enum/EInvoicingStatusCode.js';\n\nexport type SyncFlowStatusResult = {\n id: number;\n status: EInvoicingStatusCode;\n message: string | null;\n docoonStatus: string;\n};\n"]}
|
|
@@ -17,7 +17,6 @@ export declare class IAccountingFile {
|
|
|
17
17
|
totalTaxExcluded?: number | null;
|
|
18
18
|
isMobile: boolean;
|
|
19
19
|
internComment?: string | null;
|
|
20
|
-
invoiceNumber?: string | null;
|
|
21
20
|
idAccountingTransaction?: number | null;
|
|
22
21
|
idEstimateInvoice?: number | null;
|
|
23
22
|
idAccountingFileType: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAccountingFile.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IAccountingFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,SAAS,E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CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,UAAU,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,UAAU,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;CACjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAccountingFile.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IAccountingFile.ts"],"names":[],"mappings":"AASA,iBAAiB;AACjB,MAAM,OAAO,eAAe;IAC1B,EAAE,CAAU;IACZ,MAAM,CAAiB;IACvB,QAAQ,CAAW;IACnB,gBAAgB,CAAiB;IACjC,UAAU,CAAiB;IAC3B,YAAY,CAAe;IAC3B,gBAAgB,CAAiB;IACjC,gBAAgB,CAAiB;IACjC,QAAQ,CAAU;IAClB,aAAa,CAAiB;IAC9B,
|
|
1
|
+
{"version":3,"file":"IAccountingFile.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IAccountingFile.ts"],"names":[],"mappings":"AASA,iBAAiB;AACjB,MAAM,OAAO,eAAe;IAC1B,EAAE,CAAU;IACZ,MAAM,CAAiB;IACvB,QAAQ,CAAW;IACnB,gBAAgB,CAAiB;IACjC,UAAU,CAAiB;IAC3B,YAAY,CAAe;IAC3B,gBAAgB,CAAiB;IACjC,gBAAgB,CAAiB;IACjC,QAAQ,CAAU;IAClB,aAAa,CAAiB;IAC9B,uBAAuB,CAAiB;IACxC,iBAAiB,CAAiB;IAClC,oBAAoB,CAAS;IAC7B,YAAY,CAAiB;IAC7B,SAAS,CAAS;IAClB,MAAM,CAAS;IACf,YAAY,CAAiB;IAC7B,SAAS,CAAe;IACxB,SAAS,CAAe;IACxB,SAAS,CAAe;IACxB,UAAU,CAAiB;IAC3B,UAAU,CAAW;IACrB,QAAQ,CAAW;IAEnB,eAAe;IACf,qBAAqB,CAA0B;IAC/C,gBAAgB,CAAoB;IACpC,kBAAkB,CAAuB;IACzC,QAAQ,CAAa;IACrB,IAAI,CAAS;IACb,OAAO,CAAY;IACnB,UAAU,CAAsB;IAChC,UAAU,CAAsB;CACjC","sourcesContent":["import { IAccountingTransaction } from './IAccountingTransaction.js';\nimport { IEstimateInvoice } from './IEstimateInvoice.js';\nimport { IFileType } from './IFileType.js';\nimport { IFile } from './IFile.js';\nimport { ISociety } from './ISociety.js';\nimport { IAccountingFileType } from './IAccountingFileType.js';\nimport { IEInvoicing } from './IEInvoicing.js';\nimport { IThirdParty } from './IThirdParty.js';\n\n// accountingFile\nexport class IAccountingFile {\n id?: number;\n idUser?: number | null;\n isMerged?: boolean;\n budgeaDocumentId?: number | null;\n bankFileId?: string | null;\n emissionDate?: Date | null;\n totalTaxIncluded?: number | null;\n totalTaxExcluded?: number | null;\n isMobile: boolean;\n internComment?: string | null;\n idAccountingTransaction?: number | null;\n idEstimateInvoice?: number | null;\n idAccountingFileType: number;\n idThirdParty?: number | null;\n idSociety: number;\n idFile: number;\n idEInvoicing?: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n deletedAt?: Date | null;\n idFileType?: number | null;\n isVerified?: boolean;\n toVerify?: boolean;\n\n // Associations\n accountingTransaction?: IAccountingTransaction;\n estimatesInvoice?: IEstimateInvoice;\n accountingFileType?: IAccountingFileType;\n fileType?: IFileType;\n file?: IFile;\n society?: ISociety;\n thirdParty?: IThirdParty | null;\n eInvoicing?: IEInvoicing | null;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brands.spec.d.ts","sourceRoot":"","sources":["../../../ts/utils/tests/brands.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { afterEach, describe, expect, test, vi } from 'vitest';
|
|
2
|
+
import { getBrand, getBrandNameByNodeEnv, isItThisEnv } from '../brands.js';
|
|
3
|
+
afterEach(() => {
|
|
4
|
+
vi.restoreAllMocks();
|
|
5
|
+
});
|
|
6
|
+
describe('brands utils', () => {
|
|
7
|
+
test('should fallback to Clementine for unknown environments', () => {
|
|
8
|
+
expect(getBrandNameByNodeEnv('my-custom-env')).toBe('Clementine');
|
|
9
|
+
});
|
|
10
|
+
test('should keep explicit environment mapping for legalstart', () => {
|
|
11
|
+
expect(getBrandNameByNodeEnv('api.legalstart.fr')).toBe('Legalstart');
|
|
12
|
+
});
|
|
13
|
+
test('should return Clementine brand by default in dev', () => {
|
|
14
|
+
const brand = getBrand({ nodeEnv: 'dev' });
|
|
15
|
+
expect(brand.name).toBe('Clementine');
|
|
16
|
+
expect(brand.idTypeBrand).toBe(1);
|
|
17
|
+
expect(isItThisEnv('Clementine', 'dev')).toBe(true);
|
|
18
|
+
});
|
|
19
|
+
test('should return first legalstart brand when fixed idTypeBrand is not found', () => {
|
|
20
|
+
const brand = getBrand({ nodeEnv: 'legalstart' });
|
|
21
|
+
expect(brand.name).toBe('LegalStart');
|
|
22
|
+
expect(brand.idTypeBrand).toBe(1);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=brands.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brands.spec.js","sourceRoot":"","sources":["../../../ts/utils/tests/brands.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE5E,SAAS,CAAC,GAAG,EAAE;IACb,EAAE,CAAC,eAAe,EAAE,CAAC;AACvB,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,IAAI,CAAC,wDAAwD,EAAE,GAAG,EAAE;QAClE,MAAM,CAAC,qBAAqB,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,yDAAyD,EAAE,GAAG,EAAE;QACnE,MAAM,CAAC,qBAAqB,CAAC,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,kDAAkD,EAAE,GAAG,EAAE;QAC5D,MAAM,KAAK,GAAG,QAAQ,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;QAE3C,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACtC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClC,MAAM,CAAC,WAAW,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,0EAA0E,EAAE,GAAG,EAAE;QACpF,MAAM,KAAK,GAAG,QAAQ,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC;QAElD,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACtC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { afterEach, describe, expect, test, vi } from 'vitest';\nimport { getBrand, getBrandNameByNodeEnv, isItThisEnv } from '../brands.js';\n\nafterEach(() => {\n vi.restoreAllMocks();\n});\n\ndescribe('brands utils', () => {\n test('should fallback to Clementine for unknown environments', () => {\n expect(getBrandNameByNodeEnv('my-custom-env')).toBe('Clementine');\n });\n\n test('should keep explicit environment mapping for legalstart', () => {\n expect(getBrandNameByNodeEnv('api.legalstart.fr')).toBe('Legalstart');\n });\n\n test('should return Clementine brand by default in dev', () => {\n const brand = getBrand({ nodeEnv: 'dev' });\n\n expect(brand.name).toBe('Clementine');\n expect(brand.idTypeBrand).toBe(1);\n expect(isItThisEnv('Clementine', 'dev')).toBe(true);\n });\n\n test('should return first legalstart brand when fixed idTypeBrand is not found', () => {\n const brand = getBrand({ nodeEnv: 'legalstart' });\n\n expect(brand.name).toBe('LegalStart');\n expect(brand.idTypeBrand).toBe(1);\n });\n});\n"]}
|
package/package.json
CHANGED
|
@@ -62,6 +62,15 @@ export class Library extends Resource {
|
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
exportDepartureDocuments(idSociety: number, idExercice: number): Promise<Blob> {
|
|
66
|
+
return this.axios.$get(`/societies/${idSociety}/library/exercices/${idExercice}/departure-export`, {
|
|
67
|
+
responseType: 'blob',
|
|
68
|
+
headers: {
|
|
69
|
+
Accept: 'application/zip',
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
65
74
|
delete(idFile: number): Promise<number> {
|
|
66
75
|
return this.axios.$delete(`/library/file/${idFile}`);
|
|
67
76
|
}
|
|
@@ -214,7 +214,12 @@ export type ReadEInvoicingReception = {
|
|
|
214
214
|
};
|
|
215
215
|
};
|
|
216
216
|
|
|
217
|
-
export type ProductInvoiceFromEInvoice = Omit<
|
|
217
|
+
export type ProductInvoiceFromEInvoice = Omit<
|
|
218
|
+
IProductInvoice,
|
|
219
|
+
'id' | 'idEstimateInvoice' | 'createdAt' | 'updatedAt'
|
|
220
|
+
> & {
|
|
221
|
+
idAccount: number | null;
|
|
222
|
+
};
|
|
218
223
|
|
|
219
224
|
export type ReadEinvoiceInfo = {
|
|
220
225
|
emissionDate: string;
|
|
@@ -3,6 +3,7 @@ import { IsString, IsOptional, IsArray, IsEnum, IsDateString, IsNumber } from 'c
|
|
|
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';
|
|
6
|
+
import { ProductInvoiceFromEInvoice } from '#types/index.js';
|
|
6
7
|
|
|
7
8
|
export type CreateLegalEntity = {
|
|
8
9
|
name: string;
|
|
@@ -20,31 +21,12 @@ export type CreateLegalEntity = {
|
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
export type CreateLegalEntityStructure = {
|
|
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
24
|
name: string;
|
|
43
|
-
parentStructureId: string;
|
|
44
25
|
code?: string;
|
|
45
26
|
legalIdSchemeId?: string;
|
|
46
27
|
legalId: string;
|
|
47
28
|
isEnabled?: boolean;
|
|
29
|
+
countryCode?: string;
|
|
48
30
|
startDate?: string | null;
|
|
49
31
|
endDate?: string | null;
|
|
50
32
|
address?: {
|
|
@@ -62,6 +44,10 @@ export type CreateStructure = {
|
|
|
62
44
|
};
|
|
63
45
|
};
|
|
64
46
|
|
|
47
|
+
export type CreateStructure = CreateLegalEntityStructure & {
|
|
48
|
+
parentStructureId: string;
|
|
49
|
+
};
|
|
50
|
+
|
|
65
51
|
export type RelaunchDirectoryLine = {
|
|
66
52
|
directoryLineId: string;
|
|
67
53
|
directoryLineInfo: {
|
|
@@ -101,6 +87,11 @@ export class AcceptEInvoice {
|
|
|
101
87
|
@IsEnum(EInvoicingStatusCode)
|
|
102
88
|
status: EInvoicingStatusCode;
|
|
103
89
|
|
|
90
|
+
@ApiProperty()
|
|
91
|
+
@IsArray()
|
|
92
|
+
@IsOptional()
|
|
93
|
+
products?: ProductInvoiceFromEInvoice[];
|
|
94
|
+
|
|
104
95
|
@ApiPropertyOptional()
|
|
105
96
|
@IsString()
|
|
106
97
|
@IsOptional()
|
|
@@ -181,18 +181,23 @@ export type ReadDocoonResultSearch = {
|
|
|
181
181
|
documentStatus: string;
|
|
182
182
|
name: string;
|
|
183
183
|
acknowledgement?: DocoonFlowAcknowledgement;
|
|
184
|
+
// There is probably a typo in the document but just in case, we handle both "acknowledgment" and "acknowledgement"
|
|
185
|
+
acknowledgment?: DocoonFlowAcknowledgement;
|
|
184
186
|
};
|
|
185
187
|
|
|
186
188
|
export type DocoonFlowAcknowledgement = {
|
|
187
189
|
status: 'Ok' | 'Error';
|
|
188
|
-
details?:
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
190
|
+
details?: DocoonFlowAcknowledgementDetails;
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
export type DocoonFlowAcknowledgementDetails = {
|
|
194
|
+
level: string | null;
|
|
195
|
+
item: string | null;
|
|
196
|
+
reasonCode: string | null;
|
|
197
|
+
reasonMessage: string | null;
|
|
198
|
+
fullMessage: string | null;
|
|
195
199
|
};
|
|
200
|
+
|
|
196
201
|
export type DocoonFlowType = 'CustomerInvoice' | 'SupplierInvoice';
|
|
197
202
|
export type DocoonFlowDirection = 'In' | 'Out';
|
|
198
203
|
export type DocoonFlowSyntax = 'UBL' | 'CII' | 'Factur-X';
|
|
@@ -19,7 +19,6 @@ export class IAccountingFile {
|
|
|
19
19
|
totalTaxExcluded?: number | null;
|
|
20
20
|
isMobile: boolean;
|
|
21
21
|
internComment?: string | null;
|
|
22
|
-
invoiceNumber?: string | null;
|
|
23
22
|
idAccountingTransaction?: number | null;
|
|
24
23
|
idEstimateInvoice?: number | null;
|
|
25
24
|
idAccountingFileType: number;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { afterEach, describe, expect, test, vi } from 'vitest';
|
|
2
|
+
import { getBrand, getBrandNameByNodeEnv, isItThisEnv } from '../brands.js';
|
|
3
|
+
|
|
4
|
+
afterEach(() => {
|
|
5
|
+
vi.restoreAllMocks();
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
describe('brands utils', () => {
|
|
9
|
+
test('should fallback to Clementine for unknown environments', () => {
|
|
10
|
+
expect(getBrandNameByNodeEnv('my-custom-env')).toBe('Clementine');
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
test('should keep explicit environment mapping for legalstart', () => {
|
|
14
|
+
expect(getBrandNameByNodeEnv('api.legalstart.fr')).toBe('Legalstart');
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
test('should return Clementine brand by default in dev', () => {
|
|
18
|
+
const brand = getBrand({ nodeEnv: 'dev' });
|
|
19
|
+
|
|
20
|
+
expect(brand.name).toBe('Clementine');
|
|
21
|
+
expect(brand.idTypeBrand).toBe(1);
|
|
22
|
+
expect(isItThisEnv('Clementine', 'dev')).toBe(true);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
test('should return first legalstart brand when fixed idTypeBrand is not found', () => {
|
|
26
|
+
const brand = getBrand({ nodeEnv: 'legalstart' });
|
|
27
|
+
|
|
28
|
+
expect(brand.name).toBe('LegalStart');
|
|
29
|
+
expect(brand.idTypeBrand).toBe(1);
|
|
30
|
+
});
|
|
31
|
+
});
|