@nymphjs/nymph 1.0.0-beta.55 → 1.0.0-beta.57

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/dist/Nymph.d.ts CHANGED
@@ -3,12 +3,40 @@ import type { NymphDriver } from './driver';
3
3
  import Entity from './Entity';
4
4
  import type { EntityConstructor, EntityInterface } from './Entity.types';
5
5
  import type { Selector, Options, NymphConnectCallback, NymphDisconnectCallback, NymphBeforeGetEntityCallback, NymphBeforeGetEntitiesCallback, NymphBeforeSaveEntityCallback, NymphAfterSaveEntityCallback, NymphFailedSaveEntityCallback, NymphBeforeDeleteEntityCallback, NymphAfterDeleteEntityCallback, NymphFailedDeleteEntityCallback, NymphBeforeDeleteEntityByIDCallback, NymphAfterDeleteEntityByIDCallback, NymphFailedDeleteEntityByIDCallback, NymphBeforeNewUIDCallback, NymphAfterNewUIDCallback, NymphFailedNewUIDCallback, NymphBeforeSetUIDCallback, NymphAfterSetUIDCallback, NymphFailedSetUIDCallback, NymphBeforeRenameUIDCallback, NymphAfterRenameUIDCallback, NymphFailedRenameUIDCallback, NymphBeforeDeleteUIDCallback, NymphAfterDeleteUIDCallback, NymphFailedDeleteUIDCallback, NymphBeforeStartTransactionCallback, NymphAfterStartTransactionCallback, NymphBeforeCommitTransactionCallback, NymphAfterCommitTransactionCallback, NymphBeforeRollbackTransactionCallback, NymphAfterRollbackTransactionCallback, NymphEventType, NymphQueryCallback, FormattedSelector, TilmeldInterface } from './Nymph.types';
