@gooddata/sdk-model 11.48.0-alpha.0 → 11.48.0-alpha.2

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.
@@ -0,0 +1,171 @@
1
+ import { type DateAttributeGranularity } from "./dateGranularities.js";
2
+ /**
3
+ * Structural family of a date granularity.
4
+ *
5
+ * @remarks
6
+ * - `chronological` — sequential periods (year, quarter, month, week, date, hour, minute) and their fiscal variants.
7
+ * - `cyclical` — "X of Y" periods that repeat (month of year, day of week, …); a.k.a. generic/periodical.
8
+ *
9
+ * @alpha
10
+ */
11
+ export type GranularityFamily = "chronological" | "cyclical";
12
+ /**
13
+ * Calendar a granularity belongs to.
14
+ *
15
+ * @remarks
16
+ * - `standard` — Gregorian year/quarter/month.
17
+ * - `fiscal` — fiscal year/quarter/month (and, with custom fiscal calendars, further fiscal periods).
18
+ * - `shared` — usable under either calendar (week, date, hour, minute, and the standard-derived cyclical periods).
19
+ *
20
+ * @alpha
21
+ */
22
+ export type CalendarAffinity = "standard" | "fiscal" | "shared";
23
+ /**
24
+ * Canonical, calendar-independent metadata for a single date granularity.
25
+ *
26
+ * @remarks
27
+ * This is the single source of truth for classification, ordering and standard/fiscal relations.
28
+ * It intentionally does NOT carry i18n labels — those stay in the consuming apps, keyed off this descriptor.
29
+ *
30
+ * @alpha
31
+ */
32
+ export interface IGranularityDescriptor {
33
+ /** The canonical SDK granularity token. */
34
+ granularity: DateAttributeGranularity;
35
+ /** Structural family. */
36
+ family: GranularityFamily;
37
+ /** Which calendar the granularity belongs to. */
38
+ affinity: CalendarAffinity;
39
+ /** Whether the granularity is at the time-of-day scale (hour/minute and their cyclical forms). */
40
+ timeScale: boolean;
41
+ /**
42
+ * Canonical coarse→fine display/drill-down order. Fiscal granularities are ranked immediately after
43
+ * their standard sibling, so filtering to a single calendar reproduces each consumer's historical order.
44
+ */
45
+ order: number;
46
+ /** For cyclical granularities, the chronological granularity they are derived from (e.g. month_in_year → month). */
47
+ chronologicalOrigin?: DateAttributeGranularity;
48
+ /** Standard↔fiscal equivalent of the same period length (year↔fiscal_year, …), when one exists. */
49
+ counterpart?: DateAttributeGranularity;
50
+ /**
51
+ * Whether the granularity is offered to users by default. `false` for tokens that exist in the type/backend
52
+ * but are not surfaced in any picker today (the `GDC.time.week` alias and the EU-week cyclical variants).
53
+ * Descriptors still exist for them so classification/lookup works; they are just excluded from
54
+ * {@link getGranularities} output unless explicitly requested.
55
+ */
56
+ offeredByDefault: boolean;
57
+ }
58
+ /**
59
+ * Canonical registry of every {@link DateAttributeGranularity}.
60
+ *
61
+ * @remarks
62
+ * Keyed on the full union so that adding a new granularity to {@link DateAttributeGranularity} is a compile error
63
+ * here until its descriptor is provided — the registry is the single point that must be extended.
64
+ *
65
+ * @alpha
66
+ */
67
+ export declare const GRANULARITY_DESCRIPTORS: Record<DateAttributeGranularity, IGranularityDescriptor>;
68
+ /**
69
+ * A granularity enabled on a custom fiscal calendar (mirrors the calendar's `enabledGranularities`).
70
+ *
71
+ * @remarks
72
+ * Placeholder for the custom fiscal calendar work; consumed by the `custom` branch of {@link getGranularities}.
73
+ *
74
+ * @alpha
75
+ */
76
+ export interface IEnabledGranularity {
77
+ granularity: DateAttributeGranularity;
78
+ /** Localizable label prefix defined on the calendar (e.g. "FY", "FP"). */
79
+ prefix?: string;
80
+ /** Calendar-defined drill-down order; falls back to the registry `order` when omitted. */
81
+ order?: number;
82
+ }
83
+ /**
84
+ * Which calendar the caller is resolving granularities for.
85
+ *
86
+ * @alpha
87
+ */
88
+ export type CalendarContext = {
89
+ type: "standard";
90
+ } | {
91
+ type: "fiscal";
92
+ } | {
93
+ type: "custom";
94
+ enabledGranularities: IEnabledGranularity[];
95
+ };
96
+ /**
97
+ * Query describing which granularities to return.
98
+ *
99
+ * @alpha
100
+ */
101
+ export interface IGranularitiesQuery {
102
+ /**
103
+ * The calendar(s) to resolve granularities for. Pass a single-element array for one calendar, or several to
104
+ * get their merged, de-duplicated union in canonical order — e.g. `standard` + `fiscal` for a
105
+ * "supported/available" superset. A single custom calendar preserves its own `enabledGranularities` order;
106
+ * a merge always uses the canonical registry order.
107
+ */
108
+ calendars: CalendarContext[];
109
+ /** Structural families to include. Defaults to `["chronological"]`; pass `["cyclical"]` for generic-only. */
110
+ families?: GranularityFamily[];
111
+ /** Include time-scale granularities (hour/minute and their cyclical forms). Defaults to `true`. */
112
+ includeTime?: boolean;
113
+ /** For a fiscal/custom calendar, also include shared granularities (week/date/time/…). Defaults to `true`. */
114
+ includeShared?: boolean;
115
+ /** Include granularities that are not offered by default (`GDC.time.week`, EU-week variants). Defaults to `false`. */
116
+ includeNonDefault?: boolean;
117
+ }
118
+ /**
119
+ * Returns the descriptor for a granularity, or `undefined` if not a known {@link DateAttributeGranularity}.
120
+ *
121
+ * @alpha
122
+ */
123
+ export declare function getGranularityDescriptor(granularity: string | undefined): IGranularityDescriptor | undefined;
124
+ /**
125
+ * The single source of truth for "which date granularities apply here".
126
+ *
127
+ * @remarks
128
+ * Returns the calendar-relevant granularities in canonical coarse→fine order. Standard/fiscal chronological
129
+ * granularities come from the registry; a `custom` calendar supplies its own `enabledGranularities` (and their
130
+ * order). The result is calendar-relevant only — callers narrow it to a backend/dataset-supported subset.
131
+ *
132
+ * @alpha
133
+ */
134
+ export declare function getGranularities(query: IGranularitiesQuery): DateAttributeGranularity[];
135
+ /** @alpha */
136
+ export declare const isFiscalGranularity: (g: string | undefined) => boolean;
137
+ /** @alpha */
138
+ export declare const isStandardGranularity: (g: string | undefined) => boolean;
139
+ /** @alpha */
140
+ export declare const isSharedGranularity: (g: string | undefined) => boolean;
141
+ /**
142
+ * @remarks
143
+ * Unknown or `undefined` input returns `false` — this is NOT the negation of {@link isCyclicalGranularity},
144
+ * which also returns `false` for unknown input. Callers that want to default unknown granularities to
145
+ * chronological must handle that themselves.
146
+ *
147
+ * @alpha
148
+ */
149
+ export declare const isChronologicalGranularity: (g: string | undefined) => boolean;
150
+ /** @alpha */
151
+ export declare const isCyclicalGranularity: (g: string | undefined) => boolean;
152
+ /** @alpha */
153
+ export declare const isTimeGranularity: (g: string | undefined) => boolean;
154
+ /**
155
+ * Whether a granularity is usable under the given calendar — its own (`standard`/`fiscal`) granularities plus
156
+ * the `shared` ones (week/date/time/cyclical).
157
+ *
158
+ * @remarks
159
+ * Mirrors what a single calendar "tab" offers, so a merged result (e.g. `standard` + `fiscal`) can be split into
160
+ * standard-usable and fiscal-usable in one pass. `shared` granularities satisfy both calendars.
161
+ *
162
+ * @alpha
163
+ */
164
+ export declare const belongsToCalendar: (g: string | undefined, calendar: "fiscal" | "standard") => boolean;
165
+ /** Standard equivalent of a fiscal granularity (fiscal_year → year), if any. @alpha */
166
+ export declare const getStandardEquivalent: (g: string | undefined) => DateAttributeGranularity | undefined;
167
+ /** Fiscal equivalent of a standard granularity (year → fiscal_year), if any. @alpha */
168
+ export declare const getFiscalEquivalent: (g: string | undefined) => DateAttributeGranularity | undefined;
169
+ /** Chronological granularity a cyclical one is derived from (month_in_year → month), if any. @alpha */
170
+ export declare const getChronologicalOrigin: (g: string | undefined) => DateAttributeGranularity | undefined;
171
+ //# sourceMappingURL=granularityRegistry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"granularityRegistry.d.ts","sourceRoot":"","sources":["../../src/base/granularityRegistry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAEvE;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,GAAG,eAAe,GAAG,UAAU,CAAC;AAE7D;;;;;;;;;GASG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEhE;;;;;;;;GAQG;AACH,MAAM,WAAW,sBAAsB;IACnC,2CAA2C;IAC3C,WAAW,EAAE,wBAAwB,CAAC;IACtC,yBAAyB;IACzB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,iDAAiD;IACjD,QAAQ,EAAE,gBAA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CAAC,KAAK,EAAE,mBAAmB,GAAG,wBAAwB,EAAE,CAoEvF;AAID,aAAa;AACb,eAAO,MAAM,mBAAmB,oCACsB,CAAC;AAEvD,aAAa;AACb,eAAO,MAAM,qBAAqB,oCACsB,CAAC;AAEzD,aAAa;AACb,eAAO,MAAM,mBAAmB,oCACsB,CAAC;AAEvD;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,oCACoB,CAAC;AAE5D,aAAa;AACb,eAAO,MAAM,qBAAqB,oCACoB,CAAC;AAEvD,aAAa;AACb,eAAO,MAAM,iBAAiB,oCACqB,CAAC;AAEpD;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,qEAM7B,CAAC;AAIF,yFAAuF;AACvF,eAAO,MAAM,qBAAqB,iEAGjC,CAAC;AAEF,yFAAuF;AACvF,eAAO,MAAM,mBAAmB,iEAG/B,CAAC;AAEF,yGAAuG;AACvG,eAAO,MAAM,sBAAsB,iEACiB,CAAC"}
@@ -0,0 +1,219 @@
1
+ // (C) 2026 GoodData Corporation
2
+ const makeDescriptor = (granularity, family, affinity, order, extra = {}) => ({
3
+ granularity,
4
+ family,
5
+ affinity,
6
+ order,
7
+ timeScale: extra.timeScale ?? false,
8
+ chronologicalOrigin: extra.chronologicalOrigin,
9
+ counterpart: extra.counterpart,
10
+ offeredByDefault: extra.offeredByDefault ?? true,
11
+ });
12
+ /**
13
+ * Canonical registry of every {@link DateAttributeGranularity}.
14
+ *
15
+ * @remarks
16
+ * Keyed on the full union so that adding a new granularity to {@link DateAttributeGranularity} is a compile error
17
+ * here until its descriptor is provided — the registry is the single point that must be extended.
18
+ *
19
+ * @alpha
20
+ */
21
+ export const GRANULARITY_DESCRIPTORS = {
22
+ // chronological — standard / fiscal pairs (fiscal ranked right after its standard sibling)
23
+ "GDC.time.year": makeDescriptor("GDC.time.year", "chronological", "standard", 10, {
24
+ counterpart: "GDC.time.fiscal_year",
25
+ }),
26
+ "GDC.time.fiscal_year": makeDescriptor("GDC.time.fiscal_year", "chronological", "fiscal", 11, {
27
+ counterpart: "GDC.time.year",
28
+ }),
29
+ "GDC.time.quarter": makeDescriptor("GDC.time.quarter", "chronological", "standard", 20, {
30
+ counterpart: "GDC.time.fiscal_quarter",
31
+ }),
32
+ "GDC.time.fiscal_quarter": makeDescriptor("GDC.time.fiscal_quarter", "chronological", "fiscal", 21, {
33
+ counterpart: "GDC.time.quarter",
34
+ }),
35
+ "GDC.time.month": makeDescriptor("GDC.time.month", "chronological", "standard", 30, {
36
+ counterpart: "GDC.time.fiscal_month",
37
+ }),
38
+ "GDC.time.fiscal_month": makeDescriptor("GDC.time.fiscal_month", "chronological", "fiscal", 31, {
39
+ counterpart: "GDC.time.month",
40
+ }),
41
+ // chronological — shared
42
+ "GDC.time.week_us": makeDescriptor("GDC.time.week_us", "chronological", "shared", 40),
43
+ "GDC.time.week": makeDescriptor("GDC.time.week", "chronological", "shared", 41, {
44
+ offeredByDefault: false,
45
+ }),
46
+ "GDC.time.date": makeDescriptor("GDC.time.date", "chronological", "shared", 50),
47
+ "GDC.time.hour": makeDescriptor("GDC.time.hour", "chronological", "shared", 60, { timeScale: true }),
48
+ "GDC.time.minute": makeDescriptor("GDC.time.minute", "chronological", "shared", 70, { timeScale: true }),
49
+ // cyclical ("X of Y") — shared / standard-derived
50
+ "GDC.time.quarter_in_year": makeDescriptor("GDC.time.quarter_in_year", "cyclical", "shared", 22, {
51
+ chronologicalOrigin: "GDC.time.quarter",
52
+ }),
53
+ "GDC.time.month_in_quarter": makeDescriptor("GDC.time.month_in_quarter", "cyclical", "shared", 32, {
54
+ chronologicalOrigin: "GDC.time.month",
55
+ }),
56
+ "GDC.time.month_in_year": makeDescriptor("GDC.time.month_in_year", "cyclical", "shared", 33, {
57
+ chronologicalOrigin: "GDC.time.month",
58
+ }),
59
+ "GDC.time.week_in_quarter": makeDescriptor("GDC.time.week_in_quarter", "cyclical", "shared", 42, {
60
+ chronologicalOrigin: "GDC.time.week_us",
61
+ }),
62
+ "GDC.time.week_in_year": makeDescriptor("GDC.time.week_in_year", "cyclical", "shared", 43, {
63
+ chronologicalOrigin: "GDC.time.week_us",
64
+ }),
65
+ "GDC.time.euweek_in_quarter": makeDescriptor("GDC.time.euweek_in_quarter", "cyclical", "shared", 44, {
66
+ chronologicalOrigin: "GDC.time.week",
67
+ offeredByDefault: false,
68
+ }),
69
+ "GDC.time.euweek_in_year": makeDescriptor("GDC.time.euweek_in_year", "cyclical", "shared", 45, {
70
+ chronologicalOrigin: "GDC.time.week",
71
+ offeredByDefault: false,
72
+ }),
73
+ "GDC.time.day_in_week": makeDescriptor("GDC.time.day_in_week", "cyclical", "shared", 51, {
74
+ chronologicalOrigin: "GDC.time.date",
75
+ }),
76
+ "GDC.time.day_in_month": makeDescriptor("GDC.time.day_in_month", "cyclical", "shared", 52, {
77
+ chronologicalOrigin: "GDC.time.date",
78
+ }),
79
+ "GDC.time.day_in_quarter": makeDescriptor("GDC.time.day_in_quarter", "cyclical", "shared", 53, {
80
+ chronologicalOrigin: "GDC.time.date",
81
+ }),
82
+ "GDC.time.day_in_year": makeDescriptor("GDC.time.day_in_year", "cyclical", "shared", 54, {
83
+ chronologicalOrigin: "GDC.time.date",
84
+ }),
85
+ "GDC.time.day_in_euweek": makeDescriptor("GDC.time.day_in_euweek", "cyclical", "shared", 55, {
86
+ chronologicalOrigin: "GDC.time.date",
87
+ offeredByDefault: false,
88
+ }),
89
+ "GDC.time.hour_in_day": makeDescriptor("GDC.time.hour_in_day", "cyclical", "shared", 61, {
90
+ chronologicalOrigin: "GDC.time.hour",
91
+ timeScale: true,
92
+ }),
93
+ "GDC.time.minute_in_hour": makeDescriptor("GDC.time.minute_in_hour", "cyclical", "shared", 71, {
94
+ chronologicalOrigin: "GDC.time.minute",
95
+ timeScale: true,
96
+ }),
97
+ };
98
+ const ALL_DESCRIPTORS = Object.values(GRANULARITY_DESCRIPTORS);
99
+ const DESCRIPTOR_BY_TOKEN = new Map(ALL_DESCRIPTORS.map((desc) => [desc.granularity, desc]));
100
+ const DESCRIPTORS_BY_ORDER = [...ALL_DESCRIPTORS].sort((a, b) => a.order - b.order);
101
+ /**
102
+ * Returns the descriptor for a granularity, or `undefined` if not a known {@link DateAttributeGranularity}.
103
+ *
104
+ * @alpha
105
+ */
106
+ export function getGranularityDescriptor(granularity) {
107
+ if (!granularity) {
108
+ return undefined;
109
+ }
110
+ return DESCRIPTOR_BY_TOKEN.get(granularity);
111
+ }
112
+ /**
113
+ * The single source of truth for "which date granularities apply here".
114
+ *
115
+ * @remarks
116
+ * Returns the calendar-relevant granularities in canonical coarse→fine order. Standard/fiscal chronological
117
+ * granularities come from the registry; a `custom` calendar supplies its own `enabledGranularities` (and their
118
+ * order). The result is calendar-relevant only — callers narrow it to a backend/dataset-supported subset.
119
+ *
120
+ * @alpha
121
+ */
122
+ export function getGranularities(query) {
123
+ const families = query.families ?? ["chronological"];
124
+ const includeTime = query.includeTime ?? true;
125
+ const includeShared = query.includeShared ?? true;
126
+ const includeNonDefault = query.includeNonDefault ?? false;
127
+ const familySet = new Set(families);
128
+ const passes = (desc) => familySet.has(desc.family) &&
129
+ (includeTime || !desc.timeScale) &&
130
+ (includeNonDefault || desc.offeredByDefault);
131
+ const forCalendar = (calendar) => {
132
+ if (calendar.type === "custom") {
133
+ // Custom calendar drives its own set (its own order); shared granularities appended when requested.
134
+ // The families/includeTime gating intentionally applies to enabled granularities too: custom fiscal
135
+ // calendars define a mixture of chronological and cyclical periods, and UI callers typically need
136
+ // just one family of them.
137
+ const enabled = [...calendar.enabledGranularities]
138
+ .map((eg) => ({ eg, desc: DESCRIPTOR_BY_TOKEN.get(eg.granularity) }))
139
+ .filter((entry) => Boolean(entry.desc && passes(entry.desc)))
140
+ .sort((a, b) => (a.eg.order ?? a.desc.order) - (b.eg.order ?? b.desc.order))
141
+ .map(({ eg }) => eg.granularity);
142
+ const shared = includeShared
143
+ ? DESCRIPTORS_BY_ORDER.filter((desc) => desc.affinity === "shared" && passes(desc)).map((desc) => desc.granularity)
144
+ : [];
145
+ // Dedupe: a shared token may also be listed in enabledGranularities.
146
+ const seen = new Set();
147
+ return [...enabled, ...shared].filter((granularity) => {
148
+ if (seen.has(granularity)) {
149
+ return false;
150
+ }
151
+ seen.add(granularity);
152
+ return true;
153
+ });
154
+ }
155
+ const wantsAffinity = (affinity) => affinity === "shared"
156
+ ? calendar.type === "standard" || includeShared
157
+ : affinity === calendar.type;
158
+ return DESCRIPTORS_BY_ORDER.filter((desc) => wantsAffinity(desc.affinity) && passes(desc)).map((desc) => desc.granularity);
159
+ };
160
+ const calendars = query.calendars;
161
+ if (calendars.length === 1) {
162
+ return forCalendar(calendars[0]);
163
+ }
164
+ // Merge several calendars: de-duplicate, then emit in canonical registry order.
165
+ const selected = new Set();
166
+ for (const calendar of calendars) {
167
+ for (const granularity of forCalendar(calendar)) {
168
+ selected.add(granularity);
169
+ }
170
+ }
171
+ return DESCRIPTORS_BY_ORDER.filter((desc) => selected.has(desc.granularity)).map((desc) => desc.granularity);
172
+ }
173
+ // ---- classification predicates (registry-backed; replace the per-package copies) -------------------------
174
+ /** @alpha */
175
+ export const isFiscalGranularity = (g) => getGranularityDescriptor(g)?.affinity === "fiscal";
176
+ /** @alpha */
177
+ export const isStandardGranularity = (g) => getGranularityDescriptor(g)?.affinity === "standard";
178
+ /** @alpha */
179
+ export const isSharedGranularity = (g) => getGranularityDescriptor(g)?.affinity === "shared";
180
+ /**
181
+ * @remarks
182
+ * Unknown or `undefined` input returns `false` — this is NOT the negation of {@link isCyclicalGranularity},
183
+ * which also returns `false` for unknown input. Callers that want to default unknown granularities to
184
+ * chronological must handle that themselves.
185
+ *
186
+ * @alpha
187
+ */
188
+ export const isChronologicalGranularity = (g) => getGranularityDescriptor(g)?.family === "chronological";
189
+ /** @alpha */
190
+ export const isCyclicalGranularity = (g) => getGranularityDescriptor(g)?.family === "cyclical";
191
+ /** @alpha */
192
+ export const isTimeGranularity = (g) => getGranularityDescriptor(g)?.timeScale === true;
193
+ /**
194
+ * Whether a granularity is usable under the given calendar — its own (`standard`/`fiscal`) granularities plus
195
+ * the `shared` ones (week/date/time/cyclical).
196
+ *
197
+ * @remarks
198
+ * Mirrors what a single calendar "tab" offers, so a merged result (e.g. `standard` + `fiscal`) can be split into
199
+ * standard-usable and fiscal-usable in one pass. `shared` granularities satisfy both calendars.
200
+ *
201
+ * @alpha
202
+ */
203
+ export const belongsToCalendar = (g, calendar) => {
204
+ const affinity = getGranularityDescriptor(g)?.affinity;
205
+ return affinity === calendar || affinity === "shared";
206
+ };
207
+ // ---- relations -------------------------------------------------------------------------------------------
208
+ /** Standard equivalent of a fiscal granularity (fiscal_year → year), if any. @alpha */
209
+ export const getStandardEquivalent = (g) => {
210
+ const desc = getGranularityDescriptor(g);
211
+ return desc?.affinity === "fiscal" ? desc.counterpart : undefined;
212
+ };
213
+ /** Fiscal equivalent of a standard granularity (year → fiscal_year), if any. @alpha */
214
+ export const getFiscalEquivalent = (g) => {
215
+ const desc = getGranularityDescriptor(g);
216
+ return desc?.affinity === "standard" ? desc.counterpart : undefined;
217
+ };
218
+ /** Chronological granularity a cyclical one is derived from (month_in_year → month), if any. @alpha */
219
+ export const getChronologicalOrigin = (g) => getGranularityDescriptor(g)?.chronologicalOrigin;
@@ -62,6 +62,11 @@ export interface IDashboardExportParameter {
62
62
  * execution.
63
63
  */
64
64
  title: string;
65
+ /**
66
+ * Parameter type tag; matches the workspace parameter definition's `type`. Absent on rows
67
+ * persisted before the tag existed — those are decoded as NUMBER.
68
+ */
69
+ parameterType?: ParameterType;
65
70
  }
