@silexpert/core 1.3.82 → 1.3.84

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 (67) hide show
  1. package/dist/cjs/api/resources/Subscription.d.ts +2 -1
  2. package/dist/cjs/api/resources/Subscription.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/Subscription.js +3 -0
  4. package/dist/cjs/api/resources/Subscription.js.map +1 -1
  5. package/dist/cjs/api/resources/User.d.ts +2 -1
  6. package/dist/cjs/api/resources/User.d.ts.map +1 -1
  7. package/dist/cjs/api/resources/User.js +3 -0
  8. package/dist/cjs/api/resources/User.js.map +1 -1
  9. package/dist/cjs/types/Enum/Feature.d.ts +2 -1
  10. package/dist/cjs/types/Enum/Feature.d.ts.map +1 -1
  11. package/dist/cjs/types/Enum/Feature.js +1 -0
  12. package/dist/cjs/types/Enum/Feature.js.map +1 -1
  13. package/dist/cjs/types/Enum/TerminationList.js +1 -1
  14. package/dist/cjs/types/Enum/TerminationList.js.map +1 -1
  15. package/dist/cjs/types/Interface/api/commercialManagement/Query.d.ts.map +1 -1
  16. package/dist/cjs/types/Interface/api/commercialManagement/Query.js +1 -0
  17. package/dist/cjs/types/Interface/api/commercialManagement/Query.js.map +1 -1
  18. package/dist/cjs/types/Interface/api/stripe/Update.d.ts +4 -0
  19. package/dist/cjs/types/Interface/api/stripe/Update.d.ts.map +1 -0
  20. package/dist/cjs/types/Interface/api/stripe/Update.js +26 -0
  21. package/dist/cjs/types/Interface/api/stripe/Update.js.map +1 -0
  22. package/dist/cjs/types/Interface/api/user/Query.d.ts +0 -2
  23. package/dist/cjs/types/Interface/api/user/Query.d.ts.map +1 -1
  24. package/dist/cjs/types/Interface/api/user/Query.js +0 -13
  25. package/dist/cjs/types/Interface/api/user/Query.js.map +1 -1
  26. package/dist/cjs/types/index.d.ts +1 -0
  27. package/dist/cjs/types/index.d.ts.map +1 -1
  28. package/dist/cjs/types/index.js +1 -0
  29. package/dist/cjs/types/index.js.map +1 -1
  30. package/dist/mjs/api/resources/Subscription.d.ts +2 -1
  31. package/dist/mjs/api/resources/Subscription.d.ts.map +1 -1
  32. package/dist/mjs/api/resources/Subscription.js +3 -0
  33. package/dist/mjs/api/resources/Subscription.js.map +1 -1
  34. package/dist/mjs/api/resources/User.d.ts +2 -1
  35. package/dist/mjs/api/resources/User.d.ts.map +1 -1
  36. package/dist/mjs/api/resources/User.js +3 -0
  37. package/dist/mjs/api/resources/User.js.map +1 -1
  38. package/dist/mjs/types/Enum/Feature.d.ts +2 -1
  39. package/dist/mjs/types/Enum/Feature.d.ts.map +1 -1
  40. package/dist/mjs/types/Enum/Feature.js +1 -0
  41. package/dist/mjs/types/Enum/Feature.js.map +1 -1
  42. package/dist/mjs/types/Enum/TerminationList.js +1 -1
  43. package/dist/mjs/types/Enum/TerminationList.js.map +1 -1
  44. package/dist/mjs/types/Interface/api/commercialManagement/Query.d.ts.map +1 -1
  45. package/dist/mjs/types/Interface/api/commercialManagement/Query.js +1 -0
  46. package/dist/mjs/types/Interface/api/commercialManagement/Query.js.map +1 -1
  47. package/dist/mjs/types/Interface/api/stripe/Update.d.ts +4 -0
  48. package/dist/mjs/types/Interface/api/stripe/Update.d.ts.map +1 -0
  49. package/dist/mjs/types/Interface/api/stripe/Update.js +23 -0
  50. package/dist/mjs/types/Interface/api/stripe/Update.js.map +1 -0
  51. package/dist/mjs/types/Interface/api/user/Query.d.ts +0 -2
  52. package/dist/mjs/types/Interface/api/user/Query.d.ts.map +1 -1
  53. package/dist/mjs/types/Interface/api/user/Query.js +1 -16
  54. package/dist/mjs/types/Interface/api/user/Query.js.map +1 -1
  55. package/dist/mjs/types/index.d.ts +1 -0
  56. package/dist/mjs/types/index.d.ts.map +1 -1
  57. package/dist/mjs/types/index.js +1 -0
  58. package/dist/mjs/types/index.js.map +1 -1
  59. package/package.json +19 -19
  60. package/ts/api/resources/Subscription.ts +10 -1
  61. package/ts/api/resources/User.ts +5 -0
  62. package/ts/types/Enum/Feature.ts +1 -0
  63. package/ts/types/Enum/TerminationList.ts +1 -1
  64. package/ts/types/Interface/api/commercialManagement/Query.ts +1 -0
  65. package/ts/types/Interface/api/stripe/Update.ts +11 -0
  66. package/ts/types/Interface/api/user/Query.ts +1 -12
  67. package/ts/types/index.ts +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.3.82",
