@gooddata/sdk-backend-tiger 11.42.0-alpha.3 → 11.42.0-alpha.4

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,4 +1,4 @@
1
- export declare const LIB_VERSION = "11.42.0-alpha.3";
1
+ export declare const LIB_VERSION = "11.42.0-alpha.4";
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";
4
4
  //# sourceMappingURL=__version.d.ts.map
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.42.0-alpha.3";
3
+ export const LIB_VERSION = "11.42.0-alpha.4";
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 +1 @@
1
- {"version":3,"file":"genAIConvertor.d.ts","sourceRoot":"","sources":["../../../src/convertors/fromBackend/genAIConvertor.ts"],"names":[],"mappings":"AAIA,OAAO,EAEH,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAK/B,KAAK,aAAa,EAErB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACH,KAAK,iBAAiB,EAEtB,KAAK,sBAAsB,EAE3B,KAAK,qBAAqB,EAE1B,KAAK,gBAAgB,EAExB,MAAM,2BAA2B,CAAC;AAmBnC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAIhE,wBAAgB,kCAAkC,CAAC,YAAY,EAAE,sBAAsB,GAAG,iBAAiB,CAS1G;AAED,wBAAgB,sCAAsC,CAClD,IA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,iBAAiB,CAS1G;AAED,wBAAgB,sCAAsC,CAClD,IAAI,EAAE,0BAA0B,EAChC,SAAS,EAAE,0BAA0B,CAAC,WAAW,CAAC,GAAG,SAAS,EAC9D,cAAc,EAAE,cAAc,EAC9B,MAAM,CAAC,EAAE,gBAAgB,EACzB,QAAQ,CAAC,EAAE,MAAM,GAClB,qBAAqB,CAevB;AAED,wBAAgB,uCAAuC,CACnD,KAAK,EAAE,0BAA0B,EAAE,EACnC,SAAS,EAAE,0BAA0B,CAAC,WAAW,CAAC,GAAG,SAAS,EAC9D,cAAc,EAAE,cAAc,EAC9B,MAAM,CAAC,EAAE,gBAAgB,EACzB,QAAQ,CAAC,EAAE,MAAM,GAClB,qBAAqB,EAAE,CAIzB;AAoHD,wBAAgB,uCAAuC,CACnD,IAAI,EAAE,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,EACrE,OAAO,CAAC,EAAE,MAAM,GACjB,sBAAsB,CAQxB;AAoFD,wBAAgB,oCAAoC,CAChD,IAAI,EAAE,aAAa,GAAG,IAAI,GAAG,SAAS,GACvC,gBAAgB,CAQlB"}
@@ -3,6 +3,7 @@ import { v4 as uuidv4 } from "uuid";
3
3
  import { yamlFiltersToDeclarative, yamlVisualisationToMetadataObject, } from "@gooddata/sdk-code-convertors";
4
4
  import { assertNever, } from "@gooddata/sdk-model";
5
5
  import { getFormatByGranularity } from "../../utils/dateUtils.js";
6
+ import { convertFilter } from "./afm/FilterConverter.js";
6
7
  import { convertMeasure } from "./afm/MeasureConverter.js";
7
8
  import { convertAttribute } from "./AttributeConvertor.js";
8
9
  import { cloneWithSanitizedIds } from "./IdSanitization.js";
@@ -69,6 +70,11 @@ function convertChatConversationContentFromBackend(content, dateNormalizer, loca
69
70
  type: "text",
70
71
  text: part.text,
71
72
  };
73
+ case "alertProposal":
74
+ return {
75
+ type: "alertProposal",
76
+ alertProposal: convertAlertProposalFrom(part.alertProposal),
77
+ };
72
78
  case "visualization":
73
79
  return {
74
80
  type: "visualization",
@@ -170,10 +176,7 @@ function convertWhatIf(whatIf) {
170
176
  label: s.label,
171
177
  adjustments: s.adjustments.map((a) => ({
172
178
  scenarioMaql: a.scenarioMaql,
173
- ref: {
174
- identifier: a.metricId,
175
- type: (a.metricType === "metric" ? "measure" : a.metricType),
176
- },
179
+ ref: buildObjRef(a.metricId, a.metricType),
177
180
  })),
178
181
  };
179
182
  }),
@@ -214,3 +217,86 @@ export function convertChatSuggestionItemFromBackend(item) {
214
217
  })),
215
218
  };
216
219
  }
