@pinia-orm/axios-edge 1.9.0-28583603.744fcaf → 1.9.0-28585808.424bf4d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +8 -3
- package/dist/index.d.mts +8 -3
- package/dist/index.d.ts +8 -3
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { AxiosRequestConfig, AxiosResponse, AxiosInstance } from 'axios';
|
2
|
-
import { Element, Model, Repository, Collection, PiniaOrmPlugin } from 'pinia-orm';
|
2
|
+
import { Element, Model, Repository, Collection, Constructor, PiniaOrmPlugin } from 'pinia-orm';
|
3
3
|
|
4
4
|
type PersistMethods = 'save' | 'insert';
|
5
5
|
type PersistOptions = {
|
@@ -14,7 +14,12 @@ interface Config extends AxiosRequestConfig {
|
|
14
14
|
save?: boolean;
|
15
15
|
persistBy?: PersistMethods;
|
16
16
|
persistOptions?: PersistOptions;
|
17
|
-
|
17
|
+
/**
|
18
|
+
* This tells the api to delete the record from the store after the call is finished.
|
19
|
+
*
|
20
|
+
* It needs the `primaryKey` value (ID) of the entity as argument.
|
21
|
+
*/
|
22
|
+
delete?: string | number;
|
18
23
|
actions?: {
|
19
24
|
[name: string]: any;
|
20
25
|
};
|
@@ -156,7 +161,7 @@ declare class Request {
|
|
156
161
|
|
157
162
|
declare function useAxiosApi(repository: AxiosRepository<any>): Request;
|
158
163
|
|
159
|
-
declare function useAxiosRepo<M extends Model>(model: M): AxiosRepository<Model>;
|
164
|
+
declare function useAxiosRepo<M extends Model>(model: Constructor<M>): AxiosRepository<Model>;
|
160
165
|
|
161
166
|
declare function createPiniaOrmAxios(axiosConfig?: GlobalConfig): PiniaOrmPlugin;
|
162
167
|
declare const piniaOrmPluginAxios: PiniaOrmPlugin;
|
package/dist/index.d.mts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { AxiosRequestConfig, AxiosResponse, AxiosInstance } from 'axios';
|
2
|
-
import { Element, Model, Repository, Collection, PiniaOrmPlugin } from 'pinia-orm';
|
2
|
+
import { Element, Model, Repository, Collection, Constructor, PiniaOrmPlugin } from 'pinia-orm';
|
3
3
|
|
4
4
|
type PersistMethods = 'save' | 'insert';
|
5
5
|
type PersistOptions = {
|
@@ -14,7 +14,12 @@ interface Config extends AxiosRequestConfig {
|
|
14
14
|
save?: boolean;
|
15
15
|
persistBy?: PersistMethods;
|
16
16
|
persistOptions?: PersistOptions;
|
17
|
-
|
17
|
+
/**
|
18
|
+
* This tells the api to delete the record from the store after the call is finished.
|
19
|
+
*
|
20
|
+
* It needs the `primaryKey` value (ID) of the entity as argument.
|
21
|
+
*/
|
22
|
+
delete?: string | number;
|
18
23
|
actions?: {
|
19
24
|
[name: string]: any;
|
20
25
|
};
|
@@ -156,7 +161,7 @@ declare class Request {
|
|
156
161
|
|
157
162
|
declare function useAxiosApi(repository: AxiosRepository<any>): Request;
|
158
163
|
|
159
|
-
declare function useAxiosRepo<M extends Model>(model: M): AxiosRepository<Model>;
|
164
|
+
declare function useAxiosRepo<M extends Model>(model: Constructor<M>): AxiosRepository<Model>;
|
160
165
|
|
161
166
|
declare function createPiniaOrmAxios(axiosConfig?: GlobalConfig): PiniaOrmPlugin;
|
162
167
|
declare const piniaOrmPluginAxios: PiniaOrmPlugin;
|
package/dist/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { AxiosRequestConfig, AxiosResponse, AxiosInstance } from 'axios';
|
2
|
-
import { Element, Model, Repository, Collection, PiniaOrmPlugin } from 'pinia-orm';
|
2
|
+
import { Element, Model, Repository, Collection, Constructor, PiniaOrmPlugin } from 'pinia-orm';
|
3
3
|
|
4
4
|
type PersistMethods = 'save' | 'insert';
|
5
5
|
type PersistOptions = {
|
@@ -14,7 +14,12 @@ interface Config extends AxiosRequestConfig {
|
|
14
14
|
save?: boolean;
|
15
15
|
persistBy?: PersistMethods;
|
16
16
|
persistOptions?: PersistOptions;
|
17
|
-
|
17
|
+
/**
|
18
|
+
* This tells the api to delete the record from the store after the call is finished.
|
19
|
+
*
|
20
|
+
* It needs the `primaryKey` value (ID) of the entity as argument.
|
21
|
+
*/
|
22
|
+
delete?: string | number;
|
18
23
|
actions?: {
|
19
24
|
[name: string]: any;
|
20
25
|
};
|
@@ -156,7 +161,7 @@ declare class Request {
|
|
156
161
|
|
157
162
|
declare function useAxiosApi(repository: AxiosRepository<any>): Request;
|
158
163
|
|
159
|
-
declare function useAxiosRepo<M extends Model>(model: M): AxiosRepository<Model>;
|
164
|
+
declare function useAxiosRepo<M extends Model>(model: Constructor<M>): AxiosRepository<Model>;
|
160
165
|
|
161
166
|
declare function createPiniaOrmAxios(axiosConfig?: GlobalConfig): PiniaOrmPlugin;
|
162
167
|
declare const piniaOrmPluginAxios: PiniaOrmPlugin;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pinia-orm/axios-edge",
|
3
|
-
"version": "1.9.0-
|
3
|
+
"version": "1.9.0-28585808.424bf4d",
|
4
4
|
"description": "Axios plugin for pinia-orm",
|
5
5
|
"bugs": {
|
6
6
|
"url": "https://github.com/CodeDredd/pinia-orm/issues"
|
@@ -43,7 +43,7 @@
|
|
43
43
|
"license": "MIT",
|
44
44
|
"peerDependencies": {
|
45
45
|
"axios": ">=1.6.8",
|
46
|
-
"pinia-orm": "npm:pinia-orm-edge@1.9.0-
|
46
|
+
"pinia-orm": "npm:pinia-orm-edge@1.9.0-28585808.424bf4d",
|
47
47
|
"pinia": ">=2.1.7"
|
48
48
|
},
|
49
49
|
"devDependencies": {
|
@@ -55,7 +55,7 @@
|
|
55
55
|
"axios-mock-adapter": "^1.22.0",
|
56
56
|
"eslint": "^9.2.0",
|
57
57
|
"pinia": "^2.1.7",
|
58
|
-
"pinia-orm": "npm:pinia-orm-edge@1.9.0-
|
58
|
+
"pinia-orm": "npm:pinia-orm-edge@1.9.0-28585808.424bf4d",
|
59
59
|
"size-limit": "^11.1.2",
|
60
60
|
"typescript": "^5.4.5",
|
61
61
|
"unbuild": "^2.0.0",
|