@silexpert/core 1.3.147 → 1.3.149

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 (94) hide show
  1. package/dist/cjs/api/resources/Echo.d.ts +3 -3
  2. package/dist/cjs/api/resources/Echo.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/Echo.js +3 -3
  4. package/dist/cjs/api/resources/Echo.js.map +1 -1
  5. package/dist/cjs/api/resources/LegalNotice.d.ts +7 -2
  6. package/dist/cjs/api/resources/LegalNotice.d.ts.map +1 -1
  7. package/dist/cjs/api/resources/LegalNotice.js +14 -0
  8. package/dist/cjs/api/resources/LegalNotice.js.map +1 -1
  9. package/dist/cjs/types/Interface/api/config/ConfigType.d.ts +1 -1
  10. package/dist/cjs/types/Interface/api/config/ConfigType.d.ts.map +1 -1
  11. package/dist/cjs/types/Interface/api/config/ConfigType.js.map +1 -1
  12. package/dist/cjs/types/Interface/api/echo/CreateOrder.d.ts +10 -19
  13. package/dist/cjs/types/Interface/api/echo/CreateOrder.d.ts.map +1 -1
  14. package/dist/cjs/types/Interface/api/echo/CreateOrder.js +0 -90
  15. package/dist/cjs/types/Interface/api/echo/CreateOrder.js.map +1 -1
  16. package/dist/cjs/types/Interface/api/echo/Estimate.d.ts +33 -0
  17. package/dist/cjs/types/Interface/api/echo/Estimate.d.ts.map +1 -0
  18. package/dist/cjs/types/Interface/api/echo/Estimate.js +3 -0
  19. package/dist/cjs/types/Interface/api/echo/Estimate.js.map +1 -0
  20. package/dist/cjs/types/Interface/api/echo/EstimatePayload.d.ts +6 -0
  21. package/dist/cjs/types/Interface/api/echo/EstimatePayload.d.ts.map +1 -0
  22. package/dist/cjs/types/Interface/api/echo/EstimatePayload.js +3 -0
  23. package/dist/cjs/types/Interface/api/echo/EstimatePayload.js.map +1 -0
  24. package/dist/cjs/types/Interface/api/echo/Mission.d.ts +4 -1
  25. package/dist/cjs/types/Interface/api/echo/Mission.d.ts.map +1 -1
  26. package/dist/cjs/types/Interface/api/echo/Mission.js.map +1 -1
  27. package/dist/cjs/types/Interface/api/echo/Order.d.ts +29 -8
  28. package/dist/cjs/types/Interface/api/echo/Order.d.ts.map +1 -1
  29. package/dist/cjs/types/Interface/api/echo/Order.js.map +1 -1
  30. package/dist/cjs/types/Interface/api/legalNotice/QueryLegalNotice.d.ts +10 -0
  31. package/dist/cjs/types/Interface/api/legalNotice/QueryLegalNotice.d.ts.map +1 -0
  32. package/dist/cjs/types/Interface/api/legalNotice/QueryLegalNotice.js +58 -0
  33. package/dist/cjs/types/Interface/api/legalNotice/QueryLegalNotice.js.map +1 -0
  34. package/dist/cjs/types/Interface/api/stripe/Create.d.ts +1 -0
  35. package/dist/cjs/types/Interface/api/stripe/Create.d.ts.map +1 -1
  36. package/dist/cjs/types/Interface/api/stripe/Create.js +6 -0
  37. package/dist/cjs/types/Interface/api/stripe/Create.js.map +1 -1
  38. package/dist/cjs/types/index.d.ts +3 -0
  39. package/dist/cjs/types/index.d.ts.map +1 -1
  40. package/dist/cjs/types/index.js +3 -0
  41. package/dist/cjs/types/index.js.map +1 -1
  42. package/dist/mjs/api/resources/Echo.d.ts +3 -3
  43. package/dist/mjs/api/resources/Echo.d.ts.map +1 -1
  44. package/dist/mjs/api/resources/Echo.js +3 -3
  45. package/dist/mjs/api/resources/Echo.js.map +1 -1
  46. package/dist/mjs/api/resources/LegalNotice.d.ts +7 -2
  47. package/dist/mjs/api/resources/LegalNotice.d.ts.map +1 -1
  48. package/dist/mjs/api/resources/LegalNotice.js +14 -0
  49. package/dist/mjs/api/resources/LegalNotice.js.map +1 -1
  50. package/dist/mjs/types/Interface/api/config/ConfigType.d.ts +1 -1
  51. package/dist/mjs/types/Interface/api/config/ConfigType.d.ts.map +1 -1
  52. package/dist/mjs/types/Interface/api/config/ConfigType.js.map +1 -1
  53. package/dist/mjs/types/Interface/api/echo/CreateOrder.d.ts +10 -19
  54. package/dist/mjs/types/Interface/api/echo/CreateOrder.d.ts.map +1 -1
  55. package/dist/mjs/types/Interface/api/echo/CreateOrder.js +1 -100
  56. package/dist/mjs/types/Interface/api/echo/CreateOrder.js.map +1 -1
  57. package/dist/mjs/types/Interface/api/echo/Estimate.d.ts +33 -0
  58. package/dist/mjs/types/Interface/api/echo/Estimate.d.ts.map +1 -0
  59. package/dist/mjs/types/Interface/api/echo/Estimate.js +2 -0
  60. package/dist/mjs/types/Interface/api/echo/Estimate.js.map +1 -0
  61. package/dist/mjs/types/Interface/api/echo/EstimatePayload.d.ts +6 -0
  62. package/dist/mjs/types/Interface/api/echo/EstimatePayload.d.ts.map +1 -0
  63. package/dist/mjs/types/Interface/api/echo/EstimatePayload.js +2 -0
  64. package/dist/mjs/types/Interface/api/echo/EstimatePayload.js.map +1 -0
  65. package/dist/mjs/types/Interface/api/echo/Mission.d.ts +4 -1
  66. package/dist/mjs/types/Interface/api/echo/Mission.d.ts.map +1 -1
  67. package/dist/mjs/types/Interface/api/echo/Mission.js.map +1 -1
  68. package/dist/mjs/types/Interface/api/echo/Order.d.ts +29 -8
  69. package/dist/mjs/types/Interface/api/echo/Order.d.ts.map +1 -1
  70. package/dist/mjs/types/Interface/api/echo/Order.js.map +1 -1
  71. package/dist/mjs/types/Interface/api/legalNotice/QueryLegalNotice.d.ts +10 -0
  72. package/dist/mjs/types/Interface/api/legalNotice/QueryLegalNotice.d.ts.map +1 -0
  73. package/dist/mjs/types/Interface/api/legalNotice/QueryLegalNotice.js +60 -0
  74. package/dist/mjs/types/Interface/api/legalNotice/QueryLegalNotice.js.map +1 -0
  75. package/dist/mjs/types/Interface/api/stripe/Create.d.ts +1 -0
  76. package/dist/mjs/types/Interface/api/stripe/Create.d.ts.map +1 -1
  77. package/dist/mjs/types/Interface/api/stripe/Create.js +7 -0
  78. package/dist/mjs/types/Interface/api/stripe/Create.js.map +1 -1
  79. package/dist/mjs/types/index.d.ts +3 -0
  80. package/dist/mjs/types/index.d.ts.map +1 -1
  81. package/dist/mjs/types/index.js +3 -0
  82. package/dist/mjs/types/index.js.map +1 -1
  83. package/package.json +1 -1
  84. package/ts/api/resources/Echo.ts +6 -6
  85. package/ts/api/resources/LegalNotice.ts +19 -2
  86. package/ts/types/Interface/api/config/ConfigType.ts +3 -1
  87. package/ts/types/Interface/api/echo/CreateOrder.ts +10 -61
  88. package/ts/types/Interface/api/echo/Estimate.ts +33 -0
  89. package/ts/types/Interface/api/echo/EstimatePayload.ts +5 -0
  90. package/ts/types/Interface/api/echo/Mission.ts +5 -1
  91. package/ts/types/Interface/api/echo/Order.ts +29 -8
  92. package/ts/types/Interface/api/legalNotice/QueryLegalNotice.ts +38 -0
  93. package/ts/types/Interface/api/stripe/Create.ts +5 -0
  94. package/ts/types/index.ts +3 -0
