@sisense/sdk-ai-core 0.13.0 → 0.15.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.
Files changed (202) hide show
  1. package/dist/constants.d.ts +0 -1
  2. package/dist/engines/build-chart/build-chart-engine.d.ts +1 -12
  3. package/dist/engines/build-chart/build-chart-service.d.ts +0 -1
  4. package/dist/engines/build-chart/create-chart/assemble-chart-widget.d.ts +7 -3
  5. package/dist/engines/build-chart/create-chart/chart-json-axes-mapping.d.ts +0 -1
  6. package/dist/engines/build-chart/create-chart/create-chart.d.ts +0 -1
  7. package/dist/engines/build-chart/create-chart/generate-chart-recommendations.d.ts +0 -1
  8. package/dist/engines/build-chart/create-chart/generate-chart.d.ts +0 -1
  9. package/dist/engines/build-chart/create-chart/get-columns-json.d.ts +0 -1
  10. package/dist/engines/build-chart/create-chart/rebind-chart-to-query.d.ts +10 -0
  11. package/dist/engines/build-chart/create-chart/resolve-chart-query.d.ts +0 -1
  12. package/dist/engines/build-chart/dataset-from-saved-chart-widget.d.ts +0 -1
  13. package/dist/engines/build-chart/shared/chart-column-utils.d.ts +6 -0
  14. package/dist/engines/build-chart/shared/csdk-data-options-for-llm.d.ts +0 -1
  15. package/dist/engines/build-chart/shared/finalize-chart-widget-save.d.ts +7 -0
  16. package/dist/engines/build-chart/shared/normalize-cartesian-axes-mapping.d.ts +7 -0
  17. package/dist/engines/build-chart/shared/sync-chart-state-measure-flags.d.ts +21 -0
  18. package/dist/engines/build-chart/types.d.ts +147 -5
  19. package/dist/engines/build-chart/update-chart/apply-prior-chart-style.d.ts +0 -1
  20. package/dist/engines/build-chart/update-chart/chart-options-schemas.d.ts +0 -1
  21. package/dist/engines/build-chart/update-chart/schemas.d.ts +0 -1
  22. package/dist/engines/build-chart/update-chart/update-chart-data-options.d.ts +0 -1
  23. package/dist/engines/build-chart/update-chart/update-chart-query.d.ts +0 -1
  24. package/dist/engines/build-chart/update-chart/update-chart-style-options.d.ts +0 -1
  25. package/dist/engines/build-chart/update-chart/update-chart-title.d.ts +0 -1
  26. package/dist/engines/build-chart/update-chart/update-chart-type.d.ts +0 -1
  27. package/dist/engines/build-csv-model/build-csv-model-engine.d.ts +0 -1
  28. package/dist/engines/build-csv-model/index.d.ts +0 -1
  29. package/dist/engines/build-csv-model/infer-relations.d.ts +0 -1
  30. package/dist/engines/build-csv-model/rest-build.d.ts +26 -1
  31. package/dist/engines/build-csv-model/types.d.ts +1 -2
  32. package/dist/engines/build-dashboard/add-dashboard-filters.d.ts +0 -1
  33. package/dist/engines/build-dashboard/add-dashboard-widgets.d.ts +0 -1
  34. package/dist/engines/build-dashboard/build-dashboard-engine.d.ts +1 -10
  35. package/dist/engines/build-dashboard/build-dashboard-service.d.ts +0 -1
  36. package/dist/engines/build-dashboard/create-dashboard.d.ts +0 -1
  37. package/dist/engines/build-dashboard/dashboard-filters/dashboard-filters-system-prompt.d.ts +0 -1
  38. package/dist/engines/build-dashboard/dashboard-filters/filter-factory-types.d.ts +0 -1
  39. package/dist/engines/build-dashboard/dashboard-filters/manipulate-dashboard-filters.d.ts +0 -1
  40. package/dist/engines/build-dashboard/dashboard-filters/measure-factory-types.d.ts +0 -1
  41. package/dist/engines/build-dashboard/dashboard-filters/translate-filters.d.ts +0 -1
  42. package/dist/engines/build-dashboard/index.d.ts +1 -2
  43. package/dist/engines/build-dashboard/load-existing-fusion-dashboard.d.ts +0 -1
  44. package/dist/engines/build-dashboard/types.d.ts +43 -21
  45. package/dist/engines/build-dashboard/update-dashboard.d.ts +0 -1
  46. package/dist/engines/build-data-model/build-data-model-engine.d.ts +0 -1
  47. package/dist/engines/build-data-model/fake-options.d.ts +0 -1
  48. package/dist/engines/build-data-model/faker-type-list.d.ts +0 -1
  49. package/dist/engines/build-data-model/index.d.ts +0 -1
  50. package/dist/engines/build-data-model/types.d.ts +3 -4
  51. package/dist/engines/build-data-model/validate-relationships.d.ts +0 -1
  52. package/dist/engines/build-query/build-query-engine.d.ts +0 -1
  53. package/dist/engines/build-query/index.d.ts +0 -1
  54. package/dist/engines/build-query/types.d.ts +0 -1
  55. package/dist/engines/get-dashboards/get-dashboards-engine.d.ts +0 -1
  56. package/dist/engines/get-dashboards/index.d.ts +0 -1
  57. package/dist/engines/get-dashboards/types.d.ts +0 -1
  58. package/dist/engines/get-data-source-fields/get-data-source-fields-engine.d.ts +0 -1
  59. package/dist/engines/get-data-source-fields/index.d.ts +0 -1
  60. package/dist/engines/get-data-source-fields/types.d.ts +2 -2
  61. package/dist/engines/get-data-sources/get-data-sources-engine.d.ts +0 -1
  62. package/dist/engines/get-data-sources/index.d.ts +0 -1
  63. package/dist/engines/get-data-sources/types.d.ts +0 -1
  64. package/dist/engines/index.d.ts +0 -1
  65. package/dist/engines/manage-perspectives/index.d.ts +0 -1
  66. package/dist/engines/manage-perspectives/manage-perspectives-engine.d.ts +0 -1
  67. package/dist/engines/manage-perspectives/types.d.ts +19 -6
  68. package/dist/engines/recommend-queries/index.d.ts +0 -1
  69. package/dist/engines/recommend-queries/recommend-queries-engine.d.ts +0 -1
  70. package/dist/engines/recommend-queries/types.d.ts +0 -1
  71. package/dist/engines/shared/get-filters-json-for-llm-summary.d.ts +0 -1
  72. package/dist/engines/shared/nlq-query-helpers.d.ts +0 -1
  73. package/dist/index.d.ts +0 -1
  74. package/dist/index.js +14795 -13893
  75. package/dist/services/dashboards/dashboards-service.d.ts +0 -1
  76. package/dist/services/dashboards/fusion-dashboards-service.d.ts +0 -1
  77. package/dist/services/data-models/data-models-service.d.ts +0 -1
  78. package/dist/services/data-models/ecm-service.d.ts +0 -1
  79. package/dist/services/data-sources/data-sources-service.d.ts +0 -1
  80. package/dist/services/formulas/formulas-service.d.ts +0 -1
  81. package/dist/services/llm/llm-consumption-service.d.ts +0 -1
  82. package/dist/services/llm/llm-models-service.d.ts +0 -1
  83. package/dist/services/llm/llm-settings-service.d.ts +0 -1
  84. package/dist/services/nlq/nlq-service.d.ts +0 -1
  85. package/dist/singleton-clients.d.ts +0 -1
  86. package/dist/utils/abort-signal.d.ts +0 -1
  87. package/dist/utils/create-custom-fetch.d.ts +0 -1
  88. package/dist/utils/create-serialized-tool-group.d.ts +0 -1
  89. package/dist/utils/create-stream-completion.d.ts +0 -1
  90. package/dist/utils/create-structured-completion.d.ts +0 -1
  91. package/dist/utils/create-tools-completion.d.ts +0 -1
  92. package/dist/utils/dev-debug.d.ts +0 -1
  93. package/dist/utils/http-client.d.ts +0 -1
  94. package/dist/utils/id-utils.d.ts +0 -1
  95. package/dist/utils/llm-client.d.ts +0 -1
  96. package/dist/utils/llm-provider-options.d.ts +0 -1
  97. package/dist/utils/proxy-utils.d.ts +0 -1
  98. package/dist/utils/trusted-base-url.d.ts +0 -1
  99. package/dist/utils/user-action-tracking.d.ts +0 -1
  100. package/dist/utils/utils.d.ts +0 -1
  101. package/dist/utils/zod-utils.d.ts +14 -1
  102. package/package.json +6 -7
  103. package/dist/constants.d.ts.map +0 -1
  104. package/dist/engines/build-chart/build-chart-engine.d.ts.map +0 -1
  105. package/dist/engines/build-chart/build-chart-service.d.ts.map +0 -1
  106. package/dist/engines/build-chart/create-chart/assemble-chart-widget.d.ts.map +0 -1
  107. package/dist/engines/build-chart/create-chart/chart-json-axes-mapping.d.ts.map +0 -1
  108. package/dist/engines/build-chart/create-chart/create-chart.d.ts.map +0 -1
  109. package/dist/engines/build-chart/create-chart/generate-chart-recommendations.d.ts.map +0 -1
  110. package/dist/engines/build-chart/create-chart/generate-chart.d.ts.map +0 -1
  111. package/dist/engines/build-chart/create-chart/get-columns-json.d.ts.map +0 -1
  112. package/dist/engines/build-chart/create-chart/resolve-chart-query.d.ts.map +0 -1
  113. package/dist/engines/build-chart/dataset-from-saved-chart-widget.d.ts.map +0 -1
  114. package/dist/engines/build-chart/shared/csdk-data-options-for-llm.d.ts.map +0 -1
  115. package/dist/engines/build-chart/types.d.ts.map +0 -1
  116. package/dist/engines/build-chart/update-chart/apply-prior-chart-style.d.ts.map +0 -1
  117. package/dist/engines/build-chart/update-chart/chart-options-schemas.d.ts.map +0 -1
  118. package/dist/engines/build-chart/update-chart/schemas.d.ts.map +0 -1
  119. package/dist/engines/build-chart/update-chart/update-chart-data-options.d.ts.map +0 -1
  120. package/dist/engines/build-chart/update-chart/update-chart-query.d.ts.map +0 -1
  121. package/dist/engines/build-chart/update-chart/update-chart-style-options.d.ts.map +0 -1
  122. package/dist/engines/build-chart/update-chart/update-chart-title.d.ts.map +0 -1
  123. package/dist/engines/build-chart/update-chart/update-chart-type.d.ts.map +0 -1
  124. package/dist/engines/build-csv-model/build-csv-model-engine.d.ts.map +0 -1
  125. package/dist/engines/build-csv-model/index.d.ts.map +0 -1
  126. package/dist/engines/build-csv-model/infer-relations.d.ts.map +0 -1
  127. package/dist/engines/build-csv-model/rest-build.d.ts.map +0 -1
  128. package/dist/engines/build-csv-model/types.d.ts.map +0 -1
  129. package/dist/engines/build-dashboard/add-dashboard-filters.d.ts.map +0 -1
  130. package/dist/engines/build-dashboard/add-dashboard-widgets.d.ts.map +0 -1
  131. package/dist/engines/build-dashboard/build-dashboard-engine.d.ts.map +0 -1
  132. package/dist/engines/build-dashboard/build-dashboard-service.d.ts.map +0 -1
  133. package/dist/engines/build-dashboard/create-chart-widget.d.ts +0 -5
  134. package/dist/engines/build-dashboard/create-chart-widget.d.ts.map +0 -1
  135. package/dist/engines/build-dashboard/create-dashboard.d.ts.map +0 -1
  136. package/dist/engines/build-dashboard/dashboard-filters/dashboard-filters-system-prompt.d.ts.map +0 -1
  137. package/dist/engines/build-dashboard/dashboard-filters/filter-factory-types.d.ts.map +0 -1
  138. package/dist/engines/build-dashboard/dashboard-filters/manipulate-dashboard-filters.d.ts.map +0 -1
  139. package/dist/engines/build-dashboard/dashboard-filters/measure-factory-types.d.ts.map +0 -1
  140. package/dist/engines/build-dashboard/dashboard-filters/translate-filters.d.ts.map +0 -1
  141. package/dist/engines/build-dashboard/index.d.ts.map +0 -1
  142. package/dist/engines/build-dashboard/load-existing-fusion-dashboard.d.ts.map +0 -1
  143. package/dist/engines/build-dashboard/types.d.ts.map +0 -1
  144. package/dist/engines/build-dashboard/update-chart-widget.d.ts +0 -5
  145. package/dist/engines/build-dashboard/update-chart-widget.d.ts.map +0 -1
  146. package/dist/engines/build-dashboard/update-dashboard.d.ts.map +0 -1
  147. package/dist/engines/build-data-model/build-data-model-engine.d.ts.map +0 -1
  148. package/dist/engines/build-data-model/fake-options.d.ts.map +0 -1
  149. package/dist/engines/build-data-model/faker-type-list.d.ts.map +0 -1
  150. package/dist/engines/build-data-model/index.d.ts.map +0 -1
  151. package/dist/engines/build-data-model/types.d.ts.map +0 -1
  152. package/dist/engines/build-data-model/validate-relationships.d.ts.map +0 -1
  153. package/dist/engines/build-query/build-query-engine.d.ts.map +0 -1
  154. package/dist/engines/build-query/index.d.ts.map +0 -1
  155. package/dist/engines/build-query/types.d.ts.map +0 -1
  156. package/dist/engines/get-dashboards/get-dashboards-engine.d.ts.map +0 -1
  157. package/dist/engines/get-dashboards/index.d.ts.map +0 -1
  158. package/dist/engines/get-dashboards/types.d.ts.map +0 -1
  159. package/dist/engines/get-data-source-fields/get-data-source-fields-engine.d.ts.map +0 -1
  160. package/dist/engines/get-data-source-fields/index.d.ts.map +0 -1
  161. package/dist/engines/get-data-source-fields/types.d.ts.map +0 -1
  162. package/dist/engines/get-data-sources/get-data-sources-engine.d.ts.map +0 -1
  163. package/dist/engines/get-data-sources/index.d.ts.map +0 -1
  164. package/dist/engines/get-data-sources/types.d.ts.map +0 -1
  165. package/dist/engines/index.d.ts.map +0 -1
  166. package/dist/engines/manage-perspectives/index.d.ts.map +0 -1
  167. package/dist/engines/manage-perspectives/manage-perspectives-engine.d.ts.map +0 -1
  168. package/dist/engines/manage-perspectives/types.d.ts.map +0 -1
  169. package/dist/engines/recommend-queries/index.d.ts.map +0 -1
  170. package/dist/engines/recommend-queries/recommend-queries-engine.d.ts.map +0 -1
  171. package/dist/engines/recommend-queries/types.d.ts.map +0 -1
  172. package/dist/engines/shared/get-filters-json-for-llm-summary.d.ts.map +0 -1
  173. package/dist/engines/shared/nlq-query-helpers.d.ts.map +0 -1
  174. package/dist/index.d.ts.map +0 -1
  175. package/dist/index.js.map +0 -1
  176. package/dist/services/dashboards/dashboards-service.d.ts.map +0 -1
  177. package/dist/services/dashboards/fusion-dashboards-service.d.ts.map +0 -1
  178. package/dist/services/data-models/data-models-service.d.ts.map +0 -1
  179. package/dist/services/data-models/ecm-service.d.ts.map +0 -1
  180. package/dist/services/data-sources/data-sources-service.d.ts.map +0 -1
  181. package/dist/services/formulas/formulas-service.d.ts.map +0 -1
  182. package/dist/services/llm/llm-consumption-service.d.ts.map +0 -1
  183. package/dist/services/llm/llm-models-service.d.ts.map +0 -1
  184. package/dist/services/llm/llm-settings-service.d.ts.map +0 -1
  185. package/dist/services/nlq/nlq-service.d.ts.map +0 -1
  186. package/dist/singleton-clients.d.ts.map +0 -1
  187. package/dist/utils/abort-signal.d.ts.map +0 -1
  188. package/dist/utils/create-custom-fetch.d.ts.map +0 -1
  189. package/dist/utils/create-serialized-tool-group.d.ts.map +0 -1
  190. package/dist/utils/create-stream-completion.d.ts.map +0 -1
  191. package/dist/utils/create-structured-completion.d.ts.map +0 -1
  192. package/dist/utils/create-tools-completion.d.ts.map +0 -1
  193. package/dist/utils/dev-debug.d.ts.map +0 -1
  194. package/dist/utils/http-client.d.ts.map +0 -1
  195. package/dist/utils/id-utils.d.ts.map +0 -1
  196. package/dist/utils/llm-client.d.ts.map +0 -1
  197. package/dist/utils/llm-provider-options.d.ts.map +0 -1
  198. package/dist/utils/proxy-utils.d.ts.map +0 -1
  199. package/dist/utils/trusted-base-url.d.ts.map +0 -1
  200. package/dist/utils/user-action-tracking.d.ts.map +0 -1
  201. package/dist/utils/utils.d.ts.map +0 -1
  202. package/dist/utils/zod-utils.d.ts.map +0 -1
