@dascompany/product 2.1.1 → 2.1.2
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/reader/AdminReader.d.ts +1 -1
- package/dist/reader/ClientAccountReader.d.ts +1 -1
- package/dist/reader/DeliveryMethodReader.d.ts +1 -1
- package/dist/reader/DeliveryStatusReader.d.ts +1 -1
- package/dist/reader/FileConnectionsReader.d.ts +1 -1
- package/dist/reader/FilesReader.d.ts +1 -1
- package/dist/reader/OrderProductsReader.d.ts +1 -1
- package/dist/reader/OrderReader.d.ts +1 -1
- package/dist/reader/OrderStatusReader.d.ts +1 -1
- package/dist/reader/payment/PaymentMethodReader.d.ts +1 -1
- package/dist/reader/payment/PaymentStatusesReader.d.ts +1 -1
- package/dist/repo/AdminRepo.d.ts +1 -1
- package/dist/repo/FileConnectionsRepo.d.ts +1 -1
- package/dist/repo/OrderProductsRepo.d.ts +1 -1
- package/dist/repo/OrderStatusRepo.d.ts +1 -1
- package/dist/tables/clients/ClientAccountsTable.d.ts +1 -1
- package/dist/tables/files/FileConnectionsTable.d.ts +1 -1
- package/dist/tables/files/FilesTable.d.ts +1 -1
- package/dist/tables/orders/OrdersProductsTable.d.ts +1 -1
- package/dist/tables/orders/OrdersProductsTable.js +2 -2
- package/dist/tables/orders/OrdersTable.d.ts +1 -1
- package/dist/tables/orders/PaymentStatusesTable.d.ts +1 -1
- package/dist/tables/orders/StatusesTable.d.ts +1 -1
- package/dist/tables/personalInformation/DeliveryStatusesTable.d.ts +1 -1
- package/dist/tables/public/AdminAccountsTable.d.ts +1 -1
- package/dist/tables/public/ProductsTable.d.ts +1 -1
- package/dist/tables/settings/DeliveryMethodsTable.d.ts +1 -1
- package/dist/tables/settings/PaymentMethodsTable.d.ts +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import AdminI from "../types/AdminI";
|
|
|
3
3
|
export default class AdminReader {
|
|
4
4
|
static get(queryOptions: QueryOptions): Promise<AdminI>;
|
|
5
5
|
static getId(queryOptions: QueryOptions): Promise<number>;
|
|
6
|
-
static getAll(queryOptions
|
|
6
|
+
static getAll(queryOptions?: QueryOptions): Promise<AdminI[]>;
|
|
7
7
|
static getQuantity(queryOptions: QueryOptions): Promise<number>;
|
|
8
8
|
private static correctAdmins;
|
|
9
9
|
private static correctAdmin;
|
|
@@ -2,7 +2,7 @@ import { QueryOptions } from "@dascompany/database";
|
|
|
2
2
|
import ClientAccountI from "../types/ClientAccountI";
|
|
3
3
|
export default class ClientAccountReader {
|
|
4
4
|
static get(queryOptions: QueryOptions): Promise<ClientAccountI>;
|
|
5
|
-
static getAll(queryOptions
|
|
5
|
+
static getAll(queryOptions?: QueryOptions): Promise<ClientAccountI[]>;
|
|
6
6
|
static getQuantity(queryOptions: QueryOptions): Promise<number>;
|
|
7
7
|
static getId(queryOptions: QueryOptions): Promise<number | null>;
|
|
8
8
|
private static correctClientsFromRows;
|
|
@@ -2,5 +2,5 @@ import { QueryOptions } from "@dascompany/database";
|
|
|
2
2
|
import DeliveryMethodI from "../types/DeliveryMethodI";
|
|
3
3
|
export default class DeliveryMethodReader {
|
|
4
4
|
static get(queryOptions: QueryOptions): Promise<DeliveryMethodI>;
|
|
5
|
-
static getAll(queryOptions
|
|
5
|
+
static getAll(queryOptions?: QueryOptions): Promise<DeliveryMethodI[]>;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { QueryOptions } from "@dascompany/database";
|
|
2
2
|
export default class DeliveryStatusReader {
|
|
3
3
|
static get(queryOptions: QueryOptions): Promise<any>;
|
|
4
|
-
static getAll(queryOptions
|
|
4
|
+
static getAll(queryOptions?: QueryOptions): Promise<any[]>;
|
|
5
5
|
private static correctDeliveryStatus;
|
|
6
6
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { QueryOptions } from "@dascompany/database";
|
|
2
2
|
import FileConnectionI from "../types/FileConnectionI";
|
|
3
3
|
export default class FileConnectionsReader {
|
|
4
|
-
static getAll(queryOptions
|
|
4
|
+
static getAll(queryOptions?: QueryOptions): Promise<FileConnectionI[]>;
|
|
5
5
|
private static correctFileConnections;
|
|
6
6
|
private static correctFileConnection;
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@ import { QueryOptions } from "@dascompany/database";
|
|
|
2
2
|
import FileI from "../types/FileI";
|
|
3
3
|
export default class FilesReader {
|
|
4
4
|
static get(queryOptions: QueryOptions): Promise<FileI>;
|
|
5
|
-
static getAll(queryOptions
|
|
5
|
+
static getAll(queryOptions?: QueryOptions): Promise<FileI[]>;
|
|
6
6
|
static getId(queryOptions: QueryOptions): Promise<number>;
|
|
7
7
|
static getQuantity(queryOptions: any): Promise<number>;
|
|
8
8
|
static getForConnection(queryOptions: QueryOptions): Promise<FileI[]>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { QueryOptions } from "@dascompany/database";
|
|
2
2
|
import OrderProductI from "../types/OrderProductI";
|
|
3
3
|
export default class OrderProductsReader {
|
|
4
|
-
static getAll(queryOptions
|
|
4
|
+
static getAll(queryOptions?: QueryOptions): Promise<OrderProductI[]>;
|
|
5
5
|
private static correctOrderProducts;
|
|
6
6
|
private static correctProduct;
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@ import { QueryOptions } from "@dascompany/database";
|
|
|
2
2
|
import OrderI from "../types/OrderI";
|
|
3
3
|
export default class OrderReader {
|
|
4
4
|
static get(queryOptions: QueryOptions): Promise<OrderI>;
|
|
5
|
-
static getAll(queryOptions
|
|
5
|
+
static getAll(queryOptions?: QueryOptions): Promise<OrderI[]>;
|
|
6
6
|
static getAllForClient(queryOptions: QueryOptions): Promise<OrderI[]>;
|
|
7
7
|
static getQuantity(queryOptions: QueryOptions): Promise<number>;
|
|
8
8
|
private static correctOrders;
|
|
@@ -2,6 +2,6 @@ import { QueryOptions } from "@dascompany/database";
|
|
|
2
2
|
import OrderStatusI from "../types/StatusI";
|
|
3
3
|
export default class OrderStatusReader {
|
|
4
4
|
static get(queryOptions: QueryOptions): Promise<OrderStatusI>;
|
|
5
|
-
static getAll(queryOptions
|
|
5
|
+
static getAll(queryOptions?: QueryOptions): Promise<OrderStatusI[]>;
|
|
6
6
|
private static correctStatus;
|
|
7
7
|
}
|
|
@@ -2,5 +2,5 @@ import { QueryOptions } from "@dascompany/database";
|
|
|
2
2
|
import PaymentMethodI from "../../types/PaymentMethodI";
|
|
3
3
|
export default class PaymentMethodReader {
|
|
4
4
|
static get(queryOptions: QueryOptions): Promise<PaymentMethodI>;
|
|
5
|
-
static getAll(queryOptions
|
|
5
|
+
static getAll(queryOptions?: QueryOptions): Promise<PaymentMethodI[]>;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { QueryOptions } from "@dascompany/database";
|
|
2
2
|
export default class PaymentStatusesReader {
|
|
3
3
|
static get(queryOptions: QueryOptions): Promise<any>;
|
|
4
|
-
static getAll(queryOptions
|
|
4
|
+
static getAll(queryOptions?: QueryOptions): Promise<any[]>;
|
|
5
5
|
private static correctPaymentStatus;
|
|
6
6
|
}
|
package/dist/repo/AdminRepo.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import Admin from "../stockObjects/Admin";
|
|
|
3
3
|
export default class AdminRepo {
|
|
4
4
|
static get(queryOptions: QueryOptions): Promise<Admin>;
|
|
5
5
|
static getId(queryOptions: QueryOptions): Promise<number>;
|
|
6
|
-
static getAll(queryOptions
|
|
6
|
+
static getAll(queryOptions?: QueryOptions): Promise<Admin[]>;
|
|
7
7
|
static getQuantity(queryOptions: QueryOptions): Promise<number>;
|
|
8
8
|
private static createAdminsFromRows;
|
|
9
9
|
private static createAdminFromRow;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { QueryOptions } from "@dascompany/database";
|
|
2
2
|
import FileConnection from "../stockObjects/FileConnection";
|
|
3
3
|
export default class FileConnectionsRepo {
|
|
4
|
-
static getAll(queryOptions
|
|
4
|
+
static getAll(queryOptions?: QueryOptions): Promise<FileConnection[]>;
|
|
5
5
|
static delete(id: number): Promise<boolean>;
|
|
6
6
|
private static correctFileConnections;
|
|
7
7
|
private static correctFileConnection;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { QueryOptions } from "@dascompany/database";
|
|
2
2
|
import OrderProduct from "../stockObjects/OrderProduct";
|
|
3
3
|
export default class OrderProductsRepo {
|
|
4
|
-
static getAll(queryOptions
|
|
4
|
+
static getAll(queryOptions?: QueryOptions): Promise<OrderProduct[]>;
|
|
5
5
|
private static createOrdersProductsFromRows;
|
|
6
6
|
private static createOrdersProductFromRow;
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@ import { QueryOptions } from "@dascompany/database";
|
|
|
2
2
|
import Status from "../stockObjects/Status";
|
|
3
3
|
export default class OrderStatusRepo {
|
|
4
4
|
static get(queryOptions: QueryOptions): Promise<Status>;
|
|
5
|
-
static getAll(queryOptions
|
|
5
|
+
static getAll(queryOptions?: QueryOptions): Promise<Status[]>;
|
|
6
6
|
private static createStatusesFromRows;
|
|
7
7
|
private static createStatusFromRow;
|
|
8
8
|
}
|
|
@@ -3,7 +3,7 @@ import ClientAccountRow from '../../types/rows/ClientAccountRow';
|
|
|
3
3
|
import Client from '../../stockObjects/Client';
|
|
4
4
|
export default class ClientAccountsTable extends Table {
|
|
5
5
|
select(queryOptions: QueryOptions): Promise<ClientAccountRow>;
|
|
6
|
-
selectAll(queryOptions
|
|
6
|
+
selectAll(queryOptions?: QueryOptions): Promise<ClientAccountRow[]>;
|
|
7
7
|
selectId(queryOptions: QueryOptions): Promise<number | null>;
|
|
8
8
|
count(queryOptions: QueryOptions): Promise<number>;
|
|
9
9
|
update(clientData: Client): Promise<void>;
|
|
@@ -2,7 +2,7 @@ import { QueryOptions, Table } from '@dascompany/database';
|
|
|
2
2
|
import FileConnection from '../../stockObjects/FileConnection';
|
|
3
3
|
import FileConnectionRow from '../../types/rows/FileConnectionRow';
|
|
4
4
|
export default class FileConnectionsTable extends Table {
|
|
5
|
-
selectAll(queryOptions
|
|
5
|
+
selectAll(queryOptions?: QueryOptions): Promise<FileConnectionRow[]>;
|
|
6
6
|
insert(fileConnection: FileConnection): Promise<void>;
|
|
7
7
|
delete(id: number): Promise<boolean>;
|
|
8
8
|
private bindParameters;
|
|
@@ -3,7 +3,7 @@ import FileRow from '../../types/rows/FileRow';
|
|
|
3
3
|
import File from '../../stockObjects/File';
|
|
4
4
|
export default class FilesTable extends Table {
|
|
5
5
|
select(queryOptions: QueryOptions): Promise<FileRow>;
|
|
6
|
-
selectAll(queryOptions
|
|
6
|
+
selectAll(queryOptions?: QueryOptions): Promise<FileRow[]>;
|
|
7
7
|
selectId(queryOptions: QueryOptions): Promise<number>;
|
|
8
8
|
selectForConnection(queryOptions: QueryOptions): Promise<FileRow[]>;
|
|
9
9
|
insert(file: File): Promise<boolean>;
|
|
@@ -2,7 +2,7 @@ import { QueryOptions, Table } from '@dascompany/database';
|
|
|
2
2
|
import OrderProductRow from '../../types/rows/OrderProductRow';
|
|
3
3
|
import OrderProduct from '../../stockObjects/OrderProduct';
|
|
4
4
|
export default class OrdersProductsTable extends Table {
|
|
5
|
-
selectAll(
|
|
5
|
+
selectAll(queryOptions?: QueryOptions): Promise<OrderProductRow[]>;
|
|
6
6
|
insert(orderProduct: OrderProduct): Promise<boolean>;
|
|
7
7
|
delete(orderProduct: OrderProduct): Promise<boolean>;
|
|
8
8
|
private selectNextId;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Table } from '@dascompany/database';
|
|
2
2
|
import * as SQL from '../../SQL.json';
|
|
3
3
|
export default class OrdersProductsTable extends Table {
|
|
4
|
-
async selectAll(
|
|
5
|
-
const query = this.createQuery(SQL.ordersProducts.selectAll,
|
|
4
|
+
async selectAll(queryOptions) {
|
|
5
|
+
const query = this.createQuery(SQL.ordersProducts.selectAll, queryOptions);
|
|
6
6
|
const result = await query.execute();
|
|
7
7
|
return result.getRows();
|
|
8
8
|
}
|
|
@@ -3,7 +3,7 @@ import OrderRow from '../../types/rows/OrderRow';
|
|
|
3
3
|
import Order from '../../stockObjects/Order';
|
|
4
4
|
export default class OrdersTable extends Table {
|
|
5
5
|
select(queryOptions: QueryOptions): Promise<OrderRow>;
|
|
6
|
-
selectAll(queryOption
|
|
6
|
+
selectAll(queryOption?: QueryOptions): Promise<OrderRow[]>;
|
|
7
7
|
count(queryOptions?: QueryOptions): Promise<number>;
|
|
8
8
|
insert(order: Order): Promise<void>;
|
|
9
9
|
update(order: Order): Promise<void>;
|
|
@@ -3,7 +3,7 @@ import PaymentStatus from '../../stockObjects/PaymentStatus';
|
|
|
3
3
|
import PaymentStatusRow from '../../types/rows/PaymentStatusRow';
|
|
4
4
|
export default class PaymentStatusesTable extends Table {
|
|
5
5
|
select(queryOptions: QueryOptions): Promise<PaymentStatusRow>;
|
|
6
|
-
selectAll(queryOptions
|
|
6
|
+
selectAll(queryOptions?: QueryOptions): Promise<PaymentStatusRow[]>;
|
|
7
7
|
insert(paymentStatus: PaymentStatus): Promise<void>;
|
|
8
8
|
private selectNextId;
|
|
9
9
|
}
|
|
@@ -3,7 +3,7 @@ import Status from '../../stockObjects/Status';
|
|
|
3
3
|
import StatusRow from '../../types/rows/StatusRow';
|
|
4
4
|
export default class StatusesTable extends Table {
|
|
5
5
|
select(queryOptions: QueryOptions): Promise<StatusRow>;
|
|
6
|
-
selectAll(queryOptions
|
|
6
|
+
selectAll(queryOptions?: QueryOptions): Promise<StatusRow[]>;
|
|
7
7
|
insert(status: Status): Promise<void>;
|
|
8
8
|
private bindParameters;
|
|
9
9
|
private selectNextId;
|
|
@@ -3,7 +3,7 @@ import DeliveryStatus from '../../stockObjects/DeliveryStatus';
|
|
|
3
3
|
import DeliveryStatusRow from '../../types/rows/DeliveryStatusRow';
|
|
4
4
|
export default class DeliveryStatusesTable extends Table {
|
|
5
5
|
select(queryOptions: QueryOptions): Promise<DeliveryStatusRow>;
|
|
6
|
-
selectAll(queryOptions
|
|
6
|
+
selectAll(queryOptions?: QueryOptions): Promise<DeliveryStatusRow[]>;
|
|
7
7
|
insert(deliveryStatus: DeliveryStatus): Promise<void>;
|
|
8
8
|
private selectNextId;
|
|
9
9
|
}
|
|
@@ -3,7 +3,7 @@ import AdminRow from "../../types/rows/AdminRow";
|
|
|
3
3
|
import Admin from "../../stockObjects/Admin";
|
|
4
4
|
export default class AdminAccountsTable extends Table {
|
|
5
5
|
select(queryOptions: QueryOptions): Promise<AdminRow>;
|
|
6
|
-
selectAll(queryOptions
|
|
6
|
+
selectAll(queryOptions?: QueryOptions): Promise<AdminRow[]>;
|
|
7
7
|
selectId(queryOptions: QueryOptions): Promise<number>;
|
|
8
8
|
count(queryOptions: QueryOptions): Promise<number>;
|
|
9
9
|
insert(admin: Admin): Promise<number>;
|
|
@@ -3,7 +3,7 @@ import Product from '../../stockObjects/Product';
|
|
|
3
3
|
import ProductRow from '../../types/rows/ProductRow';
|
|
4
4
|
export default class ProductsTable extends Table {
|
|
5
5
|
select(queryOptions: QueryOptions): Promise<ProductRow>;
|
|
6
|
-
selectAll(queryOptions
|
|
6
|
+
selectAll(queryOptions?: QueryOptions): Promise<ProductRow[]>;
|
|
7
7
|
selectId(queryOptions: QueryOptions): Promise<number>;
|
|
8
8
|
insert(productData: Product): Promise<number>;
|
|
9
9
|
update(product: Product): Promise<boolean>;
|
|
@@ -3,7 +3,7 @@ import DeliveryMethodI from '../../types/DeliveryMethodI';
|
|
|
3
3
|
import DeliveryMethods from '../../stockObjects/DeliveryMethods';
|
|
4
4
|
export default class DeliveryMethodsTable extends Table {
|
|
5
5
|
select(queryOptions: QueryOptions): Promise<DeliveryMethodI>;
|
|
6
|
-
selectAll(queryOptions
|
|
6
|
+
selectAll(queryOptions?: QueryOptions): Promise<DeliveryMethodI[]>;
|
|
7
7
|
insert(deliveryMethods: DeliveryMethods): Promise<boolean>;
|
|
8
8
|
update(deliveryMethods: DeliveryMethods): Promise<boolean>;
|
|
9
9
|
private selectNextId;
|
|
@@ -3,7 +3,7 @@ import PaymentMethodI from '../../types/PaymentMethodI';
|
|
|
3
3
|
import PaymentMethods from '../../stockObjects/PaymentMethods';
|
|
4
4
|
export default class PaymentMethodsTable extends Table {
|
|
5
5
|
select(queryOptions: QueryOptions): Promise<PaymentMethodI>;
|
|
6
|
-
selectAll(queryOptions
|
|
6
|
+
selectAll(queryOptions?: QueryOptions): Promise<PaymentMethodI[]>;
|
|
7
7
|
insert(paymentMethods: PaymentMethods): Promise<boolean>;
|
|
8
8
|
update(paymentMethods: PaymentMethods): Promise<boolean>;
|
|
9
9
|
private selectNextId;
|