@gooddata/sdk-backend-tiger 11.40.0-alpha.2 → 11.40.0-alpha.3

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,3 +1,3 @@
1
- export declare const LIB_VERSION = "11.40.0-alpha.2";
1
+ export declare const LIB_VERSION = "11.40.0-alpha.3";
2
2
  export declare const LIB_DESCRIPTION = "GoodData Backend SPI implementation for GoodData Cloud and GoodData.CN";
3
3
  export declare const LIB_NAME = "@gooddata/sdk-backend-tiger";
package/esm/__version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // (C) 2021 GoodData Corporation
2
2
  // DO NOT CHANGE THIS FILE, IT IS RE-GENERATED ON EVERY BUILD
3
- export const LIB_VERSION = "11.40.0-alpha.2";
3
+ export const LIB_VERSION = "11.40.0-alpha.3";
4
4
  export const LIB_DESCRIPTION = "GoodData Backend SPI implementation for GoodData Cloud and GoodData.CN";
5
5
  export const LIB_NAME = "@gooddata/sdk-backend-tiger";
@@ -1,4 +1,4 @@
1
- import { type IOrganization, type IOrganizationAgentsService, type IOrganizationAutomationService, type IOrganizationExportTemplatesService, type IOrganizationGenAIService, type IOrganizationLlmEndpointsService, type IOrganizationLlmProvidersService, type IOrganizationNotificationChannelService, type IOrganizationNotificationService, type IOrganizationPermissionService, type IOrganizationSettingsService, type IOrganizationStylingService, type IOrganizationUserService, type IOrganizations, type ISecuritySettingsService } from "@gooddata/sdk-backend-spi";
1
+ import { type IOrganization, type IOrganizationAgentsService, type IOrganizationAutomationService, type IOrganizationExportTemplatesService, type IOrganizationGenAIService, type IOrganizationLlmProvidersService, type IOrganizationNotificationChannelService, type IOrganizationNotificationService, type IOrganizationPermissionService, type IOrganizationSettingsService, type IOrganizationStylingService, type IOrganizationUserService, type IOrganizations, type ISecuritySettingsService } from "@gooddata/sdk-backend-spi";
2
2
  import { type IOrganizationDescriptor, type IOrganizationDescriptorUpdate } from "@gooddata/sdk-model";
3
3
  import { type TigerAuthenticatedCallGuard } from "../../types/index.js";
