@salesforce/lds-adapters-service-data-category 1.228.0 → 1.229.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.
@@ -82,16 +82,39 @@ function createLink(ref) {
82
82
  };
83
83
  }
84
84
 
85
- const VERSION$2 = "ccff9545652601c1888a16f5eb7ae564";
85
+ const VERSION$2 = "a1b37afe14d9e9799b7a3ee007ce69f6";
86
86
  function validate$2(obj, path = 'DataCategoryRepresentation') {
87
87
  const v_error = (() => {
88
88
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
89
89
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
90
90
  }
91
- const obj_categoryName = obj.categoryName;
92
- const path_categoryName = path + '.categoryName';
93
- if (typeof obj_categoryName !== 'string') {
94
- return new TypeError('Expected "string" but received "' + typeof obj_categoryName + '" (at "' + path_categoryName + '")');
91
+ if (obj.categoryName !== undefined) {
92
+ const obj_categoryName = obj.categoryName;
93
+ const path_categoryName = path + '.categoryName';
94
+ let obj_categoryName_union0 = null;
95
+ const obj_categoryName_union0_error = (() => {
96
+ if (typeof obj_categoryName !== 'string') {
97
+ return new TypeError('Expected "string" but received "' + typeof obj_categoryName + '" (at "' + path_categoryName + '")');
98
+ }
99
+ })();
100
+ if (obj_categoryName_union0_error != null) {
101
+ obj_categoryName_union0 = obj_categoryName_union0_error.message;
102
+ }
103
+ let obj_categoryName_union1 = null;
104
+ const obj_categoryName_union1_error = (() => {
105
+ if (obj_categoryName !== null) {
106
+ return new TypeError('Expected "null" but received "' + typeof obj_categoryName + '" (at "' + path_categoryName + '")');
107
+ }
108
+ })();
109
+ if (obj_categoryName_union1_error != null) {
110
+ obj_categoryName_union1 = obj_categoryName_union1_error.message;
111
+ }
112
+ if (obj_categoryName_union0 && obj_categoryName_union1) {
113
+ let message = 'Object doesn\'t match union (at "' + path_categoryName + '")';
114
+ message += '\n' + obj_categoryName_union0.split('\n').map((line) => '\t' + line).join('\n');
115
+ message += '\n' + obj_categoryName_union1.split('\n').map((line) => '\t' + line).join('\n');
116
+ return new TypeError(message);
117
+ }
95
118
  }
96
119
  const obj_childCategories = obj.childCategories;
97
120
  const path_childCategories = path + '.childCategories';
@@ -105,10 +128,33 @@ function validate$2(obj, path = 'DataCategoryRepresentation') {
105
128
  return new TypeError('Expected "defined" but received "' + typeof obj_childCategories_item + '" (at "' + path_childCategories_item + '")');
106
129
  }
107
130
  }
108
- const obj_label = obj.label;
109
- const path_label = path + '.label';
110
- if (typeof obj_label !== 'string') {
111
- return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
131
+ if (obj.label !== undefined) {
132
+ const obj_label = obj.label;
133
+ const path_label = path + '.label';
134
+ let obj_label_union0 = null;
135
+ const obj_label_union0_error = (() => {
136
+ if (typeof obj_label !== 'string') {
137
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
138
+ }
139
+ })();
140
+ if (obj_label_union0_error != null) {
141
+ obj_label_union0 = obj_label_union0_error.message;
142
+ }
143
+ let obj_label_union1 = null;
144
+ const obj_label_union1_error = (() => {
145
+ if (obj_label !== null) {
146
+ return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
147
+ }
148
+ })();
149
+ if (obj_label_union1_error != null) {
150
+ obj_label_union1 = obj_label_union1_error.message;
151
+ }
152
+ if (obj_label_union0 && obj_label_union1) {
153
+ let message = 'Object doesn\'t match union (at "' + path_label + '")';
154
+ message += '\n' + obj_label_union0.split('\n').map((line) => '\t' + line).join('\n');
155
+ message += '\n' + obj_label_union1.split('\n').map((line) => '\t' + line).join('\n');
156
+ return new TypeError(message);
157
+ }
112
158
  }
113
159
  })();
114
160
  return v_error === undefined ? null : v_error;
@@ -121,7 +167,8 @@ const select$3 = function DataCategoryRepresentationSelect() {
121
167
  selections: [
122
168
  {
123
169
  name: 'categoryName',
124
- kind: 'Scalar'
170
+ kind: 'Scalar',
171
+ required: false
125
172
  },
126
173
  {
127
174
  name: 'childCategories',
@@ -130,7 +177,8 @@ const select$3 = function DataCategoryRepresentationSelect() {
130
177
  },
131
178
  {
132
179
  name: 'label',
133
- kind: 'Scalar'
180
+ kind: 'Scalar',
181
+ required: false
134
182
  }
135
183
  ]
136
184
  };
@@ -138,13 +186,16 @@ const select$3 = function DataCategoryRepresentationSelect() {
138
186
  function equals$2(existing, incoming) {
139
187
  const existing_categoryName = existing.categoryName;
140
188
  const incoming_categoryName = incoming.categoryName;
141
- if (!(existing_categoryName === incoming_categoryName)) {
142
- return false;
143
- }
144
- const existing_label = existing.label;
145
- const incoming_label = incoming.label;
146
- if (!(existing_label === incoming_label)) {
147
- return false;
189
+ // if at least one of these optionals is defined
190
+ if (existing_categoryName !== undefined || incoming_categoryName !== undefined) {
191
+ // if one of these is not defined we know the other is defined and therefore
192
+ // not equal
193
+ if (existing_categoryName === undefined || incoming_categoryName === undefined) {
194
+ return false;
195
+ }
196
+ if (!(existing_categoryName === incoming_categoryName)) {
197
+ return false;
198
+ }
148
199
  }
149
200
  const existing_childCategories = existing.childCategories;
150
201
  const incoming_childCategories = incoming.childCategories;
@@ -156,10 +207,23 @@ function equals$2(existing, incoming) {
156
207
  if (equals_childCategories_items === false) {
157
208
  return false;
158
209
  }
210
+ const existing_label = existing.label;
211
+ const incoming_label = incoming.label;
212
+ // if at least one of these optionals is defined
213
+ if (existing_label !== undefined || incoming_label !== undefined) {
214
+ // if one of these is not defined we know the other is defined and therefore
215
+ // not equal
216
+ if (existing_label === undefined || incoming_label === undefined) {
217
+ return false;
218
+ }
219
+ if (!(existing_label === incoming_label)) {
220
+ return false;
221
+ }
222
+ }
159
223
  return true;
160
224
  }
161
225
 
162
- const VERSION$1 = "bb3ad8223c9402993b9efe107748e116";
226
+ const VERSION$1 = "8e3eb3ae1204429eabbe1e783ca072f7";
163
227
  function validate$1(obj, path = 'DataCategoryGroupRepresentation') {
164
228
  const v_error = (() => {
165
229
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -170,23 +234,92 @@ function validate$1(obj, path = 'DataCategoryGroupRepresentation') {
170
234
  if (typeof obj_categoryGroupName !== 'string') {
171
235
  return new TypeError('Expected "string" but received "' + typeof obj_categoryGroupName + '" (at "' + path_categoryGroupName + '")');
172
236
  }
173
- const obj_description = obj.description;
174
- const path_description = path + '.description';
175
- if (typeof obj_description !== 'string') {
176
- return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
237
+ if (obj.description !== undefined) {
238
+ const obj_description = obj.description;
239
+ const path_description = path + '.description';
240
+ let obj_description_union0 = null;
241
+ const obj_description_union0_error = (() => {
242
+ if (typeof obj_description !== 'string') {
243
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
244
+ }
245
+ })();
246
+ if (obj_description_union0_error != null) {
247
+ obj_description_union0 = obj_description_union0_error.message;
248
+ }
249
+ let obj_description_union1 = null;
250
+ const obj_description_union1_error = (() => {
251
+ if (obj_description !== null) {
252
+ return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
253
+ }
254
+ })();
255
+ if (obj_description_union1_error != null) {
256
+ obj_description_union1 = obj_description_union1_error.message;
257
+ }
258
+ if (obj_description_union0 && obj_description_union1) {
259
+ let message = 'Object doesn\'t match union (at "' + path_description + '")';
260
+ message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
261
+ message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
262
+ return new TypeError(message);
263
+ }
177
264
  }
178
- const obj_label = obj.label;
179
- const path_label = path + '.label';
180
- if (typeof obj_label !== 'string') {
181
- return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
265
+ if (obj.label !== undefined) {
266
+ const obj_label = obj.label;
267
+ const path_label = path + '.label';
268
+ let obj_label_union0 = null;
269
+ const obj_label_union0_error = (() => {
270
+ if (typeof obj_label !== 'string') {
271
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
272
+ }
273
+ })();
274
+ if (obj_label_union0_error != null) {
275
+ obj_label_union0 = obj_label_union0_error.message;
276
+ }
277
+ let obj_label_union1 = null;
278
+ const obj_label_union1_error = (() => {
279
+ if (obj_label !== null) {
280
+ return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
281
+ }
282
+ })();
283
+ if (obj_label_union1_error != null) {
284
+ obj_label_union1 = obj_label_union1_error.message;
285
+ }
286
+ if (obj_label_union0 && obj_label_union1) {
287
+ let message = 'Object doesn\'t match union (at "' + path_label + '")';
288
+ message += '\n' + obj_label_union0.split('\n').map((line) => '\t' + line).join('\n');
289
+ message += '\n' + obj_label_union1.split('\n').map((line) => '\t' + line).join('\n');
290
+ return new TypeError(message);
291
+ }
182
292
  }
183
- const obj_rootCategory = obj.rootCategory;
184
- const path_rootCategory = path + '.rootCategory';
185
- const referencepath_rootCategoryValidationError = validate$2(obj_rootCategory, path_rootCategory);
186
- if (referencepath_rootCategoryValidationError !== null) {
187
- let message = 'Object doesn\'t match DataCategoryRepresentation (at "' + path_rootCategory + '")\n';
188
- message += referencepath_rootCategoryValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
189
- return new TypeError(message);
293
+ if (obj.rootCategory !== undefined) {
294
+ const obj_rootCategory = obj.rootCategory;
295
+ const path_rootCategory = path + '.rootCategory';
296
+ let obj_rootCategory_union0 = null;
297
+ const obj_rootCategory_union0_error = (() => {
298
+ const referencepath_rootCategoryValidationError = validate$2(obj_rootCategory, path_rootCategory);
299
+ if (referencepath_rootCategoryValidationError !== null) {
300
+ let message = 'Object doesn\'t match DataCategoryRepresentation (at "' + path_rootCategory + '")\n';
301
+ message += referencepath_rootCategoryValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
302
+ return new TypeError(message);
303
+ }
304
+ })();
305
+ if (obj_rootCategory_union0_error != null) {
306
+ obj_rootCategory_union0 = obj_rootCategory_union0_error.message;
307
+ }
308
+ let obj_rootCategory_union1 = null;
309
+ const obj_rootCategory_union1_error = (() => {
310
+ if (obj_rootCategory !== null) {
311
+ return new TypeError('Expected "null" but received "' + typeof obj_rootCategory + '" (at "' + path_rootCategory + '")');
312
+ }
313
+ })();
314
+ if (obj_rootCategory_union1_error != null) {
315
+ obj_rootCategory_union1 = obj_rootCategory_union1_error.message;
316
+ }
317
+ if (obj_rootCategory_union0 && obj_rootCategory_union1) {
318
+ let message = 'Object doesn\'t match union (at "' + path_rootCategory + '")';
319
+ message += '\n' + obj_rootCategory_union0.split('\n').map((line) => '\t' + line).join('\n');
320
+ message += '\n' + obj_rootCategory_union1.split('\n').map((line) => '\t' + line).join('\n');
321
+ return new TypeError(message);
322
+ }
190
323
  }
191
324
  })();
192
325
  return v_error === undefined ? null : v_error;
@@ -204,16 +337,20 @@ const select$2 = function DataCategoryGroupRepresentationSelect() {
204
337
  },
205
338
  {
206
339
  name: 'description',
207
- kind: 'Scalar'
340
+ kind: 'Scalar',
341
+ required: false
208
342
  },
209
343
  {
210
344
  name: 'label',
211
- kind: 'Scalar'
345
+ kind: 'Scalar',
346
+ required: false
212
347
  },
213
348
  {
214
349
  name: 'rootCategory',
215
350
  kind: 'Object',
216
- selections: DataCategoryRepresentation__selections
351
+ nullable: true,
352
+ selections: DataCategoryRepresentation__selections,
353
+ required: false
217
354
  }
218
355
  ]
219
356
  };
@@ -226,18 +363,45 @@ function equals$1(existing, incoming) {
226
363
  }
227
364
  const existing_description = existing.description;
228
365
  const incoming_description = incoming.description;
229
- if (!(existing_description === incoming_description)) {
230
- return false;
366
+ // if at least one of these optionals is defined
367
+ if (existing_description !== undefined || incoming_description !== undefined) {
368
+ // if one of these is not defined we know the other is defined and therefore
369
+ // not equal
370
+ if (existing_description === undefined || incoming_description === undefined) {
371
+ return false;
372
+ }
373
+ if (!(existing_description === incoming_description)) {
374
+ return false;
375
+ }
231
376
  }
232
377
  const existing_label = existing.label;
233
378
  const incoming_label = incoming.label;
234
- if (!(existing_label === incoming_label)) {
235
- return false;
379
+ // if at least one of these optionals is defined
380
+ if (existing_label !== undefined || incoming_label !== undefined) {
381
+ // if one of these is not defined we know the other is defined and therefore
382
+ // not equal
383
+ if (existing_label === undefined || incoming_label === undefined) {
384
+ return false;
385
+ }
386
+ if (!(existing_label === incoming_label)) {
387
+ return false;
388
+ }
236
389
  }
237
390
  const existing_rootCategory = existing.rootCategory;
238
391
  const incoming_rootCategory = incoming.rootCategory;
239
- if (!(equals$2(existing_rootCategory, incoming_rootCategory))) {
240
- return false;
392
+ // if at least one of these optionals is defined
393
+ if (existing_rootCategory !== undefined || incoming_rootCategory !== undefined) {
394
+ // if one of these is not defined we know the other is defined and therefore
395
+ // not equal
396
+ if (existing_rootCategory === undefined || incoming_rootCategory === undefined) {
397
+ return false;
398
+ }
399
+ if (!(existing_rootCategory === incoming_rootCategory
400
+ || (existing_rootCategory != null &&
401
+ incoming_rootCategory != null &&
402
+ equals$2(existing_rootCategory, incoming_rootCategory)))) {
403
+ return false;
404
+ }
241
405
  }
242
406
  return true;
243
407
  }
@@ -1,6 +1,6 @@
1
1
  import { DataCategoryRepresentation as DataCategoryRepresentation_DataCategoryRepresentation } from './DataCategoryRepresentation';
2
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 = "bb3ad8223c9402993b9efe107748e116";
3
+ export declare const VERSION = "8e3eb3ae1204429eabbe1e783ca072f7";
4
4
  export declare function validate(obj: any, path?: string): TypeError | null;
5
5
  export declare const RepresentationType: string;
6
6
  export declare function normalize(input: DataCategoryGroupRepresentation, existing: DataCategoryGroupRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): DataCategoryGroupRepresentationNormalized;
@@ -18,10 +18,11 @@ export interface DataCategoryGroupRepresentationNormalized {
18
18
  /** Developer Name of the Data Category Group */
19
19
  categoryGroupName: string;
20
20
  /** Description of the Data Category Group */
21
- description: string;
21
+ description?: string | null;
22
22
  /** Label of the Data Category Group */
23
- label: string;
24
- rootCategory: DataCategoryRepresentation_DataCategoryRepresentation;
23
+ label?: string | null;
24
+ /** Root Category of the Data Category Group */
25
+ rootCategory?: DataCategoryRepresentation_DataCategoryRepresentation | null;
25
26
  }
26
27
  /**
27
28
  * Data Category Group Representation
@@ -31,7 +32,7 @@ export interface DataCategoryGroupRepresentationNormalized {
31
32
  */
32
33
  export interface DataCategoryGroupRepresentation {
33
34
  categoryGroupName: string;
34
- description: string;
35
- label: string;
36
- rootCategory: DataCategoryRepresentation_DataCategoryRepresentation;
35
+ description?: string | null;
36
+ label?: string | null;
37
+ rootCategory?: DataCategoryRepresentation_DataCategoryRepresentation | null;
37
38
  }
@@ -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 = "ccff9545652601c1888a16f5eb7ae564";
2
+ export declare const VERSION = "a1b37afe14d9e9799b7a3ee007ce69f6";
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: DataCategoryRepresentation, existing: DataCategoryRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): DataCategoryRepresentationNormalized;
@@ -15,11 +15,11 @@ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableSto
15
15
  */
16
16
  export interface DataCategoryRepresentationNormalized {
17
17
  /** Developer Name of the Data Category */
18
- categoryName: string;
18
+ categoryName?: string | null;
19
19
  /** List of child data categories */
20
20
  childCategories: Array<unknown>;
21
21
  /** Label of the Data Category */
22
- label: string;
22
+ label?: string | null;
23
23
  }
24
24
  /**
25
25
  * Data Category Representation
@@ -28,7 +28,7 @@ export interface DataCategoryRepresentationNormalized {
28
28
  * (none)
29
29
  */
30
30
  export interface DataCategoryRepresentation {
31
- categoryName: string;
31
+ categoryName?: string | null;
32
32
  childCategories: Array<unknown>;
33
- label: string;
33
+ label?: string | null;
34
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-service-data-category",
3
- "version": "1.228.0",
3
+ "version": "1.229.0",
4
4
  "description": "Contains APIs that return information pertaining to data categories",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "dist/es/es2018/service-data-category.js",
package/sfdc/index.js CHANGED
@@ -92,16 +92,39 @@ function createLink(ref) {
92
92
  };
93
93
  }
94
94
 
95
- const VERSION$2 = "ccff9545652601c1888a16f5eb7ae564";
95
+ const VERSION$2 = "a1b37afe14d9e9799b7a3ee007ce69f6";
96
96
  function validate$2(obj, path = 'DataCategoryRepresentation') {
97
97
  const v_error = (() => {
98
98
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
99
99
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
100
100
  }
101
- const obj_categoryName = obj.categoryName;
102
- const path_categoryName = path + '.categoryName';
103
- if (typeof obj_categoryName !== 'string') {
104
- return new TypeError('Expected "string" but received "' + typeof obj_categoryName + '" (at "' + path_categoryName + '")');
101
+ if (obj.categoryName !== undefined) {
102
+ const obj_categoryName = obj.categoryName;
103
+ const path_categoryName = path + '.categoryName';
104
+ let obj_categoryName_union0 = null;
105
+ const obj_categoryName_union0_error = (() => {
106
+ if (typeof obj_categoryName !== 'string') {
107
+ return new TypeError('Expected "string" but received "' + typeof obj_categoryName + '" (at "' + path_categoryName + '")');
108
+ }
109
+ })();
110
+ if (obj_categoryName_union0_error != null) {
111
+ obj_categoryName_union0 = obj_categoryName_union0_error.message;
112
+ }
113
+ let obj_categoryName_union1 = null;
114
+ const obj_categoryName_union1_error = (() => {
115
+ if (obj_categoryName !== null) {
116
+ return new TypeError('Expected "null" but received "' + typeof obj_categoryName + '" (at "' + path_categoryName + '")');
117
+ }
118
+ })();
119
+ if (obj_categoryName_union1_error != null) {
120
+ obj_categoryName_union1 = obj_categoryName_union1_error.message;
121
+ }
122
+ if (obj_categoryName_union0 && obj_categoryName_union1) {
123
+ let message = 'Object doesn\'t match union (at "' + path_categoryName + '")';
124
+ message += '\n' + obj_categoryName_union0.split('\n').map((line) => '\t' + line).join('\n');
125
+ message += '\n' + obj_categoryName_union1.split('\n').map((line) => '\t' + line).join('\n');
126
+ return new TypeError(message);
127
+ }
105
128
  }
106
129
  const obj_childCategories = obj.childCategories;
107
130
  const path_childCategories = path + '.childCategories';
@@ -115,10 +138,33 @@ function validate$2(obj, path = 'DataCategoryRepresentation') {
115
138
  return new TypeError('Expected "defined" but received "' + typeof obj_childCategories_item + '" (at "' + path_childCategories_item + '")');
116
139
  }
117
140
  }
118
- const obj_label = obj.label;
119
- const path_label = path + '.label';
120
- if (typeof obj_label !== 'string') {
121
- return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
141
+ if (obj.label !== undefined) {
142
+ const obj_label = obj.label;
143
+ const path_label = path + '.label';
144
+ let obj_label_union0 = null;
145
+ const obj_label_union0_error = (() => {
146
+ if (typeof obj_label !== 'string') {
147
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
148
+ }
149
+ })();
150
+ if (obj_label_union0_error != null) {
151
+ obj_label_union0 = obj_label_union0_error.message;
152
+ }
153
+ let obj_label_union1 = null;
154
+ const obj_label_union1_error = (() => {
155
+ if (obj_label !== null) {
156
+ return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
157
+ }
158
+ })();
159
+ if (obj_label_union1_error != null) {
160
+ obj_label_union1 = obj_label_union1_error.message;
161
+ }
162
+ if (obj_label_union0 && obj_label_union1) {
163
+ let message = 'Object doesn\'t match union (at "' + path_label + '")';
164
+ message += '\n' + obj_label_union0.split('\n').map((line) => '\t' + line).join('\n');
165
+ message += '\n' + obj_label_union1.split('\n').map((line) => '\t' + line).join('\n');
166
+ return new TypeError(message);
167
+ }
122
168
  }
123
169
  })();
124
170
  return v_error === undefined ? null : v_error;
@@ -131,7 +177,8 @@ const select$3 = function DataCategoryRepresentationSelect() {
131
177
  selections: [
132
178
  {
133
179
  name: 'categoryName',
134
- kind: 'Scalar'
180
+ kind: 'Scalar',
181
+ required: false
135
182
  },
136
183
  {
137
184
  name: 'childCategories',
@@ -140,7 +187,8 @@ const select$3 = function DataCategoryRepresentationSelect() {
140
187
  },
141
188
  {
142
189
  name: 'label',
143
- kind: 'Scalar'
190
+ kind: 'Scalar',
191
+ required: false
144
192
  }
145
193
  ]
146
194
  };
@@ -148,13 +196,16 @@ const select$3 = function DataCategoryRepresentationSelect() {
148
196
  function equals$2(existing, incoming) {
149
197
  const existing_categoryName = existing.categoryName;
150
198
  const incoming_categoryName = incoming.categoryName;
151
- if (!(existing_categoryName === incoming_categoryName)) {
152
- return false;
153
- }
154
- const existing_label = existing.label;
155
- const incoming_label = incoming.label;
156
- if (!(existing_label === incoming_label)) {
157
- return false;
199
+ // if at least one of these optionals is defined
200
+ if (existing_categoryName !== undefined || incoming_categoryName !== undefined) {
201
+ // if one of these is not defined we know the other is defined and therefore
202
+ // not equal
203
+ if (existing_categoryName === undefined || incoming_categoryName === undefined) {
204
+ return false;
205
+ }
206
+ if (!(existing_categoryName === incoming_categoryName)) {
207
+ return false;
208
+ }
158
209
  }
159
210
  const existing_childCategories = existing.childCategories;
160
211
  const incoming_childCategories = incoming.childCategories;
@@ -166,10 +217,23 @@ function equals$2(existing, incoming) {
166
217
  if (equals_childCategories_items === false) {
167
218
  return false;
168
219
  }
220
+ const existing_label = existing.label;
221
+ const incoming_label = incoming.label;
222
+ // if at least one of these optionals is defined
223
+ if (existing_label !== undefined || incoming_label !== undefined) {
224
+ // if one of these is not defined we know the other is defined and therefore
225
+ // not equal
226
+ if (existing_label === undefined || incoming_label === undefined) {
227
+ return false;
228
+ }
229
+ if (!(existing_label === incoming_label)) {
230
+ return false;
231
+ }
232
+ }
169
233
  return true;
170
234
  }
171
235
 
172
- const VERSION$1 = "bb3ad8223c9402993b9efe107748e116";
236
+ const VERSION$1 = "8e3eb3ae1204429eabbe1e783ca072f7";
173
237
  function validate$1(obj, path = 'DataCategoryGroupRepresentation') {
174
238
  const v_error = (() => {
175
239
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -180,23 +244,92 @@ function validate$1(obj, path = 'DataCategoryGroupRepresentation') {
180
244
  if (typeof obj_categoryGroupName !== 'string') {
181
245
  return new TypeError('Expected "string" but received "' + typeof obj_categoryGroupName + '" (at "' + path_categoryGroupName + '")');
182
246
  }
183
- const obj_description = obj.description;
184
- const path_description = path + '.description';
185
- if (typeof obj_description !== 'string') {
186
- return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
247
+ if (obj.description !== undefined) {
248
+ const obj_description = obj.description;
249
+ const path_description = path + '.description';
250
+ let obj_description_union0 = null;
251
+ const obj_description_union0_error = (() => {
252
+ if (typeof obj_description !== 'string') {
253
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
254
+ }
255
+ })();
256
+ if (obj_description_union0_error != null) {
257
+ obj_description_union0 = obj_description_union0_error.message;
258
+ }
259
+ let obj_description_union1 = null;
260
+ const obj_description_union1_error = (() => {
261
+ if (obj_description !== null) {
262
+ return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
263
+ }
264
+ })();
265
+ if (obj_description_union1_error != null) {
266
+ obj_description_union1 = obj_description_union1_error.message;
267
+ }
268
+ if (obj_description_union0 && obj_description_union1) {
269
+ let message = 'Object doesn\'t match union (at "' + path_description + '")';
270
+ message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
271
+ message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
272
+ return new TypeError(message);
273
+ }
187
274
  }
188
- const obj_label = obj.label;
189
- const path_label = path + '.label';
190
- if (typeof obj_label !== 'string') {
191
- return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
275
+ if (obj.label !== undefined) {
276
+ const obj_label = obj.label;
277
+ const path_label = path + '.label';
278
+ let obj_label_union0 = null;
279
+ const obj_label_union0_error = (() => {
280
+ if (typeof obj_label !== 'string') {
281
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
282
+ }
283
+ })();
284
+ if (obj_label_union0_error != null) {
285
+ obj_label_union0 = obj_label_union0_error.message;
286
+ }
287
+ let obj_label_union1 = null;
288
+ const obj_label_union1_error = (() => {
289
+ if (obj_label !== null) {
290
+ return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
291
+ }
292
+ })();
293
+ if (obj_label_union1_error != null) {
294
+ obj_label_union1 = obj_label_union1_error.message;
295
+ }
296
+ if (obj_label_union0 && obj_label_union1) {
297
+ let message = 'Object doesn\'t match union (at "' + path_label + '")';
298
+ message += '\n' + obj_label_union0.split('\n').map((line) => '\t' + line).join('\n');
299
+ message += '\n' + obj_label_union1.split('\n').map((line) => '\t' + line).join('\n');
300
+ return new TypeError(message);
301
+ }
192
302
  }
193
- const obj_rootCategory = obj.rootCategory;
194
- const path_rootCategory = path + '.rootCategory';
195
- const referencepath_rootCategoryValidationError = validate$2(obj_rootCategory, path_rootCategory);
196
- if (referencepath_rootCategoryValidationError !== null) {
197
- let message = 'Object doesn\'t match DataCategoryRepresentation (at "' + path_rootCategory + '")\n';
198
- message += referencepath_rootCategoryValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
199
- return new TypeError(message);
303
+ if (obj.rootCategory !== undefined) {
304
+ const obj_rootCategory = obj.rootCategory;
305
+ const path_rootCategory = path + '.rootCategory';
306
+ let obj_rootCategory_union0 = null;
307
+ const obj_rootCategory_union0_error = (() => {
308
+ const referencepath_rootCategoryValidationError = validate$2(obj_rootCategory, path_rootCategory);
309
+ if (referencepath_rootCategoryValidationError !== null) {
310
+ let message = 'Object doesn\'t match DataCategoryRepresentation (at "' + path_rootCategory + '")\n';
311
+ message += referencepath_rootCategoryValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
312
+ return new TypeError(message);
313
+ }
314
+ })();
315
+ if (obj_rootCategory_union0_error != null) {
316
+ obj_rootCategory_union0 = obj_rootCategory_union0_error.message;
317
+ }
318
+ let obj_rootCategory_union1 = null;
319
+ const obj_rootCategory_union1_error = (() => {
320
+ if (obj_rootCategory !== null) {
321
+ return new TypeError('Expected "null" but received "' + typeof obj_rootCategory + '" (at "' + path_rootCategory + '")');
322
+ }
323
+ })();
324
+ if (obj_rootCategory_union1_error != null) {
325
+ obj_rootCategory_union1 = obj_rootCategory_union1_error.message;
326
+ }
327
+ if (obj_rootCategory_union0 && obj_rootCategory_union1) {
328
+ let message = 'Object doesn\'t match union (at "' + path_rootCategory + '")';
329
+ message += '\n' + obj_rootCategory_union0.split('\n').map((line) => '\t' + line).join('\n');
330
+ message += '\n' + obj_rootCategory_union1.split('\n').map((line) => '\t' + line).join('\n');
331
+ return new TypeError(message);
332
+ }
200
333
  }
201
334
  })();
202
335
  return v_error === undefined ? null : v_error;
@@ -214,16 +347,20 @@ const select$2 = function DataCategoryGroupRepresentationSelect() {
214
347
  },
215
348
  {
216
349
  name: 'description',
217
- kind: 'Scalar'
350
+ kind: 'Scalar',
351
+ required: false
218
352
  },
219
353
  {
220
354
  name: 'label',
221
- kind: 'Scalar'
355
+ kind: 'Scalar',
356
+ required: false
222
357
  },
223
358
  {
224
359
  name: 'rootCategory',
225
360
  kind: 'Object',
226
- selections: DataCategoryRepresentation__selections
361
+ nullable: true,
362
+ selections: DataCategoryRepresentation__selections,
363
+ required: false
227
364
  }
228
365
  ]
229
366
  };
@@ -236,18 +373,45 @@ function equals$1(existing, incoming) {
236
373
  }
237
374
  const existing_description = existing.description;
238
375
  const incoming_description = incoming.description;
239
- if (!(existing_description === incoming_description)) {
240
- return false;
376
+ // if at least one of these optionals is defined
377
+ if (existing_description !== undefined || incoming_description !== undefined) {
378
+ // if one of these is not defined we know the other is defined and therefore
379
+ // not equal
380
+ if (existing_description === undefined || incoming_description === undefined) {
381
+ return false;
382
+ }
383
+ if (!(existing_description === incoming_description)) {
384
+ return false;
385
+ }
241
386
  }
242
387
  const existing_label = existing.label;
243
388
  const incoming_label = incoming.label;
244
- if (!(existing_label === incoming_label)) {
245
- return false;
389
+ // if at least one of these optionals is defined
390
+ if (existing_label !== undefined || incoming_label !== undefined) {
391
+ // if one of these is not defined we know the other is defined and therefore
392
+ // not equal
393
+ if (existing_label === undefined || incoming_label === undefined) {
394
+ return false;
395
+ }
396
+ if (!(existing_label === incoming_label)) {
397
+ return false;
398
+ }
246
399
  }
247
400
  const existing_rootCategory = existing.rootCategory;
248
401
  const incoming_rootCategory = incoming.rootCategory;
249
- if (!(equals$2(existing_rootCategory, incoming_rootCategory))) {
250
- return false;
402
+ // if at least one of these optionals is defined
403
+ if (existing_rootCategory !== undefined || incoming_rootCategory !== undefined) {
404
+ // if one of these is not defined we know the other is defined and therefore
405
+ // not equal
406
+ if (existing_rootCategory === undefined || incoming_rootCategory === undefined) {
407
+ return false;
408
+ }
409
+ if (!(existing_rootCategory === incoming_rootCategory
410
+ || (existing_rootCategory != null &&
411
+ incoming_rootCategory != null &&
412
+ equals$2(existing_rootCategory, incoming_rootCategory)))) {
413
+ return false;
414
+ }
251
415
  }
252
416
  return true;
253
417
  }
@@ -482,4 +646,4 @@ withDefaultLuvio((luvio) => {
482
646
  });
483
647
 
484
648
  export { getCategoryGroups, getCategoryGroups_imperative };
485
- // version: 1.228.0-946298e9a
649
+ // version: 1.229.0-41a436d3f
package/src/raml/api.raml CHANGED
@@ -43,20 +43,24 @@ types:
43
43
  type: string
44
44
  description:
45
45
  description: Description of the Data Category Group
46
- type: string
46
+ type: string | nil
47
+ required: false
47
48
  label:
48
49
  description: Label of the Data Category Group
49
- type: string
50
+ type: string | nil
51
+ required: false
50
52
  rootCategory:
51
53
  description: Root Category of the Data Category Group
52
- type: DataCategoryRepresentation
54
+ type: DataCategoryRepresentation | nil
55
+ required: false
53
56
  DataCategoryRepresentation:
54
57
  description: Data Category Representation
55
58
  type: object
56
59
  properties:
57
60
  categoryName:
58
61
  description: Developer Name of the Data Category
59
- type: string
62
+ type: string | nil
63
+ required: false
60
64
  childCategories:
61
65
  description: List of child data categories
62
66
  type: array
@@ -64,7 +68,8 @@ types:
64
68
  type: any # This is a workaround because recursive (tree) representations aren't supported in Luvio, even though they're supported in Connect API
65
69
  label:
66
70
  description: Label of the Data Category
67
- type: string
71
+ type: string | nil
72
+ required: false
68
73
  /connect:
69
74
  /data-category/category-group:
70
75
  get: