@salesforce/lds-worker-api 1.125.0 → 1.126.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.
- package/dist/sfdc/es/draftQueueImplementation.d.ts +2 -2
- package/dist/sfdc/es/executeAdapter.d.ts +83 -83
- package/dist/sfdc/es/language.d.ts +13 -13
- package/dist/sfdc/es/ldsWorkerApi.js +692 -682
- package/dist/sfdc/es/lightningAdapterApi.d.ts +11 -11
- package/dist/sfdc/es/main.d.ts +8 -8
- package/dist/sfdc/es/nimbusDraftQueue.d.ts +6 -6
- package/dist/sfdc/es/primingApi.d.ts +23 -23
- package/dist/sfdc/es/responses.d.ts +44 -44
- package/dist/sfdc/es/standalone-stubs/instrumentation.d.ts +21 -21
- package/dist/sfdc/es/standalone-stubs/o11y.d.ts +18 -18
- package/dist/sfdc/es/standalone-stubs/unwrap.d.ts +1 -1
- package/dist/sfdc/es/standalone.d.ts +1 -1
- package/dist/sfdc/es/ttl.d.ts +2 -2
- package/dist/standalone/es/draftQueueImplementation.d.ts +2 -2
- package/dist/standalone/es/executeAdapter.d.ts +83 -83
- package/dist/standalone/es/language.d.ts +13 -13
- package/dist/standalone/es/lds-runtime-mobile/src/__mocks__/@salesforce/i18n/currency.d.ts +2 -2
- package/dist/standalone/es/lds-runtime-mobile/src/__mocks__/@salesforce/i18n/dateTime.shortDateFormat.d.ts +2 -2
- package/dist/standalone/es/lds-runtime-mobile/src/__mocks__/@salesforce/i18n/dateTime.shortDateTimeFormat.d.ts +2 -2
- package/dist/standalone/es/lds-runtime-mobile/src/__mocks__/@salesforce/i18n/dateTime.shortTimeFormat.d.ts +2 -2
- package/dist/standalone/es/lds-runtime-mobile/src/__mocks__/@salesforce/i18n/locale.d.ts +2 -2
- package/dist/standalone/es/lds-runtime-mobile/src/__mocks__/@salesforce/i18n/timeZone.d.ts +2 -2
- package/dist/standalone/es/lds-runtime-mobile/src/__mocks__/@salesforce/user/Id.d.ts +2 -2
- package/dist/standalone/es/lds-runtime-mobile/src/__mocks__/lightning/i18nCldrOptions.d.ts +2 -2
- package/dist/standalone/es/lds-runtime-mobile/src/__mocks__/lightning/i18nService.d.ts +10 -10
- package/dist/standalone/es/lds-worker-api/src/standalone-stubs/unwrap.d.ts +1 -1
- package/dist/standalone/es/lds-worker-api.js +730 -717
- package/dist/standalone/es/lightningAdapterApi.d.ts +11 -11
- package/dist/standalone/es/main.d.ts +8 -8
- package/dist/standalone/es/nimbusDraftQueue.d.ts +6 -6
- package/dist/standalone/es/primingApi.d.ts +23 -23
- package/dist/standalone/es/responses.d.ts +44 -44
- package/dist/standalone/es/standalone-stubs/instrumentation.d.ts +21 -21
- package/dist/standalone/es/standalone-stubs/o11y.d.ts +18 -18
- package/dist/standalone/es/standalone.d.ts +1 -1
- package/dist/standalone/es/ttl.d.ts +2 -2
- package/dist/standalone/umd/draftQueueImplementation.d.ts +2 -2
- package/dist/standalone/umd/executeAdapter.d.ts +83 -83
- package/dist/standalone/umd/language.d.ts +13 -13
- package/dist/standalone/umd/lds-runtime-mobile/src/__mocks__/@salesforce/i18n/currency.d.ts +2 -2
- package/dist/standalone/umd/lds-runtime-mobile/src/__mocks__/@salesforce/i18n/dateTime.shortDateFormat.d.ts +2 -2
- package/dist/standalone/umd/lds-runtime-mobile/src/__mocks__/@salesforce/i18n/dateTime.shortDateTimeFormat.d.ts +2 -2
- package/dist/standalone/umd/lds-runtime-mobile/src/__mocks__/@salesforce/i18n/dateTime.shortTimeFormat.d.ts +2 -2
- package/dist/standalone/umd/lds-runtime-mobile/src/__mocks__/@salesforce/i18n/locale.d.ts +2 -2
- package/dist/standalone/umd/lds-runtime-mobile/src/__mocks__/@salesforce/i18n/timeZone.d.ts +2 -2
- package/dist/standalone/umd/lds-runtime-mobile/src/__mocks__/@salesforce/user/Id.d.ts +2 -2
- package/dist/standalone/umd/lds-runtime-mobile/src/__mocks__/lightning/i18nCldrOptions.d.ts +2 -2
- package/dist/standalone/umd/lds-runtime-mobile/src/__mocks__/lightning/i18nService.d.ts +10 -10
- package/dist/standalone/umd/lds-worker-api/src/standalone-stubs/unwrap.d.ts +1 -1
- package/dist/standalone/umd/lds-worker-api.js +730 -717
- package/dist/standalone/umd/lightningAdapterApi.d.ts +11 -11
- package/dist/standalone/umd/main.d.ts +8 -8
- package/dist/standalone/umd/nimbusDraftQueue.d.ts +6 -6
- package/dist/standalone/umd/primingApi.d.ts +23 -23
- package/dist/standalone/umd/responses.d.ts +44 -44
- package/dist/standalone/umd/standalone-stubs/instrumentation.d.ts +21 -21
- package/dist/standalone/umd/standalone-stubs/o11y.d.ts +18 -18
- package/dist/standalone/umd/standalone.d.ts +1 -1
- package/dist/standalone/umd/ttl.d.ts +2 -2
- package/package.json +1 -1
- package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/date-predicate.adapter-testcase.json +23 -0
- package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/serverresponse/date-predicate.server-response.network-mock.json +56 -0
- package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/snapshotdata/date-predicate.adapter-snapshot.result.json +18 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const draftManager: import("@salesforce/lds-drafts").DraftManager, draftQueue: import("@salesforce/lds-drafts").DraftQueue;
|
|
2
|
-
export { draftManager, draftQueue };
|
|
1
|
+
declare const draftManager: import("@salesforce/lds-drafts").DraftManager, draftQueue: import("@salesforce/lds-drafts").DraftQueue;
|
|
2
|
+
export { draftManager, draftQueue };
|
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
import type { CachePolicy, LuvioAdapterEventObserver } from '@luvio/engine';
|
|
2
|
-
import type { DraftQueueItemMetadata } from '@salesforce/lds-drafts';
|
|
3
|
-
import type { NativeErrorResponse } from './responses';
|
|
4
|
-
import type { ObservabilityContext } from '@salesforce/lds-runtime-mobile';
|
|
5
|
-
export type NativeCallbackValue = NativeCallbackData | NativeCallbackError | NativeCallbackErrors;
|
|
6
|
-
export type NativeCallbackData = {
|
|
7
|
-
data: any | undefined;
|
|
8
|
-
error?: undefined;
|
|
9
|
-
errors?: undefined;
|
|
10
|
-
};
|
|
11
|
-
export type NativeCallbackError = {
|
|
12
|
-
data?: undefined;
|
|
13
|
-
error: NativeErrorResponse;
|
|
14
|
-
errors?: undefined;
|
|
15
|
-
};
|
|
16
|
-
export type NativeCallbackErrors = {
|
|
17
|
-
data?: undefined;
|
|
18
|
-
error?: undefined;
|
|
19
|
-
errors: NativeErrorResponse[];
|
|
20
|
-
};
|
|
21
|
-
export type NativeOnSnapshot = (value: NativeCallbackValue) => void;
|
|
22
|
-
export type NativeOnResponse = (value: NativeCallbackValue) => void;
|
|
23
|
-
type Unsubscribe = () => void;
|
|
24
|
-
type NativeCachePolicy = CachePolicy;
|
|
25
|
-
type NativeAdapterRequestPriority = 'high' | 'normal' | 'background';
|
|
26
|
-
type NativeObservabilityContext = ObservabilityContext;
|
|
27
|
-
type NativeLuvioEventObserver = LuvioAdapterEventObserver;
|
|
28
|
-
interface NativeAdapterRequestContext {
|
|
29
|
-
cachePolicy?: NativeCachePolicy;
|
|
30
|
-
priority?: NativeAdapterRequestPriority;
|
|
31
|
-
observabilityContext?: NativeObservabilityContext;
|
|
32
|
-
luvioEventObserver?: NativeLuvioEventObserver;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Executes the adapter with the given adapterId and config. Will call onSnapshot
|
|
36
|
-
* callback with data or error. Returns an unsubscribe function that should
|
|
37
|
-
* be called to stop receiving updated snapshots.
|
|
38
|
-
*
|
|
39
|
-
* This function throws an error if the given adapterId cannot be found or is not
|
|
40
|
-
* a GET wire adapter. It will also throw if it fails to parse the config string.
|
|
41
|
-
*/
|
|
42
|
-
export declare function subscribeToAdapter(adapterId: string, config: string, onSnapshot: NativeOnSnapshot, nativeAdapterRequestContext?: NativeAdapterRequestContext): Unsubscribe;
|
|
43
|
-
/**
|
|
44
|
-
* Executes the specified adapter with the given adapterId and config. Then
|
|
45
|
-
* it replaces the draft with the given id with the draft generated
|
|
46
|
-
* by the mutating adapter. Will call onResult callback once with data or error.
|
|
47
|
-
*
|
|
48
|
-
* This function throws an error if the given adapterId cannot be found, or if the
|
|
49
|
-
* adapterId is not a mutating adapter, or if a draft isn't created, or if it
|
|
50
|
-
* fails to parse the given config string.
|
|
51
|
-
*/
|
|
52
|
-
export declare function invokeAdapterWithDraftToReplace(adapterId: string, config: string, draftIdToReplace: string, onResponse: NativeOnResponse, nativeAdapterRequestContext?: NativeAdapterRequestContext): void;
|
|
53
|
-
/**
|
|
54
|
-
* Executes the specified adapter with the given adapterId and config. Then
|
|
55
|
-
* it sets the given metadata on the draft created by the mutating adapter. Will call
|
|
56
|
-
* onResult callback once with data or error.
|
|
57
|
-
*
|
|
58
|
-
* This function throws an error if the given adapterId cannot be found, or if the
|
|
59
|
-
* adapterId is not a mutating adapter, or if a draft isn't created, or if it
|
|
60
|
-
* fails to parse the given config string.
|
|
61
|
-
*/
|
|
62
|
-
export declare function invokeAdapterWithMetadata(adapterId: string, config: string, metadata: DraftQueueItemMetadata, onResponse: NativeOnResponse, nativeAdapterRequestContext?: NativeAdapterRequestContext): void;
|
|
63
|
-
/**
|
|
64
|
-
* Executes the specified adapter with the given adapterId and config. Will call
|
|
65
|
-
* onResponse callback once with data or error.
|
|
66
|
-
*
|
|
67
|
-
* This function throws an error if the given adapterId cannot be found or if it
|
|
68
|
-
* fails to parse the given config string.
|
|
69
|
-
*/
|
|
70
|
-
export declare function invokeAdapter(adapterId: string, config: string, onResponse: NativeOnResponse, nativeAdapterRequestContext?: NativeAdapterRequestContext): void;
|
|
71
|
-
/**
|
|
72
|
-
* @deprecated Use invokeAdapter or subscribeToAdapter instead
|
|
73
|
-
*
|
|
74
|
-
* W-9173084 Will remove this
|
|
75
|
-
*/
|
|
76
|
-
export declare function executeAdapter(adapterId: string, config: string, onSnapshot: NativeOnSnapshot, nativeAdapterRequestContext?: NativeAdapterRequestContext): Unsubscribe;
|
|
77
|
-
/**
|
|
78
|
-
* @deprecated Use invokeAdapter instead
|
|
79
|
-
*
|
|
80
|
-
* W-9173084 Will remove this
|
|
81
|
-
*/
|
|
82
|
-
export declare function executeMutatingAdapter(adapterId: string, config: string, onResult: NativeOnResponse, nativeAdapterRequestContext?: NativeAdapterRequestContext): void;
|
|
83
|
-
export {};
|
|
1
|
+
import type { CachePolicy, LuvioAdapterEventObserver } from '@luvio/engine';
|
|
2
|
+
import type { DraftQueueItemMetadata } from '@salesforce/lds-drafts';
|
|
3
|
+
import type { NativeErrorResponse } from './responses';
|
|
4
|
+
import type { ObservabilityContext } from '@salesforce/lds-runtime-mobile';
|
|
5
|
+
export type NativeCallbackValue = NativeCallbackData | NativeCallbackError | NativeCallbackErrors;
|
|
6
|
+
export type NativeCallbackData = {
|
|
7
|
+
data: any | undefined;
|
|
8
|
+
error?: undefined;
|
|
9
|
+
errors?: undefined;
|
|
10
|
+
};
|
|
11
|
+
export type NativeCallbackError = {
|
|
12
|
+
data?: undefined;
|
|
13
|
+
error: NativeErrorResponse;
|
|
14
|
+
errors?: undefined;
|
|
15
|
+
};
|
|
16
|
+
export type NativeCallbackErrors = {
|
|
17
|
+
data?: undefined;
|
|
18
|
+
error?: undefined;
|
|
19
|
+
errors: NativeErrorResponse[];
|
|
20
|
+
};
|
|
21
|
+
export type NativeOnSnapshot = (value: NativeCallbackValue) => void;
|
|
22
|
+
export type NativeOnResponse = (value: NativeCallbackValue) => void;
|
|
23
|
+
type Unsubscribe = () => void;
|
|
24
|
+
type NativeCachePolicy = CachePolicy;
|
|
25
|
+
type NativeAdapterRequestPriority = 'high' | 'normal' | 'background';
|
|
26
|
+
type NativeObservabilityContext = ObservabilityContext;
|
|
27
|
+
type NativeLuvioEventObserver = LuvioAdapterEventObserver;
|
|
28
|
+
interface NativeAdapterRequestContext {
|
|
29
|
+
cachePolicy?: NativeCachePolicy;
|
|
30
|
+
priority?: NativeAdapterRequestPriority;
|
|
31
|
+
observabilityContext?: NativeObservabilityContext;
|
|
32
|
+
luvioEventObserver?: NativeLuvioEventObserver;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Executes the adapter with the given adapterId and config. Will call onSnapshot
|
|
36
|
+
* callback with data or error. Returns an unsubscribe function that should
|
|
37
|
+
* be called to stop receiving updated snapshots.
|
|
38
|
+
*
|
|
39
|
+
* This function throws an error if the given adapterId cannot be found or is not
|
|
40
|
+
* a GET wire adapter. It will also throw if it fails to parse the config string.
|
|
41
|
+
*/
|
|
42
|
+
export declare function subscribeToAdapter(adapterId: string, config: string, onSnapshot: NativeOnSnapshot, nativeAdapterRequestContext?: NativeAdapterRequestContext): Unsubscribe;
|
|
43
|
+
/**
|
|
44
|
+
* Executes the specified adapter with the given adapterId and config. Then
|
|
45
|
+
* it replaces the draft with the given id with the draft generated
|
|
46
|
+
* by the mutating adapter. Will call onResult callback once with data or error.
|
|
47
|
+
*
|
|
48
|
+
* This function throws an error if the given adapterId cannot be found, or if the
|
|
49
|
+
* adapterId is not a mutating adapter, or if a draft isn't created, or if it
|
|
50
|
+
* fails to parse the given config string.
|
|
51
|
+
*/
|
|
52
|
+
export declare function invokeAdapterWithDraftToReplace(adapterId: string, config: string, draftIdToReplace: string, onResponse: NativeOnResponse, nativeAdapterRequestContext?: NativeAdapterRequestContext): void;
|
|
53
|
+
/**
|
|
54
|
+
* Executes the specified adapter with the given adapterId and config. Then
|
|
55
|
+
* it sets the given metadata on the draft created by the mutating adapter. Will call
|
|
56
|
+
* onResult callback once with data or error.
|
|
57
|
+
*
|
|
58
|
+
* This function throws an error if the given adapterId cannot be found, or if the
|
|
59
|
+
* adapterId is not a mutating adapter, or if a draft isn't created, or if it
|
|
60
|
+
* fails to parse the given config string.
|
|
61
|
+
*/
|
|
62
|
+
export declare function invokeAdapterWithMetadata(adapterId: string, config: string, metadata: DraftQueueItemMetadata, onResponse: NativeOnResponse, nativeAdapterRequestContext?: NativeAdapterRequestContext): void;
|
|
63
|
+
/**
|
|
64
|
+
* Executes the specified adapter with the given adapterId and config. Will call
|
|
65
|
+
* onResponse callback once with data or error.
|
|
66
|
+
*
|
|
67
|
+
* This function throws an error if the given adapterId cannot be found or if it
|
|
68
|
+
* fails to parse the given config string.
|
|
69
|
+
*/
|
|
70
|
+
export declare function invokeAdapter(adapterId: string, config: string, onResponse: NativeOnResponse, nativeAdapterRequestContext?: NativeAdapterRequestContext): void;
|
|
71
|
+
/**
|
|
72
|
+
* @deprecated Use invokeAdapter or subscribeToAdapter instead
|
|
73
|
+
*
|
|
74
|
+
* W-9173084 Will remove this
|
|
75
|
+
*/
|
|
76
|
+
export declare function executeAdapter(adapterId: string, config: string, onSnapshot: NativeOnSnapshot, nativeAdapterRequestContext?: NativeAdapterRequestContext): Unsubscribe;
|
|
77
|
+
/**
|
|
78
|
+
* @deprecated Use invokeAdapter instead
|
|
79
|
+
*
|
|
80
|
+
* W-9173084 Will remove this
|
|
81
|
+
*/
|
|
82
|
+
export declare function executeMutatingAdapter(adapterId: string, config: string, onResult: NativeOnResponse, nativeAdapterRequestContext?: NativeAdapterRequestContext): void;
|
|
83
|
+
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
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
|
-
};
|
|
8
|
-
declare const stringify: {
|
|
9
|
-
(value: any, replacer?: ((this: any, key: string, value: any) => any) | undefined, space?: string | number | undefined): string;
|
|
10
|
-
(value: any, replacer?: (string | number)[] | null | undefined, space?: string | number | undefined): string;
|
|
11
|
-
}, parse: (text: string, reviver?: ((this: any, key: string, value: any) => any) | undefined) => any;
|
|
12
|
-
declare const isArray: (arg: any) => arg is any[];
|
|
13
|
-
export { create as ObjectCreate, keys as ObjectKeys, stringify as JSONStringify, parse as JSONParse, isArray as IsArray, };
|
|
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
|
+
};
|
|
8
|
+
declare const stringify: {
|
|
9
|
+
(value: any, replacer?: ((this: any, key: string, value: any) => any) | undefined, space?: string | number | undefined): string;
|
|
10
|
+
(value: any, replacer?: (string | number)[] | null | undefined, space?: string | number | undefined): string;
|
|
11
|
+
}, parse: (text: string, reviver?: ((this: any, key: string, value: any) => any) | undefined) => any;
|
|
12
|
+
declare const isArray: (arg: any) => arg is any[];
|
|
13
|
+
export { create as ObjectCreate, keys as ObjectKeys, stringify as JSONStringify, parse as JSONParse, isArray as IsArray, };
|