@silexpert/core 1.3.255 → 1.3.256

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.
Files changed (71) hide show
  1. package/dist/cjs/api/resources/Payment.d.ts +13 -1
  2. package/dist/cjs/api/resources/Payment.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/Payment.js +17 -0
  4. package/dist/cjs/api/resources/Payment.js.map +1 -1
  5. package/dist/cjs/types/Enum/EInvoicingDirection.d.ts +5 -0
  6. package/dist/cjs/types/Enum/EInvoicingDirection.d.ts.map +1 -0
  7. package/dist/cjs/types/Enum/EInvoicingDirection.js +9 -0
  8. package/dist/cjs/types/Enum/EInvoicingDirection.js.map +1 -0
  9. package/dist/cjs/types/Enum/EInvoicingReasonType.d.ts +44 -0
  10. package/dist/cjs/types/Enum/EInvoicingReasonType.d.ts.map +1 -0
  11. package/dist/cjs/types/Enum/EInvoicingReasonType.js +146 -0
  12. package/dist/cjs/types/Enum/EInvoicingReasonType.js.map +1 -0
  13. package/dist/cjs/types/Enum/EInvoicingStatusCode.d.ts +16 -0
  14. package/dist/cjs/types/Enum/EInvoicingStatusCode.d.ts.map +1 -0
  15. package/dist/cjs/types/Enum/EInvoicingStatusCode.js +23 -0
  16. package/dist/cjs/types/Enum/EInvoicingStatusCode.js.map +1 -0
  17. package/dist/cjs/types/Interface/api/payment/Query.d.ts +8 -0
  18. package/dist/cjs/types/Interface/api/payment/Query.d.ts.map +1 -1
  19. package/dist/cjs/types/Interface/api/payment/Query.js +54 -13
  20. package/dist/cjs/types/Interface/api/payment/Query.js.map +1 -1
  21. package/dist/cjs/types/Interface/api/payment/ReadPayment.d.ts +13 -0
  22. package/dist/cjs/types/Interface/api/payment/ReadPayment.d.ts.map +1 -1
  23. package/dist/cjs/types/Interface/api/payment/ReadPayment.js.map +1 -1
  24. package/dist/cjs/types/Interface/models/IEInvoicing.d.ts +18 -0
  25. package/dist/cjs/types/Interface/models/IEInvoicing.d.ts.map +1 -0
  26. package/dist/cjs/types/Interface/models/IEInvoicing.js +7 -0
  27. package/dist/cjs/types/Interface/models/IEInvoicing.js.map +1 -0
  28. package/dist/cjs/types/Interface/models/IEInvoicingStatus.d.ts +17 -0
  29. package/dist/cjs/types/Interface/models/IEInvoicingStatus.d.ts.map +1 -0
  30. package/dist/cjs/types/Interface/models/IEInvoicingStatus.js +7 -0
  31. package/dist/cjs/types/Interface/models/IEInvoicingStatus.js.map +1 -0
  32. package/dist/mjs/api/resources/Payment.d.ts +13 -1
  33. package/dist/mjs/api/resources/Payment.d.ts.map +1 -1
  34. package/dist/mjs/api/resources/Payment.js +21 -0
  35. package/dist/mjs/api/resources/Payment.js.map +1 -1
  36. package/dist/mjs/types/Enum/EInvoicingDirection.d.ts +5 -0
  37. package/dist/mjs/types/Enum/EInvoicingDirection.d.ts.map +1 -0
  38. package/dist/mjs/types/Enum/EInvoicingDirection.js +6 -0
  39. package/dist/mjs/types/Enum/EInvoicingDirection.js.map +1 -0
  40. package/dist/mjs/types/Enum/EInvoicingReasonType.d.ts +44 -0
  41. package/dist/mjs/types/Enum/EInvoicingReasonType.d.ts.map +1 -0
  42. package/dist/mjs/types/Enum/EInvoicingReasonType.js +143 -0
  43. package/dist/mjs/types/Enum/EInvoicingReasonType.js.map +1 -0
  44. package/dist/mjs/types/Enum/EInvoicingStatusCode.d.ts +16 -0
  45. package/dist/mjs/types/Enum/EInvoicingStatusCode.d.ts.map +1 -0
  46. package/dist/mjs/types/Enum/EInvoicingStatusCode.js +20 -0
  47. package/dist/mjs/types/Enum/EInvoicingStatusCode.js.map +1 -0
  48. package/dist/mjs/types/Interface/api/payment/Query.d.ts +8 -0
  49. package/dist/mjs/types/Interface/api/payment/Query.d.ts.map +1 -1
  50. package/dist/mjs/types/Interface/api/payment/Query.js +47 -2
  51. package/dist/mjs/types/Interface/api/payment/Query.js.map +1 -1
  52. package/dist/mjs/types/Interface/api/payment/ReadPayment.d.ts +13 -0
  53. package/dist/mjs/types/Interface/api/payment/ReadPayment.d.ts.map +1 -1
  54. package/dist/mjs/types/Interface/api/payment/ReadPayment.js.map +1 -1
  55. package/dist/mjs/types/Interface/models/IEInvoicing.d.ts +18 -0
  56. package/dist/mjs/types/Interface/models/IEInvoicing.d.ts.map +1 -0
  57. package/dist/mjs/types/Interface/models/IEInvoicing.js +13 -0
  58. package/dist/mjs/types/Interface/models/IEInvoicing.js.map +1 -0
  59. package/dist/mjs/types/Interface/models/IEInvoicingStatus.d.ts +17 -0
  60. package/dist/mjs/types/Interface/models/IEInvoicingStatus.d.ts.map +1 -0
  61. package/dist/mjs/types/Interface/models/IEInvoicingStatus.js +13 -0
  62. package/dist/mjs/types/Interface/models/IEInvoicingStatus.js.map +1 -0
  63. package/package.json +1 -1
  64. package/ts/api/resources/Payment.ts +27 -0
  65. package/ts/types/Enum/EInvoicingDirection.ts +4 -0
  66. package/ts/types/Enum/EInvoicingReasonType.ts +156 -0
  67. package/ts/types/Enum/EInvoicingStatusCode.ts +18 -0
  68. package/ts/types/Interface/api/payment/Query.ts +37 -2
  69. package/ts/types/Interface/api/payment/ReadPayment.ts +16 -0
  70. package/ts/types/Interface/models/IEInvoicing.ts +21 -0
  71. package/ts/types/Interface/models/IEInvoicingStatus.ts +18 -0
