modules
@appfire/fuse-http-client / Exports
@appfire/fuse-http-client
Table of contents
Classes
Type Aliases
- ActionFunction
- BackOffOptions
- ConfigType
- ConfluenceConfig
- ConfluenceKeyType
- HttpConfig
- HttpResponse
- IBackOffOptions
- Input
- JiraConfig
- JiraKeyType
- JitterType
- MondayConfig
- MondayKeyType
- MondaySdkTokenResponse
- ParamsType
- ProductType
- RetryFunction
- ServiceConfig
Type Aliases
ActionFunction
Ƭ ActionFunction<T
>: () => Promise
<T
>
Type parameters
Name |
---|
T |
Type declaration
▸ (): Promise
<T
>
Returns
Promise
<T
>
Defined in
BackOffOptions
Ƭ BackOffOptions: Partial
<IBackOffOptions
>
Defined in
ConfigType
Ƭ ConfigType<T
>: T
extends JiraKeyType
? JiraConfig
: T
extends MondayKeyType
? MondayConfig
: ConfluenceConfig
Type parameters
Name |
---|
T |
Defined in
ConfluenceConfig
Ƭ ConfluenceConfig: ServiceConfig
Defined in
ConfluenceKeyType
Ƭ ConfluenceKeyType: "Confluence"
Defined in
HttpConfig
Ƭ HttpConfig<T
>: Object
Type parameters
Name | Type |
---|---|
T | Record <string , unknown > |
Type declaration
Name | Type |
---|---|
appfireUrl? | string |
config? | { headers : Record <string , string > } |
config.headers | Record <string , string > |
requestBody | T |
Defined in
HttpResponse
Ƭ HttpResponse<T
>: Object
Type parameters
Name |
---|
T |
Type declaration
Name | Type |
---|---|
data | T |
status | number |
Defined in
IBackOffOptions
Ƭ IBackOffOptions: Object
Type declaration
Name | Type | Description |
---|---|---|
delayFirstAttempt | boolean | Decides whether the startingDelay should be applied before the first call. If false, the first call will occur without a delay. Default ts false |
jitter | JitterType | Decides whether a jitter should be applied to the delay. Possible values are full and none. Default ts none |
logRetry | boolean | logs error and current attempt when retryFn is not passes Default ts true |
maxDelay | number | The maximum delay, in milliseconds, between two consecutive attempts. Default ts Infinity |
numOfAttempts | number | The maximum number of times to attempt the function. Default ts 10 Min 1 |
retryFn? | RetryFunction | Param Error Param current attempt Number Default ts By default, returns true and retries until retries exhausts or retry is successful. It also logs error using console.error and prints current attempt number. returns false will end execution |
startingDelay | number | The delay, in milliseconds, before executing the function for the first time. Default ts 100ms |
timeMultiple | number | The startingDelay is multiplied by the timeMultiple to increase the delay between reattempts. Default ts 2 |
Defined in
Input
Ƭ Input<T
>: Object
Type parameters
Name |
---|
T |
Type declaration
Name | Type |
---|---|
backOffOptions? | BackOffOptions |
httpConfig | HttpConfig <T > |
tokenFn? | () => string | Promise <string > |
Defined in
JiraConfig
Ƭ JiraConfig: ServiceConfig
Defined in
JiraKeyType
Ƭ JiraKeyType: "Jira"
Defined in
JitterType
Ƭ JitterType: "none"
| "full"
Defined in
MondayConfig
Ƭ MondayConfig: ServiceConfig
Defined in
MondayKeyType
Ƭ MondayKeyType: "Monday"
Defined in
MondaySdkTokenResponse
Ƭ MondaySdkTokenResponse: Object
Type declaration
Name | Type |
---|---|
data | string |
Defined in
ParamsType
Ƭ ParamsType: Record
<string
, unknown
>
Defined in
ProductType
Ƭ ProductType: MondayKeyType
| JiraKeyType
| ConfluenceKeyType
Defined in
RetryFunction
Ƭ RetryFunction: (e
: unknown
, attempt
: number
) => boolean
| Promise
<boolean
>
Type declaration
▸ (e
, attempt
): boolean
| Promise
<boolean
>
Parameters
Name | Type |
---|---|
e | unknown |
attempt | number |
Returns
boolean
| Promise
<boolean
>
Defined in
ServiceConfig
Ƭ ServiceConfig: Object
Type declaration
Name | Type |
---|---|
appKey | string |
backOffOptions? | BackOffOptions |
cacheDuration? | number |
customHeaders? | Record <string , string > |
fingerprintAccessKey? | string |
fingerprintEndpoint? | string |
serviceUrl | string |
tokenFn? | () => string | Promise <string > |