@silexpert/core 1.2.98 → 1.2.99

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 (37) hide show
  1. package/dist/cjs/api/resources/FIle.d.ts +2 -1
  2. package/dist/cjs/api/resources/FIle.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/FIle.js +3 -0
  4. package/dist/cjs/api/resources/FIle.js.map +1 -1
  5. package/dist/cjs/api/resources/InternalInvoicing.d.ts +1 -0
  6. package/dist/cjs/api/resources/InternalInvoicing.d.ts.map +1 -1
  7. package/dist/cjs/api/resources/InternalInvoicing.js +12 -0
  8. package/dist/cjs/api/resources/InternalInvoicing.js.map +1 -1
  9. package/dist/cjs/types/Interface/api/file/Query.d.ts +10 -0
  10. package/dist/cjs/types/Interface/api/file/Query.d.ts.map +1 -0
  11. package/dist/cjs/types/Interface/api/file/Query.js +55 -0
  12. package/dist/cjs/types/Interface/api/file/Query.js.map +1 -0
  13. package/dist/cjs/types/index.d.ts +1 -0
  14. package/dist/cjs/types/index.d.ts.map +1 -1
  15. package/dist/cjs/types/index.js +1 -0
  16. package/dist/cjs/types/index.js.map +1 -1
  17. package/dist/mjs/api/resources/FIle.d.ts +2 -1
  18. package/dist/mjs/api/resources/FIle.d.ts.map +1 -1
  19. package/dist/mjs/api/resources/FIle.js +6 -0
  20. package/dist/mjs/api/resources/FIle.js.map +1 -1
  21. package/dist/mjs/api/resources/InternalInvoicing.d.ts +1 -0
  22. package/dist/mjs/api/resources/InternalInvoicing.d.ts.map +1 -1
  23. package/dist/mjs/api/resources/InternalInvoicing.js +12 -0
  24. package/dist/mjs/api/resources/InternalInvoicing.js.map +1 -1
  25. package/dist/mjs/types/Interface/api/file/Query.d.ts +10 -0
  26. package/dist/mjs/types/Interface/api/file/Query.d.ts.map +1 -0
  27. package/dist/mjs/types/Interface/api/file/Query.js +57 -0
  28. package/dist/mjs/types/Interface/api/file/Query.js.map +1 -0
  29. package/dist/mjs/types/index.d.ts +1 -0
  30. package/dist/mjs/types/index.d.ts.map +1 -1
  31. package/dist/mjs/types/index.js +1 -0
  32. package/dist/mjs/types/index.js.map +1 -1
  33. package/package.json +1 -1
  34. package/ts/api/resources/FIle.ts +8 -1
  35. package/ts/api/resources/InternalInvoicing.ts +12 -0
  36. package/ts/types/Interface/api/file/Query.ts +35 -0
  37. package/ts/types/index.ts +1 -0
@@ -1,5 +1,5 @@
1
1
  import { Resource } from '../Resource';
2
- import { ReadFile, CreateFile, IFile } from '../../types';
2
+ import { ReadFile, CreateFile, IFile, BasePaginate, QueryFilePaginated } from '../../types';
3
3
 
4
4
  export class File extends Resource {
5
5
  upload(params: Omit<CreateFile, 'file'>, file: File): Promise<ReadFile> {
@@ -16,6 +16,13 @@ export class File extends Resource {
16
16
  return this.axios.$post('files', formData, { headers: { 'Content-Type': 'multipart/form-data' } });
17
17
  }
18
18
 
19
+ public getPaginated(params: QueryFilePaginated, signal?: AbortSignal): Promise<BasePaginate<IFile>> {
20
+ return this.axios.$get('/files/paginated', {
21
+ ...(signal ? { signal } : {}),
22
+ params,
23
+ });
24
+ }
25
+
19
26
  get(id: number, idSociety: number): Promise<ReadFile> {
20
27
  return this.axios.$get(`societies/${idSociety}/files/${id}`);
21
28
  }
@@ -17,4 +17,16 @@ export class InternalInvoicing extends Resource {
17
17
  regenerate(params: RegenerateInternalInvoicing): Promise<number> {
18
18
  return this.axios.$post('/internalInvoicing/regenerate', params);
19
19
  }
20
+ generateCutOff(type: number): Promise<boolean> {
21
+ switch (type) {
22
+ case 1:
23
+ return this.axios.$post('/internalInvoicing/cutOff/PCA', {});
24
+ case 2:
25
+ return this.axios.$post('/internalInvoicing/cutOff/FAE', {});
26
+ case 3:
27
+ return this.axios.$post('/internalInvoicing/cutOff/AAE', {});
28
+ default:
29
+ return this.axios.$post('/internalInvoicing/cutOff/PCA', {});
30
+ }
31
+ }
20
32
  }
@@ -0,0 +1,35 @@
1
+ import { IsDate, IsNumber, IsOptional, IsString } from 'class-validator';
2
+ import { ApiPropertyOptional } from '../../../../utils';
3
+ import { OptionalQueryPaginate } from '../BasePaginate';
4
+
5
+ export class QueryFilePaginated extends OptionalQueryPaginate {
6
+ @ApiPropertyOptional()
7
+ @IsOptional()
8
+ @IsString()
9
+ search?: string;
10
+
11
+ @ApiPropertyOptional()
12
+ @IsOptional()
13
+ @IsNumber()
14
+ idFolderFile?: number;
15
+
16
+ @ApiPropertyOptional()
17
+ @IsOptional()
18
+ @IsNumber()
19
+ idSociety?: number;
20
+
21
+ @ApiPropertyOptional()
22
+ @IsOptional()
23
+ @IsNumber()
24
+ idFileType?: number;
25
+
26
+ @ApiPropertyOptional()
27
+ @IsOptional()
28
+ @IsDate()
29
+ startDate?: Date;
30
+
31
+ @ApiPropertyOptional()
32
+ @IsOptional()
33
+ @IsDate()
34
+ endDate?: Date;
35
+ }
package/ts/types/index.ts CHANGED
@@ -1048,6 +1048,7 @@ export * from './Interface/api/qonto/GetConnectionInformation';
1048
1048
  export * from './Interface/api/qonto/Read';
1049
1049
  export * from './Interface/api/file/Create';
1050
1050
  export * from './Interface/api/file/Read';
1051
+ export * from './Interface/api/file/Query';
1051
1052
  export * from './Interface/api/societyConfig/update';
1052
1053
  export * from './Interface/api/wallet/UpdateAttribution';
1053
1054
  export * from './Interface/api/exercicePrestation/Query';