@salesforce/lds-adapters-apex 1.262.4 → 1.264.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.
@@ -1,5 +1,16 @@
1
+ import type { ImperativeAdapter } from '@salesforce/lds-bindings';
1
2
  import { refresh } from '@salesforce/lds-bindings';
2
3
  export declare const refreshApex: typeof refresh;
4
+ /**
5
+ * Imperative GET Apex Adapter.
6
+ *
7
+ * @param namespace a one- to 15-character alphanumeric identifier that distinguishes a package and its contents from other packages
8
+ * @param classname name of class where method is defined
9
+ * @param method name of method defining the Apex code
10
+ * @param isContinuation used to specify if the Apex method is a Continuation
11
+ * @returns an ImperativeAdapter that uses the GET endpoint
12
+ */
13
+ export declare const getApexInvoker_imperative: (namespace: string, classname: string, method: string, isContinuation: boolean) => ImperativeAdapter<any, any>;
3
14
  /**
4
15
  * Apex
5
16
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-apex",
3
- "version": "1.262.4",
3
+ "version": "1.264.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "Wire adapters for Apex",
6
6
  "main": "dist/es/es2018/apex-service.js",
@@ -30,12 +30,12 @@
30
30
  ]
31
31
  },
32
32
  "dependencies": {
33
- "@salesforce/lds-bindings": "^1.262.4",
34
- "@salesforce/lds-default-luvio": "^1.262.4"
33
+ "@salesforce/lds-bindings": "^1.264.0",
34
+ "@salesforce/lds-default-luvio": "^1.264.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@salesforce/lds-compiler-plugins": "^1.262.4",
38
- "@salesforce/lds-karma": "^1.262.4"
37
+ "@salesforce/lds-compiler-plugins": "^1.264.0",
38
+ "@salesforce/lds-karma": "^1.264.0"
39
39
  },
40
40
  "nx": {
41
41
  "targets": {
package/sfdc/index.js CHANGED
@@ -14,7 +14,7 @@
14
14
  /* proxy-compat-disable */
15
15
  import { serializeStructuredKey, deepFreeze, StoreKeyMap, StoreKeySet } from 'force/luvioEngine';
16
16
  export { getSObjectValue } from './lds-apex-static-utils';
17
- import { bindWireRefresh, refresh, createLDSAdapter, createWireAdapterConstructor, createInstrumentedAdapter } from 'force/ldsBindings';
17
+ import { bindWireRefresh, refresh, createInstrumentedAdapter, createLDSAdapter, createImperativeAdapter, createWireAdapterConstructor } from 'force/ldsBindings';
18
18
  import { withDefaultLuvio } from 'force/ldsEngine';
19
19
 
20
20
  const { keys: ObjectKeys, create: ObjectCreate } = Object;
@@ -627,6 +627,29 @@ withDefaultLuvio((_luvio) => {
627
627
  luvio = _luvio;
628
628
  bindWireRefresh(luvio);
629
629
  });
630
+ /**
631
+ * Imperative GET Apex Adapter.
632
+ *
633
+ * @param namespace a one- to 15-character alphanumeric identifier that distinguishes a package and its contents from other packages
634
+ * @param classname name of class where method is defined
635
+ * @param method name of method defining the Apex code
636
+ * @param isContinuation used to specify if the Apex method is a Continuation
637
+ * @returns an ImperativeAdapter that uses the GET endpoint
638
+ */
639
+ const getApexInvoker_imperative = function (namespace, classname, method, isContinuation) {
640
+ if (luvio === undefined) {
641
+ if (process.env.NODE_ENV !== 'production') {
642
+ throw new Error('cannot create Apex adapter before default luvio is set');
643
+ }
644
+ }
645
+ const adapterName = `getApex_${namespace}_${classname}_${method}_${isContinuation}`;
646
+ const adapterMetadata = {
647
+ apiFamily: 'Apex',
648
+ name: adapterName,
649
+ };
650
+ const getApexInstrumentedLdsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, adapterName, (luvio) => factory(luvio, { namespace, classname, method, isContinuation })), adapterMetadata);
651
+ return createImperativeAdapter(luvio, getApexInstrumentedLdsAdapter, adapterMetadata);
652
+ };
630
653
  /**
631
654
  * Apex
632
655
  *
@@ -656,5 +679,5 @@ const getApexInvoker = function (namespace, classname, method, isContinuation, i
656
679
  return invokeApexImperative;
657
680
  };
658
681
 
659
- export { getApexInvoker, refreshApex };
660
- // version: 1.262.4-3fd8adfd3
682
+ export { getApexInvoker, getApexInvoker_imperative, refreshApex };
683
+ // version: 1.264.0-76ebb1758