@salesforce/lds-adapters-industries-constraints 1.396.0 → 1.397.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.
@@ -4,7 +4,7 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
 
7
- import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$3, typeCheckConfig as typeCheckConfig$3, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1 } from '@luvio/engine';
7
+ import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$4, typeCheckConfig as typeCheckConfig$4, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1 } from '@luvio/engine';
8
8
 
9
9
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
10
  const { keys: ObjectKeys, create: ObjectCreate } = Object;
@@ -92,9 +92,9 @@ function createLink(ref) {
92
92
  };
93
93
  }
94
94
 
95
- const TTL$3 = 1000;
96
- const VERSION$3 = "ced261010494087086be7d8b043d2fda";
97
- function validate$3(obj, path = 'ConstraintErrorResponseRepresentation') {
95
+ const TTL$4 = 1000;
96
+ const VERSION$5 = "ced261010494087086be7d8b043d2fda";
97
+ function validate$5(obj, path = 'ConstraintErrorResponseRepresentation') {
98
98
  const v_error = (() => {
99
99
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
100
100
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -112,49 +112,49 @@ function validate$3(obj, path = 'ConstraintErrorResponseRepresentation') {
112
112
  })();
113
113
  return v_error === undefined ? null : v_error;
114
114
  }
115
- const RepresentationType$3 = 'ConstraintErrorResponseRepresentation';
116
- function normalize$3(input, existing, path, luvio, store, timestamp) {
115
+ const RepresentationType$4 = 'ConstraintErrorResponseRepresentation';
116
+ function normalize$4(input, existing, path, luvio, store, timestamp) {
117
117
  return input;
118
118
  }
119
- const select$6 = function ConstraintErrorResponseRepresentationSelect() {
119
+ const select$9 = function ConstraintErrorResponseRepresentationSelect() {
120
120
  return {
121
121
  kind: 'Fragment',
122
- version: VERSION$3,
122
+ version: VERSION$5,
123
123
  private: [],
124
124
  opaque: true
125
125
  };
126
126
  };
127
- function equals$3(existing, incoming) {
127
+ function equals$5(existing, incoming) {
128
128
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
129
129
  return false;
130
130
  }
131
131
  return true;
132
132
  }
133
- const ingest$3 = function ConstraintErrorResponseRepresentationIngest(input, path, luvio, store, timestamp) {
133
+ const ingest$4 = function ConstraintErrorResponseRepresentationIngest(input, path, luvio, store, timestamp) {
134
134
  if (process.env.NODE_ENV !== 'production') {
135
- const validateError = validate$3(input);
135
+ const validateError = validate$5(input);
136
136
  if (validateError !== null) {
137
137
  throw validateError;
138
138
  }
139
139
  }
140
140
  const key = path.fullPath;
141
- const ttlToUse = TTL$3;
142
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "constraints", VERSION$3, RepresentationType$3, equals$3);
141
+ const ttlToUse = TTL$4;
142
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "constraints", VERSION$5, RepresentationType$4, equals$5);
143
143
  return createLink(key);
144
144
  };
145
- function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
145
+ function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
146
146
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
147
147
  const rootKey = fullPathFactory();
148
148
  rootKeySet.set(rootKey, {
149
149
  namespace: keyPrefix,
150
- representationName: RepresentationType$3,
150
+ representationName: RepresentationType$4,
151
151
  mergeable: false
152
152
  });
153
153
  }
154
154
 
155
- const TTL$2 = 1000;
156
- const VERSION$2 = "faf4a72fe3721080fa45e289d0a79216";
157
- function validate$2(obj, path = 'CreateConstraintVersionOutputRepresentation') {
155
+ const TTL$3 = 1000;
156
+ const VERSION$4 = "faf4a72fe3721080fa45e289d0a79216";
157
+ function validate$4(obj, path = 'CreateConstraintVersionOutputRepresentation') {
158
158
  const v_error = (() => {
159
159
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
160
160
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -184,23 +184,23 @@ function validate$2(obj, path = 'CreateConstraintVersionOutputRepresentation') {
184
184
  })();
185
185
  return v_error === undefined ? null : v_error;
186
186
  }
187
- const RepresentationType$2 = 'CreateConstraintVersionOutputRepresentation';
188
- function keyBuilder$3(luvio, config) {
189
- return keyPrefix + '::' + RepresentationType$2 + ':' + config.success;
187
+ const RepresentationType$3 = 'CreateConstraintVersionOutputRepresentation';
188
+ function keyBuilder$4(luvio, config) {
189
+ return keyPrefix + '::' + RepresentationType$3 + ':' + config.success;
190
190
  }
191
- function keyBuilderFromType$1(luvio, object) {
191
+ function keyBuilderFromType$2(luvio, object) {
192
192
  const keyParams = {
193
193
  success: object.success
194
194
  };
195
- return keyBuilder$3(luvio, keyParams);
195
+ return keyBuilder$4(luvio, keyParams);
196
196
  }
197
- function normalize$2(input, existing, path, luvio, store, timestamp) {
197
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
198
198
  const input_errors = input.errors;
199
199
  const input_errors_id = path.fullPath + '__errors';
200
200
  for (let i = 0; i < input_errors.length; i++) {
201
201
  const input_errors_item = input_errors[i];
202
202
  let input_errors_item_id = input_errors_id + '__' + i;
203
- input_errors[i] = ingest$3(input_errors_item, {
203
+ input_errors[i] = ingest$4(input_errors_item, {
204
204
  fullPath: input_errors_item_id,
205
205
  propertyName: i,
206
206
  parent: {
@@ -213,17 +213,17 @@ function normalize$2(input, existing, path, luvio, store, timestamp) {
213
213
  }
214
214
  return input;
215
215
  }
216
- const select$5 = function CreateConstraintVersionOutputRepresentationSelect() {
216
+ const select$8 = function CreateConstraintVersionOutputRepresentationSelect() {
217
217
  return {
218
218
  kind: 'Fragment',
219
- version: VERSION$2,
219
+ version: VERSION$4,
220
220
  private: [],
221
221
  selections: [
222
222
  {
223
223
  name: 'errors',
224
224
  kind: 'Link',
225
225
  plural: true,
226
- fragment: select$6()
226
+ fragment: select$9()
227
227
  },
228
228
  {
229
229
  name: 'success',
@@ -236,7 +236,7 @@ const select$5 = function CreateConstraintVersionOutputRepresentationSelect() {
236
236
  ]
237
237
  };
238
238
  };
239
- function equals$2(existing, incoming) {
239
+ function equals$4(existing, incoming) {
240
240
  const existing_success = existing.success;
241
241
  const incoming_success = incoming.success;
242
242
  if (!(existing_success === incoming_success)) {
@@ -259,7 +259,271 @@ function equals$2(existing, incoming) {
259
259
  }
260
260
  return true;
261
261
  }
262
- const ingest$2 = function CreateConstraintVersionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
262
+ const ingest$3 = function CreateConstraintVersionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
263
+ if (process.env.NODE_ENV !== 'production') {
264
+ const validateError = validate$4(input);
265
+ if (validateError !== null) {
266
+ throw validateError;
267
+ }
268
+ }
269
+ const key = keyBuilderFromType$2(luvio, input);
270
+ const ttlToUse = TTL$3;
271
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "constraints", VERSION$4, RepresentationType$3, equals$4);
272
+ return createLink(key);
273
+ };
274
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
275
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
276
+ const rootKey = keyBuilderFromType$2(luvio, input);
277
+ rootKeySet.set(rootKey, {
278
+ namespace: keyPrefix,
279
+ representationName: RepresentationType$3,
280
+ mergeable: false
281
+ });
282
+ const input_errors_length = input.errors.length;
283
+ for (let i = 0; i < input_errors_length; i++) {
284
+ getTypeCacheKeys$4(rootKeySet, luvio, input.errors[i], () => '');
285
+ }
286
+ }
287
+
288
+ function select$7(luvio, params) {
289
+ return select$8();
290
+ }
291
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
292
+ getTypeCacheKeys$3(storeKeyMap, luvio, response);
293
+ }
294
+ function ingestSuccess$3(luvio, resourceParams, response) {
295
+ const { body } = response;
296
+ const key = keyBuilderFromType$2(luvio, body);
297
+ luvio.storeIngest(key, ingest$3, body);
298
+ const snapshot = luvio.storeLookup({
299
+ recordId: key,
300
+ node: select$7(),
301
+ variables: {},
302
+ });
303
+ if (process.env.NODE_ENV !== 'production') {
304
+ if (snapshot.state !== 'Fulfilled') {
305
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
306
+ }
307
+ }
308
+ deepFreeze(snapshot.data);
309
+ return snapshot;
310
+ }
311
+ function createResourceRequest$3(config) {
312
+ const headers = {};
313
+ return {
314
+ baseUri: '/services/data/v66.0',
315
+ basePath: '/industries/constraints/' + config.urlParams.expressionSetId + '/versions',
316
+ method: 'post',
317
+ body: config.body,
318
+ urlParams: config.urlParams,
319
+ queryParams: {},
320
+ headers,
321
+ priority: 'normal',
322
+ };
323
+ }
324
+
325
+ const adapterName$3 = 'createConstraintVersion';
326
+ const createConstraintVersion_ConfigPropertyMetadata = [
327
+ generateParamConfigMetadata('expressionSetId', true, 0 /* UrlParameter */, 0 /* String */),
328
+ generateParamConfigMetadata('constraintModel', true, 2 /* Body */, 0 /* String */),
329
+ generateParamConfigMetadata('description', true, 2 /* Body */, 0 /* String */),
330
+ generateParamConfigMetadata('status', true, 2 /* Body */, 0 /* String */),
331
+ ];
332
+ const createConstraintVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, createConstraintVersion_ConfigPropertyMetadata);
333
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$4(createConstraintVersion_ConfigPropertyMetadata);
334
+ function typeCheckConfig$3(untrustedConfig) {
335
+ const config = {};
336
+ typeCheckConfig$4(untrustedConfig, config, createConstraintVersion_ConfigPropertyMetadata);
337
+ return config;
338
+ }
339
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
340
+ if (!untrustedIsObject(untrustedConfig)) {
341
+ return null;
342
+ }
343
+ if (process.env.NODE_ENV !== 'production') {
344
+ validateConfig(untrustedConfig, configPropertyNames);
345
+ }
346
+ const config = typeCheckConfig$3(untrustedConfig);
347
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
348
+ return null;
349
+ }
350
+ return config;
351
+ }
352
+ function buildNetworkSnapshot$3(luvio, config, options) {
353
+ const resourceParams = createResourceParams$3(config);
354
+ const request = createResourceRequest$3(resourceParams);
355
+ return luvio.dispatchResourceRequest(request, options)
356
+ .then((response) => {
357
+ return luvio.handleSuccessResponse(() => {
358
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response);
359
+ return luvio.storeBroadcast().then(() => snapshot);
360
+ }, () => {
361
+ const cache = new StoreKeyMap();
362
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
363
+ return cache;
364
+ });
365
+ }, (response) => {
366
+ deepFreeze(response);
367
+ throw response;
368
+ });
369
+ }
370
+ const createConstraintVersionAdapterFactory = (luvio) => {
371
+ return function createConstraintVersion(untrustedConfig) {
372
+ const config = validateAdapterConfig$3(untrustedConfig, createConstraintVersion_ConfigPropertyNames);
373
+ // Invalid or incomplete config
374
+ if (config === null) {
375
+ throw new Error('Invalid config for "createConstraintVersion"');
376
+ }
377
+ return buildNetworkSnapshot$3(luvio, config);
378
+ };
379
+ };
380
+
381
+ const VERSION$3 = "5e3563eab6e264c48d560da95ca8055a";
382
+ function validate$3(obj, path = 'CreateCustomLabelOutputRepresentation') {
383
+ const v_error = (() => {
384
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
385
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
386
+ }
387
+ const obj_labelName = obj.labelName;
388
+ const path_labelName = path + '.labelName';
389
+ if (typeof obj_labelName !== 'string') {
390
+ return new TypeError('Expected "string" but received "' + typeof obj_labelName + '" (at "' + path_labelName + '")');
391
+ }
392
+ const obj_responseEnum = obj.responseEnum;
393
+ const path_responseEnum = path + '.responseEnum';
394
+ if (typeof obj_responseEnum !== 'string') {
395
+ return new TypeError('Expected "string" but received "' + typeof obj_responseEnum + '" (at "' + path_responseEnum + '")');
396
+ }
397
+ const obj_responseMessage = obj.responseMessage;
398
+ const path_responseMessage = path + '.responseMessage';
399
+ if (typeof obj_responseMessage !== 'string') {
400
+ return new TypeError('Expected "string" but received "' + typeof obj_responseMessage + '" (at "' + path_responseMessage + '")');
401
+ }
402
+ })();
403
+ return v_error === undefined ? null : v_error;
404
+ }
405
+ const select$6 = function CreateCustomLabelOutputRepresentationSelect() {
406
+ return {
407
+ kind: 'Fragment',
408
+ version: VERSION$3,
409
+ private: [],
410
+ selections: [
411
+ {
412
+ name: 'labelName',
413
+ kind: 'Scalar'
414
+ },
415
+ {
416
+ name: 'responseEnum',
417
+ kind: 'Scalar'
418
+ },
419
+ {
420
+ name: 'responseMessage',
421
+ kind: 'Scalar'
422
+ }
423
+ ]
424
+ };
425
+ };
426
+ function equals$3(existing, incoming) {
427
+ const existing_labelName = existing.labelName;
428
+ const incoming_labelName = incoming.labelName;
429
+ if (!(existing_labelName === incoming_labelName)) {
430
+ return false;
431
+ }
432
+ const existing_responseEnum = existing.responseEnum;
433
+ const incoming_responseEnum = incoming.responseEnum;
434
+ if (!(existing_responseEnum === incoming_responseEnum)) {
435
+ return false;
436
+ }
437
+ const existing_responseMessage = existing.responseMessage;
438
+ const incoming_responseMessage = incoming.responseMessage;
439
+ if (!(existing_responseMessage === incoming_responseMessage)) {
440
+ return false;
441
+ }
442
+ return true;
443
+ }
444
+
445
+ const TTL$2 = 1000;
446
+ const VERSION$2 = "76f5c11b5c0817cf83a2b3440e955b35";
447
+ function validate$2(obj, path = 'CreateCustomLabelsOutputRepresentation') {
448
+ const v_error = (() => {
449
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
450
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
451
+ }
452
+ const obj_labelCreationResult = obj.labelCreationResult;
453
+ const path_labelCreationResult = path + '.labelCreationResult';
454
+ if (!ArrayIsArray(obj_labelCreationResult)) {
455
+ return new TypeError('Expected "array" but received "' + typeof obj_labelCreationResult + '" (at "' + path_labelCreationResult + '")');
456
+ }
457
+ for (let i = 0; i < obj_labelCreationResult.length; i++) {
458
+ const obj_labelCreationResult_item = obj_labelCreationResult[i];
459
+ const path_labelCreationResult_item = path_labelCreationResult + '[' + i + ']';
460
+ const referencepath_labelCreationResult_itemValidationError = validate$3(obj_labelCreationResult_item, path_labelCreationResult_item);
461
+ if (referencepath_labelCreationResult_itemValidationError !== null) {
462
+ let message = 'Object doesn\'t match CreateCustomLabelOutputRepresentation (at "' + path_labelCreationResult_item + '")\n';
463
+ message += referencepath_labelCreationResult_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
464
+ return new TypeError(message);
465
+ }
466
+ }
467
+ const obj_status = obj.status;
468
+ const path_status = path + '.status';
469
+ if (typeof obj_status !== 'string') {
470
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
471
+ }
472
+ })();
473
+ return v_error === undefined ? null : v_error;
474
+ }
475
+ const RepresentationType$2 = 'CreateCustomLabelsOutputRepresentation';
476
+ function keyBuilder$3(luvio, config) {
477
+ return keyPrefix + '::' + RepresentationType$2 + ':' + config.status;
478
+ }
479
+ function keyBuilderFromType$1(luvio, object) {
480
+ const keyParams = {
481
+ status: object.status
482
+ };
483
+ return keyBuilder$3(luvio, keyParams);
484
+ }
485
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
486
+ return input;
487
+ }
488
+ const select$5 = function CreateCustomLabelsOutputRepresentationSelect() {
489
+ const { selections: CreateCustomLabelOutputRepresentation__selections, opaque: CreateCustomLabelOutputRepresentation__opaque, } = select$6();
490
+ return {
491
+ kind: 'Fragment',
492
+ version: VERSION$2,
493
+ private: [],
494
+ selections: [
495
+ {
496
+ name: 'labelCreationResult',
497
+ kind: 'Object',
498
+ plural: true,
499
+ selections: CreateCustomLabelOutputRepresentation__selections
500
+ },
501
+ {
502
+ name: 'status',
503
+ kind: 'Scalar'
504
+ }
505
+ ]
506
+ };
507
+ };
508
+ function equals$2(existing, incoming) {
509
+ const existing_status = existing.status;
510
+ const incoming_status = incoming.status;
511
+ if (!(existing_status === incoming_status)) {
512
+ return false;
513
+ }
514
+ const existing_labelCreationResult = existing.labelCreationResult;
515
+ const incoming_labelCreationResult = incoming.labelCreationResult;
516
+ const equals_labelCreationResult_items = equalsArray(existing_labelCreationResult, incoming_labelCreationResult, (existing_labelCreationResult_item, incoming_labelCreationResult_item) => {
517
+ if (!(equals$3(existing_labelCreationResult_item, incoming_labelCreationResult_item))) {
518
+ return false;
519
+ }
520
+ });
521
+ if (equals_labelCreationResult_items === false) {
522
+ return false;
523
+ }
524
+ return true;
525
+ }
526
+ const ingest$2 = function CreateCustomLabelsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
263
527
  if (process.env.NODE_ENV !== 'production') {
264
528
  const validateError = validate$2(input);
265
529
  if (validateError !== null) {
@@ -279,10 +543,6 @@ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
279
543
  representationName: RepresentationType$2,
280
544
  mergeable: false
281
545
  });
282
- const input_errors_length = input.errors.length;
283
- for (let i = 0; i < input_errors_length; i++) {
284
- getTypeCacheKeys$3(rootKeySet, luvio, input.errors[i], () => '');
285
- }
286
546
  }
287
547
 
288
548
  function select$4(luvio, params) {
@@ -312,28 +572,38 @@ function createResourceRequest$2(config) {
312
572
  const headers = {};
313
573
  return {
314
574
  baseUri: '/services/data/v66.0',
315
- basePath: '/industries/constraints/' + config.urlParams.expressionSetId + '/versions',
575
+ basePath: '/industries/constraints/createCustomLabels',
316
576
  method: 'post',
317
577
  body: config.body,
318
- urlParams: config.urlParams,
578
+ urlParams: {},
319
579
  queryParams: {},
320
580
  headers,
321
581
  priority: 'normal',
322
582
  };
323
583
  }
324
584
 
325
- const adapterName$2 = 'createConstraintVersion';
326
- const createConstraintVersion_ConfigPropertyMetadata = [
327
- generateParamConfigMetadata('expressionSetId', true, 0 /* UrlParameter */, 0 /* String */),
328
- generateParamConfigMetadata('constraintModel', true, 2 /* Body */, 0 /* String */),
329
- generateParamConfigMetadata('description', true, 2 /* Body */, 0 /* String */),
330
- generateParamConfigMetadata('status', true, 2 /* Body */, 0 /* String */),
585
+ const adapterName$2 = 'createCustomLabels';
586
+ const createCustomLabels_ConfigPropertyMetadata = [
587
+ generateParamConfigMetadata('labelsToCreate', true, 2 /* Body */, 4 /* Unsupported */, true),
331
588
  ];
332
- const createConstraintVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, createConstraintVersion_ConfigPropertyMetadata);
333
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(createConstraintVersion_ConfigPropertyMetadata);
589
+ const createCustomLabels_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, createCustomLabels_ConfigPropertyMetadata);
590
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$4(createCustomLabels_ConfigPropertyMetadata);
334
591
  function typeCheckConfig$2(untrustedConfig) {
335
592
  const config = {};
336
- typeCheckConfig$3(untrustedConfig, config, createConstraintVersion_ConfigPropertyMetadata);
593
+ const untrustedConfig_labelsToCreate = untrustedConfig.labelsToCreate;
594
+ if (ArrayIsArray$1(untrustedConfig_labelsToCreate)) {
595
+ const untrustedConfig_labelsToCreate_array = [];
596
+ for (let i = 0, arrayLength = untrustedConfig_labelsToCreate.length; i < arrayLength; i++) {
597
+ const untrustedConfig_labelsToCreate_item = untrustedConfig_labelsToCreate[i];
598
+ if (untrustedIsObject(untrustedConfig_labelsToCreate_item)) {
599
+ const untrustedConfig_labelsToCreate_item_object = {};
600
+ if (untrustedConfig_labelsToCreate_item_object !== undefined && Object.keys(untrustedConfig_labelsToCreate_item_object).length >= 0) {
601
+ untrustedConfig_labelsToCreate_array.push(untrustedConfig_labelsToCreate_item_object);
602
+ }
603
+ }
604
+ }
605
+ config.labelsToCreate = untrustedConfig_labelsToCreate_array;
606
+ }
337
607
  return config;
338
608
  }
339
609
  function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
@@ -367,12 +637,12 @@ function buildNetworkSnapshot$2(luvio, config, options) {
367
637
  throw response;
368
638
  });
369
639
  }
370
- const createConstraintVersionAdapterFactory = (luvio) => {
371
- return function createConstraintVersion(untrustedConfig) {
372
- const config = validateAdapterConfig$2(untrustedConfig, createConstraintVersion_ConfigPropertyNames);
640
+ const createCustomLabelsAdapterFactory = (luvio) => {
641
+ return function createCustomLabels(untrustedConfig) {
642
+ const config = validateAdapterConfig$2(untrustedConfig, createCustomLabels_ConfigPropertyNames);
373
643
  // Invalid or incomplete config
374
644
  if (config === null) {
375
- throw new Error('Invalid config for "createConstraintVersion"');
645
+ throw new Error('Invalid config for "createCustomLabels"');
376
646
  }
377
647
  return buildNetworkSnapshot$2(luvio, config);
378
648
  };
@@ -501,14 +771,14 @@ const getConstraintVersion_ConfigPropertyMetadata = [
501
771
  generateParamConfigMetadata('expressionSetVersionId', true, 0 /* UrlParameter */, 0 /* String */),
502
772
  ];
503
773
  const getConstraintVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getConstraintVersion_ConfigPropertyMetadata);
504
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(getConstraintVersion_ConfigPropertyMetadata);
774
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$4(getConstraintVersion_ConfigPropertyMetadata);
505
775
  function keyBuilder$1(luvio, config) {
506
776
  const resourceParams = createResourceParams$1(config);
507
777
  return keyBuilder$2(luvio, resourceParams);
508
778
  }
509
779
  function typeCheckConfig$1(untrustedConfig) {
510
780
  const config = {};
511
- typeCheckConfig$3(untrustedConfig, config, getConstraintVersion_ConfigPropertyMetadata);
781
+ typeCheckConfig$4(untrustedConfig, config, getConstraintVersion_ConfigPropertyMetadata);
512
782
  return config;
513
783
  }
514
784
  function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
@@ -625,7 +895,7 @@ function normalize(input, existing, path, luvio, store, timestamp) {
625
895
  for (let i = 0; i < input_errors.length; i++) {
626
896
  const input_errors_item = input_errors[i];
627
897
  let input_errors_item_id = input_errors_id + '__' + i;
628
- input_errors[i] = ingest$3(input_errors_item, {
898
+ input_errors[i] = ingest$4(input_errors_item, {
629
899
  fullPath: input_errors_item_id,
630
900
  propertyName: i,
631
901
  parent: {
@@ -648,7 +918,7 @@ const select$1 = function UpdateConstraintVersionOutputRepresentationSelect() {
648
918
  name: 'errors',
649
919
  kind: 'Link',
650
920
  plural: true,
651
- fragment: select$6()
921
+ fragment: select$9()
652
922
  },
653
923
  {
654
924
  name: 'success',
@@ -697,7 +967,7 @@ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
697
967
  });
698
968
  const input_errors_length = input.errors.length;
699
969
  for (let i = 0; i < input_errors_length; i++) {
700
- getTypeCacheKeys$3(rootKeySet, luvio, input.errors[i], () => '');
970
+ getTypeCacheKeys$4(rootKeySet, luvio, input.errors[i], () => '');
701
971
  }
702
972
  }
703
973
 
@@ -747,10 +1017,10 @@ const updateConstraintVersion_ConfigPropertyMetadata = [
747
1017
  generateParamConfigMetadata('status', false, 2 /* Body */, 0 /* String */),
748
1018
  ];
749
1019
  const updateConstraintVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, updateConstraintVersion_ConfigPropertyMetadata);
750
- const createResourceParams = /*#__PURE__*/ createResourceParams$3(updateConstraintVersion_ConfigPropertyMetadata);
1020
+ const createResourceParams = /*#__PURE__*/ createResourceParams$4(updateConstraintVersion_ConfigPropertyMetadata);
751
1021
  function typeCheckConfig(untrustedConfig) {
752
1022
  const config = {};
753
- typeCheckConfig$3(untrustedConfig, config, updateConstraintVersion_ConfigPropertyMetadata);
1023
+ typeCheckConfig$4(untrustedConfig, config, updateConstraintVersion_ConfigPropertyMetadata);
754
1024
  return config;
755
1025
  }
756
1026
  function validateAdapterConfig(untrustedConfig, configPropertyNames) {
@@ -795,4 +1065,4 @@ const updateConstraintVersionAdapterFactory = (luvio) => {
795
1065
  };
796
1066
  };
797
1067
 
798
- export { createConstraintVersionAdapterFactory, getConstraintVersionAdapterFactory, updateConstraintVersionAdapterFactory };
1068
+ export { createConstraintVersionAdapterFactory, createCustomLabelsAdapterFactory, getConstraintVersionAdapterFactory, updateConstraintVersionAdapterFactory };
@@ -0,0 +1,15 @@
1
+ import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
2
+ import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
3
+ import { ResourceRequestConfig as resources_postIndustriesConstraintsCreateCustomLabels_ResourceRequestConfig } from '../resources/postIndustriesConstraintsCreateCustomLabels';
4
+ import { CreateCustomLabelsOutputRepresentation as types_CreateCustomLabelsOutputRepresentation_CreateCustomLabelsOutputRepresentation } from '../types/CreateCustomLabelsOutputRepresentation';
5
+ export declare const adapterName = "createCustomLabels";
6
+ export declare const createCustomLabels_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
7
+ export declare const createCustomLabels_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
8
+ export interface CreateCustomLabelsConfig {
9
+ labelsToCreate: Array<{}>;
10
+ }
11
+ export declare const createResourceParams: (config: CreateCustomLabelsConfig) => resources_postIndustriesConstraintsCreateCustomLabels_ResourceRequestConfig;
12
+ export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<CreateCustomLabelsConfig>): adapter$45$utils_Untrusted<CreateCustomLabelsConfig>;
13
+ export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): CreateCustomLabelsConfig | null;
14
+ export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: CreateCustomLabelsConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<import("@luvio/engine").FulfilledSnapshot<types_CreateCustomLabelsOutputRepresentation_CreateCustomLabelsOutputRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_CreateCustomLabelsOutputRepresentation_CreateCustomLabelsOutputRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_CreateCustomLabelsOutputRepresentation_CreateCustomLabelsOutputRepresentation, any>>;
15
+ export declare const createCustomLabelsAdapterFactory: $64$luvio_engine_AdapterFactory<CreateCustomLabelsConfig, types_CreateCustomLabelsOutputRepresentation_CreateCustomLabelsOutputRepresentation>;
@@ -1,3 +1,4 @@
1
1
  export { createConstraintVersionAdapterFactory } from '../adapters/createConstraintVersion';
2
+ export { createCustomLabelsAdapterFactory } from '../adapters/createCustomLabels';
2
3
  export { getConstraintVersionAdapterFactory } from '../adapters/getConstraintVersion';
3
4
  export { updateConstraintVersionAdapterFactory } from '../adapters/updateConstraintVersion';
@@ -1,5 +1,6 @@
1
1
  declare let createConstraintVersion: any;
2
+ declare let createCustomLabels: any;
2
3
  declare let getConstraintVersion: any;
3
4
  declare let updateConstraintVersion: any;
4
5
  declare let getConstraintVersion_imperative: any;
5
- export { createConstraintVersion, getConstraintVersion, updateConstraintVersion, getConstraintVersion_imperative, };
6
+ export { createConstraintVersion, createCustomLabels, getConstraintVersion, updateConstraintVersion, getConstraintVersion_imperative, };
@@ -0,0 +1,12 @@
1
+ import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, FetchResponse as $64$luvio_engine_FetchResponse, FulfilledSnapshot as $64$luvio_engine_FulfilledSnapshot, StaleSnapshot as $64$luvio_engine_StaleSnapshot, PendingSnapshot as $64$luvio_engine_PendingSnapshot, ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
2
+ import { CreateCustomLabelsOutputRepresentation as types_CreateCustomLabelsOutputRepresentation_CreateCustomLabelsOutputRepresentation } from '../types/CreateCustomLabelsOutputRepresentation';
3
+ export interface ResourceRequestConfig {
4
+ body: {
5
+ labelsToCreate: Array<{}>;
6
+ };
7
+ }
8
+ export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
9
+ export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_CreateCustomLabelsOutputRepresentation_CreateCustomLabelsOutputRepresentation): void;
10
+ export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_CreateCustomLabelsOutputRepresentation_CreateCustomLabelsOutputRepresentation>): $64$luvio_engine_FulfilledSnapshot<types_CreateCustomLabelsOutputRepresentation_CreateCustomLabelsOutputRepresentation, {}> | $64$luvio_engine_StaleSnapshot<types_CreateCustomLabelsOutputRepresentation_CreateCustomLabelsOutputRepresentation, {}> | $64$luvio_engine_PendingSnapshot<types_CreateCustomLabelsOutputRepresentation_CreateCustomLabelsOutputRepresentation, any>;
11
+ export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
12
+ export default createResourceRequest;
@@ -0,0 +1,31 @@
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 = "bc71fb2da99f68663cf68eb1e00e34ee";
3
+ export declare function validate(obj: any, path?: string): TypeError | null;
4
+ export declare const RepresentationType: string;
5
+ export declare function normalize(input: CreateCustomLabelInputRepresentation, existing: CreateCustomLabelInputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): CreateCustomLabelInputRepresentationNormalized;
6
+ export declare const select: () => $64$luvio_engine_FragmentSelection;
7
+ export declare function equals(existing: CreateCustomLabelInputRepresentationNormalized, incoming: CreateCustomLabelInputRepresentationNormalized): 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: CreateCustomLabelInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
10
+ /**
11
+ * Represents a custom label to be created with its name and value.
12
+ *
13
+ * Keys:
14
+ * (none)
15
+ */
16
+ export interface CreateCustomLabelInputRepresentationNormalized {
17
+ /** The name of the custom label to create. */
18
+ labelName: string;
19
+ /** The value/message content of the custom label. */
20
+ labelValue: string;
21
+ }
22
+ /**
23
+ * Represents a custom label to be created with its name and value.
24
+ *
25
+ * Keys:
26
+ * (none)
27
+ */
28
+ export interface CreateCustomLabelInputRepresentation {
29
+ labelName: string;
30
+ labelValue: string;
31
+ }