@dascompany/product 4.2.7 → 4.2.8
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
CHANGED
|
@@ -75,4 +75,5 @@ import CompanyDataI from "./types/CompanyDataI";
|
|
|
75
75
|
import MarketPlacesReader from "./reader/MarketPlacesReader";
|
|
76
76
|
import PriceConverter from "./utils/PriceConverter";
|
|
77
77
|
import createQueryOptionsForId from "./utils/createQueryOptionsForId";
|
|
78
|
-
|
|
78
|
+
import CilentAccountExistWithThisEmail from "./lib/errors/CilentAccountExistWithThisEmail";
|
|
79
|
+
export { Client, ClientAccountRepo, ClientAccountReader, AccountDeliveryDetailsReader, AccountCompanyDetailsReader, AccountCart, AccountCartReader, Admin, AdminRepo, AdminReader, Address, AddressI, AddressesRepo, AddressesReader, PersonalData, PersonalDataRepo, PersonalDataReader, PersonalDataI, CompanyDetails, CompanyDetailsRepo, CompanyDetailsReader, CompanyDetailsI, DeliveryDetails, DeliveryDetailsRepo, DeliveryDetailsReader, DeliveryDetailsI, DeliveryMethods, DeliveryMethodRepo, DeliveryMethodReader, DeliveryMethodI, DeliveryMethodTypeE, DeliveryStatus, DeliveryStatusReader, DeliveryStatusTypeE, PaymentDetails, PaymentDetailsRepo, PaymentDetailsReader, PaymentDetailsI, PaymentMethods, PaymentMethodRepo, PaymentMethodReader, PaymentMethodE, PaymentMethodI, PaymentStatus, PaymentStatusesReader, PaymentStatusE, Order, OrderRepo, OrderReader, OrderProduct, OrderProductsRepo, OrderProductsReader, OrderProductI, Status, OrderStatusReader, StatusI, OrderStatusTypeE, StatusTypesReader, ProductI, Product, ProductRepo, ProductReader, File, FilesRepo, FilesReader, FileI, FileConnection, FileConnectionsRepo, FileConnectionsReader, FileConnectionTypeE, CompanyData, CompanyDataRepo, CompanyDataReader, CompanyDataI, MarketPlacesReader, PriceConverter, createQueryOptionsForId, CilentAccountExistWithThisEmail };
|
package/dist/index.js
CHANGED
|
@@ -63,4 +63,5 @@ import CompanyDataReader from "./reader/CompanyDataReader";
|
|
|
63
63
|
import MarketPlacesReader from "./reader/MarketPlacesReader";
|
|
64
64
|
import PriceConverter from "./utils/PriceConverter";
|
|
65
65
|
import createQueryOptionsForId from "./utils/createQueryOptionsForId";
|
|
66
|
-
|
|
66
|
+
import CilentAccountExistWithThisEmail from "./lib/errors/CilentAccountExistWithThisEmail";
|
|
67
|
+
export { Client, ClientAccountRepo, ClientAccountReader, AccountDeliveryDetailsReader, AccountCompanyDetailsReader, AccountCart, AccountCartReader, Admin, AdminRepo, AdminReader, Address, AddressesRepo, AddressesReader, PersonalData, PersonalDataRepo, PersonalDataReader, CompanyDetails, CompanyDetailsRepo, CompanyDetailsReader, DeliveryDetails, DeliveryDetailsRepo, DeliveryDetailsReader, DeliveryMethods, DeliveryMethodRepo, DeliveryMethodReader, DeliveryMethodTypeE, DeliveryStatus, DeliveryStatusReader, DeliveryStatusTypeE, PaymentDetails, PaymentDetailsRepo, PaymentDetailsReader, PaymentMethods, PaymentMethodRepo, PaymentMethodReader, PaymentMethodE, PaymentStatus, PaymentStatusesReader, PaymentStatusE, Order, OrderRepo, OrderReader, OrderProduct, OrderProductsRepo, OrderProductsReader, Status, OrderStatusReader, OrderStatusTypeE, StatusTypesReader, Product, ProductRepo, ProductReader, File, FilesRepo, FilesReader, FileConnection, FileConnectionsRepo, FileConnectionsReader, FileConnectionTypeE, CompanyData, CompanyDataRepo, CompanyDataReader, MarketPlacesReader, PriceConverter, createQueryOptionsForId, CilentAccountExistWithThisEmail };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ParameterType, QueryOptions, Table } from '@dascompany/database';
|
|
2
2
|
import * as SQL from '../../SQL.json';
|
|
3
|
+
import CilentAccountExistWithThisEmail from '../../lib/errors/CilentAccountExistWithThisEmail';
|
|
3
4
|
export default class ClientAccountsTable extends Table {
|
|
4
5
|
async select(queryOptions) {
|
|
5
6
|
const query = this.createQuery(SQL.accounts.select, queryOptions);
|
|
@@ -46,7 +47,7 @@ export default class ClientAccountsTable extends Table {
|
|
|
46
47
|
queryOptions.setWhere([{ name: 'email', type: ParameterType.string, value: clientEmail }]);
|
|
47
48
|
let accountId = await this.selectId(queryOptions);
|
|
48
49
|
if (accountId)
|
|
49
|
-
throw new
|
|
50
|
+
throw new CilentAccountExistWithThisEmail(clientEmail);
|
|
50
51
|
else
|
|
51
52
|
accountId = await this.selectNextId();
|
|
52
53
|
const query = this.createQuery(SQL.accounts.insert);
|