@salesforce/lds-runtime-aura 1.464.0 → 1.465.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/ldsEngineCreator.js +3209 -3198
- package/dist/types/fetch-service-descriptors/jwt-authorized-fetch-service.d.ts +1 -1
- package/dist/types/network-fetch.d.ts +1 -1
- package/package.json +42 -41
- package/dist/types/aura-instrumentation/main.d.ts +0 -182
- package/dist/types/aura-instrumentation/state-managers.d.ts +0 -4
- package/dist/types/aura-instrumentation/utils/observability.d.ts +0 -36
- package/dist/types/aura-instrumentation/utils/utils.d.ts +0 -13
- package/dist/types/instrumentation-utils.d.ts +0 -14
- package/dist/types/language.d.ts +0 -23
- package/dist/types/network-sfap.d.ts +0 -18
- package/dist/types/parameterized-sfap-jwt-aura-resolver.d.ts +0 -34
- package/dist/types/request-interceptors/action-enqueue.d.ts +0 -4
- package/dist/types/request-interceptors/csrf-service.d.ts +0 -19
- package/dist/types/request-interceptors/csrf-token.d.ts +0 -19
- package/dist/types/request-interceptors/entity-encoding.d.ts +0 -17
- package/dist/types/request-interceptors/first-party-header.d.ts +0 -17
- package/dist/types/request-interceptors/idempotency-key.d.ts +0 -24
- package/dist/types/request-interceptors/jwt-parameterization.d.ts +0 -58
- package/dist/types/request-interceptors/luvio-page-scoped-cache.d.ts +0 -11
- package/dist/types/request-interceptors/page-scoped-cache.d.ts +0 -2
- package/dist/types/request-interceptors/transport-send.d.ts +0 -5
- package/dist/types/response-interceptors/action-finish.d.ts +0 -4
- package/dist/types/response-interceptors/error-body-normalization.d.ts +0 -20
- package/dist/types/response-interceptors/transport-receive.d.ts +0 -4
- package/dist/types/retry-interceptors/luvio-fetch-retry.d.ts +0 -11
- package/dist/types/retry-policies/csrf-token-retry-policy.d.ts +0 -72
- package/dist/types/retry-policies/fetch-throttling-retry-policy.d.ts +0 -20
- package/dist/types/retry-policies/luvio-csrf-token-retry-policy.d.ts +0 -24
- package/dist/types/retry-policies/luvio-fetch-throttling-retry-policy.d.ts +0 -19
- package/dist/types/retry-policies/luvio-idempotency-retry-policy.d.ts +0 -29
- package/dist/types/retry-policies/unconfigured-retry-policy.d.ts +0 -20
- package/dist/types/service-variants/durable-cache-inclusion-policy.d.ts +0 -82
- package/dist/types/sfap-jwt-mint-params.d.ts +0 -80
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type JwtResolver } from '@conduit-client/jwt-manager';
|
|
2
2
|
import { type FetchServiceDescriptor } from '@conduit-client/service-fetch-network/v1';
|
|
3
|
-
import { type ExtraInfo } from '
|
|
3
|
+
import { type ExtraInfo } from '@salesforce/lds-runtime-shared';
|
|
4
4
|
import { type LoggerService } from '@conduit-client/utils';
|
|
5
5
|
export declare function buildDispatchingSfapJwtResolver(legacyResolver: JwtResolver<ExtraInfo>, parameterizedResolver: JwtResolver<ExtraInfo>): JwtResolver<ExtraInfo>;
|
|
6
6
|
export declare function prefetchSfapJwt(): Promise<undefined>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ResourceRequest } from '@luvio/engine';
|
|
2
2
|
import { UIAPI_PUBLIC_PATHS, UIAPI_PRIVATE_PATHS } from '@salesforce/lds-network-fetch';
|
|
3
3
|
import type { RequestLogger } from '@salesforce/lds-network-fetch';
|
|
4
|
-
import type { RequestTracker } from '
|
|
4
|
+
import type { RequestTracker } from '@salesforce/lds-runtime-shared';
|
|
5
5
|
export { UIAPI_PUBLIC_PATHS, UIAPI_PRIVATE_PATHS };
|
|
6
6
|
/**
|
|
7
7
|
* Single content documents version URL enabled/disabled by killswitch.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-aura",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.465.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS engine for Aura runtime.",
|
|
6
6
|
"main": "dist/ldsEngineCreator.js",
|
|
@@ -34,53 +34,54 @@
|
|
|
34
34
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-aura"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@conduit-client/service-provisioner": "3.32.
|
|
38
|
-
"@conduit-client/tools-core": "3.32.
|
|
39
|
-
"@salesforce/lds-adapters-apex": "^1.
|
|
40
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
41
|
-
"@salesforce/lds-ads-bridge": "^1.
|
|
42
|
-
"@salesforce/lds-aura-storage": "^1.
|
|
43
|
-
"@salesforce/lds-bindings": "^1.
|
|
44
|
-
"@salesforce/lds-instrumentation": "^1.
|
|
45
|
-
"@salesforce/lds-network-adapter": "^1.
|
|
46
|
-
"@salesforce/lds-network-aura": "^1.
|
|
47
|
-
"@salesforce/lds-network-fetch": "^1.
|
|
37
|
+
"@conduit-client/service-provisioner": "3.32.1",
|
|
38
|
+
"@conduit-client/tools-core": "3.32.1",
|
|
39
|
+
"@salesforce/lds-adapters-apex": "^1.465.0",
|
|
40
|
+
"@salesforce/lds-adapters-uiapi": "^1.465.0",
|
|
41
|
+
"@salesforce/lds-ads-bridge": "^1.465.0",
|
|
42
|
+
"@salesforce/lds-aura-storage": "^1.465.0",
|
|
43
|
+
"@salesforce/lds-bindings": "^1.465.0",
|
|
44
|
+
"@salesforce/lds-instrumentation": "^1.465.0",
|
|
45
|
+
"@salesforce/lds-network-adapter": "^1.465.0",
|
|
46
|
+
"@salesforce/lds-network-aura": "^1.465.0",
|
|
47
|
+
"@salesforce/lds-network-fetch": "^1.465.0",
|
|
48
|
+
"@salesforce/lds-runtime-shared": "^1.465.0",
|
|
48
49
|
"jwt-encode": "1.0.1"
|
|
49
50
|
},
|
|
50
51
|
"dependencies": {
|
|
51
|
-
"@conduit-client/command-aura-graphql-normalized-cache-control": "3.32.
|
|
52
|
-
"@conduit-client/command-aura-network": "3.32.
|
|
53
|
-
"@conduit-client/command-aura-normalized-cache-control": "3.32.
|
|
54
|
-
"@conduit-client/command-fetch-network": "3.32.
|
|
55
|
-
"@conduit-client/command-http-graphql-normalized-cache-control": "3.32.
|
|
56
|
-
"@conduit-client/command-http-normalized-cache-control": "3.32.
|
|
57
|
-
"@conduit-client/command-ndjson": "3.32.
|
|
58
|
-
"@conduit-client/command-network": "3.32.
|
|
59
|
-
"@conduit-client/command-sse": "3.32.
|
|
60
|
-
"@conduit-client/command-streaming": "3.32.
|
|
61
|
-
"@conduit-client/jwt-manager": "3.32.
|
|
62
|
-
"@conduit-client/service-aura-network": "3.32.
|
|
63
|
-
"@conduit-client/service-bindings-imperative": "3.32.
|
|
64
|
-
"@conduit-client/service-bindings-lwc": "3.32.
|
|
65
|
-
"@conduit-client/service-cache": "3.32.
|
|
66
|
-
"@conduit-client/service-cache-control": "3.32.
|
|
67
|
-
"@conduit-client/service-cache-inclusion-policy": "3.32.
|
|
68
|
-
"@conduit-client/service-config": "3.32.
|
|
69
|
-
"@conduit-client/service-feature-flags": "3.32.
|
|
70
|
-
"@conduit-client/service-fetch-network": "3.32.
|
|
71
|
-
"@conduit-client/service-instrument-command": "3.32.
|
|
72
|
-
"@conduit-client/service-pubsub": "3.32.
|
|
73
|
-
"@conduit-client/service-renewable-resource-manager": "3.32.
|
|
74
|
-
"@conduit-client/service-store": "3.32.
|
|
75
|
-
"@conduit-client/utils": "3.32.
|
|
52
|
+
"@conduit-client/command-aura-graphql-normalized-cache-control": "3.32.1",
|
|
53
|
+
"@conduit-client/command-aura-network": "3.32.1",
|
|
54
|
+
"@conduit-client/command-aura-normalized-cache-control": "3.32.1",
|
|
55
|
+
"@conduit-client/command-fetch-network": "3.32.1",
|
|
56
|
+
"@conduit-client/command-http-graphql-normalized-cache-control": "3.32.1",
|
|
57
|
+
"@conduit-client/command-http-normalized-cache-control": "3.32.1",
|
|
58
|
+
"@conduit-client/command-ndjson": "3.32.1",
|
|
59
|
+
"@conduit-client/command-network": "3.32.1",
|
|
60
|
+
"@conduit-client/command-sse": "3.32.1",
|
|
61
|
+
"@conduit-client/command-streaming": "3.32.1",
|
|
62
|
+
"@conduit-client/jwt-manager": "3.32.1",
|
|
63
|
+
"@conduit-client/service-aura-network": "3.32.1",
|
|
64
|
+
"@conduit-client/service-bindings-imperative": "3.32.1",
|
|
65
|
+
"@conduit-client/service-bindings-lwc": "3.32.1",
|
|
66
|
+
"@conduit-client/service-cache": "3.32.1",
|
|
67
|
+
"@conduit-client/service-cache-control": "3.32.1",
|
|
68
|
+
"@conduit-client/service-cache-inclusion-policy": "3.32.1",
|
|
69
|
+
"@conduit-client/service-config": "3.32.1",
|
|
70
|
+
"@conduit-client/service-feature-flags": "3.32.1",
|
|
71
|
+
"@conduit-client/service-fetch-network": "3.32.1",
|
|
72
|
+
"@conduit-client/service-instrument-command": "3.32.1",
|
|
73
|
+
"@conduit-client/service-pubsub": "3.32.1",
|
|
74
|
+
"@conduit-client/service-renewable-resource-manager": "3.32.1",
|
|
75
|
+
"@conduit-client/service-store": "3.32.1",
|
|
76
|
+
"@conduit-client/utils": "3.32.1",
|
|
76
77
|
"@luvio/network-adapter-composable": "0.161.2",
|
|
77
78
|
"@luvio/network-adapter-fetch": "0.161.2",
|
|
78
79
|
"@lwc/state": "^0.29.0",
|
|
79
|
-
"@salesforce/lds-adapters-onestore-graphql": "^1.
|
|
80
|
+
"@salesforce/lds-adapters-onestore-graphql": "^1.465.0",
|
|
80
81
|
"@salesforce/lds-adapters-uiapi-lex": "^1.415.0",
|
|
81
|
-
"@salesforce/lds-durable-storage": "^1.
|
|
82
|
-
"@salesforce/lds-luvio-service": "^1.
|
|
83
|
-
"@salesforce/lds-luvio-uiapi-records-service": "^1.
|
|
82
|
+
"@salesforce/lds-durable-storage": "^1.465.0",
|
|
83
|
+
"@salesforce/lds-luvio-service": "^1.465.0",
|
|
84
|
+
"@salesforce/lds-luvio-uiapi-records-service": "^1.465.0"
|
|
84
85
|
},
|
|
85
86
|
"luvioBundlesize": [
|
|
86
87
|
{
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import type { FetchResponse, Luvio, InMemoryStore, Adapter, UnfulfilledSnapshot } from '@luvio/engine';
|
|
2
|
-
import type { AdapterMetadata } from '@salesforce/lds-bindings';
|
|
3
|
-
import { ADAPTER_UNFULFILLED_ERROR } from '@salesforce/lds-bindings';
|
|
4
|
-
import type { CacheStatsLogger, Timer } from 'instrumentation/service';
|
|
5
|
-
import { onIdleDetected, executeAsyncActivity } from '@salesforce/lds-instrumentation';
|
|
6
|
-
export { onIdleDetected, executeAsyncActivity };
|
|
7
|
-
export interface AdapterUnfulfilledError {
|
|
8
|
-
[ADAPTER_UNFULFILLED_ERROR]: boolean;
|
|
9
|
-
adapterName: string;
|
|
10
|
-
missingPaths: UnfulfilledSnapshot<any, any>['missingPaths'];
|
|
11
|
-
missingLinks: UnfulfilledSnapshot<any, any>['missingLinks'];
|
|
12
|
-
}
|
|
13
|
-
export declare const APEX_ADAPTER_NAME = "getApex";
|
|
14
|
-
export declare const NORMALIZED_APEX_ADAPTER_NAME: string;
|
|
15
|
-
export declare const REFRESH_APEX_KEY = "refreshApex";
|
|
16
|
-
export declare const REFRESH_UIAPI_KEY = "refreshUiApi";
|
|
17
|
-
export declare const SUPPORTED_KEY = "refreshSupported";
|
|
18
|
-
export declare const UNSUPPORTED_KEY = "refreshUnsupported";
|
|
19
|
-
type refreshApiNames = {
|
|
20
|
-
refreshApex: string;
|
|
21
|
-
refreshUiApi: string;
|
|
22
|
-
};
|
|
23
|
-
export interface LightningInteractionSchema {
|
|
24
|
-
target: string;
|
|
25
|
-
scope: string;
|
|
26
|
-
context: unknown;
|
|
27
|
-
eventSource: string;
|
|
28
|
-
eventType: string;
|
|
29
|
-
attributes: unknown;
|
|
30
|
-
}
|
|
31
|
-
export declare class Instrumentation {
|
|
32
|
-
private adapterUnfulfilledErrorCounters;
|
|
33
|
-
private recordApiNameChangeCounters;
|
|
34
|
-
private refreshAdapterEvents;
|
|
35
|
-
private refreshApiCallEventStats;
|
|
36
|
-
private lastRefreshApiCall;
|
|
37
|
-
private weakEtagZeroEvents;
|
|
38
|
-
private adapterCacheMisses;
|
|
39
|
-
constructor();
|
|
40
|
-
/**
|
|
41
|
-
* Instruments an existing adapter to log argus metrics and cache stats.
|
|
42
|
-
* @param adapter The adapter function.
|
|
43
|
-
* @param metadata The adapter metadata.
|
|
44
|
-
* @param wireConfigKeyFn Optional function to transform wire configs to a unique key.
|
|
45
|
-
* @returns The wrapped adapter.
|
|
46
|
-
*/
|
|
47
|
-
instrumentAdapter<C, D>(adapter: Adapter<C, D>, metadata: AdapterMetadata): Adapter<C, D>;
|
|
48
|
-
/**
|
|
49
|
-
* Logs when adapter requests come in. If we have subsequent cache misses on a given config, beyond its TTL then log the duration to metrics.
|
|
50
|
-
* Backed by an LRU Cache implementation to prevent too many record entries from being stored in-memory.
|
|
51
|
-
* @param name The wire adapter name.
|
|
52
|
-
* @param config The config passed into wire adapter.
|
|
53
|
-
* @param ttlMissStats CacheStatsLogger to log misses out of TTL.
|
|
54
|
-
* @param currentCacheMissTimestamp Timestamp for when the request was made.
|
|
55
|
-
* @param ttl TTL for the wire adapter.
|
|
56
|
-
*/
|
|
57
|
-
private logAdapterCacheMissOutOfTtlDuration;
|
|
58
|
-
/**
|
|
59
|
-
* Injected to LDS for Luvio specific instrumentation.
|
|
60
|
-
*
|
|
61
|
-
* @param context The transaction context.
|
|
62
|
-
*/
|
|
63
|
-
instrumentLuvio(context: unknown): void;
|
|
64
|
-
/**
|
|
65
|
-
* Returns whether or not this is a RefreshAdapterEvent.
|
|
66
|
-
* @param context The transaction context.
|
|
67
|
-
* @returns Whether or not this is a RefreshAdapterEvent.
|
|
68
|
-
*/
|
|
69
|
-
private isRefreshAdapterEvent;
|
|
70
|
-
/**
|
|
71
|
-
* Returns whether or not this is an AdapterUnfulfilledError.
|
|
72
|
-
* @param context The transaction context.
|
|
73
|
-
* @returns Whether or not this is an AdapterUnfulfilledError.
|
|
74
|
-
*/
|
|
75
|
-
private isAdapterUnfulfilledError;
|
|
76
|
-
/**
|
|
77
|
-
* Specific instrumentation for getRecordNotifyChange.
|
|
78
|
-
* temporary implementation to match existing aura call for now
|
|
79
|
-
*
|
|
80
|
-
* @param uniqueWeakEtags whether weakEtags match or not
|
|
81
|
-
* @param error if dispatchResourceRequest fails for any reason
|
|
82
|
-
*/
|
|
83
|
-
notifyChangeNetwork(uniqueWeakEtags: boolean | null, error?: boolean): void;
|
|
84
|
-
/**
|
|
85
|
-
* Parses and aggregates weakETagZero events to be sent in summarized log line.
|
|
86
|
-
* @param context The transaction context.
|
|
87
|
-
*/
|
|
88
|
-
aggregateWeakETagEvents(incomingWeakEtagZero: boolean, existingWeakEtagZero: boolean, apiName: string): void;
|
|
89
|
-
/**
|
|
90
|
-
* Aggregates refresh adapter events to be sent in summarized log line.
|
|
91
|
-
* - how many times refreshApex is called
|
|
92
|
-
* - how many times refresh from lightning/uiRecordApi is called
|
|
93
|
-
* - number of supported calls: refreshApex called on apex adapter
|
|
94
|
-
* - number of unsupported calls: refreshApex on non-apex adapter
|
|
95
|
-
* + any use of refresh from uiRecordApi module
|
|
96
|
-
* - count of refresh calls per adapter
|
|
97
|
-
* @param context The refresh adapter event.
|
|
98
|
-
*/
|
|
99
|
-
private aggregateRefreshAdapterEvents;
|
|
100
|
-
/**
|
|
101
|
-
* Increments call stat for incoming refresh api call, and sets the name
|
|
102
|
-
* to be used in {@link aggregateRefreshCalls}
|
|
103
|
-
* @param from The name of the refresh function called.
|
|
104
|
-
*/
|
|
105
|
-
handleRefreshApiCall(apiName: keyof refreshApiNames): void;
|
|
106
|
-
/**
|
|
107
|
-
* W-7302241
|
|
108
|
-
* Logs refresh call summary stats as a LightningInteraction.
|
|
109
|
-
*/
|
|
110
|
-
logRefreshStats(): void;
|
|
111
|
-
/**
|
|
112
|
-
* Resets the stat trackers for refresh call events.
|
|
113
|
-
*/
|
|
114
|
-
private resetRefreshStats;
|
|
115
|
-
/**
|
|
116
|
-
* W-7801618
|
|
117
|
-
* Counter for occurrences where the incoming record to be merged has a different apiName.
|
|
118
|
-
* Dynamically generated metric, stored in an {@link RecordApiNameChangeCounters} object.
|
|
119
|
-
*
|
|
120
|
-
* @param context The transaction context.
|
|
121
|
-
*
|
|
122
|
-
* Note: Short-lived metric candidate, remove at the end of 230
|
|
123
|
-
*/
|
|
124
|
-
incrementRecordApiNameChangeCount(_incomingApiName: string, existingApiName: string): void;
|
|
125
|
-
/**
|
|
126
|
-
* W-8620679
|
|
127
|
-
* Increment the counter for an UnfulfilledSnapshotError coming from luvio
|
|
128
|
-
*
|
|
129
|
-
* @param context The transaction context.
|
|
130
|
-
*/
|
|
131
|
-
private incrementAdapterRequestErrorCount;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Calls instrumentation/service interaction API. Function name and parameters mapped to `o11y`
|
|
135
|
-
* implementation for Log Lines.
|
|
136
|
-
* @param schema Expected shape of the payload (Currently unused)
|
|
137
|
-
* @param payload Content to be logged, shape matches schema
|
|
138
|
-
*/
|
|
139
|
-
export declare function log(_schema: any, payload: LightningInteractionSchema): void;
|
|
140
|
-
/**
|
|
141
|
-
* Calls instrumentation/service telemetry timer
|
|
142
|
-
* @param name Name of the metric
|
|
143
|
-
* @param duration number to update backing percentile histogram, negative numbers ignored
|
|
144
|
-
*/
|
|
145
|
-
export declare function updateTimerMetric(name: string, duration: number): void;
|
|
146
|
-
export declare function timerMetricAddDuration(timer: Timer, duration: number): void;
|
|
147
|
-
export declare function incrementRequestResponseCount(cb: () => FetchResponse<unknown>): void;
|
|
148
|
-
/**
|
|
149
|
-
* Add a mark to the metrics service.
|
|
150
|
-
*
|
|
151
|
-
* @param name The mark name.
|
|
152
|
-
* @param content The mark content.
|
|
153
|
-
*/
|
|
154
|
-
export declare function mark(name: string, content?: any): void;
|
|
155
|
-
export declare function logObjectInfoChanged(): void;
|
|
156
|
-
export declare function logMessage(message: string): void;
|
|
157
|
-
/**
|
|
158
|
-
* Create a new instrumentation cache stats and return it.
|
|
159
|
-
*
|
|
160
|
-
* @param name The cache logger name.
|
|
161
|
-
*/
|
|
162
|
-
export declare function registerLdsCacheStats(name: string): CacheStatsLogger;
|
|
163
|
-
/**
|
|
164
|
-
* Add or overwrite hooks that require aura implementations
|
|
165
|
-
*/
|
|
166
|
-
export declare function setAuraInstrumentationHooks(): void;
|
|
167
|
-
export declare function setStateManagerInstrumentationHooks(): void;
|
|
168
|
-
/**
|
|
169
|
-
* Initialize the instrumentation and instrument the LDS instance and the InMemoryStore.
|
|
170
|
-
*
|
|
171
|
-
* @param luvio The Luvio instance to instrument.
|
|
172
|
-
* @param store The InMemoryStore to instrument.
|
|
173
|
-
*/
|
|
174
|
-
export declare function setupInstrumentation(luvio: Luvio, store: InMemoryStore): void;
|
|
175
|
-
/**
|
|
176
|
-
* Note: locator.scope is set to 'force_record' in order for the instrumentation gate to work, which will
|
|
177
|
-
* disable all crud operations if it is on.
|
|
178
|
-
* @param eventSource - Source of the logging event.
|
|
179
|
-
* @param attributes - Free form object of attributes to log.
|
|
180
|
-
*/
|
|
181
|
-
export declare function logCRUDLightningInteraction(eventSource: string, attributes: object): void;
|
|
182
|
-
export declare const instrumentation: Instrumentation;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { StateDefMetadata, ContextConsumedMetadata } from '@lwc/state';
|
|
2
|
-
export declare function stateCreated(metadata: StateDefMetadata): void;
|
|
3
|
-
export declare function contextConsumed({ stateDefMetadata, componentName, }: ContextConsumedMetadata): void;
|
|
4
|
-
export declare function stateDefined(metadata?: StateDefMetadata): void;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Observability / Critical Availability Program (230+)
|
|
3
|
-
*
|
|
4
|
-
* This file is intended to be used as a consolidated place for all definitions, functions,
|
|
5
|
-
* and helpers related to "M1"[1].
|
|
6
|
-
*
|
|
7
|
-
* Below are the R.E.A.D.S. metrics for the Lightning Data Service, defined here[2].
|
|
8
|
-
*
|
|
9
|
-
* [1] Search "[M1] Lightning Data Service Design Spike" in Quip
|
|
10
|
-
* [2] Search "Lightning Data Service R.E.A.D.S. Metrics" in Quip
|
|
11
|
-
*/
|
|
12
|
-
import type { MetricsKey } from 'instrumentation/service';
|
|
13
|
-
export declare const OBSERVABILITY_NAMESPACE = "LIGHTNING.lds.service";
|
|
14
|
-
export declare const ADAPTER_INVOCATION_COUNT_METRIC_NAME = "request";
|
|
15
|
-
export declare const ADAPTER_ERROR_COUNT_METRIC_NAME = "error";
|
|
16
|
-
export declare const NETWORK_ADAPTER_RESPONSE_METRIC_NAME = "network-response";
|
|
17
|
-
/**
|
|
18
|
-
* W-8379680
|
|
19
|
-
* Counter for number of getApex requests.
|
|
20
|
-
*/
|
|
21
|
-
export declare const GET_APEX_REQUEST_COUNT: MetricsKey;
|
|
22
|
-
/**
|
|
23
|
-
* W-8379680
|
|
24
|
-
* Counter for number of getApex errors.
|
|
25
|
-
*/
|
|
26
|
-
export declare const GET_APEX_ERROR_COUNT: MetricsKey;
|
|
27
|
-
/**
|
|
28
|
-
* W-8828410
|
|
29
|
-
* Counter for the number of UnfulfilledSnapshotErrors the luvio engine has.
|
|
30
|
-
*/
|
|
31
|
-
export declare const TOTAL_ADAPTER_ERROR_COUNT: MetricsKey;
|
|
32
|
-
/**
|
|
33
|
-
* W-8828410
|
|
34
|
-
* Counter for the number of invocations made into LDS by a wire adapter.
|
|
35
|
-
*/
|
|
36
|
-
export declare const TOTAL_ADAPTER_REQUEST_SUCCESS_COUNT: MetricsKey;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A deterministic JSON stringify implementation. Heavily adapted from https://github.com/epoberezkin/fast-json-stable-stringify.
|
|
3
|
-
* This is needed because insertion order for JSON.stringify(object) affects output:
|
|
4
|
-
* JSON.stringify({a: 1, b: 2})
|
|
5
|
-
* "{"a":1,"b":2}"
|
|
6
|
-
* JSON.stringify({b: 2, a: 1})
|
|
7
|
-
* "{"b":2,"a":1}"
|
|
8
|
-
* Modified from the apex implementation to sort arrays non-destructively.
|
|
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
|
-
export declare function isPromise<D>(value: D | Promise<D> | null): value is Promise<D>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare function createInstrumentationIdContext(): () => {
|
|
2
|
-
instrumentationId: string;
|
|
3
|
-
};
|
|
4
|
-
export declare function createTransportStartMark(requestId: string): void;
|
|
5
|
-
export declare function createActionStartMark(context: any): void;
|
|
6
|
-
export declare function createActionEndMark(responseStatus: number, responseStatusText: string, serverTiming: string | null, url: string, instrumentationId: any): void;
|
|
7
|
-
export declare function createTransportEndMark(responseStatus: number, responseStatusText: string, url: string, context?: any, errorMessage?: string): void;
|
|
8
|
-
export type RequestTracker = {
|
|
9
|
-
hasTracker: () => boolean;
|
|
10
|
-
registerHandler: (request: any, name: string, loadedCheck: () => boolean) => void;
|
|
11
|
-
markFinished: (request: any) => void;
|
|
12
|
-
};
|
|
13
|
-
export declare let internalRequestTracker: RequestTracker;
|
|
14
|
-
export declare function generateRequestId(): string;
|
package/dist/types/language.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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
|
-
}, hasOwnProperty: (v: PropertyKey) => boolean, entries: {
|
|
8
|
-
<T>(o: {
|
|
9
|
-
[s: string]: T;
|
|
10
|
-
} | ArrayLike<T>): [string, T][];
|
|
11
|
-
(o: {}): [string, any][];
|
|
12
|
-
};
|
|
13
|
-
declare const isArray: (arg: any) => arg is any[], from: {
|
|
14
|
-
<T>(arrayLike: ArrayLike<T>): T[];
|
|
15
|
-
<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
16
|
-
<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
17
|
-
<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
18
|
-
};
|
|
19
|
-
declare const stringify: {
|
|
20
|
-
(value: any, replacer?: ((this: any, key: string, value: any) => any) | undefined, space?: string | number | undefined): string;
|
|
21
|
-
(value: any, replacer?: (string | number)[] | null | undefined, space?: string | number | undefined): string;
|
|
22
|
-
};
|
|
23
|
-
export { create as ObjectCreate, keys as ObjectKeys, hasOwnProperty as ObjectHasOwnProperty, entries as ObjectEntries, isArray as ArrayIsArray, from as ArrayFrom, stringify as JSONStringify, };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { FetchResponse, ResourceRequest, ResourceRequestContext } from '@luvio/engine';
|
|
2
|
-
import type { JwtResolver } from '@conduit-client/jwt-manager';
|
|
3
|
-
export declare const SFAPController = "SalesforceApiPlatformController";
|
|
4
|
-
export declare const SFAPJwtMethod = "getSFAPLightningJwtService";
|
|
5
|
-
export declare const SFAPJwtPostMethod = "postSFAPLightningJwtService";
|
|
6
|
-
export type ExtraInfo = {
|
|
7
|
-
baseUri: string;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Resolves Jwt token for SFAP by calling Aura action
|
|
11
|
-
* {@link JwtResolver} for platform SFAP
|
|
12
|
-
*/
|
|
13
|
-
export declare const platformSfapJwtResolver: JwtResolver<ExtraInfo>;
|
|
14
|
-
declare const composedNetworkAdapter: {
|
|
15
|
-
shouldHandleRequest(resourceRequest: ResourceRequest): boolean;
|
|
16
|
-
adapter: (resourceRequest: ResourceRequest, resourceRequestContext: ResourceRequestContext) => Promise<FetchResponse<any>>;
|
|
17
|
-
};
|
|
18
|
-
export default composedNetworkAdapter;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { JwtMintParams, JwtResolver } from '@conduit-client/jwt-manager';
|
|
2
|
-
import { type ParameterizedSfapExtraInfo } from './sfap-jwt-mint-params';
|
|
3
|
-
/**
|
|
4
|
-
* Parameterized SFAP JWT resolver that mints over **Aura transport** instead of a
|
|
5
|
-
* direct HTTP `fetch`.
|
|
6
|
-
*
|
|
7
|
-
* It dispatches the SFAP Lightning JWT Service's parameterized POST via its
|
|
8
|
-
* auto-generated Aura controller method
|
|
9
|
-
* `SalesforceApiPlatformController.postSFAPLightningJwtService` (generated by
|
|
10
|
-
* `@ConnectSignature(..., generateAuraMethod = true)` on the Connect resource).
|
|
11
|
-
* The mint inputs ride as the single `requestBody` named param, in the same
|
|
12
|
-
* `{ scopes, dynamicParameters: { items } }` shape the HTTP resolver POSTs — built
|
|
13
|
-
* by the shared {@link buildRequestBody}, so the two transports stay in lockstep.
|
|
14
|
-
*
|
|
15
|
-
* Why Aura (not the HTTP resolver): the mint endpoint is a same-origin core
|
|
16
|
-
* resource, and routing it over Aura keeps session/CSRF handling inside the Aura
|
|
17
|
-
* stack rather than issuing a credentialed cross-cutting `fetch` from the client.
|
|
18
|
-
* This mirrors the legacy parameterless `platformSfapJwtResolver` in
|
|
19
|
-
* `network-sfap.ts`, which already mints over Aura via the `getSFAPLightningJwtService`
|
|
20
|
-
* generated method — this is the parameterized sibling of that call.
|
|
21
|
-
*
|
|
22
|
-
* A `JwtResolver` is invoked directly by `JwtManager` (not through Luvio's
|
|
23
|
-
* `appRouter`/`ResourceRequest` pipeline), so the correct mechanism is a direct
|
|
24
|
-
* named-controller `dispatchAuraAction`, not the `auraNetworkAdapter`/connect-route
|
|
25
|
-
* table. The SFAP JWT endpoint is not registered as a connect-over-Aura route, and
|
|
26
|
-
* a resolver has no `ResourceRequest` for the router to look up.
|
|
27
|
-
*/
|
|
28
|
-
export declare class ParameterizedSfapJwtAuraResolver implements JwtResolver<ParameterizedSfapExtraInfo> {
|
|
29
|
-
getJwt(params?: JwtMintParams): Promise<{
|
|
30
|
-
jwt: string;
|
|
31
|
-
extraInfo: ParameterizedSfapExtraInfo;
|
|
32
|
-
}>;
|
|
33
|
-
}
|
|
34
|
-
export declare function buildParameterizedSfapJwtAuraResolver(): ParameterizedSfapJwtAuraResolver;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { RequestInterceptor } from '@conduit-client/service-fetch-network/v1';
|
|
2
|
-
import type { ResourceRequest } from '@luvio/engine';
|
|
3
|
-
export declare function buildActionMarksSendInterceptor(): RequestInterceptor;
|
|
4
|
-
export declare function buildLuvioActionMarksSendInterceptor(): (resourceRequest: ResourceRequest, context?: any) => PromiseLike<ResourceRequest>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { RenewableResourceManager } from '@conduit-client/service-renewable-resource-manager/v1';
|
|
2
|
-
/**
|
|
3
|
-
* Service name the CSRF token manager is registered under by
|
|
4
|
-
* `initializeOneStore` (see `buildRenewableResourceManagerDescriptor`).
|
|
5
|
-
*/
|
|
6
|
-
export declare const CSRF_TOKEN_MANAGER_SERVICE = "csrfTokenManager";
|
|
7
|
-
/**
|
|
8
|
-
* Resolves the CSRF token manager from the service provisioner.
|
|
9
|
-
*
|
|
10
|
-
* The manager is registered during `initializeOneStore`, which runs before any
|
|
11
|
-
* request flows; the interceptors and retry policies that call this resolve
|
|
12
|
-
* lazily (per request / per retry), so the service is always available by then.
|
|
13
|
-
*
|
|
14
|
-
* The resolved promise is memoized so resolution happens once rather than per
|
|
15
|
-
* request. A rejection is NOT memoized — `getServices` rejects when the service
|
|
16
|
-
* is unavailable, and caching that would permanently wedge CSRF handling — so a
|
|
17
|
-
* later call retries the resolution.
|
|
18
|
-
*/
|
|
19
|
-
export declare function getCsrfTokenManager(): Promise<RenewableResourceManager<string>>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { RequestInterceptor } from '@conduit-client/service-fetch-network/v1';
|
|
2
|
-
import type { ResourceRequest } from '@luvio/engine';
|
|
3
|
-
export declare const CSRF_TOKEN_HEADER = "X-CSRF-Token";
|
|
4
|
-
/**
|
|
5
|
-
* Builds a request interceptor that adds CSRF token headers to mutating requests.
|
|
6
|
-
* The CSRF token is fetched once and cached for subsequent requests.
|
|
7
|
-
* Only POST, PUT, PATCH, and DELETE requests will have the CSRF token added.
|
|
8
|
-
*
|
|
9
|
-
* @returns A RequestInterceptor function for FetchParameters
|
|
10
|
-
*/
|
|
11
|
-
export declare function buildCsrfTokenInterceptor(): RequestInterceptor;
|
|
12
|
-
/**
|
|
13
|
-
* Builds a Luvio request interceptor that adds CSRF token headers to mutating requests.
|
|
14
|
-
* The CSRF token is fetched once and cached for subsequent requests.
|
|
15
|
-
* Only POST, PUT, PATCH, and DELETE requests will have the CSRF token added.
|
|
16
|
-
*
|
|
17
|
-
* @returns A request interceptor function for Luvio ResourceRequest objects
|
|
18
|
-
*/
|
|
19
|
-
export declare function buildLuvioCsrfTokenInterceptor(): (resourceRequest: ResourceRequest) => Promise<ResourceRequest>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { RequestInterceptor } from '@conduit-client/service-fetch-network/v1';
|
|
2
|
-
import type { ResourceRequest } from '@luvio/engine';
|
|
3
|
-
export declare const ENTITY_ENCODING_HEADER = "X-Chatter-Entity-Encoding";
|
|
4
|
-
export declare const ENTITY_ENCODING_DISABLED_VALUE = "false";
|
|
5
|
-
/**
|
|
6
|
-
* Builds a request interceptor that sets `X-Chatter-Entity-Encoding: false` on
|
|
7
|
-
* outgoing requests. Connect REST applies HTML4 entity escaping to every string
|
|
8
|
-
* field of a response unless this header is sent with the literal value "false"
|
|
9
|
-
* (case-insensitive); any other value is equivalent to omitting the header.
|
|
10
|
-
*/
|
|
11
|
-
export declare function buildEntityEncodingInterceptor(): RequestInterceptor;
|
|
12
|
-
/**
|
|
13
|
-
* Builds a Luvio request interceptor that sets `X-Chatter-Entity-Encoding: false`
|
|
14
|
-
* on the outgoing ResourceRequest when the header is absent. See
|
|
15
|
-
* {@link buildEntityEncodingInterceptor} for context.
|
|
16
|
-
*/
|
|
17
|
-
export declare function buildLuvioEntityEncodingInterceptor(): (resourceRequest: ResourceRequest) => PromiseLike<ResourceRequest>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type RequestInterceptor } from '@conduit-client/service-fetch-network/v1';
|
|
2
|
-
import type { ResourceRequest } from '@luvio/engine';
|
|
3
|
-
/**
|
|
4
|
-
* Builds a request interceptor that adds the LDS first party header to every
|
|
5
|
-
* outbound request.
|
|
6
|
-
*
|
|
7
|
-
* @returns A RequestInterceptor function for FetchParameters
|
|
8
|
-
*/
|
|
9
|
-
export declare function buildFirstPartyHeaderInterceptor(): RequestInterceptor;
|
|
10
|
-
/**
|
|
11
|
-
* Builds a Luvio request interceptor that adds the LDS first party header to
|
|
12
|
-
* every outbound `ResourceRequest`. See {@link buildFirstPartyHeaderInterceptor} for
|
|
13
|
-
* the header semantics.
|
|
14
|
-
*
|
|
15
|
-
* @returns A request interceptor for Luvio ResourceRequest objects
|
|
16
|
-
*/
|
|
17
|
-
export declare function buildLuvioFirstPartyHeaderInterceptor(): (resourceRequest: ResourceRequest) => Promise<ResourceRequest>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { ResourceRequest } from '@luvio/engine';
|
|
2
|
-
export declare const IDEMPOTENCY_KEY_HEADER = "Idempotency-Key";
|
|
3
|
-
export declare const ERROR_CODE_IDEMPOTENCY_FEATURE_NOT_ENABLED = "IDEMPOTENCY_FEATURE_NOT_ENABLED";
|
|
4
|
-
export declare const ERROR_CODE_IDEMPOTENCY_NOT_SUPPORTED = "IDEMPOTENCY_NOT_SUPPORTED";
|
|
5
|
-
export declare const ERROR_CODE_IDEMPOTENCY_BACKEND_OPERATION_ERROR = "IDEMPOTENCY_BACKEND_OPERATION_ERROR";
|
|
6
|
-
export declare const ERROR_CODE_IDEMPOTENCY_KEY_USED_DIFFERENT_USER = "IDEMPOTENCY_KEY_USED_DIFFERENT_USER";
|
|
7
|
-
export declare const ERROR_CODE_IDEMPOTENCY_CONCURRENT_REQUEST = "IDEMPOTENCY_CONCURRENT_REQUEST";
|
|
8
|
-
export declare const ERROR_CODE_IDEMPOTENCY_KEY_ALREADY_USED = "IDEMPOTENCY_KEY_ALREADY_USED";
|
|
9
|
-
/**
|
|
10
|
-
* Generates an RFC4122 v4 UUID for use as an idempotency key, preferring
|
|
11
|
-
* `crypto.randomUUID()` and falling back to a `Math.random()` builder if it is
|
|
12
|
-
* unavailable (matches the SFAP request-id approach in `network-sfap`).
|
|
13
|
-
*/
|
|
14
|
-
export declare function mintIdempotencyKey(): string;
|
|
15
|
-
/**
|
|
16
|
-
* Builds a Luvio request interceptor that mints and attaches an `Idempotency-Key`
|
|
17
|
-
* on mutations to onboarded endpoints, once per logical write, so the retry
|
|
18
|
-
* service re-sends the same key on every replay and the server can dedupe.
|
|
19
|
-
*
|
|
20
|
-
* Minting is gated here; retry *eligibility* is decided separately by
|
|
21
|
-
* `LuvioIdempotencyRetryPolicy` from the header's presence, so a stale
|
|
22
|
-
* registry flag can never cause an unsafe replay.
|
|
23
|
-
*/
|
|
24
|
-
export declare function buildLuvioIdempotencyKeyInterceptor(): (resourceRequest: ResourceRequest) => Promise<ResourceRequest>;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import type { FetchParameters, RequestInterceptor } from '@conduit-client/service-fetch-network/v1';
|
|
2
|
-
import { type JwtRequestModifier } from '@conduit-client/service-fetch-network/v1';
|
|
3
|
-
import type { JwtManager } from '@conduit-client/jwt-manager';
|
|
4
|
-
import type { ExtraInfo } from '../network-sfap';
|
|
5
|
-
/**
|
|
6
|
-
* Legacy context-seed key under which a custom command forwards its JWT mint
|
|
7
|
-
* parameters. The framework's `buildServiceDescriptor` merges the request init's
|
|
8
|
-
* `__contextSeed` onto the per-request interceptor context, so this interceptor
|
|
9
|
-
* can read the params off `context[JWT_MINT_PARAMS_SEED_KEY]`.
|
|
10
|
-
*
|
|
11
|
-
* **Transitional.** The first-class channel is now the typed
|
|
12
|
-
* `init.onestore.mintParams` field (onestore 3.29.0), which this interceptor
|
|
13
|
-
* prefers. This seed key remains only as a fallback while the core
|
|
14
|
-
* `onestore-custom-adapters` producers still write `__contextSeed`; it — together
|
|
15
|
-
* with the `context` fallback and the interceptor's `context` parameter — is
|
|
16
|
-
* removed once those producers emit `onestore.mintParams`. That removal is the
|
|
17
|
-
* follow-up PR #8314 (tracked under W-24472492).
|
|
18
|
-
*
|
|
19
|
-
* It is intentionally an opaque key — OneStore does not define it and never
|
|
20
|
-
* inspects the param shape; the typed shape lives in the resolver.
|
|
21
|
-
*/
|
|
22
|
-
export declare const JWT_MINT_PARAMS_SEED_KEY = "jwtMintParams";
|
|
23
|
-
/**
|
|
24
|
-
* Returns `true` if the fetch arguments already carry an `Authorization` header,
|
|
25
|
-
* across the three shapes the framework's `setHeader` handles: a `Request`
|
|
26
|
-
* resource's own headers, an `options.headers` `Headers` instance, or a plain
|
|
27
|
-
* record. The descriptor's guarded legacy interceptor uses this to skip when the
|
|
28
|
-
* parameterized interceptor has already authorized the request — avoiding a second
|
|
29
|
-
* mint and the throw `setHeaderAuthorization` raises on an existing header.
|
|
30
|
-
*/
|
|
31
|
-
export declare function hasAuthorizationHeader([resource, options]: FetchParameters): boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Builds the request interceptor that bridges the per-request context seed to the
|
|
34
|
-
* dispatching SFAP JwtManager for the **parameterized** mint path.
|
|
35
|
-
*
|
|
36
|
-
* For a parameterized SFAP command, the mint params arrive on the typed
|
|
37
|
-
* `init.onestore.mintParams` field (preferred) or, transitionally, under the
|
|
38
|
-
* legacy `context[jwtMintParams]` seed. This interceptor reads them (onestore
|
|
39
|
-
* first), calls `jwtManager.getJwt(params)` (which the dispatching resolver routes
|
|
40
|
-
* to the parameterized resolver), attaches the `Authorization` header, and
|
|
41
|
-
* rewrites the request URL via the minted `baseUri`. The presence of that
|
|
42
|
-
* `Authorization` header is the signal the descriptor's guarded legacy interceptor
|
|
43
|
-
* uses to skip — so the legacy path does not mint a second time.
|
|
44
|
-
*
|
|
45
|
-
* For a legacy parameterless command neither channel carries mint params, so this
|
|
46
|
-
* interceptor **early-returns on its first statement** and the request flows
|
|
47
|
-
* unchanged to the legacy `buildJwtRequestHeaderInterceptor` — guaranteeing zero
|
|
48
|
-
* behavior change for non-opted-in adapters.
|
|
49
|
-
*
|
|
50
|
-
* Lives in `lds-lightning-platform` (not OneStore) beside the existing SFAP/CSRF
|
|
51
|
-
* interceptors, per the JWT-parameterization ADR §5: OneStore provides only the
|
|
52
|
-
* generic interceptor mechanism and the opaque context-seed channel; the service-
|
|
53
|
-
* specific bridge is a runtime-layer concern.
|
|
54
|
-
*
|
|
55
|
-
* @param jwtManager - the dispatching SFAP JwtManager
|
|
56
|
-
* @param jwtRequestModifier - applies the minted `extraInfo.baseUri` to the request URL
|
|
57
|
-
*/
|
|
58
|
-
export declare function buildJwtParameterizationInterceptor(jwtManager: JwtManager<unknown, ExtraInfo>, jwtRequestModifier?: JwtRequestModifier<ExtraInfo>): RequestInterceptor;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { ResourceRequest } from '@luvio/engine';
|
|
2
|
-
/**
|
|
3
|
-
* Builds a Luvio Request interceptor that adds page-scoped cache headers
|
|
4
|
-
* to ResourceRequest objects used by the Luvio network adapter.
|
|
5
|
-
*
|
|
6
|
-
* This interceptor works with the Luvio ResourceRequest format, which has
|
|
7
|
-
* a simpler structure than FetchParameters - headers are always a plain object.
|
|
8
|
-
*
|
|
9
|
-
* @returns A RequestInterceptor function for Luvio network requests
|
|
10
|
-
*/
|
|
11
|
-
export declare function buildLuvioPageScopedCacheRequestInterceptor(): (resourceRequest: ResourceRequest) => PromiseLike<ResourceRequest>;
|