@silexpert/core 1.0.190 → 1.0.192
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/api/resources/AccountingFiles.d.ts +1 -1
- package/es/api/resources/AccountingFiles.d.ts.map +1 -1
- package/es/api/resources/AccountingFiles.js +4 -1
- package/es/api/resources/AccountingFiles.js.map +1 -1
- package/es/api/resources/CashAndExpense.d.ts +8 -0
- package/es/api/resources/CashAndExpense.d.ts.map +1 -0
- package/es/api/resources/CashAndExpense.js +27 -0
- package/es/api/resources/CashAndExpense.js.map +1 -0
- package/es/api/resources.d.ts +2 -0
- package/es/api/resources.d.ts.map +1 -1
- package/es/api/resources.js +2 -0
- package/es/api/resources.js.map +1 -1
- package/es/types/Enum/Account.d.ts +8 -0
- package/es/types/Enum/Account.d.ts.map +1 -1
- package/es/types/Enum/Account.js +8 -0
- package/es/types/Enum/Account.js.map +1 -1
- package/es/types/Enum/CashDeskTransactionType.d.ts +7 -0
- package/es/types/Enum/CashDeskTransactionType.d.ts.map +1 -0
- package/es/types/Enum/CashDeskTransactionType.js +8 -0
- package/es/types/Enum/CashDeskTransactionType.js.map +1 -0
- package/es/types/Enum/RoleDetail.js +2 -2
- package/es/types/Enum/RoleDetail.js.map +1 -1
- package/es/types/Enum/ThirdParty.d.ts +7 -0
- package/es/types/Enum/ThirdParty.d.ts.map +1 -0
- package/es/types/Enum/ThirdParty.js +7 -0
- package/es/types/Enum/ThirdParty.js.map +1 -0
- package/es/types/Interface/api/accountingFiles/queryAccountingFiles.d.ts +1 -0
- package/es/types/Interface/api/accountingFiles/queryAccountingFiles.d.ts.map +1 -1
- package/es/types/Interface/api/accountingFiles/queryAccountingFiles.js +5 -1
- package/es/types/Interface/api/accountingFiles/queryAccountingFiles.js.map +1 -1
- package/es/types/Interface/api/cashAndExpense/Create.d.ts +27 -0
- package/es/types/Interface/api/cashAndExpense/Create.d.ts.map +1 -0
- package/es/types/Interface/api/cashAndExpense/Create.js +91 -0
- package/es/types/Interface/api/cashAndExpense/Create.js.map +1 -0
- package/es/types/Interface/models/IApiError.d.ts +2 -1
- package/es/types/Interface/models/IApiError.d.ts.map +1 -1
- package/es/types/Interface/models/IApiError.js +2 -0
- package/es/types/Interface/models/IApiError.js.map +1 -1
- package/es/types/Interface/models/IKilometricAllowanceScale.d.ts +1 -0
- package/es/types/Interface/models/IKilometricAllowanceScale.d.ts.map +1 -1
- package/es/types/Interface/models/IKilometricAllowanceScale.js.map +1 -1
- package/es/types/index.d.ts +3 -0
- package/es/types/index.d.ts.map +1 -1
- package/es/types/index.js +3 -0
- package/es/types/index.js.map +1 -1
- package/js/api/resources/AccountingFiles.js +4 -1
- package/js/api/resources/AccountingFiles.js.map +1 -1
- package/js/api/resources/CashAndExpense.js +37 -0
- package/js/api/resources/CashAndExpense.js.map +1 -0
- package/js/api/resources.js +3 -1
- package/js/api/resources.js.map +1 -1
- package/js/types/Enum/Account.js +8 -0
- package/js/types/Enum/Account.js.map +1 -1
- package/js/types/Enum/CashDeskTransactionType.js +13 -0
- package/js/types/Enum/CashDeskTransactionType.js.map +1 -0
- package/js/types/Enum/RoleDetail.js +2 -2
- package/js/types/Enum/RoleDetail.js.map +1 -1
- package/js/types/Enum/ThirdParty.js +12 -0
- package/js/types/Enum/ThirdParty.js.map +1 -0
- package/js/types/Interface/api/accountingFiles/queryAccountingFiles.js +1 -0
- package/js/types/Interface/api/accountingFiles/queryAccountingFiles.js.map +1 -1
- package/js/types/Interface/api/cashAndExpense/Create.js +44 -0
- package/js/types/Interface/api/cashAndExpense/Create.js.map +1 -0
- package/js/types/Interface/models/IApiError.js +2 -0
- package/js/types/Interface/models/IApiError.js.map +1 -1
- package/js/types/Interface/models/IKilometricAllowanceScale.js.map +1 -1
- package/js/types/index.js +30 -0
- package/js/types/index.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/AccountingFiles.ts +5 -2
- package/ts/api/resources/CashAndExpense.ts +31 -0
- package/ts/api/resources.ts +2 -0
- package/ts/types/Enum/Account.ts +8 -0
- package/ts/types/Enum/CashDeskTransactionType.ts +6 -0
- package/ts/types/Enum/RoleDetail.ts +2 -2
- package/ts/types/Enum/ThirdParty.ts +6 -0
- package/ts/types/Interface/api/accountingFiles/queryAccountingFiles.ts +4 -1
- package/ts/types/Interface/api/cashAndExpense/Create.ts +67 -0
- package/ts/types/Interface/models/IApiError.ts +3 -0
- package/ts/types/Interface/models/IKilometricAllowanceScale.ts +1 -0
- package/ts/types/index.ts +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.192",
|
|
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": "js/index.js",
|
|
@@ -4,19 +4,22 @@ import {
|
|
|
4
4
|
} from '../../types';
|
|
5
5
|
|
|
6
6
|
export class AccountingFiles extends Resource {
|
|
7
|
-
accountingFile(params: QueryAccountingFiles): Promise<ReadFormattedAccountingTransaction[]> {
|
|
7
|
+
accountingFile(params: QueryAccountingFiles): Promise<ReadFormattedAccountingTransaction[] | IAccountingFile[] > {
|
|
8
8
|
const sendAccountingFiles = new FormData();
|
|
9
9
|
|
|
10
10
|
sendAccountingFiles.append('idAccountingType', params.idAccountingType.toString());
|
|
11
11
|
sendAccountingFiles.append('isPayPerso', params.isPayPerso.toString());
|
|
12
12
|
sendAccountingFiles.append('split', params.split.toString());
|
|
13
13
|
sendAccountingFiles.append('bypassOcr', params.bypassOcr.toString());
|
|
14
|
+
if (params.emissionDate) {
|
|
15
|
+
sendAccountingFiles.append('emissionDate', params.emissionDate.toString());
|
|
16
|
+
}
|
|
14
17
|
|
|
15
18
|
params.files.forEach((file) => {
|
|
16
19
|
sendAccountingFiles.append('files', file);
|
|
17
20
|
});
|
|
18
21
|
|
|
19
|
-
return this.axios.$post('/society/accountingFiles',
|
|
22
|
+
return this.axios.$post('/society/accountingFiles', sendAccountingFiles, { headers: { 'Content-Type': 'multipart/form-data' } });
|
|
20
23
|
}
|
|
21
24
|
|
|
22
25
|
delete(id: number): Promise<true> {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { forEach } from 'lodash';
|
|
2
|
+
import {
|
|
3
|
+
CreateCashDesk, CreateCashAndExpenseTransaction, IBankAccount, IAccountingTransaction, CreateKilometricAllowance,
|
|
4
|
+
} from '../../types';
|
|
5
|
+
import { Resource } from '../Resource';
|
|
6
|
+
|
|
7
|
+
export class CashAndExpense extends Resource {
|
|
8
|
+
create(idSociety: number, payload: CreateCashDesk): Promise<IBankAccount> {
|
|
9
|
+
return this.axios.$post(`/societies/${idSociety}/bank-accounts/cash-desk`, payload);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
createTransaction(payload: CreateCashAndExpenseTransaction): Promise<IAccountingTransaction> {
|
|
13
|
+
const formData = new FormData();
|
|
14
|
+
forEach(payload, (value, key) => {
|
|
15
|
+
if (value) {
|
|
16
|
+
if (key === 'entries') {
|
|
17
|
+
formData.append(key, `${JSON.stringify(value)}`);
|
|
18
|
+
} else {
|
|
19
|
+
formData.append(key, `${value}`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
formData.append('file', payload.file);
|
|
25
|
+
return this.axios.$post('/societies/cash-and-expense/transaction', formData, { headers: { 'Content-Type': 'multipart/form-data' } });
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
createKilometricAllowance(idSociety: number, payload: CreateKilometricAllowance): Promise<IAccountingTransaction> {
|
|
29
|
+
return this.axios.$post(`/societies/${idSociety}/kilometric-allowance`, payload);
|
|
30
|
+
}
|
|
31
|
+
}
|
package/ts/api/resources.ts
CHANGED
|
@@ -124,6 +124,7 @@ import { StatisticCustomerSuccess } from './resources/statistic/CustomerSuccess'
|
|
|
124
124
|
import { UnpaidCallHistory } from './resources/UnpaidCallHistory';
|
|
125
125
|
import { CommercialImport } from './resources/CommercialImport';
|
|
126
126
|
import { Team } from './resources/Team';
|
|
127
|
+
import { CashAndExpense } from './resources/CashAndExpense';
|
|
127
128
|
|
|
128
129
|
export const resources = {
|
|
129
130
|
simulation: Simulation,
|
|
@@ -252,4 +253,5 @@ export const resources = {
|
|
|
252
253
|
unpaidCallHistory: UnpaidCallHistory,
|
|
253
254
|
commercialImport: CommercialImport,
|
|
254
255
|
team: Team,
|
|
256
|
+
cashAndExpense: CashAndExpense,
|
|
255
257
|
};
|
package/ts/types/Enum/Account.ts
CHANGED
|
@@ -297,13 +297,13 @@ export const RoleDetail = {
|
|
|
297
297
|
name: 'Référent litige',
|
|
298
298
|
colorPrimary: '#FFF',
|
|
299
299
|
colorSecondary: '#FFF',
|
|
300
|
-
subRole:
|
|
300
|
+
subRole: false,
|
|
301
301
|
},
|
|
302
302
|
REFERENT_CLIENT: {
|
|
303
303
|
id: 48,
|
|
304
304
|
name: 'Référent client',
|
|
305
305
|
colorPrimary: '#FFF',
|
|
306
306
|
colorSecondary: '#FFF',
|
|
307
|
-
subRole:
|
|
307
|
+
subRole: false,
|
|
308
308
|
},
|
|
309
309
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiProperty } from '../../../../utils';
|
|
1
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
2
2
|
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
3
3
|
|
|
4
4
|
export class QueryAccountingFiles {
|
|
@@ -19,4 +19,7 @@ export class QueryAccountingFiles {
|
|
|
19
19
|
|
|
20
20
|
@ApiProperty()
|
|
21
21
|
files: File[];
|
|
22
|
+
|
|
23
|
+
@ApiPropertyOptional()
|
|
24
|
+
emissionDate?: string;
|
|
22
25
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { IsBoolean, IsOptional } from 'class-validator';
|
|
2
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
3
|
+
import { CashDeskTransactionType } from '../../../Enum/CashDeskTransactionType';
|
|
4
|
+
import { FormEntry } from '../accountingEntry/AnnotateAccountingTransaction';
|
|
5
|
+
import { TFile } from '../file/TFile';
|
|
6
|
+
import { AccountingJournal } from '../../../Enum/AccountingJournal';
|
|
7
|
+
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
8
|
+
|
|
9
|
+
export class CreateCashDesk {
|
|
10
|
+
@ApiProperty()
|
|
11
|
+
dateStart: Date;
|
|
12
|
+
|
|
13
|
+
@ApiProperty()
|
|
14
|
+
amountStart: number;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export class CreateCashAndExpenseTransaction {
|
|
18
|
+
@ApiProperty()
|
|
19
|
+
dateValue: string;
|
|
20
|
+
|
|
21
|
+
@ApiProperty()
|
|
22
|
+
idAccountingJournal: AccountingJournal;
|
|
23
|
+
|
|
24
|
+
@ApiProperty()
|
|
25
|
+
entries: FormEntry[];
|
|
26
|
+
|
|
27
|
+
@ApiPropertyOptional()
|
|
28
|
+
@IsOptional()
|
|
29
|
+
idSocietyPartner?: number;
|
|
30
|
+
|
|
31
|
+
@ApiPropertyOptional()
|
|
32
|
+
@IsOptional()
|
|
33
|
+
cashDeskTransactionType?: CashDeskTransactionType;
|
|
34
|
+
|
|
35
|
+
@ApiPropertyOptional()
|
|
36
|
+
@IsOptional()
|
|
37
|
+
@IsBoolean()
|
|
38
|
+
@ToBoolean()
|
|
39
|
+
bypassAmountLimit?: boolean;
|
|
40
|
+
|
|
41
|
+
@ApiPropertyOptional()
|
|
42
|
+
@IsOptional()
|
|
43
|
+
file?: TFile;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export class CreateKilometricAllowance {
|
|
47
|
+
@ApiProperty()
|
|
48
|
+
idSocietyVehicle: number;
|
|
49
|
+
|
|
50
|
+
@ApiProperty()
|
|
51
|
+
dateValue: Date;
|
|
52
|
+
|
|
53
|
+
@ApiProperty()
|
|
54
|
+
distance: number;
|
|
55
|
+
|
|
56
|
+
@ApiProperty()
|
|
57
|
+
reason: string;
|
|
58
|
+
|
|
59
|
+
@ApiProperty()
|
|
60
|
+
departureCity: string;
|
|
61
|
+
|
|
62
|
+
@ApiProperty()
|
|
63
|
+
arrivalCity: string;
|
|
64
|
+
|
|
65
|
+
@ApiProperty()
|
|
66
|
+
idSocietyPartner: number;
|
|
67
|
+
}
|
|
@@ -184,6 +184,9 @@ export enum Code {
|
|
|
184
184
|
CAN_NOT_DELETE_DOCUMENT = 'can_not_delete_document',
|
|
185
185
|
CAN_NOT_EDIT_INVOICE = 'can_not_edit_invoice',
|
|
186
186
|
INVALID_INVOICE_TYPE = 'invalid_invoice_type',
|
|
187
|
+
|
|
188
|
+
// Expense Notes
|
|
189
|
+
LIMIT_MONTH_REACHED = 'limit_month_reached',
|
|
187
190
|
}
|
|
188
191
|
|
|
189
192
|
export interface IApiError {
|
package/ts/types/index.ts
CHANGED
|
@@ -480,6 +480,8 @@ export * from './Enum/ReasonTerminationType';
|
|
|
480
480
|
export * from './Enum/RemoteType';
|
|
481
481
|
export * from './Enum/EntityType';
|
|
482
482
|
export * from './Enum/Compensation';
|
|
483
|
+
export * from './Enum/CashDeskTransactionType';
|
|
484
|
+
export * from './Enum/ThirdParty';
|
|
483
485
|
|
|
484
486
|
// Interfaces API
|
|
485
487
|
export * from './Interface/api/partnerTransactionType/ReadPartnerTransactionType';
|
|
@@ -903,6 +905,7 @@ export * from './Interface/api/prestations/QueryGetAllPrestations';
|
|
|
903
905
|
export * from './Interface/api/commercialImport/Read';
|
|
904
906
|
export * from './Interface/api/commercialImport/Query';
|
|
905
907
|
export * from './Interface/api/commercialImport/Create';
|
|
908
|
+
export * from './Interface/api/cashAndExpense/Create';
|
|
906
909
|
|
|
907
910
|
// Enums types
|
|
908
911
|
export * from './Interface/enum/Util';
|