@salesforce/platform-sdk 12.8.0 → 12.10.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/analytics/analytics.d.ts +19 -15
- package/dist/analytics/analytics.d.ts.map +1 -1
- package/dist/analytics/error-listener.d.ts +3 -3
- package/dist/analytics/index.d.ts.map +1 -1
- package/dist/analytics/index.js +1 -1
- package/dist/analytics/method-configs.d.ts +8 -4
- package/dist/analytics/method-configs.d.ts.map +1 -1
- package/dist/analytics/pft.d.ts +22 -16
- package/dist/analytics/pft.d.ts.map +1 -1
- package/dist/analytics/proxy.d.ts +10 -8
- package/dist/analytics/proxy.d.ts.map +1 -1
- package/dist/analytics/types.d.ts +57 -43
- package/dist/analytics/types.d.ts.map +1 -1
- package/dist/{analytics-Dpz22kda.js → analytics-wESbWdca.js} +1 -1
- package/dist/app/index.d.ts +18 -13
- package/dist/app/index.d.ts.map +1 -1
- package/dist/app/index.js +5 -3
- package/dist/app/webapp.d.ts +5 -2
- package/dist/app/webapp.d.ts.map +1 -1
- package/dist/{capabilities-CKe8z6kZ.js → capabilities-B0mU0_G0.js} +1 -1
- package/dist/chat/index.js +1 -1
- package/dist/core/app.d.ts +31 -22
- package/dist/core/app.d.ts.map +1 -1
- package/dist/core/capabilities.d.ts +26 -17
- package/dist/core/capabilities.d.ts.map +1 -1
- package/dist/core/chat.d.ts +155 -125
- package/dist/core/chat.d.ts.map +1 -1
- package/dist/core/data.d.ts +146 -107
- package/dist/core/data.d.ts.map +1 -1
- package/dist/core/extension-attach.d.ts +65 -51
- package/dist/core/extension-attach.d.ts.map +1 -1
- package/dist/core/extension-types.d.ts +214 -153
- package/dist/core/extension-types.d.ts.map +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -2
- package/dist/core/lightning.d.ts +11 -19
- package/dist/core/lightning.d.ts.map +1 -1
- package/dist/core/mcpapps-session.d.ts +63 -52
- package/dist/core/mcpapps-session.d.ts.map +1 -1
- package/dist/core/options.d.ts +6 -4
- package/dist/core/options.d.ts.map +1 -1
- package/dist/core/platforms.d.ts +29 -29
- package/dist/core/sdk-promise.d.ts +7 -4
- package/dist/core/sdk-promise.d.ts.map +1 -1
- package/dist/core/surface.d.ts +89 -67
- package/dist/core/surface.d.ts.map +1 -1
- package/dist/core/view.d.ts +164 -113
- package/dist/core/view.d.ts.map +1 -1
- package/dist/data/extensions/index.d.ts +5 -2
- package/dist/data/extensions/index.d.ts.map +1 -1
- package/dist/data/extensions/labels/index.d.ts +72 -49
- package/dist/data/extensions/labels/index.d.ts.map +1 -1
- package/dist/data/extensions/labels/query.d.ts +38 -29
- package/dist/data/extensions/labels/query.d.ts.map +1 -1
- package/dist/data/gql.d.ts +8 -4
- package/dist/data/gql.d.ts.map +1 -1
- package/dist/data/index.d.ts +67 -48
- package/dist/data/index.d.ts.map +1 -1
- package/dist/data/index.js +265 -242
- package/dist/data/mosaic/fetch.d.ts +24 -15
- package/dist/data/mosaic/fetch.d.ts.map +1 -1
- package/dist/data/mosaic/index.d.ts +13 -9
- package/dist/data/mosaic/index.d.ts.map +1 -1
- package/dist/data/openai/index.d.ts +11 -5
- package/dist/data/openai/index.d.ts.map +1 -1
- package/dist/data/shared/graphql/cache/command.d.ts +60 -46
- package/dist/data/shared/graphql/cache/command.d.ts.map +1 -1
- package/dist/data/shared/graphql/cache/invoker.d.ts.map +1 -1
- package/dist/data/shared/graphql/cache/services.d.ts +21 -11
- package/dist/data/shared/graphql/cache/services.d.ts.map +1 -1
- package/dist/data/shared/graphql/cached-graphql.d.ts +9 -4
- package/dist/data/shared/graphql/cached-graphql.d.ts.map +1 -1
- package/dist/data/shared/graphql/graphql-parse.d.ts +6 -3
- package/dist/data/shared/graphql/graphql-parse.d.ts.map +1 -1
- package/dist/data/shared/graphql/headers.d.ts +34 -27
- package/dist/data/shared/graphql/headers.d.ts.map +1 -1
- package/dist/data/shared/graphql/parse-response.d.ts +31 -23
- package/dist/data/shared/graphql/parse-response.d.ts.map +1 -1
- package/dist/data/shared/graphql/uncached-graphql.d.ts +10 -6
- package/dist/data/shared/graphql/uncached-graphql.d.ts.map +1 -1
- package/dist/data/shared/url-utils.d.ts +1 -1
- package/dist/data/shared/url-utils.d.ts.map +1 -1
- package/dist/data/webapp/accept-language.interceptor.d.ts +26 -9
- package/dist/data/webapp/accept-language.interceptor.d.ts.map +1 -1
- package/dist/data/webapp/client-headers.interceptor.d.ts +4 -3
- package/dist/data/webapp/client-headers.interceptor.d.ts.map +1 -1
- package/dist/data/webapp/csrf/header.interceptor.d.ts +4 -4
- package/dist/data/webapp/csrf/header.interceptor.d.ts.map +1 -1
- package/dist/data/webapp/csrf/retry.policy.d.ts +12 -11
- package/dist/data/webapp/csrf/retry.policy.d.ts.map +1 -1
- package/dist/data/webapp/csrf/token-manager.d.ts +18 -12
- package/dist/data/webapp/csrf/token-manager.d.ts.map +1 -1
- package/dist/data/webapp/fetch.d.ts +12 -8
- package/dist/data/webapp/fetch.d.ts.map +1 -1
- package/dist/data/webapp/index.d.ts +12 -7
- package/dist/data/webapp/index.d.ts.map +1 -1
- package/dist/i18n/locale-format.d.ts +23 -21
- package/dist/i18n/locale-format.d.ts.map +1 -1
- package/dist/i18n/salesforce-backend.d.ts +19 -11
- package/dist/i18n/salesforce-backend.d.ts.map +1 -1
- package/dist/i18n/salesforce-detector.d.ts +22 -14
- package/dist/i18n/salesforce-detector.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/lightning/embedding.d.ts.map +1 -1
- package/dist/lightning/index.d.ts +4 -4
- package/dist/lightning/index.d.ts.map +1 -1
- package/dist/lightning/index.js +2 -2
- package/dist/{surface-Dd2tqrPi.js → surface-DWDgqdpN.js} +18 -13
- package/dist/telemetry/tool-adapter.d.ts.map +1 -1
- package/dist/telemetry/uploader/TelemetryUploader.d.ts.map +1 -1
- package/dist/ui-embedding/index.d.ts.map +1 -1
- package/dist/ui-embedding/session.d.ts +7 -2
- package/dist/ui-embedding/session.d.ts.map +1 -1
- package/dist/ui-embedding/session.js +1 -1
- package/dist/view/index.js +1 -1
- package/package.json +2 -2
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { RawGraphQLExecutor } from './graphql-parse';
|
|
2
2
|
import { DataSDKGraphQL } from '../../../core/data';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
* a Promise that resolves with `{data, errors, subscribe, refresh}`
|
|
6
|
-
* once the first network response arrives. `subscribe` streams subsequent
|
|
7
|
-
* snapshots triggered by `refresh()` — there is no cache to push background
|
|
8
|
-
* updates. `mutate` is request/response.
|
|
4
|
+
* Builds the `graphql` namespace for a surface with no cache.
|
|
9
5
|
*
|
|
10
|
-
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* `query` returns a promise that resolves with `{data, errors, subscribe,
|
|
8
|
+
* refresh}` once the first network response arrives. `subscribe` streams
|
|
9
|
+
* later snapshots that `refresh()` triggers — there is no cache to push
|
|
10
|
+
* background updates on its own. `mutate` follows a simple request-response
|
|
11
|
+
* pattern.
|
|
12
|
+
*
|
|
13
|
+
* This function lets caching and non-caching surfaces present the same
|
|
14
|
+
* call-site API.
|
|
11
15
|
*/
|
|
12
16
|
export declare function buildUncachedGraphQL(executeRaw: RawGraphQLExecutor): DataSDKGraphQL;
|
|
13
17
|
//# sourceMappingURL=uncached-graphql.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uncached-graphql.d.ts","sourceRoot":"","sources":["../../../../src/data/shared/graphql/uncached-graphql.ts"],"names":[],"mappings":"AAMA,OAAO,EAON,KAAK,kBAAkB,EACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACX,cAAc,EAMd,MAAM,oBAAoB,CAAC;AAE5B
|
|
1
|
+
{"version":3,"file":"uncached-graphql.d.ts","sourceRoot":"","sources":["../../../../src/data/shared/graphql/uncached-graphql.ts"],"names":[],"mappings":"AAMA,OAAO,EAON,KAAK,kBAAkB,EACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACX,cAAc,EAMd,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,kBAAkB,GAAG,cAAc,CA+EnF"}
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
export declare const API_VERSION: string;
|
|
7
|
-
/** Builds the Salesforce data API path for the given version
|
|
7
|
+
/** Builds the Salesforce data API path for the given version. Defaults to {@link API_VERSION} when the caller passes no version. */
|
|
8
8
|
export declare function buildPathData(version?: string): string;
|
|
9
9
|
//# sourceMappingURL=url-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url-utils.d.ts","sourceRoot":"","sources":["../../../src/data/shared/url-utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,WAAW,QAA0E,CAAC;AAEnG,
|
|
1
|
+
{"version":3,"file":"url-utils.d.ts","sourceRoot":"","sources":["../../../src/data/shared/url-utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,WAAW,QAA0E,CAAC;AAEnG,oIAAoI;AACpI,wBAAgB,aAAa,CAAC,OAAO,GAAE,MAAoB,GAAG,MAAM,CAEnE"}
|
|
@@ -1,19 +1,36 @@
|
|
|
1
1
|
import { RequestInterceptor } from '@conduit-client/service-fetch-network/v1';
|
|
2
2
|
export declare const ACCEPT_LANGUAGE_HEADER = "Accept-Language";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Precedence rule (single source): explicit header wins, else env language, else
|
|
5
|
+
* none. Callers pass whether an explicit header is present; get the language to
|
|
6
|
+
* add or `undefined`. Shared by the wire and cache-key paths so they can't disagree.
|
|
7
|
+
*/
|
|
8
|
+
export declare function envAcceptLanguageToAdd(hasExplicit: boolean): string | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Resolve the effective headers for both the cache key and the wire request:
|
|
11
|
+
* fill in env `Accept-Language` unless already set (see
|
|
12
|
+
* {@link envAcceptLanguageToAdd}). Returns the original `headers` untouched when
|
|
13
|
+
* nothing is added, keeping the cache key byte-identical.
|
|
14
|
+
*/
|
|
15
|
+
export declare function withEnvAcceptLanguage(headers: HeadersInit | undefined): HeadersInit | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Adds an `Accept-Language` header to every outgoing SDK request, set to the
|
|
18
|
+
* site's active language.
|
|
6
19
|
*
|
|
7
|
-
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* The interceptor reads the language from the SFDC runtime environment
|
|
8
22
|
* ({@link globalThis.SFDC_ENV}`.language`), the same channel that carries the
|
|
9
|
-
* API path
|
|
23
|
+
* API path. It never reads the language from the URL.
|
|
10
24
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
25
|
+
* Behavior:
|
|
26
|
+
* - When no environment language is present, the interceptor does nothing. The
|
|
27
|
+
* request falls back to the platform or org default.
|
|
28
|
+
* - When the caller already set `Accept-Language` (on `init` or on a `Request`
|
|
29
|
+
* input), the interceptor preserves it and never overwrites it.
|
|
14
30
|
*
|
|
15
|
-
*
|
|
16
|
-
* service,
|
|
31
|
+
* Both REST (`fetch`) and GraphQL requests flow through the same fetch
|
|
32
|
+
* service, so this interceptor covers both paths once it is wired into the
|
|
33
|
+
* request chain.
|
|
17
34
|
*/
|
|
18
35
|
export declare const acceptLanguageInterceptor: RequestInterceptor;
|
|
19
36
|
//# sourceMappingURL=accept-language.interceptor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accept-language.interceptor.d.ts","sourceRoot":"","sources":["../../../src/data/webapp/accept-language.interceptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGN,KAAK,kBAAkB,EACvB,MAAM,0CAA0C,CAAC;AAGlD,eAAO,MAAM,sBAAsB,oBAAoB,CAAC;AAExD
|
|
1
|
+
{"version":3,"file":"accept-language.interceptor.d.ts","sourceRoot":"","sources":["../../../src/data/webapp/accept-language.interceptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGN,KAAK,kBAAkB,EACvB,MAAM,0CAA0C,CAAC;AAGlD,eAAO,MAAM,sBAAsB,oBAAoB,CAAC;AAExD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAE/E;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAQ/F;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,yBAAyB,EAAE,kBAqBvC,CAAC"}
|
|
@@ -2,11 +2,12 @@ import { RequestInterceptor } from '@conduit-client/service-fetch-network/v1';
|
|
|
2
2
|
export declare const CLIENT_NAME_HEADER = "X-SFDC-Client-Name";
|
|
3
3
|
export declare const CLIENT_VERSION_HEADER = "X-SFDC-Client-Version";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Adds SDK identity headers to every outgoing request.
|
|
6
6
|
*
|
|
7
|
+
* @remarks
|
|
7
8
|
* Added headers:
|
|
8
|
-
*
|
|
9
|
-
*
|
|
9
|
+
* - `X-SFDC-Client-Name` — the SDK package name.
|
|
10
|
+
* - `X-SFDC-Client-Version` — the SDK version.
|
|
10
11
|
*/
|
|
11
12
|
export declare const clientHeadersInterceptor: RequestInterceptor;
|
|
12
13
|
//# sourceMappingURL=client-headers.interceptor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-headers.interceptor.d.ts","sourceRoot":"","sources":["../../../src/data/webapp/client-headers.interceptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGN,KAAK,kBAAkB,EACvB,MAAM,0CAA0C,CAAC;AAGlD,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAK7D
|
|
1
|
+
{"version":3,"file":"client-headers.interceptor.d.ts","sourceRoot":"","sources":["../../../src/data/webapp/client-headers.interceptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGN,KAAK,kBAAkB,EACvB,MAAM,0CAA0C,CAAC;AAGlD,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAK7D;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,EAAE,kBAItC,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { RequestInterceptor } from '@conduit-client/service-fetch-network/v1';
|
|
2
2
|
import { CsrfTokenManager } from './token-manager';
|
|
3
3
|
export interface HeaderInterceptorConfig {
|
|
4
|
-
/** URLs that require CSRF
|
|
4
|
+
/** The URLs that require a CSRF token on mutating methods: POST, PUT, PATCH, and DELETE. */
|
|
5
5
|
protectedUrls?: string[];
|
|
6
6
|
/**
|
|
7
|
-
* URLs that require CSRF
|
|
8
|
-
* Use for endpoints that are sensitive regardless of HTTP method
|
|
7
|
+
* The URLs that require a CSRF token on every method, including GET.
|
|
8
|
+
* Use this for endpoints that are sensitive regardless of the HTTP method, for example Apex REST.
|
|
9
9
|
*/
|
|
10
10
|
alwaysProtectedUrls?: string[];
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* Builds
|
|
13
|
+
* Builds an interceptor that adds a CSRF token header to protected requests.
|
|
14
14
|
*
|
|
15
15
|
* @param csrfTokenManager
|
|
16
16
|
* @param config
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.interceptor.d.ts","sourceRoot":"","sources":["../../../../src/data/webapp/csrf/header.interceptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGN,KAAK,kBAAkB,EACvB,MAAM,0CAA0C,CAAC;AAElD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAIxD,MAAM,WAAW,uBAAuB;IACvC,
|
|
1
|
+
{"version":3,"file":"header.interceptor.d.ts","sourceRoot":"","sources":["../../../../src/data/webapp/csrf/header.interceptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGN,KAAK,kBAAkB,EACvB,MAAM,0CAA0C,CAAC;AAElD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAIxD,MAAM,WAAW,uBAAuB;IACvC,4FAA4F;IAC5F,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC/B,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,GAAE,uBAA4B,GAClC,kBAAkB,CAuBpB"}
|
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
import { RetryPolicy, RetryContext } from '@conduit-client/service-retry/v1';
|
|
2
2
|
import { CsrfTokenManager } from './token-manager';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* When a request fails with a CSRF token error this policy will:
|
|
7
|
-
* 1. Detect the error condition in shouldRetry
|
|
8
|
-
* 2. Refresh the CSRF token in prepareRetry hook
|
|
9
|
-
* 3. Retry the request once (maxRetries = 1)
|
|
4
|
+
* Retries a request once when it fails because of an expired CSRF token.
|
|
10
5
|
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* When a request fails with a CSRF token error, this policy:
|
|
8
|
+
* 1. Detects the error in `shouldRetry`.
|
|
9
|
+
* 2. Refreshes the CSRF token in the `prepareRetry` hook.
|
|
10
|
+
* 3. Retries the request once (`maxRetries = 1`).
|
|
11
11
|
*/
|
|
12
12
|
export declare class CsrfTokenRetryPolicy extends RetryPolicy<Response> {
|
|
13
13
|
private csrfTokenManager;
|
|
14
14
|
constructor(csrfTokenManager: CsrfTokenManager);
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Returns true when a CSRF token issue caused the request to fail.
|
|
17
17
|
*/
|
|
18
18
|
shouldRetry(result: Response, context: RetryContext<Response>): Promise<boolean>;
|
|
19
19
|
/**
|
|
20
|
-
* CSRF token refresh
|
|
20
|
+
* Returns zero, so the CSRF token refresh happens immediately with no added delay.
|
|
21
21
|
*/
|
|
22
22
|
calculateDelay(_result: Response, _context: RetryContext<Response>): Promise<number>;
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Refreshes the CSRF token before the retry service retries the request.
|
|
25
25
|
*
|
|
26
|
-
* @param _result - The failed response that triggered the retry
|
|
27
|
-
*
|
|
26
|
+
* @param _result - The failed response that triggered the retry. Unused; `shouldRetry`
|
|
27
|
+
* already validated it.
|
|
28
|
+
* @param _context - The current retry context. Unused, but required by the interface.
|
|
28
29
|
*/
|
|
29
30
|
prepareRetry(_result: Response, _context: RetryContext<Response>): Promise<void>;
|
|
30
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry.policy.d.ts","sourceRoot":"","sources":["../../../../src/data/webapp/csrf/retry.policy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAIxD;;;;;;;;GAQG;AACH,qBAAa,oBAAqB,SAAQ,WAAW,CAAC,QAAQ,CAAC;IAClD,OAAO,CAAC,gBAAgB;gBAAhB,gBAAgB,EAAE,gBAAgB;IAKtD;;OAEG;IACG,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAUtF;;OAEG;IACG,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;IAI1F
|
|
1
|
+
{"version":3,"file":"retry.policy.d.ts","sourceRoot":"","sources":["../../../../src/data/webapp/csrf/retry.policy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAIxD;;;;;;;;GAQG;AACH,qBAAa,oBAAqB,SAAQ,WAAW,CAAC,QAAQ,CAAC;IAClD,OAAO,CAAC,gBAAgB;gBAAhB,gBAAgB,EAAE,gBAAgB;IAKtD;;OAEG;IACG,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAUtF;;OAEG;IACG,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;IAI1F;;;;;;OAMG;IACY,YAAY,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAI/F"}
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* Fetches and caches a CSRF token for secure requests.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* This class uses a singleton pattern, so token management stays consistent across the app.
|
|
9
11
|
*/
|
|
10
12
|
declare class CsrfTokenManager {
|
|
11
13
|
private endpoint;
|
|
@@ -14,27 +16,31 @@ declare class CsrfTokenManager {
|
|
|
14
16
|
private refreshPromise;
|
|
15
17
|
constructor(endpoint: string, cacheName?: string | undefined);
|
|
16
18
|
/**
|
|
17
|
-
* Returns the current token
|
|
18
|
-
*
|
|
19
|
+
* Returns the current CSRF token.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* The first call loads the token lazily, either from the cache or with a fetch request.
|
|
19
23
|
*/
|
|
20
24
|
getToken(): Promise<string>;
|
|
21
25
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
26
|
+
* Clears the cached CSRF token and fetches a fresh one.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* The returned promise resolves to the new token. When a refresh is already in progress,
|
|
30
|
+
* every caller shares the same in-flight promise.
|
|
25
31
|
*/
|
|
26
32
|
refreshToken(): Promise<string | undefined>;
|
|
27
33
|
/**
|
|
28
|
-
*
|
|
34
|
+
* Returns a CSRF token from the cache, or fetches a new one when the cache has none.
|
|
29
35
|
*
|
|
30
|
-
* @returns
|
|
36
|
+
* @returns The CSRF token.
|
|
31
37
|
*/
|
|
32
38
|
private obtainToken;
|
|
33
39
|
/**
|
|
34
|
-
*
|
|
40
|
+
* Runs a callback against the Cache API, and returns `undefined` when the API is unavailable.
|
|
35
41
|
*
|
|
36
|
-
* @param callback -
|
|
37
|
-
* @returns The result of the callback, or undefined
|
|
42
|
+
* @param callback - The function that receives the cache instance and returns a promise.
|
|
43
|
+
* @returns The result of the callback, or `undefined` when the Cache API is not available.
|
|
38
44
|
*/
|
|
39
45
|
private withCache;
|
|
40
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-manager.d.ts","sourceRoot":"","sources":["../../../../src/data/webapp/csrf/token-manager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH
|
|
1
|
+
{"version":3,"file":"token-manager.d.ts","sourceRoot":"","sources":["../../../../src/data/webapp/csrf/token-manager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AACH,cAAM,gBAAgB;IAKpB,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,SAAS,CAAC;IALnB,OAAO,CAAC,YAAY,CAAkB;IACtC,OAAO,CAAC,cAAc,CAA8B;gBAG3C,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,MAAM,YAAA;IAK3B;;;;;OAKG;IACG,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;IAIjC;;;;;;OAMG;IACH,YAAY,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAmB3C;;;;OAIG;YACW,WAAW;IAuBzB;;;;;OAKG;YACW,SAAS;CASvB;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -9,18 +9,22 @@ export interface FetchConfig {
|
|
|
9
9
|
csrf: CsrfConfig;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* The module-level registry that lets SDK instances sharing a CSRF endpoint share one
|
|
13
|
+
* `CsrfTokenManager` — one token promise and one network fetch per lifecycle.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Exported only for test isolation. It is not part of the public API.
|
|
15
17
|
*/
|
|
16
18
|
export declare const tokenManagerRegistry: Map<string, CsrfTokenManager>;
|
|
17
19
|
/**
|
|
18
|
-
* Creates
|
|
19
|
-
*
|
|
20
|
-
*
|
|
20
|
+
* Creates a fetch function that handles CSRF tokens automatically.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* The returned function adds a CSRF token to protected requests, and refreshes the token
|
|
24
|
+
* when it becomes invalid.
|
|
21
25
|
*
|
|
22
|
-
* @param config -
|
|
23
|
-
* @returns
|
|
26
|
+
* @param config - The configuration for CSRF handling.
|
|
27
|
+
* @returns A fetch function that handles CSRF protection.
|
|
24
28
|
*/
|
|
25
29
|
export declare function createFetchService(config: FetchConfig): FetchService;
|
|
26
30
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../src/data/webapp/fetch.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEN,KAAK,YAAY,EACjB,MAAM,0CAA0C,CAAC;AAIlD,OAAO,EAEN,KAAK,sBAAsB,EAC3B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,UAAU,UAAW,SAAQ,sBAAsB;IAClD,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,UAAU,CAAC;CACjB;AAED
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../src/data/webapp/fetch.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEN,KAAK,YAAY,EACjB,MAAM,0CAA0C,CAAC;AAIlD,OAAO,EAEN,KAAK,sBAAsB,EAC3B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,UAAU,UAAW,SAAQ,sBAAsB;IAClD,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,UAAU,CAAC;CACjB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,+BAAsC,CAAC;AAExE;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,GAAG,YAAY,CAgBpE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DataSDK, DataSDKGraphQL } from '../../core';
|
|
2
2
|
import { WebAppDataSDKOptions } from '../index';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* A `DataSDK` implementation for web apps that makes `fetch` calls to REST endpoints.
|
|
5
5
|
*/
|
|
6
6
|
export declare class WebAppDataSDK implements DataSDK {
|
|
7
7
|
private readonly baseUrl;
|
|
@@ -13,15 +13,20 @@ export declare class WebAppDataSDK implements DataSDK {
|
|
|
13
13
|
constructor(options?: WebAppDataSDKOptions);
|
|
14
14
|
fetch(input: string | URL | Request, init?: RequestInit): Promise<Response>;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
16
|
+
* Sends a raw GraphQL POST request.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* On the WebApp surface, this is the mutate-only path: `graphql.mutate` calls this method
|
|
20
|
+
* directly. The `graphql.query` (cache) path does not route through this method. The OneStore
|
|
21
|
+
* cache command in `@conduit-client` issues its own fetch and parses the response itself.
|
|
20
22
|
*/
|
|
21
23
|
private executeRawGraphQL;
|
|
22
24
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
+
* Converts a relative URL to an absolute Salesforce URL.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* Code Builder deployments need this conversion, because they structure Salesforce URLs
|
|
29
|
+
* differently.
|
|
25
30
|
*/
|
|
26
31
|
private applySalesforceBase;
|
|
27
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/data/webapp/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAmC,MAAM,YAAY,CAAC;AAC3F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/data/webapp/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAmC,MAAM,YAAY,CAAC;AAC3F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAYrD;;GAEG;AACH,qBAAa,aAAc,YAAW,OAAO;IAC5C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAe;IAC3C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAyD;IAClF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;gBAErB,OAAO,CAAC,EAAE,oBAAoB;IAmCpC,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC;IAUjF;;;;;;;OAOG;YACW,iBAAiB;IAgB/B;;;;;;OAMG;IACH,OAAO,CAAC,mBAAmB;CAa3B"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { I18nContext } from './salesforce-detector';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* A set of locale-aware formatting functions for a single {@link I18nContext}.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* context-derived defaults
|
|
5
|
+
* @remarks
|
|
6
|
+
* Each function wraps an `Intl` formatter built from the context's locale,
|
|
7
|
+
* with its currency and time zone where relevant. Callers can override any
|
|
8
|
+
* default with their own options. The context-derived defaults merge first,
|
|
9
|
+
* so a caller's options always win.
|
|
9
10
|
*/
|
|
10
11
|
export interface I18nFormatters {
|
|
11
12
|
formatDate(value: Date | number, options?: Intl.DateTimeFormatOptions): string;
|
|
@@ -13,25 +14,26 @@ export interface I18nFormatters {
|
|
|
13
14
|
formatCurrency(value: number, options?: Intl.NumberFormatOptions): string;
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
+
* Creates a set of locale-aware formatters for the given {@link I18nContext}.
|
|
17
18
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* `
|
|
22
|
-
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* This factory is pure and synchronous. It takes an already-fetched context
|
|
21
|
+
* instead of fetching one itself, so it never imports `DataSDK` or calls
|
|
22
|
+
* `fetchI18nContext`. This design matches the factory shape of
|
|
23
|
+
* `createSalesforceDetector`, and it keeps the returned formatters easy to
|
|
24
|
+
* unit-test with a plain `I18nContext` fixture.
|
|
23
25
|
*
|
|
24
|
-
* The formatters
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* can share a language but
|
|
29
|
-
* `locale: "en-GB"
|
|
30
|
-
* order and digit grouping.
|
|
26
|
+
* The formatters use `ctx.locale`, the formatting axis, not `ctx.lang`, the
|
|
27
|
+
* translation axis. The platform i18n context returns `locale` as a BCP 47
|
|
28
|
+
* tag, for example `"en-US"` or `"en-GB"`, and `Intl` accepts this tag
|
|
29
|
+
* directly. This function uses `locale` instead of `lang` on purpose: a user
|
|
30
|
+
* can share a language but use a different locale, for example `lang: "en"`
|
|
31
|
+
* with `locale: "en-GB"`. Only `locale` carries the region that decides the
|
|
32
|
+
* date order and digit grouping.
|
|
31
33
|
*
|
|
32
|
-
* @param ctx
|
|
33
|
-
* and time zone
|
|
34
|
-
* @returns
|
|
34
|
+
* @param ctx - The resolved i18n context to format against. Its locale,
|
|
35
|
+
* currency, and time zone become the default values.
|
|
36
|
+
* @returns An {@link I18nFormatters} bound to `ctx`.
|
|
35
37
|
*/
|
|
36
38
|
export declare function createI18nFormatters(ctx: I18nContext): I18nFormatters;
|
|
37
39
|
//# sourceMappingURL=locale-format.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locale-format.d.ts","sourceRoot":"","sources":["../../src/i18n/locale-format.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD
|
|
1
|
+
{"version":3,"file":"locale-format.d.ts","sourceRoot":"","sources":["../../src/i18n/locale-format.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC9B,UAAU,CAAC,KAAK,EAAE,IAAI,GAAG,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,qBAAqB,GAAG,MAAM,CAAC;IAC/E,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,GAAG,MAAM,CAAC;IACxE,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,GAAG,MAAM,CAAC;CAC1E;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,WAAW,GAAG,cAAc,CAuDrE"}
|
|
@@ -1,23 +1,31 @@
|
|
|
1
1
|
import { DataSDK } from '../core';
|
|
2
2
|
/**
|
|
3
|
-
* How the server resolves a label
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* How the server resolves a label that has no translation for the requested
|
|
4
|
+
* locale.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* - `BASE_VALUE` returns the org-default (base) value.
|
|
8
|
+
* - `USER_DEFAULT` returns the current user's language first.
|
|
9
|
+
* - `NONE` returns nothing.
|
|
6
10
|
*/
|
|
7
11
|
export type LabelFallback = "BASE_VALUE" | "USER_DEFAULT" | "NONE";
|
|
8
12
|
export interface SalesforceBackendOptions {
|
|
9
13
|
dataSDK: DataSDK;
|
|
10
14
|
labelManifest?: string[];
|
|
11
15
|
/**
|
|
12
|
-
*
|
|
13
|
-
* Defaults to `BASE_VALUE`.
|
|
14
|
-
* (prefer the user's language), for example on a guest / b2c site. Pass `NONE`
|
|
15
|
-
* to suppress fallback entirely: a label with no matching translation is then
|
|
16
|
-
* absent from the result map.
|
|
16
|
+
* The fallback strategy for a label with no translation for the requested
|
|
17
|
+
* locale. Defaults to `BASE_VALUE`.
|
|
17
18
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* Pass `USER_DEFAULT` for the server's old behavior, which prefers the
|
|
21
|
+
* current user's language, for example on a guest or B2C site. Pass
|
|
22
|
+
* `NONE` to turn off fallback entirely. A label with no matching
|
|
23
|
+
* translation is then absent from the result map.
|
|
24
|
+
*
|
|
25
|
+
* The GraphQL `labels()` query defaults to `USER_DEFAULT` on the server.
|
|
26
|
+
* This SDK uses `BASE_VALUE` instead, because it resolves an explicit
|
|
27
|
+
* target locale. So direct GraphQL callers and this SDK intentionally use
|
|
28
|
+
* different defaults.
|
|
21
29
|
*/
|
|
22
30
|
labelFallback?: LabelFallback;
|
|
23
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"salesforce-backend.d.ts","sourceRoot":"","sources":["../../src/i18n/salesforce-backend.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC
|
|
1
|
+
{"version":3,"file":"salesforce-backend.d.ts","sourceRoot":"","sources":["../../src/i18n/salesforce-backend.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,MAAM,CAAC;AASnE,MAAM,WAAW,wBAAwB;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB;;;;;;;;;;;;;;OAcG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;CAC9B;AAeD,KAAK,YAAY,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,KAAK,KAAK,IAAI,CAAC;AA0CjF,qBAAa,iBAAiB;IAC7B,IAAI,EAAG,SAAS,CAAU;IAC1B,MAAM,CAAC,IAAI,EAAG,SAAS,CAAU;IAEjC,OAAO,CAAC,OAAO,CAA6C;IAC5D,OAAO,CAAC,OAAO,CAAgC;IAE/C,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,wBAAwB,GAAG,IAAI;IAKjE,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,GAAG,IAAI;YAMzD,UAAU;YA4BV,UAAU;CA4BxB"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { DataSDK } from '../core';
|
|
2
2
|
/**
|
|
3
|
-
* The subset of i18next
|
|
4
|
-
* detector implements.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* The subset of the `i18next` `LanguageDetectorModule` contract that this
|
|
4
|
+
* detector implements.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* This interface is declared locally so `platform-sdk` does not depend on
|
|
8
|
+
* `i18next`. The returned object is structurally compatible with
|
|
9
|
+
* `i18next`'s `.use()` plugin slot.
|
|
7
10
|
*/
|
|
8
11
|
interface LanguageDetectorModule {
|
|
9
12
|
type: "languageDetector";
|
|
@@ -18,18 +21,23 @@ export interface I18nContext {
|
|
|
18
21
|
}
|
|
19
22
|
export declare function fetchI18nContext(dataSDK: DataSDK): Promise<I18nContext>;
|
|
20
23
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
24
|
+
* Reloads the cached i18n context.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* This function clears the memoized value, then immediately queries the
|
|
28
|
+
* platform again and resolves to the fresh context.
|
|
23
29
|
*
|
|
24
|
-
* The context is fetched once and memoized for the
|
|
25
|
-
* locale change
|
|
26
|
-
* after
|
|
27
|
-
* operation, so a caller cannot clear the
|
|
30
|
+
* The context is fetched once and memoized for the life of the page. A
|
|
31
|
+
* locale change therefore only takes effect after a full page reload. Call
|
|
32
|
+
* this function after a locale change within the session. Clearing and
|
|
33
|
+
* re-fetching happen as a single operation, so a caller cannot clear the
|
|
34
|
+
* cache and then forget to refill it.
|
|
28
35
|
*
|
|
29
|
-
*
|
|
30
|
-
* returned promise rejects and the cache
|
|
31
|
-
* `undefined` until a later successful
|
|
32
|
-
* rather than assume a
|
|
36
|
+
* This function clears the cache before it re-queries the platform. So if
|
|
37
|
+
* the re-query fails, the returned promise rejects and the cache stays
|
|
38
|
+
* empty. `detect()` then reverts to `undefined` until a later successful
|
|
39
|
+
* fetch. Callers should handle the rejection rather than assume that a
|
|
40
|
+
* reload always fills the cache again.
|
|
33
41
|
*/
|
|
34
42
|
export declare function reloadI18nContext(dataSDK: DataSDK): Promise<I18nContext>;
|
|
35
43
|
export declare function createSalesforceDetector(_dataSDK: DataSDK): LanguageDetectorModule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"salesforce-detector.d.ts","sourceRoot":"","sources":["../../src/i18n/salesforce-detector.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC
|
|
1
|
+
{"version":3,"file":"salesforce-detector.d.ts","sourceRoot":"","sources":["../../src/i18n/salesforce-detector.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC;;;;;;;;GAQG;AACH,UAAU,sBAAsB;IAC/B,IAAI,EAAE,kBAAkB,CAAC;IACzB,MAAM,IAAI,MAAM,GAAG,SAAS,CAAC;CAC7B;AAED,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CACjB;AAYD,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAkC7E;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAG9E;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,OAAO,GAAG,sBAAsB,CAQlF"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as t, a, S as p, g as s, i as o, b as i, r as S } from "./surface-
|
|
2
|
-
import { g as c } from "./capabilities-
|
|
1
|
+
import { M as t, a, S as p, g as s, i as o, b as i, r as S } from "./surface-DWDgqdpN.js";
|
|
2
|
+
import { g as c } from "./capabilities-B0mU0_G0.js";
|
|
3
3
|
import { w as D } from "./sdk-promise-D0sy7OW1.js";
|
|
4
4
|
import { MCPAppsChatSDK as n, createChatSDK as K, getChatSDK as l, getChatSDKSync as x, resetChatSDK as A } from "./chat/index.js";
|
|
5
5
|
import { MCPAppsViewSDK as d, createViewSDK as w, getViewSDK as T, getViewSDKSync as h, resetViewSDK as u } from "./view/index.js";
|
|
@@ -8,7 +8,7 @@ import { createLightningSDK as E } from "./lightning/index.js";
|
|
|
8
8
|
import { WebAppCurrentApp as I, getCurrentApp as U } from "./app/index.js";
|
|
9
9
|
import { c as q } from "./transport-D9QstWle.js";
|
|
10
10
|
import { T as F, r as L } from "./TelemetryUploader-DKkdppe9.js";
|
|
11
|
-
import { P as W, c as Y, v as j } from "./analytics-
|
|
11
|
+
import { P as W, c as Y, v as j } from "./analytics-wESbWdca.js";
|
|
12
12
|
export {
|
|
13
13
|
n as MCPAppsChatSDK,
|
|
14
14
|
d as MCPAppsViewSDK,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embedding.d.ts","sourceRoot":"","sources":["../../src/lightning/embedding.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"embedding.d.ts","sourceRoot":"","sources":["../../src/lightning/embedding.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAO5C,qBAAa,qBAAsB,YAAW,YAAY;IAOrC,OAAO,CAAC,QAAQ,CAAC,OAAO;WAN/B,MAAM,IAAI,OAAO,CAAC,qBAAqB,CAAC;IAMrD,OAAO;CACP"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { LightningSDK, SDKOptions } from '../core';
|
|
2
2
|
/**
|
|
3
|
-
* Options for creating a LightningSDK instance.
|
|
3
|
+
* Options for creating a `LightningSDK` instance.
|
|
4
4
|
*/
|
|
5
5
|
export interface LightningSDKOptions extends SDKOptions {
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Creates and initializes a `LightningSDK` instance for the detected surface.
|
|
9
9
|
*
|
|
10
|
-
* @param options -
|
|
11
|
-
* @returns
|
|
10
|
+
* @param options - Configuration for the SDK, including a surface override.
|
|
11
|
+
* @returns An initialized `LightningSDK` instance.
|
|
12
12
|
*/
|
|
13
13
|
export declare function createLightningSDK(options?: LightningSDKOptions): Promise<LightningSDK>;
|
|
14
14
|
export type { LightningSDK, SDKOptions } from '../core';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lightning/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGxD;;GAEG;AAEH,MAAM,WAAW,mBAAoB,SAAQ,UAAU;CAAG;AAE1D;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lightning/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGxD;;GAEG;AAEH,MAAM,WAAW,mBAAoB,SAAQ,UAAU;CAAG;AAE1D;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC,CA6BvF;AAED,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/lightning/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { g as n, S as r } from "../surface-
|
|
1
|
+
import { g as n, S as r } from "../surface-DWDgqdpN.js";
|
|
2
2
|
import { w as a } from "../sdk-promise-D0sy7OW1.js";
|
|
3
3
|
import { requireSharedSession as c } from "../ui-embedding/session.js";
|
|
4
4
|
class t {
|
|
5
|
-
// @ts-expect-error TS6138: `session`
|
|
5
|
+
// @ts-expect-error TS6138: `session` stays unread until the first method body lands
|
|
6
6
|
constructor(e) {
|
|
7
7
|
this.session = e;
|
|
8
8
|
}
|