@salesforce/lds-worker-api 1.100.2

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.
Files changed (111) hide show
  1. package/LICENSE.txt +82 -0
  2. package/README.md +9 -0
  3. package/dist/sfdc/es/draftQueueImplementation.d.ts +2 -0
  4. package/dist/sfdc/es/executeAdapter.d.ts +71 -0
  5. package/dist/sfdc/es/language.d.ts +13 -0
  6. package/dist/sfdc/es/ldsWorkerApi.js +746 -0
  7. package/dist/sfdc/es/lightningAdapterApi.d.ts +11 -0
  8. package/dist/sfdc/es/main.d.ts +8 -0
  9. package/dist/sfdc/es/nimbusDraftQueue.d.ts +6 -0
  10. package/dist/sfdc/es/primingApi.d.ts +19 -0
  11. package/dist/sfdc/es/responses.d.ts +44 -0
  12. package/dist/sfdc/es/standalone-stubs/instrumentation.d.ts +21 -0
  13. package/dist/sfdc/es/standalone-stubs/o11y.d.ts +18 -0
  14. package/dist/sfdc/es/standalone-stubs/unwrap.d.ts +1 -0
  15. package/dist/sfdc/es/standalone.d.ts +1 -0
  16. package/dist/sfdc/es/ttl.d.ts +2 -0
  17. package/dist/standalone/es/draftQueueImplementation.d.ts +2 -0
  18. package/dist/standalone/es/executeAdapter.d.ts +71 -0
  19. package/dist/standalone/es/language.d.ts +13 -0
  20. package/dist/standalone/es/lds-runtime-mobile/src/__mocks__/@salesforce/i18n/currency.d.ts +2 -0
  21. package/dist/standalone/es/lds-runtime-mobile/src/__mocks__/@salesforce/i18n/dateTime.shortDateFormat.d.ts +2 -0
  22. package/dist/standalone/es/lds-runtime-mobile/src/__mocks__/@salesforce/i18n/dateTime.shortDateTimeFormat.d.ts +2 -0
  23. package/dist/standalone/es/lds-runtime-mobile/src/__mocks__/@salesforce/i18n/dateTime.shortTimeFormat.d.ts +2 -0
  24. package/dist/standalone/es/lds-runtime-mobile/src/__mocks__/@salesforce/i18n/locale.d.ts +2 -0
  25. package/dist/standalone/es/lds-runtime-mobile/src/__mocks__/@salesforce/i18n/timeZone.d.ts +2 -0
  26. package/dist/standalone/es/lds-runtime-mobile/src/__mocks__/@salesforce/user/Id.d.ts +2 -0
  27. package/dist/standalone/es/lds-runtime-mobile/src/__mocks__/lightning/i18nCldrOptions.d.ts +2 -0
  28. package/dist/standalone/es/lds-runtime-mobile/src/__mocks__/lightning/i18nService.d.ts +10 -0
  29. package/dist/standalone/es/lds-worker-api/src/standalone-stubs/unwrap.d.ts +1 -0
  30. package/dist/standalone/es/lds-worker-api.js +79227 -0
  31. package/dist/standalone/es/lightningAdapterApi.d.ts +11 -0
  32. package/dist/standalone/es/main.d.ts +8 -0
  33. package/dist/standalone/es/nimbusDraftQueue.d.ts +6 -0
  34. package/dist/standalone/es/primingApi.d.ts +19 -0
  35. package/dist/standalone/es/responses.d.ts +44 -0
  36. package/dist/standalone/es/standalone-stubs/instrumentation.d.ts +21 -0
  37. package/dist/standalone/es/standalone-stubs/o11y.d.ts +18 -0
  38. package/dist/standalone/es/standalone.d.ts +1 -0
  39. package/dist/standalone/es/ttl.d.ts +2 -0
  40. package/dist/standalone/umd/draftQueueImplementation.d.ts +2 -0
  41. package/dist/standalone/umd/executeAdapter.d.ts +71 -0
  42. package/dist/standalone/umd/language.d.ts +13 -0
  43. package/dist/standalone/umd/lds-runtime-mobile/src/__mocks__/@salesforce/i18n/currency.d.ts +2 -0
  44. package/dist/standalone/umd/lds-runtime-mobile/src/__mocks__/@salesforce/i18n/dateTime.shortDateFormat.d.ts +2 -0
  45. package/dist/standalone/umd/lds-runtime-mobile/src/__mocks__/@salesforce/i18n/dateTime.shortDateTimeFormat.d.ts +2 -0
  46. package/dist/standalone/umd/lds-runtime-mobile/src/__mocks__/@salesforce/i18n/dateTime.shortTimeFormat.d.ts +2 -0
  47. package/dist/standalone/umd/lds-runtime-mobile/src/__mocks__/@salesforce/i18n/locale.d.ts +2 -0
  48. package/dist/standalone/umd/lds-runtime-mobile/src/__mocks__/@salesforce/i18n/timeZone.d.ts +2 -0
  49. package/dist/standalone/umd/lds-runtime-mobile/src/__mocks__/@salesforce/user/Id.d.ts +2 -0
  50. package/dist/standalone/umd/lds-runtime-mobile/src/__mocks__/lightning/i18nCldrOptions.d.ts +2 -0
  51. package/dist/standalone/umd/lds-runtime-mobile/src/__mocks__/lightning/i18nService.d.ts +10 -0
  52. package/dist/standalone/umd/lds-worker-api/src/standalone-stubs/unwrap.d.ts +1 -0
  53. package/dist/standalone/umd/lds-worker-api.js +79250 -0
  54. package/dist/standalone/umd/lightningAdapterApi.d.ts +11 -0
  55. package/dist/standalone/umd/main.d.ts +8 -0
  56. package/dist/standalone/umd/nimbusDraftQueue.d.ts +6 -0
  57. package/dist/standalone/umd/primingApi.d.ts +19 -0
  58. package/dist/standalone/umd/responses.d.ts +44 -0
  59. package/dist/standalone/umd/standalone-stubs/instrumentation.d.ts +21 -0
  60. package/dist/standalone/umd/standalone-stubs/o11y.d.ts +18 -0
  61. package/dist/standalone/umd/standalone.d.ts +1 -0
  62. package/dist/standalone/umd/ttl.d.ts +2 -0
  63. package/package.json +74 -0
  64. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/adapter-testcase.schema.json +83 -0
  65. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/createRecord/name-displayValue-response.adapter-snapshot.result.json +61 -0
  66. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/createRecord/name-displayValue.adapter-testcase.json +67 -0
  67. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/createRecord/objectInfos/Aircraft-objectInfo.network-mock.json +517 -0
  68. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/createRecord/objectInfos/Pilot-objectInfo.network-mock.json +347 -0
  69. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/createRecord/scalar-displayValue-nonIntl-fallback-response.adapter-snapshot.result.json +82 -0
  70. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/createRecord/scalar-displayValue-nonIntl-fallback.adapter-testcase.json +25 -0
  71. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/createRecord/scalar-displayValue-response.adapter-snapshot.result.json +82 -0
  72. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/createRecord/scalar-displayValue.adapter-testcase.json +23 -0
  73. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/adapter-forward-assignedtome.adapter-testcase.json +34 -0
  74. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/adapter-forward-baseline.adapter-testcase.json +24 -0
  75. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/adapter-forward-child-relationship.adapter-testcase.json +29 -0
  76. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/adapter-forward-parent-relationship.adapter-testcase.json +29 -0
  77. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/adapter-forward-reserved-entity-name.adapter-testcase.json +25 -0
  78. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/assignedtome.adapter-testcase.json +33 -0
  79. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/l2DataSet.js +250 -0
  80. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/legacy/getTimeSheetEntry-baseline.adapter-testcase.json +21 -0
  81. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/legacy/getTimeSheetEntry-where-orderby-allfields-spanningfield-500records.adapter-testcase.json +28 -0
  82. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/legacy/getTimeSheetEntry-where-orderby-allfields-spanningfield.adapter-testcase.json +28 -0
  83. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/legacy/getTimeSheetEntry-where-orderby-allfields.adapter-testcase.json +21 -0
  84. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/legacy/getTimeSheetEntry-where-orderby.adapter-testcase.json +21 -0
  85. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/legacy/getTimeSheetEntry-where.adapter-testcase.json +21 -0
  86. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/objectInfos/Account.network-mock.json +2784 -0
  87. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/objectInfos/AssignedResource.network-mock.json +863 -0
  88. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/objectInfos/Case.network-mock.json +1856 -0
  89. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/objectInfos/ServiceAppointment.network-mock.json +2888 -0
  90. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/objectInfos/ServiceResource.network-mock.json +1316 -0
  91. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/objectInfos/TimeSheetEntry.network-mock.json +977 -0
  92. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/objectInfos/WorkOrder.network-mock.json +3058 -0
  93. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/objectInfos/WorkType.network-mock.json +940 -0
  94. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/objectinfo.adapter-testcase.json +18 -0
  95. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/polyfield.adapter-testcase.json +43 -0
  96. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/serverresponse/adapter-forward-baseline.server-response.network-mock.json +416 -0
  97. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/serverresponse/adapter-forward-child-relationship.server-response.network-mock.json +103 -0
  98. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/serverresponse/adapter-forward-parent-relationship.server-response.network-mock.json +93 -0
  99. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/serverresponse/adapter-forward-reserved-entity-name.server-response.network-mock.json +97 -0
  100. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/serverresponse/assignedtome.server-response.network-mock.json +666 -0
  101. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/serverresponse/objectinfos.server-response.network-mock.json +210 -0
  102. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/serverresponse/polyfield.server-response.network-mock.json +724 -0
  103. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/snapshotdata/adapter-forward-assignedtome.adapter-snapshot.result.json +72 -0
  104. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/snapshotdata/adapter-forward-baseline.adapter-snapshot.result.json +245 -0
  105. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/snapshotdata/adapter-forward-child-relationship.adapter-snapshot.result.json +30 -0
  106. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/snapshotdata/adapter-forward-parent-relationship.adapter-snapshot.result.json +26 -0
  107. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/snapshotdata/adapter-forward-reserved-entity-name.adapter-snapshot.result.json +32 -0
  108. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/snapshotdata/assignedtome.adapter-snapshot.result.json +70 -0
  109. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/snapshotdata/objectinfos.adapter-snapshot.result.json +170 -0
  110. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/graphQL/snapshotdata/polyfield.adapter-snapshot.result.json +29 -0
  111. package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/network-mock.schema.json +14 -0
