@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.
- package/dist/cjs/api/resources/Subscription.d.ts +2 -1
- package/dist/cjs/api/resources/Subscription.d.ts.map +1 -1
- package/dist/cjs/api/resources/Subscription.js +3 -0
- package/dist/cjs/api/resources/Subscription.js.map +1 -1
- package/dist/cjs/api/resources/User.d.ts +2 -1
- package/dist/cjs/api/resources/User.d.ts.map +1 -1
- package/dist/cjs/api/resources/User.js +3 -0
- package/dist/cjs/api/resources/User.js.map +1 -1
- package/dist/cjs/types/Enum/Feature.d.ts +2 -1
- package/dist/cjs/types/Enum/Feature.d.ts.map +1 -1
- package/dist/cjs/types/Enum/Feature.js +1 -0
- package/dist/cjs/types/Enum/Feature.js.map +1 -1
- package/dist/cjs/types/Enum/TerminationList.js +1 -1
- package/dist/cjs/types/Enum/TerminationList.js.map +1 -1
- package/dist/cjs/types/Interface/api/commercialManagement/Query.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/commercialManagement/Query.js +1 -0
- package/dist/cjs/types/Interface/api/commercialManagement/Query.js.map +1 -1
- package/dist/cjs/types/Interface/api/stripe/Update.d.ts +4 -0
- package/dist/cjs/types/Interface/api/stripe/Update.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/stripe/Update.js +26 -0
- package/dist/cjs/types/Interface/api/stripe/Update.js.map +1 -0
- package/dist/cjs/types/Interface/api/user/Query.d.ts +0 -2
- package/dist/cjs/types/Interface/api/user/Query.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/user/Query.js +0 -13
- package/dist/cjs/types/Interface/api/user/Query.js.map +1 -1
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +1 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/mjs/api/resources/Subscription.d.ts +2 -1
- package/dist/mjs/api/resources/Subscription.d.ts.map +1 -1
- package/dist/mjs/api/resources/Subscription.js +3 -0
- package/dist/mjs/api/resources/Subscription.js.map +1 -1
- package/dist/mjs/api/resources/User.d.ts +2 -1
- package/dist/mjs/api/resources/User.d.ts.map +1 -1
- package/dist/mjs/api/resources/User.js +3 -0
- package/dist/mjs/api/resources/User.js.map +1 -1
- package/dist/mjs/types/Enum/Feature.d.ts +2 -1
- package/dist/mjs/types/Enum/Feature.d.ts.map +1 -1
- package/dist/mjs/types/Enum/Feature.js +1 -0
- package/dist/mjs/types/Enum/Feature.js.map +1 -1
- package/dist/mjs/types/Enum/TerminationList.js +1 -1
- package/dist/mjs/types/Enum/TerminationList.js.map +1 -1
- package/dist/mjs/types/Interface/api/commercialManagement/Query.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/commercialManagement/Query.js +1 -0
- package/dist/mjs/types/Interface/api/commercialManagement/Query.js.map +1 -1
- package/dist/mjs/types/Interface/api/stripe/Update.d.ts +4 -0
- package/dist/mjs/types/Interface/api/stripe/Update.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/stripe/Update.js +23 -0
- package/dist/mjs/types/Interface/api/stripe/Update.js.map +1 -0
- package/dist/mjs/types/Interface/api/user/Query.d.ts +0 -2
- package/dist/mjs/types/Interface/api/user/Query.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/user/Query.js +1 -16
- package/dist/mjs/types/Interface/api/user/Query.js.map +1 -1
- package/dist/mjs/types/index.d.ts +1 -0
- package/dist/mjs/types/index.d.ts.map +1 -1
- package/dist/mjs/types/index.js +1 -0
- package/dist/mjs/types/index.js.map +1 -1
- package/package.json +19 -19
- package/ts/api/resources/Subscription.ts +10 -1
- package/ts/api/resources/User.ts +5 -0
- package/ts/types/Enum/Feature.ts +1 -0
- package/ts/types/Enum/TerminationList.ts +1 -1
- package/ts/types/Interface/api/commercialManagement/Query.ts +1 -0
- package/ts/types/Interface/api/stripe/Update.ts +11 -0
- package/ts/types/Interface/api/user/Query.ts +1 -12
- 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.
|
|
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.
|
|
36
|
-
"@babel/core": "^7.
|
|
37
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
38
|
-
"@babel/preset-env": "^7.
|
|
39
|
-
"@babel/runtime": "^7.
|
|
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.
|
|
45
|
-
"babel-plugin-replace-import-extension": "^1.1.
|
|
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.
|
|
47
|
+
"eslint": "^9.32.0",
|
|
48
48
|
"eslint-config-airbnb-typescript": "^18.0.0",
|
|
49
|
-
"eslint-config-prettier": "^
|
|
49
|
+
"eslint-config-prettier": "^10.1.8",
|
|
50
50
|
"husky": "^9.1.7",
|
|
51
|
-
"prettier": "^3.
|
|
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.
|
|
57
|
-
"typescript-eslint": "^8.
|
|
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.
|
|
67
|
-
"@types/mailparser": "^3.4.
|
|
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.
|
|
71
|
+
"class-validator": "^0.14.2",
|
|
72
72
|
"dayjs": "^1.11.11",
|
|
73
73
|
"ejs": "^3.1.9",
|
|
74
|
-
"libphonenumber-js": "^1.
|
|
75
|
-
"mailparser": "^3.4
|
|
76
|
-
"rxjs": "^7.
|
|
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 {
|
|
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
|
}
|
package/ts/api/resources/User.ts
CHANGED
|
@@ -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
|
}
|
package/ts/types/Enum/Feature.ts
CHANGED
|
@@ -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
|
|
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';
|