Skip to content

Latest commit

 

History

History
223 lines (172 loc) · 5.96 KB

API.md

File metadata and controls

223 lines (172 loc) · 5.96 KB

Classes

ContextHelper

A helper for working with the Franklin Universal context

FetchRetry

Support for retriable requests

SchemaValidator

Loads schemas from this project in the schemas directory and supports validating objects against the schemas.

Functions

extractAwsConfig()
getLog()
extractOriginalEvent()
extractSqsRecords()

Typedefs

BlobStorageConfig : Object
AwsCredentials : Object
AwsConfig : Object
Logger : Object
UniversalishContext : Object
RetryConfig
QueueConfig : AwsConfig | QueueConfigExt
QueueRecord : Object
HandlerPromise.<Response>

Function for handling a routes inside Frankin / Content Lake services

SecretConfig : AwsConfig | SecretConfigExt

SchemaValidator

Loads schemas from this project in the schemas directory and supports validating objects against the schemas.

Kind: global class

schemaValidator.validateIngestionRequest(ingestionRequest, additionalRequiredData)

Validates the ingestionRequest object against the Ingestion Request schema as specified in https://wiki.corp.adobe.com/display/WEM/Ingestor+API+Contract

Kind: instance method of SchemaValidator
See: https://wiki.corp.adobe.com/display/WEM/Ingestor+API+Contract?

Param Type
ingestionRequest any
additionalRequiredData Array.<string>

extractAwsConfig()

Deprecated

Kind: global function

getLog()

Deprecated

Kind: global function

extractOriginalEvent()

Deprecated

Kind: global function

extractSqsRecords()

Deprecated

Kind: global function

BlobStorageConfig : Object

Kind: global typedef
Properties

Name Type
bucket string
[client] S3

AwsCredentials : Object

Kind: global typedef
Properties

Name Type
accessKeyId string
secretAccessKey string
[sessionToken] string

AwsConfig : Object

Kind: global typedef
Properties

Name Type
credentials AwsCredentials
region string

Logger : Object

Kind: global typedef
Properties

Name Type
debug function
info function
warn function
error function

UniversalishContext : Object

Kind: global typedef
Properties

Name Type
[env] Record.<string, string>
[func] Object
[log] Logger
[invocation] Object

RetryConfig

Kind: global typedef
Properties

Name Type
[retries] number
[retryOn] Array.<number>
[log] any

QueueConfig : AwsConfig | QueueConfigExt

Kind: global typedef
Properties

Name Type
[blobStorage] BlobStorage
[client] SQSClient
[log] Logger
queueUrl string

QueueRecord : Object

Kind: global typedef
Properties

Name Type
messageId string
receiptHandle string
body string
attributes Record.<string, any>
messageAttributes Record.<string, any>
eventSource string

Handler ⇒ Promise.<Response>

Function for handling a routes inside Frankin / Content Lake services

Kind: global typedef
Returns: Promise.<Response> - the response from the request

Param Type Description
req Request the request
context UniversalContext the context of the request
params Record.<string, string> the parameters parsed from the request

SecretConfig : AwsConfig | SecretConfigExt

Kind: global typedef
Properties

Name Type
[client] SecretsManagerClient