@silexpert/core 1.0.152 → 1.0.154

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 (57) hide show
  1. package/es/api/resources/Rule.d.ts +4 -2
  2. package/es/api/resources/Rule.d.ts.map +1 -1
  3. package/es/api/resources/Rule.js +6 -0
  4. package/es/api/resources/Rule.js.map +1 -1
  5. package/es/api/resources/Shine.js +4 -4
  6. package/es/api/resources/Shine.js.map +1 -1
  7. package/es/types/Enum/PrestationType.d.ts +1 -1
  8. package/es/types/Enum/PrestationType.js +1 -1
  9. package/es/types/Enum/PrestationType.js.map +1 -1
  10. package/es/types/Interface/api/partner/Query.d.ts +3 -3
  11. package/es/types/Interface/api/partner/Query.d.ts.map +1 -1
  12. package/es/types/Interface/api/partner/Query.js +3 -3
  13. package/es/types/Interface/api/partner/Query.js.map +1 -1
  14. package/es/types/Interface/api/rule/Create.d.ts +10 -0
  15. package/es/types/Interface/api/rule/Create.d.ts.map +1 -0
  16. package/es/types/Interface/api/rule/Create.js +46 -0
  17. package/es/types/Interface/api/rule/Create.js.map +1 -0
  18. package/es/types/Interface/api/rule/Update.d.ts +4 -0
  19. package/es/types/Interface/api/rule/Update.d.ts.map +1 -0
  20. package/es/types/Interface/api/rule/Update.js +21 -0
  21. package/es/types/Interface/api/rule/Update.js.map +1 -0
  22. package/es/types/Interface/models/IAccountingTransaction.d.ts +1 -0
  23. package/es/types/Interface/models/IAccountingTransaction.d.ts.map +1 -1
  24. package/es/types/Interface/models/IAccountingTransaction.js.map +1 -1
  25. package/es/types/Interface/models/IRule.d.ts +2 -0
  26. package/es/types/Interface/models/IRule.d.ts.map +1 -1
  27. package/es/types/Interface/models/IRule.js.map +1 -1
  28. package/es/types/index.d.ts +3 -0
  29. package/es/types/index.d.ts.map +1 -1
  30. package/es/types/index.js +3 -0
  31. package/es/types/index.js.map +1 -1
  32. package/js/api/resources/Rule.js +6 -0
  33. package/js/api/resources/Rule.js.map +1 -1
  34. package/js/api/resources/Shine.js +4 -4
  35. package/js/api/resources/Shine.js.map +1 -1
  36. package/js/types/Enum/PrestationType.js +1 -1
  37. package/js/types/Enum/PrestationType.js.map +1 -1
  38. package/js/types/Interface/api/partner/Query.js +3 -3
  39. package/js/types/Interface/api/partner/Query.js.map +1 -1
  40. package/js/types/Interface/api/rule/Create.js +29 -0
  41. package/js/types/Interface/api/rule/Create.js.map +1 -0
  42. package/js/types/Interface/api/rule/Update.js +23 -0
  43. package/js/types/Interface/api/rule/Update.js.map +1 -0
  44. package/js/types/Interface/models/IAccountingTransaction.js.map +1 -1
  45. package/js/types/Interface/models/IRule.js.map +1 -1
  46. package/js/types/index.js +30 -0
  47. package/js/types/index.js.map +1 -1
  48. package/package.json +1 -1
  49. package/ts/api/resources/Rule.ts +12 -2
  50. package/ts/api/resources/Shine.ts +4 -4
  51. package/ts/types/Enum/PrestationType.ts +1 -1
  52. package/ts/types/Interface/api/partner/Query.ts +3 -3
  53. package/ts/types/Interface/api/rule/Create.ts +29 -0
  54. package/ts/types/Interface/api/rule/Update.ts +10 -0
  55. package/ts/types/Interface/models/IAccountingTransaction.ts +1 -0
  56. package/ts/types/Interface/models/IRule.ts +2 -0
  57. 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.152",
3
+ "version": "1.0.154",
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",
@@ -1,14 +1,24 @@
1
- import { BasePaginate } from '../../types';
1
+ import {
2
+ BasePaginate, CreateRule, IRule, UpdateRule,
3
+ } from '../../types';
2
4
  import { QueryRule, QueryMostFrequent } from '../../types/Interface/api/rule/Query';
3
5
  import { ReadMostFrequentOccurence } from '../../types/Interface/api/rule/Read';
4
6
  import { Resource } from '../Resource';
5
7
 