3
+ "version": "1.3.84",
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": "dist/cjs/index.js",
@@ -32,29 +32,29 @@
32
32
  "author": "Silex",
33
33
  "license": "ISC",
34
34
  "devDependencies": {
35
- "@babel/cli": "^7.26.4",
36
- "@babel/core": "^7.22.11",
37
- "@babel/plugin-transform-runtime": "^7.22.10",
38
- "@babel/preset-env": "^7.22.10",
39
- "@babel/runtime": "^7.22.11",
35
+ "@babel/cli": "^7.28.0",
36
+ "@babel/core": "^7.28.0",
37
+ "@babel/plugin-transform-runtime": "^7.28.0",
38
+ "@babel/preset-env": "^7.28.0",
39
+ "@babel/runtime": "^7.28.2",
40
40
  "@types/bluebird": "^3.5.34",
41
41
  "@types/browser-or-node": "^1.3.0",
42
42
  "@types/ejs": "^3.0.6",
43
43
  "@types/node": "^22.10.5",
44
- "@types/validator": "^13.11.1",
45
- "babel-plugin-replace-import-extension": "^1.1.3",
44
+ "@types/validator": "^13.15.2",
45
+ "babel-plugin-replace-import-extension": "^1.1.5",
46
46
  "babel-preset-env": "^1.7.0",
47
- "eslint": "^9.17.0",
47
+ "eslint": "^9.32.0",
48
48
  "eslint-config-airbnb-typescript": "^18.0.0",
49
- "eslint-config-prettier": "^9.1.0",
49
+ "eslint-config-prettier": "^10.1.8",
50
50
  "husky": "^9.1.7",
51
- "prettier": "^3.4.2",
51
+ "prettier": "^3.6.2",
52
52
  "reflect-metadata": "^0.2.2",
53
53
  "rimraf": "^6.0.1",
54
54
  "standard-version": "^9.3.0",
55
55
  "ts-node": "^10.9.2",
56
- "typescript": "5.8.2",
57
- "typescript-eslint": "^8.19.1"
56
+ "typescript": "5.8.3",
57
+ "typescript-eslint": "^8.38.0"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "@babel/runtime": "^7.6.3",
@@ -63,17 +63,17 @@
63
63
  },
64
64
  "types": "dist/cjs/index.d.ts",