@@ -1,2 +1 @@
1
1
  export declare const MEASURE_FACTORY_TYPES: "import {\n\tAttribute,\n\tMeasure,\n\tFilter,\n\tCalculatedMeasure,\n\tBaseMeasure,\n\tCustomFormulaContext,\n} from '../interfaces.js';\nimport { ForecastFormulaOptions, TrendFormulaOptions } from '../../interfaces.js';\nimport { CustomFormulaJaql } from '../filters/utils/types.js';\n/**\n * Defines the different numeric operators that can be used with numeric filters\n *\n * @internal\n */\nexport declare const RankingTypes: {\n\t/**\n\t * In competition ranking, items that rank equally receive the same ranking number, and then a gap is left after the equally ranked items in the ranking numbers.\n\t */\n\tStandardCompetition: string;\n\t/**\n\t * In modified competition ranking, items that rank equally receive the same ranking number, and a gap is left before the equally ranked items in the ranking numbers.\n\t */\n\tModifiedCompetition: string;\n\t/**\n\t * In dense ranking, items that rank equally receive the same ranking number, and the next items receive the immediately following ranking number.\n\t */\n\tDense: string;\n\t/**\n\t * In ordinal ranking, all items receive distinct ordinal numbers, including items that rank equally. The assignment of distinct ordinal numbers for equal-ranking items is arbitrary.\n\t */\n\tOrdinal: string;\n};\n/**\n * Defines the different ranking sorting types supported by rank measure\n *\n * @internal\n */\nexport declare const RankingSortTypes: {\n\tAscending: string;\n\tDescending: string;\n};\n/**\n * Transforms a custom formula jaql into a calculated measure instance.\n *\n * As custom formulas can be nested, the function performs a recursive transformation via a helper function.\n *\n * @param jaql - Custom formula jaql\n * @returns Calculated measure instance\n * @internal\n */\nexport declare function transformCustomFormulaJaql(jaql: CustomFormulaJaql): CalculatedMeasure;\n/**\n * Creates a calculated measure for a valid custom formula built from [base functions](/guides/sdk/reference/functions.html#measured-value-functions).\n *\n * Use square brackets (`[]`) within the `formula` property to include dimensions, measures, or filters.\n * Each unique dimension, measure, or filter included in the `formula` must be defined using a property:value pair in the `context` parameter.\n *\n * You can nest custom formulas by placing one inside the `formula` parameter of another.\n *\n * Note: To use [shared formulas](https://docs.sisense.com/main/SisenseLinux/shared-formulas.htm)\n * from a Fusion instance, you must fetch them first using {@link @sisense/sdk-ui!useGetSharedFormula | useGetSharedFormula}.\n *\n * @example\n * An example of constructing a custom formulas using dimensions, measures, and nested custom formulas\n * from the Sample Ecommerce data model.\n * ```ts\n * // Custom formula\n * const profitabilityRatio = measureFactory.customFormula(\n * 'Profitability Ratio',\n * '([totalRevenue] - SUM([cost])) / [totalRevenue]',\n * {\n * totalRevenue: measureFactory.sum(DM.Commerce.Revenue),\n * cost: DM.Commerce.Cost,\n * },\n * );\n *\n * // Nested custom formula\n * const profitabilityRatioRank = measureFactory.customFormula(\n * 'Profitability Ratio Rank',\n * 'RANK([profRatio], \"ASC\", \"1224\")',\n * {\n * profRatio: profitabilityRatio,\n * },\n * );\n * ```\n *\n * Another example of constructing a custom formula using measures and filters\n * ```ts\n * const totalCostWithFilter = measureFactory.customFormula(\n * 'Total Cost with Filter',\n * '(SUM([cost]), [categoryFilter])',\n * {\n * cost: DM.Commerce.Cost,\n * categoryFilter: filterFactory.members(DM.Category.Category, ['Apple Mac Desktops']),\n * },\n * );\n * ```\n * @param title - Title of the measure to be displayed in legend\n * @param formula - Formula to be used for the measure\n * @param context - Formula context as a map of strings to attributes, measures, or filters\n * @returns A calculated measure instance\n * @group Advanced Analytics\n */\nexport declare function customFormula(\n\ttitle: string,\n\tformula: string,\n\tcontext: CustomFormulaContext,\n): CalculatedMeasure;\n/**\n * Creates an aggregated measure.\n *\n * This is a base function to build other aggregation functions (e.g., `sum`, `average`, etc.)\n * as listed in {@link AggregationTypes}.\n *\n * @example\n * Calculate the total cost across all items in a category from the Sample Ecommerce data model.\n * ```ts\n * measureFactory.aggregate(DM.Commerce.Cost, 'sum'),\n * ```\n * @param attribute - Attribute to aggregate\n * @param aggregationType - Aggregation type. See {@link AggregationTypes}\n * @param name - Optional name for the new measure\n * @param format - Optional numeric formatting to apply using a Numeral.js format string. Can only be used for explicit queries. Cannot be used in charts, tables, etc.\n * @returns A measure instance\n * @group Aggregation\n */\nexport declare function aggregate(\n\tattribute: Attribute,\n\taggregationType: string,\n\tname?: string,\n\tformat?: string,\n): BaseMeasure;\n/**\n * Creates a calculated measure from a numeric value.\n *\n * @example\n * Creates a calculated measure from a numeric value.\n * ```ts\n * measureFactory.constant(42)\n * ```\n * @param value - Value to be returned as a measure\n * @returns A calculated measure instance\n * @group Arithmetic\n */\nexport declare function constant(value: number): CalculatedMeasure;\n/**\n * Creates a sum aggregation measure over the given attribute.\n *\n * To create a running sum, use {@link runningSum}.\n *\n * @example\n * Calculate the total cost across all items in a category from the Sample Ecommerce data model.\n * ```ts\n * measureFactory.sum(DM.Commerce.Cost)\n * ```\n * @param attribute - Attribute to aggregate\n * @param name - Optional name for the new measure\n * @param format - Optional numeric formatting to apply using a Numeral.js format string. Can only be used for explicit queries. Cannot be used in charts, tables, etc.\n * @returns A measure instance\n * @group Aggregation\n */\nexport declare function sum(attribute: Attribute, name?: string, format?: string): BaseMeasure;\n/**\n * Creates an average aggregation measure over the given attribute.\n *\n * Both `average()` and `avg()` can be used interchangeably.\n *\n * @example\n * Calculate the average cost across all items in a category from the Sample Ecommerce data model.\n * ```ts\n * measureFactory.average(DM.Commerce.Cost)\n * ```\n * @param attribute - Attribute to aggregate\n * @param name - Optional name for the new measure\n * @param format - Optional numeric formatting to apply using a Numeral.js format string. Can only be used for explicit queries. Cannot be used in charts, tables, etc.\n * @returns A measure instance\n * @group Aggregation\n */\nexport declare function average(attribute: Attribute, name?: string, format?: string): BaseMeasure;\n/**\n * {@inheritDoc average}\n *\n * @example\n * Calculate the average cost across all items in a category from the Sample Ecommerce data model.\n * ```ts\n * measureFactory.avg(DM.Commerce.Cost)\n * ```\n * @group Aggregation\n */\nexport declare function avg(attribute: Attribute, name?: string, format?: string): BaseMeasure;\n/**\n * Creates a min aggregation measure over the given attribute.\n *\n * @example\n * Calculate the minimum cost across all items in a category from the Sample Ecommerce data model.\n * ```ts\n * measureFactory.min(DM.Commerce.Cost)\n * ```\n * @param attribute - Attribute to aggregate\n * @param name - Optional name for the new measure\n * @param format - Optional numeric formatting to apply using a Numeral.js format string. Can only be used for explicit queries. Cannot be used in charts, tables, etc.\n * @returns A measure instance\n * @group Aggregation\n */\nexport declare function min(attribute: Attribute, name?: string, format?: string): BaseMeasure;\n/**\n * Creates a max aggregation measure over the given attribute.\n *\n * @example\n * Calculate the maximum cost across all items in a category from the Sample Ecommerce data model.\n * ```ts\n * measureFactory.max(DM.Commerce.Cost)\n * ```\n * @param attribute - Attribute to aggregate\n * @param name - Optional name for the new measure\n * @param format - Optional numeric formatting to apply using a Numeral.js format string. Can only be used for explicit queries. Cannot be used in charts, tables, etc.\n * @returns A measure instance\n * @group Aggregation\n */\nexport declare function max(attribute: Attribute, name?: string, format?: string): BaseMeasure;\n/**\n * Creates a median aggregation measure over the given attribute.\n *\n * @example\n * Calculate the median cost across all items in a category from the Sample Ecommerce data model.\n * ```ts\n * measureFactory.median(DM.Commerce.Cost)\n * ```\n * @param attribute - Attribute to aggregate\n * @param name - Optional name for the new measure\n * @param format - Optional numeric formatting to apply using a Numeral.js format string. Can only be used for explicit queries. Cannot be used in charts, tables, etc.\n * @returns A measure instance\n * @group Aggregation\n */\nexport declare function median(attribute: Attribute, name?: string, format?: string): BaseMeasure;\n/**\n * Creates a count aggregation measure over the given attribute.\n *\n * To count distinct values in the given attribute, use {@link countDistinct}.\n *\n * @example\n * Counts the number of Commerce items from the Sample Ecommerce data model.\n * ```ts\n * measureFactory.count(DM.Commerce.BrandID)\n * ```\n * @param attribute - Attribute to aggregate\n * @param name - Optional name for the new measure\n * @param format - Optional numeric formatting to apply using a Numeral.js format string. Can only be used for explicit queries. Cannot be used in charts, tables, etc.\n * @returns A measure instance\n * @group Aggregation\n */\nexport declare function count(attribute: Attribute, name?: string, format?: string): BaseMeasure;\n/**\n * Creates a count distinct aggregation measure over the given attribute.\n *\n * To count all values in the given attribute, use {@link count}.\n *\n * @example\n * Calculate the number of distinct brands from the Sample Ecommerce data model.\n * ```ts\n * measureFactory.countDistinct(DM.Brand.BrandID)\n * ```\n * @param attribute - Attribute to aggregate\n * @param name - Optional name for the new measure\n * @param format - Optional numeric formatting to apply using a Numeral.js format string. Can only be used for explicit queries. Cannot be used in charts, tables, etc.\n * @returns A measure instance\n * @group Aggregation\n */\nexport declare function countDistinct(\n\tattribute: Attribute,\n\tname?: string,\n\tformat?: string,\n): BaseMeasure;\n/**\n * Creates a measured value with the given measure and set of filters.\n *\n * A measured value only includes values from items that match the provided filters.\n *\n * For example you can use a measured value to get a total cost for all items where the cost is greater than 100.\n *\n * Note that the filters on the measured value override the filters on the query, chart, or table the\n * measured value is used in.\n *\n * @example\n * Calculate the total cost across all items in a category from the Sample Ecommerce data model,\n * where the cost is greater than 100. Additional filtering on the cost will not affect this measure.\n * ```ts\n * measureFactory.measuredValue(\n * measureFactory.sum(DM.Commerce.Cost),\n * [filterFactory.greaterThan(DM.Commerce.Cost, 100)],\n * 'Cost Greater Than 100'\n * ),\n * ```\n * @param measure - Measure to filter\n * @param filters - Filters to apply to the measure\n * @param name - Optional name for the new measure\n * @param format - Optional numeric formatting to apply using a Numeral.js format string. Can only be used for explicit queries. Cannot be used in charts, tables, etc.\n * @returns A calculated measure instance\n * @group Advanced Analytics\n */\nexport declare function measuredValue(\n\tmeasure: Measure,\n\tfilters: Filter[],\n\tname?: string,\n\tformat?: string,\n): CalculatedMeasure;\n/**\n * Creates a calculated measure by adding two given numbers or measures.\n *\n * @example\n * ```ts\n * const measure1 = measureFactory.sum(DM.Dimension.Attribute1);\n * const measure2 = measureFactory.sum(DM.Dimension.Attribute2);\n * const measureSum = measureFactory.add(measure1, measure2);\n * ```\n * @param value1 - First value\n * @param value2 - Second value\n * @param name - Optional name for the new measure\n * @param withParentheses - Optional boolean flag whether to wrap the arithmetic operation with parentheses\n * @returns A calculated measure instance\n * @group Arithmetic\n */\nexport declare function add(\n\tvalue1: Measure | number,\n\tvalue2: Measure | number,\n\tname?: string,\n\twithParentheses?: boolean,\n): CalculatedMeasure;\n/**\n * Creates a calculated measure by subtracting two given numbers or measures. Subtracts `value2` from `value1`.\n *\n * @example\n * ```ts\n * const measure1 = measureFactory.sum(DM.Dimension.Attribute1);\n * const measure2 = measureFactory.sum(DM.Dimension.Attribute2);\n * const measureDifference = measureFactory.subtract(measure1, measure2);\n * ```\n * @param value1 - First value\n * @param value2 - Second value\n * @param name - Optional name for the new measure\n * @param withParentheses - Optional boolean flag whether to wrap the arithmetic operation with parentheses\n * @returns A calculated measure instance\n * @group Arithmetic\n */\nexport declare function subtract(\n\tvalue1: Measure | number,\n\tvalue2: Measure | number,\n\tname?: string,\n\twithParentheses?: boolean,\n): CalculatedMeasure;\n/**\n * Creates a calculated measure by multiplying two given numbers or measures.\n *\n * @example\n * ```ts\n * const measure1 = measureFactory.sum(DM.Dimension.Attribute1);\n * const measure2 = measureFactory.sum(DM.Dimension.Attribute2);\n * const measureProduct = measureFactory.multiply(measure1, measure2);\n * ```\n * @param value1 - First value\n * @param value2 - Second value\n * @param name - Optional name for the new measure\n * @param withParentheses - Optional boolean flag whether to wrap the arithmetic operation with parentheses\n * @returns A calculated measure instance\n * @group Arithmetic\n */\nexport declare function multiply(\n\tvalue1: Measure | number,\n\tvalue2: Measure | number,\n\tname?: string,\n\twithParentheses?: boolean,\n): CalculatedMeasure;\n/**\n * Creates a calculated measure by dividing two given numbers or measures. Divides `value1` by `value2`.\n *\n * @example\n * ```ts\n * const measure1 = measureFactory.sum(DM.Dimension.Attribute1);\n * const measure2 = measureFactory.sum(DM.Dimension.Attribute2);\n * const measureQuotient = measureFactory.divide(measure1, measure2);\n * ```\n * @param value1 - First value\n * @param value2 - Second value\n * @param name - Optional name for the new measure\n * @param withParentheses - Optional boolean flag whether to wrap the arithmetic operation with parentheses\n * @returns A calculated measure instance\n * @group Arithmetic\n */\nexport declare function divide(\n\tvalue1: Measure | number,\n\tvalue2: Measure | number,\n\tname?: string,\n\twithParentheses?: boolean,\n): CalculatedMeasure;\n/**\n * Creates a calculated measure that calculates the running total starting from the beginning\n * of the year up to the current day, week, month, or quarter.\n *\n * The time resolution is determined by the minimum date level of the date dimension in the query\n * that uses the returned measure.\n *\n * @example\n * Calculate the running total of total cost from the Sample Ecommerce data model, starting from the\n * beginning of the year up to the current day, week, month, or quarter.\n * ```ts\n * measureFactory.yearToDateSum(measureFactory.sum(DM.Commerce.Cost))\n * ```\n * @param measure - Measure to apply the YTD Sum to\n * @param name - Name for the new measure\n * @returns A calculated measure instance\n * @group Time-based\n */\nexport declare function yearToDateSum(measure: Measure, name?: string): CalculatedMeasure;\n/**\n * Creates a calculated measure that calculates the running total starting from the beginning\n * of the quarter up to the current day, week, or month.\n *\n * The time resolution is determined by the minimum date level of the date dimension in the query\n * that uses the returned measure.\n *\n * @example\n * Calculate the running total of total cost from the Sample Ecommerce data model, starting from the\n * beginning of the quarter up to the current day, week, or month.\n * ```ts\n * measureFactory.quarterToDateSum(measureFactory.sum(DM.Commerce.Cost))\n * ```\n * @param measure - Measure to apply the QTD Sum to\n * @param name - Name for the new measure\n * @returns A calculated measure instance\n * @group Time-based\n */\nexport declare function quarterToDateSum(measure: Measure, name?: string): CalculatedMeasure;\n/**\n * Creates a calculated measure that calculates the running total starting from the beginning\n * of the month up to the current day or week.\n *\n * The time resolution is determined by the minimum date level of the date dimension in the query\n * that uses the returned measure.\n *\n * @example\n * Calculate the running total of total cost from the Sample Ecommerce data model, starting from the\n * beginning of the month up to the current day or week.\n * ```ts\n * measureFactory.monthToDateSum(measureFactory.sum(DM.Commerce.Cost))\n * ```\n * @param measure - Measure to apply the MTD Sum to\n * @param name - Name for the new measure\n * @returns A calculated measure instance\n * @group Time-based\n */\nexport declare function monthToDateSum(measure: Measure, name?: string): CalculatedMeasure;\n/**\n * Creates a calculated measure that calculates the running total starting from the beginning\n * of the week up to the current day.\n *\n * The time resolution is determined by the minimum date level of the date dimension in the query\n * that uses the returned measure.\n *\n * @example\n * Calculate the running total of total cost from the Sample Ecommerce data model, starting from the\n * beginning of the week up to the current day.\n * ```ts\n * measureFactory.weekToDateSum(measureFactory.sum(DM.Commerce.Cost))\n * ```\n * @param measure - Measure to apply the WTD Sum to\n * @param name - Name for the new measure\n * @returns A calculated measure instance\n * @group Time-based\n */\nexport declare function weekToDateSum(measure: Measure, name?: string): CalculatedMeasure;\n/**\n * Creates a calculated measure that calculates the running total of a given measure.\n *\n * The running sum is calculated using the current sort order of the query it's used in.\n *\n * @example\n * Calculate the running sum of the total cost from the Sample Ecommerce data model across all categories.\n * ```ts\n * measureFactory.runningSum(measureFactory.sum(DM.Commerce.Cost)),\n * ```\n *\n * Running sum values from the Sample Ecommerce data model when categorizing by age range.\n * | AgeRange | Cost | Running Cost |\n * | --- | --- | --- |\n * | 0-18 | 4.32M | 4.32M |\n * | 19-24 | 8.66M | 12.98M |\n * | 25-34 | 21.19M | 34.16M |\n * | 35-44 | 23.64M | 57.8M |\n * | 45-54 | 20.39M | 78.19M |\n * | 55-64 | 11.82M | 90.01M |\n * | 65+ | 17.26M | 107.27M |\n * @param measure - Measure to apply the running sum to\n * @param _continuous - Boolean flag whether to accumulate the sum continuously\n * when there are two or more dimensions. The default value is false.\n * @param name - Name for the new measure\n * @returns A calculated measure instance\n * @group Statistics\n */\nexport declare function runningSum(\n\tmeasure: Measure,\n\t_continuous?: boolean,\n\tname?: string,\n): CalculatedMeasure;\n/**\n * Creates a calculated measure that calculates growth over a period of time.\n *\n * The time resolution is determined by the minimum date level of the date dimension in the query\n * that uses the returned measure.\n *\n * Growth is calculated using the following formula: `(currentPeriod \u2013 previousPeriod) / previousPeriod`.\n *\n * For example, if this period the value is 12 and the previous period's value was 10, the growth for\n * this period is 20%, returned as '0.2' (calculation: `(12 \u2013 10) / 10 = 0.2`).\n *\n * If the previous period's value is greater than the current period, the growth will be negative.\n *\n * For example, if this period the value is 80, and the previous period's was 100, the growth for\n * this period is -20%, returned as `-0.2` (calculation: `(80 \u2013 100) / 100 = -0.2`).\n *\n * @example\n * Calculate the growth in total cost this period in comparison to the previous period from the\n * Sample Ecommerce data model.\n * ```ts\n * measureFactory.growth(measureFactory.sum(DM.Commerce.Cost))\n * ```\n * @param measure - Measure to apply growth to\n * @param name - Name for the new measure\n * @returns A calculated measure instance\n * @group Statistics\n */\nexport declare function growth(measure: Measure, name?: string): CalculatedMeasure;\n/**\n * Creates a calculated measure that calculates growth rate over a period of time.\n *\n * The time resolution is determined by the minimum date level of the date dimension in the query\n * that uses the returned measure.\n *\n * Growth rate is calculated using the following formula: `currentPeriod / previousPeriod`.\n *\n * For example, if this period the value is 12 and the previous period's value was 10, the growth rate for\n * this period is 120%, returned as '1.2' (calculation: `12 / 10 = 1.2`).\n *\n * If the previous period's value is greater than the current period, the growth rate will be less than one.\n *\n * For example, if this period the value is 80, and the previous period's was 100, the growth for\n * this period is 80%, returned as `0.8` (calculation: `80 / 100 = .8`).\n *\n * @example\n * Calculate the growth rate in total cost this period in comparison to the previous period from the\n * Sample Ecommerce data model.\n * ```ts\n * measureFactory.growthRate(measureFactory.sum(DM.Commerce.Cost))\n * ```\n * @param measure - Measure to apply the Growth rate\n * @param name - Name for the new measure\n * @returns A calculated measure instance\n * @group Statistics\n */\nexport declare function growthRate(measure: Measure, name?: string): CalculatedMeasure;\n/**\n * Creates a calculated measure that calculates the growth from the previous week to the current week.\n *\n * The date dimension will be dynamically taken from the query that uses the returned measure.\n *\n * Growth is calculated using the following formula: `(currentWeek \u2013 previousWeek) / previousWeek`.\n *\n * For example, if this week the value is 12 and the previous week's value was 10, the growth for\n * this week is 20%, returned as '0.2' (calculation: `(12 \u2013 10) / 10 = 0.2`).\n *\n * If the previous week's value is greater than the current week, the growth will be negative.\n *\n * For example, if this week the value is 80, and the previous week's was 100, the growth for\n * this week is -20%, returned as `-0.2` (calculation: `(80 \u2013 100) / 100 = -0.2`).\n *\n * @example\n * Calculate the growth in total cost this week in comparison to the previous week from the Sample\n * Ecommerce data model.\n * ```ts\n * measureFactory.growthPastWeek(measureFactory.sum(DM.Commerce.Cost))\n * ```\n * @param measure - Measure to apply growth to\n * @param name - Name for the new measure\n * @returns A calculated measure instance\n * @group Statistics\n */\nexport declare function growthPastWeek(measure: Measure, name?: string): CalculatedMeasure;\n/**\n * Creates a calculated measure that calculates the growth from the previous month to the current month.\n *\n * The date dimension will be dynamically taken from the query that uses the returned measure.\n *\n * Growth is calculated using the following formula: `(currentMonth \u2013 previousMonth) / previousMonth`.\n *\n * For example, if this month the value is 12 and the previous month's value was 10, the growth for\n * this month is 20%, returned as '0.2' (calculation: `(12 \u2013 10) / 10 = 0.2`).\n *\n * If the previous month's value is greater than the current month, the growth will be negative.\n *\n * For example, if this month the value is 80, and the previous month's was 100, the growth for\n * this month is -20%, returned as `-0.2` (calculation: `(80 \u2013 100) / 100 = -0.2`).\n *\n * @example\n * Calculate the growth in total cost this month in comparison to the previous month from the Sample\n * Ecommerce data model.\n * ```ts\n * measureFactory.growthPastMonth(measureFactory.sum(DM.Commerce.Cost))\n * ```\n * @param measure - Measure to apply growth to\n * @param name - Name for the new measure\n * @returns A calculated measure instance\n * @group Statistics\n */\nexport declare function growthPastMonth(measure: Measure, name?: string): CalculatedMeasure;\n/**\n * Creates a calculated measure that calculates the growth from the previous quarter to the current quarter.\n *\n * The date dimension will be dynamically taken from the query that uses the returned measure.\n *\n * Growth is calculated using the following formula: `(currentQuarter \u2013 previousQuarter) / previousQuarter`.\n *\n * For example, if this quarter the value is 12 and the previous quarter's value was 10, the growth for\n * this quarter is 20%, returned as '0.2' (calculation: `(12 \u2013 10) / 10 = 0.2`).\n *\n * If the previous quarter's value is greater than the current quarter, the growth will be negative.\n *\n * For example, if this quarter the value is 80, and the previous quarter's was 100, the growth for\n * this quarter is -20%, returned as `-0.2` (calculation: `(80 \u2013 100) / 100 = -0.2`).\n *\n * @example\n * Calculate the growth in total cost this quarter in comparison to the previous quarter from the\n * Sample Ecommerce data model.\n * ```ts\n * measureFactory.growthPastQuarter(measureFactory.sum(DM.Commerce.Cost))\n * ```\n * @param measure - Measure to apply growth to\n * @param name - Name for the new measure\n * @returns A calculated measure instance\n * @group Statistics\n */\nexport declare function growthPastQuarter(measure: Measure, name?: string): CalculatedMeasure;\n/**\n * Creates a calculated measure that calculates the growth from the previous year to the current year.\n *\n * The date dimension will be dynamically taken from the query that uses the returned measure.\n *\n * Growth is calculated using the following formula: `(currentYear \u2013 previousYear) / previousYear`.\n *\n * For example, if this year the value is 12 and the previous year's value was 10, the growth for\n * this year is 20%, returned as '0.2' (calculation: `(12 \u2013 10) / 10 = 0.2`).\n *\n * If the previous year's value is greater than the current year, the growth will be negative.\n *\n * For example, if this year the value is 80, and the previous year's was 100, the growth for\n * this year is -20%, returned as `-0.2` (calculation: `(80 \u2013 100) / 100 = -0.2`).\n *\n * @example\n * Calculate the growth in total cost this year in comparison to the previous year from the Sample\n * Ecommerce data model.\n * ```ts\n * measureFactory.growthPastYear(measureFactory.sum(DM.Commerce.Cost))\n * ```\n * @param measure - Measure to apply growth to\n * @param name - Name for the new measure\n * @returns A calculated measure instance\n * @group Statistics\n */\nexport declare function growthPastYear(measure: Measure, name?: string): CalculatedMeasure;\n/**\n * Creates a calculated measure that calculates the difference between this period's data\n * and the data from the previous period for the given measure.\n *\n * The time resolution is determined by the minimum date level of the date dimension in the query\n * that uses the returned measure.\n *\n * @example\n * Calculate the difference between this period's total cost and the previous period's total cost\n * from the Sample Ecommerce data model.\n * ```ts\n * measureFactory.difference(measureFactory.sum(DM.Commerce.Cost))\n * ```\n * @param measure - Measure to apply difference to\n * @param name - Name for the new measure\n * @returns A calculated measure instance\n * @group Time-based\n */\nexport declare function difference(measure: Measure, name?: string): CalculatedMeasure;\n/**\n * Creates a calculated measure that calculates the difference between this week's data\n * and the data from the previous week for the given measure.\n *\n * The date dimension will be dynamically taken from the query that uses the returned measure.\n *\n * @example\n * Calculate the difference between this week's total cost and the previous week's total cost from\n * the Sample Ecommerce data model.\n * ```ts\n * measureFactory.diffPastWeek(measureFactory.sum(DM.Commerce.Cost))\n * ```\n * @param measure - Measure to apply difference to\n * @param name - Name for the new measure\n * @returns A calculated measure instance\n * @group Time-based\n */\nexport declare function diffPastWeek(measure: Measure, name?: string): CalculatedMeasure;\n/**\n * Creates a calculated measure that calculates the difference between this month's data\n * and the data from the previous month for the given measure.\n *\n * The date dimension will be dynamically taken from the query that uses the returned measure.\n *\n * @example\n * Calculate the difference between this month's total cost and the previous month's total cost from\n * the Sample Ecommerce data model.\n * ```ts\n * measureFactory.diffPastMonth(measureFactory.sum(DM.Commerce.Cost))\n * ```\n * @param measure - Measure to apply difference to\n * @param name - Name for the new measure\n * @returns A calculated measure instance\n * @group Time-based\n */\nexport declare function diffPastMonth(measure: Measure, name?: string): CalculatedMeasure;\n/**\n * Creates a calculated measure that calculates the difference between this quarter's data\n * and the data from the previous quarter for the given measure.\n *\n * The date dimension will be dynamically taken from the query that uses the returned measure.\n *\n * @example\n * Calculate the difference between this quarter's total cost and the previous quarter's total cost\n * from the Sample Ecommerce data model.\n * ```ts\n * measureFactory.diffPastQuarter(measureFactory.sum(DM.Commerce.Cost))\n * ```\n * @param measure - Measure to apply difference to\n * @param name - Name for the new measure\n * @returns A calculated measure instance\n * @group Time-based\n */\nexport declare function diffPastQuarter(measure: Measure, name?: string): CalculatedMeasure;\n/**\n * Creates a calculated measure that calculates the difference between this year's data\n * and the data from the previous year for the given measure.\n *\n * The date dimension will be dynamically taken from the query that uses the returned measure.\n *\n * @example\n * Calculate the difference between this year's total cost and the previous year's total cost from\n * the Sample Ecommerce data model.\n * ```ts\n * measureFactory.diffPastYear(measureFactory.sum(DM.Commerce.Cost))\n * ```\n * @param measure - Measure to apply difference to\n * @param name - Name for the new measure\n * @returns A calculated measure instance\n * @group Time-based\n */\nexport declare function diffPastYear(measure: Measure, name?: string): CalculatedMeasure;\n/**\n * Creates a calculated measure that calculates the value for the previous day.\n *\n * @example\n * Calculate total cost for the previous day from the Sample Ecommerce data model.\n * ```ts\n * measureFactory.pastDay(measureFactory.sum(DM.Commerce.Cost))\n * ```\n * @param measure - Measure to apply past value to\n * @param name - Name for the new measure\n * @returns A calculated measure instance\n * @group Time-based\n */\nexport declare function pastDay(measure: Measure, name?: string): CalculatedMeasure;\n/**\n * Creates a calculated measure that calculates the value for the same day in the previous week.\n *\n * The time resolution is determined by the minimum date level of the date dimension in the query\n * that uses the returned measure.\n *\n * @example\n * Calculate total cost for the corresponding day one week ago from the Sample Ecommerce data model.\n * ```ts\n * measureFactory.pastWeek(measureFactory.sum(DM.Commerce.Cost))\n * ```\n * @param measure - Measure to apply past value to\n * @param name - Name for the new measure\n * @returns A calculated measure instance\n * @group Time-based\n */\nexport declare function pastWeek(measure: Measure, name?: string): CalculatedMeasure;\n/**\n * Creates a calculated measure that calculates the value for the same day or week in the previous month.\n *\n * The time resolution is determined by the minimum date level of the date dimension in the query\n * that uses the returned measure.\n *\n * @example\n * Calculate total cost for the corresponding day or week one month ago from the Sample Ecommerce\n * data model.\n * ```ts\n * measureFactory.pastMonth(measureFactory.sum(DM.Commerce.Cost))\n * ```\n * @param measure - Measure to apply past value to\n * @param name - Name for the new measure\n * @returns A calculated measure instance\n * @group Time-based\n */\nexport declare function pastMonth(measure: Measure, name?: string): CalculatedMeasure;\n/**\n * Creates a calculated measure that calculates the value for the same day, week, or month in the previous quarter.\n *\n * The time resolution is determined by the minimum date level of the date dimension in the query\n * that uses the returned measure.\n *\n * @example\n * Calculate total cost for the corresponding day, week, or month one quarter ago from the Sample\n * Ecommerce data model.\n * ```ts\n * measureFactory.pastQuarter(measureFactory.sum(DM.Commerce.Cost))\n * ```\n * @param measure - Measure to apply past value to\n * @param name - Name for the new measure\n * @returns A calculated measure instance\n * @group Time-based\n */\nexport declare function pastQuarter(measure: Measure, name?: string): CalculatedMeasure;\n/**\n * Creates a calculated measure that calculates the value for the same day, week, month, or quarter in the previous year.\n *\n * The time resolution is determined by the minimum date level of the date dimension in the query\n * that uses the returned measure.\n *\n * @example\n * Calculate total cost for the corresponding day, week, month, or quarter one year ago from the\n * Sample Ecommerce data model.\n * ```ts\n * measureFactory.pastYear(measureFactory.sum(DM.Commerce.Cost))\n * ```\n * @param measure - Measure to apply past value to\n * @param name - Name for the new measure\n * @returns A calculated measure instance\n * @group Time-based\n */\nexport declare function pastYear(measure: Measure, name?: string): CalculatedMeasure;\n/**\n * Creates a calculated contribution measure.\n *\n * A contribution measure calculates the contribution, in percentage, of a measure towards the total.\n * Percentages are expressed as a number between 0 and 1 (e.g. 42% is `0.42`).\n *\n * For example, using the Sample Ecommerce data model you can retrieve the total cost of products\n * categorized by age range. Using a contribution measure you can calculate how much each age range's\n * total cost contributes to the total cost across all age ranges. So, the total cost for the 35-44\n * age range is 23.64M, which is 22% of the 107.27M of all age ranges together. Therefore, the\n * contribution of the 35-44 age range is `.22`.\n *\n * @example\n * Calculates the percentage of the total cost across all categories for items in a category from the\n * Sample Ecommerce data model.\n * ```ts\n * measureFactory.contribution(measureFactory.sum(DM.Commerce.Cost))\n * ```\n *\n * Contribution values from the Sample Ecommerce data model when categorizing by age range.\n * | AgeRange | Cost | Contribution |\n * | --- | --- | --- |\n * | 0-18 | 4.32M | 0.04 |\n * | 19-24 | 8.66M | 0.08 |\n * | 25-34 | 21.19M | 0.2 |\n * | 35-44 | 23.64M | 0.22 |\n * | 45-54 | 20.39M | 0.19 |\n * | 55-64 | 11.82M | 0.11 |\n * | 65+ | 17.26M | 0.16 |\n * @param measure - Measure to apply the Contribution logic to\n * @param name - Name for the new measure\n * @returns A calculated measure instance\n * @group Statistics\n */\nexport declare function contribution(measure: Measure, name?: string): CalculatedMeasure;\n/**\n * Creates a calculated measure that computes a specified trend type for a given measure.\n *\n * The trend types include linear (the default), logarithmic, advanced smoothing, and local estimates.\n * You can also opt to automatically identify and ignore anomalous values in the series.\n *\n * Trend requires a Sisense instance version of L2023.6.0 or greater.\n *\n * @example\n * Calculate the trend in total cost from the Sample Ecommerce data model.\n * ```ts\n * measureFactory.trend(\n * measureFactory.sum(DM.Commerce.Cost),\n * 'Total Cost Trend',\n * {\n * modelType: 'advancedSmoothing',\n * ignoreAnomalies: true,\n * }\n * )\n * ```\n * @param measure - Measure to apply the trend logic to\n * @param name - Name for the new measure\n * @param options - Trend options\n * @returns A calculated measure instance\n * @group Advanced Analytics\n */\nexport declare function trend(\n\tmeasure: Measure,\n\tname?: string,\n\toptions?: TrendFormulaOptions,\n): CalculatedMeasure;\n/**\n * Creates a calculated measure that generates a forecast based on a specified measure employing\n * advanced autoML techniques.\n *\n * This function offers flexible options allowing you to:\n * + Let the function auto-select the best statistical model or explicitly choose a preferred model\n * + Control the time period used for training the model\n * + Set additional options to improve forecast accuracy by supplying expected lower and upper limits.\n *\n * In addition to the forecast, upper and lower confidence intervals are returned\n * with the name of the new measure and a suffix of _upper and _lower\n * respectively.\n *\n * Forecast requires a Sisense instance version of L2023.6.0 or greater.\n *\n * @example\n * Calculate a forecast for total cost from the Sample Ecommerce data model from the Sample\n * Ecommerce data model.\n * ```ts\n * measureFactory.forecast(\n * measureFactory.sum(DM.Commerce.Cost),\n * 'Total Cost Forecast',\n * {\n * modelType: 'prophet',\n * roundToInt: true,\n * }\n * )\n * ```\n * @param measure - Measure to apply the forecast logic to\n * @param name - Name for the new measure\n * @param options - Forecast options\n * @returns A calculated measure instance\n * @group Advanced Analytics\n */\nexport declare function forecast(\n\tmeasure: Measure,\n\tname?: string,\n\toptions?: ForecastFormulaOptions,\n): CalculatedMeasure;\n/**\n * Creates a calculated measure that calculates the rank of a value in a list of values.\n *\n * This function includes options that allow you do customize the ranking order and how to handle\n * equally ranked items.\n *\n * The order options are:\n * + `'DESC'` (default): Descending, meaning the largest number is ranked first.\n * + `'ASC'`: Ascending, meaning the smallest number is ranked first.\n *\n * The rank type options are:\n * + `'1224'`: Standard competition, meaning items that rank equally receive the same ranking number,\n * and then a gap is left after the equally ranked items in the ranking numbers.\n * + `'1334'`: Modified competition ranking, meaning items that rank equally receive the same ranking number,\n * and a gap is left before the equally ranked items in the ranking numbers.\n * + `'1223'`: Dense ranking, meaning items that rank equally receive the same ranking number,\n * and the next items receive the immediately following ranking number.\n * + `'1234'`: Ordinal ranking, meaning all items receive distinct ordinal numbers,\n * including items that rank equally. The assignment of distinct ordinal numbers for equal-ranking items is arbitrary.\n *\n * @example\n * Calculate the rank of the total cost per category, sorted with the smallest cost ranked first,\n * and ranking ties are handled using the ordinal ranking type from the Sample Ecommerce data model.\n * ```ts\n * measureFactory.rank(\n * measureFactory.sum(DM.Commerce.Cost),\n * 'Cost Rank',\n * measureFactory.RankingSortTypes.Ascending,\n * measureFactory.RankingTypes.Ordinal\n * )\n * ```\n *\n * Ranking values from the Sample Ecommerce data model when categorizing by age range using the above ranking.\n * | AgeRange | Cost | Cost Rank |\n * | --- | --- | --- |\n * | 0-18 | 4.32M | 1 |\n * | 19-24 | 8.66M | 2 |\n * | 25-34 | 21.19M | 6 |\n * | 35-44 | 23.64M | 7 |\n * | 45-54 | 20.39M | 5 |\n * | 55-64 | 11.82M | 3 |\n * | 65+ | 17.26M | 4 |\n * @param measure - Measure to apply the ranking logic to\n * @param name - Name for the new measure\n * @param sort - Sorting for ranking. By default sort order is descending, where the largest number is ranked first.\n * @param rankType - How to handle equally ranked items. By default the type is standard competition ranking.\n * @param groupBy - Rank partition attributes\n * @returns A calculated measure instance\n * @group Statistics\n */\nexport declare function rank(\n\tmeasure: Measure,\n\tname?: string,\n\tsort?: string,\n\trankType?: string,\n\tgroupBy?: Attribute[],\n): CalculatedMeasure;";
