@salesforce/lds-runtime-mobile 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.
- package/LICENSE.txt +82 -0
- package/dist/DraftQueueFactory.d.ts +3 -0
- package/dist/NimbusBinaryStore.d.ts +2 -0
- package/dist/NimbusDraftQueue.d.ts +25 -0
- package/dist/RecordIdGenerator.d.ts +15 -0
- package/dist/__mocks__/@salesforce/i18n/currency.d.ts +2 -0
- package/dist/__mocks__/@salesforce/i18n/dateTime.shortDateFormat.d.ts +2 -0
- package/dist/__mocks__/@salesforce/i18n/dateTime.shortDateTimeFormat.d.ts +2 -0
- package/dist/__mocks__/@salesforce/i18n/dateTime.shortTimeFormat.d.ts +2 -0
- package/dist/__mocks__/@salesforce/i18n/locale.d.ts +2 -0
- package/dist/__mocks__/@salesforce/i18n/timeZone.d.ts +2 -0
- package/dist/__mocks__/@salesforce/user/Id.d.ts +2 -0
- package/dist/__mocks__/force/ldsGraphqlParser.d.ts +3 -0
- package/dist/__mocks__/lightning/i18nCldrOptions.d.ts +2 -0
- package/dist/__mocks__/lightning/i18nService.d.ts +10 -0
- package/dist/__mocks__/o11y/activity.d.ts +2 -0
- package/dist/__mocks__/o11y/client.d.ts +5 -0
- package/dist/__mocks__/o11y/idleDetector.d.ts +2 -0
- package/dist/__mocks__/o11y/instrumentation.d.ts +15 -0
- package/dist/durableStore/NimbusSqliteStore/NimbusSqliteStore.d.ts +20 -0
- package/dist/durableStore/NimbusSqliteStore/tables/AbstractKeyValueDataTable.d.ts +14 -0
- package/dist/durableStore/NimbusSqliteStore/tables/LdsDataTable.d.ts +15 -0
- package/dist/durableStore/NimbusSqliteStore/tables/LdsDataTableBase.d.ts +8 -0
- package/dist/durableStore/NimbusSqliteStore/tables/LdsDraftIdMapDataTable.d.ts +5 -0
- package/dist/durableStore/NimbusSqliteStore/tables/LdsDraftsDataTable.d.ts +5 -0
- package/dist/durableStore/NimbusSqliteStore/tables/LdsInternalDataTable.d.ts +15 -0
- package/dist/durableStore/NimbusSqliteStore/tables/index.d.ts +5 -0
- package/dist/durableStore/NimbusSqliteStore/tables/utils.d.ts +2 -0
- package/dist/durableStore/index.d.ts +2 -0
- package/dist/durableStore/makeEnvironmentGraphqlAware.d.ts +2 -0
- package/dist/environment/enableLazyObjectInfoCaching.d.ts +13 -0
- package/dist/inspection/setupInspection.d.ts +2 -0
- package/dist/instrumentation/instrumentDraftQueue.d.ts +2 -0
- package/dist/instrumentation/instrumentGraphQLEval.d.ts +2 -0
- package/dist/instrumentation/instrumentMobileAdapter.d.ts +6 -0
- package/dist/instrumentation/instrumentPrimingSession.d.ts +2 -0
- package/dist/instrumentation/instrumentationContentDocumentVersionAdapter.d.ts +2 -0
- package/dist/instrumentation/instrumentationUtils.d.ts +10 -0
- package/dist/instrumentation/metrics.d.ts +14 -0
- package/dist/instrumentation/withInstrumentation.d.ts +12 -0
- package/dist/localization/formatDisplayValue.d.ts +6 -0
- package/dist/main.d.ts +6 -0
- package/dist/main.js +15242 -0
- package/dist/priming/primingSessionFactory.d.ts +13 -0
- package/dist/runtime.d.ts +17 -0
- package/dist/utils/ObjectInfoService.d.ts +43 -0
- package/dist/utils/adapters.d.ts +18 -0
- package/dist/utils/language.d.ts +29 -0
- package/dist/utils/utils.d.ts +13 -0
- package/package.json +93 -0
- package/sfdc/DraftQueueFactory.d.ts +3 -0
- package/sfdc/NimbusBinaryStore.d.ts +2 -0
- package/sfdc/NimbusDraftQueue.d.ts +25 -0
- package/sfdc/RecordIdGenerator.d.ts +15 -0
- package/sfdc/__mocks__/@salesforce/i18n/currency.d.ts +2 -0
- package/sfdc/__mocks__/@salesforce/i18n/dateTime.shortDateFormat.d.ts +2 -0
- package/sfdc/__mocks__/@salesforce/i18n/dateTime.shortDateTimeFormat.d.ts +2 -0
- package/sfdc/__mocks__/@salesforce/i18n/dateTime.shortTimeFormat.d.ts +2 -0
- package/sfdc/__mocks__/@salesforce/i18n/locale.d.ts +2 -0
- package/sfdc/__mocks__/@salesforce/i18n/timeZone.d.ts +2 -0
- package/sfdc/__mocks__/@salesforce/user/Id.d.ts +2 -0
- package/sfdc/__mocks__/force/ldsGraphqlParser.d.ts +3 -0
- package/sfdc/__mocks__/lightning/i18nCldrOptions.d.ts +2 -0
- package/sfdc/__mocks__/lightning/i18nService.d.ts +10 -0
- package/sfdc/__mocks__/o11y/activity.d.ts +2 -0
- package/sfdc/__mocks__/o11y/client.d.ts +5 -0
- package/sfdc/__mocks__/o11y/idleDetector.d.ts +2 -0
- package/sfdc/__mocks__/o11y/instrumentation.d.ts +15 -0
- package/sfdc/durableStore/NimbusSqliteStore/NimbusSqliteStore.d.ts +20 -0
- package/sfdc/durableStore/NimbusSqliteStore/tables/AbstractKeyValueDataTable.d.ts +14 -0
- package/sfdc/durableStore/NimbusSqliteStore/tables/LdsDataTable.d.ts +15 -0
- package/sfdc/durableStore/NimbusSqliteStore/tables/LdsDataTableBase.d.ts +8 -0
- package/sfdc/durableStore/NimbusSqliteStore/tables/LdsDraftIdMapDataTable.d.ts +5 -0
- package/sfdc/durableStore/NimbusSqliteStore/tables/LdsDraftsDataTable.d.ts +5 -0
- package/sfdc/durableStore/NimbusSqliteStore/tables/LdsInternalDataTable.d.ts +15 -0
- package/sfdc/durableStore/NimbusSqliteStore/tables/index.d.ts +5 -0
- package/sfdc/durableStore/NimbusSqliteStore/tables/utils.d.ts +2 -0
- package/sfdc/durableStore/index.d.ts +2 -0
- package/sfdc/durableStore/makeEnvironmentGraphqlAware.d.ts +2 -0
- package/sfdc/environment/enableLazyObjectInfoCaching.d.ts +13 -0
- package/sfdc/inspection/setupInspection.d.ts +2 -0
- package/sfdc/instrumentation/instrumentDraftQueue.d.ts +2 -0
- package/sfdc/instrumentation/instrumentGraphQLEval.d.ts +2 -0
- package/sfdc/instrumentation/instrumentMobileAdapter.d.ts +6 -0
- package/sfdc/instrumentation/instrumentPrimingSession.d.ts +2 -0
- package/sfdc/instrumentation/instrumentationContentDocumentVersionAdapter.d.ts +2 -0
- package/sfdc/instrumentation/instrumentationUtils.d.ts +10 -0
- package/sfdc/instrumentation/metrics.d.ts +14 -0
- package/sfdc/instrumentation/withInstrumentation.d.ts +12 -0
- package/sfdc/localization/formatDisplayValue.d.ts +6 -0
- package/sfdc/main.d.ts +6 -0
- package/sfdc/main.js +15242 -0
- package/sfdc/priming/primingSessionFactory.d.ts +13 -0
- package/sfdc/runtime.d.ts +17 -0
- package/sfdc/utils/ObjectInfoService.d.ts +43 -0
- package/sfdc/utils/adapters.d.ts +18 -0
- package/sfdc/utils/language.d.ts +29 -0
- package/sfdc/utils/utils.d.ts +13 -0
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
Terms of Use
|
|
2
|
+
|
|
3
|
+
Copyright 2022 Salesforce, Inc. All rights reserved.
|
|
4
|
+
|
|
5
|
+
These Terms of Use govern the download, installation, and/or use of this
|
|
6
|
+
software provided by Salesforce, Inc. ("Salesforce") (the "Software"), were
|
|
7
|
+
last updated on April 15, 2022, and constitute a legally binding
|
|
8
|
+
agreement between you and Salesforce. If you do not agree to these Terms of
|
|
9
|
+
Use, do not install or use the Software.
|
|
10
|
+
|
|
11
|
+
Salesforce grants you a worldwide, non-exclusive, no-charge, royalty-free
|
|
12
|
+
copyright license to reproduce, prepare derivative works of, publicly
|
|
13
|
+
display, publicly perform, sublicense, and distribute the Software and
|
|
14
|
+
derivative works subject to these Terms. These Terms shall be included in
|
|
15
|
+
all copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
Subject to the limited rights expressly granted hereunder, Salesforce
|
|
18
|
+
reserves all rights, title, and interest in and to all intellectual
|
|
19
|
+
property subsisting in the Software. No rights are granted to you hereunder
|
|
20
|
+
other than as expressly set forth herein. Users residing in countries on
|
|
21
|
+
the United States Office of Foreign Assets Control sanction list, or which
|
|
22
|
+
are otherwise subject to a US export embargo, may not use the Software.
|
|
23
|
+
|
|
24
|
+
Implementation of the Software may require development work, for which you
|
|
25
|
+
are responsible. The Software may contain bugs, errors and
|
|
26
|
+
incompatibilities and is made available on an AS IS basis without support,
|
|
27
|
+
updates, or service level commitments.
|
|
28
|
+
|
|
29
|
+
Salesforce reserves the right at any time to modify, suspend, or
|
|
30
|
+
discontinue, the Software (or any part thereof) with or without notice. You
|
|
31
|
+
agree that Salesforce shall not be liable to you or to any third party for
|
|
32
|
+
any modification, suspension, or discontinuance.
|
|
33
|
+
|
|
34
|
+
You agree to defend Salesforce against any claim, demand, suit or
|
|
35
|
+
proceeding made or brought against Salesforce by a third party arising out
|
|
36
|
+
of or accruing from (a) your use of the Software, and (b) any application
|
|
37
|
+
you develop with the Software that infringes any copyright, trademark,
|
|
38
|
+
trade secret, trade dress, patent, or other intellectual property right of
|
|
39
|
+
any person or defames any person or violates their rights of publicity or
|
|
40
|
+
privacy (each a "Claim Against Salesforce"), and will indemnify Salesforce
|
|
41
|
+
from any damages, attorney fees, and costs finally awarded against
|
|
42
|
+
Salesforce as a result of, or for any amounts paid by Salesforce under a
|
|
43
|
+
settlement approved by you in writing of, a Claim Against Salesforce,
|
|
44
|
+
provided Salesforce (x) promptly gives you written notice of the Claim
|
|
45
|
+
Against Salesforce, (y) gives you sole control of the defense and
|
|
46
|
+
settlement of the Claim Against Salesforce (except that you may not settle
|
|
47
|
+
any Claim Against Salesforce unless it unconditionally releases Salesforce
|
|
48
|
+
of all liability), and (z) gives you all reasonable assistance, at your
|
|
49
|
+
expense.
|
|
50
|
+
|
|
51
|
+
WITHOUT LIMITING THE GENERALITY OF THE FOREGOING, THE SOFTWARE IS NOT
|
|
52
|
+
SUPPORTED AND IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
53
|
+
IMPLIED. IN NO EVENT SHALL SALESFORCE HAVE ANY LIABILITY FOR ANY DAMAGES,
|
|
54
|
+
INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, SPECIAL, INCIDENTAL,
|
|
55
|
+
PUNITIVE, OR CONSEQUENTIAL DAMAGES, OR DAMAGES BASED ON LOST PROFITS, DATA,
|
|
56
|
+
OR USE, IN CONNECTION WITH THE SOFTWARE, HOWEVER CAUSED AND WHETHER IN
|
|
57
|
+
CONTRACT, TORT, OR UNDER ANY OTHER THEORY OF LIABILITY, WHETHER OR NOT YOU
|
|
58
|
+
HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
59
|
+
|
|
60
|
+
These Terms of Use shall be governed exclusively by the internal laws of
|
|
61
|
+
the State of California, without regard to its conflicts of laws
|
|
62
|
+
rules. Each party hereby consents to the exclusive jurisdiction of the
|
|
63
|
+
state and federal courts located in San Francisco County, California to
|
|
64
|
+
adjudicate any dispute arising out of or relating to these Terms of Use and
|
|
65
|
+
the download, installation, and/or use of the Software. Except as expressly
|
|
66
|
+
stated herein, these Terms of Use constitute the entire agreement between
|
|
67
|
+
the parties, and supersede all prior and contemporaneous agreements,
|
|
68
|
+
proposals, or representations, written or oral, concerning their subject
|
|
69
|
+
matter. No modification, amendment, or waiver of any provision of these
|
|
70
|
+
Terms of Use shall be effective unless it is by an update to these Terms of
|
|
71
|
+
Use that Salesforce makes available, or is in writing and signed by the
|
|
72
|
+
party against whom the modification, amendment, or waiver is to be
|
|
73
|
+
asserted.
|
|
74
|
+
|
|
75
|
+
Data Privacy: Salesforce may collect, process, and store device,
|
|
76
|
+
system, and other information related to your use of the Software. This
|
|
77
|
+
information includes, but is not limited to, IP address, user metrics, and
|
|
78
|
+
other data ("Usage Data"). Salesforce may use Usage Data for analytics,
|
|
79
|
+
product development, and marketing purposes. You acknowledge that files
|
|
80
|
+
generated in conjunction with the Software may contain sensitive or
|
|
81
|
+
confidential data, and you are solely responsible for anonymizing and
|
|
82
|
+
protecting such data.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { DraftAction, DraftQueue, ProcessActionResult, DraftQueueState, DraftQueueChangeListener, DraftActionMetadata, ActionHandler, CustomActionExecutor, PendingDraftAction } from '@salesforce/lds-drafts';
|
|
2
|
+
/**
|
|
3
|
+
* An implementation of the DraftQueue interface which serializes
|
|
4
|
+
* requests and sends them across the Nimbus bridge and deserializes the result.
|
|
5
|
+
*
|
|
6
|
+
* This instance is leveraged in the LMR webview which proxies DraftQueue requests
|
|
7
|
+
* to a concrete implementation running in jscore.
|
|
8
|
+
*/
|
|
9
|
+
export declare class NimbusDraftQueue implements DraftQueue {
|
|
10
|
+
enqueue<Response>(handlerId: string, data: unknown): Promise<PendingDraftAction<Response>>;
|
|
11
|
+
registerOnChangedListener(_listener: DraftQueueChangeListener): () => Promise<void>;
|
|
12
|
+
processNextAction(): Promise<ProcessActionResult>;
|
|
13
|
+
getQueueActions(): Promise<DraftAction<unknown, unknown>[]>;
|
|
14
|
+
getDataForAction<T>(action: DraftAction<T, unknown>): Promise<T | undefined>;
|
|
15
|
+
getQueueState(): DraftQueueState;
|
|
16
|
+
removeDraftAction(_actionId: string): Promise<void>;
|
|
17
|
+
startQueue(): Promise<void>;
|
|
18
|
+
stopQueue(): Promise<void>;
|
|
19
|
+
replaceAction(_actionId: string, _withActionId: string): Promise<DraftAction<unknown, unknown>>;
|
|
20
|
+
mergeAction<Data, Response>(_targetActionId: string, _sourceActionId: string): Promise<DraftAction<Data, Response>>;
|
|
21
|
+
setMetadata(_actionId: string, _metadata: DraftActionMetadata): Promise<DraftAction<unknown, unknown>>;
|
|
22
|
+
addHandler(_handler: ActionHandler<unknown, unknown, unknown>): Promise<void>;
|
|
23
|
+
addCustomHandler(_id: string, _executor: CustomActionExecutor): Promise<void>;
|
|
24
|
+
removeHandler(_id: string): Promise<void>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const recordIdGenerator: (id: string) => {
|
|
2
|
+
/**
|
|
3
|
+
* Returns a new record id with the provided prefix
|
|
4
|
+
*/
|
|
5
|
+
newRecordId: (prefix: string) => string;
|
|
6
|
+
/**
|
|
7
|
+
* Returns true if the recordId was generated using this generator; false otherwise
|
|
8
|
+
*/
|
|
9
|
+
isGenerated: (recordId: string) => boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Returns a number value of when the record was generated.
|
|
12
|
+
* Throws if the recordId passed is invalid or the recordId was not generated.
|
|
13
|
+
*/
|
|
14
|
+
recordGenerationTime: (recordId: string) => number;
|
|
15
|
+
};
|
|
@@ -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,5 @@
|
|
|
1
|
+
import type { Instrumentation } from 'o11y/client';
|
|
2
|
+
export { activity } from './activity';
|
|
3
|
+
export { instrumentation } from './instrumentation';
|
|
4
|
+
export { idleDetector } from './idleDetector';
|
|
5
|
+
export declare function getInstrumentation(_name: string): Instrumentation;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Activity, MetricsTags, Schema, SchematizedData } from 'o11y/client';
|
|
2
|
+
declare function log(_schema: Schema, _data?: SchematizedData): void;
|
|
3
|
+
declare function error(_err: Error, _userSchemaOrText?: string, _data?: SchematizedData): void;
|
|
4
|
+
declare function startActivity(_name: string): Activity;
|
|
5
|
+
declare function incrementCounter(_operation: string, _increment?: number, _hasError?: boolean, _tags?: MetricsTags): void;
|
|
6
|
+
declare function trackValue(_operation: string, _value: number, _hasError?: boolean, _tags?: MetricsTags): void;
|
|
7
|
+
export declare const instrumentation: {
|
|
8
|
+
log: typeof log;
|
|
9
|
+
error: typeof error;
|
|
10
|
+
startActivity: typeof startActivity;
|
|
11
|
+
incrementCounter: typeof incrementCounter;
|
|
12
|
+
trackValue: typeof trackValue;
|
|
13
|
+
};
|
|
14
|
+
export declare const METRIC_KEYS: {};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { SqliteResult, SqliteStore, SqliteType } from '@salesforce/lds-store-sql';
|
|
2
|
+
import type { SqliteStorePlugin } from '@salesforce/nimbus-plugin-lds';
|
|
3
|
+
import type { DurableStore, DurableStoreEntries, DurableStoreOperation, OnDurableStoreChangedListener } from '@luvio/environments';
|
|
4
|
+
export declare class NimbusSqliteStore implements SqliteStore, DurableStore {
|
|
5
|
+
private plugin;
|
|
6
|
+
private readonly dataTableMap;
|
|
7
|
+
private readonly internalDataTable;
|
|
8
|
+
constructor(plugin: SqliteStorePlugin);
|
|
9
|
+
isEvalSupported(): boolean;
|
|
10
|
+
query(sql: string, params: SqliteType[]): Promise<SqliteResult>;
|
|
11
|
+
getEntries<T>(entryIds: string[], segment: string): Promise<DurableStoreEntries<T> | undefined>;
|
|
12
|
+
getAllEntries<T>(segment: string): Promise<DurableStoreEntries<T> | undefined>;
|
|
13
|
+
setEntries<T>(entries: DurableStoreEntries<T>, segment: string): Promise<void>;
|
|
14
|
+
batchOperations<T>(operations: DurableStoreOperation<T>[]): Promise<void>;
|
|
15
|
+
evictEntries(entryIds: string[], segment: string): Promise<void>;
|
|
16
|
+
registerOnChangedListener(listener: OnDurableStoreChangedListener): () => Promise<void>;
|
|
17
|
+
private getTable;
|
|
18
|
+
private idsToDeleteOperation;
|
|
19
|
+
private batchOperationAsPromise;
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SqliteOperation, SqliteStorePlugin } from '@salesforce/nimbus-plugin-lds';
|
|
2
|
+
import type { DurableStoreEntries } from '@luvio/environments';
|
|
3
|
+
import type { LdsDataTableBase } from '../tables';
|
|
4
|
+
export declare abstract class AbstractKeyValueDataTable implements LdsDataTableBase {
|
|
5
|
+
readonly tableName: SqliteOperation['table'];
|
|
6
|
+
readonly plugin: SqliteStorePlugin;
|
|
7
|
+
private columnNames;
|
|
8
|
+
private conflictColumnNames;
|
|
9
|
+
constructor(plugin: SqliteStorePlugin, tableName: SqliteOperation['table']);
|
|
10
|
+
getByKeys<T>(keys: string[]): Promise<DurableStoreEntries<T>>;
|
|
11
|
+
getAll<T>(): Promise<DurableStoreEntries<T>>;
|
|
12
|
+
entriesToUpsertOperations<T>(entries: DurableStoreEntries<T>, segment: string): SqliteOperation;
|
|
13
|
+
private mapToDurableEntries;
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { SqliteOperation, SqliteStorePlugin } from '@salesforce/nimbus-plugin-lds';
|
|
2
|
+
import type { DurableStoreEntries } from '@luvio/environments';
|
|
3
|
+
import type { LdsDataTableBase } from '../tables/LdsDataTableBase';
|
|
4
|
+
export declare class LdsDataTable implements LdsDataTableBase {
|
|
5
|
+
readonly tableName = "lds_data";
|
|
6
|
+
readonly plugin: SqliteStorePlugin;
|
|
7
|
+
private columnNames;
|
|
8
|
+
private conflictColumnNames;
|
|
9
|
+
private getAllQuery;
|
|
10
|
+
constructor(plugin: SqliteStorePlugin);
|
|
11
|
+
getByKeys<T>(keys: string[]): Promise<DurableStoreEntries<T>>;
|
|
12
|
+
getAll<T>(): Promise<DurableStoreEntries<T>>;
|
|
13
|
+
entriesToUpsertOperations<T>(entries: DurableStoreEntries<T>, segment: string): SqliteOperation;
|
|
14
|
+
private mapToDurableEntries;
|
|
15
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DurableStoreEntries } from '@luvio/environments';
|
|
2
|
+
import type { SqliteOperation } from '@salesforce/nimbus-plugin-lds';
|
|
3
|
+
export interface LdsDataTableBase {
|
|
4
|
+
tableName: SqliteOperation['table'];
|
|
5
|
+
getByKeys<T>(keys: string[], segment?: string): Promise<DurableStoreEntries<T>>;
|
|
6
|
+
getAll<T>(segment?: string): Promise<DurableStoreEntries<T>>;
|
|
7
|
+
entriesToUpsertOperations<T>(entries: DurableStoreEntries<T>, segment: string): SqliteOperation;
|
|
8
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SqliteStorePlugin } from 'packages/lds-mobile-nimbus-plugins/dist';
|
|
2
|
+
import { AbstractKeyValueDataTable } from './AbstractKeyValueDataTable';
|
|
3
|
+
export declare class LdsDraftIdMapDataTable extends AbstractKeyValueDataTable {
|
|
4
|
+
constructor(plugin: SqliteStorePlugin);
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SqliteStorePlugin } from 'packages/lds-mobile-nimbus-plugins/dist';
|
|
2
|
+
import { AbstractKeyValueDataTable } from './AbstractKeyValueDataTable';
|
|
3
|
+
export declare class LdsDraftsDataTable extends AbstractKeyValueDataTable {
|
|
4
|
+
constructor(plugin: SqliteStorePlugin);
|
|
5
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { SqliteOperation, SqliteStorePlugin } from '@salesforce/nimbus-plugin-lds';
|
|
2
|
+
import type { DurableStoreEntries } from '@luvio/environments';
|
|
3
|
+
import type { LdsDataTableBase } from '../tables';
|
|
4
|
+
export declare class LdsInternalDataTable implements LdsDataTableBase {
|
|
5
|
+
readonly tableName = "lds_internal";
|
|
6
|
+
readonly plugin: SqliteStorePlugin;
|
|
7
|
+
private columnNames;
|
|
8
|
+
private conflictColumnNames;
|
|
9
|
+
private getAllQuery;
|
|
10
|
+
constructor(plugin: SqliteStorePlugin);
|
|
11
|
+
getByKeys<T>(keys: string[], namespace: string): Promise<DurableStoreEntries<T>>;
|
|
12
|
+
getAll<T>(namespace: string): Promise<DurableStoreEntries<T>>;
|
|
13
|
+
entriesToUpsertOperations<T>(entries: DurableStoreEntries<T>, segment: string): SqliteOperation;
|
|
14
|
+
private mapToDurableEntries;
|
|
15
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { LdsDataTable } from './LdsDataTable';
|
|
2
|
+
export { LdsDraftsDataTable } from './LdsDraftsDataTable';
|
|
3
|
+
export { LdsDraftIdMapDataTable } from './LdsDraftIdMapDataTable';
|
|
4
|
+
export { LdsInternalDataTable } from './LdsInternalDataTable';
|
|
5
|
+
export { LdsDataTableBase } from './LdsDataTableBase';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare function selectColumnsFromTableWhereKeyIn(columnNames: string[], table: string, keyColumnName: string, whereIn: string[]): string;
|
|
2
|
+
export declare function selectColumnsFromTableWhereKeyInNamespaced(columnNames: string[], table: string, keyColumnName: string, whereIn: string[], namespaceColumnName: string): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Environment } from '@luvio/engine';
|
|
2
|
+
import type { ObjectInfoRepresentation } from '@salesforce/lds-adapters-uiapi';
|
|
3
|
+
export type EnsureCachedObjectInfoFunction = (apiName: string, objectInfo?: ObjectInfoRepresentation) => Promise<void>;
|
|
4
|
+
/**
|
|
5
|
+
* This environment observes incoming data for records and object info representations
|
|
6
|
+
* If the incoming data is a record or object info it extracts the apiName
|
|
7
|
+
* and calls a provided function which will ensure the associated object info is cached
|
|
8
|
+
*
|
|
9
|
+
* @param env base environment
|
|
10
|
+
* @param ensureObjectInfoCached function to cache the object info if not already cached
|
|
11
|
+
* @returns configured environment
|
|
12
|
+
*/
|
|
13
|
+
export declare function enableObjectInfoCaching(env: Environment, ensureObjectInfoCached: EnsureCachedObjectInfoFunction): Environment;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ReportObserver } from '@salesforce/lds-instrumentation';
|
|
2
|
+
import type { Luvio, InMemoryStore } from '@luvio/engine';
|
|
3
|
+
type Unsubscribe = () => void;
|
|
4
|
+
export declare function setupMobileInstrumentation(luvio: Luvio, store: InMemoryStore): void;
|
|
5
|
+
export declare function registerReportObserver(reportObserver: ReportObserver): Unsubscribe;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AdapterRequestContext, LuvioAdapterEventObserver } from '@luvio/engine';
|
|
2
|
+
export declare function attachObserversToAdapterRequestContext(observers: LuvioAdapterEventObserver[], adapterRequestContext?: AdapterRequestContext): AdapterRequestContext;
|
|
3
|
+
/**
|
|
4
|
+
* Use this method to sanitize the unknown error object when
|
|
5
|
+
* we are unsure of the type of the error thrown
|
|
6
|
+
*
|
|
7
|
+
* @param err Unknown object to sanitize
|
|
8
|
+
* @returns an instance of error
|
|
9
|
+
*/
|
|
10
|
+
export declare function normalizeError(err: unknown): Error;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const O11Y_NAMESPACE_LDS_MOBILE = "lds-mobile";
|
|
2
|
+
export declare function reportGraphqlQueryParseError(err: unknown): void;
|
|
3
|
+
export declare function reportGraphqlSqlEvalPreconditionError(err: unknown): void;
|
|
4
|
+
export declare function reportGraphqlCreateSnapshotError(err: unknown): void;
|
|
5
|
+
export declare function reportGraphQlEvalDbReadDuration(duration: number): void;
|
|
6
|
+
export declare function reportGraphqlAdapterError(errorCode: string): void;
|
|
7
|
+
export declare function reportDraftActionEvent(state: 'added' | 'completed' | 'deleted' | 'updated' | 'failed'): void;
|
|
8
|
+
export declare function reportDraftQueueState(state: 'started' | 'error' | 'waiting' | 'stopped'): void;
|
|
9
|
+
export declare function reportDraftAwareContentDocumentVersionSythensizeError(err: unknown): void;
|
|
10
|
+
export declare function reportDraftAwareContentVersionSynthesizeCalls(mimeType: string): void;
|
|
11
|
+
/** Priming */
|
|
12
|
+
export declare function reportPrimingSessionCreated(): void;
|
|
13
|
+
export declare function reportPrimingError(errorType: string, recordCount: number): void;
|
|
14
|
+
export declare function reportPrimingSuccess(recordCount: number): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type Operation = () => Promise<any>;
|
|
2
|
+
export type WithInstrumentation = (operation: () => Promise<any>, config: InstrumentationConfig) => Promise<any>;
|
|
3
|
+
export interface InstrumentationConfig {
|
|
4
|
+
tags: Record<string, string>;
|
|
5
|
+
metricName: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Higher order function that instruments any async operation
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
export declare const withInstrumentation: (operation: Operation, config?: InstrumentationConfig) => Promise<any>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const FORMATTABLE_DISPLAY_VALUE_TYPES: string[];
|
|
2
|
+
/**
|
|
3
|
+
* Formats the display value for a draft field
|
|
4
|
+
* @param value the value to format
|
|
5
|
+
*/
|
|
6
|
+
export declare function formatDisplayValue(value: boolean | number | string | null, datatype: string): null | string;
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { getRuntime } from './runtime';
|
|
2
|
+
export { getRuntime };
|
|
3
|
+
export type { ObjectInfoService } from './utils/ObjectInfoService';
|
|
4
|
+
export type { ObservabilityContext } from '@salesforce/nimbus-plugin-lds';
|
|
5
|
+
export { registerReportObserver } from './instrumentation/instrumentMobileAdapter';
|
|
6
|
+
export { reportGraphqlQueryParseError } from './instrumentation/metrics';
|