@silexpert/core 1.3.112 → 1.3.113

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 (96) hide show
  1. package/dist/cjs/api/resources/CalendarEvent.d.ts +2 -2
  2. package/dist/cjs/api/resources/CalendarEvent.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/CalendarEvent.js +2 -2
  4. package/dist/cjs/api/resources/CalendarEvent.js.map +1 -1
  5. package/dist/cjs/api/resources/Sellsy.d.ts +15 -0
  6. package/dist/cjs/api/resources/Sellsy.d.ts.map +1 -0
  7. package/dist/cjs/api/resources/Sellsy.js +17 -0
  8. package/dist/cjs/api/resources/Sellsy.js.map +1 -0
  9. package/dist/cjs/api/resources.d.ts +2 -0
  10. package/dist/cjs/api/resources.d.ts.map +1 -1
  11. package/dist/cjs/api/resources.js +2 -0
  12. package/dist/cjs/api/resources.js.map +1 -1
  13. package/dist/cjs/types/Form/FormConnector.d.ts +1 -0
  14. package/dist/cjs/types/Form/FormConnector.d.ts.map +1 -1
  15. package/dist/cjs/types/Form/FormConnector.js +83 -0
  16. package/dist/cjs/types/Form/FormConnector.js.map +1 -1
  17. package/dist/cjs/types/Interface/api/calendarEvent/calendarEvent.d.ts +4 -0
  18. package/dist/cjs/types/Interface/api/calendarEvent/calendarEvent.d.ts.map +1 -0
  19. package/dist/cjs/types/Interface/api/calendarEvent/calendarEvent.js +26 -0
  20. package/dist/cjs/types/Interface/api/calendarEvent/calendarEvent.js.map +1 -0
  21. package/dist/cjs/types/Interface/api/connector/OAuthTokenRequest.d.ts +12 -0
  22. package/dist/cjs/types/Interface/api/connector/OAuthTokenRequest.d.ts.map +1 -0
  23. package/dist/cjs/types/Interface/api/connector/OAuthTokenRequest.js +3 -0
  24. package/dist/cjs/types/Interface/api/connector/OAuthTokenRequest.js.map +1 -0
  25. package/dist/cjs/types/Interface/api/sellsy/SellsyConnectionStatus.d.ts +11 -0
  26. package/dist/cjs/types/Interface/api/sellsy/SellsyConnectionStatus.d.ts.map +1 -0
  27. package/dist/cjs/types/Interface/api/sellsy/SellsyConnectionStatus.js +3 -0
  28. package/dist/cjs/types/Interface/api/sellsy/SellsyConnectionStatus.js.map +1 -0
  29. package/dist/cjs/types/Interface/api/sellsy/SellsyOauthCallback.d.ts +10 -0
  30. package/dist/cjs/types/Interface/api/sellsy/SellsyOauthCallback.d.ts.map +1 -0
  31. package/dist/cjs/types/Interface/api/sellsy/SellsyOauthCallback.js +36 -0
  32. package/dist/cjs/types/Interface/api/sellsy/SellsyOauthCallback.js.map +1 -0
  33. package/dist/cjs/types/Interface/models/ICalendarEventUser.d.ts +2 -0
  34. package/dist/cjs/types/Interface/models/ICalendarEventUser.d.ts.map +1 -1
  35. package/dist/cjs/types/Interface/models/ICalendarEventUser.js.map +1 -1
  36. package/dist/cjs/types/Interface/models/IConnector.d.ts +1 -0
  37. package/dist/cjs/types/Interface/models/IConnector.d.ts.map +1 -1
  38. package/dist/cjs/types/Interface/models/IConnector.js.map +1 -1
  39. package/dist/cjs/types/index.d.ts +4 -0
  40. package/dist/cjs/types/index.d.ts.map +1 -1
  41. package/dist/cjs/types/index.js +4 -0
  42. package/dist/cjs/types/index.js.map +1 -1
  43. package/dist/mjs/api/resources/CalendarEvent.d.ts +2 -2
  44. package/dist/mjs/api/resources/CalendarEvent.d.ts.map +1 -1
  45. package/dist/mjs/api/resources/CalendarEvent.js +2 -2
  46. package/dist/mjs/api/resources/CalendarEvent.js.map +1 -1
  47. package/dist/mjs/api/resources/Sellsy.d.ts +15 -0
  48. package/dist/mjs/api/resources/Sellsy.d.ts.map +1 -0
  49. package/dist/mjs/api/resources/Sellsy.js +13 -0
  50. package/dist/mjs/api/resources/Sellsy.js.map +1 -0
  51. package/dist/mjs/api/resources.d.ts +2 -0
  52. package/dist/mjs/api/resources.d.ts.map +1 -1
  53. package/dist/mjs/api/resources.js +2 -0
  54. package/dist/mjs/api/resources.js.map +1 -1
  55. package/dist/mjs/types/Form/FormConnector.d.ts +1 -0
  56. package/dist/mjs/types/Form/FormConnector.d.ts.map +1 -1
  57. package/dist/mjs/types/Form/FormConnector.js +84 -11
  58. package/dist/mjs/types/Form/FormConnector.js.map +1 -1
  59. package/dist/mjs/types/Interface/api/calendarEvent/calendarEvent.d.ts +4 -0
  60. package/dist/mjs/types/Interface/api/calendarEvent/calendarEvent.d.ts.map +1 -0
  61. package/dist/mjs/types/Interface/api/calendarEvent/calendarEvent.js +23 -0
  62. package/dist/mjs/types/Interface/api/calendarEvent/calendarEvent.js.map +1 -0
  63. package/dist/mjs/types/Interface/api/connector/OAuthTokenRequest.d.ts +12 -0
  64. package/dist/mjs/types/Interface/api/connector/OAuthTokenRequest.d.ts.map +1 -0
  65. package/dist/mjs/types/Interface/api/connector/OAuthTokenRequest.js +2 -0
  66. package/dist/mjs/types/Interface/api/connector/OAuthTokenRequest.js.map +1 -0
  67. package/dist/mjs/types/Interface/api/sellsy/SellsyConnectionStatus.d.ts +11 -0
  68. package/dist/mjs/types/Interface/api/sellsy/SellsyConnectionStatus.d.ts.map +1 -0
  69. package/dist/mjs/types/Interface/api/sellsy/SellsyConnectionStatus.js +2 -0
  70. package/dist/mjs/types/Interface/api/sellsy/SellsyConnectionStatus.js.map +1 -0
  71. package/dist/mjs/types/Interface/api/sellsy/SellsyOauthCallback.d.ts +10 -0
  72. package/dist/mjs/types/Interface/api/sellsy/SellsyOauthCallback.d.ts.map +1 -0
  73. package/dist/mjs/types/Interface/api/sellsy/SellsyOauthCallback.js +35 -0
  74. package/dist/mjs/types/Interface/api/sellsy/SellsyOauthCallback.js.map +1 -0
  75. package/dist/mjs/types/Interface/models/ICalendarEventUser.d.ts +2 -0
  76. package/dist/mjs/types/Interface/models/ICalendarEventUser.d.ts.map +1 -1
  77. package/dist/mjs/types/Interface/models/ICalendarEventUser.js.map +1 -1
  78. package/dist/mjs/types/Interface/models/IConnector.d.ts +1 -0
  79. package/dist/mjs/types/Interface/models/IConnector.d.ts.map +1 -1
  80. package/dist/mjs/types/Interface/models/IConnector.js.map +1 -1
  81. package/dist/mjs/types/index.d.ts +4 -0
  82. package/dist/mjs/types/index.d.ts.map +1 -1
  83. package/dist/mjs/types/index.js +4 -0
  84. package/dist/mjs/types/index.js.map +1 -1
  85. package/package.json +1 -1
  86. package/ts/api/resources/CalendarEvent.ts +3 -2
  87. package/ts/api/resources/Sellsy.ts +17 -0
  88. package/ts/api/resources.ts +2 -0
  89. package/ts/types/Form/FormConnector.ts +39 -11
  90. package/ts/types/Interface/api/calendarEvent/calendarEvent.ts +11 -0
  91. package/ts/types/Interface/api/connector/OAuthTokenRequest.ts +12 -0
  92. package/ts/types/Interface/api/sellsy/SellsyConnectionStatus.ts +10 -0
  93. package/ts/types/Interface/api/sellsy/SellsyOauthCallback.ts +24 -0
  94. package/ts/types/Interface/models/ICalendarEventUser.ts +5 -0
  95. package/ts/types/Interface/models/IConnector.ts +1 -0
  96. package/ts/types/index.ts +4 -0
