@salesforce/lds-adapters-apex 0.1.0-dev1
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.
- package/LICENSE.txt +82 -0
- package/dist/es/es2018/apex-service.js +642 -0
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
- package/dist/es/es2018/types/src/generated/resources/getByApexMethodAndApexClass.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/resources/postByApexMethodAndApexClass.d.ts +14 -0
- package/dist/es/es2018/types/src/generated/types/ApexMethodExecuteErrorResponse.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/ApexMethodExecuteRequest.d.ts +25 -0
- package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
- package/dist/es/es2018/types/src/lds-apex-static-utils.d.ts +8 -0
- package/dist/es/es2018/types/src/main.d.ts +5 -0
- package/dist/es/es2018/types/src/predictive-loading/index.d.ts +1 -0
- package/dist/es/es2018/types/src/predictive-loading/registry.d.ts +8 -0
- package/dist/es/es2018/types/src/sfdc.d.ts +23 -0
- package/dist/es/es2018/types/src/types.d.ts +10 -0
- package/dist/es/es2018/types/src/util/language.d.ts +19 -0
- package/dist/es/es2018/types/src/util/shared.d.ts +39 -0
- package/dist/es/es2018/types/src/util/utils.d.ts +26 -0
- package/dist/es/es2018/types/src/wire/getApex/index.d.ts +14 -0
- package/dist/es/es2018/types/src/wire/postApex/index.d.ts +14 -0
- package/package.json +63 -0
- package/sfdc/index.d.ts +1 -0
- package/sfdc/index.js +689 -0
- package/sfdc/lds-apex-static-utils.js +63 -0
- package/src/raml/api.raml +139 -0
- package/src/raml/luvio.raml +7 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
|
|
2
|
+
export interface ResourceRequestConfig {
|
|
3
|
+
urlParams: {
|
|
4
|
+
apexMethod: string;
|
|
5
|
+
apexClass: string;
|
|
6
|
+
};
|
|
7
|
+
queryParams: {
|
|
8
|
+
methodParams?: {};
|
|
9
|
+
};
|
|
10
|
+
headers: {
|
|
11
|
+
xSFDCAllowContinuation?: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export declare function keyBuilder(params: ResourceRequestConfig): null;
|
|
15
|
+
export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
|
|
16
|
+
export default createResourceRequest;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
|
|
2
|
+
export interface ResourceRequestConfig {
|
|
3
|
+
urlParams: {
|
|
4
|
+
apexMethod: string;
|
|
5
|
+
apexClass: string;
|
|
6
|
+
};
|
|
7
|
+
body: {};
|
|
8
|
+
headers: {
|
|
9
|
+
xSFDCAllowContinuation?: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export declare function keyBuilder(params: ResourceRequestConfig): null;
|
|
13
|
+
export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
|
|
14
|
+
export default createResourceRequest;
|
|
@@ -0,0 +1,29 @@
|
|
|
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 = "8a74e1db27da9ce5e8eab14a64bede54";
|
|
3
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
4
|
+
export declare const RepresentationType: string;
|
|
5
|
+
export declare function normalize(input: ApexMethodExecuteErrorResponse, existing: ApexMethodExecuteErrorResponseNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): ApexMethodExecuteErrorResponseNormalized;
|
|
6
|
+
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
|
+
export declare function equals(existing: ApexMethodExecuteErrorResponseNormalized, incoming: ApexMethodExecuteErrorResponseNormalized): 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: ApexMethodExecuteErrorResponse, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
|
+
/**
|
|
11
|
+
* Response in case of an error.
|
|
12
|
+
*
|
|
13
|
+
* Keys:
|
|
14
|
+
* (none)
|
|
15
|
+
*/
|
|
16
|
+
export interface ApexMethodExecuteErrorResponseNormalized {
|
|
17
|
+
debugInfo?: string;
|
|
18
|
+
errorMessage: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Response in case of an error.
|
|
22
|
+
*
|
|
23
|
+
* Keys:
|
|
24
|
+
* (none)
|
|
25
|
+
*/
|
|
26
|
+
export interface ApexMethodExecuteErrorResponse {
|
|
27
|
+
debugInfo?: string;
|
|
28
|
+
errorMessage: string;
|
|
29
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
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 = "dc33f6a2aebdd9d6de634f044dec6432";
|
|
3
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
4
|
+
export declare const RepresentationType: string;
|
|
5
|
+
export declare function normalize(input: ApexMethodExecuteRequest, existing: ApexMethodExecuteRequestNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): ApexMethodExecuteRequestNormalized;
|
|
6
|
+
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
|
+
export declare function equals(existing: ApexMethodExecuteRequestNormalized, incoming: ApexMethodExecuteRequestNormalized): 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: ApexMethodExecuteRequest, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
|
+
/**
|
|
11
|
+
* A JSON Object representing the parameters of an apex method as name-value pairs.
|
|
12
|
+
*
|
|
13
|
+
* Keys:
|
|
14
|
+
* (none)
|
|
15
|
+
*/
|
|
16
|
+
export interface ApexMethodExecuteRequestNormalized {
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A JSON Object representing the parameters of an apex method as name-value pairs.
|
|
20
|
+
*
|
|
21
|
+
* Keys:
|
|
22
|
+
* (none)
|
|
23
|
+
*/
|
|
24
|
+
export interface ApexMethodExecuteRequest {
|
|
25
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
|
|
2
|
+
export declare const ObjectKeys: {
|
|
3
|
+
(o: object): string[];
|
|
4
|
+
(o: {}): string[];
|
|
5
|
+
}, ObjectCreate: {
|
|
6
|
+
(o: object | null): any;
|
|
7
|
+
(o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;
|
|
8
|
+
}, ObjectAssign: {
|
|
9
|
+
<T extends {}, U>(target: T, source: U): T & U;
|
|
10
|
+
<T_1 extends {}, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V;
|
|
11
|
+
<T_2 extends {}, U_2, V_1, W>(target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W;
|
|
12
|
+
(target: object, ...sources: any[]): any;
|
|
13
|
+
};
|
|
14
|
+
export declare const ArrayIsArray: (arg: any) => arg is any[];
|
|
15
|
+
export declare const JSONStringify: {
|
|
16
|
+
(value: any, replacer?: ((this: any, key: string, value: any) => any) | undefined, space?: string | number | undefined): string;
|
|
17
|
+
(value: any, replacer?: (string | number)[] | null | undefined, space?: string | number | undefined): string;
|
|
18
|
+
};
|
|
19
|
+
type AllowedPrimitives = boolean | string | number | Date | null;
|
|
20
|
+
type Value<T> = T extends AllowedPrimitives ? T : RecursivePartial<T>;
|
|
21
|
+
export type RecursivePartial<T> = null | {
|
|
22
|
+
[P in keyof T]?: T[P] extends Array<infer U> ? Array<Value<U>> | null : Value<T[P]> | null;
|
|
23
|
+
};
|
|
24
|
+
export declare function equalsArray<U, V extends U[]>(a: V, b: V, equalsItem: (itemA: U, itemB: U) => boolean | void): boolean;
|
|
25
|
+
export declare function equalsObject<U, V extends {
|
|
26
|
+
[key: string]: U;
|
|
27
|
+
}>(a: V, b: V, equalsProp: (propA: U, propB: U) => boolean | void): boolean;
|
|
28
|
+
export declare function createLink(ref: string | $64$luvio_engine_NormalizedKeyMetadata): {
|
|
29
|
+
__ref: string;
|
|
30
|
+
};
|
|
31
|
+
export declare function assignMetadataLink(entry: any, metadataKey: string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FieldId } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Gets a field value from an Apex sObject.
|
|
4
|
+
* @param sobject The sObject holding the field.
|
|
5
|
+
* @param field The qualified API name of the field to return.
|
|
6
|
+
* @returns The field's value. If it doesn't exist, undefined is returned.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getSObjectValue(sObject: any, field: string | FieldId): any;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { factory as GetApexWireAdapterFactory } from './wire/getApex';
|
|
2
|
+
export { getInvoker as GetApexInvoker, postInvoker as PostApexInvoker } from './wire/postApex';
|
|
3
|
+
export { getSObjectValue } from './lds-apex-static-utils';
|
|
4
|
+
export { registerPrefetcher } from './predictive-loading';
|
|
5
|
+
export type { ApexInvokerParams } from './util/shared';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './registry';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Adapter, AdapterRequestContext, Luvio } from '@luvio/engine';
|
|
2
|
+
import type { ApexInvokerParams } from '../util/shared';
|
|
3
|
+
interface Prefetcher {
|
|
4
|
+
saveRequest: (request: any) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function registerPrefetcher(luvio: Luvio, prefetcher: Prefetcher): void;
|
|
7
|
+
export declare function createGetApexAdapterWithPrediction<C, D>(adapter: Adapter<C, D>, luvio: Luvio, invokerParams: ApexInvokerParams, name: string): (config: C, requestContext?: AdapterRequestContext) => import("@luvio/engine").Snapshot<D> | Promise<import("@luvio/engine").Snapshot<D>> | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ImperativeAdapter } from '@salesforce/lds-bindings';
|
|
2
|
+
import { refresh } from '@salesforce/lds-bindings';
|
|
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>;
|
|
14
|
+
/**
|
|
15
|
+
* Apex
|
|
16
|
+
*
|
|
17
|
+
* The Apex invoker is dual purpose; it can be invoked imperatively or be provided to an @wire
|
|
18
|
+
* In order for this to work, LWC will look for the property "adapter" on the object, and check that
|
|
19
|
+
* it conforms to the WireAdapter interface.
|
|
20
|
+
*/
|
|
21
|
+
export declare const getApexInvoker: (namespace: string, classname: string, method: string, isContinuation: boolean, isCacheable?: boolean) => any;
|
|
22
|
+
export { getSObjectValue } from './lds-apex-static-utils';
|
|
23
|
+
export { registerPrefetcher, type ApexInvokerParams, GetApexWireAdapterFactory } from './main';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const create: {
|
|
2
|
+
(o: object | null): any;
|
|
3
|
+
(o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;
|
|
4
|
+
}, keys: {
|
|
5
|
+
(o: object): string[];
|
|
6
|
+
(o: {}): string[];
|
|
7
|
+
}, values: {
|
|
8
|
+
<T>(o: {
|
|
9
|
+
[s: string]: T;
|
|
10
|
+
} | ArrayLike<T>): T[];
|
|
11
|
+
(o: {}): any[];
|
|
12
|
+
};
|
|
13
|
+
declare const hasOwnProperty: (v: PropertyKey) => boolean;
|
|
14
|
+
declare const isArray: (arg: any) => arg is any[];
|
|
15
|
+
declare const stringify: {
|
|
16
|
+
(value: any, replacer?: ((this: any, key: string, value: any) => any) | undefined, space?: string | number | undefined): string;
|
|
17
|
+
(value: any, replacer?: (string | number)[] | null | undefined, space?: string | number | undefined): string;
|
|
18
|
+
};
|
|
19
|
+
export { create as ObjectCreate, keys as ObjectKeys, values as ObjectValues, hasOwnProperty as ObjectPrototypeHasOwnProperty, isArray as ArrayIsArray, stringify as JSONStringify, };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Luvio, ResourceIngest, FetchResponse } from '@luvio/engine';
|
|
2
|
+
interface ApexScopedModuleParams {
|
|
3
|
+
namespace: string;
|
|
4
|
+
classname: string;
|
|
5
|
+
method: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ApexInvokerParams extends ApexScopedModuleParams {
|
|
8
|
+
isContinuation: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface ApexAdapterConfig {
|
|
11
|
+
apexClass: string;
|
|
12
|
+
apexMethod: string;
|
|
13
|
+
methodParams?: any;
|
|
14
|
+
xSFDCAllowContinuation: string;
|
|
15
|
+
}
|
|
16
|
+
export type BuildSnapshotContext = {
|
|
17
|
+
luvio: Luvio;
|
|
18
|
+
config: ApexAdapterConfig;
|
|
19
|
+
};
|
|
20
|
+
export declare const CACHE_CONTROL = "cache-control";
|
|
21
|
+
export declare const SHARED_ADAPTER_CONTEXT_ID = "apex__shared";
|
|
22
|
+
/**
|
|
23
|
+
* Time to live for the Apex cache value. 5 minutes.
|
|
24
|
+
*/
|
|
25
|
+
export declare const APEX_TTL: number;
|
|
26
|
+
export declare const APEX_VERSION = "APEX_V_1";
|
|
27
|
+
export declare function apexResponseEquals(existing: any, incoming: any): boolean;
|
|
28
|
+
export declare const apexResponseIngest: ResourceIngest;
|
|
29
|
+
export declare function validateAdapterConfig(untrustedConfig: unknown): unknown | null;
|
|
30
|
+
/**
|
|
31
|
+
* A standard delimiter when producing cache keys.
|
|
32
|
+
*/
|
|
33
|
+
export declare const KEY_DELIM = ":";
|
|
34
|
+
export declare function isEmptyParam(param: unknown): boolean;
|
|
35
|
+
export declare function keyBuilder(classname: string, method: string, isContinuation: string, params: unknown): string;
|
|
36
|
+
export declare function configBuilder(config: any, classname: string, method: string, isContinuation: boolean): ApexAdapterConfig;
|
|
37
|
+
export declare function apexClassnameBuilder(namespace: string, classname: string): string;
|
|
38
|
+
export declare function shouldCache(response: FetchResponse<any>): boolean;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { FieldId } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* A deterministic JSON stringify implementation. Heavily adapted from https://github.com/epoberezkin/fast-json-stable-stringify.
|
|
4
|
+
* This is needed because insertion order for JSON.stringify(object) affects output:
|
|
5
|
+
* JSON.stringify({a: 1, b: 2})
|
|
6
|
+
* "{"a":1,"b":2}"
|
|
7
|
+
* JSON.stringify({b: 2, a: 1})
|
|
8
|
+
* "{"b":2,"a":1}"
|
|
9
|
+
* @param data Data to be JSON-stringified.
|
|
10
|
+
* @returns JSON.stringified value with consistent ordering of keys.
|
|
11
|
+
*/
|
|
12
|
+
export declare function stableJSONStringify(node: any): string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Returns the field API name, qualified with an object name if possible.
|
|
15
|
+
* @param value The value from which to get the qualified field API name.
|
|
16
|
+
* @return The qualified field API name.
|
|
17
|
+
*/
|
|
18
|
+
export declare function getFieldApiName(value: string | FieldId): string;
|
|
19
|
+
/**
|
|
20
|
+
* Split the object API name and field API name from a qualified field name.
|
|
21
|
+
* Eg: Opportunity.Title returns ['Opportunity', 'Title']
|
|
22
|
+
* Eg: Opportunity.Account.Name returns ['Opportunity', 'Account.Name']
|
|
23
|
+
* @param fieldApiName The qualified field name.
|
|
24
|
+
* @return The object and field API names.
|
|
25
|
+
*/
|
|
26
|
+
export declare function splitQualifiedFieldApiName(fieldApiName: string): string[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Adapter, DispatchResourceRequestContext, ErrorResponse, FulfilledSnapshot, Luvio, FetchResponse, Snapshot, SnapshotRefresh, StaleSnapshot } from '@luvio/engine';
|
|
2
|
+
import type { AdapterValidationConfig } from '../../generated/adapters/adapter-utils';
|
|
3
|
+
import type { ResourceRequestConfig } from '../../generated/resources/getByApexMethodAndApexClass';
|
|
4
|
+
import type { ApexAdapterConfig, ApexInvokerParams } from '../../util/shared';
|
|
5
|
+
export declare const adapterName = "getByApexMethodAndApexClass";
|
|
6
|
+
export declare const getByApexMethodAndApexClass_ConfigPropertyNames: AdapterValidationConfig;
|
|
7
|
+
export declare function createResourceParams(config: ApexAdapterConfig): ResourceRequestConfig;
|
|
8
|
+
export declare function keyBuilderFromResourceParams(params: ResourceRequestConfig): string;
|
|
9
|
+
export declare function ingestSuccess(luvio: Luvio, resourceParams: ResourceRequestConfig, response: FetchResponse<any>, snapshotRefresh?: SnapshotRefresh<any>): FulfilledSnapshot<any, any> | StaleSnapshot<any, any>;
|
|
10
|
+
export declare function onFetchResponseSuccess(luvio: Luvio, config: ApexAdapterConfig, resourceParams: ResourceRequestConfig, response: FetchResponse<any>): Promise<FulfilledSnapshot<any, any> | StaleSnapshot<any, any>>;
|
|
11
|
+
export declare function onFetchResponseError(luvio: Luvio, config: ApexAdapterConfig, _resourceParams: ResourceRequestConfig, response: ErrorResponse): Promise<import("@luvio/engine").ErrorSnapshot>;
|
|
12
|
+
export declare function buildNetworkSnapshot(luvio: Luvio, config: ApexAdapterConfig, options?: DispatchResourceRequestContext): Promise<Snapshot<any>>;
|
|
13
|
+
export declare const factory: (luvio: Luvio, invokerParams: ApexInvokerParams) => Adapter<any, any>;
|
|
14
|
+
export declare function getApexAdapterFactory(luvio: Luvio, namespace: string, classname: string, method: string, isContinuation: boolean): Adapter<any, any>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Adapter, AdapterRequestContext, DispatchResourceRequestContext, ErrorResponse, FulfilledSnapshot, Luvio, FetchResponse, Snapshot, SnapshotRefresh, StaleSnapshot } from '@luvio/engine';
|
|
2
|
+
import type { ResourceRequestConfig } from '../../generated/resources/postByApexMethodAndApexClass';
|
|
3
|
+
import type { ApexAdapterConfig, ApexInvokerParams } from '../../util/shared';
|
|
4
|
+
export declare function createResourceParams(config: ApexAdapterConfig): ResourceRequestConfig;
|
|
5
|
+
export declare function keyBuilderFromResourceParams(params: ResourceRequestConfig): string;
|
|
6
|
+
export declare function ingestSuccess(luvio: Luvio, resourceParams: ResourceRequestConfig, response: FetchResponse<any>, snapshotRefresh?: SnapshotRefresh<any>): FulfilledSnapshot<any, any> | StaleSnapshot<any, any>;
|
|
7
|
+
export declare function onFetchResponseSuccess(luvio: Luvio, _config: ApexAdapterConfig, resourceParams: ResourceRequestConfig, response: FetchResponse<any>): Promise<FulfilledSnapshot<any, any> | StaleSnapshot<any, any>>;
|
|
8
|
+
export declare function onFetchResponseError(luvio: Luvio, _config: ApexAdapterConfig, _resourceParams: ResourceRequestConfig, response: ErrorResponse): Promise<import("@luvio/engine").ErrorSnapshot>;
|
|
9
|
+
export declare function buildNetworkSnapshot(luvio: Luvio, config: ApexAdapterConfig, options?: DispatchResourceRequestContext): Promise<Snapshot<any>>;
|
|
10
|
+
type ApexInvoker = (config: unknown, requestContext: AdapterRequestContext) => Promise<any>;
|
|
11
|
+
export type ApexAdapterFactory<Config, DataType> = (luvio: Luvio, namespace: string, classname: string, method: string, isContinuation: boolean) => Adapter<Config, DataType>;
|
|
12
|
+
export declare const postInvoker: (luvio: Luvio, invokerParams: ApexInvokerParams) => ApexInvoker;
|
|
13
|
+
export declare const getInvoker: (luvio: Luvio, invokerParams: ApexInvokerParams) => ApexInvoker;
|
|
14
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@salesforce/lds-adapters-apex",
|
|
3
|
+
"version": "0.1.0-dev1",
|
|
4
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
|
+
"description": "Wire adapters for Apex",
|
|
6
|
+
"main": "dist/es/es2018/apex-service.js",
|
|
7
|
+
"module": "dist/es/es2018/apex-service.js",
|
|
8
|
+
"types": "dist/es/es2018/types/src/main.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"sfdc",
|
|
12
|
+
"src/raml/*"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"clean": "rm -rf dist sfdc src/generated karma/dist",
|
|
16
|
+
"build": "yarn build:services",
|
|
17
|
+
"build:raml": "luvio generate src/raml/luvio.raml src/generated",
|
|
18
|
+
"build:services": "rollup --bundleConfigAsCjs --config rollup.config.js",
|
|
19
|
+
"build:karma": "rollup --bundleConfigAsCjs --config rollup.config.karma.js",
|
|
20
|
+
"start": "nx build:karma && karma start",
|
|
21
|
+
"test": "nx build:karma && karma start --single-run",
|
|
22
|
+
"test:unit": "jest",
|
|
23
|
+
"release:corejar": "yarn build && ../core-build/scripts/core.js --adapter=lds-adapters-apex",
|
|
24
|
+
"release:core": "../../scripts/release/core.js --adapter=lds-adapters-apex"
|
|
25
|
+
},
|
|
26
|
+
"sfdc": {
|
|
27
|
+
"path": "forcelds/ldsAdaptersApex/",
|
|
28
|
+
"addition": [
|
|
29
|
+
"lds-apex-static-utils"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@salesforce/lds-bindings": "^0.1.0-dev1",
|
|
34
|
+
"@salesforce/lds-default-luvio": "^0.1.0-dev1"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@salesforce/lds-compiler-plugins": "^0.1.0-dev1",
|
|
38
|
+
"@salesforce/lds-karma": "^0.1.0-dev1"
|
|
39
|
+
},
|
|
40
|
+
"nx": {
|
|
41
|
+
"targets": {
|
|
42
|
+
"build": {
|
|
43
|
+
"outputs": [
|
|
44
|
+
"{projectRoot}/dist",
|
|
45
|
+
"{projectRoot}/sfdc"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"build:raml": {
|
|
49
|
+
"outputs": [
|
|
50
|
+
"{projectRoot}/src/generated"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"build:karma": {
|
|
54
|
+
"outputs": [
|
|
55
|
+
"{projectRoot}/karma/dist"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"volta": {
|
|
61
|
+
"extends": "../../package.json"
|
|
62
|
+
}
|
|
63
|
+
}
|
package/sfdc/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../dist/es/es2018/types/src/sfdc';
|