2
- //# sourceMappingURL=measure-factory-types.d.ts.map
@@ -41,4 +41,3 @@ export declare const filterFactoryFunctionsMap: Record<string, (...args: any[])
41
41
  * @returns A Filter[] or FilterRelations object
42
42
  */
43
43
  export declare const translateFiltersFromJsonFunctionCall: (filtersJson: string, dataSource: JaqlDataSourceForDto, dataFields: NormalizedDataSourceField[]) => Filter[] | FilterRelations;
44
- //# sourceMappingURL=translate-filters.d.ts.map
@@ -1,4 +1,3 @@
1
- export { buildDashboardEngine, buildContextualSystemPrompt, } from './build-dashboard-engine';
1
+ export { buildDashboardEngine } from './build-dashboard-engine';
2
2
  export * from './types';
3
3
  export * from './build-dashboard-service';
4
- //# sourceMappingURL=index.d.ts.map
@@ -2,4 +2,3 @@ import { LoadExistingFusionDashboardParams, BuildDashboardContext } from './type
2
2
  export declare const loadExistingFusionDashboard: ({ dashboardTitle }: LoadExistingFusionDashboardParams, context: BuildDashboardContext) => Promise<{
3
3
  message: string;
4
4
  }>;
5
- //# sourceMappingURL=load-existing-fusion-dashboard.d.ts.map
@@ -52,14 +52,54 @@ export type DashboardContextPromptEntry = DashboardSummary | {
52
52
  * Canonical tool description for buildDashboard — reusable by any host (sdk-assistant, MCP server, custom integrations).
53
53
  * Hosts may append host-specific notes but should not duplicate or contradict this text.
54
54
  */
55
- export declare const buildDashboardToolDescription = "Creates or updates a dashboard, its chart widgets, and its filters from a natural language prompt.\n\npriorDashboardId: pass the dashboardId of an existing dashboard when updating it. The engine routes all internal tool calls to that dashboard automatically. Omit when creating a new dashboard from scratch.\n\nChart widgets inside the dashboard support the same structural and display revision capabilities as standalone charts. When updating an existing widget, the engine sets priorChartId internally \u2014 no manual wiring needed.\n\nPass the user prompt exactly as received \u2014 do not transform or modify it. The engine handles prompt splitting internally.";
55
+ export declare const buildDashboardToolDescription = "Creates or updates a dashboard via a required structured `action` param. Build charts with buildChart first, then pass chartIds where needed. Load the buildDashboard skill via loadSkill before calling this tool.";
56
+ /** JSON-Schema-safe union; run {@link parseActionWithGuards} at execution time. */
57
+ export declare const buildDashboardActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
58
+ type: z.ZodLiteral<"load-existing">;
59
+ dashboardTitle: z.ZodString;
60
+ }, z.core.$strip>, z.ZodObject<{
61
+ type: z.ZodLiteral<"create">;
62
+ title: z.ZodString;
63
+ chartIds: z.ZodArray<z.ZodString>;
64
+ }, z.core.$strip>, z.ZodObject<{
65
+ type: z.ZodLiteral<"add-charts">;
66
+ priorDashboardId: z.ZodString;
67
+ chartIds: z.ZodArray<z.ZodString>;
68
+ }, z.core.$strip>, z.ZodObject<{
69
+ type: z.ZodLiteral<"update-title">;
70
+ priorDashboardId: z.ZodString;
71
+ title: z.ZodString;
72
+ }, z.core.$strip>, z.ZodObject<{
73
+ type: z.ZodLiteral<"add-filters">;
74
+ priorDashboardId: z.ZodString;
75
+ filterDescription: z.ZodString;
76
+ }, z.core.$strip>]>;
77
+ export type BuildDashboardAction = z.infer<typeof buildDashboardActionSchema>;
56
78
  /**
57
79
  * Schema for the main buildDashboard smart tool
58
80
  */
