@zetra/citrineos-data 1.8.3-fork.3 → 1.8.4
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/interfaces/dtos/InstallRootCertificateRequest.d.ts +1 -1
- package/dist/interfaces/dtos/InstallRootCertificateRequest.js +1 -1
- package/dist/interfaces/dtos/UploadExistingCertificate.d.ts +1 -1
- package/dist/interfaces/dtos/UploadExistingCertificate.js +1 -1
- package/dist/interfaces/queries/Authorization.js +1 -1
- package/dist/interfaces/queries/ChargingStation.js +1 -1
- package/dist/interfaces/queries/Connection.js +1 -1
- package/dist/interfaces/queries/Model.js +1 -1
- package/dist/interfaces/queries/NetworkProfile.js +1 -1
- package/dist/interfaces/queries/RootCertificate.js +1 -1
- package/dist/interfaces/queries/Subscription.js +1 -1
- package/dist/interfaces/queries/Tariff.js +1 -1
- package/dist/interfaces/queries/Tenant.js +1 -1
- package/dist/interfaces/queries/TlsCertificate.js +1 -1
- package/dist/interfaces/queries/TransactionEvent.js +1 -1
- package/dist/interfaces/queries/UpdateChargingStationPasswordQuery.js +1 -1
- package/dist/interfaces/queries/VariableAttribute.d.ts +1 -1
- package/dist/interfaces/queries/VariableAttribute.js +1 -1
- package/dist/interfaces/queries/Websocket.js +1 -1
- package/dist/interfaces/repositories.d.ts +1 -1
- package/dist/layers/sequelize/index.d.ts +2 -0
- package/dist/layers/sequelize/index.js +2 -0
- package/dist/layers/sequelize/index.js.map +1 -1
- package/dist/layers/sequelize/mapper/1.6/AuthorizationMapper.d.ts +2 -2
- package/dist/layers/sequelize/mapper/1.6/AuthorizationMapper.js +1 -1
- package/dist/layers/sequelize/mapper/1.6/BootMapper.d.ts +1 -1
- package/dist/layers/sequelize/mapper/1.6/BootMapper.js +1 -1
- package/dist/layers/sequelize/mapper/1.6/ChargingProfileMapper.d.ts +1 -1
- package/dist/layers/sequelize/mapper/1.6/ChargingProfileMapper.js +1 -1
- package/dist/layers/sequelize/mapper/1.6/LocationMapper.d.ts +2 -2
- package/dist/layers/sequelize/mapper/1.6/LocationMapper.js +1 -1
- package/dist/layers/sequelize/mapper/1.6/MeterValueMapper.d.ts +1 -1
- package/dist/layers/sequelize/mapper/1.6/MeterValueMapper.js +1 -1
- package/dist/layers/sequelize/mapper/2.0.1/AuthorizationMapper.d.ts +2 -2
- package/dist/layers/sequelize/mapper/2.0.1/AuthorizationMapper.js +1 -1
- package/dist/layers/sequelize/mapper/2.0.1/BootMapper.d.ts +1 -1
- package/dist/layers/sequelize/mapper/2.0.1/BootMapper.js +1 -1
- package/dist/layers/sequelize/mapper/2.0.1/ChargingProfileMapper.d.ts +1 -1
- package/dist/layers/sequelize/mapper/2.0.1/ChargingProfileMapper.js +1 -1
- package/dist/layers/sequelize/mapper/2.0.1/LocationMapper.d.ts +2 -2
- package/dist/layers/sequelize/mapper/2.0.1/LocationMapper.js +1 -1
- package/dist/layers/sequelize/mapper/2.0.1/MeterValueMapper.d.ts +1 -1
- package/dist/layers/sequelize/mapper/2.0.1/MeterValueMapper.js +1 -1
- package/dist/layers/sequelize/mapper/2.0.1/TransactionMapper.d.ts +1 -1
- package/dist/layers/sequelize/mapper/2.0.1/TransactionMapper.js +1 -1
- package/dist/layers/sequelize/model/AsyncJob/AsyncJobStatus.d.ts +2 -2
- package/dist/layers/sequelize/model/AsyncJob/AsyncJobStatus.js +1 -1
- package/dist/layers/sequelize/model/Authorization/Authorization.d.ts +5 -5
- package/dist/layers/sequelize/model/Authorization/Authorization.js +13 -37
- package/dist/layers/sequelize/model/Authorization/Authorization.js.map +1 -1
- package/dist/layers/sequelize/model/Authorization/LocalListAuthorization.d.ts +1 -1
- package/dist/layers/sequelize/model/Authorization/LocalListAuthorization.js +1 -1
- package/dist/layers/sequelize/model/Authorization/LocalListVersion.d.ts +2 -2
- package/dist/layers/sequelize/model/Authorization/LocalListVersion.js +1 -1
- package/dist/layers/sequelize/model/Authorization/LocalListVersionAuthorization.d.ts +1 -1
- package/dist/layers/sequelize/model/Authorization/LocalListVersionAuthorization.js +1 -1
- package/dist/layers/sequelize/model/Authorization/SendLocalList.d.ts +2 -2
- package/dist/layers/sequelize/model/Authorization/SendLocalList.js +1 -1
- package/dist/layers/sequelize/model/Authorization/SendLocalListAuthorization.d.ts +1 -1
- package/dist/layers/sequelize/model/Authorization/SendLocalListAuthorization.js +1 -1
- package/dist/layers/sequelize/model/AuthorizationLocation.d.ts +5 -0
- package/dist/layers/sequelize/model/AuthorizationLocation.js +32 -0
- package/dist/layers/sequelize/model/AuthorizationLocation.js.map +1 -0
- package/dist/layers/sequelize/model/AuthorizationTenant.d.ts +5 -0
- package/dist/layers/sequelize/model/AuthorizationTenant.js +32 -0
- package/dist/layers/sequelize/model/AuthorizationTenant.js.map +1 -0
- package/dist/layers/sequelize/model/BaseModelWithTenant.d.ts +1 -1
- package/dist/layers/sequelize/model/BaseModelWithTenant.js +1 -1
- package/dist/layers/sequelize/model/Boot.d.ts +1 -1
- package/dist/layers/sequelize/model/Boot.js +1 -1
- package/dist/layers/sequelize/model/Cdrs/Cdrs.d.ts +1 -1
- package/dist/layers/sequelize/model/Cdrs/Cdrs.js +1 -1
- package/dist/layers/sequelize/model/Certificate/Certificate.d.ts +1 -1
- package/dist/layers/sequelize/model/Certificate/Certificate.js +1 -1
- package/dist/layers/sequelize/model/Certificate/DeleteCertificateAttempt.d.ts +2 -3
- package/dist/layers/sequelize/model/Certificate/DeleteCertificateAttempt.js +2 -2
- package/dist/layers/sequelize/model/Certificate/DeleteCertificateAttempt.js.map +1 -1
- package/dist/layers/sequelize/model/Certificate/InstallCertificateAttempt.d.ts +2 -3
- package/dist/layers/sequelize/model/Certificate/InstallCertificateAttempt.js +2 -2
- package/dist/layers/sequelize/model/Certificate/InstallCertificateAttempt.js.map +1 -1
- package/dist/layers/sequelize/model/Certificate/InstalledCertificate.d.ts +1 -1
- package/dist/layers/sequelize/model/Certificate/InstalledCertificate.js +1 -1
- package/dist/layers/sequelize/model/ChangeConfiguration.d.ts +1 -1
- package/dist/layers/sequelize/model/ChangeConfiguration.js +1 -1
- package/dist/layers/sequelize/model/ChargingProfile/ChargingNeeds.d.ts +3 -4
- package/dist/layers/sequelize/model/ChargingProfile/ChargingNeeds.js +2 -2
- package/dist/layers/sequelize/model/ChargingProfile/ChargingNeeds.js.map +1 -1
- package/dist/layers/sequelize/model/ChargingProfile/ChargingProfile.d.ts +1 -1
- package/dist/layers/sequelize/model/ChargingProfile/ChargingProfile.js +1 -1
- package/dist/layers/sequelize/model/ChargingProfile/ChargingSchedule.d.ts +1 -1
- package/dist/layers/sequelize/model/ChargingProfile/ChargingSchedule.js +1 -1
- package/dist/layers/sequelize/model/ChargingProfile/CompositeSchedule.d.ts +1 -1
- package/dist/layers/sequelize/model/ChargingProfile/CompositeSchedule.js +1 -1
- package/dist/layers/sequelize/model/ChargingProfile/SalesTariff.d.ts +2 -2
- package/dist/layers/sequelize/model/ChargingProfile/SalesTariff.js +1 -1
- package/dist/layers/sequelize/model/ChargingStationSecurityInfo.d.ts +1 -1
- package/dist/layers/sequelize/model/ChargingStationSecurityInfo.js +1 -1
- package/dist/layers/sequelize/model/ChargingStationSequence/ChargingStationSequence.d.ts +1 -1
- package/dist/layers/sequelize/model/ChargingStationSequence/ChargingStationSequence.js +1 -1
- package/dist/layers/sequelize/model/DeviceModel/Component.d.ts +2 -2
- package/dist/layers/sequelize/model/DeviceModel/Component.js +1 -1
- package/dist/layers/sequelize/model/DeviceModel/ComponentVariable.d.ts +1 -1
- package/dist/layers/sequelize/model/DeviceModel/ComponentVariable.js +1 -1
- package/dist/layers/sequelize/model/DeviceModel/EvseType.d.ts +2 -2
- package/dist/layers/sequelize/model/DeviceModel/EvseType.js +1 -1
- package/dist/layers/sequelize/model/DeviceModel/Variable.d.ts +2 -2
- package/dist/layers/sequelize/model/DeviceModel/Variable.js +1 -1
- package/dist/layers/sequelize/model/DeviceModel/VariableAttribute.d.ts +3 -4
- package/dist/layers/sequelize/model/DeviceModel/VariableAttribute.js +2 -2
- package/dist/layers/sequelize/model/DeviceModel/VariableAttribute.js.map +1 -1
- package/dist/layers/sequelize/model/DeviceModel/VariableCharacteristics.d.ts +2 -2
- package/dist/layers/sequelize/model/DeviceModel/VariableCharacteristics.js +1 -1
- package/dist/layers/sequelize/model/DeviceModel/VariableStatus.d.ts +2 -2
- package/dist/layers/sequelize/model/DeviceModel/VariableStatus.js +1 -1
- package/dist/layers/sequelize/model/Location/ChargingStation.d.ts +2 -2
- package/dist/layers/sequelize/model/Location/ChargingStation.js +1 -1
- package/dist/layers/sequelize/model/Location/ChargingStationNetworkProfile.d.ts +1 -1
- package/dist/layers/sequelize/model/Location/ChargingStationNetworkProfile.js +1 -1
- package/dist/layers/sequelize/model/Location/Connector.d.ts +2 -3
- package/dist/layers/sequelize/model/Location/Connector.js +2 -2
- package/dist/layers/sequelize/model/Location/Connector.js.map +1 -1
- package/dist/layers/sequelize/model/Location/Evse.d.ts +1 -1
- package/dist/layers/sequelize/model/Location/Evse.js +1 -1
- package/dist/layers/sequelize/model/Location/LatestStatusNotification.d.ts +4 -6
- package/dist/layers/sequelize/model/Location/LatestStatusNotification.js +3 -3
- package/dist/layers/sequelize/model/Location/LatestStatusNotification.js.map +1 -1
- package/dist/layers/sequelize/model/Location/Location.d.ts +2 -2
- package/dist/layers/sequelize/model/Location/Location.js +1 -1
- package/dist/layers/sequelize/model/Location/ServerNetworkProfile.d.ts +1 -1
- package/dist/layers/sequelize/model/Location/ServerNetworkProfile.js +1 -1
- package/dist/layers/sequelize/model/Location/SetNetworkProfile.d.ts +2 -2
- package/dist/layers/sequelize/model/Location/SetNetworkProfile.js +1 -1
- package/dist/layers/sequelize/model/Location/StatusNotification.d.ts +1 -1
- package/dist/layers/sequelize/model/Location/StatusNotification.js +1 -1
- package/dist/layers/sequelize/model/MessageInfo/MessageInfo.d.ts +2 -2
- package/dist/layers/sequelize/model/MessageInfo/MessageInfo.js +1 -1
- package/dist/layers/sequelize/model/OCPPMessage.d.ts +2 -2
- package/dist/layers/sequelize/model/OCPPMessage.js +1 -1
- package/dist/layers/sequelize/model/Reservation.d.ts +1 -1
- package/dist/layers/sequelize/model/Reservation.js +1 -1
- package/dist/layers/sequelize/model/SecurityEvent.d.ts +2 -2
- package/dist/layers/sequelize/model/SecurityEvent.js +1 -1
- package/dist/layers/sequelize/model/Subscription/Subscription.d.ts +1 -1
- package/dist/layers/sequelize/model/Subscription/Subscription.js +1 -1
- package/dist/layers/sequelize/model/Tariff/TariffElements.d.ts +12 -0
- package/dist/layers/sequelize/model/Tariff/TariffElements.js +57 -0
- package/dist/layers/sequelize/model/Tariff/TariffElements.js.map +1 -0
- package/dist/layers/sequelize/model/Tariff/Tariffs.d.ts +2 -3
- package/dist/layers/sequelize/model/Tariff/Tariffs.js +1 -1
- package/dist/layers/sequelize/model/Tariff/Tariffs.js.map +1 -1
- package/dist/layers/sequelize/model/Tenant.d.ts +4 -3
- package/dist/layers/sequelize/model/Tenant.js +4 -3
- package/dist/layers/sequelize/model/Tenant.js.map +1 -1
- package/dist/layers/sequelize/model/TenantPartner.d.ts +2 -1
- package/dist/layers/sequelize/model/TenantPartner.js +5 -1
- package/dist/layers/sequelize/model/TenantPartner.js.map +1 -1
- package/dist/layers/sequelize/model/TransactionEvent/MeterValue.d.ts +1 -1
- package/dist/layers/sequelize/model/TransactionEvent/MeterValue.js +1 -1
- package/dist/layers/sequelize/model/TransactionEvent/StartTransaction.d.ts +3 -5
- package/dist/layers/sequelize/model/TransactionEvent/StartTransaction.js +3 -3
- package/dist/layers/sequelize/model/TransactionEvent/StartTransaction.js.map +1 -1
- package/dist/layers/sequelize/model/TransactionEvent/StopTransaction.d.ts +1 -1
- package/dist/layers/sequelize/model/TransactionEvent/StopTransaction.js +1 -1
- package/dist/layers/sequelize/model/TransactionEvent/Transaction.d.ts +7 -12
- package/dist/layers/sequelize/model/TransactionEvent/Transaction.js +3 -3
- package/dist/layers/sequelize/model/TransactionEvent/Transaction.js.map +1 -1
- package/dist/layers/sequelize/model/TransactionEvent/TransactionEvent.d.ts +3 -4
- package/dist/layers/sequelize/model/TransactionEvent/TransactionEvent.js +2 -2
- package/dist/layers/sequelize/model/TransactionEvent/TransactionEvent.js.map +1 -1
- package/dist/layers/sequelize/model/VariableMonitoring/EventData.d.ts +2 -2
- package/dist/layers/sequelize/model/VariableMonitoring/EventData.js +1 -1
- package/dist/layers/sequelize/model/VariableMonitoring/VariableMonitoring.d.ts +2 -2
- package/dist/layers/sequelize/model/VariableMonitoring/VariableMonitoring.js +1 -1
- package/dist/layers/sequelize/model/VariableMonitoring/VariableMonitoringStatus.d.ts +2 -2
- package/dist/layers/sequelize/model/VariableMonitoring/VariableMonitoringStatus.js +1 -1
- package/dist/layers/sequelize/model/index.d.ts +1 -0
- package/dist/layers/sequelize/model/index.js +1 -0
- package/dist/layers/sequelize/model/index.js.map +1 -1
- package/dist/layers/sequelize/repository/AsyncJobStatus.d.ts +1 -1
- package/dist/layers/sequelize/repository/Authorization.d.ts +6 -4
- package/dist/layers/sequelize/repository/Authorization.js +29 -6
- package/dist/layers/sequelize/repository/Authorization.js.map +1 -1
- package/dist/layers/sequelize/repository/Base.d.ts +1 -1
- package/dist/layers/sequelize/repository/Base.js +16 -4
- package/dist/layers/sequelize/repository/Base.js.map +1 -1
- package/dist/layers/sequelize/repository/BaseJunction.d.ts +32 -0
- package/dist/layers/sequelize/repository/BaseJunction.js +222 -0
- package/dist/layers/sequelize/repository/BaseJunction.js.map +1 -0
- package/dist/layers/sequelize/repository/Boot.d.ts +2 -2
- package/dist/layers/sequelize/repository/Boot.js +1 -1
- package/dist/layers/sequelize/repository/Certificate.d.ts +1 -1
- package/dist/layers/sequelize/repository/ChangeConfiguration.d.ts +1 -1
- package/dist/layers/sequelize/repository/ChargingProfile.d.ts +2 -2
- package/dist/layers/sequelize/repository/ChargingProfile.js +1 -1
- package/dist/layers/sequelize/repository/ChargingStationSecurityInfo.d.ts +1 -1
- package/dist/layers/sequelize/repository/ChargingStationSequence.d.ts +1 -1
- package/dist/layers/sequelize/repository/DeleteCertificateAttempt.d.ts +1 -1
- package/dist/layers/sequelize/repository/DeviceModel.d.ts +2 -2
- package/dist/layers/sequelize/repository/DeviceModel.js +1 -1
- package/dist/layers/sequelize/repository/InstallCertificateAttempt.d.ts +1 -1
- package/dist/layers/sequelize/repository/InstalledCertificate.d.ts +1 -1
- package/dist/layers/sequelize/repository/LocalAuthList.d.ts +2 -2
- package/dist/layers/sequelize/repository/LocalAuthList.js +1 -1
- package/dist/layers/sequelize/repository/Location.d.ts +2 -2
- package/dist/layers/sequelize/repository/Location.js +1 -1
- package/dist/layers/sequelize/repository/MessageInfo.d.ts +2 -2
- package/dist/layers/sequelize/repository/MessageInfo.js +1 -1
- package/dist/layers/sequelize/repository/OCPPMessage.d.ts +1 -1
- package/dist/layers/sequelize/repository/OCPPMessage.js +1 -1
- package/dist/layers/sequelize/repository/RepositoryStore.d.ts +2 -2
- package/dist/layers/sequelize/repository/RepositoryStore.js +1 -1
- package/dist/layers/sequelize/repository/Reservation.d.ts +2 -2
- package/dist/layers/sequelize/repository/Reservation.js +1 -1
- package/dist/layers/sequelize/repository/SecurityEvent.d.ts +2 -2
- package/dist/layers/sequelize/repository/SecurityEvent.js +1 -1
- package/dist/layers/sequelize/repository/ServerNetworkProfile.d.ts +1 -1
- package/dist/layers/sequelize/repository/Subscription.d.ts +1 -1
- package/dist/layers/sequelize/repository/Tariff.d.ts +1 -1
- package/dist/layers/sequelize/repository/Tenant.d.ts +1 -1
- package/dist/layers/sequelize/repository/TransactionEvent.d.ts +2 -2
- package/dist/layers/sequelize/repository/TransactionEvent.js +38 -6
- package/dist/layers/sequelize/repository/TransactionEvent.js.map +1 -1
- package/dist/layers/sequelize/repository/VariableMonitoring.d.ts +2 -2
- package/dist/layers/sequelize/repository/VariableMonitoring.js +1 -1
- package/dist/layers/sequelize/util.d.ts +1 -1
- package/dist/layers/sequelize/util.js +6 -3
- package/dist/layers/sequelize/util.js.map +1 -1
- package/package.json +2 -4
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type BootstrapConfig, CrudRepository } from '@zetra/citrineos-base';
|
|
2
|
+
import type { Attributes, FindAndCountOptions } from 'sequelize';
|
|
3
|
+
import { type Model, type ModelStatic, type Sequelize } from 'sequelize-typescript';
|
|
4
|
+
import { type ILogObj, Logger } from 'tslog';
|
|
5
|
+
export declare abstract class SequelizeTenantJunctionRepository<T extends Model<any, any>> extends CrudRepository<T> {
|
|
6
|
+
protected s: Sequelize;
|
|
7
|
+
protected namespace: string;
|
|
8
|
+
protected logger: Logger<ILogObj>;
|
|
9
|
+
constructor(config: BootstrapConfig, namespace: string, logger?: Logger<ILogObj>, sequelizeInstance?: Sequelize);
|
|
10
|
+
protected abstract getJunctionModel(): ModelStatic<Model>;
|
|
11
|
+
protected abstract getJunctionForeignKey(): string;
|
|
12
|
+
private _model;
|
|
13
|
+
private _junctionModel;
|
|
14
|
+
private _injectJunctionInclude;
|
|
15
|
+
readByKey(tenantId: number, key: string | number, namespace?: string): Promise<T | undefined>;
|
|
16
|
+
readAllByQuery(tenantId: number, query: object, namespace?: string): Promise<T[]>;
|
|
17
|
+
readNextValue(tenantId: number, columnName: string, query?: object, startValue?: number, namespace?: string): Promise<number>;
|
|
18
|
+
existsByKey(tenantId: number, key: string, namespace?: string): Promise<boolean>;
|
|
19
|
+
existByQuery(tenantId: number, query: object, namespace?: string): Promise<number>;
|
|
20
|
+
findAndCount(tenantId: number, options: Omit<FindAndCountOptions<Attributes<T>>, 'group'>, namespace?: string): Promise<{
|
|
21
|
+
rows: T[];
|
|
22
|
+
count: number;
|
|
23
|
+
}>;
|
|
24
|
+
protected _create(tenantId: number, value: T, _namespace?: string): Promise<T>;
|
|
25
|
+
protected _bulkCreate(tenantId: number, values: T[], namespace?: string): Promise<T[]>;
|
|
26
|
+
protected _createByKey(tenantId: number, value: T, key: string, namespace?: string): Promise<T>;
|
|
27
|
+
protected _readOrCreateByQuery(tenantId: number, query: object, namespace?: string): Promise<[T, boolean]>;
|
|
28
|
+
protected _updateByKey(tenantId: number, value: Partial<T>, key: string, namespace?: string): Promise<T | undefined>;
|
|
29
|
+
protected _updateAllByQuery(tenantId: number, value: Partial<T>, query: object, namespace?: string): Promise<T[]>;
|
|
30
|
+
protected _deleteByKey(tenantId: number, key: string, namespace?: string): Promise<T | undefined>;
|
|
31
|
+
protected _deleteAllByQuery(tenantId: number, query: object, namespace?: string): Promise<T[]>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project
|
|
2
|
+
//
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
import { CrudRepository } from '@zetra/citrineos-base';
|
|
5
|
+
import { QueryTypes } from 'sequelize';
|
|
6
|
+
import {} from 'sequelize-typescript';
|
|
7
|
+
import { Logger } from 'tslog';
|
|
8
|
+
import { DefaultSequelizeInstance } from '../util.js';
|
|
9
|
+
export class SequelizeTenantJunctionRepository extends CrudRepository {
|
|
10
|
+
s;
|
|
11
|
+
namespace;
|
|
12
|
+
logger;
|
|
13
|
+
constructor(config, namespace, logger, sequelizeInstance) {
|
|
14
|
+
super();
|
|
15
|
+
this.s = sequelizeInstance ?? DefaultSequelizeInstance.getInstance(config, logger);
|
|
16
|
+
this.namespace = namespace;
|
|
17
|
+
this.logger = logger
|
|
18
|
+
? logger.getSubLogger({ name: this.constructor.name })
|
|
19
|
+
: new Logger({ name: this.constructor.name });
|
|
20
|
+
}
|
|
21
|
+
_model(namespace) {
|
|
22
|
+
return this.s.models[namespace];
|
|
23
|
+
}
|
|
24
|
+
_junctionModel() {
|
|
25
|
+
return this.getJunctionModel();
|
|
26
|
+
}
|
|
27
|
+
_injectJunctionInclude(query, tenantId) {
|
|
28
|
+
const existing = query.include ?? [];
|
|
29
|
+
return {
|
|
30
|
+
...query,
|
|
31
|
+
include: [
|
|
32
|
+
...(Array.isArray(existing) ? existing : [existing]),
|
|
33
|
+
{
|
|
34
|
+
model: this.getJunctionModel(),
|
|
35
|
+
required: true,
|
|
36
|
+
where: { tenantId },
|
|
37
|
+
attributes: [],
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
async readByKey(tenantId, key, namespace = this.namespace) {
|
|
43
|
+
const row = (await this._model(namespace).findByPk(key));
|
|
44
|
+
if (!row)
|
|
45
|
+
return undefined;
|
|
46
|
+
const fk = this.getJunctionForeignKey();
|
|
47
|
+
const junctionRow = await this._junctionModel().findOne({ where: { [fk]: key, tenantId } });
|
|
48
|
+
return junctionRow ? row : undefined;
|
|
49
|
+
}
|
|
50
|
+
async readAllByQuery(tenantId, query, namespace = this.namespace) {
|
|
51
|
+
return await this._model(namespace)
|
|
52
|
+
.findAll(this._injectJunctionInclude(query, tenantId))
|
|
53
|
+
.then((rows) => rows);
|
|
54
|
+
}
|
|
55
|
+
// TODO: add this back in when we have a use case for it
|
|
56
|
+
// This was removed because it was not used and it was not clear how to use it with the new junction model.
|
|
57
|
+
// async readAllBySqlString(
|
|
58
|
+
// tenantId: number,
|
|
59
|
+
// sqlString: string,
|
|
60
|
+
// _namespace: string = this.namespace,
|
|
61
|
+
// ): Promise<object[]> {
|
|
62
|
+
// return await this.s.query(`${sqlString}`, { type: QueryTypes.SELECT });
|
|
63
|
+
// }
|
|
64
|
+
async readNextValue(tenantId, columnName, query, startValue, namespace = this.namespace) {
|
|
65
|
+
const options = query ? query : undefined;
|
|
66
|
+
const maxValue = await this._model(namespace).max(columnName, options);
|
|
67
|
+
if (maxValue === null || maxValue === undefined) {
|
|
68
|
+
return startValue ?? 1;
|
|
69
|
+
}
|
|
70
|
+
if (typeof maxValue !== 'number' || isNaN(maxValue)) {
|
|
71
|
+
throw new Error(`Max value ${maxValue} on ${columnName} is invalid.`);
|
|
72
|
+
}
|
|
73
|
+
return maxValue + 1;
|
|
74
|
+
}
|
|
75
|
+
async existsByKey(tenantId, key, namespace = this.namespace) {
|
|
76
|
+
const fk = this.getJunctionForeignKey();
|
|
77
|
+
const junctionRow = await this._junctionModel().findOne({ where: { [fk]: key, tenantId } });
|
|
78
|
+
return junctionRow !== null;
|
|
79
|
+
}
|
|
80
|
+
async existByQuery(tenantId, query, namespace = this.namespace) {
|
|
81
|
+
return await this._model(namespace)
|
|
82
|
+
.findAll(this._injectJunctionInclude(query, tenantId))
|
|
83
|
+
.then((rows) => rows.length);
|
|
84
|
+
}
|
|
85
|
+
async findAndCount(tenantId, options, namespace = this.namespace) {
|
|
86
|
+
return this._model(namespace).findAndCountAll(this._injectJunctionInclude(options, tenantId));
|
|
87
|
+
}
|
|
88
|
+
async _create(tenantId, value, _namespace = this.namespace) {
|
|
89
|
+
return this.s.transaction(async (transaction) => {
|
|
90
|
+
const saved = await value.save({ transaction });
|
|
91
|
+
const pk = this._model(_namespace).primaryKeyAttribute;
|
|
92
|
+
const fk = this.getJunctionForeignKey();
|
|
93
|
+
await this._junctionModel().create({ [fk]: saved.get(pk), tenantId }, { transaction });
|
|
94
|
+
return saved;
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
async _bulkCreate(tenantId, values, namespace = this.namespace) {
|
|
98
|
+
return this.s.transaction(async (transaction) => {
|
|
99
|
+
const saved = (await this._model(namespace).bulkCreate(values, {
|
|
100
|
+
transaction,
|
|
101
|
+
}));
|
|
102
|
+
const pk = this._model(namespace).primaryKeyAttribute;
|
|
103
|
+
const fk = this.getJunctionForeignKey();
|
|
104
|
+
await this._junctionModel().bulkCreate(saved.map((row) => ({ [fk]: row.get(pk), tenantId })), { transaction });
|
|
105
|
+
return saved;
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
async _createByKey(tenantId, value, key, namespace = this.namespace) {
|
|
109
|
+
return this.s.transaction(async (transaction) => {
|
|
110
|
+
const model = this._model(namespace);
|
|
111
|
+
const primaryKey = model.primaryKeyAttribute;
|
|
112
|
+
value.setDataValue(primaryKey, key);
|
|
113
|
+
const saved = (await model.create(value.toJSON(), { transaction }));
|
|
114
|
+
const fk = this.getJunctionForeignKey();
|
|
115
|
+
await this._junctionModel().create({ [fk]: key, tenantId }, { transaction });
|
|
116
|
+
return saved;
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
async _readOrCreateByQuery(tenantId, query, namespace = this.namespace) {
|
|
120
|
+
return this.s.transaction(async (transaction) => {
|
|
121
|
+
const model = this._model(namespace);
|
|
122
|
+
const pk = model.primaryKeyAttribute;
|
|
123
|
+
const fk = this.getJunctionForeignKey();
|
|
124
|
+
const [row, created] = (await model.findOrCreate({
|
|
125
|
+
...query,
|
|
126
|
+
transaction,
|
|
127
|
+
}));
|
|
128
|
+
const rowKey = row.get(pk);
|
|
129
|
+
const [, junctionCreated] = await this._junctionModel().findOrCreate({
|
|
130
|
+
where: { [fk]: rowKey, tenantId },
|
|
131
|
+
defaults: { [fk]: rowKey, tenantId },
|
|
132
|
+
transaction,
|
|
133
|
+
});
|
|
134
|
+
return [row, junctionCreated];
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
async _updateByKey(tenantId, value, key, namespace = this.namespace) {
|
|
138
|
+
return this.s.transaction(async (transaction) => {
|
|
139
|
+
const fk = this.getJunctionForeignKey();
|
|
140
|
+
const junctionRow = await this._junctionModel().findOne({
|
|
141
|
+
where: { [fk]: key, tenantId },
|
|
142
|
+
transaction,
|
|
143
|
+
});
|
|
144
|
+
if (!junctionRow)
|
|
145
|
+
return undefined;
|
|
146
|
+
const sharedCount = await this._junctionModel().count({ where: { [fk]: key }, transaction });
|
|
147
|
+
if (sharedCount > 1) {
|
|
148
|
+
throw new Error(`Cannot mutate Authorization ${key}: it is shared by ${sharedCount} tenants`);
|
|
149
|
+
}
|
|
150
|
+
const model = this._model(namespace);
|
|
151
|
+
const pk = model.primaryKeyAttribute;
|
|
152
|
+
const { tenantId: _ignored, ...safeValue } = value;
|
|
153
|
+
const row = await model.findOne({ where: { [pk]: key }, transaction });
|
|
154
|
+
if (!row)
|
|
155
|
+
return undefined;
|
|
156
|
+
await row.update(safeValue, { transaction });
|
|
157
|
+
return row.reload({ transaction });
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
async _updateAllByQuery(tenantId, value, query, namespace = this.namespace) {
|
|
161
|
+
const model = this._model(namespace);
|
|
162
|
+
const rows = (await model.findAll(this._injectJunctionInclude(query, tenantId)));
|
|
163
|
+
if (rows.length === 0)
|
|
164
|
+
return [];
|
|
165
|
+
for (const row of rows) {
|
|
166
|
+
await row.update(value);
|
|
167
|
+
}
|
|
168
|
+
return Promise.all(rows.map((r) => r.reload()));
|
|
169
|
+
}
|
|
170
|
+
async _deleteByKey(tenantId, key, namespace = this.namespace) {
|
|
171
|
+
return this.s.transaction(async (transaction) => {
|
|
172
|
+
const fk = this.getJunctionForeignKey();
|
|
173
|
+
const junctionRow = await this._junctionModel().findOne({
|
|
174
|
+
where: { [fk]: key, tenantId },
|
|
175
|
+
transaction,
|
|
176
|
+
});
|
|
177
|
+
if (!junctionRow)
|
|
178
|
+
return undefined;
|
|
179
|
+
const model = this._model(namespace);
|
|
180
|
+
const entryToDelete = (await model.findByPk(key, { transaction }));
|
|
181
|
+
if (!entryToDelete)
|
|
182
|
+
return undefined;
|
|
183
|
+
await junctionRow.destroy({ transaction });
|
|
184
|
+
const remainingCount = await this._junctionModel().count({
|
|
185
|
+
where: { [fk]: key },
|
|
186
|
+
transaction,
|
|
187
|
+
});
|
|
188
|
+
if (remainingCount === 0) {
|
|
189
|
+
await model.destroy({
|
|
190
|
+
where: { [model.primaryKeyAttribute]: key },
|
|
191
|
+
transaction,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
return entryToDelete;
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
async _deleteAllByQuery(tenantId, query, namespace = this.namespace) {
|
|
198
|
+
return this.s.transaction(async (transaction) => {
|
|
199
|
+
const model = this._model(namespace);
|
|
200
|
+
const pk = model.primaryKeyAttribute;
|
|
201
|
+
const fk = this.getJunctionForeignKey();
|
|
202
|
+
const entriesToDelete = await model
|
|
203
|
+
.findAll({ ...this._injectJunctionInclude(query, tenantId), transaction })
|
|
204
|
+
.then((rows) => rows);
|
|
205
|
+
if (entriesToDelete.length === 0)
|
|
206
|
+
return [];
|
|
207
|
+
const ids = entriesToDelete.map((e) => e.get(pk));
|
|
208
|
+
await this._junctionModel().destroy({ where: { [fk]: ids }, transaction });
|
|
209
|
+
const deletedCount = await model.destroy({
|
|
210
|
+
where: { [pk]: ids },
|
|
211
|
+
transaction,
|
|
212
|
+
});
|
|
213
|
+
if (entriesToDelete.length === deletedCount) {
|
|
214
|
+
return entriesToDelete;
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
throw new Error(`Deleted ${deletedCount} entries, expected ${entriesToDelete.length}`);
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
//# sourceMappingURL=BaseJunction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseJunction.js","sourceRoot":"","sources":["../../../../src/layers/sequelize/repository/BaseJunction.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,EAAE;AACF,sCAAsC;AAEtC,OAAO,EAAwB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AASvE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAgD,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAgB,MAAM,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAEtD,MAAM,OAAgB,iCAEpB,SAAQ,cAAiB;IACf,CAAC,CAAY;IACb,SAAS,CAAS;IAClB,MAAM,CAAkB;IAElC,YACE,MAAuB,EACvB,SAAiB,EACjB,MAAwB,EACxB,iBAA6B;QAE7B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,CAAC,GAAG,iBAAiB,IAAI,wBAAwB,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,C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MAAM,eAAe,GAAG,MAAM,KAAK;iBAChC,OAAO,CAAC,EAAE,GAAI,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,QAAQ,CAAS,EAAE,WAAW,EAAE,CAAC;iBAClF,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAW,CAAC,CAAC;YAE/B,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC;gBAAE,OAAO,EAAE,CAAC;YAE5C,MAAM,GAAG,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;YAClD,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;YAC3E,MAAM,YAAY,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC;gBACvC,KAAK,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAuB;gBACzC,WAAW;aACZ,CAAC,CAAC;YAEH,IAAI,eAAe,CAAC,MAAM,KAAK,YAAY,EAAE,CAAC;gBAC5C,OAAO,eAAe,CAAC;YACzB,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,KAAK,CAAC,WAAW,YAAY,sBAAsB,eAAe,CAAC,MAAM,EAAE,CAAC,CAAC;YACzF,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BootConfig, BootstrapConfig } from '@citrineos
|
|
2
|
-
import { CrudRepository, OCPP2_0_1 } from '@citrineos
|
|
1
|
+
import type { BootConfig, BootstrapConfig } from '@zetra/citrineos-base';
|
|
2
|
+
import { CrudRepository, OCPP2_0_1 } from '@zetra/citrineos-base';
|
|
3
3
|
import type { IBootRepository } from '../../../interfaces/index.js';
|
|
4
4
|
import { Boot } from '../model/Boot.js';
|
|
5
5
|
import { VariableAttribute } from '../model/index.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CrudRepository, OCPP2_0_1 } from '@citrineos
|
|
1
|
+
import { CrudRepository, OCPP2_0_1 } from '@zetra/citrineos-base';
|
|
2
2
|
import { Boot } from '../model/Boot.js';
|
|
3
3
|
import { VariableAttribute } from '../model/index.js';
|
|
4
4
|
import { SequelizeRepository } from '../index.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SequelizeRepository } from './Base.js';
|
|
2
2
|
import type { ICertificateRepository } from '../../../interfaces/index.js';
|
|
3
3
|
import { Certificate } from '../model/index.js';
|
|
4
|
-
import type { BootstrapConfig } from '@citrineos
|
|
4
|
+
import type { BootstrapConfig } from '@zetra/citrineos-base';
|
|
5
5
|
import { Sequelize } from 'sequelize-typescript';
|
|
6
6
|
import type { ILogObj } from 'tslog';
|
|
7
7
|
import { Logger } from 'tslog';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BootstrapConfig } from '@citrineos
|
|
1
|
+
import type { BootstrapConfig } from '@zetra/citrineos-base';
|
|
2
2
|
import type { IChangeConfigurationRepository } from '../../../interfaces/index.js';
|
|
3
3
|
import { ChangeConfiguration, SequelizeRepository } from '../index.js';
|
|
4
4
|
import type { ILogObj } from 'tslog';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BootstrapConfig, ChargingLimitSourceEnumType, ChargingProfilePurposeEnumType } from '@citrineos
|
|
2
|
-
import { CrudRepository, OCPP2_0_1 } from '@citrineos
|
|
1
|
+
import type { BootstrapConfig, ChargingLimitSourceEnumType, ChargingProfilePurposeEnumType } from '@zetra/citrineos-base';
|
|
2
|
+
import { CrudRepository, OCPP2_0_1 } from '@zetra/citrineos-base';
|
|
3
3
|
import { SequelizeRepository } from './Base.js';
|
|
4
4
|
import type { IChargingProfileRepository } from '../../../interfaces/index.js';
|
|
5
5
|
import type { ChargingProfileInput, CompositeScheduleInput } from '../mapper/2.0.1/ChargingProfileMapper.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project
|
|
2
2
|
//
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
import { ChargingLimitSourceEnum, CrudRepository, OCPP2_0_1 } from '@citrineos
|
|
4
|
+
import { ChargingLimitSourceEnum, CrudRepository, OCPP2_0_1 } from '@zetra/citrineos-base';
|
|
5
5
|
import { SequelizeRepository } from './Base.js';
|
|
6
6
|
import { ChargingNeeds, ChargingProfile, ChargingSchedule, CompositeSchedule, Evse, EvseType, SalesTariff, Transaction, } from '../model/index.js';
|
|
7
7
|
import { Sequelize } from 'sequelize-typescript';
|
|
@@ -3,7 +3,7 @@ import { ChargingStationSecurityInfo } from '../model/index.js';
|
|
|
3
3
|
import type { ILogObj } from 'tslog';
|
|
4
4
|
import { Logger } from 'tslog';
|
|
5
5
|
import { Sequelize } from 'sequelize-typescript';
|
|
6
|
-
import type { BootstrapConfig } from '@citrineos
|
|
6
|
+
import type { BootstrapConfig } from '@zetra/citrineos-base';
|
|
7
7
|
import type { IChargingStationSecurityInfoRepository } from '../../../interfaces/index.js';
|
|
8
8
|
export declare class SequelizeChargingStationSecurityInfoRepository extends SequelizeRepository<ChargingStationSecurityInfo> implements IChargingStationSecurityInfoRepository {
|
|
9
9
|
constructor(config: BootstrapConfig, logger?: Logger<ILogObj>, sequelizeInstance?: Sequelize);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BootstrapConfig, ChargingStationSequenceTypeEnumType } from '@citrineos
|
|
1
|
+
import type { BootstrapConfig, ChargingStationSequenceTypeEnumType } from '@zetra/citrineos-base';
|
|
2
2
|
import { Sequelize } from 'sequelize-typescript';
|
|
3
3
|
import type { ILogObj } from 'tslog';
|
|
4
4
|
import { Logger } from 'tslog';
|
|
@@ -4,7 +4,7 @@ import type { ILogObj } from 'tslog';
|
|
|
4
4
|
import { Logger } from 'tslog';
|
|
5
5
|
import { DeleteCertificateAttempt } from '../model/index.js';
|
|
6
6
|
import type { IDeleteCertificateAttemptRepository } from '../../../interfaces/index.js';
|
|
7
|
-
import type { BootstrapConfig } from '@citrineos
|
|
7
|
+
import type { BootstrapConfig } from '@zetra/citrineos-base';
|
|
8
8
|
export declare class SequelizeDeleteCertificateAttemptRepository extends SequelizeRepository<DeleteCertificateAttempt> implements IDeleteCertificateAttemptRepository {
|
|
9
9
|
constructor(config: BootstrapConfig, logger?: Logger<ILogObj>, sequelizeInstance?: Sequelize);
|
|
10
10
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BootstrapConfig } from '@citrineos
|
|
2
|
-
import { CrudRepository, OCPP2_0_1 } from '@citrineos
|
|
1
|
+
import type { BootstrapConfig } from '@zetra/citrineos-base';
|
|
2
|
+
import { CrudRepository, OCPP2_0_1 } from '@zetra/citrineos-base';
|
|
3
3
|
import { SequelizeRepository } from './Base.js';
|
|
4
4
|
import { type IDeviceModelRepository, type VariableAttributeQuerystring } from '../../../interfaces/index.js';
|
|
5
5
|
import { Component, EvseType, Variable, VariableAttribute, VariableCharacteristics, VariableStatus } from '../model/index.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SequelizeRepository } from './Base.js';
|
|
2
2
|
import type { IInstallCertificateAttemptRepository } from '../../../interfaces/index.js';
|
|
3
|
-
import type { BootstrapConfig } from '@citrineos
|
|
3
|
+
import type { BootstrapConfig } from '@zetra/citrineos-base';
|
|
4
4
|
import { Sequelize } from 'sequelize-typescript';
|
|
5
5
|
import type { ILogObj } from 'tslog';
|
|
6
6
|
import { Logger } from 'tslog';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SequelizeRepository } from './Base.js';
|
|
2
2
|
import type { IInstalledCertificateRepository } from '../../../interfaces/index.js';
|
|
3
|
-
import type { BootstrapConfig } from '@citrineos
|
|
3
|
+
import type { BootstrapConfig } from '@zetra/citrineos-base';
|
|
4
4
|
import { Sequelize } from 'sequelize-typescript';
|
|
5
5
|
import type { ILogObj } from 'tslog';
|
|
6
6
|
import { Logger } from 'tslog';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BootstrapConfig } from '@citrineos
|
|
2
|
-
import { CrudRepository, OCPP2_0_1 } from '@citrineos
|
|
1
|
+
import type { BootstrapConfig } from '@zetra/citrineos-base';
|
|
2
|
+
import { CrudRepository, OCPP2_0_1 } from '@zetra/citrineos-base';
|
|
3
3
|
import { Sequelize } from 'sequelize-typescript';
|
|
4
4
|
import type { ILogObj } from 'tslog';
|
|
5
5
|
import { Logger } from 'tslog';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CrudRepository, OCPP2_0_1 } from '@citrineos
|
|
1
|
+
import { CrudRepository, OCPP2_0_1 } from '@zetra/citrineos-base';
|
|
2
2
|
import { Sequelize } from 'sequelize-typescript';
|
|
3
3
|
import { Logger } from 'tslog';
|
|
4
4
|
import { AuthorizationMapper } from '../mapper/2.0.1/index.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BootstrapConfig, OCPP2_0_1 } from '@citrineos
|
|
2
|
-
import { CrudRepository, OCPPVersion } from '@citrineos
|
|
1
|
+
import type { BootstrapConfig, OCPP2_0_1 } from '@zetra/citrineos-base';
|
|
2
|
+
import { CrudRepository, OCPPVersion } from '@zetra/citrineos-base';
|
|
3
3
|
import { Sequelize } from 'sequelize-typescript';
|
|
4
4
|
import type { ILogObj } from 'tslog';
|
|
5
5
|
import { Logger } from 'tslog';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project
|
|
2
2
|
//
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
import { CrudRepository, OCPPVersion } from '@citrineos
|
|
4
|
+
import { CrudRepository, OCPPVersion } from '@zetra/citrineos-base';
|
|
5
5
|
import { Op } from 'sequelize';
|
|
6
6
|
import { Sequelize } from 'sequelize-typescript';
|
|
7
7
|
import { Logger } from 'tslog';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SequelizeRepository } from './Base.js';
|
|
2
2
|
import { MessageInfo } from '../model/index.js';
|
|
3
3
|
import type { IMessageInfoRepository } from '../../../interfaces/index.js';
|
|
4
|
-
import type { BootstrapConfig } from '@citrineos
|
|
5
|
-
import { OCPP2_0_1 } from '@citrineos
|
|
4
|
+
import type { BootstrapConfig } from '@zetra/citrineos-base';
|
|
5
|
+
import { OCPP2_0_1 } from '@zetra/citrineos-base';
|
|
6
6
|
import { Sequelize } from 'sequelize-typescript';
|
|
7
7
|
import type { ILogObj } from 'tslog';
|
|
8
8
|
import { Logger } from 'tslog';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
import { SequelizeRepository } from './Base.js';
|
|
5
5
|
import { MessageInfo } from '../model/index.js';
|
|
6
|
-
import { OCPP2_0_1 } from '@citrineos
|
|
6
|
+
import { OCPP2_0_1 } from '@zetra/citrineos-base';
|
|
7
7
|
import { Sequelize } from 'sequelize-typescript';
|
|
8
8
|
import { Logger } from 'tslog';
|
|
9
9
|
export class SequelizeMessageInfoRepository extends SequelizeRepository {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BootstrapConfig, type OCPPMessageDto } from '@citrineos
|
|
1
|
+
import { type BootstrapConfig, type OCPPMessageDto } from '@zetra/citrineos-base';
|
|
2
2
|
import { Sequelize } from 'sequelize-typescript';
|
|
3
3
|
import type { ILogObj } from 'tslog';
|
|
4
4
|
import { Logger } from 'tslog';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project
|
|
2
2
|
//
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
import { MessageState } from '@citrineos
|
|
4
|
+
import { MessageState } from '@zetra/citrineos-base';
|
|
5
5
|
import { Sequelize } from 'sequelize-typescript';
|
|
6
6
|
import { Logger } from 'tslog';
|
|
7
7
|
import { OCPPMessage } from '../model/index.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IAuthorizationRepository, IBootRepository, ICertificateRepository, IChangeConfigurationRepository, IChargingProfileRepository, IChargingStationSequenceRepository, IDeleteCertificateAttemptRepository, IDeviceModelRepository, IInstallCertificateAttemptRepository, IInstalledCertificateRepository, ILocalAuthListRepository, ILocationRepository, IMessageInfoRepository, IOCPPMessageRepository, IReservationRepository, ISecurityEventRepository, IServerNetworkProfileRepository, ISubscriptionRepository, ITariffRepository, ITenantRepository, ITransactionEventRepository, IVariableMonitoringRepository } from '../../../interfaces/index.js';
|
|
2
|
-
import type { BootstrapConfig } from '@citrineos
|
|
3
|
-
import { CrudRepository } from '@citrineos
|
|
2
|
+
import type { BootstrapConfig } from '@zetra/citrineos-base';
|
|
3
|
+
import { CrudRepository } from '@zetra/citrineos-base';
|
|
4
4
|
import type { ILogObj } from 'tslog';
|
|
5
5
|
import { Logger } from 'tslog';
|
|
6
6
|
import { Sequelize } from 'sequelize-typescript';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BootstrapConfig } from '@citrineos
|
|
2
|
-
import { CrudRepository, OCPP2_0_1 } from '@citrineos
|
|
1
|
+
import type { BootstrapConfig } from '@zetra/citrineos-base';
|
|
2
|
+
import { CrudRepository, OCPP2_0_1 } from '@zetra/citrineos-base';
|
|
3
3
|
import type { IReservationRepository } from '../../../interfaces/index.js';
|
|
4
4
|
import { SequelizeRepository } from './Base.js';
|
|
5
5
|
import { Sequelize } from 'sequelize-typescript';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BootstrapConfig } from '@citrineos
|
|
2
|
-
import { OCPP2_0_1 } from '@citrineos
|
|
1
|
+
import type { BootstrapConfig } from '@zetra/citrineos-base';
|
|
2
|
+
import { OCPP2_0_1 } from '@zetra/citrineos-base';
|
|
3
3
|
import { SecurityEvent } from '../model/index.js';
|
|
4
4
|
import { SequelizeRepository } from './Base.js';
|
|
5
5
|
import type { ISecurityEventRepository } from '../../../interfaces/index.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Sequelize } from 'sequelize-typescript';
|
|
2
2
|
import { SequelizeRepository, Subscription } from '../index.js';
|
|
3
3
|
import type { ISubscriptionRepository } from '../../../index.js';
|
|
4
|
-
import type { BootstrapConfig } from '@citrineos
|
|
4
|
+
import type { BootstrapConfig } from '@zetra/citrineos-base';
|
|
5
5
|
import type { ILogObj } from 'tslog';
|
|
6
6
|
import { Logger } from 'tslog';
|
|
7
7
|
export declare class SequelizeSubscriptionRepository extends SequelizeRepository<Subscription> implements ISubscriptionRepository {
|
|
@@ -2,7 +2,7 @@ import { SequelizeRepository } from './Base.js';
|
|
|
2
2
|
import type { ITariffRepository, TariffQueryString } from '../../../interfaces/index.js';
|
|
3
3
|
import { Tariff } from '../model/index.js';
|
|
4
4
|
import { Sequelize } from 'sequelize-typescript';
|
|
5
|
-
import type { BootstrapConfig } from '@citrineos
|
|
5
|
+
import type { BootstrapConfig } from '@zetra/citrineos-base';
|
|
6
6
|
import type { ILogObj } from 'tslog';
|
|
7
7
|
import { Logger } from 'tslog';
|
|
8
8
|
export declare class SequelizeTariffRepository extends SequelizeRepository<Tariff> implements ITariffRepository {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SequelizeRepository } from './Base.js';
|
|
2
2
|
import type { ITenantRepository } from '../../../interfaces/index.js';
|
|
3
|
-
import type { BootstrapConfig } from '@citrineos
|
|
3
|
+
import type { BootstrapConfig } from '@zetra/citrineos-base';
|
|
4
4
|
import { Sequelize } from 'sequelize-typescript';
|
|
5
5
|
import type { ILogObj } from 'tslog';
|
|
6
6
|
import { Logger } from 'tslog';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BootstrapConfig, MeterValueDto } from '@citrineos
|
|
2
|
-
import { CrudRepository, OCPP1_6, OCPP2_0_1 } from '@citrineos
|
|
1
|
+
import type { BootstrapConfig, MeterValueDto } from '@zetra/citrineos-base';
|
|
2
|
+
import { CrudRepository, OCPP1_6, OCPP2_0_1 } from '@zetra/citrineos-base';
|
|
3
3
|
import { Sequelize } from 'sequelize-typescript';
|
|
4
4
|
import type { ILogObj } from 'tslog';
|
|
5
5
|
import { Logger } from 'tslog';
|