@chift/chift-nodejs 1.0.30 → 1.0.32

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.
@@ -21,6 +21,7 @@ declare const DataStores: (internalApi: InternalAPI) => {
21
21
  };
22
22
  id: string;
23
23
  created_on: string;
24
+ modified_on: string;
24
25
  }[]>;
25
26
  createConsumerDataStoreData: (consumerId: string, datastoreId: string, body: components['schemas']['DataItem']) => Promise<{
26
27
  data: {
@@ -28,6 +29,7 @@ declare const DataStores: (internalApi: InternalAPI) => {
28
29
  };
29
30
  id: string;
30
31
  created_on: string;
32
+ modified_on: string;
31
33
  }>;
32
34
  updateConsumerDataStoreData: (consumerId: string, datastoreId: string, datastoreDataId: string, body: components['schemas']['DataItem']) => Promise<{
33
35
  data: {
@@ -35,6 +37,7 @@ declare const DataStores: (internalApi: InternalAPI) => {
35
37
  };
36
38
  id: string;
37
39
  created_on: string;
40
+ modified_on: string;
38
41
  }>;
39
42
  deleteConsumerDataStoreData: (consumerId: string, datastoreId: string, datastoreDataId: string) => Promise<void>;
40
43
  };
@@ -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']['ProductItem-Output'][]>;
13
+ getProducts(params?: GetProductsParams, options?: RawDataOption): RequestData<components['schemas']['CommerceProductItem'][]>;
14
14
  getCustomer(customerId: string, options?: RawDataOption): RequestData<components['schemas']['CommerceCustomerItem']>;
15
- getProduct(productId: string, options?: RawDataOption): RequestData<components['schemas']['ProductItem-Output']>;
15
+ getProduct(productId: string, options?: RawDataOption): RequestData<components['schemas']['CommerceProductItem']>;
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,7 +7,7 @@ declare const Integrations: (internalApi: InternalAPI) => {
7
7
  name: string;
8
8
  description?: string | null | undefined;
9
9
  status: "active" | "inactive";
10
- api: "Payment" | "Point of Sale" | "eCommerce" | "Accounting" | "Invoicing" | "Communication" | "Banking" | "Custom" | "Property Management System";
10
+ api: "Payment" | "Point of Sale" | "eCommerce" | "Accounting" | "Invoicing" | "Banking" | "Custom" | "Property Management System" | "Communication";
11
11
  logo_url: string;
12
12
  icon_url: string;
13
13
  post_connections: {
@@ -15,6 +15,10 @@ declare const Integrations: (internalApi: InternalAPI) => {
15
15
  title: string;
16
16
  optional: boolean;
17
17
  resource: string;
18
+ config: {
19
+ enabled: boolean;
20
+ allow_multiple: boolean;
21
+ };
18
22
  }[] | null;
19
23
  operations_coverage: {
20
24
  operation: string;
@@ -37,7 +37,11 @@ class InternalAPI {
37
37
  if (this.auth.envId) {
38
38
  tokenData['envId'] = this.auth.envId;
39
39
  }
40
- const res = yield axios_1.default.post(`${this.auth.baseUrl || settings_1.default.BASE_URL}/token`, tokenData);
40
+ const res = yield axios_1.default.post(`${this.auth.baseUrl || settings_1.default.BASE_URL}/token`, tokenData, {
41
+ headers: {
42
+ 'Content-Type': 'application/json',
43
+ },
44
+ });
41
45
  this.token = res.data;
42
46
  return;
43
47
  }
@@ -64,6 +68,9 @@ class InternalAPI {
64
68
  this.auth = auth;
65
69
  this.instance = axios_1.default.create({
66
70
  baseURL: this.auth.baseUrl || settings_1.default.BASE_URL,
71
+ headers: {
72
+ 'Content-Type': 'application/json',
73
+ },
67
74
  });
68
75
  this.get = this.instance.get;
69
76
  this.post = this.instance.post;
@@ -10,7 +10,7 @@ declare const invoicingFactory: {
10
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']['ProductItem-Input'], options?: ClientRequestOption): RequestData<components['schemas']['ProductItemOut']>;
13
+ createProduct(product: components['schemas']['ProductItem'], 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'][]>;
@@ -2,7 +2,7 @@ import { operations, components } from '../types/public-api/schema';
2
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
- type GetTransactionsParams = AutoPaginatedParams<operations['payment_get_transaction']['parameters']['query']>;
5
+ type GetTransactionsParams = AutoPaginatedParams<operations['payment_get_transactions']['parameters']['query']>;
6
6
  type GetRefundsParams = AutoPaginatedParams<operations['payment_get_refunds']['parameters']['query']>;
7
7
  declare const paymentFactory: {
8
8
  getPayments(params: GetPaymentsParams, options?: RawDataOption): RequestData<components['schemas']['PaymentItemOut'][]>;
@@ -15,7 +15,7 @@ declare const posFactory: {
15
15
  getCustomer(customerId: string, options?: RawDataOption): RequestData<components['schemas']['POSCustomerItem']>;
16
16
  createCustomer(customer: components['schemas']['POSCreateCustomerItem'], options?: ClientRequestOption): RequestData<components['schemas']['POSCustomerItem']>;
17
17
  getPaymentMethods(params?: GetPaymentMethodsParams, options?: RawDataOption): RequestData<components['schemas']['PaymentMethods'][]>;
18
- getProductCategories(params?: GetProductCategoriesParams, options?: RawDataOption): RequestData<components['schemas']['backbone_common__models__pos__common__ProductCategoryItem'][]>;
18
+ getProductCategories(params?: GetProductCategoriesParams, options?: RawDataOption): RequestData<components['schemas']['ProductCategoryItem'][]>;
19
19
  getProducts(params?: GetProductsParams, options?: RawDataOption): RequestData<components['schemas']['POSProductItem'][]>;
20
20
  getSales(params: operations['pos_get_sales']['parameters']['query'], options?: RawDataOption): RequestData<components['schemas']['SalesItem']>;
21
21
  getClosure(date: string, params?: operations['pos_get_closure']['parameters']['query'], options?: RawDataOption): RequestData<components['schemas']['ClosureItem']>;