@@ -1 +1 @@
1
- {"version":3,"file":"Query.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/payment/Query.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAE3E,MAAM,OAAO,YAAY;IAGvB,SAAS,CAAO;IAIhB,OAAO,CAAO;CACf;AALC;IAFC,WAAW,EAAE;IACb,MAAM,EAAE;8BACE,IAAI;+CAAC;AAIhB;IAFC,WAAW,EAAE;IACb,MAAM,EAAE;8BACA,IAAI;6CAAC;AAGhB,MAAM,OAAO,aAAa;IACxB;;OAEG;IAIH,SAAS,CAAU;IAKnB,aAAa,CAAU;IAKvB,MAAM,CAAU;IAKhB,UAAU,CAAU;IAKpB,YAAY,CAAU;IAMtB,OAAO,CAAW;IAQlB,OAAO,CAAY;IAOnB,UAAU,CAAY;CACvB;AA1CC;IAHC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,QAAQ,EAAE;;gDACQ;AAKnB;IAHC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,QAAQ,EAAE;;oDACY;AAKvB;IAHC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,KAAK,EAAE;;6CACQ;AAKhB;IAHC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,KAAK,EAAE;;iDACY;AAKpB;IAHC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,KAAK,EAAE;;mDACc;AAMtB;IAJC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,SAAS,EAAE;IACX,SAAS,EAAE;;8CACM;AAQlB;IANC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,QAAQ,CAAC;QACR,IAAI,EAAE,IAAI;KACX,CAAC;IACD,IAAI,CAAC,CAAC,oBAAoB,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;8CAC1B;AAOnB;IALC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,QAAQ,CAAC;QACR,IAAI,EAAE,IAAI;KACX,CAAC;;iDACoB;AAGxB,MAAM,OAAO,kBAAkB;IAK7B,SAAS,CAAU;CACpB;AADC;IAJC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,SAAS,EAAE;IACX,SAAS,EAAE;;qDACO","sourcesContent":["import { IsBoolean, IsDate, IsIn, IsInt, IsOptional, IsString } from 'class-validator';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\n\nexport class QueryPayment {\n @ApiProperty()\n @IsDate()\n startDate: Date;\n\n @ApiProperty()\n @IsDate()\n endDate: Date;\n}\n\nexport class QueryPayments {\n /**\n * Reference used in paymentDirectDebitHistory\n */\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n reference?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n internComment?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsInt()\n idFile?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsInt()\n idExercice?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsInt()\n idPrestation?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n isAsset?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString({\n each: true,\n })\n @IsIn(['directDebitHistory'], { each: true })\n include?: string[];\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString({\n each: true,\n })\n attributes?: string[];\n}\n\nexport class QuerySocietyUnpaid {\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n withStats: boolean;\n}\n"]}
1
+ {"version":3,"file":"Query.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/payment/Query.ts"],"names":[],"mappings":"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","sourcesContent":["import { IsBoolean, IsDate, IsIn, IsInt, IsOptional, IsString, Min } from 'class-validator';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils/decorators';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\nimport { EInvoicingStatusCode } from '../../../Enum/EInvoicingStatusCode';\nimport { Type } from 'class-transformer';\n\nexport class QueryPayment {\n @ApiProperty()\n @IsDate()\n startDate: Date;\n\n @ApiProperty()\n @IsDate()\n endDate: Date;\n}\n\nexport class QueryPayments {\n /**\n * Reference used in paymentDirectDebitHistory\n */\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n reference?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n internComment?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsInt()\n idFile?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsInt()\n idExercice?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsInt()\n idPrestation?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n isAsset?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString({\n each: true,\n })\n @IsIn(['directDebitHistory'], { each: true })\n include?: string[];\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString({\n each: true,\n })\n attributes?: string[];\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n hasInternalInvoicing?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n hasEInvoicing?: boolean;\n\n @ApiPropertyOptional({ enum: EInvoicingStatusCode })\n @IsOptional()\n @IsInt()\n eInvoicingStatus?: EInvoicingStatusCode;\n}\n\nexport class QuerySocietyUnpaid {\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n withStats: boolean;\n}\n\nexport class QueryPaginatedPayments extends QueryPayments {\n @ApiPropertyOptional({ default: 1, minimum: 1 })\n @IsOptional()\n @Type(() => Number)\n @IsInt()\n @Min(1)\n page?: number;\n\n @ApiPropertyOptional({ default: 20, minimum: 1 })\n @IsOptional()\n @Type(() => Number)\n @IsInt()\n @Min(1)\n limit?: number;\n}"]}
@@ -1,3 +1,4 @@
1
+ import { EInvoicingStatusCode } from "../../../Enum/EInvoicingStatusCode";
1
2
  export interface ReadNotifyCustomer {
2
3
  mailSentForSocieties: number;
3
4
  smsSentForSocieties: number;
@@ -39,4 +40,16 @@ export interface ReadPaymentInvoice {
39
40
  date: string;
40
41
  name: string;
41
42
  }
43
+ export interface ReadPaginatedPayment {
44
+ id: number;
45
+ amount: number;
46
+ datePayment: Date;
47
+ refInternalInvoicing: number | null;
48
+ idEInvoicing: number | null;
49
+ eInvoicingStatus: EInvoicingStatusCode | null;
50
+ idSociety: number | null;
51
+ society: {
52
+ name: string | null;
53
+ } | null;
54
+ }
42
55
  //# sourceMappingURL=ReadPayment.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ReadPayment.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/payment/ReadPayment.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,yBAAyB;IACxC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,iBAAiB,EAAE,CAAC;IAClC,cAAc,EAAE,iBAAiB,EAAE,CAAC;CACrC;AAED,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd"}
1
+ {"version":3,"file":"ReadPayment.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/payment/ReadPayment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAE1E,MAAM,WAAW,kBAAkB;IACjC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,yBAAyB;IACxC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,iBAAiB,EAAE,CAAC;IAClC,cAAc,EAAE,iBAAiB,EAAE,CAAC;CACrC;AAED,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAGD,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,IAAI,CAAC;IAClB,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,gBAAgB,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAC9C,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;KACrB,GAAG,IAAI,CAAC;CACV"}
@@ -1 +1 @@
1
- {"version":3,"file":"ReadPayment.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/payment/ReadPayment.ts"],"names":[],"mappings":"","sourcesContent":["export interface ReadNotifyCustomer {\n mailSentForSocieties: number;\n smsSentForSocieties: number;\n errorForSocieties: number[];\n}\n\nexport interface ReadNotifyCustomerInvoice {\n mailSentForSocieties: number;\n errorForSocieties: number[];\n}\n\nexport interface ReadBrandPayments {\n idTypeBrand: number;\n name: string;\n amountTTC: number;\n amountHT: number;\n}\n\nexport interface ReadPaid {\n total: number;\n paid: number;\n assetPayment: ReadBrandPayments[];\n invoicePayment: ReadBrandPayments[];\n}\n\nexport interface ReadStatPrestation {\n juridicAmountTTC: number;\n juridicAmountHT: number;\n socialAmountTTC: number;\n socialAmountHT: number;\n accountantAmountTTC: number;\n accountantAmountHT: number;\n}\n\nexport interface ReadStatsSocietyUnpaid {\n dateStart: string;\n dateEnd: string;\n title: string;\n nbOfSociety: number;\n amount: number;\n}\n\nexport interface ReadPaymentInvoice {\n url: string;\n date: string;\n name: string;\n}\n"]}
1
+ {"version":3,"file":"ReadPayment.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/payment/ReadPayment.ts"],"names":[],"mappings":"","sourcesContent":["import { EInvoicingStatusCode } from \"../../../Enum/EInvoicingStatusCode\";\n\nexport interface ReadNotifyCustomer {\n mailSentForSocieties: number;\n smsSentForSocieties: number;\n errorForSocieties: number[];\n}\n\nexport interface ReadNotifyCustomerInvoice {\n mailSentForSocieties: number;\n errorForSocieties: number[];\n}\n\nexport interface ReadBrandPayments {\n idTypeBrand: number;\n name: string;\n amountTTC: number;\n amountHT: number;\n}\n\nexport interface ReadPaid {\n total: number;\n paid: number;\n assetPayment: ReadBrandPayments[];\n invoicePayment: ReadBrandPayments[];\n}\n\nexport interface ReadStatPrestation {\n juridicAmountTTC: number;\n juridicAmountHT: number;\n socialAmountTTC: number;\n socialAmountHT: number;\n accountantAmountTTC: number;\n accountantAmountHT: number;\n}\n\nexport interface ReadStatsSocietyUnpaid {\n dateStart: string;\n dateEnd: string;\n title: string;\n nbOfSociety: number;\n amount: number;\n}\n\nexport interface ReadPaymentInvoice {\n url: string;\n date: string;\n name: string;\n}\n\n\nexport interface ReadPaginatedPayment {\n id: number;\n amount: number;\n datePayment: Date;\n refInternalInvoicing: number | null;\n idEInvoicing: number | null;\n eInvoicingStatus: EInvoicingStatusCode | null;\n idSociety: number | null;\n society: {\n name: string | null;\n } | null;\n}\n"]}
@@ -0,0 +1,18 @@
1
+ import { IFile } from './IFile';
2
+ import { EInvoicingDirection } from '../../Enum/EInvoicingDirection';
3
+ import { IEInvoicingStatus } from './IEInvoicingStatus';
4
+ import { IAccountingFile } from './IAccountingFile';
5
+ import { IAccountingTransaction } from './IAccountingTransaction';
6
+ export declare class IEInvoicing {
7
+ id?: number;
8
+ direction: EInvoicingDirection;
9
+ externalId: string;
10
+ idXmlFile: number;
11
+ createdAt?: Date | null;
12
+ updatedAt?: Date | null;
13
+ xmlFile?: IFile;
14
+ eInvoicingStatus?: IEInvoicingStatus[];
15
+ AccountingFile?: IAccountingFile;
16
+ AccountingTransaction?: IAccountingTransaction;
17
+ }
18
+ //# sourceMappingURL=IEInvoicing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IEInvoicing.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IEInvoicing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,qBAAa,WAAW;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,SAAS,EAAE,mBAAmB,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAElB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAExB,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,gBAAgB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACvC,cAAc,CAAC,EAAE,eAAe,CAAC;IACjC,qBAAqB,CAAC,EAAE,sBAAsB,CAAC;CAChD"}
@@ -0,0 +1,13 @@
1
+ export class IEInvoicing {
2
+ id;
3
+ direction;
4
+ externalId;
5
+ idXmlFile;
6
+ createdAt;
7
+ updatedAt;
8
+ xmlFile;
9
+ eInvoicingStatus;
10
+ AccountingFile;
11
+ AccountingTransaction;
12
+ }
13
+ //# sourceMappingURL=IEInvoicing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IEInvoicing.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IEInvoicing.ts"],"names":[],"mappings":"AAMA,MAAM,OAAO,WAAW;IACtB,EAAE,CAAU;IAEZ,SAAS,CAAsB;IAC/B,UAAU,CAAS;IACnB,SAAS,CAAS;IAElB,SAAS,CAAe;IACxB,SAAS,CAAe;IAExB,OAAO,CAAS;IAChB,gBAAgB,CAAuB;IACvC,cAAc,CAAmB;IACjC,qBAAqB,CAA0B;CAChD","sourcesContent":["import { IFile } from './IFile';\nimport { EInvoicingDirection } from '../../Enum/EInvoicingDirection';\nimport { IEInvoicingStatus } from './IEInvoicingStatus';\nimport { IAccountingFile } from './IAccountingFile';\nimport { IAccountingTransaction } from './IAccountingTransaction';\n\nexport class IEInvoicing {\n id?: number;\n\n direction: EInvoicingDirection;\n externalId: string;\n idXmlFile: number;\n\n createdAt?: Date | null;\n updatedAt?: Date | null;\n\n xmlFile?: IFile;\n eInvoicingStatus?: IEInvoicingStatus[];\n AccountingFile?: IAccountingFile;\n AccountingTransaction?: IAccountingTransaction;\n}\n"]}
@@ -0,0 +1,17 @@
1
+ import { IUser } from './IUser';
2
+ import { EInvoicingStatusCode } from '../../Enum/EInvoicingStatusCode';
3
+ import { IEInvoicing } from './IEInvoicing';
4
+ import { EInvoicingReasonType } from '../../Enum/EInvoicingReasonType';
5
+ export declare class IEInvoicingStatus {
6
+ id?: number;
7
+ status: EInvoicingStatusCode;
8
+ reasonType: EInvoicingReasonType | null;
9
+ message: string | null;
10
+ idUser: number;
11
+ idEInvoicing: number;
12
+ createdAt?: Date | null;
13
+ updatedAt?: Date | null;
14
+ user?: IUser;
15
+ eInvoicing?: IEInvoicing;
16
+ }
17
+ //# sourceMappingURL=IEInvoicingStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IEInvoicingStatus.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IEInvoicingStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAEvE,qBAAa,iBAAiB;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,oBAAoB,CAAC;IAC7B,UAAU,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACxC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAExB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,UAAU,CAAC,EAAE,WAAW,CAAC;CAC1B"}
@@ -0,0 +1,13 @@
1
+ export class IEInvoicingStatus {
2
+ id;
3
+ status;
4
+ reasonType;
5
+ message;
6
+ idUser;
7
+ idEInvoicing;
8
+ createdAt;
9
+ updatedAt;
10
+ user;
11
+ eInvoicing;
12
+ }
13
+ //# sourceMappingURL=IEInvoicingStatus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IEInvoicingStatus.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IEInvoicingStatus.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,iBAAiB;IAC5B,EAAE,CAAU;IACZ,MAAM,CAAuB;IAC7B,UAAU,CAA8B;IACxC,OAAO,CAAgB;IACvB,MAAM,CAAS;IACf,YAAY,CAAS;IACrB,SAAS,CAAe;IACxB,SAAS,CAAe;IAExB,IAAI,CAAS;IACb,UAAU,CAAe;CAC1B","sourcesContent":["import { IUser } from './IUser';\nimport { EInvoicingStatusCode } from '../../Enum/EInvoicingStatusCode';\nimport { IEInvoicing } from './IEInvoicing';\nimport { EInvoicingReasonType } from '../../Enum/EInvoicingReasonType';\n\nexport class IEInvoicingStatus {\n id?: number;\n status: EInvoicingStatusCode;\n reasonType: EInvoicingReasonType | null;\n message: string | null;\n idUser: number;\n idEInvoicing: number;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n\n user?: IUser;\n eInvoicing?: IEInvoicing;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.3.255",
3
+ "version": "1.3.256",
4
4
  "description": "Silex Core perform HTTP Request and object binding. Silex core helps developers to retrieve and return formatted object",