6
+ /**
7
+ * An object relational mapper for Node.js.
8
+ *
9
+ * Written by Hunter Perrin for SciActive.
10
+ *
11
+ * @author Hunter Perrin <hperrin@gmail.com>
12
+ * @copyright SciActive Inc
13
+ * @see http://nymph.io/
14
+ */
6
15
  export default class Nymph {
16
+ /**
17
+ * The Nymph config.
18
+ */
7
19
  config: Config;
20
+ /**
21
+ * The Nymph instance that this one was cloned from, or null if it's not a
22
+ * clone.
23
+ */
8
24
  parent: Nymph | null;
25
+ /**
26
+ * The Nymph database driver.
27
+ */
9
28
  driver: NymphDriver;
29
+ /**
30
+ * An optional Tilmeld user/group manager instance.
31
+ */
10
32
  tilmeld?: TilmeldInterface;
33
+ /**
34
+ * A simple map of names to Entity classes.
35
+ */
11
36
  private entityClasses;
37
+ /**
38
+ * The entity class for this instance of Nymph.
39
+ */
12
40
  Entity: typeof Entity;
13
41
  private connectCallbacks;
14
42
  private disconnectCallbacks;
@@ -42,24 +70,312 @@ export default class Nymph {
42
70
  private afterCommitTransactionCallbacks;
43
71
  private beforeRollbackTransactionCallbacks;
44
72
  private afterRollbackTransactionCallbacks;
73
+ /**
74
+ * Initialize Nymph.
75
+ *
76
+ * @param config The Nymph configuration.
77
+ * @param driver The Nymph database driver.
78
+ * @param tilmeld The Tilmeld user/group manager instance, if you want to use it.
79
+ * @param parent Used internally by Nymph. Don't set this.
80
+ */
45
81
  constructor(config: Partial<Config>, driver: NymphDriver, tilmeld?: TilmeldInterface, parent?: Nymph);
82
+ /**
83
+ * Add your class to this instance.
84
+ *
85
+ * This will create a class that extends your class within this instance of
86
+ * Nymph and return it. You can then use this class's constructor and methods,
87
+ * which will use this instance of Nymph.
88
+ *
89
+ * Because this creates a subclass, don't use the class
90
+ * returned from `getEntityClass` to check with `instanceof`.
91
+ */
46
92
  addEntityClass<T extends EntityConstructor>(entityClass: T): T;
93
+ /**
94
+ * Get the class that uses the specified class name.
95
+ */
47
96
  getEntityClass<T extends EntityConstructor>(className: T): T;
48
97
  getEntityClass(className: string): EntityConstructor;
98
+ /**
99
+ * Get a clone of this instance with cloned classes and event listeners.
100
+ *
101
+ * @returns A clone of this instance.
102
+ */
49
103
  clone(): Nymph;
104
+ /**
105
+ * Connect to the database.
106
+ *
107
+ * @returns Whether the instance is connected to the database.
108
+ */
50
109
  connect(): Promise<boolean>;
110
+ /**
111
+ * Disconnect from the database.
112
+ *
113
+ * @returns Whether the instance is connected to the database.
114
+ */
51
115
  disconnect(): Promise<boolean>;
116
+ /**
117
+ * Run all the query callbacks on a query.
118
+ */
52
119
  runQueryCallbacks(options: Options, selectors: FormattedSelector[]): void;
120
+ /**
121
+ * Start an atomic transaction and returns a new instance of Nymph.
122
+ *
123
+ * All proceeding changes using this new instance will wait to be written to
124
+ * the database's permanent storage until commit() is called. You can also
125
+ * undo all the changes since this function ran with rollback().
126
+ *
127
+ * Transactions will nest as long as every name is unique. Internally, Nymph
128
+ * uses names prefixed with "nymph-".
129
+ *
130
+ * @returns A new instance of Nymph that should be used for the transaction.
131
+ */
53
132
  startTransaction(name: string): Promise<Nymph>;
133
+ /**
134
+ * Commit the named transaction.
135
+ *
136
+ * After this is called, the transaction instance should be discarded.
137
+ *
138
+ * @returns True on success, false on failure.
139
+ */
54
140
  commit(name: string): Promise<boolean>;
141
+ /**
142
+ * Rollback the named transaction.
143
+ *
144
+ * After this is called, the transaction instance should be discarded.
145
+ *
146
+ * @returns True on success, false on failure.
147
+ */
55
148
  rollback(name: string): Promise<boolean>;
149
+ /**
150
+ * Check if there is any open transaction.
151
+ *
152
+ * @returns True if there is a transaction.
153
+ */
56
154
  inTransaction(): Promise<boolean>;
155
+ /**
156
+ * Increment or create a unique ID and return the new value.
157
+ *
158
+ * Unique IDs, or UIDs are similar to GUIDs, but numeric and sequential.
159
+ *
160
+ * A UID can be used to identify an object when the GUID doesn't suffice. On
161
+ * a system where a new entity is created many times per second, referring
162
+ * to something by its GUID may be unintuitive. However, the component
163
+ * designer is responsible for assigning UIDs to the component's entities.
164
+ * Beware that if a UID is incremented for an entity, and the entity cannot
165
+ * be saved, there is no safe, and therefore, no recommended way to
166
+ * decrement the UID back to its previous value.
167
+ *
168
+ * If newUID() is passed the name of a UID which does not exist yet, one
169
+ * will be created with that name, and assigned the value 1. If the UID
170
+ * already exists, its value will be incremented. The new value will be
171
+ * returned.
172
+ *
173
+ * @param name The UID's name.
174
+ * @returns The UID's new value, or null on failure.
175
+ */
57
176
  newUID(name: string): Promise<number | null>;
177
+ /**
178
+ * Get the current value of a unique ID.
179
+ * @param name The UID's name.
180
+ * @returns The UID's value, or null on failure and if it doesn't exist.
181
+ */
58
182
  getUID(name: string): Promise<number | null>;
183
+ /**
184
+ * Set the value of a UID.
185
+ *
186
+ * @param name The UID's name.
187
+ * @param value The value.
188
+ * @returns True on success, false on failure.
189
+ */
59
190
  setUID(name: string, value: number): Promise<boolean>;
191
+ /**
192
+ * Delete a unique ID.
193
+ *
194
+ * @param name The UID's name.
195
+ * @returns True on success, false on failure.
196
+ */
60
197
  deleteUID(name: string): Promise<boolean>;
198
+ /**
199
+ * Rename a unique ID.
200
+ *
201
+ * @param oldName The old name.
202
+ * @param newName The new name.
203
+ * @returns True on success, false on failure.
204
+ */
61
205
  renameUID(oldName: string, newName: string): Promise<boolean>;
206
+ /**
207
+ * Save an entity to the database.
208
+ *
209
+ * If the entity has never been saved (has no GUID), a variable "cdate"
210
+ * is set on it with the current Unix timestamp.
211
+ *
212
+ * The variable "mdate" is set to the current Unix timestamp.
213
+ *
214
+ * @param entity The entity.
215
+ * @returns True on success, false on failure.
216
+ */
62
217
  saveEntity(entity: EntityInterface): Promise<boolean>;
218
+ /**
219
+ * Get an array of entities.
220
+ *
221
+ * `options` is an object, which contains any of the following settings:
222
+ *
223
+ * - class - The class to create each entity with.
224
+ * - limit - The limit of entities to be returned.
225
+ * - offset - The offset from the oldest matching entity to start retrieving.
226
+ * - reverse - If true, entities will be retrieved from newest to oldest.
227
+ * Therefore, offset will be from the newest entity.
228
+ * - sort - How to sort the entities. Accepts "cdate", "mdate", or the name of
229
+ * a top-level property. The method of sorting properties other than cdate
230
+ * and mdate is driver dependent. The only hard rule is that numbers should
231
+ * be sorted numerically (2 before 10). Defaults to "cdate".
232
+ * - return - What to return. "entity", "guid", or "count". Defaults to
233
+ * "entity".
234
+ * - source - Will be 'client' if the query came from a REST call.
235
+ * - skipCache - If true, Nymph will skip the cache and retrieve the entity
236
+ * from the DB.
237
+ * - skipAc - If true, Tilmeld will not filter returned entities according to
238
+ * access controls. (If Tilmeld is installed.) (This is *always* set to
239
+ * false by the REST server.)
240
+ *
241
+ * If a class is specified, it must have a factory() static method that
242
+ * returns a new instance.
243
+ *
244
+ * Selectors are objects. Any amount of selectors can be provided. Empty
245
+ * selectors will be ignored. The `type` property of a selector is required
246
+ * and can be one of the following strings:
247
+ *
248
+ * - & - (and) All values in the selector must be true.
249
+ * - | - (or) At least one value in the selector must be true.
250
+ * - !& - (not and) All values in the selector must be false.
251
+ * - !| - (not or) At least one value in the selector must be false.
252
+ *
253
+ * The rest of the properties in the selectors are called selector clauses,
254
+ * which can be any of the following (in the form selector.name = value, or
255
+ * selector.name = [value1, value2,...]):
256
+ *
257
+ * - guid - A GUID. True if the entity's GUID is equal.
258
+ * - tag - A tag. True if the entity has the tag.
259
+ * - defined - A name. True if the named property exists.
260
+ * - truthy - A name. True if the named property is defined and truthy.
261
+ * - equal - An array with a name, then value. True if the named property is
262
+ * defined and equal (their JSON strings are identical).
263
+ * - contain - An array with a name, then value. True if the named property
264
+ * contains the value (its JSON string is found within the property's JSON
265
+ * string).
266
+ * - match - An array with a name, then regular expression. True if the
267
+ * named property matches. Uses POSIX RegExp. Case sensitive. Must *not* be
268
+ * surrounded by any delimiters.
269
+ * - imatch - An array with a name, then regular expression. True if the
270
+ * named property matches. Uses POSIX RegExp. Case insensitive. Must *not*
271
+ * be surrounded by any delimiters.
272
+ * - like - An array with a name, then pattern. True if the named property
273
+ * matches. Uses % for variable length wildcard and _ for single character
274
+ * wildcard. Case sensitive.
275
+ * - ilike - An array with a name, then pattern. True if the named property
276
+ * matches. Uses % for variable length wildcard and _ for single character
277
+ * wildcard. Case insensitive.
278
+ * - gt - An array with a name, then value. True if the named property is
279
+ * greater than the value.
280
+ * - gte - An array with a name, then value. True if the named property is
281
+ * greater than or equal to the value.
282
+ * - lt - An array with a name, then value. True if the named property is
283
+ * less than the value.
284
+ * - lte - An array with a name, then value. True if the named property is
285
+ * less than or equal to the value.
286
+ * - ref - An array with a name, then either an entity, or a GUID. True if
287
+ * the named property is the entity or contains the entity.
288
+ * - qref - An array with a name, then a full query (including options) in an
289
+ * array. True if the named property is an entity that matches the query or
290
+ * contains an entity that matches the query.
291
+ * - selector - A selector. (Keep in mind, you can also use an array of these,
292
+ * just like any other clause.)
293
+ *
294
+ * These clauses can all be negated, by prefixing them with an exclamation
295
+ * point, such as "!truthy" to mean falsy (or undefined).
296
+ *
297
+ * Any clause that accepts an array of name and value can also accept a third
298
+ * element. If value is null and the third element is a string, the third
299
+ * element will be used with Locutus' strtotime function to set value to a
300
+ * relative timestamp. For example, the following selector will look for all
301
+ * entities that were created in the last day:
302
+ *
303
+ * ```
304
+ * {
305
+ * type: '&',
306
+ * gte: ['cdate', null, '-1 day']
307
+ * }
308
+ * ```
309
+ *
310
+ * Locutus' implementation: https://locutus.io/php/datetime/strtotime/
311
+ * PHP's documentation: https://www.php.net/manual/en/function.strtotime.php
312
+ *
313
+ * This example will retrieve the last two entities where:
314
+ *
315
+ * - It has 'person' tag.
316
+ * - spouse is defined.
317
+ * - gender is male and lname is Smith.
318
+ * - warnings is not an integer 0.
319
+ * - It has 'level1' and 'level2' tags, or it has 'access1' and 'access2'
320
+ * tags.
321
+ * - It has either 'employee' or 'manager' tag.
322
+ * - name is either Clark, James, Chris, Christopher, Jake, or Jacob.
323
+ * - If age is 22 or more, then pay is not greater than 8.
324
+ *
325
+ * ```
326
+ * const entities = Nymph.getEntities(
327
+ * { class: Entity, reverse: true, limit: 2 },
328
+ * {
329
+ * type: '&', // all must be true
330
+ * tag: 'person',
331
+ * defined: 'spouse',
332
+ * equal: [
333
+ * ['gender', 'male'],
334
+ * ['lname', 'Smith']
335
+ * ],
336
+ * '!equal': ['warnings', 0]
337
+ * },
338
+ * {
339
+ * type: '|', // at least one of the selectors in this must match
340
+ * selector: [
341
+ * {
342
+ * type: '&',
343
+ * tag: ['level1', 'level2']
344
+ * },
345
+ * {
346
+ * type: '&',
347
+ * tag: ['access1', 'access2']
348
+ * }
349
+ * ]
350
+ * },
351
+ * {
352
+ * type: '|', // at least one must be true
353
+ * tag: ['employee', 'manager']
354
+ * },
355
+ * {
356
+ * type: '|',
357
+ * equal: [
358
+ * ['name', 'Clark'],
359
+ * ['name', 'James']
360
+ * ],
361
+ * match: [
362
+ * ['name', 'Chris(topher)?'],
363
+ * ['name', 'Ja(ke|cob)']
364
+ * ]
365
+ * },
366
+ * {
367
+ * type: '!|', // at least one must be false
368
+ * gte: ['age', 22],
369
+ * gt: ['pay', 8]
370
+ * }
371
+ * );
372
+ * ```
373
+ *
374
+ * @param options The options.
375
+ * @param selectors Unlimited optional selectors to search for. If none are given, all entities are retrieved for the given options.
376
+ * @returns An array of entities or guids, or a count.
377
+ * @todo Use an asterisk to specify any variable.
378
+ */
63
379
  getEntities<T extends EntityConstructor = EntityConstructor>(options: Options<T> & {
64
380
  return: 'count';
65
381
  }, ...selectors: Selector[]): Promise<number>;
@@ -67,6 +383,19 @@ export default class Nymph {
67
383
  return: 'guid';
68
384
  }, ...selectors: Selector[]): Promise<string[]>;
69
385
  getEntities<T extends EntityConstructor = EntityConstructor>(options?: Options<T>, ...selectors: Selector[]): Promise<ReturnType<T['factorySync']>[]>;
386
+ /**
387
+ * Get the first entity to match all options/selectors.
388
+ *
389
+ * options and selectors are the same as in getEntities().
390
+ *
391
+ * This function is equivalent to setting options.limit to 1 for
392
+ * getEntities(), except that it will return null if no entity is found.
393
+ * getEntities() would return an empty array.
394
+ *
395
+ * @param options The options.
396
+ * @param selectors Unlimited optional selectors to search for, or a single GUID. If none are given, all entities are searched for the given options.
397
+ * @returns An entity or guid, or null on failure or nothing found, or a number.
398
+ */
70
399
  getEntity<T extends EntityConstructor = EntityConstructor>(options: Options<T> & {
71
400
  return: 'count';
72
401
  }, ...selectors: Selector[]): Promise<number>;
@@ -78,10 +407,70 @@ export default class Nymph {
78
407
  return: 'guid';
79
408
  }, guid: string): Promise<string | null>;
