@chift/chift-nodejs 1.0.14 → 1.0.15
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/.eslintcache +1 -1
- package/CHANGELOG.md +7 -1
- package/dist/src/modules/api.d.ts +1110 -265
- package/dist/src/modules/consumer.d.ts +221 -52
- package/dist/src/modules/consumer.js +3 -0
- package/dist/src/modules/consumers.d.ts +1109 -264
- package/dist/src/modules/integrations.d.ts +1 -1
- package/dist/src/modules/pms.d.ts +15 -0
- package/dist/src/modules/pms.js +47 -0
- package/dist/src/modules/pos.d.ts +4 -4
- package/dist/src/modules/sync.d.ts +884 -208
- package/dist/src/types/public-api/schema.d.ts +984 -292
- package/package.json +1 -1
- package/src/modules/consumer.ts +3 -0
- package/src/modules/pms.ts +67 -0
- package/src/modules/pos.ts +4 -4
- package/src/types/public-api/schema.d.ts +12029 -0
- package/src/types/public-api/schema.ts +987 -288
- package/test/modules/pos.test.ts +1 -1
|
@@ -6,7 +6,7 @@ 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" | "Payment";
|
|
9
|
+
api: "Point of Sale" | "eCommerce" | "Accounting" | "Invoicing" | "Communication" | "Banking" | "Custom" | "Payment" | "Property Management System";
|
|
10
10
|
logo_url: string;
|
|
11
11
|
icon_url: string;
|
|
12
12
|
credentials?: {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { operations, components } from '../types/public-api/schema';
|
|
2
|
+
import { AutoPaginatedParams, RequestData } from '../types/api';
|
|
3
|
+
type GetPaymentsParams = AutoPaginatedParams<operations['pms_get_payments']['parameters']['query']>;
|
|
4
|
+
type GetPaymentMethodsParams = AutoPaginatedParams<operations['pms_get_payments_methods']['parameters']['query']>;
|
|
5
|
+
type GetAccountingCategoriesParams = AutoPaginatedParams<operations['pms_get_accounting_categories']['parameters']['query']>;
|
|
6
|
+
type GetOrdersParams = AutoPaginatedParams<operations['pms_get_orders']['parameters']['query']>;
|
|
7
|
+
declare const pmsFactory: {
|
|
8
|
+
getLocations(): RequestData<components['schemas']['PMSLocationItem'][]>;
|
|
9
|
+
getOrders(params: GetOrdersParams): RequestData<components['schemas']['PMSOrderItem'][]>;
|
|
10
|
+
getPaymentMethods(params?: GetPaymentMethodsParams): RequestData<components['schemas']['PMSPaymentMethods'][]>;
|
|
11
|
+
getClosure(date: string, params?: operations['pms_get_closure']['parameters']['query']): RequestData<components['schemas']['PMSClosureItem']>;
|
|
12
|
+
getPayments(params: GetPaymentsParams): RequestData<components['schemas']['PMSPaymentItem'][]>;
|
|
13
|
+
getAccountingCategories(params?: GetAccountingCategoriesParams): RequestData<components['schemas']['PMSAccountingCategoryItem'][]>;
|
|
14
|
+
};
|
|
15
|
+
export { pmsFactory };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pmsFactory = void 0;
|
|
4
|
+
const pmsFactory = {
|
|
5
|
+
getLocations() {
|
|
6
|
+
return {
|
|
7
|
+
method: 'get',
|
|
8
|
+
url: '/consumers/{consumer_id}/pms/locations',
|
|
9
|
+
};
|
|
10
|
+
},
|
|
11
|
+
getOrders(params) {
|
|
12
|
+
return {
|
|
13
|
+
params,
|
|
14
|
+
method: 'get',
|
|
15
|
+
url: '/consumers/{consumer_id}/pms/orders',
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
getPaymentMethods(params) {
|
|
19
|
+
return {
|
|
20
|
+
params,
|
|
21
|
+
method: 'get',
|
|
22
|
+
url: `/consumers/{consumer_id}/pms/payment-methods`,
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
getClosure(date, params) {
|
|
26
|
+
return {
|
|
27
|
+
params,
|
|
28
|
+
method: 'get',
|
|
29
|
+
url: `/consumers/{consumer_id}/pms/closures/${date}`,
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
getPayments(params) {
|
|
33
|
+
return {
|
|
34
|
+
params,
|
|
35
|
+
method: 'get',
|
|
36
|
+
url: `/consumers/{consumer_id}/pms/payments`,
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
getAccountingCategories(params) {
|
|
40
|
+
return {
|
|
41
|
+
params,
|
|
42
|
+
method: 'get',
|
|
43
|
+
url: `/consumers/{consumer_id}/pms/accounting-categories`,
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
exports.pmsFactory = pmsFactory;
|
|
@@ -9,9 +9,9 @@ type GetAccountingCategoriesParams = AutoPaginatedParams<operations['pos_get_acc
|
|
|
9
9
|
type GetOrdersParams = AutoPaginatedParams<operations['pos_get_orders']['parameters']['query']>;
|
|
10
10
|
declare const posFactory: {
|
|
11
11
|
getLocations(): RequestData<components['schemas']['POSLocationItem'][]>;
|
|
12
|
-
getOrders(params: GetOrdersParams): RequestData<components['schemas']['
|
|
12
|
+
getOrders(params: GetOrdersParams): RequestData<components['schemas']['POSOrderItem'][]>;
|
|
13
13
|
getCustomers(params?: GetCustomersParams): RequestData<components['schemas']['POSCustomerItem'][]>;
|
|
14
|
-
getOrder(orderId: string): RequestData<components['schemas']['
|
|
14
|
+
getOrder(orderId: string): RequestData<components['schemas']['POSOrderItem']>;
|
|
15
15
|
getCustomer(customerId: string): RequestData<components['schemas']['POSCustomerItem']>;
|
|
16
16
|
createCustomer(customer: components['schemas']['POSCreateCustomerItem']): RequestData<components['schemas']['POSCustomerItem']>;
|
|
17
17
|
getPaymentMethods(params?: GetPaymentMethodsParams): RequestData<components['schemas']['PaymentMethods'][]>;
|
|
@@ -19,8 +19,8 @@ declare const posFactory: {
|
|
|
19
19
|
getProducts(params?: GetProductsParams): RequestData<components['schemas']['POSProductItem'][]>;
|
|
20
20
|
getSales(params: operations['pos_get_sales']['parameters']['query']): RequestData<components['schemas']['SalesItem']>;
|
|
21
21
|
getClosure(date: string, params?: operations['pos_get_closure']['parameters']['query']): RequestData<components['schemas']['ClosureItem']>;
|
|
22
|
-
getPayments(params: GetPaymentsParams): RequestData<components['schemas']['
|
|
23
|
-
updateOrder(orderId: string, order: components['schemas']['UpdateOrderItem']): RequestData<components['schemas']['
|
|
22
|
+
getPayments(params: GetPaymentsParams): RequestData<components['schemas']['POSPaymentItem'][]>;
|
|
23
|
+
updateOrder(orderId: string, order: components['schemas']['UpdateOrderItem']): RequestData<components['schemas']['POSOrderItem']>;
|
|
24
24
|
getAccountingCategories(params?: GetAccountingCategoriesParams): RequestData<components['schemas']['AccountingCategoryItem'][]>;
|
|
25
25
|
};
|
|
26
26
|
export { posFactory };
|