@salesforce/sdk-data 1.22.0 → 1.29.1

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
@@ -1,5 +1,10 @@
1
1
  import type { DataSDK } from "@salesforce/sdk-core";
2
- export declare const sdk: DataSDK;
2
+ /**
3
+ * Create and initialize a DataSDK instance based on the detected surface
4
+ *
5
+ * @returns Promise resolving to an initialized DataSDK instance
6
+ */
7
+ export declare function createDataSDK(): Promise<DataSDK>;
3
8
  export { gql } from "./gql.js";
4
- export type { DataSDK } from "@salesforce/sdk-core";
9
+ export type { DataSDK, LabelRequest, ResourceUrlRequest, SchemaDescriptor, SchemaRequest, UserInfo, } from "@salesforce/sdk-core";
5
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAiBpD,eAAO,MAAM,GAAG,SAAe,CAAC;AAChC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,YAAY,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAGpD;;;;GAIG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAetD;AAED,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,YAAY,EACX,OAAO,EACP,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,QAAQ,GACR,MAAM,sBAAsB,CAAC"}
package/dist/index.js CHANGED
@@ -4,19 +4,26 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
  import { getSurface, Surface } from "@salesforce/sdk-core";
7
- import { OpenAIDataSDK } from "./openai/index.js";
8
7
  import { WebAppDataSDK } from "./webapp/index.js";
9
- function initialize() {
8
+ /**
9
+ * Create and initialize a DataSDK instance based on the detected surface
10
+ *
11
+ * @returns Promise resolving to an initialized DataSDK instance
12
+ */
13
+ export async function createDataSDK() {
10
14
  const surface = getSurface();
11
15
  switch (surface) {
12
16
  case Surface.OpenAI:
13
- return new OpenAIDataSDK();
14
- case Surface.Webapp:
17
+ return {};
18
+ case Surface.WebApp:
15
19
  case Surface.MicroFrontend:
16
20
  return new WebAppDataSDK();
21
+ case Surface.SalesforceACC:
22
+ return {};
23
+ case Surface.MCPApps:
24
+ return {};
17
25
  default:
18
26
  return {};
19
27
  }
20
28
  }
21
- export const sdk = initialize();
22
29
  export { gql } from "./gql.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/sdk-data",
3
- "version": "1.22.0",
3
+ "version": "1.29.1",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@conduit-client/salesforce-lightning-service-worker": "^3.7.0",
30
- "@salesforce/sdk-core": "^1.22.0"
30
+ "@salesforce/sdk-core": "^1.29.1"
31
31
  },
32
32
  "devDependencies": {
33
33
  "vitest": "^4.0.6"
@@ -35,5 +35,5 @@
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "gitHead": "f27c2343d0181dbca3f954174e89a7fa65b04274"
38
+ "gitHead": "a9638ee25f6b90f08f032bb06fabc218a3b0ebd4"
39
39
  }
@@ -1,12 +0,0 @@
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 { DataSDK } from "@salesforce/sdk-core";
7
- /**
8
- * Data SDK implementation based on the existence of `window.openai`
9
- */
10
- export declare class OpenAIDataSDK implements DataSDK {
11
- }
12
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/openai/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD;;GAEG;AACH,qBAAa,aAAc,YAAW,OAAO;CAAG"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Data SDK implementation based on the existence of `window.openai`
3
- */
4
- export class OpenAIDataSDK {
5
- }