@narrative.io/data-collaboration-sdk-ts 2.99.0 → 2.101.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,18 +1,37 @@
|
|
|
1
1
|
import { BaseApi } from "../base-api";
|
|
2
|
-
import type { ApiRecords } from "../types";
|
|
3
|
-
import type { Installation, Profile } from "./types";
|
|
2
|
+
import type { ApiRecords, ApiRecordsV2 } from "../types";
|
|
3
|
+
import type { AppCategory, CreateInstallationRequest, Installation, InstallationInfo, Profile } from "./types";
|
|
4
|
+
export interface ListInstallationsOptions {
|
|
5
|
+
appCategory?: AppCategory | AppCategory[];
|
|
6
|
+
page?: number;
|
|
7
|
+
perPage?: number;
|
|
8
|
+
}
|
|
4
9
|
/**
|
|
5
10
|
* @module InstallationsApi
|
|
6
|
-
* @description This module provides methods for
|
|
11
|
+
* @description This module provides methods for managing installations.
|
|
7
12
|
* @extends BaseApi
|
|
8
13
|
*/
|
|
9
14
|
declare class InstallationsApi extends BaseApi {
|
|
10
15
|
/**
|
|
11
|
-
*
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
* List installations for the authenticated company.
|
|
17
|
+
*/
|
|
18
|
+
getInstallations(options?: ListInstallationsOptions): Promise<ApiRecordsV2<Installation>>;
|
|
19
|
+
/**
|
|
20
|
+
* Get a single installation by ID.
|
|
21
|
+
*/
|
|
22
|
+
getInstallation(installationId: number): Promise<Installation>;
|
|
23
|
+
/**
|
|
24
|
+
* Get info about the installation associated with the current auth token.
|
|
25
|
+
*/
|
|
26
|
+
getCurrentInstallation(): Promise<InstallationInfo>;
|
|
27
|
+
/**
|
|
28
|
+
* Create a new installation for an app.
|
|
29
|
+
*/
|
|
30
|
+
createInstallation(body: CreateInstallationRequest): Promise<Installation>;
|
|
31
|
+
/**
|
|
32
|
+
* Delete an installation by ID.
|
|
14
33
|
*/
|
|
15
|
-
|
|
34
|
+
deleteInstallation(installationId: number): Promise<void>;
|
|
16
35
|
getInstallationProfiles(installationId: number): Promise<ApiRecords<Profile>>;
|
|
17
36
|
}
|
|
18
|
-
export { type Installation, InstallationsApi, type Profile };
|
|
37
|
+
export { type AppCategory, type CreateInstallationRequest, type Installation, type InstallationInfo, InstallationsApi, type Profile, };
|
|
@@ -2,23 +2,48 @@ import { BaseApi } from "../base-api";
|
|
|
2
2
|
const resourceName = "installations";
|
|
3
3
|
/**
|
|
4
4
|
* @module InstallationsApi
|
|
5
|
-
* @description This module provides methods for
|
|
5
|
+
* @description This module provides methods for managing installations.
|
|
6
6
|
* @extends BaseApi
|
|
7
7
|
*/
|
|
8
8
|
class InstallationsApi extends BaseApi {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
* @param {number} appCategory - An optional filter for app categories.
|
|
12
|
-
* @returns {Promise<ApiRecords<Installation>>} - Promise resolving with the list of installations.
|
|
10
|
+
* List installations for the authenticated company.
|
|
13
11
|
*/
|
|
14
|
-
async getInstallations(
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
async getInstallations(options = {}) {
|
|
13
|
+
const { appCategory, page, perPage } = options;
|
|
14
|
+
return await this.get(resourceName, {
|
|
15
|
+
app_category: appCategory,
|
|
16
|
+
page,
|
|
17
|
+
per_page: perPage,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Get a single installation by ID.
|
|
22
|
+
*/
|
|
23
|
+
async getInstallation(installationId) {
|
|
24
|
+
return await this.get(`${resourceName}/${installationId}`);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Get info about the installation associated with the current auth token.
|
|
28
|
+
*/
|
|
29
|
+
async getCurrentInstallation() {
|
|
30
|
+
return await this.get(`${resourceName}/whoami`);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Create a new installation for an app.
|
|
34
|
+
*/
|
|
35
|
+
async createInstallation(body) {
|
|
36
|
+
return await this.post(resourceName, body);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Delete an installation by ID.
|
|
40
|
+
*/
|
|
41
|
+
async deleteInstallation(installationId) {
|
|
42
|
+
await this.delete(`${resourceName}/${installationId}`);
|
|
18
43
|
}
|
|
19
44
|
async getInstallationProfiles(installationId) {
|
|
20
45
|
const url = `${resourceName}/${installationId}/profiles`;
|
|
21
46
|
return await this.get(url);
|
|
22
47
|
}
|
|
23
48
|
}
|
|
24
|
-
export { InstallationsApi };
|
|
49
|
+
export { InstallationsApi, };
|
|
@@ -1,16 +1,24 @@
|
|
|
1
|
+
export type AppCategory = "destination_connector";
|
|
2
|
+
export type Access = "admin" | "read" | "write" | "create" | "revise";
|
|
3
|
+
export interface Permission {
|
|
4
|
+
access: Access;
|
|
5
|
+
resource: string;
|
|
6
|
+
}
|
|
1
7
|
export interface Installation {
|
|
2
8
|
id: number;
|
|
3
9
|
app_id: number;
|
|
4
10
|
company_id: number;
|
|
5
11
|
tier_id: string;
|
|
6
|
-
permissions:
|
|
7
|
-
installation_time:
|
|
12
|
+
permissions: Permission[];
|
|
13
|
+
installation_time: string;
|
|
8
14
|
}
|
|
9
|
-
export interface
|
|
10
|
-
|
|
11
|
-
|
|
15
|
+
export interface InstallationInfo {
|
|
16
|
+
id: number;
|
|
17
|
+
}
|
|
18
|
+
export interface CreateInstallationRequest {
|
|
19
|
+
app_id: number;
|
|
20
|
+
tier_id: string;
|
|
12
21
|
}
|
|
13
|
-
type Access = "read" | "write" | "admin" | "create" | "revise";
|
|
14
22
|
export type ProfileStatus = "enabled" | "disabled" | "archived";
|
|
15
23
|
export interface Profile {
|
|
16
24
|
id: string;
|
|
@@ -18,4 +26,3 @@ export interface Profile {
|
|
|
18
26
|
description: string;
|
|
19
27
|
status: ProfileStatus;
|
|
20
28
|
}
|
|
21
|
-
export {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Model identifiers supported by the Narrative model inference API.
|
|
3
3
|
* Maps to Scala ModelInferenceRunJobInput.Model
|
|
4
4
|
*/
|
|
5
|
-
export type InferenceModel = "anthropic.claude-haiku-4.5" | "anthropic.claude-sonnet-4.5" | "anthropic.claude-opus-4.5" | "openai.gpt-oss-120b" | "openai.gpt-4.1" | "openai.o4-mini";
|
|
5
|
+
export type InferenceModel = "anthropic.claude-haiku-4.5" | "anthropic.claude-sonnet-4.5" | "anthropic.claude-sonnet-4.6" | "anthropic.claude-opus-4.5" | "anthropic.claude-opus-4.6" | "openai.gpt-oss-120b" | "openai.gpt-4.1" | "openai.o4-mini";
|
|
6
6
|
/**
|
|
7
7
|
* Message role for inference requests.
|
|
8
8
|
* Maps to Scala ModelInferenceRunJobInput.Role
|
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.101.0",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"repository": "github:narrative-io/data-collaboration-sdk-ts",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -28,19 +28,19 @@
|
|
|
28
28
|
"@babel/core": "7.29.0",
|
|
29
29
|
"@babel/preset-env": "7.29.2",
|
|
30
30
|
"@babel/preset-typescript": "7.28.5",
|
|
31
|
-
"@biomejs/biome": "2.4.
|
|
32
|
-
"@commitlint/cli": "20.5.
|
|
31
|
+
"@biomejs/biome": "2.4.13",
|
|
32
|
+
"@commitlint/cli": "20.5.2",
|
|
33
33
|
"@commitlint/config-conventional": "20.5.0",
|
|
34
34
|
"@types/jest": "30.0.0",
|
|
35
35
|
"babel-jest": "30.3.0",
|
|
36
36
|
"jest": "30.3.0",
|
|
37
|
-
"lefthook": "2.1.
|
|
37
|
+
"lefthook": "2.1.6",
|
|
38
38
|
"ts-jest": "29.4.9"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"mande": "2.0.9",
|
|
42
42
|
"zod": "4.3.6",
|
|
43
|
-
"bignumber.js": "
|
|
43
|
+
"bignumber.js": "11.0.0"
|
|
44
44
|
},
|
|
45
45
|
"overrides": {
|
|
46
46
|
"semver@<7.5.2": "7.5.2"
|