@narrative.io/data-collaboration-sdk-ts 2.60.0 → 2.62.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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseApi } from "../base-api";
|
|
2
2
|
import type { ApiRecords } from "../types";
|
|
3
|
-
import type { Connection } from "./types";
|
|
3
|
+
import type { Connection, ConnectionV2 } from "./types";
|
|
4
4
|
/**
|
|
5
5
|
* Class representing the API for connections.
|
|
6
6
|
*
|
|
@@ -59,5 +59,14 @@ declare class ConnectionsApi extends BaseApi {
|
|
|
59
59
|
* @throws Will throw an error if the API call fails.
|
|
60
60
|
*/
|
|
61
61
|
deleteConnection(connectionId: string): Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* Retrieves all connections for a given account.
|
|
64
|
+
*
|
|
65
|
+
* @public
|
|
66
|
+
* @async
|
|
67
|
+
* @returns {Promise<ConnectionV2[]>} A promise that resolves to an array of connection objects.
|
|
68
|
+
* @throws Will throw an error if the API call fails.
|
|
69
|
+
*/
|
|
70
|
+
getConnectionsV2(): Promise<ConnectionV2[]>;
|
|
62
71
|
}
|
|
63
72
|
export { type Connection, ConnectionsApi };
|
|
@@ -78,5 +78,17 @@ class ConnectionsApi extends BaseApi {
|
|
|
78
78
|
const url = `${resourceName}/${connectionId}`;
|
|
79
79
|
return await this.delete(url);
|
|
80
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* Retrieves all connections for a given account.
|
|
83
|
+
*
|
|
84
|
+
* @public
|
|
85
|
+
* @async
|
|
86
|
+
* @returns {Promise<ConnectionV2[]>} A promise that resolves to an array of connection objects.
|
|
87
|
+
* @throws Will throw an error if the API call fails.
|
|
88
|
+
*/
|
|
89
|
+
async getConnectionsV2() {
|
|
90
|
+
const url = `v2/${resourceName}`;
|
|
91
|
+
return await this.get(url);
|
|
92
|
+
}
|
|
81
93
|
}
|
|
82
94
|
export { ConnectionsApi };
|
|
@@ -1,6 +1,21 @@
|
|
|
1
|
+
export type ConnectionStatus = "active" | "archived";
|
|
1
2
|
export interface Connection {
|
|
2
3
|
id: string;
|
|
3
4
|
dataset_id: number;
|
|
4
5
|
profile_id: string;
|
|
5
6
|
quick_settings: Record<string, unknown>;
|
|
7
|
+
status?: ConnectionStatus;
|
|
8
|
+
}
|
|
9
|
+
export interface ConnectionV2 extends Connection {
|
|
10
|
+
type: string;
|
|
11
|
+
app: {
|
|
12
|
+
id: number;
|
|
13
|
+
name: string;
|
|
14
|
+
};
|
|
15
|
+
created_at: string;
|
|
16
|
+
installation_id: number;
|
|
17
|
+
profile: {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
};
|
|
6
21
|
}
|
package/build/jobs/types.d.ts
CHANGED
package/build/whoami/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@narrative.io/data-collaboration-sdk-ts",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.62.0",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"repository": "github:narrative-io/data-collaboration-sdk-ts",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@babel/core": "7.28.0",
|
|
24
24
|
"@babel/preset-env": "7.28.0",
|
|
25
25
|
"@babel/preset-typescript": "7.27.1",
|
|
26
|
-
"@biomejs/biome": "2.1.
|
|
26
|
+
"@biomejs/biome": "2.1.3",
|
|
27
27
|
"@commitlint/cli": "19.8.1",
|
|
28
28
|
"@commitlint/config-conventional": "19.8.1",
|
|
29
29
|
"@types/jest": "30.0.0",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"mande": "2.0.9",
|
|
37
|
-
"zod": "4.0.
|
|
37
|
+
"zod": "4.0.14",
|
|
38
38
|
"bignumber.js": "9.3.1"
|
|
39
39
|
},
|
|
40
40
|
"overrides": {
|