vue-axios-http
Advanced tools
Comparing version 3.4.0 to 3.4.1
@@ -5,2 +5,9 @@ # Changelog | ||
### [3.4.1](https://github.com/chantouchsek/vue-axios-http/compare/v3.4.0...v3.4.1) (2024-04-30) | ||
### Bug Fixes | ||
* :label: cast types and fix ternary condition ([70c0451](https://github.com/chantouchsek/vue-axios-http/commit/70c0451f4c86ee4b4e54a252babafecbaf4ae0a6)) | ||
## [3.4.0](https://github.com/chantouchsek/vue-axios-http/compare/v3.3.3...v3.4.0) (2024-04-30) | ||
@@ -7,0 +14,0 @@ |
@@ -18,13 +18,13 @@ /// <reference types="@types/qs" /> | ||
get $parsedQs(): IParseOptions; | ||
all<T = any>(): Promise<AxiosResponse<T, any>>; | ||
find<T = any>(id: number | string): Promise<AxiosResponse<T, any>>; | ||
post<T = any>(payload: any, config?: AxiosRequestConfig): Promise<AxiosResponse<T, any>>; | ||
store<T = any>(payload: any, config?: AxiosRequestConfig): Promise<AxiosResponse<T, any>>; | ||
put<T = any>(id: any, payload?: any, config?: AxiosRequestConfig): Promise<AxiosResponse<T, any>>; | ||
patch<T = any>(id: any, payload?: any, config?: AxiosRequestConfig): Promise<AxiosResponse<T, any>>; | ||
update<T = any>(id: string | number, payload: any): Promise<AxiosResponse<T, any>>; | ||
delete<T = any>(id: string | number): Promise<AxiosResponse<T, any>>; | ||
remove<T = any>(id: string | number): Promise<AxiosResponse<T, any>>; | ||
$submit<T = any, F = any>(method: Method, param?: string | number, form?: F, config?: AxiosRequestConfig): Promise<AxiosResponse<AxiosResponse<T, any>, any>>; | ||
submit<T = any, F = any>(method: Method, url?: string | number, form?: F, config?: AxiosRequestConfig): Promise<AxiosResponse<T, any>>; | ||
all<T = any>(): Promise<T>; | ||
find<T = any>(id: number | string): Promise<T>; | ||
post<T = any>(payload: any, config?: AxiosRequestConfig): Promise<T>; | ||
store<T = any>(payload: any, config?: AxiosRequestConfig): Promise<T>; | ||
put<T = any>(id: any, payload?: any, config?: AxiosRequestConfig): Promise<T>; | ||
patch<T = any>(id: any, payload?: any, config?: AxiosRequestConfig): Promise<T>; | ||
update<T = any>(id: string | number, payload: any): Promise<T>; | ||
delete<T = any>(id: string | number): Promise<T>; | ||
remove<T = any>(id: string | number): Promise<T>; | ||
$submit<T = any, F = any>(method: Method, param?: string | number, form?: F, config?: AxiosRequestConfig): Promise<AxiosResponse<T, any>>; | ||
submit<T = any, F = any>(method: Method, url?: string | number, form?: F, config?: AxiosRequestConfig): Promise<T>; | ||
private __getParameterString; | ||
@@ -31,0 +31,0 @@ setParameters(parameters: SimpleObject<any>): this; |
@@ -25,3 +25,3 @@ "use strict"; | ||
const fields = this.fields((0, lodash_1.castArray)(field)); | ||
const foundField = fields.find((f) => (0, lodash_1.has)(this.errors, f)) ?? ''; | ||
const foundField = fields.find((f) => (0, lodash_1.has)(this.errors, f)) || ''; | ||
const value = this.get(foundField); | ||
@@ -28,0 +28,0 @@ return Array.isArray(value) ? value[0] : value; |
import BaseService from '../core/BaseService'; | ||
declare class PostService extends BaseService { | ||
constructor(parameters?: {}); | ||
tags<T = any>(id: string | number): Promise<import("axios").AxiosResponse<T, any>>; | ||
tags<T = any>(id: string | number): Promise<T>; | ||
} | ||
export default PostService; |
{ | ||
"name": "vue-axios-http", | ||
"version": "3.4.0", | ||
"version": "3.4.1", | ||
"description": "Elegant and simple way to build requests for REST API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
60493