@silexpert/core 0.4.5 → 0.4.6

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 (86) hide show
  1. package/es/api/resources/PaymentExpectationCustomer.js.map +1 -1
  2. package/es/api/resources/Society.d.ts +8 -0
  3. package/es/api/resources/Society.d.ts.map +1 -0
  4. package/es/api/resources/Society.js +13 -0
  5. package/es/api/resources/Society.js.map +1 -0
  6. package/es/api/resources.d.ts +2 -0
  7. package/es/api/resources.d.ts.map +1 -1
  8. package/es/api/resources.js +2 -0
  9. package/es/api/resources.js.map +1 -1
  10. package/es/types/Enum/Vat.d.ts +18 -0
  11. package/es/types/Enum/Vat.d.ts.map +1 -1
  12. package/es/types/Enum/Vat.js +27 -0
  13. package/es/types/Enum/Vat.js.map +1 -1
  14. package/es/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.d.ts +1 -1
  15. package/es/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.d.ts.map +1 -1
  16. package/es/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js +4 -1
  17. package/es/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js.map +1 -1
  18. package/es/types/Interface/api/accountingTransaction/QueryTransaction.d.ts.map +1 -1
  19. package/es/types/Interface/api/accountingTransaction/QueryTransaction.js +2 -1
  20. package/es/types/Interface/api/accountingTransaction/QueryTransaction.js.map +1 -1
  21. package/es/types/Interface/api/mailInvoice/CreateInvoiceMail.d.ts +4 -0
  22. package/es/types/Interface/api/mailInvoice/CreateInvoiceMail.d.ts.map +1 -0
  23. package/es/types/Interface/api/mailInvoice/CreateInvoiceMail.js +17 -0
  24. package/es/types/Interface/api/mailInvoice/CreateInvoiceMail.js.map +1 -0
  25. package/es/types/Interface/api/mailInvoice/UpdateInvoiceMail.d.ts +4 -0
  26. package/es/types/Interface/api/mailInvoice/UpdateInvoiceMail.d.ts.map +1 -0
  27. package/es/types/Interface/api/mailInvoice/UpdateInvoiceMail.js +17 -0
  28. package/es/types/Interface/api/mailInvoice/UpdateInvoiceMail.js.map +1 -0
  29. package/es/types/Interface/models/IApiError.d.ts +7 -3
  30. package/es/types/Interface/models/IApiError.d.ts.map +1 -1
  31. package/es/types/Interface/models/IApiError.js +11 -6
  32. package/es/types/Interface/models/IApiError.js.map +1 -1
  33. package/es/types/Interface/models/ISociety.d.ts +0 -2
  34. package/es/types/Interface/models/ISociety.d.ts.map +1 -1
  35. package/es/types/Interface/models/ISociety.js.map +1 -1
  36. package/es/types/index.d.ts +2 -1
  37. package/es/types/index.d.ts.map +1 -1
  38. package/es/types/index.js +2 -1
  39. package/es/types/index.js.map +1 -1
  40. package/es/utils/decorators.d.ts +2 -0
  41. package/es/utils/decorators.d.ts.map +1 -1
  42. package/es/utils/decorators.js +11 -5
  43. package/es/utils/decorators.js.map +1 -1
  44. package/export-models.json +0 -74
  45. package/js/api/resources/PaymentExpectationCustomer.js.map +1 -1
  46. package/js/api/resources/Society.js +26 -0
  47. package/js/api/resources/Society.js.map +1 -0
  48. package/js/api/resources.js +4 -1
  49. package/js/api/resources.js.map +1 -1
  50. package/js/types/Enum/Vat.js +27 -0
  51. package/js/types/Enum/Vat.js.map +1 -1
  52. package/js/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js +6 -2
  53. package/js/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js.map +1 -1
  54. package/js/types/Interface/api/accountingTransaction/QueryTransaction.js +1 -1
  55. package/js/types/Interface/api/accountingTransaction/QueryTransaction.js.map +1 -1
  56. package/js/types/Interface/api/mailInvoice/CreateInvoiceMail.js +27 -0
  57. package/js/types/Interface/api/mailInvoice/CreateInvoiceMail.js.map +1 -0
  58. package/js/types/Interface/api/mailInvoice/UpdateInvoiceMail.js +27 -0
  59. package/js/types/Interface/api/mailInvoice/UpdateInvoiceMail.js.map +1 -0
  60. package/js/types/Interface/models/IApiError.js +12 -7
  61. package/js/types/Interface/models/IApiError.js.map +1 -1
  62. package/js/types/index.js +24 -12
  63. package/js/types/index.js.map +1 -1
  64. package/js/utils/decorators.js +16 -7
  65. package/js/utils/decorators.js.map +1 -1
  66. package/package.json +16 -16
  67. package/table.json +0 -1
  68. package/ts/api/resources/PaymentExpectationCustomer.ts +1 -1
  69. package/ts/api/resources/Society.ts +20 -0
  70. package/ts/api/resources.ts +2 -0
  71. package/ts/types/Enum/Vat.ts +27 -0
  72. package/ts/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.ts +4 -3
  73. package/ts/types/Interface/api/accountingTransaction/QueryTransaction.ts +3 -2
  74. package/ts/types/Interface/api/mailInvoice/CreateInvoiceMail.ts +6 -0
  75. package/ts/types/Interface/api/mailInvoice/UpdateInvoiceMail.ts +6 -0
  76. package/ts/types/Interface/models/IApiError.ts +7 -2
  77. package/ts/types/Interface/models/ISociety.ts +0 -2
  78. package/ts/types/index.ts +2 -1
  79. package/ts/utils/decorators.ts +12 -5
  80. package/es/types/Interface/models/ISocietyProcessRegister.d.ts +0 -10
  81. package/es/types/Interface/models/ISocietyProcessRegister.d.ts.map +0 -1
  82. package/es/types/Interface/models/ISocietyProcessRegister.js +0 -2
  83. package/es/types/Interface/models/ISocietyProcessRegister.js.map +0 -1
  84. package/js/types/Interface/models/ISocietyProcessRegister.js +0 -6
  85. package/js/types/Interface/models/ISocietyProcessRegister.js.map +0 -1
  86. package/ts/types/Interface/models/ISocietyProcessRegister.ts +0 -10
