@chift/chift-nodejs 1.0.27 → 1.0.29
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/src/modules/api.d.ts +114 -1
- package/dist/src/modules/consumer.d.ts +23 -1
- package/dist/src/modules/consumer.js +2 -0
- package/dist/src/modules/consumers.d.ts +111 -1
- package/dist/src/modules/consumers.js +2 -2
- package/dist/src/modules/ecommerce.d.ts +2 -2
- package/dist/src/modules/invoicing.d.ts +2 -2
- package/dist/src/modules/sync.d.ts +88 -0
- package/dist/src/types/public-api/schema.d.ts +697 -699
- package/dist/test/modules/consumers.test.js +14 -0
- package/package.json +2 -2
- package/src/types/public-api/schema.d.ts +697 -699
|
@@ -13,8 +13,8 @@ exports.Consumers = void 0;
|
|
|
13
13
|
const consumer_1 = require("./consumer");
|
|
14
14
|
const Consumers = (internalApi) => {
|
|
15
15
|
const _internalApi = internalApi;
|
|
16
|
-
const getConsumers = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
-
const { data, } = yield _internalApi.get('/consumers');
|
|
16
|
+
const getConsumers = (params) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
const { data, } = yield _internalApi.get('/consumers', { params });
|
|
18
18
|
return data.map((consumer) => (0, consumer_1.Consumer)(_internalApi, consumer));
|
|
19
19
|
});
|
|
20
20
|
const createConsumer = (body) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -10,9 +10,9 @@ type GetProductsParams = AutoPaginatedParams<operations['ecommerce_get_products'
|
|
|
10
10
|
type GetLocationsParams = AutoPaginatedParams<operations['ecommerce_get_locations']['parameters']['query']>;
|
|
11
11
|
declare const ecommerceFactory: {
|
|
12
12
|
getCustomers(params?: GetCustomersParams, options?: RawDataOption): RequestData<components['schemas']['CommerceCustomerItem'][]>;
|
|
13
|
-
getProducts(params?: GetProductsParams, options?: RawDataOption): RequestData<components['schemas']['
|
|
13
|
+
getProducts(params?: GetProductsParams, options?: RawDataOption): RequestData<components['schemas']['ProductItem-Output'][]>;
|
|
14
14
|
getCustomer(customerId: string, options?: RawDataOption): RequestData<components['schemas']['CommerceCustomerItem']>;
|
|
15
|
-
getProduct(productId: string, options?: RawDataOption): RequestData<components['schemas']['
|
|
15
|
+
getProduct(productId: string, options?: RawDataOption): RequestData<components['schemas']['ProductItem-Output']>;
|
|
16
16
|
getProductVariantById(variantId: string, options?: RawDataOption): RequestData<components['schemas']['VariantItem']>;
|
|
17
17
|
updateAvailableQuantity(variantId: string, inventoryDetails: components['schemas']['InventoryDetailsUpdate'], options?: ClientRequestOption): RequestData<components['schemas']['InventoryDetailsItem']>;
|
|
18
18
|
getLocations(params?: GetLocationsParams, options?: RawDataOption): RequestData<components['schemas']['CommerceLocationItemOut'][]>;
|
|
@@ -7,10 +7,10 @@ type GetBankTransactionsParams = AutoPaginatedParams<operations['invoicing_get_b
|
|
|
7
7
|
declare const invoicingFactory: {
|
|
8
8
|
getInvoices(params?: GetInvoicesParams, options?: RawDataOption): RequestData<components['schemas']['InvoiceItemOut'][]>;
|
|
9
9
|
getInvoiceById(invoiceId: string, params?: operations['invoicing_get_invoice']['parameters']['query'], options?: RawDataOption): RequestData<components['schemas']['InvoiceItemOutSingle']>;
|
|
10
|
-
createInvoice(invoice: components['schemas']['
|
|
10
|
+
createInvoice(invoice: components['schemas']['InvoiceItem-Input'], options?: ClientRequestOption): RequestData<components['schemas']['InvoiceItemOut']>;
|
|
11
11
|
getProducts(options?: RawDataOption): RequestData<components['schemas']['ProductItemOut'][]>;
|
|
12
12
|
getProductById(productId: string, options?: RawDataOption): RequestData<components['schemas']['ProductItemOut']>;
|
|
13
|
-
createProduct(product: components['schemas']['
|
|
13
|
+
createProduct(product: components['schemas']['ProductItem-Input'], options?: ClientRequestOption): RequestData<components['schemas']['ProductItemOut']>;
|
|
14
14
|
getTaxes(options?: RawDataOption): RequestData<components['schemas']['InvoicingVatCode'][]>;
|
|
15
15
|
getTaxById(taxId: string, options?: RawDataOption): RequestData<components['schemas']['InvoicingVatCode']>;
|
|
16
16
|
getOpportunities(options?: RawDataOption): RequestData<components['schemas']['OpportunityItem'][]>;
|