@salesforce/webapp-template-app-react-template-vibe-experimental 1.58.0 → 1.58.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.
Files changed (19) hide show
  1. package/dist/.a4drules/graphql.md +8 -8
  2. package/dist/.a4drules/react.md +5 -5
  3. package/dist/.a4drules/typescript.md +2 -2
  4. package/dist/CHANGELOG.md +19 -0
  5. package/dist/force-app/main/default/webapplications/appreacttemplatevibe/package-lock.json +37 -50
  6. package/dist/force-app/main/default/webapplications/appreacttemplatevibe/package.json +1 -1
  7. package/dist/force-app/main/default/webapplications/appreacttemplatevibe/src/HomePage.tsx +1 -1
  8. package/dist/force-app/main/default/webapplications/appreacttemplatevibe/src/auth/pages/ChangePassword.tsx +2 -2
  9. package/dist/force-app/main/default/webapplications/appreacttemplatevibe/src/auth/pages/ForgotPassword.tsx +2 -2
  10. package/dist/force-app/main/default/webapplications/appreacttemplatevibe/src/auth/pages/Login.tsx +2 -2
  11. package/dist/force-app/main/default/webapplications/appreacttemplatevibe/src/auth/pages/Profile.tsx +1 -1
  12. package/dist/force-app/main/default/webapplications/appreacttemplatevibe/src/auth/pages/Register.tsx +2 -2
  13. package/dist/force-app/main/default/webapplications/appreacttemplatevibe/src/auth/pages/ResetPassword.tsx +2 -2
  14. package/dist/package.json +1 -1
  15. package/package.json +2 -2
  16. package/dist/force-app/main/default/webapplications/appreacttemplatevibe/src/api/graphql-operations-types.ts +0 -116
  17. package/dist/force-app/main/default/webapplications/appreacttemplatevibe/src/api/utils/accounts.ts +0 -41
  18. package/dist/force-app/main/default/webapplications/appreacttemplatevibe/src/api/utils/query/highRevenueAccountsQuery.graphql +0 -29
  19. package/dist/force-app/main/default/webapplications/appreacttemplatevibe/src/auth/lib/data-sdk.ts +0 -21
@@ -29,10 +29,10 @@ For a GraphQL operation named `GetHighRevenueAccounts`:
29
29
  ## Core Types & Function Signatures
30
30
 
31
31
  ### getDataSDK Function
32
- Available from `@salesforce/webapp-experimental/api`:
32
+ Available from `@salesforce/sdk-data`:
33
33
 
34
34
  ```typescript
35
- import { getDataSDK } from '@salesforce/webapp-experimental/api';
35
+ import { getDataSDK } from '@salesforce/sdk-data';
36
36
 
37
37
  const data = await getDataSDK();
38
38
  const response = await data.graphql?.<ResponseType, VariablesType>(query, variables);
@@ -89,10 +89,10 @@ const result = response?.data;
89
89
  For mutation-specific partial responses, see `docs/generate-mutation-query.md` which covers `PARTIAL` and `FAILED` status handling workflows.
90
90
 
91
91
  ### gql Template Tag
92
- Also available from `@salesforce/webapp-experimental/api` for inline query definitions:
92
+ Also available from `@salesforce/sdk-data` for inline query definitions:
93
93
 
94
94
  ```typescript
95
- import { gql } from '@salesforce/webapp-experimental/api';
95
+ import { gql } from '@salesforce/sdk-data';
96
96
 
97
97
  const MY_QUERY = gql`
98
98
  query MyQuery {
@@ -109,7 +109,7 @@ The `gql` tag is a template literal that allows defining GraphQL queries inline
109
109
  Extract the node type from a connection (edges/node pattern):
110
110
 
111
111
  ```typescript
112
- import { type NodeOfConnection } from '@salesforce/webapp-experimental/api';
112
+ import { type NodeOfConnection } from '@salesforce/sdk-data';
113
113
 
114
114
  // Extract Account node type from the query response
115
115
  type AccountNode = NodeOfConnection<
@@ -180,7 +180,7 @@ This generates types in `graphql-operations-types.ts`:
180
180
 
181
181
  #### Step 3: Import and Use
182
182
  ```typescript
183
- import { getDataSDK, type NodeOfConnection } from '@salesforce/webapp-experimental/api';
183
+ import { getDataSDK, type NodeOfConnection } from '@salesforce/sdk-data';
184
184
  import MY_QUERY from './query/myQuery.graphql?raw';
185
185
  import type {
186
186
  GetMyDataQuery,
@@ -232,7 +232,7 @@ export async function getMyData(
232
232
  For simpler queries without variables or when colocation is preferred:
233
233
 
234
234
  ```typescript
