Skip to main content

ESPCDFGroupSharingRequest

ESPCDFGroupSharingRequest represents an incoming or outgoing group share invitation. Use it when the user accepts, declines, or removes a pending share — not for everyday group editing (see ESPCDFGroup).

Requests are returned from ESPCDFUser.getIssuedGroupSharingRequests and getReceivedGroupSharingRequests. Stores update via UserStoreSynchronizer after each operation.


Properties

PropertyTypeDescription
idstringRequest id
statusESPCDFGroupSharingStatusPending, accepted, etc.
groupIdsstring[]Groups included in the request
groupnamesstring[]Display names
usernamestringInvolved user
primaryUsernamestringGroup owner
transferbooleanOwnership transfer vs share
operationsESPCDFGroupSharingRequestOperationSDK delegates
_rawanyOriginal SDK object
eventsESPCDFOperationEventEmitterOperation bus

Common Workflows

Load sharing requests

import { initCDF } from "@espressif/rainmaker-base-cdf";

const espCDF = await initCDF({ sdkAdaptorRegistry });
const user = espCDF.userStore.user!;

const issued = await user.getIssuedGroupSharingRequests(20);
const received = await user.getReceivedGroupSharingRequests(20);

const request = received.data?.[0];

Accept or decline an invitation

await request!.accept();
// or
await request!.decline();

Remove a request record

await request!.remove();

Error Handling

accept, decline, and remove treat API responses with status !== "success" as operation failures on the event bus (synchronizer may skip store patches):

try {
const res = await request!.accept();
if (res.status !== "success") {
showErrorBanner(res.description ?? "Accept failed");
}
} catch (e) {
showErrorBanner("Network error");
}

On this page