66
71
  /**
67
72
  * Tests whether the provided object is an instance of {@link IDashboardParameter}.
@@ -1 +1 @@
1
- {"version":3,"file":"parameter.d.ts","sourceRoot":"","sources":["../../src/dashboard/parameter.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAC7F,OAAO,EAAE,KAAK,aAAa,EAAmB,MAAM,oBAAoB,CAAC;AAEzE;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;;;;;;;;GAQG;AACH,MAAM,WAAW,mBAAmB;IAChC;;OAEG;IACH,QAAQ,CAAC,GAAG,EAAE,aAAa,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAC;IAEtC;;OAEG;IACH,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAEtC;;OAEG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC;IAEhC;;OAEG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACtC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;CACjC;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,mBAAmB,CAS7E"}
@@ -1,3 +1,4 @@
1
+ import { type IGranularitiesQuery } from "../base/granularityRegistry.js";
1
2
  import { type EmptyValues, type ILowerBoundedFilter, type IUpperBoundedFilter } from "../execution/filter/index.js";
2
3
  import { type Identifier, type ObjRef } from "../objRef/index.js";
3
4
  /**
@@ -56,6 +57,11 @@ export type DateFilterGranularity = "GDC.time.minute" | "GDC.time.hour" | "GDC.t
56
57
  * @alpha
57
58
  */