5
5
  "homepage": "https://gitlab.compta-clementine.fr/dev/silex-api",
6
6
  "main": "dist/cjs/index.js",
@@ -25,6 +25,8 @@ import {
25
25
  QueryStripeSubscriptionId,
26
26
  UpdatePaymentMethod,
27
27
  CreatePaymentsRebilling,
28
+ ReadPaginatedPayment,
29
+ QueryPaginatedPayments
28
30
  } from '../../types';
29
31
  import { IPaymentRecovery } from '../../types/Interface/models/IPaymentRecovery';
30
32
  import Stripe from 'stripe';
@@ -162,6 +164,31 @@ export class Payment extends Resource {
162
164
  return this.axios.$get('/payments', { params: query, signal });
163
165
  }
164
166
 
167
+ /**
168
+ * Returns paginated payments eligible for internal electronic invoicing.
169
+ *
170
+ * This helper always enforces:
171
+ * - hasEInvoicing: true
172
+ * - hasInternalInvoicing: true
173
+ *
174
+ * @param query Additional payments filters and pagination options.
175
+ * @param signal Abort signal to cancel the HTTP request.
176
+ * @returns A paginated list of enriched payments for e-invoicing workflows.
177
+ */
178
+ getPaginatedEInvoices(
179
+ query: QueryPaginatedPayments,
180
+ signal: AbortSignal,
181
+ ): Promise<BasePaginate<ReadPaginatedPayment>> {
182
+ return this.axios.$get('/payments/paginated', {
183
+ params: {
184
+ ...query,
185
+ hasEInvoicing: true,
186
+ hasInternalInvoicing: true,
187
+ },
188
+ signal,
189
+ });
190
+ }
191
+
165
192
  getLastPayment(idSociety: number): Promise<IPayment> {
166
193
  return this.axios.$get(`/payment/${idSociety}/last`);
167
194
  }
