@salesforce/webapp-template-app-react-sample-b2e-experimental 1.53.2 → 1.54.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/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
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.54.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.54.0...v1.54.1) (2026-02-25)
7
+
8
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
9
+
10
+
11
+
12
+
13
+
14
+ # [1.54.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.53.2...v1.54.0) (2026-02-25)
15
+
16
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
17
+
18
+
19
+
20
+
21
+
6
22
  ## [1.53.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.53.1...v1.53.2) (2026-02-25)
7
23
 
8
24
 
@@ -1,4 +1,4 @@
1
- import { executeGraphQL } from "@salesforce/webapp-experimental/api";
1
+ import { getDataSDK } from "@salesforce/webapp-experimental/api";
2
2
  import type { DashboardMetrics, Application } from "../lib/types.js";
3
3
  import { gql } from "./utils.js";
4
4
  import type {
@@ -103,7 +103,15 @@ export async function getDashboardMetrics(): Promise<{
103
103
  properties: any[];
104
104
  maintenanceRequests: any[];
105
105
  }> {
106
- const response = await executeGraphQL<GetDashboardMetricsQuery>(GET_DASHBOARD_METRICS);
106
+ const data = await getDataSDK();
107
+ const result = await data.graphql?.<GetDashboardMetricsQuery>(GET_DASHBOARD_METRICS);
108
+
109
+ if (result?.errors?.length) {
110
+ const errorMessages = result.errors.map((e) => e.message).join("; ");
111
+ throw new Error(`GraphQL Error: ${errorMessages}`);
112
+ }
113
+
114
+ const response = result?.data;
107
115
  const properties = response?.uiapi?.query?.allProperties?.edges?.map((edge) => edge?.node) || [];
108
116
  const maintenanceRequests =
109
117
  response?.uiapi?.query?.maintenanceRequests?.edges?.map((edge) => edge?.node) || [];
@@ -113,9 +121,19 @@ export async function getDashboardMetrics(): Promise<{
113
121
  // Fetch open applications
114
122
  export async function getOpenApplications(first: number = 5): Promise<Application[]> {
115
123
  const variables: GetOpenApplicationsQueryVariables = { first };
116
- const response = await executeGraphQL<GetOpenApplicationsQuery>(GET_OPEN_APPLICATIONS, variables);
124
+ const data = await getDataSDK();
125
+ const result = await data.graphql?.<GetOpenApplicationsQuery, GetOpenApplicationsQueryVariables>(
126
+ GET_OPEN_APPLICATIONS,
127
+ variables,
128
+ );
129
+
130
+ if (result?.errors?.length) {
131
+ const errorMessages = result.errors.map((e) => e.message).join("; ");
132
+ throw new Error(`GraphQL Error: ${errorMessages}`);
133
+ }
134
+
117
135
  const apps =
118
- response?.uiapi?.query?.Application__c?.edges?.map((edge) =>
136
+ result?.data?.uiapi?.query?.Application__c?.edges?.map((edge) =>
119
137
  transformApplication(edge?.node),
120
138
  ) || [];
121
139
  return apps;
@@ -124,8 +142,15 @@ export async function getOpenApplications(first: number = 5): Promise<Applicatio
124
142
  // Fetch current user information
125
143
  export async function getUserInfo(): Promise<{ name: string; id: string } | null> {
126
144
  try {
127
- const response = await executeGraphQL<GetUserInfoQuery>(GET_USER_INFO);
128
- const user = response?.uiapi?.query?.User?.edges?.[0]?.node;
145
+ const data = await getDataSDK();
146
+ const result = await data.graphql?.<GetUserInfoQuery>(GET_USER_INFO);
147
+
148
+ if (result?.errors?.length) {
149
+ const errorMessages = result.errors.map((e) => e.message).join("; ");
150
+ throw new Error(`GraphQL Error: ${errorMessages}`);
151
+ }
152
+
153
+ const user = result?.data?.uiapi?.query?.User?.edges?.[0]?.node;
129
154
  if (user) {
130
155
  return {
131
156
  id: user.Id,
@@ -1,4 +1,4 @@
1
- import { executeGraphQL } from "@salesforce/webapp-experimental/api";
1
+ import { getDataSDK } from "@salesforce/webapp-experimental/api";
2
2
  import type { MaintenanceRequest } from "../lib/types.js";
3
3
  import { gql } from "./utils.js";
4
4
  import type {
@@ -130,12 +130,19 @@ const GET_ALL_MAINTENANCE_REQUESTS = gql`
130
130
  // Fetch maintenance requests for dashboard
131
131
  export async function getMaintenanceRequests(first: number = 5): Promise<MaintenanceRequest[]> {
132
132
  const variables: GetMaintenanceRequestsQueryVariables = { first };
133
- const response = await executeGraphQL<GetMaintenanceRequestsQuery>(
134
- GET_MAINTENANCE_REQUESTS,
135
- variables,
136
- );
133
+ const data = await getDataSDK();
134
+ const result = await data.graphql?.<
135
+ GetMaintenanceRequestsQuery,
136
+ GetMaintenanceRequestsQueryVariables
137
+ >(GET_MAINTENANCE_REQUESTS, variables);
138
+
139
+ if (result?.errors?.length) {
140
+ const errorMessages = result.errors.map((e) => e.message).join("; ");
141
+ throw new Error(`GraphQL Error: ${errorMessages}`);
142
+ }
143
+
137
144
  const requests =
138
- response?.uiapi?.query?.Maintenance_Request__c?.edges?.map((edge) =>
145
+ result?.data?.uiapi?.query?.Maintenance_Request__c?.edges?.map((edge) =>
139
146
  transformMaintenanceRequest(edge?.node),
140
147
  ) || [];
141
148
  return requests;
@@ -146,12 +153,19 @@ export async function getAllMaintenanceRequests(
146
153
  first: number = 100,
147
154
  ): Promise<MaintenanceRequest[]> {
148
155
  const variables: GetAllMaintenanceRequestsQueryVariables = { first };
149
- const response = await executeGraphQL<GetAllMaintenanceRequestsQuery>(
150
- GET_ALL_MAINTENANCE_REQUESTS,
151
- variables,
152
- );
156
+ const data = await getDataSDK();
157
+ const result = await data.graphql?.<
158
+ GetAllMaintenanceRequestsQuery,
159
+ GetAllMaintenanceRequestsQueryVariables
160
+ >(GET_ALL_MAINTENANCE_REQUESTS, variables);
161
+
162
+ if (result?.errors?.length) {
163
+ const errorMessages = result.errors.map((e) => e.message).join("; ");
164
+ throw new Error(`GraphQL Error: ${errorMessages}`);
165
+ }
166
+
153
167
  const requests =
154
- response?.uiapi?.query?.Maintenance_Request__c?.edges?.map((edge: any) =>
168
+ result?.data?.uiapi?.query?.Maintenance_Request__c?.edges?.map((edge: any) =>
155
169
  transformMaintenanceTaskFull(edge?.node),
156
170
  ) || [];
157
171
  return requests;
@@ -1,4 +1,4 @@
1
- import { executeGraphQL } from "@salesforce/webapp-experimental/api";
1
+ import { getDataSDK } from "@salesforce/webapp-experimental/api";
2
2
  import type { Property } from "../lib/types.js";
3
3
  import { gql } from "./utils.js";
4
4
  import type {
@@ -102,7 +102,18 @@ export async function getProperties(first: number = 12, after?: string): Promise
102
102
  variables.after = after;
103
103
  }
104
104
 
105
- const response = await executeGraphQL<GetPropertiesQuery>(GET_PROPERTIES_PAGINATED, variables);
105
+ const data = await getDataSDK();
106
+ const result = await data.graphql?.<GetPropertiesQuery, GetPropertiesQueryVariables>(
107
+ GET_PROPERTIES_PAGINATED,
108
+ variables,
109
+ );
110
+
111
+ if (result?.errors?.length) {
112
+ const errorMessages = result.errors.map((e) => e.message).join("; ");
113
+ throw new Error(`GraphQL Error: ${errorMessages}`);
114
+ }
115
+
116
+ const response = result?.data;
106
117
  const edges = response?.uiapi?.query?.Property__c?.edges || [];
107
118
  const pageInfo = response?.uiapi?.query?.Property__c?.pageInfo || {
108
119
  hasNextPage: false,
@@ -1,4 +1,4 @@
1
- import { executeGraphQL } from '@salesforce/webapp-experimental/api';
1
+ import { getDataSDK } from '@salesforce/webapp-experimental/api';
2
2
  import HIGH_REVENUE_ACCOUNTS_QUERY from './query/highRevenueAccountsQuery.graphql?raw';
3
3
  import type {
4
4
  GetHighRevenueAccountsQuery,
@@ -24,10 +24,18 @@ type AccountNode = NonNullable<
24
24
  export async function getHighRevenueAccounts(
25
25
  variables: GetHighRevenueAccountsQueryVariables
26
26
  ): Promise<(AccountNode | null | undefined)[]> {
27
- const response = await executeGraphQL<GetHighRevenueAccountsQuery>(
28
- HIGH_REVENUE_ACCOUNTS_QUERY,
29
- variables
30
- );
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
+ }
31
37
 
32
- return response.uiapi?.query?.Account?.edges?.map(edge => edge?.node) || [];
38
+ return (
39
+ response?.data?.uiapi?.query?.Account?.edges?.map(edge => edge?.node) || []
40
+ );
33
41
  }
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/webapp-template-base-sfdx-project-experimental",
3
- "version": "1.53.2",
3
+ "version": "1.54.1",
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-sample-b2e-experimental",
3
- "version": "1.53.2",
3
+ "version": "1.54.1",
4
4
  "description": "B2E 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": "8866eb09bf1e24f023333d1ecc491a1e1a6c8904"
46
+ "gitHead": "6defeb0540e40000b92f0c88fc822cf8de1758b9"
47
47
  }