58
59
  export declare const isDateFilterGranularity: (obj: unknown) => obj is DateFilterGranularity;
60
+ /**
61
+ * Runs {@link getGranularities} and narrows the result to the {@link DateFilterGranularity} subset.
62
+ * @alpha
63
+ */
64
+ export declare const getDateFilterGranularities: (query: IGranularitiesQuery) => DateFilterGranularity[];
59
65
  /**
60
66
  * Common props for date filter options
61
67
  * @alpha
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dateFilterConfig/index.ts"],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yB,mDACmC,CAAC;AAE1E;;;GAGG;AACH,MAAM,WAAW,4BAA6B,SAAQ,iBAAiB;IACnE;;OAEG;IACH,IAAI,EAAE,+BAA+B,CAAC;IACtC;;OAEG;IACH,kBAAkB,CAAC,EAAE,WAAW,CAAC;CACpC;AAED;;;GAGG;AACH,eAAO,MAAM,6BAA6B,uDACuC,CAAC;AAElF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,kDACwC,CAAC;AAE9E;;;GAGG;AACH,eAAO,MAAM,0BAA0B,oDAC0C,CAAC;AAElF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,kDACwC,CAAC;AAE9E;;;GAGG;AACH,eAAO,MAAM,0BAA0B,oDAC0C,CAAC;AAElF;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,cAAc,EAAE,UAAU,CAAC;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,wBAAwB,CAAC;IACnC;;OAEG;IACH,WAAW,CAAC,EAAE,4BAA4B,CAAC;IAC3C;;OAEG;IACH,YAAY,CAAC,EAAE,uBAAuB,CAAC;IACvC;;OAEG;IACH,YAAY,CAAC,EAAE,uBAAuB,CAAC;IACvC;;OAEG;IACH,eAAe,CAAC,EAAE,yBAAyB,EAAE,CAAC;IAC9C;;OAEG;IACH,eAAe,CAAC,EAAE,yBAAyB,EAAE,CAAC;CACjD"}
@@ -1,5 +1,6 @@
1
1
  // (C) 2007-2026 GoodData Corporation
2
2
  import { isEmpty } from "lodash-es";
3
+ import { getGranularities } from "../base/granularityRegistry.js";
3
4
  const dateFilterGranularity = [
4
5
  "GDC.time.minute",
5
6
  "GDC.time.hour",
@@ -17,6 +18,11 @@ const dateFilterGranularity = [
17
18
  * @alpha
18
19
  */
