@salesforce/lds-adapters-industries-externaldocument 1.292.0 → 1.294.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.
@@ -212,6 +212,10 @@ function createResourceRequest$3(config) {
212
212
  }
213
213
 
214
214
  const adapterName$3 = 'getExternalDocument';
215
+ const oneOfConfigPropertiesIdentifier = [
216
+ 'externalDocumentId',
217
+ 'refObjectId'
218
+ ];
215
219
  const getExternalDocument_ConfigPropertyMetadata = [
216
220
  generateParamConfigMetadata('externalDocumentId', false, 1 /* QueryParameter */, 0 /* String */),
217
221
  generateParamConfigMetadata('refObjectId', false, 1 /* QueryParameter */, 0 /* String */),
@@ -232,12 +236,16 @@ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
232
236
  return null;
233
237
  }
234
238
  if (process.env.NODE_ENV !== 'production') {
235
- validateConfig(untrustedConfig, configPropertyNames);
239
+ validateConfig(untrustedConfig, configPropertyNames, oneOfConfigPropertiesIdentifier);
236
240
  }
237
241
  const config = typeCheckConfig$3(untrustedConfig);
238
242
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
239
243
  return null;
240
244
  }
245
+ if (config.externalDocumentId === undefined &&
246
+ config.refObjectId === undefined) {
247
+ return null;
248
+ }
241
249
  return config;
242
250
  }
243
251
  function adapterFragment$1(luvio, config) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-industries-externaldocument",
3
- "version": "1.292.0",
3
+ "version": "1.294.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "This External Document API family will allow to create, edit or read the information about the document which is present in the external editor outside Salesforce. ",
6
6
  "main": "dist/es/es2018/industries-externaldocument.js",
@@ -42,11 +42,11 @@
42
42
  "test": "nx build:karma && karma start --single-run"
43
43
  },
44
44
  "dependencies": {
45
- "@salesforce/lds-bindings": "^1.292.0"
45
+ "@salesforce/lds-bindings": "^1.294.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@salesforce/lds-compiler-plugins": "^1.292.0",
49
- "@salesforce/lds-karma": "^1.292.0"
48
+ "@salesforce/lds-compiler-plugins": "^1.294.0",
49
+ "@salesforce/lds-karma": "^1.294.0"
50
50
  },
51
51
  "nx": {
52
52
  "targets": {
package/sfdc/index.js CHANGED
@@ -424,6 +424,10 @@ function createResourceRequest$2(config) {
424
424
  }
425
425
 
426
426
  const adapterName$2 = 'getExternalDocument';
427
+ const oneOfConfigPropertiesIdentifier = [
428
+ 'externalDocumentId',
429
+ 'refObjectId'
430
+ ];
427
431
  const getExternalDocument_ConfigPropertyMetadata = [
428
432
  generateParamConfigMetadata('externalDocumentId', false, 1 /* QueryParameter */, 0 /* String */),
429
433
  generateParamConfigMetadata('refObjectId', false, 1 /* QueryParameter */, 0 /* String */),
@@ -444,12 +448,16 @@ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
444
448
  return null;
445
449
  }
446
450
  if (process.env.NODE_ENV !== 'production') {
447
- validateConfig(untrustedConfig, configPropertyNames);
451
+ validateConfig(untrustedConfig, configPropertyNames, oneOfConfigPropertiesIdentifier);
448
452
  }
449
453
  const config = typeCheckConfig$2(untrustedConfig);
450
454
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
451
455
  return null;
452
456
  }
457
+ if (config.externalDocumentId === undefined &&
458
+ config.refObjectId === undefined) {
459
+ return null;
460
+ }
453
461
  return config;
454
462
  }
455
463
  function adapterFragment$1(luvio, config) {
@@ -995,4 +1003,4 @@ withDefaultLuvio((luvio) => {
995
1003
  });
996
1004
 
997
1005
  export { createExternalDocument, getExternalDocument, getExternalDocumentUsers, getExternalDocumentUsers_imperative, getExternalDocument_imperative, saveExternalDocument };
998
- // version: 1.292.0-5ad1fe2ca
1006
+ // version: 1.294.0-e7eb16228
@@ -52,13 +52,9 @@ types:
52
52
  get:
53
53
  (luvio.adapter):
54
54
  name: getExternalDocument
55
- queryParameters:
56
- externalDocumentId:
57
- type: string
58
- required: false
59
- refObjectId:
60
- type: string
61
- required: false
55
+ oneOfParams:
56
+ - externalDocumentId
57
+ - refObjectId
62
58
  post:
63
59
  (luvio.adapter):
64
60
  name: createExternalDocument