@@ -0,0 +1,17 @@
1
+ import { Resource } from '../Resource';
2
+ import { SellsyConnectionStatus } from '../../types/Interface/api/sellsy/SellsyConnectionStatus';
3
+ import { SellsyOauthCallback } from '../../types/Interface/api/sellsy/SellsyOauthCallback';
4
+
5
+ export class Sellsy extends Resource {
6
+ oauthCallback(payload: SellsyOauthCallback): Promise<{ success: boolean; message: string }> {
7
+ return this.axios.$post('/connectors/sellsy/callback', payload);
8
+ }
9
+
10
+ disconnect(idSociety: number): Promise<{ success: boolean; message: string }> {
11
+ return this.axios.$delete(`/connectors/sellsy/disconnect/${idSociety}`);
12
+ }
13
+
14
+ getConnectionStatus(societyId: number): Promise<SellsyConnectionStatus> {
15
+ return this.axios.$get('/connectors/sellsy/status', { params: { societyId } });
16
+ }
17
+ }
@@ -179,6 +179,7 @@ import { StatisticLegal } from './resources/statistic/Legal';
179
179
  import { AnalyticsUtm } from './resources/AnalyticsUtm';
180
180
  import { Caarl } from './resources/Caarl';
181
181
  import { Gdpr } from './resources/Gdpr';