19
20
  export const isDateFilterGranularity = (obj) => !isEmpty(obj) && dateFilterGranularity.some((granularity) => granularity === obj);
21
+ /**
22
+ * Runs {@link getGranularities} and narrows the result to the {@link DateFilterGranularity} subset.
23
+ * @alpha
24
+ */
25
+ export const getDateFilterGranularities = (query) => getGranularities(query).filter(isDateFilterGranularity);
20
26
  /**
21
27
  * Type-guard testing whether the provided object is an instance of {@link IAllTimeDateFilterOption}.
22
28
  * @alpha
@@ -123,11 +123,82 @@ export interface IGenAIDashboardContext {
123
123
  * Dashboard object reference.
124
124
  */
125
125
  ref: ObjRef;
126
+ /**
127
+ * Dashboard title.
128
+ */
129
+ title?: string;
126
130
  /**
127
131
  * Widgets currently visible on the dashboard.
128
132
  */
129
133
  widgets: IGenAIWidgetDescriptor[];
134
+ /**
135
+ * Dashboard filter bar as currently applied in the UI (live state).
136
+ */
137
+ filters?: GenAIUserContextFilter[];
138
+ }
139
+ /**
140
+ * Attribute filter in the GenAI user context (wire-aligned shape).
141
+ * @internal
142
+ */
143
+ export interface IGenAIUserContextAttributeFilter {
144
+ type: "attribute_filter";
145
+ /**
146
+ * Identifier of the label (display form) the filter uses.
147
+ */
148
+ using: string;
149
+ state: {
150
+ include?: string[];
151
+ exclude?: string[];
152
+ };
153
+ /**
154
+ * Human-readable filter title. Display-only — stripped before the request is sent.
155
+ */
156
+ title?: string;
157
+ }
158
+ /**
159
+ * Absolute date filter in the GenAI user context (wire-aligned shape).
160
+ * @internal
161
+ */
162
+ export interface IGenAIUserContextAbsoluteDateFilter {
163
+ type: "date_filter";
164
+ /**
165
+ * Identifier of the date dataset the filter uses. The dashboard's common date filter has
166
+ * no dataset ref in the filter context (it resolves per-widget), so it is omitted there;
167
+ * the backend then uses the filter for prompt context only, not for execution.
168
+ */
169
+ using?: string;
170
+ from: string;
171
+ to: string;
172
+ /**
173
+ * Human-readable filter title. Display-only — stripped before the request is sent.
174
+ */
175
+ title?: string;
176
+ }
177
+ /**
178
+ * Relative date filter in the GenAI user context (wire-aligned shape).
179
+ * @internal
180
+ */
181
+ export interface IGenAIUserContextRelativeDateFilter {
182
+ type: "date_filter";
183
+ /**
184
+ * Identifier of the date dataset the filter uses. The dashboard's common date filter has
185
+ * no dataset ref in the filter context (it resolves per-widget), so it is omitted there;
186
+ * the backend then uses the filter for prompt context only, not for execution.
187
+ */
188
+ using?: string;
189
+ granularity: GenAIDateGranularity | "WEEK_US";
190
+ from: number;
191
+ to: number;
192
+ /**
193
+ * Human-readable filter title. Display-only — stripped before the request is sent.
194
+ */
195
+ title?: string;
130
196
  }