59
81
  export declare const buildDashboardSchema: z.ZodObject<{
60
82
  dataSourceTitle: z.ZodString;
61
- userPrompt: z.ZodString;
62
- priorDashboardId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
83
+ action: z.ZodDiscriminatedUnion<[z.ZodObject<{
84
+ type: z.ZodLiteral<"load-existing">;
85
+ dashboardTitle: z.ZodString;
86
+ }, z.core.$strip>, z.ZodObject<{
87
+ type: z.ZodLiteral<"create">;
88
+ title: z.ZodString;
89
+ chartIds: z.ZodArray<z.ZodString>;
90
+ }, z.core.$strip>, z.ZodObject<{
91
+ type: z.ZodLiteral<"add-charts">;
92
+ priorDashboardId: z.ZodString;
93
+ chartIds: z.ZodArray<z.ZodString>;
94
+ }, z.core.$strip>, z.ZodObject<{
95
+ type: z.ZodLiteral<"update-title">;
96
+ priorDashboardId: z.ZodString;
97
+ title: z.ZodString;
98
+ }, z.core.$strip>, z.ZodObject<{
99
+ type: z.ZodLiteral<"add-filters">;
100
+ priorDashboardId: z.ZodString;
101
+ filterDescription: z.ZodString;
102
+ }, z.core.$strip>]>;
63
103
  }, z.core.$strip>;
