@narrative.io/data-collaboration-sdk-ts 2.48.1 → 2.50.0

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.
@@ -157,6 +157,24 @@ export declare class DatasetApi extends BaseApi {
157
157
  * @returns {Promise<RecalculationInfo>} A promise that resolves when the operation is complete.
158
158
  */
159
159
  recalculateDatasetColumnStatistics(datasetId: number): Promise<RecalculationInfo>;
160
+ /**
161
+ * Requests a sample of records from a specified dataset by its ID.
162
+ *
163
+ * @param {number} datasetId - The ID of the dataset to request a sample from.
164
+ * @returns {Promise<void>} A Promise that resolves when the operation is complete.
165
+ * @throws {Error} If there is an issue with the request or the response.
166
+ * @memberof DatasetApi
167
+ */
168
+ requestDatasetSample(datasetId: number): Promise<void>;
169
+ /**
170
+ * Deletes a sample of a specified dataset by its ID.
171
+ *
172
+ * @param {number} datasetId - The ID of the dataset to delete the sample from.
173
+ * @returns {Promise<void>} A Promise that resolves when the operation is complete.
174
+ * @throws {Error} If there is an issue with the request or the response.
175
+ * @memberof DatasetApi
176
+ */
177
+ deleteDatasetSample(datasetId: number): Promise<void>;
160
178
  /**
161
179
  * Refreshes the materlized view for the given dataset id.
162
180
  *
@@ -194,6 +194,28 @@ export class DatasetApi extends BaseApi {
194
194
  async recalculateDatasetColumnStatistics(datasetId) {
195
195
  return await this.post(`${resourceName}/${datasetId}/column-stats/recalculate`, {});
196
196
  }
197
+ /**
198
+ * Requests a sample of records from a specified dataset by its ID.
199
+ *
200
+ * @param {number} datasetId - The ID of the dataset to request a sample from.
201
+ * @returns {Promise<void>} A Promise that resolves when the operation is complete.
202
+ * @throws {Error} If there is an issue with the request or the response.
203
+ * @memberof DatasetApi
204
+ */
205
+ async requestDatasetSample(datasetId) {
206
+ await this.post(`${resourceName}/${datasetId}/request-sample`);
207
+ }
208
+ /**
209
+ * Deletes a sample of a specified dataset by its ID.
210
+ *
211
+ * @param {number} datasetId - The ID of the dataset to delete the sample from.
212
+ * @returns {Promise<void>} A Promise that resolves when the operation is complete.
213
+ * @throws {Error} If there is an issue with the request or the response.
214
+ * @memberof DatasetApi
215
+ */
216
+ async deleteDatasetSample(datasetId) {
217
+ await this.delete(`${resourceName}/${datasetId}/sample`);
218
+ }
197
219
  /**
198
220
  * Refreshes the materlized view for the given dataset id.
199
221
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narrative.io/data-collaboration-sdk-ts",
3
- "version": "2.48.1",
3
+ "version": "2.50.0",
4
4
  "main": "build/index.js",
5
5
  "repository": "github:narrative-io/data-collaboration-sdk-ts",
6
6
  "source": "src/index.ts",