@narrative.io/data-collaboration-sdk-ts 2.39.0 → 2.40.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.
@@ -49,5 +49,15 @@ declare class ConnectionsApi extends BaseApi {
49
49
  * @throws Will throw an error if the API call fails.
50
50
  */
51
51
  createConnection(newConnection: Omit<Connection, "id">): Promise<Connection>;
52
+ /**
53
+ * Deletes a connection.
54
+ *
55
+ * @public
56
+ * @async
57
+ * @param {string} connectionId - The ID of the connection to delete.
58
+ * @returns {Promise<void>} A promise that resolves when the connection is deleted.
59
+ * @throws Will throw an error if the API call fails.
60
+ */
61
+ deleteConnection(connectionId: string): Promise<void>;
52
62
  }
53
63
  export { type Connection, ConnectionsApi };
@@ -65,5 +65,18 @@ class ConnectionsApi extends BaseApi {
65
65
  async createConnection(newConnection) {
66
66
  return await this.post(resourceName, newConnection);
67
67
  }
68
+ /**
69
+ * Deletes a connection.
70
+ *
71
+ * @public
72
+ * @async
73
+ * @param {string} connectionId - The ID of the connection to delete.
74
+ * @returns {Promise<void>} A promise that resolves when the connection is deleted.
75
+ * @throws Will throw an error if the API call fails.
76
+ */
77
+ async deleteConnection(connectionId) {
78
+ const url = `${resourceName}/${connectionId}`;
79
+ return await this.delete(url);
80
+ }
68
81
  }
69
82
  export { ConnectionsApi };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narrative.io/data-collaboration-sdk-ts",
3
- "version": "2.39.0",
3
+ "version": "2.40.0",
4
4
  "main": "build/index.js",
5
5
  "repository": "github:narrative-io/data-collaboration-sdk-ts",
6
6
  "source": "src/index.ts",