64
104
  export type BuildDashboardParams = z.infer<typeof buildDashboardSchema>;
65
105
  /**
@@ -93,23 +133,6 @@ export declare const addDashboardWidgetsSchema: z.ZodObject<{
93
133
  widgetIdsToAdd: z.ZodArray<z.ZodString>;
94
134
  }, z.core.$strip>;
95
135
  export type AddDashboardWidgetsParams = z.infer<typeof addDashboardWidgetsSchema>;
96
- /**
97
- * Schema for createChartForDashboard tool
98
- */
99
- export declare const createChartWidgetForDashboardSchema: z.ZodObject<{
100
- dashboardId: z.ZodString;
101
- userPrompt: z.ZodString;
102
- }, z.core.$strip>;
103
- export type CreateChartWidgetForDashboardParams = z.infer<typeof createChartWidgetForDashboardSchema>;
104
- /**
105
- * Schema for updateChartWidgetForDashboard tool
106
- */
107
- export declare const updateChartWidgetForDashboardSchema: z.ZodObject<{
108
- dashboardId: z.ZodString;
109
- widgetId: z.ZodString;
110
- userPrompt: z.ZodString;
111
- }, z.core.$strip>;
112
- export type UpdateChartWidgetForDashboardParams = z.infer<typeof updateChartWidgetForDashboardSchema>;
113
136
  /**
114
137
  * Schema for addDashboardFilters tool
115
138
  */
