@chift/chift-nodejs 1.0.15 → 1.0.17
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/.github/workflows/ci.yml +10 -10
- package/CHANGELOG.md +15 -2
- package/README.md +3 -3
- package/dist/src/modules/accounting.d.ts +3 -3
- package/dist/src/modules/api.d.ts +4374 -2758
- package/dist/src/modules/consumer.d.ts +829 -509
- package/dist/src/modules/consumer.js +3 -0
- package/dist/src/modules/consumers.d.ts +4395 -2787
- package/dist/src/modules/datastores.d.ts +2 -2
- package/dist/src/modules/ecommerce.d.ts +2 -2
- package/dist/src/modules/integrations.d.ts +9 -4
- package/dist/src/modules/invoicing.d.ts +3 -3
- package/dist/src/modules/payment.d.ts +14 -0
- package/dist/src/modules/payment.js +41 -0
- package/dist/src/modules/sync.d.ts +3507 -2223
- package/dist/src/modules/sync.js +1 -1
- package/dist/src/modules/webhooks.d.ts +4 -1
- package/dist/src/types/sync.d.ts +22 -5
- package/dist/test/modules/accounting.test.js +58 -50
- package/dist/test/modules/consumer.test.js +4 -4
- package/dist/test/modules/consumers.test.js +4 -4
- package/dist/test/modules/ecommerce.test.js +23 -19
- package/dist/test/modules/integrations.test.js +4 -4
- package/dist/test/modules/invoicing.test.js +16 -9
- package/dist/test/modules/payment.test.d.ts +1 -0
- package/dist/test/modules/payment.test.js +88 -0
- package/dist/test/modules/pms.test.d.ts +1 -0
- package/dist/test/modules/pms.test.js +90 -0
- package/dist/test/modules/pos.test.js +31 -34
- package/dist/test/modules/sync.test.js +31 -19
- package/dist/test/modules/syncs.test.js +4 -4
- package/dist/test/modules/webhooks.test.js +4 -4
- package/package.json +1 -1
- package/src/modules/accounting.ts +3 -3
- package/src/modules/consumer.ts +6 -1
- package/src/modules/ecommerce.ts +4 -2
- package/src/modules/invoicing.ts +7 -3
- package/src/modules/payment.ts +59 -0
- package/src/modules/sync.ts +1 -1
- package/src/types/public-api/schema.d.ts +4165 -900
- package/src/types/sync.ts +20 -5
- package/test/modules/accounting.test.ts +69 -50
- package/test/modules/consumer.test.ts +5 -5
- package/test/modules/consumers.test.ts +4 -4
- package/test/modules/ecommerce.test.ts +25 -20
- package/test/modules/integrations.test.ts +4 -4
- package/test/modules/invoicing.test.ts +20 -10
- package/test/modules/payment.test.ts +65 -0
- package/test/modules/pms.test.ts +69 -0
- package/test/modules/pos.test.ts +32 -34
- package/test/modules/sync.test.ts +33 -19
- package/test/modules/syncs.test.ts +4 -4
- package/test/modules/webhooks.test.ts +4 -4
- package/.eslintcache +0 -1
- package/coverage/clover.xml +0 -1645
- package/coverage/coverage-final.json +0 -19
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -146
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/src/helpers/index.html +0 -131
- package/coverage/lcov-report/src/helpers/openapi.ts.html +0 -151
- package/coverage/lcov-report/src/helpers/settings.ts.html +0 -94
- package/coverage/lcov-report/src/index.html +0 -116
- package/coverage/lcov-report/src/index.ts.html +0 -88
- package/coverage/lcov-report/src/modules/accounting.ts.html +0 -1156
- package/coverage/lcov-report/src/modules/api.ts.html +0 -190
- package/coverage/lcov-report/src/modules/consumer.ts.html +0 -616
- package/coverage/lcov-report/src/modules/consumers.ts.html +0 -331
- package/coverage/lcov-report/src/modules/custom.ts.html +0 -193
- package/coverage/lcov-report/src/modules/datastores.ts.html +0 -142
- package/coverage/lcov-report/src/modules/ecommerce.ts.html +0 -331
- package/coverage/lcov-report/src/modules/flow.ts.html +0 -589
- package/coverage/lcov-report/src/modules/index.html +0 -326
- package/coverage/lcov-report/src/modules/integrations.ts.html +0 -151
- package/coverage/lcov-report/src/modules/internalApi.ts.html +0 -586
- package/coverage/lcov-report/src/modules/invoicing.ts.html +0 -391
- package/coverage/lcov-report/src/modules/pos.ts.html +0 -421
- package/coverage/lcov-report/src/modules/sync.ts.html +0 -316
- package/coverage/lcov-report/src/modules/syncs.ts.html +0 -169
- package/coverage/lcov-report/src/modules/webhooks.ts.html +0 -343
- package/coverage/lcov.info +0 -1976
- package/dist/src/types/public-api/schema.d.ts +0 -11959
- package/dist/src/types/public-api/schema.js +0 -6
- package/src/types/public-api/schema.ts +0 -12029
- package/test/set_envs.sh +0 -14
|
@@ -3,13 +3,13 @@ declare const DataStores: (internalApi: InternalAPI) => {
|
|
|
3
3
|
getDataStores: () => Promise<{
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
|
6
|
-
status
|
|
6
|
+
status: "active" | "inactive";
|
|
7
7
|
definition: {
|
|
8
8
|
columns: {
|
|
9
9
|
name: string;
|
|
10
10
|
title: string;
|
|
11
11
|
type: string;
|
|
12
|
-
optional
|
|
12
|
+
optional: boolean;
|
|
13
13
|
}[];
|
|
14
14
|
search_column?: string | undefined;
|
|
15
15
|
};
|
|
@@ -7,9 +7,9 @@ type GetTaxesParams = AutoPaginatedParams<operations['ecommerce_get_taxes']['par
|
|
|
7
7
|
type GetCountriesParams = AutoPaginatedParams<operations['ecommerce_get_countries']['parameters']['query']>;
|
|
8
8
|
declare const ecommerceFactory: {
|
|
9
9
|
getCustomers(): RequestData<components['schemas']['CommerceCustomerItem'][]>;
|
|
10
|
-
getProducts(): RequestData<components['schemas']['
|
|
10
|
+
getProducts(): RequestData<components['schemas']['backbone_api__app__routers__commerce__ProductItem'][]>;
|
|
11
11
|
getCustomer(customerId: string): RequestData<components['schemas']['CommerceCustomerItem']>;
|
|
12
|
-
getProduct(productId: string): RequestData<components['schemas']['
|
|
12
|
+
getProduct(productId: string): RequestData<components['schemas']['backbone_api__app__routers__commerce__ProductItem']>;
|
|
13
13
|
getProductVariantById(variantId: string): RequestData<components['schemas']['VariantItem']>;
|
|
14
14
|
updateAvailableQuantity(variantId: string, inventoryDetails: components['schemas']['InventoryDetailsUpdate']): RequestData<components['schemas']['InventoryDetailsItem']>;
|
|
15
15
|
getLocations(): RequestData<components['schemas']['CommerceLocationItem'][]>;
|
|
@@ -6,13 +6,18 @@ declare const Integrations: (internalApi: InternalAPI) => {
|
|
|
6
6
|
integrationid: number;
|
|
7
7
|
name: string;
|
|
8
8
|
status: "active" | "inactive";
|
|
9
|
-
api: "Point of Sale" | "eCommerce" | "Accounting" | "Invoicing" | "Communication" | "Banking" | "Custom" | "
|
|
9
|
+
api: "Payment" | "Point of Sale" | "eCommerce" | "Accounting" | "Invoicing" | "Communication" | "Banking" | "Custom" | "Property Management System";
|
|
10
10
|
logo_url: string;
|
|
11
11
|
icon_url: string;
|
|
12
|
-
|
|
12
|
+
post_connections: {
|
|
13
|
+
title: string;
|
|
14
|
+
optional: boolean;
|
|
15
|
+
resource: string;
|
|
16
|
+
}[];
|
|
17
|
+
credentials: {
|
|
13
18
|
name: string;
|
|
14
|
-
optional
|
|
15
|
-
}[]
|
|
19
|
+
optional: boolean;
|
|
20
|
+
}[];
|
|
16
21
|
}[]>;
|
|
17
22
|
};
|
|
18
23
|
export { Integrations };
|
|
@@ -8,9 +8,9 @@ declare const invoicingFactory: {
|
|
|
8
8
|
createInvoice(invoice: components['schemas']['InvoiceItem']): RequestData<components['schemas']['InvoiceItemOut']>;
|
|
9
9
|
getProducts(): RequestData<components['schemas']['ProductItemOut'][]>;
|
|
10
10
|
getProductById(productId: string): RequestData<components['schemas']['ProductItemOut']>;
|
|
11
|
-
createProduct(product: components['schemas']['
|
|
12
|
-
getTaxes(): RequestData<components['schemas']['
|
|
13
|
-
getTaxById(taxId: string): RequestData<components['schemas']['
|
|
11
|
+
createProduct(product: components['schemas']['backbone_common__models__invoicing__ProductItem']): RequestData<components['schemas']['ProductItemOut']>;
|
|
12
|
+
getTaxes(): RequestData<components['schemas']['backbone_common__models__invoicing__VatCode'][]>;
|
|
13
|
+
getTaxById(taxId: string): RequestData<components['schemas']['backbone_common__models__invoicing__VatCode']>;
|
|
14
14
|
getOpportunities(): RequestData<components['schemas']['OpportunityItem'][]>;
|
|
15
15
|
getOpportunitiesById(opportunityId: string): RequestData<components['schemas']['OpportunityItem']>;
|
|
16
16
|
getContacts(params?: GetContactsParams): RequestData<components['schemas']['ContactItemOut'][]>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { operations, components } from '../types/public-api/schema';
|
|
2
|
+
import { AutoPaginatedParams, RequestData } from '../types/api';
|
|
3
|
+
type GetBalancesParams = AutoPaginatedParams<operations['payment_get_balances']['parameters']['query']>;
|
|
4
|
+
type GetPaymentsParams = AutoPaginatedParams<operations['payment_get_payments']['parameters']['query']>;
|
|
5
|
+
type GetTransactionsParams = AutoPaginatedParams<operations['payment_get_transaction']['parameters']['query']>;
|
|
6
|
+
type GetRefundsParams = AutoPaginatedParams<operations['payment_get_refunds']['parameters']['query']>;
|
|
7
|
+
declare const paymentFactory: {
|
|
8
|
+
getPayments(params: GetPaymentsParams): RequestData<components['schemas']['PaymentItemOut'][]>;
|
|
9
|
+
getBalances(params: GetBalancesParams): RequestData<components['schemas']['BalanceItemOut'][]>;
|
|
10
|
+
getTransactions(params: GetTransactionsParams): RequestData<components['schemas']['TransactionItemOut'][]>;
|
|
11
|
+
getPayment(params: operations['payment_get_payment']['parameters']['path']): RequestData<components['schemas']['PaymentItemOut']>;
|
|
12
|
+
getRefunds(params: GetRefundsParams): RequestData<components['schemas']['RefundItemOut'][]>;
|
|
13
|
+
};
|
|
14
|
+
export { paymentFactory };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.paymentFactory = void 0;
|
|
4
|
+
const paymentFactory = {
|
|
5
|
+
getPayments(params) {
|
|
6
|
+
return {
|
|
7
|
+
params,
|
|
8
|
+
method: 'get',
|
|
9
|
+
url: `/consumers/{consumer_id}/payment/payments`,
|
|
10
|
+
};
|
|
11
|
+
},
|
|
12
|
+
getBalances(params) {
|
|
13
|
+
return {
|
|
14
|
+
params,
|
|
15
|
+
method: 'get',
|
|
16
|
+
url: `/consumers/{consumer_id}/payment/balances`,
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
getTransactions(params) {
|
|
20
|
+
return {
|
|
21
|
+
params,
|
|
22
|
+
method: 'get',
|
|
23
|
+
url: `/consumers/{consumer_id}/payment/transactions`,
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
getPayment(params) {
|
|
27
|
+
return {
|
|
28
|
+
params,
|
|
29
|
+
method: 'get',
|
|
30
|
+
url: `/consumers/{consumer_id}/payment/payments/{payment_id}`,
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
getRefunds(params) {
|
|
34
|
+
return {
|
|
35
|
+
params,
|
|
36
|
+
method: 'get',
|
|
37
|
+
url: `/consumers/{consumer_id}/payment/refunds`,
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
exports.paymentFactory = paymentFactory;
|