6
8
  export class Rule extends Resource {
7
- getAll(params: QueryRule): Promise<BasePaginate<Rule>> {
9
+ getAll(params: QueryRule): Promise<BasePaginate<IRule>> {
8
10
  return this.axios.$get('rules', { params });
9
11
  }
10
12
 
11
13
  getMostFrequent(params: QueryMostFrequent): Promise<ReadMostFrequentOccurence[]> {
12
14
  return this.axios.$get('rules/most-frequent', { params });
13
15
  }
16
+
17
+ create(params: CreateRule): Promise<IRule> {
18
+ return this.axios.$post('rules', params);
19
+ }
20
+
21
+ update(idRule: number, params: UpdateRule): Promise<IRule> {
22
+ return this.axios.$post(`rules/${idRule}`, params);
23
+ }
14
24
  }
@@ -5,15 +5,15 @@ import {
5
5
 
6
6
  export class Shine extends Resource {
7
7
  connect(idSociety: number, params: GetConnect): Promise<ConnectResponse> {
8
- return this.axios.$get(`/shine/${idSociety}/connect`, { params });
8
+ return this.axios.$get(`/connectors/shine/${idSociety}/connect`, { params });
9
9
  }
10
10
  importBankAccount(idSociety: number, params: CreateShineAccount): Promise<IBankAccount> {
11
- return this.axios.$post(`/shine/${idSociety}/importBankAccount`, params);
11
+ return this.axios.$post(`/connectors/shine/${idSociety}/importBankAccount`, params);
12
12
  }
13
13
  importTransactions(params: CreateShineTransactions): Promise<number> {
14
- return this.axios.$post('/shine/importTransactions', params);
14
+ return this.axios.$post('/connectors/shine/importTransactions', params);
15
15
  }
16
16
  refreshConnection(idBankConnection: number): Promise<IBankConnection> {
17
- return this.axios.$put(`/shine/${idBankConnection}/refresh-connection`);
17
+ return this.axios.$put(`/connectors/shine/${idBankConnection}/refresh-connection`);
18
18
  }
19
19
  }
@@ -2724,7 +2724,7 @@ export const PrestationDetail = {
2724
2724
  isCatalog: 1,
2725
2725
  hidden: 0,
2726
2726
  isComplementary: 0,
2727
- signaturePosition: null,
2727
+ signaturePosition: '400,54,569,90',
2728
2728
  signaturePage: null,
2729
2729
  },
2730
2730
  COMPTA_POURCENTAGE_EXPRESS: {
@@ -12,10 +12,10 @@ export class GetPartners {
12
12
 
13
13
  export class GetPartnersCurrentAccounts {
14
14
  @ApiProperty()
15
- startDate!: Date;
15
+ startDate!: string;
16
16
 
17
17
  @ApiProperty()
18
- endDate!: Date;
18
+ endDate!: string;
19
19
 
20
20
  @ApiPropertyOptional()
21
21
  descending?: boolean;
@@ -26,7 +26,7 @@ export class GetPartnersCurrentAccounts {
26
26
 
27
27
  export class GetPartnerSolde {
28
28
  @ApiProperty()
29
- endDate!: Date;
29
+ endDate!: string;
30
30
 
31
31
  @ApiProperty()
32
32
  page: number;
@@ -0,0 +1,29 @@
1
+ import { IsBoolean, IsOptional } from 'class-validator';
2
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
+ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
4
+
5
+ export class CreateRule {
6
+ @ApiProperty()
7
+ designation: string;
8
+
9
+ @ApiProperty()
10
+ basicDesignation: string;
11
+
12
+ @ApiPropertyOptional()
13
+ idTva?: number;
14
+
15
+ @ApiPropertyOptional()
16
+ idAccount?: number;
17
+
18
+ @ApiPropertyOptional()
19
+ idNature?: number;
20
+
21
+ @ApiPropertyOptional()
22
+ idThirdParty?: number;
23
+
24
+ @ApiPropertyOptional()
25
+ @IsOptional()
26
+ @IsBoolean()
27
+ @ToBoolean()
28
+ autolock?: boolean;
29
+ }
@@ -0,0 +1,10 @@
1
+ import { IsBoolean } from 'class-validator';
2
+ import { ApiProperty } from '../../../../utils';
3
+ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
4
+
5
+ export class UpdateRule {
6
+ @ApiProperty()
7
+ @IsBoolean()
8
+ @ToBoolean()
9
+ autolock: boolean;
10
+ }
@@ -16,6 +16,7 @@ import { IMachineLearningResult } from './IMachineLearningResult';
16
16
  export interface IAccountingTransaction {
17
17
  id?: number;
18
18
  label: string | null;
19
+ budgeaTransactionId?: string | null;
19
20
  originalLabel?: string | null;
20
21
  invoiceNumber: string | null;
21
22
  reference: string | null;
@@ -1,6 +1,7 @@
1
1
  import { IVat } from './IVat';
2
2
  import { IAccount } from './IAccount';
3
3
  import { IThirdParty } from './IThirdParty';
4
+ import { INature } from './INature';
4
5
 
5
6
  // rules
6
7
  export interface IRule {
@@ -23,4 +24,5 @@ export interface IRule {
23
24
  tva: IVat;
24
25
  account: IAccount;
25
26
  thirdParty: IThirdParty;
27
+ nature: INature;
26
28
  }
package/ts/types/index.ts CHANGED
@@ -876,6 +876,9 @@ export * from './Interface/api/iDocus/CreateExport';
876
876
  export * from './Interface/api/pdf/ReadPdftkizer';
877
877
  export * from './Interface/api/signFile/CreateFileToSign';
878
878
  export * from './Interface/api/rule/Query';
879
+ export * from './Interface/api/rule/Create';
880
+ export * from './Interface/api/rule/Update';
881
+ export * from './Interface/api/rule/Read';
879
882
  export * from './Interface/api/revive/PostRevive';
880
883
  export * from './Interface/api/acceptance/CreateAcceptance';
881
884