vue-axios-http
Advanced tools
Comparing version 3.3.2 to 3.3.3
@@ -5,2 +5,9 @@ # Changelog | ||
### [3.3.3](https://github.com/chantouchsek/vue-axios-http/compare/v3.3.2...v3.3.3) (2023-09-27) | ||
### Bug Fixes | ||
* :bug: remove object return types from first function ([5fdfe01](https://github.com/chantouchsek/vue-axios-http/commit/5fdfe0106fe9487467cafa9039928ff47d992705)) | ||
### [3.3.2](https://github.com/chantouchsek/vue-axios-http/compare/v3.3.1...v3.3.2) (2023-09-26) | ||
@@ -7,0 +14,0 @@ |
/// <reference types="@types/qs" /> | ||
import type { SimpleObject } from '../types'; | ||
import type { AxiosInstance, Method, AxiosRequestConfig, AxiosResponse } from 'axios'; | ||
@@ -6,3 +7,3 @@ import type { IParseOptions } from 'qs'; | ||
readonly endpoint: string; | ||
parameters: Record<string, any>; | ||
parameters: SimpleObject<any>; | ||
errors: import("./Validator").ValidatorType; | ||
@@ -13,3 +14,3 @@ static $http: AxiosInstance; | ||
static $parsedQs: IParseOptions; | ||
constructor(endpoint: string, parameters?: Record<string, any>); | ||
constructor(endpoint: string, parameters?: SimpleObject<any>); | ||
get $http(): AxiosInstance; | ||
@@ -31,9 +32,9 @@ get $errorProperty(): string; | ||
private __getParameterString; | ||
setParameters(parameters: Record<string, any>): this; | ||
setParameters(parameters: SimpleObject<any>): this; | ||
setParameter(parameter: string, value?: any): this; | ||
removeParameters(parameters?: string[]): this; | ||
removeParameter(parameter: string): this; | ||
onFail(errors: Record<string, any>): void; | ||
onFail(errors: SimpleObject<any>): void; | ||
beforeSubmit(): void; | ||
onSuccess(): void; | ||
} |
@@ -0,17 +1,18 @@ | ||
import type { SimpleObject } from '../types'; | ||
declare class Validator { | ||
errors: Record<string, any>; | ||
errors: SimpleObject<any>; | ||
successful: boolean; | ||
processing: boolean; | ||
constructor(errors?: Record<string, any>); | ||
constructor(errors?: SimpleObject<any>); | ||
add(field: string, message: string, forceUpdate?: boolean): void; | ||
has(field: string | string[]): boolean; | ||
first(field: string | string[]): string | Record<string, any> | undefined; | ||
firstBy(obj: Record<string, any>, field?: string): string; | ||
first(field: string | string[]): string | undefined; | ||
firstBy(obj: SimpleObject<any>, field?: string): string; | ||
missed(field: string | string[]): boolean; | ||
nullState(field: string | string[]): boolean | null; | ||
any(field?: string[], returnObject?: boolean): boolean | Record<string, any>; | ||
any(field?: string[], returnObject?: boolean): boolean | SimpleObject<any>; | ||
get(field: string): string | string[]; | ||
all(): Record<string, any>; | ||
all(): SimpleObject<any>; | ||
count(): number; | ||
fill(errors: Record<string, any>): void; | ||
fill(errors: SimpleObject<any>): void; | ||
flush(): void; | ||
@@ -18,0 +19,0 @@ clear(field?: string | string[]): void; |
{ | ||
"name": "vue-axios-http", | ||
"version": "3.3.2", | ||
"version": "3.3.3", | ||
"description": "Elegant and simple way to build requests for REST API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
58600
30
664