182
+ import { Sellsy } from './resources/Sellsy';
182
183
  import { BankDedup } from './resources/BankDedup';
183
184
  import { StripePurchase } from './resources/StripePurchase';
184
185
 
@@ -221,6 +222,7 @@ export const resources = {
221
222
  taxDeadline: TaxDeadline,
222
223
  exerciceNote: ExerciceNote,
223
224
  connector: Connector,
225
+ sellsy: Sellsy,
224
226
  tax: Tax,
225
227
  quotesAccount: QuotesAccount,
226
228
  registration: Registration,
@@ -1,36 +1,64 @@
1
+ import { IsString, IsOptional, IsNumber, IsDate, IsEnum } from 'class-validator';
1
2
  import { ConnectorType } from '../Enum/ConnectorType';
3
+ import { ApiProperty, ApiPropertyOptional } from '../../utils';
2
4
 
3
5
  export class FormConnector {
4
- // @ApiProperty()
6
+ @ApiPropertyOptional()
7
+ @IsOptional()
8
+ @IsNumber()
5
9
  id?: number;
6
10
 
7
- // @ApiProperty()
11
+ @ApiPropertyOptional()
12
+ @IsOptional()
13
+ @IsString()
8
14
  username?: string;
9
15
 
10
- // @ApiProperty()
16
+ @ApiPropertyOptional()
17
+ @IsOptional()
18
+ @IsString()
11
19
  pass?: string;
12
20
 
13
- // @ApiProperty()
21
+ @ApiPropertyOptional()
22
+ @IsOptional()
23
+ @IsString()
14
24
  url?: string;
15
25
 
16
- // @ApiProperty()
26
+ @ApiPropertyOptional()
27
+ @IsOptional()
28
+ @IsString()
17
29
  token?: string;
18
30
 
19
- // @ApiProperty()
31
+ @ApiPropertyOptional()
32
+ @IsOptional()
33
+ @IsString()
20
34
  token2?: string;
21
35
 
22
- // @ApiProperty()
36
+ @ApiPropertyOptional()
37
+ @IsOptional()
38
+ @IsString()
23
39
  token3?: string;
24
40
 
25
- // @ApiProperty()
41
+ @ApiPropertyOptional()
42
+ @IsOptional()
43
+ @IsString()
26
44
  token4?: string;
27
45
 
28
- // @ApiProperty()
46
+ @ApiPropertyOptional()
47
+ @IsOptional()
48
+ @IsDate()
29
49
  date?: Date;
30
50
 
31
- // @ApiProperty()
51
+ @ApiProperty()
52
+ @IsEnum(ConnectorType)
32
53
  idTypeConnector: ConnectorType;
33
54
 
34
- // @ApiProperty()
55
+ @ApiPropertyOptional()
56
+ @IsOptional()
57
+ @IsNumber()
35
58
  idSociety?: number;
59
+
60
+ @ApiPropertyOptional()
61
+ @IsOptional()
62
+ @IsNumber()
63
+ expiresIn?: number;
36
64
  }
@@ -0,0 +1,11 @@
1
+ import { IsBoolean, IsOptional } from 'class-validator';
2
+ import { ApiPropertyOptional } from '../../../../utils';
3
+ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
4
+
5
+ export class DeleteCalendarEvent {
6
+ @ApiPropertyOptional()
7
+ @IsOptional()
8
+ @IsBoolean()
9
+ @ToBoolean()
10
+ shouldNotifyCustomerByEmail?: boolean;
11
+ }
@@ -0,0 +1,12 @@
1
+ export interface OAuthTokenRequest {
2
+ clientId: string;
3
+ redirectUri: string;
4
+ codeVerifier: string;
5
+ code: string;
6
+ }
7
+
8
+ export interface SellsyTokenResponse {
9
+ access_token: string;
10
+ refresh_token: string;
11
+ expires_in: number;
12
+ }
@@ -0,0 +1,10 @@
1
+ export interface SellsyConnectionStatus {
2
+ connected: boolean;
3
+ refreshed?: boolean;
4
+ needReauth?: boolean;
5
+ lastSync?: Date | string;
6
+ expiresAt?: Date;
7
+ expiresIn?: number;
8
+ message?: string;
9
+ error?: string;
10
+ }
@@ -0,0 +1,24 @@
1
+ import { IsInt, IsNotEmpty, IsString } from 'class-validator';
2
+ import { ApiProperty } from '../../../../utils';
3
+
4
+ export class SellsyOauthCallback {
5
+ @ApiProperty()
6
+ @IsString()
7
+ @IsNotEmpty()
8
+ code: string;
9
+
10
+ @ApiProperty()
11
+ @IsString()
12
+ @IsNotEmpty()
13
+ codeVerifier: string;
14
+
15
+ @ApiProperty()
16
+ @IsInt()
17
+ @IsNotEmpty()
18
+ idSociety: number;
19
+ }
20
+
21
+ export interface SellsyOauthCallbackResponse {
22
+ message: string;
23
+ success: true;
24
+ }
@@ -1,3 +1,5 @@
1
+ import { ICalendarEvent } from './ICalendarEvent';
2
+
1
3
  // calendarEventsUsers
2
4
  export interface ICalendarEventUser {
3
5
  id?: number;
@@ -5,4 +7,7 @@ export interface ICalendarEventUser {
5
7
  idCalendarEvent: number | null;
6
8
  createdAt?: Date | null;
7
9
  updatedAt?: Date | null;
10
+
11
+ // Associations
12
+ calendarEvent?: ICalendarEvent;
8
13
  }
@@ -20,4 +20,5 @@ export interface IConnector {
20
20
  // Associations
21
21
  typeConnector: IConnectorType;
22
22
  society: ISociety;
23
+ expiresIn: number | null;
23
24
  }
package/ts/types/index.ts CHANGED
@@ -944,6 +944,7 @@ export * from './Interface/api/calendarEvent/query';
944
944
  export * from './Interface/api/calendarEvent/readAllCalendarEvent';
945
945
  export * from './Interface/api/calendarEvent/readCalendarEventCall';
946
946
  export * from './Interface/api/calendarEvent/calendarEventIcs';
947
+ export * from './Interface/api/calendarEvent/calendarEvent';
947
948
  export * from './Interface/api/checklist/Read';
948
949
  export * from './Interface/api/checklist/Query';
949
950
  export * from './Interface/api/checklist/Update';
@@ -990,6 +991,7 @@ export * from './Interface/api/commercialOffer/Query';
990
991
  export * from './Interface/api/documentSection/Update';
991
992
  export * from './Interface/api/connector/CreateConnector';
992
993
  export * from './Interface/api/connector/QueryConnector';
994
+ export * from './Interface/api/connector/OAuthTokenRequest';
993
995
  export * from './Interface/api/connection/Query';
994
996
  export * from './Interface/api/connection/QueryConnectionState';
995
997
  export * from './Interface/api/connection/ReadConnectionState';
@@ -1106,6 +1108,8 @@ export * from './Interface/api/companyMarketingInformation/CompanyMarketingInfor
1106
1108
  export * from './Interface/api/companyMarketingInformation/CreateCompanyMarketingInformation';
1107
1109
  export * from './Interface/api/companyMarketingInformation/UpdateCompanyMarketingInformation';
1108
1110
  export * from './Interface/api/sellsy/CreateInvoicesSellsy';
1111
+ export * from './Interface/api/sellsy/SellsyConnectionStatus';
1112
+ export * from './Interface/api/sellsy/SellsyOauthCallback';
1109
1113
  export * from './Interface/api/PaymentRecovery/Create';
1110
1114
  export * from './Interface/api/yousign/index';
1111
1115
  export * from './Interface/api/aspone/AsponeApi';