@@ -0,0 +1,4 @@
1
+ export enum EInvoicingDirection {
2
+ RECEPTION = 1,
3
+ EMISSION = 2,
4
+ }
@@ -0,0 +1,156 @@
1
+ import { EInvoicingDirection } from './EInvoicingDirection';
2
+
3
+ export enum EInvoicingReasonType {
4
+ INCORRECT_AMOUNT = 1,
5
+ CALCULATION_ERROR = 2,
6
+ E_ADDRESS_ERROR = 3,
7
+ SEMANTIC_ERROR = 4,
8
+ CONSISTENCY_CHECK_ERROR = 5,
9
+ E_ADDRESS_CONTROL_ERROR = 6,
10
+ B2G_CONTROL_ERROR = 7,
11
+ ATTACHMENT_REFERENCE_ERROR = 8,
12
+ ATTACHMENT_ASSOCIATION_ERROR = 9,
13
+ RECIPIENT_ERROR = 10,
14
+ ROUTING_ERROR = 11,
15
+ UNITY_ERROR = 12,
16
+ DUPLICATE_INVOICE = 13,
17
+ }
18
+
19
+ export enum EInvoicingReasonTypeCode {
20
+ INCORRECT_AMOUNT = 'MONTANTTOTAL_ERR',
21
+ CALCULATION_ERROR = 'CALCUL_ERR',
22
+ E_ADDRESS_ERROR = 'ADR_ERR',
23
+ SEMANTIC_ERROR = 'REJ_SEMAN',
24
+ CONSISTENCY_CHECK_ERROR = 'REJ_COH',
25
+ E_ADDRESS_CONTROL_ERROR = 'REJ_ADR',
26
+ B2G_CONTROL_ERROR = 'REJ_CONT_B2G',
27
+ ATTACHMENT_REFERENCE_ERROR = 'REJ_REF_PJ',
28
+ ATTACHMENT_ASSOCIATION_ERROR = 'REJ_ASS_PJ',
29
+ RECIPIENT_ERROR = 'DEST_INC',
30
+ ROUTING_ERROR = 'ROUTAGE_ERR',
31
+ UNITY_ERROR = 'REJ_UNI',
32
+ DUPLICATE_INVOICE = 'DOUBLON',
33
+ }
34
+
35
+ export type EInvoicingReason = {
36
+ id: EInvoicingReasonType;
37
+ reasonCode: EInvoicingReasonTypeCode;
38
+ label: string;
39
+ description: string;
40
+ type: EInvoicingDirection[];
41
+ isVisibleByClient: boolean;
42
+ };
43
+
44
+ export type EInvocingReasonListType = {
45
+ [key: string]: EInvoicingReason;
46
+ };
47
+
48
+ export const einvoicingReasonList: EInvocingReasonListType = {
49
+ INCORRECT_AMOUNT: {
50
+ id: EInvoicingReasonType.INCORRECT_AMOUNT,
51
+ reasonCode: EInvoicingReasonTypeCode.INCORRECT_AMOUNT,
52
+ label: 'Montant total erroné',
53
+ description: 'Un des montants totaux de la facutre est erronée, par exemple Net à payer',
54
+ type: [EInvoicingDirection.EMISSION, EInvoicingDirection.RECEPTION],
55
+ isVisibleByClient: true,
56
+ },
57
+ CALCULATION_ERROR: {
58
+ id: EInvoicingReasonType.CALCULATION_ERROR,
59
+ reasonCode: EInvoicingReasonTypeCode.CALCULATION_ERROR,
60
+ label: 'Erreur de calcul de la facture',
61
+ description: 'Soit détecté au schematron, soit après (pour les lignes, ou arrondi non accepté)',
62
+ type: [EInvoicingDirection.EMISSION, EInvoicingDirection.RECEPTION],
63
+ isVisibleByClient: true,
64
+ },
65
+ E_ADDRESS_ERROR: {
66
+ id: EInvoicingReasonType.E_ADDRESS_ERROR,
67
+ reasonCode: EInvoicingReasonTypeCode.E_ADDRESS_ERROR,
68
+ label: 'Adresse de facturation électronique erronée',
69
+ description: "L'adresse de facturation électronique du destinataire(BT-49 ou BT-34) est absente ou erronée",
70
+ type: [EInvoicingDirection.EMISSION],
71
+ isVisibleByClient: false,
72
+ },
73
+ SEMANTIC_ERROR: {
74
+ id: EInvoicingReasonType.SEMANTIC_ERROR,
75
+ reasonCode: EInvoicingReasonTypeCode.SEMANTIC_ERROR,
76
+ label: 'Rejet pour erreur sémantique',
77
+ description: 'Analyse du format sémantique',
78
+ type: [EInvoicingDirection.EMISSION, EInvoicingDirection.RECEPTION],
79
+ isVisibleByClient: true,
80
+ },
81
+ CONSISTENCY_CHECK_ERROR: {
82
+ id: EInvoicingReasonType.CONSISTENCY_CHECK_ERROR,
83
+ reasonCode: EInvoicingReasonTypeCode.CONSISTENCY_CHECK_ERROR,
84
+ label: 'Rejet sur contrôle Cohérence de données',
85
+ description: 'Contrôle de cohérence des données (les balises et les référentiels)',
86
+ type: [EInvoicingDirection.EMISSION, EInvoicingDirection.RECEPTION],
87
+ isVisibleByClient: false,
88
+ },
89
+ E_ADDRESS_CONTROL_ERROR: {
90
+ id: EInvoicingReasonType.E_ADDRESS_CONTROL_ERROR,
91
+ reasonCode: EInvoicingReasonTypeCode.E_ADDRESS_CONTROL_ERROR,
92
+ label: "Rejet sur Contrôle d'adressage",
93
+ description: "Contrôle d'adressage",
94
+ type: [EInvoicingDirection.EMISSION],
95
+ isVisibleByClient: false,
96
+ },
97
+ B2G_CONTROL_ERROR: {
98
+ id: EInvoicingReasonType.B2G_CONTROL_ERROR,
99
+ reasonCode: EInvoicingReasonTypeCode.B2G_CONTROL_ERROR,
100
+ label: 'Rejet sur Contrôle métier B2G',
101
+ description: "Contrôle B2G (vérification du n° d'engagement)",
102
+ type: [EInvoicingDirection.EMISSION],
103
+ isVisibleByClient: false,
104
+ },
105
+ ATTACHMENT_REFERENCE_ERROR: {
106
+ id: EInvoicingReasonType.ATTACHMENT_REFERENCE_ERROR,
107
+ reasonCode: EInvoicingReasonTypeCode.ATTACHMENT_REFERENCE_ERROR,
108
+ label: 'Rejet sur Référence de la PJ',
109
+ description: 'Référence de la PJ',
110
+ type: [EInvoicingDirection.EMISSION],
111
+ isVisibleByClient: false,
112
+ },
113
+ ATTACHMENT_ASSOCIATION_ERROR: {
114
+ id: EInvoicingReasonType.ATTACHMENT_ASSOCIATION_ERROR,
115
+ reasonCode: EInvoicingReasonTypeCode.ATTACHMENT_ASSOCIATION_ERROR,
116
+ label: "Rejet sur erreur d'association de la PJ",
117
+ description: "Erreur d'associartion de la PJ",
118
+ type: [EInvoicingDirection.EMISSION],
119
+ isVisibleByClient: false,
120
+ },
121
+ RECIPIENT_ERROR: {
122
+ id: EInvoicingReasonType.RECIPIENT_ERROR,
123
+ reasonCode: EInvoicingReasonTypeCode.RECIPIENT_ERROR,
124
+ label: 'Destinataire inconnu',
125
+ description: "À l'émission, le destinataire est inconnu. Il n'existe pas dans l'annuaire",
126
+ type: [EInvoicingDirection.EMISSION],
127
+ isVisibleByClient: false,
128
+ },
129
+ ROUTING_ERROR: {
130
+ id: EInvoicingReasonType.ROUTING_ERROR,
131
+ reasonCode: EInvoicingReasonTypeCode.ROUTING_ERROR,
132
+ label: 'Erreur de routage',
133
+ description: `Ce motif doit être utilisé dans le cas où les informations servant au routage de la facture sont devenues obsolètes. Ceci peut se produire par exmple:
134
+ - en case de décalage de mise à jour de l'annuaire
135
+ - une erreur de la PDP émettrice
136
+ Post correction de l'annuaire par le destinataire de la facture, la facture peut être transmise à nouveau (sans aucun changement sur les données de la facture)`,
137
+ type: [EInvoicingDirection.EMISSION],
138
+ isVisibleByClient: false,
139
+ },
140
+ UNITY_ERROR: {
141
+ id: EInvoicingReasonType.UNITY_ERROR,
142
+ reasonCode: EInvoicingReasonTypeCode.UNITY_ERROR,
143
+ label: 'Rejet sur contrôle unicité',
144
+ description: "Contôle d'unicité",
145
+ type: [EInvoicingDirection.EMISSION, EInvoicingDirection.RECEPTION],
146
+ isVisibleByClient: true,
147
+ },
148
+ DUPLICATE_INVOICE: {
149
+ id: EInvoicingReasonType.DUPLICATE_INVOICE,
150
+ reasonCode: EInvoicingReasonTypeCode.DUPLICATE_INVOICE,
151
+ label: 'Facture en doublon',
152
+ description: 'Facture en doublon (même numéro, même fournisseur et même année de la date de la facture)',
153
+ type: [EInvoicingDirection.EMISSION, EInvoicingDirection.RECEPTION],
154
+ isVisibleByClient: true,
155
+ },
156
+ };
@@ -0,0 +1,18 @@
1
+ // ENUM peuplé avec les états de base mais il faudra le peupler avec les codes
2
+ // de statuts de eInvoicing lors de la mise en place du cycle de vie
3
+ // des factures électroniques
4
+ export enum EInvoicingStatusCode {
5
+ RECEIVED = 1,
6
+ PENDING_VALIDATION = 2,
7
+ VALIDATED = 3,
8
+ REJECTED = 4,
9
+ PENDING_TRANSMISSION = 5,
10
+ TRANSMITTED = 6,
11
+ DELIVERED = 7,
12
+ ACCEPTED = 8,
13
+ PARTIALLY_PAID = 9,
14
+ PAID = 10,
15
+ CANCELLED = 11,
16
+ ERROR = 12,
17
+ REFUSED = 13,
18
+ }
@@ -1,6 +1,8 @@
1
- import { IsBoolean, IsDate, IsIn, IsInt, IsOptional, IsString } from 'class-validator';
2
- import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
1
+ import { IsBoolean, IsDate, IsIn, IsInt, IsOptional, IsString, Min } from 'class-validator';
2
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils/decorators';
3
3
  import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