@@ -163,4 +186,3 @@ export interface BuildDashboardContext {
163
186
  httpClient?: HttpClient;
164
187
  llmClient?: LanguageModel;
165
188
  }
166
- //# sourceMappingURL=types.d.ts.map
@@ -2,4 +2,3 @@ import { UpdateDashboardParams, BuildDashboardContext } from './types';
2
2
  export declare const updateDashboard: ({ dashboardId, dashboardTitle }: UpdateDashboardParams, context: BuildDashboardContext) => Promise<{
3
3
  message: string;
4
4
  }>;
5
- //# sourceMappingURL=update-dashboard.d.ts.map
@@ -10,4 +10,3 @@ type ToolParams = z.infer<typeof toolSchema>;
10
10
  */
11
11
  export declare function buildDataModelEngine(params: Pick<ToolParams, 'prompt'>, context: BuildDataModelContext): Promise<BuildDataModelEngineResult>;
12
12
  export {};
13
- //# sourceMappingURL=build-data-model-engine.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare const fakerOptions = "Here are some of the fakerOptions available for some of the faker types:\nhelpers.enumValue: { <key>: <value>, ... }\nhelpers.arrayElements: { array: [<value>, ...], { count: <number> | { min: <number>, max: <number> } }\nhelpers.fromRegExp: '<regex>'\nairline.flightNumber: { addLeadingZeros: <boolean>, length: <number> | { min: <number>, max: <number> } }\nairline.recordLocator: { allowNumeric: <boolean>, allowVisuallySimilarCharacters: <boolean> }\nairline.seat: { aircraftType: 'narrowbody' | 'regional' | 'widebody' }\ncommerce.isbn: { separator?: <string>, variant: 10 | 13 } \ncommerce.price: { dec?: <number>, max?: <number>, min?: <number> }\ndatatype.boolean: { probability?: <number> }\ndate.anytime: { refDate?: <string> | <number> | <Date> }\ndate.between: { from: <string> | <number> | <Date>, to: <string> | <number> | <Date> }\ndate.betweens: { from: <string> | <number> | <Date>, to: <string> | <number> | <Date>, count: <number> | { min: <number>, max: <number> } }\ndate.birthdate: { refDate?: <string> | <number> | <Date>, min: <number>, max: <number>, mode: 'age' | 'year' }\ndate.future, date.past: { refDate?: <string> | <number> | <Date>, years?: <number> }\ndate.month, date.weekday: { abbreviated?: <boolean>, context?: <boolean> }\ndate.recent, date.soon: { refDate?: <string> | <number> | <Date>, days?: <number> }\nfinance.accountNumber: { optionsOrLength?: <number> | { length: <number> } }\nfinance.amount: { autoFormat?: <boolean>, dec?: <number>, max?: <number>, min?: <number> }\nfinance.bic: { includeBranchCode?: <boolean> }\nfinance.bitcoinAddress: { network?: 'mainnet' | 'testnet', type?: 'legacy' | 'segwit' | 'bech32' | 'taproot' }\nfinance.creditCardNumber: { issuer?: <string> }\nfinance.iban: { formatted?: <boolean>, countryCode?: <string> }\nfinance.maskedNumber: { ellipsis?: <boolean>, length?: <number>, parens?: <boolean> }\nfinance.pin: { length?: <number> }\nnumber.int: { max: 100000, min: 1 }\nnumber.float: { max: 100000, min: 1 }\nphone.number: { style?: 'international' | 'national' | 'human' }\nstring.alpha, string.alphaNumeric: { casing?: 'lower' | 'upper' | 'mixed', length?: <number>, exclude?: <string> | <AlphaChar | string>[] }\nstring.binary: { length?: <number>, prefix?: <string> }\nstring.fromCharacters: { characters: <string> | <string>[], length: <number> | { min: <number>, max: <number> } }\nstring.hexadecimal: { length?: <number>, prefix?: <string>, casing?: 'lower' | 'upper' | 'mixed' }\n\n";
2
- //# sourceMappingURL=fake-options.d.ts.map
@@ -2,4 +2,3 @@
2
2
  * Flat list of faker.js method paths (e.g. `number.int`) for the build-data-model system prompt.
3
3
  */
4
4
  export declare function buildFakerTypeMethodList(): string[];
5
- //# sourceMappingURL=faker-type-list.d.ts.map
@@ -3,4 +3,3 @@ export { fakerOptions } from './fake-options';
3
3
  export { buildFakerTypeMethodList } from './faker-type-list';
4
4
  export { validateAndFixRelationships } from './validate-relationships';
5
5
  export * from './types';
