@salesforce/lds-adapters-sfap-analytics-insights 1.358.0 → 1.360.0

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.
@@ -469,11 +469,25 @@ function validate$x(obj, path = 'SemanticFilter') {
469
469
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
470
470
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
471
471
  }
472
+ if (obj.aggregationMethod !== undefined) {
473
+ const obj_aggregationMethod = obj.aggregationMethod;
474
+ const path_aggregationMethod = path + '.aggregationMethod';
475
+ if (typeof obj_aggregationMethod !== 'string') {
476
+ return new TypeError('Expected "string" but received "' + typeof obj_aggregationMethod + '" (at "' + path_aggregationMethod + '")');
477
+ }
478
+ }
472
479
  const obj_fieldName = obj.fieldName;
473
480
  const path_fieldName = path + '.fieldName';
474
481
  if (typeof obj_fieldName !== 'string') {
475
482
  return new TypeError('Expected "string" but received "' + typeof obj_fieldName + '" (at "' + path_fieldName + '")');
476
483
  }
484
+ if (obj.fieldType !== undefined) {
485
+ const obj_fieldType = obj.fieldType;
486
+ const path_fieldType = path + '.fieldType';
487
+ if (typeof obj_fieldType !== 'string') {
488
+ return new TypeError('Expected "string" but received "' + typeof obj_fieldType + '" (at "' + path_fieldType + '")');
489
+ }
490
+ }
477
491
  const obj_operator = obj.operator;
478
492
  const path_operator = path + '.operator';
479
493
  if (typeof obj_operator !== 'string') {
@@ -486,6 +500,20 @@ function validate$x(obj, path = 'SemanticFilter') {
486
500
  return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
487
501
  }
488
502
  }
503
+ if (obj.values !== undefined) {
504
+ const obj_values = obj.values;
505
+ const path_values = path + '.values';
506
+ if (!ArrayIsArray(obj_values)) {
507
+ return new TypeError('Expected "array" but received "' + typeof obj_values + '" (at "' + path_values + '")');
508
+ }
509
+ for (let i = 0; i < obj_values.length; i++) {
510
+ const obj_values_item = obj_values[i];
511
+ const path_values_item = path_values + '[' + i + ']';
512
+ if (typeof obj_values_item !== 'string') {
513
+ return new TypeError('Expected "string" but received "' + typeof obj_values_item + '" (at "' + path_values_item + '")');
514
+ }
515
+ }
516
+ }
489
517
  })();
490
518
  return v_error === undefined ? null : v_error;
491
519
  }
@@ -1518,6 +1546,14 @@ function ingestSuccess$4(luvio, resourceParams, response) {
1518
1546
  }
