@movalib/movalib-commons 1.23.0 → 1.24.0
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/index.d.ts +2 -1
- package/dist/index.js +6 -2
- package/dist/src/helpers/Enums.d.ts +10 -0
- package/dist/src/helpers/Enums.js +13 -1
- package/dist/src/models/Garage.d.ts +3 -1
- package/dist/src/models/Garage.js +2 -1
- package/dist/src/models/Subscription.d.ts +11 -0
- package/dist/src/models/Subscription.js +15 -0
- package/index.ts +3 -1
- package/package.json +1 -1
- package/src/helpers/Enums.ts +13 -0
- package/src/models/Garage.ts +5 -1
- package/src/models/Subscription.ts +25 -0
package/dist/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export { default as MovaCopyright } from './src/MovaCopyright';
|
|
|
22
22
|
export { default as MovaVehicleTireField } from './src/MovaVehicleTireField';
|
|
23
23
|
export { default as ConfirmationDialog } from './src/ConfirmationDialog';
|
|
24
24
|
export { default as GenderSelector } from './src/GenderSelector';
|
|
25
|
+
export { default as Subscription } from './src/models/Subscription';
|
|
25
26
|
export { default as Absence } from './src/models/Absence';
|
|
26
27
|
export { default as Employee } from './src/models/Employee';
|
|
27
28
|
export { default as Supplier } from './src/models/Supplier';
|
|
@@ -47,4 +48,4 @@ export { validateField, formatVehicleTire, formatFrenchVehiclePlate, isEmpty, ge
|
|
|
47
48
|
export { validatePhoneNumber, validateText, validateEmail } from './src/helpers/Validator';
|
|
48
49
|
export { formatDateByCountryCode, getLongFormattedDateTime } from './src/helpers/DateUtils';
|
|
49
50
|
export { request } from './src/helpers/ApiHelper';
|
|
50
|
-
export { RoleType, MovaAppType, DayOfWeek, EventState, EventType, DocumentType, DigitalPassportIndex, DocumentState, Gender, DateFormatTypes, PartsApplicationType, ProductType, OrderPreference, OrderState, SlotAlgorithm, VehiclePlateFormat as VehiclePlateType, SubscriptionPaymentInterval, RegistrationState, PrestationType, PrestationState, CountryCode } from './src/helpers/Enums';
|
|
51
|
+
export { RoleType, MovaAppType, DayOfWeek, EventState, EventType, DocumentType, DigitalPassportIndex, DocumentState, Gender, DateFormatTypes, PartsApplicationType, ProductType, OrderPreference, OrderState, SlotAlgorithm, VehiclePlateFormat as VehiclePlateType, SubscriptionPaymentInterval, RegistrationState, PrestationType, PrestationState, CountryCode, SubscriptionState, SubscriptionType } from './src/helpers/Enums';
|
package/dist/index.js
CHANGED
|
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
5
|
};
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
8
|
-
exports.CountryCode = exports.PrestationState = exports.PrestationType = exports.RegistrationState = exports.SubscriptionPaymentInterval = exports.VehiclePlateType = exports.SlotAlgorithm = exports.OrderState = exports.OrderPreference = exports.ProductType = exports.PartsApplicationType = exports.DateFormatTypes = exports.Gender = exports.DocumentState = exports.DigitalPassportIndex = exports.DocumentType = exports.EventType = exports.EventState = exports.DayOfWeek = exports.MovaAppType = exports.RoleType = exports.request = exports.getLongFormattedDateTime = exports.formatDateByCountryCode = exports.validateEmail = exports.validateText = exports.validatePhoneNumber = exports.isSafariOniOS = exports.getDayOfWeekLabel = exports.findScheduleByDayOfWeek = exports.getFormattedIntervals = exports.getFormattedSchedule = exports.formatPhoneNumber = void 0;
|
|
7
|
+
exports.capitalizeFirstLetter = exports.getApplicationShortLabel = exports.isEmpty = exports.formatFrenchVehiclePlate = exports.formatVehicleTire = exports.validateField = exports.deleteCookie = exports.readCookie = exports.VehicleTire = exports.Event = exports.Schedule = exports.Garage = exports.Document = exports.Vehicle = exports.Address = exports.Role = exports.User = exports.Customer = exports.Logger = exports.Operation = exports.Prestation = exports.Product = exports.Supplier = exports.Employee = exports.Absence = exports.Subscription = exports.GenderSelector = exports.ConfirmationDialog = exports.MovaVehicleTireField = exports.MovaCopyright = exports.MovaSignUp = exports.MovaLogin = exports.MovaSnackbar = exports.TestButton = exports.VehiclePlateField = exports.QRCode = exports.MovaDialog = exports.Loader = exports.MovaDigitalPassport = exports.VehicleFullCard = exports.ScheduleFields = exports.AddressFields = exports.AccountValidation = exports.GaragePLV = exports.IbanInput = exports.DialogForgotPassword = exports.UserService = exports.GarageService = exports.AuthenticationService = exports.VehicleService = void 0;
|
|
8
|
+
exports.SubscriptionType = exports.SubscriptionState = exports.CountryCode = exports.PrestationState = exports.PrestationType = exports.RegistrationState = exports.SubscriptionPaymentInterval = exports.VehiclePlateType = exports.SlotAlgorithm = exports.OrderState = exports.OrderPreference = exports.ProductType = exports.PartsApplicationType = exports.DateFormatTypes = exports.Gender = exports.DocumentState = exports.DigitalPassportIndex = exports.DocumentType = exports.EventType = exports.EventState = exports.DayOfWeek = exports.MovaAppType = exports.RoleType = exports.request = exports.getLongFormattedDateTime = exports.formatDateByCountryCode = exports.validateEmail = exports.validateText = exports.validatePhoneNumber = exports.isSafariOniOS = exports.getDayOfWeekLabel = exports.findScheduleByDayOfWeek = exports.getFormattedIntervals = exports.getFormattedSchedule = exports.formatPhoneNumber = exports.flexLeftRow = void 0;
|
|
9
9
|
// Export des services
|
|
10
10
|
var VehicleService_1 = require("./src/services/VehicleService");
|
|
11
11
|
Object.defineProperty(exports, "VehicleService", { enumerable: true, get: function () { return __importDefault(VehicleService_1).default; } });
|
|
@@ -57,6 +57,8 @@ Object.defineProperty(exports, "ConfirmationDialog", { enumerable: true, get: fu
|
|
|
57
57
|
var GenderSelector_1 = require("./src/GenderSelector");
|
|
58
58
|
Object.defineProperty(exports, "GenderSelector", { enumerable: true, get: function () { return __importDefault(GenderSelector_1).default; } });
|
|
59
59
|
// Export des classes
|
|
60
|
+
var Subscription_1 = require("./src/models/Subscription");
|
|
61
|
+
Object.defineProperty(exports, "Subscription", { enumerable: true, get: function () { return __importDefault(Subscription_1).default; } });
|
|
60
62
|
var Absence_1 = require("./src/models/Absence");
|
|
61
63
|
Object.defineProperty(exports, "Absence", { enumerable: true, get: function () { return __importDefault(Absence_1).default; } });
|
|
62
64
|
var Employee_1 = require("./src/models/Employee");
|
|
@@ -141,3 +143,5 @@ Object.defineProperty(exports, "RegistrationState", { enumerable: true, get: fun
|
|
|
141
143
|
Object.defineProperty(exports, "PrestationType", { enumerable: true, get: function () { return Enums_1.PrestationType; } });
|
|
142
144
|
Object.defineProperty(exports, "PrestationState", { enumerable: true, get: function () { return Enums_1.PrestationState; } });
|
|
143
145
|
Object.defineProperty(exports, "CountryCode", { enumerable: true, get: function () { return Enums_1.CountryCode; } });
|
|
146
|
+
Object.defineProperty(exports, "SubscriptionState", { enumerable: true, get: function () { return Enums_1.SubscriptionState; } });
|
|
147
|
+
Object.defineProperty(exports, "SubscriptionType", { enumerable: true, get: function () { return Enums_1.SubscriptionType; } });
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
export declare enum SubscriptionType {
|
|
2
|
+
PRO_FREE = "PRO_FREE",
|
|
3
|
+
PRO_STANDARD = "PRO_STANDARD"
|
|
4
|
+
}
|
|
5
|
+
export declare enum SubscriptionState {
|
|
6
|
+
PENDING = "PENDING",
|
|
7
|
+
ACTIVE = "ACTIVE",
|
|
8
|
+
PAUSED = "PAUSED",
|
|
9
|
+
CANCELED = "CANCELED"
|
|
10
|
+
}
|
|
1
11
|
export declare enum CountryCode {
|
|
2
12
|
FR = "FR"
|
|
3
13
|
}
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RoleType = exports.MovaAppType = exports.DocumentType = exports.DocumentState = exports.DayOfWeek = exports.EventType = exports.EventState = exports.DigitalPassportIndex = exports.Gender = exports.DateFormatTypes = exports.APIMethod = exports.PartsApplicationType = exports.ProductType = exports.OrderPreference = exports.OrderState = exports.SlotAlgorithm = exports.VehiclePlateFormat = exports.RegistrationState = exports.SubscriptionPaymentInterval = exports.PrestationType = exports.PrestationState = exports.CountryCode = void 0;
|
|
3
|
+
exports.RoleType = exports.MovaAppType = exports.DocumentType = exports.DocumentState = exports.DayOfWeek = exports.EventType = exports.EventState = exports.DigitalPassportIndex = exports.Gender = exports.DateFormatTypes = exports.APIMethod = exports.PartsApplicationType = exports.ProductType = exports.OrderPreference = exports.OrderState = exports.SlotAlgorithm = exports.VehiclePlateFormat = exports.RegistrationState = exports.SubscriptionPaymentInterval = exports.PrestationType = exports.PrestationState = exports.CountryCode = exports.SubscriptionState = exports.SubscriptionType = void 0;
|
|
4
|
+
var SubscriptionType;
|
|
5
|
+
(function (SubscriptionType) {
|
|
6
|
+
SubscriptionType["PRO_FREE"] = "PRO_FREE";
|
|
7
|
+
SubscriptionType["PRO_STANDARD"] = "PRO_STANDARD";
|
|
8
|
+
})(SubscriptionType = exports.SubscriptionType || (exports.SubscriptionType = {}));
|
|
9
|
+
var SubscriptionState;
|
|
10
|
+
(function (SubscriptionState) {
|
|
11
|
+
SubscriptionState["PENDING"] = "PENDING";
|
|
12
|
+
SubscriptionState["ACTIVE"] = "ACTIVE";
|
|
13
|
+
SubscriptionState["PAUSED"] = "PAUSED";
|
|
14
|
+
SubscriptionState["CANCELED"] = "CANCELED";
|
|
15
|
+
})(SubscriptionState = exports.SubscriptionState || (exports.SubscriptionState = {}));
|
|
4
16
|
var CountryCode;
|
|
5
17
|
(function (CountryCode) {
|
|
6
18
|
CountryCode["FR"] = "FR";
|
|
@@ -5,6 +5,7 @@ import Supplier from "./Supplier";
|
|
|
5
5
|
import Document from "./Document";
|
|
6
6
|
import { OrderPreference, RegistrationState, SlotAlgorithm, SubscriptionPaymentInterval } from "../helpers/Enums";
|
|
7
7
|
import User from "./User";
|
|
8
|
+
import Subscription from "./Subscription";
|
|
8
9
|
export default class Garage {
|
|
9
10
|
id: string;
|
|
10
11
|
adminId: string;
|
|
@@ -34,5 +35,6 @@ export default class Garage {
|
|
|
34
35
|
creationDate?: Date;
|
|
35
36
|
teamManagementActive?: boolean;
|
|
36
37
|
documents?: Document[];
|
|
37
|
-
|
|
38
|
+
subscriptions?: Subscription[];
|
|
39
|
+
constructor(id: string, adminId: string, name: string, address: Address, workforce: number, prestations: Prestation[], schedules: Schedule[], contactPhone: string, contactEmail?: string, logo?: string, suppliers?: Supplier[], documents?: Document[], subscriptions?: Subscription[]);
|
|
38
40
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var Garage = /** @class */ (function () {
|
|
4
|
-
function Garage(id, adminId, name, address, workforce, prestations, schedules, contactPhone, contactEmail, logo, suppliers, documents) {
|
|
4
|
+
function Garage(id, adminId, name, address, workforce, prestations, schedules, contactPhone, contactEmail, logo, suppliers, documents, subscriptions) {
|
|
5
5
|
this.id = id;
|
|
6
6
|
this.adminId = adminId;
|
|
7
7
|
this.name = name;
|
|
@@ -14,6 +14,7 @@ var Garage = /** @class */ (function () {
|
|
|
14
14
|
this.logo = logo;
|
|
15
15
|
this.suppliers = suppliers;
|
|
16
16
|
this.documents = documents;
|
|
17
|
+
this.subscriptions = subscriptions;
|
|
17
18
|
}
|
|
18
19
|
return Garage;
|
|
19
20
|
}());
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SubscriptionState, SubscriptionType } from "../helpers/Enums";
|
|
2
|
+
export default class Subscription {
|
|
3
|
+
id: string;
|
|
4
|
+
garageId: string;
|
|
5
|
+
type: SubscriptionType;
|
|
6
|
+
state: SubscriptionState;
|
|
7
|
+
companyName: string;
|
|
8
|
+
companyEmail: string;
|
|
9
|
+
paymentIban: string;
|
|
10
|
+
constructor(id: string, garageId: string, type: SubscriptionType, state: SubscriptionState, companyName: string, companyEmail: string, paymentIban: string);
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var Subscription = /** @class */ (function () {
|
|
4
|
+
function Subscription(id, garageId, type, state, companyName, companyEmail, paymentIban) {
|
|
5
|
+
this.id = id;
|
|
6
|
+
this.garageId = garageId;
|
|
7
|
+
this.type = type;
|
|
8
|
+
this.state = state;
|
|
9
|
+
this.companyName = companyName;
|
|
10
|
+
this.companyEmail = companyEmail;
|
|
11
|
+
this.paymentIban = paymentIban;
|
|
12
|
+
}
|
|
13
|
+
return Subscription;
|
|
14
|
+
}());
|
|
15
|
+
exports.default = Subscription;
|
package/index.ts
CHANGED
|
@@ -29,6 +29,7 @@ export { default as ConfirmationDialog } from './src/ConfirmationDialog';
|
|
|
29
29
|
export { default as GenderSelector } from './src/GenderSelector';
|
|
30
30
|
|
|
31
31
|
// Export des classes
|
|
32
|
+
export { default as Subscription } from './src/models/Subscription';
|
|
32
33
|
export { default as Absence } from './src/models/Absence';
|
|
33
34
|
export { default as Employee } from './src/models/Employee';
|
|
34
35
|
export { default as Supplier } from './src/models/Supplier';
|
|
@@ -66,5 +67,6 @@ export { request } from './src/helpers/ApiHelper';
|
|
|
66
67
|
export { RoleType, MovaAppType, DayOfWeek, EventState, EventType, DocumentType,
|
|
67
68
|
DigitalPassportIndex, DocumentState, Gender, DateFormatTypes, PartsApplicationType,
|
|
68
69
|
ProductType, OrderPreference, OrderState, SlotAlgorithm, VehiclePlateFormat as VehiclePlateType,
|
|
69
|
-
SubscriptionPaymentInterval, RegistrationState, PrestationType, PrestationState, CountryCode
|
|
70
|
+
SubscriptionPaymentInterval, RegistrationState, PrestationType, PrestationState, CountryCode,
|
|
71
|
+
SubscriptionState, SubscriptionType } from './src/helpers/Enums';
|
|
70
72
|
|
package/package.json
CHANGED
package/src/helpers/Enums.ts
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
export enum SubscriptionType {
|
|
3
|
+
PRO_FREE = 'PRO_FREE',
|
|
4
|
+
PRO_STANDARD = 'PRO_STANDARD'
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export enum SubscriptionState {
|
|
8
|
+
PENDING = 'PENDING',
|
|
9
|
+
ACTIVE = 'ACTIVE',
|
|
10
|
+
PAUSED = 'PAUSED',
|
|
11
|
+
CANCELED = 'CANCELED'
|
|
12
|
+
}
|
|
13
|
+
|
|
1
14
|
export enum CountryCode {
|
|
2
15
|
FR = "FR"
|
|
3
16
|
}
|
package/src/models/Garage.ts
CHANGED
|
@@ -5,6 +5,7 @@ import Supplier from "./Supplier";
|
|
|
5
5
|
import Document from "./Document";
|
|
6
6
|
import { OrderPreference, RegistrationState, SlotAlgorithm, SubscriptionPaymentInterval } from "../helpers/Enums";
|
|
7
7
|
import User from "./User";
|
|
8
|
+
import Subscription from "./Subscription";
|
|
8
9
|
|
|
9
10
|
export default class Garage {
|
|
10
11
|
|
|
@@ -36,6 +37,7 @@ export default class Garage {
|
|
|
36
37
|
creationDate?: Date;
|
|
37
38
|
teamManagementActive?: boolean;
|
|
38
39
|
documents?: Document[];
|
|
40
|
+
subscriptions?: Subscription[];
|
|
39
41
|
|
|
40
42
|
constructor(
|
|
41
43
|
id:string,
|
|
@@ -49,7 +51,8 @@ export default class Garage {
|
|
|
49
51
|
contactEmail?: string,
|
|
50
52
|
logo?:string,
|
|
51
53
|
suppliers?: Supplier[],
|
|
52
|
-
documents?: Document[]
|
|
54
|
+
documents?: Document[],
|
|
55
|
+
subscriptions?: Subscription[]
|
|
53
56
|
) {
|
|
54
57
|
this.id = id;
|
|
55
58
|
this.adminId = adminId;
|
|
@@ -63,5 +66,6 @@ export default class Garage {
|
|
|
63
66
|
this.logo = logo;
|
|
64
67
|
this.suppliers = suppliers;
|
|
65
68
|
this.documents = documents;
|
|
69
|
+
this.subscriptions = subscriptions;
|
|
66
70
|
}
|
|
67
71
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SubscriptionState, SubscriptionType } from "../helpers/Enums";
|
|
2
|
+
|
|
3
|
+
export default class Subscription {
|
|
4
|
+
|
|
5
|
+
// Properties
|
|
6
|
+
id: string;
|
|
7
|
+
garageId: string;
|
|
8
|
+
type: SubscriptionType;
|
|
9
|
+
state: SubscriptionState;
|
|
10
|
+
companyName: string;
|
|
11
|
+
companyEmail: string;
|
|
12
|
+
paymentIban: string;
|
|
13
|
+
|
|
14
|
+
constructor(id: string, garageId: string, type: SubscriptionType, state: SubscriptionState, companyName: string,
|
|
15
|
+
companyEmail: string, paymentIban : string) {
|
|
16
|
+
|
|
17
|
+
this.id = id;
|
|
18
|
+
this.garageId = garageId;
|
|
19
|
+
this.type = type;
|
|
20
|
+
this.state = state;
|
|
21
|
+
this.companyName = companyName;
|
|
22
|
+
this.companyEmail = companyEmail;
|
|
23
|
+
this.paymentIban = paymentIban;
|
|
24
|
+
}
|
|
25
|
+
}
|