@nymphjs/nymph 1.0.0-beta.111 → 1.0.0-beta.112

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 CHANGED
@@ -3,6 +3,12 @@
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.112](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.111...v1.0.0-beta.112) (2026-04-03)
7
+
8
+ ### Features
9
+
10
+ - add acRequest query option ([600b617](https://forge.sciactive.com/sciactive/nymphjs/commits/600b617692b7ba0824e6ee91c0c9f9c29156fbe3))
11
+
6
12
  # [1.0.0-beta.111](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.110...v1.0.0-beta.111) (2026-03-10)
7
13
 
8
14
  **Note:** Version bump only for package @nymphjs/nymph
@@ -91,6 +91,13 @@ export type Options<T extends EntityConstructor = EntityConstructor> = {
91
91
  * If true, Nymph will skip the cache and retrieve the entity from the DB.
92
92
  */
93
93
  skipCache?: boolean;
94
+ /**
95
+ * The level(s) of access control requested.
96
+ *
97
+ * Limiting the access control can significantly improve the performance of
98
+ * the query.
99
+ */
100
+ acRequest?: TilmeldAccessRequest;
94
101
  /**
95
102
  * If true, Tilmeld will not filter returned entities according to access
96
103
  * controls. (If Tilmeld is installed.) (This is always set to false by the
@@ -222,6 +229,49 @@ export declare enum TilmeldAccessLevels {
222
229
  WRITE_ACCESS = 2,
223
230
  FULL_ACCESS = 4
224
231
  }
232
+ export declare enum TilmeldAccessRequest {
233
+ /**
234
+ * The default level, any possible entity readable by the user.
235
+ *
236
+ * This is the same as or-ing together all of the levels listed below.
237
+ */
238
+ ALL_LEVELS = 0,
239
+ /**
240
+ * Owned by and accessible to the user.
241
+ *
242
+ * This is always enabled, so not including it has no effect. It's here to
243
+ * allow the selection of _only_ user owned entities.
244
+ */
245
+ USER_OWNED = 1,
246
+ /**
247
+ * Owned by and accessible to the user's primary group.
248
+ */
249
+ PRIMARY_GROUP_OWNED = 2,
250
+ /**
251
+ * Owned by and accessible to one of the user's secondary groups.
252
+ */
253
+ SECONDARY_GROUP_OWNED = 4,
254
+ /**
255
+ * The user is listed in an access control list.
256
+ */
257
+ USER_ACCESSIBLE = 8,
258
+ /**
259
+ * The user's primary group is listed in an access control list.
260
+ */
261
+ PRIMARY_GROUP_ACCESSIBLE = 16,
262
+ /**
263
+ * One of the user's secondary groups is listed in an access control list.
264
+ */
265
+ SECONDARY_GROUP_ACCESSIBLE = 32,
266
+ /**
267
+ * The entity is accessible to any user.
268
+ */
269
+ OTHER_ACCESSIBLE = 64,
270
+ /**
271
+ * The entity is not owned by anyone.
272
+ */
273
+ UNOWNED = 128
274
+ }
225
275
  export interface TilmeldInterface {
226
276
  nymph: Nymph;
227
277
  request: any;
@@ -6,4 +6,48 @@ export var TilmeldAccessLevels;
6
6
  // Keeping 3 open in case we ever need one between write and full.
7
7
  TilmeldAccessLevels[TilmeldAccessLevels["FULL_ACCESS"] = 4] = "FULL_ACCESS";
8
8
  })(TilmeldAccessLevels || (TilmeldAccessLevels = {}));
9
+ export var TilmeldAccessRequest;
10
+ (function (TilmeldAccessRequest) {
11
+ /**
12
+ * The default level, any possible entity readable by the user.
13
+ *
14
+ * This is the same as or-ing together all of the levels listed below.
15
+ */
16
+ TilmeldAccessRequest[TilmeldAccessRequest["ALL_LEVELS"] = 0] = "ALL_LEVELS";
17
+ /**
18
+ * Owned by and accessible to the user.
19
+ *
20
+ * This is always enabled, so not including it has no effect. It's here to
21
+ * allow the selection of _only_ user owned entities.
22
+ */
23
+ TilmeldAccessRequest[TilmeldAccessRequest["USER_OWNED"] = 1] = "USER_OWNED";
24
+ /**
25
+ * Owned by and accessible to the user's primary group.
26
+ */
27
+ TilmeldAccessRequest[TilmeldAccessRequest["PRIMARY_GROUP_OWNED"] = 2] = "PRIMARY_GROUP_OWNED";
28
+ /**
29
+ * Owned by and accessible to one of the user's secondary groups.
30
+ */
31
+ TilmeldAccessRequest[TilmeldAccessRequest["SECONDARY_GROUP_OWNED"] = 4] = "SECONDARY_GROUP_OWNED";
32
+ /**
33
+ * The user is listed in an access control list.
34
+ */
35
+ TilmeldAccessRequest[TilmeldAccessRequest["USER_ACCESSIBLE"] = 8] = "USER_ACCESSIBLE";
36
+ /**
37
+ * The user's primary group is listed in an access control list.
38
+ */
39
+ TilmeldAccessRequest[TilmeldAccessRequest["PRIMARY_GROUP_ACCESSIBLE"] = 16] = "PRIMARY_GROUP_ACCESSIBLE";
40
+ /**
41
+ * One of the user's secondary groups is listed in an access control list.
42
+ */
43
+ TilmeldAccessRequest[TilmeldAccessRequest["SECONDARY_GROUP_ACCESSIBLE"] = 32] = "SECONDARY_GROUP_ACCESSIBLE";
44
+ /**
45
+ * The entity is accessible to any user.
46
+ */
47
+ TilmeldAccessRequest[TilmeldAccessRequest["OTHER_ACCESSIBLE"] = 64] = "OTHER_ACCESSIBLE";
48
+ /**
49
+ * The entity is not owned by anyone.
50
+ */
51
+ TilmeldAccessRequest[TilmeldAccessRequest["UNOWNED"] = 128] = "UNOWNED";
52
+ })(TilmeldAccessRequest || (TilmeldAccessRequest = {}));
9
53
  //# sourceMappingURL=Nymph.types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Nymph.types.js","sourceRoot":"","sources":["../src/Nymph.types.ts"],"names":[],"mappings":"AAgaA,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,uEAAa,CAAA;IACb,2EAAe,CAAA;IACf,6EAAgB,CAAA;IAChB,kEAAkE;IAClE,2EAAe,CAAA;AACjB,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B"}
1
+ {"version":3,"file":"Nymph.types.js","sourceRoot":"","sources":["../src/Nymph.types.ts"],"names":[],"mappings":"AAuaA,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,uEAAa,CAAA;IACb,2EAAe,CAAA;IACf,6EAAgB,CAAA;IAChB,kEAAkE;IAClE,2EAAe,CAAA;AACjB,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B;AAED,MAAM,CAAN,IAAY,oBA0CX;AA1CD,WAAY,oBAAoB;IAC9B;;;;OAIG;IACH,2EAAc,CAAA;IACd;;;;;OAKG;IACH,2EAAc,CAAA;IACd;;OAEG;IACH,6FAAuB,CAAA;IACvB;;OAEG;IACH,iGAAyB,CAAA;IACzB;;OAEG;IACH,qFAAmB,CAAA;IACnB;;OAEG;IACH,wGAA6B,CAAA;IAC7B;;OAEG;IACH,4GAA+B,CAAA;IAC/B;;OAEG;IACH,wFAAqB,CAAA;IACrB;;OAEG;IACH,uEAAa,CAAA;AACf,CAAC,EA1CW,oBAAoB,KAApB,oBAAoB,QA0C/B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nymphjs/nymph",
3
- "version": "1.0.0-beta.111",
3
+ "version": "1.0.0-beta.112",
4
4
  "description": "Nymph.js - Nymph ORM",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -23,15 +23,15 @@
23
23
  },
24
24
  "repository": {
25
25
  "type": "git",
26
- "url": "git+https://github.com/sciactive/nymphjs.git"
26
+ "url": "git+https://forge.sciactive.com/sciactive/nymphjs.git"
27
27
  },
28
28
  "author": "Hunter Perrin <hperrin@gmail.com>",
29
29
  "bugs": {
30
- "url": "https://github.com/sciactive/nymphjs/issues"
30
+ "url": "https://forge.sciactive.com/sciactive/nymphjs/issues"
31
31
  },
32
32
  "license": "Apache-2.0",
33
33
  "dependencies": {
34
- "@nymphjs/guid": "^1.0.0-beta.111",
34
+ "@nymphjs/guid": "^1.0.0-beta.112",
35
35
  "@sciactive/tokenizer": "^3.0.2",
36
36
  "debug": "^4.4.3",
37
37
  "joi": "^18.0.2",
@@ -51,5 +51,5 @@
51
51
  "ts-node": "^10.9.2",
52
52
  "typescript": "^5.9.3"
53
53
  },
54
- "gitHead": "8028358367d8fd89bb434f122b243bec4c71f2e1"
54
+ "gitHead": "20157c196abcc9dcc70c1dff207cbea35a32f69f"
55
55
  }
