@silexpert/core 1.0.172 → 1.0.173

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 (74) hide show
  1. package/es/api/resources/WorkingSchedule.d.ts +2 -1
  2. package/es/api/resources/WorkingSchedule.d.ts.map +1 -1
  3. package/es/api/resources/WorkingSchedule.js +3 -0
  4. package/es/api/resources/WorkingSchedule.js.map +1 -1
  5. package/es/api/resources/statistic/CustomerSuccess.d.ts +7 -0
  6. package/es/api/resources/statistic/CustomerSuccess.d.ts.map +1 -0
  7. package/es/api/resources/statistic/CustomerSuccess.js +7 -0
  8. package/es/api/resources/statistic/CustomerSuccess.js.map +1 -0
  9. package/es/api/resources.d.ts +2 -0
  10. package/es/api/resources.d.ts.map +1 -1
  11. package/es/api/resources.js +2 -0
  12. package/es/api/resources.js.map +1 -1
  13. package/es/types/Enum/PartnerTransactionType.d.ts +4 -0
  14. package/es/types/Enum/PartnerTransactionType.d.ts.map +1 -1
  15. package/es/types/Enum/PartnerTransactionType.js +26 -0
  16. package/es/types/Enum/PartnerTransactionType.js.map +1 -1
  17. package/es/types/Enum/StatisticType.d.ts +2 -1
  18. package/es/types/Enum/StatisticType.d.ts.map +1 -1
  19. package/es/types/Enum/StatisticType.js +1 -0
  20. package/es/types/Enum/StatisticType.js.map +1 -1
  21. package/es/types/Interface/api/statistic/QueryCustomerSuccess.d.ts +5 -0
  22. package/es/types/Interface/api/statistic/QueryCustomerSuccess.d.ts.map +1 -0
  23. package/es/types/Interface/api/statistic/QueryCustomerSuccess.js +26 -0
  24. package/es/types/Interface/api/statistic/QueryCustomerSuccess.js.map +1 -0
  25. package/es/types/Interface/api/statistic/QueryInternal.d.ts +1 -0
  26. package/es/types/Interface/api/statistic/QueryInternal.d.ts.map +1 -1
  27. package/es/types/Interface/api/statistic/QueryInternal.js +7 -1
  28. package/es/types/Interface/api/statistic/QueryInternal.js.map +1 -1
  29. package/es/types/Interface/api/workingSchedule/QueryDailyHour.d.ts +16 -0
  30. package/es/types/Interface/api/workingSchedule/QueryDailyHour.d.ts.map +1 -1
  31. package/es/types/Interface/api/workingSchedule/QueryDailyHour.js.map +1 -1
  32. package/es/types/Interface/models/IUserFile.d.ts +12 -0
  33. package/es/types/Interface/models/IUserFile.d.ts.map +1 -0
  34. package/es/types/Interface/models/IUserFile.js +2 -0
  35. package/es/types/Interface/models/IUserFile.js.map +1 -0
  36. package/es/types/Interface/models/IUserSocietyPermission.d.ts +4 -2
  37. package/es/types/Interface/models/IUserSocietyPermission.d.ts.map +1 -1
  38. package/es/types/Interface/models/IUserSocietyPermission.js.map +1 -1
  39. package/es/types/index.d.ts +2 -0
  40. package/es/types/index.d.ts.map +1 -1
  41. package/es/types/index.js +2 -0
  42. package/es/types/index.js.map +1 -1
  43. package/js/api/resources/WorkingSchedule.js +3 -0
  44. package/js/api/resources/WorkingSchedule.js.map +1 -1
  45. package/js/api/resources/statistic/CustomerSuccess.js +18 -0
  46. package/js/api/resources/statistic/CustomerSuccess.js.map +1 -0
  47. package/js/api/resources.js +2 -0
  48. package/js/api/resources.js.map +1 -1
  49. package/js/types/Enum/PartnerTransactionType.js +19 -0
  50. package/js/types/Enum/PartnerTransactionType.js.map +1 -1
  51. package/js/types/Enum/StatisticType.js +1 -0
  52. package/js/types/Enum/StatisticType.js.map +1 -1
  53. package/js/types/Interface/api/statistic/QueryCustomerSuccess.js +24 -0
  54. package/js/types/Interface/api/statistic/QueryCustomerSuccess.js.map +1 -0
  55. package/js/types/Interface/api/statistic/QueryInternal.js +1 -0
  56. package/js/types/Interface/api/statistic/QueryInternal.js.map +1 -1
  57. package/js/types/Interface/api/workingSchedule/QueryDailyHour.js.map +1 -1
  58. package/js/types/Interface/models/IUserFile.js +6 -0
  59. package/js/types/Interface/models/IUserFile.js.map +1 -0
  60. package/js/types/Interface/models/IUserSocietyPermission.js.map +1 -1
  61. package/js/types/index.js +20 -0
  62. package/js/types/index.js.map +1 -1
  63. package/package.json +1 -1
  64. package/ts/api/resources/WorkingSchedule.ts +5 -1
  65. package/ts/api/resources/statistic/CustomerSuccess.ts +9 -0
  66. package/ts/api/resources.ts +2 -0
  67. package/ts/types/Enum/PartnerTransactionType.ts +28 -1
  68. package/ts/types/Enum/StatisticType.ts +1 -0
  69. package/ts/types/Interface/api/statistic/QueryCustomerSuccess.ts +14 -0
  70. package/ts/types/Interface/api/statistic/QueryInternal.ts +6 -1
  71. package/ts/types/Interface/api/workingSchedule/QueryDailyHour.ts +21 -1
  72. package/ts/types/Interface/models/IUserFile.ts +14 -0
  73. package/ts/types/Interface/models/IUserSocietyPermission.ts +4 -2
  74. package/ts/types/index.ts +2 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.0.172",
