@dannychirkov/salesdrive-api-client 0.1.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/README.md +200 -0
- package/dist/core/client.d.ts +54 -0
- package/dist/core/client.d.ts.map +1 -0
- package/dist/core/client.js +67 -0
- package/dist/core/client.js.map +1 -0
- package/dist/http/transport.d.ts +34 -0
- package/dist/http/transport.d.ts.map +1 -0
- package/dist/http/transport.js +8 -0
- package/dist/http/transport.js.map +1 -0
- package/dist/index.d.ts +56 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +48 -0
- package/dist/index.js.map +1 -0
- package/dist/services/actService.d.ts +21 -0
- package/dist/services/actService.d.ts.map +1 -0
- package/dist/services/actService.js +23 -0
- package/dist/services/actService.js.map +1 -0
- package/dist/services/arrivalService.d.ts +21 -0
- package/dist/services/arrivalService.d.ts.map +1 -0
- package/dist/services/arrivalService.js +23 -0
- package/dist/services/arrivalService.js.map +1 -0
- package/dist/services/cashOrderService.d.ts +21 -0
- package/dist/services/cashOrderService.d.ts.map +1 -0
- package/dist/services/cashOrderService.js +23 -0
- package/dist/services/cashOrderService.js.map +1 -0
- package/dist/services/categoryService.d.ts +27 -0
- package/dist/services/categoryService.d.ts.map +1 -0
- package/dist/services/categoryService.js +39 -0
- package/dist/services/categoryService.js.map +1 -0
- package/dist/services/checkService.d.ts +21 -0
- package/dist/services/checkService.d.ts.map +1 -0
- package/dist/services/checkService.js +23 -0
- package/dist/services/checkService.js.map +1 -0
- package/dist/services/contractService.d.ts +21 -0
- package/dist/services/contractService.d.ts.map +1 -0
- package/dist/services/contractService.js +23 -0
- package/dist/services/contractService.js.map +1 -0
- package/dist/services/currencyService.d.ts +27 -0
- package/dist/services/currencyService.d.ts.map +1 -0
- package/dist/services/currencyService.js +32 -0
- package/dist/services/currencyService.js.map +1 -0
- package/dist/services/invoiceService.d.ts +23 -0
- package/dist/services/invoiceService.d.ts.map +1 -0
- package/dist/services/invoiceService.js +25 -0
- package/dist/services/invoiceService.js.map +1 -0
- package/dist/services/orderService.d.ts +31 -0
- package/dist/services/orderService.d.ts.map +1 -0
- package/dist/services/orderService.js +41 -0
- package/dist/services/orderService.js.map +1 -0
- package/dist/services/paymentService.d.ts +27 -0
- package/dist/services/paymentService.d.ts.map +1 -0
- package/dist/services/paymentService.js +33 -0
- package/dist/services/paymentService.js.map +1 -0
- package/dist/services/productService.d.ts +29 -0
- package/dist/services/productService.d.ts.map +1 -0
- package/dist/services/productService.js +42 -0
- package/dist/services/productService.js.map +1 -0
- package/dist/services/referenceService.d.ts +31 -0
- package/dist/services/referenceService.d.ts.map +1 -0
- package/dist/services/referenceService.js +38 -0
- package/dist/services/referenceService.js.map +1 -0
- package/dist/services/salesInvoiceService.d.ts +21 -0
- package/dist/services/salesInvoiceService.d.ts.map +1 -0
- package/dist/services/salesInvoiceService.js +23 -0
- package/dist/services/salesInvoiceService.js.map +1 -0
- package/dist/types/act.d.ts +52 -0
- package/dist/types/act.d.ts.map +1 -0
- package/dist/types/act.js +6 -0
- package/dist/types/act.js.map +1 -0
- package/dist/types/arrival.d.ts +59 -0
- package/dist/types/arrival.d.ts.map +1 -0
- package/dist/types/arrival.js +6 -0
- package/dist/types/arrival.js.map +1 -0
- package/dist/types/base.d.ts +160 -0
- package/dist/types/base.d.ts.map +1 -0
- package/dist/types/base.js +8 -0
- package/dist/types/base.js.map +1 -0
- package/dist/types/call.d.ts +29 -0
- package/dist/types/call.d.ts.map +1 -0
- package/dist/types/call.js +6 -0
- package/dist/types/call.js.map +1 -0
- package/dist/types/cashOrder.d.ts +53 -0
- package/dist/types/cashOrder.d.ts.map +1 -0
- package/dist/types/cashOrder.js +6 -0
- package/dist/types/cashOrder.js.map +1 -0
- package/dist/types/category.d.ts +28 -0
- package/dist/types/category.d.ts.map +1 -0
- package/dist/types/category.js +8 -0
- package/dist/types/category.js.map +1 -0
- package/dist/types/check.d.ts +71 -0
- package/dist/types/check.d.ts.map +1 -0
- package/dist/types/check.js +6 -0
- package/dist/types/check.js.map +1 -0
- package/dist/types/contact.d.ts +41 -0
- package/dist/types/contact.d.ts.map +1 -0
- package/dist/types/contact.js +8 -0
- package/dist/types/contact.js.map +1 -0
- package/dist/types/contract.d.ts +46 -0
- package/dist/types/contract.d.ts.map +1 -0
- package/dist/types/contract.js +6 -0
- package/dist/types/contract.js.map +1 -0
- package/dist/types/currency.d.ts +36 -0
- package/dist/types/currency.d.ts.map +1 -0
- package/dist/types/currency.js +8 -0
- package/dist/types/currency.js.map +1 -0
- package/dist/types/delivery.d.ts +88 -0
- package/dist/types/delivery.d.ts.map +1 -0
- package/dist/types/delivery.js +8 -0
- package/dist/types/delivery.js.map +1 -0
- package/dist/types/errors.d.ts +38 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/errors.js +70 -0
- package/dist/types/errors.js.map +1 -0
- package/dist/types/invoice.d.ts +55 -0
- package/dist/types/invoice.d.ts.map +1 -0
- package/dist/types/invoice.js +8 -0
- package/dist/types/invoice.js.map +1 -0
- package/dist/types/order.d.ts +196 -0
- package/dist/types/order.d.ts.map +1 -0
- package/dist/types/order.js +8 -0
- package/dist/types/order.js.map +1 -0
- package/dist/types/payment.d.ts +91 -0
- package/dist/types/payment.d.ts.map +1 -0
- package/dist/types/payment.js +8 -0
- package/dist/types/payment.js.map +1 -0
- package/dist/types/product.d.ts +140 -0
- package/dist/types/product.d.ts.map +1 -0
- package/dist/types/product.js +8 -0
- package/dist/types/product.js.map +1 -0
- package/dist/types/reference.d.ts +51 -0
- package/dist/types/reference.d.ts.map +1 -0
- package/dist/types/reference.js +8 -0
- package/dist/types/reference.js.map +1 -0
- package/dist/types/salesInvoice.d.ts +52 -0
- package/dist/types/salesInvoice.d.ts.map +1 -0
- package/dist/types/salesInvoice.js +6 -0
- package/dist/types/salesInvoice.js.map +1 -0
- package/dist/types/webhook.d.ts +107 -0
- package/dist/types/webhook.d.ts.map +1 -0
- package/dist/types/webhook.js +8 -0
- package/dist/types/webhook.js.map +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"referenceService.js","sourceRoot":"","sources":["../../src/services/referenceService.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AA+BH;;GAEG;AACI,MAAM,gBAAgB,GAAuC,CAAC,GAAkB,EAAE,EAAE,CAAC,CAAC;IAC3F,SAAS,EAAE;QACT,KAAK,CAAC,iBAAiB;YACrB,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,SAAS,CAAyB;gBACzD,MAAM,EAAE,KAAK;gBACb,QAAQ,EAAE,uBAAuB;aAClC,CAAC,CAAC;YACH,OAAO,MAAM,CAAC,IAA8B,CAAC;QAC/C,CAAC;QAED,KAAK,CAAC,kBAAkB;YACtB,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,SAAS,CAA0B;gBAC1D,MAAM,EAAE,KAAK;gBACb,QAAQ,EAAE,wBAAwB;aACnC,CAAC,CAAC;YACH,OAAO,MAAM,CAAC,IAA+B,CAAC;QAChD,CAAC;QAED,KAAK,CAAC,WAAW;YACf,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,SAAS,CAAwB;gBACxD,MAAM,EAAE,KAAK;gBACb,QAAQ,EAAE,gBAAgB;aAC3B,CAAC,CAAC;YACH,OAAO,MAAM,CAAC,IAA6B,CAAC;QAC9C,CAAC;KACF;CACF,CAAC,CAAC;AA1BU,QAAA,gBAAgB,oBA0B1B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sales Invoice Service (Видаткові накладні)
|
|
3
|
+
*/
|
|
4
|
+
import type { ServicePlugin } from '../core/client.js';
|
|
5
|
+
import type { ListSalesInvoicesRequest, ListSalesInvoicesResponse } from '../types/salesInvoice.js';
|
|
6
|
+
/**
|
|
7
|
+
* Sales invoice service API
|
|
8
|
+
*/
|
|
9
|
+
export interface SalesInvoiceServiceApi {
|
|
10
|
+
readonly salesInvoices: {
|
|
11
|
+
/**
|
|
12
|
+
* List sales invoices with filters
|
|
13
|
+
*/
|
|
14
|
+
list(params?: ListSalesInvoicesRequest): Promise<ListSalesInvoicesResponse>;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Sales invoice service plugin
|
|
19
|
+
*/
|
|
20
|
+
export declare const salesInvoiceService: ServicePlugin<SalesInvoiceServiceApi>;
|
|
21
|
+
//# sourceMappingURL=salesInvoiceService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"salesInvoiceService.d.ts","sourceRoot":"","sources":["../../src/services/salesInvoiceService.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAiB,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EACV,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,aAAa,EAAE;QACtB;;WAEG;QACH,IAAI,CAAC,MAAM,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;KAC7E,CAAC;CACH;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,aAAa,CAAC,sBAAsB,CAapE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Sales Invoice Service (Видаткові накладні)
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.salesInvoiceService = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Sales invoice service plugin
|
|
9
|
+
*/
|
|
10
|
+
const salesInvoiceService = (ctx) => ({
|
|
11
|
+
salesInvoices: {
|
|
12
|
+
async list(params) {
|
|
13
|
+
const result = await ctx.transport({
|
|
14
|
+
method: 'GET',
|
|
15
|
+
endpoint: '/api/sales-invoice/list/',
|
|
16
|
+
params: params,
|
|
17
|
+
});
|
|
18
|
+
return result.data;
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
exports.salesInvoiceService = salesInvoiceService;
|
|
23
|
+
//# sourceMappingURL=salesInvoiceService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"salesInvoiceService.js","sourceRoot":"","sources":["../../src/services/salesInvoiceService.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAoBH;;GAEG;AACI,MAAM,mBAAmB,GAA0C,CACxE,GAAkB,EAClB,EAAE,CAAC,CAAC;IACJ,aAAa,EAAE;QACb,KAAK,CAAC,IAAI,CAAC,MAAiC;YAC1C,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,SAAS,CAA4B;gBAC5D,MAAM,EAAE,KAAK;gBACb,QAAQ,EAAE,0BAA0B;gBACpC,MAAM,EAAE,MAA4C;aACrD,CAAC,CAAC;YACH,OAAO,MAAM,CAAC,IAAiC,CAAC;QAClD,CAAC;KACF;CACF,CAAC,CAAC;AAbU,QAAA,mBAAmB,uBAa7B"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Act Types (Акти)
|
|
3
|
+
*/
|
|
4
|
+
import type { ListRequestParams, DateFilterParams, Organization, OrganizationAccount, Counterparty, OrderReference, ContractReference, InvoiceReference, DocumentItem } from './base.js';
|
|
5
|
+
import type { ContactReference } from './contact.js';
|
|
6
|
+
/**
|
|
7
|
+
* Full act entity
|
|
8
|
+
*/
|
|
9
|
+
export interface Act {
|
|
10
|
+
readonly id: number;
|
|
11
|
+
readonly number: string;
|
|
12
|
+
readonly date: string;
|
|
13
|
+
readonly userId?: number;
|
|
14
|
+
readonly comment?: string;
|
|
15
|
+
readonly totalSum: number;
|
|
16
|
+
readonly nds?: number;
|
|
17
|
+
readonly payerTypeId?: number;
|
|
18
|
+
readonly createdAt?: string;
|
|
19
|
+
readonly updatedAt?: string;
|
|
20
|
+
readonly responsibleId?: number;
|
|
21
|
+
readonly token?: string;
|
|
22
|
+
readonly documentItems?: DocumentItem[];
|
|
23
|
+
readonly organizationAccount?: OrganizationAccount;
|
|
24
|
+
readonly organization?: Organization;
|
|
25
|
+
readonly contact?: ContactReference;
|
|
26
|
+
readonly counterparty?: Counterparty;
|
|
27
|
+
readonly contract?: ContractReference;
|
|
28
|
+
readonly invoice?: InvoiceReference;
|
|
29
|
+
readonly order?: OrderReference;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Parameters for listing acts
|
|
33
|
+
*/
|
|
34
|
+
export interface ListActsRequest extends ListRequestParams, DateFilterParams {
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Response from list acts
|
|
38
|
+
*/
|
|
39
|
+
export interface ListActsResponse {
|
|
40
|
+
readonly status: 'success' | 'error';
|
|
41
|
+
readonly data?: Act[];
|
|
42
|
+
readonly pagination?: {
|
|
43
|
+
readonly currentPage: number;
|
|
44
|
+
readonly pageCount: number;
|
|
45
|
+
readonly perPage: number;
|
|
46
|
+
};
|
|
47
|
+
readonly totals?: {
|
|
48
|
+
readonly count: number;
|
|
49
|
+
readonly sum?: number;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=act.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"act.d.ts","sourceRoot":"","sources":["../../src/types/act.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACb,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,MAAM,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,CAAC,SAAS,EAAE,MAAM,CAAC;QAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,QAAQ,CAAC,MAAM,CAAC,EAAE;QAChB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"act.js","sourceRoot":"","sources":["../../src/types/act.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product Arrival Types (Надходження товарів)
|
|
3
|
+
*/
|
|
4
|
+
import type { ListRequestParams, DateFilterParams, Organization, Counterparty, DocumentProduct } from './base.js';
|
|
5
|
+
import type { ContactReference } from './contact.js';
|
|
6
|
+
/**
|
|
7
|
+
* Arrival document item
|
|
8
|
+
*/
|
|
9
|
+
export interface ArrivalDocumentItem {
|
|
10
|
+
readonly price: string;
|
|
11
|
+
readonly count: string;
|
|
12
|
+
readonly product?: DocumentProduct;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Full product arrival entity
|
|
16
|
+
*/
|
|
17
|
+
export interface ProductArrival {
|
|
18
|
+
readonly id: number;
|
|
19
|
+
readonly date: string;
|
|
20
|
+
readonly userId?: number;
|
|
21
|
+
readonly comment?: string | null;
|
|
22
|
+
readonly totalSum: number;
|
|
23
|
+
readonly totalCount: number;
|
|
24
|
+
readonly createdAt?: string;
|
|
25
|
+
readonly updatedAt?: string;
|
|
26
|
+
readonly formId?: number;
|
|
27
|
+
readonly responsibleId?: number;
|
|
28
|
+
readonly stockId?: number;
|
|
29
|
+
readonly sourceStockId?: number;
|
|
30
|
+
readonly type?: string;
|
|
31
|
+
readonly inventoryId?: number;
|
|
32
|
+
readonly organization?: Organization;
|
|
33
|
+
readonly documentItems?: ArrivalDocumentItem[];
|
|
34
|
+
readonly contact?: ContactReference;
|
|
35
|
+
readonly counterparty?: Counterparty;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Parameters for listing product arrivals
|
|
39
|
+
*/
|
|
40
|
+
export interface ListArrivalsRequest extends ListRequestParams, DateFilterParams {
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Response from list product arrivals
|
|
44
|
+
*/
|
|
45
|
+
export interface ListArrivalsResponse {
|
|
46
|
+
readonly status: 'success' | 'error';
|
|
47
|
+
readonly data?: ProductArrival[];
|
|
48
|
+
readonly pagination?: {
|
|
49
|
+
readonly currentPage: number;
|
|
50
|
+
readonly pageCount: number;
|
|
51
|
+
readonly perPage: number;
|
|
52
|
+
};
|
|
53
|
+
readonly totals?: {
|
|
54
|
+
readonly count: number;
|
|
55
|
+
readonly sum?: number;
|
|
56
|
+
readonly writeOffSum?: number;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=arrival.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrival.d.ts","sourceRoot":"","sources":["../../src/types/arrival.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,eAAe,EAChB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,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C,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;KAC/B,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrival.js","sourceRoot":"","sources":["../../src/types/arrival.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SalesDrive API Base Types
|
|
3
|
+
*
|
|
4
|
+
* Core response structures used across all API endpoints.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Standard SalesDrive API response wrapper
|
|
8
|
+
*/
|
|
9
|
+
export interface SalesDriveResponse<T = unknown> {
|
|
10
|
+
readonly success?: boolean;
|
|
11
|
+
readonly status?: 'success' | 'error';
|
|
12
|
+
readonly data?: T;
|
|
13
|
+
readonly message?: string;
|
|
14
|
+
readonly pagination?: PaginationInfo;
|
|
15
|
+
readonly totals?: TotalsInfo;
|
|
16
|
+
readonly meta?: MetaInfo;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Pagination information returned with list endpoints
|
|
20
|
+
*/
|
|
21
|
+
export interface PaginationInfo {
|
|
22
|
+
readonly currentPage: number;
|
|
23
|
+
readonly pageCount: number;
|
|
24
|
+
readonly perPage: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Summary totals returned with list endpoints
|
|
28
|
+
*/
|
|
29
|
+
export interface TotalsInfo {
|
|
30
|
+
readonly count: number;
|
|
31
|
+
readonly sum?: number;
|
|
32
|
+
readonly paymentAmount?: number;
|
|
33
|
+
readonly commission?: number;
|
|
34
|
+
readonly expenses?: number;
|
|
35
|
+
readonly writeOffSum?: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Metadata including custom fields
|
|
39
|
+
*/
|
|
40
|
+
export interface MetaInfo {
|
|
41
|
+
readonly fields?: Record<string, unknown>;
|
|
42
|
+
readonly contacts?: {
|
|
43
|
+
readonly fields?: Record<string, unknown>;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Base parameters for list requests
|
|
48
|
+
*/
|
|
49
|
+
export interface ListRequestParams {
|
|
50
|
+
readonly page?: number;
|
|
51
|
+
readonly limit?: number;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Common date filter parameters used by many list endpoints
|
|
55
|
+
*/
|
|
56
|
+
export interface DateFilterParams {
|
|
57
|
+
readonly 'filter[updateAt][from]'?: string;
|
|
58
|
+
readonly 'filter[updateAt][to]'?: string;
|
|
59
|
+
readonly 'filter[updatedAt][from]'?: string;
|
|
60
|
+
readonly 'filter[updatedAt][to]'?: string;
|
|
61
|
+
readonly 'filter[date][from]'?: string;
|
|
62
|
+
readonly 'filter[date][to]'?: string;
|
|
63
|
+
readonly 'filter[createdAt][from]'?: string;
|
|
64
|
+
readonly 'filter[createdAt][to]'?: string;
|
|
65
|
+
readonly 'filter[organizationId][]'?: number;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Organization entity
|
|
69
|
+
*/
|
|
70
|
+
export interface Organization {
|
|
71
|
+
readonly id: number;
|
|
72
|
+
readonly title: string;
|
|
73
|
+
readonly egrpou?: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Organization bank account
|
|
77
|
+
*/
|
|
78
|
+
export interface OrganizationAccount {
|
|
79
|
+
readonly id: number;
|
|
80
|
+
readonly title: string;
|
|
81
|
+
readonly accountNumber: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Counterparty entity (business partner)
|
|
85
|
+
*/
|
|
86
|
+
export interface Counterparty {
|
|
87
|
+
readonly id: number;
|
|
88
|
+
readonly egrpou?: string;
|
|
89
|
+
readonly title?: string | null;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Contract reference
|
|
93
|
+
*/
|
|
94
|
+
export interface ContractReference {
|
|
95
|
+
readonly id: number;
|
|
96
|
+
readonly number: string;
|
|
97
|
+
readonly date: string;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Invoice reference
|
|
101
|
+
*/
|
|
102
|
+
export interface InvoiceReference {
|
|
103
|
+
readonly id: number;
|
|
104
|
+
readonly number: string;
|
|
105
|
+
readonly date: string;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Order reference
|
|
109
|
+
*/
|
|
110
|
+
export interface OrderReference {
|
|
111
|
+
readonly id: number;
|
|
112
|
+
readonly formId: number;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Unit of measurement
|
|
116
|
+
*/
|
|
117
|
+
export interface Unit {
|
|
118
|
+
readonly id: number;
|
|
119
|
+
readonly title: string;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Document item (used in invoices, acts, etc.)
|
|
123
|
+
*/
|
|
124
|
+
export interface DocumentItem {
|
|
125
|
+
readonly description: string;
|
|
126
|
+
readonly price: string;
|
|
127
|
+
readonly count: string;
|
|
128
|
+
readonly percentDiscount?: number;
|
|
129
|
+
readonly discount?: number;
|
|
130
|
+
readonly product?: DocumentProduct;
|
|
131
|
+
readonly unit?: Unit;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Product reference in document
|
|
135
|
+
*/
|
|
136
|
+
export interface DocumentProduct {
|
|
137
|
+
readonly id: number;
|
|
138
|
+
readonly formId: number;
|
|
139
|
+
readonly name: string;
|
|
140
|
+
readonly nameTranslate?: string;
|
|
141
|
+
readonly parameter?: string;
|
|
142
|
+
readonly manufacturer?: string;
|
|
143
|
+
readonly sku?: string;
|
|
144
|
+
readonly barcode?: string;
|
|
145
|
+
readonly documentName?: string;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Success response for simple operations
|
|
149
|
+
*/
|
|
150
|
+
export interface SuccessResponse {
|
|
151
|
+
readonly success: boolean;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Error response structure
|
|
155
|
+
*/
|
|
156
|
+
export interface ErrorResponse {
|
|
157
|
+
readonly success: false;
|
|
158
|
+
readonly message: string;
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/types/base.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,OAAO;IAC7C,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IACtC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAClB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAA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;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/types/base.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Call Types (Дзвінки)
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Manager info from call response
|
|
6
|
+
*/
|
|
7
|
+
export interface CallManager {
|
|
8
|
+
readonly name: string;
|
|
9
|
+
readonly internal_number: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Client info from call response
|
|
13
|
+
*/
|
|
14
|
+
export interface CallClient {
|
|
15
|
+
readonly id: number;
|
|
16
|
+
readonly fName: string;
|
|
17
|
+
readonly lName: string;
|
|
18
|
+
readonly mName: string;
|
|
19
|
+
readonly company?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Response from call registration
|
|
23
|
+
*/
|
|
24
|
+
export interface CallResponse {
|
|
25
|
+
readonly status: 'success' | 'error';
|
|
26
|
+
readonly manager?: CallManager;
|
|
27
|
+
readonly client?: CallClient;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=call.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"call.d.ts","sourceRoot":"","sources":["../../src/types/call.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC;IACrC,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC;IAC/B,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"call.js","sourceRoot":"","sources":["../../src/types/call.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cash Order Types (Касові ордери)
|
|
3
|
+
*/
|
|
4
|
+
import type { ListRequestParams, DateFilterParams, Organization, Counterparty, OrderReference, ContractReference, InvoiceReference, DocumentItem } from './base.js';
|
|
5
|
+
import type { ContactReference } from './contact.js';
|
|
6
|
+
/**
|
|
7
|
+
* Full cash order entity
|
|
8
|
+
*/
|
|
9
|
+
export interface CashOrder {
|
|
10
|
+
readonly id: number;
|
|
11
|
+
readonly number: string;
|
|
12
|
+
readonly date: string;
|
|
13
|
+
readonly userId?: number;
|
|
14
|
+
readonly comment?: string;
|
|
15
|
+
readonly totalSum: number;
|
|
16
|
+
readonly nds?: number;
|
|
17
|
+
readonly payerTypeId?: number;
|
|
18
|
+
readonly createdAt?: string;
|
|
19
|
+
readonly updatedAt?: string;
|
|
20
|
+
readonly responsibleId?: number;
|
|
21
|
+
readonly type?: 'incoming' | 'outcoming';
|
|
22
|
+
readonly token?: string;
|
|
23
|
+
readonly documentItems?: DocumentItem[];
|
|
24
|
+
readonly organization?: Organization;
|
|
25
|
+
readonly contact?: ContactReference;
|
|
26
|
+
readonly counterparty?: Counterparty;
|
|
27
|
+
readonly contract?: ContractReference;
|
|
28
|
+
readonly invoice?: InvoiceReference;
|
|
29
|
+
readonly order?: OrderReference;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Parameters for listing cash orders
|
|
33
|
+
*/
|
|
34
|
+
export interface ListCashOrdersRequest extends ListRequestParams, DateFilterParams {
|
|
35
|
+
readonly type?: 'all' | 'incoming' | 'outcoming';
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Response from list cash orders
|
|
39
|
+
*/
|
|
40
|
+
export interface ListCashOrdersResponse {
|
|
41
|
+
readonly status: 'success' | 'error';
|
|
42
|
+
readonly data?: CashOrder[];
|
|
43
|
+
readonly pagination?: {
|
|
44
|
+
readonly currentPage: number;
|
|
45
|
+
readonly pageCount: number;
|
|
46
|
+
readonly perPage: number;
|
|
47
|
+
};
|
|
48
|
+
readonly totals?: {
|
|
49
|
+
readonly count: number;
|
|
50
|
+
readonly sum?: number;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=cashOrder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1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AAQ,CAAC,OAAO,CAAC,EAAE,gBAAgB,CAAC;IACpC,QAAQ,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB,EAAE,gBAAgB;IAChF,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,GAAG,UAAU,GAAG,WAAW,CAAC;CAClD;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC;IACrC,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE;QACpB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;QAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,QAAQ,CAAC,MAAM,CAAC,EAAE;QAChB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cashOrder.js","sourceRoot":"","sources":["../../src/types/cashOrder.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Category Types
|
|
3
|
+
*
|
|
4
|
+
* Types for category management.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Category input for create/update
|
|
8
|
+
*/
|
|
9
|
+
export interface CategoryInput {
|
|
10
|
+
readonly id: number;
|
|
11
|
+
readonly name: string;
|
|
12
|
+
readonly parentId?: number | null;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Request to manage categories
|
|
16
|
+
*/
|
|
17
|
+
export interface CategoryActionRequest {
|
|
18
|
+
readonly action: 'update' | 'delete';
|
|
19
|
+
readonly category: CategoryInput[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Response from category actions
|
|
23
|
+
*/
|
|
24
|
+
export interface CategoryActionResponse {
|
|
25
|
+
readonly status: 'success' | 'error';
|
|
26
|
+
readonly message: string;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=category.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../src/types/category.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,MAAM,EAAE,QAAQ,GAAG,QAAQ,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,aAAa,EAAE,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC;IACrC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"category.js","sourceRoot":"","sources":["../../src/types/category.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check Types (Fiscal Receipts / Чеки)
|
|
3
|
+
*/
|
|
4
|
+
import type { ListRequestParams, DateFilterParams, Organization, Counterparty, OrderReference, DocumentItem } from './base.js';
|
|
5
|
+
import type { ContactReference } from './contact.js';
|
|
6
|
+
/**
|
|
7
|
+
* Cashier reference
|
|
8
|
+
*/
|
|
9
|
+
export interface Cashier {
|
|
10
|
+
readonly id: number;
|
|
11
|
+
readonly name: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Cash register reference
|
|
15
|
+
*/
|
|
16
|
+
export interface CashRegister {
|
|
17
|
+
readonly id: number;
|
|
18
|
+
readonly name: string;
|
|
19
|
+
readonly code: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Full check (fiscal receipt) entity
|
|
23
|
+
*/
|
|
24
|
+
export interface Check {
|
|
25
|
+
readonly id: number;
|
|
26
|
+
readonly date: string;
|
|
27
|
+
readonly fiscalizationUserId?: number;
|
|
28
|
+
readonly fiscalizationStatus?: 'done' | 'pending' | 'error';
|
|
29
|
+
readonly responsibleId?: number;
|
|
30
|
+
readonly payerTypeId?: number;
|
|
31
|
+
readonly documentPaymentTypeId?: number;
|
|
32
|
+
readonly userId?: number;
|
|
33
|
+
readonly totalSum: number;
|
|
34
|
+
readonly createdAt?: string;
|
|
35
|
+
readonly updatedAt?: string;
|
|
36
|
+
readonly comment?: string;
|
|
37
|
+
readonly type?: number;
|
|
38
|
+
readonly fiscalCode?: string;
|
|
39
|
+
readonly return?: unknown | null;
|
|
40
|
+
readonly hasReturn?: unknown | null;
|
|
41
|
+
readonly cashier?: Cashier;
|
|
42
|
+
readonly cashRegister?: CashRegister;
|
|
43
|
+
readonly documentItems?: DocumentItem[];
|
|
44
|
+
readonly discount?: number;
|
|
45
|
+
readonly organization?: Organization;
|
|
46
|
+
readonly contact?: ContactReference;
|
|
47
|
+
readonly counterparty?: Counterparty;
|
|
48
|
+
readonly order?: OrderReference;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Parameters for listing checks
|
|
52
|
+
*/
|
|
53
|
+
export interface ListChecksRequest extends ListRequestParams, DateFilterParams {
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Response from list checks
|
|
57
|
+
*/
|
|
58
|
+
export interface ListChecksResponse {
|
|
59
|
+
readonly status: 'success' | 'error';
|
|
60
|
+
readonly data?: Check[];
|
|
61
|
+
readonly pagination?: {
|
|
62
|
+
readonly currentPage: number;
|
|
63
|
+
readonly pageCount: number;
|
|
64
|
+
readonly perPage: number;
|
|
65
|
+
};
|
|
66
|
+
readonly totals?: {
|
|
67
|
+
readonly count: number;
|
|
68
|
+
readonly sum?: number;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/types/check.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,YAAY,EACb,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;IAC5D,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,qBAAqB,C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