@salesforce/lds-adapters-commerce-configuration 1.252.0 → 1.256.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.
|
@@ -92,7 +92,7 @@ function createLink(ref) {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
const TTL = 1000;
|
|
95
|
-
const VERSION = "
|
|
95
|
+
const VERSION = "3f1cb4f5f9992e44d62eef68eeaa8ee0";
|
|
96
96
|
function validate(obj, path = 'CommerceConfigurationAttributeOutputRepresentation') {
|
|
97
97
|
const v_error = (() => {
|
|
98
98
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -101,8 +101,29 @@ function validate(obj, path = 'CommerceConfigurationAttributeOutputRepresentatio
|
|
|
101
101
|
if (obj.booleanValue !== undefined) {
|
|
102
102
|
const obj_booleanValue = obj.booleanValue;
|
|
103
103
|
const path_booleanValue = path + '.booleanValue';
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
let obj_booleanValue_union0 = null;
|
|
105
|
+
const obj_booleanValue_union0_error = (() => {
|
|
106
|
+
if (typeof obj_booleanValue !== 'boolean') {
|
|
107
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_booleanValue + '" (at "' + path_booleanValue + '")');
|
|
108
|
+
}
|
|
109
|
+
})();
|
|
110
|
+
if (obj_booleanValue_union0_error != null) {
|
|
111
|
+
obj_booleanValue_union0 = obj_booleanValue_union0_error.message;
|
|
112
|
+
}
|
|
113
|
+
let obj_booleanValue_union1 = null;
|
|
114
|
+
const obj_booleanValue_union1_error = (() => {
|
|
115
|
+
if (obj_booleanValue !== null) {
|
|
116
|
+
return new TypeError('Expected "null" but received "' + typeof obj_booleanValue + '" (at "' + path_booleanValue + '")');
|
|
117
|
+
}
|
|
118
|
+
})();
|
|
119
|
+
if (obj_booleanValue_union1_error != null) {
|
|
120
|
+
obj_booleanValue_union1 = obj_booleanValue_union1_error.message;
|
|
121
|
+
}
|
|
122
|
+
if (obj_booleanValue_union0 && obj_booleanValue_union1) {
|
|
123
|
+
let message = 'Object doesn\'t match union (at "' + path_booleanValue + '")';
|
|
124
|
+
message += '\n' + obj_booleanValue_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
125
|
+
message += '\n' + obj_booleanValue_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
126
|
+
return new TypeError(message);
|
|
106
127
|
}
|
|
107
128
|
}
|
|
108
129
|
const obj_contextId = obj.contextId;
|
|
@@ -123,18 +144,85 @@ function validate(obj, path = 'CommerceConfigurationAttributeOutputRepresentatio
|
|
|
123
144
|
if (obj.integerValue !== undefined) {
|
|
124
145
|
const obj_integerValue = obj.integerValue;
|
|
125
146
|
const path_integerValue = path + '.integerValue';
|
|
126
|
-
|
|
127
|
-
|
|
147
|
+
let obj_integerValue_union0 = null;
|
|
148
|
+
const obj_integerValue_union0_error = (() => {
|
|
149
|
+
if (typeof obj_integerValue !== 'number' || (typeof obj_integerValue === 'number' && Math.floor(obj_integerValue) !== obj_integerValue)) {
|
|
150
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_integerValue + '" (at "' + path_integerValue + '")');
|
|
151
|
+
}
|
|
152
|
+
})();
|
|
153
|
+
if (obj_integerValue_union0_error != null) {
|
|
154
|
+
obj_integerValue_union0 = obj_integerValue_union0_error.message;
|
|
155
|
+
}
|
|
156
|
+
let obj_integerValue_union1 = null;
|
|
157
|
+
const obj_integerValue_union1_error = (() => {
|
|
158
|
+
if (obj_integerValue !== null) {
|
|
159
|
+
return new TypeError('Expected "null" but received "' + typeof obj_integerValue + '" (at "' + path_integerValue + '")');
|
|
160
|
+
}
|
|
161
|
+
})();
|
|
162
|
+
if (obj_integerValue_union1_error != null) {
|
|
163
|
+
obj_integerValue_union1 = obj_integerValue_union1_error.message;
|
|
164
|
+
}
|
|
165
|
+
if (obj_integerValue_union0 && obj_integerValue_union1) {
|
|
166
|
+
let message = 'Object doesn\'t match union (at "' + path_integerValue + '")';
|
|
167
|
+
message += '\n' + obj_integerValue_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
168
|
+
message += '\n' + obj_integerValue_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
169
|
+
return new TypeError(message);
|
|
128
170
|
}
|
|
129
171
|
}
|
|
130
172
|
if (obj.numberValue !== undefined) {
|
|
131
|
-
obj.numberValue;
|
|
173
|
+
const obj_numberValue = obj.numberValue;
|
|
174
|
+
const path_numberValue = path + '.numberValue';
|
|
175
|
+
let obj_numberValue_union0 = null;
|
|
176
|
+
const obj_numberValue_union0_error = (() => {
|
|
177
|
+
if (typeof obj_numberValue !== 'number') {
|
|
178
|
+
return new TypeError('Expected "number" but received "' + typeof obj_numberValue + '" (at "' + path_numberValue + '")');
|
|
179
|
+
}
|
|
180
|
+
})();
|
|
181
|
+
if (obj_numberValue_union0_error != null) {
|
|
182
|
+
obj_numberValue_union0 = obj_numberValue_union0_error.message;
|
|
183
|
+
}
|
|
184
|
+
let obj_numberValue_union1 = null;
|
|
185
|
+
const obj_numberValue_union1_error = (() => {
|
|
186
|
+
if (obj_numberValue !== null) {
|
|
187
|
+
return new TypeError('Expected "null" but received "' + typeof obj_numberValue + '" (at "' + path_numberValue + '")');
|
|
188
|
+
}
|
|
189
|
+
})();
|
|
190
|
+
if (obj_numberValue_union1_error != null) {
|
|
191
|
+
obj_numberValue_union1 = obj_numberValue_union1_error.message;
|
|
192
|
+
}
|
|
193
|
+
if (obj_numberValue_union0 && obj_numberValue_union1) {
|
|
194
|
+
let message = 'Object doesn\'t match union (at "' + path_numberValue + '")';
|
|
195
|
+
message += '\n' + obj_numberValue_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
196
|
+
message += '\n' + obj_numberValue_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
197
|
+
return new TypeError(message);
|
|
198
|
+
}
|
|
132
199
|
}
|
|
133
200
|
if (obj.stringValue !== undefined) {
|
|
134
201
|
const obj_stringValue = obj.stringValue;
|
|
135
202
|
const path_stringValue = path + '.stringValue';
|
|
136
|
-
|
|
137
|
-
|
|
203
|
+
let obj_stringValue_union0 = null;
|
|
204
|
+
const obj_stringValue_union0_error = (() => {
|
|
205
|
+
if (typeof obj_stringValue !== 'string') {
|
|
206
|
+
return new TypeError('Expected "string" but received "' + typeof obj_stringValue + '" (at "' + path_stringValue + '")');
|
|
207
|
+
}
|
|
208
|
+
})();
|
|
209
|
+
if (obj_stringValue_union0_error != null) {
|
|
210
|
+
obj_stringValue_union0 = obj_stringValue_union0_error.message;
|
|
211
|
+
}
|
|
212
|
+
let obj_stringValue_union1 = null;
|
|
213
|
+
const obj_stringValue_union1_error = (() => {
|
|
214
|
+
if (obj_stringValue !== null) {
|
|
215
|
+
return new TypeError('Expected "null" but received "' + typeof obj_stringValue + '" (at "' + path_stringValue + '")');
|
|
216
|
+
}
|
|
217
|
+
})();
|
|
218
|
+
if (obj_stringValue_union1_error != null) {
|
|
219
|
+
obj_stringValue_union1 = obj_stringValue_union1_error.message;
|
|
220
|
+
}
|
|
221
|
+
if (obj_stringValue_union0 && obj_stringValue_union1) {
|
|
222
|
+
let message = 'Object doesn\'t match union (at "' + path_stringValue + '")';
|
|
223
|
+
message += '\n' + obj_stringValue_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
224
|
+
message += '\n' + obj_stringValue_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
225
|
+
return new TypeError(message);
|
|
138
226
|
}
|
|
139
227
|
}
|
|
140
228
|
if (obj.stringValues !== undefined) {
|
|
@@ -217,6 +305,21 @@ const select$2 = function CommerceConfigurationAttributeOutputRepresentationSele
|
|
|
217
305
|
};
|
|
218
306
|
};
|
|
219
307
|
function equals(existing, incoming) {
|
|
308
|
+
const existing_contextId = existing.contextId;
|
|
309
|
+
const incoming_contextId = incoming.contextId;
|
|
310
|
+
if (!(existing_contextId === incoming_contextId)) {
|
|
311
|
+
return false;
|
|
312
|
+
}
|
|
313
|
+
const existing_contextType = existing.contextType;
|
|
314
|
+
const incoming_contextType = incoming.contextType;
|
|
315
|
+
if (!(existing_contextType === incoming_contextType)) {
|
|
316
|
+
return false;
|
|
317
|
+
}
|
|
318
|
+
const existing_id = existing.id;
|
|
319
|
+
const incoming_id = incoming.id;
|
|
320
|
+
if (!(existing_id === incoming_id)) {
|
|
321
|
+
return false;
|
|
322
|
+
}
|
|
220
323
|
const existing_booleanValue = existing.booleanValue;
|
|
221
324
|
const incoming_booleanValue = incoming.booleanValue;
|
|
222
325
|
// if at least one of these optionals is defined
|
|
@@ -243,44 +346,29 @@ function equals(existing, incoming) {
|
|
|
243
346
|
return false;
|
|
244
347
|
}
|
|
245
348
|
}
|
|
246
|
-
const
|
|
247
|
-
const
|
|
248
|
-
if (!(existing_contextId === incoming_contextId)) {
|
|
249
|
-
return false;
|
|
250
|
-
}
|
|
251
|
-
const existing_contextType = existing.contextType;
|
|
252
|
-
const incoming_contextType = incoming.contextType;
|
|
253
|
-
if (!(existing_contextType === incoming_contextType)) {
|
|
254
|
-
return false;
|
|
255
|
-
}
|
|
256
|
-
const existing_id = existing.id;
|
|
257
|
-
const incoming_id = incoming.id;
|
|
258
|
-
if (!(existing_id === incoming_id)) {
|
|
259
|
-
return false;
|
|
260
|
-
}
|
|
261
|
-
const existing_stringValue = existing.stringValue;
|
|
262
|
-
const incoming_stringValue = incoming.stringValue;
|
|
349
|
+
const existing_numberValue = existing.numberValue;
|
|
350
|
+
const incoming_numberValue = incoming.numberValue;
|
|
263
351
|
// if at least one of these optionals is defined
|
|
264
|
-
if (
|
|
352
|
+
if (existing_numberValue !== undefined || incoming_numberValue !== undefined) {
|
|
265
353
|
// if one of these is not defined we know the other is defined and therefore
|
|
266
354
|
// not equal
|
|
267
|
-
if (
|
|
355
|
+
if (existing_numberValue === undefined || incoming_numberValue === undefined) {
|
|
268
356
|
return false;
|
|
269
357
|
}
|
|
270
|
-
if (!(
|
|
358
|
+
if (!(existing_numberValue === incoming_numberValue)) {
|
|
271
359
|
return false;
|
|
272
360
|
}
|
|
273
361
|
}
|
|
274
|
-
const
|
|
275
|
-
const
|
|
362
|
+
const existing_stringValue = existing.stringValue;
|
|
363
|
+
const incoming_stringValue = incoming.stringValue;
|
|
276
364
|
// if at least one of these optionals is defined
|
|
277
|
-
if (
|
|
365
|
+
if (existing_stringValue !== undefined || incoming_stringValue !== undefined) {
|
|
278
366
|
// if one of these is not defined we know the other is defined and therefore
|
|
279
367
|
// not equal
|
|
280
|
-
if (
|
|
368
|
+
if (existing_stringValue === undefined || incoming_stringValue === undefined) {
|
|
281
369
|
return false;
|
|
282
370
|
}
|
|
283
|
-
if (!(
|
|
371
|
+
if (!(existing_stringValue === incoming_stringValue)) {
|
|
284
372
|
return false;
|
|
285
373
|
}
|
|
286
374
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { KeyMetadata as $64$luvio_engine_KeyMetadata, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Luvio as $64$luvio_engine_Luvio, IngestPath as $64$luvio_engine_IngestPath, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
|
|
2
2
|
export declare const TTL = 1000;
|
|
3
|
-
export declare const VERSION = "
|
|
3
|
+
export declare const VERSION = "3f1cb4f5f9992e44d62eef68eeaa8ee0";
|
|
4
4
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
5
5
|
export declare const RepresentationType: string;
|
|
6
6
|
export interface KeyParams extends $64$luvio_engine_KeyMetadata {
|
|
@@ -29,7 +29,7 @@ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableSto
|
|
|
29
29
|
*/
|
|
30
30
|
export interface CommerceConfigurationAttributeOutputRepresentationNormalized {
|
|
31
31
|
/** The boolean value of the commerce configuration attribute. */
|
|
32
|
-
booleanValue?: boolean;
|
|
32
|
+
booleanValue?: boolean | null;
|
|
33
33
|
/** The id of the context in scope of the context type. */
|
|
34
34
|
contextId: string;
|
|
35
35
|
/** The type of context the configuration attribute applies for. */
|
|
@@ -37,11 +37,11 @@ export interface CommerceConfigurationAttributeOutputRepresentationNormalized {
|
|
|
37
37
|
/** The id of the commerce configuration attribute. */
|
|
38
38
|
id: string;
|
|
39
39
|
/** The integer value of the commerce configuration attribute. */
|
|
40
|
-
integerValue?: number;
|
|
40
|
+
integerValue?: number | null;
|
|
41
41
|
/** The number value of the commerce configuration attribute. */
|
|
42
|
-
numberValue?: number;
|
|
42
|
+
numberValue?: number | null;
|
|
43
43
|
/** The string value of the commerce configuration attribute. */
|
|
44
|
-
stringValue?: string;
|
|
44
|
+
stringValue?: string | null;
|
|
45
45
|
/** The list of string values of the commerce configuration attribute. */
|
|
46
46
|
stringValues?: Array<string>;
|
|
47
47
|
}
|
|
@@ -54,12 +54,12 @@ export interface CommerceConfigurationAttributeOutputRepresentationNormalized {
|
|
|
54
54
|
* contextType (string): contextType
|
|
55
55
|
*/
|
|
56
56
|
export interface CommerceConfigurationAttributeOutputRepresentation {
|
|
57
|
-
booleanValue?: boolean;
|
|
57
|
+
booleanValue?: boolean | null;
|
|
58
58
|
contextId: string;
|
|
59
59
|
contextType: string;
|
|
60
60
|
id: string;
|
|
61
|
-
integerValue?: number;
|
|
62
|
-
numberValue?: number;
|
|
63
|
-
stringValue?: string;
|
|
61
|
+
integerValue?: number | null;
|
|
62
|
+
numberValue?: number | null;
|
|
63
|
+
stringValue?: string | null;
|
|
64
64
|
stringValues?: Array<string>;
|
|
65
65
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-commerce-configuration",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.256.0",
|
|
4
4
|
"description": "Allows reading and changing the values of commerce configuration attributes. These configurations can impact one or multiple areas of Salesforce Commerce.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "dist/es/es2018/commerce-configuration.js",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"test:unit": "jest"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@salesforce/lds-bindings": "
|
|
43
|
+
"@salesforce/lds-bindings": "^1.256.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@salesforce/lds-compiler-plugins": "
|
|
46
|
+
"@salesforce/lds-compiler-plugins": "^1.256.0"
|
|
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
|
const TTL = 1000;
|
|
105
|
-
const VERSION = "
|
|
105
|
+
const VERSION = "3f1cb4f5f9992e44d62eef68eeaa8ee0";
|
|
106
106
|
function validate(obj, path = 'CommerceConfigurationAttributeOutputRepresentation') {
|
|
107
107
|
const v_error = (() => {
|
|
108
108
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -111,8 +111,29 @@ function validate(obj, path = 'CommerceConfigurationAttributeOutputRepresentatio
|
|
|
111
111
|
if (obj.booleanValue !== undefined) {
|
|
112
112
|
const obj_booleanValue = obj.booleanValue;
|
|
113
113
|
const path_booleanValue = path + '.booleanValue';
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
let obj_booleanValue_union0 = null;
|
|
115
|
+
const obj_booleanValue_union0_error = (() => {
|
|
116
|
+
if (typeof obj_booleanValue !== 'boolean') {
|
|
117
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_booleanValue + '" (at "' + path_booleanValue + '")');
|
|
118
|
+
}
|
|
119
|
+
})();
|
|
120
|
+
if (obj_booleanValue_union0_error != null) {
|
|
121
|
+
obj_booleanValue_union0 = obj_booleanValue_union0_error.message;
|
|
122
|
+
}
|
|
123
|
+
let obj_booleanValue_union1 = null;
|
|
124
|
+
const obj_booleanValue_union1_error = (() => {
|
|
125
|
+
if (obj_booleanValue !== null) {
|
|
126
|
+
return new TypeError('Expected "null" but received "' + typeof obj_booleanValue + '" (at "' + path_booleanValue + '")');
|
|
127
|
+
}
|
|
128
|
+
})();
|
|
129
|
+
if (obj_booleanValue_union1_error != null) {
|
|
130
|
+
obj_booleanValue_union1 = obj_booleanValue_union1_error.message;
|
|
131
|
+
}
|
|
132
|
+
if (obj_booleanValue_union0 && obj_booleanValue_union1) {
|
|
133
|
+
let message = 'Object doesn\'t match union (at "' + path_booleanValue + '")';
|
|
134
|
+
message += '\n' + obj_booleanValue_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
135
|
+
message += '\n' + obj_booleanValue_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
136
|
+
return new TypeError(message);
|
|
116
137
|
}
|
|
117
138
|
}
|
|
118
139
|
const obj_contextId = obj.contextId;
|
|
@@ -133,18 +154,85 @@ function validate(obj, path = 'CommerceConfigurationAttributeOutputRepresentatio
|
|
|
133
154
|
if (obj.integerValue !== undefined) {
|
|
134
155
|
const obj_integerValue = obj.integerValue;
|
|
135
156
|
const path_integerValue = path + '.integerValue';
|
|
136
|
-
|
|
137
|
-
|
|
157
|
+
let obj_integerValue_union0 = null;
|
|
158
|
+
const obj_integerValue_union0_error = (() => {
|
|
159
|
+
if (typeof obj_integerValue !== 'number' || (typeof obj_integerValue === 'number' && Math.floor(obj_integerValue) !== obj_integerValue)) {
|
|
160
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_integerValue + '" (at "' + path_integerValue + '")');
|
|
161
|
+
}
|
|
162
|
+
})();
|
|
163
|
+
if (obj_integerValue_union0_error != null) {
|
|
164
|
+
obj_integerValue_union0 = obj_integerValue_union0_error.message;
|
|
165
|
+
}
|
|
166
|
+
let obj_integerValue_union1 = null;
|
|
167
|
+
const obj_integerValue_union1_error = (() => {
|
|
168
|
+
if (obj_integerValue !== null) {
|
|
169
|
+
return new TypeError('Expected "null" but received "' + typeof obj_integerValue + '" (at "' + path_integerValue + '")');
|
|
170
|
+
}
|
|
171
|
+
})();
|
|
172
|
+
if (obj_integerValue_union1_error != null) {
|
|
173
|
+
obj_integerValue_union1 = obj_integerValue_union1_error.message;
|
|
174
|
+
}
|
|
175
|
+
if (obj_integerValue_union0 && obj_integerValue_union1) {
|
|
176
|
+
let message = 'Object doesn\'t match union (at "' + path_integerValue + '")';
|
|
177
|
+
message += '\n' + obj_integerValue_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
178
|
+
message += '\n' + obj_integerValue_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
179
|
+
return new TypeError(message);
|
|
138
180
|
}
|
|
139
181
|
}
|
|
140
182
|
if (obj.numberValue !== undefined) {
|
|
141
|
-
obj.numberValue;
|
|
183
|
+
const obj_numberValue = obj.numberValue;
|
|
184
|
+
const path_numberValue = path + '.numberValue';
|
|
185
|
+
let obj_numberValue_union0 = null;
|
|
186
|
+
const obj_numberValue_union0_error = (() => {
|
|
187
|
+
if (typeof obj_numberValue !== 'number') {
|
|
188
|
+
return new TypeError('Expected "number" but received "' + typeof obj_numberValue + '" (at "' + path_numberValue + '")');
|
|
189
|
+
}
|
|
190
|
+
})();
|
|
191
|
+
if (obj_numberValue_union0_error != null) {
|
|
192
|
+
obj_numberValue_union0 = obj_numberValue_union0_error.message;
|
|
193
|
+
}
|
|
194
|
+
let obj_numberValue_union1 = null;
|
|
195
|
+
const obj_numberValue_union1_error = (() => {
|
|
196
|
+
if (obj_numberValue !== null) {
|
|
197
|
+
return new TypeError('Expected "null" but received "' + typeof obj_numberValue + '" (at "' + path_numberValue + '")');
|
|
198
|
+
}
|
|
199
|
+
})();
|
|
200
|
+
if (obj_numberValue_union1_error != null) {
|
|
201
|
+
obj_numberValue_union1 = obj_numberValue_union1_error.message;
|
|
202
|
+
}
|
|
203
|
+
if (obj_numberValue_union0 && obj_numberValue_union1) {
|
|
204
|
+
let message = 'Object doesn\'t match union (at "' + path_numberValue + '")';
|
|
205
|
+
message += '\n' + obj_numberValue_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
206
|
+
message += '\n' + obj_numberValue_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
207
|
+
return new TypeError(message);
|
|
208
|
+
}
|
|
142
209
|
}
|
|
143
210
|
if (obj.stringValue !== undefined) {
|
|
144
211
|
const obj_stringValue = obj.stringValue;
|
|
145
212
|
const path_stringValue = path + '.stringValue';
|
|
146
|
-
|
|
147
|
-
|
|
213
|
+
let obj_stringValue_union0 = null;
|
|
214
|
+
const obj_stringValue_union0_error = (() => {
|
|
215
|
+
if (typeof obj_stringValue !== 'string') {
|
|
216
|
+
return new TypeError('Expected "string" but received "' + typeof obj_stringValue + '" (at "' + path_stringValue + '")');
|
|
217
|
+
}
|
|
218
|
+
})();
|
|
219
|
+
if (obj_stringValue_union0_error != null) {
|
|
220
|
+
obj_stringValue_union0 = obj_stringValue_union0_error.message;
|
|
221
|
+
}
|
|
222
|
+
let obj_stringValue_union1 = null;
|
|
223
|
+
const obj_stringValue_union1_error = (() => {
|
|
224
|
+
if (obj_stringValue !== null) {
|
|
225
|
+
return new TypeError('Expected "null" but received "' + typeof obj_stringValue + '" (at "' + path_stringValue + '")');
|
|
226
|
+
}
|
|
227
|
+
})();
|
|
228
|
+
if (obj_stringValue_union1_error != null) {
|
|
229
|
+
obj_stringValue_union1 = obj_stringValue_union1_error.message;
|
|
230
|
+
}
|
|
231
|
+
if (obj_stringValue_union0 && obj_stringValue_union1) {
|
|
232
|
+
let message = 'Object doesn\'t match union (at "' + path_stringValue + '")';
|
|
233
|
+
message += '\n' + obj_stringValue_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
234
|
+
message += '\n' + obj_stringValue_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
235
|
+
return new TypeError(message);
|
|
148
236
|
}
|
|
149
237
|
}
|
|
150
238
|
if (obj.stringValues !== undefined) {
|
|
@@ -227,6 +315,21 @@ const select$2 = function CommerceConfigurationAttributeOutputRepresentationSele
|
|
|
227
315
|
};
|
|
228
316
|
};
|
|
229
317
|
function equals(existing, incoming) {
|
|
318
|
+
const existing_contextId = existing.contextId;
|
|
319
|
+
const incoming_contextId = incoming.contextId;
|
|
320
|
+
if (!(existing_contextId === incoming_contextId)) {
|
|
321
|
+
return false;
|
|
322
|
+
}
|
|
323
|
+
const existing_contextType = existing.contextType;
|
|
324
|
+
const incoming_contextType = incoming.contextType;
|
|
325
|
+
if (!(existing_contextType === incoming_contextType)) {
|
|
326
|
+
return false;
|
|
327
|
+
}
|
|
328
|
+
const existing_id = existing.id;
|
|
329
|
+
const incoming_id = incoming.id;
|
|
330
|
+
if (!(existing_id === incoming_id)) {
|
|
331
|
+
return false;
|
|
332
|
+
}
|
|
230
333
|
const existing_booleanValue = existing.booleanValue;
|
|
231
334
|
const incoming_booleanValue = incoming.booleanValue;
|
|
232
335
|
// if at least one of these optionals is defined
|
|
@@ -253,44 +356,29 @@ function equals(existing, incoming) {
|
|
|
253
356
|
return false;
|
|
254
357
|
}
|
|
255
358
|
}
|
|
256
|
-
const
|
|
257
|
-
const
|
|
258
|
-
if (!(existing_contextId === incoming_contextId)) {
|
|
259
|
-
return false;
|
|
260
|
-
}
|
|
261
|
-
const existing_contextType = existing.contextType;
|
|
262
|
-
const incoming_contextType = incoming.contextType;
|
|
263
|
-
if (!(existing_contextType === incoming_contextType)) {
|
|
264
|
-
return false;
|
|
265
|
-
}
|
|
266
|
-
const existing_id = existing.id;
|
|
267
|
-
const incoming_id = incoming.id;
|
|
268
|
-
if (!(existing_id === incoming_id)) {
|
|
269
|
-
return false;
|
|
270
|
-
}
|
|
271
|
-
const existing_stringValue = existing.stringValue;
|
|
272
|
-
const incoming_stringValue = incoming.stringValue;
|
|
359
|
+
const existing_numberValue = existing.numberValue;
|
|
360
|
+
const incoming_numberValue = incoming.numberValue;
|
|
273
361
|
// if at least one of these optionals is defined
|
|
274
|
-
if (
|
|
362
|
+
if (existing_numberValue !== undefined || incoming_numberValue !== undefined) {
|
|
275
363
|
// if one of these is not defined we know the other is defined and therefore
|
|
276
364
|
// not equal
|
|
277
|
-
if (
|
|
365
|
+
if (existing_numberValue === undefined || incoming_numberValue === undefined) {
|
|
278
366
|
return false;
|
|
279
367
|
}
|
|
280
|
-
if (!(
|
|
368
|
+
if (!(existing_numberValue === incoming_numberValue)) {
|
|
281
369
|
return false;
|
|
282
370
|
}
|
|
283
371
|
}
|
|
284
|
-
const
|
|
285
|
-
const
|
|
372
|
+
const existing_stringValue = existing.stringValue;
|
|
373
|
+
const incoming_stringValue = incoming.stringValue;
|
|
286
374
|
// if at least one of these optionals is defined
|
|
287
|
-
if (
|
|
375
|
+
if (existing_stringValue !== undefined || incoming_stringValue !== undefined) {
|
|
288
376
|
// if one of these is not defined we know the other is defined and therefore
|
|
289
377
|
// not equal
|
|
290
|
-
if (
|
|
378
|
+
if (existing_stringValue === undefined || incoming_stringValue === undefined) {
|
|
291
379
|
return false;
|
|
292
380
|
}
|
|
293
|
-
if (!(
|
|
381
|
+
if (!(existing_stringValue === incoming_stringValue)) {
|
|
294
382
|
return false;
|
|
295
383
|
}
|
|
296
384
|
}
|
|
@@ -744,4 +832,4 @@ withDefaultLuvio((luvio) => {
|
|
|
744
832
|
});
|
|
745
833
|
|
|
746
834
|
export { deleteCommerceConfigurationAttribute, getCommerceConfigurationAttribute, getCommerceConfigurationAttributeNotifyChange, getCommerceConfigurationAttribute_imperative, putCommerceConfigurationAttribute };
|
|
747
|
-
// version: 1.
|
|
835
|
+
// version: 1.256.0-fb019fbad
|
package/src/raml/api.raml
CHANGED
|
@@ -59,7 +59,7 @@ types:
|
|
|
59
59
|
booleanValue:
|
|
60
60
|
description: The boolean value of the commerce configuration attribute.
|
|
61
61
|
required: false # hand-rolled
|
|
62
|
-
type: boolean
|
|
62
|
+
type: boolean | nil
|
|
63
63
|
contextId:
|
|
64
64
|
description: The id of the context in scope of the context type.
|
|
65
65
|
type: string
|
|
@@ -77,16 +77,16 @@ types:
|
|
|
77
77
|
integerValue:
|
|
78
78
|
description: The integer value of the commerce configuration attribute.
|
|
79
79
|
required: false # hand-rolled
|
|
80
|
-
type: integer
|
|
80
|
+
type: integer | nil
|
|
81
81
|
numberValue:
|
|
82
82
|
description: The number value of the commerce configuration attribute.
|
|
83
|
-
format: double
|
|
83
|
+
# format: double # hand-rolled removed, causes errors with union type
|
|
84
84
|
required: false # hand-rolled
|
|
85
|
-
type: number
|
|
85
|
+
type: number | nil
|
|
86
86
|
stringValue:
|
|
87
87
|
description: The string value of the commerce configuration attribute.
|
|
88
88
|
required: false # hand-rolled
|
|
89
|
-
type: string
|
|
89
|
+
type: string | nil
|
|
90
90
|
stringValues:
|
|
91
91
|
description: The list of string values of the commerce configuration attribute.
|
|
92
92
|
required: false # hand-rolled
|