3
+ "version": "1.0.173",
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,5 +1,5 @@
1
1
  import { Resource } from '../Resource';
2
- import { SpecialHours } from '../..';
2
+ import { ReadWorkingSchedule, SpecialHours } from '../..';
3
3
 
4
4
  export class WorkingSchedule extends Resource {
5
5
  getSpecialHoursForCollaborator(idUser: number, startDate: Date, endDate: Date): Promise<SpecialHours> {
@@ -17,4 +17,8 @@ export class WorkingSchedule extends Resource {
17
17
  },
18
18
  });
19
19
  }
20
+
21
+ get(id: number): Promise<ReadWorkingSchedule> {
22
+ return this.axios.$get(`workingSchedule/${id}`);
23
+ }
20
24
  }
@@ -0,0 +1,9 @@
1
+ import { CancelToken } from 'axios';
2
+ import { Resource } from '../../Resource';
3
+ import { QueryCustomerSuccess } from '../../../types';
4
+
5
+ export class StatisticCustomerSuccess extends Resource {
6
+ public get(params: QueryCustomerSuccess, cancelToken?: CancelToken): Promise<JSON> {
7
+ return this.axios.$get('/statistic-cs', { params, ...(cancelToken ? { cancelToken } : {}) });
8
+ }
9
+ }
@@ -120,6 +120,7 @@ import { Acceptance } from './resources/Acceptance';
120
120
  import { Rating } from './resources/Rating';
121
121
  import { Quotation } from './resources/Quotation';
122
122
  import { Prestations } from './resources/Prestations';
123
+ import { StatisticCustomerSuccess } from './resources/statistic/CustomerSuccess';
123
124
  import { UnpaidCallHistory } from './resources/UnpaidCallHistory';
124
125
 
