@silexpert/core 0.4.5 → 0.4.7-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/es/api/resources/FirstStep.d.ts +6 -0
  2. package/es/api/resources/FirstStep.d.ts.map +1 -0
  3. package/es/api/resources/FirstStep.js +7 -0
  4. package/es/api/resources/FirstStep.js.map +1 -0
  5. package/es/api/resources/PaymentExpectationCustomer.js.map +1 -1
  6. package/es/api/resources/Society.d.ts +8 -0
  7. package/es/api/resources/Society.d.ts.map +1 -0
  8. package/es/api/resources/Society.js +13 -0
  9. package/es/api/resources/Society.js.map +1 -0
  10. package/es/api/resources.d.ts +4 -0
  11. package/es/api/resources.d.ts.map +1 -1
  12. package/es/api/resources.js +4 -0
  13. package/es/api/resources.js.map +1 -1
  14. package/es/types/Enum/AccountType.d.ts +128 -0
  15. package/es/types/Enum/AccountType.d.ts.map +1 -0
  16. package/es/types/Enum/AccountType.js +128 -0
  17. package/es/types/Enum/AccountType.js.map +1 -0
  18. package/es/types/Enum/BankAccountType.d.ts +6 -0
  19. package/es/types/Enum/BankAccountType.d.ts.map +1 -0
  20. package/es/types/Enum/BankAccountType.js +7 -0
  21. package/es/types/Enum/BankAccountType.js.map +1 -0
  22. package/es/types/Enum/Vat.d.ts +18 -0
  23. package/es/types/Enum/Vat.d.ts.map +1 -1
  24. package/es/types/Enum/Vat.js +27 -0
  25. package/es/types/Enum/Vat.js.map +1 -1
  26. package/es/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.d.ts +1 -1
  27. package/es/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.d.ts.map +1 -1
  28. package/es/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js +4 -1
  29. package/es/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js.map +1 -1
  30. package/es/types/Interface/api/accountingTransaction/QueryTransaction.d.ts.map +1 -1
  31. package/es/types/Interface/api/accountingTransaction/QueryTransaction.js +2 -1
  32. package/es/types/Interface/api/accountingTransaction/QueryTransaction.js.map +1 -1
  33. package/es/types/Interface/api/mailInvoice/CreateInvoiceMail.d.ts +4 -0
  34. package/es/types/Interface/api/mailInvoice/CreateInvoiceMail.d.ts.map +1 -0
  35. package/es/types/Interface/api/mailInvoice/CreateInvoiceMail.js +17 -0
  36. package/es/types/Interface/api/mailInvoice/CreateInvoiceMail.js.map +1 -0
  37. package/es/types/Interface/api/mailInvoice/UpdateInvoiceMail.d.ts +4 -0
  38. package/es/types/Interface/api/mailInvoice/UpdateInvoiceMail.d.ts.map +1 -0
  39. package/es/types/Interface/api/mailInvoice/UpdateInvoiceMail.js +17 -0
  40. package/es/types/Interface/api/mailInvoice/UpdateInvoiceMail.js.map +1 -0
  41. package/es/types/Interface/models/IAccountingTransaction.d.ts +4 -0
  42. package/es/types/Interface/models/IAccountingTransaction.d.ts.map +1 -1
  43. package/es/types/Interface/models/IAccountingTransaction.js.map +1 -1
  44. package/es/types/Interface/models/IApiError.d.ts +9 -3
  45. package/es/types/Interface/models/IApiError.d.ts.map +1 -1
  46. package/es/types/Interface/models/IApiError.js +14 -6
  47. package/es/types/Interface/models/IApiError.js.map +1 -1
  48. package/es/types/Interface/models/IFirstStep.d.ts +15 -0
  49. package/es/types/Interface/models/IFirstStep.d.ts.map +1 -0
  50. package/es/types/Interface/models/IFirstStep.js +2 -0
  51. package/es/types/Interface/models/IFirstStep.js.map +1 -0
  52. package/es/types/Interface/models/ISociety.d.ts +4 -2
  53. package/es/types/Interface/models/ISociety.d.ts.map +1 -1
  54. package/es/types/Interface/models/ISociety.js.map +1 -1
  55. package/es/types/index.d.ts +5 -1
  56. package/es/types/index.d.ts.map +1 -1
  57. package/es/types/index.js +5 -1
  58. package/es/types/index.js.map +1 -1
  59. package/es/utils/decorators.d.ts +2 -0
  60. package/es/utils/decorators.d.ts.map +1 -1
  61. package/es/utils/decorators.js +11 -5
  62. package/es/utils/decorators.js.map +1 -1
  63. package/export-models.json +0 -74
  64. package/js/api/resources/FirstStep.js +18 -0
  65. package/js/api/resources/FirstStep.js.map +1 -0
  66. package/js/api/resources/PaymentExpectationCustomer.js.map +1 -1
  67. package/js/api/resources/Society.js +26 -0
  68. package/js/api/resources/Society.js.map +1 -0
  69. package/js/api/resources.js +7 -1
  70. package/js/api/resources.js.map +1 -1
  71. package/js/types/Enum/AccountType.js +133 -0
  72. package/js/types/Enum/AccountType.js.map +1 -0
  73. package/js/types/Enum/BankAccountType.js +13 -0
  74. package/js/types/Enum/BankAccountType.js.map +1 -0
  75. package/js/types/Enum/Vat.js +27 -0
  76. package/js/types/Enum/Vat.js.map +1 -1
  77. package/js/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js +6 -2
  78. package/js/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js.map +1 -1
  79. package/js/types/Interface/api/accountingTransaction/QueryTransaction.js +1 -1
  80. package/js/types/Interface/api/accountingTransaction/QueryTransaction.js.map +1 -1
  81. package/js/types/Interface/api/mailInvoice/CreateInvoiceMail.js +27 -0
  82. package/js/types/Interface/api/mailInvoice/CreateInvoiceMail.js.map +1 -0
  83. package/js/types/Interface/api/mailInvoice/UpdateInvoiceMail.js +27 -0
  84. package/js/types/Interface/api/mailInvoice/UpdateInvoiceMail.js.map +1 -0
  85. package/js/types/Interface/models/IApiError.js +15 -7
  86. package/js/types/Interface/models/IApiError.js.map +1 -1
  87. package/js/types/Interface/models/{ISocietyProcessRegister.js → IFirstStep.js} +1 -1
  88. package/js/types/Interface/models/{ISocietyProcessRegister.js.map → IFirstStep.js.map} +1 -1
  89. package/js/types/index.js +60 -12
  90. package/js/types/index.js.map +1 -1
  91. package/js/utils/decorators.js +16 -7
  92. package/js/utils/decorators.js.map +1 -1
  93. package/package.json +16 -16
  94. package/table.json +0 -1
  95. package/ts/api/resources/FirstStep.ts +8 -0
  96. package/ts/api/resources/PaymentExpectationCustomer.ts +1 -1
  97. package/ts/api/resources/Society.ts +20 -0
  98. package/ts/api/resources.ts +4 -0
  99. package/ts/types/Enum/AccountType.ts +127 -0
  100. package/ts/types/Enum/BankAccountType.ts +5 -0
  101. package/ts/types/Enum/Vat.ts +27 -0
  102. package/ts/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.ts +4 -3
  103. package/ts/types/Interface/api/accountingTransaction/QueryTransaction.ts +3 -2
  104. package/ts/types/Interface/api/mailInvoice/CreateInvoiceMail.ts +6 -0
  105. package/ts/types/Interface/api/mailInvoice/UpdateInvoiceMail.ts +6 -0
  106. package/ts/types/Interface/models/IAccountingTransaction.ts +4 -0
  107. package/ts/types/Interface/models/IApiError.ts +11 -2
  108. package/ts/types/Interface/models/IFirstStep.ts +17 -0
  109. package/ts/types/Interface/models/ISociety.ts +4 -2
  110. package/ts/types/index.ts +5 -1
  111. package/ts/utils/decorators.ts +12 -5
  112. package/es/types/Interface/models/ISocietyProcessRegister.d.ts +0 -10
  113. package/es/types/Interface/models/ISocietyProcessRegister.d.ts.map +0 -1
  114. package/es/types/Interface/models/ISocietyProcessRegister.js +0 -2
  115. package/es/types/Interface/models/ISocietyProcessRegister.js.map +0 -1
  116. package/ts/types/Interface/models/ISocietyProcessRegister.ts +0 -10
