@konversi/konversi-client 1.3.0 → 1.4.1

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 CHANGED
@@ -1,47 +1,47 @@
1
- # Konversi Client
2
-
3
- ## Automations Examples
4
-
5
- ### Basic Automation Example
6
- ```ts
7
- import K from '@konversi/konversi-client';
8
-
9
- export async function execute(input) {
10
- console.log(input);
11
- }
12
- ```
13
-
14
- ### Base Objects CRUD
15
-
16
- ```ts
17
- import K, { Entity } from '@konversi/konversi-client';
18
-
19
- export async function execute(input) {
20
- let result = await K.createObject(Entity.SALES_ORDER, {})
21
- console.log(result);
22
-
23
- result = await K.getAllObjects(Entity.SALES_ORDER)
24
- console.log(result);
25
-
26
- result = await K.updateObject(Entity.SALES_ORDER, result[0].id, { memo: 'New memo' })
27
- console.log(result);
28
- }
29
- ```
30
-
31
- ### Custom Objects CRUD
32
-
33
- ```ts
34
- import K, { Entity } from '@konversi/konversi-client';
35
-
36
- export async function execute(input) {
37
- let createdObject = await K.createCustomObject('ticket', {numEntries: 100, amount: 500000, code: "TICKET-123456"})
38
- console.log(`created object`, createdObject);
39
-
40
- let allObjects = await K.getAllCustomObjects('ticket');
41
-
42
- console.log(`all objects`, allObjects);
43
-
44
- let updateResult = await K.updateCustomObject('ticket', createdObject.id, {numEntries: 200});
45
- console.log(`updated object`, updateResult);
46
- }
1
+ # Konversi Client
2
+
3
+ ## Automations Examples
4
+
5
+ ### Basic Automation Example
6
+ ```ts
7
+ import K from '@konversi/konversi-client';
8
+
9
+ export async function execute(input) {
10
+ console.log(input);
11
+ }
12
+ ```
13
+
14
+ ### Base Objects CRUD
15
+
16
+ ```ts
17
+ import K, { Entity } from '@konversi/konversi-client';
18
+
19
+ export async function execute(input) {
20
+ let result = await K.createObject(Entity.SALES_ORDER, {})
21
+ console.log(result);
22
+
23
+ result = await K.getAllObjects(Entity.SALES_ORDER)
24
+ console.log(result);
25
+
26
+ result = await K.updateObject(Entity.SALES_ORDER, result[0].id, { memo: 'New memo' })
27
+ console.log(result);
28
+ }
29
+ ```
30
+
31
+ ### Custom Objects CRUD
32
+
33
+ ```ts
34
+ import K, { Entity } from '@konversi/konversi-client';
35
+
36
+ export async function execute(input) {
37
+ let createdObject = await K.createCustomObject('ticket', {numEntries: 100, amount: 500000, code: "TICKET-123456"})
38
+ console.log(`created object`, createdObject);
39
+
40
+ let allObjects = await K.getAllCustomObjects('ticket');
41
+
42
+ console.log(`all objects`, allObjects);
43
+
44
+ let updateResult = await K.updateCustomObject('ticket', createdObject.id, {numEntries: 200});
45
+ console.log(`updated object`, updateResult);
46
+ }
47
47
  ```
package/axiosAPI.ts CHANGED
@@ -1,27 +1,27 @@
1
- import axios from 'axios';
2
-
3
- const baseURL = 'https://us.api.konversi.net/api'
4
- const timeout = 30000
5
-
6
- const instance = axios.create({
7
- baseURL,
8
- timeout
9
- })
10
-
11
- export const setBaseUrl = (baseUrl: string) => {
12
- instance.defaults.baseURL = baseUrl
13
- }
14
-
15
- export const setAuthToken = (token: string) => {
16
- instance.defaults.headers.common.authorization = `Bearer ${token}`
17
- }
18
-
19
- export const setCompanyId = (companyId: string) => {
20
- instance.defaults.headers.common['Company'] = companyId;
21
- }
22
-
23
- export const clearAuthToken = () => {
24
- instance.defaults.headers.common.authorization = ''
25
- }
26
-
1
+ import axios from 'axios';
2
+
3
+ const baseURL = 'https://api.konversi.id/api'
4
+ const timeout = 120000
5
+
6
+ const instance = axios.create({
7
+ baseURL,
8
+ timeout
9
+ })
10
+
11
+ export const setBaseUrl = (baseUrl: string) => {
12
+ instance.defaults.baseURL = baseUrl
13
+ }
14
+
15
+ export const setAuthToken = (token: string) => {
16
+ instance.defaults.headers.common.authorization = `Bearer ${token}`
17
+ }
18
+
19
+ export const setCompanyId = (companyId: string) => {
20
+ instance.defaults.headers.common['Company'] = companyId;
21
+ }
22
+
23
+ export const clearAuthToken = () => {
24
+ instance.defaults.headers.common.authorization = ''
25
+ }
26
+
27
27
  export default instance;
package/crudEndpoints.ts CHANGED
@@ -1,107 +1,107 @@
1
- export const NOTIFICATION = 'notification';
2
-
3
- export const COMPANY_PERMISSION = 'company-permission';
4
- export const COMPANY_OPTION = 'company-option';
5
- export const INVITATION = 'user/invitation';
6
-
7
- export const CUSTOMER = 'contact/customer';
8
-
9
- export const PRODUCT = 'product'
10
- export const PRODUCT_ITEM = 'product/product-item'
11
- export const PRODUCT_GROUP = 'product-group'
12
-
13
- export const PURCHASE_ORDER = 'order/purchase-order'
14
- export const PURCHASE_ORDER_LINE = 'order/purchase-order-line'
15
- export const QUOTE = 'order/quote'
16
- export const QUOTE_LINE = 'order/quote-line'
17
- export const SALES_ORDER = 'order/sales-order'
18
- export const SALES_ORDER_LINE = 'order/sales-order-line'
19
- export const RENTAL_ORDER = 'order/rental-order'
20
- export const RENTAL_ORDER_LINE = 'order/rental-order-line'
21
- export const SUPPLIER = 'contact/supplier'
22
- export const WAREHOUSE = 'warehouse'
23
-
24
- // Deliveries
25
- export const INCOMING_DELIVERY = 'delivery/incoming-delivery'
26
- export const INCOMING_DELIVERY_LINE = 'delivery/incoming-delivery-line'
27
- export const OUTGOING_DELIVERY = 'delivery/outgoing-delivery'
28
- export const OUTGOING_DELIVERY_LINE = 'delivery/outgoing-delivery-line'
29
- export const INTERNAL_DELIVERY = 'delivery/internal-delivery'
30
- export const INTERNAL_DELIVERY_LINE = 'delivery/internal-delivery-line'
31
-
32
- // Finance
33
- export const INVOICE = 'invoice'
34
- export const INVOICE_LINE = 'invoice/invoice-line'
35
- export const EXPENSE = 'expense'
36
- export const EXPENSE_LINE = 'expense/expense-line'
37
- export const PAYMENT = 'accounting/payment'
38
- export const INCOMING_PAYMENT_METHOD = 'accounting/incoming-payment-method'
39
- export const FIXED_ASSET = 'fixed-asset'
40
-
41
- // ECommerce
42
- export const STORE = 'store'
43
- export const STORE_PRODUCT = 'store/store-product'
44
- export const STORE_PRODUCT_GROUP = 'store/store-product-group'
45
- export const STORE_PRODUCT_ATTRIBUTE = 'store/store-product-attribute'
46
- export const STORE_PRODUCT_ATTRIBUTE_VALUE = 'store/store-product-attribute-value'
47
-
48
- // Accounting
49
- export const ACCOUNT = 'accounting/account';
50
- export const JOURNAL_ENTRY = 'accounting/journal-entry';
51
- export const JOURNAL_ENTRY_LINE = 'accounting/journal-entry-line';
52
-
53
- // Manufacturing
54
- export const BILL_OF_MATERIALS = 'manufacturing/bill-of-materials'
55
- export const BOM_COMPONENT = 'manufacturing/bom-component'
56
- export const BOM_OPERATION = 'manufacturing/bom-operation'
57
- export const PRODUCTION_ORDER = 'manufacturing/production-order'
58
- export const PRODUCTION_ORDER_LINE = 'manufacturing/production-order-line'
59
-
60
- export const SUBSIDIARY = 'subsidiary'
61
-
62
- // HR
63
- export const EMPLOYEE = 'human-resources/employee'
64
- export const ATTENDANCE = 'human-resources/attendance'
65
-
66
- // Fleet Management
67
- export const VEHICLE = 'fleet/vehicle'
68
- export const DELIVERY_JOB = 'fleet/delivery-job'
69
-
70
- // Custom Objects
71
- export const CUSTOM_ENTITY_SCHEMA = 'custom-entity/schema'
72
- export const CUSTOM_ENTITY_OBJECT = 'custom-entity'; // Need to add schemaName after this
73
- export const CUSTOM_ENTITY_FIELD = 'custom-entity/field'; // Need to add schemaName after this
74
-
75
- // Automation
76
- export const AUTOMATION_JOB = 'automation/job'
77
- export const AUTOMATION_SCRIPT = 'automation/script'
78
- export const USER_ACTION = 'automation/user-action'
79
-
80
- // IOT
81
- export const IOT_DEVICE = 'iot/device';
82
- export const IOT_JOB = 'iot/job';
83
-
84
- export const STOCK_ADJUSTMENT = 'stock-adjustment'
85
-
86
- export const PURCHASE_ORDER_APPROVER = 'approval/approver/purchase-order'
87
- export const SALES_ORDER_APPROVER = 'approval/approver/sales-order'
88
-
89
- // Document Generation
90
- export const CUSTOM_DOCUMENT = 'document-generator/custom-document';
91
-
92
- export const CUSTOM_FIELD = 'custom-field'
93
-
94
- export const AUDIT_LOG = 'audit-log'
95
-
96
- export const COMPANY_ALIAS = 'company-alias'
97
-
98
- export const PRINT_JOB = 'thermal-printer/print-job'
99
-
100
- export const WORK_ORDER = 'order/sales-order?type=WORK_ORDER';
101
-
102
- export const SERVICE_ORDER = 'order/sales-order?type=SERVICE_ORDER';
103
-
104
- // TODO: Deprecate
105
- export const INCOMING_SHIPMENT = 'shipment/incoming-shipment'
106
- export const OUTGOING_SHIPMENT = 'shipment/outgoing-shipment'
1
+ export const NOTIFICATION = 'notification';
2
+
3
+ export const COMPANY_PERMISSION = 'company-permission';
4
+ export const COMPANY_OPTION = 'company-option';
5
+ export const INVITATION = 'user/invitation';
6
+
7
+ export const CUSTOMER = 'contact/customer';
8
+
9
+ export const PRODUCT = 'product'
10
+ export const PRODUCT_ITEM = 'product/product-item'
11
+ export const PRODUCT_GROUP = 'product-group'
12
+
13
+ export const PURCHASE_ORDER = 'order/purchase-order'
14
+ export const PURCHASE_ORDER_LINE = 'order/purchase-order-line'
15
+ export const QUOTE = 'order/quote'
16
+ export const QUOTE_LINE = 'order/quote-line'
17
+ export const SALES_ORDER = 'order/sales-order'
18
+ export const SALES_ORDER_LINE = 'order/sales-order-line'
19
+ export const RENTAL_ORDER = 'order/rental-order'
20
+ export const RENTAL_ORDER_LINE = 'order/rental-order-line'
21
+ export const SUPPLIER = 'contact/supplier'
22
+ export const WAREHOUSE = 'warehouse'
23
+
24
+ // Deliveries
25
+ export const INCOMING_DELIVERY = 'delivery/incoming-delivery'
26
+ export const INCOMING_DELIVERY_LINE = 'delivery/incoming-delivery-line'
27
+ export const OUTGOING_DELIVERY = 'delivery/outgoing-delivery'
28
+ export const OUTGOING_DELIVERY_LINE = 'delivery/outgoing-delivery-line'
29
+ export const INTERNAL_DELIVERY = 'delivery/internal-delivery'
30
+ export const INTERNAL_DELIVERY_LINE = 'delivery/internal-delivery-line'
31
+
32
+ // Finance
33
+ export const INVOICE = 'invoice'
34
+ export const INVOICE_LINE = 'invoice/invoice-line'
35
+ export const EXPENSE = 'expense'
36
+ export const EXPENSE_LINE = 'expense/expense-line'
37
+ export const PAYMENT = 'accounting/payment'
38
+ export const INCOMING_PAYMENT_METHOD = 'accounting/incoming-payment-method'
39
+ export const FIXED_ASSET = 'fixed-asset'
40
+
41
+ // ECommerce
42
+ export const STORE = 'store'
43
+ export const STORE_PRODUCT = 'store/store-product'
44
+ export const STORE_PRODUCT_GROUP = 'store/store-product-group'
45
+ export const STORE_PRODUCT_ATTRIBUTE = 'store/store-product-attribute'
46
+ export const STORE_PRODUCT_ATTRIBUTE_VALUE = 'store/store-product-attribute-value'
47
+
48
+ // Accounting
49
+ export const ACCOUNT = 'accounting/account';
50
+ export const JOURNAL_ENTRY = 'accounting/journal-entry';
51
+ export const JOURNAL_ENTRY_LINE = 'accounting/journal-entry-line';
52
+
53
+ // Manufacturing
54
+ export const BILL_OF_MATERIALS = 'manufacturing/bill-of-materials'
55
+ export const BOM_COMPONENT = 'manufacturing/bom-component'
56
+ export const BOM_OPERATION = 'manufacturing/bom-operation'
57
+ export const PRODUCTION_ORDER = 'manufacturing/production-order'
58
+ export const PRODUCTION_ORDER_LINE = 'manufacturing/production-order-line'
59
+
60
+ export const SUBSIDIARY = 'subsidiary'
61
+
62
+ // HR
63
+ export const EMPLOYEE = 'human-resources/employee'
64
+ export const ATTENDANCE = 'human-resources/attendance'
65
+
66
+ // Fleet Management
67
+ export const VEHICLE = 'fleet/vehicle'
68
+ export const DELIVERY_JOB = 'fleet/delivery-job'
69
+
70
+ // Custom Objects
71
+ export const CUSTOM_ENTITY_SCHEMA = 'custom-entity/schema'
72
+ export const CUSTOM_ENTITY_OBJECT = 'custom-entity'; // Need to add schemaName after this
73
+ export const CUSTOM_ENTITY_FIELD = 'custom-entity/field'; // Need to add schemaName after this
74
+
75
+ // Automation
76
+ export const AUTOMATION_JOB = 'automation/job'
77
+ export const AUTOMATION_SCRIPT = 'automation/script'
78
+ export const USER_ACTION = 'automation/user-action'
79
+
80
+ // IOT
81
+ export const IOT_DEVICE = 'iot/device';
82
+ export const IOT_JOB = 'iot/job';
83
+
84
+ export const STOCK_ADJUSTMENT = 'stock-adjustment'
85
+
86
+ export const PURCHASE_ORDER_APPROVER = 'approval/approver/purchase-order'
87
+ export const SALES_ORDER_APPROVER = 'approval/approver/sales-order'
88
+
89
+ // Document Generation
90
+ export const CUSTOM_DOCUMENT = 'document-generator/custom-document';
91
+
92
+ export const CUSTOM_FIELD = 'custom-field'
93
+
94
+ export const AUDIT_LOG = 'audit-log'
95
+
96
+ export const COMPANY_ALIAS = 'company-alias'
97
+
98
+ export const PRINT_JOB = 'thermal-printer/print-job'
99
+
100
+ export const WORK_ORDER = 'order/sales-order?type=WORK_ORDER';
101
+
102
+ export const SERVICE_ORDER = 'order/sales-order?type=SERVICE_ORDER';
103
+
104
+ // TODO: Deprecate
105
+ export const INCOMING_SHIPMENT = 'shipment/incoming-shipment'
106
+ export const OUTGOING_SHIPMENT = 'shipment/outgoing-shipment'
107
107
  ///
package/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as axios from 'axios';
2
+ import { AxiosRequestConfig } from 'axios';
2
3
 
3
4
  declare const NOTIFICATION = "notification";
4
5
  declare const COMPANY_PERMISSION = "company-permission";
@@ -143,6 +144,7 @@ declare namespace crudEndpoints {
143
144
  export { crudEndpoints_ACCOUNT as ACCOUNT, crudEndpoints_ATTENDANCE as ATTENDANCE, crudEndpoints_AUDIT_LOG as AUDIT_LOG, crudEndpoints_AUTOMATION_JOB as AUTOMATION_JOB, crudEndpoints_AUTOMATION_SCRIPT as AUTOMATION_SCRIPT, crudEndpoints_BILL_OF_MATERIALS as BILL_OF_MATERIALS, crudEndpoints_BOM_COMPONENT as BOM_COMPONENT, crudEndpoints_BOM_OPERATION as BOM_OPERATION, crudEndpoints_COMPANY_ALIAS as COMPANY_ALIAS, crudEndpoints_COMPANY_OPTION as COMPANY_OPTION, crudEndpoints_COMPANY_PERMISSION as COMPANY_PERMISSION, crudEndpoints_CUSTOMER as CUSTOMER, crudEndpoints_CUSTOM_DOCUMENT as CUSTOM_DOCUMENT, crudEndpoints_CUSTOM_ENTITY_FIELD as CUSTOM_ENTITY_FIELD, crudEndpoints_CUSTOM_ENTITY_OBJECT as CUSTOM_ENTITY_OBJECT, crudEndpoints_CUSTOM_ENTITY_SCHEMA as CUSTOM_ENTITY_SCHEMA, crudEndpoints_CUSTOM_FIELD as CUSTOM_FIELD, crudEndpoints_DELIVERY_JOB as DELIVERY_JOB, crudEndpoints_EMPLOYEE as EMPLOYEE, crudEndpoints_EXPENSE as EXPENSE, crudEndpoints_EXPENSE_LINE as EXPENSE_LINE, crudEndpoints_FIXED_ASSET as FIXED_ASSET, crudEndpoints_INCOMING_DELIVERY as INCOMING_DELIVERY, crudEndpoints_INCOMING_DELIVERY_LINE as INCOMING_DELIVERY_LINE, crudEndpoints_INCOMING_PAYMENT_METHOD as INCOMING_PAYMENT_METHOD, crudEndpoints_INCOMING_SHIPMENT as INCOMING_SHIPMENT, crudEndpoints_INTERNAL_DELIVERY as INTERNAL_DELIVERY, crudEndpoints_INTERNAL_DELIVERY_LINE as INTERNAL_DELIVERY_LINE, crudEndpoints_INVITATION as INVITATION, crudEndpoints_INVOICE as INVOICE, crudEndpoints_INVOICE_LINE as INVOICE_LINE, crudEndpoints_IOT_DEVICE as IOT_DEVICE, crudEndpoints_IOT_JOB as IOT_JOB, crudEndpoints_JOURNAL_ENTRY as JOURNAL_ENTRY, crudEndpoints_JOURNAL_ENTRY_LINE as JOURNAL_ENTRY_LINE, crudEndpoints_NOTIFICATION as NOTIFICATION, crudEndpoints_OUTGOING_DELIVERY as OUTGOING_DELIVERY, crudEndpoints_OUTGOING_DELIVERY_LINE as OUTGOING_DELIVERY_LINE, crudEndpoints_OUTGOING_SHIPMENT as OUTGOING_SHIPMENT, crudEndpoints_PAYMENT as PAYMENT, crudEndpoints_PRINT_JOB as PRINT_JOB, crudEndpoints_PRODUCT as PRODUCT, crudEndpoints_PRODUCTION_ORDER as PRODUCTION_ORDER, crudEndpoints_PRODUCTION_ORDER_LINE as PRODUCTION_ORDER_LINE, crudEndpoints_PRODUCT_GROUP as PRODUCT_GROUP, crudEndpoints_PRODUCT_ITEM as PRODUCT_ITEM, crudEndpoints_PURCHASE_ORDER as PURCHASE_ORDER, crudEndpoints_PURCHASE_ORDER_APPROVER as PURCHASE_ORDER_APPROVER, crudEndpoints_PURCHASE_ORDER_LINE as PURCHASE_ORDER_LINE, crudEndpoints_QUOTE as QUOTE, crudEndpoints_QUOTE_LINE as QUOTE_LINE, crudEndpoints_RENTAL_ORDER as RENTAL_ORDER, crudEndpoints_RENTAL_ORDER_LINE as RENTAL_ORDER_LINE, crudEndpoints_SALES_ORDER as SALES_ORDER, crudEndpoints_SALES_ORDER_APPROVER as SALES_ORDER_APPROVER, crudEndpoints_SALES_ORDER_LINE as SALES_ORDER_LINE, crudEndpoints_SERVICE_ORDER as SERVICE_ORDER, crudEndpoints_STOCK_ADJUSTMENT as STOCK_ADJUSTMENT, crudEndpoints_STORE as STORE, crudEndpoints_STORE_PRODUCT as STORE_PRODUCT, crudEndpoints_STORE_PRODUCT_ATTRIBUTE as STORE_PRODUCT_ATTRIBUTE, crudEndpoints_STORE_PRODUCT_ATTRIBUTE_VALUE as STORE_PRODUCT_ATTRIBUTE_VALUE, crudEndpoints_STORE_PRODUCT_GROUP as STORE_PRODUCT_GROUP, crudEndpoints_SUBSIDIARY as SUBSIDIARY, crudEndpoints_SUPPLIER as SUPPLIER, crudEndpoints_USER_ACTION as USER_ACTION, crudEndpoints_VEHICLE as VEHICLE, crudEndpoints_WAREHOUSE as WAREHOUSE, crudEndpoints_WORK_ORDER as WORK_ORDER };
144
145
  }
145
146
 
147
+ declare function call(axiosRequest: AxiosRequestConfig): Promise<axios.AxiosResponse<any, any>>;
146
148
  declare function getAllCustomObjects(schemaName: string, queryParams?: any): Promise<any>;
147
149
  declare function getCustomObjectById(schemaName: string, id: string): Promise<any>;
148
150
  declare function updateCustomObject(schemaName: string, id: string, newData: any): Promise<any>;
@@ -169,6 +171,7 @@ declare const konversiAPI: {
169
171
  createObject: typeof createObject;
170
172
  deleteObject: typeof deleteObject;
171
173
  runScript: typeof runScript;
174
+ call: typeof call;
172
175
  baseUrl: string | undefined;
173
176
  token: string;
174
177
  companyId: axios.AxiosHeaderValue | undefined;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as axios from 'axios';
2
+ import { AxiosRequestConfig } from 'axios';
2
3
 
3
4
  declare const NOTIFICATION = "notification";
4
5
  declare const COMPANY_PERMISSION = "company-permission";
@@ -143,6 +144,7 @@ declare namespace crudEndpoints {
143
144
  export { crudEndpoints_ACCOUNT as ACCOUNT, crudEndpoints_ATTENDANCE as ATTENDANCE, crudEndpoints_AUDIT_LOG as AUDIT_LOG, crudEndpoints_AUTOMATION_JOB as AUTOMATION_JOB, crudEndpoints_AUTOMATION_SCRIPT as AUTOMATION_SCRIPT, crudEndpoints_BILL_OF_MATERIALS as BILL_OF_MATERIALS, crudEndpoints_BOM_COMPONENT as BOM_COMPONENT, crudEndpoints_BOM_OPERATION as BOM_OPERATION, crudEndpoints_COMPANY_ALIAS as COMPANY_ALIAS, crudEndpoints_COMPANY_OPTION as COMPANY_OPTION, crudEndpoints_COMPANY_PERMISSION as COMPANY_PERMISSION, crudEndpoints_CUSTOMER as CUSTOMER, crudEndpoints_CUSTOM_DOCUMENT as CUSTOM_DOCUMENT, crudEndpoints_CUSTOM_ENTITY_FIELD as CUSTOM_ENTITY_FIELD, crudEndpoints_CUSTOM_ENTITY_OBJECT as CUSTOM_ENTITY_OBJECT, crudEndpoints_CUSTOM_ENTITY_SCHEMA as CUSTOM_ENTITY_SCHEMA, crudEndpoints_CUSTOM_FIELD as CUSTOM_FIELD, crudEndpoints_DELIVERY_JOB as DELIVERY_JOB, crudEndpoints_EMPLOYEE as EMPLOYEE, crudEndpoints_EXPENSE as EXPENSE, crudEndpoints_EXPENSE_LINE as EXPENSE_LINE, crudEndpoints_FIXED_ASSET as FIXED_ASSET, crudEndpoints_INCOMING_DELIVERY as INCOMING_DELIVERY, crudEndpoints_INCOMING_DELIVERY_LINE as INCOMING_DELIVERY_LINE, crudEndpoints_INCOMING_PAYMENT_METHOD as INCOMING_PAYMENT_METHOD, crudEndpoints_INCOMING_SHIPMENT as INCOMING_SHIPMENT, crudEndpoints_INTERNAL_DELIVERY as INTERNAL_DELIVERY, crudEndpoints_INTERNAL_DELIVERY_LINE as INTERNAL_DELIVERY_LINE, crudEndpoints_INVITATION as INVITATION, crudEndpoints_INVOICE as INVOICE, crudEndpoints_INVOICE_LINE as INVOICE_LINE, crudEndpoints_IOT_DEVICE as IOT_DEVICE, crudEndpoints_IOT_JOB as IOT_JOB, crudEndpoints_JOURNAL_ENTRY as JOURNAL_ENTRY, crudEndpoints_JOURNAL_ENTRY_LINE as JOURNAL_ENTRY_LINE, crudEndpoints_NOTIFICATION as NOTIFICATION, crudEndpoints_OUTGOING_DELIVERY as OUTGOING_DELIVERY, crudEndpoints_OUTGOING_DELIVERY_LINE as OUTGOING_DELIVERY_LINE, crudEndpoints_OUTGOING_SHIPMENT as OUTGOING_SHIPMENT, crudEndpoints_PAYMENT as PAYMENT, crudEndpoints_PRINT_JOB as PRINT_JOB, crudEndpoints_PRODUCT as PRODUCT, crudEndpoints_PRODUCTION_ORDER as PRODUCTION_ORDER, crudEndpoints_PRODUCTION_ORDER_LINE as PRODUCTION_ORDER_LINE, crudEndpoints_PRODUCT_GROUP as PRODUCT_GROUP, crudEndpoints_PRODUCT_ITEM as PRODUCT_ITEM, crudEndpoints_PURCHASE_ORDER as PURCHASE_ORDER, crudEndpoints_PURCHASE_ORDER_APPROVER as PURCHASE_ORDER_APPROVER, crudEndpoints_PURCHASE_ORDER_LINE as PURCHASE_ORDER_LINE, crudEndpoints_QUOTE as QUOTE, crudEndpoints_QUOTE_LINE as QUOTE_LINE, crudEndpoints_RENTAL_ORDER as RENTAL_ORDER, crudEndpoints_RENTAL_ORDER_LINE as RENTAL_ORDER_LINE, crudEndpoints_SALES_ORDER as SALES_ORDER, crudEndpoints_SALES_ORDER_APPROVER as SALES_ORDER_APPROVER, crudEndpoints_SALES_ORDER_LINE as SALES_ORDER_LINE, crudEndpoints_SERVICE_ORDER as SERVICE_ORDER, crudEndpoints_STOCK_ADJUSTMENT as STOCK_ADJUSTMENT, crudEndpoints_STORE as STORE, crudEndpoints_STORE_PRODUCT as STORE_PRODUCT, crudEndpoints_STORE_PRODUCT_ATTRIBUTE as STORE_PRODUCT_ATTRIBUTE, crudEndpoints_STORE_PRODUCT_ATTRIBUTE_VALUE as STORE_PRODUCT_ATTRIBUTE_VALUE, crudEndpoints_STORE_PRODUCT_GROUP as STORE_PRODUCT_GROUP, crudEndpoints_SUBSIDIARY as SUBSIDIARY, crudEndpoints_SUPPLIER as SUPPLIER, crudEndpoints_USER_ACTION as USER_ACTION, crudEndpoints_VEHICLE as VEHICLE, crudEndpoints_WAREHOUSE as WAREHOUSE, crudEndpoints_WORK_ORDER as WORK_ORDER };
144
145
  }
145
146
 
147
+ declare function call(axiosRequest: AxiosRequestConfig): Promise<axios.AxiosResponse<any, any>>;
146
148
  declare function getAllCustomObjects(schemaName: string, queryParams?: any): Promise<any>;
147
149
  declare function getCustomObjectById(schemaName: string, id: string): Promise<any>;
148
150
  declare function updateCustomObject(schemaName: string, id: string, newData: any): Promise<any>;
@@ -169,6 +171,7 @@ declare const konversiAPI: {
169
171
  createObject: typeof createObject;
170
172
  deleteObject: typeof deleteObject;
171
173
  runScript: typeof runScript;
174
+ call: typeof call;
172
175
  baseUrl: string | undefined;
173
176
  token: string;
174
177
  companyId: axios.AxiosHeaderValue | undefined;
package/dist/index.js CHANGED
@@ -58,8 +58,8 @@ module.exports = __toCommonJS(konversi_client_exports);
58
58
 
59
59
  // axiosAPI.ts
60
60
  var import_axios = __toESM(require("axios"));
61
- var baseURL = "https://us.api.konversi.net/api";
62
- var timeout = 3e4;
61
+ var baseURL = "https://api.konversi.id/api";
62
+ var timeout = 12e4;
63
63
  var instance = import_axios.default.create({
64
64
  baseURL,
65
65
  timeout
@@ -219,6 +219,11 @@ var INCOMING_SHIPMENT = "shipment/incoming-shipment";
219
219
  var OUTGOING_SHIPMENT = "shipment/outgoing-shipment";
220
220
 
221
221
  // index.ts
222
+ function call(axiosRequest) {
223
+ return __async(this, null, function* () {
224
+ return yield axiosAPI_default.request(axiosRequest);
225
+ });
226
+ }
222
227
  function getAllCustomObjects(_0) {
223
228
  return __async(this, arguments, function* (schemaName, queryParams = {}) {
224
229
  const response = yield axiosAPI_default.request({
@@ -329,6 +334,7 @@ var konversiAPI = {
329
334
  createObject,
330
335
  deleteObject,
331
336
  runScript,
337
+ call,
332
338
  baseUrl: axiosAPI_default.defaults.baseURL,
333
339
  token: ((_a = axiosAPI_default.defaults.headers.common["Authorization"]) == null ? void 0 : _a.toString().split(" ")[1]) || "",
334
340
  companyId: axiosAPI_default.defaults.headers.common["Company"]
package/dist/index.mjs CHANGED
@@ -26,8 +26,8 @@ var __async = (__this, __arguments, generator) => {
26
26
 
27
27
  // axiosAPI.ts
28
28
  import axios from "axios";
29
- var baseURL = "https://us.api.konversi.net/api";
30
- var timeout = 3e4;
29
+ var baseURL = "https://api.konversi.id/api";
30
+ var timeout = 12e4;
31
31
  var instance = axios.create({
32
32
  baseURL,
33
33
  timeout
@@ -187,6 +187,11 @@ var INCOMING_SHIPMENT = "shipment/incoming-shipment";
187
187
  var OUTGOING_SHIPMENT = "shipment/outgoing-shipment";
188
188
 
189
189
  // index.ts
190
+ function call(axiosRequest) {
191
+ return __async(this, null, function* () {
192
+ return yield axiosAPI_default.request(axiosRequest);
193
+ });
194
+ }
190
195
  function getAllCustomObjects(_0) {
191
196
  return __async(this, arguments, function* (schemaName, queryParams = {}) {
192
197
  const response = yield axiosAPI_default.request({
@@ -297,6 +302,7 @@ var konversiAPI = {
297
302
  createObject,
298
303
  deleteObject,
299
304
  runScript,
305
+ call,
300
306
  baseUrl: axiosAPI_default.defaults.baseURL,
301
307
  token: ((_a = axiosAPI_default.defaults.headers.common["Authorization"]) == null ? void 0 : _a.toString().split(" ")[1]) || "",
302
308
  companyId: axiosAPI_default.defaults.headers.common["Company"]
package/index.ts CHANGED
@@ -1,121 +1,128 @@
1
- import axiosAPI, { setAuthToken, setBaseUrl, setCompanyId } from "./axiosAPI";
2
-
3
- import * as crudEndpoints from "./crudEndpoints";
4
-
5
- async function getAllCustomObjects(schemaName: string, queryParams: any = {}) {
6
- const response = await axiosAPI.request({
7
- method: 'get',
8
- url: `custom-entity/${schemaName}`,
9
- params: queryParams
10
- })
11
- return response.data;
12
- }
13
-
14
- async function getCustomObjectById(schemaName: string, id: string) {
15
- const response = await axiosAPI.request({
16
- method: 'get',
17
- url: `custom-entity/${schemaName}/${id}`,
18
- })
19
- return response.data;
20
- }
21
-
22
- async function updateCustomObject(schemaName: string, id: string, newData: any) {
23
- const response = await axiosAPI.request({
24
- method: 'put',
25
- url: `custom-entity/${schemaName}/${id}`,
26
- headers: {
27
- 'Content-Type': 'application/json'
28
- },
29
- data: JSON.stringify(newData)
30
- })
31
- return response.data;
32
- }
33
-
34
- async function createCustomObject(schemaName: string, data: any) {
35
- const response = await axiosAPI.request({
36
- method: 'post',
37
- url: `custom-entity/${schemaName}`,
38
- data: data
39
- });
40
-
41
- return response.data;
42
- }
43
-
44
- async function deleteCustomObject(schemaName: string, id: string) {
45
- const response = await axiosAPI.request({
46
- method: 'delete',
47
- maxBodyLength: Infinity,
48
- url: `custom-entity/${schemaName}/${id}`,
49
- })
50
- return response.data;
51
- }
52
-
53
-
54
- // CRUD Base Objects
55
- async function getAllObjects(entity: any, queryParams: any = {}) {
56
- const response = await axiosAPI.get(`${entity}`, {
57
- params: queryParams
58
- })
59
- return response.data;
60
- }
61
-
62
- async function getObjectById(entity: any, id: string) {
63
- const response = await axiosAPI.get(`${entity}/${id}`)
64
- return response.data;
65
- }
66
-
67
- async function updateObject(entity: any, id: string, newData: any) {
68
- const response = await axiosAPI.put(`${entity}/${id}`, newData)
69
- return response.data;
70
- }
71
-
72
- async function createObject(entity: any, data: any) {
73
- const response = await axiosAPI.post(`${entity}`, data)
74
-
75
- return response.data;
76
- }
77
-
78
- async function deleteObject(entity: any, id: string) {
79
- const response = await axiosAPI.delete(`${entity}/${id}`)
80
-
81
- return response.data;
82
- }
83
-
84
-
85
- export async function runScript(scriptNameOrId: string, input: any, sync= false) {
86
- if (sync) {
87
- const response = await axiosAPI.post(`/automation/script/${scriptNameOrId}/run?mode=sync`, {input})
88
- return response.data;
89
- }
90
- const response = await axiosAPI.post(`/automation/script/${scriptNameOrId}/run`, {input})
91
-
92
- return response.data;
93
- }
94
-
95
- const konversiAPI = {
96
- setToken: setAuthToken,
97
- setCompanyId,
98
- setBaseUrl,
99
-
100
- getAllCustomObjects,
101
- getCustomObjectById,
102
- updateCustomObject,
103
- deleteCustomObject,
104
- createCustomObject,
105
-
106
- getAllObjects,
107
- getObjectById,
108
- updateObject,
109
- createObject,
110
- deleteObject,
111
-
112
- runScript,
113
-
114
- baseUrl: axiosAPI.defaults.baseURL,
115
- token: axiosAPI.defaults.headers.common['Authorization']?.toString().split(' ')[1] || '',
116
- companyId: axiosAPI.defaults.headers.common['Company'],
117
- }
118
-
119
- export default konversiAPI;
120
-
1
+ import { Axios, AxiosRequestConfig } from "axios";
2
+ import axiosAPI, { setAuthToken, setBaseUrl, setCompanyId } from "./axiosAPI";
3
+
4
+ import * as crudEndpoints from "./crudEndpoints";
5
+
6
+ async function call(axiosRequest: AxiosRequestConfig) {
7
+ return await axiosAPI.request(axiosRequest);
8
+ }
9
+
10
+ async function getAllCustomObjects(schemaName: string, queryParams: any = {}) {
11
+ const response = await axiosAPI.request({
12
+ method: 'get',
13
+ url: `custom-entity/${schemaName}`,
14
+ params: queryParams
15
+ })
16
+ return response.data;
17
+ }
18
+
19
+ async function getCustomObjectById(schemaName: string, id: string) {
20
+ const response = await axiosAPI.request({
21
+ method: 'get',
22
+ url: `custom-entity/${schemaName}/${id}`,
23
+ })
24
+ return response.data;
25
+ }
26
+
27
+ async function updateCustomObject(schemaName: string, id: string, newData: any) {
28
+ const response = await axiosAPI.request({
29
+ method: 'put',
30
+ url: `custom-entity/${schemaName}/${id}`,
31
+ headers: {
32
+ 'Content-Type': 'application/json'
33
+ },
34
+ data: JSON.stringify(newData)
35
+ })
36
+ return response.data;
37
+ }
38
+
39
+ async function createCustomObject(schemaName: string, data: any) {
40
+ const response = await axiosAPI.request({
41
+ method: 'post',
42
+ url: `custom-entity/${schemaName}`,
43
+ data: data
44
+ });
45
+
46
+ return response.data;
47
+ }
48
+
49
+ async function deleteCustomObject(schemaName: string, id: string) {
50
+ const response = await axiosAPI.request({
51
+ method: 'delete',
52
+ maxBodyLength: Infinity,
53
+ url: `custom-entity/${schemaName}/${id}`,
54
+ })
55
+ return response.data;
56
+ }
57
+
58
+
59
+ // CRUD Base Objects
60
+ async function getAllObjects(entity: any, queryParams: any = {}) {
61
+ const response = await axiosAPI.get(`${entity}`, {
62
+ params: queryParams
63
+ })
64
+ return response.data;
65
+ }
66
+
67
+ async function getObjectById(entity: any, id: string) {
68
+ const response = await axiosAPI.get(`${entity}/${id}`)
69
+ return response.data;
70
+ }
71
+
72
+ async function updateObject(entity: any, id: string, newData: any) {
73
+ const response = await axiosAPI.put(`${entity}/${id}`, newData)
74
+ return response.data;
75
+ }
76
+
77
+ async function createObject(entity: any, data: any) {
78
+ const response = await axiosAPI.post(`${entity}`, data)
79
+
80
+ return response.data;
81
+ }
82
+
83
+ async function deleteObject(entity: any, id: string) {
84
+ const response = await axiosAPI.delete(`${entity}/${id}`)
85
+
86
+ return response.data;
87
+ }
88
+
89
+
90
+ export async function runScript(scriptNameOrId: string, input: any, sync= false) {
91
+ if (sync) {
92
+ const response = await axiosAPI.post(`/automation/script/${scriptNameOrId}/run?mode=sync`, {input})
93
+ return response.data;
94
+ }
95
+ const response = await axiosAPI.post(`/automation/script/${scriptNameOrId}/run`, {input})
96
+
97
+ return response.data;
98
+ }
99
+
100
+ const konversiAPI = {
101
+ setToken: setAuthToken,
102
+ setCompanyId,
103
+ setBaseUrl,
104
+
105
+ getAllCustomObjects,
106
+ getCustomObjectById,
107
+ updateCustomObject,
108
+ deleteCustomObject,
109
+ createCustomObject,
110
+
111
+ getAllObjects,
112
+ getObjectById,
113
+ updateObject,
114
+ createObject,
115
+ deleteObject,
116
+
117
+ runScript,
118
+
119
+ call,
120
+
121
+ baseUrl: axiosAPI.defaults.baseURL,
122
+ token: axiosAPI.defaults.headers.common['Authorization']?.toString().split(' ')[1] || '',
123
+ companyId: axiosAPI.defaults.headers.common['Company'],
124
+ }
125
+
126
+ export default konversiAPI;
127
+
121
128
  export const Entity = crudEndpoints;
package/package.json CHANGED
@@ -1,24 +1,24 @@
1
- {
2
- "name": "@konversi/konversi-client",
3
- "version": "1.3.0",
4
- "main": "dist/index.js",
5
- "module": "dist/index.mjs",
6
- "types": "dist/index.d.ts",
7
- "scripts": {
8
- "test": "echo \"Error: no test specified\" && exit 1",
9
- "build": "tsup index.ts --format cjs,esm --dts",
10
- "lint": "tsc"
11
- },
12
- "keywords": [],
13
- "author": "",
14
- "license": "ISC",
15
- "dependencies": {
16
- "axios": "^1.6.8",
17
- "ts-node": "^10.9.2"
18
- },
19
- "description": "",
20
- "devDependencies": {
21
- "tsup": "^8.2.4",
22
- "typescript": "^5.4.5"
23
- }
24
- }
1
+ {
2
+ "name": "@konversi/konversi-client",
3
+ "version": "1.4.1",
4
+ "main": "dist/index.js",
5
+ "module": "dist/index.mjs",
6
+ "types": "dist/index.d.ts",
7
+ "keywords": [],
8
+ "author": "",
9
+ "license": "ISC",
10
+ "dependencies": {
11
+ "axios": "^1.6.8",
12
+ "ts-node": "^10.9.2"
13
+ },
14
+ "description": "",
15
+ "devDependencies": {
16
+ "tsup": "^8.2.4",
17
+ "typescript": "^5.4.5"
18
+ },
19
+ "scripts": {
20
+ "test": "echo \"Error: no test specified\" && exit 1",
21
+ "build": "tsup index.ts --format cjs,esm --dts",
22
+ "lint": "tsc"
23
+ }
24
+ }
@@ -1,20 +1,20 @@
1
- import K from '../index';
2
-
3
- async function main() {
4
- let createdObject = await K.createCustomObject('ticket', {numEntries: 100, amount: 500000, code: "TICKET-123456"})
5
- console.log(`created object`, createdObject);
6
-
7
- let allObjects = await K.getAllCustomObjects('ticket');
8
-
9
- console.log(`all objects`, allObjects);
10
-
11
- let updateResult = await K.updateCustomObject('ticket', createdObject.id, {numEntries: 200});
12
- console.log(`updated object`, updateResult);
13
-
14
- // let deleteResult = await K.deleteCustomObject('ticket', createdObject.id);
15
- // console.log(`deleted object`, deleteResult);
16
- }
17
-
18
-
19
-
1
+ import K from '../index';
2
+
3
+ async function main() {
4
+ let createdObject = await K.createCustomObject('ticket', {numEntries: 100, amount: 500000, code: "TICKET-123456"})
5
+ console.log(`created object`, createdObject);
6
+
7
+ let allObjects = await K.getAllCustomObjects('ticket');
8
+
9
+ console.log(`all objects`, allObjects);
10
+
11
+ let updateResult = await K.updateCustomObject('ticket', createdObject.id, {numEntries: 200});
12
+ console.log(`updated object`, updateResult);
13
+
14
+ // let deleteResult = await K.deleteCustomObject('ticket', createdObject.id);
15
+ // console.log(`deleted object`, deleteResult);
16
+ }
17
+
18
+
19
+
20
20
  main();
@@ -1,5 +1,5 @@
1
- import { CUSTOMER } from "../crudEndpoints";
2
- import K from "../index";
3
-
4
-
1
+ import { CUSTOMER } from "../crudEndpoints";
2
+ import K from "../index";
3
+
4
+
5
5
  K.createObject(CUSTOMER, {});
package/tsconfig.json CHANGED
@@ -1,109 +1,109 @@
1
- {
2
- "compilerOptions": {
3
- /* Visit https://aka.ms/tsconfig to read more about this file */
4
-
5
- /* Projects */
6
- // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
7
- // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8
- // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
9
- // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
10
- // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11
- // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12
-
13
- /* Language and Environment */
14
- "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
15
- // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
16
- // "jsx": "preserve", /* Specify what JSX code is generated. */
17
- // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
18
- // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
19
- // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
20
- // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
21
- // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
22
- // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
23
- // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
24
- // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
25
- // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
26
-
27
- /* Modules */
28
- "module": "commonjs", /* Specify what module code is generated. */
29
- // "rootDir": "./", /* Specify the root folder within your source files. */
30
- // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
31
- // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
32
- // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
33
- // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
34
- // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
35
- // "types": [], /* Specify type package names to be included without being referenced in a source file. */
36
- // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
37
- // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
38
- // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
39
- // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
40
- // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
41
- // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
42
- // "resolveJsonModule": true, /* Enable importing .json files. */
43
- // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
44
- // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
45
-
46
- /* JavaScript Support */
47
- // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
48
- // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
49
- // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
50
-
51
- /* Emit */
52
- // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
53
- // "declarationMap": true, /* Create sourcemaps for d.ts files. */
54
- // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
55
- // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
56
- // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
57
- // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
58
- // "outDir": "./", /* Specify an output folder for all emitted files. */
59
- // "removeComments": true, /* Disable emitting comments. */
60
- "noEmit": true, /* Disable emitting files from a compilation. */
61
- // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
62
- // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
63
- // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
64
- // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
65
- // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
66
- // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
67
- // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
68
- // "newLine": "crlf", /* Set the newline character for emitting files. */
69
- // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
70
- // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
71
- // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
72
- // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
73
- // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
74
- // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
75
-
76
- /* Interop Constraints */
77
- // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
78
- // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
79
- // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
80
- "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
81
- // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
82
- "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
83
-
84
- /* Type Checking */
85
- "strict": true, /* Enable all strict type-checking options. */
86
- // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
87
- // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
88
- // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
89
- // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
90
- // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
91
- // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
92
- // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
93
- // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
94
- // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
95
- // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
96
- // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
97
- // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
98
- // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
99
- "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
100
- // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
101
- // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
102
- // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
103
- // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
104
-
105
- /* Completeness */
106
- // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
107
- "skipLibCheck": true /* Skip type checking all .d.ts files. */
108
- }
109
- }
1
+ {
2
+ "compilerOptions": {
3
+ /* Visit https://aka.ms/tsconfig to read more about this file */
4
+
5
+ /* Projects */
6
+ // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
7
+ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8
+ // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
9
+ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
10
+ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11
+ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12
+
13
+ /* Language and Environment */
14
+ "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
15
+ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
16
+ // "jsx": "preserve", /* Specify what JSX code is generated. */
17
+ // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
18
+ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
19
+ // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
20
+ // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
21
+ // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
22
+ // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
23
+ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
24
+ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
25
+ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
26
+
27
+ /* Modules */
28
+ "module": "commonjs", /* Specify what module code is generated. */
29
+ // "rootDir": "./", /* Specify the root folder within your source files. */
30
+ // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
31
+ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
32
+ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
33
+ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
34
+ // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
35
+ // "types": [], /* Specify type package names to be included without being referenced in a source file. */
36
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
37
+ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
38
+ // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
39
+ // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
40
+ // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
41
+ // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
42
+ // "resolveJsonModule": true, /* Enable importing .json files. */
43
+ // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
44
+ // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
45
+
46
+ /* JavaScript Support */
47
+ // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
48
+ // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
49
+ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
50
+
51
+ /* Emit */
52
+ // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
53
+ // "declarationMap": true, /* Create sourcemaps for d.ts files. */
54
+ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
55
+ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
56
+ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
57
+ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
58
+ // "outDir": "./", /* Specify an output folder for all emitted files. */
59
+ // "removeComments": true, /* Disable emitting comments. */
60
+ "noEmit": true, /* Disable emitting files from a compilation. */
61
+ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
62
+ // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
63
+ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
64
+ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
65
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
66
+ // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
67
+ // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
68
+ // "newLine": "crlf", /* Set the newline character for emitting files. */
69
+ // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
70
+ // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
71
+ // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
72
+ // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
73
+ // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
74
+ // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
75
+
76
+ /* Interop Constraints */
77
+ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
78
+ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
79
+ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
80
+ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
81
+ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
82
+ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
83
+
84
+ /* Type Checking */
85
+ "strict": true, /* Enable all strict type-checking options. */
86
+ // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
87
+ // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
88
+ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
89
+ // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
90
+ // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
91
+ // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
92
+ // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
93
+ // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
94
+ // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
95
+ // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
96
+ // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
97
+ // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
98
+ // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
99
+ "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
100
+ // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
101
+ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
102
+ // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
103
+ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
104
+
105
+ /* Completeness */
106
+ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
107
+ "skipLibCheck": true /* Skip type checking all .d.ts files. */
108
+ }
109
+ }