@narrative.io/data-collaboration-sdk-ts 2.94.0 → 2.94.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.
- package/build/compute-pools/index.d.ts +10 -0
- package/build/compute-pools/index.js +21 -0
- package/build/compute-pools/types.d.ts +97 -0
- package/build/compute-pools/types.js +1 -0
- package/build/data-planes/index.d.ts +2 -0
- package/build/data-planes/index.js +6 -0
- package/build/data-planes/types.d.ts +11 -1
- package/build/index.d.ts +4 -1
- package/build/index.js +4 -0
- package/package.json +8 -8
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseApi } from "../base-api";
|
|
2
|
+
import type { ComputePoolResponse, CreateComputePoolRequest, ListComputePoolsParams, ListComputePoolsResponse, UpdateComputePoolRequest } from "./types";
|
|
3
|
+
export declare class ComputePoolsApi extends BaseApi {
|
|
4
|
+
private computePoolsResourcePath;
|
|
5
|
+
listComputePools(dataPlaneId: string, params?: ListComputePoolsParams): Promise<ListComputePoolsResponse>;
|
|
6
|
+
createComputePool(dataPlaneId: string, request: CreateComputePoolRequest): Promise<ComputePoolResponse>;
|
|
7
|
+
getComputePool(dataPlaneId: string, computePoolId: string): Promise<ComputePoolResponse>;
|
|
8
|
+
updateComputePool(dataPlaneId: string, computePoolId: string, request: UpdateComputePoolRequest): Promise<ComputePoolResponse>;
|
|
9
|
+
archiveComputePool(dataPlaneId: string, computePoolId: string): Promise<void>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseApi } from "../base-api";
|
|
2
|
+
export class ComputePoolsApi extends BaseApi {
|
|
3
|
+
computePoolsResourcePath(dataPlaneId) {
|
|
4
|
+
return `data-planes/${dataPlaneId}/compute-pools`;
|
|
5
|
+
}
|
|
6
|
+
async listComputePools(dataPlaneId, params) {
|
|
7
|
+
return await this.get(this.computePoolsResourcePath(dataPlaneId), params);
|
|
8
|
+
}
|
|
9
|
+
async createComputePool(dataPlaneId, request) {
|
|
10
|
+
return await this.post(this.computePoolsResourcePath(dataPlaneId), request);
|
|
11
|
+
}
|
|
12
|
+
async getComputePool(dataPlaneId, computePoolId) {
|
|
13
|
+
return await this.get(`${this.computePoolsResourcePath(dataPlaneId)}/${computePoolId}`);
|
|
14
|
+
}
|
|
15
|
+
async updateComputePool(dataPlaneId, computePoolId, request) {
|
|
16
|
+
return await this.put(`${this.computePoolsResourcePath(dataPlaneId)}/${computePoolId}`, request);
|
|
17
|
+
}
|
|
18
|
+
async archiveComputePool(dataPlaneId, computePoolId) {
|
|
19
|
+
await this.delete(`${this.computePoolsResourcePath(dataPlaneId)}/${computePoolId}`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
export type ComputePoolType = "owned" | "shared";
|
|
2
|
+
export type ComputePoolStatus = "active" | "archived";
|
|
3
|
+
export type SnowflakeWarehouseSize = "x-small" | "small" | "medium" | "large" | "x-large" | "2x-large" | "3x-large" | "4x-large" | "5x-large" | "6x-large";
|
|
4
|
+
export type SnowflakeWarehouseType = "standard" | "snowpark_optimized";
|
|
5
|
+
export type ScalingPolicy = "standard" | "economy";
|
|
6
|
+
export interface SnowflakeWarehouseExternalId {
|
|
7
|
+
type: "snowflake_warehouse";
|
|
8
|
+
name: string;
|
|
9
|
+
alias: string;
|
|
10
|
+
}
|
|
11
|
+
export type ComputePoolExternalId = SnowflakeWarehouseExternalId;
|
|
12
|
+
export interface SnowflakeWarehouseProvider {
|
|
13
|
+
type: "snowflake_warehouse";
|
|
14
|
+
size?: SnowflakeWarehouseSize;
|
|
15
|
+
warehouse_type?: SnowflakeWarehouseType;
|
|
16
|
+
auto_suspend?: number;
|
|
17
|
+
auto_resume?: boolean;
|
|
18
|
+
min_cluster_count?: number;
|
|
19
|
+
max_cluster_count?: number;
|
|
20
|
+
scaling_policy?: ScalingPolicy;
|
|
21
|
+
max_concurrency_level?: number;
|
|
22
|
+
statement_timeout_in_seconds?: number;
|
|
23
|
+
statement_queued_timeout_in_seconds?: number;
|
|
24
|
+
enable_query_acceleration?: boolean;
|
|
25
|
+
query_acceleration_max_scale_factor?: number;
|
|
26
|
+
resource_constraint?: string;
|
|
27
|
+
comment?: string;
|
|
28
|
+
}
|
|
29
|
+
export type ComputePoolProvider = SnowflakeWarehouseProvider;
|
|
30
|
+
export interface ParticipantsAll {
|
|
31
|
+
type: "all";
|
|
32
|
+
}
|
|
33
|
+
export interface ParticipantsNone {
|
|
34
|
+
type: "none";
|
|
35
|
+
}
|
|
36
|
+
export interface ParticipantsInclusion {
|
|
37
|
+
type: "inclusion";
|
|
38
|
+
company_ids: number[];
|
|
39
|
+
}
|
|
40
|
+
export type Participants = ParticipantsAll | ParticipantsNone | ParticipantsInclusion;
|
|
41
|
+
export interface ComputePoolCollaborators {
|
|
42
|
+
use: Participants;
|
|
43
|
+
}
|
|
44
|
+
export interface ComputePoolOwnedResponse {
|
|
45
|
+
type: "owned";
|
|
46
|
+
id: string;
|
|
47
|
+
company_id: number;
|
|
48
|
+
data_plane_id: string;
|
|
49
|
+
external_id: ComputePoolExternalId;
|
|
50
|
+
name: string;
|
|
51
|
+
display_name: string;
|
|
52
|
+
description?: string;
|
|
53
|
+
status: ComputePoolStatus;
|
|
54
|
+
created_at: string;
|
|
55
|
+
updated_at?: string;
|
|
56
|
+
tags: string[];
|
|
57
|
+
provider: ComputePoolProvider;
|
|
58
|
+
collaborators: ComputePoolCollaborators;
|
|
59
|
+
}
|
|
60
|
+
export interface ComputePoolSharedResponse {
|
|
61
|
+
type: "shared";
|
|
62
|
+
id: string;
|
|
63
|
+
company_id: number;
|
|
64
|
+
data_plane_id: string;
|
|
65
|
+
external_id: ComputePoolExternalId;
|
|
66
|
+
name: string;
|
|
67
|
+
display_name: string;
|
|
68
|
+
description?: string;
|
|
69
|
+
status: ComputePoolStatus;
|
|
70
|
+
created_at: string;
|
|
71
|
+
updated_at?: string;
|
|
72
|
+
tags: string[];
|
|
73
|
+
provider: ComputePoolProvider;
|
|
74
|
+
}
|
|
75
|
+
export type ComputePoolResponse = ComputePoolOwnedResponse | ComputePoolSharedResponse;
|
|
76
|
+
export interface CreateComputePoolRequest {
|
|
77
|
+
external_id: ComputePoolExternalId;
|
|
78
|
+
name: string;
|
|
79
|
+
display_name: string;
|
|
80
|
+
description?: string;
|
|
81
|
+
tags?: string[];
|
|
82
|
+
collaborators?: ComputePoolCollaborators;
|
|
83
|
+
provider: ComputePoolProvider;
|
|
84
|
+
}
|
|
85
|
+
export interface UpdateComputePoolRequest {
|
|
86
|
+
display_name?: string;
|
|
87
|
+
description?: string;
|
|
88
|
+
tags?: string[];
|
|
89
|
+
provider?: ComputePoolProvider;
|
|
90
|
+
collaborators?: ComputePoolCollaborators;
|
|
91
|
+
}
|
|
92
|
+
export interface ListComputePoolsResponse {
|
|
93
|
+
records: ComputePoolResponse[];
|
|
94
|
+
}
|
|
95
|
+
export type ListComputePoolsParams = {
|
|
96
|
+
status?: ComputePoolStatus;
|
|
97
|
+
} & Record<string, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,4 +4,6 @@ import type { DataPlane } from "./types";
|
|
|
4
4
|
export declare class DataPlaneApi extends BaseApi {
|
|
5
5
|
getDataPlanes(): Promise<ApiRecords<DataPlane>>;
|
|
6
6
|
getDataPlane(dataPlaneId: string): Promise<DataPlane>;
|
|
7
|
+
setDefaultComputePool(dataPlaneId: string, computePoolId: string): Promise<DataPlane>;
|
|
8
|
+
clearDefaultComputePool(dataPlaneId: string): Promise<void>;
|
|
7
9
|
}
|
|
@@ -7,4 +7,10 @@ export class DataPlaneApi extends BaseApi {
|
|
|
7
7
|
async getDataPlane(dataPlaneId) {
|
|
8
8
|
return await this.get(`${resourceName}/${dataPlaneId}`);
|
|
9
9
|
}
|
|
10
|
+
async setDefaultComputePool(dataPlaneId, computePoolId) {
|
|
11
|
+
return await this.put(`${resourceName}/${dataPlaneId}/default-compute-pool/${computePoolId}`, undefined);
|
|
12
|
+
}
|
|
13
|
+
async clearDefaultComputePool(dataPlaneId) {
|
|
14
|
+
await this.delete(`${resourceName}/${dataPlaneId}/default-compute-pool`);
|
|
15
|
+
}
|
|
10
16
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { ComputePoolResponse, Participants } from "../compute-pools/types";
|
|
1
2
|
export type DataPlaneType = "owned" | "shared";
|
|
2
|
-
export type DataPlaneStatus = "active" | "inactive";
|
|
3
|
+
export type DataPlaneStatus = "active" | "inactive" | "archived";
|
|
3
4
|
export type DataPlanePlatformType = "platform_snowflake" | "platform_shared_snowflake" | "platform_aws" | "platform_shared_aws";
|
|
4
5
|
export type DataPlaneRegionType = "region_aws";
|
|
5
6
|
export interface DataPlanePlatformRegion {
|
|
@@ -13,6 +14,9 @@ export interface DataPlanePlatform {
|
|
|
13
14
|
organization_name: string;
|
|
14
15
|
region: DataPlanePlatformRegion;
|
|
15
16
|
}
|
|
17
|
+
export interface DataPlaneCollaborators {
|
|
18
|
+
use: Participants;
|
|
19
|
+
}
|
|
16
20
|
export interface DataPlane {
|
|
17
21
|
type: DataPlaneType;
|
|
18
22
|
id: string;
|
|
@@ -23,4 +27,10 @@ export interface DataPlane {
|
|
|
23
27
|
platform: DataPlanePlatform;
|
|
24
28
|
status: DataPlaneStatus;
|
|
25
29
|
updated_at: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
tags?: string[];
|
|
32
|
+
last_heartbeat_at?: string;
|
|
33
|
+
default_compute_pool_id?: string;
|
|
34
|
+
compute_pools?: ComputePoolResponse[];
|
|
35
|
+
collaborators?: DataPlaneCollaborators;
|
|
26
36
|
}
|
package/build/index.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export * from "./authentication";
|
|
|
7
7
|
export * from "./base-api";
|
|
8
8
|
export * from "./collaboration-policy";
|
|
9
9
|
export * from "./company-info";
|
|
10
|
+
export * from "./compute-pools";
|
|
11
|
+
export * from "./compute-pools/types";
|
|
10
12
|
export * from "./connections";
|
|
11
13
|
export * from "./contracts";
|
|
12
14
|
export * from "./data-planes";
|
|
@@ -57,6 +59,7 @@ import { AttributeApi, AttributeApiV2 } from "./attributes";
|
|
|
57
59
|
import { AuthenticationApi } from "./authentication";
|
|
58
60
|
import { BaseApi } from "./base-api";
|
|
59
61
|
import { CompanyInfoApi } from "./company-info";
|
|
62
|
+
import { ComputePoolsApi } from "./compute-pools";
|
|
60
63
|
import { ConnectionsApi } from "./connections";
|
|
61
64
|
import { ContractsApi } from "./contracts";
|
|
62
65
|
import { DataPlaneApi } from "./data-planes";
|
|
@@ -83,6 +86,6 @@ import { WhoAmIApi } from "./whoami";
|
|
|
83
86
|
import { WorkflowsApi } from "./workflows";
|
|
84
87
|
declare class NarrativeApi extends BaseApi {
|
|
85
88
|
}
|
|
86
|
-
interface NarrativeApi extends BaseApi, HealthCheckApi, AccessTokensApi, DataPlaneApi, DatasetApi, RosettaStoneApi, AttributeApi, AttributeApiV2, PingApi, CompanyInfoApi, InstallationsApi, ConnectionsApi, UploadsApi, ResourceApi, NqlApi, DataStreamsApi, ForecastApi, ContractsApi, AuthenticationApi, MappingsApi, AccessRulesApi, AppsApi, SubscriptionsApi, JobsApi, QueriesApi, ViewsApi, ModelsApi, ModelTrainingApi, ModelInferenceApi, EncryptionMaterialApi, WhoAmIApi, WorkflowsApi {
|
|
89
|
+
interface NarrativeApi extends BaseApi, HealthCheckApi, AccessTokensApi, DataPlaneApi, DatasetApi, RosettaStoneApi, AttributeApi, AttributeApiV2, PingApi, CompanyInfoApi, InstallationsApi, ConnectionsApi, UploadsApi, ResourceApi, NqlApi, DataStreamsApi, ForecastApi, ContractsApi, AuthenticationApi, MappingsApi, AccessRulesApi, AppsApi, SubscriptionsApi, JobsApi, QueriesApi, ViewsApi, ModelsApi, ModelTrainingApi, ModelInferenceApi, EncryptionMaterialApi, WhoAmIApi, WorkflowsApi, ComputePoolsApi {
|
|
87
90
|
}
|
|
88
91
|
export { NarrativeApi };
|
package/build/index.js
CHANGED
|
@@ -7,6 +7,8 @@ export * from "./authentication";
|
|
|
7
7
|
export * from "./base-api";
|
|
8
8
|
export * from "./collaboration-policy";
|
|
9
9
|
export * from "./company-info";
|
|
10
|
+
export * from "./compute-pools";
|
|
11
|
+
export * from "./compute-pools/types";
|
|
10
12
|
export * from "./connections";
|
|
11
13
|
export * from "./contracts";
|
|
12
14
|
export * from "./data-planes";
|
|
@@ -58,6 +60,7 @@ import { AuthenticationApi } from "./authentication";
|
|
|
58
60
|
// Handle the NarrativeApi class with mixins
|
|
59
61
|
import { BaseApi } from "./base-api";
|
|
60
62
|
import { CompanyInfoApi } from "./company-info";
|
|
63
|
+
import { ComputePoolsApi } from "./compute-pools";
|
|
61
64
|
import { ConnectionsApi } from "./connections";
|
|
62
65
|
import { ContractsApi } from "./contracts";
|
|
63
66
|
import { DataPlaneApi } from "./data-planes";
|
|
@@ -118,5 +121,6 @@ applyMixins(NarrativeApi, [
|
|
|
118
121
|
EncryptionMaterialApi,
|
|
119
122
|
WhoAmIApi,
|
|
120
123
|
WorkflowsApi,
|
|
124
|
+
ComputePoolsApi,
|
|
121
125
|
]);
|
|
122
126
|
export { NarrativeApi };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@narrative.io/data-collaboration-sdk-ts",
|
|
3
|
-
"version": "2.94.
|
|
3
|
+
"version": "2.94.1",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"repository": "github:narrative-io/data-collaboration-sdk-ts",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -25,21 +25,21 @@
|
|
|
25
25
|
"author": "",
|
|
26
26
|
"license": "ISC",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@babel/core": "7.
|
|
29
|
-
"@babel/preset-env": "7.
|
|
28
|
+
"@babel/core": "7.29.0",
|
|
29
|
+
"@babel/preset-env": "7.29.0",
|
|
30
30
|
"@babel/preset-typescript": "7.28.5",
|
|
31
|
-
"@biomejs/biome": "2.3.
|
|
32
|
-
"@commitlint/cli": "20.
|
|
33
|
-
"@commitlint/config-conventional": "20.
|
|
31
|
+
"@biomejs/biome": "2.3.14",
|
|
32
|
+
"@commitlint/cli": "20.4.1",
|
|
33
|
+
"@commitlint/config-conventional": "20.4.1",
|
|
34
34
|
"@types/jest": "30.0.0",
|
|
35
35
|
"babel-jest": "30.2.0",
|
|
36
36
|
"jest": "30.2.0",
|
|
37
|
-
"lefthook": "2.0
|
|
37
|
+
"lefthook": "2.1.0",
|
|
38
38
|
"ts-jest": "29.4.6"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"mande": "2.0.9",
|
|
42
|
-
"zod": "4.3.
|
|
42
|
+
"zod": "4.3.6",
|
|
43
43
|
"bignumber.js": "9.3.1"
|
|
44
44
|
},
|
|
45
45
|
"overrides": {
|