Home > @uniformdev/mesh-edgehancer-sdk

mesh-edgehancer-sdk package

Functions

FunctionDescription
convertBatchResultsToEdgehancerResult({ batch, batchFetchIds: { invalidBatchIndices, validIdToOriginalIndexMap }, batchResults, resolveIdFromBatchResultFn, knownInvalidErrorMessage, missingBatchResultErrorMessage, })Given a batch of data resources and their batch-fetch results, convert them into a result that can be returned from a request hook.
getDataResourceAsRequest(data)Converts a data resource to a Request object suitable to pass to fetch()
getDataResourceHeaders({ headers })Gets the HTTP headers for a data resource
getDataResourceQueryString({ parameters, url })Gets the query string for a data resource, returns a properly URL-encoded string
getDataResourceUrl(dataResource)Gets the request URL for a data resource, including the url and any query parameters
resolveBatchFetchIds(batch, resolveBatchItemIdFn)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.

Variables

VariableDescription
COLLECTION_DEFAULT_LIMIT
COLLECTION_DEFAULT_OFFSET
COLLECTION_MAX_LIMIT
dataResourceSchema
edgehancerMergedDataTypeSchema
mergedDataTypeSchema
preRequestEdgehancerDataResourceResultSchema
preRequestEdgehancerResultSchema
requestEdgehancerDataResourceResolutionResultSchema
requestEdgehancerResultSchema
resolvingIssueSchema

Type Aliases

Type AliasDescription
ConvertBatchResultsToEdgehancerResultOptions
CustomEdgehancerDefinitionDeclaration of custom edgehancer hooks on a merged data type
DataResourceA data resource of JSON data retrieved from a data type/data source
DataResourceFetchContext<p>The context we are fetching the data resource in:</p><p>- 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</p><p>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</p>
EdgehancerDataIssue
EdgehancerMergedDataType
MergedDataTypeThe result of merging a data source with a data type into a single request object
PreRequestEdgehancerContext
PreRequestEdgehancerDataResourceContext
PreRequestEdgehancerDataResourceResult
PreRequestEdgehancerResult
PreRequestHookFn
RequestEdgehancerContext
RequestEdgehancerDataResourceContext
RequestEdgehancerDataResourceResolutionResult
RequestEdgehancerResult
RequestHookFn
ResolveBatchIdsResult