Home > @uniformdev/mesh-edgehancer-sdk

mesh-edgehancer-sdk package

Functions

<table><thead><tr><th>

Function

</th><th>

Description

</th></tr></thead> <tbody><tr><td>

convertBatchResultsToEdgehancerResult({ batch, batchFetchIds: { invalidBatchIndices, validIdToOriginalIndexMap }, batchResults, resolveIdFromBatchResultFn, knownInvalidErrorMessage, missingBatchResultErrorMessage, })

</td><td>

Given a batch of data resources and their batch-fetch results, convert them into a result that can be returned from a request hook.

</td></tr> <tr><td>

getDataResourceAsRequest(data)

</td><td>

Converts a data resource to a Request object suitable to pass to fetch()

</td></tr> <tr><td>

getDataResourceHeaders({ headers })

</td><td>

Gets the HTTP headers for a data resource

</td></tr> <tr><td>

getDataResourceQueryString({ parameters, url })

</td><td>

Gets the query string for a data resource, returns a properly URL-encoded string

</td></tr> <tr><td>

getDataResourceUrl(dataResource)

</td><td>

Gets the request URL for a data resource, including the url and any query parameters

</td></tr> <tr><td>

resolveBatchFetchIds(batch, resolveBatchItemIdFn)

</td><td>

Given a batch of data resources to fetch, and a function to extract a batch-fetch ID from each resource, returns the valid IDs to fetch in a batch.

</td></tr> </tbody></table>

Variables

<table><thead><tr><th>

Variable

</th><th>

Description

</th></tr></thead> <tbody><tr><td>

dataResourceSchema

</td><td>

</td></tr> <tr><td>

edgehancerMergedDataTypeSchema

</td><td>

</td></tr> <tr><td>

mergedDataTypeSchema

</td><td>

</td></tr> <tr><td>

preRequestEdgehancerDataResourceResultSchema

</td><td>

</td></tr> <tr><td>

preRequestEdgehancerResultSchema

</td><td>

</td></tr> <tr><td>

requestEdgehancerDataResourceResolutionResultSchema

</td><td>

</td></tr> <tr><td>

requestEdgehancerResultSchema

</td><td>

</td></tr> </tbody></table>

Type Aliases

<table><thead><tr><th>

Type Alias

</th><th>

Description

</th></tr></thead> <tbody><tr><td>

ConvertBatchResultsToEdgehancerResultOptions

</td><td>

</td></tr> <tr><td>

CustomEdgehancerDefinition

</td><td>

Declaration of custom edgehancer hooks on a merged data type

</td></tr> <tr><td>

DataResource

</td><td>

A data resource of JSON data retrieved from a data type/data source

</td></tr> <tr><td>

DataResourceFetchContext

</td><td>

The context we are fetching the data resource in:

  • testing: when a data type is being tested in the UI using an ephemeral data resource - editing: the data resource is being fetched as part of editing a draft of a composition or entry - normal: the data resource is being fetched as part of rendering a composition or entry

NOTE: using the getDataResource() function from integration UI will have the same fetch context as the parent composition/entry data, i.e. 'editing' NOTE: this is subject to additive change

</td></tr> <tr><td>

EdgehancerMergedDataType

</td><td>

</td></tr> <tr><td>

MergedDataType

</td><td>

The result of merging a data source with a data type into a single request object

</td></tr> <tr><td>

PreRequestEdgehancerContext

</td><td>

</td></tr> <tr><td>

PreRequestEdgehancerDataResourceContext

</td><td>

</td></tr> <tr><td>

PreRequestEdgehancerDataResourceResult

</td><td>

</td></tr> <tr><td>

PreRequestEdgehancerResult

</td><td>

</td></tr> <tr><td>

PreRequestHookFn

</td><td>

</td></tr> <tr><td>

RequestEdgehancerContext

</td><td>

</td></tr> <tr><td>

RequestEdgehancerDataResourceContext

</td><td>

</td></tr> <tr><td>

RequestEdgehancerDataResourceResolutionResult

</td><td>

</td></tr> <tr><td>

RequestEdgehancerResult

</td><td>

</td></tr> <tr><td>

RequestHookFn

</td><td>

</td></tr> <tr><td>

ResolveBatchIdsResult

</td><td>

</td></tr> </tbody></table>