@salesforce/lds-adapters-sfap-analytics-insights 1.332.0-dev6 → 1.332.0-dev8
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.
- package/dist/es/es2018/sfap-analytics-insights.js +98 -4
- package/dist/es/es2018/types/src/generated/types/GoalMetadata.d.ts +30 -0
- package/dist/es/es2018/types/src/generated/types/GoalMetadata_StatusCondition.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/InputMetric.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/types/RelativePeriod.d.ts +3 -3
- package/package.json +3 -3
- package/sfdc/index.js +99 -5
- package/src/raml/api.raml +52 -0
|
@@ -92,7 +92,7 @@ function createLink(ref) {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
function validate$
|
|
95
|
+
function validate$J(obj, path = 'MetricMetadata') {
|
|
96
96
|
const v_error = (() => {
|
|
97
97
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
98
98
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -115,7 +115,7 @@ function validate$H(obj, path = 'MetricMetadata') {
|
|
|
115
115
|
return v_error === undefined ? null : v_error;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
function validate$
|
|
118
|
+
function validate$I(obj, path = 'ExtensionOptions') {
|
|
119
119
|
const v_error = (() => {
|
|
120
120
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
121
121
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -145,6 +145,90 @@ function validate$G(obj, path = 'ExtensionOptions') {
|
|
|
145
145
|
return v_error === undefined ? null : v_error;
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
+
function validate$H(obj, path = 'GoalMetadata_StatusCondition') {
|
|
149
|
+
const v_error = (() => {
|
|
150
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
151
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
152
|
+
}
|
|
153
|
+
if (obj.color !== undefined) {
|
|
154
|
+
const obj_color = obj.color;
|
|
155
|
+
const path_color = path + '.color';
|
|
156
|
+
if (typeof obj_color !== 'string') {
|
|
157
|
+
return new TypeError('Expected "string" but received "' + typeof obj_color + '" (at "' + path_color + '")');
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
if (obj.currencyIsoCode !== undefined) {
|
|
161
|
+
const obj_currencyIsoCode = obj.currencyIsoCode;
|
|
162
|
+
const path_currencyIsoCode = path + '.currencyIsoCode';
|
|
163
|
+
if (typeof obj_currencyIsoCode !== 'string') {
|
|
164
|
+
return new TypeError('Expected "string" but received "' + typeof obj_currencyIsoCode + '" (at "' + path_currencyIsoCode + '")');
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
if (obj.operator !== undefined) {
|
|
168
|
+
const obj_operator = obj.operator;
|
|
169
|
+
const path_operator = path + '.operator';
|
|
170
|
+
if (typeof obj_operator !== 'string') {
|
|
171
|
+
return new TypeError('Expected "string" but received "' + typeof obj_operator + '" (at "' + path_operator + '")');
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
if (obj.primary !== undefined) {
|
|
175
|
+
const obj_primary = obj.primary;
|
|
176
|
+
const path_primary = path + '.primary';
|
|
177
|
+
if (typeof obj_primary !== 'boolean') {
|
|
178
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_primary + '" (at "' + path_primary + '")');
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
if (obj.statusName !== undefined) {
|
|
182
|
+
const obj_statusName = obj.statusName;
|
|
183
|
+
const path_statusName = path + '.statusName';
|
|
184
|
+
if (typeof obj_statusName !== 'string') {
|
|
185
|
+
return new TypeError('Expected "string" but received "' + typeof obj_statusName + '" (at "' + path_statusName + '")');
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
if (obj.value !== undefined) {
|
|
189
|
+
const obj_value = obj.value;
|
|
190
|
+
const path_value = path + '.value';
|
|
191
|
+
if (typeof obj_value !== 'string') {
|
|
192
|
+
return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
})();
|
|
196
|
+
return v_error === undefined ? null : v_error;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
function validate$G(obj, path = 'GoalMetadata') {
|
|
200
|
+
const v_error = (() => {
|
|
201
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
202
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
203
|
+
}
|
|
204
|
+
if (obj.forecasting !== undefined) {
|
|
205
|
+
const obj_forecasting = obj.forecasting;
|
|
206
|
+
const path_forecasting = path + '.forecasting';
|
|
207
|
+
if (typeof obj_forecasting !== 'boolean') {
|
|
208
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_forecasting + '" (at "' + path_forecasting + '")');
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
if (obj.statusConditions !== undefined) {
|
|
212
|
+
const obj_statusConditions = obj.statusConditions;
|
|
213
|
+
const path_statusConditions = path + '.statusConditions';
|
|
214
|
+
if (!ArrayIsArray(obj_statusConditions)) {
|
|
215
|
+
return new TypeError('Expected "array" but received "' + typeof obj_statusConditions + '" (at "' + path_statusConditions + '")');
|
|
216
|
+
}
|
|
217
|
+
for (let i = 0; i < obj_statusConditions.length; i++) {
|
|
218
|
+
const obj_statusConditions_item = obj_statusConditions[i];
|
|
219
|
+
const path_statusConditions_item = path_statusConditions + '[' + i + ']';
|
|
220
|
+
const referencepath_statusConditions_itemValidationError = validate$H(obj_statusConditions_item, path_statusConditions_item);
|
|
221
|
+
if (referencepath_statusConditions_itemValidationError !== null) {
|
|
222
|
+
let message = 'Object doesn\'t match GoalMetadata_StatusCondition (at "' + path_statusConditions_item + '")\n';
|
|
223
|
+
message += referencepath_statusConditions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
224
|
+
return new TypeError(message);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
})();
|
|
229
|
+
return v_error === undefined ? null : v_error;
|
|
230
|
+
}
|
|
231
|
+
|
|
148
232
|
function validate$F(obj, path = 'InsightsOptions_InsightSetting') {
|
|
149
233
|
const v_error = (() => {
|
|
150
234
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -744,12 +828,22 @@ function validate$m(obj, path = 'InputMetric') {
|
|
|
744
828
|
}
|
|
745
829
|
const obj_extensionOptions = obj.extensionOptions;
|
|
746
830
|
const path_extensionOptions = path + '.extensionOptions';
|
|
747
|
-
const referencepath_extensionOptionsValidationError = validate$
|
|
831
|
+
const referencepath_extensionOptionsValidationError = validate$I(obj_extensionOptions, path_extensionOptions);
|
|
748
832
|
if (referencepath_extensionOptionsValidationError !== null) {
|
|
749
833
|
let message = 'Object doesn\'t match ExtensionOptions (at "' + path_extensionOptions + '")\n';
|
|
750
834
|
message += referencepath_extensionOptionsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
751
835
|
return new TypeError(message);
|
|
752
836
|
}
|
|
837
|
+
if (obj.goals !== undefined) {
|
|
838
|
+
const obj_goals = obj.goals;
|
|
839
|
+
const path_goals = path + '.goals';
|
|
840
|
+
const referencepath_goalsValidationError = validate$G(obj_goals, path_goals);
|
|
841
|
+
if (referencepath_goalsValidationError !== null) {
|
|
842
|
+
let message = 'Object doesn\'t match GoalMetadata (at "' + path_goals + '")\n';
|
|
843
|
+
message += referencepath_goalsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
844
|
+
return new TypeError(message);
|
|
845
|
+
}
|
|
846
|
+
}
|
|
753
847
|
const obj_insightsOptions = obj.insightsOptions;
|
|
754
848
|
const path_insightsOptions = path + '.insightsOptions';
|
|
755
849
|
const referencepath_insightsOptionsValidationError = validate$E(obj_insightsOptions, path_insightsOptions);
|
|
@@ -793,7 +887,7 @@ function validate$l(obj, path = 'InsightBundleInput') {
|
|
|
793
887
|
}
|
|
794
888
|
const obj_metadata = obj.metadata;
|
|
795
889
|
const path_metadata = path + '.metadata';
|
|
796
|
-
const referencepath_metadataValidationError = validate$
|
|
890
|
+
const referencepath_metadataValidationError = validate$J(obj_metadata, path_metadata);
|
|
797
891
|
if (referencepath_metadataValidationError !== null) {
|
|
798
892
|
let message = 'Object doesn\'t match MetricMetadata (at "' + path_metadata + '")\n';
|
|
799
893
|
message += referencepath_metadataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { GoalMetadata_StatusCondition as GoalMetadata_StatusCondition_GoalMetadata_StatusCondition } from './GoalMetadata_StatusCondition';
|
|
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 = "e50e1ade99afa0af26c6426ef1104abf";
|
|
4
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
5
|
+
export declare const RepresentationType: string;
|
|
6
|
+
export declare function normalize(input: GoalMetadata, existing: GoalMetadataNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): GoalMetadataNormalized;
|
|
7
|
+
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
8
|
+
export declare function equals(existing: GoalMetadataNormalized, incoming: GoalMetadataNormalized): 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: GoalMetadata, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
*
|
|
14
|
+
* Keys:
|
|
15
|
+
* (none)
|
|
16
|
+
*/
|
|
17
|
+
export interface GoalMetadataNormalized {
|
|
18
|
+
forecasting?: boolean;
|
|
19
|
+
statusConditions?: Array<GoalMetadata_StatusCondition_GoalMetadata_StatusCondition>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
*
|
|
24
|
+
* Keys:
|
|
25
|
+
* (none)
|
|
26
|
+
*/
|
|
27
|
+
export interface GoalMetadata {
|
|
28
|
+
forecasting?: boolean;
|
|
29
|
+
statusConditions?: Array<GoalMetadata_StatusCondition_GoalMetadata_StatusCondition>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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 = "04b77164c551085930f8c762fbc0baf7";
|
|
3
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
4
|
+
export declare const RepresentationType: string;
|
|
5
|
+
export declare function normalize(input: GoalMetadata_StatusCondition, existing: GoalMetadata_StatusConditionNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): GoalMetadata_StatusConditionNormalized;
|
|
6
|
+
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
|
+
export declare function equals(existing: GoalMetadata_StatusConditionNormalized, incoming: GoalMetadata_StatusConditionNormalized): boolean;
|
|
8
|
+
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
9
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: GoalMetadata_StatusCondition, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
* Keys:
|
|
14
|
+
* (none)
|
|
15
|
+
*/
|
|
16
|
+
export interface GoalMetadata_StatusConditionNormalized {
|
|
17
|
+
color?: string;
|
|
18
|
+
currencyIsoCode?: string;
|
|
19
|
+
operator?: string;
|
|
20
|
+
primary?: boolean;
|
|
21
|
+
statusName?: string;
|
|
22
|
+
value?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
*
|
|
27
|
+
* Keys:
|
|
28
|
+
* (none)
|
|
29
|
+
*/
|
|
30
|
+
export interface GoalMetadata_StatusCondition {
|
|
31
|
+
color?: string;
|
|
32
|
+
currencyIsoCode?: string;
|
|
33
|
+
operator?: string;
|
|
34
|
+
primary?: boolean;
|
|
35
|
+
statusName?: string;
|
|
36
|
+
value?: string;
|
|
37
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ExtensionOptions as ExtensionOptions_ExtensionOptions } from './ExtensionOptions';
|
|
2
|
+
import { GoalMetadata as GoalMetadata_GoalMetadata } from './GoalMetadata';
|
|
2
3
|
import { InsightsOptions as InsightsOptions_InsightsOptions } from './InsightsOptions';
|
|
3
4
|
import { MetricInstance as MetricInstance_MetricInstance } from './MetricInstance';
|
|
4
5
|
import { MetricDefinition as MetricDefinition_MetricDefinition } from './MetricDefinition';
|
|
5
6
|
import { RepresentationOptions as RepresentationOptions_RepresentationOptions } from './RepresentationOptions';
|
|
6
7
|
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';
|
|
7
|
-
export declare const VERSION = "
|
|
8
|
+
export declare const VERSION = "fabb0211ec0f98955089dfac31fe7c0c";
|
|
8
9
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
9
10
|
export declare const RepresentationType: string;
|
|
10
11
|
export declare function normalize(input: InputMetric, existing: InputMetricNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): InputMetricNormalized;
|
|
@@ -20,6 +21,7 @@ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableSto
|
|
|
20
21
|
*/
|
|
21
22
|
export interface InputMetricNormalized {
|
|
22
23
|
extensionOptions: ExtensionOptions_ExtensionOptions;
|
|
24
|
+
goals?: GoalMetadata_GoalMetadata;
|
|
23
25
|
insightsOptions: InsightsOptions_InsightsOptions;
|
|
24
26
|
instance: MetricInstance_MetricInstance;
|
|
25
27
|
metric: MetricDefinition_MetricDefinition;
|
|
@@ -33,6 +35,7 @@ export interface InputMetricNormalized {
|
|
|
33
35
|
*/
|
|
34
36
|
export interface InputMetric {
|
|
35
37
|
extensionOptions: ExtensionOptions_ExtensionOptions;
|
|
38
|
+
goals?: GoalMetadata_GoalMetadata;
|
|
36
39
|
insightsOptions: InsightsOptions_InsightsOptions;
|
|
37
40
|
instance: MetricInstance_MetricInstance;
|
|
38
41
|
metric: MetricDefinition_MetricDefinition;
|
|
@@ -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 = "
|
|
2
|
+
export declare const VERSION = "9a4f0f6afd72539eaa9ecacc66570157";
|
|
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: RelativePeriod, existing: RelativePeriodNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): RelativePeriodNormalized;
|
|
@@ -8,7 +8,7 @@ export declare function equals(existing: RelativePeriodNormalized, incoming: Rel
|
|
|
8
8
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
9
9
|
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: RelativePeriod, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* The old insights time filter
|
|
12
12
|
*
|
|
13
13
|
* Keys:
|
|
14
14
|
* (none)
|
|
@@ -18,7 +18,7 @@ export interface RelativePeriodNormalized {
|
|
|
18
18
|
range?: string;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* The old insights time filter
|
|
22
22
|
*
|
|
23
23
|
* Keys:
|
|
24
24
|
* (none)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-sfap-analytics-insights",
|
|
3
|
-
"version": "1.332.0-
|
|
3
|
+
"version": "1.332.0-dev8",
|
|
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.332.0-
|
|
43
|
+
"@salesforce/lds-bindings": "^1.332.0-dev8"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@salesforce/lds-compiler-plugins": "^1.332.0-
|
|
46
|
+
"@salesforce/lds-compiler-plugins": "^1.332.0-dev8"
|
|
47
47
|
},
|
|
48
48
|
"nx": {
|
|
49
49
|
"targets": {
|
package/sfdc/index.js
CHANGED
|
@@ -102,7 +102,7 @@ function createLink(ref) {
|
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
function validate$
|
|
105
|
+
function validate$J(obj, path = 'MetricMetadata') {
|
|
106
106
|
const v_error = (() => {
|
|
107
107
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
108
108
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -125,7 +125,7 @@ function validate$H(obj, path = 'MetricMetadata') {
|
|
|
125
125
|
return v_error === undefined ? null : v_error;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
function validate$
|
|
128
|
+
function validate$I(obj, path = 'ExtensionOptions') {
|
|
129
129
|
const v_error = (() => {
|
|
130
130
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
131
131
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -155,6 +155,90 @@ function validate$G(obj, path = 'ExtensionOptions') {
|
|
|
155
155
|
return v_error === undefined ? null : v_error;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
+
function validate$H(obj, path = 'GoalMetadata_StatusCondition') {
|
|
159
|
+
const v_error = (() => {
|
|
160
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
161
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
162
|
+
}
|
|
163
|
+
if (obj.color !== undefined) {
|
|
164
|
+
const obj_color = obj.color;
|
|
165
|
+
const path_color = path + '.color';
|
|
166
|
+
if (typeof obj_color !== 'string') {
|
|
167
|
+
return new TypeError('Expected "string" but received "' + typeof obj_color + '" (at "' + path_color + '")');
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
if (obj.currencyIsoCode !== undefined) {
|
|
171
|
+
const obj_currencyIsoCode = obj.currencyIsoCode;
|
|
172
|
+
const path_currencyIsoCode = path + '.currencyIsoCode';
|
|
173
|
+
if (typeof obj_currencyIsoCode !== 'string') {
|
|
174
|
+
return new TypeError('Expected "string" but received "' + typeof obj_currencyIsoCode + '" (at "' + path_currencyIsoCode + '")');
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (obj.operator !== undefined) {
|
|
178
|
+
const obj_operator = obj.operator;
|
|
179
|
+
const path_operator = path + '.operator';
|
|
180
|
+
if (typeof obj_operator !== 'string') {
|
|
181
|
+
return new TypeError('Expected "string" but received "' + typeof obj_operator + '" (at "' + path_operator + '")');
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
if (obj.primary !== undefined) {
|
|
185
|
+
const obj_primary = obj.primary;
|
|
186
|
+
const path_primary = path + '.primary';
|
|
187
|
+
if (typeof obj_primary !== 'boolean') {
|
|
188
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_primary + '" (at "' + path_primary + '")');
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
if (obj.statusName !== undefined) {
|
|
192
|
+
const obj_statusName = obj.statusName;
|
|
193
|
+
const path_statusName = path + '.statusName';
|
|
194
|
+
if (typeof obj_statusName !== 'string') {
|
|
195
|
+
return new TypeError('Expected "string" but received "' + typeof obj_statusName + '" (at "' + path_statusName + '")');
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
if (obj.value !== undefined) {
|
|
199
|
+
const obj_value = obj.value;
|
|
200
|
+
const path_value = path + '.value';
|
|
201
|
+
if (typeof obj_value !== 'string') {
|
|
202
|
+
return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
})();
|
|
206
|
+
return v_error === undefined ? null : v_error;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
function validate$G(obj, path = 'GoalMetadata') {
|
|
210
|
+
const v_error = (() => {
|
|
211
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
212
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
213
|
+
}
|
|
214
|
+
if (obj.forecasting !== undefined) {
|
|
215
|
+
const obj_forecasting = obj.forecasting;
|
|
216
|
+
const path_forecasting = path + '.forecasting';
|
|
217
|
+
if (typeof obj_forecasting !== 'boolean') {
|
|
218
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_forecasting + '" (at "' + path_forecasting + '")');
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
if (obj.statusConditions !== undefined) {
|
|
222
|
+
const obj_statusConditions = obj.statusConditions;
|
|
223
|
+
const path_statusConditions = path + '.statusConditions';
|
|
224
|
+
if (!ArrayIsArray(obj_statusConditions)) {
|
|
225
|
+
return new TypeError('Expected "array" but received "' + typeof obj_statusConditions + '" (at "' + path_statusConditions + '")');
|
|
226
|
+
}
|
|
227
|
+
for (let i = 0; i < obj_statusConditions.length; i++) {
|
|
228
|
+
const obj_statusConditions_item = obj_statusConditions[i];
|
|
229
|
+
const path_statusConditions_item = path_statusConditions + '[' + i + ']';
|
|
230
|
+
const referencepath_statusConditions_itemValidationError = validate$H(obj_statusConditions_item, path_statusConditions_item);
|
|
231
|
+
if (referencepath_statusConditions_itemValidationError !== null) {
|
|
232
|
+
let message = 'Object doesn\'t match GoalMetadata_StatusCondition (at "' + path_statusConditions_item + '")\n';
|
|
233
|
+
message += referencepath_statusConditions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
234
|
+
return new TypeError(message);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
})();
|
|
239
|
+
return v_error === undefined ? null : v_error;
|
|
240
|
+
}
|
|
241
|
+
|
|
158
242
|
function validate$F(obj, path = 'InsightsOptions_InsightSetting') {
|
|
159
243
|
const v_error = (() => {
|
|
160
244
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -754,12 +838,22 @@ function validate$m(obj, path = 'InputMetric') {
|
|
|
754
838
|
}
|
|
755
839
|
const obj_extensionOptions = obj.extensionOptions;
|
|
756
840
|
const path_extensionOptions = path + '.extensionOptions';
|
|
757
|
-
const referencepath_extensionOptionsValidationError = validate$
|
|
841
|
+
const referencepath_extensionOptionsValidationError = validate$I(obj_extensionOptions, path_extensionOptions);
|
|
758
842
|
if (referencepath_extensionOptionsValidationError !== null) {
|
|
759
843
|
let message = 'Object doesn\'t match ExtensionOptions (at "' + path_extensionOptions + '")\n';
|
|
760
844
|
message += referencepath_extensionOptionsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
761
845
|
return new TypeError(message);
|
|
762
846
|
}
|
|
847
|
+
if (obj.goals !== undefined) {
|
|
848
|
+
const obj_goals = obj.goals;
|
|
849
|
+
const path_goals = path + '.goals';
|
|
850
|
+
const referencepath_goalsValidationError = validate$G(obj_goals, path_goals);
|
|
851
|
+
if (referencepath_goalsValidationError !== null) {
|
|
852
|
+
let message = 'Object doesn\'t match GoalMetadata (at "' + path_goals + '")\n';
|
|
853
|
+
message += referencepath_goalsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
854
|
+
return new TypeError(message);
|
|
855
|
+
}
|
|
856
|
+
}
|
|
763
857
|
const obj_insightsOptions = obj.insightsOptions;
|
|
764
858
|
const path_insightsOptions = path + '.insightsOptions';
|
|
765
859
|
const referencepath_insightsOptionsValidationError = validate$E(obj_insightsOptions, path_insightsOptions);
|
|
@@ -803,7 +897,7 @@ function validate$l(obj, path = 'InsightBundleInput') {
|
|
|
803
897
|
}
|
|
804
898
|
const obj_metadata = obj.metadata;
|
|
805
899
|
const path_metadata = path + '.metadata';
|
|
806
|
-
const referencepath_metadataValidationError = validate$
|
|
900
|
+
const referencepath_metadataValidationError = validate$J(obj_metadata, path_metadata);
|
|
807
901
|
if (referencepath_metadataValidationError !== null) {
|
|
808
902
|
let message = 'Object doesn\'t match MetricMetadata (at "' + path_metadata + '")\n';
|
|
809
903
|
message += referencepath_metadataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3565,4 +3659,4 @@ withDefaultLuvio((luvio) => {
|
|
|
3565
3659
|
});
|
|
3566
3660
|
|
|
3567
3661
|
export { createInsightsBatch, generateInsights, generateInsightsBasic, getInsightsBatch, getInsightsBatchNotifyChange, getInsightsBatch_imperative, getMetricFilterValues };
|
|
3568
|
-
// version: 1.332.0-
|
|
3662
|
+
// version: 1.332.0-dev8-41f1196a17
|
package/src/raml/api.raml
CHANGED
|
@@ -65,6 +65,44 @@ types:
|
|
|
65
65
|
definitionId:
|
|
66
66
|
type: string
|
|
67
67
|
required: false
|
|
68
|
+
GoalMetadata_StatusCondition:
|
|
69
|
+
type: object
|
|
70
|
+
properties:
|
|
71
|
+
statusName:
|
|
72
|
+
type: string
|
|
73
|
+
required: false
|
|
74
|
+
value:
|
|
75
|
+
type: string
|
|
76
|
+
required: false
|
|
77
|
+
operator:
|
|
78
|
+
enum:
|
|
79
|
+
- GreaterThan
|
|
80
|
+
- GreaterThanOrEqualTo
|
|
81
|
+
- LessThan
|
|
82
|
+
- LessThanOrEqualTo
|
|
83
|
+
- Equals
|
|
84
|
+
type: string
|
|
85
|
+
(amf-format): enum
|
|
86
|
+
required: false
|
|
87
|
+
color:
|
|
88
|
+
enum:
|
|
89
|
+
- CloudBlue
|
|
90
|
+
- Green
|
|
91
|
+
- Indigo
|
|
92
|
+
- Pink
|
|
93
|
+
- Red
|
|
94
|
+
- Teal
|
|
95
|
+
- Violet
|
|
96
|
+
- Yellow
|
|
97
|
+
type: string
|
|
98
|
+
(amf-format): enum
|
|
99
|
+
required: false
|
|
100
|
+
currencyIsoCode:
|
|
101
|
+
type: string
|
|
102
|
+
required: false
|
|
103
|
+
primary:
|
|
104
|
+
type: boolean
|
|
105
|
+
required: false
|
|
68
106
|
InsightResponse:
|
|
69
107
|
type: object
|
|
70
108
|
properties:
|
|
@@ -197,6 +235,7 @@ types:
|
|
|
197
235
|
format: int32
|
|
198
236
|
required: false
|
|
199
237
|
RelativePeriod:
|
|
238
|
+
description: The old insights time filter
|
|
200
239
|
type: object
|
|
201
240
|
properties:
|
|
202
241
|
granularity:
|
|
@@ -344,6 +383,9 @@ types:
|
|
|
344
383
|
extensionOptions: ExtensionOptions
|
|
345
384
|
representationOptions: RepresentationOptions
|
|
346
385
|
insightsOptions: InsightsOptions
|
|
386
|
+
goals:
|
|
387
|
+
type: GoalMetadata
|
|
388
|
+
required: false
|
|
347
389
|
TimeDimension:
|
|
348
390
|
type: object
|
|
349
391
|
properties:
|
|
@@ -665,6 +707,16 @@ types:
|
|
|
665
707
|
relativeDateFilterOptions:
|
|
666
708
|
type: RelativeDateFilterOptions
|
|
667
709
|
required: false
|
|
710
|
+
GoalMetadata:
|
|
711
|
+
type: object
|
|
712
|
+
properties:
|
|
713
|
+
statusConditions:
|
|
714
|
+
type: array
|
|
715
|
+
items: GoalMetadata_StatusCondition
|
|
716
|
+
required: false
|
|
717
|
+
forecasting:
|
|
718
|
+
type: boolean
|
|
719
|
+
required: false
|
|
668
720
|
GetFilterValuesRequest:
|
|
669
721
|
type: object
|
|
670
722
|
properties:
|