Skip to main content

ICAFileCapableService

@spartanfx/react v1.2.2


@spartanfx/react / codeapps / ICAFileCapableService

Interface: ICAFileCapableService<TRecord, TId>

Optional file-handling capabilities exposed by some generated services (Dataverse File/Image columns, SharePoint document libraries).

Extends​

Type Parameters​

TRecord​

TRecord

TId​

TId = string

Methods​

create()​

create(record): Promise<ICAResult<TRecord>>;

Create a new record.

Parameters​

record​

Partial<TRecord>

Returns​

Promise<ICAResult<TRecord>>

Inherited from​

ICATabularService.create


delete()​

delete(id): Promise<void | ICAResult<void>>;

Delete a record by id.

Two shapes are accepted so consumers can pass the GENERATED service straight in (it returns Promise<void> and throws on error), and normalized adapters can return ICAResult<void> for parity with the other CRUD methods.

Parameters​

id​

TId

Returns​

Promise<void | ICAResult<void>>

Inherited from​

ICATabularService.delete


downloadFile()?​

optional downloadFile(id, columnName): Promise<ICAResult<Blob>>;

Download a record's file column as Blob.

Parameters​

id​

TId

columnName​

string

Returns​

Promise<ICAResult<Blob>>


get()​

get(id): Promise<ICAResult<TRecord>>;

Retrieve a single record by id.

Parameters​

id​

TId

Returns​

Promise<ICAResult<TRecord>>

Inherited from​

ICATabularService.get


getAll()​

getAll(options?): Promise<ICAResult<TRecord[]>>;

Retrieve multiple records with optional query.

Parameters​

options?​

ICAGetAllOptions

Returns​

Promise<ICAResult<TRecord[]>>

Inherited from​

ICATabularService.getAll


getMetadata()?​

optional getMetadata(options?): Promise<ICAResult<unknown>>;

Optional: fetch Dataverse entity metadata. Present on generated Dataverse services; absent on SharePoint connector services.

Parameters​

options?​

unknown

Returns​

Promise<ICAResult<unknown>>

Inherited from​

ICATabularService.getMetadata


getReferencedEntity()?​

optional getReferencedEntity(searchText, referencedEntity): Promise<ICAResult<unknown>>;

Optional: fetch the option list for a referenced column (Choice, Lookup, Person/Group) on a SharePoint list. Present on generated SharePoint services from PAC CLI 1.50+; absent on Dataverse services. See: https://learn.microsoft.com/en-us/power-apps/developer/code-apps/how-to/sharepoint-operations

Parameters​

searchText​

string

referencedEntity​

string

Returns​

Promise<ICAResult<unknown>>

Inherited from​

ICATabularService.getReferencedEntity


update()​

update(id, changes): Promise<ICAResult<TRecord>>;

Update an existing record. Only changed fields should be sent.

Parameters​

id​

TId

changes​

Partial<TRecord>

Returns​

Promise<ICAResult<TRecord>>

Inherited from​

ICATabularService.update


uploadFile()?​

optional uploadFile(
id,
columnName,
file,
fileName): Promise<ICAResult<void>>;

Upload binary content to a record's file column.

Parameters​

id​

TId

columnName​

string

file​

Blob

fileName​

string

Returns​

Promise<ICAResult<void>>