197
+ /**
198
+ * Filter in the GenAI user context (wire-aligned shape).
199
+ * @internal
200
+ */
201
+ export type GenAIUserContextFilter = IGenAIUserContextAttributeFilter | IGenAIUserContextAbsoluteDateFilter | IGenAIUserContextRelativeDateFilter;
131
202
  /**
132
203
  * Descriptor for a widget on the dashboard.
133
204
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/genAI/chat.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAE5F;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,IAAI,CAAC;AAE1C;;;GAGG;AACH,MAAM,MAAM,gCAAgC,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;AAEhF;;;GAGG;AACH,MAAM,MAAM,qCAAqC,GAAG;IAChD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC;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AE,MAAM,CAAC;IAClC;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,wBAAwB,EAAE,MAAM,CAAC;IACjC;;OAEG;IACH,OAAO,EAAE,OAAO,EAAE,CAAC;CACtB"}
package/esm/index.d.ts CHANGED
@@ -10,6 +10,7 @@
10
10
  * @packageDocumentation
11
11
  */
12
12
  export { type DateAttributeGranularity, type AllTimeGranularity, DateGranularity, } from "./base/dateGranularities.js";
13
+ export { type GranularityFamily, type CalendarAffinity, type IGranularityDescriptor, type IEnabledGranularity, type CalendarContext, type IGranularitiesQuery, GRANULARITY_DESCRIPTORS, getGranularityDescriptor, getGranularities, isFiscalGranularity, isStandardGranularity, isSharedGranularity, isChronologicalGranularity, isCyclicalGranularity, isTimeGranularity, belongsToCalendar, getStandardEquivalent, getFiscalEquivalent, getChronologicalOrigin, } from "./base/granularityRegistry.js";
13
14
  export { type IAuditable, type IAuditableDates, type IAuditableUsers, type CertificationStatus, type IObjectCertification, type IObjectCertificationWrite, } from "./base/metadata.js";
