@salesforce/sdk-core 1.40.0 → 1.42.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/index.d.ts CHANGED
@@ -4,6 +4,7 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
  export { Surface, getSurface } from "./surface.js";
7
+ export type { SDKOptions } from "./options.js";
7
8
  export type { ChatMessage, ChatSDK, DisplayMode, ResourceRequest, ToolCall, ToolState, } from "./chat.js";
8
9
  export type { AlertOptions, MessageLevel, ModalOptions, ToastOptions, Theme, ThemeMode, ViewSDK, } from "./view.js";
9
10
  export type { DataSDK, GraphQLResponse, LabelRequest, ResourceUrlRequest, SchemaDescriptor, SchemaRequest, UserInfo, } from "./data.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAGnD,YAAY,EACX,WAAW,EACX,OAAO,EACP,WAAW,EACX,eAAe,EACf,QAAQ,EACR,SAAS,GACT,MAAM,WAAW,CAAC;AAGnB,YAAY,EACX,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,KAAK,EACL,SAAS,EACT,OAAO,GACP,MAAM,WAAW,CAAC;AAGnB,YAAY,EACX,OAAO,EACP,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,QAAQ,GACR,MAAM,WAAW,CAAC;AAGnB,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhG,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGlE,YAAY,EACX,WAAW,EACX,cAAc,EACd,YAAY,EACZ,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EAC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,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+ import type { Surface } from "./surface.js";
7
+ /**
8
+ * Base options bag for all SDK factory functions.
9
+ *
10
+ * Individual SDKs extend this interface to add SDK-specific options.
11
+ */
12
+ export interface SDKOptions {
13
+ /**
14
+ * Override the auto-detected surface.
15
+ *
16
+ * When provided, the SDK will use this value instead of the
17
+ * result of the runtime surface detection.
18
+ */
19
+ surface?: Surface;
20
+ }
21
+ //# sourceMappingURL=options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;;;GAIG;AACH,MAAM,WAAW,UAAU;IAC1B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"}
@@ -0,0 +1 @@
1
+ export {};
package/dist/surface.d.ts CHANGED
@@ -13,5 +13,11 @@ export declare enum Surface {
13
13
  SalesforceACC = "Salesforce-ACC",
14
14
  MCPApps = "MCP-Apps"
15
15
  }
16
- export declare function getSurface(): Surface;
16
+ /**
17
+ * Returns the surface to use for SDK initialization.
18
+ *
19
+ * Returns the override surface if provided, otherwise falls back
20
+ * to the auto-detected surface.
21
+ */
22
+ export declare function getSurface(override?: Surface): Surface;
17
23
  //# sourceMappingURL=surface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../src/surface.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,oBAAY,OAAO;IAClB,MAAM,WAAW;IACjB,aAAa,mBAAmB;IAChC,MAAM,WAAW;IACjB,aAAa,mBAAmB;IAChC,OAAO,aAAa;CACpB;AAwBD,wBAAgB,UAAU,YAEzB"}
1
+ {"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../src/surface.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,oBAAY,OAAO;IAClB,MAAM,WAAW;IACjB,aAAa,mBAAmB;IAChC,MAAM,WAAW;IACjB,aAAa,mBAAmB;IAChC,OAAO,aAAa;CACpB;AAwBD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,CAEtD"}
package/dist/surface.js CHANGED
@@ -38,6 +38,12 @@ function detectSurface() {
38
38
  return Surface.WebApp;
39
39
  }
40
40
  }
41
- export function getSurface() {
42
- return surface;
41
+ /**
42
+ * Returns the surface to use for SDK initialization.
43
+ *
44
+ * Returns the override surface if provided, otherwise falls back
45
+ * to the auto-detected surface.
46
+ */
47
+ export function getSurface(override) {
48
+ return override ?? surface;
43
49
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/sdk-core",
3
- "version": "1.40.0",
3
+ "version": "1.42.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -31,5 +31,5 @@
31
31
  "publishConfig": {
32
32
  "access": "public"
33
33
  },
34
- "gitHead": "fb08cea2853492f373c8267f2327f8c8085504ef"
34
+ "gitHead": "5bb3d5e71e337e5eacad83240b8e344fdfd1d6c7"
35
35
  }