@vmelou/jsonapi-angular 0.4.0 → 0.4.4
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/index.d.ts +51 -6
- package/package.json +3 -3
- package/lib/mixins/base.mixin.d.ts +0 -6
- package/lib/mixins/create.mixin.d.ts +0 -11
- package/lib/mixins/delete.mixin.d.ts +0 -11
- package/lib/mixins/list.mixin.d.ts +0 -12
- package/lib/mixins/retrieve.mixin.d.ts +0 -10
- package/lib/mixins/update.mixin.d.ts +0 -10
package/index.d.ts
CHANGED
|
@@ -1,6 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { HttpErrorResponse, HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ApiError, BaseResource, Results } from '@vmelou/jsonapi';
|
|
4
|
+
|
|
5
|
+
declare class BaseMixin {
|
|
6
|
+
protected handleErrors(error: HttpErrorResponse): Observable<ApiError[] | any>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare class CreateMixin<T extends BaseResource> extends BaseMixin {
|
|
10
|
+
private http;
|
|
11
|
+
private endpoint;
|
|
12
|
+
protected readonly cls: new () => T;
|
|
13
|
+
constructor(http: HttpClient, endpoint: string, cls: new () => T);
|
|
14
|
+
create(data: Partial<T>): Observable<T>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare class DeleteMixin<T extends BaseResource> extends BaseMixin {
|
|
18
|
+
private http;
|
|
19
|
+
private endpoint;
|
|
20
|
+
protected readonly cls: new () => T;
|
|
21
|
+
constructor(http: HttpClient, endpoint: string, cls: new () => T);
|
|
22
|
+
delete(id: string): Observable<void>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare class ListMixin<T extends BaseResource> {
|
|
26
|
+
private http;
|
|
27
|
+
private endpoint;
|
|
28
|
+
protected readonly cls: new () => T;
|
|
29
|
+
constructor(http: HttpClient, endpoint: string, cls: new () => T);
|
|
30
|
+
list(query?: {
|
|
31
|
+
[key: string]: string;
|
|
32
|
+
}, url?: string): Observable<Results<T>>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare class RetrieveMixin<T extends BaseResource> {
|
|
36
|
+
private http;
|
|
37
|
+
private endpoint;
|
|
38
|
+
protected readonly cls: new () => T;
|
|
39
|
+
constructor(http: HttpClient, endpoint: string, cls: new () => T);
|
|
40
|
+
retrieve(id: string, include?: string[]): Observable<T>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
declare class UpdateMixin<T extends BaseResource> {
|
|
44
|
+
private http;
|
|
45
|
+
private endpoint;
|
|
46
|
+
protected readonly cls: new () => T;
|
|
47
|
+
constructor(http: HttpClient, endpoint: string, cls: new () => T);
|
|
48
|
+
update(id: string, data: Partial<T>): Observable<T>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { BaseMixin, CreateMixin, DeleteMixin, ListMixin, RetrieveMixin, UpdateMixin };
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vmelou/jsonapi-angular",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"@angular/common": "
|
|
9
|
-
"@vmelou/jsonapi": "^0.4.
|
|
8
|
+
"@angular/common": "20.3.9",
|
|
9
|
+
"@vmelou/jsonapi": "^0.4.3",
|
|
10
10
|
"rxjs": "^7.8.0"
|
|
11
11
|
},
|
|
12
12
|
"sideEffects": false,
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { BaseResource } from '@vmelou/jsonapi';
|
|
4
|
-
import { BaseMixin } from './base.mixin';
|
|
5
|
-
export declare class CreateMixin<T extends BaseResource> extends BaseMixin {
|
|
6
|
-
private http;
|
|
7
|
-
private endpoint;
|
|
8
|
-
protected readonly cls: new () => T;
|
|
9
|
-
constructor(http: HttpClient, endpoint: string, cls: new () => T);
|
|
10
|
-
create(data: Partial<T>): Observable<T>;
|
|
11
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { BaseResource } from '@vmelou/jsonapi';
|
|
4
|
-
import { BaseMixin } from './base.mixin';
|
|
5
|
-
export declare class DeleteMixin<T extends BaseResource> extends BaseMixin {
|
|
6
|
-
private http;
|
|
7
|
-
private endpoint;
|
|
8
|
-
protected readonly cls: new () => T;
|
|
9
|
-
constructor(http: HttpClient, endpoint: string, cls: new () => T);
|
|
10
|
-
delete(id: string): Observable<void>;
|
|
11
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { BaseResource, Results } from '@vmelou/jsonapi';
|
|
4
|
-
export declare class ListMixin<T extends BaseResource> {
|
|
5
|
-
private http;
|
|
6
|
-
private endpoint;
|
|
7
|
-
protected readonly cls: new () => T;
|
|
8
|
-
constructor(http: HttpClient, endpoint: string, cls: new () => T);
|
|
9
|
-
list(query?: {
|
|
10
|
-
[key: string]: string;
|
|
11
|
-
}, url?: string): Observable<Results<T>>;
|
|
12
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { BaseResource } from '@vmelou/jsonapi';
|
|
4
|
-
export declare class RetrieveMixin<T extends BaseResource> {
|
|
5
|
-
private http;
|
|
6
|
-
private endpoint;
|
|
7
|
-
protected readonly cls: new () => T;
|
|
8
|
-
constructor(http: HttpClient, endpoint: string, cls: new () => T);
|
|
9
|
-
retrieve(id: string, include?: string[]): Observable<T>;
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { BaseResource } from '@vmelou/jsonapi';
|
|
4
|
-
export declare class UpdateMixin<T extends BaseResource> {
|
|
5
|
-
private http;
|
|
6
|
-
private endpoint;
|
|
7
|
-
protected readonly cls: new () => T;
|
|
8
|
-
constructor(http: HttpClient, endpoint: string, cls: new () => T);
|
|
9
|
-
update(id: string, data: Partial<T>): Observable<T>;
|
|
10
|
-
}
|