@silexpert/core 1.3.82 → 1.3.83

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 (42) 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/types/Enum/Feature.d.ts +2 -1
  6. package/dist/cjs/types/Enum/Feature.d.ts.map +1 -1
  7. package/dist/cjs/types/Enum/Feature.js +1 -0
  8. package/dist/cjs/types/Enum/Feature.js.map +1 -1
  9. package/dist/cjs/types/Enum/TerminationList.js +1 -1
  10. package/dist/cjs/types/Enum/TerminationList.js.map +1 -1
  11. package/dist/cjs/types/Interface/api/stripe/Update.d.ts +4 -0
  12. package/dist/cjs/types/Interface/api/stripe/Update.d.ts.map +1 -0
  13. package/dist/cjs/types/Interface/api/stripe/Update.js +26 -0
  14. package/dist/cjs/types/Interface/api/stripe/Update.js.map +1 -0
  15. package/dist/cjs/types/index.d.ts +1 -0
  16. package/dist/cjs/types/index.d.ts.map +1 -1
  17. package/dist/cjs/types/index.js +1 -0
  18. package/dist/cjs/types/index.js.map +1 -1
  19. package/dist/mjs/api/resources/Subscription.d.ts +2 -1
  20. package/dist/mjs/api/resources/Subscription.d.ts.map +1 -1
  21. package/dist/mjs/api/resources/Subscription.js +3 -0
  22. package/dist/mjs/api/resources/Subscription.js.map +1 -1
  23. package/dist/mjs/types/Enum/Feature.d.ts +2 -1
  24. package/dist/mjs/types/Enum/Feature.d.ts.map +1 -1
  25. package/dist/mjs/types/Enum/Feature.js +1 -0
  26. package/dist/mjs/types/Enum/Feature.js.map +1 -1
  27. package/dist/mjs/types/Enum/TerminationList.js +1 -1
  28. package/dist/mjs/types/Enum/TerminationList.js.map +1 -1
  29. package/dist/mjs/types/Interface/api/stripe/Update.d.ts +4 -0
  30. package/dist/mjs/types/Interface/api/stripe/Update.d.ts.map +1 -0
  31. package/dist/mjs/types/Interface/api/stripe/Update.js +23 -0
  32. package/dist/mjs/types/Interface/api/stripe/Update.js.map +1 -0
  33. package/dist/mjs/types/index.d.ts +1 -0
  34. package/dist/mjs/types/index.d.ts.map +1 -1
  35. package/dist/mjs/types/index.js +1 -0
  36. package/dist/mjs/types/index.js.map +1 -1
  37. package/package.json +13 -13
  38. package/ts/api/resources/Subscription.ts +10 -1
  39. package/ts/types/Enum/Feature.ts +1 -0
  40. package/ts/types/Enum/TerminationList.ts +1 -1
  41. package/ts/types/Interface/api/stripe/Update.ts +11 -0
  42. 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.83",
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,17 +32,17 @@
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
44
  "@types/validator": "^13.11.1",
45
- "babel-plugin-replace-import-extension": "^1.1.3",
45
+ "babel-plugin-replace-import-extension": "^1.1.5",
46
46
  "babel-preset-env": "^1.7.0",
47
47
  "eslint": "^9.17.0",
48
48
  "eslint-config-airbnb-typescript": "^18.0.0",
@@ -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
  }
@@ -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,
@@ -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
+ }
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';