@chift/chift-nodejs 1.0.23 → 1.0.24
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 +37 -0
- package/dist/src/modules/accounting.d.ts +45 -43
- package/dist/src/modules/accounting.js +102 -42
- package/dist/src/modules/api.d.ts +13247 -11010
- package/dist/src/modules/banking.d.ts +13 -0
- package/dist/src/modules/banking.js +38 -0
- package/dist/src/modules/consumer.d.ts +2594 -2163
- package/dist/src/modules/consumer.js +3 -0
- package/dist/src/modules/consumers.d.ts +13205 -10980
- package/dist/src/modules/custom.d.ts +4 -4
- package/dist/src/modules/custom.js +6 -3
- package/dist/src/modules/datastores.d.ts +12 -6
- package/dist/src/modules/ecommerce.d.ts +18 -15
- package/dist/src/modules/ecommerce.js +32 -14
- package/dist/src/modules/flow.d.ts +2 -2
- package/dist/src/modules/integrations.d.ts +4 -2
- package/dist/src/modules/internalApi.js +8 -0
- package/dist/src/modules/invoicing.d.ts +16 -16
- package/dist/src/modules/invoicing.js +33 -18
- package/dist/src/modules/payment.d.ts +6 -6
- package/dist/src/modules/payment.js +10 -5
- package/dist/src/modules/pms.d.ts +8 -8
- package/dist/src/modules/pms.js +16 -8
- package/dist/src/modules/pos.d.ts +15 -15
- package/dist/src/modules/pos.js +29 -15
- package/dist/src/modules/sync.d.ts +10553 -8771
- package/dist/src/modules/webhooks.d.ts +12 -12
- package/dist/src/types/api.d.ts +8 -0
- package/dist/src/types/public-api/mappings.d.ts +128 -1
- package/dist/src/types/public-api/schema.d.ts +3856 -2132
- package/dist/src/types/public-api/schema.js +6 -0
- package/dist/test/modules/banking.test.d.ts +1 -0
- package/dist/test/modules/banking.test.js +94 -0
- package/dist/test/modules/client-request-id.test.d.ts +1 -0
- package/dist/test/modules/client-request-id.test.js +135 -0
- package/dist/test/modules/ecommerce.test.js +2 -1
- package/dist/test/modules/invoicing-pdf.test.d.ts +1 -0
- package/dist/test/modules/invoicing-pdf.test.js +34 -0
- package/dist/test/modules/raw-data.test.d.ts +1 -0
- package/dist/test/modules/raw-data.test.js +55 -0
- package/package.json +1 -1
- package/src/types/public-api/schema.d.ts +3856 -2132
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { RequestData } from '../types/api';
|
|
1
|
+
import { RequestData, RawDataOption, ClientRequestOption } from '../types/api';
|
|
2
2
|
declare const customFactory: {
|
|
3
|
-
get(name: string, resource: string, params?: any): RequestData<any>;
|
|
4
|
-
post(name: string, resource: string, body: any, params?: any): RequestData<any>;
|
|
5
|
-
patch(name: string, resource: string, body: any, params?: any): RequestData<any>;
|
|
3
|
+
get(name: string, resource: string, params?: any, options?: RawDataOption): RequestData<any>;
|
|
4
|
+
post(name: string, resource: string, body: any, params?: any, options?: ClientRequestOption): RequestData<any>;
|
|
5
|
+
patch(name: string, resource: string, body: any, params?: any, options?: ClientRequestOption): RequestData<any>;
|
|
6
6
|
delete(name: string, resource: string, params?: any): RequestData<any>;
|
|
7
7
|
};
|
|
8
8
|
export { customFactory };
|
|
@@ -2,27 +2,30 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.customFactory = void 0;
|
|
4
4
|
const customFactory = {
|
|
5
|
-
get(name, resource, params) {
|
|
5
|
+
get(name, resource, params, options) {
|
|
6
6
|
return {
|
|
7
7
|
method: 'get',
|
|
8
8
|
url: `/consumers/{consumer_id}/custom/${name}/${resource}`,
|
|
9
9
|
params: params,
|
|
10
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
10
11
|
};
|
|
11
12
|
},
|
|
12
|
-
post(name, resource, body, params) {
|
|
13
|
+
post(name, resource, body, params, options) {
|
|
13
14
|
return {
|
|
14
15
|
method: 'post',
|
|
15
16
|
url: `/consumers/{consumer_id}/custom/${name}/${resource}`,
|
|
16
17
|
body: body,
|
|
17
18
|
params: params,
|
|
19
|
+
clientRequestId: options === null || options === void 0 ? void 0 : options.clientRequestId,
|
|
18
20
|
};
|
|
19
21
|
},
|
|
20
|
-
patch(name, resource, body, params) {
|
|
22
|
+
patch(name, resource, body, params, options) {
|
|
21
23
|
return {
|
|
22
24
|
method: 'patch',
|
|
23
25
|
url: `/consumers/{consumer_id}/custom/${name}/${resource}`,
|
|
24
26
|
body: body,
|
|
25
27
|
params: params,
|
|
28
|
+
clientRequestId: options === null || options === void 0 ? void 0 : options.clientRequestId,
|
|
26
29
|
};
|
|
27
30
|
},
|
|
28
31
|
delete(name, resource, params) {
|
|
@@ -4,29 +4,35 @@ declare const DataStores: (internalApi: InternalAPI) => {
|
|
|
4
4
|
getDataStores: () => Promise<{
|
|
5
5
|
id: string;
|
|
6
6
|
name: string;
|
|
7
|
-
status: "active" | "inactive";
|
|
7
|
+
status: "active" | "inactive" | null;
|
|
8
8
|
definition: {
|
|
9
9
|
columns: {
|
|
10
10
|
name: string;
|
|
11
11
|
title: string;
|
|
12
12
|
type: string;
|
|
13
|
-
optional: boolean;
|
|
13
|
+
optional: boolean | null;
|
|
14
14
|
}[];
|
|
15
|
-
search_column?: string | undefined;
|
|
15
|
+
search_column?: string | null | undefined;
|
|
16
16
|
};
|
|
17
17
|
}[]>;
|
|
18
18
|
getConsumerDataStoreData: (consumerId: string, datastoreId: string) => Promise<{
|
|
19
|
-
data:
|
|
19
|
+
data: {
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
};
|
|
20
22
|
id: string;
|
|
21
23
|
created_on: string;
|
|
22
24
|
}[]>;
|
|
23
25
|
createConsumerDataStoreData: (consumerId: string, datastoreId: string, body: components['schemas']['DataItem']) => Promise<{
|
|
24
|
-
data:
|
|
26
|
+
data: {
|
|
27
|
+
[key: string]: unknown;
|
|
28
|
+
};
|
|
25
29
|
id: string;
|
|
26
30
|
created_on: string;
|
|
27
31
|
}>;
|
|
28
32
|
updateConsumerDataStoreData: (consumerId: string, datastoreId: string, datastoreDataId: string, body: components['schemas']['DataItem']) => Promise<{
|
|
29
|
-
data:
|
|
33
|
+
data: {
|
|
34
|
+
[key: string]: unknown;
|
|
35
|
+
};
|
|
30
36
|
id: string;
|
|
31
37
|
created_on: string;
|
|
32
38
|
}>;
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import { operations, components } from '../types/public-api/schema';
|
|
2
|
-
import { AutoPaginatedParams, RequestData } from '../types/api';
|
|
2
|
+
import { AutoPaginatedParams, RequestData, RawDataOption, ClientRequestOption } from '../types/api';
|
|
3
3
|
type GetOrdersParams = AutoPaginatedParams<operations['ecommerce_get_orders']['parameters']['query']>;
|
|
4
4
|
type GetPaymentMethodsParams = AutoPaginatedParams<operations['ecommerce_get_payments_methods']['parameters']['query']>;
|
|
5
5
|
type GetProductCategoriesParams = AutoPaginatedParams<operations['ecommerce_get_product_categories']['parameters']['query']>;
|
|
6
6
|
type GetTaxesParams = AutoPaginatedParams<operations['ecommerce_get_taxes']['parameters']['query']>;
|
|
7
7
|
type GetCountriesParams = AutoPaginatedParams<operations['ecommerce_get_countries']['parameters']['query']>;
|
|
8
|
+
type GetCustomersParams = AutoPaginatedParams<operations['ecommerce_get_customers']['parameters']['query']>;
|
|
9
|
+
type GetProductsParams = AutoPaginatedParams<operations['ecommerce_get_products']['parameters']['query']>;
|
|
10
|
+
type GetLocationsParams = AutoPaginatedParams<operations['ecommerce_get_locations']['parameters']['query']>;
|
|
8
11
|
declare const ecommerceFactory: {
|
|
9
|
-
getCustomers(): RequestData<components['schemas']['CommerceCustomerItem'][]>;
|
|
10
|
-
getProducts(): RequestData<components['schemas']['
|
|
11
|
-
getCustomer(customerId: string): RequestData<components['schemas']['CommerceCustomerItem']>;
|
|
12
|
-
getProduct(productId: string): RequestData<components['schemas']['
|
|
13
|
-
getProductVariantById(variantId: string): RequestData<components['schemas']['VariantItem']>;
|
|
14
|
-
updateAvailableQuantity(variantId: string, inventoryDetails: components['schemas']['InventoryDetailsUpdate']): RequestData<components['schemas']['InventoryDetailsItem']>;
|
|
15
|
-
getLocations(): RequestData<components['schemas']['
|
|
16
|
-
getOrders(params?: GetOrdersParams): RequestData<components['schemas']['OrderItemOut'][]>;
|
|
17
|
-
createOrder(order: components['schemas']['OrderItemIn']): RequestData<components['schemas']['OrderItemOut']>;
|
|
18
|
-
getOrder(orderId: string): RequestData<components['schemas']['OrderItemOut']>;
|
|
19
|
-
getPaymentMethods(params?: GetPaymentMethodsParams): RequestData<components['schemas']['PaymentMethodItem'][]>;
|
|
20
|
-
getProductCategories(params?: GetProductCategoriesParams): RequestData<components['schemas']['CategoryItem'][]>;
|
|
21
|
-
getTaxes(params?: GetTaxesParams): RequestData<components['schemas']['TaxRateItem'][]>;
|
|
22
|
-
getCountries(params?: GetCountriesParams): RequestData<components['schemas']['CountryItem'][]>;
|
|
12
|
+
getCustomers(params?: GetCustomersParams, options?: RawDataOption): RequestData<components['schemas']['CommerceCustomerItem'][]>;
|
|
13
|
+
getProducts(params?: GetProductsParams, options?: RawDataOption): RequestData<components['schemas']['ProductItem-Output'][]>;
|
|
14
|
+
getCustomer(customerId: string, options?: RawDataOption): RequestData<components['schemas']['CommerceCustomerItem']>;
|
|
15
|
+
getProduct(productId: string, options?: RawDataOption): RequestData<components['schemas']['ProductItem-Output']>;
|
|
16
|
+
getProductVariantById(variantId: string, options?: RawDataOption): RequestData<components['schemas']['VariantItem']>;
|
|
17
|
+
updateAvailableQuantity(variantId: string, inventoryDetails: components['schemas']['InventoryDetailsUpdate'], options?: ClientRequestOption): RequestData<components['schemas']['InventoryDetailsItem']>;
|
|
18
|
+
getLocations(params?: GetLocationsParams, options?: RawDataOption): RequestData<components['schemas']['CommerceLocationItemOut'][]>;
|
|
19
|
+
getOrders(params?: GetOrdersParams, options?: RawDataOption): RequestData<components['schemas']['OrderItemOut'][]>;
|
|
20
|
+
createOrder(order: components['schemas']['OrderItemIn'], options?: ClientRequestOption): RequestData<components['schemas']['OrderItemOut']>;
|
|
21
|
+
getOrder(orderId: string, params?: operations['ecommerce_get_order']['parameters']['query'], options?: RawDataOption): RequestData<components['schemas']['OrderItemOut']>;
|
|
22
|
+
getPaymentMethods(params?: GetPaymentMethodsParams, options?: RawDataOption): RequestData<components['schemas']['PaymentMethodItem'][]>;
|
|
23
|
+
getProductCategories(params?: GetProductCategoriesParams, options?: RawDataOption): RequestData<components['schemas']['CategoryItem'][]>;
|
|
24
|
+
getTaxes(params?: GetTaxesParams, options?: RawDataOption): RequestData<components['schemas']['TaxRateItem'][]>;
|
|
25
|
+
getCountries(params?: GetCountriesParams, options?: RawDataOption): RequestData<components['schemas']['CountryItem'][]>;
|
|
23
26
|
};
|
|
24
27
|
export { ecommerceFactory };
|
|
@@ -2,95 +2,113 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ecommerceFactory = void 0;
|
|
4
4
|
const ecommerceFactory = {
|
|
5
|
-
getCustomers() {
|
|
5
|
+
getCustomers(params, options) {
|
|
6
6
|
return {
|
|
7
|
+
params,
|
|
7
8
|
method: 'get',
|
|
8
9
|
url: '/consumers/{consumer_id}/commerce/customers',
|
|
10
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
9
11
|
};
|
|
10
12
|
},
|
|
11
|
-
getProducts() {
|
|
13
|
+
getProducts(params, options) {
|
|
12
14
|
return {
|
|
15
|
+
params,
|
|
13
16
|
method: 'get',
|
|
14
17
|
url: '/consumers/{consumer_id}/commerce/products',
|
|
18
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
15
19
|
};
|
|
16
20
|
},
|
|
17
|
-
getCustomer(customerId) {
|
|
21
|
+
getCustomer(customerId, options) {
|
|
18
22
|
return {
|
|
19
23
|
method: 'get',
|
|
20
24
|
url: `/consumers/{consumer_id}/commerce/customers/${customerId}`,
|
|
25
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
21
26
|
};
|
|
22
27
|
},
|
|
23
|
-
getProduct(productId) {
|
|
28
|
+
getProduct(productId, options) {
|
|
24
29
|
return {
|
|
25
30
|
method: 'get',
|
|
26
31
|
url: `/consumers/{consumer_id}/commerce/products/${productId}`,
|
|
32
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
27
33
|
};
|
|
28
34
|
},
|
|
29
|
-
getProductVariantById(variantId) {
|
|
35
|
+
getProductVariantById(variantId, options) {
|
|
30
36
|
return {
|
|
31
37
|
method: 'get',
|
|
32
38
|
url: `/consumers/{consumer_id}/commerce/variants/${variantId}`,
|
|
39
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
33
40
|
};
|
|
34
41
|
},
|
|
35
|
-
updateAvailableQuantity(variantId, inventoryDetails) {
|
|
42
|
+
updateAvailableQuantity(variantId, inventoryDetails, options) {
|
|
36
43
|
return {
|
|
37
44
|
method: 'post',
|
|
38
45
|
url: `/consumers/{consumer_id}/commerce/variants/set_quantity/${variantId}`,
|
|
39
46
|
body: inventoryDetails,
|
|
47
|
+
clientRequestId: options === null || options === void 0 ? void 0 : options.clientRequestId,
|
|
40
48
|
};
|
|
41
49
|
},
|
|
42
|
-
getLocations() {
|
|
50
|
+
getLocations(params, options) {
|
|
43
51
|
return {
|
|
52
|
+
params,
|
|
44
53
|
method: 'get',
|
|
45
54
|
url: '/consumers/{consumer_id}/commerce/locations',
|
|
55
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
46
56
|
};
|
|
47
57
|
},
|
|
48
|
-
getOrders(params) {
|
|
58
|
+
getOrders(params, options) {
|
|
49
59
|
return {
|
|
50
60
|
method: 'get',
|
|
51
61
|
url: '/consumers/{consumer_id}/commerce/orders',
|
|
52
62
|
params: params,
|
|
63
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
53
64
|
};
|
|
54
65
|
},
|
|
55
|
-
createOrder(order) {
|
|
66
|
+
createOrder(order, options) {
|
|
56
67
|
return {
|
|
57
68
|
method: 'post',
|
|
58
69
|
url: `/consumers/{consumer_id}/commerce/orders`,
|
|
59
70
|
body: order,
|
|
71
|
+
clientRequestId: options === null || options === void 0 ? void 0 : options.clientRequestId,
|
|
60
72
|
};
|
|
61
73
|
},
|
|
62
|
-
getOrder(orderId) {
|
|
74
|
+
getOrder(orderId, params, options) {
|
|
63
75
|
return {
|
|
76
|
+
params,
|
|
64
77
|
method: 'get',
|
|
65
78
|
url: `/consumers/{consumer_id}/commerce/orders/${orderId}`,
|
|
79
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
66
80
|
};
|
|
67
81
|
},
|
|
68
|
-
getPaymentMethods(params) {
|
|
82
|
+
getPaymentMethods(params, options) {
|
|
69
83
|
return {
|
|
70
84
|
params,
|
|
71
85
|
method: 'get',
|
|
72
86
|
url: `/consumers/{consumer_id}/commerce/payment-methods`,
|
|
87
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
73
88
|
};
|
|
74
89
|
},
|
|
75
|
-
getProductCategories(params) {
|
|
90
|
+
getProductCategories(params, options) {
|
|
76
91
|
return {
|
|
77
92
|
params,
|
|
78
93
|
method: 'get',
|
|
79
94
|
url: `/consumers/{consumer_id}/commerce/product-categories`,
|
|
95
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
80
96
|
};
|
|
81
97
|
},
|
|
82
|
-
getTaxes(params) {
|
|
98
|
+
getTaxes(params, options) {
|
|
83
99
|
return {
|
|
84
100
|
params,
|
|
85
101
|
method: 'get',
|
|
86
102
|
url: `/consumers/{consumer_id}/commerce/taxes`,
|
|
103
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
87
104
|
};
|
|
88
105
|
},
|
|
89
|
-
getCountries(params) {
|
|
106
|
+
getCountries(params, options) {
|
|
90
107
|
return {
|
|
91
108
|
params,
|
|
92
109
|
method: 'get',
|
|
93
110
|
url: `/consumers/{consumer_id}/commerce/countries`,
|
|
111
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
94
112
|
};
|
|
95
113
|
},
|
|
96
114
|
};
|
|
@@ -5,13 +5,13 @@ declare const Flow: (internalApi: any, body: components['schemas']['ReadFlowItem
|
|
|
5
5
|
getExecution: (executionId: string) => Promise<{
|
|
6
6
|
id: string;
|
|
7
7
|
start: string;
|
|
8
|
-
end
|
|
8
|
+
end: string | null;
|
|
9
9
|
status: string;
|
|
10
10
|
}>;
|
|
11
11
|
getConsumerExecutions: (consumerId: string) => Promise<{
|
|
12
12
|
id: string;
|
|
13
13
|
start: string;
|
|
14
|
-
end
|
|
14
|
+
end: string | null;
|
|
15
15
|
status: string;
|
|
16
16
|
}[]>;
|
|
17
17
|
executeLocal: (process: (consumer: typeof Consumer, context: any) => any, log?: boolean) => Promise<void>;
|
|
@@ -10,14 +10,16 @@ declare const Integrations: (internalApi: InternalAPI) => {
|
|
|
10
10
|
logo_url: string;
|
|
11
11
|
icon_url: string;
|
|
12
12
|
post_connections: {
|
|
13
|
+
id: string;
|
|
13
14
|
title: string;
|
|
14
15
|
optional: boolean;
|
|
15
16
|
resource: string;
|
|
16
|
-
}[];
|
|
17
|
+
}[] | null;
|
|
17
18
|
credentials: {
|
|
18
19
|
name: string;
|
|
19
20
|
optional: boolean;
|
|
20
|
-
}[];
|
|
21
|
+
}[] | null;
|
|
22
|
+
supported_countries?: string[] | null | undefined;
|
|
21
23
|
}[]>;
|
|
22
24
|
getIntegrationLogo: (integrationId: number, imageType: components['schemas']['ImageType']) => Promise<any>;
|
|
23
25
|
};
|
|
@@ -123,11 +123,19 @@ class InternalAPI {
|
|
|
123
123
|
if (requestData.method === 'get') {
|
|
124
124
|
params = Object.assign(Object.assign({}, params), this.getPaginationParams(currentPage));
|
|
125
125
|
}
|
|
126
|
+
const headers = {};
|
|
127
|
+
if (requestData.rawData) {
|
|
128
|
+
headers['x-chift-raw-data'] = 'true';
|
|
129
|
+
}
|
|
130
|
+
if (requestData.clientRequestId) {
|
|
131
|
+
headers['x-chift-client-requestid'] = requestData.clientRequestId;
|
|
132
|
+
}
|
|
126
133
|
const res = yield this.instance({
|
|
127
134
|
url: requestData.url,
|
|
128
135
|
method: requestData.method,
|
|
129
136
|
params: params,
|
|
130
137
|
data: requestData.body !== undefined ? requestData.body : undefined,
|
|
138
|
+
headers: headers,
|
|
131
139
|
});
|
|
132
140
|
const { data } = res;
|
|
133
141
|
if (data) {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { components, operations } from '../types/public-api/schema';
|
|
2
|
-
import { AutoPaginatedParams, RequestData } from '../types/api';
|
|
2
|
+
import { AutoPaginatedParams, RequestData, RawDataOption, ClientRequestOption } from '../types/api';
|
|
3
3
|
type GetInvoicesParams = AutoPaginatedParams<operations['invoicing_get_invoices']['parameters']['query']>;
|
|
4
4
|
type GetContactsParams = AutoPaginatedParams<operations['invoicing_get_contacts']['parameters']['query']>;
|
|
5
5
|
declare const invoicingFactory: {
|
|
6
|
-
getInvoices(params?: GetInvoicesParams): RequestData<components['schemas']['InvoiceItemOut'][]>;
|
|
7
|
-
getInvoiceById(invoiceId: string, params?: operations['invoicing_get_invoice']['parameters']['query']): RequestData<components['schemas']['
|
|
8
|
-
createInvoice(invoice: components['schemas']['
|
|
9
|
-
getProducts(): RequestData<components['schemas']['ProductItemOut'][]>;
|
|
10
|
-
getProductById(productId: string): RequestData<components['schemas']['ProductItemOut']>;
|
|
11
|
-
createProduct(product: components['schemas']['
|
|
12
|
-
getTaxes(): RequestData<components['schemas']['InvoicingVatCode'][]>;
|
|
13
|
-
getTaxById(taxId: string): RequestData<components['schemas']['InvoicingVatCode']>;
|
|
14
|
-
getOpportunities(): RequestData<components['schemas']['OpportunityItem'][]>;
|
|
15
|
-
getOpportunitiesById(opportunityId: string): RequestData<components['schemas']['OpportunityItem']>;
|
|
16
|
-
getContacts(params?: GetContactsParams): RequestData<components['schemas']['ContactItemOut'][]>;
|
|
17
|
-
getContactById(contactId: string): RequestData<components['schemas']['ContactItemOut']>;
|
|
18
|
-
createContact(contact: components['schemas']['ContactItemIn']): RequestData<components['schemas']['ContactItemOut']>;
|
|
19
|
-
getPayments(): RequestData<components['schemas']['InvoicingPaymentItem'][]>;
|
|
20
|
-
getPaymentMethods(): RequestData<components['schemas']['InvoicingPaymentMethodItem'][]>;
|
|
6
|
+
getInvoices(params?: GetInvoicesParams, options?: RawDataOption): RequestData<components['schemas']['InvoiceItemOut'][]>;
|
|
7
|
+
getInvoiceById(invoiceId: string, params?: operations['invoicing_get_invoice']['parameters']['query'], options?: RawDataOption): RequestData<components['schemas']['InvoiceItemOutSingle']>;
|
|
8
|
+
createInvoice(invoice: components['schemas']['InvoiceItem-Input'], options?: ClientRequestOption): RequestData<components['schemas']['InvoiceItemOut']>;
|
|
9
|
+
getProducts(options?: RawDataOption): RequestData<components['schemas']['ProductItemOut'][]>;
|
|
10
|
+
getProductById(productId: string, options?: RawDataOption): RequestData<components['schemas']['ProductItemOut']>;
|
|
11
|
+
createProduct(product: components['schemas']['ProductItem-Input'], options?: ClientRequestOption): RequestData<components['schemas']['ProductItemOut']>;
|
|
12
|
+
getTaxes(options?: RawDataOption): RequestData<components['schemas']['InvoicingVatCode'][]>;
|
|
13
|
+
getTaxById(taxId: string, options?: RawDataOption): RequestData<components['schemas']['InvoicingVatCode']>;
|
|
14
|
+
getOpportunities(options?: RawDataOption): RequestData<components['schemas']['OpportunityItem'][]>;
|
|
15
|
+
getOpportunitiesById(opportunityId: string, options?: RawDataOption): RequestData<components['schemas']['OpportunityItem']>;
|
|
16
|
+
getContacts(params?: GetContactsParams, options?: RawDataOption): RequestData<components['schemas']['ContactItemOut'][]>;
|
|
17
|
+
getContactById(contactId: string, options?: RawDataOption): RequestData<components['schemas']['ContactItemOut']>;
|
|
18
|
+
createContact(contact: components['schemas']['ContactItemIn'], options?: ClientRequestOption): RequestData<components['schemas']['ContactItemOut']>;
|
|
19
|
+
getPayments(options?: RawDataOption): RequestData<components['schemas']['InvoicingPaymentItem'][]>;
|
|
20
|
+
getPaymentMethods(options?: RawDataOption): RequestData<components['schemas']['InvoicingPaymentMethodItem'][]>;
|
|
21
21
|
};
|
|
22
22
|
export { invoicingFactory };
|
|
@@ -2,100 +2,115 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.invoicingFactory = void 0;
|
|
4
4
|
const invoicingFactory = {
|
|
5
|
-
getInvoices(params) {
|
|
5
|
+
getInvoices(params, options) {
|
|
6
6
|
return {
|
|
7
7
|
method: 'get',
|
|
8
8
|
url: `/consumers/{consumer_id}/invoicing/invoices`,
|
|
9
9
|
params: params,
|
|
10
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
10
11
|
};
|
|
11
12
|
},
|
|
12
|
-
getInvoiceById(invoiceId, params) {
|
|
13
|
+
getInvoiceById(invoiceId, params, options) {
|
|
13
14
|
return {
|
|
14
15
|
method: 'get',
|
|
15
16
|
url: `/consumers/{consumer_id}/invoicing/invoices/${invoiceId}`,
|
|
16
17
|
params: params,
|
|
18
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
17
19
|
};
|
|
18
20
|
},
|
|
19
|
-
createInvoice(invoice) {
|
|
21
|
+
createInvoice(invoice, options) {
|
|
20
22
|
return {
|
|
21
|
-
method: '
|
|
23
|
+
method: 'post',
|
|
22
24
|
url: `/consumers/{consumer_id}/invoicing/invoices`,
|
|
23
25
|
body: invoice,
|
|
26
|
+
clientRequestId: options === null || options === void 0 ? void 0 : options.clientRequestId,
|
|
24
27
|
};
|
|
25
28
|
},
|
|
26
|
-
getProducts() {
|
|
29
|
+
getProducts(options) {
|
|
27
30
|
return {
|
|
28
31
|
method: 'get',
|
|
29
32
|
url: `/consumers/{consumer_id}/invoicing/products`,
|
|
33
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
30
34
|
};
|
|
31
35
|
},
|
|
32
|
-
getProductById(productId) {
|
|
36
|
+
getProductById(productId, options) {
|
|
33
37
|
return {
|
|
34
38
|
method: 'get',
|
|
35
39
|
url: `/consumers/{consumer_id}/invoicing/products/${productId}`,
|
|
40
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
36
41
|
};
|
|
37
42
|
},
|
|
38
|
-
createProduct(product) {
|
|
43
|
+
createProduct(product, options) {
|
|
39
44
|
return {
|
|
40
|
-
method: '
|
|
45
|
+
method: 'post',
|
|
41
46
|
url: `/consumers/{consumer_id}/invoicing/products`,
|
|
42
47
|
body: product,
|
|
48
|
+
clientRequestId: options === null || options === void 0 ? void 0 : options.clientRequestId,
|
|
43
49
|
};
|
|
44
50
|
},
|
|
45
|
-
getTaxes() {
|
|
51
|
+
getTaxes(options) {
|
|
46
52
|
return {
|
|
47
53
|
method: 'get',
|
|
48
54
|
url: `/consumers/{consumer_id}/invoicing/taxes`,
|
|
55
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
49
56
|
};
|
|
50
57
|
},
|
|
51
|
-
getTaxById(taxId) {
|
|
58
|
+
getTaxById(taxId, options) {
|
|
52
59
|
return {
|
|
53
60
|
method: 'get',
|
|
54
61
|
url: `/consumers/{consumer_id}/invoicing/taxes/${taxId}`,
|
|
62
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
55
63
|
};
|
|
56
64
|
},
|
|
57
|
-
getOpportunities() {
|
|
65
|
+
getOpportunities(options) {
|
|
58
66
|
return {
|
|
59
67
|
method: 'get',
|
|
60
68
|
url: `/consumers/{consumer_id}/invoicing/opportunities`,
|
|
69
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
61
70
|
};
|
|
62
71
|
},
|
|
63
|
-
getOpportunitiesById(opportunityId) {
|
|
72
|
+
getOpportunitiesById(opportunityId, options) {
|
|
64
73
|
return {
|
|
65
74
|
method: 'get',
|
|
66
75
|
url: `/consumers/{consumer_id}/invoicing/opportunities/${opportunityId}`,
|
|
76
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
67
77
|
};
|
|
68
78
|
},
|
|
69
|
-
getContacts(params) {
|
|
79
|
+
getContacts(params, options) {
|
|
70
80
|
return {
|
|
71
81
|
method: 'get',
|
|
72
82
|
url: `/consumers/{consumer_id}/invoicing/contacts`,
|
|
73
83
|
params: params,
|
|
84
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
74
85
|
};
|
|
75
86
|
},
|
|
76
|
-
getContactById(contactId) {
|
|
87
|
+
getContactById(contactId, options) {
|
|
77
88
|
return {
|
|
78
89
|
method: 'get',
|
|
79
90
|
url: `/consumers/{consumer_id}/invoicing/contacts/${contactId}`,
|
|
91
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
80
92
|
};
|
|
81
93
|
},
|
|
82
|
-
createContact(contact) {
|
|
94
|
+
createContact(contact, options) {
|
|
83
95
|
return {
|
|
84
|
-
method: '
|
|
96
|
+
method: 'post',
|
|
85
97
|
url: `/consumers/{consumer_id}/invoicing/contacts`,
|
|
86
98
|
body: contact,
|
|
99
|
+
clientRequestId: options === null || options === void 0 ? void 0 : options.clientRequestId,
|
|
87
100
|
};
|
|
88
101
|
},
|
|
89
|
-
getPayments() {
|
|
102
|
+
getPayments(options) {
|
|
90
103
|
return {
|
|
91
104
|
method: 'get',
|
|
92
105
|
url: `/consumers/{consumer_id}/invoicing/payments`,
|
|
106
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
93
107
|
};
|
|
94
108
|
},
|
|
95
|
-
getPaymentMethods() {
|
|
109
|
+
getPaymentMethods(options) {
|
|
96
110
|
return {
|
|
97
111
|
method: 'get',
|
|
98
112
|
url: `/consumers/{consumer_id}/invoicing/payment-methods`,
|
|
113
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
99
114
|
};
|
|
100
115
|
},
|
|
101
116
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { operations, components } from '../types/public-api/schema';
|
|
2
|
-
import { AutoPaginatedParams, RequestData } from '../types/api';
|
|
2
|
+
import { AutoPaginatedParams, RequestData, RawDataOption } from '../types/api';
|
|
3
3
|
type GetBalancesParams = AutoPaginatedParams<operations['payment_get_balances']['parameters']['query']>;
|
|
4
4
|
type GetPaymentsParams = AutoPaginatedParams<operations['payment_get_payments']['parameters']['query']>;
|
|
5
5
|
type GetTransactionsParams = AutoPaginatedParams<operations['payment_get_transaction']['parameters']['query']>;
|
|
6
6
|
type GetRefundsParams = AutoPaginatedParams<operations['payment_get_refunds']['parameters']['query']>;
|
|
7
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'][]>;
|
|
8
|
+
getPayments(params: GetPaymentsParams, options?: RawDataOption): RequestData<components['schemas']['PaymentItemOut'][]>;
|
|
9
|
+
getBalances(params: GetBalancesParams, options?: RawDataOption): RequestData<components['schemas']['BalanceItemOut'][]>;
|
|
10
|
+
getTransactions(params: GetTransactionsParams, options?: RawDataOption): RequestData<components['schemas']['TransactionItemOut'][]>;
|
|
11
|
+
getPayment(params: operations['payment_get_payment']['parameters']['path'], options?: RawDataOption): RequestData<components['schemas']['PaymentItemOut']>;
|
|
12
|
+
getRefunds(params: GetRefundsParams, options?: RawDataOption): RequestData<components['schemas']['RefundItemOut'][]>;
|
|
13
13
|
};
|
|
14
14
|
export { paymentFactory };
|
|
@@ -2,39 +2,44 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paymentFactory = void 0;
|
|
4
4
|
const paymentFactory = {
|
|
5
|
-
getPayments(params) {
|
|
5
|
+
getPayments(params, options) {
|
|
6
6
|
return {
|
|
7
7
|
params,
|
|
8
8
|
method: 'get',
|
|
9
9
|
url: `/consumers/{consumer_id}/payment/payments`,
|
|
10
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
10
11
|
};
|
|
11
12
|
},
|
|
12
|
-
getBalances(params) {
|
|
13
|
+
getBalances(params, options) {
|
|
13
14
|
return {
|
|
14
15
|
params,
|
|
15
16
|
method: 'get',
|
|
16
17
|
url: `/consumers/{consumer_id}/payment/balances`,
|
|
18
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
17
19
|
};
|
|
18
20
|
},
|
|
19
|
-
getTransactions(params) {
|
|
21
|
+
getTransactions(params, options) {
|
|
20
22
|
return {
|
|
21
23
|
params,
|
|
22
24
|
method: 'get',
|
|
23
25
|
url: `/consumers/{consumer_id}/payment/transactions`,
|
|
26
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
24
27
|
};
|
|
25
28
|
},
|
|
26
|
-
getPayment(params) {
|
|
29
|
+
getPayment(params, options) {
|
|
27
30
|
return {
|
|
28
31
|
params,
|
|
29
32
|
method: 'get',
|
|
30
33
|
url: `/consumers/{consumer_id}/payment/payments/{payment_id}`,
|
|
34
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
31
35
|
};
|
|
32
36
|
},
|
|
33
|
-
getRefunds(params) {
|
|
37
|
+
getRefunds(params, options) {
|
|
34
38
|
return {
|
|
35
39
|
params,
|
|
36
40
|
method: 'get',
|
|
37
41
|
url: `/consumers/{consumer_id}/payment/refunds`,
|
|
42
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
38
43
|
};
|
|
39
44
|
},
|
|
40
45
|
};
|
|
@@ -7,13 +7,13 @@ type GetOrdersParams = AutoPaginatedParams<operations['pms_get_orders']['paramet
|
|
|
7
7
|
type GetCustomersParams = AutoPaginatedParams<operations['pms_get_customers']['parameters']['query']>;
|
|
8
8
|
type GetInvoicesParams = AutoPaginatedParams<operations['pms_get_invoices']['parameters']['query']>;
|
|
9
9
|
declare const pmsFactory: {
|
|
10
|
-
getLocations(): RequestData<components['schemas']['PMSLocationItem'][]>;
|
|
11
|
-
getOrders(params: GetOrdersParams): RequestData<components['schemas']['PMSOrderItem'][]>;
|
|
12
|
-
getPaymentMethods(params?: GetPaymentMethodsParams): RequestData<components['schemas']['PMSPaymentMethods'][]>;
|
|
13
|
-
getClosure(date: string, params?: operations['pms_get_closure']['parameters']['query']): RequestData<components['schemas']['PMSClosureItem']>;
|
|
14
|
-
getPayments(params: GetPaymentsParams): RequestData<components['schemas']['PMSPaymentItem'][]>;
|
|
15
|
-
getAccountingCategories(params?: GetAccountingCategoriesParams): RequestData<components['schemas']['PMSAccountingCategoryItem'][]>;
|
|
16
|
-
getCustomers(params?: GetCustomersParams): RequestData<components['schemas']['PMSCustomerItem'][]>;
|
|
17
|
-
getInvoices(params?: GetInvoicesParams): RequestData<components['schemas']['PMSInvoiceFullItem'][]>;
|
|
10
|
+
getLocations(rawData?: boolean): RequestData<components['schemas']['PMSLocationItem'][]>;
|
|
11
|
+
getOrders(params: GetOrdersParams, rawData?: boolean): RequestData<components['schemas']['PMSOrderItem'][]>;
|
|
12
|
+
getPaymentMethods(params?: GetPaymentMethodsParams, rawData?: boolean): RequestData<components['schemas']['PMSPaymentMethods'][]>;
|
|
13
|
+
getClosure(date: string, params?: operations['pms_get_closure']['parameters']['query'], rawData?: boolean): RequestData<components['schemas']['PMSClosureItem']>;
|
|
14
|
+
getPayments(params: GetPaymentsParams, rawData?: boolean): RequestData<components['schemas']['PMSPaymentItem'][]>;
|
|
15
|
+
getAccountingCategories(params?: GetAccountingCategoriesParams, rawData?: boolean): RequestData<components['schemas']['PMSAccountingCategoryItem'][]>;
|
|
16
|
+
getCustomers(params?: GetCustomersParams, rawData?: boolean): RequestData<components['schemas']['PMSCustomerItem'][]>;
|
|
17
|
+
getInvoices(params?: GetInvoicesParams, rawData?: boolean): RequestData<components['schemas']['PMSInvoiceFullItem'][]>;
|
|
18
18
|
};
|
|
19
19
|
export { pmsFactory };
|