@silexpert/core 1.0.89 → 1.0.91

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 (104) hide show
  1. package/es/api/resources/AccountingFiles.d.ts +2 -1
  2. package/es/api/resources/AccountingFiles.d.ts.map +1 -1
  3. package/es/api/resources/AccountingFiles.js +3 -0
  4. package/es/api/resources/AccountingFiles.js.map +1 -1
  5. package/es/api/resources/CommercialDocument.d.ts +7 -3
  6. package/es/api/resources/CommercialDocument.d.ts.map +1 -1
  7. package/es/api/resources/CommercialDocument.js +11 -4
  8. package/es/api/resources/CommercialDocument.js.map +1 -1
  9. package/es/api/resources/Employee.d.ts +2 -1
  10. package/es/api/resources/Employee.d.ts.map +1 -1
  11. package/es/api/resources/Employee.js +8 -4
  12. package/es/api/resources/Employee.js.map +1 -1
  13. package/es/api/resources/PaymentExpectationCustomer.d.ts +2 -1
  14. package/es/api/resources/PaymentExpectationCustomer.d.ts.map +1 -1
  15. package/es/api/resources/PaymentExpectationCustomer.js +2 -4
  16. package/es/api/resources/PaymentExpectationCustomer.js.map +1 -1
  17. package/es/api/resources/Product.d.ts +2 -1
  18. package/es/api/resources/Product.d.ts.map +1 -1
  19. package/es/api/resources/Product.js +2 -4
  20. package/es/api/resources/Product.js.map +1 -1
  21. package/es/api/resources/SheetMonthSchedule.d.ts +2 -1
  22. package/es/api/resources/SheetMonthSchedule.d.ts.map +1 -1
  23. package/es/api/resources/SheetMonthSchedule.js +2 -2
  24. package/es/api/resources/SheetMonthSchedule.js.map +1 -1
  25. package/es/api/resources/ThirdParty.d.ts +2 -1
  26. package/es/api/resources/ThirdParty.d.ts.map +1 -1
  27. package/es/api/resources/ThirdParty.js +2 -4
  28. package/es/api/resources/ThirdParty.js.map +1 -1
  29. package/es/types/Enum/BankCollectingState.d.ts +11 -0
  30. package/es/types/Enum/BankCollectingState.d.ts.map +1 -0
  31. package/es/types/Enum/BankCollectingState.js +26 -0
  32. package/es/types/Enum/BankCollectingState.js.map +1 -0
  33. package/es/types/Enum/Phone.d.ts +38 -0
  34. package/es/types/Enum/Phone.d.ts.map +1 -0
  35. package/es/types/Enum/Phone.js +38 -0
  36. package/es/types/Enum/Phone.js.map +1 -0
  37. package/es/types/Interface/api/accountingTransaction/QueryTransaction.d.ts +3 -0
  38. package/es/types/Interface/api/accountingTransaction/QueryTransaction.d.ts.map +1 -1
  39. package/es/types/Interface/api/accountingTransaction/QueryTransaction.js +7 -0
  40. package/es/types/Interface/api/accountingTransaction/QueryTransaction.js.map +1 -1
  41. package/es/types/Interface/api/commercialManagement/Create.d.ts +5 -0
  42. package/es/types/Interface/api/commercialManagement/Create.d.ts.map +1 -1
  43. package/es/types/Interface/api/commercialManagement/Create.js +17 -0
  44. package/es/types/Interface/api/commercialManagement/Create.js.map +1 -1
  45. package/es/types/Interface/api/file/TFile.d.ts +1 -0
  46. package/es/types/Interface/api/file/TFile.d.ts.map +1 -1
  47. package/es/types/Interface/api/file/TFile.js.map +1 -1
  48. package/es/types/Interface/api/society/SocietyWithStatsCaParams.d.ts +1 -0
  49. package/es/types/Interface/api/society/SocietyWithStatsCaParams.d.ts.map +1 -1
  50. package/es/types/Interface/api/society/SocietyWithStatsCaParams.js.map +1 -1
  51. package/es/types/Interface/api/taxDeadline/QueryTaxDeadline.d.ts +2 -1
  52. package/es/types/Interface/api/taxDeadline/QueryTaxDeadline.d.ts.map +1 -1
  53. package/es/types/Interface/api/taxDeadline/QueryTaxDeadline.js +5 -1
  54. package/es/types/Interface/api/taxDeadline/QueryTaxDeadline.js.map +1 -1
  55. package/es/types/Interface/models/ISociety.d.ts +2 -1
  56. package/es/types/Interface/models/ISociety.d.ts.map +1 -1
  57. package/es/types/Interface/models/ISociety.js.map +1 -1
  58. package/es/types/index.d.ts +2 -0
  59. package/es/types/index.d.ts.map +1 -1
  60. package/es/types/index.js +2 -0
  61. package/es/types/index.js.map +1 -1
  62. package/js/api/resources/AccountingFiles.js +6 -0
  63. package/js/api/resources/AccountingFiles.js.map +1 -1
  64. package/js/api/resources/CommercialDocument.js +9 -3
  65. package/js/api/resources/CommercialDocument.js.map +1 -1
  66. package/js/api/resources/Employee.js +5 -3
  67. package/js/api/resources/Employee.js.map +1 -1
  68. package/js/api/resources/PaymentExpectationCustomer.js +5 -3
  69. package/js/api/resources/PaymentExpectationCustomer.js.map +1 -1
  70. package/js/api/resources/Product.js +5 -3
  71. package/js/api/resources/Product.js.map +1 -1
  72. package/js/api/resources/SheetMonthSchedule.js +5 -3
  73. package/js/api/resources/SheetMonthSchedule.js.map +1 -1
  74. package/js/api/resources/ThirdParty.js +5 -3
  75. package/js/api/resources/ThirdParty.js.map +1 -1
  76. package/js/types/Enum/BankCollectingState.js +28 -0
  77. package/js/types/Enum/BankCollectingState.js.map +1 -0
  78. package/js/types/Enum/Phone.js +43 -0
  79. package/js/types/Enum/Phone.js.map +1 -0
  80. package/js/types/Interface/api/accountingTransaction/QueryTransaction.js +9 -1
  81. package/js/types/Interface/api/accountingTransaction/QueryTransaction.js.map +1 -1
  82. package/js/types/Interface/api/commercialManagement/Create.js +11 -1
  83. package/js/types/Interface/api/commercialManagement/Create.js.map +1 -1
  84. package/js/types/Interface/api/taxDeadline/QueryTaxDeadline.js +5 -0
  85. package/js/types/Interface/api/taxDeadline/QueryTaxDeadline.js.map +1 -1
  86. package/js/types/index.js +24 -0
  87. package/js/types/index.js.map +1 -1
  88. package/package.json +1 -1
  89. package/ts/api/resources/AccountingFiles.ts +7 -1
  90. package/ts/api/resources/CommercialDocument.ts +63 -17
  91. package/ts/api/resources/Employee.ts +42 -10
  92. package/ts/api/resources/PaymentExpectationCustomer.ts +61 -18
  93. package/ts/api/resources/Product.ts +14 -3
  94. package/ts/api/resources/SheetMonthSchedule.ts +36 -9
  95. package/ts/api/resources/ThirdParty.ts +18 -4
  96. package/ts/types/Enum/BankCollectingState.ts +24 -0
  97. package/ts/types/Enum/Phone.ts +37 -0
  98. package/ts/types/Interface/api/accountingTransaction/QueryTransaction.ts +6 -0
  99. package/ts/types/Interface/api/commercialManagement/Create.ts +14 -0
  100. package/ts/types/Interface/api/file/TFile.ts +2 -1
  101. package/ts/types/Interface/api/society/SocietyWithStatsCaParams.ts +2 -1
  102. package/ts/types/Interface/api/taxDeadline/QueryTaxDeadline.ts +4 -1
  103. package/ts/types/Interface/models/ISociety.ts +2 -1
  104. package/ts/types/index.ts +2 -0
