starta.apiclient 1.37.3583 → 1.37.3591
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.
|
@@ -2,7 +2,13 @@ import { StartaRequestRunner } from '../../types';
|
|
|
2
2
|
export default class CashRegisterOperations {
|
|
3
3
|
private _requestRunner;
|
|
4
4
|
constructor(requestRunner: StartaRequestRunner);
|
|
5
|
-
index(organizationLogin: string, branchId
|
|
5
|
+
index(organizationLogin: string, { branchId, dateFrom, dateTo, operationSubtype, cashRegisterId, }: {
|
|
6
|
+
branchId?: string;
|
|
7
|
+
dateFrom?: string;
|
|
8
|
+
dateTo?: string;
|
|
9
|
+
operationSubtype?: 'provisionOfServices' | 'saleOfProducts' | 'purchaseOfMaterials' | 'purchaseOfProducts' | 'employeeSalaries' | 'taxesAndFees' | 'otherIncome' | 'otherExpenses';
|
|
10
|
+
cashRegisterId?: string;
|
|
11
|
+
}): Promise<import("../../types").StartaResponse>;
|
|
6
12
|
add(organizationLogin: string, { cashRegisterId, branchId, operationType, operationSubtype, receiverType, recipient, recipientLogin, amount, comment, date, }: {
|
|
7
13
|
cashRegisterId: string;
|
|
8
14
|
branchId?: string;
|
|
@@ -5,9 +5,9 @@ class CashRegisterOperations {
|
|
|
5
5
|
constructor(requestRunner) {
|
|
6
6
|
this._requestRunner = requestRunner;
|
|
7
7
|
}
|
|
8
|
-
index(organizationLogin, branchId) {
|
|
8
|
+
index(organizationLogin, { branchId, dateFrom, dateTo, operationSubtype, cashRegisterId, }) {
|
|
9
9
|
return this._requestRunner.performRequest({
|
|
10
|
-
url: `accounts/${organizationLogin}/cashRegisterOperations${(0, _helpers_1.buildQuery)({ branchId })}`,
|
|
10
|
+
url: `accounts/${organizationLogin}/cashRegisterOperations${(0, _helpers_1.buildQuery)({ branchId, dateFrom, dateTo, operationSubtype, cashRegisterId })}`,
|
|
11
11
|
method: 'GET',
|
|
12
12
|
});
|
|
13
13
|
}
|
|
@@ -2,6 +2,17 @@ import { ProductOperation, StartaRequestRunner } from '../../types';
|
|
|
2
2
|
export default class ProductOperations {
|
|
3
3
|
private _requestRunner;
|
|
4
4
|
constructor(requestRunner: StartaRequestRunner);
|
|
5
|
-
index(organizationLogin: string
|
|
5
|
+
index(organizationLogin: string, { searchQuery, filters, }?: {
|
|
6
|
+
searchQuery?: string;
|
|
7
|
+
filters?: {
|
|
8
|
+
date?: {
|
|
9
|
+
from?: string;
|
|
10
|
+
to?: string;
|
|
11
|
+
};
|
|
12
|
+
operationType?: 'writeOff' | 'receiving';
|
|
13
|
+
warehouseId?: string;
|
|
14
|
+
paymentStatus?: 'paid' | 'unpaid';
|
|
15
|
+
};
|
|
16
|
+
}): Promise<import("../../types").StartaResponse>;
|
|
6
17
|
add(organizationLogin: string, { date, type, supplier, warehouseId, products, isPaid, comment, }: ProductOperation): Promise<import("../../types").StartaResponse>;
|
|
7
18
|
}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const _helpers_1 = require("../_helpers");
|
|
3
4
|
class ProductOperations {
|
|
4
5
|
constructor(requestRunner) {
|
|
5
6
|
this._requestRunner = requestRunner;
|
|
6
7
|
}
|
|
7
|
-
index(organizationLogin) {
|
|
8
|
+
index(organizationLogin, { searchQuery, filters, } = {}) {
|
|
8
9
|
return this._requestRunner.performRequest({
|
|
9
|
-
url: `accounts/${organizationLogin}/productOperations
|
|
10
|
+
url: `accounts/${organizationLogin}/productOperations${(0, _helpers_1.buildQuery)({
|
|
11
|
+
searchQuery,
|
|
12
|
+
filters,
|
|
13
|
+
})}`,
|
|
10
14
|
method: 'GET',
|
|
11
15
|
});
|
|
12
16
|
}
|