@nymphjs/client 1.0.0-beta.76 → 1.0.0-beta.78
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/CHANGELOG.md +8 -0
- package/lib/Nymph.types.d.ts +25 -0
- package/package.json +2 -2
- package/src/Nymph.types.ts +25 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.0.0-beta.78](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.77...v1.0.0-beta.78) (2024-09-27)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @nymphjs/client
|
|
9
|
+
|
|
10
|
+
# [1.0.0-beta.77](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.76...v1.0.0-beta.77) (2024-09-26)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @nymphjs/client
|
|
13
|
+
|
|
6
14
|
# [1.0.0-beta.76](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.75...v1.0.0-beta.76) (2024-09-25)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @nymphjs/client
|
package/lib/Nymph.types.d.ts
CHANGED
|
@@ -58,12 +58,37 @@ export type EventType = 'request' | 'response';
|
|
|
58
58
|
export type RequestCallback = (url: string, options: RequestInit) => void;
|
|
59
59
|
export type ResponseCallback = (response: Response, text: string) => void;
|
|
60
60
|
export type Options<T extends EntityConstructor = EntityConstructor> = {
|
|
61
|
+
/**
|
|
62
|
+
* The Entity class to query.
|
|
63
|
+
*/
|
|
61
64
|
class: T;
|
|
65
|
+
/**
|
|
66
|
+
* The limit of entities to be returned. Not needed when using `getEntity`, as
|
|
67
|
+
* it always returns only one.
|
|
68
|
+
*/
|
|
62
69
|
limit?: number;
|
|
70
|
+
/**
|
|
71
|
+
* The offset from the first matching entity, in order, to start retrieving.
|
|
72
|
+
*/
|
|
63
73
|
offset?: number;
|
|
74
|
+
/**
|
|
75
|
+
* If true, entities will be retrieved from newest to oldest/largest to
|
|
76
|
+
* smallest (with regard to `sort`).
|
|
77
|
+
*/
|
|
64
78
|
reverse?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* How to sort the entities. Should be "cdate", "mdate", or the name of a
|
|
81
|
+
* property.
|
|
82
|
+
*/
|
|
65
83
|
sort?: 'cdate' | 'mdate' | string;
|
|
84
|
+
/**
|
|
85
|
+
* What to return, the entities with their data, just the GUIDs, or just a
|
|
86
|
+
* count.
|
|
87
|
+
*/
|
|
66
88
|
return?: 'entity' | 'guid' | 'count';
|
|
89
|
+
/**
|
|
90
|
+
* If true, Nymph will skip the cache and retrieve the entity from the DB.
|
|
91
|
+
*/
|
|
67
92
|
skipCache?: boolean;
|
|
68
93
|
};
|
|
69
94
|
export type Clause<C> = C | Exclude<C, undefined>[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nymphjs/client",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.78",
|
|
4
4
|
"description": "Nymph.js - Client",
|
|
5
5
|
"browser": "dist/index.js",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"fetch-event-source-hperrin": "^3.0.0",
|
|
51
51
|
"lodash": "^4.17.21"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "064d1f6e384c6a4f57e33ca54b7d93c872ce9236"
|
|
54
54
|
}
|
package/src/Nymph.types.ts
CHANGED
|
@@ -63,12 +63,37 @@ export type RequestCallback = (url: string, options: RequestInit) => void;
|
|
|
63
63
|
export type ResponseCallback = (response: Response, text: string) => void;
|
|
64
64
|
|
|
65
65
|
export type Options<T extends EntityConstructor = EntityConstructor> = {
|
|
66
|
+
/**
|
|
67
|
+
* The Entity class to query.
|
|
68
|
+
*/
|
|
66
69
|
class: T;
|
|
70
|
+
/**
|
|
71
|
+
* The limit of entities to be returned. Not needed when using `getEntity`, as
|
|
72
|
+
* it always returns only one.
|
|
73
|
+
*/
|
|
67
74
|
limit?: number;
|
|
75
|
+
/**
|
|
76
|
+
* The offset from the first matching entity, in order, to start retrieving.
|
|
77
|
+
*/
|
|
68
78
|
offset?: number;
|
|
79
|
+
/**
|
|
80
|
+
* If true, entities will be retrieved from newest to oldest/largest to
|
|
81
|
+
* smallest (with regard to `sort`).
|
|
82
|
+
*/
|
|
69
83
|
reverse?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* How to sort the entities. Should be "cdate", "mdate", or the name of a
|
|
86
|
+
* property.
|
|
87
|
+
*/
|
|
70
88
|
sort?: 'cdate' | 'mdate' | string;
|
|
89
|
+
/**
|
|
90
|
+
* What to return, the entities with their data, just the GUIDs, or just a
|
|
91
|
+
* count.
|
|
92
|
+
*/
|
|
71
93
|
return?: 'entity' | 'guid' | 'count';
|
|
94
|
+
/**
|
|
95
|
+
* If true, Nymph will skip the cache and retrieve the entity from the DB.
|
|
96
|
+
*/
|
|
72
97
|
skipCache?: boolean;
|
|
73
98
|
};
|
|
74
99
|
|