@narrative.io/data-collaboration-sdk-ts 0.16.5 → 0.17.1

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,7 +49,7 @@ export interface GetSystemAccessTokenResponse {
49
49
  export interface CreateSystemAccessTokenRequest {
50
50
  name: string;
51
51
  permissions?: Permission[];
52
- duration_days?: number;
52
+ expires_at: string;
53
53
  }
54
54
  export interface CreateSystemAccessTokenResponse {
55
55
  id: string;
@@ -59,6 +59,7 @@ export interface CreateSystemAccessTokenResponse {
59
59
  access_token: string;
60
60
  }
61
61
  export interface UpdateSystemAccessTokenRequest {
62
+ name?: string;
62
63
  permissions?: Permission[];
63
- additional_duration_days?: number;
64
+ expires_at?: string;
64
65
  }
@@ -29,6 +29,16 @@ declare class ConnectionsApi extends BaseApi {
29
29
  * @throws Will throw an error if the API call fails.
30
30
  */
31
31
  getDatasetConnections(datasetId: number): Promise<ApiRecords<Connection>>;
32
+ /**
33
+ * Retrieves all connections associated with a specific profile.
34
+ *
35
+ * @public
36
+ * @async
37
+ * @param {number} profileId - The ID of the profile to retrieve connections for.
38
+ * @returns {Promise<ApiRecords<Connection>>} A promise that resolves to an array of connection objects.
39
+ * @throws Will throw an error if the API call fails.
40
+ */
41
+ getProfileConnections(profileId: string): Promise<ApiRecords<Connection>>;
32
42
  /**
33
43
  * Creates a new connection.
34
44
  *
@@ -40,6 +40,19 @@ class ConnectionsApi extends BaseApi {
40
40
  const url = `${resourceName}?dataset_id=${datasetId}`;
41
41
  return await this.get(url);
42
42
  }
43
+ /**
44
+ * Retrieves all connections associated with a specific profile.
45
+ *
46
+ * @public
47
+ * @async
48
+ * @param {number} profileId - The ID of the profile to retrieve connections for.
49
+ * @returns {Promise<ApiRecords<Connection>>} A promise that resolves to an array of connection objects.
50
+ * @throws Will throw an error if the API call fails.
51
+ */
52
+ async getProfileConnections(profileId) {
53
+ const url = `${resourceName}?profile_id=${profileId}`;
54
+ return await this.get(url);
55
+ }
43
56
  /**
44
57
  * Creates a new connection.
45
58
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narrative.io/data-collaboration-sdk-ts",
3
- "version": "0.16.5",
3
+ "version": "0.17.1",
4
4
  "main": "build/index.js",
5
5
  "repository": "github:narrative-io/data-collaboration-sdk-ts",
6
6
  "source": "src/index.ts",