@narrative.io/data-collaboration-sdk-ts 0.0.110 → 0.0.112
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.
|
@@ -16,8 +16,11 @@ class AccessRulesApi extends BaseApi {
|
|
|
16
16
|
* console.log(rules);
|
|
17
17
|
* });
|
|
18
18
|
*/
|
|
19
|
-
async getAccessRules() {
|
|
20
|
-
|
|
19
|
+
async getAccessRules(datasetId) {
|
|
20
|
+
const resource = datasetId !== undefined
|
|
21
|
+
? `${resourceName}?dataset_id=${datasetId}`
|
|
22
|
+
: resourceName;
|
|
23
|
+
return await this.get(resource);
|
|
21
24
|
}
|
|
22
25
|
/**
|
|
23
26
|
* Deletes an access rule by ID.
|
|
@@ -118,4 +118,12 @@ export declare class DatasetApi extends BaseApi {
|
|
|
118
118
|
* @returns {Promise<RecalculationInfo>} A promise that resolves when the operation is complete.
|
|
119
119
|
*/
|
|
120
120
|
recalculateDatasetColumnStatistics(datasetId: number): Promise<RecalculationInfo>;
|
|
121
|
+
/**
|
|
122
|
+
* Deletes a specific dataset from the system.
|
|
123
|
+
* This method sends a DELETE request to the specified endpoint to remove the dataset.
|
|
124
|
+
*
|
|
125
|
+
* @param {number} datasetId - The ID of the dataset to be deleted.
|
|
126
|
+
* @returns {Promise<void>} A promise that resolves when the dataset has been successfully deleted.
|
|
127
|
+
*/
|
|
128
|
+
deleteDataset(datasetId: number): Promise<void>;
|
|
121
129
|
}
|
package/build/datasets/index.js
CHANGED
|
@@ -145,4 +145,14 @@ export class DatasetApi extends BaseApi {
|
|
|
145
145
|
async recalculateDatasetColumnStatistics(datasetId) {
|
|
146
146
|
return await this.post(`${resourceName}/${datasetId}/column-stats/recalculate`, {});
|
|
147
147
|
}
|
|
148
|
+
/**
|
|
149
|
+
* Deletes a specific dataset from the system.
|
|
150
|
+
* This method sends a DELETE request to the specified endpoint to remove the dataset.
|
|
151
|
+
*
|
|
152
|
+
* @param {number} datasetId - The ID of the dataset to be deleted.
|
|
153
|
+
* @returns {Promise<void>} A promise that resolves when the dataset has been successfully deleted.
|
|
154
|
+
*/
|
|
155
|
+
async deleteDataset(datasetId) {
|
|
156
|
+
await this.delete(`${resourceName}/${datasetId}`);
|
|
157
|
+
}
|
|
148
158
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@narrative.io/data-collaboration-sdk-ts",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.112",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"repository": "github:narrative-io/data-collaboration-sdk-ts",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@types/jest": "^29.5.0",
|
|
29
29
|
"babel-jest": "^29.4.3",
|
|
30
30
|
"eslint-config-prettier": "^9.0.0",
|
|
31
|
-
"eslint-config-standard-with-typescript": "^
|
|
31
|
+
"eslint-config-standard-with-typescript": "^38.0.0",
|
|
32
32
|
"eslint-plugin-prettier": "^5.0.0",
|
|
33
33
|
"husky": "^8.0.0",
|
|
34
34
|
"jest": "^29.4.3",
|