@chift/chift-nodejs 1.0.26 → 1.0.28

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.
@@ -5,6 +5,7 @@ declare const Integrations: (internalApi: InternalAPI) => {
5
5
  getIntegrations: (params?: operations[chiftOperations['getIntegrations']]['parameters']['query']) => Promise<{
6
6
  integrationid: number;
7
7
  name: string;
8
+ description?: string | null | undefined;
8
9
  status: "active" | "inactive";
9
10
  api: "Payment" | "Point of Sale" | "eCommerce" | "Accounting" | "Invoicing" | "Communication" | "Banking" | "Custom" | "Property Management System";
10
11
  logo_url: string;
@@ -15,6 +16,10 @@ declare const Integrations: (internalApi: InternalAPI) => {
15
16
  optional: boolean;
16
17
  resource: string;
17
18
  }[] | null;
19
+ operations_coverage: {
20
+ operation: string;
21
+ status: "SUPPORTED" | "NOT_IMPLEMENTED" | "NOT_SUPPORTED" | "UNDER_ANALYSIS";
22
+ }[] | null;
18
23
  credentials: {
19
24
  name: string;
20
25
  optional: boolean;
@@ -8,10 +8,10 @@ declare class InternalAPI {
8
8
  relatedChainExecutionId?: string;
9
9
  connectionId?: string;
10
10
  integrationId?: string;
11
- get: <T = any, R = import("axios").AxiosResponse<T, any>, D = any>(url: string, config?: import("axios").AxiosRequestConfig<D> | undefined) => Promise<R>;
12
- post: <T = any, R = import("axios").AxiosResponse<T, any>, D = any>(url: string, data?: D | undefined, config?: import("axios").AxiosRequestConfig<D> | undefined) => Promise<R>;
13
- patch: <T = any, R = import("axios").AxiosResponse<T, any>, D = any>(url: string, data?: D | undefined, config?: import("axios").AxiosRequestConfig<D> | undefined) => Promise<R>;
14
- delete: <T = any, R = import("axios").AxiosResponse<T, any>, D = any>(url: string, config?: import("axios").AxiosRequestConfig<D> | undefined) => Promise<R>;
11
+ get: <T = any, R = import("axios").AxiosResponse<T, any, {}>, D = any>(url: string, config?: import("axios").AxiosRequestConfig<D> | undefined) => Promise<R>;
12
+ post: <T = any, R = import("axios").AxiosResponse<T, any, {}>, D = any>(url: string, data?: D | undefined, config?: import("axios").AxiosRequestConfig<D> | undefined) => Promise<R>;
13
+ patch: <T = any, R = import("axios").AxiosResponse<T, any, {}>, D = any>(url: string, data?: D | undefined, config?: import("axios").AxiosRequestConfig<D> | undefined) => Promise<R>;
14
+ delete: <T = any, R = import("axios").AxiosResponse<T, any, {}>, D = any>(url: string, config?: import("axios").AxiosRequestConfig<D> | undefined) => Promise<R>;
15
15
  constructor(auth: AuthType);
16
16
  getToken: () => Promise<void>;
17
17
  getPaginationParams: (currPage: number) => {
@@ -0,0 +1,68 @@
1
+ import { operations } from '../types/public-api/schema';
2
+ import { InternalAPI } from './internalApi';
3
+ declare const Issues: (internalApi: InternalAPI) => {
4
+ getIssues: (params?: operations['issues_get_issues']['parameters']['query']) => Promise<{
5
+ id: string;
6
+ consumer_id: string;
7
+ connection_id: string;
8
+ integration_id: number;
9
+ integration_name: string;
10
+ created_on: string;
11
+ updated_on: string;
12
+ last_seen: string;
13
+ error: {
14
+ error_code: string;
15
+ status: string;
16
+ title: string;
17
+ description?: string | undefined;
18
+ };
19
+ occurrences: number;
20
+ level: "error" | "warning";
21
+ }[]>;
22
+ getIssuesByConsumerId: (consumerId: string, params?: operations['issues_get_issues_by_consumer_id']['parameters']['query']) => Promise<{
23
+ id: string;
24
+ consumer_id: string;
25
+ connection_id: string;
26
+ integration_id: number;
27
+ integration_name: string;
28
+ created_on: string;
29
+ updated_on: string;
30
+ last_seen: string;
31
+ error: {
32
+ error_code: string;
33
+ status: string;
34
+ title: string;
35
+ description?: string | undefined;
36
+ };
37
+ occurrences: number;
38
+ level: "error" | "warning";
39
+ }[]>;
40
+ getIssue: (issueId: string, params?: operations['issues_get_issue']['parameters']['query']) => Promise<{
41
+ id: string;
42
+ consumer_id: string;
43
+ connection_id: string;
44
+ integration_id: number;
45
+ integration_name: string;
46
+ created_on: string;
47
+ updated_on: string;
48
+ last_seen: string;
49
+ error: {
50
+ error_code: string;
51
+ status: string;
52
+ title: string;
53
+ description?: string | undefined;
54
+ };
55
+ occurrences: number;
56
+ level: "error" | "warning";
57
+ events: {
58
+ id: string;
59
+ execution_id: string;
60
+ created_on: string;
61
+ context?: {
62
+ [key: string]: unknown;
63
+ } | null | undefined;
64
+ message?: string | null | undefined;
65
+ }[];
66
+ }>;
67
+ };
68
+ export { Issues };
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.Issues = void 0;
13
+ const Issues = (internalApi) => {
14
+ const _internalApi = internalApi;
15
+ const getIssues = (params) => __awaiter(void 0, void 0, void 0, function* () {
16
+ const { data, } = yield _internalApi.get('/issues', { params });
17
+ return data;
18
+ });
19
+ const getIssuesByConsumerId = (consumerId, params) => __awaiter(void 0, void 0, void 0, function* () {
20
+ const { data, } = yield _internalApi.get(`/consumers/${consumerId}/issues`, { params });
21
+ return data;
22
+ });
23
+ const getIssue = (issueId, params) => __awaiter(void 0, void 0, void 0, function* () {
24
+ const { data, } = yield _internalApi.get(`/issues/${issueId}`, { params });
25
+ return data;
26
+ });
27
+ return {
28
+ getIssues,
29
+ getIssuesByConsumerId,
30
+ getIssue,
31
+ };
32
+ };
33
+ exports.Issues = Issues;
@@ -6,6 +6,7 @@ type GetAccountingCategoriesParams = AutoPaginatedParams<operations['pms_get_acc
6
6
  type GetOrdersParams = AutoPaginatedParams<operations['pms_get_orders']['parameters']['query']>;
7
7
  type GetCustomersParams = AutoPaginatedParams<operations['pms_get_customers']['parameters']['query']>;
8
8
  type GetInvoicesParams = AutoPaginatedParams<operations['pms_get_invoices']['parameters']['query']>;
9
+ type GetTaxesParams = AutoPaginatedParams<operations['pms_get_taxes']['parameters']['query']>;
9
10
  declare const pmsFactory: {
10
11
  getLocations(rawData?: boolean): RequestData<components['schemas']['PMSLocationItem'][]>;
11
12
  getOrders(params: GetOrdersParams, rawData?: boolean): RequestData<components['schemas']['PMSOrderItem'][]>;
@@ -14,6 +15,8 @@ declare const pmsFactory: {
14
15
  getPayments(params: GetPaymentsParams, rawData?: boolean): RequestData<components['schemas']['PMSPaymentItem'][]>;
15
16
  getAccountingCategories(params?: GetAccountingCategoriesParams, rawData?: boolean): RequestData<components['schemas']['PMSAccountingCategoryItem'][]>;
16
17
  getCustomers(params?: GetCustomersParams, rawData?: boolean): RequestData<components['schemas']['PMSCustomerItem'][]>;
18
+ getCustomer(customerId: string, rawData?: boolean): RequestData<components['schemas']['PMSCustomerItem']>;
17
19
  getInvoices(params?: GetInvoicesParams, rawData?: boolean): RequestData<components['schemas']['PMSInvoiceFullItem'][]>;
20
+ getTaxes(params?: GetTaxesParams, rawData?: boolean): RequestData<components['schemas']['ChiftPage_PMSTaxRateItem_']>;
18
21
  };
19
22
  export { pmsFactory };
@@ -57,6 +57,13 @@ const pmsFactory = {
57
57
  rawData,
58
58
  };
59
59
  },
60
+ getCustomer(customerId, rawData) {
61
+ return {
62
+ method: 'get',
63
+ url: `/consumers/{consumer_id}/pms/customers/${customerId}`,
64
+ rawData,
65
+ };
66
+ },
60
67
  getInvoices(params, rawData) {
61
68
  return {
62
69
  params,
@@ -65,5 +72,13 @@ const pmsFactory = {
65
72
  rawData,
66
73
  };
67
74
  },
75
+ getTaxes(params, rawData) {
76
+ return {
77
+ params,
78
+ method: 'get',
79
+ url: '/consumers/{consumer_id}/pms/taxes',
80
+ rawData,
81
+ };
82
+ },
68
83
  };
69
84
  exports.pmsFactory = pmsFactory;