80
409
  getEntity<T extends EntityConstructor = EntityConstructor>(options: Options<T>, guid: string): Promise<ReturnType<T['factorySync']> | null>;
410
+ /**
411
+ * Delete an entity from the database.
412
+ *
413
+ * @param entity The entity.
414
+ * @returns True on success, false on failure.
415
+ */
81
416
  deleteEntity(entity: EntityInterface): Promise<boolean>;
417
+ /**
418
+ * Delete an entity from the database by its GUID.
419
+ *
420
+ * @param guid The entity's GUID.
421
+ * @param className The entity's class name.
422
+ * @returns True on success, false on failure.
423
+ */
82
424
  deleteEntityByID(guid: string, className?: string): Promise<boolean>;
425
+ /**
426
+ * Export entities to a local file.
427
+ *
428
+ * This is the file format:
429
+ *
430
+ * ```
431
+ * #nex2
432
+ * # The above line must be the first thing in the file.
433
+ * # Comments begin with #
434
+ * # And can have white space before them.
435
+ * # This defines a UID.
436
+ * <name/of/uid>[5]
437
+ * <another uid>[8000]
438
+ * # For UIDs, the name is in angle brackets (<>) and the value follows
439
+ * # in square brackets ([]).
440
+ * # This starts a new entity.
441
+ * {1234abcd}<etype>[tag,list,with,commas]
442
+ * # For entities, the GUID is in curly brackets ({}), then the etype in
443
+ * # angle brackets, then the comma separated tag list follows in square
444
+ * # brackets ([]).
445
+ * # Properties are stored like this:
446
+ * # propname=JSON.stringify(value)
447
+ * abilities=["system/admin"]
448
+ * groups=[]
449
+ * inheritAbilities=false
450
+ * name="admin"
451
+ * # White space before/after "=" and at beginning/end of line is ignored.
452
+ * username = "admin"
453
+ * {2}<etype>[tag,list]
454
+ * another="This is another entity."
455
+ * newline="\n"
456
+ * ```
457
+ *
458
+ * @param filename The file to export to.
459
+ * @returns True on success, false on failure.
460
+ */
83
461
  export(filename: string): Promise<boolean>;
