@balena/pinejs 17.1.0-build-model-based-typings-69cb06110d937246c834286becb0410a2301f161-1 → 17.1.0-build-model-based-typings-e8917b7ea2db4233321dbfb73e6f23b569f3259d-1
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
|
|
1
1
|
- commits:
|
2
2
|
- subject: Add dev model typings
|
3
|
-
hash:
|
3
|
+
hash: e8917b7ea2db4233321dbfb73e6f23b569f3259d
|
4
4
|
body: ""
|
5
5
|
footer:
|
6
6
|
Change-type: patch
|
@@ -8,7 +8,7 @@
|
|
8
8
|
author: Pagan Gazzard
|
9
9
|
nested: []
|
10
10
|
- subject: Add migration model typings
|
11
|
-
hash:
|
11
|
+
hash: 3919d0153d2deff7ca07f9a7fc4a0aacac5a4553
|
12
12
|
body: ""
|
13
13
|
footer:
|
14
14
|
Change-type: patch
|
@@ -16,7 +16,7 @@
|
|
16
16
|
author: Pagan Gazzard
|
17
17
|
nested: []
|
18
18
|
- subject: Add auth model typings
|
19
|
-
hash:
|
19
|
+
hash: 29d674142afa65a46d3b3fc8716c2379fe46db25
|
20
20
|
body: ""
|
21
21
|
footer:
|
22
22
|
Change-type: patch
|
@@ -24,7 +24,7 @@
|
|
24
24
|
author: Pagan Gazzard
|
25
25
|
nested: []
|
26
26
|
- subject: Switch API typings to an interface so it can be overridden/merged
|
27
|
-
hash:
|
27
|
+
hash: ff5b099f617ae48e255562c5781797c38e42c2ac
|
28
28
|
body: ""
|
29
29
|
footer:
|
30
30
|
Change-type: minor
|
@@ -32,7 +32,7 @@
|
|
32
32
|
author: Pagan Gazzard
|
33
33
|
nested: []
|
34
34
|
- subject: Allow passing model typings when instantiating an internal pinejs client
|
35
|
-
hash:
|
35
|
+
hash: d2a086e7bcfc2dc4ff59f85813c2bed787ebad80
|
36
36
|
body: |
|
37
37
|
Update @balena/abstract-sql-compiler from 9.1.4 to 9.2.0
|
38
38
|
Update @balena/abstract-sql-to-typescript 3.1.1 to 3.1.2
|
@@ -238,7 +238,7 @@
|
|
238
238
|
nested: []
|
239
239
|
version: 17.1.0
|
240
240
|
title: ""
|
241
|
-
date: 2024-06-
|
241
|
+
date: 2024-06-14T15:34:17.634Z
|
242
242
|
- commits:
|
243
243
|
- subject: Switch from `Object.prototype.hasOwnProperty.call` to `Object.hasOwn`
|
244
244
|
hash: 1343f0d463bf4271846343ee98de4d8afb9402f3
|
@@ -108,22 +108,22 @@ export declare class PinejsClient<M extends {
|
|
108
108
|
req?: permissions.PermissionReq;
|
109
109
|
custom?: AnyObject;
|
110
110
|
}): Promise<object>;
|
111
|
-
post<TResource extends keyof M & string>(params: {
|
112
|
-
resource: TResource;
|
113
|
-
options: Params<M[TResource]>['options'] & {
|
114
|
-
returnResource: false;
|
115
|
-
};
|
116
|
-
} & Params<M[TResource]>): Promise<Pick<M[TResource]['Read'], 'id'>>;
|
117
111
|
post<TResource extends keyof M & string>(params: {
|
118
112
|
resource: TResource;
|
119
113
|
options?: Params<M[TResource]>['options'] & {
|
120
114
|
returnResource?: true;
|
121
115
|
};
|
122
116
|
} & Params<M[TResource]>): Promise<M[TResource]['Read']>;
|
117
|
+
post<TResource extends keyof M & string>(params: {
|
118
|
+
resource: TResource;
|
119
|
+
options: Params<M[TResource]>['options'] & {
|
120
|
+
returnResource: boolean;
|
121
|
+
};
|
122
|
+
} & Params<M[TResource]>): Promise<Pick<M[TResource]['Read'], 'id'>>;
|
123
123
|
post<T extends Resource = AnyResource>(params: {
|
124
124
|
resource?: undefined;
|
125
125
|
url: NonNullable<Params<T>['url']>;
|
126
|
-
} & Params<T>): Promise<
|
126
|
+
} & Params<T>): Promise<AnyObject>;
|
127
127
|
}
|
128
128
|
export interface API {
|
129
129
|
[vocab: string]: PinejsClient;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@balena/pinejs",
|
3
|
-
"version": "17.1.0-build-model-based-typings-
|
3
|
+
"version": "17.1.0-build-model-based-typings-e8917b7ea2db4233321dbfb73e6f23b569f3259d-1",
|
4
4
|
"main": "out/server-glue/module",
|
5
5
|
"type": "commonjs",
|
6
6
|
"repository": "git@github.com:balena-io/pinejs.git",
|
@@ -146,6 +146,6 @@
|
|
146
146
|
"recursive": true
|
147
147
|
},
|
148
148
|
"versionist": {
|
149
|
-
"publishedAt": "2024-06-
|
149
|
+
"publishedAt": "2024-06-14T15:34:19.120Z"
|
150
150
|
}
|
151
151
|
}
|
@@ -1036,15 +1036,15 @@ export class PinejsClient<
|
|
1036
1036
|
public post<TResource extends keyof M & string>(
|
1037
1037
|
params: {
|
1038
1038
|
resource: TResource;
|
1039
|
-
options
|
1039
|
+
options?: Params<M[TResource]>['options'] & { returnResource?: true };
|
1040
1040
|
} & Params<M[TResource]>,
|
1041
|
-
): Promise<
|
1041
|
+
): Promise<M[TResource]['Read']>;
|
1042
1042
|
public post<TResource extends keyof M & string>(
|
1043
1043
|
params: {
|
1044
1044
|
resource: TResource;
|
1045
|
-
options
|
1045
|
+
options: Params<M[TResource]>['options'] & { returnResource: boolean };
|
1046
1046
|
} & Params<M[TResource]>,
|
1047
|
-
): Promise<M[TResource]['Read']
|
1047
|
+
): Promise<Pick<M[TResource]['Read'], 'id'>>; // TODO: This should use the primary key rather than hardcoding `id`
|
1048
1048
|
/**
|
1049
1049
|
* @deprecated POSTing via `url` is deprecated
|
1050
1050
|
*/
|
@@ -1053,7 +1053,7 @@ export class PinejsClient<
|
|
1053
1053
|
resource?: undefined;
|
1054
1054
|
url: NonNullable<Params<T>['url']>;
|
1055
1055
|
} & Params<T>,
|
1056
|
-
): Promise<
|
1056
|
+
): Promise<AnyObject>;
|
1057
1057
|
public post(params: Params<AnyResource>): Promise<AnyObject> {
|
1058
1058
|
return super.post(params as Parameters<PinejsClient['post']>[0]);
|
1059
1059
|
}
|