14
15
  export type { ComparatorDirection, IComparator } from "./base/comparators.js";
15
16
  export { assertNever, throwUnexpected } from "./base/typeUtils.js";
@@ -40,7 +41,7 @@ export { insightCreatedComparator, insightCreatedByComparator, insightTitleCompa
40
41
  export { type InsightModifications, newInsightDefinition, InsightDefinitionBuilder, } from "./insight/factory.js";
41
42
  export { insightSanitize, sanitizeBucketTotals } from "./insight/sanitization.js";
42
43
  export { factoryNotationFor } from "./execution/objectFactoryNotation/index.js";
43
- export { type DateFilterOptionAbsoluteFormType, type DateFilterOptionAbsolutePresetType, type DateFilterOptionAllTimeType, type DateFilterOptionType, type DateFilterOptionEmptyValuesType, type DateFilterOptionRelativeFormType, type DateFilterOptionRelativePresetType, type RelativeDateFilterGranularityOffset, type DateFilterGranularity, type DateString, type IAbsoluteDateFilterForm, type IAbsoluteDateFilterPreset, type IAllTimeDateFilterOption, type IDateFilterConfig, type IDateFilterOption, type IEmptyValuesDateFilterOption, type IRelativeDateFilterForm, type IRelativeDateFilterPreset, type IRelativeDateFilterPresetOfGranularity, isAbsoluteDateFilterForm, isAbsoluteDateFilterPreset, isAllTimeDateFilterOption, isEmptyValuesDateFilterOption, isDateFilterGranularity, isRelativeDateFilterForm, isRelativeDateFilterPreset, } from "./dateFilterConfig/index.js";
44
+ export { type DateFilterOptionAbsoluteFormType, type DateFilterOptionAbsolutePresetType, type DateFilterOptionAllTimeType, type DateFilterOptionType, type DateFilterOptionEmptyValuesType, type DateFilterOptionRelativeFormType, type DateFilterOptionRelativePresetType, type RelativeDateFilterGranularityOffset, type DateFilterGranularity, type DateString, type IAbsoluteDateFilterForm, type IAbsoluteDateFilterPreset, type IAllTimeDateFilterOption, type IDateFilterConfig, type IDateFilterOption, type IEmptyValuesDateFilterOption, type IRelativeDateFilterForm, type IRelativeDateFilterPreset, type IRelativeDateFilterPresetOfGranularity, isAbsoluteDateFilterForm, isAbsoluteDateFilterPreset, isAllTimeDateFilterOption, isEmptyValuesDateFilterOption, isDateFilterGranularity, getDateFilterGranularities, isRelativeDateFilterForm, isRelativeDateFilterPreset, } from "./dateFilterConfig/index.js";
44
45
  export type { IDashboardObjectIdentity } from "./dashboard/common.js";
45
46
  export { type DateFilterAbsoluteType, type DateFilterRelativeType, type DateFilterType, type FilterContextItem, type IDashboardAttributeFilter, type IDashboardArbitraryAttributeFilter, type IDashboardMatchAttributeFilter, type DashboardAttributeFilterItem, type DashboardTextAttributeFilter, type DashboardAttributeFilterSelectionMode, type IDashboardAttributeFilterParent, type IDashboardAttributeFilterReference, type IDashboardAttributeFilterByDate, type IDashboardDateFilter, type IDashboardDateFilterReference, type IDashboardMeasureValueFilter, type IDashboardMeasureValueFilterReference, type IDashboardFilterReference, type IFilterContext, type IFilterContextBase, type IFilterContextDefinition, type ITempFilterContext, type IDashboardFilterView, type IDashboardFilterViewSaveRequest, dashboardFilterReferenceObjRef, isAllTimeDashboardDateFilter, isAllTimeDashboardDateFilterWithEmptyValueHandling, isNoopAllTimeDashboardDateFilter, isAllValuesDashboardAttributeFilter, isDashboardAttributeFilter, isDashboardArbitraryAttributeFilter, isDashboardMatchAttributeFilter, isDashboardAttributeFilterItem, isDashboardTextAttributeFilter, isSingleSelectionFilter, isNegativeAttributeFilter as isNegativeDashboardAttributeFilter, getSelectedElementsCount, isDashboardAttributeFilterReference, isDashboardDateFilter, isDashboardDateFilterWithDimension, isDashboardCommonDateFilter, isRelativeDashboardDateFilter, isAbsoluteDashboardDateFilter, isDashboardDateFilterReference, isAllDashboardMeasureValueFilter, isDashboardMeasureValueFilter, isDashboardMeasureValueFilterReference, isFilterContext, isFilterContextDefinition, isTempFilterContext, newAbsoluteDashboardDateFilter, newAllTimeDashboardDateFilter, newRelativeDashboardDateFilter, isFilterContextItem, dashboardFilterLocalIdentifier, dashboardFilterObjRef, dashboardAttributeFilterItemDisplayForm, dashboardAttributeFilterItemLocalIdentifier, dashboardMeasureValueFilterLocalIdentifier, dashboardAttributeFilterItemTitle, dashboardAttributeFilterItemFilterElementsBy, dashboardAttributeFilterItemFilterElementsByDate, dashboardAttributeFilterItemValidateElementsBy, } from "./dashboard/filterContext.js";
46
47
  export { type IWidgetAlert, type IWidgetAlertBase, type IWidgetAlertDefinition, isWidgetAlert, isWidgetAlertDefinition, } from "./dashboard/alert.js";
@@ -63,7 +64,7 @@ export { type IDashboardMetadataObject, isDashboardMetadataObject } from "./ldm/
63
64
  export { type IDataSetAttributeMetadataObject, type IDataSetMetadataObject, isDataSetMetadataObject, } from "./ldm/metadata/dataSet/index.js";
64
65
  export { type IFactMetadataObject, isFactMetadataObject } from "./ldm/metadata/fact/index.js";
65
66
  export { type IMeasureMetadataObject, type IMeasureMetadataObjectBase, type IMeasureMetadataObjectDefinition, type MetricType, isMeasureMetadataObject, isMeasureMetadataObjectDefinition, } from "./ldm/metadata/measure/index.js";
66
- export { type INumberParameterConstraints, type INumberParameterDefinition, type IParameterDefinition, type IParameterMetadataObject, type IParameterMetadataObjectDefinition, type IStringParameterConstraints, type IStringParameterDefinition, type ParameterType, type ParameterValue, isNumberParameterDefinition, isParameterMetadataObject, isParameterMetadataObjectDefinition, isStringParameterDefinition, isValidNumberParameterValue, isValidStringParameterValue, isValidParameterValue, } from "./ldm/metadata/parameter/index.js";
67
+ export { type INumberParameterConstraints, type INumberParameterDefinition, type IParameterDefinition, type IParameterMetadataObject, type IParameterMetadataObjectDefinition, type IStringParameterConstraints, type IStringParameterDefinition, type ParameterType, type ParameterValue, isNumberParameterDefinition, isParameterMetadataObject, isParameterMetadataObjectDefinition, isStringParameterDefinition, isValidNumberParameterValue, isValidStringParameterValue, isValidParameterValue, parameterValueMatchesType, sanitizeParameterValue, } from "./ldm/metadata/parameter/index.js";
67
68
  export { type IMemoryItemDefinition, type IMemoryItemMetadataObject, type MemoryItemStrategy, } from "./ldm/metadata/memoryItem/index.js";
68
69
  export { type IMetadataObject, type IMetadataObjectBase, type IMetadataObjectDefinition, type IMetadataObjectIdentity, isMetadataObject, } from "./ldm/metadata/types.js";
69
70
  export { type IMdObjectBase, type IMdObjectIdentity, type IMdObject, type IMdObjectDefinition, type ToMdObjectDefinition, isMdObject, isMdObjectDefinition, } from "./ldm/metadata/next.js";
@@ -93,7 +94,7 @@ export { CSV_DELIMITER_PRESETS, DEFAULT_CSV_DELIMITER, DEFAULT_CSV_DELIMITER_PRE
93
94
  export { type IWorkspaceDataFilter, type IWorkspaceDataFilterDefinition, type IWorkspaceDataFilterSetting, type IUserDataFilterBase, type IUserDataFilter, type IUserGroupDataFilter, type UserDataFilter, type IUserDataFilterDefinitionBase, type IUserDataFilterDefinition, type IUserGroupDataFilterDefinition, type UserDataFilterDefinition, isUserDataFilter, isUserGroupDataFilter, } from "./dataFilter/index.js";
94
95
  export { type IAutomationMetadataObjectBase, type IAutomationMetadataObject, type IAutomationMetadataObjectDefinition, type IAutomationSchedule, type IAutomationRecipient, type IAutomationRecipientBase, type IAutomationRecipientType, type IAutomationUserGroupRecipient, type IAutomationUserRecipient, type IAutomationLastRunStatus, type IAutomationState, type IAutomationExternalRecipient, type IAutomationUnknownRecipient, type IAutomationAlert, type IAutomationAlertCondition, type IAutomationAlertExecutionDefinition, type IAlertComparisonOperator, type IAlertTriggerMode, type IAlertTriggerInterval, type IAlertTriggerState, type IAutomationAlertTrigger, type IAutomationAlertComparisonCondition, type IAlertRelativeOperator, type IAlertRelativeArithmeticOperator, type IAutomationAlertRelativeCondition, type IAutomationDetails, type IAutomationVisibleFilter, type AutomationEvaluationMode, type IAlertAnomalyDetectionSensitivity, type IAlertAnomalyDetectionGranularity, type IAutomationAnomalyDetectionCondition, isAutomationMetadataObject, isAutomationMetadataObjectDefinition, isAutomationUserGroupRecipient, isAutomationUserRecipient, isAutomationExternalUserRecipient, isAutomationUnknownUserRecipient, } from "./automations/index.js";
95
96
  export { type IAllowedRelationshipType, type ISemanticSearchResult, type ISemanticSearchError, type ISemanticSearchCertification, type ISemanticSearchResultItem, type ISemanticSearchRelationship, isSemanticSearchResultItem, isSemanticSearchRelationship, } from "./genAI/semanticSearch.js";
96
- export type { IGenAIChatInteraction, IGenAIUserContext, IGenAIChatRouting, IGenAIChatReasoning, IGenAIChatReasoningStep, IGenAIChatReasoningThought, IGenAICreatedVisualizations, IGenAIFoundObjects, IGenAIVisualization, IGenAIVisualizationConfig, IGenAIForecastConfig, IGenAIAnomalyDetectionConfig, IGenAIClusteringConfig, IGenAIWhatIfConfig, IGenAIWhatIfScenario, IGenAIWhatIfAdjustment, IGenAIVisualizationDimension, IGenAIVisualizationMetric, IGenAIActiveObject, IGenAIUIContext, IGenAIDashboardContext, IGenAIWidgetDescriptor, GenAIObjectReferenceType, IGenAIObjectReference, IGenAIObjectReferenceGroup, IGenAISuggestion, IGenAIChangeAnalysisParams, GenAIChatRoutingUseCase, GenAIChatInteractionUserFeedback, GenAIChatInteractionUserVisualisation, GenAIChatRole, GenAIVisualizationType, GenAIMetricAggregation, GenAIMetricType, GenAIFilter, GenAIPositiveAttributeFilter, GenAINegativeAttributeFilter, GenAIAbsoluteDateFilter, GenAIRelativeDateFilter, GenAIDateGranularity, GenAIRankingFilter, } from "./genAI/chat.js";
97
+ export type { IGenAIChatInteraction, IGenAIUserContext, IGenAIChatRouting, IGenAIChatReasoning, IGenAIChatReasoningStep, IGenAIChatReasoningThought, IGenAICreatedVisualizations, IGenAIFoundObjects, IGenAIVisualization, IGenAIVisualizationConfig, IGenAIForecastConfig, IGenAIAnomalyDetectionConfig, IGenAIClusteringConfig, IGenAIWhatIfConfig, IGenAIWhatIfScenario, IGenAIWhatIfAdjustment, IGenAIVisualizationDimension, IGenAIVisualizationMetric, IGenAIActiveObject, IGenAIUIContext, IGenAIDashboardContext, IGenAIWidgetDescriptor, GenAIUserContextFilter, IGenAIUserContextAttributeFilter, IGenAIUserContextAbsoluteDateFilter, IGenAIUserContextRelativeDateFilter, GenAIObjectReferenceType, IGenAIObjectReference, IGenAIObjectReferenceGroup, IGenAISuggestion, IGenAIChangeAnalysisParams, GenAIChatRoutingUseCase, GenAIChatInteractionUserFeedback, GenAIChatInteractionUserVisualisation, GenAIChatRole, GenAIVisualizationType, GenAIMetricAggregation, GenAIMetricType, GenAIFilter, GenAIPositiveAttributeFilter, GenAINegativeAttributeFilter, GenAIAbsoluteDateFilter, GenAIRelativeDateFilter, GenAIDateGranularity, GenAIRankingFilter, } from "./genAI/chat.js";
97
98
  export type { GenAIObjectType } from "./genAI/common.js";
98
99
  export type { IGeoCollection, IGeoCollectionDefinition, IGeoCollectionFileUploadResult, } from "./geoCollections/index.js";
99
100
  export type { IIpAllowlist, IIpAllowlistAssignedUser, IIpAllowlistAssignedUserGroup, IIpAllowlistDefinition, } from "./ipAllowlists/index.js";