@@ -1,7 +1,10 @@
1
1
  export const Vat = {
2
2
  WITHOUT_TAXE: {
3
3
  id: 1,
4
+ // TODO We should remove idTva when GET vat is remove from api v1
5
+ idTva: 1,
4
6
  value: 0,
7
+ displayOrder: 6,
5
8
  name: 'Hors-Taxe',
6
9
  collected: 212,
7
10
  deductible: 221,
@@ -9,7 +12,10 @@ export const Vat = {
9
12
  },
10
13
  TX_5_5: {
11
14
  id: 2,
15
+ // TODO We should remove idTva when GET vat is remove from api v1
16
+ idTva: 2,
12
17
  value: 5.5,
18
+ displayOrder: 4,
13
19
  name: 'TVA 5.5%',
14
20
  collected: 209,
15
21
  deductible: 4,
@@ -17,7 +23,10 @@ export const Vat = {
17
23
  },
18
24
  TX_10: {
19
25
  id: 3,
26
+ // TODO We should remove idTva when GET vat is remove from api v1
27
+ idTva: 3,
20
28
  value: 10,
29
+ displayOrder: 2,
21
30
  name: 'TVA 10%',
22
31
  collected: 210,
23
32
  deductible: 5,
@@ -25,7 +34,10 @@ export const Vat = {
25
34
  },
26
35
  TX_20: {
27
36
  id: 4,
37
+ // TODO We should remove idTva when GET vat is remove from api v1
38
+ idTva: 4,
28
39
  value: 20,
40
+ displayOrder: 1,
29
41
  name: 'TVA 20%',
30
42
  collected: 211,
31
43
  deductible: 6,
@@ -33,7 +45,10 @@ export const Vat = {
33
45
  },
34
46
  TX_2_1: {
35
47
  id: 6,
48
+ // TODO We should remove idTva when GET vat is remove from api v1
49
+ idTva: 6,
36
50
  value: 2.1,
51
+ displayOrder: 5,
37
52
  name: 'TVA 2.1%',
38
53
  collected: 222,
39
54
  deductible: 7,
@@ -41,7 +56,10 @@ export const Vat = {
41
56
  },
42
57
  TX_8_5: {
43
58
  id: 7,
59
+ // TODO We should remove idTva when GET vat is remove from api v1
60
+ idTva: 7,
44
61
  value: 8.5,
62
+ displayOrder: 3,
45
63
  name: 'TVA 8.5%',
46
64
  collected: 345,
47
65
  deductible: 8,
@@ -49,7 +67,10 @@ export const Vat = {
49
67
  },
50
68
  MARGE: {
51
69
  id: 8,
70
+ // TODO We should remove idTva when GET vat is remove from api v1
71
+ idTva: 8,
52
72
  value: 0,
73
+ displayOrder: 9,
53
74
  name: 'Sur Marge',
54
75
  collected: 211,
55
76
  deductible: 9,
@@ -57,7 +78,10 @@ export const Vat = {
57
78
  },
58
79
  INTRACOM: {
59
80
  id: 9,
81
+ // TODO We should remove idTva when GET vat is remove from api v1
82
+ idTva: 9,
60
83
  value: 20,
84
+ displayOrder: 7,
61
85
  name: 'TVA intracom',
62
86
  collected: 207,
63
87
  deductible: 208,
@@ -65,7 +89,10 @@ export const Vat = {
65
89
  },
66
90
  MANUAL: {
67
91
  id: 11,
92
+ // TODO We should remove idTva when GET vat is remove from api v1
93
+ idTva: 11,
68
94
  value: 0,
95
+ displayOrder: 8,
69
96
  name: 'TVA manuelle',
70
97
  collected: 0,
71
98
  deductible: 0,
@@ -1,9 +1,9 @@
1
1
  import { IAccountingTransaction, IImmobilization } from '../../..';
2
- import { ApiPropertyOptional } from '../../../../utils';
2
+ import { ApiPropertyOptional, Type } from '../../../../utils';
3
3
 
4
4
  export type FormImmobilization = IImmobilization;
5
5
 
6
- export interface FormEntry {
6
+ export class FormEntry {
7
7
  vat? : number | {
8
8
  idVat: number;
9
9
  amount: number;
@@ -13,7 +13,7 @@ export interface FormEntry {
13
13
  amountAllTaxIncludedPurchase?: number;
14
14
  designation?: string;
15
15
  amountAllTaxIncluded?: number;
16
- immobilization?: FormImmobilization // pour la création d'une immo
16
+ immobilization?: FormImmobilization; // pour la création d'une immo
17
17
  idImmobilization?: number; //
18
18
  }
19
19
 
@@ -22,6 +22,7 @@ export type AnnotateAccountingTransaction = FormEntry[];
22
22
 
23
23
  export class UpdateAccountingTransaction {
24
24
  @ApiPropertyOptional()
25
+ @Type(() => FormEntry)
25
26
  entries?: FormEntry[];
26
27
  @ApiPropertyOptional()
27
28
  comment?: string;
@@ -1,4 +1,4 @@
1
- import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
1
+ import { ApiProperty, ApiPropertyOptional, Type } from '../../../../utils';
2
2
 
3
3
  export class QueryTransaction {
4
4
  id: number;
@@ -10,6 +10,7 @@ export class QueryTransaction {
10
10
  limit: number;
11
11
 
12
12
  @ApiProperty()
13
+ @Type(() => Number)
13
14
  idAccountingJournal: number[];
14
15
 
15
16
  @ApiPropertyOptional()
@@ -41,4 +42,4 @@ export class QueryTransaction {
41
42
 
42
43
  @ApiPropertyOptional()
43
44
  invoiceRequested?: boolean;
44
- }
45
+ }
@@ -0,0 +1,6 @@
1
+ import { ApiProperty } from '../../../../utils';
2
+
3
+ export class CreateInvoiceMail {
4
+ @ApiProperty()
5
+ prefix: string;
6
+ }
@@ -0,0 +1,6 @@
1
+ import { ApiProperty } from '../../../../utils';
2
+
3
+ export class UpdateInvoiceMail {
4
+ @ApiProperty()
5
+ prefix: string;
6
+ }
@@ -1,4 +1,4 @@
1
- export enum Type {
1
+ export enum ErrorType {
2
2
  apiError = 'api_error',
3
3
  authError = 'authentication_error',
4
4
  resourceError = 'rsc_error',
@@ -40,10 +40,15 @@ export enum Code {
40
40
  // PDF error
41
41
  mergeFailed = 'merge_failed',
42
42
 
43
+ // Email error
44
+ emailAlreadyExist = 'email_already_exist',
45
+ societyCustomEmailAlreadyExist = 'society_custom_email_already_exist',
46
+ societyCustomEmailNotFound = 'society_custom_email_not_found',
47
+ emailNotFound = 'email_not_found',
43
48
  }
44
49
 
45
50
  export interface IApiError {
46
- type: Type;
51
+ type: ErrorType;
47
52
  code: Code;
48
53
  message: string;
49
54
  param?: string;
@@ -19,7 +19,6 @@ import { ISubscriptionType } from './ISubscriptionType';
19
19
  import { ISocietyConfig } from './ISocietyConfig';
20
20
  import { ISocietyGescom } from './ISocietyGescom';
21
21
  import { ISocietyCgv } from './ISocietyCgv';
22
- import { ISocietyProcessRegister } from './ISocietyProcessRegister';
23
22
  import { IFormalism } from './IFormalism';
24
23
  import { ISocietyNote } from './ISocietyNote';
25
24
  import { ITaxSystem } from './ITaxSystem';
@@ -154,7 +153,6 @@ export interface ISociety {
154
153
  config?: ISocietyConfig;
155
154
  gescom?: ISocietyGescom;
156
155
  societyCgv?: ISocietyCgv;
157
- processRegister?: ISocietyProcessRegister;
158
156
  formalism?: IFormalism;
159
157
  notes?: ISocietyNote;
160
158
  taxSystem?: ITaxSystem;
package/ts/types/index.ts CHANGED
@@ -185,7 +185,6 @@ export * from './Interface/models/ISocietyJuridical';
185
185
  export * from './Interface/models/ISocietyNote';
186
186
  export * from './Interface/models/ISocietyPartner';
187
187
  export * from './Interface/models/ISocietyProceeding';
188
- export * from './Interface/models/ISocietyProcessRegister';
189
188
  export * from './Interface/models/ISocietyRelance';
190
189
  export * from './Interface/models/ISocietySocial';
191
190
  export * from './Interface/models/ISocietySoftware';
@@ -313,3 +312,5 @@ export * from './Interface/api/survey/QuerySurveys';
313
312
  export * from './Interface/api/survey/ReadSurvey';
314
313
  export * from './Interface/api/survey/UpdateSurvey';
315
314
  export * from './Interface/api/survey/CreateSurvey';
315
+ export * from './Interface/api/mailInvoice/CreateInvoiceMail';
316
+ export * from './Interface/api/mailInvoice/UpdateInvoiceMail';
@@ -1,6 +1,12 @@
1
1
  import { isNode } from 'browser-or-node';
2
+
3
+ enum Library {
4
+ SWAGGER = 'node_modules/@nestjs/swagger/index.js',
5
+ CLASS_TRANSFORMER = 'node_modules/class-transformer/cjs/index.js',
6
+ }
7
+
2
8
  // eslint-disable-next-line global-require
3
- const retrieveDecorator = (name: 'ApiPropertyOptional' | 'ApiProperty') => {
9
+ const retrieveDecorator = (library: Library, name: 'ApiPropertyOptional' | 'ApiProperty' | 'Type') => {
4
10
  if (!isNode) {
5
11
  return (target: any, key: string) => {};
6
12
  }
@@ -8,12 +14,13 @@ const retrieveDecorator = (name: 'ApiPropertyOptional' | 'ApiProperty') => {
8
14
  // eslint-disable-next-line global-require
9
15
  const path = require('path');
10
16
  // eslint-disable-next-line global-require,import/no-dynamic-require
11
- return require(path.resolve(process.cwd(), 'node_modules/@nestjs/swagger/index.js'))[name];
17
+ return require(path.resolve(process.cwd(), library))[name];
12
18
  } catch (e) {
13
19
  return (target: any, key: string) => {};
14
20
  }
15
21
  };
16
- export const ApiPropertyOptional = retrieveDecorator('ApiPropertyOptional');
17
- export const ApiProperty = retrieveDecorator('ApiProperty');
22
+ export const ApiPropertyOptional = retrieveDecorator(Library.SWAGGER, 'ApiPropertyOptional');
23
+ export const ApiProperty = retrieveDecorator(Library.SWAGGER, 'ApiProperty');
24
+ export const Type = retrieveDecorator(Library.CLASS_TRANSFORMER, 'Type');
18
25
 
19
- export default { ApiPropertyOptional, ApiProperty };
26
+ export default { ApiPropertyOptional, ApiProperty, Type };
@@ -1,10 +0,0 @@
1
- export interface ISocietyProcessRegister {
2
- id?: number;
3
- stepProcess: boolean;
4
- showStep: boolean;
5
- stepMailTuto: number;
6
- idSociety: number | null;
7
- createdAt?: Date | null;
8
- updatedAt?: Date | null;
9
- }
10
- //# sourceMappingURL=ISocietyProcessRegister.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ISocietyProcessRegister.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/ISocietyProcessRegister.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,uBAAuB;IACtC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACzB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ISocietyProcessRegister.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ISocietyProcessRegister.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/ISocietyProcessRegister.ts"],"names":[],"mappings":"","sourcesContent":["// societyProcessRegister\nexport interface ISocietyProcessRegister {\n id?: number;\n stepProcess: boolean;\n showStep: boolean;\n stepMailTuto: number;\n idSociety: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n}\n"]}
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- //# sourceMappingURL=ISocietyProcessRegister.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"","file":"ISocietyProcessRegister.js"}
@@ -1,10 +0,0 @@
1
- // societyProcessRegister
2
- export interface ISocietyProcessRegister {
3
- id?: number;
4
- stepProcess: boolean;
5
- showStep: boolean;
6
- stepMailTuto: number;
7
- idSociety: number | null;
8
- createdAt?: Date | null;
9
- updatedAt?: Date | null;
10
- }