220
+ function convertAlertProposalFrom(alertProposal) {
221
+ if (!alertProposal) {
222
+ return undefined;
223
+ }
224
+ return {
225
+ title: alertProposal.title,
226
+ description: (alertProposal.description ?? ""),
227
+ baseMetric: {
228
+ id: buildObjRef(alertProposal.metricId, "metric"),
229
+ title: alertProposal.metricTitle,
230
+ format: alertProposal.metricFormat,
231
+ },
232
+ ...(alertProposal.compareMetricId
233
+ ? {
234
+ compareMetric: {
235
+ id: buildObjRef(alertProposal.compareMetricId, "metric"),
236
+ title: alertProposal.compareMetricTitle,
237
+ format: alertProposal.compareMetricFormat,
238
+ },
239
+ }
240
+ : {}),
241
+ ...(alertProposal.dateDatasetId
242
+ ? {
243
+ date: {
244
+ id: buildObjRef(alertProposal.dateDatasetId, "dataset"),
245
+ title: alertProposal.dateDatasetTitle,
246
+ },
247
+ }
248
+ : {}),
249
+ ...(alertProposal.notificationChannelId
250
+ ? {
251
+ notificationChannel: {
252
+ id: buildObjRef(alertProposal.notificationChannelId, "notificationChannel"),
253
+ name: alertProposal.notificationChannelName,
254
+ },
255
+ }
256
+ : {}),
257
+ ...(alertProposal.dashboardId
258
+ ? {
259
+ dashboard: {
260
+ id: buildObjRef(alertProposal.dashboardId, "dashboard"),
261
+ title: alertProposal.dashboardTitle,
262
+ },
263
+ }
264
+ : {}),
265
+ ...(alertProposal.automationId
266
+ ? {
267
+ automation: buildObjRef(alertProposal.automationId, "automation"),
268
+ }
269
+ : {}),
270
+ ...(alertProposal.trigger || alertProposal.triggerInterval || alertProposal.cron
271
+ ? {
272
+ trigger: {
273
+ trigger: alertProposal.trigger,
274
+ interval: alertProposal.triggerInterval,
275
+ cron: alertProposal.cron,
276
+ timezone: alertProposal.timezone,
277
+ },
278
+ }
279
+ : {}),
280
+ operator: alertProposal.operator,
281
+ arithmeticOperator: alertProposal.arithmeticOperator,
282
+ threshold: alertProposal.threshold,
283
+ fromValue: alertProposal.fromValue,
284
+ toValue: alertProposal.toValue,
285
+ granularity: alertProposal.granularity,
286
+ sensitivity: alertProposal.sensitivity,
287
+ filters: alertProposal.filters?.map((f) => convertFilter(f)),
288
+ attributes: alertProposal.attributes?.map((a) => convertAttribute(a)),
289
+ recipients: alertProposal.recipients?.map((r) => ({
290
+ type: "user",
291
+ id: r.id,
292
+ name: r.label,
293
+ email: r.email,
294
+ })),
295
+ };
296
+ }
297
+ function buildObjRef(identifier, type) {
298
+ return {
299
+ identifier,
300
+ type: (type === "metric" ? "measure" : type),
301
+ };
302
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-backend-tiger",
3
- "version": "11.42.0-alpha.3",
3
+ "version": "11.42.0-alpha.4",
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.1",
36
- "@gooddata/api-client-tiger": "11.42.0-alpha.3",
37
- "@gooddata/sdk-backend-base": "11.42.0-alpha.3",
38
- "@gooddata/sdk-code-convertors": "11.42.0-alpha.3",
39
- "@gooddata/sdk-model": "11.42.0-alpha.3",
40
- "@gooddata/sdk-backend-spi": "11.42.0-alpha.3",
41
- "@gooddata/util": "11.42.0-alpha.3"
36
+ "@gooddata/api-client-tiger": "11.42.0-alpha.4",
37
+ "@gooddata/sdk-backend-spi": "11.42.0-alpha.4",
38
+ "@gooddata/sdk-backend-base": "11.42.0-alpha.4",
39
+ "@gooddata/sdk-code-convertors": "11.42.0-alpha.4",
40
+ "@gooddata/sdk-model": "11.42.0-alpha.4",
41
+ "@gooddata/util": "11.42.0-alpha.4"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@gooddata/fixtures": "3.7.0",
@@ -65,10 +65,10 @@
65
65
  "oxlint-tsgolint": "0.15.0",
66
66
  "typescript": "5.9.3",
67
67
  "vitest": "4.1.8",
68
- "@gooddata/catalog-export": "11.42.0-alpha.3",
69
- "@gooddata/eslint-config": "11.42.0-alpha.3",
70
- "@gooddata/oxlint-config": "11.42.0-alpha.3",
71
- "@gooddata/reference-workspace": "11.42.0-alpha.3"
68
+ "@gooddata/catalog-export": "11.42.0-alpha.4",
69
+ "@gooddata/eslint-config": "11.42.0-alpha.4",
70
+ "@gooddata/reference-workspace": "11.42.0-alpha.4",
71
+ "@gooddata/oxlint-config": "11.42.0-alpha.4"
72
72
  },
73
73
  "scripts": {
74
74
  "_phase:build": "npm run build",