@@ -230,6 +230,13 @@ export type Options<T extends EntityConstructor = EntityConstructor> = {
230
230
  * If true, Nymph will skip the cache and retrieve the entity from the DB.
231
231
  */
232
232
  skipCache?: boolean;
233
+ /**
234
+ * The level(s) of access control requested.
235
+ *
236
+ * Limiting the access control can significantly improve the performance of
237
+ * the query.
238
+ */
239
+ acRequest?: TilmeldAccessRequest;
233
240
  /**
234
241
  * If true, Tilmeld will not filter returned entities according to access
235
242
  * controls. (If Tilmeld is installed.) (This is always set to false by the
@@ -422,6 +429,50 @@ export enum TilmeldAccessLevels {
422
429
  FULL_ACCESS = 4,
423
430
  }
424
431
 
432
+ export enum TilmeldAccessRequest {
433
+ /**
434
+ * The default level, any possible entity readable by the user.
435
+ *
436
+ * This is the same as or-ing together all of the levels listed below.
437
+ */
438
+ ALL_LEVELS = 0,
439
+ /**
440
+ * Owned by and accessible to the user.
441
+ *
442
+ * This is always enabled, so not including it has no effect. It's here to
443
+ * allow the selection of _only_ user owned entities.
444
+ */
445
+ USER_OWNED = 1,
446
+ /**
447
+ * Owned by and accessible to the user's primary group.
448
+ */
449
+ PRIMARY_GROUP_OWNED = 2,
450
+ /**
451
+ * Owned by and accessible to one of the user's secondary groups.
452
+ */
453
+ SECONDARY_GROUP_OWNED = 4,
454
+ /**
455
+ * The user is listed in an access control list.
456
+ */
457
+ USER_ACCESSIBLE = 8,
458
+ /**
459
+ * The user's primary group is listed in an access control list.
460
+ */
461
+ PRIMARY_GROUP_ACCESSIBLE = 16,
462
+ /**
463
+ * One of the user's secondary groups is listed in an access control list.
464
+ */
465
+ SECONDARY_GROUP_ACCESSIBLE = 32,
466
+ /**
467
+ * The entity is accessible to any user.
468
+ */
469
+ OTHER_ACCESSIBLE = 64,
470
+ /**
471
+ * The entity is not owned by anyone.
472
+ */
473
+ UNOWNED = 128,
474
+ }
475
+
425
476
  export interface TilmeldInterface {
426
477
  nymph: Nymph;
427
478
  request: any;