462
+ /**
463
+ * Export entities to the console.
464
+ *
465
+ * @returns True on success, false on failure.
466
+ */
84
467
  exportPrint(): Promise<boolean>;
468
+ /**
469
+ * Import entities from a file.
470
+ *
471
+ * @param filename The file to import from.
472
+ * @returns True on success, false on failure.
473
+ */
85
474
  import(filename: string): Promise<boolean>;
86
475
  on<T extends NymphEventType>(event: T, callback: T extends 'connect' ? NymphConnectCallback : T extends 'disconnect' ? NymphDisconnectCallback : T extends 'query' ? NymphQueryCallback : T extends 'beforeGetEntity' ? NymphBeforeGetEntityCallback : T extends 'beforeGetEntities' ? NymphBeforeGetEntitiesCallback : T extends 'beforeSaveEntity' ? NymphBeforeSaveEntityCallback : T extends 'afterSaveEntity' ? NymphAfterSaveEntityCallback : T extends 'failedSaveEntity' ? NymphFailedSaveEntityCallback : T extends 'beforeDeleteEntity' ? NymphBeforeDeleteEntityCallback : T extends 'afterDeleteEntity' ? NymphAfterDeleteEntityCallback : T extends 'failedDeleteEntity' ? NymphFailedDeleteEntityCallback : T extends 'beforeDeleteEntityByID' ? NymphBeforeDeleteEntityByIDCallback : T extends 'afterDeleteEntityByID' ? NymphAfterDeleteEntityByIDCallback : T extends 'failedDeleteEntityByID' ? NymphFailedDeleteEntityByIDCallback : T extends 'beforeNewUID' ? NymphBeforeNewUIDCallback : T extends 'afterNewUID' ? NymphAfterNewUIDCallback : T extends 'failedNewUID' ? NymphFailedNewUIDCallback : T extends 'beforeSetUID' ? NymphBeforeSetUIDCallback : T extends 'afterSetUID' ? NymphAfterSetUIDCallback : T extends 'failedSetUID' ? NymphFailedSetUIDCallback : T extends 'beforeRenameUID' ? NymphBeforeRenameUIDCallback : T extends 'afterRenameUID' ? NymphAfterRenameUIDCallback : T extends 'failedRenameUID' ? NymphFailedRenameUIDCallback : T extends 'beforeDeleteUID' ? NymphBeforeDeleteUIDCallback : T extends 'afterDeleteUID' ? NymphAfterDeleteUIDCallback : T extends 'failedDeleteUID' ? NymphFailedDeleteUIDCallback : T extends 'beforeStartTransaction' ? NymphBeforeStartTransactionCallback : T extends 'afterStartTransaction' ? NymphAfterStartTransactionCallback : T extends 'beforeCommitTransaction' ? NymphBeforeCommitTransactionCallback : T extends 'afterCommitTransaction' ? NymphAfterCommitTransactionCallback : T extends 'beforeRollbackTransaction' ? NymphBeforeRollbackTransactionCallback : T extends 'afterRollbackTransaction' ? NymphAfterRollbackTransactionCallback : never): () => boolean;
