@chift/chift-nodejs 1.0.5 → 1.0.7

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.
Files changed (70) hide show
  1. package/.github/workflows/ci.yml +38 -38
  2. package/CHANGELOG.md +22 -0
  3. package/dist/src/modules/accounting.d.ts +6 -6
  4. package/dist/src/modules/accounting.js +17 -11
  5. package/dist/src/modules/api.d.ts +1925 -27777
  6. package/dist/src/modules/consumer.d.ts +372 -70
  7. package/dist/src/modules/consumer.js +10 -0
  8. package/dist/src/modules/consumers.d.ts +1931 -396
  9. package/dist/src/modules/ecommerce.d.ts +8 -0
  10. package/dist/src/modules/ecommerce.js +28 -0
  11. package/dist/src/modules/flow.js +1 -1
  12. package/dist/src/modules/internalApi.js +10 -5
  13. package/dist/src/modules/pos.d.ts +6 -0
  14. package/dist/src/modules/pos.js +21 -0
  15. package/dist/src/modules/sync.d.ts +1552 -324
  16. package/dist/src/modules/syncs.d.ts +8 -27387
  17. package/dist/src/modules/syncs.js +10 -0
  18. package/dist/test/modules/accounting.test.js +0 -11
  19. package/dist/test/modules/ecommerce.test.js +34 -7
  20. package/dist/test/modules/pos.test.js +18 -0
  21. package/jest.config.ts +1 -1
  22. package/package.json +2 -2
  23. package/src/modules/accounting.ts +25 -13
  24. package/src/modules/api.ts +2 -2
  25. package/src/modules/consumer.ts +21 -0
  26. package/src/modules/ecommerce.ts +52 -0
  27. package/src/modules/flow.ts +1 -1
  28. package/src/modules/pos.ts +40 -0
  29. package/src/modules/sync.ts +1 -1
  30. package/src/modules/syncs.ts +34 -3
  31. package/src/types/public-api/schema.d.ts +3299 -1950
  32. package/test/modules/accounting.test.ts +0 -14
  33. package/test/modules/consumer.test.ts +1 -1
  34. package/test/modules/ecommerce.test.ts +34 -3
  35. package/test/modules/pos.test.ts +21 -0
  36. package/.eslintcache +0 -1
  37. package/coverage/clover.xml +0 -1645
  38. package/coverage/coverage-final.json +0 -19
  39. package/coverage/lcov-report/base.css +0 -224
  40. package/coverage/lcov-report/block-navigation.js +0 -87
  41. package/coverage/lcov-report/favicon.png +0 -0
  42. package/coverage/lcov-report/index.html +0 -146
  43. package/coverage/lcov-report/prettify.css +0 -1
  44. package/coverage/lcov-report/prettify.js +0 -2
  45. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  46. package/coverage/lcov-report/sorter.js +0 -196
  47. package/coverage/lcov-report/src/helpers/index.html +0 -131
  48. package/coverage/lcov-report/src/helpers/openapi.ts.html +0 -151
  49. package/coverage/lcov-report/src/helpers/settings.ts.html +0 -94
  50. package/coverage/lcov-report/src/index.html +0 -116
  51. package/coverage/lcov-report/src/index.ts.html +0 -88
  52. package/coverage/lcov-report/src/modules/accounting.ts.html +0 -1156
  53. package/coverage/lcov-report/src/modules/api.ts.html +0 -190
  54. package/coverage/lcov-report/src/modules/consumer.ts.html +0 -616
  55. package/coverage/lcov-report/src/modules/consumers.ts.html +0 -331
  56. package/coverage/lcov-report/src/modules/custom.ts.html +0 -193
  57. package/coverage/lcov-report/src/modules/datastores.ts.html +0 -142
  58. package/coverage/lcov-report/src/modules/ecommerce.ts.html +0 -331
  59. package/coverage/lcov-report/src/modules/flow.ts.html +0 -589
  60. package/coverage/lcov-report/src/modules/index.html +0 -326
  61. package/coverage/lcov-report/src/modules/integrations.ts.html +0 -151
  62. package/coverage/lcov-report/src/modules/internalApi.ts.html +0 -586
  63. package/coverage/lcov-report/src/modules/invoicing.ts.html +0 -391
  64. package/coverage/lcov-report/src/modules/pos.ts.html +0 -421
  65. package/coverage/lcov-report/src/modules/sync.ts.html +0 -316
  66. package/coverage/lcov-report/src/modules/syncs.ts.html +0 -169
  67. package/coverage/lcov-report/src/modules/webhooks.ts.html +0 -343
  68. package/coverage/lcov.info +0 -1976
  69. package/dist/test/modules/flow.test.d.ts +0 -1
  70. package/dist/test/modules/flow.test.js +0 -69
@@ -52,6 +52,10 @@ const Consumer = (internalApi, body) => {
52
52
  const { data } = yield _internalApi.get(`/consumers/${consumerId}/syncs/${syncId}`);
53
53
  return data;
54
54
  });
55
+ const enableFlow = (syncId, flowId, body) => __awaiter(void 0, void 0, void 0, function* () {
56
+ const { data } = yield _internalApi.post(`/consumers/${consumerId}/syncs/${syncId}/flows/${flowId}/enable`, body);
57
+ return data;
58
+ });
55
59
  const getDataByDataStoreName = (dataStoreName, params) => __awaiter(void 0, void 0, void 0, function* () {
56
60
  const { data } = yield _internalApi.get(`/datastores`);
57
61
  for (let i = 0; i < data.length; i++) {
@@ -81,6 +85,10 @@ const Consumer = (internalApi, body) => {
81
85
  const { data: response } = yield _internalApi.patch(`/consumers/${consumerId}/datastore/${dataStoreId}/data/${dataStoreDataId}`, data);
82
86
  return response;
83
87
  });
88
+ const deleteDataStoreData = (dataStoreId, dataStoreDataId) => __awaiter(void 0, void 0, void 0, function* () {
89
+ const { data: response } = yield _internalApi.delete(`/consumers/${consumerId}/datastore/${dataStoreId}/data/${dataStoreDataId}`);
90
+ return response;
91
+ });
84
92
  /**
85
93
  * This function is used to add logs related to a chainexecution (passed in the header)
86
94
  * INTERNAL USE only
@@ -97,6 +105,7 @@ const Consumer = (internalApi, body) => {
97
105
  createConnection,
98
106
  updateConnection,
99
107
  deleteConnection,
108
+ enableFlow,
100
109
  getSyncUrl,
101
110
  name,
102
111
  redirect_url,
@@ -112,6 +121,7 @@ const Consumer = (internalApi, body) => {
112
121
  getDataByDataStoreName,
113
122
  addDataByDataStoreName,
114
123
  updateDataStoreData,
124
+ deleteDataStoreData,
115
125
  logData,
116
126
  };
117
127
  };