hyperlink-middleware (show presentation)
- FilterPatterns
- FormatFirebaseDynamicLinksOptions
- HyperlinkProperties
- HyperlinkWatcherInputOptions
- HyperlinkWatcherOptions
- SetMissingUrlProtocolOptions
- SetUtmParametersOptions
- FilterWrapper
- FormatFirebaseDynamicLinksMiddleware
- IgnoreFollowingsMiddleware
- SetMissingUrlProtocolMiddleware
- SetUtmParametersMiddleware
- getDefaultHyperlinkWatcherOptions
- isHyperlinkAllowed
Ƭ DynamicLinkParam: "apn"
| "afl"
| "amv"
| "ibi"
| "ifl"
| "ius"
| "ipfl"
| "ipbi"
| "isi"
| "imv"
| "efr"
| "ofl"
| "st"
| "sd"
| "si"
| "utm_source"
| "utm_medium"
| "utm_campaign"
| "utm_term"
| "utm_content"
| "at"
| "ct"
| "mt"
| "pt"
| "d"
Ref: https://firebase.google.com/docs/dynamic-links/create-manually
middlewares/format-firebase-dynamic-links.ts:15
Ƭ FilterWrapperOptions: FilterPatterns
Ƭ IgnoreFollowingsOptions: FilterPatterns
middlewares/ignore-followings.ts:4
Ƭ Middleware: (properties
: HyperlinkProperties
, element
: Node
| null
, next
: MiddlewareNext
) => void
▸ (properties
, element
, next
): void
Name | Type |
---|---|
properties |
HyperlinkProperties |
element |
Node | null |
next |
MiddlewareNext |
void
Ƭ MiddlewareNext: (properties?
: HyperlinkProperties
) => void
▸ (properties?
): void
Middleware interface to respect to chain middleware in a composition
Name | Type |
---|---|
properties? |
HyperlinkProperties |
void
Ƭ UtmParam: UtmParamEnum.Source
| UtmParamEnum.Medium
| UtmParamEnum.Campaign
| UtmParamEnum.Content
| UtmParamEnum.Name
| UtmParamEnum.Term
| UtmParamEnum.InitialSource
| UtmParamEnum.InitialMedium
| UtmParamEnum.InitialCampaign
| UtmParamEnum.InitialContent
| UtmParamEnum.InitialName
| UtmParamEnum.InitialTerm
middlewares/set-utm-parameters.ts:18
▸ FilterWrapper(middleware
, options
): Middleware
The wrapper to filter middlewares helps applying or not the passed middleware depending on the hyperlink matching the conditions
Name | Type |
---|---|
middleware |
Middleware |
options |
FilterPatterns |
▸ FormatFirebaseDynamicLinksMiddleware(options
): Middleware
UTM middleware to inject predefined parameters into links depending on options
Name | Type |
---|---|
options |
FormatFirebaseDynamicLinksOptions |
middlewares/format-firebase-dynamic-links.ts:62
▸ IgnoreFollowingsMiddleware(options?
): Middleware
Depending on parameters rules will not call the following chained middlewares
Name | Type |
---|---|
options? |
FilterPatterns |
middlewares/ignore-followings.ts:7
▸ SetMissingUrlProtocolMiddleware(options?
): Middleware
If the hyperlink URL starts with //
(like //example.com
) it means the browser will in all case try to use the current protocol.
This middleware adds the protocol to the URL to facilicate the next middlewares that in majority use new URL()
that would fail without a protocol
Reminder: it's not advised to use this because if the HTML file is saved locally and open with the file://
protocol, the link would not work
Name | Type |
---|---|
options? |
SetMissingUrlProtocolOptions |
middlewares/set-missing-url-protocol.ts:13
▸ SetUtmParametersMiddleware(options
): Middleware
UTM middleware to inject predefined parameters into links depending on options
Name | Type |
---|---|
options |
SetUtmParametersOptions |
middlewares/set-utm-parameters.ts:38
▸ getDefaultHyperlinkWatcherOptions(): HyperlinkWatcherOptions
▸ isHyperlinkAllowed(href
, filters
): boolean
Helper to let it pass or not depending on the hyperlink input
Name | Type |
---|---|
href |
string |
filters |
FilterPatterns |
boolean