87
476
  off<T extends NymphEventType>(event: T, callback: T extends 'connect' ? NymphConnectCallback : T extends 'disconnect' ? NymphDisconnectCallback : T extends 'query' ? NymphQueryCallback : T extends 'beforeGetEntity' ? NymphBeforeGetEntityCallback : T extends 'beforeGetEntities' ? NymphBeforeGetEntitiesCallback : T extends 'beforeSaveEntity' ? NymphBeforeSaveEntityCallback : T extends 'afterSaveEntity' ? NymphAfterSaveEntityCallback : T extends 'failedSaveEntity' ? NymphFailedSaveEntityCallback : T extends 'beforeDeleteEntity' ? NymphBeforeDeleteEntityCallback : T extends 'afterDeleteEntity' ? NymphAfterDeleteEntityCallback : T extends 'failedDeleteEntity' ? NymphFailedDeleteEntityCallback : T extends 'beforeDeleteEntityByID' ? NymphBeforeDeleteEntityByIDCallback : T extends 'afterDeleteEntityByID' ? NymphAfterDeleteEntityByIDCallback : T extends 'failedDeleteEntityByID' ? NymphFailedDeleteEntityByIDCallback : T extends 'beforeNewUID' ? NymphBeforeNewUIDCallback : T extends 'afterNewUID' ? NymphAfterNewUIDCallback : T extends 'failedNewUID' ? NymphFailedNewUIDCallback : T extends 'beforeSetUID' ? NymphBeforeSetUIDCallback : T extends 'afterSetUID' ? NymphAfterSetUIDCallback : T extends 'failedSetUID' ? NymphFailedSetUIDCallback : T extends 'beforeRenameUID' ? NymphBeforeRenameUIDCallback : T extends 'afterRenameUID' ? NymphAfterRenameUIDCallback : T extends 'failedRenameUID' ? NymphFailedRenameUIDCallback : T extends 'beforeDeleteUID' ? NymphBeforeDeleteUIDCallback : T extends 'afterDeleteUID' ? NymphAfterDeleteUIDCallback : T extends 'failedDeleteUID' ? NymphFailedDeleteUIDCallback : T extends 'beforeStartTransaction' ? NymphBeforeStartTransactionCallback : T extends 'afterStartTransaction' ? NymphAfterStartTransactionCallback : T extends 'beforeCommitTransaction' ? NymphBeforeCommitTransactionCallback : T extends 'afterCommitTransaction' ? NymphAfterCommitTransactionCallback : T extends 'beforeRollbackTransaction' ? NymphBeforeRollbackTransactionCallback : T extends 'afterRollbackTransaction' ? NymphAfterRollbackTransactionCallback : never): boolean;