1519
1547
  function createResourceRequest$4(config) {
1520
1548
  const headers = {};
1549
+ const header_xSfdcSourceapp = config.headers.xSfdcSourceapp;
1550
+ if (header_xSfdcSourceapp !== undefined) {
1551
+ headers['x-sfdc-sourceapp'] = header_xSfdcSourceapp;
1552
+ }
1553
+ const header_xSfdcSourcecontext = config.headers.xSfdcSourcecontext;
1554
+ if (header_xSfdcSourcecontext !== undefined) {
1555
+ headers['x-sfdc-sourcecontext'] = header_xSfdcSourcecontext;
1556
+ }
1521
1557
  return {
1522
1558
  baseUri: 'api.salesforce.com',
1523
1559
  basePath: '/analytics/insights/v1/batches',
@@ -1534,11 +1570,14 @@ const adapterName$4 = 'createInsightsBatch';
1534
1570
  const createInsightsBatch_ConfigPropertyMetadata = [
1535
1571
  generateParamConfigMetadata('batchInput', false, 2 /* Body */, 4 /* Unsupported */, true),
1536
1572
  generateParamConfigMetadata('options', false, 2 /* Body */, 4 /* Unsupported */),
1573
+ generateParamConfigMetadata('xSfdcSourceapp', false, 3 /* Header */, 0 /* String */),
1574
+ generateParamConfigMetadata('xSfdcSourcecontext', false, 3 /* Header */, 0 /* String */),
1537
1575
  ];
1538
1576
  const createInsightsBatch_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createInsightsBatch_ConfigPropertyMetadata);
1539
1577
  const createResourceParams$4 = /*#__PURE__*/ createResourceParams$5(createInsightsBatch_ConfigPropertyMetadata);
1540
1578
  function typeCheckConfig$4(untrustedConfig) {
1541
1579
  const config = {};
1580
+ typeCheckConfig$5(untrustedConfig, config, createInsightsBatch_ConfigPropertyMetadata);
1542
1581
  const untrustedConfig_batchInput = untrustedConfig.batchInput;
1543
1582
  if (ArrayIsArray$1(untrustedConfig_batchInput)) {
1544
1583
  const untrustedConfig_batchInput_array = [];
@@ -1865,6 +1904,14 @@ function ingestSuccess$3(luvio, resourceParams, response) {
1865
1904
  }
1866
1905
  function createResourceRequest$3(config) {
1867
1906
  const headers = {};
1907
+ const header_xSfdcSourceapp = config.headers.xSfdcSourceapp;
1908
+ if (header_xSfdcSourceapp !== undefined) {
1909
+ headers['x-sfdc-sourceapp'] = header_xSfdcSourceapp;
1910
+ }
1911
+ const header_xSfdcSourcecontext = config.headers.xSfdcSourcecontext;
1912
+ if (header_xSfdcSourcecontext !== undefined) {
1913
+ headers['x-sfdc-sourcecontext'] = header_xSfdcSourcecontext;
1914
+ }
1868
1915
  return {
1869
1916
  baseUri: 'api.salesforce.com',
1870
1917
  basePath: '/analytics/insights/v1/filterValues',
@@ -1886,6 +1933,8 @@ const getMetricFilterValues_ConfigPropertyMetadata = [
1886
1933
  generateParamConfigMetadata('searchTerm', false, 2 /* Body */, 0 /* String */),
1887
1934
  generateParamConfigMetadata('filters', false, 2 /* Body */, 4 /* Unsupported */, true),
1888
1935
  generateParamConfigMetadata('semanticFilter', false, 2 /* Body */, 4 /* Unsupported */),
1936
+ generateParamConfigMetadata('xSfdcSourceapp', false, 3 /* Header */, 0 /* String */),
1937
+ generateParamConfigMetadata('xSfdcSourcecontext', false, 3 /* Header */, 0 /* String */),
1889
1938
  ];
1890
1939
  const getMetricFilterValues_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getMetricFilterValues_ConfigPropertyMetadata);
1891
1940
  const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(getMetricFilterValues_ConfigPropertyMetadata);
@@ -3133,6 +3182,14 @@ function ingestSuccess$2(luvio, resourceParams, response) {
3133
3182
  }
3134
3183
  function createResourceRequest$2(config) {
3135
3184
  const headers = {};
3185
+ const header_xSfdcSourceapp = config.headers.xSfdcSourceapp;
3186
+ if (header_xSfdcSourceapp !== undefined) {
3187
+ headers['x-sfdc-sourceapp'] = header_xSfdcSourceapp;
3188
+ }
3189
+ const header_xSfdcSourcecontext = config.headers.xSfdcSourcecontext;
3190
+ if (header_xSfdcSourcecontext !== undefined) {
3191
+ headers['x-sfdc-sourcecontext'] = header_xSfdcSourcecontext;
3192
+ }
3136
3193
  return {
3137
3194
  baseUri: 'api.salesforce.com',
3138
3195
  basePath: '/analytics/insights/v1/generateBundle',
@@ -3151,6 +3208,8 @@ const generateInsights_ConfigPropertyMetadata = [
3151
3208
  generateParamConfigMetadata('version', false, 2 /* Body */, 3 /* Integer */),
3152
3209
  generateParamConfigMetadata('input', false, 2 /* Body */, 4 /* Unsupported */),
3153
3210
  generateParamConfigMetadata('options', false, 2 /* Body */, 4 /* Unsupported */),
3211
+ generateParamConfigMetadata('xSfdcSourceapp', false, 3 /* Header */, 0 /* String */),
3212
+ generateParamConfigMetadata('xSfdcSourcecontext', false, 3 /* Header */, 0 /* String */),
3154
3213
  ];
3155
3214
  const generateInsights_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, generateInsights_ConfigPropertyMetadata);
3156
3215
  const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(generateInsights_ConfigPropertyMetadata);
@@ -3236,6 +3295,14 @@ function ingestSuccess$1(luvio, resourceParams, response) {
3236
3295
  }
3237
3296
  function createResourceRequest$1(config) {
3238
3297
  const headers = {};
3298
+ const header_xSfdcSourceapp = config.headers.xSfdcSourceapp;
3299
+ if (header_xSfdcSourceapp !== undefined) {
3300
+ headers['x-sfdc-sourceapp'] = header_xSfdcSourceapp;
3301
+ }
3302
+ const header_xSfdcSourcecontext = config.headers.xSfdcSourcecontext;
3303
+ if (header_xSfdcSourcecontext !== undefined) {
3304
+ headers['x-sfdc-sourcecontext'] = header_xSfdcSourcecontext;
3305
+ }
3239
3306
  return {
3240
3307
  baseUri: 'api.salesforce.com',
3241
3308
  basePath: '/analytics/insights/v1/basic/generateBundle',
@@ -3254,6 +3321,8 @@ const generateInsightsBasic_ConfigPropertyMetadata = [
3254
3321
  generateParamConfigMetadata('version', false, 2 /* Body */, 3 /* Integer */),
3255
3322
  generateParamConfigMetadata('input', false, 2 /* Body */, 4 /* Unsupported */),
3256
3323
  generateParamConfigMetadata('options', false, 2 /* Body */, 4 /* Unsupported */),
3324
+ generateParamConfigMetadata('xSfdcSourceapp', false, 3 /* Header */, 0 /* String */),
3325
+ generateParamConfigMetadata('xSfdcSourcecontext', false, 3 /* Header */, 0 /* String */),
3257
3326
  ];
3258
3327
  const generateInsightsBasic_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, generateInsightsBasic_ConfigPropertyMetadata);
3259
3328
  const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(generateInsightsBasic_ConfigPropertyMetadata);
@@ -3570,6 +3639,14 @@ function ingestError(luvio, params, error, snapshotRefresh) {
3570
3639
  }
3571
3640
  function createResourceRequest(config) {
3572
3641
  const headers = {};
3642
+ const header_xSfdcSourceapp = config.headers.xSfdcSourceapp;
3643
+ if (header_xSfdcSourceapp !== undefined) {
3644
+ headers['x-sfdc-sourceapp'] = header_xSfdcSourceapp;
3645
+ }
3646
+ const header_xSfdcSourcecontext = config.headers.xSfdcSourcecontext;
3647
+ if (header_xSfdcSourcecontext !== undefined) {
3648
+ headers['x-sfdc-sourcecontext'] = header_xSfdcSourcecontext;
3649
+ }
3573
3650
  return {
3574
3651
  baseUri: 'api.salesforce.com',
3575
3652
  basePath: '/analytics/insights/v1/batches/' + config.urlParams.batchId + '',
@@ -3585,6 +3662,8 @@ function createResourceRequest(config) {
3585
3662
  const adapterName = 'getInsightsBatch';
3586
3663
  const getInsightsBatch_ConfigPropertyMetadata = [
3587
3664
  generateParamConfigMetadata('batchId', true, 0 /* UrlParameter */, 0 /* String */),
3665
+ generateParamConfigMetadata('xSfdcSourceapp', false, 3 /* Header */, 0 /* String */),
3666
+ generateParamConfigMetadata('xSfdcSourcecontext', false, 3 /* Header */, 0 /* String */),
3588
3667
  ];
3589
3668
  const getInsightsBatch_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getInsightsBatch_ConfigPropertyMetadata);
3590
3669
  const createResourceParams = /*#__PURE__*/ createResourceParams$5(getInsightsBatch_ConfigPropertyMetadata);
@@ -8,6 +8,8 @@ export declare const adapterName = "createInsightsBatch";
8
8
  export declare const createInsightsBatch_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
9
9
  export declare const createInsightsBatch_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
10
10
  export interface CreateInsightsBatchConfig {
11
+ xSfdcSourceapp?: string;
12
+ xSfdcSourcecontext?: string;
11
13
  batchInput?: Array<types_BatchInput_BatchInput>;
12
14
  options?: types_BatchOptions_BatchOptions;
13
15
  }
@@ -8,6 +8,8 @@ export declare const adapterName = "generateInsights";
8
8
  export declare const generateInsights_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
9
9
  export declare const generateInsights_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
10
10
  export interface GenerateInsightsConfig {
11
+ xSfdcSourceapp?: string;
12
+ xSfdcSourcecontext?: string;
11
13
  type?: string;
12
14
  version?: number;
13
15
  input?: types_InsightBundleInput_InsightBundleInput;
@@ -8,6 +8,8 @@ export declare const adapterName = "generateInsightsBasic";
8
8
  export declare const generateInsightsBasic_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
9
9
  export declare const generateInsightsBasic_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
10
10
  export interface GenerateInsightsBasicConfig {
11
+ xSfdcSourceapp?: string;
12
+ xSfdcSourcecontext?: string;
11
13
  type?: string;
12
14
  version?: number;
13
15
  input?: types_InsightBundleInput_InsightBundleInput;
@@ -7,6 +7,8 @@ export declare const getInsightsBatch_ConfigPropertyMetadata: $64$luvio_engine_A
7
7
  export declare const getInsightsBatch_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
8
8
  export interface GetInsightsBatchConfig {
9
9
  batchId: string;
10
+ xSfdcSourceapp?: string;
11
+ xSfdcSourcecontext?: string;
10
12
  }
11
13
  export declare const createResourceParams: (config: GetInsightsBatchConfig) => resources_getAnalyticsInsightsV1BatchesByBatchId_ResourceRequestConfig;
12
14
  export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: GetInsightsBatchConfig): string;
@@ -10,6 +10,8 @@ export declare const adapterName = "getMetricFilterValues";
10
10
  export declare const getMetricFilterValues_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
11
11
  export declare const getMetricFilterValues_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
12
12
  export interface GetMetricFilterValuesConfig {
13
+ xSfdcSourceapp?: string;
14
+ xSfdcSourcecontext?: string;
13
15
  semanticDataModel: types_SemanticDataModel_SemanticDataModel;
14
16
  field: types_FieldId_FieldId;
15
17
  pageToken?: string;
@@ -4,6 +4,10 @@ export interface ResourceRequestConfig {
4
4
  urlParams: {
5
5
  batchId: string;
6
6
  };
7
+ headers: {
8
+ xSfdcSourceapp?: string;
9
+ xSfdcSourcecontext?: string;
10
+ };
7
11
  }
8
12
  export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
9
13
  export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): string;
@@ -9,6 +9,10 @@ export interface ResourceRequestConfig {
9
9
  input?: types_InsightBundleInput_InsightBundleInput;
10
10
  options?: types_InsightBundleOptions_InsightBundleOptions;
11
11
  };
12
+ headers: {
13
+ xSfdcSourceapp?: string;
14
+ xSfdcSourcecontext?: string;
15
+ };
12
16
  }
13
17
  export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
14
18
  export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_GenerateInsightBundleResponse_GenerateInsightBundleResponse): void;
@@ -7,6 +7,10 @@ export interface ResourceRequestConfig {
7
7
  batchInput?: Array<types_BatchInput_BatchInput>;
8
8
  options?: types_BatchOptions_BatchOptions;
9
9
  };
10
+ headers: {
11
+ xSfdcSourceapp?: string;
12
+ xSfdcSourcecontext?: string;
13
+ };
10
14
  }
11
15
  export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
12
16
  export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_GenerateInsightBatchResponse_GenerateInsightBatchResponse): void;
@@ -14,6 +14,10 @@ export interface ResourceRequestConfig {
14
14
  filters?: Array<types_Filter_Filter>;
15
15
  semanticFilter?: types_FlattenFilter_FlattenFilter;
16
16
  };
17
+ headers: {
18
+ xSfdcSourceapp?: string;
19
+ xSfdcSourcecontext?: string;
20
+ };
17
21
  }
18
22
  export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
19
23
  export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_GetFilterValuesResponse_GetFilterValuesResponse): void;
@@ -9,6 +9,10 @@ export interface ResourceRequestConfig {
9
9
  input?: types_InsightBundleInput_InsightBundleInput;
10
10
  options?: types_InsightBundleOptions_InsightBundleOptions;
11
11
  };
12
+ headers: {
13
+ xSfdcSourceapp?: string;
14
+ xSfdcSourcecontext?: string;
15
+ };
12
16
  }
13
17
  export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
14
18
  export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_GenerateInsightBundleResponse_GenerateInsightBundleResponse): void;
@@ -3,7 +3,7 @@ import { FieldId as FieldId_FieldId } from './FieldId';
3
3
  import { RangeFilterOptions as RangeFilterOptions_RangeFilterOptions } from './RangeFilterOptions';
4
4
  import { RelativeDateFilterOptions as RelativeDateFilterOptions_RelativeDateFilterOptions } from './RelativeDateFilterOptions';
5
5
  import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
6
- export declare const VERSION = "59e9f2b69e188e241b1ba88ba663e574";
6
+ export declare const VERSION = "3a96690d739bba901ead314eb111177e";
7
7
  export declare function validate(obj: any, path?: string): TypeError | null;
8
8
  export declare const RepresentationType: string;
9
9
  export declare function normalize(input: Filter, existing: FilterNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FilterNormalized;
@@ -12,7 +12,7 @@ export declare function equals(existing: FilterNormalized, incoming: FilterNorma
12
12
  export declare const ingest: $64$luvio_engine_ResourceIngest;
13
13
  export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: Filter, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
14
14
  /**
15
- *
15
+ * The old dashboard-style filter
16
16
  *
17
17
  * Keys:
18
18
  * (none)
@@ -30,7 +30,7 @@ export interface FilterNormalized {
30
30
  type?: string;
31
31
  }
32
32
  /**
33
- *
33
+ * The old dashboard-style filter
34
34
  *
35
35
  * Keys:
36
36
  * (none)
@@ -0,0 +1,47 @@
1
+ import { MetricInstance as MetricInstance_MetricInstance } from './MetricInstance';
2
+ import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
3
+ export declare const VERSION = "86e90aec54fe6e9f84888deeef409e0d";
4
+ export declare function validate(obj: any, path?: string): TypeError | null;
5
+ export declare const RepresentationType: string;
6
+ export declare function normalize(input: GenerateInsightBundleV2Request, existing: GenerateInsightBundleV2RequestNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): GenerateInsightBundleV2RequestNormalized;
7
+ export declare const select: () => $64$luvio_engine_FragmentSelection;
8
+ export declare function equals(existing: GenerateInsightBundleV2RequestNormalized, incoming: GenerateInsightBundleV2RequestNormalized): boolean;
9
+ export declare const ingest: $64$luvio_engine_ResourceIngest;
10
+ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: GenerateInsightBundleV2Request, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
11
+ /**
12
+ *
13
+ *
14
+ * Keys:
15
+ * (none)
16
+ */
17
+ export interface GenerateInsightBundleV2RequestNormalized {
18
+ /** An identifier used in logging (ie. A client could use the submetric id here) */
19
+ bundleId?: string;
20
+ /** For period over period insights, whether the comparison period is the prior period, or the same period the previous year. If not specified, defaults to TIME_COMPARISON_PREVIOUS_PERIOD */
21
+ comparison?: string;
22
+ metricId?: string;
23
+ metricInstance: MetricInstance_MetricInstance;
24
+ /** Options affecting the generation of the bundle */
25
+ options?: unknown;
26
+ sdmId?: string;
27
+ /** The bundle type to request */
28
+ type?: string;
29
+ /** The version of the bundle type to request */
30
+ version?: number;
31
+ }
32
+ /**
33
+ *
34
+ *
35
+ * Keys:
36
+ * (none)
37
+ */
38
+ export interface GenerateInsightBundleV2Request {
39
+ bundleId?: string;
40
+ comparison?: string;
41
+ metricId?: string;
42
+ metricInstance: MetricInstance_MetricInstance;
43
+ options?: unknown;
44
+ sdmId?: string;
45
+ type?: string;
46
+ version?: number;
47
+ }
@@ -1,5 +1,5 @@
1
1
  import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
2
- export declare const VERSION = "9e95a37f516d75b92b6a5242e60d737b";
2
+ export declare const VERSION = "49eaef4feb2842f23c1044184e330be5";
3
3
  export declare function validate(obj: any, path?: string): TypeError | null;
4
4
  export declare const RepresentationType: string;
5
5
  export declare function normalize(input: SemanticFilter, existing: SemanticFilterNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): SemanticFilterNormalized;
@@ -14,9 +14,12 @@ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableSto
14
14
  * (none)
15
15
  */
16
16
  export interface SemanticFilterNormalized {
17
+ aggregationMethod?: string;
17
18
  fieldName: string;
19
+ fieldType?: string;
18
20
  operator: string;
19
21
  value?: string;
22
+ values?: Array<string>;
20
23
  }
21
24
  /**
22
25
  * Message representing Semantic Filter.
@@ -25,7 +28,10 @@ export interface SemanticFilterNormalized {
25
28
  * (none)
26
29
  */
27
30
  export interface SemanticFilter {
31
+ aggregationMethod?: string;
28
32
  fieldName: string;
33
+ fieldType?: string;
29
34
  operator: string;
30
35
  value?: string;
36
+ values?: Array<string>;
31
37
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-sfap-analytics-insights",
3
- "version": "1.358.0",
3
+ "version": "1.360.0",
4
4
  "description": "APIs for generating insights about metrics",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "dist/es/es2018/sfap-analytics-insights.js",
@@ -40,10 +40,10 @@
40
40
  "test:unit": "jest"
41
41
  },
42
42
  "dependencies": {
43
- "@salesforce/lds-bindings": "^1.358.0"
43
+ "@salesforce/lds-bindings": "^1.360.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@salesforce/lds-compiler-plugins": "^1.358.0"
46
+ "@salesforce/lds-compiler-plugins": "^1.360.0"
47
47
  },
48
48
  "nx": {
49
49
  "targets": {
package/sfdc/index.js CHANGED
@@ -479,11 +479,25 @@ function validate$x(obj, path = 'SemanticFilter') {
479
479
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
480
480
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
481
481
  }
482
+ if (obj.aggregationMethod !== undefined) {
483
+ const obj_aggregationMethod = obj.aggregationMethod;
484
+ const path_aggregationMethod = path + '.aggregationMethod';
485
+ if (typeof obj_aggregationMethod !== 'string') {
486
+ return new TypeError('Expected "string" but received "' + typeof obj_aggregationMethod + '" (at "' + path_aggregationMethod + '")');
487
+ }
488
+ }
482
489
  const obj_fieldName = obj.fieldName;
483
490
  const path_fieldName = path + '.fieldName';
484
491
  if (typeof obj_fieldName !== 'string') {
485
492
  return new TypeError('Expected "string" but received "' + typeof obj_fieldName + '" (at "' + path_fieldName + '")');
486
493
  }
494
+ if (obj.fieldType !== undefined) {
495
+ const obj_fieldType = obj.fieldType;
496
+ const path_fieldType = path + '.fieldType';
497
+ if (typeof obj_fieldType !== 'string') {
498
+ return new TypeError('Expected "string" but received "' + typeof obj_fieldType + '" (at "' + path_fieldType + '")');
499
+ }
500
+ }
487
501
  const obj_operator = obj.operator;
488
502
  const path_operator = path + '.operator';
489
503
  if (typeof obj_operator !== 'string') {
@@ -496,6 +510,20 @@ function validate$x(obj, path = 'SemanticFilter') {
496
510
  return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
497
511
  }
498
512
  }
513
+ if (obj.values !== undefined) {
514
+ const obj_values = obj.values;
515
+ const path_values = path + '.values';
516
+ if (!ArrayIsArray(obj_values)) {
517
+ return new TypeError('Expected "array" but received "' + typeof obj_values + '" (at "' + path_values + '")');
518
+ }
519
+ for (let i = 0; i < obj_values.length; i++) {
520
+ const obj_values_item = obj_values[i];
521
+ const path_values_item = path_values + '[' + i + ']';
522
+ if (typeof obj_values_item !== 'string') {
523
+ return new TypeError('Expected "string" but received "' + typeof obj_values_item + '" (at "' + path_values_item + '")');
524
+ }
525
+ }
526
+ }
499
527
  })();
500
528
  return v_error === undefined ? null : v_error;
501
529
  }
@@ -1528,6 +1556,14 @@ function ingestSuccess$4(luvio, resourceParams, response) {
1528
1556
  }
1529
1557
  function createResourceRequest$4(config) {
1530
1558
  const headers = {};
1559
+ const header_xSfdcSourceapp = config.headers.xSfdcSourceapp;
1560
+ if (header_xSfdcSourceapp !== undefined) {
1561
+ headers['x-sfdc-sourceapp'] = header_xSfdcSourceapp;
1562
+ }
1563
+ const header_xSfdcSourcecontext = config.headers.xSfdcSourcecontext;
1564
+ if (header_xSfdcSourcecontext !== undefined) {
1565
+ headers['x-sfdc-sourcecontext'] = header_xSfdcSourcecontext;
1566
+ }
1531
1567
  return {
1532
1568
  baseUri: 'api.salesforce.com',
1533
1569
  basePath: '/analytics/insights/v1/batches',
@@ -1544,11 +1580,14 @@ const adapterName$4 = 'createInsightsBatch';
1544
1580
  const createInsightsBatch_ConfigPropertyMetadata = [
1545
1581
  generateParamConfigMetadata('batchInput', false, 2 /* Body */, 4 /* Unsupported */, true),
1546
1582
  generateParamConfigMetadata('options', false, 2 /* Body */, 4 /* Unsupported */),
1583
+ generateParamConfigMetadata('xSfdcSourceapp', false, 3 /* Header */, 0 /* String */),
1584
+ generateParamConfigMetadata('xSfdcSourcecontext', false, 3 /* Header */, 0 /* String */),
1547
1585
  ];
1548
1586
  const createInsightsBatch_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createInsightsBatch_ConfigPropertyMetadata);
1549
1587
  const createResourceParams$4 = /*#__PURE__*/ createResourceParams$5(createInsightsBatch_ConfigPropertyMetadata);
1550
1588
  function typeCheckConfig$4(untrustedConfig) {
1551
1589
  const config = {};
1590
+ typeCheckConfig$5(untrustedConfig, config, createInsightsBatch_ConfigPropertyMetadata);
1552
1591
  const untrustedConfig_batchInput = untrustedConfig.batchInput;
1553
1592
  if (ArrayIsArray$1(untrustedConfig_batchInput)) {
1554
1593
  const untrustedConfig_batchInput_array = [];
@@ -2780,6 +2819,14 @@ function ingestSuccess$3(luvio, resourceParams, response) {
2780
2819
  }
2781
2820
  function createResourceRequest$3(config) {
2782
2821
  const headers = {};
2822
+ const header_xSfdcSourceapp = config.headers.xSfdcSourceapp;
2823
+ if (header_xSfdcSourceapp !== undefined) {
2824
+ headers['x-sfdc-sourceapp'] = header_xSfdcSourceapp;
2825
+ }
2826
+ const header_xSfdcSourcecontext = config.headers.xSfdcSourcecontext;
2827
+ if (header_xSfdcSourcecontext !== undefined) {
2828
+ headers['x-sfdc-sourcecontext'] = header_xSfdcSourcecontext;
2829
+ }
2783
2830
  return {
2784
2831
  baseUri: 'api.salesforce.com',
2785
2832
  basePath: '/analytics/insights/v1/generateBundle',
@@ -2798,6 +2845,8 @@ const generateInsights_ConfigPropertyMetadata = [
2798
2845
  generateParamConfigMetadata('version', false, 2 /* Body */, 3 /* Integer */),
2799
2846
  generateParamConfigMetadata('input', false, 2 /* Body */, 4 /* Unsupported */),
2800
2847
  generateParamConfigMetadata('options', false, 2 /* Body */, 4 /* Unsupported */),
2848
+ generateParamConfigMetadata('xSfdcSourceapp', false, 3 /* Header */, 0 /* String */),
2849
+ generateParamConfigMetadata('xSfdcSourcecontext', false, 3 /* Header */, 0 /* String */),
2801
2850
  ];
2802
2851
  const generateInsights_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, generateInsights_ConfigPropertyMetadata);
2803
2852
  const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(generateInsights_ConfigPropertyMetadata);
@@ -2883,6 +2932,14 @@ function ingestSuccess$2(luvio, resourceParams, response) {
2883
2932
  }
2884
2933
  function createResourceRequest$2(config) {
2885
2934
  const headers = {};
2935
+ const header_xSfdcSourceapp = config.headers.xSfdcSourceapp;
2936
+ if (header_xSfdcSourceapp !== undefined) {
2937
+ headers['x-sfdc-sourceapp'] = header_xSfdcSourceapp;
2938
+ }
2939
+ const header_xSfdcSourcecontext = config.headers.xSfdcSourcecontext;
2940
+ if (header_xSfdcSourcecontext !== undefined) {
2941
+ headers['x-sfdc-sourcecontext'] = header_xSfdcSourcecontext;
2942
+ }
2886
2943
  return {
2887
2944
  baseUri: 'api.salesforce.com',
2888
2945
  basePath: '/analytics/insights/v1/basic/generateBundle',
@@ -2901,6 +2958,8 @@ const generateInsightsBasic_ConfigPropertyMetadata = [
2901
2958
  generateParamConfigMetadata('version', false, 2 /* Body */, 3 /* Integer */),
2902
2959
  generateParamConfigMetadata('input', false, 2 /* Body */, 4 /* Unsupported */),
2903
2960
  generateParamConfigMetadata('options', false, 2 /* Body */, 4 /* Unsupported */),
2961
+ generateParamConfigMetadata('xSfdcSourceapp', false, 3 /* Header */, 0 /* String */),
2962
+ generateParamConfigMetadata('xSfdcSourcecontext', false, 3 /* Header */, 0 /* String */),
2904
2963
  ];
2905
2964
  const generateInsightsBasic_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, generateInsightsBasic_ConfigPropertyMetadata);
2906
2965
  const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(generateInsightsBasic_ConfigPropertyMetadata);
@@ -3217,6 +3276,14 @@ function ingestError(luvio, params, error, snapshotRefresh) {
3217
3276
  }
3218
3277
  function createResourceRequest$1(config) {
3219
3278
  const headers = {};
3279
+ const header_xSfdcSourceapp = config.headers.xSfdcSourceapp;
3280
+ if (header_xSfdcSourceapp !== undefined) {
3281
+ headers['x-sfdc-sourceapp'] = header_xSfdcSourceapp;
3282
+ }
3283
+ const header_xSfdcSourcecontext = config.headers.xSfdcSourcecontext;
3284
+ if (header_xSfdcSourcecontext !== undefined) {
3285
+ headers['x-sfdc-sourcecontext'] = header_xSfdcSourcecontext;
3286
+ }
3220
3287
  return {
3221
3288
  baseUri: 'api.salesforce.com',
3222
3289
  basePath: '/analytics/insights/v1/batches/' + config.urlParams.batchId + '',
@@ -3239,6 +3306,8 @@ function createResourceRequestFromRepresentation(representation) {
3239
3306
  const adapterName$1 = 'getInsightsBatch';
3240
3307
  const getInsightsBatch_ConfigPropertyMetadata = [
3241
3308
  generateParamConfigMetadata('batchId', true, 0 /* UrlParameter */, 0 /* String */),
3309
+ generateParamConfigMetadata('xSfdcSourceapp', false, 3 /* Header */, 0 /* String */),
3310
+ generateParamConfigMetadata('xSfdcSourcecontext', false, 3 /* Header */, 0 /* String */),
3242
3311
  ];
3243
3312
  const getInsightsBatch_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getInsightsBatch_ConfigPropertyMetadata);
3244
3313
  const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(getInsightsBatch_ConfigPropertyMetadata);
@@ -3621,6 +3690,14 @@ function ingestSuccess(luvio, resourceParams, response) {
3621
3690
  }
3622
3691
  function createResourceRequest(config) {
3623
3692
  const headers = {};
3693
+ const header_xSfdcSourceapp = config.headers.xSfdcSourceapp;
3694
+ if (header_xSfdcSourceapp !== undefined) {
3695
+ headers['x-sfdc-sourceapp'] = header_xSfdcSourceapp;
3696
+ }
3697
+ const header_xSfdcSourcecontext = config.headers.xSfdcSourcecontext;
3698
+ if (header_xSfdcSourcecontext !== undefined) {
3699
+ headers['x-sfdc-sourcecontext'] = header_xSfdcSourcecontext;
3700
+ }
3624
3701
  return {
3625
3702
  baseUri: 'api.salesforce.com',
3626
3703
  basePath: '/analytics/insights/v1/filterValues',
@@ -3642,6 +3719,8 @@ const getMetricFilterValues_ConfigPropertyMetadata = [
3642
3719
  generateParamConfigMetadata('searchTerm', false, 2 /* Body */, 0 /* String */),
3643
3720
  generateParamConfigMetadata('filters', false, 2 /* Body */, 4 /* Unsupported */, true),
3644
3721
  generateParamConfigMetadata('semanticFilter', false, 2 /* Body */, 4 /* Unsupported */),
3722
+ generateParamConfigMetadata('xSfdcSourceapp', false, 3 /* Header */, 0 /* String */),
3723
+ generateParamConfigMetadata('xSfdcSourcecontext', false, 3 /* Header */, 0 /* String */),
3645
3724
  ];
3646
3725
  const getMetricFilterValues_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getMetricFilterValues_ConfigPropertyMetadata);
3647
3726
  const createResourceParams = /*#__PURE__*/ createResourceParams$5(getMetricFilterValues_ConfigPropertyMetadata);
@@ -3765,4 +3844,4 @@ withDefaultLuvio((luvio) => {
3765
3844
  });
3766
3845
 
3767
3846
  export { createInsightsBatch, generateInsights, generateInsightsBasic, getInsightsBatch, getInsightsBatchNotifyChange, getInsightsBatch_imperative, getMetricFilterValues };
3768
- // version: 1.358.0-abc73971a1
3847
+ // version: 1.360.0-3cf173d4f8
package/src/raml/api.raml CHANGED
@@ -77,6 +77,52 @@ types:
77
77
  insightType:
78
78
  type: string
79
79
  required: false
80
+ GenerateInsightBundleV2Request:
81
+ type: object
82
+ properties:
83
+ type:
84
+ description: The bundle type to request
85
+ enum:
86
+ - INSIGHT_BUNDLE_TYPE_UNSPECIFIED
87
+ - INSIGHT_BUNDLE_TYPE_BAN
88
+ - INSIGHT_BUNDLE_TYPE_SPRINGBOARD
89
+ - INSIGHT_BUNDLE_TYPE_DETAIL
90
+ - INSIGHT_BUNDLE_TYPE_BASIC
91
+ type: string
92
+ (amf-format): enum
93
+ required: false
94
+ version:
95
+ description: The version of the bundle type to request
96
+ type: number
97
+ format: int32
98
+ required: false
99
+ sdmId:
100
+ type: string
101
+ required: false
102
+ metricId:
103
+ type: string
104
+ required: false
105
+ metricInstance: MetricInstance
106
+ comparison:
107
+ description: For period over period insights, whether the comparison period is the prior period, or the same period the previous year. If not specified, defaults to TIME_COMPARISON_PREVIOUS_PERIOD
108
+ enum:
109
+ - TIME_COMPARISON_UNSPECIFIED
110
+ - TIME_COMPARISON_NONE
111
+ - TIME_COMPARISON_PREVIOUS_PERIOD
112
+ - TIME_COMPARISON_YEAR_AGO_PERIOD
113
+ type: string
114
+ (amf-format): enum
115
+ required: false
116
+ bundleId:
117
+ description: An identifier used in logging (ie. A client could use the submetric id here)
118
+ type: string
119
+ required: false
120
+ options:
121
+ description: Options affecting the generation of the bundle
122
+ (amf-and):
123
+ - InsightBundleOptions
124
+ type: any
125
+ required: false
80
126
  GoalMetadata_StatusCondition:
81
127
  type: object
82
128
  properties:
@@ -708,6 +754,7 @@ types:
708
754
  type: BatchOptions
709
755
  required: false
710
756
  Filter:
757
+ description: The old dashboard-style filter
711
758
  type: object
712
759
  properties:
713
760
  type:
@@ -809,6 +856,8 @@ types:
809
856
  - PreviousFiscalYearToDate
810
857
  - CurrentFiscalYearToDate
811
858
  - Values
859
+ - In
860
+ - NotIn
812
861
  type: string
813
862
  (amf-format): enum
814
863
  required: false
@@ -913,12 +962,47 @@ types:
913
962
  - PreviousFiscalYearToDate
914
963
  - CurrentFiscalYearToDate
915
964
  - Values
965
+ - In
966
+ - NotIn
916
967
  type: string
917
968
  (amf-format): enum
918
969
  required: true
919
970
  value:
920
971
  type: string
921
972
  required: false
973
+ aggregationMethod:
974
+ enum:
975
+ - SEMANTIC_AGGREGATION_METHOD_UNSPECIFIED
976
+ - SEMANTIC_AGGREGATION_METHOD_NONE
977
+ - SEMANTIC_AGGREGATION_METHOD_AUTO
978
+ - SEMANTIC_AGGREGATION_METHOD_COUNT
979
+ - SEMANTIC_AGGREGATION_METHOD_SUM
980
+ - SEMANTIC_AGGREGATION_METHOD_AVG
981
+ - SEMANTIC_AGGREGATION_METHOD_MIN
982
+ - SEMANTIC_AGGREGATION_METHOD_MAX
983
+ - SEMANTIC_AGGREGATION_METHOD_MEDIAN
984
+ - SEMANTIC_AGGREGATION_METHOD_UNIQUE_COUNT
985
+ - SEMANTIC_AGGREGATION_METHOD_STDDEV
986
+ - SEMANTIC_AGGREGATION_METHOD_STDDEVP
987
+ - SEMANTIC_AGGREGATION_METHOD_VAR
988
+ - SEMANTIC_AGGREGATION_METHOD_VARP
989
+ - SEMANTIC_AGGREGATION_METHOD_USER_AGG
990
+ type: string
991
+ (amf-format): enum
992
+ required: false
993
+ fieldType:
994
+ enum:
995
+ - UNSPECIFIED
996
+ - FORMULA
997
+ - MODEL_FIELD
998
+ type: string
999
+ (amf-format): enum
1000
+ required: false
1001
+ values:
1002
+ type: array
1003
+ items:
1004
+ type: string
1005
+ required: false
922
1006
  Summary:
923
1007
  type: object
924
1008
  properties:
@@ -1007,6 +1091,15 @@ version: v1
1007
1091
  body:
1008
1092
  application/json:
1009
1093
  type: GenerateInsightBatchRequest
1094
+ headers:
1095
+ 'x-sfdc-sourceapp':
1096
+ type: string
1097
+ description: The viz or dashboard source template name - set to "platform" if the viz or dashboard does not have a source template
1098
+ required: false
1099
+ 'x-sfdc-sourcecontext':
1100
+ type: string
1101
+ description: The context in which the request is being called from within the application
1102
+ required: false
1010
1103
  responses:
1011
1104
  '200':
1012
1105
  description: OK
@@ -1021,6 +1114,15 @@ version: v1
1021
1114
  body:
1022
1115
  application/json:
1023
1116
  type: GetFilterValuesRequest
1117
+ headers:
1118
+ 'x-sfdc-sourceapp':
1119
+ type: string
1120
+ description: The viz or dashboard source template name - set to "platform" if the viz or dashboard does not have a source template
1121
+ required: false
1122
+ 'x-sfdc-sourcecontext':
1123
+ type: string
1124
+ description: The context in which the request is being called from within the application
1125
+ required: false
1024
1126
  responses:
1025
1127
  '200':
1026
1128
  description: OK
@@ -1035,6 +1137,15 @@ version: v1
1035
1137
  body:
1036
1138
  application/json:
1037
1139
  type: GenerateInsightBundleRequest
1140
+ headers:
1141
+ 'x-sfdc-sourceapp':
1142
+ type: string
1143
+ description: The viz or dashboard source template name - set to "platform" if the viz or dashboard does not have a source template
1144
+ required: false
1145
+ 'x-sfdc-sourcecontext':
1146
+ type: string
1147
+ description: The context in which the request is being called from within the application
1148
+ required: false
1038
1149
  responses:
1039
1150
  '200':
1040
1151
  description: OK
@@ -1050,6 +1161,15 @@ version: v1
1050
1161
  body:
1051
1162
  application/json:
1052
1163
  type: GenerateInsightBundleRequest
1164
+ headers:
1165
+ 'x-sfdc-sourceapp':
1166
+ type: string
1167
+ description: The viz or dashboard source template name - set to "platform" if the viz or dashboard does not have a source template
1168
+ required: false
1169
+ 'x-sfdc-sourcecontext':
1170
+ type: string
1171
+ description: The context in which the request is being called from within the application
1172
+ required: false
1053
1173
  responses:
1054
1174
  '200':
1055
1175
  description: OK
@@ -1061,6 +1181,15 @@ version: v1
1061
1181
  displayName: getInsightsBatch
1062
1182
  (amf-tags):
1063
1183
  - InsightsService
1184
+ headers:
1185
+ 'x-sfdc-sourceapp':
1186
+ type: string
1187
+ description: The viz or dashboard source template name - set to "platform" if the viz or dashboard does not have a source template
1188
+ required: false
1189
+ 'x-sfdc-sourcecontext':
1190
+ type: string
1191
+ description: The context in which the request is being called from within the application
1192
+ required: false
1064
1193
  responses:
1065
1194
  '200':
1066
1195
  description: OK