@chift/chift-nodejs 1.0.9 → 1.0.10

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.
@@ -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
  };