6
- //# sourceMappingURL=index.d.ts.map
@@ -21,8 +21,8 @@ export declare const dataModelDocumentSchema: z.ZodObject<{
21
21
  isPrimaryKey: z.ZodBoolean;
22
22
  isForeignKey: z.ZodBoolean;
23
23
  type: z.ZodEnum<{
24
- text: "text";
25
24
  datetime: "datetime";
25
+ text: "text";
26
26
  numeric: "numeric";
27
27
  }>;
28
28
  fakerType: z.ZodString;
@@ -51,8 +51,8 @@ export declare const dataModelJsonPatchSchema: z.ZodUnion<readonly [z.ZodObject<
51
51
  isPrimaryKey: z.ZodBoolean;
52
52
  isForeignKey: z.ZodBoolean;
53
53
  type: z.ZodEnum<{
54
- text: "text";
55
54
  datetime: "datetime";
55
+ text: "text";
56
56
  numeric: "numeric";
57
57
  }>;
58
58
  fakerType: z.ZodString;
@@ -75,8 +75,8 @@ export declare const dataModelJsonPatchSchema: z.ZodUnion<readonly [z.ZodObject<
75
75
  isPrimaryKey: z.ZodBoolean;
76
76
  isForeignKey: z.ZodBoolean;
77
77
  type: z.ZodEnum<{
78
- text: "text";
79
78
  datetime: "datetime";
79
+ text: "text";
80
80
  numeric: "numeric";
81
81
  }>;
82
82
  fakerType: z.ZodString;
@@ -128,4 +128,3 @@ export interface BuildDataModelContext {
128
128
  onStreamHistory?: (payload: DataModelStreamHistoryPayload) => void;
129
129
  abortSignal?: AbortSignal;
130
130
  }
131
- //# sourceMappingURL=types.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import { DataModelTable } from './types';
2
2
  export declare function validateAndFixRelationships(tables: DataModelTable[]): DataModelTable[];
3
- //# sourceMappingURL=validate-relationships.d.ts.map
@@ -8,4 +8,3 @@ import { buildQuerySchema, BuildQueryContext, QueryResult } from './types';
8
8
  * @returns The query result with queryId, nlqResult, and dataset
9
9
  */
10
10
  export declare function buildQueryEngine(params: z.infer<typeof buildQuerySchema>, context: BuildQueryContext): Promise<QueryResult>;
11
- //# sourceMappingURL=build-query-engine.d.ts.map
@@ -1,3 +1,2 @@
1
1
  export { buildQueryEngine } from './build-query-engine';
2
2
  export * from './types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -54,4 +54,3 @@ export interface QuerySummary {
54
54
  * @param includeDataset - Whether to include the full dataset (enables natural response). When false, returns a directive to build a chart instead.
55
55
  */
56
56
  export declare function toQuerySummary(result: QueryResult, includeDataset?: boolean): QuerySummary;
57
- //# sourceMappingURL=types.d.ts.map
@@ -7,4 +7,3 @@ import { getDashboardsSchema, GetDashboardsContext, DashboardsResult } from './t
7
7
  * @returns The dashboards result with list of dashboards
8
8
  */
9
9
  export declare function getDashboardsEngine(params: z.infer<typeof getDashboardsSchema>, context: GetDashboardsContext): Promise<DashboardsResult>;
10
- //# sourceMappingURL=get-dashboards-engine.d.ts.map
@@ -1,3 +1,2 @@
1
1
  export { getDashboardsEngine } from './get-dashboards-engine';
2
2
  export * from './types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -29,4 +29,3 @@ export interface DashboardsResult {
29
29
  */
30
30
  dashboards: Dashboard[];
31
31
  }
32
- //# sourceMappingURL=types.d.ts.map
@@ -26,4 +26,3 @@ export declare function buildCompactSharedFormulas(formulas: MeasureItemJSON[]):
26
26
  * @returns A compact schema string with table and column names, and shared formulas when provided
27
27
  */
28
28
  export declare function getDataSourceFieldsSummary(dataSourceTitle: string, fields: DataSourceFieldWithDescription[] | DataSourceField[], formulas?: MeasureItemJSON[]): string;
29
- //# sourceMappingURL=get-data-source-fields-engine.d.ts.map
@@ -1,3 +1,2 @@
1
1
  export { getDataSourceFieldsEngine, getDataSourceFieldsSummary, } from './get-data-source-fields-engine';
2
2
  export * from './types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -7,12 +7,13 @@ import { MeasureItemJSON } from '@sisense/sdk-ui/analytics-composer';
7
7
  * Canonical tool description for getDataSourceFields — reusable by any host (sdk-assistant, MCP server, custom integrations).
8
8
  * Hosts may append host-specific notes but should not duplicate or contradict this text.
9
9
  */
10
- export declare const getDataSourceFieldsToolDescription = "Get details of a data source's fields \u2014 tables, columns, and user-created formulas \u2014 as a flat list. Use this metadata to build queries, charts, or dashboards.\n\nNOT the right tool for \"explore / show me / view the model\" as a visual diagram. That is getModelSchema (interactive model diagram when the host supports it). Only call this tool when you need the column list for a downstream query-building step, never as the default exploration action.";
10
+ export declare const getDataSourceFieldsToolDescription = "Lists the fields of a data source \u2014 its tables, columns, and user-created formulas \u2014 in an interactive, searchable field browser. THIS is the tool to use whenever the user asks to \"list / show / see the fields, tables, or columns\" of a data source or data model. Pass the data source / model title from getDataSources or listDataModels.\n\nUse this for the FIELD/COLUMN/TABLE LIST. Use getModelSchema (or getPerspective) only for the visual model/perspective DIAGRAM (\"show me the model / perspective\", \"open the diagram\") \u2014 not for a plain field list. Do not answer a \"list the fields/columns/tables\" request as plain text; always call this tool so the field browser renders.\n\nPERSPECTIVES: a perspective is not its own data source. To list a perspective's fields, set `dataSourceTitle` to the perspective's PARENT model title and pass `perspectiveOid` \u2014 the parent model's fields are then filtered to exactly what the perspective exposes.";
11
11
  /**
12
12
  * Schema for getDataSourceFields engine parameters
13
13
  */
14
14
  export declare const getDataSourceFieldsSchema: z.ZodObject<{
15
15
  dataSourceTitle: z.ZodString;
16
+ perspectiveOid: z.ZodOptional<z.ZodString>;
16
17
  }, z.core.$strip>;
17
18
  /**
18
19
  * Context interface for getDataSourceFieldsEngine
@@ -33,4 +34,3 @@ export interface DataSourceFieldsResult {
33
34
  /** Shared formulas as JSON */
34
35
  formulas?: MeasureItemJSON[];
35
36
  }
36
- //# sourceMappingURL=types.d.ts.map
@@ -7,4 +7,3 @@ import { getDataSourcesSchema, GetDataSourcesContext, DataSourcesResult } from '
7
7
  * @returns The data sources summary with titles and full objects
8
8
  */
9
9
  export declare function getDataSourcesEngine(params: z.infer<typeof getDataSourcesSchema>, context: GetDataSourcesContext): Promise<DataSourcesResult>;
10
- //# sourceMappingURL=get-data-sources-engine.d.ts.map
@@ -1,3 +1,2 @@
1
1
  export { getDataSourcesEngine } from './get-data-sources-engine';
2
2
  export * from './types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -37,4 +37,3 @@ export interface DataSourcesResult {
37
37
  */
38
38
  dataSources: DataSourceWithStatus[];
39
39
  }
40
- //# sourceMappingURL=types.d.ts.map
@@ -12,4 +12,3 @@ export * from './recommend-queries';
12
12
  export * from './build-data-model';
13
13
  export * from './manage-perspectives';
14
14
  export * from './build-csv-model';
15
- //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,2 @@
1
1
  export { listDataModelsEngine, getModelSchemaEngine, addRelationEngine, removeRelationEngine, createPerspectiveEngine, updatePerspectiveEngine, getPerspectiveEngine, triggerBuildEngine, listPerspectivesEngine, } from './manage-perspectives-engine';
2
2
  export * from './types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -9,4 +9,3 @@ export declare function updatePerspectiveEngine(params: z.infer<typeof updatePer
9
9
  export declare function getPerspectiveEngine(params: z.infer<typeof getPerspectiveParamsSchema>, context: PerspectiveEngineContext): Promise<GetPerspectiveResult>;
10
10
  export declare function listPerspectivesEngine(params: z.infer<typeof listPerspectivesParamsSchema>, context: PerspectiveEngineContext): Promise<ListPerspectivesResult>;
11
11
  export declare function triggerBuildEngine(params: z.infer<typeof triggerBuildParamsSchema>, context: PerspectiveEngineContext): Promise<TriggerBuildResult>;
12
- //# sourceMappingURL=manage-perspectives-engine.d.ts.map
@@ -65,6 +65,13 @@ export interface ModelSchemaResult {
65
65
  title: string;
66
66
  tables: ModelTable[];
67
67
  relations: ModelRelation[];
68
+ /**
69
+ * Present when this schema is a PERSPECTIVE view of the data model
70
+ * (`datamodelOid` is the parent model). `tables`/`relations` are filtered to
71
+ * what the perspective exposes, with per-table columns narrowed by the
72
+ * perspective's include/exclude rules.
73
+ */
74
+ perspectiveOid?: string;
68
75
  }
69
76
  export declare const createPerspectiveParamsSchema: z.ZodObject<{
70
77
  datamodelOid: z.ZodString;
@@ -160,6 +167,13 @@ export interface GetPerspectiveResult {
160
167
  oid: string;
161
168
  }>;
162
169
  isDefault?: boolean;
170
+ /**
171
+ * Resolved, NAMED schema this perspective exposes — parent-model tables and
172
+ * columns filtered by the perspective's include/exclude rules. Use this to
173
+ * answer "what tables/columns/fields are in this perspective". Undefined only
174
+ * if the parent model couldn't be fetched.
175
+ */
176
+ schema?: ModelSchemaResult;
163
177
  }