@@ -1,8 +1,10 @@
1
+ import { CancelToken } from 'axios';
1
2
  import { Resource } from '../Resource';
2
3
  import {
3
4
  BasePaginate,
4
5
  CreateInvoiceDocument,
5
6
  CreatePreSaleDocument,
7
+ CreateRegenerateDocument,
6
8
  EstimateInvoiceType,
7
9
  IEstimateInvoice,
8
10
  QueryCountByStatus,
@@ -20,7 +22,7 @@ export class CommercialDocument extends Resource {
20
22
  return this.axios.$get(`/commercial-management/documents/${id}`);
21
23
  }
22
24
 
23
- update(id: number, payload: UpdateCommercialDocument): Promise<IEstimateInvoice> {
25
+ update(id: number, payload: UpdateCommercialDocument): Promise<{ data: IEstimateInvoice }> {
24
26
  return this.axios.patch(`/commercial-management/documents/${id}`, payload);
25
27
  }
26
28
 
@@ -29,42 +31,86 @@ export class CommercialDocument extends Resource {
29
31
  }
30
32
 
31
33
  getNextReference(params: QueryNextReference): Promise<string> {
32
- return this.axios.$get('/commercial-management/documents/references', { params });
34
+ return this.axios.$get('/commercial-management/documents/references', {
35
+ params,
36
+ });
33
37
  }
34
38
 
35
- getPaginated(params: QueryDocumentPaginated & QueryPaginate): Promise<BasePaginate<ReadEstimateInvoice>> {
36
- return this.axios.$get('/commercial-management/documents', { params });
39
+ getPaginated(
40
+ params: QueryDocumentPaginated & QueryPaginate,
41
+ cancelToken?: CancelToken,
42
+ ): Promise<BasePaginate<ReadEstimateInvoice>> {
43
+ return this.axios.$get('/commercial-management/documents', {
44
+ ...(cancelToken ? { cancelToken } : {}),
45
+ params,
46
+ });
37
47
  }
38
48
 
39
- createEstimate(payload: Omit<CreatePreSaleDocument, 'idEstimateInvoiceType'>): Promise<IEstimateInvoice> {
40
- return this.axios.$post('/commercial-management/estimates', { ...payload, idEstimateInvoiceType: EstimateInvoiceType.DEVIS });
49
+ createEstimate(
50
+ payload: Omit<CreatePreSaleDocument, 'idEstimateInvoiceType'>,
51
+ ): Promise<IEstimateInvoice> {
52
+ return this.axios.$post('/commercial-management/estimates', {
53
+ ...payload,
54
+ idEstimateInvoiceType: EstimateInvoiceType.DEVIS,
55
+ });
41
56
  }
42
57
 
43
- createOrder(payload: Omit<CreatePreSaleDocument, 'idEstimateInvoiceType'>): Promise<IEstimateInvoice> {
44
- return this.axios.$post('/commercial-management/orders', { ...payload, idEstimateInvoiceType: EstimateInvoiceType.BON });
58
+ createOrder(
59
+ payload: Omit<CreatePreSaleDocument, 'idEstimateInvoiceType'>,
60
+ ): Promise<IEstimateInvoice> {
61
+ return this.axios.$post('/commercial-management/orders', {
62
+ ...payload,
63
+ idEstimateInvoiceType: EstimateInvoiceType.BON,
64
+ });
45
65
  }
46
66
 
47
- updateEstimate(id: number, payload: CreatePreSaleDocument): Promise<IEstimateInvoice> {
67
+ updateEstimate(
68
+ id: number,
69
+ payload: CreatePreSaleDocument,
70
+ ): Promise<IEstimateInvoice> {
48
71
  return this.axios.$put(`/commercial-management/estimates/${id}`, payload);
49
72
  }
50
73
 
51
- updateOrder(id: number, payload: CreatePreSaleDocument): Promise<IEstimateInvoice> {
74
+ updateOrder(
75
+ id: number,
76
+ payload: CreatePreSaleDocument,
77
+ ): Promise<IEstimateInvoice> {
52
78
  return this.axios.$put(`/commercial-management/orders/${id}`, payload);
53
79
  }
54
80
 
55
- preview(idEstimateInvoiceType: EstimateInvoiceType, payload: CreatePreSaleDocument | CreateInvoiceDocument): Promise<ReadPreview> {
56
- return this.axios.$post('/commercial-management/preview', { ...payload, idEstimateInvoiceType });
81
+ preview(
82
+ idEstimateInvoiceType: EstimateInvoiceType,
83
+ payload: CreatePreSaleDocument | CreateInvoiceDocument,
84
+ ): Promise<ReadPreview> {
85
+ return this.axios.$post('/commercial-management/preview', {
86
+ ...payload,
87
+ idEstimateInvoiceType,
88
+ });
89
+ }
90
+
91
+ regenerate(id: number, payload: CreateRegenerateDocument): Promise<IEstimateInvoice> {
92
+ return this.axios.$post(`/commercial-management/documents/${id}/regenerate`, payload);
57
93
  }
58
94
 
59
95
  getFormValues(id: number): Promise<CreatePreSaleDocument> {
60
96
  return this.axios.$get(`/commercial-management/documents/${id}/inputs`);
61
97
  }
62
98
 
63
- getDefaultFormValues(idEstimateInvoiceType: EstimateInvoiceType): Promise<CreatePreSaleDocument> {
64
- return this.axios.$get('/commercial-management/documents/inputs', { params: { idEstimateInvoiceType } });
99
+ getDefaultFormValues(
100
+ idEstimateInvoiceType: EstimateInvoiceType,
101
+ ): Promise<CreatePreSaleDocument> {
102
+ return this.axios.$get('/commercial-management/documents/inputs', {
103
+ params: { idEstimateInvoiceType },
104
+ });
65
105
  }
66
106
 
67
- getStatistics(idSociety: number, params: QueryCountByStatus): Promise<ReadCountDocumentByStatus> {
68
- return this.axios.$get(`/commercial-management/societies/${idSociety}/statistics`, { params });
107
+ getStatistics(
108
+ idSociety: number,
109
+ params: QueryCountByStatus,
110
+ ): Promise<ReadCountDocumentByStatus> {
111
+ return this.axios.$get(
112
+ `/commercial-management/societies/${idSociety}/statistics`,
113
+ { params },
114
+ );
69
115
  }
70
- }
116
+ }
@@ -1,6 +1,13 @@
1
+ import { CancelToken } from 'axios';
1
2
  import { forEach } from 'lodash';
2
3
  import {
3
- BasePaginate, IEmployee, IWorkingSchedule, CreateEmployee, QueryEmployeeSearch, UpdateEmployee, UpdateOrCreateWorkingSchedule,
4
+ BasePaginate,
5
+ IEmployee,
6
+ IWorkingSchedule,
7
+ CreateEmployee,
8
+ QueryEmployeeSearch,
9
+ UpdateEmployee,
10
+ UpdateOrCreateWorkingSchedule,
4
11
  } from '../../types';
5
12
  import { Resource } from '../Resource';
6
13
 
@@ -16,7 +23,9 @@ export class Employee extends Resource {
16
23
  }
17
24
  }
18
25
  });
19
- return this.axios.$post('/employees', formData, { headers: { 'Content-Type': 'multipart/form-data' } });
26
+ return this.axios.$post('/employees', formData, {
27
+ headers: { 'Content-Type': 'multipart/form-data' },
28
+ });
20
29
  }
21
30
 
22
31
  public getAll(idSociety: number): Promise<IEmployee[]> {
@@ -27,7 +36,10 @@ export class Employee extends Resource {
27
36
  return this.axios.$get(`/employees/${id}`);
28
37
  }
29
38
 
30
- public update(id: number, payload: Partial<UpdateEmployee>): Promise<IEmployee> {
39
+ public update(
40
+ id: number,
41
+ payload: Partial<UpdateEmployee>,
42
+ ): Promise<IEmployee> {
31
43
  const formData = new FormData();
32
44
  forEach(payload, (value, key) => {
33
45
  if (value) {
@@ -38,22 +50,42 @@ export class Employee extends Resource {
38
50
  }
39
51
  }
40
52
  });
41
- return this.axios.$put(`/employees/${id}`, formData, { headers: { 'Content-Type': 'multipart/form-data' } });
53
+ return this.axios.$put(`/employees/${id}`, formData, {
54
+ headers: { 'Content-Type': 'multipart/form-data' },
55
+ });
42
56
  }
43
57
 
44
58
  public delete(id: number): Promise<true> {
45
59
  return this.axios.$delete(`/employees/${id}`);
46
60
  }
47
61
 
48
- public getPaginate(idSociety: number, params?: QueryEmployeeSearch): Promise<BasePaginate<Employee>> {
49
- return this.axios.$get(`/societies/${idSociety}/employees`, { params: { ...params, isPaginate: true } });
62
+ public getPaginate(
63
+ idSociety: number,
64
+ params?: QueryEmployeeSearch,
65
+ cancelToken?: CancelToken,
66
+ ): Promise<BasePaginate<Employee>> {
67
+ return this.axios.$get(`/societies/${idSociety}/employees`, {
68
+ ...(cancelToken ? { cancelToken } : {}),
69
+ params: { ...params, isPaginate: true },
70
+ });
50
71
  }
51
72
 
52
- public updateOrCreateWorkingSchedule(idEmployee: number, payload?: UpdateOrCreateWorkingSchedule): Promise<IWorkingSchedule> {
53
- return this.axios.$post(`employees/${idEmployee}/working-schedules`, payload);
73
+ public updateOrCreateWorkingSchedule(
74
+ idEmployee: number,
75
+ payload?: UpdateOrCreateWorkingSchedule,
76
+ ): Promise<IWorkingSchedule> {
77
+ return this.axios.$post(
78
+ `employees/${idEmployee}/working-schedules`,
79
+ payload,
80
+ );
54
81
  }
55
82
 
56
- public deleteWorkingSchedule(idEmployee: number, idWorkingSchedule: number): Promise<true> {
57
- return this.axios.$delete(`employees/${idEmployee}/working-schedules/${idWorkingSchedule}`);
83
+ public deleteWorkingSchedule(
84
+ idEmployee: number,
85
+ idWorkingSchedule: number,
86
+ ): Promise<true> {
87
+ return this.axios.$delete(
88
+ `employees/${idEmployee}/working-schedules/${idWorkingSchedule}`,
89
+ );
58
90
  }
59
91
  }
@@ -1,35 +1,78 @@
1
+ import { CancelToken } from 'axios';
1
2
  import { Resource } from '../Resource';
2
3
  import {
3
- QueryGetPaymentExpectationCustomer, IPaymentExpectationCustomer, QueryPayPaymentExpectationCustomer, QueryConfirmPaymentExpectationCustomer, QueryGetSocietyPaymentsExpectationsCustomers, QueryDeleteSocietyPaymentExpectationCustomer, BasePaginate, UpdateRefundSocietyPaymentExpectationCustomer, CreateSocietyPaymentExpectationCustomer, ReadPaymentExpectationCustomerStat, QueryGetSocietyPaymentsExpectationsCustomersStats,
4
+ QueryGetPaymentExpectationCustomer,
5
+ IPaymentExpectationCustomer,
6
+ QueryPayPaymentExpectationCustomer,
7
+ QueryConfirmPaymentExpectationCustomer,
8
+ QueryGetSocietyPaymentsExpectationsCustomers,
9
+ QueryDeleteSocietyPaymentExpectationCustomer,
10
+ BasePaginate,
11
+ UpdateRefundSocietyPaymentExpectationCustomer,
12
+ CreateSocietyPaymentExpectationCustomer,
13
+ ReadPaymentExpectationCustomerStat,
14
+ QueryGetSocietyPaymentsExpectationsCustomersStats,
4
15
  } from '../../types';
5
16
 
6
17
  export class PaymentExpectationCustomer extends Resource {
7
- get(params: QueryGetPaymentExpectationCustomer): Promise<IPaymentExpectationCustomer> {
18
+ get(
19
+ params: QueryGetPaymentExpectationCustomer,
20
+ ): Promise<IPaymentExpectationCustomer> {
8
21
  return this.axios.$get('/paymentExpectationCustomer', { params });
9
22
  }
10
- getBySociety(params: QueryGetSocietyPaymentsExpectationsCustomers): Promise<BasePaginate<IPaymentExpectationCustomer>> {
11
- return this.axios.$get(`/society/${params.idSociety}/paymentsExpectationsCustomers`, {
12
- params,
13
- });
23
+ getBySociety(
24
+ params: QueryGetSocietyPaymentsExpectationsCustomers,
25
+ cancelToken?: CancelToken,
26
+ ): Promise<BasePaginate<IPaymentExpectationCustomer>> {
27
+ return this.axios.$get(
28
+ `/society/${params.idSociety}/paymentsExpectationsCustomers`,
29
+ {
30
+ ...(cancelToken ? { cancelToken } : {}),
31
+ params,
32
+ },
33
+ );
14
34
  }
15
- stats(params: QueryGetSocietyPaymentsExpectationsCustomersStats): Promise<ReadPaymentExpectationCustomerStat> {
16
- return this.axios.$get(`/society/${params.idSociety}/paymentsExpectationsCustomers/stats`, {
17
- params,
18
- });
35
+ stats(
36
+ params: QueryGetSocietyPaymentsExpectationsCustomersStats,
37
+ ): Promise<ReadPaymentExpectationCustomerStat> {
38
+ return this.axios.$get(
39
+ `/society/${params.idSociety}/paymentsExpectationsCustomers/stats`,
40
+ {
41
+ params,
42
+ },
43
+ );
19
44
  }
20
- pay(params: QueryPayPaymentExpectationCustomer): Promise<IPaymentExpectationCustomer> {
45
+ pay(
46
+ params: QueryPayPaymentExpectationCustomer,
47
+ ): Promise<IPaymentExpectationCustomer> {
21
48
  return this.axios.$post('/paymentExpectationCustomer/pay', params);
22
49
  }
23
- confirm(params: QueryConfirmPaymentExpectationCustomer): Promise<IPaymentExpectationCustomer> {
50
+ confirm(
51
+ params: QueryConfirmPaymentExpectationCustomer,
52
+ ): Promise<IPaymentExpectationCustomer> {
24
53
  return this.axios.$post('/paymentExpectationCustomer/confirm', params);
25
54
  }
26
- delete(params: QueryDeleteSocietyPaymentExpectationCustomer): Promise<IPaymentExpectationCustomer> {
27
- return this.axios.$delete(`/society/${params.idSociety}/paymentsExpectationsCustomers/${params.id}`);
55
+ delete(
56
+ params: QueryDeleteSocietyPaymentExpectationCustomer,
57
+ ): Promise<IPaymentExpectationCustomer> {
58
+ return this.axios.$delete(
59
+ `/society/${params.idSociety}/paymentsExpectationsCustomers/${params.id}`,
60
+ );
28
61
  }
29
- refund(params: UpdateRefundSocietyPaymentExpectationCustomer): Promise<IPaymentExpectationCustomer> {
30
- return this.axios.$put(`/society/${params.idSociety}/paymentsExpectationsCustomers/${params.id}/refund`, params);
62
+ refund(
63
+ params: UpdateRefundSocietyPaymentExpectationCustomer,
64
+ ): Promise<IPaymentExpectationCustomer> {
65
+ return this.axios.$put(
66
+ `/society/${params.idSociety}/paymentsExpectationsCustomers/${params.id}/refund`,
67
+ params,
68
+ );
31
69
  }
32
- create(params: CreateSocietyPaymentExpectationCustomer): Promise<IPaymentExpectationCustomer> {
33
- return this.axios.$post(`/society/${params.idSociety}/paymentExpectationCustomer`, params);
70
+ create(
71
+ params: CreateSocietyPaymentExpectationCustomer,
72
+ ): Promise<IPaymentExpectationCustomer> {
73
+ return this.axios.$post(
74
+ `/society/${params.idSociety}/paymentExpectationCustomer`,
75
+ params,
76
+ );
34
77
  }
35
78
  }
@@ -1,6 +1,12 @@
1
+ import { CancelToken } from 'axios';
1
2
  import { Resource } from '../Resource';
2
3
  import {
3
- IProduct, QueryPaginate, QueryProduct, BasePaginate, CreateProduct, UpdateProduct,
4
+ IProduct,
5
+ QueryPaginate,
6
+ QueryProduct,
7
+ BasePaginate,
8
+ CreateProduct,
9
+ UpdateProduct,
4
10
  } from '../../types';
5
11
 
6
12
  export class Product extends Resource {
@@ -8,8 +14,13 @@ export class Product extends Resource {
8
14
  return this.axios.$get('/commercial-management/products');
9
15
  }
10
16
 
11
- getPaginated(pagination: QueryPaginate, query?: QueryProduct): Promise<BasePaginate<IProduct>> {
17
+ getPaginated(
18
+ pagination: QueryPaginate,
19
+ query?: QueryProduct,
20
+ cancelToken?: CancelToken,
21
+ ): Promise<BasePaginate<IProduct>> {
12
22
  return this.axios.$get('/commercial-management/products', {
23
+ ...(cancelToken ? { cancelToken } : {}),
13
24
  params: {
14
25
  ...pagination,
15
26
  ...query,
@@ -40,4 +51,4 @@ export class Product extends Resource {
40
51
  responseType: 'arraybuffer',
41
52
  });
42
53
  }
43
- }
54
+ }
@@ -1,10 +1,17 @@
1
+ import { CancelToken } from 'axios';
1
2
  import {
2
- BasePaginate, ISheetMonthSchedule, ISheetMonthScheduleDetail, QuerySheetMonthSchedule,
3
+ BasePaginate,
4
+ ISheetMonthSchedule,
5
+ ISheetMonthScheduleDetail,
6
+ QuerySheetMonthSchedule,
3
7
  } from '../../types';
4
8
  import { Resource } from '../Resource';
5
9
 
6
10
  export class SheetMonthSchedule extends Resource {
7
- public create(idEmployee: number, payload: Omit<ISheetMonthSchedule, 'idEmployee' | 'employee'>): Promise<ISheetMonthSchedule> {
11
+ public create(
12
+ idEmployee: number,
13
+ payload: Omit<ISheetMonthSchedule, 'idEmployee' | 'employee'>,
14
+ ): Promise<ISheetMonthSchedule> {
8
15
  return this.axios.$post(`/sheet-month-schedules/${idEmployee}`, payload);
9
16
  }
10
17
 
@@ -16,7 +23,10 @@ export class SheetMonthSchedule extends Resource {
16
23
  return this.axios.$get(`/sheet-month-schedules/${id}`);
17
24
  }
18
25
 
19
- public update(id: number, payload: Partial<ISheetMonthSchedule>): Promise<ISheetMonthSchedule> {
26
+ public update(
27
+ id: number,
28
+ payload: Partial<ISheetMonthSchedule>,
29
+ ): Promise<ISheetMonthSchedule> {
20
30
  return this.axios.$put(`/sheet-month-schedules/${id}`, payload);
21
31
  }
22
32
 
@@ -24,15 +34,32 @@ export class SheetMonthSchedule extends Resource {
24
34
  return this.axios.$delete(`/sheet-month-schedules/${id}`);
25
35
  }
26
36
 
27
- public getPaginate(params: QuerySheetMonthSchedule): Promise<BasePaginate<SheetMonthSchedule>> {
28
- return this.axios.$get('/sheet-month-schedules', { params });
37
+ public getPaginate(
38
+ params: QuerySheetMonthSchedule,
39
+ cancelToken?: CancelToken,
40
+ ): Promise<BasePaginate<SheetMonthSchedule>> {
41
+ return this.axios.$get('/sheet-month-schedules', {
42
+ ...(cancelToken ? { cancelToken } : {}),
43
+ params,
44
+ });
29
45
  }
30
46
 
31
- public updateOrCreateSheetMonthScheduleDetail(idSheetMonthSchedule: number, payload: Partial<Omit<ISheetMonthScheduleDetail, 'idSheetMonthSchedule'>>): Promise<ISheetMonthScheduleDetail> {
32
- return this.axios.$post(`/sheet-month-schedules/${idSheetMonthSchedule}/details`, payload);
47
+ public updateOrCreateSheetMonthScheduleDetail(
48
+ idSheetMonthSchedule: number,
49
+ payload: Partial<Omit<ISheetMonthScheduleDetail, 'idSheetMonthSchedule'>>,
50
+ ): Promise<ISheetMonthScheduleDetail> {
51
+ return this.axios.$post(
52
+ `/sheet-month-schedules/${idSheetMonthSchedule}/details`,
53
+ payload,
54
+ );
33
55
  }
34
56
 
35
- public deleteSheetMonthScheduleDetail(idSheetMonthSchedule: number, idSheetMonthScheduleDetails: number): Promise<true> {
36
- return this.axios.$delete(`/sheet-month-schedules/${idSheetMonthSchedule}/details/${idSheetMonthScheduleDetails}`);
57
+ public deleteSheetMonthScheduleDetail(
58
+ idSheetMonthSchedule: number,
59
+ idSheetMonthScheduleDetails: number,
60
+ ): Promise<true> {
61
+ return this.axios.$delete(
62
+ `/sheet-month-schedules/${idSheetMonthSchedule}/details/${idSheetMonthScheduleDetails}`,
63
+ );
37
64
  }
38
65
  }
@@ -1,6 +1,12 @@
1
+ import { CancelToken } from 'axios';
1
2
  import { Resource } from '../Resource';
2
3
  import {
3
- QueryPaginate, BasePaginate, IThirdParty, QueryThirdParty, UpdateThirdPartyForm, CreateThirdPartyForm,
4
+ QueryPaginate,
5
+ BasePaginate,
6
+ IThirdParty,
7
+ QueryThirdParty,
8
+ UpdateThirdPartyForm,
9
+ CreateThirdPartyForm,
4
10
  } from '../../types';
5
11
 
6
12
  export class ThirdParty extends Resource {
@@ -8,8 +14,13 @@ export class ThirdParty extends Resource {
8
14
  return this.axios.$get('/third-parties');
9
15
  }
10
16
 
11
- getPaginated(pagination: QueryPaginate, query?: QueryThirdParty): Promise<BasePaginate<IThirdParty>> {
17
+ getPaginated(
18
+ pagination: QueryPaginate,
19
+ query?: QueryThirdParty,
20
+ cancelToken?: CancelToken,
21
+ ): Promise<BasePaginate<IThirdParty>> {
12
22
  return this.axios.$get('/third-parties/paginate', {
23
+ ...(cancelToken ? { cancelToken } : {}),
13
24
  params: {
14
25
  ...pagination,
15
26
  ...query,
@@ -17,7 +28,10 @@ export class ThirdParty extends Resource {
17
28
  });
18
29
  }
19
30
 
20
- update(idThirdParty: number, payload: UpdateThirdPartyForm): Promise<IThirdParty> {
31
+ update(
32
+ idThirdParty: number,
33
+ payload: UpdateThirdPartyForm,
34
+ ): Promise<IThirdParty> {
21
35
  return this.axios.$put(`/third-parties/${idThirdParty}`, payload);
22
36
  }
23
37
 
@@ -28,4 +42,4 @@ export class ThirdParty extends Resource {
28
42
  delete(idThirdParty: number): Promise<true> {
29
43
  return this.axios.$delete(`/third-parties/${idThirdParty}`);
30
44
  }
31
- }
45
+ }
@@ -0,0 +1,24 @@
1
+ export enum BankCollectingState {
2
+ INVOICE_IN_PROGRESS = 1,
3
+ PENDING_COLLECTION = 2,
4
+ INVOICED = 3,
5
+ REFUSED_INVOICE = 4,
6
+ }
7
+
8
+ export const BankCollectingStateList = [
9
+ {
10
+ id: BankCollectingState.INVOICE_IN_PROGRESS,
11
+ label: 'Facturation en cours',
12
+ },
13
+ {
14
+ id: BankCollectingState.PENDING_COLLECTION,
15
+ label: 'Encaissement en att.',
16
+ },
17
+ {
18
+ id: BankCollectingState.INVOICED,
19
+ label: 'Facturé et encaissé',
20
+ },
21
+ {
22
+ id: BankCollectingState.REFUSED_INVOICE,
23
+ label: 'Facturation refusée',
24
+ }];
@@ -0,0 +1,37 @@
1
+ export const PhonePrefix = {
2
+ FRANCE: {
3
+ id: 1,
4
+ prefix: '+33',
5
+ text: '+33 (France)',
6
+ },
7
+ GUADELOUPE: {
8
+ id: 2,
9
+ prefix: '+590',
10
+ text: '+590 (Guadeloupe)',
11
+ },
12
+ GUYANE: {
13
+ id: 3,
14
+ prefix: '+594',
15
+ text: '+594 (Guyane)',
16
+ },
17
+ MARTINIQUE: {
18
+ id: 4,
19
+ prefix: '+596',
20
+ text: '+596 (Martinique)',
21
+ },
22
+ NEW_CALEDONIA: {
23
+ id: 5,
24
+ prefix: '+687',
25
+ text: '+687 (Nouvelle-Calédonie)',
26
+ },
27
+ REUNION: {
28
+ id: 6,
29
+ prefix: '+262',
30
+ text: '+262 (La Réunion)',
31
+ },
32
+ GERMANY: {
33
+ id: 7,
34
+ prefix: '+49',
35
+ text: '+49 (Allemagne)',
36
+ },
37
+ };
@@ -1,3 +1,4 @@
1
+ import { Type } from 'class-transformer';
1
2
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
2
3
  import { TypeCustomerProviderOperation } from '../../../Enum/TypeCustomerProviderOperation';
3
4
 
@@ -58,3 +59,8 @@ export class QueryGetAllTransactions {
58
59
  @ApiPropertyOptional()
59
60
  dateValue?: string;
60
61
  }
62
+
63
+ export class _QueryTransaction extends QueryTransaction {
64
+ @Type(() => Number)
65
+ idTypeAccountingFile: number;
66
+ }
@@ -435,4 +435,18 @@ export class CreateRecurrence {
435
435
  @ToBoolean()
436
436
  @IsBoolean()
437
437
  isActive: boolean;
438
+ }
439
+
440
+ export class CreateRegenerateDocument {
441
+ @ApiProperty()
442
+ @IsString()
443
+ label: string;
444
+
445
+ @ApiProperty()
446
+ @IsString()
447
+ reference: string;
448
+
449
+ @ApiProperty()
450
+ @IsString()
451
+ title: string;
438
452
  }
@@ -4,5 +4,6 @@ export type TFile = {
4
4
  fieldname: string,
5
5
  mimetype?: string,
6
6
  originalname: string,
7
- size?: number
7
+ size?: number,
8
+ bankFileId?: string
8
9
  };
@@ -8,6 +8,7 @@ export interface SocietyWithStatsCaParams extends ISociety {
8
8
  requiredInfos?: ReadInvalidFieldState[],
9
9
  stateOfProgress?: string,
10
10
  isBillingOk?: boolean,
11
- labValidationDate?: Date | null
11
+ labAcceptation?: boolean,
12
+ labValidationDate?: Date | null,
12
13
  regulates?: IRegulate[]
13
14
  }
@@ -1,6 +1,6 @@
1
1
  import { IsOptional, IsEnum } from 'class-validator';
2
2
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
- import { VatRegime, ToDoOrDone } from '../../..';
3
+ import { VatRegime, ToDoOrDone, BankCollectingState } from '../../..';
4
4
  import { ComptaType } from '../../../Enum/ComptaType';
5
5
  import { TaxSystem } from '../../../Enum/TaxSystem';
6
6
  import { Supervision } from '../../../Enum/Supervision';
@@ -49,6 +49,9 @@ export class QueryTaxDeadline {
49
49
  @ApiPropertyOptional({ description: 'État de la supervision', enum: Supervision })
50
50
  idSupervisionState?: Supervision;
51
51
 
52
+ @ApiPropertyOptional({ description: 'État de l encaissement', enum: BankCollectingState })
53
+ bankCollectingState?: BankCollectingState[];
54
+
52
55
  @ApiPropertyOptional({ description: 'Statuts de l\'IS/IR' })
53
56
  @IsOptional()
54
57
  @IsEnum(ToDoOrDone)
@@ -48,7 +48,7 @@ import { ISms } from './ISms';
48
48
  import { IUser } from './IUser';
49
49
  import { ISocietyEvent } from './ISocietyEvent';
50
50
  import {
51
- ComptaType, CountryId, INafCode, IPartneredAccountantCompanyService, Sector, UnpaidDetail, IPartneredAccountantToSociety, IMail, IAccountingTransaction, IFecFile, IGedFile, IBusinessPartner, IPaymentSchedule,
51
+ ComptaType, CountryId, INafCode, IPartneredAccountantCompanyService, Sector, UnpaidDetail, IPartneredAccountantToSociety, IMail, IAccountingTransaction, IFecFile, IGedFile, IBusinessPartner, IPaymentSchedule, IRegulate,
52
52
  } from '../..';
53
53
  import { IBrandType } from './IBrandType';
54
54
 
@@ -199,6 +199,7 @@ export interface ISociety {
199
199
  logs?: ILog[];
200
200
  sms?: ISms[];
201
201
  users?: IUser[];
202
+ regulates?: IRegulate[];
202
203
  brandType?: IBrandType;
203
204
  partneredAccountantCompaniesServices: IPartneredAccountantCompanyService[];
204
205
  partneredAccountantRelated: IPartneredAccountantToSociety;
package/ts/types/index.ts CHANGED
@@ -460,6 +460,8 @@ export * from './Enum/ReportService';
460
460
  export * from './Enum/RegulateType';
461
461
  export * from './Enum/ProcessingState';
462
462
  export * from './Enum/InpiType';
463
+ export * from './Enum/BankCollectingState';
464
+ export * from './Enum/Phone';
463
465
 
464
466
  // Interfaces API
465
467
  export * from './Interface/api/partnerTransactionType/ReadPartnerTransactionType';