Skip to content

Commit

Permalink
[FIX] types
Browse files Browse the repository at this point in the history
  • Loading branch information
omrilotan committed Sep 26, 2023
1 parent f19791f commit 71f6f10
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 1.1.1

## Fix

- Fix "types"

# 1.1.0

## New features
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "perimeterx-axios-interceptor",
"version": "1.1.0",
"version": "1.1.1",
"description": "🧱 Intercept requests which are blocked by PerimeterX - pop up the challenge and retry the request",
"keywords": [
"perimeterx",
Expand Down
26 changes: 17 additions & 9 deletions types.d.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
import { AxiosInstance, AxiosError } from 'axios';

interface FilterOptions {
path: string;
path?: string;
appId?: string;
[key: string]: any;
}

export interface PerimeterXInterceptorConfig {
filter: (options: FilterOptions) => boolean;
onintercept: (request: Request) => void;
onignore: (request: Request) => void;
onsuccess: (request: Request) => void;
onfailure: (request: Request, error: AxiosError) => void;
onerror: (error: AxiosError) => void;
modalConfig: {
timeout: number;
filter?: (options: FilterOptions) => boolean;
onintercept?: (request: Request) => void;
onignore?: (request: Request) => void;
onsuccess?: (request: Request) => void;
onfailure?: (request: Request, error: AxiosError) => void;
onerror?: (error: AxiosError) => void;
simulate?: boolean;
modalConfig?: {
className?: string;
title?: string;
subtitle?: string;
quickfixes?: string[];
suffix?: string;
timeout?: number;
allowClose?: boolean;
}
}

Expand Down

0 comments on commit 71f6f10

Please sign in to comment.