@@ -3,12 +3,19 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.ApiProperty = exports.ApiPropertyOptional = undefined;
6
+ exports.Type = exports.ApiProperty = exports.ApiPropertyOptional = undefined;
7
7
 
8
8
  var _browserOrNode = require("browser-or-node");
9
9
 
10
- // eslint-disable-next-line global-require
11
- const retrieveDecorator = name => {
10
+ var Library;
11
+
12
+ (function (Library) {
13
+ Library["SWAGGER"] = "node_modules/@nestjs/swagger/index.js";
14
+ Library["CLASS_TRANSFORMER"] = "node_modules/class-transformer/cjs/index.js";
15
+ })(Library || (Library = {})); // eslint-disable-next-line global-require
16
+
17
+
18
+ const retrieveDecorator = (library, name) => {
12
19
  if (!_browserOrNode.isNode) {
13
20
  return (target, key) => {};
14
21
  }
@@ -18,16 +25,18 @@ const retrieveDecorator = name => {
18
25
  const path = require('path'); // eslint-disable-next-line global-require,import/no-dynamic-require
19
26
 
20
27
 
21
- return require(path.resolve(process.cwd(), 'node_modules/@nestjs/swagger/index.js'))[name];
28
+ return require(path.resolve(process.cwd(), library))[name];
22
29
  } catch (e) {
23
30
  return (target, key) => {};
24
31
  }
25
32
  };
26
33
 
27
- const ApiPropertyOptional = exports.ApiPropertyOptional = retrieveDecorator('ApiPropertyOptional');
28
- const ApiProperty = exports.ApiProperty = retrieveDecorator('ApiProperty');
34
+ const ApiPropertyOptional = exports.ApiPropertyOptional = retrieveDecorator(Library.SWAGGER, 'ApiPropertyOptional');
35
+ const ApiProperty = exports.ApiProperty = retrieveDecorator(Library.SWAGGER, 'ApiProperty');
36
+ const Type = exports.Type = retrieveDecorator(Library.CLASS_TRANSFORMER, 'Type');
29
37
  exports.default = {
30
38
  ApiPropertyOptional,
31
- ApiProperty
39
+ ApiProperty,
40
+ Type
32
41
  };
33
42
  //# sourceMappingURL=decorators.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../ts/utils/decorators.ts"],"names":[],"mappings":";;;;;;;AAAA;;AACA;AACA,MAAM,iBAAiB,GAAI,IAAD,IAAgD;AACxE,MAAI,CAAC,qBAAL,EAAa;AACX,WAAO,CAAC,MAAD,EAAc,GAAd,KAA6B,CAAG,CAAvC;AACD;;AACD,MAAI;AACF;AACA,UAAM,IAAI,GAAG,OAAO,CAAC,MAAD,CAApB,CAFE,CAGF;;;AACA,WAAO,OAAO,CAAC,IAAI,CAAC,OAAL,CAAa,OAAO,CAAC,GAAR,EAAb,EAA4B,uCAA5B,CAAD,CAAP,CAA8E,IAA9E,CAAP;AACD,GALD,CAKE,OAAO,CAAP,EAAU;AACV,WAAO,CAAC,MAAD,EAAc,GAAd,KAA6B,CAAG,CAAvC;AACD;AACF,CAZD;;AAaO,MAAM,mBAAmB,WAAnB,mBAAmB,GAAG,iBAAiB,CAAC,qBAAD,CAA7C;AACA,MAAM,WAAW,WAAX,WAAW,GAAG,iBAAiB,CAAC,aAAD,CAArC;kBAEQ;AAAE,EAAA,mBAAF;AAAuB,EAAA;AAAvB,C","sourcesContent":["import { isNode } from 'browser-or-node';\n// eslint-disable-next-line global-require\nconst retrieveDecorator = (name: 'ApiPropertyOptional' | 'ApiProperty') => {\n if (!isNode) {\n return (target: any, key: string) => {};\n }\n try {\n // eslint-disable-next-line global-require\n const path = require('path');\n // eslint-disable-next-line global-require,import/no-dynamic-require\n return require(path.resolve(process.cwd(), 'node_modules/@nestjs/swagger/index.js'))[name];\n } catch (e) {\n return (target: any, key: string) => {};\n }\n};\nexport const ApiPropertyOptional = retrieveDecorator('ApiPropertyOptional');\nexport const ApiProperty = retrieveDecorator('ApiProperty');\n\nexport default { ApiPropertyOptional, ApiProperty };\n"],"sourceRoot":"","file":"decorators.js"}
1
+ {"version":3,"sources":["../../ts/utils/decorators.ts"],"names":[],"mappings":";;;;;;;AAAA;;AAEA,IAAK,OAAL;;AAAA,CAAA,UAAK,OAAL,EAAY;AACV,EAAA,OAAA,CAAA,SAAA,CAAA,GAAA,uCAAA;AACA,EAAA,OAAA,CAAA,mBAAA,CAAA,GAAA,6CAAA;AACD,CAHD,EAAK,OAAO,KAAP,OAAO,GAAA,EAAA,CAAZ,E,CAKA;;;AACA,MAAM,iBAAiB,GAAG,CAAC,OAAD,EAAmB,IAAnB,KAA2E;AACnG,MAAI,CAAC,qBAAL,EAAa;AACX,WAAO,CAAC,MAAD,EAAc,GAAd,KAA6B,CAAG,CAAvC;AACD;;AACD,MAAI;AACF;AACA,UAAM,IAAI,GAAG,OAAO,CAAC,MAAD,CAApB,CAFE,CAGF;;;AACA,WAAO,OAAO,CAAC,IAAI,CAAC,OAAL,CAAa,OAAO,CAAC,GAAR,EAAb,EAA4B,OAA5B,CAAD,CAAP,CAA8C,IAA9C,CAAP;AACD,GALD,CAKE,OAAO,CAAP,EAAU;AACV,WAAO,CAAC,MAAD,EAAc,GAAd,KAA6B,CAAG,CAAvC;AACD;AACF,CAZD;;AAaO,MAAM,mBAAmB,WAAnB,mBAAmB,GAAG,iBAAiB,CAAC,OAAO,CAAC,OAAT,EAAkB,qBAAlB,CAA7C;AACA,MAAM,WAAW,WAAX,WAAW,GAAG,iBAAiB,CAAC,OAAO,CAAC,OAAT,EAAkB,aAAlB,CAArC;AACA,MAAM,IAAI,WAAJ,IAAI,GAAG,iBAAiB,CAAC,OAAO,CAAC,iBAAT,EAA4B,MAA5B,CAA9B;kBAEQ;AAAE,EAAA,mBAAF;AAAuB,EAAA,WAAvB;AAAoC,EAAA;AAApC,C","sourcesContent":["import { isNode } from 'browser-or-node';\n\nenum Library {\n SWAGGER = 'node_modules/@nestjs/swagger/index.js',\n CLASS_TRANSFORMER = 'node_modules/class-transformer/cjs/index.js',\n}\n\n// eslint-disable-next-line global-require\nconst retrieveDecorator = (library: Library, name: 'ApiPropertyOptional' | 'ApiProperty' | 'Type') => {\n if (!isNode) {\n return (target: any, key: string) => {};\n }\n try {\n // eslint-disable-next-line global-require\n const path = require('path');\n // eslint-disable-next-line global-require,import/no-dynamic-require\n return require(path.resolve(process.cwd(), library))[name];\n } catch (e) {\n return (target: any, key: string) => {};\n }\n};\nexport const ApiPropertyOptional = retrieveDecorator(Library.SWAGGER, 'ApiPropertyOptional');\nexport const ApiProperty = retrieveDecorator(Library.SWAGGER, 'ApiProperty');\nexport const Type = retrieveDecorator(Library.CLASS_TRANSFORMER, 'Type');\n\nexport default { ApiPropertyOptional, ApiProperty, Type };\n"],"sourceRoot":"","file":"decorators.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "0.4.5",
3
+ "version": "0.4.7-0",
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-core",
6
6
  "main": "js/index.js",
@@ -37,24 +37,24 @@
37
37
  "author": "Silex",
38
38
  "license": "ISC",
39
39
  "devDependencies": {
40
- "@babel/cli": "^7.12.16",
41
- "@babel/core": "^7.12.16",
42
- "@babel/plugin-proposal-object-rest-spread": "^7.12.13",
43
- "@babel/plugin-transform-runtime": "^7.12.15",
44
- "@babel/preset-env": "^7.12.16",
45
- "@babel/runtime": "^7.12.13",
40
+ "@babel/cli": "^7.13.0",
41
+ "@babel/core": "^7.13.8",
42
+ "@babel/plugin-proposal-object-rest-spread": "^7.13.8",
43
+ "@babel/plugin-transform-runtime": "^7.13.9",
44
+ "@babel/preset-env": "^7.13.9",
45
+ "@babel/runtime": "^7.13.9",
46
46
  "@types/axios": "^0.14.0",
47
47
  "@types/bluebird": "^3.5.33",
48
48
  "@types/browser-or-node": "^1.3.0",
49
- "@types/ejs": "^3.0.5",
50
- "@types/node": "^14.14.28",
49
+ "@types/ejs": "^3.0.6",
50
+ "@types/node": "^14.14.31",
51
51
  "@types/validator": "^13.1.3",
52
- "@typescript-eslint/eslint-plugin": "^4.15.0",
53
- "@typescript-eslint/parser": "^4.15.0",
52
+ "@typescript-eslint/eslint-plugin": "^4.16.1",
53
+ "@typescript-eslint/parser": "^4.16.1",
54
54
  "babel-preset-env": "^1.7.0",
55
55
  "ejs": "^3.1.6",
56
- "eslint": "^7.20.0",
57
- "eslint-config-prettier": "^7.2.0",
56
+ "eslint": "^7.21.0",
57
+ "eslint-config-prettier": "^8.1.0",
58
58
  "eslint-plugin-import": "^2.20.1",
59
59
  "esm": "^3.2.25",
60
60
  "husky": "^4.3.8",
@@ -62,9 +62,9 @@
62
62
  "prettier": "^2.2.1",
63
63
  "reflect-metadata": "^0.1.13",
64
64
  "rimraf": "^3.0.2",
65
- "standard-version": "^9.1.0",
65
+ "standard-version": "^9.1.1",
66
66
  "ts-node": "^9.1.1",
67
- "typescript": "^4.1.5"
67
+ "typescript": "^4.2.2"
68
68
  },
69
69
  "peerDependencies": {
70
70
  "@babel/runtime": "^7.6.3",
@@ -81,7 +81,7 @@
81
81
  "class-validator": "^0.13.1",
82
82
  "eslint-config-airbnb": "^18.2.1",
83
83
  "readme-md-generator": "^1.0.0",
84
- "rxjs": "^6.6.3",
84
+ "rxjs": "^6.6.6",
85
85
  "ts-enum-util": "^4.0.2",
86
86
  "winston": "^3.3.3"
87
87
  }
package/table.json CHANGED
@@ -183,7 +183,6 @@
183
183
  "societyNotes": "SocietyNote",
184
184
  "societyPartner": "SocietyPartner",
185
185
  "societyProcedings": "SocietyProceeding",
186
- "societyProcessRegister": "SocietyProcessRegister",
187
186
  "societyRelance": "SocietyRelance",
188
187
  "societySocial": "SocietySocial",
189
188
  "societySoftware": "SocietySoftware",
@@ -0,0 +1,8 @@
1
+ import { Resource } from '../Resource';
2
+ import { IFirstStep } from '../../types';
3
+
4
+ export class FirstStep extends Resource {
5
+ get(): Promise<IFirstStep> {
6
+ return this.axios.$get('/society/firstStep');
7
+ }
8
+ }
@@ -32,4 +32,4 @@ export class PaymentExpectationCustomer extends Resource {
32
32
  create(params: CreateSocietyPaymentExpectationCustomer): Promise<IPaymentExpectationCustomer> {
33
33
  return this.axios.$post(`/society/${params.idSociety}/paymentExpectationCustomer`, params);
34
34
  }
35
- }
35
+ }
@@ -0,0 +1,20 @@
1
+ import { Resource } from '../Resource';
2
+ import {
3
+ CreateInvoiceMail,
4
+ UpdateInvoiceMail,
5
+ IMailSociety,
6
+ } from '../../types';
7
+
8
+ export class Society extends Resource {
9
+ getInvoiceEmail(): Promise<IMailSociety | Error> {
10
+ return this.axios.$get('/society/invoiceEmail');
11
+ }
12
+
13
+ createInvoiceEmail(data: CreateInvoiceMail): Promise<IMailSociety | Error> {
14
+ return this.axios.$post('/society/invoiceEmail', data);
15
+ }
16
+
17
+ updateInvoiceEmail(data: UpdateInvoiceMail): Promise<IMailSociety | Error> {
18
+ return this.axios.$put('/society/invoiceEmail', data);
19
+ }
20
+ }
@@ -7,6 +7,8 @@ import { Transaction } from './resources/Transaction';
7
7
  import { Account } from './resources/Account';
8
8
  import { User } from './resources/User';
9
9
  import { Survey } from './resources/Survey';
10
+ import { FirstStep } from './resources/FirstStep';
11
+ import { Society } from './resources/Society';
10
12
 
11
13
  export const resources = {
12
14
  simulation: Simulation,
@@ -18,4 +20,6 @@ export const resources = {
18
20
  account: Account,
19
21
  user: User,
20
22
  survey: Survey,
23
+ firstStep: FirstStep,
24
+ society: Society,
21
25
  };
@@ -0,0 +1,127 @@
1
+ export const AccountType = {
2
+ DEPLACEMENTS: {
3
+ id: 1,
4
+ color: '#CCCCCC',
5
+ icon: 'accountLogo/0616d627-840d-5034-9409-d7d99ce17917',
6
+ },
7
+ FOURNITURES: {
8
+ id: 2,
9
+ color: '#896FD3',
10
+ icon: 'accountLogo/652d7313-aeb5-503e-8f7d-7d1268458fbc',
11
+ },
12
+ DEPENSES_DIVERSES: {
13
+ id: 3,
14
+ color: '#DECC27',
15
+ icon: 'accountLogo/58710fd7-ee94-588a-b788-7caa7d5d4016',
16
+ },
17
+ SOUS_TRAITANCES: {
18
+ id: 4,
19
+ color: '#A75F1C',
20
+ icon: 'accountLogo/304551ee-263e-50b7-83b0-1a102e738f03',
21
+ },
22
+ ACHAT_MARCHANDISES: {
23
+ id: 5,
24
+ color: '#FBD65C',
25
+ icon: 'accountLogo/2dea54a3-cd5d-59fe-8862-fcd354fa4c4e',
26
+ },
27
+ CHARGES_SOCIALES: {
28
+ id: 6,
29
+ color: '#009688',
30
+ icon: 'accountLogo/679928ed-dba5-5634-b925-ec392037a32d',
31
+ },
32
+ SALAIRES: {
33
+ id: 7,
34
+ color: '#FBA55A',
35
+ icon: 'accountLogo/bb818b4c-39b9-5e17-840e-2321b78c318c',
36
+ },
37
+ TAXES: {
38
+ id: 8,
39
+ color: '#26D395',
40
+ icon: 'accountLogo/58710fd7-ee94-588a-b788-7caa7d5d4016',
41
+ },
42
+ FONCTIONNEMENT: {
43
+ id: 9,
44
+ color: '#84908D',
45
+ icon: 'accountLogo/89d397ad-3774-540c-b06d-a6b91e3f2946',
46
+ },
47
+ RECETTES_PRODUCTION: {
48
+ id: 10,
49
+ color: '#26D395',
50
+ icon: 'accountLogo/8d411d9d-eee4-56f7-a8ef-0529002c96ed',
51
+ },
52
+ RECETTES_NEGOCE: {
53
+ id: 11,
54
+ color: '#26D395',
55
+ icon: 'accountLogo/8d411d9d-eee4-56f7-a8ef-0529002c96ed',
56
+ },
57
+ RECETTES_DIVERSES: {
58
+ id: 12,
59
+ color: '#26D395',
60
+ icon: 'accountLogo/8d411d9d-eee4-56f7-a8ef-0529002c96ed',
61
+ },
62
+ AUTRES: {
63
+ id: 13,
64
+ color: '#26D395',
65
+ icon: 'accountLogo/f53f59a1-da0e-55a7-b176-baa0ee454794',
66
+ },
67
+ ACHATS: {
68
+ id: 14,
69
+ color: '#FBD65C',
70
+ icon: 'accountLogo/eca668d8-5fab-50eb-8131-eaa386e814fb',
71
+ },
72
+ SALAIRES_2: {
73
+ id: 15,
74
+ color: '#9AACF8',
75
+ icon: 'accountLogo/bb818b4c-39b9-5e17-840e-2321b78c318c',
76
+ },
77
+ IMMOBILIER: {
78
+ id: 16,
79
+ color: '#C2C1C1',
80
+ icon: 'accountLogo/f3546ef2-5b00-5067-9082-ef1cea96fa6b',
81
+ },
82
+ SERVICES: {
83
+ id: 17,
84
+ color: '#D260BC',
85
+ icon: 'accountLogo/304551ee-263e-50b7-83b0-1a102e738f03',
86
+ },
87
+ ABONNEMENTS: {
88
+ id: 18,
89
+ color: '#E74242',
90
+ icon: 'accountLogo/06379552-c039-5c40-bd24-f9ef5676416c',
91
+ },
92
+ DEPENSES_COURANTES: {
93
+ id: 19,
94
+ color: '#D08FDB',
95
+ icon: 'accountLogo/89d397ad-3774-540c-b06d-a6b91e3f2946',
96
+ },
97
+ TRANSPORTS: {
98
+ id: 20,
99
+ color: '#FF9365',
100
+ icon: 'accountLogo/0616d627-840d-5034-9409-d7d99ce17917',
101
+ },
102
+ ADMINISTRATIF: {
103
+ id: 21,
104
+ color: '#60C0FE',
105
+ icon: 'accountLogo/652d7313-aeb5-503e-8f7d-7d1268458fbc',
106
+ },
107
+ PUBLICITES_ET_MISSIONS: {
108
+ id: 22,
109
+ color: '#FEA1A1',
110
+ icon: 'accountLogo/4868f724-b7d4-5d23-ac16-5c52ab34c84d',
111
+ },
112
+ DIVERS: {
113
+ id: 23,
114
+ color: '#26D395',
115
+ icon: 'accountLogo/f53f59a1-da0e-55a7-b176-baa0ee454794',
116
+ },
117
+ FINANCES: {
118
+ id: 24,
119
+ color: '#26D395',
120
+ icon: 'accountLogo/5f4b746d-d2b3-53bb-8c97-8772a8becdf0',
121
+ },
122
+ IMMOBILISATIONS: {
123
+ id: 25,
124
+ color: '#CCCCCC',
125
+ icon: 'accountLogo/43d187de-51ec-59b9-a72d-9a91b3afd10b',
126
+ },
127
+ };
@@ -0,0 +1,5 @@
1
+ export enum BankAccountType {
2
+ BANK = 1,
3
+ CASHDESK = 2,
4
+ EXPENSE = 3,
5
+ }
@@ -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
+ }
@@ -10,6 +10,7 @@ import { IFile } from './IFile';
10
10
  import { IComptaType } from './IComptaType';
11
11
  import { ILettering } from './ILettering';
12
12
  import { IPartnerTransaction } from './IPartnerTransaction';
13
+ import { ICurrency } from './ICurrency';
13
14
 
14
15
  // accountingTransactions
15
16
  export interface IAccountingTransaction {
@@ -20,6 +21,7 @@ export interface IAccountingTransaction {
20
21
  dateValue: Date;
21
22
  dateLocked: Date | null;
22
23
  dateVerified: Date | null;
24
+ originalValue?: number | null;
23
25
  idUser: number | null;
24
26
  isBlocked: boolean;
25
27
  isMerged: boolean;
@@ -35,6 +37,7 @@ export interface IAccountingTransaction {
35
37
  isAlreadyProcessByOcr: boolean | null;
36
38
  idBankAccount: number | null;
37
39
  idSociety: number;
40
+ idCurrency?: number | null;
38
41
  idPaymentMethod: number | null;
39
42
  idSocietyVehicle: number | null;
40
43
  idSocietyPartner: number | null;
@@ -55,6 +58,7 @@ export interface IAccountingTransaction {
55
58
  accountingEntries?: IAccountingEntry[];
56
59
  accountingFiles?: IAccountingFile[];
57
60
  accountingJournal?: IAccountingJournal;
61
+ currency?: ICurrency;
58
62
  society?: ISociety;
59
63
  user?: IUser;
60
64
  rule?: IRule;
@@ -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,19 @@ 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',
48
+
49
+ // BankAccount
50
+ missingParamAccountNumber = 'missing_param_account_number',
51
+ accountNumberParamNotFound = 'account_number_param_not_found',
43
52
  }
44
53
 
45
54
  export interface IApiError {
46
- type: Type;
55
+ type: ErrorType;
47
56
  code: Code;
48
57
  message: string;
49
58
  param?: string;
@@ -0,0 +1,17 @@
1
+ import { ISociety } from './ISociety';
2
+
3
+ export interface IFirstStep {
4
+ id?: number;
5
+ hasBankAccountSynchronized?: Date | null;
6
+ hasContactInformationsFilled?: Date | null;
7
+ hasEmailCustom?: Date | null;
8
+ hasAccountingTransactionAnnotated?: Date | null;
9
+ hasBillingToolCustom?: Date | null;
10
+ hasMobileApp?: Date | null;
11
+ idSociety: number;
12
+ createdAt?: Date | null;
13
+ updatedAt?: Date | null;
14
+
15
+ // Associations
16
+ society?: ISociety;
17
+ }
@@ -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';
@@ -130,7 +129,11 @@ export interface ISociety {
130
129
  recoveryDate: string | null;
131
130
  createdAt?: Date | null;
132
131
  updatedAt?: Date | null;
132
+ startAt?: Date | null;
133
133
  idSoftware: number | null;
134
+ canceledFirstStepAt: Date | null;
135
+ completedFirstStepAt: Date | null;
136
+ lastMobileConnection: Date | null;
134
137
 
135
138
  // Associations
136
139
  accounts?: IAccount[];
@@ -154,7 +157,6 @@ export interface ISociety {
154
157
  config?: ISocietyConfig;
155
158
  gescom?: ISocietyGescom;
156
159
  societyCgv?: ISocietyCgv;
157
- processRegister?: ISocietyProcessRegister;
158
160
  formalism?: IFormalism;
159
161
  notes?: ISocietyNote;
160
162
  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';
@@ -235,6 +234,7 @@ export * from './Interface/models/ICustomizationType';
235
234
  export * from './Interface/models/IDocumentWaitingType';
236
235
  export * from './Interface/models/IEstimateInvoiceType';
237
236
  export * from './Interface/models/IFollowedQualityMailType';
237
+ export * from './Interface/models/IFirstStep';
238
238
  export * from './Interface/models/IGedFileType';
239
239
  export * from './Interface/models/ILetterType';
240
240
  export * from './Interface/models/ILogType';
@@ -284,6 +284,8 @@ export * from './Enum/SubscriptionType';
284
284
  export * from './Enum/Sector';
285
285
  export * from './Enum/LegalForm';
286
286
  export * from './Enum/VatRegime';
287
+ export * from './Enum/AccountType';
288
+ export * from './Enum/BankAccountType';
287
289
  export * from './Enum/TypeConnector';
288
290
  export * from './Enum/Vat';
289
291
  export * from './Enum/AccountingJournal';
@@ -313,3 +315,5 @@ export * from './Interface/api/survey/QuerySurveys';
313
315
  export * from './Interface/api/survey/ReadSurvey';
314
316
  export * from './Interface/api/survey/UpdateSurvey';
315
317
  export * from './Interface/api/survey/CreateSurvey';
318
+ export * from './Interface/api/mailInvoice/CreateInvoiceMail';
319
+ 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"}