4
+ import { EInvoicingStatusCode } from '../../../Enum/EInvoicingStatusCode';
5
+ import { Type } from 'class-transformer';
4
6
 
5
7
  export class QueryPayment {
6
8
  @ApiProperty()
@@ -61,6 +63,23 @@ export class QueryPayments {
61
63
  each: true,
62
64
  })
63
65
  attributes?: string[];
66
+
67
+ @ApiPropertyOptional()
68
+ @IsOptional()
69
+ @IsBoolean()
70
+ @ToBoolean()
71
+ hasInternalInvoicing?: boolean;
72
+
73
+ @ApiPropertyOptional()
74
+ @IsOptional()
75
+ @IsBoolean()
76
+ @ToBoolean()
77
+ hasEInvoicing?: boolean;
78
+
79
+ @ApiPropertyOptional({ enum: EInvoicingStatusCode })
80
+ @IsOptional()
81
+ @IsInt()
82
+ eInvoicingStatus?: EInvoicingStatusCode;
64
83
  }
65
84
 
66
85
  export class QuerySocietyUnpaid {
@@ -70,3 +89,19 @@ export class QuerySocietyUnpaid {
70
89
  @ToBoolean()
71
90
  withStats: boolean;
72
91
  }
92
+
93
+ export class QueryPaginatedPayments extends QueryPayments {
94
+ @ApiPropertyOptional({ default: 1, minimum: 1 })
95
+ @IsOptional()
96
+ @Type(() => Number)
97
+ @IsInt()
98
+ @Min(1)
99
+ page?: number;
100
+
101
+ @ApiPropertyOptional({ default: 20, minimum: 1 })
102
+ @IsOptional()
103
+ @Type(() => Number)
104
+ @IsInt()
105
+ @Min(1)
106
+ limit?: number;
107
+ }
@@ -1,3 +1,5 @@
1
+ import { EInvoicingStatusCode } from "../../../Enum/EInvoicingStatusCode";
2
+
1
3
  export interface ReadNotifyCustomer {
2
4
  mailSentForSocieties: number;
3
5
  smsSentForSocieties: number;
@@ -45,3 +47,17 @@ export interface ReadPaymentInvoice {
45
47
  date: string;
46
48
  name: string;
47
49
  }
50
+
51
+
52
+ export interface ReadPaginatedPayment {
53
+ id: number;
54
+ amount: number;
55
+ datePayment: Date;
56
+ refInternalInvoicing: number | null;
57
+ idEInvoicing: number | null;
58
+ eInvoicingStatus: EInvoicingStatusCode | null;
59
+ idSociety: number | null;
60
+ society: {
61
+ name: string | null;
62
+ } | null;
63
+ }
@@ -0,0 +1,21 @@
1
+ import { IFile } from './IFile';
2
+ import { EInvoicingDirection } from '../../Enum/EInvoicingDirection';
3
+ import { IEInvoicingStatus } from './IEInvoicingStatus';
4
+ import { IAccountingFile } from './IAccountingFile';
5
+ import { IAccountingTransaction } from './IAccountingTransaction';
6
+
7
+ export class IEInvoicing {
8
+ id?: number;
9
+
10
+ direction: EInvoicingDirection;
11
+ externalId: string;
12
+ idXmlFile: number;
13
+
14
+ createdAt?: Date | null;
15
+ updatedAt?: Date | null;
16
+
17
+ xmlFile?: IFile;
18
+ eInvoicingStatus?: IEInvoicingStatus[];
19
+ AccountingFile?: IAccountingFile;
20
+ AccountingTransaction?: IAccountingTransaction;
21
+ }
@@ -0,0 +1,18 @@
1
+ import { IUser } from './IUser';
2
+ import { EInvoicingStatusCode } from '../../Enum/EInvoicingStatusCode';
3
+ import { IEInvoicing } from './IEInvoicing';
4
+ import { EInvoicingReasonType } from '../../Enum/EInvoicingReasonType';
5
+
6
+ export class IEInvoicingStatus {
7
+ id?: number;
8
+ status: EInvoicingStatusCode;
9
+ reasonType: EInvoicingReasonType | null;
10
+ message: string | null;
11
+ idUser: number;
12
+ idEInvoicing: number;
13
+ createdAt?: Date | null;
14
+ updatedAt?: Date | null;
15
+
16
+ user?: IUser;
17
+ eInvoicing?: IEInvoicing;
18
+ }