@salesforce/lds-adapters-sfap-analytics-insights 1.354.0-dev2 → 1.354.0-dev21

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
  }
@@ -1508,6 +1536,14 @@ function ingestSuccess$4(luvio, resourceParams, response) {
1508
1536
  }
1509
1537
  function createResourceRequest$4(config) {
1510
1538
  const headers = {};
1539
+ const header_xSfdcSourceapp = config.headers.xSfdcSourceapp;
1540
+ if (header_xSfdcSourceapp !== undefined) {
1541
+ headers['x-sfdc-sourceapp'] = header_xSfdcSourceapp;
1542
+ }
1543
+ const header_xSfdcSourcecontext = config.headers.xSfdcSourcecontext;
1544
+ if (header_xSfdcSourcecontext !== undefined) {
1545
+ headers['x-sfdc-sourcecontext'] = header_xSfdcSourcecontext;
1546
+ }
1511
1547
  return {
1512
1548
  baseUri: 'api.salesforce.com',
1513
1549
  basePath: '/analytics/insights/v1/batches',
@@ -1524,11 +1560,14 @@ const adapterName$4 = 'createInsightsBatch';
1524
1560
  const createInsightsBatch_ConfigPropertyMetadata = [
1525
1561
  generateParamConfigMetadata('batchInput', false, 2 /* Body */, 4 /* Unsupported */, true),
1526
1562
  generateParamConfigMetadata('options', false, 2 /* Body */, 4 /* Unsupported */),
1563
+ generateParamConfigMetadata('xSfdcSourceapp', false, 3 /* Header */, 0 /* String */),
1564
+ generateParamConfigMetadata('xSfdcSourcecontext', false, 3 /* Header */, 0 /* String */),
1527
1565
  ];
1528
1566
  const createInsightsBatch_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createInsightsBatch_ConfigPropertyMetadata);
1529
1567
  const createResourceParams$4 = /*#__PURE__*/ createResourceParams$5(createInsightsBatch_ConfigPropertyMetadata);
1530
1568
  function typeCheckConfig$4(untrustedConfig) {
1531
1569
  const config = {};
1570
+ typeCheckConfig$5(untrustedConfig, config, createInsightsBatch_ConfigPropertyMetadata);
1532
1571
  const untrustedConfig_batchInput = untrustedConfig.batchInput;
1533
1572
  if (ArrayIsArray$1(untrustedConfig_batchInput)) {
1534
1573
  const untrustedConfig_batchInput_array = [];
@@ -1855,6 +1894,14 @@ function ingestSuccess$3(luvio, resourceParams, response) {
1855
1894
  }
1856
1895
  function createResourceRequest$3(config) {
1857
1896
  const headers = {};
1897
+ const header_xSfdcSourceapp = config.headers.xSfdcSourceapp;
1898
+ if (header_xSfdcSourceapp !== undefined) {
1899
+ headers['x-sfdc-sourceapp'] = header_xSfdcSourceapp;
1900
+ }
1901
+ const header_xSfdcSourcecontext = config.headers.xSfdcSourcecontext;
1902
+ if (header_xSfdcSourcecontext !== undefined) {
1903
+ headers['x-sfdc-sourcecontext'] = header_xSfdcSourcecontext;
1904
+ }
1858
1905
  return {
1859
1906
  baseUri: 'api.salesforce.com',
1860
1907
  basePath: '/analytics/insights/v1/filterValues',
@@ -1876,6 +1923,8 @@ const getMetricFilterValues_ConfigPropertyMetadata = [
1876
1923
  generateParamConfigMetadata('searchTerm', false, 2 /* Body */, 0 /* String */),
1877
1924
  generateParamConfigMetadata('filters', false, 2 /* Body */, 4 /* Unsupported */, true),
1878
1925
  generateParamConfigMetadata('semanticFilter', false, 2 /* Body */, 4 /* Unsupported */),
1926
+ generateParamConfigMetadata('xSfdcSourceapp', false, 3 /* Header */, 0 /* String */),
1927
+ generateParamConfigMetadata('xSfdcSourcecontext', false, 3 /* Header */, 0 /* String */),
1879
1928
  ];
1880
1929
  const getMetricFilterValues_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getMetricFilterValues_ConfigPropertyMetadata);
1881
1930
  const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(getMetricFilterValues_ConfigPropertyMetadata);
@@ -3123,6 +3172,14 @@ function ingestSuccess$2(luvio, resourceParams, response) {
3123
3172
  }
3124
3173
  function createResourceRequest$2(config) {
3125
3174
  const headers = {};
3175
+ const header_xSfdcSourceapp = config.headers.xSfdcSourceapp;
3176
+ if (header_xSfdcSourceapp !== undefined) {
3177
+ headers['x-sfdc-sourceapp'] = header_xSfdcSourceapp;
3178
+ }
3179
+ const header_xSfdcSourcecontext = config.headers.xSfdcSourcecontext;
3180
+ if (header_xSfdcSourcecontext !== undefined) {
3181
+ headers['x-sfdc-sourcecontext'] = header_xSfdcSourcecontext;
3182
+ }
3126
3183
  return {
3127
3184
  baseUri: 'api.salesforce.com',
3128
3185
  basePath: '/analytics/insights/v1/generateBundle',
@@ -3141,6 +3198,8 @@ const generateInsights_ConfigPropertyMetadata = [
3141
3198
  generateParamConfigMetadata('version', false, 2 /* Body */, 3 /* Integer */),
3142
3199
  generateParamConfigMetadata('input', false, 2 /* Body */, 4 /* Unsupported */),
3143
3200
  generateParamConfigMetadata('options', false, 2 /* Body */, 4 /* Unsupported */),
3201
+ generateParamConfigMetadata('xSfdcSourceapp', false, 3 /* Header */, 0 /* String */),
3202
+ generateParamConfigMetadata('xSfdcSourcecontext', false, 3 /* Header */, 0 /* String */),
3144
3203
  ];
3145
3204
  const generateInsights_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, generateInsights_ConfigPropertyMetadata);
3146
3205
  const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(generateInsights_ConfigPropertyMetadata);
@@ -3226,6 +3285,14 @@ function ingestSuccess$1(luvio, resourceParams, response) {
3226
3285
  }
3227
3286
  function createResourceRequest$1(config) {
3228
3287
  const headers = {};
3288
+ const header_xSfdcSourceapp = config.headers.xSfdcSourceapp;
3289
+ if (header_xSfdcSourceapp !== undefined) {
3290
+ headers['x-sfdc-sourceapp'] = header_xSfdcSourceapp;
3291
+ }
3292
+ const header_xSfdcSourcecontext = config.headers.xSfdcSourcecontext;
3293
+ if (header_xSfdcSourcecontext !== undefined) {
3294
+ headers['x-sfdc-sourcecontext'] = header_xSfdcSourcecontext;
3295
+ }
3229
3296
  return {
3230
3297
  baseUri: 'api.salesforce.com',
3231
3298
  basePath: '/analytics/insights/v1/basic/generateBundle',
@@ -3244,6 +3311,8 @@ const generateInsightsBasic_ConfigPropertyMetadata = [
3244
3311
  generateParamConfigMetadata('version', false, 2 /* Body */, 3 /* Integer */),
3245
3312
  generateParamConfigMetadata('input', false, 2 /* Body */, 4 /* Unsupported */),
3246
3313
  generateParamConfigMetadata('options', false, 2 /* Body */, 4 /* Unsupported */),
3314
+ generateParamConfigMetadata('xSfdcSourceapp', false, 3 /* Header */, 0 /* String */),
3315
+ generateParamConfigMetadata('xSfdcSourcecontext', false, 3 /* Header */, 0 /* String */),
3247
3316
  ];
3248
3317
  const generateInsightsBasic_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, generateInsightsBasic_ConfigPropertyMetadata);
3249
3318
  const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(generateInsightsBasic_ConfigPropertyMetadata);
@@ -3560,6 +3629,14 @@ function ingestError(luvio, params, error, snapshotRefresh) {
3560
3629
  }
3561
3630
  function createResourceRequest(config) {
3562
3631
  const headers = {};
3632
+ const header_xSfdcSourceapp = config.headers.xSfdcSourceapp;
3633
+ if (header_xSfdcSourceapp !== undefined) {
3634
+ headers['x-sfdc-sourceapp'] = header_xSfdcSourceapp;
3635
+ }
3636
+ const header_xSfdcSourcecontext = config.headers.xSfdcSourcecontext;
3637
+ if (header_xSfdcSourcecontext !== undefined) {
3638
+ headers['x-sfdc-sourcecontext'] = header_xSfdcSourcecontext;
3639
+ }
3563
3640
  return {
3564
3641
  baseUri: 'api.salesforce.com',
3565
3642
  basePath: '/analytics/insights/v1/batches/' + config.urlParams.batchId + '',
@@ -3575,6 +3652,8 @@ function createResourceRequest(config) {
3575
3652
  const adapterName = 'getInsightsBatch';
3576
3653
  const getInsightsBatch_ConfigPropertyMetadata = [
3577
3654
  generateParamConfigMetadata('batchId', true, 0 /* UrlParameter */, 0 /* String */),
3655
+ generateParamConfigMetadata('xSfdcSourceapp', false, 3 /* Header */, 0 /* String */),
3656
+ generateParamConfigMetadata('xSfdcSourcecontext', false, 3 /* Header */, 0 /* String */),
3578
3657
  ];
3579
3658
  const getInsightsBatch_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getInsightsBatch_ConfigPropertyMetadata);
3580
3659
  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.354.0-dev2",
3
+ "version": "1.354.0-dev21",
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.354.0-dev2"
43
+ "@salesforce/lds-bindings": "^1.354.0-dev21"
44
44
  },
45
45
  "devDependencies": {
46
- "@salesforce/lds-compiler-plugins": "^1.354.0-dev2"
46
+ "@salesforce/lds-compiler-plugins": "^1.354.0-dev21"
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
  }
@@ -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 = [];
@@ -2770,6 +2809,14 @@ function ingestSuccess$3(luvio, resourceParams, response) {
2770
2809
  }
2771
2810
  function createResourceRequest$3(config) {
2772
2811
  const headers = {};
2812
+ const header_xSfdcSourceapp = config.headers.xSfdcSourceapp;
2813
+ if (header_xSfdcSourceapp !== undefined) {
2814
+ headers['x-sfdc-sourceapp'] = header_xSfdcSourceapp;
2815
+ }
2816
+ const header_xSfdcSourcecontext = config.headers.xSfdcSourcecontext;
2817
+ if (header_xSfdcSourcecontext !== undefined) {
2818
+ headers['x-sfdc-sourcecontext'] = header_xSfdcSourcecontext;
2819
+ }
2773
2820
  return {
2774
2821
  baseUri: 'api.salesforce.com',
2775
2822
  basePath: '/analytics/insights/v1/generateBundle',
@@ -2788,6 +2835,8 @@ const generateInsights_ConfigPropertyMetadata = [
2788
2835
  generateParamConfigMetadata('version', false, 2 /* Body */, 3 /* Integer */),
2789
2836
  generateParamConfigMetadata('input', false, 2 /* Body */, 4 /* Unsupported */),
2790
2837
  generateParamConfigMetadata('options', false, 2 /* Body */, 4 /* Unsupported */),
2838
+ generateParamConfigMetadata('xSfdcSourceapp', false, 3 /* Header */, 0 /* String */),
2839
+ generateParamConfigMetadata('xSfdcSourcecontext', false, 3 /* Header */, 0 /* String */),
2791
2840
  ];
2792
2841
  const generateInsights_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, generateInsights_ConfigPropertyMetadata);
2793
2842
  const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(generateInsights_ConfigPropertyMetadata);
@@ -2873,6 +2922,14 @@ function ingestSuccess$2(luvio, resourceParams, response) {
2873
2922
  }
2874
2923
  function createResourceRequest$2(config) {
2875
2924
  const headers = {};
2925
+ const header_xSfdcSourceapp = config.headers.xSfdcSourceapp;
2926
+ if (header_xSfdcSourceapp !== undefined) {
2927
+ headers['x-sfdc-sourceapp'] = header_xSfdcSourceapp;
2928
+ }
2929
+ const header_xSfdcSourcecontext = config.headers.xSfdcSourcecontext;
2930
+ if (header_xSfdcSourcecontext !== undefined) {
2931
+ headers['x-sfdc-sourcecontext'] = header_xSfdcSourcecontext;
2932
+ }
2876
2933
  return {
2877
2934
  baseUri: 'api.salesforce.com',
2878
2935
  basePath: '/analytics/insights/v1/basic/generateBundle',
@@ -2891,6 +2948,8 @@ const generateInsightsBasic_ConfigPropertyMetadata = [
2891
2948
  generateParamConfigMetadata('version', false, 2 /* Body */, 3 /* Integer */),
2892
2949
  generateParamConfigMetadata('input', false, 2 /* Body */, 4 /* Unsupported */),
2893
2950
  generateParamConfigMetadata('options', false, 2 /* Body */, 4 /* Unsupported */),
2951
+ generateParamConfigMetadata('xSfdcSourceapp', false, 3 /* Header */, 0 /* String */),
2952
+ generateParamConfigMetadata('xSfdcSourcecontext', false, 3 /* Header */, 0 /* String */),
2894
2953
  ];
2895
2954
  const generateInsightsBasic_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, generateInsightsBasic_ConfigPropertyMetadata);
2896
2955
  const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(generateInsightsBasic_ConfigPropertyMetadata);
@@ -3207,6 +3266,14 @@ function ingestError(luvio, params, error, snapshotRefresh) {
3207
3266
  }
3208
3267
  function createResourceRequest$1(config) {
3209
3268
  const headers = {};
3269
+ const header_xSfdcSourceapp = config.headers.xSfdcSourceapp;
3270
+ if (header_xSfdcSourceapp !== undefined) {
3271
+ headers['x-sfdc-sourceapp'] = header_xSfdcSourceapp;
3272
+ }
3273
+ const header_xSfdcSourcecontext = config.headers.xSfdcSourcecontext;
3274
+ if (header_xSfdcSourcecontext !== undefined) {
3275
+ headers['x-sfdc-sourcecontext'] = header_xSfdcSourcecontext;
3276
+ }
3210
3277
  return {
3211
3278
  baseUri: 'api.salesforce.com',
3212
3279
  basePath: '/analytics/insights/v1/batches/' + config.urlParams.batchId + '',
@@ -3229,6 +3296,8 @@ function createResourceRequestFromRepresentation(representation) {
3229
3296
  const adapterName$1 = 'getInsightsBatch';
3230
3297
  const getInsightsBatch_ConfigPropertyMetadata = [
3231
3298
  generateParamConfigMetadata('batchId', true, 0 /* UrlParameter */, 0 /* String */),
3299
+ generateParamConfigMetadata('xSfdcSourceapp', false, 3 /* Header */, 0 /* String */),
3300
+ generateParamConfigMetadata('xSfdcSourcecontext', false, 3 /* Header */, 0 /* String */),
3232
3301
  ];
3233
3302
  const getInsightsBatch_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getInsightsBatch_ConfigPropertyMetadata);
3234
3303
  const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(getInsightsBatch_ConfigPropertyMetadata);
@@ -3611,6 +3680,14 @@ function ingestSuccess(luvio, resourceParams, response) {
3611
3680
  }
3612
3681
  function createResourceRequest(config) {
3613
3682
  const headers = {};
3683
+ const header_xSfdcSourceapp = config.headers.xSfdcSourceapp;
3684
+ if (header_xSfdcSourceapp !== undefined) {
3685
+ headers['x-sfdc-sourceapp'] = header_xSfdcSourceapp;
3686
+ }
3687
+ const header_xSfdcSourcecontext = config.headers.xSfdcSourcecontext;
3688
+ if (header_xSfdcSourcecontext !== undefined) {
3689
+ headers['x-sfdc-sourcecontext'] = header_xSfdcSourcecontext;
3690
+ }
3614
3691
  return {
3615
3692
  baseUri: 'api.salesforce.com',
3616
3693
  basePath: '/analytics/insights/v1/filterValues',
@@ -3632,6 +3709,8 @@ const getMetricFilterValues_ConfigPropertyMetadata = [
3632
3709
  generateParamConfigMetadata('searchTerm', false, 2 /* Body */, 0 /* String */),
3633
3710
  generateParamConfigMetadata('filters', false, 2 /* Body */, 4 /* Unsupported */, true),
3634
3711
  generateParamConfigMetadata('semanticFilter', false, 2 /* Body */, 4 /* Unsupported */),
3712
+ generateParamConfigMetadata('xSfdcSourceapp', false, 3 /* Header */, 0 /* String */),
3713
+ generateParamConfigMetadata('xSfdcSourcecontext', false, 3 /* Header */, 0 /* String */),
3635
3714
  ];
3636
3715
  const getMetricFilterValues_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getMetricFilterValues_ConfigPropertyMetadata);
3637
3716
  const createResourceParams = /*#__PURE__*/ createResourceParams$5(getMetricFilterValues_ConfigPropertyMetadata);
@@ -3755,4 +3834,4 @@ withDefaultLuvio((luvio) => {
3755
3834
  });
3756
3835
 
3757
3836
  export { createInsightsBatch, generateInsights, generateInsightsBasic, getInsightsBatch, getInsightsBatchNotifyChange, getInsightsBatch_imperative, getMetricFilterValues };
3758
- // version: 1.354.0-dev2-493c24af5a
3837
+ // version: 1.354.0-dev21-5f69ab6bb6
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:
@@ -705,6 +751,7 @@ types:
705
751
  type: BatchOptions
706
752
  required: false
707
753
  Filter:
754
+ description: The old dashboard-style filter
708
755
  type: object
709
756
  properties:
710
757
  type:
@@ -806,6 +853,8 @@ types:
806
853
  - PreviousFiscalYearToDate
807
854
  - CurrentFiscalYearToDate
808
855
  - Values
856
+ - In
857
+ - NotIn
809
858
  type: string
810
859
  (amf-format): enum
811
860
  required: false
@@ -910,12 +959,47 @@ types:
910
959
  - PreviousFiscalYearToDate
911
960
  - CurrentFiscalYearToDate
912
961
  - Values
962
+ - In
963
+ - NotIn
913
964
  type: string
914
965
  (amf-format): enum
915
966
  required: true
916
967
  value:
917
968
  type: string
918
969
  required: false
970
+ aggregationMethod:
971
+ enum:
972
+ - SEMANTIC_AGGREGATION_METHOD_UNSPECIFIED
973
+ - SEMANTIC_AGGREGATION_METHOD_NONE
974
+ - SEMANTIC_AGGREGATION_METHOD_AUTO
975
+ - SEMANTIC_AGGREGATION_METHOD_COUNT
976
+ - SEMANTIC_AGGREGATION_METHOD_SUM
977
+ - SEMANTIC_AGGREGATION_METHOD_AVG
978
+ - SEMANTIC_AGGREGATION_METHOD_MIN
979
+ - SEMANTIC_AGGREGATION_METHOD_MAX
980
+ - SEMANTIC_AGGREGATION_METHOD_MEDIAN
981
+ - SEMANTIC_AGGREGATION_METHOD_UNIQUE_COUNT
982
+ - SEMANTIC_AGGREGATION_METHOD_STDDEV
983
+ - SEMANTIC_AGGREGATION_METHOD_STDDEVP
984
+ - SEMANTIC_AGGREGATION_METHOD_VAR
985
+ - SEMANTIC_AGGREGATION_METHOD_VARP
986
+ - SEMANTIC_AGGREGATION_METHOD_USER_AGG
987
+ type: string
988
+ (amf-format): enum
989
+ required: false
990
+ fieldType:
991
+ enum:
992
+ - UNSPECIFIED
993
+ - FORMULA
994
+ - MODEL_FIELD
995
+ type: string
996
+ (amf-format): enum
997
+ required: false
998
+ values:
999
+ type: array
1000
+ items:
1001
+ type: string
1002
+ required: false
919
1003
  Summary:
920
1004
  type: object
921
1005
  properties:
@@ -1004,6 +1088,15 @@ version: v1
1004
1088
  body:
1005
1089
  application/json:
1006
1090
  type: GenerateInsightBatchRequest
1091
+ headers:
1092
+ 'x-sfdc-sourceapp':
1093
+ type: string
1094
+ description: The viz or dashboard source template name - set to "platform" if the viz or dashboard does not have a source template
1095
+ required: false
1096
+ 'x-sfdc-sourcecontext':
1097
+ type: string
1098
+ description: The context in which the request is being called from within the application
1099
+ required: false
1007
1100
  responses:
1008
1101
  '200':
1009
1102
  description: OK
@@ -1018,6 +1111,15 @@ version: v1
1018
1111
  body:
1019
1112
  application/json:
1020
1113
  type: GetFilterValuesRequest
1114
+ headers:
1115
+ 'x-sfdc-sourceapp':
1116
+ type: string
1117
+ description: The viz or dashboard source template name - set to "platform" if the viz or dashboard does not have a source template
1118
+ required: false
1119
+ 'x-sfdc-sourcecontext':
1120
+ type: string
1121
+ description: The context in which the request is being called from within the application
1122
+ required: false
1021
1123
  responses:
1022
1124
  '200':
1023
1125
  description: OK
@@ -1032,6 +1134,15 @@ version: v1
1032
1134
  body:
1033
1135
  application/json:
1034
1136
  type: GenerateInsightBundleRequest
1137
+ headers:
1138
+ 'x-sfdc-sourceapp':
1139
+ type: string
1140
+ description: The viz or dashboard source template name - set to "platform" if the viz or dashboard does not have a source template
1141
+ required: false
1142
+ 'x-sfdc-sourcecontext':
1143
+ type: string
1144
+ description: The context in which the request is being called from within the application
1145
+ required: false
1035
1146
  responses:
1036
1147
  '200':
1037
1148
  description: OK
@@ -1047,6 +1158,15 @@ version: v1
1047
1158
  body:
1048
1159
  application/json:
1049
1160
  type: GenerateInsightBundleRequest
1161
+ headers:
1162
+ 'x-sfdc-sourceapp':
1163
+ type: string
1164
+ description: The viz or dashboard source template name - set to "platform" if the viz or dashboard does not have a source template
1165
+ required: false
1166
+ 'x-sfdc-sourcecontext':
1167
+ type: string
1168
+ description: The context in which the request is being called from within the application
1169
+ required: false
1050
1170
  responses:
1051
1171
  '200':
1052
1172
  description: OK
@@ -1058,6 +1178,15 @@ version: v1
1058
1178
  displayName: getInsightsBatch
1059
1179
  (amf-tags):
1060
1180
  - InsightsService
1181
+ headers:
1182
+ 'x-sfdc-sourceapp':
1183
+ type: string
1184
+ description: The viz or dashboard source template name - set to "platform" if the viz or dashboard does not have a source template
1185
+ required: false
1186
+ 'x-sfdc-sourcecontext':
1187
+ type: string
1188
+ description: The context in which the request is being called from within the application
1189
+ required: false
1061
1190
  responses:
1062
1191
  '200':
1063
1192
  description: OK