65
65
  "dependencies": {
66
- "@types/geojson": "^7946.0.15",
67
- "@types/mailparser": "^3.4.5",
66
+ "@types/geojson": "^7946.0.16",
67
+ "@types/mailparser": "^3.4.6",
68
68
  "axios": "0.22.0",
69
69
  "browser-or-node": "^3.0.0",
70
70
  "class-transformer": "^0.5.1",
71
- "class-validator": "^0.14.0",
71
+ "class-validator": "^0.14.2",
72
72
  "dayjs": "^1.11.11",
73
73
  "ejs": "^3.1.9",
74
- "libphonenumber-js": "^1.11.17",
75
- "mailparser": "^3.4.0",
76
- "rxjs": "^7.0.1",
74
+ "libphonenumber-js": "^1.12.10",
75
+ "mailparser": "^3.7.4",
76
+ "rxjs": "^7.8.2",
77
77
  "sms-segments-calculator": "^1.2.0",
78
78
  "stripe": "^18.1.1",
79
79
  "ts-enum-util": "^4.0.2"
@@ -1,5 +1,10 @@
1
1
  import { Resource } from '../Resource';
2
- import { CreateSubscriptionSession, CreateStripePortals, CreateCommercialSession } from '../../types';
2
+ import {
3
+ CreateSubscriptionSession,
4
+ CreateStripePortals,
5
+ CreateCommercialSession,
6
+ UpdateStripeSubscription,
7
+ } from '../../types';
3
8
  import type Stripe from 'stripe';
4
9
 
5
10
  export class Subscription extends Resource {
@@ -42,4 +47,8 @@ export class Subscription extends Resource {
42
47
  get(): Promise<Stripe.Response<Stripe.Subscription> | null> {
43
48
  return this.axios.$get('/stripe/subscriptions');
44
49
  }
50
+
51
+ update(payload: UpdateStripeSubscription): Promise<Stripe.Response<Stripe.Subscription>> {
52
+ return this.axios.$put('/stripe/subscriptions', payload);
53
+ }
45
54
  }
@@ -22,6 +22,7 @@ import {
22
22
  QueryGet,
23
23
  BasePaginate,
24
24
  QueryGetAllUsersPaginated,
25
+ QueryUpdatePassword,
25
26
  } from '../../types';
26
27
 
27
28
  export class User extends Resource {
@@ -123,6 +124,10 @@ export class User extends Resource {
123
124
  return this.axios.$delete(`users/${id}`);
124
125
  }
125
126
 
127
+ updatePassword(id: number, body: QueryUpdatePassword): Promise<Partial<IUser>> {
128
+ return this.axios.$patch(`/users/${id}/password`, body);
129
+ }
130
+
126
131
  getByRoles(params: { roles: Role[] }): Promise<IUser[]> {
127
132
  return this.axios.$get('users/roles', { params });
128
133
  }
@@ -65,4 +65,5 @@ export enum Feature {
65
65
 
66
66
  LOG_TO_MOBILE_APP = 'log_to_mobile_app',
67
67
  SALE_RECURRENCE = 'sale_recurrence',
68
+ DECLARE_REGISTRATION = 'declare_registration',
68
69
  }
@@ -38,7 +38,7 @@ export enum TerminationListState {
38
38
  export const TerminationListStateDetail = [
39
39
  {
40
40
  id: TerminationListState.IN_PROGRESS,
41
- label: "En cours d'instruction",
41
+ label: 'En cours d\'instruction',
42
42
  },
43
43
  {
44
44
  id: TerminationListState.ACCEPTED,
@@ -60,6 +60,7 @@ export interface ParamPaginatedInvoices {
60
60
 
61
61
  export class QueryGetDefaultPayload {
62
62
  @ApiProperty()
63
+ @IsNumber()
63
64
  idEstimateInvoiceType: EstimateInvoiceType;
64
65
 
65
66
  @ApiPropertyOptional()
@@ -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 UpdateStripeSubscription {
6
+ @ApiPropertyOptional({ description: 'If true, it will end the trial period' })
7
+ @IsBoolean()
8
+ @ToBoolean()
9
+ @IsOptional()
10
+ shouldEndTrial?: boolean;
11
+ }
@@ -1,4 +1,4 @@
1
- import { IsArray, IsBoolean, IsIn, IsInt, IsNumber, IsOptional, IsString, Min } from 'class-validator';
1
+ import { IsArray, IsBoolean, IsIn, IsInt, IsNumber, IsOptional, IsString } from 'class-validator';
2
2
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
3
  import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
4
4
  import { SubscriptionType } from '../../../Enum/SubscriptionType';
@@ -180,17 +180,6 @@ export class QueryUpdatePassword {
180
180
  @ApiProperty()
181
181
  @IsString()
182
182
  password: string;
183
-
184
- @ApiPropertyOptional()
185
- @IsOptional()
186
- @IsInt()
187
- @Min(1)
188
- id?: number | null;
189
-
190
- @ApiPropertyOptional()
191
- @IsOptional()
192
- @IsString()
193
- token?: string | null;
194
183
  }
195
184
 
196
185
  export class QueryUserSmsConfirmation {
package/ts/types/index.ts CHANGED
@@ -998,6 +998,7 @@ export * from './Interface/api/connection/ReadConnectionState';
998
998
  export * from './Interface/api/qonto/Query';
999
999
  export * from './Interface/api/qonto/Create';
1000
1000
  export * from './Interface/api/stripe/Create';
1001
+ export * from './Interface/api/stripe/Update';
1001
1002
  export * from './Interface/api/qonto/UpdateConnection';
1002
1003
  export * from './Interface/api/qonto/GetConnectionInformation';
1003
1004
  export * from './Interface/api/qonto/Read';