235
- import { getDataSDK, gql } from '@salesforce/webapp-experimental/api';
235
+ import { getDataSDK, gql } from '@salesforce/sdk-data';
236
236
  import { type CurrentUserQuery } from '../graphql-operations-types';
237
237
 
238
238
  const CURRENT_USER_QUERY = gql`
@@ -359,7 +359,7 @@ fragment ContactFields on Account {
359
359
 
360
360
  ### Usage
361
361
  ```typescript
362
- import { getDataSDK } from '@salesforce/webapp-experimental/api';
362
+ import { getDataSDK } from '@salesforce/sdk-data';
363
363
  import QUERY from './query/getAccountDetails.graphql?raw';
364
364
  import type {
365
365
  GetAccountDetailsQuery,
@@ -123,7 +123,7 @@ Before implementing data access, **MUST** verify `orchestrate_lds_data_requireme
123
123
 
124
124
  ## Data Access Rules (CRITICAL)
125
125
 
126
- - MANDATORY: Use the DataSDK (`getDataSDK()` from `@salesforce/webapp-experimental/api`) for all API calls from React. The SDK handles authentication and CSRF token management. Do NOT use `axios` or raw `fetch` for Salesforce API calls.
126
+ - MANDATORY: Use the DataSDK (`getDataSDK()` from `@salesforce/sdk-data`) for all API calls from React. The SDK handles authentication and CSRF token management. Do NOT use `axios` or raw `fetch` for Salesforce API calls.
127
127
 
128
128
  ### Data Access Workflow (MANDATORY)
129
129
 
@@ -161,7 +161,7 @@ The following code examples serve as reference patterns for React applications.
161
161
  GraphQL query example:
162
162
 
163
163
  ```typescript
164
- import { getDataSDK, gql } from '@salesforce/webapp-experimental/api';
164
+ import { getDataSDK, gql } from '@salesforce/sdk-data';
165
165
 
166
166
  const GET_ACCOUNT = gql`
167
167
  query GetAccount($id: ID!) {
@@ -195,7 +195,7 @@ const account = response?.data;
195
195
  GraphQL mutation example:
196
196
 
197
197
  ```typescript
198
- import { getDataSDK, gql } from '@salesforce/webapp-experimental/api';
198
+ import { getDataSDK, gql } from '@salesforce/sdk-data';
199
199
 
200
200
  const UPDATE_ACCOUNT = gql`
201
201
  mutation UpdateAccount($id: ID!, $name: String!) {
@@ -231,7 +231,7 @@ if (result?.errors?.length) {
231
231
  UI API example (using the SDK's fetch):
232
232
 
233
233
  ```typescript
234
- import { getDataSDK } from '@salesforce/webapp-experimental/api';
234
+ import { getDataSDK } from '@salesforce/sdk-data';
235
235
 
236
236
  async function fetchRecord(recordId: string) {
237
237
  const data = await getDataSDK();
@@ -257,7 +257,7 @@ Einstein LLM Gateway provides AI and generative capabilities for your React appl
257
257
  ### Einstein LLM Gateway Pattern
258
258
 
259
259
  ```typescript
260
- import { getDataSDK } from '@salesforce/webapp-experimental/api';
260
+ import { getDataSDK } from '@salesforce/sdk-data';
261
261
 
262
262
  async function callEinsteinGenerations({ prompt, model = 'gpt-4', signal }: {
263
263
  prompt: string;
@@ -136,10 +136,10 @@ interface Account extends SalesforceRecord {
136
136
  ```
137
137
 
138
138
  ### GraphQL via DataSDK
139
- Use `getDataSDK()` from `@salesforce/webapp-experimental/api` for all GraphQL operations. The SDK handles authentication and CSRF token management:
139
+ Use `getDataSDK()` from `@salesforce/sdk-data` for all GraphQL operations. The SDK handles authentication and CSRF token management:
140
140
 
141
141
  ```typescript
142
- import { getDataSDK } from '@salesforce/webapp-experimental/api';
142
+ import { getDataSDK } from '@salesforce/sdk-data';
143
143
 
144
144
  const data = await getDataSDK();
145
145
  const response = await data.graphql?.<GetAccountsQuery>(QUERY, variables);
package/dist/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.58.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.58.1...v1.58.2) (2026-02-26)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * moving all sdk usages from api to sdk-data @W-21338965 ([#173](https://github.com/salesforce-experience-platform-emu/webapps/issues/173)) ([23c9479](https://github.com/salesforce-experience-platform-emu/webapps/commit/23c94794e0c72e30d85313f908b52274e4a59979))
12
+
13
+
14
+
15
+
16
+
17
+ ## [1.58.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.58.0...v1.58.1) (2026-02-26)
18
+
19
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
20
+
21
+
22
+
23
+
24
+
6
25
  # [1.58.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.57.0...v1.58.0) (2026-02-26)
7
26
 
8
27
  **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
@@ -8,7 +8,7 @@
8
8
  "name": "base-react-app",
9
9
  "version": "1.0.0",
10
10
  "dependencies": {
11
- "@salesforce/agentforce-conversation-client": "^1.57.0",
11
+ "@salesforce/agentforce-conversation-client": "^1.58.1",
12
12
  "@salesforce/sdk-data": "^1.11.2",
13
13
  "@salesforce/webapp-experimental": "*",
14
14
  "@tailwindcss/vite": "^4.1.17",
@@ -6027,9 +6027,9 @@
6027
6027
  ]
6028
6028
  },
6029
6029
  "node_modules/@salesforce/agentforce-conversation-client": {
6030
- "version": "1.57.0",
6031
- "resolved": "https://registry.npmjs.org/@salesforce/agentforce-conversation-client/-/agentforce-conversation-client-1.57.0.tgz",
6032
- "integrity": "sha512-Oi4N526m0cK+PFMkq6eGObPjEzEiHOgnp2HrHN6kH2cd1k/K2W42nTKiW1DCuPBYmnNdhiQywMQ6iccSQ89zTg==",
6030
+ "version": "1.58.1",
6031
+ "resolved": "https://registry.npmjs.org/@salesforce/agentforce-conversation-client/-/agentforce-conversation-client-1.58.1.tgz",
6032
+ "integrity": "sha512-+71oBDoWWMbZxW7i6u6o9xbyoF71YG3F4bOXRi2fNxbYDLMTEQ7u8z9GgmWy/NT53jbyjvhYPXMY/H//qt7mvg==",
6033
6033
  "license": "SEE LICENSE IN LICENSE.txt",
6034
6034
  "dependencies": {
6035
6035
  "@lightning-out/application": "2.1.1-rc.2"
@@ -6090,19 +6090,19 @@
6090
6090
  }
6091
6091
  },
6092
6092
  "node_modules/@salesforce/sdk-core": {
6093
- "version": "1.57.0",
6094
- "resolved": "https://registry.npmjs.org/@salesforce/sdk-core/-/sdk-core-1.57.0.tgz",
6095
- "integrity": "sha512-GltoieBSgMXVqIHx5EIe9Wvl4YtBZIcf13TPSHvqOLKcUQvLWZMSul5P7GMIYwqjAe31hr/ka1UzWeT1eOlDnQ==",
6093
+ "version": "1.58.1",
6094
+ "resolved": "https://registry.npmjs.org/@salesforce/sdk-core/-/sdk-core-1.58.1.tgz",
6095
+ "integrity": "sha512-Ke9kRRK4bKumP2voNZ9NUnvc5kmSo7iuvMdt9KgqmoJ4uaxS/IAR4LYkPZYpUeUu87mdljo7kw35jvKhkMqhZQ==",
6096
6096
  "license": "SEE LICENSE IN LICENSE.txt"
6097
6097
  },
6098
6098
  "node_modules/@salesforce/sdk-data": {
6099
- "version": "1.57.0",
6100
- "resolved": "https://registry.npmjs.org/@salesforce/sdk-data/-/sdk-data-1.57.0.tgz",
6101
- "integrity": "sha512-s0Tlq+LujH5TesV20q2FfTLVTx9+6o2EDY2nENYWcElPG+a+LYDdZolE2ok9uPeVBlp2igG/3GpdVmt55w/NkA==",
6099
+ "version": "1.58.1",
6100
+ "resolved": "https://registry.npmjs.org/@salesforce/sdk-data/-/sdk-data-1.58.1.tgz",
6101
+ "integrity": "sha512-Agp33BPe6KD7ZZoxKFnT/IZ9J8bEvvS61MYlGzxib3HIkP4EFHk8VeHlRwxZFtd+nY4x45q/kG1mLdlzCAYykw==",
6102
6102
  "license": "SEE LICENSE IN LICENSE.txt",
6103
6103
  "dependencies": {
6104
6104
  "@conduit-client/salesforce-lightning-service-worker": "^3.7.0",
6105
- "@salesforce/sdk-core": "^1.57.0"
6105
+ "@salesforce/sdk-core": "^1.58.1"
6106
6106
  }
6107
6107
  },
6108
6108
  "node_modules/@salesforce/ts-types": {
@@ -6115,15 +6115,15 @@
6115
6115
  }
6116
6116
  },
6117
6117
  "node_modules/@salesforce/vite-plugin-webapp-experimental": {
6118
- "version": "1.57.0",
6119
- "resolved": "https://registry.npmjs.org/@salesforce/vite-plugin-webapp-experimental/-/vite-plugin-webapp-experimental-1.57.0.tgz",
6120
- "integrity": "sha512-7bYvYT8xp4puUH7StaT3cX66in0Eo33Lk/syuc6YEPAU7L1ZZfQlIta3/UIKMLtoElNzShcC3E1MXR9Ddb3yrw==",
6118
+ "version": "1.58.1",
6119
+ "resolved": "https://registry.npmjs.org/@salesforce/vite-plugin-webapp-experimental/-/vite-plugin-webapp-experimental-1.58.1.tgz",
6120
+ "integrity": "sha512-o9hAn4waBM3m7ago/DQZCIIlKxZhhEMBIm5b1kEDMr4XXJlx4OQ8V79TeHGyZOJ60EihC93DzyPFwtA2y4f2Ug==",
6121
6121
  "dev": true,
6122
6122
  "license": "SEE LICENSE IN LICENSE.txt",
6123
6123
  "dependencies": {
6124
6124
  "@babel/core": "^7.28.4",
6125
6125
  "@babel/helper-plugin-utils": "^7.28.3",
6126
- "@salesforce/webapp-experimental": "^1.57.0"
6126
+ "@salesforce/webapp-experimental": "^1.58.1"
6127
6127
  },
6128
6128
  "engines": {
6129
6129
  "node": ">=20.0.0"
@@ -6133,13 +6133,13 @@
6133
6133
  }
6134
6134
  },
6135
6135
  "node_modules/@salesforce/webapp-experimental": {
6136
- "version": "1.57.0",
6137
- "resolved": "https://registry.npmjs.org/@salesforce/webapp-experimental/-/webapp-experimental-1.57.0.tgz",
6138
- "integrity": "sha512-XZy4+gXw/d2eaAWV2sCMBknWul/CAIl75V4p5idAPXcgi3wODrWTNLOzmMLcdNW8cujCXVgDlZ5e8IgHYcspbQ==",
6136
+ "version": "1.58.1",
6137
+ "resolved": "https://registry.npmjs.org/@salesforce/webapp-experimental/-/webapp-experimental-1.58.1.tgz",
6138
+ "integrity": "sha512-dyz3gFWlgd5oI19Gp+Ik+fRr9n5Pi1lMtCQtAe6KSP2YROKWCnm4sru3z4Eud5J+ccaVmlhLCtcwdIPoOLnKQA==",
6139
6139
  "license": "SEE LICENSE IN LICENSE.txt",
6140
6140
  "dependencies": {
6141
6141
  "@salesforce/core": "^8.23.4",
6142
- "@salesforce/sdk-data": "^1.57.0",
6142
+ "@salesforce/sdk-data": "^1.58.1",
6143
6143
  "axios": "^1.7.7",
6144
6144
  "micromatch": "^4.0.8",
6145
6145
  "path-to-regexp": "^8.3.0"
@@ -6774,9 +6774,9 @@
6774
6774
  "license": "MIT"
6775
6775
  },
6776
6776
  "node_modules/@types/node": {
6777
- "version": "24.10.14",
6778
- "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.14.tgz",
6779
- "integrity": "sha512-OowOUbD1lBCOFIPOZ8xnMIhgqA4sCutMiYOmPHL1PTLt5+y1XA+g2+yC9OOyz8p+deMZqPZLxfMjYIfrKsPeFg==",
6777
+ "version": "24.10.15",
6778
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.15.tgz",
6779
+ "integrity": "sha512-BgjLoRuSr0MTI5wA6gMw9Xy0sFudAaUuvrnjgGx9wZ522fYYLA5SYJ+1Y30vTcJEG+DRCyDHx/gzQVfofYzSdg==",
6780
6780
  "devOptional": true,
6781
6781
  "license": "MIT",
6782
6782
  "dependencies": {
@@ -11176,27 +11176,14 @@
11176
11176
  "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
11177
11177
  }
11178
11178
  },
11179
- "node_modules/graphql-config/node_modules/balanced-match": {
11180
- "version": "4.0.4",
11181
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
11182
- "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
11183
- "dev": true,
11184
- "license": "MIT",
11185
- "engines": {
11186
- "node": "18 || 20 || >=22"
11187
- }
11188
- },
11189
11179
  "node_modules/graphql-config/node_modules/brace-expansion": {
11190
- "version": "5.0.3",
11191
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.3.tgz",
11192
- "integrity": "sha512-fy6KJm2RawA5RcHkLa1z/ScpBeA762UF9KmZQxwIbDtRJrgLzM10depAiEQ+CXYcoiqW1/m96OAAoke2nE9EeA==",
11180
+ "version": "2.0.2",
11181
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
11182
+ "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
11193
11183
  "dev": true,
11194
11184
  "license": "MIT",
11195
11185
  "dependencies": {
11196
- "balanced-match": "^4.0.2"
11197
- },
11198
- "engines": {
11199
- "node": "18 || 20 || >=22"
11186
+ "balanced-match": "^1.0.0"
11200
11187
  }
11201
11188
  },
11202
11189
  "node_modules/graphql-config/node_modules/cosmiconfig": {
@@ -11227,13 +11214,13 @@
11227
11214
  }
11228
11215
  },
11229
11216
  "node_modules/graphql-config/node_modules/minimatch": {
11230
- "version": "9.0.8",
11231
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.8.tgz",
11232
- "integrity": "sha512-reYkDYtj/b19TeqbNZCV4q9t+Yxylf/rYBsLb42SXJatTv4/ylq5lEiAmhA/IToxO7NI2UzNMghHoHuaqDkAjw==",
11217
+ "version": "9.0.9",
11218
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz",
11219
+ "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==",
11233
11220
  "dev": true,
11234
11221
  "license": "ISC",
11235
11222
  "dependencies": {
11236
- "brace-expansion": "^5.0.2"
11223
+ "brace-expansion": "^2.0.2"
11237
11224
  },
11238
11225
  "engines": {
11239
11226
  "node": ">=16 || 14 >=14.17"
@@ -11473,9 +11460,9 @@
11473
11460
  }
11474
11461
  },
11475
11462
  "node_modules/hono": {
11476
- "version": "4.12.2",
11477
- "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.2.tgz",
11478
- "integrity": "sha512-gJnaDHXKDayjt8ue0n8Gs0A007yKXj4Xzb8+cNjZeYsSzzwKc0Lr+OZgYwVfB0pHfUs17EPoLvrOsEaJ9mj+Tg==",
11463
+ "version": "4.12.3",
11464
+ "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.3.tgz",
11465
+ "integrity": "sha512-SFsVSjp8sj5UumXOOFlkZOG6XS9SJDKw0TbwFeV+AJ8xlST8kxK5Z/5EYa111UY8732lK2S/xB653ceuaoGwpg==",
11479
11466
  "license": "MIT",
11480
11467
  "engines": {
11481
11468
  "node": ">=16.9.0"
@@ -16674,12 +16661,12 @@
16674
16661
  }
16675
16662
  },
16676
16663
  "node_modules/strip-ansi": {
16677
- "version": "7.1.2",
16678
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz",
16679
- "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==",
16664
+ "version": "7.2.0",
16665
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz",
16666
+ "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==",
16680
16667
  "license": "MIT",
16681
16668
  "dependencies": {
16682
- "ansi-regex": "^6.0.1"
16669
+ "ansi-regex": "^6.2.2"
16683
16670
  },
16684
16671
  "engines": {
16685
16672
  "node": ">=12"
@@ -15,7 +15,7 @@
15
15
  "graphql:schema": "node scripts/get-graphql-schema.mjs"
16
16
  },
17
17
  "dependencies": {
18
- "@salesforce/agentforce-conversation-client": "^1.57.0",
18
+ "@salesforce/agentforce-conversation-client": "^1.58.1",
19
19
  "@salesforce/sdk-data": "^1.11.2",
20
20
  "@salesforce/webapp-experimental": "*",
21
21
  "@tailwindcss/vite": "^4.1.17",
@@ -190,7 +190,7 @@ Be sure to also change the footer background. Remember to change every component
190
190
 
191
191
  6. Limit the query to the first 20 accounts for performance.
192
192
 
193
- 7. Use getDataSDK() from @salesforce/webapp-experimental/api, then call data.graphql?.() for the GraphQL query."
193
+ 7. Use getDataSDK() from @salesforce/sdk-data, then call data.graphql?.() for the GraphQL query."
194
194
  />
195
195
  </PromptHighlight>
196
196
 
@@ -4,7 +4,7 @@ import { z } from "zod";
4
4
  import { CenteredPageLayout } from "../layout/centered-page-layout";
5
5
  import { AuthForm } from "../forms/auth-form";
6
6
  import { useAppForm } from "../hooks/form";
7
- import { getDataSDK } from "../lib/data-sdk";
7
+ import { getDataSDK } from "@salesforce/sdk-data";
8
8
  import { ROUTES, AUTH_PLACEHOLDERS } from "../authenticationConfig";
9
9
  import { newPasswordSchema } from "../authHelpers";
10
10
  import { handleApiResponse, getErrorMessage } from "../utils/helpers";
@@ -29,7 +29,7 @@ export default function ChangePassword() {
29
29
  // [Dev Note] Custom Apex Endpoint: /auth/change-password
30
30
  // You must ensure this Apex class exists in your org
31
31
  const sdk = await getDataSDK();
32
- const response = await sdk.fetch("/sfdcapi/services/apexrest/auth/change-password", {
32
+ const response = await sdk.fetch!("/sfdcapi/services/apexrest/auth/change-password", {
33
33
  method: "POST",
34
34
  body: JSON.stringify({
35
35
  currentPassword: formFieldValues.currentPassword,
@@ -3,7 +3,7 @@ import { z } from "zod";
3
3
  import { CenteredPageLayout } from "../layout/centered-page-layout";
4
4
  import { AuthForm } from "../forms/auth-form";
5
5
  import { useAppForm } from "../hooks/form";
6
- import { getDataSDK } from "../lib/data-sdk";
6
+ import { getDataSDK } from "@salesforce/sdk-data";
7
7
  import { ROUTES, AUTH_PLACEHOLDERS } from "../authenticationConfig";
8
8
  import { handleApiResponse, getErrorMessage } from "../utils/helpers";
9
9
 
@@ -25,7 +25,7 @@ export default function ForgotPassword() {
25
25
  // [Dev Note] Custom Apex Endpoint: /auth/forgot-password
26
26
  // You must ensure this Apex class exists in your org
27
27
  const sdk = await getDataSDK();
28
- const response = await sdk.fetch("/sfdcapi/services/apexrest/auth/forgot-password", {
28
+ const response = await sdk.fetch!("/sfdcapi/services/apexrest/auth/forgot-password", {
29
29
  method: "POST",
30
30
  body: JSON.stringify({ username: value.username.trim() }),
31
31
  headers: {
@@ -4,7 +4,7 @@ import { z } from "zod";
4
4
  import { CenteredPageLayout } from "../layout/centered-page-layout";
5
5
  import { AuthForm } from "../forms/auth-form";
6
6
  import { useAppForm } from "../hooks/form";
7
- import { getDataSDK } from "../lib/data-sdk";
7
+ import { getDataSDK } from "@salesforce/sdk-data";
8
8
  import { ROUTES } from "../authenticationConfig";
9
9
  import { emailSchema, getStartUrl, type AuthResponse } from "../authHelpers";
10
10
  import { handleApiResponse, getErrorMessage } from "../utils/helpers";
@@ -31,7 +31,7 @@ export default function Login() {
31
31
  // You must ensure this Apex class exists in your org and handles the login logic
32
32
  // (e.g., creating a session or returning a token).
33
33
  const sdk = await getDataSDK();
34
- const response = await sdk.fetch("/sfdcapi/services/apexrest/auth/login", {
34
+ const response = await sdk.fetch!("/sfdcapi/services/apexrest/auth/login", {
35
35
  method: "POST",
36
36
  body: JSON.stringify({
37
37
  email: value.email.trim().toLowerCase(),
@@ -1,7 +1,7 @@
1
1
  import { useState, useEffect } from "react";
2
2
  import { z } from "zod";
3
3
 
4
- import { getDataSDK } from "@salesforce/webapp-experimental/api";
4
+ import { getDataSDK } from "@salesforce/sdk-data";
5
5
 
6
6
  import { CenteredPageLayout } from "../layout/centered-page-layout";
7
7
  import { CardSkeleton } from "../layout/card-skeleton";
@@ -4,7 +4,7 @@ import { z } from "zod";
4
4
  import { CenteredPageLayout } from "../layout/centered-page-layout";
5
5
  import { AuthForm } from "../forms/auth-form";
6
6
  import { useAppForm } from "../hooks/form";
7
- import { getDataSDK } from "../lib/data-sdk";
7
+ import { getDataSDK } from "@salesforce/sdk-data";
8
8
  import { ROUTES, AUTH_PLACEHOLDERS } from "../authenticationConfig";
9
9
  import { emailSchema, passwordSchema, getStartUrl, type AuthResponse } from "../authHelpers";
10
10
  import { handleApiResponse, getErrorMessage } from "../utils/helpers";
@@ -48,7 +48,7 @@ export default function Register() {
48
48
  // (e.g., duplicate checks and user creation such as Site.createExternalUser).
49
49
  const { confirmPassword, ...request } = formFieldValues;
50
50
  const sdk = await getDataSDK();
51
- const response = await sdk.fetch("/sfdcapi/services/apexrest/auth/register", {
51
+ const response = await sdk.fetch!("/sfdcapi/services/apexrest/auth/register", {
52
52
  method: "POST",
53
53
  body: JSON.stringify({ request }),
54
54
  headers: {
@@ -5,7 +5,7 @@ import { CenteredPageLayout } from "../layout/centered-page-layout";
5
5
  import { AuthForm } from "../forms/auth-form";
6
6
  import { StatusAlert } from "../alerts/status-alert";
7
7
  import { useAppForm } from "../hooks/form";
8
- import { getDataSDK } from "../lib/data-sdk";
8
+ import { getDataSDK } from "@salesforce/sdk-data";
9
9
  import { ROUTES, AUTH_PLACEHOLDERS } from "../authenticationConfig";
10
10
  import { newPasswordSchema } from "../authHelpers";
11
11
  import { handleApiResponse, getErrorMessage } from "../utils/helpers";
@@ -26,7 +26,7 @@ export default function ResetPassword() {
26
26
  // [Dev Note] Custom Apex Endpoint: /auth/reset-password
27
27
  // You must ensure this Apex class exists in your org
28
28
  const sdk = await getDataSDK();
29
- const response = await sdk.fetch("/sfdcapi/services/apexrest/auth/reset-password", {
29
+ const response = await sdk.fetch!("/sfdcapi/services/apexrest/auth/reset-password", {
30
30
  method: "POST",
31
31
  body: JSON.stringify({ token, newPassword: value.newPassword }),
32
32
  headers: {
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/webapp-template-base-sfdx-project-experimental",
3
- "version": "1.58.0",
3
+ "version": "1.58.2",
4
4
  "description": "Base SFDX project template",
5
5
  "private": true,
6
6
  "files": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/webapp-template-app-react-template-vibe-experimental",
3
- "version": "1.58.0",
3
+ "version": "1.58.2",
4
4
  "description": "Vibe coding starter app template",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "",
@@ -43,5 +43,5 @@
43
43
  }
44
44
  }
45
45
  },
46
- "gitHead": "444ed5b9e2ae4154064d316b06ce9a8be6831b0c"
46
+ "gitHead": "0dda7fdd05f5b8fd9870e57cc796663555166a90"
47
47
  }
@@ -1,116 +0,0 @@
1
- export type Maybe<T> = T | null;
2
- export type InputMaybe<T> = Maybe<T>;
3
- export type Exact<T extends { [key: string]: unknown }> = {
4
- [K in keyof T]: T[K];
5
- };
6
- export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
7
- [SubKey in K]?: Maybe<T[SubKey]>;
8
- };
9
- export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
10
- [SubKey in K]: Maybe<T[SubKey]>;
11
- };
12
- export type MakeEmpty<
13
- T extends { [key: string]: unknown },
14
- K extends keyof T,
15
- > = { [_ in K]?: never };
16
- export type Incremental<T> =
17
- | T
18
- | {
19
- [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;
20
- };
21
- /** All built-in and custom scalars, mapped to their actual values */
22
- export type Scalars = {
23
- ID: { input: string; output: string };
24
- String: { input: string; output: string };
25
- Boolean: { input: boolean; output: boolean };
26
- Int: { input: number; output: number };
27
- Float: { input: number; output: number };
28
- Base64: { input: string; output: string };
29
- Currency: { input: number | string; output: number };
30
- Date: { input: string; output: string };
31
- DateTime: { input: string; output: string };
32
- Double: { input: number | string; output: number };
33
- Email: { input: string; output: string };
34
- EncryptedString: { input: string; output: string };
35
- /** Can be set to an ID or a Reference to the result of another mutation operation. */
36
- IdOrRef: { input: string; output: string };
37
- Latitude: { input: number | string; output: number };
38
- /** A 64-bit signed integer */
39
- Long: { input: number; output: number };
40
- LongTextArea: { input: string; output: string };
41
- Longitude: { input: number | string; output: number };
42
- MultiPicklist: { input: string; output: string };
43
- Percent: { input: number | string; output: number };
44
- PhoneNumber: { input: string; output: string };
45
- Picklist: { input: string; output: string };
46
- RichTextArea: { input: string; output: string };
47
- TextArea: { input: string; output: string };
48
- Time: { input: string; output: string };
49
- Url: { input: string; output: string };
50
- };
51
-
52
- export enum DataType {
53
- Address = 'ADDRESS',
54
- Anytype = 'ANYTYPE',
55
- Base64 = 'BASE64',
56
- Boolean = 'BOOLEAN',
57
- Combobox = 'COMBOBOX',
58
- Complexvalue = 'COMPLEXVALUE',
59
- Currency = 'CURRENCY',
60
- Date = 'DATE',
61
- Datetime = 'DATETIME',
62
- Double = 'DOUBLE',
63
- Email = 'EMAIL',
64
- Encryptedstring = 'ENCRYPTEDSTRING',
65
- Int = 'INT',
66
- Json = 'JSON',
67
- Junctionidlist = 'JUNCTIONIDLIST',
68
- Location = 'LOCATION',
69
- Long = 'LONG',
70
- Multipicklist = 'MULTIPICKLIST',
71
- Percent = 'PERCENT',
72
- Phone = 'PHONE',
73
- Picklist = 'PICKLIST',
74
- Reference = 'REFERENCE',
75
- String = 'STRING',
76
- Textarea = 'TEXTAREA',
77
- Time = 'TIME',
78
- Url = 'URL',
79
- }
80
-
81
- export enum FieldExtraTypeInfo {
82
- ExternalLookup = 'EXTERNAL_LOOKUP',
83
- ImageUrl = 'IMAGE_URL',
84
- IndirectLookup = 'INDIRECT_LOOKUP',
85
- Personname = 'PERSONNAME',
86
- Plaintextarea = 'PLAINTEXTAREA',
87
- Richtextarea = 'RICHTEXTAREA',
88
- SwitchablePersonname = 'SWITCHABLE_PERSONNAME',
89
- }
90
-
91
- export enum ResultOrder {
92
- Asc = 'ASC',
93
- Desc = 'DESC',
94
- }
95
-
96
- export type GetHighRevenueAccountsQueryVariables = Exact<{
97
- minRevenue?: InputMaybe<Scalars['Currency']['input']>;
98
- }>;
99
-
100
- export type GetHighRevenueAccountsQuery = {
101
- uiapi: {
102
- query: {
103
- Account?: {
104
- edges?: Array<{
105
- node?: {
106
- Id: string;
107
- Name?: { value?: string | null } | null;
108
- AnnualRevenue?: { value?: number | null } | null;
109
- Industry?: { value?: string | null } | null;
110
- Website?: { value?: string | null } | null;
111
- } | null;
112
- } | null> | null;
113
- } | null;
114
- };
115
- };
116
- };
@@ -1,41 +0,0 @@
1
- import { getDataSDK } from '@salesforce/webapp-experimental/api';
2
- import HIGH_REVENUE_ACCOUNTS_QUERY from './query/highRevenueAccountsQuery.graphql?raw';
3
- import type {
4
- GetHighRevenueAccountsQuery,
5
- GetHighRevenueAccountsQueryVariables,
6
- } from '../graphql-operations-types';
7
-
8
- type AccountNode = NonNullable<
9
- NonNullable<
10
- NonNullable<
11
- NonNullable<
12
- GetHighRevenueAccountsQuery['uiapi']['query']['Account']
13
- >['edges']
14
- >[number]
15
- >['node']
16
- >;
17
-
18
- /**
19
- * Fetch accounts with annual revenue greater than the specified amount
20
- *
21
- * @param minRevenue - Minimum annual revenue threshold (default: 100000)
22
- * @returns Array of accounts matching the criteria
23
- */
24
- export async function getHighRevenueAccounts(
25
- variables: GetHighRevenueAccountsQueryVariables
26
- ): Promise<(AccountNode | null | undefined)[]> {
27
- const data = await getDataSDK();
28
- const response = await data.graphql?.<
29
- GetHighRevenueAccountsQuery,
30
- GetHighRevenueAccountsQueryVariables
31
- >(HIGH_REVENUE_ACCOUNTS_QUERY, variables);
32
-
33
- if (response?.errors?.length) {
34
- const errorMessages = response.errors.map(e => e.message).join('; ');
35
- throw new Error(`GraphQL Error: ${errorMessages}`);
36
- }
37
-
38
- return (
39
- response?.data?.uiapi?.query?.Account?.edges?.map(edge => edge?.node) || []
40
- );
41
- }
@@ -1,29 +0,0 @@
1
- query GetHighRevenueAccounts($minRevenue: Currency) {
2
- uiapi {
3
- query {
4
- Account(
5
- where: { AnnualRevenue: { gt: $minRevenue } }
6
- orderBy: { AnnualRevenue: { order: DESC } }
7
- first: 50
8
- ) {
9
- edges {
10
- node {
11
- Id
12
- Name {
13
- value
14
- }
15
- AnnualRevenue {
16
- value
17
- }
18
- Industry {
19
- value
20
- }
21
- Website {
22
- value
23
- }
24
- }
25
- }
26
- }
27
- }
28
- }
29
- }
@@ -1,21 +0,0 @@
1
- import { createDataSDK, type DataSDK } from "@salesforce/sdk-data";
2
-
3
- type FetchableSDK = DataSDK & { fetch: typeof fetch };
4
-
5
- let sdkPromise: Promise<FetchableSDK> | null = null;
6
-
7
- /**
8
- * Returns a singleton DataSDK instance with a guaranteed fetch method.
9
- * Lazily initialized on first call; subsequent calls return the same instance.
10
- */
11
- export function getDataSDK(): Promise<FetchableSDK> {
12
- if (!sdkPromise) {
13
- sdkPromise = createDataSDK().then((sdk) => {
14
- if (!sdk.fetch) {
15
- throw new Error("DataSDK fetch is not available on this surface.");
16
- }
17
- return sdk as FetchableSDK;
18
- });
19
- }
20
- return sdkPromise;
21
- }