pinejs-client-core 7.0.2 → 7.0.3

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.
@@ -1,3 +1,15 @@
1
+ - commits:
2
+ - subject: "Fix typings for `request` method when using `method: 'GET'`"
3
+ hash: 51bf4f2e8651409f856fadd5f37fda2290a53e26
4
+ body: ""
5
+ footer:
6
+ Change-type: patch
7
+ change-type: patch
8
+ author: Pagan Gazzard
9
+ nested: []
10
+ version: 7.0.3
11
+ title: ""
12
+ date: 2024-08-30T14:04:13.016Z
1
13
  - commits:
2
14
  - subject: Reduce overloads for `get` by improving `OptionsToResponse` type helper
3
15
  hash: e4e0c2808fb20166603bad5386ef887cf3296d4a
@@ -9,7 +21,7 @@
9
21
  nested: []
10
22
  version: 7.0.2
11
23
  title: ""
12
- date: 2024-08-29T17:59:53.650Z
24
+ date: 2024-08-30T13:52:19.618Z
13
25
  - commits:
14
26
  - subject: Change `ExpandPropsOf` and `ExpandToResponse` helpers to check the
15
27
  common case first
package/CHANGELOG.md CHANGED
@@ -4,7 +4,11 @@ All notable changes to this project will be documented in this file
4
4
  automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
5
5
  This project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
- ## 7.0.2 - 2024-08-29
7
+ ## 7.0.3 - 2024-08-30
8
+
9
+ * Fix typings for `request` method when using `method: 'GET'` [Pagan Gazzard]
10
+
11
+ ## 7.0.2 - 2024-08-30
8
12
 
9
13
  * Reduce overloads for `get` by improving `OptionsToResponse` type helper [Pagan Gazzard]
10
14
 
package/es2015/index.d.ts CHANGED
@@ -248,17 +248,25 @@ PinejsClient = unknown, Model extends {
248
248
  options: {
249
249
  $count: NonNullable<ODataOptions<T['Read']>['$count']>;
250
250
  };
251
- }): Promise<number>;
251
+ }): Promise<{
252
+ d: number;
253
+ }>;
252
254
  request<T extends Resource>(params: Params<T> & {
253
255
  method?: 'GET';
254
256
  id: NonNullable<Params<T>['id']>;
255
- }): Promise<AnyObject | undefined>;
257
+ }): Promise<{
258
+ d: AnyObject | undefined;
259
+ }>;
256
260
  request<T extends Resource>(params: Omit<Params<T>, 'id'> & {
257
261
  method?: 'GET';
258
- }): Promise<AnyObject[]>;
262
+ }): Promise<{
263
+ d: AnyObject[];
264
+ }>;
259
265
  request<T extends Resource>(params: Params<T> & {
260
266
  method?: 'GET';
261
- }): Promise<PromiseResultTypes>;
267
+ }): Promise<{
268
+ d: PromiseResultTypes;
269
+ }>;
262
270
  request<T extends Resource>(params: Params<T> & {
263
271
  method: 'PUT' | 'PATCH' | 'DELETE';
264
272
  }): Promise<undefined>;
package/es2018/index.d.ts CHANGED
@@ -248,17 +248,25 @@ PinejsClient = unknown, Model extends {
248
248
  options: {
249
249
  $count: NonNullable<ODataOptions<T['Read']>['$count']>;
250
250
  };
251
- }): Promise<number>;
251
+ }): Promise<{
252
+ d: number;
253
+ }>;
252
254
  request<T extends Resource>(params: Params<T> & {
253
255
  method?: 'GET';
254
256
  id: NonNullable<Params<T>['id']>;
255
- }): Promise<AnyObject | undefined>;
257
+ }): Promise<{
258
+ d: AnyObject | undefined;
259
+ }>;
256
260
  request<T extends Resource>(params: Omit<Params<T>, 'id'> & {
257
261
  method?: 'GET';
258
- }): Promise<AnyObject[]>;
262
+ }): Promise<{
263
+ d: AnyObject[];
264
+ }>;
259
265
  request<T extends Resource>(params: Params<T> & {
260
266
  method?: 'GET';
261
- }): Promise<PromiseResultTypes>;
267
+ }): Promise<{
268
+ d: PromiseResultTypes;
269
+ }>;
262
270
  request<T extends Resource>(params: Params<T> & {
263
271
  method: 'PUT' | 'PATCH' | 'DELETE';
264
272
  }): Promise<undefined>;
package/index.d.ts CHANGED
@@ -248,17 +248,25 @@ PinejsClient = unknown, Model extends {
248
248
  options: {
249
249
  $count: NonNullable<ODataOptions<T['Read']>['$count']>;
250
250
  };
251
- }): Promise<number>;
251
+ }): Promise<{
252
+ d: number;
253
+ }>;
252
254
  request<T extends Resource>(params: Params<T> & {
253
255
  method?: 'GET';
254
256
  id: NonNullable<Params<T>['id']>;
255
- }): Promise<AnyObject | undefined>;
257
+ }): Promise<{
258
+ d: AnyObject | undefined;
259
+ }>;
256
260
  request<T extends Resource>(params: Omit<Params<T>, 'id'> & {
257
261
  method?: 'GET';
258
- }): Promise<AnyObject[]>;
262
+ }): Promise<{
263
+ d: AnyObject[];
264
+ }>;
259
265
  request<T extends Resource>(params: Params<T> & {
260
266
  method?: 'GET';
261
- }): Promise<PromiseResultTypes>;
267
+ }): Promise<{
268
+ d: PromiseResultTypes;
269
+ }>;
262
270
  request<T extends Resource>(params: Params<T> & {
263
271
  method: 'PUT' | 'PATCH' | 'DELETE';
264
272
  }): Promise<undefined>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinejs-client-core",
3
- "version": "7.0.2",
3
+ "version": "7.0.3",
4
4
  "description": "This module provides the core tools to enable easier interaction with the pinejs API.",
5
5
  "browser": "es2015",
6
6
  "main": "index.js",
@@ -55,6 +55,6 @@
55
55
  "_": "test/*.ts"
56
56
  },
57
57
  "versionist": {
58
- "publishedAt": "2024-08-29T17:59:53.805Z"
58
+ "publishedAt": "2024-08-30T14:04:13.174Z"
59
59
  }
60
60
  }
package/src/index.ts CHANGED
@@ -1914,16 +1914,16 @@ export abstract class PinejsClientCore<
1914
1914
  method?: 'GET';
1915
1915
  options: { $count: NonNullable<ODataOptions<T['Read']>['$count']> };
1916
1916
  },
1917
- ): Promise<number>;
1917
+ ): Promise<{ d: number }>;
1918
1918
  public request<T extends Resource>(
1919
1919
  params: Params<T> & { method?: 'GET'; id: NonNullable<Params<T>['id']> },
1920
- ): Promise<AnyObject | undefined>;
1920
+ ): Promise<{ d: AnyObject | undefined }>;
1921
1921
  public request<T extends Resource>(
1922
1922
  params: Omit<Params<T>, 'id'> & { method?: 'GET' },
1923
- ): Promise<AnyObject[]>;
1923
+ ): Promise<{ d: AnyObject[] }>;
1924
1924
  public request<T extends Resource>(
1925
1925
  params: Params<T> & { method?: 'GET' },
1926
- ): Promise<PromiseResultTypes>;
1926
+ ): Promise<{ d: PromiseResultTypes }>;
1927
1927
  public request<T extends Resource>(
1928
1928
  params: Params<T> & {
1929
1929
  method: 'PUT' | 'PATCH' | 'DELETE';