164
178
  export declare const triggerBuildParamsSchema: z.ZodObject<{
165
179
  datamodelOid: z.ZodString;
@@ -172,7 +186,7 @@ export interface TriggerBuildResult {
172
186
  durationMs?: number;
173
187
  }
174
188
  export declare const listPerspectivesParamsSchema: z.ZodObject<{
175
- datamodelOid: z.ZodOptional<z.ZodString>;
189
+ datamodelOid: z.ZodString;
176
190
  includeDefault: z.ZodOptional<z.ZodBoolean>;
177
191
  }, z.core.$strip>;
178
192
  export interface PerspectiveSummary {
@@ -199,7 +213,7 @@ export declare const listDataModelsToolDescription = "Lists all Sisense data mod
199
213
  /**
200
214
  * Canonical tool description for getModelSchema — reusable by any host.
201
215
  */
202
- export declare const getModelSchemaToolDescription = "Fetches the full schema of a Sisense data model: all tables with their OIDs and columns (with OIDs and types), plus all relation OIDs.\n\nIMPORTANT: The datamodelOid parameter MUST be a UUID \u2014 use the `oid` field from a `getDataSources` or `listDataModels` result in the current conversation. Never use an OID from memory, context, or examples. Perspective OIDs and legacy datasource string IDs (e.g. \"localhost_aSampleECommerce\") are NOT valid here.\n\nThis is the canonical \"show / explore / view / open the data model\" action (including drafts for inspection). When the user picks a model or uses those verbs about a specific model by name, use the model's oid from the latest getDataSources result. Do not ask \"schema or build?\" for a simple show-model request. Do not use getDataSourceFields as the default exploration action \u2014 that returns a flat field list, not the model diagram.\n\nThis is step 2 of the perspective workflow. After this returns, propose 2-4 concrete perspective ideas (each with: name, tables included, columns hidden, intended audience) and ASK the user which one to create. STOP and wait \u2014 do NOT call createPerspective in the same turn.\n\nPerspective workflow pacing: prefer one major conversational step per assistant reply where possible \u2014 list what exists, inspect and discuss the schema with the user, agree on a design, then call createPerspective in a later focused turn once choices are clear (rather than jumping from first discovery straight to creation in one reply when the user has not confirmed direction).";
216
+ export declare const getModelSchemaToolDescription = "Fetches the full schema of a Sisense data model: all tables with their OIDs and columns (with OIDs and types), plus all relation OIDs.\n\nIMPORTANT: The datamodelOid parameter MUST be a UUID \u2014 use the `oid` field from a `getDataSources` / `listDataModels` result, or a `perspectiveOid` from `listPerspectives`, in the current conversation. Never use an OID from memory, context, or examples. Legacy datasource string IDs (e.g. \"localhost_aSampleECommerce\") are NOT valid here.\n\nPERSPECTIVES: if you pass a perspective's OID, the schema is resolved to that perspective \u2014 tables/columns are filtered to what the perspective exposes and `perspectiveOid` is set on the result. Use getPerspective for the perspective's diagram.\n\nThis is the canonical \"show / explore / view / open the data model\" DIAGRAM action (including drafts for inspection). When the user picks a model or uses those verbs about a specific model by name, use the model's oid from the latest getDataSources result. Do not ask \"schema or build?\" for a simple show-model request.\n\nFor a plain \"list / show the fields, tables, or columns\" request (a field list rather than the diagram), use getDataSourceFields \u2014 the interactive field browser \u2014 not this tool.\n\nThis is step 2 of the perspective workflow. After this returns, propose 2-4 concrete perspective ideas (each with: name, tables included, columns hidden, intended audience) and ASK the user which one to create. STOP and wait \u2014 do NOT call createPerspective in the same turn.\n\nPerspective workflow pacing: prefer one major conversational step per assistant reply where possible \u2014 list what exists, inspect and discuss the schema with the user, agree on a design, then call createPerspective in a later focused turn once choices are clear (rather than jumping from first discovery straight to creation in one reply when the user has not confirmed direction).";
203
217
  /**
204
218
  * Canonical tool description for addRelation — reusable by any host.
205
219
  */
@@ -211,7 +225,7 @@ export declare const removeRelationToolDescription = "Removes a join relationshi
211
225
  /**
212
226
  * Canonical tool description for createPerspective — reusable by any host.
213
227
  */
214
- export declare const createPerspectiveToolDescription = "Creates a new perspective (filtered sub-model) on a Sisense data model. This is step 3 \u2014 the final step \u2014 of the perspective workflow.\n\nFor a new perspective, work in stages: first discover models and wait for the user to pick one, then fetch schema and wait for design agreement, then call this tool in its own turn with OIDs from that schema \u2014 never skip discovery or schema in the same turn as create.\n\nCall getModelSchema first (step 2) to get exact table OIDs, column OIDs, and relation OIDs. Use ONLY OIDs from that schema response \u2014 never invent or guess OIDs.\n\nAfter the user picks a perspective option (or describes a custom one), call this tool IMMEDIATELY in the same turn. Do not ask further confirmation. The host typically opens an interactive diagram of the perspective \u2014 reply with a one-line confirmation; do not narrate the diagram in detail.\n\ndiffType rules:\n- \"include\": allowlist \u2014 only columns listed with enabled:true are visible. Use when exposing a small subset.\n- \"exclude\": denylist \u2014 all columns visible except those listed with enabled:false. Use when hiding a few sensitive columns.\n\ncolumnsDiff must never be empty \u2014 for \"include\" list every visible column with enabled:true; for \"exclude\" list at least one hidden column with enabled:false.\n\nInclude a relation OID only when both connected tables are in the perspective's tables list.";
228
+ export declare const createPerspectiveToolDescription = "Creates a new perspective (filtered sub-model) on a Sisense data model. This is step 3 \u2014 the final step \u2014 of the perspective workflow.\n\nPRECONDITION (HARD RULE): the data model MUST have been built at least once. Perspectives CANNOT be created on a draft / never-built model \u2014 the create will fail. If the target model is a draft (a getDataSources entry with status:'draft', or a model with no successful build), do NOT call this tool. Instead tell the user the model must be built first and offer to run triggerBuild; only create the perspective after a successful build.\n\nFor a new perspective, work in stages: first discover models and wait for the user to pick one, then fetch schema and wait for design agreement, then call this tool in its own turn with OIDs from that schema \u2014 never skip discovery or schema in the same turn as create.\n\nCall getModelSchema first (step 2) to get exact table OIDs, column OIDs, and relation OIDs. Use ONLY OIDs from that schema response \u2014 never invent or guess OIDs.\n\nAfter the user picks a perspective option (or describes a custom one), call this tool IMMEDIATELY in the same turn. Do not ask further confirmation. The host typically opens an interactive diagram of the perspective \u2014 reply with a one-line confirmation; do not narrate the diagram in detail.\n\ndiffType rules:\n- \"include\": allowlist \u2014 only columns listed with enabled:true are visible. Use when exposing a small subset.\n- \"exclude\": denylist \u2014 all columns visible except those listed with enabled:false. Use when hiding a few sensitive columns.\n\ncolumnsDiff must never be empty \u2014 for \"include\" list every visible column with enabled:true; for \"exclude\" list at least one hidden column with enabled:false.\n\nInclude a relation OID only when both connected tables are in the perspective's tables list.";
215
229
  /**
216
230
  * Canonical tool description for updatePerspective — reusable by any host.
217
231
  */
@@ -219,7 +233,7 @@ export declare const updatePerspectiveToolDescription = "Updates an existing Sis
219
233
  /**
220
234
  * Canonical tool description for getPerspective — reusable by any host.
221
235
  */
222
- export declare const getPerspectiveToolDescription = "Fetches the current state of a Sisense perspective. The host typically renders an interactive diagram when supported.\n\nCall ONLY when the user references a specific perspective by name, asks to view/open/show that perspective, after listPerspectives when they pick one, or directly after a successful updatePerspective.\n\nDo NOT call as a follow-up to getModelSchema for a generic \"show me the model diagram\" \u2014 that is model-level (getModelSchema). Do NOT also call when the user only named the parent data model unless they named a perspective.\n\nThis always fetches fresh state from the server \u2014 never rely on cached args from prior tool calls.\n\nReply with a one-line confirmation; do not narrate the diagram in detail.";
236
+ export declare const getPerspectiveToolDescription = "Fetches the current state of a Sisense perspective AND its resolved schema. The host typically renders an interactive diagram when supported.\n\nReturns the perspective's include/exclude rules (tables[] with diffType + columnsDiff) plus `schema`: the NAMED tables and columns the perspective actually exposes (parent-model schema filtered by those rules). Use `schema` to answer \"what fields/tables/columns are in this perspective\" \u2014 list from schema.tables[].name and schema.tables[].columns[].name.\n\nCall when the user references a specific perspective by name and asks to view / open / show THE PERSPECTIVE (its diagram). This renders the perspective's visual diagram on the canvas \u2014 it is the perspective counterpart of getModelSchema.\n\nFor a plain \"list / show the fields, tables, or columns\" request, use getDataSourceFields (the field browser), not this tool \u2014 this one is the diagram view.\n\nDo NOT call as a follow-up to getModelSchema for a generic \"show me the model diagram\" \u2014 that is model-level (getModelSchema). Do NOT also call when the user only named the parent data model unless they named a perspective.\n\nThis always fetches fresh state from the server \u2014 never rely on cached args from prior tool calls.\n\nReply with a one-line confirmation; do not narrate the diagram in detail.";
223
237
  /**
224
238
  * Canonical tool description for triggerBuild — reusable by any host.
225
239
  */
@@ -227,5 +241,4 @@ export declare const triggerBuildToolDescription = "Triggers a full build of a S
227
241
  /**
228
242
  * Canonical tool description for listPerspectives — reusable by any host.
229
243
  */
230
- export declare const listPerspectivesToolDescription = "Lists Sisense perspectives. Use whenever the user asks to:\n- \"see / list / show me the perspectives\" (with or without a specific model)\n- \"what perspectives exist on this model\"\n- review existing perspectives before deciding to create / update / delete one\n\nPass datamodelOid to scope to a single model; omit it for a global list across every model the user has access to. Set includeDefault:false to hide the auto-generated Default perspectives.\n\nAfter the result, present the user with a short numbered/bulleted summary (name, table count, default vs custom) and ask which one they want to inspect \u2014 then call getPerspective to render its diagram.";
231
- //# sourceMappingURL=types.d.ts.map
244
+ export declare const listPerspectivesToolDescription = "Lists the perspectives of ONE data model. Use whenever the user asks to:\n- \"see / list / show me the perspectives\" of a model\n- \"what perspectives exist on this model\"\n- review existing perspectives before deciding to create / update / delete one\n\ndatamodelOid is REQUIRED \u2014 perspectives are always scoped to a single model and there is no list-everything mode (an instance can have hundreds across all models). If the user hasn't picked a model yet, do NOT call this tool: first ask them which data model (use getDataSources / listDataModels to show options), then call this with that model's oid. Set includeDefault:false to hide the auto-generated Default perspective.\n\nAfter the result, present a short numbered/bulleted summary (name, table count, default vs custom) and ask which one they want to inspect \u2014 then call getPerspective to render its diagram.";
@@ -1,3 +1,2 @@
1
1
  export { recommendQueriesEngine, extractChartTypeFromPrompt, buildContextualPrompt, } from './recommend-queries-engine';
2
2
  export * from './types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -17,4 +17,3 @@ export declare function buildContextualPrompt(userPrompt?: string, existingWidge
17
17
  * @returns The recommendations result with query and chart recommendations
18
18
  */
19
19
  export declare function recommendQueriesEngine(params: z.infer<typeof recommendQueriesSchema>, context: RecommendQueriesContext, onIntermediateResults?: OnIntermediateResultsCallback): Promise<RecommendQueriesResult>;
20
- //# sourceMappingURL=recommend-queries-engine.d.ts.map
@@ -55,4 +55,3 @@ export type OnIntermediateResultsCallback = (recommendations: QueryAndChartRecom
55
55
  * Chart type keywords mapping for extraction from user prompts
56
56
  */
57
57
  export declare const CHART_TYPE_KEYWORDS: Record<string, ChartType>;
58
- //# sourceMappingURL=types.d.ts.map
@@ -9,4 +9,3 @@ export declare function getFiltersJsonForLlmSummary(csdkFilters: Filter[] | Filt
9
9
  * {@link FunctionCall} nodes for typed LLM payloads (unknown entries are dropped).
10
10
  */
11
11
  export declare function getFunctionCallFiltersForLlmSummary(csdkFilters: Filter[] | FilterRelations | readonly Filter[] | undefined | null): FunctionCall[];
12
- //# sourceMappingURL=get-filters-json-for-llm-summary.d.ts.map
@@ -12,4 +12,3 @@ export declare function augmentNlqTextWithPriorState(userText: string, priorStat
12
12
  };
13
13
  /** Call NLQ V3 smartQuery API; maps wire `chartState` to domain `queryState`. */
14
14
  export declare function executeNlqV3Query(dataSourceTitle: string, queryPrompt: string, httpClient?: HttpClient, commonFilters?: unknown, priorQueryState?: QueryState, isNlqDeltaEnabled?: boolean): Promise<QueryExecutionResult | null>;
15
- //# sourceMappingURL=nlq-query-helpers.d.ts.map
package/dist/index.d.ts CHANGED
@@ -31,4 +31,3 @@ export * from './services/data-models/ecm-service';
31
31
  export * from './services/llm/llm-settings-service';
32
32
  export * from './services/llm/llm-consumption-service';
33
33
  export * from './services/llm/llm-models-service';
34
- //# sourceMappingURL=index.d.ts.map