@@ -1,8 +1,8 @@
1
- import { CreatePrestation, ILegalNotice, UpdateLegalNotice } from '../../types';
1
+ import { BasePaginate, CreateOrder, CreatePrestation, ILegalNotice, QueryPaginatedLegalNotice, UpdateLegalNotice } from '../../types';
2
2
  import { Resource } from '../Resource';
3
3
 
4
4
  export class LegalNotice extends Resource {
5
- public create(payload: ILegalNotice): Promise<ILegalNotice> {
5
+ public create(payload: CreateOrder): Promise<ILegalNotice> {
6
6
  return this.axios.$post('/legal-notices', payload);
7
7
  }
8
8
 
@@ -13,4 +13,21 @@ export class LegalNotice extends Resource {
13
13
  public updateWithOptions(id: number, payload: ILegalNotice): Promise<ILegalNotice> {
14
14
  return this.axios.$put(`/legal-notices/${id}`, payload);
15
15
  }
16
+
17
+ public getPaginated(params: QueryPaginatedLegalNotice): Promise<BasePaginate<ILegalNotice>> {
18
+ return this.axios.$get('/legal-notices/paginated', { params });
19
+ }
20
+
21
+ public delete(id: number): Promise<{ success: boolean }> {
22
+ return this.axios.$delete(`/legal-notices/${id}`);
23
+ }
24
+
25
+ public getPdf(id: number): Promise<Buffer> {
26
+ return this.axios.$get(`/legal-notices/${id}/pdf`, {
27
+ responseType: 'arraybuffer',
28
+ headers: {
29
+ Accept: 'application/pdf',
30
+ }
31
+ });
32
+ }
16
33
  }
@@ -228,5 +228,7 @@ interface Brevo {
228
228
 
229
229
  interface Echo {
230
230
  url: string;
231
- accountid: string;
231
+ //accountid: string;
232
+ //apikey: string;
233
+ token: string;
232
234
  }
@@ -1,63 +1,12 @@
1
- import { IsIn, IsInt, IsOptional, IsString } from 'class-validator';
2
- import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
- import { DepartmentCode } from '../../../Enum/ZoneCode';
4
-
5
- export class PublicationContent {
6
- @ApiProperty()
7
- @IsString()
8
- text_html: string;
9
- }
10
-
11
- export class Publication {
12
- @ApiProperty()
13
- @IsString()
14
- ad_type_id: string;
15
-
16
- @ApiProperty()
17
- content: PublicationContent;
18
-
19
- @ApiProperty()
20
- @IsString()
1
+ export interface CreateOrder {
2
+ departmentCode: string;
3
+ legalNoticeTypeId: string;
4
+ content: string;
21
5
  header: string;
22
-
23
- @ApiProperty()
24
- @IsString()
25
- legal_name: string;
26
-
27
- @ApiPropertyOptional()
28
- @IsString()
29
- @IsOptional()
30
- logo_base_64?: string | null;
31
- }
32
- export class CreateEchoOrder {
33
- @ApiProperty()
34
- departement: DepartmentCode;
35
-
36
- @ApiProperty()
37
- @IsString()
38
- newspaper_id: string;
39
-
40
- @ApiProperty()
41
- @IsInt()
42
- paper_proof_qty: number;
43
-
44
- @ApiProperty()
45
- publication: Publication;
46
-
47
- @ApiProperty()
48
- @IsString()
49
- publishing_date_from: string;
50
-
51
- @ApiProperty()
52
- @IsString()
53
- publishing_date_to: string;
54
-
55
- @ApiProperty()
56
- @IsString()
57
- selection_mode: string;
58
-
59
- @ApiProperty()
60
- @IsString()
61
- @IsIn(['simulation', 'order'])
62
- type: string;
6
+ logo: string; // base64 string: "data:image/jpeg;base64,<data>"
7
+ customerReference: string;
8
+ publicationDate: string; // format: "YYYY-MM-DD"
9
+ newspaperId: string;
10
+ supportingDocumentQuantity: number;
11
+ hasBodacc: boolean;
63
12
  }
@@ -0,0 +1,33 @@
1
+ export interface EchoEstimateResponse {
2
+ estimates: EchoEstimate[];
3
+ }
4
+
5
+ export interface EchoEstimate {
6
+ newspaper: {
7
+ id: string;
8
+ name: string;
9
+ medium: string;
10
+ recommended: boolean;
11
+ hasDigitalSupportingDocument: boolean;
12
+ hasSupportingDocument: boolean;
13
+ };
14
+ acceptLogo: boolean;
15
+ publicationDate: string; // ISO date string
16
+ publicationClosingDatetime: string; // ISO datetime string
17
+ price: {
18
+ taxRate: number;
19
+ legalNoticeExcludingTax: number;
20
+ supportingDocumentExcludingTax: number;
21
+ supportingDocumentDiscount: number;
22
+ logoAndHeaderExcludingTax: number;
23
+ logoAndHeaderDiscount: number;
24
+ totalExcludingTax: number;
25
+ totalTax: number;
26
+ total: number;
27
+ };
28
+ supportingDocument: {
29
+ cost: number;
30
+ shippingCost: number;
31
+ maxCopies: number;
32
+ };
33
+ }
@@ -0,0 +1,5 @@
1
+ export interface EstimatePayload {
2
+ departmentCode: string;
3
+ legalNoticeTypeId: string;
4
+ content?: string;
5
+ }
@@ -1,4 +1,8 @@
1
1
  export type Mission = {
2
- id: number;
2
+ id: string;
3
3
  name: string;
4
4
  };
5
+
6
+ export interface MissionsResponse {
7
+ legalNoticeTypes: Mission[];
8
+ }
@@ -1,8 +1,29 @@
1
- export type EchoOrder = {
2
- id: string;
3
- newspaper_name: string;
4
- price_total_excl_tax: string;
5
- publication_closing_datetime: string;
6
- publication_date: string;
7
- specimen_url: string;
8
- };
1
+ export interface EchoOrder {
2
+ customerReference: string;
3
+ status: string;
4
+ reference: string;
5
+ content: string;
6
+ header: string | null;
7
+ withLogo: boolean;
8
+ publicationDate: string;
9
+ publicationClosingDatetime: string | null;
10
+ publicationProofUrl: string | null;
11
+ price: {
12
+ totalExcludingTax: number;
13
+ total: number;
14
+ };
15
+ department: {
16
+ code: string;
17
+ name: string;
18
+ };
19
+ newspaper: {
20
+ id: string;
21
+ name: string;
22
+ };
23
+ type: {
24
+ id: string;
25
+ name: string;
26
+ };
27
+ hasBodacc: boolean;
28
+ documents: any[];
29
+ }
@@ -0,0 +1,38 @@
1
+ import { IsArray, IsBoolean, IsInt, IsOptional, IsString } from 'class-validator';
2
+ import { ApiPropertyOptional } from '../../../../utils';
3
+ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
4
+ import { RequiredQueryPaginate } from '../BasePaginate';
5
+
6
+ export class QueryPaginatedLegalNotice extends RequiredQueryPaginate {
7
+ @ApiPropertyOptional()
8
+ @IsOptional()
9
+ @IsInt()
10
+ year?: number | null;
11
+
12
+ @ApiPropertyOptional()
13
+ @IsOptional()
14
+ @IsInt()
15
+ quarter?: number | null;
16
+
17
+ @ApiPropertyOptional()
18
+ @IsOptional()
19
+ @IsArray()
20
+ idJuriste?: number[];
21
+
22
+ @ApiPropertyOptional()
23
+ @IsOptional()
24
+ @IsBoolean()
25
+ @ToBoolean()
26
+ processed?: boolean | null;
27
+
28
+ @ApiPropertyOptional()
29
+ @IsString()
30
+ @IsOptional()
31
+ search?: string;
32
+
33
+ @IsOptional()
34
+ @IsString({
35
+ each: true,
36
+ })
37
+ include?: string[];
38
+ }
@@ -140,6 +140,11 @@ export class CreateTapToPayIntent {
140
140
  message: 'Le montant doit être supérieur à 1ct',
141
141
  })
142
142
  amountInCents: number;
143
+
144
+ @ApiPropertyOptional()
145
+ @IsString()
146
+ @IsOptional()
147
+ description?: string;
143
148
  }
144
149
 
145
150
  export class CreateTapToPayConnectionToken {
package/ts/types/index.ts CHANGED
@@ -1020,6 +1020,7 @@ export * from './Interface/api/prestation/BodyCreatePrestationSocieties';
1020
1020
  export * from './Interface/api/prestation/QueryGetPaginatedSocietiesFromPrestation';
1021
1021
  export * from './Interface/api/paymentExpectation/QueryPaymentExpectation';
1022
1022
  export * from './Interface/api/legalNotice/UpdateLegalNotice';
1023
+ export * from './Interface/api/legalNotice/QueryLegalNotice';
1023
1024
  export * from './Interface/api/wallet/QueryWallet';
1024
1025
  export * from './Interface/api/terminationList/QueryTerminationList';
1025
1026
  export * from './Interface/api/terminationList/DestroyTerminationList';
@@ -1092,6 +1093,8 @@ export * from './Interface/api/echo/Mission';
1092
1093
  export * from './Interface/api/echo/CreateOrder';
1093
1094
  export * from './Interface/api/echo/NewsPaper';
1094
1095
  export * from './Interface/api/echo/Order';
1096
+ export * from './Interface/api/echo/Estimate';
1097
+ export * from './Interface/api/echo/EstimatePayload';
1095
1098
  export * from './Interface/api/userTimeSlot/QueryUserTimeSlot';
1096
1099
  export * from './Interface/api/workingSchedule/QueryAvailableTimeSlot';
1097
1100
  export * from './Interface/api/workingSchedule/Query';