4
4
  export declare class TigerOrganization implements IOrganization {
@@ -14,7 +14,6 @@ export declare class TigerOrganization implements IOrganization {
14
14
  users(): IOrganizationUserService;
15
15
  permissions(): IOrganizationPermissionService;
16
16
  notificationChannels(): IOrganizationNotificationChannelService;
17
- llmEndpoints(): IOrganizationLlmEndpointsService;
18
17
  llmProviders(): IOrganizationLlmProvidersService;
19
18
  notifications(): IOrganizationNotificationService;
20
19
  automations(): IOrganizationAutomationService;
@@ -6,7 +6,6 @@ import { OrganizationAgentsService } from "./agents.js";
6
6
  import { TigerOrganizationAutomationService } from "./automations/index.js";
7
7
  import { OrganizationExportTemplatesService } from "./exportTemplates.js";
8
8
  import { TigerOrganizationGenAIService } from "./genAI/index.js";
9
- import { OrganizationLlmEndpointsService } from "./llmEndpoints.js";
10
9
  import { OrganizationLlmProvidersService } from "./llmProviders.js";
11
10
  import { OrganizationNotificationChannelService } from "./notificationChannels.js";
12
11
  import { OrganizationNotificationService } from "./notifications.js";
@@ -121,9 +120,6 @@ export class TigerOrganization {
121
120
  notificationChannels() {
122
121
  return new OrganizationNotificationChannelService(this.authCall);
123
122
  }
124
- llmEndpoints() {
125
- return new OrganizationLlmEndpointsService(this.authCall);
126
- }
127
123
  llmProviders() {
128
124
  return new OrganizationLlmProvidersService(this.authCall);
129
125
  }
@@ -11,7 +11,7 @@ export declare class OrganizationSettingsService extends TigerSettingsService<IS
11
11
  setFormatLocale(locale: string): Promise<void>;
12
12
  setTimezone(timezone: string): Promise<void>;
13
13
  setSeparators(separators: ISeparators): Promise<void>;
14
- setActiveLlmEndpoint(endpoint: string): Promise<void>;
14
+ setActiveLlmEndpoint(): Promise<void>;
15
15
  deleteActiveLlmEndpoint(): Promise<void>;
16
16
  setActiveLlmProvider(provider: string, defaultModelId: string): Promise<void>;
17
17
  deleteActiveLlmProvider(): Promise<void>;
@@ -28,11 +28,11 @@ export class OrganizationSettingsService extends TigerSettingsService {
28
28
  async setSeparators(separators) {
29
29
  return this.setSetting("SEPARATORS", separators);
30
30
  }
31
- async setActiveLlmEndpoint(endpoint) {
32
- return this.setSetting("ACTIVE_LLM_ENDPOINT", { id: endpoint, type: "llmEndpoint" });
31
+ async setActiveLlmEndpoint() {
32
+ throw new Error("Deprecated endpoint");
33
33
  }
34
34
  async deleteActiveLlmEndpoint() {
35
- return this.deleteSettingByType("ACTIVE_LLM_ENDPOINT");
35
+ throw new Error("Deprecated endpoint");
36
36
  }
37
37
  async setActiveLlmProvider(provider, defaultModelId) {
38
38
  return this.setSetting("ACTIVE_LLM_PROVIDER", { id: provider, type: "llmProvider", defaultModelId });
@@ -21,7 +21,6 @@ const TYPE_TO_KEY_MAP = {
21
21
  organizationSetting: "organizationSetting",
22
22
  DATE_FILTER_CONFIG: "dateFilterConfig",
23
23
  AI_RATE_LIMIT: "aiRateLimit",
24
- ACTIVE_LLM_ENDPOINT: "llmEndpoint",
25
24
  ATTACHMENT_SIZE_LIMIT: "attachmentSizeLimit",
26
25
  ALLOW_UNSAFE_FLEX_CONNECT_ENDPOINTS: "allowUnsafeFlexConnectEndpoints",
27
26
  ENABLE_AUTOMATION_EVALUATION_MODE: "enableAutomationEvaluationMode",
@@ -12,7 +12,7 @@ export declare class TigerWorkspaceSettings extends TigerSettingsService<IWorksp
12
12
  setMetadataLocale(locale: string): Promise<void>;
13
13
  setFormatLocale(locale: string): Promise<void>;
14
14
  setSeparators(separators: ISeparators): Promise<void>;
15
- setActiveLlmEndpoint(endpoint: string): Promise<void>;
15
+ setActiveLlmEndpoint(): Promise<void>;
16
16
  setActiveLlmProvider(provider: string, defaultModelId: string): Promise<void>;
17
17
  setTimezone(timezone: string): Promise<void>;
18
18
  setDateFormat(dateFormat: string): Promise<void>;
@@ -41,8 +41,8 @@ export class TigerWorkspaceSettings extends TigerSettingsService {
41
41
  async setSeparators(separators) {
42
42
  return this.setSetting("SEPARATORS", separators);
43
43
  }
44
- async setActiveLlmEndpoint(endpoint) {
45
- return this.setSetting("ACTIVE_LLM_ENDPOINT", { id: endpoint, type: "llmEndpoint" });
44
+ async setActiveLlmEndpoint() {
45
+ throw new Error("Deprecated endpoint");
46
46
  }
47
47
  async setActiveLlmProvider(provider, defaultModelId) {
48
48
  return this.setSetting("ACTIVE_LLM_PROVIDER", { id: provider, type: "llmProvider", defaultModelId });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-backend-tiger",
3
- "version": "11.40.0-alpha.2",
3
+ "version": "11.40.0-alpha.3",
4
4
  "description": "GoodData Backend SPI implementation for GoodData Cloud and GoodData.CN",
5
5
  "license": "MIT",
6
6
  "author": "GoodData",
@@ -33,12 +33,12 @@
33
33
  "ts-invariant": "0.10.3",
34
34
  "tslib": "2.8.1",
35
35
  "uuid": "11.1.0",
36
- "@gooddata/api-client-tiger": "11.40.0-alpha.2",
37
- "@gooddata/sdk-backend-base": "11.40.0-alpha.2",
38
- "@gooddata/sdk-backend-spi": "11.40.0-alpha.2",
39
- "@gooddata/sdk-code-convertors": "11.40.0-alpha.2",
40
- "@gooddata/sdk-model": "11.40.0-alpha.2",
41
- "@gooddata/util": "11.40.0-alpha.2"
36
+ "@gooddata/sdk-backend-base": "11.40.0-alpha.3",
37
+ "@gooddata/api-client-tiger": "11.40.0-alpha.3",
38
+ "@gooddata/sdk-backend-spi": "11.40.0-alpha.3",
39
+ "@gooddata/sdk-code-convertors": "11.40.0-alpha.3",
40
+ "@gooddata/sdk-model": "11.40.0-alpha.3",
41
+ "@gooddata/util": "11.40.0-alpha.3"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@gooddata/fixtures": "3.3.12",
@@ -65,10 +65,10 @@
65
65
  "oxlint-tsgolint": "0.11.4",
66
66
  "typescript": "5.9.3",
67
67
  "vitest": "4.1.0",
68
- "@gooddata/catalog-export": "11.40.0-alpha.2",
69
- "@gooddata/eslint-config": "11.40.0-alpha.2",
70
- "@gooddata/oxlint-config": "11.40.0-alpha.2",
71
- "@gooddata/reference-workspace": "11.40.0-alpha.2"
68
+ "@gooddata/eslint-config": "11.40.0-alpha.3",
69
+ "@gooddata/catalog-export": "11.40.0-alpha.3",
70
+ "@gooddata/oxlint-config": "11.40.0-alpha.3",
71
+ "@gooddata/reference-workspace": "11.40.0-alpha.3"
72
72
  },
73
73
  "scripts": {
74
74
  "_phase:build": "npm run build",
@@ -1,14 +0,0 @@
1
- import { type ILlmEndpointsQuery, type IOrganizationLlmEndpointsService } from "@gooddata/sdk-backend-spi";
2
- import { type ILlmEndpointOpenAI, type LlmEndpointOpenAIPatch } from "@gooddata/sdk-model";
3
- import { type TigerAuthenticatedCallGuard } from "../../types/index.js";
4
- export declare class OrganizationLlmEndpointsService implements IOrganizationLlmEndpointsService {
5
- readonly authCall: TigerAuthenticatedCallGuard;
6
- constructor(authCall: TigerAuthenticatedCallGuard);
7
- getCount(): Promise<number>;
8
- getEndpointsQuery(): ILlmEndpointsQuery;
9
- getLlmEndpoint(id: string): Promise<ILlmEndpointOpenAI | undefined>;
10
- createLlmEndpoint(endpoint: ILlmEndpointOpenAI, token: string): Promise<ILlmEndpointOpenAI>;
11
- updateLlmEndpoint(endpoint: ILlmEndpointOpenAI, token: string): Promise<ILlmEndpointOpenAI>;
12
- patchLlmEndpoint(endpoint: LlmEndpointOpenAIPatch, token?: string): Promise<ILlmEndpointOpenAI>;
13
- deleteLlmEndpoint(id: string): Promise<void>;
14
- }
@@ -1,111 +0,0 @@
1
- // (C) 2024-2026 GoodData Corporation
2
- import { EntitiesApi_CreateEntityLlmEndpoints, EntitiesApi_DeleteEntityLlmEndpoints, EntitiesApi_GetAllEntitiesLlmEndpoints, EntitiesApi_GetEntityLlmEndpoints, EntitiesApi_PatchEntityLlmEndpoints, EntitiesApi_UpdateEntityLlmEndpoints, } from "@gooddata/api-client-tiger/endpoints/entitiesObjects";
3
- import { convertLlmEndpoint } from "../../convertors/fromBackend/llmEndpointConvertor.js";
4
- import { LlmEndpointsQuery } from "./llmEndpointsQuery.js";
5
- export class OrganizationLlmEndpointsService {
6
- authCall;
7
- constructor(authCall) {
8
- this.authCall = authCall;
9
- }
10
- getCount() {
11
- return this.authCall(async (client) => {
12
- const result = await EntitiesApi_GetAllEntitiesLlmEndpoints(client.axios, client.basePath, {
13
- size: 1,
14
- metaInclude: ["page"],
15
- });
16
- return result.data.meta?.page?.totalElements ?? 0;
17
- });
18
- }
19
- getEndpointsQuery() {
20
- return new LlmEndpointsQuery(this.authCall);
21
- }
22
- getLlmEndpoint(id) {
23
- return this.authCall(async (client) => {
24
- const result = await EntitiesApi_GetEntityLlmEndpoints(client.axios, client.basePath, { id });
25
- const endpoint = result.data?.data;
26
- if (!endpoint) {
27
- return undefined;
28
- }
29
- return convertLlmEndpoint(endpoint);
30
- });
31
- }
32
- createLlmEndpoint(endpoint, token) {
33
- return this.authCall(async (client) => {
34
- const result = await EntitiesApi_CreateEntityLlmEndpoints(client.axios, client.basePath, {
35
- jsonApiLlmEndpointInDocument: {
36
- data: {
37
- type: "llmEndpoint",
38
- id: endpoint.id,
39
- attributes: {
40
- title: endpoint.title,
41
- llmModel: endpoint.model,
42
- llmOrganization: endpoint.organization,
43
- provider: endpoint.provider,
44
- token,
45
- },
46
- },
47
- },
48
- });
49
- const createdEndpoint = result.data?.data;
50
- if (!createdEndpoint) {
51
- throw new Error("Failed to create LLM endpoint");
52
- }
53
- return convertLlmEndpoint(createdEndpoint);
54
- });
55
- }
56
- updateLlmEndpoint(endpoint, token) {
57
- return this.authCall(async (client) => {
58
- const result = await EntitiesApi_UpdateEntityLlmEndpoints(client.axios, client.basePath, {
59
- id: endpoint.id,
60
- jsonApiLlmEndpointInDocument: {
61
- data: {
62
- type: "llmEndpoint",
63
- id: endpoint.id,
64
- attributes: {
65
- title: endpoint.title,
66
- llmModel: endpoint.model,
67
- llmOrganization: endpoint.organization,
68
- provider: endpoint.provider,
69
- token,
70
- },
71
- },
72
- },
73
- });
74
- const updatedEndpoint = result.data?.data;
75
- if (!updatedEndpoint) {
76
- throw new Error("Failed to update LLM endpoint");
77
- }
78
- return convertLlmEndpoint(updatedEndpoint);
79
- });
80
- }
81
- patchLlmEndpoint(endpoint, token) {
82
- return this.authCall(async (client) => {
83
- const result = await EntitiesApi_PatchEntityLlmEndpoints(client.axios, client.basePath, {
84
- id: endpoint.id,
85
- jsonApiLlmEndpointPatchDocument: {
86
- data: {
87
- type: "llmEndpoint",
88
- id: endpoint.id,
89
- attributes: Object.fromEntries(Object.entries({
90
- title: endpoint.title,
91
- llmModel: endpoint.model,
92
- llmOrganization: endpoint.organization,
93
- provider: endpoint.provider,
94
- token,
95
- }).filter(([_, value]) => value !== undefined)),
96
- },
97
- },
98
- });
99
- const updatedEndpoint = result.data?.data;
100
- if (!updatedEndpoint) {
101
- throw new Error("Failed to update LLM endpoint");
102
- }
103
- return convertLlmEndpoint(updatedEndpoint);
104
- });
105
- }
106
- deleteLlmEndpoint(id) {
107
- return this.authCall(async (client) => {
108
- await EntitiesApi_DeleteEntityLlmEndpoints(client.axios, client.basePath, { id });
109
- });
110
- }
111
- }
@@ -1,17 +0,0 @@
1
- import { type ILlmEndpointsQuery, type ILlmEndpointsQueryResult } from "@gooddata/sdk-backend-spi";
2
- import { type ILlmEndpointOpenAI } from "@gooddata/sdk-model";
3
- import { type TigerAuthenticatedCallGuard } from "../../types/index.js";
4
- export declare class LlmEndpointsQuery implements ILlmEndpointsQuery {
5
- readonly authCall: TigerAuthenticatedCallGuard;
6
- private size;
7
- private page;
8
- private sort;
9
- private totalCount;
10
- constructor(authCall: TigerAuthenticatedCallGuard);
11
- private setTotalCount;
12
- withSize(size: number): ILlmEndpointsQuery;
13
- withPage(page: number): ILlmEndpointsQuery;
14
- withSorting(sort: string[]): ILlmEndpointsQuery;
15
- query(): Promise<ILlmEndpointsQueryResult>;
16
- queryAll(): Promise<ILlmEndpointOpenAI[]>;
17
- }
@@ -1,55 +0,0 @@
1
- // (C) 2024-2026 GoodData Corporation
2
- import { EntitiesApi_GetAllEntitiesLlmEndpoints } from "@gooddata/api-client-tiger/endpoints/entitiesObjects";
3
- import { ServerPaging } from "@gooddata/sdk-backend-base";
4
- import { convertLlmEndpoint } from "../../convertors/fromBackend/llmEndpointConvertor.js";
5
- export class LlmEndpointsQuery {
6
- authCall;
7
- size = 100;
8
- page = 0;
9
- sort = {};
10
- totalCount = undefined;
11
- constructor(authCall) {
12
- this.authCall = authCall;
13
- }
14
- setTotalCount = (value) => {
15
- this.totalCount = value;
16
- };
17
- withSize(size) {
18
- this.size = size;
19
- return this;
20
- }
21
- withPage(page) {
22
- this.page = page;
23
- return this;
24
- }
25
- withSorting(sort) {
26
- this.sort = { sort };
27
- return this;
28
- }
29
- query() {
30
- return ServerPaging.for(async ({ limit, offset }) => {
31
- /**
32
- * For backend performance reasons, we do not want to ask for paging info each time.
33
- */
34
- const metaIncludeObj = this.totalCount === undefined ? { metaInclude: ["page"] } : {};
35
- const items = await this.authCall((client) => EntitiesApi_GetAllEntitiesLlmEndpoints(client.axios, client.basePath, {
36
- ...metaIncludeObj,
37
- ...this.sort,
38
- size: limit,
39
- page: offset / limit,
40
- })).then((res) => {
41
- const data = res.data;
42
- const totalCount = data.meta?.page?.totalElements;
43
- if (!(totalCount === null || totalCount === undefined)) {
44
- this.setTotalCount(totalCount);
45
- }
46
- return data.data.map(convertLlmEndpoint);
47
- });
48
- return { items, totalCount: this.totalCount };
49
- }, this.size, this.page * this.size);
50
- }
51
- async queryAll() {
52
- const firstQuery = await this.query();
53
- return firstQuery.all();
54
- }
55
- }
@@ -1,3 +0,0 @@
1
- import { type JsonApiLlmEndpointOutWithLinks } from "@gooddata/api-client-tiger";
2
- import { type ILlmEndpointOpenAI } from "@gooddata/sdk-model";
3
- export declare function convertLlmEndpoint(endpoint: JsonApiLlmEndpointOutWithLinks): ILlmEndpointOpenAI;
@@ -1,22 +0,0 @@
1
- // (C) 2024-2026 GoodData Corporation
2
- export function convertLlmEndpoint(endpoint) {
3
- if (endpoint.attributes?.provider === "OPENAI") {
4
- return {
5
- id: endpoint.id,
6
- title: endpoint.attributes?.title,
7
- provider: "OPENAI",
8
- model: endpoint.attributes?.llmModel,
9
- organization: endpoint.attributes?.llmOrganization,
10
- };
11
- }
12
- if (endpoint.attributes?.provider === "AZURE_OPENAI") {
13
- return {
14
- id: endpoint.id,
15
- title: endpoint.attributes?.title,
16
- provider: "AZURE_OPENAI",
17
- model: endpoint.attributes?.llmModel,
18
- organization: endpoint.attributes?.llmOrganization,
19
- };
20
- }
21
- throw new Error(`Unknown llm endpoint provider: ${endpoint.attributes?.provider}`);
22
- }