125
126
  export const resources = {
@@ -230,6 +231,7 @@ export const resources = {
230
231
  statisticAccountant: StatisticAccountant,
231
232
  statisticDirection: StatisticDirection,
232
233
  statisticExpertAccountant: StatisticExpertAccountant,
234
+ statisticCustomerSuccess: StatisticCustomerSuccess,
233
235
  paymentExpectation: PaymentExpectation,
234
236
  terminationList: TerminationList,
235
237
  slowDetection: SlowDetection,
@@ -5,4 +5,31 @@ export enum PartnerTransactionType {
5
5
  SHINE = 4,
6
6
  STRIPE = 5,
7
7
  JE_DECLARE = 6,
8
- }
8
+ }
9
+
10
+ export const PartnerTransactionTypeList: Array<{ value: PartnerTransactionType, text: string }> = [
11
+ {
12
+ value: PartnerTransactionType.OTHER,
13
+ text: 'Autres (CSV, Notes de frais, Espèces)',
14
+ },
15
+ {
16
+ value: PartnerTransactionType.BUDGET_INSIGHT,
17
+ text: 'Budget Insight',
18
+ },
19
+ {
20
+ value: PartnerTransactionType.QONTO,
21
+ text: 'Qonto',
22
+ },
23
+ {
24
+ value: PartnerTransactionType.SHINE,
25
+ text: 'Shine',
26
+ },
27
+ {
28
+ value: PartnerTransactionType.STRIPE,
29
+ text: 'Stripe',
30
+ },
31
+ {
32
+ value: PartnerTransactionType.JE_DECLARE,
33
+ text: 'Je Declare',
34
+ },
35
+ ];
@@ -12,4 +12,5 @@ export enum StatisticType {
12
12
  ACCOUNTANT_BALANCE_SHEET = 11,
13
13
  ACCOUNTANT_ADDITIONNAL_SELL = 12,
14
14
  ACCOUNTANT_VAT = 13,
15
+ CUSTOMER_SUCCESS_WALL = 14,
15
16
  }
@@ -0,0 +1,14 @@
1
+ import { IsNumber, IsDate, IsIn } from 'class-validator';
2
+ import { ApiProperty } from '../../../../utils';
3
+ import { StatisticType } from '../../../Enum/StatisticType';
4
+
5
+ export class QueryCustomerSuccess {
6
+ @ApiProperty()
7
+ @IsDate()
8
+ endDate: Date;
9
+
10
+ @ApiProperty()
11
+ @IsNumber()
12
+ @IsIn(Object.values(StatisticType))
13
+ type: number;
14
+ }
@@ -1,5 +1,5 @@
1
1
  import {
2
- IsNumber, IsOptional, IsBoolean,
2
+ IsNumber, IsOptional, IsBoolean, IsArray,
3
3
  } from 'class-validator';
4
4
  import { ApiPropertyOptional } from '../../../../utils';
5
5
 
@@ -13,4 +13,9 @@ export class QueryInternal {
13
13
  @IsOptional()
14
14
  @IsNumber()
15
15
  idUser?: number;
16
+
17
+ @ApiPropertyOptional()
18
+ @IsOptional()
19
+ @IsArray()
20
+ idUsers?: number[];
16
21
  }
@@ -1,3 +1,5 @@
1
+ import { IFile } from '../../models/IFile';
2
+
1
3
  export interface DailyHour {
2
4
  from: number;
3
5
  to: number;
@@ -11,4 +13,22 @@ export interface SpecialHours {
11
13
  3?: DailyHour | DailyHour[];
12
14
  4?: DailyHour | DailyHour[];
13
15
  5?: DailyHour | DailyHour[];
14
- }
16
+ }
17
+
18
+ export type ReadFilesUser = Array< {
19
+ name: string;
20
+ createdAt: string;
21
+ }>;
22
+
23
+ export type ReadWorkingSchedule = Array< {
24
+ idDay: number;
25
+ idUser: number;
26
+ idWorkingSchedule: number;
27
+ isRemote: boolean;
28
+ morningStart: string;
29
+ morningEnd: string;
30
+ afternoonStart: string;
31
+ afternoonEnd: string;
32
+ files?: IFile[];
33
+ }
34
+ >;
@@ -0,0 +1,14 @@
1
+ import { IUser } from './IUser';
2
+ import { IFile } from './IFile';
3
+
4
+ export interface IUserFile {
5
+ id?: number;
6
+ idUser: number | null;
7
+ idFile: number | null;
8
+ createdAt?: Date | null;
9
+ updatedAt?: Date | null;
10
+
11
+ // Associations
12
+ user: IUser;
13
+ file: IFile;
14
+ }
@@ -1,5 +1,6 @@
1
1
  import { IPermission } from './IPermission';
2
2
  import { ISociety } from './ISociety';
3
+ import { IUser } from './IUser';
3
4
 
4
5
  // usersSocietiesPermissions
5
6
  export interface IUserSocietyPermission {
@@ -12,6 +13,7 @@ export interface IUserSocietyPermission {
12
13
  updatedAt?: Date | null;
13
14
 
14
15
  // Associations
15
- permission: IPermission;
16
- society: ISociety;
16
+ permission?: IPermission;
17
+ society?: ISociety;
18
+ user?: IUser;
17
19
  }
package/ts/types/index.ts CHANGED
@@ -268,6 +268,7 @@ export * from './Interface/models/IUserNotification';
268
268
  export * from './Interface/models/IUserSocietyPermission';
269
269
  export * from './Interface/models/IUserSocietyTicketSupport';
270
270
  export * from './Interface/models/IUserTeam';
271
+ export * from './Interface/models/IUserFile';
271
272
  export * from './Interface/models/IUserTest';
272
273
  export * from './Interface/models/IVatDeclaration';
273
274
  export * from './Interface/models/IVatDeclarationCertificate';
@@ -693,6 +694,7 @@ export * from './Interface/api/statistic/QueryGetAccountant';
693
694
  export * from './Interface/api/statistic/QueryDirection';
694
695
  export * from './Interface/api/statistic/QueryInternal';
695
696
  export * from './Interface/api/statistic/QueryGetDirection';
697
+ export * from './Interface/api/statistic/QueryCustomerSuccess';
696
698
  export * from './Interface/api/pappers/CreatePappers';
697
699
  export * from './Interface/api/bankAccount/DeleteTransaction';
698
700
  export * from './Interface/api/stripe/QueryStripe';