@@ -0,0 +1,11 @@
1
+ import type { ImperativeAdapter } from '@salesforce/lds-bindings';
2
+ import type { Adapter } from '@luvio/engine';
3
+ import * as gqlApi from 'force/ldsAdaptersGraphql';
4
+ export declare const IMPERATIVE_ADAPTER_SUFFIX = "_imperative";
5
+ export declare const UNSTABLE_ADAPTER_PREFIX = "unstable_";
6
+ type AdapterMapValue = Adapter<unknown, unknown> | ImperativeAdapter<unknown, unknown> | undefined;
7
+ type ImperativeAdapterMapValue = ImperativeAdapter<unknown, unknown> | undefined;
8
+ declare function getDMLAdapterFromName(name: string): AdapterMapValue;
9
+ declare function getImperativeAdapterFromName(name: string): ImperativeAdapterMapValue;
10
+ declare function getImperativeAdapterNames(): string[];
11
+ export { getImperativeAdapterFromName, getDMLAdapterFromName, getImperativeAdapterNames, gqlApi };
@@ -0,0 +1,8 @@
1
+ import { subscribeToAdapter, invokeAdapter, invokeAdapterWithMetadata, invokeAdapterWithDraftToReplace, executeAdapter, executeMutatingAdapter } from './executeAdapter';
2
+ import { getImperativeAdapterNames } from './lightningAdapterApi';
3
+ import { nimbusDraftQueue } from './nimbusDraftQueue';
4
+ import { draftQueue, draftManager } from './draftQueueImplementation';
5
+ import { setUiApiRecordTTL, setMetadataTTL } from './ttl';
6
+ import { registerReportObserver } from '@salesforce/lds-runtime-mobile';
7
+ import { createPrimingSession } from './primingApi';
8
+ export { subscribeToAdapter, invokeAdapter, invokeAdapterWithMetadata, invokeAdapterWithDraftToReplace, executeAdapter, executeMutatingAdapter, nimbusDraftQueue, draftQueue, draftManager, setUiApiRecordTTL, setMetadataTTL, registerReportObserver, getImperativeAdapterNames, createPrimingSession, };
@@ -0,0 +1,6 @@
1
+ import type { DraftQueue as NimbusDraftQueue } from '@salesforce/nimbus-plugin-lds';
2
+ /**
3
+ * Implements the DraftQueue interface from nimbus-plugin-lds by passing requests
4
+ * to the instance of the lds-drafts' DraftQueue implementation
5
+ */
6
+ export declare const nimbusDraftQueue: NimbusDraftQueue;
@@ -0,0 +1,19 @@
1
+ interface PrimingError {
2
+ ids: string[];
3
+ code: ErrorCode;
4
+ message: string;
5
+ }
6
+ type ErrorCode = 'precondition-error' | 'not-found' | 'service-unavailable' | 'unknown';
7
+ interface PrimingEventHandler {
8
+ onError?: (error: PrimingError) => void;
9
+ onPrimed?: (ids: string[]) => void;
10
+ }
11
+ export interface PrimingSessionConfig {
12
+ primingEventHandler?: PrimingEventHandler;
13
+ concurrency?: number;
14
+ batchSize?: number;
15
+ }
16
+ export declare function createPrimingSession(config: PrimingSessionConfig): {
17
+ enqueue: (work: PrimingWork) => Promise<void>;
18
+ };
19
+ export {};
@@ -0,0 +1,44 @@
1
+ import type { FetchResponse, FetchErrorResponse, Headers, AdapterErrorResponse, NetworkAdapterErrorResponse } from '@luvio/engine';
2
+ import { HttpStatusCode } from '@luvio/engine';
3
+ export declare const NATIVE_ERROR_CODE = "NATIVE_ERROR";
4
+ export declare const NON_MUTATING_ADAPTER_MESSAGE = "adapterId must be a mutating adapter";
5
+ export declare const NO_DRAFT_CREATED_MESSAGE = "the adapter did not generate a draft";
6
+ export declare const DRAFT_DOESNT_EXIST_MESSAGE = "the specified draft does not exist";
7
+ /**
8
+ * Error objects don't serialize well over the js-native wire, so our class turns
9
+ * an Error into an object that serializes real nice
10
+ */
11
+ export declare class NativeNetworkAdapterErrorResponse implements NetworkAdapterErrorResponse {
12
+ message: string;
13
+ name: string;
14
+ errorType: NetworkAdapterErrorResponse['errorType'];
15
+ constructor(error: NetworkAdapterErrorResponse);
16
+ }
17
+ export declare class NativeAdapterErrorResponse implements AdapterErrorResponse {
18
+ errorType: AdapterErrorResponse['errorType'];
19
+ error: unknown;
20
+ constructor(error: AdapterErrorResponse);
21
+ }
22
+ /**
23
+ * NativeErrorResponse is the native version of Luvio's ErrorResponse type.
24
+ *
25
+ * It is either a non-ok http response or an Error. It has a discriminator property
26
+ * "errorType" to distinguish between the two types of errors.
27
+ */
28
+ export type NativeErrorResponse = NativeFetchErrorResponse | NativeNetworkAdapterErrorResponse | NativeAdapterErrorResponse;
29
+ export declare class NativeFetchResponse<T> implements FetchResponse<T> {
30
+ status: HttpStatusCode;
31
+ body: T;
32
+ headers: Headers;
33
+ constructor(status: HttpStatusCode, body: T);
34
+ get statusText(): string;
35
+ get ok(): boolean;
36
+ }
37
+ export declare class NativeFetchErrorResponse extends NativeFetchResponse<unknown> implements FetchErrorResponse {
38
+ errorType: FetchErrorResponse['errorType'];
39
+ }
40
+ export declare function createNativeFetchErrorResponse(message: string): NativeFetchErrorResponse;
41
+ /**
42
+ * This function takes an unknown error and normalizes it to an Error object
43
+ */
44
+ export declare function normalizeError(error: unknown): Error;
@@ -0,0 +1,21 @@
1
+ export declare const instrumentation: {
2
+ instrumentAdapter(createFunction: Function, _metadata: any): Function;
3
+ };
4
+ export declare function instrumentAdapter(createFunction: Function, _metadata: any): Function;
5
+ export declare function incrementGetRecordNotifyChangeAllowCount(): void;
6
+ export declare function incrementGetRecordNotifyChangeDropCount(): void;
7
+ export declare function incrementNotifyRecordUpdateAvailableAllowCount(): void;
8
+ export declare function incrementNotifyRecordUpdateAvailableDropCount(): void;
9
+ export declare function refreshApiEvent(): void;
10
+ export declare function instrumentGraphqlAdapter(createFunction: Function, _metadata: any): Function;
11
+ export declare function setLdsAdaptersUiapiInstrumentation(_uiapiRegistration: any): void;
12
+ export declare function setLdsNetworkAdapterInstrumentation(_networkAdapterRegistration: any): void;
13
+ export declare function setupInstrumentation(_luvio: any, _store: any): void;
14
+ export declare function instrumentLuvio(_context: unknown): void;
15
+ export declare const REFRESH_UIAPI_KEY = "refreshUiApi";
16
+ export declare const METRIC_KEYS: {};
17
+ export declare const O11Y_NAMESPACE_LDS_MOBILE = "lds-mobile";
18
+ export declare const withInstrumentation: () => undefined;
19
+ export declare class MetricsReporter {
20
+ reportGraphqlQueryParseError(): void;
21
+ }
@@ -0,0 +1,18 @@
1
+ import type { IdleDetector, Activity } from 'o11y/dist/modules/o11y/client/interfaces';
2
+ export declare const idleDetector: IdleDetector;
3
+ export declare const activity: Partial<Activity>;
4
+ type MetricsTags = Record<string, number | string | boolean>;
5
+ declare function startActivity(_name: string): Activity;
6
+ export declare const mockInstrumentation: {
7
+ startActivity: typeof startActivity;
8
+ error: () => void;
9
+ trackValue: (_operation: string, _value: number, _hasError?: boolean, _tags?: MetricsTags) => void;
10
+ incrementCounter: (_operation: string, _increment?: number, _hasError?: boolean, _tags?: MetricsTags) => void;
11
+ };
12
+ export declare const getInstrumentation: () => {
13
+ startActivity: typeof startActivity;
14
+ error: () => void;
15
+ trackValue: (_operation: string, _value: number, _hasError?: boolean, _tags?: MetricsTags) => void;
16
+ incrementCounter: (_operation: string, _increment?: number, _hasError?: boolean, _tags?: MetricsTags) => void;
17
+ };
18
+ export {};
@@ -0,0 +1 @@
1
+ export declare function unwrap<T>(data: T): T;
@@ -0,0 +1 @@
1
+ export * from './main';
@@ -0,0 +1,2 @@
1
+ export declare function setUiApiRecordTTL(ttl: number): Promise<void>;
2
+ export declare function setMetadataTTL(ttl: number): Promise<void>;
@@ -0,0 +1,2 @@
1
+ declare const draftManager: import("@salesforce/lds-drafts").DraftManager, draftQueue: import("@salesforce/lds-drafts").DraftQueue;
2
+ export { draftManager, draftQueue };
@@ -0,0 +1,71 @@
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 = {
6
+ data: any | undefined;
7
+ error: NativeErrorResponse | undefined;
8
+ };
9
+ export type NativeOnSnapshot = (value: NativeCallbackValue) => void;
10
+ export type NativeOnResponse = (value: NativeCallbackValue) => void;
11
+ type Unsubscribe = () => void;
12
+ type NativeCachePolicy = CachePolicy;
13
+ type NativeAdapterRequestPriority = 'high' | 'normal' | 'background';
14
+ type NativeObservabilityContext = ObservabilityContext;
15
+ type NativeLuvioEventObserver = LuvioAdapterEventObserver;
16
+ interface NativeAdapterRequestContext {
17
+ cachePolicy?: NativeCachePolicy;
18
+ priority?: NativeAdapterRequestPriority;
19
+ observabilityContext?: NativeObservabilityContext;
20
+ luvioEventObserver?: NativeLuvioEventObserver;
21
+ }
22
+ /**
23
+ * Executes the adapter with the given adapterId and config. Will call onSnapshot
24
+ * callback with data or error. Returns an unsubscribe function that should
25
+ * be called to stop receiving updated snapshots.
26
+ *
27
+ * This function throws an error if the given adapterId cannot be found or is not
28
+ * a GET wire adapter. It will also throw if it fails to parse the config string.
29
+ */
30
+ export declare function subscribeToAdapter(adapterId: string, config: string, onSnapshot: NativeOnSnapshot, nativeAdapterRequestContext?: NativeAdapterRequestContext): Unsubscribe;
31
+ /**
32
+ * Executes the specified adapter with the given adapterId and config. Then
33
+ * it replaces the draft with the given id with the draft generated
34
+ * by the mutating adapter. Will call onResult callback once with data or error.
35
+ *
36
+ * This function throws an error if the given adapterId cannot be found, or if the
37
+ * adapterId is not a mutating adapter, or if a draft isn't created, or if it
38
+ * fails to parse the given config string.
39
+ */
40
+ export declare function invokeAdapterWithDraftToReplace(adapterId: string, config: string, draftIdToReplace: string, onResponse: NativeOnResponse, nativeAdapterRequestContext?: NativeAdapterRequestContext): void;
41
+ /**
42
+ * Executes the specified adapter with the given adapterId and config. Then
43
+ * it sets the given metadata on the draft created by the mutating adapter. Will call
44
+ * onResult callback once with data or error.
45
+ *
46
+ * This function throws an error if the given adapterId cannot be found, or if the
47
+ * adapterId is not a mutating adapter, or if a draft isn't created, or if it
48
+ * fails to parse the given config string.
49
+ */
50
+ export declare function invokeAdapterWithMetadata(adapterId: string, config: string, metadata: DraftQueueItemMetadata, onResponse: NativeOnResponse, nativeAdapterRequestContext?: NativeAdapterRequestContext): void;
51
+ /**
52
+ * Executes the specified adapter with the given adapterId and config. Will call
53
+ * onResponse callback once with data or error.
54
+ *
55
+ * This function throws an error if the given adapterId cannot be found or if it
56
+ * fails to parse the given config string.
57
+ */
58
+ export declare function invokeAdapter(adapterId: string, config: string, onResponse: NativeOnResponse, nativeAdapterRequestContext?: NativeAdapterRequestContext): void;
59
+ /**
60
+ * @deprecated Use invokeAdapter or subscribeToAdapter instead
61
+ *
62
+ * W-9173084 Will remove this
63
+ */
64
+ export declare function executeAdapter(adapterId: string, config: string, onSnapshot: NativeOnSnapshot, nativeAdapterRequestContext?: NativeAdapterRequestContext): Unsubscribe;
65
+ /**
66
+ * @deprecated Use invokeAdapter instead
67
+ *
68
+ * W-9173084 Will remove this
69
+ */
70
+ export declare function executeMutatingAdapter(adapterId: string, config: string, onResult: NativeOnResponse, nativeAdapterRequestContext?: NativeAdapterRequestContext): void;
71
+ export {};
@@ -0,0 +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, };
@@ -0,0 +1,2 @@
1
+ declare const _default: "USD";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "M/d/yyyy";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "M/d/yyyy, h:mm a";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "h:mm a";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "en-US";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "America/Los_Angeles";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "005B0000000GR4OIAW";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare function formattingOptions(pattern: String): String;
2
+ export default formattingOptions;
@@ -0,0 +1,10 @@
1
+ declare function getNumberFormat(): {
2
+ format: () => string;
3
+ };
4
+ declare function getDateTimeFormat(): {
5
+ format: (date: number) => string;
6
+ };
7
+ declare function getDateTimeISO8601Parser(): {
8
+ parse: (input: string) => number | Date;
9
+ };
10
+ export { getNumberFormat, getDateTimeFormat, getDateTimeISO8601Parser };
@@ -0,0 +1 @@
1
+ export declare function unwrap<T>(data: T): T;